@jumpgroup/jump-design-system 0.3.34 → 0.3.35

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.
Files changed (50) hide show
  1. package/dist/cjs/jump-design-system.cjs.js +1 -1
  2. package/dist/cjs/jump-search-bar.cjs.entry.js +60 -0
  3. package/dist/cjs/jump-search-bar.cjs.entry.js.map +1 -0
  4. package/dist/cjs/jump-tab-item.cjs.entry.js +2 -2
  5. package/dist/cjs/jump-tab-panel.cjs.entry.js +1 -1
  6. package/dist/cjs/jump-tab.cjs.entry.js +1 -1
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/collection/collection-manifest.json +1 -0
  9. package/dist/collection/components/jump-search-bar/jump-search-bar.css +69 -0
  10. package/dist/collection/components/jump-search-bar/jump-search-bar.js +170 -0
  11. package/dist/collection/components/jump-search-bar/jump-search-bar.js.map +1 -0
  12. package/dist/collection/components/jump-search-bar/jump-search-bar.stories.js +100 -0
  13. package/dist/collection/components/jump-search-bar/jump-search-bar.stories.js.map +1 -0
  14. package/dist/collection/components/jump-search-bar/test/jump-search-bar.e2e.js +10 -0
  15. package/dist/collection/components/jump-search-bar/test/jump-search-bar.e2e.js.map +1 -0
  16. package/dist/collection/components/jump-search-bar/test/jump-search-bar.spec.js +18 -0
  17. package/dist/collection/components/jump-search-bar/test/jump-search-bar.spec.js.map +1 -0
  18. package/dist/collection/components/jump-tab/jump-tab.js +1 -1
  19. package/dist/collection/components/jump-tab-item/jump-tab-item.js +2 -2
  20. package/dist/collection/components/jump-tab-panel/jump-tab-panel.js +1 -1
  21. package/dist/components/jump-search-bar.d.ts +11 -0
  22. package/dist/components/jump-search-bar.js +92 -0
  23. package/dist/components/jump-search-bar.js.map +1 -0
  24. package/dist/components/jump-tab-item.js +2 -2
  25. package/dist/components/jump-tab-panel.js +1 -1
  26. package/dist/components/jump-tab.js +1 -1
  27. package/dist/esm/jump-design-system.js +1 -1
  28. package/dist/esm/jump-search-bar.entry.js +56 -0
  29. package/dist/esm/jump-search-bar.entry.js.map +1 -0
  30. package/dist/esm/jump-tab-item.entry.js +2 -2
  31. package/dist/esm/jump-tab-panel.entry.js +1 -1
  32. package/dist/esm/jump-tab.entry.js +1 -1
  33. package/dist/esm/loader.js +1 -1
  34. package/dist/jump-design-system/jump-design-system.esm.js +1 -1
  35. package/dist/jump-design-system/jump-design-system.esm.js.map +1 -1
  36. package/dist/jump-design-system/p-25df0e8f.entry.js +2 -0
  37. package/dist/jump-design-system/{p-1a8f69e1.entry.js → p-281c500c.entry.js} +2 -2
  38. package/dist/jump-design-system/p-96e7d098.entry.js +2 -0
  39. package/dist/jump-design-system/p-96e7d098.entry.js.map +1 -0
  40. package/dist/jump-design-system/p-9defb660.entry.js +2 -0
  41. package/dist/jump-design-system-elements.json +29 -0
  42. package/dist/types/components/jump-search-bar/jump-search-bar.d.ts +25 -0
  43. package/dist/types/components/jump-search-bar/jump-search-bar.stories.d.ts +49 -0
  44. package/dist/types/components.d.ts +51 -0
  45. package/package.json +1 -1
  46. package/dist/jump-design-system/p-2c95396a.entry.js +0 -2
  47. package/dist/jump-design-system/p-cfdf7090.entry.js +0 -2
  48. /package/dist/jump-design-system/{p-cfdf7090.entry.js.map → p-25df0e8f.entry.js.map} +0 -0
  49. /package/dist/jump-design-system/{p-1a8f69e1.entry.js.map → p-281c500c.entry.js.map} +0 -0
  50. /package/dist/jump-design-system/{p-2c95396a.entry.js.map → p-9defb660.entry.js.map} +0 -0
