@fluid-topics/ft-search-selected-facets 1.1.53 → 1.1.55
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.
|
@@ -811,7 +811,7 @@ const jt=Symbol.for(""),Mt=t=>{if(t?.r===jt)return t?._$litStatic$},_t=t=>({_$li
|
|
|
811
811
|
width: ${ee.smallIconOnlyWidth};
|
|
812
812
|
padding: unset;
|
|
813
813
|
}
|
|
814
|
-
`,e.noTextSelect];var Yi=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,l=t.length-1;l>=0;l--)(r=t[l])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Qi extends _i{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.tertiary=!1,this.neutral=!1,this.small=!1}get buttonClasses(){return{"ft-button":!0,"ft-button--primary":this.primary,"ft-button--secondary":this.secondary,"ft-button--tertiary":this.tertiary||!this.primary&&!this.secondary&&!this.neutral,"ft-button--neutral":this.neutral,"ft-button--large":!this.small,"ft-button--small":this.small,"ft-button--icon-only":!this.hasTextContent(),"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0,"ft-button--no-icon":!this.icon}}get typographyVariant(){return this.small?qt.caption1medium:qt.body2medium}}Qi.styles=[e.safariEllipsisFix,qi],Yi([r.property({type:Boolean})],Qi.prototype,"primary",void 0),Yi([r.property({type:Boolean})],Qi.prototype,"secondary",void 0),Yi([r.property({type:Boolean})],Qi.prototype,"tertiary",void 0),Yi([r.property({type:Boolean})],Qi.prototype,"neutral",void 0),Yi([r.property({type:Boolean})],Qi.prototype,"small",void 0),e.customElement("ft-button")(Vi),e.customElement("ftds-button")(Qi);const Xi=e.FtCssVariableFactory.extend("--ft-chip-color","",e.designSystemVariables.colorOnSurface),Ji={backgroundColor:e.FtCssVariableFactory.extend("--ft-chip-background-color","",e.designSystemVariables.colorSurface),color:Xi,fontSize:e.FtCssVariableFactory.extend("--ft-chip-font-size","",Ze.fontSize),iconSize:e.FtCssVariableFactory.create("--ft-chip-icon-size","","SIZE","18px"),rippleColor:e.FtCssVariableFactory.extend("--ft-chip-ripple-color","",Xi),horizontalPadding:e.FtCssVariableFactory.create("--ft-chip-horizontal-padding","","SIZE","6px"),verticalPadding:e.FtCssVariableFactory.create("--ft-chip-vertical-padding","","SIZE","6px"),colorOutline:e.FtCssVariableFactory.external(e.designSystemVariables.colorOutline,"Design system"),opacityDisabled:e.FtCssVariableFactory.external(e.designSystemVariables.colorOpacityDisabled,"Design system")},tr=e.FtCssVariableFactory.extend("--ft-chip-highlighted-color","",e.FtCssVariableFactory.extend("--ft-chip-color","",e.designSystemVariables.colorOnPrimary)),er={backgroundColor:e.FtCssVariableFactory.extend("--ft-chip-highlighted-background-color","",e.FtCssVariableFactory.extend("--ft-chip-background-color","",e.designSystemVariables.colorPrimary)),color:tr,rippleColor:e.FtCssVariableFactory.extend("--ft-chip-highlighted-ripple-color","",tr)},or=e.FtCssVariableFactory.create("--ft-chip-dense-horizontal-padding","","SIZE","4px"),ir=e.FtCssVariableFactory.create("--ft-chip-dense-vertical-padding","","SIZE","4px"),rr=[e.noTextSelect,o.css`
|
|
814
|
+
`,e.noTextSelect];var Yi=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,l=t.length-1;l>=0;l--)(r=t[l])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Qi extends _i{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.tertiary=!1,this.neutral=!1,this.small=!1}get buttonClasses(){return{"ft-button":!0,"ft-button--primary":this.primary,"ft-button--secondary":this.secondary,"ft-button--tertiary":this.tertiary||!this.primary&&!this.secondary&&!this.neutral,"ft-button--neutral":this.neutral,"ft-button--large":!this.small,"ft-button--small":this.small,"ft-button--icon-only":!this.hasTextContent(),"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0,"ft-button--no-icon":!this.icon}}get typographyVariant(){return this.small?qt.caption1medium:qt.body2medium}}Qi.styles=[e.safariEllipsisFix,qi],Yi([r.property({type:Boolean})],Qi.prototype,"primary",void 0),Yi([r.property({type:Boolean})],Qi.prototype,"secondary",void 0),Yi([r.property({type:Boolean})],Qi.prototype,"tertiary",void 0),Yi([r.property({type:Boolean})],Qi.prototype,"neutral",void 0),Yi([r.property({type:Boolean})],Qi.prototype,"small",void 0),e.customElement("ft-button")(Vi),e.customElement("ftds-button")(Qi);const Xi=e.FtCssVariableFactory.extend("--ft-chip-color","",e.designSystemVariables.colorOnSurface),Ji={backgroundColor:e.FtCssVariableFactory.extend("--ft-chip-background-color","",e.designSystemVariables.colorSurface),color:Xi,fontSize:e.FtCssVariableFactory.extend("--ft-chip-font-size","",Ze.fontSize),iconSize:e.FtCssVariableFactory.create("--ft-chip-icon-size","","SIZE","18px"),borderRadius:e.FtCssVariableFactory.create("--ft-chip-border-radius","","SIZE",""),rippleColor:e.FtCssVariableFactory.extend("--ft-chip-ripple-color","",Xi),horizontalPadding:e.FtCssVariableFactory.create("--ft-chip-horizontal-padding","","SIZE","6px"),verticalPadding:e.FtCssVariableFactory.create("--ft-chip-vertical-padding","","SIZE","6px"),colorOutline:e.FtCssVariableFactory.external(e.designSystemVariables.colorOutline,"Design system"),opacityDisabled:e.FtCssVariableFactory.external(e.designSystemVariables.colorOpacityDisabled,"Design system")},tr=e.FtCssVariableFactory.extend("--ft-chip-highlighted-color","",e.FtCssVariableFactory.extend("--ft-chip-color","",e.designSystemVariables.colorOnPrimary)),er={backgroundColor:e.FtCssVariableFactory.extend("--ft-chip-highlighted-background-color","",e.FtCssVariableFactory.extend("--ft-chip-background-color","",e.designSystemVariables.colorPrimary)),color:tr,rippleColor:e.FtCssVariableFactory.extend("--ft-chip-highlighted-ripple-color","",tr)},or=e.FtCssVariableFactory.create("--ft-chip-dense-horizontal-padding","","SIZE","4px"),ir=e.FtCssVariableFactory.create("--ft-chip-dense-vertical-padding","","SIZE","4px"),rr=[e.noTextSelect,o.css`
|
|
815
815
|
:host {
|
|
816
816
|
display: inline-block;
|
|
817
817
|
max-width: 100%;
|
|
@@ -838,7 +838,7 @@ const jt=Symbol.for(""),Mt=t=>{if(t?.r===jt)return t?._$litStatic$},_t=t=>({_$li
|
|
|
838
838
|
border: 1px solid ${Ji.colorOutline};
|
|
839
839
|
color: ${Ji.color};
|
|
840
840
|
${e.setVariable(X.color,Ji.rippleColor)};
|
|
841
|
-
border-radius: calc(var(--ft-chip-internal-content-height) / 2 + var(--ft-chip-internal-vertical-padding));
|
|
841
|
+
border-radius: var(${o.unsafeCSS(Ji.borderRadius.name)}, calc(var(--ft-chip-internal-content-height) / 2 + var(--ft-chip-internal-vertical-padding)));
|
|
842
842
|
padding: calc(var(--ft-chip-internal-vertical-padding) - 1px) calc(var(--ft-chip-internal-horizontal-padding) - 1px);
|
|
843
843
|
background-color: ${Ji.backgroundColor};
|
|
844
844
|
line-height: var(--ft-chip-internal-content-height);
|
|
@@ -952,9 +952,10 @@ const jt=Symbol.for(""),Mt=t=>{if(t?.r===jt)return t?._$litStatic$},_t=t=>({_$li
|
|
|
952
952
|
<div class="${n.classMap(t)}"
|
|
953
953
|
aria-label="${this.getLabel()}"
|
|
954
954
|
tabindex="${this.interactionsOnChip?0:-1}"
|
|
955
|
-
@keyup=${this.onKeyUp}
|
|
955
|
+
@keyup=${this.onKeyUp}
|
|
956
|
+
part="chip">
|
|
956
957
|
<ft-ripple ?disabled=${!this.interactionsOnChip}></ft-ripple>
|
|
957
|
-
<ft-typography variant="body2" element="span" class="ft-chip--label">
|
|
958
|
+
<ft-typography variant="body2" element="span" class="ft-chip--label" part="label">
|
|
958
959
|
<slot @slotchange=${this.onSlotchange}></slot>
|
|
959
960
|
</ft-typography>
|
|
960
961
|
${this.internalIcon?this.renderIcon():null}
|
|
@@ -966,10 +967,11 @@ const jt=Symbol.for(""),Mt=t=>{if(t?.r===jt)return t?._$litStatic$},_t=t=>({_$li
|
|
|
966
967
|
.iconVariant=${this.iconVariant}
|
|
967
968
|
icon="${this.internalIcon}"
|
|
968
969
|
label="${this.iconLabel}"
|
|
970
|
+
part="icon-button"
|
|
969
971
|
></ft-button>
|
|
970
972
|
`:o.html`
|
|
971
|
-
<div class="ft-chip--icon-container ft-no-text-select">
|
|
972
|
-
<ft-icon .variant=${this.iconVariant} .value="${this.internalIcon}"></ft-icon>
|
|
973
|
+
<div class="ft-chip--icon-container ft-no-text-select" part="icon-container">
|
|
974
|
+
<ft-icon .variant=${this.iconVariant} .value="${this.internalIcon}" part="icon"></ft-icon>
|
|
973
975
|
</div>
|
|
974
976
|
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new ar))}onIconClick(t){this.interactionsOnIcon&&(t.stopPropagation(),this.dispatchEvent(new ar))}getLabel(){return this.label||this.textContent}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}get internalIcon(){return this.icon||(this.removable?"close":void 0)}}lr.elementDefinitions={"ft-ripple":lt,"ft-typography":yo,"ft-icon":wo,"ft-button":Vi},lr.styles=rr,nr([r.property({type:Boolean})],lr.prototype,"highlighted",void 0),nr([r.property({type:Boolean})],lr.prototype,"removable",void 0),nr([r.property({type:Boolean})],lr.prototype,"disabled",void 0),nr([r.property({type:Boolean})],lr.prototype,"clickable",void 0),nr([r.property({type:Boolean})],lr.prototype,"iconClickable",void 0),nr([r.property({type:Boolean})],lr.prototype,"dense",void 0),nr([r.property({type:Boolean})],lr.prototype,"multiLine",void 0),nr([r.property()],lr.prototype,"label",void 0),nr([r.property()],lr.prototype,"iconLabel",void 0),nr([r.property()],lr.prototype,"icon",void 0),nr([r.property()],lr.prototype,"iconVariant",void 0),nr([r.property({type:Boolean})],lr.prototype,"trailingIcon",void 0),nr([r.query("ft-typography slot")],lr.prototype,"slottedContent",void 0),e.customElement("ft-chip")(lr);const sr=o.css`
|
|
975
977
|
`;var cr=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,l=t.length-1;l>=0;l--)(r=t[l])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};const pr=Symbol("i18nAttributes"),fr=Symbol("i18nProperties"),hr=Symbol("i18nUnsubs");function dr(t){var e;class o extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map}get i18nService(){return this.useCustomMessageContexts?D:Z}i18n(t,e,...o){var i;if("string"==typeof t)return this.i18nService.resolveMessage(t,e,...o);const r=null!==(i=t.args)&&void 0!==i?i:t.argsProvider?t.argsProvider(this):[];return this.i18nService.resolveMessage(t.context,t.key,...r)}onI18nUpdate(t){var e,o;null===(e=this[pr])||void 0===e||e.forEach(((e,o)=>{var i;const r=this.getI18nAttributeValue(o);(null===(i=null==r?void 0:r.context)||void 0===i?void 0:i.toLowerCase())===t.toLowerCase()&&this.updateI18nAttributeMessage(o,r,e)})),null===(o=this[fr])||void 0===o||o.forEach(((e,o)=>{e.context.toLowerCase()===t.toLowerCase()&&(this[o]=this.i18n(e))})),setTimeout((()=>this.requestUpdate()),0)}updateI18nAttributeMessage(t,e,o){this[t]={...e,message:this.i18n({context:e.context,key:e.key,...o})}}update(t){var e,o;super.update(t),null===(e=this[pr])||void 0===e||e.forEach(((e,o)=>{const i=this.getI18nAttributeValue(o);(null==i?void 0:i.context)&&i.key&&(t.has(o)||null!=e.argsProvider)&&(t.has(o)&&this.addI18nContext(i.context),this.updateI18nAttributeMessage(o,i,e))})),null===(o=this[fr])||void 0===o||o.forEach(((t,e)=>{null!=t.argsProvider&&(this[e]=this.i18n(t))}))}getI18nAttributeValue(t){return this[t]}connectedCallback(){var t,e,o,i;super.connectedCallback(),new Set([...null!==(e=null===(t=this[fr])||void 0===t?void 0:t.values())&&void 0!==e?e:[],...[...null!==(i=null===(o=this[pr])||void 0===o?void 0:o.keys())&&void 0!==i?i:[]].map((t=>this.getI18nAttributeValue(t)))].map((t=>null==t?void 0:t.context))).forEach((t=>t&&this.addI18nMessages(t)))}addI18nMessages(t,e){t=t.toLowerCase(),this[hr].has(t)||this[hr].set(t,this.i18nService.subscribe(t,(()=>this.onI18nUpdate(t)))),this.i18nService.prepareContext(t,null!=e?e:{})}addI18nContext(t,e){this.addI18nMessages("string"==typeof t?t:t.name,e)}disconnectedCallback(){super.disconnectedCallback(),this[hr].forEach((t=>t())),this[hr].clear()}}return e=hr,cr([r.property({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}class ur extends(dr(e.FtLitElement)){}class gr extends(dr(e.FtLitElementRedux)){}var br=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,l=t.length-1;l>=0;l--)(r=t[l])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class yr extends gr{constructor(){super(),this.editorMode=!1,this.addStore(k)}render(){return this.key&&this.context?o.html`
|