@jumpgroup/jump-design-system 0.3.34 → 0.3.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/jump-design-system.cjs.js +1 -1
- package/dist/cjs/jump-search-bar.cjs.entry.js +60 -0
- package/dist/cjs/jump-search-bar.cjs.entry.js.map +1 -0
- package/dist/cjs/jump-tab-item.cjs.entry.js +2 -2
- package/dist/cjs/jump-tab-panel.cjs.entry.js +1 -1
- package/dist/cjs/jump-tab.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/jump-search-bar/jump-search-bar.css +69 -0
- package/dist/collection/components/jump-search-bar/jump-search-bar.js +170 -0
- package/dist/collection/components/jump-search-bar/jump-search-bar.js.map +1 -0
- package/dist/collection/components/jump-search-bar/jump-search-bar.stories.js +100 -0
- package/dist/collection/components/jump-search-bar/jump-search-bar.stories.js.map +1 -0
- package/dist/collection/components/jump-search-bar/test/jump-search-bar.e2e.js +10 -0
- package/dist/collection/components/jump-search-bar/test/jump-search-bar.e2e.js.map +1 -0
- package/dist/collection/components/jump-search-bar/test/jump-search-bar.spec.js +18 -0
- package/dist/collection/components/jump-search-bar/test/jump-search-bar.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.js +2 -2
- package/dist/collection/components/jump-tab-panel/jump-tab-panel.js +1 -1
- package/dist/components/jump-search-bar.d.ts +11 -0
- package/dist/components/jump-search-bar.js +92 -0
- package/dist/components/jump-search-bar.js.map +1 -0
- package/dist/components/jump-tab-item.js +2 -2
- package/dist/components/jump-tab-panel.js +1 -1
- package/dist/components/jump-tab.js +1 -1
- package/dist/esm/jump-design-system.js +1 -1
- package/dist/esm/jump-search-bar.entry.js +56 -0
- package/dist/esm/jump-search-bar.entry.js.map +1 -0
- package/dist/esm/jump-tab-item.entry.js +2 -2
- package/dist/esm/jump-tab-panel.entry.js +1 -1
- package/dist/esm/jump-tab.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- 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-25df0e8f.entry.js +2 -0
- package/dist/jump-design-system/{p-1a8f69e1.entry.js → p-281c500c.entry.js} +2 -2
- package/dist/jump-design-system/p-96e7d098.entry.js +2 -0
- package/dist/jump-design-system/p-96e7d098.entry.js.map +1 -0
- package/dist/jump-design-system/p-9defb660.entry.js +2 -0
- package/dist/jump-design-system-elements.json +29 -0
- package/dist/types/components/jump-search-bar/jump-search-bar.d.ts +25 -0
- package/dist/types/components/jump-search-bar/jump-search-bar.stories.d.ts +49 -0
- package/dist/types/components.d.ts +51 -0
- package/package.json +1 -1
- package/dist/jump-design-system/p-2c95396a.entry.js +0 -2
- package/dist/jump-design-system/p-cfdf7090.entry.js +0 -2
- /package/dist/jump-design-system/{p-cfdf7090.entry.js.map → p-25df0e8f.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-1a8f69e1.entry.js.map → p-281c500c.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-2c95396a.entry.js.map → p-9defb660.entry.js.map} +0 -0
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy([["jump-button_2.cjs",[[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.cjs",[[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"],"favoriteHref":[1,"favorite-href"],"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],"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.cjs",[[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],"activeFilters":[32],"showMobileFilters":[32],"isMobile":[32],"getFilters":[64]},[[0,"jump-filterchange","filterChangeHandler"],[9,"resize","handleResize"]],{"showMobileFilters":["watchHandler"]}]]],["jump-filtergroup.cjs",[[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.cjs",[[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.cjs",[[1,"jump-pagination",{"pagLabel":[1,"pag-label"],"last":[2],"showFirstAndLast":[4,"show-first-and-last"],"current":[32]},null,{"current":["watchcurrent"]}]]],["jump-pagination-table.cjs",[[0,"jump-pagination-table",{"elementsRanges":[1,"elements-ranges"],"pagLabel":[513,"pag-label"],"labelElementsPerPage":[513,"label-elements-per-page"],"total":[514],"first":[514],"last":[514],"showFirstAndLast":[516,"show-first-and-last"],"elementsRangesArray":[32],"elPerPage":[32]},null,{"elementsRanges":["elementsRangesChanged"],"elPerPage":["elPerPageChanged"]}]]],["jump-quantity.cjs",[[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-accordion.cjs",[[1,"jump-accordion",{"variant":[1],"summary":[1],"disabled":[4],"open":[516],"icon":[1],"identifier":[1]},[[0,"sl-show","handleShow"]]]]],["jump-tab-item.cjs",[[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.cjs",[[1,"jump-accordion-group",{"variant":[1],"groupIdentifier":[1,"group-identifier"]}]]],["jump-card.cjs",[[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.cjs",[[1,"jump-card-ecommerce-option",{"code":[1],"imgUrl":[1,"img-url"],"label":[1],"sku":[1],"taxonomy":[1]}]]],["jump-filter-checkbox.cjs",[[1,"jump-filter-checkbox",{"value":[1],"label":[1],"checked":[516],"count":[8],"isChecked":[64]}]]],["jump-tab.cjs",[[1,"jump-tab",{"alignment":[1],"fullBorder":[4,"full-border"],"tabGroupName":[1,"tab-group-name"],"variant":[1]},[[0,"jump-change-active-tab","changeActiveTabHandler"]]]]],["jump-tab-panel.cjs",[[1,"jump-tab-panel",{"identifier":[1],"active":[4]}]]],["jump-badge.cjs",[[1,"jump-badge",{"label":[1],"variant":[513],"dimension":[513],"soft":[516],"outline":[516]}]]]], options);
|
|
22
|
+
return index.bootstrapLazy([["jump-button_2.cjs",[[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.cjs",[[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"],"favoriteHref":[1,"favorite-href"],"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],"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.cjs",[[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],"activeFilters":[32],"showMobileFilters":[32],"isMobile":[32],"getFilters":[64]},[[0,"jump-filterchange","filterChangeHandler"],[9,"resize","handleResize"]],{"showMobileFilters":["watchHandler"]}]]],["jump-filtergroup.cjs",[[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.cjs",[[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.cjs",[[1,"jump-pagination",{"pagLabel":[1,"pag-label"],"last":[2],"showFirstAndLast":[4,"show-first-and-last"],"current":[32]},null,{"current":["watchcurrent"]}]]],["jump-pagination-table.cjs",[[0,"jump-pagination-table",{"elementsRanges":[1,"elements-ranges"],"pagLabel":[513,"pag-label"],"labelElementsPerPage":[513,"label-elements-per-page"],"total":[514],"first":[514],"last":[514],"showFirstAndLast":[516,"show-first-and-last"],"elementsRangesArray":[32],"elPerPage":[32]},null,{"elementsRanges":["elementsRangesChanged"],"elPerPage":["elPerPageChanged"]}]]],["jump-quantity.cjs",[[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.cjs",[[1,"jump-search-bar",{"placeholder":[1],"identifier":[1],"debounceTime":[2,"debounce-time"],"searchType":[1,"search-type"],"variant":[1]}]]],["jump-accordion.cjs",[[1,"jump-accordion",{"variant":[1],"summary":[1],"disabled":[4],"open":[516],"icon":[1],"identifier":[1]},[[0,"sl-show","handleShow"]]]]],["jump-tab-item.cjs",[[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.cjs",[[1,"jump-accordion-group",{"variant":[1],"groupIdentifier":[1,"group-identifier"]}]]],["jump-card.cjs",[[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.cjs",[[1,"jump-card-ecommerce-option",{"code":[1],"imgUrl":[1,"img-url"],"label":[1],"sku":[1],"taxonomy":[1]}]]],["jump-filter-checkbox.cjs",[[1,"jump-filter-checkbox",{"value":[1],"label":[1],"checked":[516],"count":[8],"isChecked":[64]}]]],["jump-tab.cjs",[[1,"jump-tab",{"alignment":[1],"fullBorder":[4,"full-border"],"tabGroupName":[1,"tab-group-name"],"variant":[1]},[[0,"jump-change-active-tab","changeActiveTabHandler"]]]]],["jump-tab-panel.cjs",[[1,"jump-tab-panel",{"identifier":[1],"active":[4]}]]],["jump-badge.cjs",[[1,"jump-badge",{"label":[1],"variant":[513],"dimension":[513],"soft":[516],"outline":[516]}]]]], options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-86f59981.js');
|
|
6
|
+
|
|
7
|
+
const jumpSearchBarCss = ":host{display:flex;--jump-search-bar-focus-color:var(--secondary-standard, #5E79BA);--jump-search-bar-border-color:var(--neutral-grey-secondary, #707070);--jump-search-bar-bg-color:var(--gray-ultralight, #F8F8F8)}:host jump-button{--jump-button-border-radius:0px 3px 3px 0px}:host input{width:100%}:host(.manual.outline) input{border-radius:3px 0px 0px 3px;border:1px solid var(--jump-search-bar-border-color);padding:12px}:host(.manual.outline) input:focus-visible{outline:2px solid var(--jump-search-bar-focus-color);outline-offset:-2px}:host(.auto.outline) input{border-radius:3px;border:1px solid var(--jump-search-bar-border-color);padding:12px;padding-left:35px;background:url(\"data:image/svg+xml;utf8,%3Csvg%20width%3D%2213%22%20height%3D%2213%22%20viewBox%3D%220%200%2013%2013%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8.625%204.875C8.625%203.53906%207.89844%202.32031%206.75%201.64062C5.57812%200.960938%204.14844%200.960938%203%201.64062C1.82812%202.32031%201.125%203.53906%201.125%204.875C1.125%206.23438%201.82812%207.45312%203%208.13281C4.14844%208.8125%205.57812%208.8125%206.75%208.13281C7.89844%207.45312%208.625%206.23438%208.625%204.875ZM7.89844%208.71875C7.05469%209.375%206%209.75%204.875%209.75C2.17969%209.75%200%207.57031%200%204.875C0%202.20312%202.17969%200%204.875%200C7.54688%200%209.75%202.20312%209.75%204.875C9.75%206.02344%209.35156%207.07812%208.69531%207.92188L11.8359%2011.0391C12.0469%2011.2734%2012.0469%2011.625%2011.8359%2011.8359C11.6016%2012.0703%2011.25%2012.0703%2011.0391%2011.8359L7.89844%208.71875Z%22%20fill%3D%22%23707070%22%2F%3E%3C%2Fsvg%3E\") no-repeat left;background-size:14px;background-position:10px center}:host(.auto.outline) input:focus-visible{outline:2px solid var(--jump-search-bar-focus-color);outline-offset:-2px;background:url('data:image/svg+xml;utf8,<svg width=\"13\" height=\"13\" viewBox=\"0 0 13 13\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M8.625 4.875C8.625 3.53906 7.89844 2.32031 6.75 1.64062C5.57812 0.960938 4.14844 0.960938 3 1.64062C1.82812 2.32031 1.125 3.53906 1.125 4.875C1.125 6.23438 1.82812 7.45312 3 8.13281C4.14844 8.8125 5.57812 8.8125 6.75 8.13281C7.89844 7.45312 8.625 6.23438 8.625 4.875ZM7.89844 8.71875C7.05469 9.375 6 9.75 4.875 9.75C2.17969 9.75 0 7.57031 0 4.875C0 2.20312 2.17969 0 4.875 0C7.54688 0 9.75 2.20312 9.75 4.875C9.75 6.02344 9.35156 7.07812 8.69531 7.92188L11.8359 11.0391C12.0469 11.2734 12.0469 11.625 11.8359 11.8359C11.6016 12.0703 11.25 12.0703 11.0391 11.8359L7.89844 8.71875Z\" fill=\"%235E79BA\"/></svg>') no-repeat left !important;background-size:14px !important;background-position:10px center !important}:host(.auto.linear) input.search-input{border:none;border-bottom:1px solid var(--jump-search-bar-border-color);padding:8px 5px 8px 0;padding-left:35px;background:url(\"data:image/svg+xml;utf8,%3Csvg%20width%3D%2213%22%20height%3D%2213%22%20viewBox%3D%220%200%2013%2013%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8.625%204.875C8.625%203.53906%207.89844%202.32031%206.75%201.64062C5.57812%200.960938%204.14844%200.960938%203%201.64062C1.82812%202.32031%201.125%203.53906%201.125%204.875C1.125%206.23438%201.82812%207.45312%203%208.13281C4.14844%208.8125%205.57812%208.8125%206.75%208.13281C7.89844%207.45312%208.625%206.23438%208.625%204.875ZM7.89844%208.71875C7.05469%209.375%206%209.75%204.875%209.75C2.17969%209.75%200%207.57031%200%204.875C0%202.20312%202.17969%200%204.875%200C7.54688%200%209.75%202.20312%209.75%204.875C9.75%206.02344%209.35156%207.07812%208.69531%207.92188L11.8359%2011.0391C12.0469%2011.2734%2012.0469%2011.625%2011.8359%2011.8359C11.6016%2012.0703%2011.25%2012.0703%2011.0391%2011.8359L7.89844%208.71875Z%22%20fill%3D%22%23707070%22%2F%3E%3C%2Fsvg%3E\") no-repeat left;background-size:14px;background-position:10px center}:host(.auto.linear) input:focus-visible{outline:2px solid var(--jump-search-bar-focus-color);outline-offset:-2px;background:url('data:image/svg+xml;utf8,<svg width=\"13\" height=\"13\" viewBox=\"0 0 13 13\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M8.625 4.875C8.625 3.53906 7.89844 2.32031 6.75 1.64062C5.57812 0.960938 4.14844 0.960938 3 1.64062C1.82812 2.32031 1.125 3.53906 1.125 4.875C1.125 6.23438 1.82812 7.45312 3 8.13281C4.14844 8.8125 5.57812 8.8125 6.75 8.13281C7.89844 7.45312 8.625 6.23438 8.625 4.875ZM7.89844 8.71875C7.05469 9.375 6 9.75 4.875 9.75C2.17969 9.75 0 7.57031 0 4.875C0 2.20312 2.17969 0 4.875 0C7.54688 0 9.75 2.20312 9.75 4.875C9.75 6.02344 9.35156 7.07812 8.69531 7.92188L11.8359 11.0391C12.0469 11.2734 12.0469 11.625 11.8359 11.8359C11.6016 12.0703 11.25 12.0703 11.0391 11.8359L7.89844 8.71875Z\" fill=\"%235E79BA\"/></svg>') no-repeat left !important;background-size:14px !important;background-position:10px center !important}:host(.auto.filled) input.search-input{border:none;border-radius:3px;padding:12px;padding-left:35px;background:url(\"data:image/svg+xml;utf8,%3Csvg%20width%3D%2213%22%20height%3D%2213%22%20viewBox%3D%220%200%2013%2013%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8.625%204.875C8.625%203.53906%207.89844%202.32031%206.75%201.64062C5.57812%200.960938%204.14844%200.960938%203%201.64062C1.82812%202.32031%201.125%203.53906%201.125%204.875C1.125%206.23438%201.82812%207.45312%203%208.13281C4.14844%208.8125%205.57812%208.8125%206.75%208.13281C7.89844%207.45312%208.625%206.23438%208.625%204.875ZM7.89844%208.71875C7.05469%209.375%206%209.75%204.875%209.75C2.17969%209.75%200%207.57031%200%204.875C0%202.20312%202.17969%200%204.875%200C7.54688%200%209.75%202.20312%209.75%204.875C9.75%206.02344%209.35156%207.07812%208.69531%207.92188L11.8359%2011.0391C12.0469%2011.2734%2012.0469%2011.625%2011.8359%2011.8359C11.6016%2012.0703%2011.25%2012.0703%2011.0391%2011.8359L7.89844%208.71875Z%22%20fill%3D%22%23707070%22%2F%3E%3C%2Fsvg%3E\") no-repeat left;background-size:14px;background-position:10px center;background-color:var(--jump-search-bar-bg-color)}";
|
|
8
|
+
const JumpSearchBarStyle0 = jumpSearchBarCss;
|
|
9
|
+
|
|
10
|
+
const JumpSearchBar = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
this.search = index.createEvent(this, "jump-search-bar", 7);
|
|
14
|
+
/* ---------------------- @LIFECYCLE ------------------------- */
|
|
15
|
+
/* -------------------- @LISTEN ------------------------------- */
|
|
16
|
+
/* -------------------- @METHOD ------------------------------- */
|
|
17
|
+
/* -------------------- LOCAL METHODS ------------------------- */
|
|
18
|
+
/**
|
|
19
|
+
* se searchType == 'manual' l'utente deve cliccare sul pulsante per eseguire la funzione
|
|
20
|
+
* se searchType == 'auto' la funzione viene eseguita automaticamente al termine della digitazione
|
|
21
|
+
*/
|
|
22
|
+
this.doSearch = () => {
|
|
23
|
+
if (this.jumpSearchBar) {
|
|
24
|
+
const searchValue = this.jumpSearchBar.value;
|
|
25
|
+
console.log('doSearch', searchValue);
|
|
26
|
+
this.search.emit({ search: searchValue });
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
this.placeholder = 'Cerca...';
|
|
30
|
+
this.identifier = 'search-bar';
|
|
31
|
+
this.debounceTime = 500;
|
|
32
|
+
this.searchType = 'auto' ;
|
|
33
|
+
this.variant = 'outline' ;
|
|
34
|
+
}
|
|
35
|
+
/** Used to filters/searchbar */
|
|
36
|
+
debounce(fn, delay = this.debounceTime) {
|
|
37
|
+
let timeoutId;
|
|
38
|
+
return (...args) => {
|
|
39
|
+
// cancel the previous timer
|
|
40
|
+
if (timeoutId) {
|
|
41
|
+
clearTimeout(timeoutId);
|
|
42
|
+
}
|
|
43
|
+
// setup a new timer
|
|
44
|
+
timeoutId = setTimeout(() => {
|
|
45
|
+
fn.apply(null, args);
|
|
46
|
+
}, delay);
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
;
|
|
50
|
+
/* -------------------- RENDER ------------------------- */
|
|
51
|
+
render() {
|
|
52
|
+
return (index.h(index.Host, { key: 'efa1c6cdd7f2cb5d22b50707aee020bab23609b0', class: "JumpSearchBar " + (this.searchType == 'manual' ? 'manual outline' : (this.searchType + " " + this.variant)) }, index.h("input", { key: '823778b4c704a72ff14662dff408b41b4fe79fb1', placeholder: this.placeholder, type: "search", id: this.identifier, class: "search-input", ref: (el) => { this.jumpSearchBar = el; }, onInput: this.searchType === 'auto' ? this.debounce(this.doSearch) : undefined }), this.searchType === 'manual' &&
|
|
53
|
+
index.h("jump-button", { key: '8f940966131504f605b0aadb272e0c590fb2b32f', variant: "secondary", size: "medium", name: "scopri", value: "value", "aria-label": "Scopri di pi\u00F9", id: "button", onlyIcon: true, onClick: () => this.doSearch() }, index.h("jump-icon", { key: 'df8a23cd6a3b8374bfb18fc2a9061ef4af5f887a', slot: "suffix", name: "magnifying-glass" }))));
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
JumpSearchBar.style = JumpSearchBarStyle0;
|
|
57
|
+
|
|
58
|
+
exports.jump_search_bar = JumpSearchBar;
|
|
59
|
+
|
|
60
|
+
//# sourceMappingURL=jump-search-bar.cjs.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"jump-search-bar.entry.cjs.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,CAAC,GAAG,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;gBACrC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC;aAC3C;SACF,CAAA;2BAvC6B,UAAU;0BACX,YAAY;4BAKV,GAAG;0BAML,MAAM,CAAY;uBAErB,SAAS,CAAY,CAAY;;;IA6B7D,QAAQ,CAAC,EAAE,EAAE,KAAK,GAAG,IAAI,CAAC,YAAY;QACpC,IAAI,SAAS,CAAC;QAEd,OAAO,CAAC,GAAG,IAAI;;YAEb,IAAI,SAAS,EAAE;gBACb,YAAY,CAAC,SAAS,CAAC,CAAC;aACzB;;YAED,SAAS,GAAG,UAAU,CAAC;gBACrB,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;aACtB,EAAE,KAAK,CAAC,CAAC;SACX,CAAC;KACH;;;IAIC,MAAM;QACJ,QACEA,QAACC,UAAI,qDACH,KAAK,EAAE,gBAAgB,IAAI,IAAI,CAAC,UAAU,IAAI,QAAQ,GAAG,gBAAgB,IAAI,IAAI,CAAC,UAAU,GAAG,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,IAEnHD,oEACE,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,IAAI,EAAC,QAAQ,EAAC,EAAE,EAAE,IAAI,CAAC,UAAU,EAAE,KAAK,EAAC,cAAc,EAAC,GAAG,EAAE,CAAC,EAAE,OAAO,IAAI,CAAC,aAAa,GAAG,EAAsB,CAAA,EAAE,EACpH,OAAO,EAAE,IAAI,CAAC,UAAU,KAAK,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,SAAS,GAC5E,EACH,IAAI,CAAC,UAAU,KAAK,QAAQ;YAC3BA,0EAAa,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,OAAO,gBAAY,oBAAe,EAAC,EAAE,EAAC,QAAQ,EAAC,QAAQ,QAAC,OAAO,EAAE,MAAM,IAAI,CAAC,QAAQ,EAAE,IACvJA,wEAAW,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,kBAAkB,GAAa,CACjD,CAEX,EACP;KACH;;;;;;","names":["h","Host"],"sources":["src/components/jump-search-bar/jump-search-bar.scss?tag=jump-search-bar&encapsulation=shadow","src/components/jump-search-bar/jump-search-bar.tsx"],"sourcesContent":[":host {\n display: flex;\n\n jump-button {\n --jump-button-border-radius: 0px 3px 3px 0px;\n }\n\n input {\n width: 100%;\n }\n\n --jump-search-bar-focus-color: var(--secondary-standard, #5E79BA);\n --jump-search-bar-border-color: var(--neutral-grey-secondary, #707070);\n --jump-search-bar-bg-color: var(--gray-ultralight, #F8F8F8);\n}\n\n// /* Stile manuale */\n:host(.manual.outline) {\n input {\n border-radius: 3px 0px 0px 3px;\n border: 1px solid var(--jump-search-bar-border-color);\n padding: 12px;\n }\n\n input:focus-visible {\n outline: 2px solid var(--jump-search-bar-focus-color);\n outline-offset: -2px;\n }\n}\n\n:host(.auto.outline) {\n input {\n border-radius: 3px;\n border: 1px solid var(--jump-search-bar-border-color);\n padding: 12px;\n padding-left: 35px;\n background: url('data:image/svg+xml;utf8,%3Csvg%20width%3D%2213%22%20height%3D%2213%22%20viewBox%3D%220%200%2013%2013%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8.625%204.875C8.625%203.53906%207.89844%202.32031%206.75%201.64062C5.57812%200.960938%204.14844%200.960938%203%201.64062C1.82812%202.32031%201.125%203.53906%201.125%204.875C1.125%206.23438%201.82812%207.45312%203%208.13281C4.14844%208.8125%205.57812%208.8125%206.75%208.13281C7.89844%207.45312%208.625%206.23438%208.625%204.875ZM7.89844%208.71875C7.05469%209.375%206%209.75%204.875%209.75C2.17969%209.75%200%207.57031%200%204.875C0%202.20312%202.17969%200%204.875%200C7.54688%200%209.75%202.20312%209.75%204.875C9.75%206.02344%209.35156%207.07812%208.69531%207.92188L11.8359%2011.0391C12.0469%2011.2734%2012.0469%2011.625%2011.8359%2011.8359C11.6016%2012.0703%2011.25%2012.0703%2011.0391%2011.8359L7.89844%208.71875Z%22%20fill%3D%22%23707070%22%2F%3E%3C%2Fsvg%3E') no-repeat left;\n background-size: 14px;\n background-position: 10px center;\n }\n\n input:focus-visible {\n outline: 2px solid var(--jump-search-bar-focus-color);\n outline-offset: -2px;\n background: url('data:image/svg+xml;utf8,<svg width=\"13\" height=\"13\" viewBox=\"0 0 13 13\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M8.625 4.875C8.625 3.53906 7.89844 2.32031 6.75 1.64062C5.57812 0.960938 4.14844 0.960938 3 1.64062C1.82812 2.32031 1.125 3.53906 1.125 4.875C1.125 6.23438 1.82812 7.45312 3 8.13281C4.14844 8.8125 5.57812 8.8125 6.75 8.13281C7.89844 7.45312 8.625 6.23438 8.625 4.875ZM7.89844 8.71875C7.05469 9.375 6 9.75 4.875 9.75C2.17969 9.75 0 7.57031 0 4.875C0 2.20312 2.17969 0 4.875 0C7.54688 0 9.75 2.20312 9.75 4.875C9.75 6.02344 9.35156 7.07812 8.69531 7.92188L11.8359 11.0391C12.0469 11.2734 12.0469 11.625 11.8359 11.8359C11.6016 12.0703 11.25 12.0703 11.0391 11.8359L7.89844 8.71875Z\" fill=\"%235E79BA\"/></svg>') no-repeat left !important;\n background-size: 14px !important;\n background-position: 10px center !important;\n } \n}\n\n/* Stile linear */\n:host(.auto.linear){\n input.search-input {\n border: none;\n border-bottom: 1px solid var(--jump-search-bar-border-color);\n padding: 8px 5px 8px 0;\n padding-left: 35px;\n background: url('data:image/svg+xml;utf8,%3Csvg%20width%3D%2213%22%20height%3D%2213%22%20viewBox%3D%220%200%2013%2013%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8.625%204.875C8.625%203.53906%207.89844%202.32031%206.75%201.64062C5.57812%200.960938%204.14844%200.960938%203%201.64062C1.82812%202.32031%201.125%203.53906%201.125%204.875C1.125%206.23438%201.82812%207.45312%203%208.13281C4.14844%208.8125%205.57812%208.8125%206.75%208.13281C7.89844%207.45312%208.625%206.23438%208.625%204.875ZM7.89844%208.71875C7.05469%209.375%206%209.75%204.875%209.75C2.17969%209.75%200%207.57031%200%204.875C0%202.20312%202.17969%200%204.875%200C7.54688%200%209.75%202.20312%209.75%204.875C9.75%206.02344%209.35156%207.07812%208.69531%207.92188L11.8359%2011.0391C12.0469%2011.2734%2012.0469%2011.625%2011.8359%2011.8359C11.6016%2012.0703%2011.25%2012.0703%2011.0391%2011.8359L7.89844%208.71875Z%22%20fill%3D%22%23707070%22%2F%3E%3C%2Fsvg%3E') no-repeat left;\n background-size: 14px;\n background-position: 10px center;\n }\n\n input:focus-visible {\n outline: 2px solid var(--jump-search-bar-focus-color);\n outline-offset: -2px;\n background: url('data:image/svg+xml;utf8,<svg width=\"13\" height=\"13\" viewBox=\"0 0 13 13\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M8.625 4.875C8.625 3.53906 7.89844 2.32031 6.75 1.64062C5.57812 0.960938 4.14844 0.960938 3 1.64062C1.82812 2.32031 1.125 3.53906 1.125 4.875C1.125 6.23438 1.82812 7.45312 3 8.13281C4.14844 8.8125 5.57812 8.8125 6.75 8.13281C7.89844 7.45312 8.625 6.23438 8.625 4.875ZM7.89844 8.71875C7.05469 9.375 6 9.75 4.875 9.75C2.17969 9.75 0 7.57031 0 4.875C0 2.20312 2.17969 0 4.875 0C7.54688 0 9.75 2.20312 9.75 4.875C9.75 6.02344 9.35156 7.07812 8.69531 7.92188L11.8359 11.0391C12.0469 11.2734 12.0469 11.625 11.8359 11.8359C11.6016 12.0703 11.25 12.0703 11.0391 11.8359L7.89844 8.71875Z\" fill=\"%235E79BA\"/></svg>') no-repeat left !important;\n background-size: 14px !important;\n background-position: 10px center !important;\n }\n}\n\n/* Stile filled */\n:host(.auto.filled) {\n input.search-input {\n border: none;\n border-radius: 3px;\n padding: 12px;\n padding-left: 35px;\n background: url('data:image/svg+xml;utf8,%3Csvg%20width%3D%2213%22%20height%3D%2213%22%20viewBox%3D%220%200%2013%2013%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8.625%204.875C8.625%203.53906%207.89844%202.32031%206.75%201.64062C5.57812%200.960938%204.14844%200.960938%203%201.64062C1.82812%202.32031%201.125%203.53906%201.125%204.875C1.125%206.23438%201.82812%207.45312%203%208.13281C4.14844%208.8125%205.57812%208.8125%206.75%208.13281C7.89844%207.45312%208.625%206.23438%208.625%204.875ZM7.89844%208.71875C7.05469%209.375%206%209.75%204.875%209.75C2.17969%209.75%200%207.57031%200%204.875C0%202.20312%202.17969%200%204.875%200C7.54688%200%209.75%202.20312%209.75%204.875C9.75%206.02344%209.35156%207.07812%208.69531%207.92188L11.8359%2011.0391C12.0469%2011.2734%2012.0469%2011.625%2011.8359%2011.8359C11.6016%2012.0703%2011.25%2012.0703%2011.0391%2011.8359L7.89844%208.71875Z%22%20fill%3D%22%23707070%22%2F%3E%3C%2Fsvg%3E') no-repeat left;\n background-size: 14px;\n background-position: 10px center;\n background-color: var(--jump-search-bar-bg-color);\n }\n}\n","import { Component, Host, h, Prop, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'jump-search-bar',\n styleUrl: 'jump-search-bar.scss',\n shadow: true,\n})\nexport class JumpSearchBar {\n /* ---------------------- OWN PROPERTIES ---------------------- */\n\n /* ---------------------- @ELEMENT ---------------------------- */\n jumpSearchBar: HTMLInputElement;\n\n /* ---------------------- @STATE ------------------------- */\n\n /* ---------------------- @PROPERTIES ------------------------- */\n @Prop() placeholder: string = 'Cerca...';\n @Prop() identifier: string = 'search-bar';\n\n /**\n * Variabile per personalizzare il tempo di attesa prima di eseguire la ricerca\n */\n @Prop() debounceTime: number = 500;\n\n /**\n * Se \"Auto\" la ricerca parte automaticamente al termine della digitazione\n * Se \"Manual\" la ricerca parte solo dopo aver premuto invio -> può avere solo stile outline\n */\n @Prop() searchType: string = 'auto' || 'manual';\n\n @Prop() variant: string = 'outline' || 'filled' || 'linear';\n\n /* ---------------------- @EVENTS ------------------------- */\n @Event({ eventName: 'jump-search-bar' }) search: EventEmitter;\n\n\n /* ---------------------- @LIFECYCLE ------------------------- */\n\n /* -------------------- @LISTEN ------------------------------- */\n\n /* -------------------- @METHOD ------------------------------- */\n\n /* -------------------- LOCAL METHODS ------------------------- */\n\n /**\n * se searchType == 'manual' l'utente deve cliccare sul pulsante per eseguire la funzione\n * se searchType == 'auto' la funzione viene eseguita automaticamente al termine della digitazione\n */\n doSearch = () => {\n if (this.jumpSearchBar) {\n const searchValue = this.jumpSearchBar.value;\n\n console.log('doSearch', searchValue);\n this.search.emit({ search: searchValue });\n }\n }\n\n\n /** Used to filters/searchbar */\ndebounce(fn, delay = this.debounceTime) {\n let timeoutId;\n\n return (...args) => {\n // cancel the previous timer\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n // setup a new timer\n timeoutId = setTimeout(() => {\n fn.apply(null, args);\n }, delay);\n };\n};\n\n /* -------------------- RENDER ------------------------- */\n\n render() {\n return (\n <Host \n class={\"JumpSearchBar \" + (this.searchType == 'manual' ? 'manual outline' : (this.searchType + \" \" + this.variant))} \n >\n <input \n placeholder={this.placeholder} \n type=\"search\" id={this.identifier} class=\"search-input\" ref={(el) => { this.jumpSearchBar = el as HTMLInputElement }} \n onInput={this.searchType === 'auto' ? this.debounce(this.doSearch) : undefined}\n />\n {this.searchType === 'manual' &&\n <jump-button variant=\"secondary\" size=\"medium\" name=\"scopri\" value=\"value\" aria-label=\"Scopri di più\" id=\"button\" onlyIcon onClick={() => this.doSearch()}>\n <jump-icon slot=\"suffix\" name=\"magnifying-glass\"></jump-icon>\n </jump-button>\n }\n </Host>\n );\n }\n\n}\n"],"version":3}
|
|
@@ -28,8 +28,8 @@ const JumpTabItem = class {
|
|
|
28
28
|
this.variant = parentVariant;
|
|
29
29
|
}
|
|
30
30
|
render() {
|
|
31
|
-
return (index.h(index.Host, { key: '
|
|
32
|
-
index.h("jump-icon", { key: '
|
|
31
|
+
return (index.h(index.Host, { key: '12f5601927e8d4379e3d32a076f135a0674c06e6', ref: (el) => { this.tabEl = el; }, class: "JumpTabItem " + (this.active ? 'active' : '') + " " + (this.variant) + " " + (this.disabled ? 'disabled' : '') }, index.h("div", { key: '07784f29f22f3f641c2f8b5bc5f38ef04695fc59', 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')) &&
|
|
32
|
+
index.h("jump-icon", { key: '2275bff4b7372974ed6f72480a474b516674668f', library: "fa", category: "regular", name: this.iconName, size: "small" }), index.h("span", { key: '19bea27cf5056cbf221e6784aa206036f54ae6d4', class: "label" }, this.label))));
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
JumpTabItem.style = JumpTabItemStyle0;
|
|
@@ -14,7 +14,7 @@ const JumpTabPanel = class {
|
|
|
14
14
|
this.active = false;
|
|
15
15
|
}
|
|
16
16
|
render() {
|
|
17
|
-
return (index.h(index.Host, { key: '
|
|
17
|
+
return (index.h(index.Host, { key: '04e7e69fddb9e20a702e1811c3ed0ac948304362', class: "JumpTabPanel", id: this.identifier }, index.h("div", { key: '3ca5c246a4bdb03c725d0c7df1b5b7cf1560abba', class: "JumpTabPanel__Content " + (this.active ? 'active' : '') }, index.h("slot", { key: '45f0678c6415e2797f7b751c33ef18ccaccab306' }))));
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
20
|
JumpTabPanel.style = JumpTabPanelStyle0;
|
|
@@ -83,7 +83,7 @@ const JumpTab = class {
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
render() {
|
|
86
|
-
return (index.h(index.Host, { key: '
|
|
86
|
+
return (index.h(index.Host, { key: 'd7e44730a027cfff03eae064f2158c942c36448c', class: "JumpTab" + " " + this.alignment + " " + (this.variant) + " " + (this.fullBorder && 'fullBorder'), id: this.tabGroupName, ref: (el) => { this.JumpTabEl = el; } }, index.h("div", { key: '85719323692abe4f8a582a5c9d467f0d23b7d707' }, index.h("div", { key: '7f920c1dc1912999b6f0ec9a2a617224c96d3dc3', class: "Wrapper " + this.variant }, index.h("slot", { key: 'c8f708fa092450db62e022385e570d20eef706b0', name: "tab-item" })), index.h("div", { key: 'a6db5ee71be33c635845e927e3ecfaa96cdabb14' }, index.h("slot", { key: 'c4353dcf200fa16b8b5cb0696aa5d41874de64d8', name: "tab-content" })))));
|
|
87
87
|
}
|
|
88
88
|
};
|
|
89
89
|
JumpTab.style = JumpTabStyle0;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -8,7 +8,7 @@ const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|
|
9
9
|
if (typeof window === 'undefined') return undefined;
|
|
10
10
|
await appGlobals.globalScripts();
|
|
11
|
-
return index.bootstrapLazy([["jump-button_2.cjs",[[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.cjs",[[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"],"favoriteHref":[1,"favorite-href"],"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],"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.cjs",[[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],"activeFilters":[32],"showMobileFilters":[32],"isMobile":[32],"getFilters":[64]},[[0,"jump-filterchange","filterChangeHandler"],[9,"resize","handleResize"]],{"showMobileFilters":["watchHandler"]}]]],["jump-filtergroup.cjs",[[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.cjs",[[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.cjs",[[1,"jump-pagination",{"pagLabel":[1,"pag-label"],"last":[2],"showFirstAndLast":[4,"show-first-and-last"],"current":[32]},null,{"current":["watchcurrent"]}]]],["jump-pagination-table.cjs",[[0,"jump-pagination-table",{"elementsRanges":[1,"elements-ranges"],"pagLabel":[513,"pag-label"],"labelElementsPerPage":[513,"label-elements-per-page"],"total":[514],"first":[514],"last":[514],"showFirstAndLast":[516,"show-first-and-last"],"elementsRangesArray":[32],"elPerPage":[32]},null,{"elementsRanges":["elementsRangesChanged"],"elPerPage":["elPerPageChanged"]}]]],["jump-quantity.cjs",[[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-accordion.cjs",[[1,"jump-accordion",{"variant":[1],"summary":[1],"disabled":[4],"open":[516],"icon":[1],"identifier":[1]},[[0,"sl-show","handleShow"]]]]],["jump-tab-item.cjs",[[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.cjs",[[1,"jump-accordion-group",{"variant":[1],"groupIdentifier":[1,"group-identifier"]}]]],["jump-card.cjs",[[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.cjs",[[1,"jump-card-ecommerce-option",{"code":[1],"imgUrl":[1,"img-url"],"label":[1],"sku":[1],"taxonomy":[1]}]]],["jump-filter-checkbox.cjs",[[1,"jump-filter-checkbox",{"value":[1],"label":[1],"checked":[516],"count":[8],"isChecked":[64]}]]],["jump-tab.cjs",[[1,"jump-tab",{"alignment":[1],"fullBorder":[4,"full-border"],"tabGroupName":[1,"tab-group-name"],"variant":[1]},[[0,"jump-change-active-tab","changeActiveTabHandler"]]]]],["jump-tab-panel.cjs",[[1,"jump-tab-panel",{"identifier":[1],"active":[4]}]]],["jump-badge.cjs",[[1,"jump-badge",{"label":[1],"variant":[513],"dimension":[513],"soft":[516],"outline":[516]}]]]], options);
|
|
11
|
+
return index.bootstrapLazy([["jump-button_2.cjs",[[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.cjs",[[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"],"favoriteHref":[1,"favorite-href"],"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],"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.cjs",[[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],"activeFilters":[32],"showMobileFilters":[32],"isMobile":[32],"getFilters":[64]},[[0,"jump-filterchange","filterChangeHandler"],[9,"resize","handleResize"]],{"showMobileFilters":["watchHandler"]}]]],["jump-filtergroup.cjs",[[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.cjs",[[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.cjs",[[1,"jump-pagination",{"pagLabel":[1,"pag-label"],"last":[2],"showFirstAndLast":[4,"show-first-and-last"],"current":[32]},null,{"current":["watchcurrent"]}]]],["jump-pagination-table.cjs",[[0,"jump-pagination-table",{"elementsRanges":[1,"elements-ranges"],"pagLabel":[513,"pag-label"],"labelElementsPerPage":[513,"label-elements-per-page"],"total":[514],"first":[514],"last":[514],"showFirstAndLast":[516,"show-first-and-last"],"elementsRangesArray":[32],"elPerPage":[32]},null,{"elementsRanges":["elementsRangesChanged"],"elPerPage":["elPerPageChanged"]}]]],["jump-quantity.cjs",[[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.cjs",[[1,"jump-search-bar",{"placeholder":[1],"identifier":[1],"debounceTime":[2,"debounce-time"],"searchType":[1,"search-type"],"variant":[1]}]]],["jump-accordion.cjs",[[1,"jump-accordion",{"variant":[1],"summary":[1],"disabled":[4],"open":[516],"icon":[1],"identifier":[1]},[[0,"sl-show","handleShow"]]]]],["jump-tab-item.cjs",[[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.cjs",[[1,"jump-accordion-group",{"variant":[1],"groupIdentifier":[1,"group-identifier"]}]]],["jump-card.cjs",[[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.cjs",[[1,"jump-card-ecommerce-option",{"code":[1],"imgUrl":[1,"img-url"],"label":[1],"sku":[1],"taxonomy":[1]}]]],["jump-filter-checkbox.cjs",[[1,"jump-filter-checkbox",{"value":[1],"label":[1],"checked":[516],"count":[8],"isChecked":[64]}]]],["jump-tab.cjs",[[1,"jump-tab",{"alignment":[1],"fullBorder":[4,"full-border"],"tabGroupName":[1,"tab-group-name"],"variant":[1]},[[0,"jump-change-active-tab","changeActiveTabHandler"]]]]],["jump-tab-panel.cjs",[[1,"jump-tab-panel",{"identifier":[1],"active":[4]}]]],["jump-badge.cjs",[[1,"jump-badge",{"label":[1],"variant":[513],"dimension":[513],"soft":[516],"outline":[516]}]]]], options);
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
exports.setNonce = index.setNonce;
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"components/jump-pagination/jump-pagination.js",
|
|
16
16
|
"components/jump-pagination-table/jump-pagination-table.js",
|
|
17
17
|
"components/jump-quantity/jump-quantity.js",
|
|
18
|
+
"components/jump-search-bar/jump-search-bar.js",
|
|
18
19
|
"components/jump-tab/jump-tab.js",
|
|
19
20
|
"components/jump-tab-item/jump-tab-item.js",
|
|
20
21
|
"components/jump-tab-panel/jump-tab-panel.js"
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: flex;
|
|
3
|
+
--jump-search-bar-focus-color: var(--secondary-standard, #5E79BA);
|
|
4
|
+
--jump-search-bar-border-color: var(--neutral-grey-secondary, #707070);
|
|
5
|
+
--jump-search-bar-bg-color: var(--gray-ultralight, #F8F8F8);
|
|
6
|
+
}
|
|
7
|
+
:host jump-button {
|
|
8
|
+
--jump-button-border-radius: 0px 3px 3px 0px;
|
|
9
|
+
}
|
|
10
|
+
:host input {
|
|
11
|
+
width: 100%;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
:host(.manual.outline) input {
|
|
15
|
+
border-radius: 3px 0px 0px 3px;
|
|
16
|
+
border: 1px solid var(--jump-search-bar-border-color);
|
|
17
|
+
padding: 12px;
|
|
18
|
+
}
|
|
19
|
+
:host(.manual.outline) input:focus-visible {
|
|
20
|
+
outline: 2px solid var(--jump-search-bar-focus-color);
|
|
21
|
+
outline-offset: -2px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:host(.auto.outline) input {
|
|
25
|
+
border-radius: 3px;
|
|
26
|
+
border: 1px solid var(--jump-search-bar-border-color);
|
|
27
|
+
padding: 12px;
|
|
28
|
+
padding-left: 35px;
|
|
29
|
+
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;
|
|
30
|
+
background-size: 14px;
|
|
31
|
+
background-position: 10px center;
|
|
32
|
+
}
|
|
33
|
+
:host(.auto.outline) input:focus-visible {
|
|
34
|
+
outline: 2px solid var(--jump-search-bar-focus-color);
|
|
35
|
+
outline-offset: -2px;
|
|
36
|
+
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;
|
|
37
|
+
background-size: 14px !important;
|
|
38
|
+
background-position: 10px center !important;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* Stile linear */
|
|
42
|
+
:host(.auto.linear) input.search-input {
|
|
43
|
+
border: none;
|
|
44
|
+
border-bottom: 1px solid var(--jump-search-bar-border-color);
|
|
45
|
+
padding: 8px 5px 8px 0;
|
|
46
|
+
padding-left: 35px;
|
|
47
|
+
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;
|
|
48
|
+
background-size: 14px;
|
|
49
|
+
background-position: 10px center;
|
|
50
|
+
}
|
|
51
|
+
:host(.auto.linear) input:focus-visible {
|
|
52
|
+
outline: 2px solid var(--jump-search-bar-focus-color);
|
|
53
|
+
outline-offset: -2px;
|
|
54
|
+
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;
|
|
55
|
+
background-size: 14px !important;
|
|
56
|
+
background-position: 10px center !important;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* Stile filled */
|
|
60
|
+
:host(.auto.filled) input.search-input {
|
|
61
|
+
border: none;
|
|
62
|
+
border-radius: 3px;
|
|
63
|
+
padding: 12px;
|
|
64
|
+
padding-left: 35px;
|
|
65
|
+
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;
|
|
66
|
+
background-size: 14px;
|
|
67
|
+
background-position: 10px center;
|
|
68
|
+
background-color: var(--jump-search-bar-bg-color);
|
|
69
|
+
}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
export class JumpSearchBar {
|
|
3
|
+
constructor() {
|
|
4
|
+
/* ---------------------- @LIFECYCLE ------------------------- */
|
|
5
|
+
/* -------------------- @LISTEN ------------------------------- */
|
|
6
|
+
/* -------------------- @METHOD ------------------------------- */
|
|
7
|
+
/* -------------------- LOCAL METHODS ------------------------- */
|
|
8
|
+
/**
|
|
9
|
+
* se searchType == 'manual' l'utente deve cliccare sul pulsante per eseguire la funzione
|
|
10
|
+
* se searchType == 'auto' la funzione viene eseguita automaticamente al termine della digitazione
|
|
11
|
+
*/
|
|
12
|
+
this.doSearch = () => {
|
|
13
|
+
if (this.jumpSearchBar) {
|
|
14
|
+
const searchValue = this.jumpSearchBar.value;
|
|
15
|
+
console.log('doSearch', searchValue);
|
|
16
|
+
this.search.emit({ search: searchValue });
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
this.placeholder = 'Cerca...';
|
|
20
|
+
this.identifier = 'search-bar';
|
|
21
|
+
this.debounceTime = 500;
|
|
22
|
+
this.searchType = 'auto' || 'manual';
|
|
23
|
+
this.variant = 'outline' || 'filled' || 'linear';
|
|
24
|
+
}
|
|
25
|
+
/** Used to filters/searchbar */
|
|
26
|
+
debounce(fn, delay = this.debounceTime) {
|
|
27
|
+
let timeoutId;
|
|
28
|
+
return (...args) => {
|
|
29
|
+
// cancel the previous timer
|
|
30
|
+
if (timeoutId) {
|
|
31
|
+
clearTimeout(timeoutId);
|
|
32
|
+
}
|
|
33
|
+
// setup a new timer
|
|
34
|
+
timeoutId = setTimeout(() => {
|
|
35
|
+
fn.apply(null, args);
|
|
36
|
+
}, delay);
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
;
|
|
40
|
+
/* -------------------- RENDER ------------------------- */
|
|
41
|
+
render() {
|
|
42
|
+
return (h(Host, { key: 'efa1c6cdd7f2cb5d22b50707aee020bab23609b0', class: "JumpSearchBar " + (this.searchType == 'manual' ? 'manual outline' : (this.searchType + " " + this.variant)) }, h("input", { key: '823778b4c704a72ff14662dff408b41b4fe79fb1', placeholder: this.placeholder, type: "search", id: this.identifier, class: "search-input", ref: (el) => { this.jumpSearchBar = el; }, onInput: this.searchType === 'auto' ? this.debounce(this.doSearch) : undefined }), this.searchType === 'manual' &&
|
|
43
|
+
h("jump-button", { key: '8f940966131504f605b0aadb272e0c590fb2b32f', variant: "secondary", size: "medium", name: "scopri", value: "value", "aria-label": "Scopri di pi\u00F9", id: "button", onlyIcon: true, onClick: () => this.doSearch() }, h("jump-icon", { key: 'df8a23cd6a3b8374bfb18fc2a9061ef4af5f887a', slot: "suffix", name: "magnifying-glass" }))));
|
|
44
|
+
}
|
|
45
|
+
static get is() { return "jump-search-bar"; }
|
|
46
|
+
static get encapsulation() { return "shadow"; }
|
|
47
|
+
static get originalStyleUrls() {
|
|
48
|
+
return {
|
|
49
|
+
"$": ["jump-search-bar.scss"]
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
static get styleUrls() {
|
|
53
|
+
return {
|
|
54
|
+
"$": ["jump-search-bar.css"]
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
static get properties() {
|
|
58
|
+
return {
|
|
59
|
+
"placeholder": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"mutable": false,
|
|
62
|
+
"complexType": {
|
|
63
|
+
"original": "string",
|
|
64
|
+
"resolved": "string",
|
|
65
|
+
"references": {}
|
|
66
|
+
},
|
|
67
|
+
"required": false,
|
|
68
|
+
"optional": false,
|
|
69
|
+
"docs": {
|
|
70
|
+
"tags": [],
|
|
71
|
+
"text": ""
|
|
72
|
+
},
|
|
73
|
+
"attribute": "placeholder",
|
|
74
|
+
"reflect": false,
|
|
75
|
+
"defaultValue": "'Cerca...'"
|
|
76
|
+
},
|
|
77
|
+
"identifier": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"mutable": false,
|
|
80
|
+
"complexType": {
|
|
81
|
+
"original": "string",
|
|
82
|
+
"resolved": "string",
|
|
83
|
+
"references": {}
|
|
84
|
+
},
|
|
85
|
+
"required": false,
|
|
86
|
+
"optional": false,
|
|
87
|
+
"docs": {
|
|
88
|
+
"tags": [],
|
|
89
|
+
"text": ""
|
|
90
|
+
},
|
|
91
|
+
"attribute": "identifier",
|
|
92
|
+
"reflect": false,
|
|
93
|
+
"defaultValue": "'search-bar'"
|
|
94
|
+
},
|
|
95
|
+
"debounceTime": {
|
|
96
|
+
"type": "number",
|
|
97
|
+
"mutable": false,
|
|
98
|
+
"complexType": {
|
|
99
|
+
"original": "number",
|
|
100
|
+
"resolved": "number",
|
|
101
|
+
"references": {}
|
|
102
|
+
},
|
|
103
|
+
"required": false,
|
|
104
|
+
"optional": false,
|
|
105
|
+
"docs": {
|
|
106
|
+
"tags": [],
|
|
107
|
+
"text": "Variabile per personalizzare il tempo di attesa prima di eseguire la ricerca"
|
|
108
|
+
},
|
|
109
|
+
"attribute": "debounce-time",
|
|
110
|
+
"reflect": false,
|
|
111
|
+
"defaultValue": "500"
|
|
112
|
+
},
|
|
113
|
+
"searchType": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"mutable": false,
|
|
116
|
+
"complexType": {
|
|
117
|
+
"original": "string",
|
|
118
|
+
"resolved": "string",
|
|
119
|
+
"references": {}
|
|
120
|
+
},
|
|
121
|
+
"required": false,
|
|
122
|
+
"optional": false,
|
|
123
|
+
"docs": {
|
|
124
|
+
"tags": [],
|
|
125
|
+
"text": "Se \"Auto\" la ricerca parte automaticamente al termine della digitazione\nSe \"Manual\" la ricerca parte solo dopo aver premuto invio -> pu\u00F2 avere solo stile outline"
|
|
126
|
+
},
|
|
127
|
+
"attribute": "search-type",
|
|
128
|
+
"reflect": false,
|
|
129
|
+
"defaultValue": "'auto' || 'manual'"
|
|
130
|
+
},
|
|
131
|
+
"variant": {
|
|
132
|
+
"type": "string",
|
|
133
|
+
"mutable": false,
|
|
134
|
+
"complexType": {
|
|
135
|
+
"original": "string",
|
|
136
|
+
"resolved": "string",
|
|
137
|
+
"references": {}
|
|
138
|
+
},
|
|
139
|
+
"required": false,
|
|
140
|
+
"optional": false,
|
|
141
|
+
"docs": {
|
|
142
|
+
"tags": [],
|
|
143
|
+
"text": ""
|
|
144
|
+
},
|
|
145
|
+
"attribute": "variant",
|
|
146
|
+
"reflect": false,
|
|
147
|
+
"defaultValue": "'outline' || 'filled' || 'linear'"
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
static get events() {
|
|
152
|
+
return [{
|
|
153
|
+
"method": "search",
|
|
154
|
+
"name": "jump-search-bar",
|
|
155
|
+
"bubbles": true,
|
|
156
|
+
"cancelable": true,
|
|
157
|
+
"composed": true,
|
|
158
|
+
"docs": {
|
|
159
|
+
"tags": [],
|
|
160
|
+
"text": ""
|
|
161
|
+
},
|
|
162
|
+
"complexType": {
|
|
163
|
+
"original": "any",
|
|
164
|
+
"resolved": "any",
|
|
165
|
+
"references": {}
|
|
166
|
+
}
|
|
167
|
+
}];
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
//# sourceMappingURL=jump-search-bar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jump-search-bar.js","sourceRoot":"","sources":["../../../src/components/jump-search-bar/jump-search-bar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAiB,MAAM,eAAe,CAAC;AAO/E,MAAM,OAAO,aAAa;;QA6BxB,iEAAiE;QAEjE,kEAAkE;QAElE,kEAAkE;QAElE,kEAAkE;QAElE;;;WAGG;QACH,aAAQ,GAAG,GAAG,EAAE;YACd,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;gBACvB,MAAM,WAAW,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC;gBAE7C,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;gBACrC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC;YAC5C,CAAC;QACH,CAAC,CAAA;2BAvC6B,UAAU;0BACX,YAAY;4BAKV,GAAG;0BAML,MAAM,IAAI,QAAQ;uBAErB,SAAS,IAAI,QAAQ,IAAI,QAAQ;;IA4B3D,gCAAgC;IAClC,QAAQ,CAAC,EAAE,EAAE,KAAK,GAAG,IAAI,CAAC,YAAY;QACpC,IAAI,SAAS,CAAC;QAEd,OAAO,CAAC,GAAG,IAAI,EAAE,EAAE;YACjB,4BAA4B;YAC5B,IAAI,SAAS,EAAE,CAAC;gBACd,YAAY,CAAC,SAAS,CAAC,CAAC;YAC1B,CAAC;YACD,oBAAoB;YACpB,SAAS,GAAG,UAAU,CAAC,GAAG,EAAE;gBAC1B,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YACvB,CAAC,EAAE,KAAK,CAAC,CAAC;QACZ,CAAC,CAAC;IACJ,CAAC;IAAA,CAAC;IAEA,2DAA2D;IAE3D,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDACH,KAAK,EAAE,gBAAgB,GAAG,CAAC,IAAI,CAAC,UAAU,IAAI,QAAQ,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,GAAG,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC;YAEnH,8DACE,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,IAAI,EAAC,QAAQ,EAAC,EAAE,EAAE,IAAI,CAAC,UAAU,EAAE,KAAK,EAAC,cAAc,EAAC,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,GAAG,IAAI,CAAC,aAAa,GAAG,EAAsB,CAAA,CAAC,CAAC,EACpH,OAAO,EAAE,IAAI,CAAC,UAAU,KAAK,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,GAC5E;YACH,IAAI,CAAC,UAAU,KAAK,QAAQ;gBAC3B,oEAAa,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,OAAO,gBAAY,oBAAe,EAAC,EAAE,EAAC,QAAQ,EAAC,QAAQ,QAAC,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE;oBACvJ,kEAAW,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,kBAAkB,GAAa,CACjD,CAEX,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import { Component, Host, h, Prop, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'jump-search-bar',\n styleUrl: 'jump-search-bar.scss',\n shadow: true,\n})\nexport class JumpSearchBar {\n /* ---------------------- OWN PROPERTIES ---------------------- */\n\n /* ---------------------- @ELEMENT ---------------------------- */\n jumpSearchBar: HTMLInputElement;\n\n /* ---------------------- @STATE ------------------------- */\n\n /* ---------------------- @PROPERTIES ------------------------- */\n @Prop() placeholder: string = 'Cerca...';\n @Prop() identifier: string = 'search-bar';\n\n /**\n * Variabile per personalizzare il tempo di attesa prima di eseguire la ricerca\n */\n @Prop() debounceTime: number = 500;\n\n /**\n * Se \"Auto\" la ricerca parte automaticamente al termine della digitazione\n * Se \"Manual\" la ricerca parte solo dopo aver premuto invio -> può avere solo stile outline\n */\n @Prop() searchType: string = 'auto' || 'manual';\n\n @Prop() variant: string = 'outline' || 'filled' || 'linear';\n\n /* ---------------------- @EVENTS ------------------------- */\n @Event({ eventName: 'jump-search-bar' }) search: EventEmitter;\n\n\n /* ---------------------- @LIFECYCLE ------------------------- */\n\n /* -------------------- @LISTEN ------------------------------- */\n\n /* -------------------- @METHOD ------------------------------- */\n\n /* -------------------- LOCAL METHODS ------------------------- */\n\n /**\n * se searchType == 'manual' l'utente deve cliccare sul pulsante per eseguire la funzione\n * se searchType == 'auto' la funzione viene eseguita automaticamente al termine della digitazione\n */\n doSearch = () => {\n if (this.jumpSearchBar) {\n const searchValue = this.jumpSearchBar.value;\n\n console.log('doSearch', searchValue);\n this.search.emit({ search: searchValue });\n }\n }\n\n\n /** Used to filters/searchbar */\ndebounce(fn, delay = this.debounceTime) {\n let timeoutId;\n\n return (...args) => {\n // cancel the previous timer\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n // setup a new timer\n timeoutId = setTimeout(() => {\n fn.apply(null, args);\n }, delay);\n };\n};\n\n /* -------------------- RENDER ------------------------- */\n\n render() {\n return (\n <Host \n class={\"JumpSearchBar \" + (this.searchType == 'manual' ? 'manual outline' : (this.searchType + \" \" + this.variant))} \n >\n <input \n placeholder={this.placeholder} \n type=\"search\" id={this.identifier} class=\"search-input\" ref={(el) => { this.jumpSearchBar = el as HTMLInputElement }} \n onInput={this.searchType === 'auto' ? this.debounce(this.doSearch) : undefined}\n />\n {this.searchType === 'manual' &&\n <jump-button variant=\"secondary\" size=\"medium\" name=\"scopri\" value=\"value\" aria-label=\"Scopri di più\" id=\"button\" onlyIcon onClick={() => this.doSearch()}>\n <jump-icon slot=\"suffix\" name=\"magnifying-glass\"></jump-icon>\n </jump-button>\n }\n </Host>\n );\n }\n\n}\n"]}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { generateAttributesFromArgs, formatHtml } from "../../utils/utils";
|
|
2
|
+
export default {
|
|
3
|
+
title: 'Components/SearchBar (WIP)',
|
|
4
|
+
tags: ['autodocs'],
|
|
5
|
+
argTypes: {
|
|
6
|
+
identifier: {
|
|
7
|
+
name: 'identifier',
|
|
8
|
+
control: 'text',
|
|
9
|
+
description: 'L\'id dell\'elemento',
|
|
10
|
+
},
|
|
11
|
+
placeholder: {
|
|
12
|
+
name: 'placeholder',
|
|
13
|
+
control: 'text',
|
|
14
|
+
description: 'Il testo del placeholder',
|
|
15
|
+
},
|
|
16
|
+
searchType: {
|
|
17
|
+
name: 'searchType',
|
|
18
|
+
control: 'select',
|
|
19
|
+
options: ['auto', 'manual'],
|
|
20
|
+
description: "Scelta della modalità di ricerca tra quella automatica e quella manuale.",
|
|
21
|
+
},
|
|
22
|
+
variant: {
|
|
23
|
+
name: 'variant',
|
|
24
|
+
control: 'select',
|
|
25
|
+
options: ['filled', 'linear', 'outline'],
|
|
26
|
+
if: {
|
|
27
|
+
arg: 'searchType',
|
|
28
|
+
eq: 'auto',
|
|
29
|
+
},
|
|
30
|
+
description: 'Solo se tipologia "auto", Scelta dello stile della barra di ricerca tra filled, linear e outline.'
|
|
31
|
+
},
|
|
32
|
+
debounceTime: {
|
|
33
|
+
name: 'debounce-time',
|
|
34
|
+
control: 'number',
|
|
35
|
+
description: 'Il tempo di attesa per l\'invio della ricerca in caso di ricerca automatica.',
|
|
36
|
+
if: {
|
|
37
|
+
arg: 'searchType',
|
|
38
|
+
eq: 'auto',
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
const Template = (args) => {
|
|
44
|
+
const attributes = generateAttributesFromArgs(args);
|
|
45
|
+
return formatHtml(`<jump-search-bar ${attributes}></jump-search-bar>`);
|
|
46
|
+
};
|
|
47
|
+
export const SearchBar = Template.bind({});
|
|
48
|
+
SearchBar.args = {
|
|
49
|
+
placeholder: 'Cerca...',
|
|
50
|
+
searchType: 'manual',
|
|
51
|
+
};
|
|
52
|
+
export const SearchBarManual = Template.bind({});
|
|
53
|
+
SearchBarManual.args = {
|
|
54
|
+
placeholder: 'Cerca...',
|
|
55
|
+
searchType: 'manual',
|
|
56
|
+
};
|
|
57
|
+
export const SearchBarAutoOutline = Template.bind({});
|
|
58
|
+
SearchBarAutoOutline.args = {
|
|
59
|
+
placeholder: 'Cerca...',
|
|
60
|
+
searchType: 'auto',
|
|
61
|
+
variant: 'outline',
|
|
62
|
+
};
|
|
63
|
+
export const SearchBarAutoFilled = Template.bind({});
|
|
64
|
+
SearchBarAutoFilled.args = {
|
|
65
|
+
placeholder: 'Cerca...',
|
|
66
|
+
searchType: 'auto',
|
|
67
|
+
variant: 'filled',
|
|
68
|
+
};
|
|
69
|
+
export const SearchBarAutoLinear = Template.bind({});
|
|
70
|
+
SearchBarAutoLinear.args = {
|
|
71
|
+
placeholder: 'Cerca...',
|
|
72
|
+
searchType: 'auto',
|
|
73
|
+
variant: 'linear',
|
|
74
|
+
};
|
|
75
|
+
const TemplateWithListenerExample = (args, data) => {
|
|
76
|
+
let id = data.id;
|
|
77
|
+
const attributes = generateAttributesFromArgs(args);
|
|
78
|
+
return formatHtml(`<jump-search-bar ${attributes}></jump-search-bar>
|
|
79
|
+
<div>Il testo cercato è: <span id="page-text">loading..<span> </div>
|
|
80
|
+
<script>
|
|
81
|
+
(function() {
|
|
82
|
+
let container;
|
|
83
|
+
container = document.querySelector('#story--${id}');
|
|
84
|
+
container.querySelector('jump-search-bar').addEventListener('jump-search-bar', (ev) => {
|
|
85
|
+
container.querySelector('#page-text').innerText = ev.detail.search;
|
|
86
|
+
});
|
|
87
|
+
})();
|
|
88
|
+
</script>`);
|
|
89
|
+
};
|
|
90
|
+
export const SearchBarManualWithListener = TemplateWithListenerExample.bind({});
|
|
91
|
+
SearchBarManualWithListener.args = {
|
|
92
|
+
placeholder: 'Cerca...',
|
|
93
|
+
searchType: 'manual',
|
|
94
|
+
};
|
|
95
|
+
export const SearchBarAutoWithListener = TemplateWithListenerExample.bind({});
|
|
96
|
+
SearchBarAutoWithListener.args = {
|
|
97
|
+
placeholder: 'Cerca...',
|
|
98
|
+
searchType: 'auto',
|
|
99
|
+
};
|
|
100
|
+
//# sourceMappingURL=jump-search-bar.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jump-search-bar.stories.js","sourceRoot":"","sources":["../../../src/components/jump-search-bar/jump-search-bar.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAE1E,eAAe;IACX,KAAK,EAAE,4BAA4B;IACnC,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,QAAQ,EAAE;QACN,UAAU,EAAE;YACR,IAAI,EAAE,YAAY;YAClB,OAAO,EAAE,MAAM;YACf,WAAW,EAAE,sBAAsB;SACtC;QACD,WAAW,EAAE;YACT,IAAI,EAAE,aAAa;YACnB,OAAO,EAAE,MAAM;YACf,WAAW,EAAE,0BAA0B;SAC1C;QACD,UAAU,EAAE;YACR,IAAI,EAAE,YAAY;YAClB,OAAO,EAAE,QAAQ;YACjB,OAAO,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;YAC3B,WAAW,EAAE,0EAA0E;SAC1F;QACD,OAAO,EAAE;YACL,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,QAAQ;YACjB,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAC;YACxC,EAAE,EAAE;gBACA,GAAG,EAAE,YAAY;gBACjB,EAAE,EAAE,MAAM;aACb;YACD,WAAW,EAAE,mGAAmG;SACnH;QACD,YAAY,EAAE;YACV,IAAI,EAAE,eAAe;YACrB,OAAO,EAAE,QAAQ;YACjB,WAAW,EAAE,8EAA8E;YAC3F,EAAE,EAAE;gBACA,GAAG,EAAE,YAAY;gBACjB,EAAE,EAAE,MAAM;aACb;SACJ;KACJ;CACJ,CAAA;AAED,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,EAAE;IACtB,MAAM,UAAU,GAAG,0BAA0B,CAAC,IAAI,CAAC,CAAC;IACpD,OAAO,UAAU,CAAC,oBAAoB,UAAU,qBAAqB,CAAC,CAAC;AAC3E,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC3C,SAAS,CAAC,IAAI,GAAG;IACb,WAAW,EAAE,UAAU;IACvB,UAAU,EAAE,QAAQ;CACvB,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACjD,eAAe,CAAC,IAAI,GAAG;IACnB,WAAW,EAAE,UAAU;IACvB,UAAU,EAAE,QAAQ;CACvB,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACtD,oBAAoB,CAAC,IAAI,GAAG;IACxB,WAAW,EAAE,UAAU;IACvB,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,SAAS;CACrB,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACrD,mBAAmB,CAAC,IAAI,GAAG;IACvB,WAAW,EAAE,UAAU;IACvB,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,QAAQ;CACpB,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACrD,mBAAmB,CAAC,IAAI,GAAG;IACvB,WAAW,EAAE,UAAU;IACvB,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,QAAQ;CACpB,CAAC;AAEF,MAAM,2BAA2B,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE;IAC/C,IAAI,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;IACjB,MAAM,UAAU,GAAG,0BAA0B,CAAC,IAAI,CAAC,CAAC;IACpD,OAAO,UAAU,CAAC,oBAAoB,UAAU;;;;;kEAKc,EAAE;;;;;kBAKlD,CAAC,CAAC;AACpB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG,2BAA2B,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAChF,2BAA2B,CAAC,IAAI,GAAG;IAC/B,WAAW,EAAE,UAAU;IACvB,UAAU,EAAE,QAAQ;CACvB,CAAC;AAEF,MAAM,CAAC,MAAM,yBAAyB,GAAG,2BAA2B,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC9E,yBAAyB,CAAC,IAAI,GAAG;IAC7B,WAAW,EAAE,UAAU;IACvB,UAAU,EAAE,MAAM;CACrB,CAAC","sourcesContent":["import { generateAttributesFromArgs, formatHtml} from '../../utils/utils';\n\nexport default {\n title: 'Components/SearchBar (WIP)',\n tags: ['autodocs'],\n argTypes: {\n identifier: {\n name: 'identifier',\n control: 'text',\n description: 'L\\'id dell\\'elemento',\n },\n placeholder: {\n name: 'placeholder',\n control: 'text',\n description: 'Il testo del placeholder',\n },\n searchType: {\n name: 'searchType',\n control: 'select',\n options: ['auto', 'manual'],\n description: \"Scelta della modalità di ricerca tra quella automatica e quella manuale.\",\n },\n variant: {\n name: 'variant',\n control: 'select',\n options: ['filled', 'linear', 'outline'],\n if: {\n arg: 'searchType',\n eq: 'auto',\n },\n description: 'Solo se tipologia \"auto\", Scelta dello stile della barra di ricerca tra filled, linear e outline.'\n },\n debounceTime: {\n name: 'debounce-time',\n control: 'number',\n description: 'Il tempo di attesa per l\\'invio della ricerca in caso di ricerca automatica.',\n if: {\n arg: 'searchType',\n eq: 'auto',\n }\n }\n }\n}\n\nconst Template = (args) => {\n const attributes = generateAttributesFromArgs(args);\n return formatHtml(`<jump-search-bar ${attributes}></jump-search-bar>`);\n}\n\nexport const SearchBar = Template.bind({});\nSearchBar.args = {\n placeholder: 'Cerca...',\n searchType: 'manual',\n};\n\nexport const SearchBarManual = Template.bind({});\nSearchBarManual.args = {\n placeholder: 'Cerca...',\n searchType: 'manual',\n};\n\nexport const SearchBarAutoOutline = Template.bind({});\nSearchBarAutoOutline.args = {\n placeholder: 'Cerca...',\n searchType: 'auto',\n variant: 'outline',\n};\n\nexport const SearchBarAutoFilled = Template.bind({});\nSearchBarAutoFilled.args = {\n placeholder: 'Cerca...',\n searchType: 'auto',\n variant: 'filled',\n};\n\nexport const SearchBarAutoLinear = Template.bind({});\nSearchBarAutoLinear.args = {\n placeholder: 'Cerca...',\n searchType: 'auto',\n variant: 'linear',\n};\n\nconst TemplateWithListenerExample = (args, data) => {\n let id = data.id;\n const attributes = generateAttributesFromArgs(args);\n return formatHtml(`<jump-search-bar ${attributes}></jump-search-bar>\n <div>Il testo cercato è: <span id=\"page-text\">loading..<span> </div>\n <script>\n (function() {\n let container; \n container = document.querySelector('#story--${id}');\n container.querySelector('jump-search-bar').addEventListener('jump-search-bar', (ev) => {\n container.querySelector('#page-text').innerText = ev.detail.search;\n });\n })();\n </script>`);\n};\n\nexport const SearchBarManualWithListener = TemplateWithListenerExample.bind({});\nSearchBarManualWithListener.args = {\n placeholder: 'Cerca...',\n searchType: 'manual',\n};\n\nexport const SearchBarAutoWithListener = TemplateWithListenerExample.bind({});\nSearchBarAutoWithListener.args = {\n placeholder: 'Cerca...',\n searchType: 'auto',\n};\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { newE2EPage } from "@stencil/core/testing";
|
|
2
|
+
describe('jump-search-bar', () => {
|
|
3
|
+
it('renders', async () => {
|
|
4
|
+
const page = await newE2EPage();
|
|
5
|
+
await page.setContent('<jump-search-bar></jump-search-bar>');
|
|
6
|
+
const element = await page.find('jump-search-bar');
|
|
7
|
+
expect(element).toHaveClass('hydrated');
|
|
8
|
+
});
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=jump-search-bar.e2e.js.map
|