@@ -0,0 +1,2 @@
1
+ import{r as t,c as o,h as a,H as r}from"./p-d4c681a4.js";const e=':host{display:flex;--jump-search-bar-focus-color:var(--secondary-standard, #5E79BA);--jump-search-bar-border-color:var(--neutral-grey-secondary, #707070);--jump-search-bar-bg-color:var(--gray-ultralight, #F8F8F8)}:host jump-button{--jump-button-border-radius:0px 3px 3px 0px}:host input{width:100%}:host(.manual.outline) input{border-radius:3px 0px 0px 3px;border:1px solid var(--jump-search-bar-border-color);padding:12px}:host(.manual.outline) input:focus-visible{outline:2px solid var(--jump-search-bar-focus-color);outline-offset:-2px}:host(.auto.outline) input{border-radius:3px;border:1px solid var(--jump-search-bar-border-color);padding:12px;padding-left:35px;background:url("data:image/svg+xml;utf8,%3Csvg%20width%3D%2213%22%20height%3D%2213%22%20viewBox%3D%220%200%2013%2013%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8.625%204.875C8.625%203.53906%207.89844%202.32031%206.75%201.64062C5.57812%200.960938%204.14844%200.960938%203%201.64062C1.82812%202.32031%201.125%203.53906%201.125%204.875C1.125%206.23438%201.82812%207.45312%203%208.13281C4.14844%208.8125%205.57812%208.8125%206.75%208.13281C7.89844%207.45312%208.625%206.23438%208.625%204.875ZM7.89844%208.71875C7.05469%209.375%206%209.75%204.875%209.75C2.17969%209.75%200%207.57031%200%204.875C0%202.20312%202.17969%200%204.875%200C7.54688%200%209.75%202.20312%209.75%204.875C9.75%206.02344%209.35156%207.07812%208.69531%207.92188L11.8359%2011.0391C12.0469%2011.2734%2012.0469%2011.625%2011.8359%2011.8359C11.6016%2012.0703%2011.25%2012.0703%2011.0391%2011.8359L7.89844%208.71875Z%22%20fill%3D%22%23707070%22%2F%3E%3C%2Fsvg%3E") no-repeat left;background-size:14px;background-position:10px center}:host(.auto.outline) input:focus-visible{outline:2px solid var(--jump-search-bar-focus-color);outline-offset:-2px;background:url(\'data:image/svg+xml;utf8,<svg width="13" height="13" viewBox="0 0 13 13" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.625 4.875C8.625 3.53906 7.89844 2.32031 6.75 1.64062C5.57812 0.960938 4.14844 0.960938 3 1.64062C1.82812 2.32031 1.125 3.53906 1.125 4.875C1.125 6.23438 1.82812 7.45312 3 8.13281C4.14844 8.8125 5.57812 8.8125 6.75 8.13281C7.89844 7.45312 8.625 6.23438 8.625 4.875ZM7.89844 8.71875C7.05469 9.375 6 9.75 4.875 9.75C2.17969 9.75 0 7.57031 0 4.875C0 2.20312 2.17969 0 4.875 0C7.54688 0 9.75 2.20312 9.75 4.875C9.75 6.02344 9.35156 7.07812 8.69531 7.92188L11.8359 11.0391C12.0469 11.2734 12.0469 11.625 11.8359 11.8359C11.6016 12.0703 11.25 12.0703 11.0391 11.8359L7.89844 8.71875Z" fill="%235E79BA"/></svg>\') no-repeat left !important;background-size:14px !important;background-position:10px center !important}:host(.auto.linear) input.search-input{border:none;border-bottom:1px solid var(--jump-search-bar-border-color);padding:8px 5px 8px 0;padding-left:35px;background:url("data:image/svg+xml;utf8,%3Csvg%20width%3D%2213%22%20height%3D%2213%22%20viewBox%3D%220%200%2013%2013%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8.625%204.875C8.625%203.53906%207.89844%202.32031%206.75%201.64062C5.57812%200.960938%204.14844%200.960938%203%201.64062C1.82812%202.32031%201.125%203.53906%201.125%204.875C1.125%206.23438%201.82812%207.45312%203%208.13281C4.14844%208.8125%205.57812%208.8125%206.75%208.13281C7.89844%207.45312%208.625%206.23438%208.625%204.875ZM7.89844%208.71875C7.05469%209.375%206%209.75%204.875%209.75C2.17969%209.75%200%207.57031%200%204.875C0%202.20312%202.17969%200%204.875%200C7.54688%200%209.75%202.20312%209.75%204.875C9.75%206.02344%209.35156%207.07812%208.69531%207.92188L11.8359%2011.0391C12.0469%2011.2734%2012.0469%2011.625%2011.8359%2011.8359C11.6016%2012.0703%2011.25%2012.0703%2011.0391%2011.8359L7.89844%208.71875Z%22%20fill%3D%22%23707070%22%2F%3E%3C%2Fsvg%3E") no-repeat left;background-size:14px;background-position:10px center}:host(.auto.linear) input:focus-visible{outline:2px solid var(--jump-search-bar-focus-color);outline-offset:-2px;background:url(\'data:image/svg+xml;utf8,<svg width="13" height="13" viewBox="0 0 13 13" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.625 4.875C8.625 3.53906 7.89844 2.32031 6.75 1.64062C5.57812 0.960938 4.14844 0.960938 3 1.64062C1.82812 2.32031 1.125 3.53906 1.125 4.875C1.125 6.23438 1.82812 7.45312 3 8.13281C4.14844 8.8125 5.57812 8.8125 6.75 8.13281C7.89844 7.45312 8.625 6.23438 8.625 4.875ZM7.89844 8.71875C7.05469 9.375 6 9.75 4.875 9.75C2.17969 9.75 0 7.57031 0 4.875C0 2.20312 2.17969 0 4.875 0C7.54688 0 9.75 2.20312 9.75 4.875C9.75 6.02344 9.35156 7.07812 8.69531 7.92188L11.8359 11.0391C12.0469 11.2734 12.0469 11.625 11.8359 11.8359C11.6016 12.0703 11.25 12.0703 11.0391 11.8359L7.89844 8.71875Z" fill="%235E79BA"/></svg>\') no-repeat left !important;background-size:14px !important;background-position:10px center !important}:host(.auto.filled) input.search-input{border:none;border-radius:3px;padding:12px;padding-left:35px;background:url("data:image/svg+xml;utf8,%3Csvg%20width%3D%2213%22%20height%3D%2213%22%20viewBox%3D%220%200%2013%2013%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8.625%204.875C8.625%203.53906%207.89844%202.32031%206.75%201.64062C5.57812%200.960938%204.14844%200.960938%203%201.64062C1.82812%202.32031%201.125%203.53906%201.125%204.875C1.125%206.23438%201.82812%207.45312%203%208.13281C4.14844%208.8125%205.57812%208.8125%206.75%208.13281C7.89844%207.45312%208.625%206.23438%208.625%204.875ZM7.89844%208.71875C7.05469%209.375%206%209.75%204.875%209.75C2.17969%209.75%200%207.57031%200%204.875C0%202.20312%202.17969%200%204.875%200C7.54688%200%209.75%202.20312%209.75%204.875C9.75%206.02344%209.35156%207.07812%208.69531%207.92188L11.8359%2011.0391C12.0469%2011.2734%2012.0469%2011.625%2011.8359%2011.8359C11.6016%2012.0703%2011.25%2012.0703%2011.0391%2011.8359L7.89844%208.71875Z%22%20fill%3D%22%23707070%22%2F%3E%3C%2Fsvg%3E") no-repeat left;background-size:14px;background-position:10px center;background-color:var(--jump-search-bar-bg-color)}';const i=e;const s=class{constructor(a){t(this,a);this.search=o(this,"jump-search-bar",7);this.doSearch=()=>{if(this.jumpSearchBar){const t=this.jumpSearchBar.value;console.log("doSearch",t);this.search.emit({search:t})}};this.placeholder="Cerca...";this.identifier="search-bar";this.debounceTime=500;this.searchType="auto";this.variant="outline"}debounce(t,o=this.debounceTime){let a;return(...r)=>{if(a){clearTimeout(a)}a=setTimeout((()=>{t.apply(null,r)}),o)}}render(){return a(r,{key:"efa1c6cdd7f2cb5d22b50707aee020bab23609b0",class:"JumpSearchBar "+(this.searchType=="manual"?"manual outline":this.searchType+" "+this.variant)},a("input",{key:"823778b4c704a72ff14662dff408b41b4fe79fb1",placeholder:this.placeholder,type:"search",id:this.identifier,class:"search-input",ref:t=>{this.jumpSearchBar=t},onInput:this.searchType==="auto"?this.debounce(this.doSearch):undefined}),this.searchType==="manual"&&a("jump-button",{key:"8f940966131504f605b0aadb272e0c590fb2b32f",variant:"secondary",size:"medium",name:"scopri",value:"value","aria-label":"Scopri di più",id:"button",onlyIcon:true,onClick:()=>this.doSearch()},a("jump-icon",{key:"df8a23cd6a3b8374bfb18fc2a9061ef4af5f887a",slot:"suffix",name:"magnifying-glass"})))}};s.style=i;export{s as jump_search_bar};
2
+ //# sourceMappingURL=p-96e7d098.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["jumpSearchBarCss","JumpSearchBarStyle0","JumpSearchBar","this","doSearch","jumpSearchBar","searchValue","value","console","log","search","emit","debounce","fn","delay","debounceTime","timeoutId","args","clearTimeout","setTimeout","apply","render","h","Host","key","class","searchType","variant","placeholder","type","id","identifier","ref","el","onInput","undefined","size","name","onlyIcon","onClick","slot"],"sources":["src/components/jump-search-bar/jump-search-bar.scss?tag=jump-search-bar&encapsulation=shadow","src/components/jump-search-bar/jump-search-bar.tsx"],"sourcesContent":[":host {\n display: flex;\n\n jump-button {\n --jump-button-border-radius: 0px 3px 3px 0px;\n }\n\n input {\n width: 100%;\n }\n\n --jump-search-bar-focus-color: var(--secondary-standard, #5E79BA);\n --jump-search-bar-border-color: var(--neutral-grey-secondary, #707070);\n --jump-search-bar-bg-color: var(--gray-ultralight, #F8F8F8);\n}\n\n// /* Stile manuale */\n:host(.manual.outline) {\n input {\n border-radius: 3px 0px 0px 3px;\n border: 1px solid var(--jump-search-bar-border-color);\n padding: 12px;\n }\n\n input:focus-visible {\n outline: 2px solid var(--jump-search-bar-focus-color);\n outline-offset: -2px;\n }\n}\n\n:host(.auto.outline) {\n input {\n border-radius: 3px;\n border: 1px solid var(--jump-search-bar-border-color);\n padding: 12px;\n padding-left: 35px;\n background: url('data:image/svg+xml;utf8,%3Csvg%20width%3D%2213%22%20height%3D%2213%22%20viewBox%3D%220%200%2013%2013%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8.625%204.875C8.625%203.53906%207.89844%202.32031%206.75%201.64062C5.57812%200.960938%204.14844%200.960938%203%201.64062C1.82812%202.32031%201.125%203.53906%201.125%204.875C1.125%206.23438%201.82812%207.45312%203%208.13281C4.14844%208.8125%205.57812%208.8125%206.75%208.13281C7.89844%207.45312%208.625%206.23438%208.625%204.875ZM7.89844%208.71875C7.05469%209.375%206%209.75%204.875%209.75C2.17969%209.75%200%207.57031%200%204.875C0%202.20312%202.17969%200%204.875%200C7.54688%200%209.75%202.20312%209.75%204.875C9.75%206.02344%209.35156%207.07812%208.69531%207.92188L11.8359%2011.0391C12.0469%2011.2734%2012.0469%2011.625%2011.8359%2011.8359C11.6016%2012.0703%2011.25%2012.0703%2011.0391%2011.8359L7.89844%208.71875Z%22%20fill%3D%22%23707070%22%2F%3E%3C%2Fsvg%3E') no-repeat left;\n background-size: 14px;\n background-position: 10px center;\n }\n\n input:focus-visible {\n outline: 2px solid var(--jump-search-bar-focus-color);\n outline-offset: -2px;\n background: url('data:image/svg+xml;utf8,<svg width=\"13\" height=\"13\" viewBox=\"0 0 13 13\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M8.625 4.875C8.625 3.53906 7.89844 2.32031 6.75 1.64062C5.57812 0.960938 4.14844 0.960938 3 1.64062C1.82812 2.32031 1.125 3.53906 1.125 4.875C1.125 6.23438 1.82812 7.45312 3 8.13281C4.14844 8.8125 5.57812 8.8125 6.75 8.13281C7.89844 7.45312 8.625 6.23438 8.625 4.875ZM7.89844 8.71875C7.05469 9.375 6 9.75 4.875 9.75C2.17969 9.75 0 7.57031 0 4.875C0 2.20312 2.17969 0 4.875 0C7.54688 0 9.75 2.20312 9.75 4.875C9.75 6.02344 9.35156 7.07812 8.69531 7.92188L11.8359 11.0391C12.0469 11.2734 12.0469 11.625 11.8359 11.8359C11.6016 12.0703 11.25 12.0703 11.0391 11.8359L7.89844 8.71875Z\" fill=\"%235E79BA\"/></svg>') no-repeat left !important;\n background-size: 14px !important;\n background-position: 10px center !important;\n } \n}\n\n/* Stile linear */\n:host(.auto.linear){\n input.search-input {\n border: none;\n border-bottom: 1px solid var(--jump-search-bar-border-color);\n padding: 8px 5px 8px 0;\n padding-left: 35px;\n background: url('data:image/svg+xml;utf8,%3Csvg%20width%3D%2213%22%20height%3D%2213%22%20viewBox%3D%220%200%2013%2013%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8.625%204.875C8.625%203.53906%207.89844%202.32031%206.75%201.64062C5.57812%200.960938%204.14844%200.960938%203%201.64062C1.82812%202.32031%201.125%203.53906%201.125%204.875C1.125%206.23438%201.82812%207.45312%203%208.13281C4.14844%208.8125%205.57812%208.8125%206.75%208.13281C7.89844%207.45312%208.625%206.23438%208.625%204.875ZM7.89844%208.71875C7.05469%209.375%206%209.75%204.875%209.75C2.17969%209.75%200%207.57031%200%204.875C0%202.20312%202.17969%200%204.875%200C7.54688%200%209.75%202.20312%209.75%204.875C9.75%206.02344%209.35156%207.07812%208.69531%207.92188L11.8359%2011.0391C12.0469%2011.2734%2012.0469%2011.625%2011.8359%2011.8359C11.6016%2012.0703%2011.25%2012.0703%2011.0391%2011.8359L7.89844%208.71875Z%22%20fill%3D%22%23707070%22%2F%3E%3C%2Fsvg%3E') no-repeat left;\n background-size: 14px;\n background-position: 10px center;\n }\n\n input:focus-visible {\n outline: 2px solid var(--jump-search-bar-focus-color);\n outline-offset: -2px;\n background: url('data:image/svg+xml;utf8,<svg width=\"13\" height=\"13\" viewBox=\"0 0 13 13\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M8.625 4.875C8.625 3.53906 7.89844 2.32031 6.75 1.64062C5.57812 0.960938 4.14844 0.960938 3 1.64062C1.82812 2.32031 1.125 3.53906 1.125 4.875C1.125 6.23438 1.82812 7.45312 3 8.13281C4.14844 8.8125 5.57812 8.8125 6.75 8.13281C7.89844 7.45312 8.625 6.23438 8.625 4.875ZM7.89844 8.71875C7.05469 9.375 6 9.75 4.875 9.75C2.17969 9.75 0 7.57031 0 4.875C0 2.20312 2.17969 0 4.875 0C7.54688 0 9.75 2.20312 9.75 4.875C9.75 6.02344 9.35156 7.07812 8.69531 7.92188L11.8359 11.0391C12.0469 11.2734 12.0469 11.625 11.8359 11.8359C11.6016 12.0703 11.25 12.0703 11.0391 11.8359L7.89844 8.71875Z\" fill=\"%235E79BA\"/></svg>') no-repeat left !important;\n background-size: 14px !important;\n background-position: 10px center !important;\n }\n}\n\n/* Stile filled */\n:host(.auto.filled) {\n input.search-input {\n border: none;\n border-radius: 3px;\n padding: 12px;\n padding-left: 35px;\n background: url('data:image/svg+xml;utf8,%3Csvg%20width%3D%2213%22%20height%3D%2213%22%20viewBox%3D%220%200%2013%2013%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8.625%204.875C8.625%203.53906%207.89844%202.32031%206.75%201.64062C5.57812%200.960938%204.14844%200.960938%203%201.64062C1.82812%202.32031%201.125%203.53906%201.125%204.875C1.125%206.23438%201.82812%207.45312%203%208.13281C4.14844%208.8125%205.57812%208.8125%206.75%208.13281C7.89844%207.45312%208.625%206.23438%208.625%204.875ZM7.89844%208.71875C7.05469%209.375%206%209.75%204.875%209.75C2.17969%209.75%200%207.57031%200%204.875C0%202.20312%202.17969%200%204.875%200C7.54688%200%209.75%202.20312%209.75%204.875C9.75%206.02344%209.35156%207.07812%208.69531%207.92188L11.8359%2011.0391C12.0469%2011.2734%2012.0469%2011.625%2011.8359%2011.8359C11.6016%2012.0703%2011.25%2012.0703%2011.0391%2011.8359L7.89844%208.71875Z%22%20fill%3D%22%23707070%22%2F%3E%3C%2Fsvg%3E') no-repeat left;\n background-size: 14px;\n background-position: 10px center;\n background-color: var(--jump-search-bar-bg-color);\n }\n}\n","import { Component, Host, h, Prop, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'jump-search-bar',\n styleUrl: 'jump-search-bar.scss',\n shadow: true,\n})\nexport class JumpSearchBar {\n /* ---------------------- OWN PROPERTIES ---------------------- */\n\n /* ---------------------- @ELEMENT ---------------------------- */\n jumpSearchBar: HTMLInputElement;\n\n /* ---------------------- @STATE ------------------------- */\n\n /* ---------------------- @PROPERTIES ------------------------- */\n @Prop() placeholder: string = 'Cerca...';\n @Prop() identifier: string = 'search-bar';\n\n /**\n * Variabile per personalizzare il tempo di attesa prima di eseguire la ricerca\n */\n @Prop() debounceTime: number = 500;\n\n /**\n * Se \"Auto\" la ricerca parte automaticamente al termine della digitazione\n * Se \"Manual\" la ricerca parte solo dopo aver premuto invio -> può avere solo stile outline\n */\n @Prop() searchType: string = 'auto' || 'manual';\n\n @Prop() variant: string = 'outline' || 'filled' || 'linear';\n\n /* ---------------------- @EVENTS ------------------------- */\n @Event({ eventName: 'jump-search-bar' }) search: EventEmitter;\n\n\n /* ---------------------- @LIFECYCLE ------------------------- */\n\n /* -------------------- @LISTEN ------------------------------- */\n\n /* -------------------- @METHOD ------------------------------- */\n\n /* -------------------- LOCAL METHODS ------------------------- */\n\n /**\n * se searchType == 'manual' l'utente deve cliccare sul pulsante per eseguire la funzione\n * se searchType == 'auto' la funzione viene eseguita automaticamente al termine della digitazione\n */\n doSearch = () => {\n if (this.jumpSearchBar) {\n const searchValue = this.jumpSearchBar.value;\n\n console.log('doSearch', searchValue);\n this.search.emit({ search: searchValue });\n }\n }\n\n\n /** Used to filters/searchbar */\ndebounce(fn, delay = this.debounceTime) {\n let timeoutId;\n\n return (...args) => {\n // cancel the previous timer\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n // setup a new timer\n timeoutId = setTimeout(() => {\n fn.apply(null, args);\n }, delay);\n };\n};\n\n /* -------------------- RENDER ------------------------- */\n\n render() {\n return (\n <Host \n class={\"JumpSearchBar \" + (this.searchType == 'manual' ? 'manual outline' : (this.searchType + \" \" + this.variant))} \n >\n <input \n placeholder={this.placeholder} \n type=\"search\" id={this.identifier} class=\"search-input\" ref={(el) => { this.jumpSearchBar = el as HTMLInputElement }} \n onInput={this.searchType === 'auto' ? this.debounce(this.doSearch) : undefined}\n />\n {this.searchType === 'manual' &&\n <jump-button variant=\"secondary\" size=\"medium\" name=\"scopri\" value=\"value\" aria-label=\"Scopri di più\" id=\"button\" onlyIcon onClick={() => this.doSearch()}>\n <jump-icon slot=\"suffix\" name=\"magnifying-glass\"></jump-icon>\n </jump-button>\n }\n </Host>\n );\n }\n\n}\n"],"mappings":"yDAAA,MAAMA,EAAmB,85LACzB,MAAAC,EAAeD,E,MCMFE,EAAa,M,iEAyCxBC,KAAAC,SAAW,KACT,GAAID,KAAKE,cAAe,CACtB,MAAMC,EAAcH,KAAKE,cAAcE,MAEvCC,QAAQC,IAAI,WAAYH,GACxBH,KAAKO,OAAOC,KAAK,CAAED,OAAQJ,G,oBArCD,W,gBACD,a,kBAKE,I,gBAMF,O,aAEH,S,CA6B5B,QAAAM,CAASC,EAAIC,EAAQX,KAAKY,cACxB,IAAIC,EAEJ,MAAO,IAAIC,KAET,GAAID,EAAW,CACbE,aAAaF,E,CAGfA,EAAYG,YAAW,KACrBN,EAAGO,MAAM,KAAMH,EAAK,GACnBH,EAAM,C,CAMX,MAAAO,GACE,OACEC,EAACC,EAAI,CAAAC,IAAA,2CACHC,MAAO,kBAAoBtB,KAAKuB,YAAc,SAAW,iBAAoBvB,KAAKuB,WAAa,IAAMvB,KAAKwB,UAE1GL,EAAA,SAAAE,IAAA,2CACEI,YAAazB,KAAKyB,YAClBC,KAAK,SAASC,GAAI3B,KAAK4B,WAAYN,MAAM,eAAeO,IAAMC,IAAS9B,KAAKE,cAAgB4B,CAAsB,EAClHC,QAAS/B,KAAKuB,aAAe,OAASvB,KAAKS,SAAST,KAAKC,UAAY+B,YAEtEhC,KAAKuB,aAAe,UACnBJ,EAAA,eAAAE,IAAA,2CAAaG,QAAQ,YAAYS,KAAK,SAASC,KAAK,SAAS9B,MAAM,QAAO,aAAY,gBAAgBuB,GAAG,SAASQ,SAAQ,KAACC,QAAS,IAAMpC,KAAKC,YAC7IkB,EAAA,aAAAE,IAAA,2CAAWgB,KAAK,SAASH,KAAK,sB"}
@@ -0,0 +1,2 @@
1
+ import{r as a,h as e,H as c}from"./p-d4c681a4.js";const s=":host{display:block}.JumpTabPanel__Content{display:none;padding:1rem 0}.JumpTabPanel__Content.active{display:block}";const t=s;const n=class{constructor(e){a(this,e);this.identifier=undefined;this.active=false}render(){return e(c,{key:"04e7e69fddb9e20a702e1811c3ed0ac948304362",class:"JumpTabPanel",id:this.identifier},e("div",{key:"3ca5c246a4bdb03c725d0c7df1b5b7cf1560abba",class:"JumpTabPanel__Content "+(this.active?"active":"")},e("slot",{key:"45f0678c6415e2797f7b751c33ef18ccaccab306"})))}};n.style=t;export{n as jump_tab_panel};
2
+ //# sourceMappingURL=p-9defb660.entry.js.map
@@ -826,6 +826,35 @@
826
826
  }
