@jumpgroup/jump-design-system 0.3.52 → 0.3.53
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/dist/cjs/{index-97b3526b.js → index-e91b2b41.js} +26 -4
- package/dist/cjs/index-e91b2b41.js.map +1 -0
- package/dist/cjs/jump-accordion-group.cjs.entry.js +1 -1
- package/dist/cjs/jump-accordion.cjs.entry.js +1 -1
- package/dist/cjs/jump-badge.cjs.entry.js +1 -1
- package/dist/cjs/jump-button_2.cjs.entry.js +1 -1
- package/dist/cjs/jump-card-ecommerce-option.cjs.entry.js +1 -1
- package/dist/cjs/jump-card-ecommerce.cjs.entry.js +1 -1
- package/dist/cjs/jump-card.cjs.entry.js +1 -1
- package/dist/cjs/jump-design-system.cjs.js +2 -2
- package/dist/cjs/jump-filter-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/jump-filter.cjs.entry.js +1 -1
- package/dist/cjs/jump-filtergroup.cjs.entry.js +1 -1
- package/dist/cjs/jump-navbar.cjs.entry.js +1 -1
- package/dist/cjs/jump-pagination-table.cjs.entry.js +1 -1
- package/dist/cjs/jump-pagination.cjs.entry.js +1 -1
- package/dist/cjs/jump-quantity.cjs.entry.js +1 -1
- package/dist/cjs/jump-search-bar-dropdown-item.cjs.entry.js +46 -0
- package/dist/cjs/jump-search-bar-dropdown-item.cjs.entry.js.map +1 -0
- package/dist/cjs/jump-search-bar-mobile.cjs.entry.js +130 -0
- package/dist/cjs/jump-search-bar-mobile.cjs.entry.js.map +1 -0
- package/dist/cjs/jump-search-bar.cjs.entry.js +139 -21
- package/dist/cjs/jump-search-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/jump-tab-item.cjs.entry.js +4 -4
- package/dist/cjs/jump-tab-item.cjs.entry.js.map +1 -1
- package/dist/cjs/jump-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/jump-tab.cjs.entry.js +2 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/jump-search-bar/jump-search-bar.css +173 -47
- package/dist/collection/components/jump-search-bar/jump-search-bar.js +424 -27
- package/dist/collection/components/jump-search-bar/jump-search-bar.js.map +1 -1
- package/dist/collection/components/jump-search-bar/jump-search-bar.stories.js +320 -49
- package/dist/collection/components/jump-search-bar/jump-search-bar.stories.js.map +1 -1
- package/dist/collection/components/jump-search-bar-dropdown-item/jump-search-bar-dropdown-item.css +3 -0
- package/dist/collection/components/jump-search-bar-dropdown-item/jump-search-bar-dropdown-item.js +122 -0
- package/dist/collection/components/jump-search-bar-dropdown-item/jump-search-bar-dropdown-item.js.map +1 -0
- package/dist/collection/components/jump-search-bar-dropdown-item/jump-search-bar-dropdown-item.stories.js +13 -0
- package/dist/collection/components/jump-search-bar-dropdown-item/jump-search-bar-dropdown-item.stories.js.map +1 -0
- package/dist/collection/components/jump-search-bar-dropdown-item/test/jump-search-bar-dropdown-item.e2e.js +10 -0
- package/dist/collection/components/jump-search-bar-dropdown-item/test/jump-search-bar-dropdown-item.e2e.js.map +1 -0
- package/dist/collection/components/jump-search-bar-dropdown-item/test/jump-search-bar-dropdown-item.spec.js +18 -0
- package/dist/collection/components/jump-search-bar-dropdown-item/test/jump-search-bar-dropdown-item.spec.js.map +1 -0
- package/dist/collection/components/jump-search-bar-mobile/jump-search-bar-mobile.css +91 -0
- package/dist/collection/components/jump-search-bar-mobile/jump-search-bar-mobile.js +414 -0
- package/dist/collection/components/jump-search-bar-mobile/jump-search-bar-mobile.js.map +1 -0
- package/dist/collection/components/jump-search-bar-mobile/jump-search-bar-mobile.stories.js +192 -0
- package/dist/collection/components/jump-search-bar-mobile/jump-search-bar-mobile.stories.js.map +1 -0
- package/dist/collection/components/jump-search-bar-mobile/test/jump-search-bar-mobile.e2e.js +10 -0
- package/dist/collection/components/jump-search-bar-mobile/test/jump-search-bar-mobile.e2e.js.map +1 -0
- package/dist/collection/components/jump-search-bar-mobile/test/jump-search-bar-mobile.spec.js +18 -0
- package/dist/collection/components/jump-search-bar-mobile/test/jump-search-bar-mobile.spec.js.map +1 -0
- package/dist/collection/components/jump-tab/jump-tab.js +1 -1
- package/dist/collection/components/jump-tab-item/jump-tab-item.css +11 -6
- package/dist/collection/components/jump-tab-item/jump-tab-item.js +2 -2
- package/dist/collection/components/jump-tab-panel/jump-tab-panel.js +1 -1
- package/dist/components/jump-search-bar-dropdown-item.d.ts +11 -0
- package/dist/components/jump-search-bar-dropdown-item.js +65 -0
- package/dist/components/jump-search-bar-dropdown-item.js.map +1 -0
- package/dist/components/jump-search-bar-mobile.d.ts +11 -0
- package/dist/components/jump-search-bar-mobile.js +175 -0
- package/dist/components/jump-search-bar-mobile.js.map +1 -0
- package/dist/components/jump-search-bar.js +159 -22
- package/dist/components/jump-search-bar.js.map +1 -1
- package/dist/components/jump-tab-item.js +3 -3
- package/dist/components/jump-tab-item.js.map +1 -1
- package/dist/components/jump-tab-panel.js +1 -1
- package/dist/components/jump-tab.js +1 -1
- package/dist/esm/{index-14b73bd6.js → index-9a1da0f0.js} +26 -4
- package/dist/esm/index-9a1da0f0.js.map +1 -0
- package/dist/esm/jump-accordion-group.entry.js +1 -1
- package/dist/esm/jump-accordion.entry.js +1 -1
- package/dist/esm/jump-badge.entry.js +1 -1
- package/dist/esm/jump-button_2.entry.js +1 -1
- package/dist/esm/jump-card-ecommerce-option.entry.js +1 -1
- package/dist/esm/jump-card-ecommerce.entry.js +1 -1
- package/dist/esm/jump-card.entry.js +1 -1
- package/dist/esm/jump-design-system.js +3 -3
- package/dist/esm/jump-filter-checkbox.entry.js +1 -1
- package/dist/esm/jump-filter.entry.js +1 -1
- package/dist/esm/jump-filtergroup.entry.js +1 -1
- package/dist/esm/jump-navbar.entry.js +1 -1
- package/dist/esm/jump-pagination-table.entry.js +1 -1
- package/dist/esm/jump-pagination.entry.js +1 -1
- package/dist/esm/jump-quantity.entry.js +1 -1
- package/dist/esm/jump-search-bar-dropdown-item.entry.js +42 -0
- package/dist/esm/jump-search-bar-dropdown-item.entry.js.map +1 -0
- package/dist/esm/jump-search-bar-mobile.entry.js +126 -0
- package/dist/esm/jump-search-bar-mobile.entry.js.map +1 -0
- package/dist/esm/jump-search-bar.entry.js +139 -21
- package/dist/esm/jump-search-bar.entry.js.map +1 -1
- package/dist/esm/jump-tab-item.entry.js +4 -4
- package/dist/esm/jump-tab-item.entry.js.map +1 -1
- package/dist/esm/jump-tab-panel.entry.js +2 -2
- package/dist/esm/jump-tab.entry.js +2 -2
- package/dist/esm/loader.js +3 -3
- package/dist/jump-design-system/jump-design-system.esm.js +1 -1
- package/dist/jump-design-system/jump-design-system.esm.js.map +1 -1
- package/dist/jump-design-system/{p-18df1585.entry.js → p-02e863db.entry.js} +2 -2
- package/dist/jump-design-system/p-07633158.entry.js +2 -0
- package/dist/jump-design-system/p-07633158.entry.js.map +1 -0
- package/dist/jump-design-system/p-1aa5fb8a.entry.js +2 -0
- package/dist/jump-design-system/p-1aa5fb8a.entry.js.map +1 -0
- package/dist/jump-design-system/{p-6e26f3ef.entry.js → p-1da9811d.entry.js} +2 -2
- package/dist/jump-design-system/p-21aa0095.js +3 -0
- package/dist/jump-design-system/p-21aa0095.js.map +1 -0
- package/dist/jump-design-system/p-2e2bd8a9.entry.js +2 -0
- package/dist/jump-design-system/{p-6f1c7238.entry.js → p-3f6d50d5.entry.js} +2 -2
- package/dist/jump-design-system/{p-8bdb9702.entry.js → p-466e0ade.entry.js} +2 -2
- package/dist/jump-design-system/{p-396d2541.entry.js → p-506950ea.entry.js} +2 -2
- package/dist/jump-design-system/{p-4b284def.entry.js → p-6acb16c6.entry.js} +3 -3
- package/dist/jump-design-system/{p-7b6c9e01.entry.js → p-6b1ab8c3.entry.js} +2 -2
- package/dist/jump-design-system/{p-53129684.entry.js → p-6dc529fc.entry.js} +2 -2
- package/dist/jump-design-system/{p-30c9d7c7.entry.js → p-6e7c80a3.entry.js} +2 -2
- package/dist/jump-design-system/p-8f581228.entry.js +2 -0
- package/dist/jump-design-system/{p-8873623c.entry.js → p-a1c25113.entry.js} +2 -2
- package/dist/jump-design-system/{p-1c882126.entry.js → p-a826c477.entry.js} +2 -2
- package/dist/jump-design-system/{p-e0e82d36.entry.js → p-b03c5b24.entry.js} +2 -2
- package/dist/jump-design-system/{p-174d297f.entry.js → p-bdafe87d.entry.js} +2 -2
- package/dist/jump-design-system/p-c77d216c.entry.js +2 -0
- package/dist/jump-design-system/p-c77d216c.entry.js.map +1 -0
- package/dist/jump-design-system/p-f7c323d2.entry.js +2 -0
- package/dist/jump-design-system/p-f7c323d2.entry.js.map +1 -0
- package/dist/jump-design-system/{p-f371718a.entry.js → p-feb825e0.entry.js} +2 -2
- package/dist/jump-design-system-elements.json +97 -3
- package/dist/types/components/jump-search-bar/jump-search-bar.d.ts +51 -11
- package/dist/types/components/jump-search-bar/jump-search-bar.stories.d.ts +137 -10
- package/dist/types/components/jump-search-bar-dropdown-item/jump-search-bar-dropdown-item.d.ts +10 -0
- package/dist/types/components/jump-search-bar-dropdown-item/jump-search-bar-dropdown-item.stories.d.ts +7 -0
- package/dist/types/components/jump-search-bar-mobile/jump-search-bar-mobile.d.ts +46 -0
- package/dist/types/components/jump-search-bar-mobile/jump-search-bar-mobile.stories.d.ts +131 -0
- package/dist/types/components.d.ts +135 -10
- package/package.json +1 -1
- package/dist/cjs/index-97b3526b.js.map +0 -1
- package/dist/esm/index-14b73bd6.js.map +0 -1
- package/dist/jump-design-system/p-134e548b.entry.js +0 -2
- package/dist/jump-design-system/p-134e548b.entry.js.map +0 -1
- package/dist/jump-design-system/p-1c5db8d3.js +0 -3
- package/dist/jump-design-system/p-1c5db8d3.js.map +0 -1
- package/dist/jump-design-system/p-3dd1f9a0.entry.js +0 -2
- package/dist/jump-design-system/p-5f12bbbb.entry.js +0 -2
- package/dist/jump-design-system/p-6363b6ee.entry.js +0 -2
- package/dist/jump-design-system/p-6363b6ee.entry.js.map +0 -1
- /package/dist/jump-design-system/{p-18df1585.entry.js.map → p-02e863db.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-6e26f3ef.entry.js.map → p-1da9811d.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-3dd1f9a0.entry.js.map → p-2e2bd8a9.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-6f1c7238.entry.js.map → p-3f6d50d5.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-8bdb9702.entry.js.map → p-466e0ade.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-396d2541.entry.js.map → p-506950ea.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-4b284def.entry.js.map → p-6acb16c6.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-7b6c9e01.entry.js.map → p-6b1ab8c3.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-53129684.entry.js.map → p-6dc529fc.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-30c9d7c7.entry.js.map → p-6e7c80a3.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-5f12bbbb.entry.js.map → p-8f581228.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-8873623c.entry.js.map → p-a1c25113.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-1c882126.entry.js.map → p-a826c477.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-e0e82d36.entry.js.map → p-b03c5b24.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-174d297f.entry.js.map → p-bdafe87d.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-f371718a.entry.js.map → p-feb825e0.entry.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"jump-search-bar.entry.js","mappings":";;AAAA,MAAM,gBAAgB,GAAG,27LAA27L,CAAC;AACr9L,4BAAe,gBAAgB;;MCMlB,aAAa;;;;;;;;;;;;QAyCxB,aAAQ,GAAG;YACT,IAAI,IAAI,CAAC,aAAa,EAAE;gBACtB,MAAM,WAAW,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC;gBAE7C,OAAO,CA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AAe,EAAC,EAAE,EAAC,QAAQ,EAAC,QAAQ,QAAC,OAAO,EAAE,MAAM,IAAI,CAAC,QAAQ,EAAE,IACvJ,kEAAW,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,kBAAkB,GAAa,CACjD,CAEX,EACP;KACH;;;;;;","names":[],"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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O,EAAC,IAAI,QAAC,OAAO,EAAE,MAAM,IAAI,CAAC,qBAAqB,EAAE,EAAE,MAAM,EAAC,QAAQ,SAAG,IAAI,CAAC,cAAc,MAAgB,EACpJ,IAAI,CAAC,YAAY,IAAI,eAAM,IAAI,CAAC,YAAY,OAAG,IAAI,CAAC,WAAW,CAAO,CACnE,CAEJ,CACF,CAEJ,CAAA;KACT;IAED,MAAM;QACJ,IAAI,IAAI,CAAC,OAAO,KAAK,QAAQ,IAAI,IAAI,CAAC,cAAc,EAAE;YACpD,OAAO,IAAI,CAAC,oBAAoB,EAAE,CAAC;SACpC;aAAM;YACL,OAAO,IAAI,CAAC,aAAa,EAAE,CAAC;SAC7B;KACF;;;;;;;;;","names":[],"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: block;\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 --jump-search-bar-dropdown-border-color: var(--neutral-grey-disabled, #CBCBCB);\n\n font-family: var(--ff-primary);\n\n jump-button {\n --jump-button-border-radius: 0px 3px 3px 0px;\n }\n\n .SearchBar {\n position: relative;\n\n &.focused .InputWrapper {\n border-color: var(--jump-search-bar-focus-color) !important;\n \n jump-icon {\n color: var(--jump-search-bar-focus-color) !important;\n }\n \n input {\n outline: none !important;\n }\n }\n }\n\n .SearchBar:not(.iconOnly) {\n display: flex;\n width: 100%;\n \n .InputWrapper {\n width: 100%;\n display: flex;\n }\n \n input {\n width: 100%;\n border: none;\n }\n \n /* Stile outline*/\n &.outline .InputWrapper {\n border: 1px solid var(--jump-search-bar-border-color);\n border-radius: 3px;\n padding: 12px;\n gap: 8px;\n \n jump-icon {\n color: var(--jump-search-bar-border-color);\n }\n }\n \n &.outline.withBtn .InputWrapper {\n border-radius: 3px 0px 0px 3px;\n }\n \n \n /* Stile filled */\n &.filled .InputWrapper {\n border: 1px solid var(--jump-search-bar-bg-color);\n background-color: var(--jump-search-bar-bg-color);\n border-radius: 3px;\n padding: 12px;\n gap: 8px;\n \n input {\n background-color: var(--jump-search-bar-bg-color);\n }\n \n jump-icon {\n color: var(--jump-search-bar-border-color);\n }\n }\n \n &.filled.focused.withBtn .InputWrapper {\n border-radius: 3px 0px 0px 3px !important;\n }\n \n /* Stile linear */\n &.linear .InputWrapper {\n border-bottom: 1px solid var(--jump-search-bar-border-color);\n padding-bottom: 4px;\n \n jump-icon {\n padding-right: 6px;\n }\n }\n }\n \n \n .Dropdown {\n\n &.dropAbsolute {\n position: absolute;\n box-sizing: border-box;\n position: absolute;\n left: 0;\n width: 100%;\n }\n\n &.dropRelative {\n position: relative;\n }\n\n // position: absolute; la tolgo per il test\n margin-top: 10px;\n border-radius: 3px;\n border: 1px solid var(--jump-search-bar-dropdown-border-color);\n padding: 4px 16px;\n background-color: white;\n\n &__Recents {\n .title {\n color: #707070;\n font-size: 14px;\n line-height: 20px;\n padding: 8px 0;\n font-weight: 700;\n display: flex;\n }\n }\n\n &__Results {\n .totalRes {\n display: flex; \n justify-content: space-between;\n }\n }\n \n\n .ResWrapper {\n display: flex;\n flex-direction: column;\n\n div {\n padding: 8px 0;\n color: #707070;\n font-size: 14px;\n display: flex;\n gap: 12px;\n align-items: center;\n\n img {\n width: 40px;\n height: 48px;\n object-fit: cover;\n border-radius: 3px;\n }\n }\n\n div:hover {\n cursor: pointer;\n }\n\n .helperText {\n color: #CBCBCB;\n\n svg {\n width: 25px;\n height: 25px;\n }\n }\n }\n }\n\n/* Applicazione dell'animazione alla SearchBar.iconOnly.linear */\n.SearchBar.iconOnly.linear {\n display: flex;\n width: 100%;\n\n .InputWrapper {\n width: 100%;\n display: flex;\n align-items: center;\n transition: border-bottom 0.3s ease;\n /* Transizione solo per il bordo inferiore */\n border-bottom: 1px solid transparent;\n /* Nessun bordo inizialmente */\n padding-bottom: 4px;\n overflow: hidden;\n /* Per nascondere il contenuto che esce dai limiti dell'InputWrapper */\n\n jump-icon {\n padding-right: 6px;\n /* Padding dell'icona */\n }\n\n input {\n width: 0;\n /* Imposta la larghezza iniziale a 0 */\n border: none;\n transform: translateX(-100%);\n /* Sposta l'input fuori dalla vista */\n transition: width 0.3s ease, transform 0.3s ease;\n /* Transizioni separate per width e transform */\n animation: none;\n /* Disabilita l'animazione predefinita */\n }\n }\n\n &.expanded {\n .InputWrapper {\n border-bottom: 1px solid var(--jump-search-bar-border-color);\n /* Mostra il bordo inferiore quando espanso */\n transition: border-bottom 0.3s ease;\n /* Transizione per il bordo inferiore */\n\n input {\n width: 100%;\n /* Espande l'input a tutta la larghezza disponibile */\n transform: translateX(0);\n /* Riposiziona l'input nella vista */\n animation: slide-right 0.3s ease forwards;\n /* Applicazione dell'animazione slide-right */\n }\n }\n }\n}\n \n}\n\n@keyframes slide-right {\n from {\n transform: translateX(-100%);\n opacity: 0;\n }\n\n to {\n transform: translateX(0);\n opacity: 1;\n }\n}\n\n@keyframes border-slide-right {\n from {\n border-bottom-width: 0;\n }\n\n to {\n border-bottom-width: 1px;\n }\n}","import { Component, Method, Watch, Listen, State, 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\n /* ---------------------- @OWN PROPERTIES ------------------------- */\n jumpSearchBar: HTMLInputElement;\n private componentRef: HTMLElement;\n\n /* ---------------------- @STATE ------------------------- */\n @State() dropdownVisible: boolean = false;\n @State() searchValue: string = undefined;\n\n @Watch('searchValue')\n searchValueChanged(newValue: string) {\n if (newValue === '') {\n // Create a new array reference to trigger re-render\n this.innerResults = [...this.recents];\n this.results = [];\n }\n }\n\n @State() resType: string = 'recents';\n @State() innerResults: Array<object> = [];\n @State() totalResults: number = 0;\n @State() isExpanded: boolean = false; \n\n /* ---------------------- @PROPERTIES ------------------------- */\n @Prop() placeholder: string = 'Cerca...'; //Il testo del placeholder dell\\'input della searchbar\n @Prop() noResultText: string = 'Nessun risultato corrispondente'; // Il testo da mostrare in caso nessun risultato sia stato recuperato.\n @Prop() loadingText: string = 'Sto caricando...'; // Il testo mostrato durante il caricamento dei risultati.\n @Prop() resultsText: string = 'risultati'; // Il testo mostrato accanto al numero di risultati totali.\n @Prop() showAllResText: string = 'Mostra tutti i risultati'; // La label da mostrare per il pulsante che mostra tutti i risultati.\n @Prop() identifier: string = 'search-bar'; // Identificatore della searchbar\n @Prop() debounceTime: number = 500; // 'Il tempo di attesa per l\\'invio della ricerca in caso di ricerca automatica. In millisecondi.\n @Prop() variant: string = 'outline'; // Scelta dello stile della barra di ricerca tra filled, linear e outline.\n @Prop() withBtn: boolean = false; // Se true, aggiunge un pulsante alla barra di ricerca\n @Prop() recentsTitle: string = 'Recenti'; // Serve per il titolo del dropwdown quando si vedono le ricerche recenti\n @Prop() recents: Array<object> = []; // Serve per il dropdown quando si vedono le ricerche recenti\n @Prop() results: Array<object> = []; // Serve per il dropdown quando si vedono i risultati della ricerca\n @Prop() dropdown: boolean = false; // Se true, mostra il dropdown con i risultati della ricerca.\n @Prop() linearIconOnly: boolean = false; // Se true, mostra solo l'icona nella barra di ricerca lineare\n @Prop() dropdownPosition: string = 'relative'; // Posizione del dropdown rispetto alla searchbar. \"relative\" o \"absolute\"\n\n\n /* ---------------------- @EVENTS ------------------------- */\n\n /**\n * Evento emesso quando l'utente clicca sull'icona in variant linear e linearIconOnly\n */\n @Event({ eventName: 'jump-search-bar-expanded' }) searchbarExpanded: EventEmitter;\n\n /**\n * Evento emesso quando l'utente effettua una ricerca \n * Emette un oggetto contenenente il valore della ricerca alla chiave 'search'\n * */\n @Event({ eventName: 'jump-search-bar' }) search: EventEmitter;\n\n /** \n * Evento emesso quando l'utente clicca sul pulsante (se presente) o nel pulsante del dropdown per vedere tutti i risultati \n * Emette un oggetto contenenente il valore della ricerca alla chiave 'search'\n */\n @Event({ eventName: 'jump-search-bar-show-all' }) showFullSearch: EventEmitter;\n\n /* \n * Evento da ascoltare per recuperare il dato cliccato\n * Emette un oggetto contenente tutti i dati relativi al risultato cliccato.\n */\n @Event({ eventName: 'jump-search-bar-res-clicked'}) resultClicked: EventEmitter; \n\n /* ---------------------- @LIFECYCLE ------------------------- */\n componentDidLoad() {\n // Aggiungi l'event listener per il clic al di fuori del componente\n document.addEventListener('click', this.handleOutsideClick.bind(this));\n }\n\n disconnectedCallback() {\n // Rimuovi l'event listener per evitare perdite di memoria\n document.removeEventListener('click', this.handleOutsideClick.bind(this));\n }\n\n /* -------------------- @LISTEN ------------------------------- */\n @Listen(\"jump-search-bar-dropdown-item-connected\")\n addOption(e) {\n let props = e.detail; // es {code: 'sku1', imageUrl: 'https://google.com/'}\n\n // Aggiungi l'elemento solo a `recents`\n this.recents = [...this.recents, { ...props }];\n\n // Aggiorna `innerResults` basandoti solo su `recents`\n this.innerResults = [...this.recents];\n }\n\n\n /* -------------------- @METHOD ------------------------------- */\n\n /** Imposta i risultati della ricerca all'interno della dropdown */\n @Method()\n async setResults(results, tot?: number) {\n this.results = results;\n this.innerResults = results;\n this.totalResults = tot;\n }\n\n /* -------------------- LOCAL METHODS ------------------------- */\n handleOutsideClick(event: MouseEvent) {\n // Controlla se il clic è fuori dal componente\n if (this.componentRef && !this.componentRef.contains(event.target as Node)) {\n this.dropdownVisible = false;\n }\n }\n\n // Gestisce l'evento focus sull'input\n handleFocus = () => {\n const searchBarContainer = this.jumpSearchBar.closest('.SearchBar');\n if (searchBarContainer) {\n searchBarContainer.classList.add('focused');\n }\n };\n\n // Gestisce l'evento blur sull'input\n handleBlur = () => {\n const searchBarContainer = this.jumpSearchBar.closest('.SearchBar');\n if (searchBarContainer) {\n searchBarContainer.classList.remove('focused');\n }\n };\n\n doSearch = () => {\n if (this.jumpSearchBar) {\n this.searchValue = this.jumpSearchBar.value;\n \n // Iniziare la ricerca solamente se ci sono almeno tre caratteri \n if (this.searchValue.length >= 3) {\n this.resType = 'results';\n\n this.innerResults = undefined;\n \n this.search.emit({ search: this.searchValue });\n \n // Se il dropdown è chiuso, aprilo. Potrebbe essere chiuso perchè non ci sono recenti\n if (!this.dropdownVisible) {\n this.dropdownVisible = true;\n }\n } else if(this.searchValue.length == 0) {\n this.dropdownVisible = false;\n }\n }\n };\n\n debounce(fn, delay = this.debounceTime) {\n let timeoutId;\n\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n fn.apply(null, args);\n }, delay);\n };\n };\n\n openDropdown() {\n this.resType = 'recents';\n this.dropdownVisible = true;\n }\n\n /** Emette l'evento di click su un risultato, mandandone tutti i dati */\n handleResClicked(item) {\n this.resultClicked.emit({ clicked: item });\n } \n\n /** Emette l'evento quando l'utente clicca sul pulsante (se presente) o nel pulsante del dropdown per vedere tutti i risultati */\n btnOrShowOtherClicked(){\n this.showFullSearch.emit({ search: this.searchValue });\n }\n\n /**\n * Se clicco l'icona espando la searchbar ed emetto un evento dedicato\n */\n expandSearchBar() {\n this.isExpanded = true;\n this.searchbarExpanded.emit();\n }\n\n\n /* --------------------- RENDER ------------------------------- */\n renderLinearIconOnly() {\n return (\n <Host class={\"JumpSearchBar \"} ref={(el) => (this.componentRef = el as HTMLElement)}>\n <div class={\"SearchBar iconOnly \" + this.variant + (this.isExpanded ? \" expanded\" : \"\")}>\n <div class=\"InputWrapper\" onClick={(this.isExpanded && this.dropdown && this.recents.length > 0) ? () => this.openDropdown() : null}>\n <jump-icon\n name=\"magnifying-glass\"\n category=\"light\"\n onClick={() => this.expandSearchBar()}\n ></jump-icon>\n {this.isExpanded &&\n // Mostra la barra di ricerca con l'animazione di slide\n <input\n placeholder={this.placeholder}\n type=\"search\"\n id={this.identifier}\n class=\"search-input\"\n ref={(el) => { this.jumpSearchBar = el as HTMLInputElement }}\n onInput={this.debounce(this.doSearch)}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n />\n }\n </div>\n </div>\n {(this.dropdown && this.dropdownVisible) && this.renderDropdown()} \n </Host>\n );\n }\n\n renderDefault() {\n return (\n <Host class={\"JumpSearchBar\"} ref={(el) => (this.componentRef = el as HTMLElement)}>\n <div class={\"SearchBar \" + this.variant + \" \" + (this.withBtn ? \"withBtn\" : \"\") + (this.isExpanded ? \" expanded\" : \"\")}>\n <div class=\"InputWrapper\" onClick={(this.dropdown && this.recents.length > 0) ? () => this.openDropdown() : null}>\n {!this.withBtn && <jump-icon name=\"magnifying-glass\" category=\"light\"></jump-icon>}\n <input\n placeholder={this.placeholder}\n type=\"search\"\n id={this.identifier}\n class=\"search-input\"\n ref={(el) => { this.jumpSearchBar = el as HTMLInputElement }}\n onInput={this.debounce(this.doSearch)}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n />\n </div>\n {this.withBtn && !this.linearIconOnly && (\n <jump-button\n variant=\"secondary\"\n size=\"medium\"\n name=\"scopri\"\n value=\"value\"\n aria-label=\"Scopri di più\"\n id=\"button\"\n onlyIcon\n onClick={() => this.btnOrShowOtherClicked()}\n >\n <jump-icon slot=\"suffix\" name=\"magnifying-glass\"></jump-icon>\n </jump-button>\n )}\n </div>\n {(this.dropdown && this.dropdownVisible) && this.renderDropdown()} \n </Host>\n );\n }\n\n renderDropdown(){\n console.log('POSITION', this.dropdownPosition);\n return <div class={\"Dropdown \" + (this.dropdownPosition == 'absolute' ? 'dropAbsolute' : 'dropRelative' ) }>\n {(this.resType == 'recents') &&\n <div class=\"Dropdown__Recents\">\n <span class=\"title\">{this.recentsTitle}</span>\n <div class=\"ResWrapper\">\n {this.innerResults.length > 0 && this.innerResults.map((item) => (\n <div onClick={() => this.handleResClicked(item)}>\n <jump-icon name=\"magnifying-glass\" category=\"light\"></jump-icon>\n {item['value']}\n </div>\n ))}\n </div>\n </div>\n }\n {this.resType == 'results' &&\n <div class=\"Dropdown__Results\">\n <div class=\"ResWrapper\">\n {this.innerResults === undefined ?\n <div class=\"helperText\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMidYMid\" width=\"252\" height=\"252\" ><g><g transform=\"rotate(0 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.9s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(36 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.8s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(72 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.7s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(108 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.6s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(144 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.5s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(180 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.4s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(216 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.3s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(252 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.2s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(288 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.1s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(324 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"0s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g></g></g></svg>{this.loadingText}</div>\n :\n (this.innerResults.length > 0 ?\n this.innerResults.map((item) => (\n <div onClick={() => this.handleResClicked(item)} key={item['id']}>\n {item['img'] && <img src={item['img']} alt=\"result\" />}\n {item['value']}\n </div>\n ))\n :\n <div class=\"helperText\">{this.noResultText}</div>\n )\n }\n {(this.innerResults && this.innerResults.length > 0) &&\n <div class=\"totalRes\">\n <jump-button variant=\"secondary\" size=\"small\" text onClick={() => this.btnOrShowOtherClicked()} target=\"_blank\"> {this.showAllResText} </jump-button>\n {this.totalResults && <div>{this.totalResults} {this.resultsText}</div>}\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n\n render() {\n if (this.variant === 'linear' && this.linearIconOnly) {\n return this.renderLinearIconOnly();\n } else {\n return this.renderDefault();\n }\n }\n}"],"version":3}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-9a1da0f0.js';
|
|
2
2
|
|
|
3
|
-
const jumpTabItemCss = ":host{display:block;--jump-tabitem-active-color:var(--secondary-standard);--jump-tabitem-color:var(--neutral-grey-secondary);--jump-tabitem-hover-color:var(--neutral-grey-disabled, #CBCBCB);--jump-tabitem-boxed-bg-color:var(--secondary-soft, #EDF2FA);--jump-tabitem-rounded-bg-color:white;--jump-tabitem-border-inline-color:var(--neutral-grey-disabled, #CBCBCB);font-family:var(--ff-primary);flex:0 0 auto}:host .Content{display:flex;}:host .Content:hover:not(.disabled){cursor:pointer}:host .Content label{font-size:
|
|
3
|
+
const jumpTabItemCss = ":host{display:block;--jump-tabitem-active-color:var(--secondary-standard);--jump-tabitem-color:var(--neutral-grey-secondary);--jump-tabitem-hover-color:var(--neutral-grey-disabled, #CBCBCB);--jump-tabitem-boxed-bg-color:var(--secondary-soft, #EDF2FA);--jump-tabitem-rounded-bg-color:white;--jump-tabitem-border-inline-color:var(--neutral-grey-disabled, #CBCBCB);--jump-tabitem-font-size:16px;--jump-tabitem-inline-padding:12px 24px;--jump-tabitem-boxed-padding:15px 39px;--jump-tabitem-rounded-padding:12px 32px;--jump-tabitem-sheet-padding:12px 32px;font-family:var(--ff-primary);flex:0 0 auto}:host .Content{display:flex;}:host .Content:hover:not(.disabled){cursor:pointer}:host .Content .label{font-size:var(--jump-tabitem-font-size)}:host .Content.left{flex-direction:row;gap:6px;align-items:center}:host .Content.top{flex-direction:column;gap:2px;align-items:center}:host .Content.inline{color:var(--jump-tabitem-color);padding:var(--jump-tabitem-inline-padding);border-bottom:1px solid var(--jump-tabitem-border-inline-color)}:host .Content.inline:not(.active){padding-bottom:14px}:host .Content.inline.active{color:var(--jump-tabitem-active-color);border-bottom:3px solid var(--jump-tabitem-active-color)}:host .Content.inline.active span{font-weight:bold}:host .Content.inline:hover:not(.disabled):not(.active){border-bottom:3px solid var(--jump-tabitem-hover-color);cursor:pointer;padding-bottom:12px}:host .Content.boxed{color:var(--jump-tabitem-color);padding:var(--jump-tabitem-boxed-padding);background-color:transparent;border:1px solid var(--jump-tabitem-boxed-bg-color)}:host .Content.boxed:hover:not(.disabled),:host .Content.boxed:hover:not(.active){background-color:transparent}:host .Content.boxed:hover:not(.disabled) span,:host .Content.boxed:hover:not(.active) span{font-weight:bold}:host .Content.boxed.active{color:var(--jump-tabitem-active-color);background-color:var(--jump-tabitem-boxed-bg-color);border:1px solid var(--jump-tabitem-boxed-bg-color)}:host .Content.boxed.active span{font-weight:bold}:host .Content.rounded{padding:var(--jump-tabitem-rounded-padding);color:var(--jump-tabitem-color)}:host .Content.rounded:hover:not(.disabled){cursor:pointer}:host .Content.rounded:hover:not(.disabled) span{font-weight:bold}:host .Content.rounded.active{color:var(--jump-tabitem-active-color);background-color:var(--jump-tabitem-rounded-bg-color);border:1px solid var(--jump-tabitem-active-color);border-radius:50px}:host .Content.sheet{padding:var(--jump-tabitem-sheet-padding);color:var(--neutral-grey-secondary)}:host .Content.sheet:hover:not(.disabled){cursor:pointer}:host .Content.sheet:hover:not(.disabled) span{font-weight:bold}:host .Content.sheet.active{color:var(--jump-tabitem-active-color);background-color:var(--jump-tabitem-rounded-bg-color);border-radius:8px 8px 0px 0px}:host(.disabled){cursor:not-allowed;opacity:0.5;pointer-events:none}";
|
|
4
4
|
const JumpTabItemStyle0 = jumpTabItemCss;
|
|
5
5
|
|
|
6
6
|
const JumpTabItem = class {
|
|
@@ -24,8 +24,8 @@ const JumpTabItem = class {
|
|
|
24
24
|
this.variant = parentVariant;
|
|
25
25
|
}
|
|
26
26
|
render() {
|
|
27
|
-
return (h(Host, { key: '
|
|
28
|
-
h("jump-icon", { key: '
|
|
27
|
+
return (h(Host, { key: '0a4383e01bea0539424876f8b0d8d04d4482c957', ref: (el) => { this.tabEl = el; }, class: "JumpTabItem " + (this.active ? 'active' : '') + " " + (this.variant) + " " + (this.disabled ? 'disabled' : '') }, h("div", { key: 'cee073351151f5468e4b72d4af2deacc7e080d22', class: "Content " + (this.iconName ? this.iconPosition : '') + " " + (this.variant) + " " + (this.active ? 'active' : '') + " " + (this.disabled ? 'disabled' : ''), onClick: () => this.changeTab(this.identifier), id: this.identifier }, (this.iconName && (this.variant == 'inline' || this.variant == 'boxed')) &&
|
|
28
|
+
h("jump-icon", { key: 'c65754b06a1b2404f146c71adc7498d4c8c6423c', library: "fa", category: "regular", name: this.iconName, size: "small" }), h("span", { key: 'd256f97d32910c594e12a6ca8b9de1fe483989b5', class: "label" }, this.label))));
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
JumpTabItem.style = JumpTabItemStyle0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"jump-tab-item.entry.js","mappings":";;AAAA,MAAM,cAAc,GAAG,
|
|
1
|
+
{"file":"jump-tab-item.entry.js","mappings":";;AAAA,MAAM,cAAc,GAAG,o0FAAo0F,CAAC;AAC51F,0BAAe,cAAc;;MCMhB,WAAW;;;;0BAOO,SAAS;wBAKX,SAAS;4BAML,MAAM;qBACb,EAAE;sBACA,KAAK;wBAEH,KAAK;uBAMN,QAAQ;;IAInC,SAAS,CAAC,UAAU;QAClB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,EAAC,EAAE,EAAE,UAAU,EAAC,CAAC,CAAC;KAC7C;IAED,gBAAgB;;QAEd,IAAI,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;QACrE,IAAI,CAAC,OAAO,GAAG,aAAa,CAAC;KAC9B;IAID,MAAM;QACJ,QACE,EAAC,IAAI,qDACH,GAAG,EAAE,CAAC,EAAE,OAAO,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA,EAAE,EAChC,KAAK,EAAE,cAAc,IAAI,IAAI,CAAC,MAAM,GAAG,QAAQ,GAAG,EAAE,CAAC,GAAG,GAAG,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,GAAG,IAAI,IAAI,CAAC,QAAQ,GAAG,UAAU,GAAG,EAAE,CAAC,IACtH,4DAAK,KAAK,EAAE,UAAU,IAAI,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC,GAAG,GAAG,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,GAAG,IAAI,IAAI,CAAC,MAAM,GAAG,QAAQ,GAAG,EAAE,CAAC,GAAG,GAAG,IAAI,IAAI,CAAC,QAAQ,GAAG,UAAU,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,UAAU,IAC1O,CAAC,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,OAAO,IAAI,QAAQ,IAAI,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC;YACtE,kEAAW,OAAO,EAAC,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAC,OAAO,GAAa,EAE3F,6DAAM,KAAK,EAAC,OAAO,IAAE,IAAI,CAAC,KAAK,CAAQ,CACnC,CACD,EACP;KACH;;;;;;","names":[],"sources":["src/components/jump-tab-item/jump-tab-item.scss?tag=jump-tab-item&encapsulation=shadow","src/components/jump-tab-item/jump-tab-item.tsx"],"sourcesContent":[":host {\n display: block;\n\n --jump-tabitem-active-color: var(--secondary-standard);\n --jump-tabitem-color: var(--neutral-grey-secondary);\n --jump-tabitem-hover-color: var(--neutral-grey-disabled, #CBCBCB);\n --jump-tabitem-boxed-bg-color: var(--secondary-soft, #EDF2FA);\n --jump-tabitem-rounded-bg-color: white;\n --jump-tabitem-border-inline-color: var(--neutral-grey-disabled, #CBCBCB);\n --jump-tabitem-font-size: 16px;\n --jump-tabitem-inline-padding: 12px 24px;\n --jump-tabitem-boxed-padding: 15px 39px;\n --jump-tabitem-rounded-padding: 12px 32px;\n --jump-tabitem-sheet-padding: 12px 32px;\n \n font-family: var(--ff-primary);\n\n flex: 0 0 auto;\n \n .Content {\n \n display: flex;\n\n &:hover:not(.disabled){\n cursor: pointer;\n }\n\n .label {\n font-size: var(--jump-tabitem-font-size);\n }\n \n &.left {\n flex-direction: row;\n gap: 6px;\n align-items: center;\n }\n \n &.top {\n flex-direction: column;\n gap: 2px;\n align-items: center;\n }\n \n /*Tipologia inline */\n &.inline {\n color: var(--jump-tabitem-color);\n padding: var(--jump-tabitem-inline-padding);\n border-bottom: 1px solid var(--jump-tabitem-border-inline-color);\n }\n\n &.inline:not(.active) {\n padding-bottom: 14px;\n }\n\n &.inline.active {\n color: var(--jump-tabitem-active-color);\n border-bottom: 3px solid var(--jump-tabitem-active-color);\n \n span {\n font-weight: bold;\n }\n }\n\n &.inline:hover:not(.disabled):not(.active) {\n border-bottom: 3px solid var(--jump-tabitem-hover-color);\n cursor: pointer;\n padding-bottom: 12px;\n }\n \n /* Tipologia boxed */\n &.boxed {\n color: var(--jump-tabitem-color);\n padding: var(--jump-tabitem-boxed-padding);\n background-color: transparent;\n border: 1px solid var(--jump-tabitem-boxed-bg-color);\n }\n \n &.boxed:hover:not(.disabled),\n &.boxed:hover:not(.active) {\n background-color: transparent;\n \n span {\n font-weight: bold;\n }\n }\n \n &.boxed.active {\n color: var(--jump-tabitem-active-color);\n background-color: var(--jump-tabitem-boxed-bg-color);\n border: 1px solid var(--jump-tabitem-boxed-bg-color);\n \n span {\n font-weight: bold;\n }\n }\n \n /* Tipologia rounded */\n &.rounded {\n padding: var(--jump-tabitem-rounded-padding);\n color: var(--jump-tabitem-color);\n \n }\n \n &.rounded:hover:not(.disabled) {\n cursor: pointer;\n \n span {\n font-weight: bold;\n }\n }\n \n &.rounded.active {\n color: var(--jump-tabitem-active-color);\n background-color: var(--jump-tabitem-rounded-bg-color);\n border: 1px solid var(--jump-tabitem-active-color);\n border-radius: 50px;\n \n }\n \n /** Tipologia sheet */\n &.sheet {\n padding: var(--jump-tabitem-sheet-padding);\n color: var(--neutral-grey-secondary);\n }\n \n &.sheet:hover:not(.disabled) {\n cursor: pointer;\n \n span {\n font-weight: bold;\n }\n }\n \n &.sheet.active {\n color: var(--jump-tabitem-active-color);\n background-color: var(--jump-tabitem-rounded-bg-color);\n border-radius: 8px 8px 0px 0px;\n }\n }\n}\n\n:host(.disabled) {\n cursor: not-allowed;\n opacity: 0.5;\n pointer-events: none;\n}\n\n","import { Component, Host, Prop,State, h, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'jump-tab-item',\n styleUrl: 'jump-tab-item.scss',\n shadow: true,\n})\nexport class JumpTabItem {\n\n /* ---------------------- @PROPERTIES ------------------------- */\n\n /**\n * Identifier of the tab\n */\n @Prop() identifier: string = undefined;\n\n /**\n * Name of the icon. If not provided, the icon will not be displayed\n */\n @Prop() iconName: string = undefined;\n\n /**\n * Icon position, apply only if the icon is present\n * Choosed from \"left\", \"top\"\n */\n @Prop() iconPosition: string = 'left';\n @Prop() label: string = '';\n @Prop() active: boolean = false;\n\n @Prop() disabled: boolean = false;\n\n /**\n * The style of the tab item\n * Choosed from \"inline\", \"boxed\", \"sheet\", \"rounded\"\n */\n @State() variant: string = 'inline';\n\n @Event({ eventName: 'jump-change-active-tab' }) changeActiveTab: EventEmitter;\n\n changeTab(identifier){\n this.changeActiveTab.emit({id: identifier});\n }\n\n componentDidLoad() {\n // Deve leggere la prop \"variant\" del componente babbo jump-tab e popolare la propria prop \"variant\"\n let parentVariant = this.tabEl.parentElement.getAttribute('variant');\n this.variant = parentVariant;\n }\n\n tabEl: HTMLElement;\n\n render() {\n return (\n <Host\n ref={(el) => { this.tabEl = el }}\n class={\"JumpTabItem \" + (this.active ? 'active' : '') + \" \" + (this.variant) + \" \" + (this.disabled ? 'disabled' : '')}>\n <div class={\"Content \" + (this.iconName ? this.iconPosition : '') + \" \" + (this.variant) + \" \" + (this.active ? 'active' : '') + \" \" + (this.disabled ? 'disabled' : '')} onClick={() => this.changeTab(this.identifier)} id={this.identifier}>\n {(this.iconName && (this.variant == 'inline' || this.variant == 'boxed')) &&\n <jump-icon library=\"fa\" category=\"regular\" name={this.iconName} size=\"small\"></jump-icon>\n }\n <span class=\"label\">{this.label}</span>\n </div>\n </Host>\n );\n }\n}\n\n"],"version":3}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-9a1da0f0.js';
|
|
2
2
|
|
|
3
3
|
const jumpTabPanelCss = ":host{display:block}.JumpTabPanel__Content{display:none;padding:1rem 0}.JumpTabPanel__Content.active{display:block}";
|
|
4
4
|
const JumpTabPanelStyle0 = jumpTabPanelCss;
|
|
@@ -10,7 +10,7 @@ const JumpTabPanel = class {
|
|
|
10
10
|
this.active = false;
|
|
11
11
|
}
|
|
12
12
|
render() {
|
|
13
|
-
return (h(Host, { key: '
|
|
13
|
+
return (h(Host, { key: '75fb1adb1af140bba218b890891234b01be1534f', class: "JumpTabPanel", id: this.identifier }, h("div", { key: '08ddae107776c29aa2b869e7b2e541e43e33b6a8', class: "JumpTabPanel__Content " + (this.active ? 'active' : '') }, h("slot", { key: 'bdf0d20e086f2b9def8df7f9abdae1df293a78c8' }))));
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
16
|
JumpTabPanel.style = JumpTabPanelStyle0;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-9a1da0f0.js';
|
|
2
2
|
|
|
3
3
|
const jumpTabCss = ":host{display:block;--jump-tab-bg-color:var(--gray-ultralight, #f8f8f8);--jump-tab-border-color:var(--neutral-grey-disabled, #CBCBCB);overflow-x:auto;scrollbar-width:none;}:host::-webkit-scrollbar{display:none;}.Wrapper{display:flex;flex-direction:column;overflow-x:auto;scrollbar-width:none;}.Wrapper::-webkit-scrollbar{display:none;}.ContentWrapper{display:flex;width:100%;justify-content:var(--alignment, flex-start)}@media (max-width: 768px){.ContentWrapper.ContentWrapper--Items{justify-content:flex-start;overflow-x:auto}.ContentWrapper.ContentWrapper--Items .fullBorder{justify-content:flex-start}}.Content{display:flex;flex-direction:row;align-items:flex-end;width:fit-content}.Content.fullBorder{width:100%;border-bottom:1px solid var(--jump-tab-border-color);justify-content:var(--alignment, flex-start)}.Content.fullBorder.inline ::slotted([slot=tab-item]){margin-bottom:-1px}.Content.rounded{border-radius:50px;background-color:var(--jump-tab-bg-color)}.Content.disabled{cursor:not-allowed;opacity:0.5;pointer-events:none}jump-tab-item{display:flex;align-items:flex-end;overflow:hidden}jump-tab-item .tab-title{display:block;white-space:normal;text-align:center}";
|
|
4
4
|
const JumpTabStyle0 = jumpTabCss;
|
|
@@ -72,7 +72,7 @@ const JumpTab = class {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
render() {
|
|
75
|
-
return (h(Host, { key: '
|
|
75
|
+
return (h(Host, { key: '497e52126ca025e5bd75ec2d611eb7e31288e165', class: "JumpTab " + this.variant, id: this.tabGroupName, ref: (el) => { this.JumpTabEl = el; } }, h("div", { key: 'f466e49311a54ec21317237335cbbdf5518766fb', class: "Wrapper " + (this.fullBorder ? 'fullBorder' : '') }, h("div", { key: '9ea2361990221d411600a19858c61ea70bc4701f', class: "ContentWrapper ContentWrapper--Items", style: { '--alignment': this.getAlignment(this.alignment) } }, h("div", { key: '9190d13fc70bec3709e3b7603836806349172e8d', class: "Content " + this.variant + " " + (this.disabled ? 'disabled' : '') + " " + (this.fullBorder ? 'fullBorder' : ''), style: { '--alignment': this.getAlignment(this.alignment) } }, h("slot", { key: '52c0f5898b72fc938a0bf082ba43bd88d2ff30c6', name: "tab-item" }))), h("div", { key: '27ea1ebf944e2ccf856b1b7704e16493171ef6c9', class: "ContentWrapper ContentWrapper--Panel" }, h("slot", { key: '6f96926996d8efb7e11e6c78d60d18dd142ee38a', name: "tab-content" })))));
|
|
76
76
|
}
|
|
77
77
|
getAlignment(alignment) {
|
|
78
78
|
switch (alignment) {
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { b as bootstrapLazy } from './index-9a1da0f0.js';
|
|
2
|
+
export { s as setNonce } from './index-9a1da0f0.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
4
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
|
7
7
|
await globalScripts();
|
|
8
|
-
return bootstrapLazy([["jump-button_2",[[1,"jump-button",{"disabled":[4],"variant":[1],"outline":[4],"size":[1],"full":[4],"pill":[4],"text":[4],"onlyIcon":[4,"only-icon"],"href":[1],"target":[1],"type":[1],"name":[1],"value":[1],"ariaLabel":[1,"aria-label"],"class":[1],"buttonId":[1,"button-id"]}],[1,"jump-icon",{"class":[1],"library":[1],"name":[1],"category":[1],"size":[1],"label":[1],"src":[1]}]]],["jump-card-ecommerce",[[1,"jump-card-ecommerce",{"onlyIconButton":[4,"only-icon-button"],"hasBackground":[4,"has-background"],"badge":[1],"favorite":[1540],"hasFavorite":[4,"has-favorite"],"hasSlotForFavorite":[4,"has-slot-for-favorite"],"hasSlotAddToCart":[4,"has-slot-add-to-cart"],"link":[1],"img":[1],"imgAlt":[1,"img-alt"],"hoverImg":[1,"hover-img"],"hoverImgAlt":[1,"hover-img-alt"],"videoSrc":[1,"video-src"],"notificationUrl":[1,"notification-url"],"notificationText":[1,"notification-text"],"productName":[1,"product-name"],"subtitle":[1],"productId":[1,"product-id"],"price":[2],"salePrice":[2,"sale-price"],"currency":[1],"addToCartColor":[1,"add-to-cart-color"],"badgeColor":[1,"badge-color"],"outOfStock":[1540,"out-of-stock"],"outOfStockText":[1,"out-of-stock-text"],"addToCartText":[1,"add-to-cart-text"],"waitingListText":[1,"waiting-list-text"],"addToWaitingList":[4,"add-to-waiting-list"],"isMini":[4,"is-mini"],"addedToCart":[4,"added-to-cart"],"endAddedToCart":[4,"end-added-to-cart"],"variations":[32],"selectedVariation":[32],"priceFormatted":[32],"salePriceFormatted":[32],"setPrice":[64]},[[0,"jump-card-ecommerce-option-connected","addOption"]]]]],["jump-filter",[[1,"jump-filter",{"direction":[1],"filterHeading":[1,"filter-heading"],"filterButtonLabel":[1,"filter-button-label"],"filterButtonIcon":[1,"filter-button-icon"],"mobileThreshold":[2,"mobile-threshold"],"filters":[8],"showCount":[4,"show-count"],"offCanvasOverlay":[4,"off-canvas-overlay"],"activeFilters":[32],"showMobileFilters":[32],"isMobile":[32],"offCanvasClasses":[32],"getFilters":[64]},[[0,"jump-filterchange","filterChangeHandler"],[9,"resize","handleResize"]],{"showMobileFilters":["watchHandler"]}]]],["jump-filtergroup",[[1,"jump-filtergroup",{"name":[1],"heading":[1],"otherLabel":[1,"other-label"],"lessLabel":[1,"less-label"],"maxElements":[2,"max-elements"],"variant":[1],"label":[32],"values":[32],"value":[32],"slotItems":[32],"inputs":[32],"showMore":[32],"getValues":[64],"getActiveAmount":[64],"getInputs":[64],"getName":[64]},null,{"showMore":["watchShowMore"]}]]],["jump-navbar",[[1,"jump-navbar",{"logo":[16],"navItems":[16],"secondaryNavItems":[16],"mobileThreshold":[2,"mobile-threshold"],"type":[1],"navPosition":[1,"nav-position"],"megaMenuAlignment":[1,"mega-menu-alignment"],"sticky":[4],"stickyThreshold":[2,"sticky-threshold"],"mobileLogo":[16],"user":[16],"isMobile":[32]},[[9,"resize","handleResize"]]]]],["jump-pagination",[[1,"jump-pagination",{"pagLabel":[1,"pag-label"],"last":[2],"showFirstAndLast":[4,"show-first-and-last"],"current":[32]},null,{"current":["watchcurrent"]}]]],["jump-pagination-table",[[0,"jump-pagination-table",{"elementsRanges":[1,"elements-ranges"],"elPerPage":[2,"el-per-page"],"pagLabel":[513,"pag-label"],"labelElementsPerPage":[513,"label-elements-per-page"],"total":[514],"first":[514],"last":[514],"showFirstAndLast":[516,"show-first-and-last"],"elementsRangesArray":[32]},null,{"elementsRanges":["elementsRangesChanged"],"elPerPage":["elPerPageChanged"]}]]],["jump-quantity",[[65,"jump-quantity",{"min":[2],"max":[2],"step":[2],"label":[1],"type":[1],"variant":[1],"showButtons":[4,"show-buttons"],"value":[2],"currentValue":[32],"getValue":[64],"reset":[64]},null,{"value":["onValueChange"]}]]],["jump-search-bar",[[1,"jump-search-bar",{"placeholder":[1],"identifier":[1],"debounceTime":[2,"debounce-time"],"
|
|
8
|
+
return bootstrapLazy([["jump-button_2",[[1,"jump-button",{"disabled":[4],"variant":[1],"outline":[4],"size":[1],"full":[4],"pill":[4],"text":[4],"onlyIcon":[4,"only-icon"],"href":[1],"target":[1],"type":[1],"name":[1],"value":[1],"ariaLabel":[1,"aria-label"],"class":[1],"buttonId":[1,"button-id"]}],[1,"jump-icon",{"class":[1],"library":[1],"name":[1],"category":[1],"size":[1],"label":[1],"src":[1]}]]],["jump-card-ecommerce",[[1,"jump-card-ecommerce",{"onlyIconButton":[4,"only-icon-button"],"hasBackground":[4,"has-background"],"badge":[1],"favorite":[1540],"hasFavorite":[4,"has-favorite"],"hasSlotForFavorite":[4,"has-slot-for-favorite"],"hasSlotAddToCart":[4,"has-slot-add-to-cart"],"link":[1],"img":[1],"imgAlt":[1,"img-alt"],"hoverImg":[1,"hover-img"],"hoverImgAlt":[1,"hover-img-alt"],"videoSrc":[1,"video-src"],"notificationUrl":[1,"notification-url"],"notificationText":[1,"notification-text"],"productName":[1,"product-name"],"subtitle":[1],"productId":[1,"product-id"],"price":[2],"salePrice":[2,"sale-price"],"currency":[1],"addToCartColor":[1,"add-to-cart-color"],"badgeColor":[1,"badge-color"],"outOfStock":[1540,"out-of-stock"],"outOfStockText":[1,"out-of-stock-text"],"addToCartText":[1,"add-to-cart-text"],"waitingListText":[1,"waiting-list-text"],"addToWaitingList":[4,"add-to-waiting-list"],"isMini":[4,"is-mini"],"addedToCart":[4,"added-to-cart"],"endAddedToCart":[4,"end-added-to-cart"],"variations":[32],"selectedVariation":[32],"priceFormatted":[32],"salePriceFormatted":[32],"setPrice":[64]},[[0,"jump-card-ecommerce-option-connected","addOption"]]]]],["jump-filter",[[1,"jump-filter",{"direction":[1],"filterHeading":[1,"filter-heading"],"filterButtonLabel":[1,"filter-button-label"],"filterButtonIcon":[1,"filter-button-icon"],"mobileThreshold":[2,"mobile-threshold"],"filters":[8],"showCount":[4,"show-count"],"offCanvasOverlay":[4,"off-canvas-overlay"],"activeFilters":[32],"showMobileFilters":[32],"isMobile":[32],"offCanvasClasses":[32],"getFilters":[64]},[[0,"jump-filterchange","filterChangeHandler"],[9,"resize","handleResize"]],{"showMobileFilters":["watchHandler"]}]]],["jump-filtergroup",[[1,"jump-filtergroup",{"name":[1],"heading":[1],"otherLabel":[1,"other-label"],"lessLabel":[1,"less-label"],"maxElements":[2,"max-elements"],"variant":[1],"label":[32],"values":[32],"value":[32],"slotItems":[32],"inputs":[32],"showMore":[32],"getValues":[64],"getActiveAmount":[64],"getInputs":[64],"getName":[64]},null,{"showMore":["watchShowMore"]}]]],["jump-navbar",[[1,"jump-navbar",{"logo":[16],"navItems":[16],"secondaryNavItems":[16],"mobileThreshold":[2,"mobile-threshold"],"type":[1],"navPosition":[1,"nav-position"],"megaMenuAlignment":[1,"mega-menu-alignment"],"sticky":[4],"stickyThreshold":[2,"sticky-threshold"],"mobileLogo":[16],"user":[16],"isMobile":[32]},[[9,"resize","handleResize"]]]]],["jump-pagination",[[1,"jump-pagination",{"pagLabel":[1,"pag-label"],"last":[2],"showFirstAndLast":[4,"show-first-and-last"],"current":[32]},null,{"current":["watchcurrent"]}]]],["jump-pagination-table",[[0,"jump-pagination-table",{"elementsRanges":[1,"elements-ranges"],"elPerPage":[2,"el-per-page"],"pagLabel":[513,"pag-label"],"labelElementsPerPage":[513,"label-elements-per-page"],"total":[514],"first":[514],"last":[514],"showFirstAndLast":[516,"show-first-and-last"],"elementsRangesArray":[32]},null,{"elementsRanges":["elementsRangesChanged"],"elPerPage":["elPerPageChanged"]}]]],["jump-quantity",[[65,"jump-quantity",{"min":[2],"max":[2],"step":[2],"label":[1],"type":[1],"variant":[1],"showButtons":[4,"show-buttons"],"value":[2],"currentValue":[32],"getValue":[64],"reset":[64]},null,{"value":["onValueChange"]}]]],["jump-search-bar",[[1,"jump-search-bar",{"placeholder":[1],"noResultText":[1,"no-result-text"],"loadingText":[1,"loading-text"],"resultsText":[1,"results-text"],"showAllResText":[1,"show-all-res-text"],"identifier":[1],"debounceTime":[2,"debounce-time"],"variant":[1],"withBtn":[4,"with-btn"],"recentsTitle":[1,"recents-title"],"recents":[16],"results":[16],"dropdown":[4],"linearIconOnly":[4,"linear-icon-only"],"dropdownPosition":[1,"dropdown-position"],"dropdownVisible":[32],"searchValue":[32],"resType":[32],"innerResults":[32],"totalResults":[32],"isExpanded":[32],"setResults":[64]},[[0,"jump-search-bar-dropdown-item-connected","addOption"]],{"searchValue":["searchValueChanged"]}]]],["jump-search-bar-mobile",[[1,"jump-search-bar-mobile",{"identifier":[1],"placeholder":[1],"recents":[16],"recentsTitle":[1,"recents-title"],"debounceTime":[2,"debounce-time"],"loadingText":[1,"loading-text"],"noResultText":[1,"no-result-text"],"results":[16],"resultsText":[1,"results-text"],"showAllResText":[1,"show-all-res-text"],"isOpen":[32],"innerResults":[32],"totalResults":[32],"resType":[32],"searchValue":[32],"setResults":[64]},[[0,"jump-search-bar-dropdown-item-connected","addOption"]],{"searchValue":["searchValueChanged"]}]]],["jump-accordion",[[1,"jump-accordion",{"variant":[1],"summary":[1],"disabled":[4],"open":[516],"icon":[1],"identifier":[1]},[[0,"sl-show","handleShow"]]]]],["jump-tab-item",[[1,"jump-tab-item",{"identifier":[1],"iconName":[1,"icon-name"],"iconPosition":[1,"icon-position"],"label":[1],"active":[4],"disabled":[4],"variant":[32]}]]],["jump-accordion-group",[[1,"jump-accordion-group",{"variant":[1],"groupIdentifier":[1,"group-identifier"]}]]],["jump-card",[[4,"jump-card",{"horizontal":[4],"dark":[4],"shadow":[4],"border":[4],"borderRadius":[4,"border-radius"],"topBorderContentRadius":[4,"top-border-content-radius"],"boxed":[4],"roundedMedia":[4,"rounded-media"],"imgSrc":[1,"img-src"],"imgAlt":[1,"img-alt"],"videoSrc":[1,"video-src"]}]]],["jump-card-ecommerce-option",[[1,"jump-card-ecommerce-option",{"code":[1],"imgUrl":[1,"img-url"],"label":[1],"sku":[1],"taxonomy":[1]}]]],["jump-filter-checkbox",[[1,"jump-filter-checkbox",{"value":[1],"label":[1],"checked":[516],"count":[8],"isChecked":[64]}]]],["jump-search-bar-dropdown-item",[[1,"jump-search-bar-dropdown-item",{"value":[1],"img":[1],"href":[1],"details":[32]}]]],["jump-tab",[[1,"jump-tab",{"disabled":[4],"alignment":[1],"fullBorder":[4,"full-border"],"tabGroupName":[1,"tab-group-name"],"variant":[1]},[[0,"jump-change-active-tab","changeActiveTabHandler"]]]]],["jump-tab-panel",[[1,"jump-tab-panel",{"identifier":[1],"active":[4]}]]],["jump-badge",[[1,"jump-badge",{"label":[1],"variant":[513],"dimension":[513],"soft":[516],"outline":[516]}]]]], options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { defineCustomElements };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,b as t}from"./p-
|
|
1
|
+
import{p as e,b as t}from"./p-21aa0095.js";export{s as setNonce}from"./p-21aa0095.js";import{g as a}from"./p-e1255160.js";var o=()=>{const t=import.meta.url;const a={};if(t!==""){a.resourcesUrl=new URL(".",t).href}return e(a)};o().then((async e=>{await a();return t([["p-3f6d50d5",[[1,"jump-button",{disabled:[4],variant:[1],outline:[4],size:[1],full:[4],pill:[4],text:[4],onlyIcon:[4,"only-icon"],href:[1],target:[1],type:[1],name:[1],value:[1],ariaLabel:[1,"aria-label"],class:[1],buttonId:[1,"button-id"]}],[1,"jump-icon",{class:[1],library:[1],name:[1],category:[1],size:[1],label:[1],src:[1]}]]],["p-1da9811d",[[1,"jump-card-ecommerce",{onlyIconButton:[4,"only-icon-button"],hasBackground:[4,"has-background"],badge:[1],favorite:[1540],hasFavorite:[4,"has-favorite"],hasSlotForFavorite:[4,"has-slot-for-favorite"],hasSlotAddToCart:[4,"has-slot-add-to-cart"],link:[1],img:[1],imgAlt:[1,"img-alt"],hoverImg:[1,"hover-img"],hoverImgAlt:[1,"hover-img-alt"],videoSrc:[1,"video-src"],notificationUrl:[1,"notification-url"],notificationText:[1,"notification-text"],productName:[1,"product-name"],subtitle:[1],productId:[1,"product-id"],price:[2],salePrice:[2,"sale-price"],currency:[1],addToCartColor:[1,"add-to-cart-color"],badgeColor:[1,"badge-color"],outOfStock:[1540,"out-of-stock"],outOfStockText:[1,"out-of-stock-text"],addToCartText:[1,"add-to-cart-text"],waitingListText:[1,"waiting-list-text"],addToWaitingList:[4,"add-to-waiting-list"],isMini:[4,"is-mini"],addedToCart:[4,"added-to-cart"],endAddedToCart:[4,"end-added-to-cart"],variations:[32],selectedVariation:[32],priceFormatted:[32],salePriceFormatted:[32],setPrice:[64]},[[0,"jump-card-ecommerce-option-connected","addOption"]]]]],["p-02e863db",[[1,"jump-filter",{direction:[1],filterHeading:[1,"filter-heading"],filterButtonLabel:[1,"filter-button-label"],filterButtonIcon:[1,"filter-button-icon"],mobileThreshold:[2,"mobile-threshold"],filters:[8],showCount:[4,"show-count"],offCanvasOverlay:[4,"off-canvas-overlay"],activeFilters:[32],showMobileFilters:[32],isMobile:[32],offCanvasClasses:[32],getFilters:[64]},[[0,"jump-filterchange","filterChangeHandler"],[9,"resize","handleResize"]],{showMobileFilters:["watchHandler"]}]]],["p-466e0ade",[[1,"jump-filtergroup",{name:[1],heading:[1],otherLabel:[1,"other-label"],lessLabel:[1,"less-label"],maxElements:[2,"max-elements"],variant:[1],label:[32],values:[32],value:[32],slotItems:[32],inputs:[32],showMore:[32],getValues:[64],getActiveAmount:[64],getInputs:[64],getName:[64]},null,{showMore:["watchShowMore"]}]]],["p-a826c477",[[1,"jump-navbar",{logo:[16],navItems:[16],secondaryNavItems:[16],mobileThreshold:[2,"mobile-threshold"],type:[1],navPosition:[1,"nav-position"],megaMenuAlignment:[1,"mega-menu-alignment"],sticky:[4],stickyThreshold:[2,"sticky-threshold"],mobileLogo:[16],user:[16],isMobile:[32]},[[9,"resize","handleResize"]]]]],["p-feb825e0",[[1,"jump-pagination",{pagLabel:[1,"pag-label"],last:[2],showFirstAndLast:[4,"show-first-and-last"],current:[32]},null,{current:["watchcurrent"]}]]],["p-bdafe87d",[[0,"jump-pagination-table",{elementsRanges:[1,"elements-ranges"],elPerPage:[2,"el-per-page"],pagLabel:[513,"pag-label"],labelElementsPerPage:[513,"label-elements-per-page"],total:[514],first:[514],last:[514],showFirstAndLast:[516,"show-first-and-last"],elementsRangesArray:[32]},null,{elementsRanges:["elementsRangesChanged"],elPerPage:["elPerPageChanged"]}]]],["p-506950ea",[[65,"jump-quantity",{min:[2],max:[2],step:[2],label:[1],type:[1],variant:[1],showButtons:[4,"show-buttons"],value:[2],currentValue:[32],getValue:[64],reset:[64]},null,{value:["onValueChange"]}]]],["p-1aa5fb8a",[[1,"jump-search-bar",{placeholder:[1],noResultText:[1,"no-result-text"],loadingText:[1,"loading-text"],resultsText:[1,"results-text"],showAllResText:[1,"show-all-res-text"],identifier:[1],debounceTime:[2,"debounce-time"],variant:[1],withBtn:[4,"with-btn"],recentsTitle:[1,"recents-title"],recents:[16],results:[16],dropdown:[4],linearIconOnly:[4,"linear-icon-only"],dropdownPosition:[1,"dropdown-position"],dropdownVisible:[32],searchValue:[32],resType:[32],innerResults:[32],totalResults:[32],isExpanded:[32],setResults:[64]},[[0,"jump-search-bar-dropdown-item-connected","addOption"]],{searchValue:["searchValueChanged"]}]]],["p-07633158",[[1,"jump-search-bar-mobile",{identifier:[1],placeholder:[1],recents:[16],recentsTitle:[1,"recents-title"],debounceTime:[2,"debounce-time"],loadingText:[1,"loading-text"],noResultText:[1,"no-result-text"],results:[16],resultsText:[1,"results-text"],showAllResText:[1,"show-all-res-text"],isOpen:[32],innerResults:[32],totalResults:[32],resType:[32],searchValue:[32],setResults:[64]},[[0,"jump-search-bar-dropdown-item-connected","addOption"]],{searchValue:["searchValueChanged"]}]]],["p-6acb16c6",[[1,"jump-accordion",{variant:[1],summary:[1],disabled:[4],open:[516],icon:[1],identifier:[1]},[[0,"sl-show","handleShow"]]]]],["p-f7c323d2",[[1,"jump-tab-item",{identifier:[1],iconName:[1,"icon-name"],iconPosition:[1,"icon-position"],label:[1],active:[4],disabled:[4],variant:[32]}]]],["p-b03c5b24",[[1,"jump-accordion-group",{variant:[1],groupIdentifier:[1,"group-identifier"]}]]],["p-6b1ab8c3",[[4,"jump-card",{horizontal:[4],dark:[4],shadow:[4],border:[4],borderRadius:[4,"border-radius"],topBorderContentRadius:[4,"top-border-content-radius"],boxed:[4],roundedMedia:[4,"rounded-media"],imgSrc:[1,"img-src"],imgAlt:[1,"img-alt"],videoSrc:[1,"video-src"]}]]],["p-a1c25113",[[1,"jump-card-ecommerce-option",{code:[1],imgUrl:[1,"img-url"],label:[1],sku:[1],taxonomy:[1]}]]],["p-6e7c80a3",[[1,"jump-filter-checkbox",{value:[1],label:[1],checked:[516],count:[8],isChecked:[64]}]]],["p-c77d216c",[[1,"jump-search-bar-dropdown-item",{value:[1],img:[1],href:[1],details:[32]}]]],["p-2e2bd8a9",[[1,"jump-tab",{disabled:[4],alignment:[1],fullBorder:[4,"full-border"],tabGroupName:[1,"tab-group-name"],variant:[1]},[[0,"jump-change-active-tab","changeActiveTabHandler"]]]]],["p-8f581228",[[1,"jump-tab-panel",{identifier:[1],active:[4]}]]],["p-6dc529fc",[[1,"jump-badge",{label:[1],variant:[513],dimension:[513],soft:[516],outline:[516]}]]]],e)}));
|
|
2
2
|
//# sourceMappingURL=jump-design-system.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","async","options","globalScripts","bootstrapLazy","disabled","variant","outline","size","full","pill","text","onlyIcon","target","type","name","value","ariaLabel","class","buttonId","library","category","label","src","onlyIconButton","hasBackground","badge","favorite","hasFavorite","hasSlotForFavorite","hasSlotAddToCart","link","img","imgAlt","hoverImg","hoverImgAlt","videoSrc","notificationUrl","notificationText","productName","subtitle","productId","price","salePrice","currency","addToCartColor","badgeColor","outOfStock","outOfStockText","addToCartText","waitingListText","addToWaitingList","isMini","addedToCart","endAddedToCart","variations","selectedVariation","priceFormatted","salePriceFormatted","setPrice","direction","filterHeading","filterButtonLabel","filterButtonIcon","mobileThreshold","filters","showCount","offCanvasOverlay","activeFilters","showMobileFilters","isMobile","offCanvasClasses","getFilters","heading","otherLabel","lessLabel","maxElements","values","slotItems","inputs","showMore","getValues","getActiveAmount","getInputs","getName","logo","navItems","secondaryNavItems","navPosition","megaMenuAlignment","sticky","stickyThreshold","mobileLogo","user","pagLabel","last","showFirstAndLast","current","elementsRanges","elPerPage","labelElementsPerPage","total","first","elementsRangesArray","min","max","step","showButtons","currentValue","getValue","reset","placeholder","identifier","debounceTime","
|
|
1
|
+
{"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","async","options","globalScripts","bootstrapLazy","disabled","variant","outline","size","full","pill","text","onlyIcon","target","type","name","value","ariaLabel","class","buttonId","library","category","label","src","onlyIconButton","hasBackground","badge","favorite","hasFavorite","hasSlotForFavorite","hasSlotAddToCart","link","img","imgAlt","hoverImg","hoverImgAlt","videoSrc","notificationUrl","notificationText","productName","subtitle","productId","price","salePrice","currency","addToCartColor","badgeColor","outOfStock","outOfStockText","addToCartText","waitingListText","addToWaitingList","isMini","addedToCart","endAddedToCart","variations","selectedVariation","priceFormatted","salePriceFormatted","setPrice","direction","filterHeading","filterButtonLabel","filterButtonIcon","mobileThreshold","filters","showCount","offCanvasOverlay","activeFilters","showMobileFilters","isMobile","offCanvasClasses","getFilters","heading","otherLabel","lessLabel","maxElements","values","slotItems","inputs","showMore","getValues","getActiveAmount","getInputs","getName","logo","navItems","secondaryNavItems","navPosition","megaMenuAlignment","sticky","stickyThreshold","mobileLogo","user","pagLabel","last","showFirstAndLast","current","elementsRanges","elPerPage","labelElementsPerPage","total","first","elementsRangesArray","min","max","step","showButtons","currentValue","getValue","reset","placeholder","noResultText","loadingText","resultsText","showAllResText","identifier","debounceTime","withBtn","recentsTitle","recents","results","dropdown","linearIconOnly","dropdownPosition","dropdownVisible","searchValue","resType","innerResults","totalResults","isExpanded","setResults","isOpen","summary","open","icon","iconName","iconPosition","active","groupIdentifier","horizontal","dark","shadow","border","borderRadius","topBorderContentRadius","boxed","roundedMedia","imgSrc","code","imgUrl","sku","taxonomy","checked","count","isChecked","details","alignment","fullBorder","tabGroupName","dimension","soft"],"sources":["node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.18.2 | MIT Licensed | https://stenciljs.com\n */\n\n// src/client/client-patch-browser.ts\nimport { BUILD, NAMESPACE } from \"@stencil/core/internal/app-data\";\nimport { consoleDevInfo, doc, H, promiseResolve } from \"@stencil/core\";\nvar patchBrowser = () => {\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo(\"Running in development mode.\");\n }\n if (BUILD.cloneNodeFix) {\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts ? Array.from(doc.querySelectorAll(\"script\")).find(\n (s) => new RegExp(`/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) || s.getAttribute(\"data-stencil-namespace\") === NAMESPACE\n ) : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})[\"data-opts\"] || {} : {};\n if (importMeta !== \"\") {\n opts.resourcesUrl = new URL(\".\", importMeta).href;\n }\n return promiseResolve(opts);\n};\nvar patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function(deep) {\n if (this.nodeName === \"TEMPLATE\") {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport {\n patchBrowser\n};\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(async (options) => {\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"0HAOA,IAAIA,EAAe,KAUjB,MAAMC,cAAyBC,IAC/B,MAAMC,EAAqE,GAC3E,GAAIF,IAAe,GAAI,CACrBE,EAAKC,aAAe,IAAIC,IAAI,IAAKJ,GAAYK,IACjD,CACE,OAAOC,EAAeJ,EAAK,EClB7BH,IAAeQ,MAAKC,MAAOC,UACnBC,IACN,OAAOC,EAAc,iCAA8B,CAAAC,SAAS,IAAAC,QAAA,IAAAC,QAAA,IAAAC,KAAA,IAAAC,KAAA,IAAAC,KAAA,IAAAC,KAAA,IAAAC,SAAA,gBAAAd,KAAA,IAAAe,OAAA,IAAAC,KAAA,IAAAC,KAAA,IAAAC,MAAA,IAAAC,UAAA,iBAAAC,MAAA,IAAAC,SAAA,kCAAAD,MAAA,IAAAE,QAAA,IAAAL,KAAA,I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AA,oBAAAC,OAAA,cAAAnH,OAAA,cAAAG,SAAA,oEAAAiH,KAAA,IAAAC,OAAA,cAAAhI,MAAA,IAAAiI,IAAA,IAAAC,SAAA,kDAAAxI,MAAA,IAAAM,MAAA,IAAAmI,QAAA,MAAAC,MAAA,IAAAC,UAAA,4DAAA3I,MAAA,IAAAgB,IAAA,IAAAlC,KAAA,IAAA8J,QAAA,uCAAAvJ,SAAA,IAAAwJ,UAAA,IAAAC,WAAA,kBAAAC,aAAA,qBAAAzJ,QAAA,oGAAA8G,WAAA,IAAAsB,OAAA,wCAAApH,MAAA,IAAAhB,QAAA,MAAA0J,UAAA,MAAAC,KAAA,MAAA1J,QAAA,WAAAL,EAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e,h as a,H as i}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as e,h as a,H as i}from"./p-21aa0095.js";const r=":host{--primary-standard:var(--secondary-hard, #435171);--jump-button-background-hover:red;--bg-drawer:var(--bg-drawer, #fff);--header-height:var(--header-height, 80px);--drawer-width:var(--drawer-width, 240px);--overlay-bg-color:var(--overlay-bg-color, rgba(0, 0, 0, 0.35))}:host h3{margin:0}.filtersDrawer__overlay{position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);background-color:var(--overlay-bg-color, rgba(0, 0, 0, 0.35));z-index:1;width:100vw;height:100vh;display:none;opacity:0;transition:opacity 0.3s ease-in-out}.filtersDrawer__overlay.filtersDrawer__overlay--active{display:block}.filtersDrawer__overlay.filtersDrawer__overlay--active{opacity:1}.filtersDrawer{position:fixed;display:flex;flex-direction:column;gap:2.5rem;left:-100vw;top:0;height:-webkit-fill-available;max-height:calc(100vh - var(--header-height));transition:0.3s all ease-in-out;background-color:var(--bg-drawer, #fff);padding:1rem;width:100%;max-width:var(--drawer-width);box-shadow:8px 0 15px 0 rgba(0, 0, 0, 0.1490196078);z-index:2;overflow:auto}.filtersDrawer[aria-hidden=false]{left:0;right:0;width:auto;transition:0.3s all ease-in-out}.filtersDrawer[aria-hidden=false] .filtersDrawer__close{position:fixed;top:calc(var(--header-height) + 1rem);left:calc(var(--drawer-width) - 2rem)}@media (min-width: 768px){.filtersDrawer{position:relative;left:0;height:auto;max-width:initial;max-height:initial;box-shadow:none}}@media (max-width: 767px){.filtersDrawer{top:var(--header-height)}}.filtersDrawer .filtersDrawer__header{display:flex;justify-content:flex-start;align-items:center;gap:0.5rem}";const t=r;const s=class{constructor(a){e(this,a);this.direction="vertical";this.filterHeading="Filtra per";this.filterButtonLabel="Filtri";this.filterButtonIcon="sliders";this.mobileThreshold=768;this.filters=undefined;this.showCount=false;this.offCanvasOverlay=false;this.activeFilters=0;this.showMobileFilters=false;this.isMobile=false;this.offCanvasClasses="filtersDrawer__overlay"}filterChangeHandler(e){this.filters=Object.assign(Object.assign({},this.filters),{[e.detail.name]:e.detail.values});console.log("Received the custom filterChange event: ",this.filters)}handleResize(){this.isMobile=window.innerWidth<this.mobileThreshold}watchHandler(e,a){var i,r,t,s;if(e!==a){if(e){(i=this.mobileToggle)===null||i===void 0?void 0:i.setAttribute("aria-expanded","true");(r=this.filtersDrawer)===null||r===void 0?void 0:r.setAttribute("aria-hidden","false");this.offCanvasClasses="filtersDrawer__overlay filtersDrawer__overlay--active"}else{(t=this.mobileToggle)===null||t===void 0?void 0:t.setAttribute("aria-expanded","false");(s=this.filtersDrawer)===null||s===void 0?void 0:s.setAttribute("aria-hidden","true");this.offCanvasClasses="filtersDrawer__overlay"}}}async getFilters(){return this.filters}componentDidLoad(){this.handleResize()}render(){return a(i,{key:"a6887d6f754cdba0e3ec854c0e553d4805c62c63",mobileFilters:this.showMobileFilters},this.isMobile&&a("jump-button",{key:"0194221f6ba4be2f547d8b6495f94c9d716e8be1",ref:e=>{this.mobileToggle=e},buttonId:this.filterButtonIcon,variant:"primary",outline:true,onClick:()=>this.showMobileFilters=!this.showMobileFilters},a("slot",{key:"5b60281b75d958d605c97b69be6576f177538740",name:"prefix"},this.filterButtonIcon&&a("jump-icon",{key:"c85beb03fd5132192bfa5f2d83c1e5cec64c4f4e",library:"fa",category:"regular",name:this.filterButtonIcon,size:"small"}),this.filterButtonLabel),a("slot",{key:"9bf612b73c9c0d69172ed6caff94e1f34541c539",name:"suffix"},this.activeFilters>0&&a("jump-badge",{key:"8c01c39288672210dc546ecb72fa7ef4d9c60bef",label:this.activeFilters.toString(),variant:"success",soft:true,dimension:"dot"},"1"))),this.offCanvasOverlay&&a("div",{key:"b588e7ab489541c92a04df32ad40a5c31238451a",class:this.offCanvasClasses,onClick:()=>this.showMobileFilters=false}),a("div",{key:"af8c4b52c7a87461e98a63d2040999b179c6c372",ref:e=>{this.filtersDrawer=e},class:"filtersDrawer","data-variant":this.direction},!this.isMobile&&a("div",{key:"fde6a476ff39c470b91030a2ea00c73392a7644d",class:"filtersDrawer__header"},a("jump-icon",{key:"4173961bcb0943d9de12c853968e503917bf6063",class:"small",name:this.filterButtonIcon}),a("h3",{key:"c7e1982a2805e714acab2d9ca5ba3a3c8b925e6e"},this.filterHeading)),this.isMobile&&a("jump-icon",{key:"95e0e48852c12f9474482410e0a4aec7dd348d1f",library:"lucide",name:"x",size:"small",label:"",class:"filtersDrawer__close",onClick:()=>this.showMobileFilters=false}),a("slot",{key:"0185bb00a4bd55193ff3cf9594f45a3d2da9f8d9"})))}static get watchers(){return{showMobileFilters:["watchHandler"]}}};s.style=t;export{s as jump_filter};
|
|
2
|
+
//# sourceMappingURL=p-02e863db.entry.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as e,c as t,h as i,H as r}from"./p-21aa0095.js";const s=":host{display:block;position:relative;--jump-search-bar-mobile-focus-color:var(--secondary-standard, #5E79BA);--jump-search-bar-mobile-background-color:var(--gray-ultralight, #FFFFFF);--jump-search-bar-mobile-border-color:var(--neutral-grey-secondary, #707070);font-family:var(--ff-primary)}:host .DropdownWrapper{background-color:var(--jump-search-bar-mobile-background-color);padding:16px;position:fixed;top:0;left:0;height:100vh;z-index:1000;}:host .DropdownWrapper .closeButton{cursor:pointer}:host .DropdownWrapper.open{display:block}:host .DropdownWrapper:not(.open){display:none}:host .DropdownWrapper .InputWrapper{background-color:white;width:100%;display:flex;gap:12px;border-bottom:1px solid var(--jump-search-bar-mobile-border-color);padding-bottom:4px}:host .DropdownWrapper .InputWrapper.focused{border-color:var(--jump-search-bar-mobile-focus-color) !important}:host .DropdownWrapper .InputWrapper.focused jump-icon{color:var(--jump-search-bar-mobile-focus-color) !important}:host .DropdownWrapper .InputWrapper.focused input{outline:none !important}:host .DropdownWrapper input{width:100%;border:none}:host .DropdownWrapper .Results{margin-top:12px}:host .DropdownWrapper .Results__Recents .title{color:#707070;font-size:14px;line-height:20px;padding:8px 0;font-weight:700;display:flex}:host .DropdownWrapper .Results__Results .totalRes{display:flex;justify-content:space-between}:host .DropdownWrapper .Results .ResWrapper{display:flex;flex-direction:column}:host .DropdownWrapper .Results .ResWrapper div{padding:8px 0;color:#707070;font-size:14px;display:flex;gap:12px;align-items:center}:host .DropdownWrapper .Results .ResWrapper div img{width:40px;height:48px;object-fit:cover;border-radius:3px}:host .DropdownWrapper .Results .ResWrapper div:hover{cursor:pointer}:host .DropdownWrapper .Results .ResWrapper .helperText{color:#CBCBCB}:host .DropdownWrapper .Results .ResWrapper .helperText svg{width:25px;height:25px}";const a=s;const o=class{constructor(i){e(this,i);this.resultClicked=t(this,"jump-search-bar-mobile-res-clicked",7);this.search=t(this,"jump-search-bar-mobile",7);this.showFullSearch=t(this,"jump-search-bar-mobile-show-all",7);this.handleFocus=()=>{const e=this.jumpSearchBar.closest(".InputWrapper");if(e){e.classList.add("focused")}};this.handleBlur=()=>{const e=this.jumpSearchBar.closest(".InputWrapper");if(e){e.classList.remove("focused")}};this.doSearch=()=>{if(this.jumpSearchBar){this.searchValue=this.jumpSearchBar.value;if(this.searchValue.length>=3){this.resType="results";this.innerResults=undefined;this.search.emit({search:this.searchValue})}}};this.isOpen=false;this.innerResults=[];this.totalResults=0;this.resType="recents";this.searchValue=undefined;this.identifier="search-bar-mobile";this.placeholder="Cerca...";this.recents=[];this.recentsTitle="Recenti";this.debounceTime=500;this.loadingText="Sto caricando...";this.noResultText="Nessun risultato corrispondente";this.results=[];this.resultsText="risultati";this.showAllResText="Mostra tutti i risultati"}searchValueChanged(e){if(e===""){this.innerResults=[...this.recents];this.results=[]}}addOption(e){let t=e.detail;this.recents=[...this.recents,Object.assign({},t)];this.innerResults=[...this.recents]}async setResults(e,t){this.results=e;this.innerResults=e;this.totalResults=t}openDropdown(){console.log("openDropdown");this.isOpen=true}closeDropdown(){this.isOpen=false}btnOrShowOtherClicked(){this.showFullSearch.emit({search:this.searchValue})}handleResClicked(e){this.resultClicked.emit({clicked:e})}debounce(e,t=this.debounceTime){let i;return(...r)=>{if(i){clearTimeout(i)}i=setTimeout((()=>{e.apply(null,r)}),t)}}render(){return i(r,{key:"f0535a70395bacabc372999896fc410c948bbed4",class:"JumpSearchBarMobile",ref:e=>this.componentRef=e},i("jump-icon",{key:"34431a69c6c68f48b5f92b03f5a876f485d66e34",name:"magnifying-glass",category:"light",onClick:()=>this.openDropdown()}),i("div",{key:"89575c7a7a1c0a601a589ac451242e591d907a43",class:"DropdownWrapper "+(this.isOpen?"open":"")},i("div",{key:"633c8543dc2eaf36b7fc61857d7d63aadf852cd8",class:"InputWrapper"},i("jump-icon",{key:"3c85be9683007c77faf9fe705c382b753dc8d6fb",class:"closeButton",category:"light",name:"arrow-left",onClick:()=>this.closeDropdown()}),i("input",{key:"29f98929f8ed596072f1fe31d5820e9bde0a5604",placeholder:this.placeholder,type:"search",id:this.identifier,class:"search-input",ref:e=>{this.jumpSearchBar=e},onInput:this.debounce(this.doSearch),onFocus:this.handleFocus,onBlur:this.handleBlur}),i("jump-icon",{key:"0e577fbdc3cfcc3d1628360487a828437459e01a",name:"magnifying-glass",category:"light"})),i("div",{key:"da670ec6f527cc0015b42eea74acc355d081e260",class:"Results"},this.resType=="recents"&&i("div",{key:"bb8eed320957070598e1fb57b3db5a7aa0cea4bd",class:"Results__Recents"},this.recents.length!=0&&i("span",{key:"748a65cfbb955af507acc30a86afa2366b31d99a",class:"title"},this.recentsTitle),i("div",{key:"e3fd0b306f42a56a85d1efc4898a4ead272ce15d",class:"ResWrapper"},this.innerResults.length>0&&this.innerResults.map((e=>i("div",{onClick:()=>this.handleResClicked(e)},i("jump-icon",{name:"magnifying-glass",category:"light"}),e["value"]))))),this.resType=="results"&&i("div",{key:"29f82834ad14a34547f9f856f045c7cccc9431e0",class:"Results__Results"},i("div",{key:"1c005fe5f1d9a88c151886eda65f372c52f4710f",class:"ResWrapper"},this.innerResults===undefined?i("div",{class:"helperText"},i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",width:"252",height:"252"},i("g",null,i("g",{transform:"rotate(0 50 50)"},i("rect",{fill:"#707070",height:"11",width:"4",ry:"1.87",rx:"1.87",y:"27.5",x:"48"},i("animate",{repeatCount:"indefinite",begin:"-0.9s",dur:"1s",keyTimes:"0;1",values:"1;0",attributeName:"opacity"}))),i("g",{transform:"rotate(36 50 50)"},i("rect",{fill:"#707070",height:"11",width:"4",ry:"1.87",rx:"1.87",y:"27.5",x:"48"},i("animate",{repeatCount:"indefinite",begin:"-0.8s",dur:"1s",keyTimes:"0;1",values:"1;0",attributeName:"opacity"}))),i("g",{transform:"rotate(72 50 50)"},i("rect",{fill:"#707070",height:"11",width:"4",ry:"1.87",rx:"1.87",y:"27.5",x:"48"},i("animate",{repeatCount:"indefinite",begin:"-0.7s",dur:"1s",keyTimes:"0;1",values:"1;0",attributeName:"opacity"}))),i("g",{transform:"rotate(108 50 50)"},i("rect",{fill:"#707070",height:"11",width:"4",ry:"1.87",rx:"1.87",y:"27.5",x:"48"},i("animate",{repeatCount:"indefinite",begin:"-0.6s",dur:"1s",keyTimes:"0;1",values:"1;0",attributeName:"opacity"}))),i("g",{transform:"rotate(144 50 50)"},i("rect",{fill:"#707070",height:"11",width:"4",ry:"1.87",rx:"1.87",y:"27.5",x:"48"},i("animate",{repeatCount:"indefinite",begin:"-0.5s",dur:"1s",keyTimes:"0;1",values:"1;0",attributeName:"opacity"}))),i("g",{transform:"rotate(180 50 50)"},i("rect",{fill:"#707070",height:"11",width:"4",ry:"1.87",rx:"1.87",y:"27.5",x:"48"},i("animate",{repeatCount:"indefinite",begin:"-0.4s",dur:"1s",keyTimes:"0;1",values:"1;0",attributeName:"opacity"}))),i("g",{transform:"rotate(216 50 50)"},i("rect",{fill:"#707070",height:"11",width:"4",ry:"1.87",rx:"1.87",y:"27.5",x:"48"},i("animate",{repeatCount:"indefinite",begin:"-0.3s",dur:"1s",keyTimes:"0;1",values:"1;0",attributeName:"opacity"}))),i("g",{transform:"rotate(252 50 50)"},i("rect",{fill:"#707070",height:"11",width:"4",ry:"1.87",rx:"1.87",y:"27.5",x:"48"},i("animate",{repeatCount:"indefinite",begin:"-0.2s",dur:"1s",keyTimes:"0;1",values:"1;0",attributeName:"opacity"}))),i("g",{transform:"rotate(288 50 50)"},i("rect",{fill:"#707070",height:"11",width:"4",ry:"1.87",rx:"1.87",y:"27.5",x:"48"},i("animate",{repeatCount:"indefinite",begin:"-0.1s",dur:"1s",keyTimes:"0;1",values:"1;0",attributeName:"opacity"}))),i("g",{transform:"rotate(324 50 50)"},i("rect",{fill:"#707070",height:"11",width:"4",ry:"1.87",rx:"1.87",y:"27.5",x:"48"},i("animate",{repeatCount:"indefinite",begin:"0s",dur:"1s",keyTimes:"0;1",values:"1;0",attributeName:"opacity"}))),i("g",null))),this.loadingText):this.innerResults.length>0?this.innerResults.map((e=>i("div",{onClick:()=>this.handleResClicked(e),key:e["id"]},e["img"]&&i("img",{src:e["img"],alt:"result"}),e["value"]))):i("div",{class:"helperText"},this.noResultText),this.innerResults&&this.innerResults.length>0&&i("div",{key:"084038e82063eb93fea6ea10d0a405fb7f1e04a8",class:"totalRes"},i("jump-button",{key:"f09ae73865768a64e75fcc2b887c4631e3271697",variant:"secondary",size:"small",text:true,onClick:()=>this.btnOrShowOtherClicked(),target:"_blank"}," ",this.showAllResText," "),this.totalResults&&i("div",{key:"66c370a16342ebfe68e3032299bf3da32ed53acd"},this.totalResults," ",this.resultsText)))))))}static get watchers(){return{searchValue:["searchValueChanged"]}}};o.style=a;export{o as jump_search_bar_mobile};
|
|
2
|
+
//# sourceMappingURL=p-07633158.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["jumpSearchBarMobileCss","JumpSearchBarMobileStyle0","JumpSearchBarMobile","this","handleFocus","searchBarContainer","jumpSearchBar","closest","classList","add","handleBlur","remove","doSearch","searchValue","value","length","resType","innerResults","undefined","search","emit","searchValueChanged","newValue","recents","results","addOption","e","props","detail","Object","assign","setResults","tot","totalResults","openDropdown","console","log","isOpen","closeDropdown","btnOrShowOtherClicked","showFullSearch","handleResClicked","item","resultClicked","clicked","debounce","fn","delay","debounceTime","timeoutId","args","clearTimeout","setTimeout","apply","render","h","Host","key","class","ref","el","componentRef","name","category","onClick","placeholder","type","id","identifier","onInput","onFocus","onBlur","recentsTitle","map","xmlns","viewBox","preserveAspectRatio","width","height","transform","fill","ry","rx","y","x","repeatCount","begin","dur","keyTimes","values","attributeName","loadingText","src","alt","noResultText","variant","size","text","target","showAllResText","resultsText"],"sources":["src/components/jump-search-bar-mobile/jump-search-bar-mobile.scss?tag=jump-search-bar-mobile&encapsulation=shadow","src/components/jump-search-bar-mobile/jump-search-bar-mobile.tsx"],"sourcesContent":[":host {\n display: block;\n position: relative;\n\n --jump-search-bar-mobile-focus-color: var(--secondary-standard, #5E79BA);\n --jump-search-bar-mobile-background-color: var(--gray-ultralight, #FFFFFF);\n --jump-search-bar-mobile-border-color: var(--neutral-grey-secondary, #707070);\n\n font-family: var(--ff-primary);\n\n .DropdownWrapper {\n background-color: var(--jump-search-bar-mobile-background-color);\n padding: 16px;\n position: fixed;\n top: 0;\n left: 0;\n //width: 100vw; tengo commentato solo per i test\n height: 100vh;\n z-index: 1000;\n\n .closeButton {\n cursor: pointer;\n }\n\n &.open {\n display: block;\n }\n\n &:not(.open){\n display: none;\n }\n\n\n /* Stile parte interna del dropdown*/\n .InputWrapper {\n background-color: white;\n width: 100%;\n display: flex;\n gap: 12px;\n border-bottom: 1px solid var(--jump-search-bar-mobile-border-color);\n padding-bottom: 4px;\n\n &.focused {\n border-color: var(--jump-search-bar-mobile-focus-color) !important;\n\n jump-icon{\n color: var(--jump-search-bar-mobile-focus-color) !important;\n }\n\n input {\n outline: none !important;\n }\n }\n }\n\n input {\n width: 100%;\n border: none;\n }\n\n .Results {\n margin-top: 12px;\n\n &__Recents {\n .title {\n color: #707070;\n font-size: 14px;\n line-height: 20px;\n padding: 8px 0;\n font-weight: 700;\n display: flex;\n }\n }\n\n &__Results {\n .totalRes {\n display: flex;\n justify-content: space-between;\n }\n }\n\n .ResWrapper {\n display: flex;\n flex-direction: column;\n\n div {\n padding: 8px 0;\n color: #707070;\n font-size: 14px;\n display: flex;\n gap: 12px;\n align-items: center;\n\n img {\n width: 40px;\n height: 48px;\n object-fit: cover;\n border-radius: 3px;\n }\n }\n\n div:hover {\n cursor: pointer;\n }\n\n .helperText {\n color: #CBCBCB;\n\n svg {\n width: 25px;\n height: 25px;\n }\n }\n }\n }\n\n \n }\n}\n","import { Component, Watch, Method, Event, EventEmitter, State, Listen, Host, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'jump-search-bar-mobile',\n styleUrl: 'jump-search-bar-mobile.scss',\n shadow: true,\n})\nexport class JumpSearchBarMobile {\n\n /* ---------------------- @OWN PROPERTIES ------------------------- */\n jumpSearchBar: HTMLInputElement;\n componentRef: HTMLElement;\n\n /* ---------------------- @STATE ------------------------- */\n @State() isOpen: boolean = false;\n @State() innerResults: Array<object> = [];\n @State() totalResults: number = 0;\n @State() resType: string = 'recents';\n \n @State() searchValue: string = undefined;\n\n @Watch('searchValue')\n searchValueChanged(newValue: string) {\n if (newValue === '') {\n // Create a new array reference to trigger re-render\n this.innerResults = [...this.recents];\n this.results = [];\n }\n }\n\n /* ---------------------- @PROPERTIES ------------------------- */\n @Prop() identifier: string = 'search-bar-mobile'; // Identificatore della searchbar\n @Prop() placeholder: string = 'Cerca...'; //Il testo del placeholder dell\\'input della searchbar\n @Prop() recents: Array<object> = []; // Serve per il dropdown quando si vedono le ricerche recenti\n @Prop() recentsTitle: string = 'Recenti'; // Serve per il titolo del dropwdown quando si vedono le ricerche recenti\n @Prop() debounceTime: number = 500; // 'Il tempo di attesa per l\\'invio della ricerca in caso di ricerca automatica. In millisecondi.\n @Prop() loadingText: string = 'Sto caricando...'; // Il testo mostrato durante il caricamento dei risultati.\n @Prop() noResultText: string = 'Nessun risultato corrispondente'; // Il testo da mostrare in caso nessun risultato sia stato recuperato.\n @Prop() results: Array<object> = []; // Serve per il dropdown quando si vedono i risultati della ricerca\n @Prop() resultsText: string = 'risultati'; // Il testo mostrato accanto al numero di risultati totali.\n @Prop() showAllResText: string = 'Mostra tutti i risultati'; // La label da mostrare per il pulsante che mostra tutti i risultati.\n\n /* ---------------------- @EVENTS ------------------------- */\n\n /* ---------------------- @LIFECYCLE ------------------------- */\n\n /* -------------------- @LISTEN ------------------------------- */\n @Listen(\"jump-search-bar-dropdown-item-connected\")\n addOption(e) {\n let props = e.detail; // es {code: 'sku1', imageUrl: 'https://google.com/'}\n\n // Aggiungi l'elemento solo a `recents`\n this.recents = [...this.recents, { ...props }];\n\n // Aggiorna `innerResults` basandoti solo su `recents`\n this.innerResults = [...this.recents];\n }\n\n\n /* \n * Evento da ascoltare per recuperare il dato cliccato\n * Emette un oggetto contenente tutti i dati relativi al risultato cliccato.\n */\n @Event({ eventName: 'jump-search-bar-mobile-res-clicked' }) resultClicked: EventEmitter; \n\n /**\n * Evento emesso quando l'utente effettua una ricerca \n * Emette un oggetto contenenente il valore della ricerca alla chiave 'search'\n * */\n @Event({ eventName: 'jump-search-bar-mobile' }) search: EventEmitter;\n\n /** \n * Evento emesso quando l'utente clicca sul pulsante (se presente) o nel pulsante del dropdown per vedere tutti i risultati \n * Emette un oggetto contenenente il valore della ricerca alla chiave 'search'\n*/\n @Event({ eventName: 'jump-search-bar-mobile-show-all' }) showFullSearch: EventEmitter;\n\n /* -------------------- @METHOD ------------------------------- */\n\n /** Imposta i risultati della ricerca all'interno della dropdown */\n @Method()\n async setResults(results, tot?: number) {\n this.results = results;\n this.innerResults = results;\n this.totalResults = tot;\n }\n\n /* -------------------- LOCAL METHODS ------------------------- */\n openDropdown(){\n console.log('openDropdown');\n this.isOpen = true;\n } \n\n closeDropdown(){\n this.isOpen = false;\n }\n\n /** Emette l'evento quando l'utente clicca sul pulsante (se presente) o nel pulsante del dropdown per vedere tutti i risultati */\n btnOrShowOtherClicked() {\n this.showFullSearch.emit({ search: this.searchValue });\n }\n\n // Gestisce l'evento focus sull'input\n handleFocus = () => {\n const searchBarContainer = this.jumpSearchBar.closest('.InputWrapper');\n if (searchBarContainer) {\n searchBarContainer.classList.add('focused');\n }\n };\n\n // Gestisce l'evento blur sull'input\n handleBlur = () => {\n const searchBarContainer = this.jumpSearchBar.closest('.InputWrapper');\n if (searchBarContainer) {\n searchBarContainer.classList.remove('focused');\n }\n };\n\n /** Emette l'evento di click su un risultato, mandandone tutti i dati */\n handleResClicked(item) {\n this.resultClicked.emit({ clicked: item });\n } \n\n doSearch = () => {\n if (this.jumpSearchBar) {\n this.searchValue = this.jumpSearchBar.value;\n\n // Iniziare la ricerca solamente se ci sono almeno tre caratteri \n if (this.searchValue.length >= 3) {\n this.resType = 'results';\n\n this.innerResults = undefined;\n\n this.search.emit({ search: this.searchValue });\n\n \n }\n }\n };\n\n debounce(fn, delay = this.debounceTime) {\n let timeoutId;\n\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n fn.apply(null, args);\n }, delay);\n };\n };\n\n /* --------------------- RENDER ------------------------------- */\n\n render() {\n return (\n <Host class=\"JumpSearchBarMobile\" ref={(el) => (this.componentRef = el as HTMLElement)}>\n <jump-icon\n name=\"magnifying-glass\"\n category=\"light\"\n onClick={() => this.openDropdown()}\n ></jump-icon>\n <div class={\"DropdownWrapper \" + (this.isOpen ? 'open' : '')}>\n <div class=\"InputWrapper\">\n <jump-icon class=\"closeButton\" category=\"light\" name=\"arrow-left\" onClick={() => this.closeDropdown()}></jump-icon>\n <input\n placeholder={this.placeholder}\n type=\"search\"\n id={this.identifier}\n class=\"search-input\"\n ref={(el) => { this.jumpSearchBar = el as HTMLInputElement }}\n onInput={this.debounce(this.doSearch)}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n />\n <jump-icon name=\"magnifying-glass\" category=\"light\"></jump-icon>\n </div>\n <div class=\"Results\">\n {(this.resType == 'recents') &&\n <div class=\"Results__Recents\">\n {this.recents.length != 0 && <span class=\"title\">{this.recentsTitle}</span>}\n <div class=\"ResWrapper\">\n {this.innerResults.length > 0 && this.innerResults.map((item) => (\n <div onClick={() => this.handleResClicked(item)}>\n <jump-icon name=\"magnifying-glass\" category=\"light\"></jump-icon>\n {item['value']}\n </div>\n ))}\n </div>\n </div>\n }\n {this.resType == 'results' &&\n <div class=\"Results__Results\">\n <div class=\"ResWrapper\">\n {this.innerResults === undefined ?\n <div class=\"helperText\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMidYMid\" width=\"252\" height=\"252\" ><g><g transform=\"rotate(0 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.9s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(36 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.8s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(72 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.7s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(108 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.6s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(144 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.5s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(180 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.4s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(216 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.3s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(252 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.2s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(288 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.1s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(324 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"0s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g></g></g></svg>{this.loadingText}</div>\n :\n (this.innerResults.length > 0 ?\n this.innerResults.map((item) => (\n <div onClick={() => this.handleResClicked(item)} key={item['id']}>\n {item['img'] && <img src={item['img']} alt=\"result\" />}\n {item['value']}\n </div>\n ))\n :\n <div class=\"helperText\">{this.noResultText}</div>\n )\n }\n {(this.innerResults && this.innerResults.length > 0) &&\n <div class=\"totalRes\">\n <jump-button variant=\"secondary\" size=\"small\" text onClick={() => this.btnOrShowOtherClicked()} target=\"_blank\"> {this.showAllResText} </jump-button>\n {this.totalResults && <div>{this.totalResults} {this.resultsText}</div>}\n </div>\n }\n </div>\n </div>\n }\n\n </div>\n </div>\n </Host>\n );\n }\n\n}\n"],"mappings":"yDAAA,MAAMA,EAAyB,s5DAC/B,MAAAC,EAAeD,E,MCMFE,EAAmB,M,0MAgG9BC,KAAAC,YAAc,KACZ,MAAMC,EAAqBF,KAAKG,cAAcC,QAAQ,iBACtD,GAAIF,EAAoB,CACtBA,EAAmBG,UAAUC,IAAI,U,GAKrCN,KAAAO,WAAa,KACX,MAAML,EAAqBF,KAAKG,cAAcC,QAAQ,iBACtD,GAAIF,EAAoB,CACtBA,EAAmBG,UAAUG,OAAO,U,GASxCR,KAAAS,SAAW,KAC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M7D,KAAKsC,iBAAiBC,GAAOe,IAAKf,EAAK,OACxDA,EAAK,QAAUa,EAAA,OAAKqC,IAAKlD,EAAK,OAAQmD,IAAI,WAC1CnD,EAAK,YAIVa,EAAA,OAAKG,MAAM,cAAcvD,KAAK2F,cAGhC3F,KAAKc,cAAgBd,KAAKc,aAAaF,OAAS,GAChDwC,EAAA,OAAAE,IAAA,2CAAKC,MAAM,YACTH,EAAA,eAAAE,IAAA,2CAAasC,QAAQ,YAAYC,KAAK,QAAQC,KAAI,KAACjC,QAAS,IAAM7D,KAAKoC,wBAAyB2D,OAAO,UAAQ,IAAG/F,KAAKgG,eAAc,KACpIhG,KAAK8B,cAAgBsB,EAAA,OAAAE,IAAA,4CAAMtD,KAAK8B,aAAY,IAAG9B,KAAKiG,kB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as t,c as r,h as e,H as i}from"./p-21aa0095.js";const s=":host{display:block;--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);--jump-search-bar-dropdown-border-color:var(--neutral-grey-disabled, #CBCBCB);font-family:var(--ff-primary);}:host jump-button{--jump-button-border-radius:0px 3px 3px 0px}:host .SearchBar{position:relative}:host .SearchBar.focused .InputWrapper{border-color:var(--jump-search-bar-focus-color) !important}:host .SearchBar.focused .InputWrapper jump-icon{color:var(--jump-search-bar-focus-color) !important}:host .SearchBar.focused .InputWrapper input{outline:none !important}:host .SearchBar:not(.iconOnly){display:flex;width:100%;}:host .SearchBar:not(.iconOnly) .InputWrapper{width:100%;display:flex}:host .SearchBar:not(.iconOnly) input{width:100%;border:none}:host .SearchBar:not(.iconOnly).outline .InputWrapper{border:1px solid var(--jump-search-bar-border-color);border-radius:3px;padding:12px;gap:8px}:host .SearchBar:not(.iconOnly).outline .InputWrapper jump-icon{color:var(--jump-search-bar-border-color)}:host .SearchBar:not(.iconOnly).outline.withBtn .InputWrapper{border-radius:3px 0px 0px 3px}:host .SearchBar:not(.iconOnly).filled .InputWrapper{border:1px solid var(--jump-search-bar-bg-color);background-color:var(--jump-search-bar-bg-color);border-radius:3px;padding:12px;gap:8px}:host .SearchBar:not(.iconOnly).filled .InputWrapper input{background-color:var(--jump-search-bar-bg-color)}:host .SearchBar:not(.iconOnly).filled .InputWrapper jump-icon{color:var(--jump-search-bar-border-color)}:host .SearchBar:not(.iconOnly).filled.focused.withBtn .InputWrapper{border-radius:3px 0px 0px 3px !important}:host .SearchBar:not(.iconOnly).linear .InputWrapper{border-bottom:1px solid var(--jump-search-bar-border-color);padding-bottom:4px}:host .SearchBar:not(.iconOnly).linear .InputWrapper jump-icon{padding-right:6px}:host .Dropdown{margin-top:10px;border-radius:3px;border:1px solid var(--jump-search-bar-dropdown-border-color);padding:4px 16px;background-color:white}:host .Dropdown.dropAbsolute{position:absolute;box-sizing:border-box;position:absolute;left:0;width:100%}:host .Dropdown.dropRelative{position:relative}:host .Dropdown__Recents .title{color:#707070;font-size:14px;line-height:20px;padding:8px 0;font-weight:700;display:flex}:host .Dropdown__Results .totalRes{display:flex;justify-content:space-between}:host .Dropdown .ResWrapper{display:flex;flex-direction:column}:host .Dropdown .ResWrapper div{padding:8px 0;color:#707070;font-size:14px;display:flex;gap:12px;align-items:center}:host .Dropdown .ResWrapper div img{width:40px;height:48px;object-fit:cover;border-radius:3px}:host .Dropdown .ResWrapper div:hover{cursor:pointer}:host .Dropdown .ResWrapper .helperText{color:#CBCBCB}:host .Dropdown .ResWrapper .helperText svg{width:25px;height:25px}:host .SearchBar.iconOnly.linear{display:flex;width:100%}:host .SearchBar.iconOnly.linear .InputWrapper{width:100%;display:flex;align-items:center;transition:border-bottom 0.3s ease;border-bottom:1px solid transparent;padding-bottom:4px;overflow:hidden;}:host .SearchBar.iconOnly.linear .InputWrapper jump-icon{padding-right:6px;}:host .SearchBar.iconOnly.linear .InputWrapper input{width:0;border:none;transform:translateX(-100%);transition:width 0.3s ease, transform 0.3s ease;animation:none;}:host .SearchBar.iconOnly.linear.expanded .InputWrapper{border-bottom:1px solid var(--jump-search-bar-border-color);transition:border-bottom 0.3s ease;}:host .SearchBar.iconOnly.linear.expanded .InputWrapper input{width:100%;transform:translateX(0);animation:slide-right 0.3s ease forwards;}@keyframes slide-right{from{transform:translateX(-100%);opacity:0}to{transform:translateX(0);opacity:1}}@keyframes border-slide-right{from{border-bottom-width:0}to{border-bottom-width:1px}}";const a=s;const o=class{constructor(e){t(this,e);this.searchbarExpanded=r(this,"jump-search-bar-expanded",7);this.search=r(this,"jump-search-bar",7);this.showFullSearch=r(this,"jump-search-bar-show-all",7);this.resultClicked=r(this,"jump-search-bar-res-clicked",7);this.handleFocus=()=>{const t=this.jumpSearchBar.closest(".SearchBar");if(t){t.classList.add("focused")}};this.handleBlur=()=>{const t=this.jumpSearchBar.closest(".SearchBar");if(t){t.classList.remove("focused")}};this.doSearch=()=>{if(this.jumpSearchBar){this.searchValue=this.jumpSearchBar.value;if(this.searchValue.length>=3){this.resType="results";this.innerResults=undefined;this.search.emit({search:this.searchValue});if(!this.dropdownVisible){this.dropdownVisible=true}}else if(this.searchValue.length==0){this.dropdownVisible=false}}};this.dropdownVisible=false;this.searchValue=undefined;this.resType="recents";this.innerResults=[];this.totalResults=0;this.isExpanded=false;this.placeholder="Cerca...";this.noResultText="Nessun risultato corrispondente";this.loadingText="Sto caricando...";this.resultsText="risultati";this.showAllResText="Mostra tutti i risultati";this.identifier="search-bar";this.debounceTime=500;this.variant="outline";this.withBtn=false;this.recentsTitle="Recenti";this.recents=[];this.results=[];this.dropdown=false;this.linearIconOnly=false;this.dropdownPosition="relative"}searchValueChanged(t){if(t===""){this.innerResults=[...this.recents];this.results=[]}}componentDidLoad(){document.addEventListener("click",this.handleOutsideClick.bind(this))}disconnectedCallback(){document.removeEventListener("click",this.handleOutsideClick.bind(this))}addOption(t){let r=t.detail;this.recents=[...this.recents,Object.assign({},r)];this.innerResults=[...this.recents]}async setResults(t,r){this.results=t;this.innerResults=t;this.totalResults=r}handleOutsideClick(t){if(this.componentRef&&!this.componentRef.contains(t.target)){this.dropdownVisible=false}}debounce(t,r=this.debounceTime){let e;return(...i)=>{if(e){clearTimeout(e)}e=setTimeout((()=>{t.apply(null,i)}),r)}}openDropdown(){this.resType="recents";this.dropdownVisible=true}handleResClicked(t){this.resultClicked.emit({clicked:t})}btnOrShowOtherClicked(){this.showFullSearch.emit({search:this.searchValue})}expandSearchBar(){this.isExpanded=true;this.searchbarExpanded.emit()}renderLinearIconOnly(){return e(i,{class:"JumpSearchBar ",ref:t=>this.componentRef=t},e("div",{class:"SearchBar iconOnly "+this.variant+(this.isExpanded?" expanded":"")},e("div",{class:"InputWrapper",onClick:this.isExpanded&&this.dropdown&&this.recents.length>0?()=>this.openDropdown():null},e("jump-icon",{name:"magnifying-glass",category:"light",onClick:()=>this.expandSearchBar()}),this.isExpanded&&e("input",{placeholder:this.placeholder,type:"search",id:this.identifier,class:"search-input",ref:t=>{this.jumpSearchBar=t},onInput:this.debounce(this.doSearch),onFocus:this.handleFocus,onBlur:this.handleBlur}))),this.dropdown&&this.dropdownVisible&&this.renderDropdown())}renderDefault(){return e(i,{class:"JumpSearchBar",ref:t=>this.componentRef=t},e("div",{class:"SearchBar "+this.variant+" "+(this.withBtn?"withBtn":"")+(this.isExpanded?" expanded":"")},e("div",{class:"InputWrapper",onClick:this.dropdown&&this.recents.length>0?()=>this.openDropdown():null},!this.withBtn&&e("jump-icon",{name:"magnifying-glass",category:"light"}),e("input",{placeholder:this.placeholder,type:"search",id:this.identifier,class:"search-input",ref:t=>{this.jumpSearchBar=t},onInput:this.debounce(this.doSearch),onFocus:this.handleFocus,onBlur:this.handleBlur})),this.withBtn&&!this.linearIconOnly&&e("jump-button",{variant:"secondary",size:"medium",name:"scopri",value:"value","aria-label":"Scopri di più",id:"button",onlyIcon:true,onClick:()=>this.btnOrShowOtherClicked()},e("jump-icon",{slot:"suffix",name:"magnifying-glass"}))),this.dropdown&&this.dropdownVisible&&this.renderDropdown())}renderDropdown(){console.log("POSITION",this.dropdownPosition);return e("div",{class:"Dropdown "+(this.dropdownPosition=="absolute"?"dropAbsolute":"dropRelative")},this.resType=="recents"&&e("div",{class:"Dropdown__Recents"},e("span",{class:"title"},this.recentsTitle),e("div",{class:"ResWrapper"},this.innerResults.length>0&&this.innerResults.map((t=>e("div",{onClick:()=>this.handleResClicked(t)},e("jump-icon",{name:"magnifying-glass",category:"light"}),t["value"]))))),this.resType=="results"&&e("div",{class:"Dropdown__Results"},e("div",{class:"ResWrapper"},this.innerResults===undefined?e("div",{class:"helperText"},e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",width:"252",height:"252"},e("g",null,e("g",{transform:"rotate(0 50 50)"},e("rect",{fill:"#707070",height:"11",width:"4",ry:"1.87",rx:"1.87",y:"27.5",x:"48"},e("animate",{repeatCount:"indefinite",begin:"-0.9s",dur:"1s",keyTimes:"0;1",values:"1;0",attributeName:"opacity"}))),e("g",{transform:"rotate(36 50 50)"},e("rect",{fill:"#707070",height:"11",width:"4",ry:"1.87",rx:"1.87",y:"27.5",x:"48"},e("animate",{repeatCount:"indefinite",begin:"-0.8s",dur:"1s",keyTimes:"0;1",values:"1;0",attributeName:"opacity"}))),e("g",{transform:"rotate(72 50 50)"},e("rect",{fill:"#707070",height:"11",width:"4",ry:"1.87",rx:"1.87",y:"27.5",x:"48"},e("animate",{repeatCount:"indefinite",begin:"-0.7s",dur:"1s",keyTimes:"0;1",values:"1;0",attributeName:"opacity"}))),e("g",{transform:"rotate(108 50 50)"},e("rect",{fill:"#707070",height:"11",width:"4",ry:"1.87",rx:"1.87",y:"27.5",x:"48"},e("animate",{repeatCount:"indefinite",begin:"-0.6s",dur:"1s",keyTimes:"0;1",values:"1;0",attributeName:"opacity"}))),e("g",{transform:"rotate(144 50 50)"},e("rect",{fill:"#707070",height:"11",width:"4",ry:"1.87",rx:"1.87",y:"27.5",x:"48"},e("animate",{repeatCount:"indefinite",begin:"-0.5s",dur:"1s",keyTimes:"0;1",values:"1;0",attributeName:"opacity"}))),e("g",{transform:"rotate(180 50 50)"},e("rect",{fill:"#707070",height:"11",width:"4",ry:"1.87",rx:"1.87",y:"27.5",x:"48"},e("animate",{repeatCount:"indefinite",begin:"-0.4s",dur:"1s",keyTimes:"0;1",values:"1;0",attributeName:"opacity"}))),e("g",{transform:"rotate(216 50 50)"},e("rect",{fill:"#707070",height:"11",width:"4",ry:"1.87",rx:"1.87",y:"27.5",x:"48"},e("animate",{repeatCount:"indefinite",begin:"-0.3s",dur:"1s",keyTimes:"0;1",values:"1;0",attributeName:"opacity"}))),e("g",{transform:"rotate(252 50 50)"},e("rect",{fill:"#707070",height:"11",width:"4",ry:"1.87",rx:"1.87",y:"27.5",x:"48"},e("animate",{repeatCount:"indefinite",begin:"-0.2s",dur:"1s",keyTimes:"0;1",values:"1;0",attributeName:"opacity"}))),e("g",{transform:"rotate(288 50 50)"},e("rect",{fill:"#707070",height:"11",width:"4",ry:"1.87",rx:"1.87",y:"27.5",x:"48"},e("animate",{repeatCount:"indefinite",begin:"-0.1s",dur:"1s",keyTimes:"0;1",values:"1;0",attributeName:"opacity"}))),e("g",{transform:"rotate(324 50 50)"},e("rect",{fill:"#707070",height:"11",width:"4",ry:"1.87",rx:"1.87",y:"27.5",x:"48"},e("animate",{repeatCount:"indefinite",begin:"0s",dur:"1s",keyTimes:"0;1",values:"1;0",attributeName:"opacity"}))),e("g",null))),this.loadingText):this.innerResults.length>0?this.innerResults.map((t=>e("div",{onClick:()=>this.handleResClicked(t),key:t["id"]},t["img"]&&e("img",{src:t["img"],alt:"result"}),t["value"]))):e("div",{class:"helperText"},this.noResultText),this.innerResults&&this.innerResults.length>0&&e("div",{class:"totalRes"},e("jump-button",{variant:"secondary",size:"small",text:true,onClick:()=>this.btnOrShowOtherClicked(),target:"_blank"}," ",this.showAllResText," "),this.totalResults&&e("div",null,this.totalResults," ",this.resultsText)))))}render(){if(this.variant==="linear"&&this.linearIconOnly){return this.renderLinearIconOnly()}else{return this.renderDefault()}}static get watchers(){return{searchValue:["searchValueChanged"]}}};o.style=a;export{o as jump_search_bar};
|
|
2
|
+
//# sourceMappingURL=p-1aa5fb8a.entry.js.map
|