@fluid-topics/ft-search-bar 1.1.21 → 1.1.22
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.
|
@@ -1317,7 +1317,7 @@ const V=Symbol.for(""),q=t=>{if(t?.r===V)return t?._$litStatic$},Y=t=>({_$litSta
|
|
|
1317
1317
|
@click=${this.next}
|
|
1318
1318
|
></ft-button>
|
|
1319
1319
|
</div>
|
|
1320
|
-
`}update(t){super.update(t),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 Ri(this.currentElement,this.elements[this.currentElement]))}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),this.contentSlot&&this.listenedContainer!==this.contentSlot&&(this.resizeObserver.observe(this.contentSlot),this.listenedContainer&&this.listenedContainer.removeEventListener("scroll",this.updateScrollCallback),this.listenedContainer=this.contentSlot,null===(e=this.listenedContainer)||void 0===e||e.addEventListener("scroll",this.updateScrollCallback))}onScroll(){this.scrollDebouncer.run((()=>this.snap())),this.scheduleUpdateScroll()}snap(){let t=this.closestElementFromStart();if(null!=t){const e=this.getDistanceFromStart(t);Math.abs(this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.contentSlot[this.scrollSizeAttribute])<e&&(t=this.lastElement),this.scrollToElement(t)}}scrollToElement(t){var e,o;t&&(this.horizontal?null===(e=this.contentSlot)||void 0===e||e.scrollTo({left:this.getOffset(t)-this.controlsSize,behavior:"smooth"}):null===(o=this.contentSlot)||void 0===o||o.scrollTo({top:this.getOffset(t)-this.controlsSize,behavior:"smooth"}),this.currentElement=this.elements.indexOf(t))}onSlotChange(){var t,e;this.elements=null!==(e=null===(t=this.contentSlot)||void 0===t?void 0:t.assignedElements().map((t=>t)))&&void 0!==e?e:[],this.scheduleUpdateScroll()}closestElementFromStart(){return this.elements[this.closestIndexFromStart()]}closestIndexFromStart(){let t=-1;for(let e=0;e<this.elements.length;e++)(t<0||this.getDistanceFromStart(this.elements[e])<this.getDistanceFromStart(this.elements[t]))&&(t=e);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 e=t===this.elements[0]?0:this.controlsSize;return Math.abs(this.getOffset(t)-this.contentSlot[this.scrollAttribute]-e)}}Li.elementDefinitions={"ft-button":Qo},Li.styles=Ii,Ei([i.property({type:Boolean})],Li.prototype,"horizontal",void 0),Ei([i.property({type:Boolean})],Li.prototype,"hideScrollbar",void 0),Ei([i.property({type:Boolean})],Li.prototype,"controls",void 0),Ei([i.property({type:Boolean})],Li.prototype,"limitSize",void 0),Ei([i.state()],Li.prototype,"elements",void 0),Ei([i.state()],Li.prototype,"currentElement",void 0),Ei([i.state()],Li.prototype,"withScroll",void 0),Ei([i.state()],Li.prototype,"startReached",void 0),Ei([i.state()],Li.prototype,"endReached",void 0),Ei([i.query(".ft-snap-scroll--content")],Li.prototype,"contentSlot",void 0),e.customElement("ft-snap-scroll")(Li);const zi=e.FtCssVariableFactory.external(e.designSystemVariables.colorOutline,"Design system"),Ui=e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurface,"Design system"),Wi=e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceMedium,"Design system"),Bi=e.FtCssVariableFactory.external(e.designSystemVariables.colorPrimary,"Design system"),Zi=e.FtCssVariableFactory.external(e.designSystemVariables.colorSurface,"Design system"),Fi=e.FtCssVariableFactory.external(e.designSystemVariables.transitionDuration,"Design system"),Ki=e.FtCssVariableFactory.external(e.designSystemVariables.transitionTimingFunction,"Design system"),Di=e.FtCssVariableFactory.extend("--ft-filter-label-color","",e.designSystemVariables.colorOnSurface),Ai=e.FtCssVariableFactory.extend("--ft-filter-label-font-size","",st.fontSize,"
|
|
1320
|
+
`}update(t){super.update(t),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 Ri(this.currentElement,this.elements[this.currentElement]))}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),this.contentSlot&&this.listenedContainer!==this.contentSlot&&(this.resizeObserver.observe(this.contentSlot),this.listenedContainer&&this.listenedContainer.removeEventListener("scroll",this.updateScrollCallback),this.listenedContainer=this.contentSlot,null===(e=this.listenedContainer)||void 0===e||e.addEventListener("scroll",this.updateScrollCallback))}onScroll(){this.scrollDebouncer.run((()=>this.snap())),this.scheduleUpdateScroll()}snap(){let t=this.closestElementFromStart();if(null!=t){const e=this.getDistanceFromStart(t);Math.abs(this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.contentSlot[this.scrollSizeAttribute])<e&&(t=this.lastElement),this.scrollToElement(t)}}scrollToElement(t){var e,o;t&&(this.horizontal?null===(e=this.contentSlot)||void 0===e||e.scrollTo({left:this.getOffset(t)-this.controlsSize,behavior:"smooth"}):null===(o=this.contentSlot)||void 0===o||o.scrollTo({top:this.getOffset(t)-this.controlsSize,behavior:"smooth"}),this.currentElement=this.elements.indexOf(t))}onSlotChange(){var t,e;this.elements=null!==(e=null===(t=this.contentSlot)||void 0===t?void 0:t.assignedElements().map((t=>t)))&&void 0!==e?e:[],this.scheduleUpdateScroll()}closestElementFromStart(){return this.elements[this.closestIndexFromStart()]}closestIndexFromStart(){let t=-1;for(let e=0;e<this.elements.length;e++)(t<0||this.getDistanceFromStart(this.elements[e])<this.getDistanceFromStart(this.elements[t]))&&(t=e);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 e=t===this.elements[0]?0:this.controlsSize;return Math.abs(this.getOffset(t)-this.contentSlot[this.scrollAttribute]-e)}}Li.elementDefinitions={"ft-button":Qo},Li.styles=Ii,Ei([i.property({type:Boolean})],Li.prototype,"horizontal",void 0),Ei([i.property({type:Boolean})],Li.prototype,"hideScrollbar",void 0),Ei([i.property({type:Boolean})],Li.prototype,"controls",void 0),Ei([i.property({type:Boolean})],Li.prototype,"limitSize",void 0),Ei([i.state()],Li.prototype,"elements",void 0),Ei([i.state()],Li.prototype,"currentElement",void 0),Ei([i.state()],Li.prototype,"withScroll",void 0),Ei([i.state()],Li.prototype,"startReached",void 0),Ei([i.state()],Li.prototype,"endReached",void 0),Ei([i.query(".ft-snap-scroll--content")],Li.prototype,"contentSlot",void 0),e.customElement("ft-snap-scroll")(Li);const zi=e.FtCssVariableFactory.external(e.designSystemVariables.colorOutline,"Design system"),Ui=e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurface,"Design system"),Wi=e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceMedium,"Design system"),Bi=e.FtCssVariableFactory.external(e.designSystemVariables.colorPrimary,"Design system"),Zi=e.FtCssVariableFactory.external(e.designSystemVariables.colorSurface,"Design system"),Fi=e.FtCssVariableFactory.external(e.designSystemVariables.transitionDuration,"Design system"),Ki=e.FtCssVariableFactory.external(e.designSystemVariables.transitionTimingFunction,"Design system"),Di=e.FtCssVariableFactory.extend("--ft-filter-label-color","",e.designSystemVariables.colorOnSurface),Ai=e.FtCssVariableFactory.extend("--ft-filter-label-font-size","",st.fontSize,"16px"),Hi=[ee,o.css`
|
|
1321
1321
|
:host {
|
|
1322
1322
|
display: flex;
|
|
1323
1323
|
max-height: 100%;
|
|
@@ -1463,7 +1463,7 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
1463
1463
|
@click=${this.next}
|
|
1464
1464
|
></ft-button>
|
|
1465
1465
|
</div>
|
|
1466
|
-
`}update(t){super.update(t),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 aa(this.currentElement,this.elements[this.currentElement]))}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),this.contentSlot&&this.listenedContainer!==this.contentSlot&&(this.resizeObserver.observe(this.contentSlot),this.listenedContainer&&this.listenedContainer.removeEventListener("scroll",this.updateScrollCallback),this.listenedContainer=this.contentSlot,null===(e=this.listenedContainer)||void 0===e||e.addEventListener("scroll",this.updateScrollCallback))}onScroll(){this.scrollDebouncer.run((()=>this.snap())),this.scheduleUpdateScroll()}snap(){let t=this.closestElementFromStart();if(null!=t){const e=this.getDistanceFromStart(t);Math.abs(this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.contentSlot[this.scrollSizeAttribute])<e&&(t=this.lastElement),this.scrollToElement(t)}}scrollToElement(t){var e,o;t&&(this.horizontal?null===(e=this.contentSlot)||void 0===e||e.scrollTo({left:this.getOffset(t)-this.controlsSize,behavior:"smooth"}):null===(o=this.contentSlot)||void 0===o||o.scrollTo({top:this.getOffset(t)-this.controlsSize,behavior:"smooth"}),this.currentElement=this.elements.indexOf(t))}onSlotChange(){var t,e;this.elements=null!==(e=null===(t=this.contentSlot)||void 0===t?void 0:t.assignedElements().map((t=>t)))&&void 0!==e?e:[],this.scheduleUpdateScroll()}closestElementFromStart(){return this.elements[this.closestIndexFromStart()]}closestIndexFromStart(){let t=-1;for(let e=0;e<this.elements.length;e++)(t<0||this.getDistanceFromStart(this.elements[e])<this.getDistanceFromStart(this.elements[t]))&&(t=e);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 e=t===this.elements[0]?0:this.controlsSize;return Math.abs(this.getOffset(t)-this.contentSlot[this.scrollAttribute]-e)}}sa.elementDefinitions={"ft-button":Rn},sa.styles=ra,na([k({type:Boolean})],sa.prototype,"horizontal",void 0),na([k({type:Boolean})],sa.prototype,"hideScrollbar",void 0),na([k({type:Boolean})],sa.prototype,"controls",void 0),na([k({type:Boolean})],sa.prototype,"limitSize",void 0),na([N()],sa.prototype,"elements",void 0),na([N()],sa.prototype,"currentElement",void 0),na([N()],sa.prototype,"withScroll",void 0),na([N()],sa.prototype,"startReached",void 0),na([N()],sa.prototype,"endReached",void 0),na([R(".ft-snap-scroll--content")],sa.prototype,"contentSlot",void 0),F("ft-snap-scroll")(sa);const la=Ee.external(We.colorOutline,"Design system"),ca=Ee.external(We.colorOnSurface,"Design system"),ha=Ee.external(We.colorOnSurfaceMedium,"Design system"),pa=Ee.external(We.colorPrimary,"Design system"),fa=Ee.external(We.colorSurface,"Design system"),da=Ee.external(We.transitionDuration,"Design system"),ua=Ee.external(We.transitionTimingFunction,"Design system"),ba=Ee.extend("--ft-filter-label-color","",We.colorOnSurface),ga=Ee.extend("--ft-filter-label-font-size","",Fo.fontSize,"
|
|
1466
|
+
`}update(t){super.update(t),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 aa(this.currentElement,this.elements[this.currentElement]))}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),this.contentSlot&&this.listenedContainer!==this.contentSlot&&(this.resizeObserver.observe(this.contentSlot),this.listenedContainer&&this.listenedContainer.removeEventListener("scroll",this.updateScrollCallback),this.listenedContainer=this.contentSlot,null===(e=this.listenedContainer)||void 0===e||e.addEventListener("scroll",this.updateScrollCallback))}onScroll(){this.scrollDebouncer.run((()=>this.snap())),this.scheduleUpdateScroll()}snap(){let t=this.closestElementFromStart();if(null!=t){const e=this.getDistanceFromStart(t);Math.abs(this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.contentSlot[this.scrollSizeAttribute])<e&&(t=this.lastElement),this.scrollToElement(t)}}scrollToElement(t){var e,o;t&&(this.horizontal?null===(e=this.contentSlot)||void 0===e||e.scrollTo({left:this.getOffset(t)-this.controlsSize,behavior:"smooth"}):null===(o=this.contentSlot)||void 0===o||o.scrollTo({top:this.getOffset(t)-this.controlsSize,behavior:"smooth"}),this.currentElement=this.elements.indexOf(t))}onSlotChange(){var t,e;this.elements=null!==(e=null===(t=this.contentSlot)||void 0===t?void 0:t.assignedElements().map((t=>t)))&&void 0!==e?e:[],this.scheduleUpdateScroll()}closestElementFromStart(){return this.elements[this.closestIndexFromStart()]}closestIndexFromStart(){let t=-1;for(let e=0;e<this.elements.length;e++)(t<0||this.getDistanceFromStart(this.elements[e])<this.getDistanceFromStart(this.elements[t]))&&(t=e);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 e=t===this.elements[0]?0:this.controlsSize;return Math.abs(this.getOffset(t)-this.contentSlot[this.scrollAttribute]-e)}}sa.elementDefinitions={"ft-button":Rn},sa.styles=ra,na([k({type:Boolean})],sa.prototype,"horizontal",void 0),na([k({type:Boolean})],sa.prototype,"hideScrollbar",void 0),na([k({type:Boolean})],sa.prototype,"controls",void 0),na([k({type:Boolean})],sa.prototype,"limitSize",void 0),na([N()],sa.prototype,"elements",void 0),na([N()],sa.prototype,"currentElement",void 0),na([N()],sa.prototype,"withScroll",void 0),na([N()],sa.prototype,"startReached",void 0),na([N()],sa.prototype,"endReached",void 0),na([R(".ft-snap-scroll--content")],sa.prototype,"contentSlot",void 0),F("ft-snap-scroll")(sa);const la=Ee.external(We.colorOutline,"Design system"),ca=Ee.external(We.colorOnSurface,"Design system"),ha=Ee.external(We.colorOnSurfaceMedium,"Design system"),pa=Ee.external(We.colorPrimary,"Design system"),fa=Ee.external(We.colorSurface,"Design system"),da=Ee.external(We.transitionDuration,"Design system"),ua=Ee.external(We.transitionTimingFunction,"Design system"),ba=Ee.extend("--ft-filter-label-color","",We.colorOnSurface),ga=Ee.extend("--ft-filter-label-font-size","",Fo.fontSize,"16px"),ya=[Ei,Ct`
|
|
1467
1467
|
:host {
|
|
1468
1468
|
display: flex;
|
|
1469
1469
|
max-height: 100%;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-search-bar",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.22",
|
|
4
4
|
"description": "Search bar component using Fluid Topics public API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,22 +19,22 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-accordion": "1.1.
|
|
23
|
-
"@fluid-topics/ft-button": "1.1.
|
|
24
|
-
"@fluid-topics/ft-chip": "1.1.
|
|
25
|
-
"@fluid-topics/ft-filter": "1.1.
|
|
26
|
-
"@fluid-topics/ft-icon": "1.1.
|
|
27
|
-
"@fluid-topics/ft-select": "1.1.
|
|
28
|
-
"@fluid-topics/ft-size-watcher": "1.1.
|
|
29
|
-
"@fluid-topics/ft-skeleton": "1.1.
|
|
30
|
-
"@fluid-topics/ft-snap-scroll": "1.1.
|
|
31
|
-
"@fluid-topics/ft-tooltip": "1.1.
|
|
32
|
-
"@fluid-topics/ft-typography": "1.1.
|
|
33
|
-
"@fluid-topics/ft-wc-utils": "1.1.
|
|
22
|
+
"@fluid-topics/ft-accordion": "1.1.22",
|
|
23
|
+
"@fluid-topics/ft-button": "1.1.22",
|
|
24
|
+
"@fluid-topics/ft-chip": "1.1.22",
|
|
25
|
+
"@fluid-topics/ft-filter": "1.1.22",
|
|
26
|
+
"@fluid-topics/ft-icon": "1.1.22",
|
|
27
|
+
"@fluid-topics/ft-select": "1.1.22",
|
|
28
|
+
"@fluid-topics/ft-size-watcher": "1.1.22",
|
|
29
|
+
"@fluid-topics/ft-skeleton": "1.1.22",
|
|
30
|
+
"@fluid-topics/ft-snap-scroll": "1.1.22",
|
|
31
|
+
"@fluid-topics/ft-tooltip": "1.1.22",
|
|
32
|
+
"@fluid-topics/ft-typography": "1.1.22",
|
|
33
|
+
"@fluid-topics/ft-wc-utils": "1.1.22",
|
|
34
34
|
"lit": "3.1.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@fluid-topics/public-api": "1.0.55"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "89c8b3562faee77c5ae79180f255aa9021f4d229"
|
|
40
40
|
}
|