827
827
  ]
828
828
  },
829
+ {
830
+ "name": "jump-search-bar",
831
+ "description": {
832
+ "kind": "markdown",
833
+ "value": ""
834
+ },
835
+ "attributes": [
836
+ {
837
+ "name": "debounce-time",
838
+ "description": "Variabile per personalizzare il tempo di attesa prima di eseguire la ricerca"
839
+ },
840
+ {
841
+ "name": "identifier",
842
+ "description": ""
843
+ },
844
+ {
845
+ "name": "placeholder",
846
+ "description": ""
847
+ },
848
+ {
849
+ "name": "search-type",
850
+ "description": "Se \"Auto\" la ricerca parte automaticamente al termine della digitazione\nSe \"Manual\" la ricerca parte solo dopo aver premuto invio -> può avere solo stile outline"
851
+ },
852
+ {
853
+ "name": "variant",
854
+ "description": ""
855
+ }
856
+ ]
857
+ },
829
858
  {
830
859
  "name": "jump-tab",
831
860
  "description": {
@@ -0,0 +1,25 @@
1
+ import { EventEmitter } from '../../stencil-public-runtime';
2
+ export declare class JumpSearchBar {
3
+ jumpSearchBar: HTMLInputElement;
4
+ placeholder: string;
5
+ identifier: string;
6
+ /**
7
+ * Variabile per personalizzare il tempo di attesa prima di eseguire la ricerca
8
+ */
9
+ debounceTime: number;
10
+ /**
11
+ * Se "Auto" la ricerca parte automaticamente al termine della digitazione
12
+ * Se "Manual" la ricerca parte solo dopo aver premuto invio -> può avere solo stile outline
13
+ */
14
+ searchType: string;
15
+ variant: string;
16
+ search: EventEmitter;
17
+ /**
18
+ * se searchType == 'manual' l'utente deve cliccare sul pulsante per eseguire la funzione
19
+ * se searchType == 'auto' la funzione viene eseguita automaticamente al termine della digitazione
20
+ */
21
+ doSearch: () => void;
22
+ /** Used to filters/searchbar */
23
+ debounce(fn: any, delay?: number): (...args: any[]) => void;
24
+ render(): any;
25
+ }
@@ -0,0 +1,49 @@
1
+ declare const _default: {
2
+ title: string;
3
+ tags: string[];
4
+ argTypes: {
5
+ identifier: {
6
+ name: string;
7
+ control: string;
8
+ description: string;
9
+ };
10
+ placeholder: {
11
+ name: string;
12
+ control: string;
13
+ description: string;
14
+ };
15
+ searchType: {
16
+ name: string;
17
+ control: string;
18
+ options: string[];
19
+ description: string;
20
+ };
21
+ variant: {
22
+ name: string;
23
+ control: string;
24
+ options: string[];
25
+ if: {
26
+ arg: string;
27
+ eq: string;
28
+ };
29
+ description: string;
30
+ };
31
+ debounceTime: {
32
+ name: string;
33
+ control: string;
34
+ description: string;
35
+ if: {
36
+ arg: string;
37
+ eq: string;
38
+ };
39
+ };
40
+ };
41
+ };
42
+ export default _default;
43
+ export declare const SearchBar: any;
44
+ export declare const SearchBarManual: any;
45
+ export declare const SearchBarAutoOutline: any;
46
+ export declare const SearchBarAutoFilled: any;
47
+ export declare const SearchBarAutoLinear: any;
48
+ export declare const SearchBarManualWithListener: any;
49
+ export declare const SearchBarAutoWithListener: any;
@@ -440,6 +440,19 @@ export namespace Components {
440
440
  "value": number;
441
441
  "variant": 'vertical' | 'horizontal';
442
442
  }
443
+ interface JumpSearchBar {
444
+ /**
445
+ * Variabile per personalizzare il tempo di attesa prima di eseguire la ricerca
446
+ */
447
+ "debounceTime": number;
448
+ "identifier": string;
449
+ "placeholder": string;
450
+ /**
451
+ * Se "Auto" la ricerca parte automaticamente al termine della digitazione Se "Manual" la ricerca parte solo dopo aver premuto invio -> può avere solo stile outline
452
+ */
453
+ "searchType": string;
454
+ "variant": string;
455
+ }
443
456
  interface JumpTab {
444
457
  "alignment": string;
445
458
  /**
@@ -506,6 +519,10 @@ export interface JumpQuantityCustomEvent<T> extends CustomEvent<T> {
506
519
  detail: T;
507
520
  target: HTMLJumpQuantityElement;
508
521
  }
522
+ export interface JumpSearchBarCustomEvent<T> extends CustomEvent<T> {
523
+ detail: T;
524
+ target: HTMLJumpSearchBarElement;
525
+ }
509
526
  export interface JumpTabCustomEvent<T> extends CustomEvent<T> {
510
527
  detail: T;
511
528
  target: HTMLJumpTabElement;
@@ -697,6 +714,23 @@ declare global {
697
714
  prototype: HTMLJumpQuantityElement;
698
715
  new (): HTMLJumpQuantityElement;
699
716
  };
717
+ interface HTMLJumpSearchBarElementEventMap {
718
+ "jump-search-bar": any;
719
+ }
720
+ interface HTMLJumpSearchBarElement extends Components.JumpSearchBar, HTMLStencilElement {
721
+ addEventListener<K extends keyof HTMLJumpSearchBarElementEventMap>(type: K, listener: (this: HTMLJumpSearchBarElement, ev: JumpSearchBarCustomEvent<HTMLJumpSearchBarElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
722
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
723
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
724
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
725
+ removeEventListener<K extends keyof HTMLJumpSearchBarElementEventMap>(type: K, listener: (this: HTMLJumpSearchBarElement, ev: JumpSearchBarCustomEvent<HTMLJumpSearchBarElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
726
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
727
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
728
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
729
+ }
730
+ var HTMLJumpSearchBarElement: {
731
+ prototype: HTMLJumpSearchBarElement;
732
+ new (): HTMLJumpSearchBarElement;
733
+ };
700
734
  interface HTMLJumpTabElementEventMap {
701
735
  "jump-change-activetab": any;
702
736
  }
@@ -753,6 +787,7 @@ declare global {
753
787
  "jump-pagination": HTMLJumpPaginationElement;
754
788
  "jump-pagination-table": HTMLJumpPaginationTableElement;
755
789
  "jump-quantity": HTMLJumpQuantityElement;
790
+ "jump-search-bar": HTMLJumpSearchBarElement;
756
791
  "jump-tab": HTMLJumpTabElement;
757
792
  "jump-tab-item": HTMLJumpTabItemElement;
758
793
  "jump-tab-panel": HTMLJumpTabPanelElement;
@@ -1185,6 +1220,20 @@ declare namespace LocalJSX {
1185
1220
  "value"?: number;
1186
1221
  "variant"?: 'vertical' | 'horizontal';
1187
1222
  }
1223
+ interface JumpSearchBar {
1224
+ /**
1225
+ * Variabile per personalizzare il tempo di attesa prima di eseguire la ricerca
1226
+ */
1227
+ "debounceTime"?: number;
1228
+ "identifier"?: string;
1229
+ "onJump-search-bar"?: (event: JumpSearchBarCustomEvent<any>) => void;
1230
+ "placeholder"?: string;
1231
+ /**
1232
+ * Se "Auto" la ricerca parte automaticamente al termine della digitazione Se "Manual" la ricerca parte solo dopo aver premuto invio -> può avere solo stile outline
1233
+ */
1234
+ "searchType"?: string;
1235
+ "variant"?: string;
1236
+ }
1188
1237
  interface JumpTab {
1189
1238
  "alignment"?: string;
1190
1239
  /**
@@ -1236,6 +1285,7 @@ declare namespace LocalJSX {
1236
1285
  "jump-pagination": JumpPagination;
1237
1286
  "jump-pagination-table": JumpPaginationTable;
1238
1287
  "jump-quantity": JumpQuantity;
1288
+ "jump-search-bar": JumpSearchBar;
1239
1289
  "jump-tab": JumpTab;
1240
1290
  "jump-tab-item": JumpTabItem;
1241
1291
  "jump-tab-panel": JumpTabPanel;
@@ -1260,6 +1310,7 @@ declare module "@stencil/core" {
1260
1310
  "jump-pagination": LocalJSX.JumpPagination & JSXBase.HTMLAttributes<HTMLJumpPaginationElement>;
1261
1311
  "jump-pagination-table": LocalJSX.JumpPaginationTable & JSXBase.HTMLAttributes<HTMLJumpPaginationTableElement>;
1262
1312
  "jump-quantity": LocalJSX.JumpQuantity & JSXBase.HTMLAttributes<HTMLJumpQuantityElement>;
1313
+ "jump-search-bar": LocalJSX.JumpSearchBar & JSXBase.HTMLAttributes<HTMLJumpSearchBarElement>;
1263
1314
  "jump-tab": LocalJSX.JumpTab & JSXBase.HTMLAttributes<HTMLJumpTabElement>;
1264
1315
  "jump-tab-item": LocalJSX.JumpTabItem & JSXBase.HTMLAttributes<HTMLJumpTabItemElement>;
1265
1316
  "jump-tab-panel": LocalJSX.JumpTabPanel & JSXBase.HTMLAttributes<HTMLJumpTabPanelElement>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jumpgroup/jump-design-system",
3
- "version": "0.3.34",
3
+ "version": "0.3.35",
4
4
  "description": "Stencil Component Starter",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -1,2 +0,0 @@
1
- import{r as a,h as e,H as s}from"./p-d4c681a4.js";const t=":host{display:block}.JumpTabPanel__Content{display:none;padding:1rem 0}.JumpTabPanel__Content.active{display:block}";const d=t;const n=class{constructor(e){a(this,e);this.identifier=undefined;this.active=false}render(){return e(s,{key:"14fc22857d3f935d1a573375d0bae6267d616099",class:"JumpTabPanel",id:this.identifier},e("div",{key:"6e690078d627fd44b8542a2979b0a53ad9ba5d2c",class:"JumpTabPanel__Content "+(this.active?"active":"")},e("slot",{key:"41c5be2ee7a664d028d781e9c48f7feca1d25bf7"})))}};n.style=d;export{n as jump_tab_panel};
2
- //# sourceMappingURL=p-2c95396a.entry.js.map
@@ -1,2 +0,0 @@
1
- import{r as t,c as e,h as i,H as a}from"./p-d4c681a4.js";const s=":host{display:block;--jump-tab-bg-color:var(--gray-ultralight, #f8f8f8);--jump-tab-border-color:var(--neutral-grey-disabled, #CBCBCB)}:host .Wrapper{display:flex;width:fit-content}:host .Wrapper.rounded{border-radius:50px;background-color:#f8f8f8}:host(.center){display:flex;justify-content:center;align-items:center}:host(.left){display:flex;justify-content:flex-start;align-items:center}:host(.right){display:flex;justify-content:flex-end;align-items:center}:host(.fullBorder.inline){border-bottom:1px solid var(--jump-tab-border-color)}:host(.fullBorder.inline) ::slotted([slot=tab-item]){margin-bottom:-1px}";const r=s;const c=class{constructor(i){t(this,i);this.setActiveTab=e(this,"jump-change-activetab",7);this.alignment="left";this.fullBorder=false;this.tabGroupName=undefined;this.variant="inline"}changeActiveTabHandler(t){this.setActiveTab.emit(t.detail);const e=getComputedStyle(document.documentElement);const i=e.getPropertyValue("--neutral-grey-secondary").trim();let a=this.JumpTabEl.querySelectorAll("jump-tab-item");if(a.length>0){a.forEach((e=>{if(e.getAttribute("identifier")===t.detail.id){e.setAttribute("active","");if(this.variant==="sheet"){a.forEach(((t,s)=>{if(t!==e&&s!==a.length-1){t.style.borderRight=`1px solid ${i}`}else{t.style.borderRight="1px solid transparent"}}));let t=e.previousElementSibling;if(t){t.style.borderRight="1px solid transparent"}}}else{e.removeAttribute("active")}}))}let s=this.JumpTabEl.querySelectorAll("jump-tab-panel");if(s.length>0){s.forEach((e=>{if(e.getAttribute("identifier")===t.detail.id){e.setAttribute("active","")}else{e.removeAttribute("active")}}))}}componentDidLoad(){if(this.variant==="sheet"){const t=getComputedStyle(document.documentElement);const e=t.getPropertyValue("--neutral-grey-secondary").trim();let i=this.JumpTabEl.querySelectorAll("jump-tab-item");if(i.length>0){i.forEach(((t,a)=>{if(a===i.length-1||t.classList.contains("active")){t.style.borderRight="1px solid transparent"}else{t.style.borderRight=`1px solid ${e}`}}))}}}render(){return i(a,{key:"5692c9c61191b435aa4d54749e091b5305dfec3f",class:"JumpTab"+" "+this.alignment+" "+this.variant+" "+(this.fullBorder&&"fullBorder"),id:this.tabGroupName,ref:t=>{this.JumpTabEl=t}},i("div",{key:"1f2d7f7a61778897bfdb21b5c7243908f48ca8a4"},i("div",{key:"f959c8d64f35c96ed8b2ae470fdc8c8a63da7ea1",class:"Wrapper "+this.variant},i("slot",{key:"006c9bfcfd55068064a009f1acb834b7a20c0ac0",name:"tab-item"})),i("div",{key:"119d24cba57a23144c2167b3c378ccd1279d4774"},i("slot",{key:"975e6edbc7f29cba13fb45bac921fbd9b3e92a6f",name:"tab-content"}))))}};c.style=r;export{c as jump_tab};
2
- //# sourceMappingURL=p-cfdf7090.entry.js.map