@fluid-topics/ft-search-bar 0.3.54 → 0.3.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.
package/README.md CHANGED
@@ -50,7 +50,8 @@ function render() {
50
50
  <html lang="en">
51
51
  <head>
52
52
  <title>My custom integration</title>
53
- <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
53
+ <link href="http://doc.fluidtopics.com/api/stylesheets/fonts.css" rel="stylesheet">
54
+ <link href="http://doc.fluidtopics.com/api/stylesheets/theme.css" rel="stylesheet">
54
55
  </head>
55
56
  <body>
56
57
  <ft-search-bar
@@ -66,7 +67,10 @@ function render() {
66
67
  filtersButton: "Refine your search",
67
68
  inputPlaceHolder: "Search our documentation"
68
69
  }));
69
- searchBar.addEventListener("launch-search", event => console.log("Launch search:", event.detail));
70
+ searchBar.addEventListener("launch-search", event => {
71
+ console.log("Launch search:", event.detail)
72
+ console.log("URL:", searchBar.searchRequestSerializer(event.detail))
73
+ });
70
74
  </script>
71
75
  </body>
72
76
  </html>
@@ -512,17 +512,7 @@ const q=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===q)return null==t?void 0:t
512
512
  ${e.setVariable(Zt.fontSize,"1em")};
513
513
  ${e.setVariable(Zt.lineHeight,"var(--ft-button-internal-content-height)")};
514
514
  }
515
-
516
- .ft-button--safari-fix .ft-button--label {
517
- margin-right: 0;
518
- }
519
-
520
- .ft-button--safari-fix .ft-button--label:after {
521
- content: "\\0000a0";
522
- display: inline-block;
523
- width: 0;
524
- }
525
-
515
+
526
516
  .ft-button--label[hidden] {
527
517
  display: none;
528
518
  }
@@ -546,7 +536,7 @@ const q=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===q)return null==t?void 0:t
546
536
  ${e.setVariable(me.size,Le.iconSize)};
547
537
  ${e.setVariable(me.color,"var(--ft-button-internal-color)")};
548
538
  }
549
- `];var Ne=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Te extends e.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.iconVariant=Ee.material,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-button--safari-fix":e.isSafari,"ft-no-text-select":!0};return this.addTooltipIfNeeded(i.html`
539
+ `];var Ne=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Te extends e.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.iconVariant=Ee.material,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(i.html`
550
540
  <button part="button"
551
541
  class="${r.classMap(t)}"
552
542
  aria-label="${this.getLabel()}"
@@ -555,7 +545,7 @@ const q=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===q)return null==t?void 0:t
555
545
  <ft-typography part="label"
556
546
  variant="button"
557
547
  element="span"
558
- class="ft-button--label"
548
+ class="ft-button--label ${e.isSafari?"ft-safari-ellipsis-fix":""}"
559
549
  ?hidden=${!this.hasTextContent()}>
560
550
  <slot @slotchange=${this.onSlotchange}></slot>
561
551
  </ft-typography>
@@ -569,7 +559,7 @@ const q=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===q)return null==t?void 0:t
569
559
  </ft-tooltip>
570
560
  `:t}resolveIcon(){return this.loading?i.html`
571
561
  <ft-loader></ft-loader> `:this.icon?i.html`
572
- <ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:i.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}}Te.elementDefinitions={"ft-ripple":be,"ft-tooltip":ye,"ft-typography":te,"ft-icon":De,"ft-loader":we},Te.styles=Ae,Ne([o.property({type:Boolean})],Te.prototype,"primary",void 0),Ne([o.property({type:Boolean})],Te.prototype,"outlined",void 0),Ne([o.property({type:Boolean})],Te.prototype,"disabled",void 0),Ne([o.property({type:Boolean})],Te.prototype,"dense",void 0),Ne([o.property({type:Boolean})],Te.prototype,"round",void 0),Ne([o.property({type:String})],Te.prototype,"label",void 0),Ne([o.property({type:String})],Te.prototype,"icon",void 0),Ne([o.property({type:String})],Te.prototype,"iconVariant",void 0),Ne([o.property({type:Boolean})],Te.prototype,"trailingIcon",void 0),Ne([o.property({type:Boolean})],Te.prototype,"loading",void 0),Ne([o.property({type:String})],Te.prototype,"tooltipPosition",void 0),Ne([o.property({type:Boolean})],Te.prototype,"hideTooltip",void 0),Ne([o.property({type:Boolean})],Te.prototype,"forceTooltip",void 0),Ne([o.query(".ft-button")],Te.prototype,"button",void 0),Ne([o.query(".ft-button--label slot")],Te.prototype,"slottedContent",void 0),e.customElement("ft-button")(Te);const Re=e.FtCssVariableFactory.extend("--ft-checkbox-text-color",e.designSystemVariables.colorOnSurfaceHigh),Ze=e.FtCssVariableFactory.external(e.designSystemVariables.colorPrimary,"Design system"),Ue=e.FtCssVariableFactory.external(e.designSystemVariables.colorOnPrimary,"Design system"),_e=e.FtCssVariableFactory.extend("--ft-checkbox-border-color",e.designSystemVariables.colorOnSurfaceMedium),He=e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceDisabled,"Design system"),Ve=i.css`
562
+ <ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:i.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}}Te.elementDefinitions={"ft-ripple":be,"ft-tooltip":ye,"ft-typography":te,"ft-icon":De,"ft-loader":we},Te.styles=[e.safariEllipsisFix,Ae],Ne([o.property({type:Boolean})],Te.prototype,"primary",void 0),Ne([o.property({type:Boolean})],Te.prototype,"outlined",void 0),Ne([o.property({type:Boolean})],Te.prototype,"disabled",void 0),Ne([o.property({type:Boolean})],Te.prototype,"dense",void 0),Ne([o.property({type:Boolean})],Te.prototype,"round",void 0),Ne([o.property({type:String})],Te.prototype,"label",void 0),Ne([o.property({type:String})],Te.prototype,"icon",void 0),Ne([o.property({type:String})],Te.prototype,"iconVariant",void 0),Ne([o.property({type:Boolean})],Te.prototype,"trailingIcon",void 0),Ne([o.property({type:Boolean})],Te.prototype,"loading",void 0),Ne([o.property({type:String})],Te.prototype,"tooltipPosition",void 0),Ne([o.property({type:Boolean})],Te.prototype,"hideTooltip",void 0),Ne([o.property({type:Boolean})],Te.prototype,"forceTooltip",void 0),Ne([o.query(".ft-button")],Te.prototype,"button",void 0),Ne([o.query(".ft-button--label slot")],Te.prototype,"slottedContent",void 0),e.customElement("ft-button")(Te);const Re=e.FtCssVariableFactory.extend("--ft-checkbox-text-color",e.designSystemVariables.colorOnSurfaceHigh),Ze=e.FtCssVariableFactory.external(e.designSystemVariables.colorPrimary,"Design system"),Ue=e.FtCssVariableFactory.external(e.designSystemVariables.colorOnPrimary,"Design system"),_e=e.FtCssVariableFactory.extend("--ft-checkbox-border-color",e.designSystemVariables.colorOnSurfaceMedium),He=e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceDisabled,"Design system"),Ve=i.css`
573
563
  * {
574
564
  box-sizing: border-box;
575
565
  }