@jumpgroup/jump-design-system 0.3.43 → 0.3.45
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-filter.cjs.entry.js +1 -1
- package/dist/cjs/jump-filter.cjs.entry.js.map +1 -1
- package/dist/cjs/jump-tab-item.cjs.entry.js +1 -1
- package/dist/cjs/jump-tab-item.cjs.entry.js.map +1 -1
- package/dist/cjs/jump-tab.cjs.entry.js +1 -1
- package/dist/cjs/jump-tab.cjs.entry.js.map +1 -1
- package/dist/collection/components/jump-filter/jump-filter.css +6 -1
- package/dist/collection/components/jump-tab/jump-tab.css +31 -9
- package/dist/collection/components/jump-tab-item/jump-tab-item.css +1 -0
- package/dist/components/jump-filter.js +1 -1
- package/dist/components/jump-filter.js.map +1 -1
- package/dist/components/jump-tab-item.js +1 -1
- package/dist/components/jump-tab-item.js.map +1 -1
- package/dist/components/jump-tab.js +1 -1
- package/dist/components/jump-tab.js.map +1 -1
- package/dist/esm/jump-filter.entry.js +1 -1
- package/dist/esm/jump-filter.entry.js.map +1 -1
- package/dist/esm/jump-tab-item.entry.js +1 -1
- package/dist/esm/jump-tab-item.entry.js.map +1 -1
- package/dist/esm/jump-tab.entry.js +1 -1
- package/dist/esm/jump-tab.entry.js.map +1 -1
- package/dist/jump-design-system/jump-design-system.esm.js +1 -1
- package/dist/jump-design-system/p-18df1585.entry.js +2 -0
- package/dist/jump-design-system/p-18df1585.entry.js.map +1 -0
- package/dist/jump-design-system/p-6363b6ee.entry.js +2 -0
- package/dist/jump-design-system/p-6363b6ee.entry.js.map +1 -0
- package/dist/jump-design-system/p-b964700e.entry.js +2 -0
- package/dist/jump-design-system/p-b964700e.entry.js.map +1 -0
- package/package.json +1 -1
- package/dist/jump-design-system/p-26d18480.entry.js +0 -2
- package/dist/jump-design-system/p-26d18480.entry.js.map +0 -1
- package/dist/jump-design-system/p-87d6c01a.entry.js +0 -2
- package/dist/jump-design-system/p-87d6c01a.entry.js.map +0 -1
- package/dist/jump-design-system/p-e441d6ea.entry.js +0 -2
- package/dist/jump-design-system/p-e441d6ea.entry.js.map +0 -1
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-97b3526b.js');
|
|
6
6
|
|
|
7
|
-
const jumpFilterCss = ":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:
|
|
7
|
+
const jumpFilterCss = ":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}";
|
|
8
8
|
const JumpFilterStyle0 = jumpFilterCss;
|
|
9
9
|
|
|
10
10
|
const JumpFilter = class {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"jump-filter.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,aAAa,GAAG,
|
|
1
|
+
{"file":"jump-filter.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,aAAa,GAAG,ujDAAujD,CAAC;AAC9kD,yBAAe,aAAa;;MCMf,UAAU;;;yBAE0B,UAAU;6BACzB,YAAY;iCACR,QAAQ;gCACT,SAAS;+BACV,GAAG;;yBAER,KAAK;gCACE,KAAK;6BAER,CAAC;iCACI,KAAK;wBACd,KAAK;gCACE,wBAAwB;;IAM5D,mBAAmB,CAAC,KAAkB;;QAEpC,IAAI,CAAC,OAAO,mCAAQ,IAAI,CAAC,OAAO,KAAE,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,GAAE,CAAC;QAC7E,OAAO,CAAC,GAAG,CAAC,0CAA0C,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;;KAIvE;IAGD,YAAY;QACV,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,UAAU,GAAG,IAAI,CAAC,eAAe,CAAC;KAC1D;IAGD,YAAY,CAAC,QAAiB,E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,IAChB,IAAI,CAAC,aAAa,GAAG,CAAC;YACrBA,yEAAY,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAC,SAAS,EAAC,IAAI,QAAC,SAAS,EAAC,KAAK,QAAe,CACpG,CACK,EAEb,IAAI,CAAC,gBAAgB;YACpBA,kEAAK,KAAK,EAAE,IAAI,CAAC,gBAAgB,EAC5B,OAAO,EAAE,MAAM,IAAI,CAAC,iBAAiB,GAAG,KAAK,GAAQ,EAE3DA,kEACC,GAAG,EAAE,CAAC,EAAE;gBACN,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC;aACzB,EACD,KAAK,EAAC,eAAe,kBAAe,IAAI,CAAC,SAAS,IACjD,CAAC,IAAI,CAAC,QAAQ;YACbA,kEAAK,KAAK,EAAE,uBAAuB,IACjCA,wEAAW,KAAK,EAAC,OAAO,EAAC,IAAI,EAAE,IAAI,CAAC,gBAAgB,GAAc,EAClEA,mEAAK,IAAI,CAAC,aAAa,CAAM,CACzB,EACP,IAAI,CAAC,QAAQ,IAAIA,wEAAW,OAAO,EAAC,QAAQ,EAAC,IAAI,EAAC,GAAG,EAAC,IAAI,EAAC,OAAO,EAAC,KAAK,EAAC,EAAE,EAAC,KAAK,EAAE,sBAAsB,EAC7E,OAAO,EAAE,MAAM,IAAI,CAAC,iBAAiB,GAAG,KAAK,GAAc,EACxFA,oEAAa,CACT,CACD,EACP;KACH;;;;;;;;;","names":["h","Host"],"sources":["src/components/jump-filter/jump-filter.scss?tag=jump-filter&encapsulation=shadow","src/components/jump-filter/jump-filter.tsx"],"sourcesContent":[":host {\n --primary-standard: var(--secondary-hard, #435171);\n //--jump-button-background-hover: var(--secondary-hard, #435171);\n --jump-button-background-hover: red;\n --bg-drawer: var(--bg-drawer, #fff);\n --header-height: var(--header-height, 80px);\n --drawer-width: var(--drawer-width, 240px);\n --overlay-bg-color: var(--overlay-bg-color, rgba(0, 0, 0, 0.35));\n\n h3 {\n margin: 0;\n }\n}\n\n@mixin fade-in-out($duration: 0.3s, $ease: ease-in-out) {\n opacity: 0;\n transition: opacity $duration $ease;\n\n &.filtersDrawer__overlay--active {\n opacity: 1;\n }\n}\n\n.filtersDrawer__overlay {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n background-color: var(--overlay-bg-color, rgba(0, 0, 0, 0.35));\n z-index: 1;\n width: 100vw;\n height: 100vh;\n display: none;\n\n &.filtersDrawer__overlay--active {\n display: block;\n }\n\n @include fade-in-out();\n}\n\n.filtersDrawer {\n position: fixed;\n display: flex;\n flex-direction: column;\n gap: 2.5rem;\n left: -100vw;\n top: 0;\n height: -webkit-fill-available;\n max-height: calc(100vh - var(--header-height));\n transition: 0.3s all ease-in-out;\n background-color: var(--bg-drawer, #fff);\n padding: 1rem;\n width: 100%;\n max-width: var(--drawer-width);\n box-shadow: 8px 0 15px 0 #00000026;\n z-index: 2;\n overflow: auto;\n\n &[aria-hidden=\"false\"] {\n left: 0;\n right: 0;\n width: auto;\n transition: 0.3s all ease-in-out;\n\n .filtersDrawer__close {\n position: fixed;\n top: calc(var(--header-height) + 1rem);\n left: calc(var(--drawer-width) - 2rem);\n }\n }\n\n @media (min-width: 768px) { //md breakpoint tailwind\n position: relative;\n left: 0;\n height: auto;\n max-width: initial;\n max-height: initial;\n box-shadow: none;\n }\n\n @media (max-width: 767px) {\n top: var(--header-height);\n }\n\n .filtersDrawer__header {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n gap: 0.5rem;\n }\n}\n","import { Component, Host, Prop, h, State, Listen, Method, Watch } from '@stencil/core';\n\n@Component({\n tag: 'jump-filter',\n styleUrl: 'jump-filter.scss',\n shadow: true,\n})\nexport class JumpFilter {\n\n @Prop() direction: 'horizontal' | 'vertical' = 'vertical';\n @Prop() filterHeading: string = 'Filtra per';\n @Prop() filterButtonLabel: string = 'Filtri';\n @Prop() filterButtonIcon: string = 'sliders';\n @Prop() mobileThreshold: number = 768;\n @Prop() filters: any;\n @Prop() showCount: boolean = false;\n @Prop() offCanvasOverlay: boolean = false;\n\n @State() activeFilters: number = 0;\n @State() showMobileFilters: boolean = false;\n @State() isMobile: boolean = false;\n @State() offCanvasClasses: string = 'filtersDrawer__overlay';\n\n mobileToggle: HTMLElement | null;\n filtersDrawer: HTMLElement;\n\n @Listen('jump-filterchange')\n filterChangeHandler(event: CustomEvent) {\n //set this.filter as this.filters[event.detail.name] = event.detail.value; even if not present\n this.filters = { ...this.filters, [event.detail.name]: event.detail.values };\n console.log('Received the custom filterChange event: ', this.filters);\n\n\n //TODO: increment this.activeFilters\n }\n\n @Listen('resize', { target: 'window' })\n handleResize() {\n this.isMobile = window.innerWidth < this.mobileThreshold;\n }\n\n @Watch('showMobileFilters')\n watchHandler(newValue: boolean, oldValue: boolean) {\n if (newValue !== oldValue) {\n if (newValue) {\n this.mobileToggle?.setAttribute('aria-expanded', 'true');\n this.filtersDrawer?.setAttribute('aria-hidden', 'false');\n this.offCanvasClasses = 'filtersDrawer__overlay filtersDrawer__overlay--active';\n } else {\n this.mobileToggle?.setAttribute('aria-expanded', 'false');\n this.filtersDrawer?.setAttribute('aria-hidden', 'true');\n this.offCanvasClasses = 'filtersDrawer__overlay';\n }\n }\n }\n\n /**\n * Get the active filters from the component\n */\n @Method()\n async getFilters() {\n return this.filters;\n }\n\n componentDidLoad() {\n this.handleResize();\n }\n\n render() {\n return (\n <Host mobileFilters={this.showMobileFilters}>\n {this.isMobile && <jump-button\n ref={(el) => {\n this.mobileToggle = el;\n }}\n buttonId={this.filterButtonIcon} variant={'primary'} outline\n onClick={() => this.showMobileFilters = !this.showMobileFilters}>\n <slot name=\"prefix\">\n {this.filterButtonIcon &&\n <jump-icon library=\"fa\" category=\"regular\" name={this.filterButtonIcon} size=\"small\"></jump-icon>}\n {this.filterButtonLabel}\n </slot>\n <slot name=\"suffix\">\n {this.activeFilters > 0 &&\n <jump-badge label={this.activeFilters.toString()} variant=\"success\" soft dimension=\"dot\">1</jump-badge>}\n </slot>\n </jump-button>}\n\n {this.offCanvasOverlay &&\n <div class={this.offCanvasClasses}\n onClick={() => this.showMobileFilters = false}></div>}\n\n {<div\n ref={(el) => {\n this.filtersDrawer = el;\n }}\n class=\"filtersDrawer\" data-variant={this.direction}>\n {!this.isMobile &&\n <div class={'filtersDrawer__header'}>\n <jump-icon class=\"small\" name={this.filterButtonIcon}></jump-icon>\n <h3>{this.filterHeading}</h3>\n </div>}\n {this.isMobile && <jump-icon library=\"lucide\" name=\"x\" size=\"small\" label=\"\" class={'filtersDrawer__close'}\n onClick={() => this.showMobileFilters = false}></jump-icon>}\n <slot></slot>\n </div>}\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-97b3526b.js');
|
|
6
6
|
|
|
7
|
-
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)}:host .Content{display:flex;}:host .Content:hover:not(.disabled){cursor:pointer}:host .Content label{font-size:16px}: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:12px 24px;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:15px 39px;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:12px 32px;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:12px 32px;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}";
|
|
7
|
+
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:16px}: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:12px 24px;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:15px 39px;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:12px 32px;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:12px 32px;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}";
|
|
8
8
|
const JumpTabItemStyle0 = jumpTabItemCss;
|
|
9
9
|
|
|
10
10
|
const JumpTabItem = class {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"jump-tab-item.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,cAAc,GAAG,
|
|
1
|
+
{"file":"jump-tab-item.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,cAAc,GAAG,0gFAA0gF,CAAC;AACliF,0BA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,EAAC,SAAS,EAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAC,OAAO,GAAa,EAE3FA,mEAAM,KAAK,EAAC,OAAO,IAAE,IAAI,CAAC,KAAK,CAAQ,CACnC,CACD,EACP;KACH;;;;;;","names":["h","Host"],"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 \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: 16px;\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: 12px 24px;\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: 15px 39px;\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: 12px 32px;\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: 12px 32px;\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}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-97b3526b.js');
|
|
6
6
|
|
|
7
|
-
const jumpTabCss = ":host{display:block;--jump-tab-bg-color:var(--gray-ultralight, #f8f8f8);--jump-tab-border-color:var(--neutral-grey-disabled, #CBCBCB)}:host
|
|
7
|
+
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)}.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}";
|
|
8
8
|
const JumpTabStyle0 = jumpTabCss;
|
|
9
9
|
|
|
10
10
|
const JumpTab = class {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"jump-tab.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,UAAU,GAAG,
|
|
1
|
+
{"file":"jump-tab.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,UAAU,GAAG,+9BAA+9B,CAAC;AACn/B,sBAAe,UAAU;;MCMZ,OAAO;;;;wBAGU,KAAK;yBACL,MAAM;0BACJ,KAAK;4BACJ,SAAS;uBACd,QAAQ;;IAKlC,sBAAsB,CAAC,KAAkB;QACvC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAErC,MAAM,UAAU,GAAG,gBAAgB,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;QAC9D,MAAM,YAAY,GAAG,UAAU,CAAC,gBAAgB,CAAC,0BAA0B,CAAC,CAAC,IAAI,EAAE,CAAC;QAEpF,IAAI,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC;QAC7D,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;YACpB,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI;gBACjB,IAAI,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,KAAK,KAAK,CAAC,MAAM,CAAC,EAAE,EAAE;oBACvD,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;oBAEhC,IAAI,IAAI,CAAC,OAAO,KAAK,OAAO,EAAE;wBAC5B,KAAK,CAAC,OAAO,CAAC,CA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C5B,CACF,CACD,EACP;KACH;IAEO,YAAY,CAAC,SAAiB;QACpC,QAAQ,SAAS;YACf,KAAK,QAAQ;gBACX,OAAO,QAAQ,CAAC;YAClB,KAAK,OAAO;gBACV,OAAO,UAAU,CAAC;YACpB;gBACE,OAAO,YAAY,CAAC;SACvB;KACF;;;;;;","names":["h","Host"],"sources":["src/components/jump-tab/jump-tab.scss?tag=jump-tab&encapsulation=shadow","src/components/jump-tab/jump-tab.tsx"],"sourcesContent":[":host {\n display: block;\n\n --jump-tab-bg-color: var(--gray-ultralight, #f8f8f8);\n --jump-tab-border-color: var(--neutral-grey-disabled, #CBCBCB);\n\n /* Permette lo scroll orizzontale */\n overflow-x: auto;\n scrollbar-width: none;\n /* Nasconde la scrollbar in Firefox */\n}\n\n:host::-webkit-scrollbar {\n display: none;\n /* Nasconde la scrollbar in Chrome, Safari e Edge */\n}\n\n.Wrapper {\n display: flex;\n flex-direction: column;\n\n /* Permette lo scroll orizzontale */\n overflow-x: auto;\n scrollbar-width: none;\n /* Nasconde la scrollbar in Firefox */\n}\n\n.Wrapper::-webkit-scrollbar {\n display: none;\n /* Nasconde la scrollbar in Chrome, Safari e Edge */\n}\n\n.ContentWrapper {\n display: flex;\n width: 100%;\n justify-content: var(--alignment, flex-start);\n}\n\n.Content {\n display: flex;\n flex-direction: row;\n align-items: flex-end;\n width: fit-content;\n\n &.fullBorder {\n width: 100%;\n border-bottom: 1px solid var(--jump-tab-border-color);\n justify-content: var(--alignment, flex-start);\n }\n\n &.fullBorder.inline ::slotted([slot=\"tab-item\"]) {\n margin-bottom: -1px;\n }\n\n &.rounded {\n border-radius: 50px;\n background-color: var(--jump-tab-bg-color);\n }\n\n &.disabled {\n cursor: not-allowed;\n opacity: 0.5;\n pointer-events: none;\n }\n}\n\njump-tab-item {\n display: flex;\n align-items: flex-end;\n overflow: hidden;\n\n .tab-title {\n display: block;\n white-space: normal;\n text-align: center;\n }\n}","import { Component, Host, Event, EventEmitter, Prop, h, Listen } from '@stencil/core';\n\n@Component({\n tag: 'jump-tab',\n styleUrl: 'jump-tab.scss',\n shadow: true,\n})\nexport class JumpTab {\n JumpTabEl: HTMLElement;\n\n @Prop() disabled: boolean = false;\n @Prop() alignment: string = 'left';\n @Prop() fullBorder: boolean = false;\n @Prop() tabGroupName: string = undefined;\n @Prop() variant: string = 'inline';\n\n @Event({ eventName: 'jump-change-activetab' }) setActiveTab: EventEmitter;\n\n @Listen('jump-change-active-tab')\n changeActiveTabHandler(event: CustomEvent) {\n this.setActiveTab.emit(event.detail);\n\n const rootStyles = getComputedStyle(document.documentElement);\n const primaryColor = rootStyles.getPropertyValue('--neutral-grey-secondary').trim();\n\n let items = this.JumpTabEl.querySelectorAll('jump-tab-item');\n if (items.length > 0) {\n items.forEach((item) => {\n if (item.getAttribute('identifier') === event.detail.id) {\n item.setAttribute('active', '');\n\n if (this.variant === 'sheet') {\n items.forEach((sibling, index) => {\n if (sibling !== item && index !== items.length - 1) {\n sibling.style.borderRight = `1px solid ${primaryColor}`;\n } else {\n sibling.style.borderRight = '1px solid transparent';\n }\n });\n\n let previousSibling = item.previousElementSibling as any;\n if (previousSibling) {\n previousSibling.style.borderRight = '1px solid transparent';\n }\n }\n\n } else {\n item.removeAttribute('active');\n }\n });\n }\n\n let panel = this.JumpTabEl.querySelectorAll('jump-tab-panel');\n if (panel.length > 0) {\n panel.forEach((panel) => {\n if (panel.getAttribute('identifier') === event.detail.id) {\n panel.setAttribute('active', '');\n } else {\n panel.removeAttribute('active');\n }\n });\n }\n }\n\n componentDidLoad() {\n if (this.variant === 'sheet') {\n const rootStyles = getComputedStyle(document.documentElement);\n const primaryColor = rootStyles.getPropertyValue('--neutral-grey-secondary').trim();\n\n let items = this.JumpTabEl.querySelectorAll('jump-tab-item');\n if (items.length > 0) {\n items.forEach((item, index) => {\n if (index === items.length - 1 || item.classList.contains('active')) {\n item.style.borderRight = '1px solid transparent';\n } else {\n item.style.borderRight = `1px solid ${primaryColor}`;\n }\n });\n }\n }\n }\n\n render() {\n return (\n <Host class={\"JumpTab \" + this.variant} id={this.tabGroupName} ref={(el) => { this.JumpTabEl = el; }}>\n <div class={\"Wrapper \" + (this.fullBorder ? 'fullBorder' : '')}>\n <div class={\"ContentWrapper\"} style={{ '--alignment': this.getAlignment(this.alignment) }}>\n <div class={\"Content \" + this.variant + \" \" + (this.disabled ? 'disabled' : '') + \" \" + (this.fullBorder ? 'fullBorder' : '')} style={{ '--alignment': this.getAlignment(this.alignment) }}>\n <slot name=\"tab-item\"></slot>\n </div>\n </div>\n <div class=\"ContentWrapper\">\n <slot name=\"tab-content\"></slot>\n </div>\n </div>\n </Host>\n );\n }\n\n private getAlignment(alignment: string): string {\n switch (alignment) {\n case 'center':\n return 'center';\n case 'right':\n return 'flex-end';\n default:\n return 'flex-start';\n }\n }\n}\n"],"version":3}
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
flex-direction: column;
|
|
37
37
|
gap: 2.5rem;
|
|
38
38
|
left: -100vw;
|
|
39
|
-
top:
|
|
39
|
+
top: 0;
|
|
40
40
|
height: -webkit-fill-available;
|
|
41
41
|
max-height: calc(100vh - var(--header-height));
|
|
42
42
|
transition: 0.3s all ease-in-out;
|
|
@@ -69,6 +69,11 @@
|
|
|
69
69
|
box-shadow: none;
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
+
@media (max-width: 767px) {
|
|
73
|
+
.filtersDrawer {
|
|
74
|
+
top: var(--header-height);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
72
77
|
.filtersDrawer .filtersDrawer__header {
|
|
73
78
|
display: flex;
|
|
74
79
|
justify-content: flex-start;
|
|
@@ -2,45 +2,67 @@
|
|
|
2
2
|
display: block;
|
|
3
3
|
--jump-tab-bg-color: var(--gray-ultralight, #f8f8f8);
|
|
4
4
|
--jump-tab-border-color: var(--neutral-grey-disabled, #CBCBCB);
|
|
5
|
+
/* Permette lo scroll orizzontale */
|
|
6
|
+
overflow-x: auto;
|
|
7
|
+
scrollbar-width: none;
|
|
8
|
+
/* Nasconde la scrollbar in Firefox */
|
|
5
9
|
}
|
|
6
|
-
|
|
10
|
+
|
|
11
|
+
:host::-webkit-scrollbar {
|
|
12
|
+
display: none;
|
|
13
|
+
/* Nasconde la scrollbar in Chrome, Safari e Edge */
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.Wrapper {
|
|
7
17
|
display: flex;
|
|
8
18
|
flex-direction: column;
|
|
19
|
+
/* Permette lo scroll orizzontale */
|
|
20
|
+
overflow-x: auto;
|
|
21
|
+
scrollbar-width: none;
|
|
22
|
+
/* Nasconde la scrollbar in Firefox */
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.Wrapper::-webkit-scrollbar {
|
|
26
|
+
display: none;
|
|
27
|
+
/* Nasconde la scrollbar in Chrome, Safari e Edge */
|
|
9
28
|
}
|
|
10
|
-
|
|
29
|
+
|
|
30
|
+
.ContentWrapper {
|
|
11
31
|
display: flex;
|
|
12
32
|
width: 100%;
|
|
13
33
|
justify-content: var(--alignment, flex-start);
|
|
14
34
|
}
|
|
15
|
-
|
|
35
|
+
|
|
36
|
+
.Content {
|
|
16
37
|
display: flex;
|
|
17
38
|
flex-direction: row;
|
|
18
39
|
align-items: flex-end;
|
|
19
40
|
width: fit-content;
|
|
20
41
|
}
|
|
21
|
-
|
|
42
|
+
.Content.fullBorder {
|
|
22
43
|
width: 100%;
|
|
23
44
|
border-bottom: 1px solid var(--jump-tab-border-color);
|
|
24
45
|
justify-content: var(--alignment, flex-start);
|
|
25
46
|
}
|
|
26
|
-
|
|
47
|
+
.Content.fullBorder.inline ::slotted([slot=tab-item]) {
|
|
27
48
|
margin-bottom: -1px;
|
|
28
49
|
}
|
|
29
|
-
|
|
50
|
+
.Content.rounded {
|
|
30
51
|
border-radius: 50px;
|
|
31
52
|
background-color: var(--jump-tab-bg-color);
|
|
32
53
|
}
|
|
33
|
-
|
|
54
|
+
.Content.disabled {
|
|
34
55
|
cursor: not-allowed;
|
|
35
56
|
opacity: 0.5;
|
|
36
57
|
pointer-events: none;
|
|
37
58
|
}
|
|
38
|
-
|
|
59
|
+
|
|
60
|
+
jump-tab-item {
|
|
39
61
|
display: flex;
|
|
40
62
|
align-items: flex-end;
|
|
41
63
|
overflow: hidden;
|
|
42
64
|
}
|
|
43
|
-
|
|
65
|
+
jump-tab-item .tab-title {
|
|
44
66
|
display: block;
|
|
45
67
|
white-space: normal;
|
|
46
68
|
text-align: center;
|
|
@@ -3,7 +3,7 @@ import { d as defineCustomElement$4 } from './jump-badge2.js';
|
|
|
3
3
|
import { d as defineCustomElement$3 } from './jump-button2.js';
|
|
4
4
|
import { d as defineCustomElement$2 } from './jump-icon2.js';
|
|
5
5
|
|
|
6
|
-
const jumpFilterCss = ":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:
|
|
6
|
+
const jumpFilterCss = ":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}";
|
|
7
7
|
const JumpFilterStyle0 = jumpFilterCss;
|
|
8
8
|
|
|
9
9
|
const JumpFilter$1 = /*@__PURE__*/ proxyCustomElement(class JumpFilter extends HTMLElement {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"jump-filter.js","mappings":";;;;;AAAA,MAAM,aAAa,GAAG,
|
|
1
|
+
{"file":"jump-filter.js","mappings":";;;;;AAAA,MAAM,aAAa,GAAG,ujDAAujD,CAAC;AAC9kD,yBAAe,aAAa;;MCMfA,YAAU;;;;;yBAE0B,UAAU;6BACzB,YAAY;iCACR,QAAQ;gCACT,SAAS;+BACV,GAAG;;yBAER,KAAK;gCACE,KAAK;6BAER,CAAC;iCACI,KAAK;wBACd,KAAK;gCACE,wBAAwB;;IAM5D,mBAAmB,CAAC,KAAkB;;QAEpC,IAAI,CAAC,OAAO,mCAAQ,IAAI,CAAC,OAAO,KAAE,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,GAAG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ter.scss?tag=jump-filter&encapsulation=shadow","src/components/jump-filter/jump-filter.tsx"],"sourcesContent":[":host {\n --primary-standard: var(--secondary-hard, #435171);\n //--jump-button-background-hover: var(--secondary-hard, #435171);\n --jump-button-background-hover: red;\n --bg-drawer: var(--bg-drawer, #fff);\n --header-height: var(--header-height, 80px);\n --drawer-width: var(--drawer-width, 240px);\n --overlay-bg-color: var(--overlay-bg-color, rgba(0, 0, 0, 0.35));\n\n h3 {\n margin: 0;\n }\n}\n\n@mixin fade-in-out($duration: 0.3s, $ease: ease-in-out) {\n opacity: 0;\n transition: opacity $duration $ease;\n\n &.filtersDrawer__overlay--active {\n opacity: 1;\n }\n}\n\n.filtersDrawer__overlay {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n background-color: var(--overlay-bg-color, rgba(0, 0, 0, 0.35));\n z-index: 1;\n width: 100vw;\n height: 100vh;\n display: none;\n\n &.filtersDrawer__overlay--active {\n display: block;\n }\n\n @include fade-in-out();\n}\n\n.filtersDrawer {\n position: fixed;\n display: flex;\n flex-direction: column;\n gap: 2.5rem;\n left: -100vw;\n top: 0;\n height: -webkit-fill-available;\n max-height: calc(100vh - var(--header-height));\n transition: 0.3s all ease-in-out;\n background-color: var(--bg-drawer, #fff);\n padding: 1rem;\n width: 100%;\n max-width: var(--drawer-width);\n box-shadow: 8px 0 15px 0 #00000026;\n z-index: 2;\n overflow: auto;\n\n &[aria-hidden=\"false\"] {\n left: 0;\n right: 0;\n width: auto;\n transition: 0.3s all ease-in-out;\n\n .filtersDrawer__close {\n position: fixed;\n top: calc(var(--header-height) + 1rem);\n left: calc(var(--drawer-width) - 2rem);\n }\n }\n\n @media (min-width: 768px) { //md breakpoint tailwind\n position: relative;\n left: 0;\n height: auto;\n max-width: initial;\n max-height: initial;\n box-shadow: none;\n }\n\n @media (max-width: 767px) {\n top: var(--header-height);\n }\n\n .filtersDrawer__header {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n gap: 0.5rem;\n }\n}\n","import { Component, Host, Prop, h, State, Listen, Method, Watch } from '@stencil/core';\n\n@Component({\n tag: 'jump-filter',\n styleUrl: 'jump-filter.scss',\n shadow: true,\n})\nexport class JumpFilter {\n\n @Prop() direction: 'horizontal' | 'vertical' = 'vertical';\n @Prop() filterHeading: string = 'Filtra per';\n @Prop() filterButtonLabel: string = 'Filtri';\n @Prop() filterButtonIcon: string = 'sliders';\n @Prop() mobileThreshold: number = 768;\n @Prop() filters: any;\n @Prop() showCount: boolean = false;\n @Prop() offCanvasOverlay: boolean = false;\n\n @State() activeFilters: number = 0;\n @State() showMobileFilters: boolean = false;\n @State() isMobile: boolean = false;\n @State() offCanvasClasses: string = 'filtersDrawer__overlay';\n\n mobileToggle: HTMLElement | null;\n filtersDrawer: HTMLElement;\n\n @Listen('jump-filterchange')\n filterChangeHandler(event: CustomEvent) {\n //set this.filter as this.filters[event.detail.name] = event.detail.value; even if not present\n this.filters = { ...this.filters, [event.detail.name]: event.detail.values };\n console.log('Received the custom filterChange event: ', this.filters);\n\n\n //TODO: increment this.activeFilters\n }\n\n @Listen('resize', { target: 'window' })\n handleResize() {\n this.isMobile = window.innerWidth < this.mobileThreshold;\n }\n\n @Watch('showMobileFilters')\n watchHandler(newValue: boolean, oldValue: boolean) {\n if (newValue !== oldValue) {\n if (newValue) {\n this.mobileToggle?.setAttribute('aria-expanded', 'true');\n this.filtersDrawer?.setAttribute('aria-hidden', 'false');\n this.offCanvasClasses = 'filtersDrawer__overlay filtersDrawer__overlay--active';\n } else {\n this.mobileToggle?.setAttribute('aria-expanded', 'false');\n this.filtersDrawer?.setAttribute('aria-hidden', 'true');\n this.offCanvasClasses = 'filtersDrawer__overlay';\n }\n }\n }\n\n /**\n * Get the active filters from the component\n */\n @Method()\n async getFilters() {\n return this.filters;\n }\n\n componentDidLoad() {\n this.handleResize();\n }\n\n render() {\n return (\n <Host mobileFilters={this.showMobileFilters}>\n {this.isMobile && <jump-button\n ref={(el) => {\n this.mobileToggle = el;\n }}\n buttonId={this.filterButtonIcon} variant={'primary'} outline\n onClick={() => this.showMobileFilters = !this.showMobileFilters}>\n <slot name=\"prefix\">\n {this.filterButtonIcon &&\n <jump-icon library=\"fa\" category=\"regular\" name={this.filterButtonIcon} size=\"small\"></jump-icon>}\n {this.filterButtonLabel}\n </slot>\n <slot name=\"suffix\">\n {this.activeFilters > 0 &&\n <jump-badge label={this.activeFilters.toString()} variant=\"success\" soft dimension=\"dot\">1</jump-badge>}\n </slot>\n </jump-button>}\n\n {this.offCanvasOverlay &&\n <div class={this.offCanvasClasses}\n onClick={() => this.showMobileFilters = false}></div>}\n\n {<div\n ref={(el) => {\n this.filtersDrawer = el;\n }}\n class=\"filtersDrawer\" data-variant={this.direction}>\n {!this.isMobile &&\n <div class={'filtersDrawer__header'}>\n <jump-icon class=\"small\" name={this.filterButtonIcon}></jump-icon>\n <h3>{this.filterHeading}</h3>\n </div>}\n {this.isMobile && <jump-icon library=\"lucide\" name=\"x\" size=\"small\" label=\"\" class={'filtersDrawer__close'}\n onClick={() => this.showMobileFilters = false}></jump-icon>}\n <slot></slot>\n </div>}\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { d as defineCustomElement$2 } from './jump-icon2.js';
|
|
3
3
|
|
|
4
|
-
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)}:host .Content{display:flex;}:host .Content:hover:not(.disabled){cursor:pointer}:host .Content label{font-size:16px}: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:12px 24px;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:15px 39px;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:12px 32px;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:12px 32px;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
|
+
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:16px}: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:12px 24px;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:15px 39px;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:12px 32px;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:12px 32px;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}";
|
|
5
5
|
const JumpTabItemStyle0 = jumpTabItemCss;
|
|
6
6
|
|
|
7
7
|
const JumpTabItem$1 = /*@__PURE__*/ proxyCustomElement(class JumpTabItem extends HTMLElement {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"jump-tab-item.js","mappings":";;;AAAA,MAAM,cAAc,GAAG,
|
|
1
|
+
{"file":"jump-tab-item.js","mappings":";;;AAAA,MAAM,cAAc,GAAG,0gFAA0gF,CAAC;AACliF,0BAAe,cAAc;;MCMhBA,aAAW;;;;;;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":["JumpTabItem"],"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 \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: 16px;\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: 12px 24px;\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: 15px 39px;\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: 12px 32px;\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: 12px 32px;\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,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
|
|
3
|
-
const jumpTabCss = ":host{display:block;--jump-tab-bg-color:var(--gray-ultralight, #f8f8f8);--jump-tab-border-color:var(--neutral-grey-disabled, #CBCBCB)}:host
|
|
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)}.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;
|
|
5
5
|
|
|
6
6
|
const JumpTab$1 = /*@__PURE__*/ proxyCustomElement(class JumpTab extends HTMLElement {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"jump-tab.js","mappings":";;AAAA,MAAM,UAAU,GAAG,
|
|
1
|
+
{"file":"jump-tab.js","mappings":";;AAAA,MAAM,UAAU,GAAG,+9BAA+9B,CAAC;AACn/B,sBAAe,UAAU;;MCMZA,SAAO;;;;;;wBAGU,KAAK;yBACL,MAAM;0BACJ,KAAK;4BACJ,SAAS;uBACd,QAAQ;;IAKlC,sBAAsB,CAAC,KAAkB;QACvC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAErC,MAAM,UAAU,GAAG,gBAAgB,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;QAC9D,MAAM,YAAY,GAAG,UAAU,CAAC,gBAAgB,CAAC,0BAA0B,CAAC,CAAC,IAAI,EAAE,CAAC;QAEpF,IAAI,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K,KAAK,EAAE,UAAU,GAAG,IAAI,CAAC,OAAO,GAAG,GAAG,IAAI,IAAI,CAAC,QAAQ,GAAG,UAAU,GAAG,EAAE,CAAC,GAAG,GAAG,IAAI,IAAI,CAAC,UAAU,GAAG,YAAY,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,aAAa,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,IACxL,6DAAM,IAAI,EAAC,UAAU,GAAQ,CACzB,CACF,EACN,4DAAK,KAAK,EAAC,gBAAgB,IACzB,6DAAM,IAAI,EAAC,aAAa,GAAQ,CAC5B,CACF,CACD,EACP;KACH;IAEO,YAAY,CAAC,SAAiB;QACpC,QAAQ,SAAS;YACf,KAAK,QAAQ;gBACX,OAAO,QAAQ,CAAC;YAClB,KAAK,OAAO;gBACV,OAAO,UAAU,CAAC;YACpB;gBACE,OAAO,YAAY,CAAC;SACvB;KACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["JumpTab"],"sources":["src/components/jump-tab/jump-tab.scss?tag=jump-tab&encapsulation=shadow","src/components/jump-tab/jump-tab.tsx"],"sourcesContent":[":host {\n display: block;\n\n --jump-tab-bg-color: var(--gray-ultralight, #f8f8f8);\n --jump-tab-border-color: var(--neutral-grey-disabled, #CBCBCB);\n\n /* Permette lo scroll orizzontale */\n overflow-x: auto;\n scrollbar-width: none;\n /* Nasconde la scrollbar in Firefox */\n}\n\n:host::-webkit-scrollbar {\n display: none;\n /* Nasconde la scrollbar in Chrome, Safari e Edge */\n}\n\n.Wrapper {\n display: flex;\n flex-direction: column;\n\n /* Permette lo scroll orizzontale */\n overflow-x: auto;\n scrollbar-width: none;\n /* Nasconde la scrollbar in Firefox */\n}\n\n.Wrapper::-webkit-scrollbar {\n display: none;\n /* Nasconde la scrollbar in Chrome, Safari e Edge */\n}\n\n.ContentWrapper {\n display: flex;\n width: 100%;\n justify-content: var(--alignment, flex-start);\n}\n\n.Content {\n display: flex;\n flex-direction: row;\n align-items: flex-end;\n width: fit-content;\n\n &.fullBorder {\n width: 100%;\n border-bottom: 1px solid var(--jump-tab-border-color);\n justify-content: var(--alignment, flex-start);\n }\n\n &.fullBorder.inline ::slotted([slot=\"tab-item\"]) {\n margin-bottom: -1px;\n }\n\n &.rounded {\n border-radius: 50px;\n background-color: var(--jump-tab-bg-color);\n }\n\n &.disabled {\n cursor: not-allowed;\n opacity: 0.5;\n pointer-events: none;\n }\n}\n\njump-tab-item {\n display: flex;\n align-items: flex-end;\n overflow: hidden;\n\n .tab-title {\n display: block;\n white-space: normal;\n text-align: center;\n }\n}","import { Component, Host, Event, EventEmitter, Prop, h, Listen } from '@stencil/core';\n\n@Component({\n tag: 'jump-tab',\n styleUrl: 'jump-tab.scss',\n shadow: true,\n})\nexport class JumpTab {\n JumpTabEl: HTMLElement;\n\n @Prop() disabled: boolean = false;\n @Prop() alignment: string = 'left';\n @Prop() fullBorder: boolean = false;\n @Prop() tabGroupName: string = undefined;\n @Prop() variant: string = 'inline';\n\n @Event({ eventName: 'jump-change-activetab' }) setActiveTab: EventEmitter;\n\n @Listen('jump-change-active-tab')\n changeActiveTabHandler(event: CustomEvent) {\n this.setActiveTab.emit(event.detail);\n\n const rootStyles = getComputedStyle(document.documentElement);\n const primaryColor = rootStyles.getPropertyValue('--neutral-grey-secondary').trim();\n\n let items = this.JumpTabEl.querySelectorAll('jump-tab-item');\n if (items.length > 0) {\n items.forEach((item) => {\n if (item.getAttribute('identifier') === event.detail.id) {\n item.setAttribute('active', '');\n\n if (this.variant === 'sheet') {\n items.forEach((sibling, index) => {\n if (sibling !== item && index !== items.length - 1) {\n sibling.style.borderRight = `1px solid ${primaryColor}`;\n } else {\n sibling.style.borderRight = '1px solid transparent';\n }\n });\n\n let previousSibling = item.previousElementSibling as any;\n if (previousSibling) {\n previousSibling.style.borderRight = '1px solid transparent';\n }\n }\n\n } else {\n item.removeAttribute('active');\n }\n });\n }\n\n let panel = this.JumpTabEl.querySelectorAll('jump-tab-panel');\n if (panel.length > 0) {\n panel.forEach((panel) => {\n if (panel.getAttribute('identifier') === event.detail.id) {\n panel.setAttribute('active', '');\n } else {\n panel.removeAttribute('active');\n }\n });\n }\n }\n\n componentDidLoad() {\n if (this.variant === 'sheet') {\n const rootStyles = getComputedStyle(document.documentElement);\n const primaryColor = rootStyles.getPropertyValue('--neutral-grey-secondary').trim();\n\n let items = this.JumpTabEl.querySelectorAll('jump-tab-item');\n if (items.length > 0) {\n items.forEach((item, index) => {\n if (index === items.length - 1 || item.classList.contains('active')) {\n item.style.borderRight = '1px solid transparent';\n } else {\n item.style.borderRight = `1px solid ${primaryColor}`;\n }\n });\n }\n }\n }\n\n render() {\n return (\n <Host class={\"JumpTab \" + this.variant} id={this.tabGroupName} ref={(el) => { this.JumpTabEl = el; }}>\n <div class={\"Wrapper \" + (this.fullBorder ? 'fullBorder' : '')}>\n <div class={\"ContentWrapper\"} style={{ '--alignment': this.getAlignment(this.alignment) }}>\n <div class={\"Content \" + this.variant + \" \" + (this.disabled ? 'disabled' : '') + \" \" + (this.fullBorder ? 'fullBorder' : '')} style={{ '--alignment': this.getAlignment(this.alignment) }}>\n <slot name=\"tab-item\"></slot>\n </div>\n </div>\n <div class=\"ContentWrapper\">\n <slot name=\"tab-content\"></slot>\n </div>\n </div>\n </Host>\n );\n }\n\n private getAlignment(alignment: string): string {\n switch (alignment) {\n case 'center':\n return 'center';\n case 'right':\n return 'flex-end';\n default:\n return 'flex-start';\n }\n }\n}\n"],"version":3}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host } from './index-14b73bd6.js';
|
|
2
2
|
|
|
3
|
-
const jumpFilterCss = ":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:
|
|
3
|
+
const jumpFilterCss = ":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}";
|
|
4
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AS,IACjD,CAAC,IAAI,CAAC,QAAQ;YACb,4DAAK,KAAK,EAAE,uBAAuB,IACjC,kEAAW,KAAK,EAAC,OAAO,EAAC,IAAI,EAAE,IAAI,CAAC,gBAAgB,GAAc,EAClE,6DAAK,IAAI,CAAC,aAAa,CAAM,CACzB,EACP,IAAI,CAAC,QAAQ,IAAI,kEAAW,OAAO,EAAC,QAAQ,EAAC,IAAI,EAAC,GAAG,EAAC,IAAI,EAAC,OAAO,EAAC,KAAK,EAAC,EAAE,EAAC,KAAK,EAAE,sBAAsB,EAC7E,OAAO,EAAE,MAAM,IAAI,CAAC,iBAAiB,GAAG,KAAK,GAAc,EACxF,8DAAa,CACT,CACD,EACP;KACH;;;;;;;;;","names":[],"sources":["src/components/jump-filter/jump-filter.scss?tag=jump-filter&encapsulation=shadow","src/components/jump-filter/jump-filter.tsx"],"sourcesContent":[":host {\n --primary-standard: var(--secondary-hard, #435171);\n //--jump-button-background-hover: var(--secondary-hard, #435171);\n --jump-button-background-hover: red;\n --bg-drawer: var(--bg-drawer, #fff);\n --header-height: var(--header-height, 80px);\n --drawer-width: var(--drawer-width, 240px);\n --overlay-bg-color: var(--overlay-bg-color, rgba(0, 0, 0, 0.35));\n\n h3 {\n margin: 0;\n }\n}\n\n@mixin fade-in-out($duration: 0.3s, $ease: ease-in-out) {\n opacity: 0;\n transition: opacity $duration $ease;\n\n &.filtersDrawer__overlay--active {\n opacity: 1;\n }\n}\n\n.filtersDrawer__overlay {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n background-color: var(--overlay-bg-color, rgba(0, 0, 0, 0.35));\n z-index: 1;\n width: 100vw;\n height: 100vh;\n display: none;\n\n &.filtersDrawer__overlay--active {\n display: block;\n }\n\n @include fade-in-out();\n}\n\n.filtersDrawer {\n position: fixed;\n display: flex;\n flex-direction: column;\n gap: 2.5rem;\n left: -100vw;\n top: 0;\n height: -webkit-fill-available;\n max-height: calc(100vh - var(--header-height));\n transition: 0.3s all ease-in-out;\n background-color: var(--bg-drawer, #fff);\n padding: 1rem;\n width: 100%;\n max-width: var(--drawer-width);\n box-shadow: 8px 0 15px 0 #00000026;\n z-index: 2;\n overflow: auto;\n\n &[aria-hidden=\"false\"] {\n left: 0;\n right: 0;\n width: auto;\n transition: 0.3s all ease-in-out;\n\n .filtersDrawer__close {\n position: fixed;\n top: calc(var(--header-height) + 1rem);\n left: calc(var(--drawer-width) - 2rem);\n }\n }\n\n @media (min-width: 768px) { //md breakpoint tailwind\n position: relative;\n left: 0;\n height: auto;\n max-width: initial;\n max-height: initial;\n box-shadow: none;\n }\n\n @media (max-width: 767px) {\n top: var(--header-height);\n }\n\n .filtersDrawer__header {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n gap: 0.5rem;\n }\n}\n","import { Component, Host, Prop, h, State, Listen, Method, Watch } from '@stencil/core';\n\n@Component({\n tag: 'jump-filter',\n styleUrl: 'jump-filter.scss',\n shadow: true,\n})\nexport class JumpFilter {\n\n @Prop() direction: 'horizontal' | 'vertical' = 'vertical';\n @Prop() filterHeading: string = 'Filtra per';\n @Prop() filterButtonLabel: string = 'Filtri';\n @Prop() filterButtonIcon: string = 'sliders';\n @Prop() mobileThreshold: number = 768;\n @Prop() filters: any;\n @Prop() showCount: boolean = false;\n @Prop() offCanvasOverlay: boolean = false;\n\n @State() activeFilters: number = 0;\n @State() showMobileFilters: boolean = false;\n @State() isMobile: boolean = false;\n @State() offCanvasClasses: string = 'filtersDrawer__overlay';\n\n mobileToggle: HTMLElement | null;\n filtersDrawer: HTMLElement;\n\n @Listen('jump-filterchange')\n filterChangeHandler(event: CustomEvent) {\n //set this.filter as this.filters[event.detail.name] = event.detail.value; even if not present\n this.filters = { ...this.filters, [event.detail.name]: event.detail.values };\n console.log('Received the custom filterChange event: ', this.filters);\n\n\n //TODO: increment this.activeFilters\n }\n\n @Listen('resize', { target: 'window' })\n handleResize() {\n this.isMobile = window.innerWidth < this.mobileThreshold;\n }\n\n @Watch('showMobileFilters')\n watchHandler(newValue: boolean, oldValue: boolean) {\n if (newValue !== oldValue) {\n if (newValue) {\n this.mobileToggle?.setAttribute('aria-expanded', 'true');\n this.filtersDrawer?.setAttribute('aria-hidden', 'false');\n this.offCanvasClasses = 'filtersDrawer__overlay filtersDrawer__overlay--active';\n } else {\n this.mobileToggle?.setAttribute('aria-expanded', 'false');\n this.filtersDrawer?.setAttribute('aria-hidden', 'true');\n this.offCanvasClasses = 'filtersDrawer__overlay';\n }\n }\n }\n\n /**\n * Get the active filters from the component\n */\n @Method()\n async getFilters() {\n return this.filters;\n }\n\n componentDidLoad() {\n this.handleResize();\n }\n\n render() {\n return (\n <Host mobileFilters={this.showMobileFilters}>\n {this.isMobile && <jump-button\n ref={(el) => {\n this.mobileToggle = el;\n }}\n buttonId={this.filterButtonIcon} variant={'primary'} outline\n onClick={() => this.showMobileFilters = !this.showMobileFilters}>\n <slot name=\"prefix\">\n {this.filterButtonIcon &&\n <jump-icon library=\"fa\" category=\"regular\" name={this.filterButtonIcon} size=\"small\"></jump-icon>}\n {this.filterButtonLabel}\n </slot>\n <slot name=\"suffix\">\n {this.activeFilters > 0 &&\n <jump-badge label={this.activeFilters.toString()} variant=\"success\" soft dimension=\"dot\">1</jump-badge>}\n </slot>\n </jump-button>}\n\n {this.offCanvasOverlay &&\n <div class={this.offCanvasClasses}\n onClick={() => this.showMobileFilters = false}></div>}\n\n {<div\n ref={(el) => {\n this.filtersDrawer = el;\n }}\n class=\"filtersDrawer\" data-variant={this.direction}>\n {!this.isMobile &&\n <div class={'filtersDrawer__header'}>\n <jump-icon class=\"small\" name={this.filterButtonIcon}></jump-icon>\n <h3>{this.filterHeading}</h3>\n </div>}\n {this.isMobile && <jump-icon library=\"lucide\" name=\"x\" size=\"small\" label=\"\" class={'filtersDrawer__close'}\n onClick={() => this.showMobileFilters = false}></jump-icon>}\n <slot></slot>\n </div>}\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-14b73bd6.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)}:host .Content{display:flex;}:host .Content:hover:not(.disabled){cursor:pointer}:host .Content label{font-size:16px}: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:12px 24px;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:15px 39px;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:12px 32px;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:12px 32px;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}";
|
|
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:16px}: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:12px 24px;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:15px 39px;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:12px 32px;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:12px 32px;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 {
|
|
@@ -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,0gFAA0gF,CAAC;AACliF,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 \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: 16px;\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: 12px 24px;\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: 15px 39px;\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: 12px 32px;\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: 12px 32px;\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,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-14b73bd6.js';
|
|
2
2
|
|
|
3
|
-
const jumpTabCss = ":host{display:block;--jump-tab-bg-color:var(--gray-ultralight, #f8f8f8);--jump-tab-border-color:var(--neutral-grey-disabled, #CBCBCB)}:host
|
|
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)}.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;
|
|
5
5
|
|
|
6
6
|
const JumpTab = class {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"jump-tab.entry.js","mappings":";;AAAA,MAAM,UAAU,GAAG,
|
|
1
|
+
{"file":"jump-tab.entry.js","mappings":";;AAAA,MAAM,UAAU,GAAG,+9BAA+9B,CAAC;AACn/B,sBAAe,UAAU;;MCMZ,OAAO;;;;wBAGU,KAAK;yBACL,MAAM;0BACJ,KAAK;4BACJ,SA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AAG,EAAE,CAAC,EAAE,OAAO,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,EAAE,IAClG,4DAAK,KAAK,EAAE,UAAU,IAAI,IAAI,CAAC,UAAU,GAAG,YAAY,GAAG,EAAE,CAAC,IAC5D,4DAAK,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,EAAE,aAAa,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,IACvF,4DAAK,KAAK,EAAE,UAAU,GAAG,IAAI,CAAC,OAAO,GAAG,GAAG,IAAI,IAAI,CAAC,QAAQ,GAAG,UAAU,GAAG,EAAE,CAAC,GAAG,GAAG,IAAI,IAAI,CAAC,UAAU,GAAG,YAAY,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,aAAa,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,IACxL,6DAAM,IAAI,EAAC,UAAU,GAAQ,CACzB,CACF,EACN,4DAAK,KAAK,EAAC,gBAAgB,IACzB,6DAAM,IAAI,EAAC,aAAa,GAAQ,CAC5B,CACF,CACD,EACP;KACH;IAEO,YAAY,CAAC,SAAiB;QACpC,QAAQ,SAAS;YACf,KAAK,QAAQ;gBACX,OAAO,QAAQ,CAAC;YAClB,KAAK,OAAO;gBACV,OAAO,UAAU,CAAC;YACpB;gBACE,OAAO,YAAY,CAAC;SACvB;KACF;;;;;;","names":[],"sources":["src/components/jump-tab/jump-tab.scss?tag=jump-tab&encapsulation=shadow","src/components/jump-tab/jump-tab.tsx"],"sourcesContent":[":host {\n display: block;\n\n --jump-tab-bg-color: var(--gray-ultralight, #f8f8f8);\n --jump-tab-border-color: var(--neutral-grey-disabled, #CBCBCB);\n\n /* Permette lo scroll orizzontale */\n overflow-x: auto;\n scrollbar-width: none;\n /* Nasconde la scrollbar in Firefox */\n}\n\n:host::-webkit-scrollbar {\n display: none;\n /* Nasconde la scrollbar in Chrome, Safari e Edge */\n}\n\n.Wrapper {\n display: flex;\n flex-direction: column;\n\n /* Permette lo scroll orizzontale */\n overflow-x: auto;\n scrollbar-width: none;\n /* Nasconde la scrollbar in Firefox */\n}\n\n.Wrapper::-webkit-scrollbar {\n display: none;\n /* Nasconde la scrollbar in Chrome, Safari e Edge */\n}\n\n.ContentWrapper {\n display: flex;\n width: 100%;\n justify-content: var(--alignment, flex-start);\n}\n\n.Content {\n display: flex;\n flex-direction: row;\n align-items: flex-end;\n width: fit-content;\n\n &.fullBorder {\n width: 100%;\n border-bottom: 1px solid var(--jump-tab-border-color);\n justify-content: var(--alignment, flex-start);\n }\n\n &.fullBorder.inline ::slotted([slot=\"tab-item\"]) {\n margin-bottom: -1px;\n }\n\n &.rounded {\n border-radius: 50px;\n background-color: var(--jump-tab-bg-color);\n }\n\n &.disabled {\n cursor: not-allowed;\n opacity: 0.5;\n pointer-events: none;\n }\n}\n\njump-tab-item {\n display: flex;\n align-items: flex-end;\n overflow: hidden;\n\n .tab-title {\n display: block;\n white-space: normal;\n text-align: center;\n }\n}","import { Component, Host, Event, EventEmitter, Prop, h, Listen } from '@stencil/core';\n\n@Component({\n tag: 'jump-tab',\n styleUrl: 'jump-tab.scss',\n shadow: true,\n})\nexport class JumpTab {\n JumpTabEl: HTMLElement;\n\n @Prop() disabled: boolean = false;\n @Prop() alignment: string = 'left';\n @Prop() fullBorder: boolean = false;\n @Prop() tabGroupName: string = undefined;\n @Prop() variant: string = 'inline';\n\n @Event({ eventName: 'jump-change-activetab' }) setActiveTab: EventEmitter;\n\n @Listen('jump-change-active-tab')\n changeActiveTabHandler(event: CustomEvent) {\n this.setActiveTab.emit(event.detail);\n\n const rootStyles = getComputedStyle(document.documentElement);\n const primaryColor = rootStyles.getPropertyValue('--neutral-grey-secondary').trim();\n\n let items = this.JumpTabEl.querySelectorAll('jump-tab-item');\n if (items.length > 0) {\n items.forEach((item) => {\n if (item.getAttribute('identifier') === event.detail.id) {\n item.setAttribute('active', '');\n\n if (this.variant === 'sheet') {\n items.forEach((sibling, index) => {\n if (sibling !== item && index !== items.length - 1) {\n sibling.style.borderRight = `1px solid ${primaryColor}`;\n } else {\n sibling.style.borderRight = '1px solid transparent';\n }\n });\n\n let previousSibling = item.previousElementSibling as any;\n if (previousSibling) {\n previousSibling.style.borderRight = '1px solid transparent';\n }\n }\n\n } else {\n item.removeAttribute('active');\n }\n });\n }\n\n let panel = this.JumpTabEl.querySelectorAll('jump-tab-panel');\n if (panel.length > 0) {\n panel.forEach((panel) => {\n if (panel.getAttribute('identifier') === event.detail.id) {\n panel.setAttribute('active', '');\n } else {\n panel.removeAttribute('active');\n }\n });\n }\n }\n\n componentDidLoad() {\n if (this.variant === 'sheet') {\n const rootStyles = getComputedStyle(document.documentElement);\n const primaryColor = rootStyles.getPropertyValue('--neutral-grey-secondary').trim();\n\n let items = this.JumpTabEl.querySelectorAll('jump-tab-item');\n if (items.length > 0) {\n items.forEach((item, index) => {\n if (index === items.length - 1 || item.classList.contains('active')) {\n item.style.borderRight = '1px solid transparent';\n } else {\n item.style.borderRight = `1px solid ${primaryColor}`;\n }\n });\n }\n }\n }\n\n render() {\n return (\n <Host class={\"JumpTab \" + this.variant} id={this.tabGroupName} ref={(el) => { this.JumpTabEl = el; }}>\n <div class={\"Wrapper \" + (this.fullBorder ? 'fullBorder' : '')}>\n <div class={\"ContentWrapper\"} style={{ '--alignment': this.getAlignment(this.alignment) }}>\n <div class={\"Content \" + this.variant + \" \" + (this.disabled ? 'disabled' : '') + \" \" + (this.fullBorder ? 'fullBorder' : '')} style={{ '--alignment': this.getAlignment(this.alignment) }}>\n <slot name=\"tab-item\"></slot>\n </div>\n </div>\n <div class=\"ContentWrapper\">\n <slot name=\"tab-content\"></slot>\n </div>\n </div>\n </Host>\n );\n }\n\n private getAlignment(alignment: string): string {\n switch (alignment) {\n case 'center':\n return 'center';\n case 'right':\n return 'flex-end';\n default:\n return 'flex-start';\n }\n }\n}\n"],"version":3}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,b as t}from"./p-1c5db8d3.js";export{s as setNonce}from"./p-1c5db8d3.js";import{g as a}from"./p-e1255160.js";var i=()=>{const t=import.meta.url;const a={};if(t!==""){a.resourcesUrl=new URL(".",t).href}return e(a)};i().then((async e=>{await a();return t([["p-7e23b9de",[[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-24cac36a",[[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"]]]]],["p-
|
|
1
|
+
import{p as e,b as t}from"./p-1c5db8d3.js";export{s as setNonce}from"./p-1c5db8d3.js";import{g as a}from"./p-e1255160.js";var i=()=>{const t=import.meta.url;const a={};if(t!==""){a.resourcesUrl=new URL(".",t).href}return e(a)};i().then((async e=>{await a();return t([["p-7e23b9de",[[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-24cac36a",[[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"]]]]],["p-18df1585",[[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-8bdb9702",[[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-1c882126",[[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-f371718a",[[1,"jump-pagination",{pagLabel:[1,"pag-label"],last:[2],showFirstAndLast:[4,"show-first-and-last"],current:[32]},null,{current:["watchcurrent"]}]]],["p-745c61b2",[[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"]}]]],["p-396d2541",[[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-134e548b",[[1,"jump-search-bar",{placeholder:[1],identifier:[1],debounceTime:[2,"debounce-time"],searchType:[1,"search-type"],variant:[1]}]]],["p-4b284def",[[1,"jump-accordion",{variant:[1],summary:[1],disabled:[4],open:[516],icon:[1],identifier:[1]},[[0,"sl-show","handleShow"]]]]],["p-6363b6ee",[[1,"jump-tab-item",{identifier:[1],iconName:[1,"icon-name"],iconPosition:[1,"icon-position"],label:[1],active:[4],disabled:[4],variant:[32]}]]],["p-e0e82d36",[[1,"jump-accordion-group",{variant:[1],groupIdentifier:[1,"group-identifier"]}]]],["p-7b6c9e01",[[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-8873623c",[[1,"jump-card-ecommerce-option",{code:[1],imgUrl:[1,"img-url"],label:[1],sku:[1],taxonomy:[1]}]]],["p-30c9d7c7",[[1,"jump-filter-checkbox",{value:[1],label:[1],checked:[516],count:[8],isChecked:[64]}]]],["p-b964700e",[[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-5f12bbbb",[[1,"jump-tab-panel",{identifier:[1],active:[4]}]]],["p-53129684",[[1,"jump-badge",{label:[1],variant:[513],dimension:[513],soft:[516],outline:[516]}]]]],e)}));
|
|
2
2
|
//# sourceMappingURL=jump-design-system.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as e,h as a,H as i}from"./p-1c5db8d3.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-18df1585.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["jumpFilterCss","JumpFilterStyle0","JumpFilter","filterChangeHandler","event","this","filters","Object","assign","detail","name","values","console","log","handleResize","isMobile","window","innerWidth","mobileThreshold","watchHandler","newValue","oldValue","_a","mobileToggle","setAttribute","_b","filtersDrawer","offCanvasClasses","_c","_d","getFilters","componentDidLoad","render","h","Host","key","mobileFilters","showMobileFilters","ref","el","buttonId","filterButtonIcon","variant","outline","onClick","library","category","size","filterButtonLabel","activeFilters","label","toString","soft","dimension","offCanvasOverlay","class","direction","filterHeading"],"sources":["src/components/jump-filter/jump-filter.scss?tag=jump-filter&encapsulation=shadow","src/components/jump-filter/jump-filter.tsx"],"sourcesContent":[":host {\n --primary-standard: var(--secondary-hard, #435171);\n //--jump-button-background-hover: var(--secondary-hard, #435171);\n --jump-button-background-hover: red;\n --bg-drawer: var(--bg-drawer, #fff);\n --header-height: var(--header-height, 80px);\n --drawer-width: var(--drawer-width, 240px);\n --overlay-bg-color: var(--overlay-bg-color, rgba(0, 0, 0, 0.35));\n\n h3 {\n margin: 0;\n }\n}\n\n@mixin fade-in-out($duration: 0.3s, $ease: ease-in-out) {\n opacity: 0;\n transition: opacity $duration $ease;\n\n &.filtersDrawer__overlay--active {\n opacity: 1;\n }\n}\n\n.filtersDrawer__overlay {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n background-color: var(--overlay-bg-color, rgba(0, 0, 0, 0.35));\n z-index: 1;\n width: 100vw;\n height: 100vh;\n display: none;\n\n &.filtersDrawer__overlay--active {\n display: block;\n }\n\n @include fade-in-out();\n}\n\n.filtersDrawer {\n position: fixed;\n display: flex;\n flex-direction: column;\n gap: 2.5rem;\n left: -100vw;\n top: 0;\n height: -webkit-fill-available;\n max-height: calc(100vh - var(--header-height));\n transition: 0.3s all ease-in-out;\n background-color: var(--bg-drawer, #fff);\n padding: 1rem;\n width: 100%;\n max-width: var(--drawer-width);\n box-shadow: 8px 0 15px 0 #00000026;\n z-index: 2;\n overflow: auto;\n\n &[aria-hidden=\"false\"] {\n left: 0;\n right: 0;\n width: auto;\n transition: 0.3s all ease-in-out;\n\n .filtersDrawer__close {\n position: fixed;\n top: calc(var(--header-height) + 1rem);\n left: calc(var(--drawer-width) - 2rem);\n }\n }\n\n @media (min-width: 768px) { //md breakpoint tailwind\n position: relative;\n left: 0;\n height: auto;\n max-width: initial;\n max-height: initial;\n box-shadow: none;\n }\n\n @media (max-width: 767px) {\n top: var(--header-height);\n }\n\n .filtersDrawer__header {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n gap: 0.5rem;\n }\n}\n","import { Component, Host, Prop, h, State, Listen, Method, Watch } from '@stencil/core';\n\n@Component({\n tag: 'jump-filter',\n styleUrl: 'jump-filter.scss',\n shadow: true,\n})\nexport class JumpFilter {\n\n @Prop() direction: 'horizontal' | 'vertical' = 'vertical';\n @Prop() filterHeading: string = 'Filtra per';\n @Prop() filterButtonLabel: string = 'Filtri';\n @Prop() filterButtonIcon: string = 'sliders';\n @Prop() mobileThreshold: number = 768;\n @Prop() filters: any;\n @Prop() showCount: boolean = false;\n @Prop() offCanvasOverlay: boolean = false;\n\n @State() activeFilters: number = 0;\n @State() showMobileFilters: boolean = false;\n @State() isMobile: boolean = false;\n @State() offCanvasClasses: string = 'filtersDrawer__overlay';\n\n mobileToggle: HTMLElement | null;\n filtersDrawer: HTMLElement;\n\n @Listen('jump-filterchange')\n filterChangeHandler(event: CustomEvent) {\n //set this.filter as this.filters[event.detail.name] = event.detail.value; even if not present\n this.filters = { ...this.filters, [event.detail.name]: event.detail.values };\n console.log('Received the custom filterChange event: ', this.filters);\n\n\n //TODO: increment this.activeFilters\n }\n\n @Listen('resize', { target: 'window' })\n handleResize() {\n this.isMobile = window.innerWidth < this.mobileThreshold;\n }\n\n @Watch('showMobileFilters')\n watchHandler(newValue: boolean, oldValue: boolean) {\n if (newValue !== oldValue) {\n if (newValue) {\n this.mobileToggle?.setAttribute('aria-expanded', 'true');\n this.filtersDrawer?.setAttribute('aria-hidden', 'false');\n this.offCanvasClasses = 'filtersDrawer__overlay filtersDrawer__overlay--active';\n } else {\n this.mobileToggle?.setAttribute('aria-expanded', 'false');\n this.filtersDrawer?.setAttribute('aria-hidden', 'true');\n this.offCanvasClasses = 'filtersDrawer__overlay';\n }\n }\n }\n\n /**\n * Get the active filters from the component\n */\n @Method()\n async getFilters() {\n return this.filters;\n }\n\n componentDidLoad() {\n this.handleResize();\n }\n\n render() {\n return (\n <Host mobileFilters={this.showMobileFilters}>\n {this.isMobile && <jump-button\n ref={(el) => {\n this.mobileToggle = el;\n }}\n buttonId={this.filterButtonIcon} variant={'primary'} outline\n onClick={() => this.showMobileFilters = !this.showMobileFilters}>\n <slot name=\"prefix\">\n {this.filterButtonIcon &&\n <jump-icon library=\"fa\" category=\"regular\" name={this.filterButtonIcon} size=\"small\"></jump-icon>}\n {this.filterButtonLabel}\n </slot>\n <slot name=\"suffix\">\n {this.activeFilters > 0 &&\n <jump-badge label={this.activeFilters.toString()} variant=\"success\" soft dimension=\"dot\">1</jump-badge>}\n </slot>\n </jump-button>}\n\n {this.offCanvasOverlay &&\n <div class={this.offCanvasClasses}\n onClick={() => this.showMobileFilters = false}></div>}\n\n {<div\n ref={(el) => {\n this.filtersDrawer = el;\n }}\n class=\"filtersDrawer\" data-variant={this.direction}>\n {!this.isMobile &&\n <div class={'filtersDrawer__header'}>\n <jump-icon class=\"small\" name={this.filterButtonIcon}></jump-icon>\n <h3>{this.filterHeading}</h3>\n </div>}\n {this.isMobile && <jump-icon library=\"lucide\" name=\"x\" size=\"small\" label=\"\" class={'filtersDrawer__close'}\n onClick={() => this.showMobileFilters = false}></jump-icon>}\n <slot></slot>\n </div>}\n </Host>\n );\n }\n}\n"],"mappings":"kDAAA,MAAMA,EAAgB,wjDACtB,MAAAC,EAAeD,E,MCMFE,EAAU,M,wCAE0B,W,mBACf,a,uBACI,S,sBACD,U,qBACD,I,sCAEL,M,sBACO,M,mBAEH,E,uBACK,M,cACT,M,sBACO,wB,CAMpC,mBAAAC,CAAoBC,GAElBC,KAAKC,QAAOC,OAAAC,OAAAD,OAAAC,OAAA,GAAQH,KAAKC,SAAO,CAAE,CAACF,EAAMK,OAAOC,MAAON,EAAMK,OAAOE,SACpEC,QAAQC,IAAI,2CAA4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KoB,MAAOlD,KAAKsB,iBACZiB,QAAS,IAAMvC,KAAKgC,kBAAoB,QAE9CJ,EAAA,OAAAE,IAAA,2CACCG,IAAMC,IACJlC,KAAKqB,cAAgBa,CAAE,EAEzBgB,MAAM,gBAAe,eAAelD,KAAKmD,YACvCnD,KAAKU,UACLkB,EAAA,OAAAE,IAAA,2CAAKoB,MAAO,yBACVtB,EAAA,aAAAE,IAAA,2CAAWoB,MAAM,QAAQ7C,KAAML,KAAKoC,mBACpCR,EAAA,MAAAE,IAAA,4CAAK9B,KAAKoD,gBAEbpD,KAAKU,UAAYkB,EAAA,aAAAE,IAAA,2CAAWU,QAAQ,SAASnC,KAAK,IAAIqC,KAAK,QAAQG,MAAM,GAAGK,MAAO,uBACvDX,QAAS,IAAMvC,KAAKgC,kBAAoB,QACrEJ,EAAA,QAAAE,IAAA,8C"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as t,c as o,h as e,H as n}from"./p-1c5db8d3.js";const r=":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:16px}: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:12px 24px;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:15px 39px;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:12px 32px;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:12px 32px;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}";const a=r;const i=class{constructor(e){t(this,e);this.changeActiveTab=o(this,"jump-change-active-tab",7);this.identifier=undefined;this.iconName=undefined;this.iconPosition="left";this.label="";this.active=false;this.disabled=false;this.variant="inline"}changeTab(t){this.changeActiveTab.emit({id:t})}componentDidLoad(){let t=this.tabEl.parentElement.getAttribute("variant");this.variant=t}render(){return e(n,{key:"7007ce478b8de6630f88ec8ed6da7f3fb0d5dd97",ref:t=>{this.tabEl=t},class:"JumpTabItem "+(this.active?"active":"")+" "+this.variant+" "+(this.disabled?"disabled":"")},e("div",{key:"04b6b822ddc49ede102e391c99976a6a41f97ee2",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")&&e("jump-icon",{key:"4337d05e761c69a29d431528992ea7c7efe36268",library:"fa",category:"regular",name:this.iconName,size:"small"}),e("span",{key:"17ca0b360fc1bf629d7ddd1598c903a437c833ae",class:"label"},this.label)))}};i.style=a;export{i as jump_tab_item};
|
|
2
|
+
//# sourceMappingURL=p-6363b6ee.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["jumpTabItemCss","JumpTabItemStyle0","JumpTabItem","undefined","changeTab","identifier","this","changeActiveTab","emit","id","componentDidLoad","parentVariant","tabEl","parentElement","getAttribute","variant","render","h","Host","key","ref","el","class","active","disabled","iconName","iconPosition","onClick","library","category","name","size","label"],"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 \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: 16px;\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: 12px 24px;\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: 15px 39px;\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: 12px 32px;\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: 12px 32px;\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"],"mappings":"yDAAA,MAAMA,EAAiB,2gFACvB,MAAAC,EAAeD,E,MCMFE,EAAW,M,iGAOOC,U,cAKFA,U,kBAMI,O,WACP,G,YACE,M,cAEE,M,aAMD,Q,CAI3B,SAAAC,CAAUC,GACRC,KAAKC,gBAAgBC,KAAK,CAACC,GAAIJ,G,CAGjC,gBAAAK,GAEE,IAAIC,EAAgBL,KAAKM,MAAMC,cAAcC,aAAa,WAC1DR,KAAKS,QAAUJ,C,CAKjB,MAAAK,GACE,OACEC,EAACC,EAAI,CAAAC,IAAA,2CACHC,IAAMC,IAASf,KAAKM,MAAQS,CAAE,EAC9BC,MAAO,gBAAkBhB,KAAKiB,OAAS,SAAW,IAAM,IAAOjB,KAAY,QAAI,KAAOA,KAAKkB,SAAW,WAAa,KACnHP,EAAA,OAAAE,IAAA,2CAAKG,MAAO,YAAchB,KAAKmB,SAAWnB,KAAKoB,aAAe,IAAM,IAAOpB,KAAY,QAAI,KAAOA,KAAKiB,OAAS,SAAW,IAAM,KAAOjB,KAAKkB,SAAW,WAAa,IAAKG,QAAS,IAAMrB,KAAKF,UAAUE,KAAKD,YAAaI,GAAIH,KAAKD,YAC/NC,KAAKmB,WAAanB,KAAKS,SAAW,UAAYT,KAAKS,SAAW,UAC9DE,EAAA,aAAAE,IAAA,2CAAWS,QAAQ,KAAKC,SAAS,UAAUC,KAAMxB,KAAKmB,SAAUM,KAAK,UAEvEd,EAAA,QAAAE,IAAA,2CAAMG,MAAM,SAAShB,KAAK0B,Q"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as e,c as t,h as a,H as i}from"./p-1c5db8d3.js";const n=":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)}.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}";const s=n;const r=class{constructor(a){e(this,a);this.setActiveTab=t(this,"jump-change-activetab",7);this.disabled=false;this.alignment="left";this.fullBorder=false;this.tabGroupName=undefined;this.variant="inline"}changeActiveTabHandler(e){this.setActiveTab.emit(e.detail);const t=getComputedStyle(document.documentElement);const a=t.getPropertyValue("--neutral-grey-secondary").trim();let i=this.JumpTabEl.querySelectorAll("jump-tab-item");if(i.length>0){i.forEach((t=>{if(t.getAttribute("identifier")===e.detail.id){t.setAttribute("active","");if(this.variant==="sheet"){i.forEach(((e,n)=>{if(e!==t&&n!==i.length-1){e.style.borderRight=`1px solid ${a}`}else{e.style.borderRight="1px solid transparent"}}));let e=t.previousElementSibling;if(e){e.style.borderRight="1px solid transparent"}}}else{t.removeAttribute("active")}}))}let n=this.JumpTabEl.querySelectorAll("jump-tab-panel");if(n.length>0){n.forEach((t=>{if(t.getAttribute("identifier")===e.detail.id){t.setAttribute("active","")}else{t.removeAttribute("active")}}))}}componentDidLoad(){if(this.variant==="sheet"){const e=getComputedStyle(document.documentElement);const t=e.getPropertyValue("--neutral-grey-secondary").trim();let a=this.JumpTabEl.querySelectorAll("jump-tab-item");if(a.length>0){a.forEach(((e,i)=>{if(i===a.length-1||e.classList.contains("active")){e.style.borderRight="1px solid transparent"}else{e.style.borderRight=`1px solid ${t}`}}))}}}render(){return a(i,{key:"2375f577b5d1691b0f82ef3c2b54cfc4afd949fa",class:"JumpTab "+this.variant,id:this.tabGroupName,ref:e=>{this.JumpTabEl=e}},a("div",{key:"f073494433715e96f782124311b0d8ac447bf157",class:"Wrapper "+(this.fullBorder?"fullBorder":"")},a("div",{key:"ae12f817900aca44de6f75deb0e7a9f193611331",class:"ContentWrapper",style:{"--alignment":this.getAlignment(this.alignment)}},a("div",{key:"0f4317b86e0b3f0fde02c6ed3847d1d1b7d0e16d",class:"Content "+this.variant+" "+(this.disabled?"disabled":"")+" "+(this.fullBorder?"fullBorder":""),style:{"--alignment":this.getAlignment(this.alignment)}},a("slot",{key:"7fab1b1ca960c05732b390608f4ce61f2c8d5bf2",name:"tab-item"}))),a("div",{key:"cba8b1d398833aeeaeddaf9964893b82f6b008f3",class:"ContentWrapper"},a("slot",{key:"7f7d3582f30f21d495b517ace5139babc66e4445",name:"tab-content"}))))}getAlignment(e){switch(e){case"center":return"center";case"right":return"flex-end";default:return"flex-start"}}};r.style=s;export{r as jump_tab};
|
|
2
|
+
//# sourceMappingURL=p-b964700e.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["jumpTabCss","JumpTabStyle0","JumpTab","undefined","changeActiveTabHandler","event","this","setActiveTab","emit","detail","rootStyles","getComputedStyle","document","documentElement","primaryColor","getPropertyValue","trim","items","JumpTabEl","querySelectorAll","length","forEach","item","getAttribute","id","setAttribute","variant","sibling","index","style","borderRight","previousSibling","previousElementSibling","removeAttribute","panel","componentDidLoad","classList","contains","render","h","Host","key","class","tabGroupName","ref","el","fullBorder","getAlignment","alignment","disabled","name"],"sources":["src/components/jump-tab/jump-tab.scss?tag=jump-tab&encapsulation=shadow","src/components/jump-tab/jump-tab.tsx"],"sourcesContent":[":host {\n display: block;\n\n --jump-tab-bg-color: var(--gray-ultralight, #f8f8f8);\n --jump-tab-border-color: var(--neutral-grey-disabled, #CBCBCB);\n\n /* Permette lo scroll orizzontale */\n overflow-x: auto;\n scrollbar-width: none;\n /* Nasconde la scrollbar in Firefox */\n}\n\n:host::-webkit-scrollbar {\n display: none;\n /* Nasconde la scrollbar in Chrome, Safari e Edge */\n}\n\n.Wrapper {\n display: flex;\n flex-direction: column;\n\n /* Permette lo scroll orizzontale */\n overflow-x: auto;\n scrollbar-width: none;\n /* Nasconde la scrollbar in Firefox */\n}\n\n.Wrapper::-webkit-scrollbar {\n display: none;\n /* Nasconde la scrollbar in Chrome, Safari e Edge */\n}\n\n.ContentWrapper {\n display: flex;\n width: 100%;\n justify-content: var(--alignment, flex-start);\n}\n\n.Content {\n display: flex;\n flex-direction: row;\n align-items: flex-end;\n width: fit-content;\n\n &.fullBorder {\n width: 100%;\n border-bottom: 1px solid var(--jump-tab-border-color);\n justify-content: var(--alignment, flex-start);\n }\n\n &.fullBorder.inline ::slotted([slot=\"tab-item\"]) {\n margin-bottom: -1px;\n }\n\n &.rounded {\n border-radius: 50px;\n background-color: var(--jump-tab-bg-color);\n }\n\n &.disabled {\n cursor: not-allowed;\n opacity: 0.5;\n pointer-events: none;\n }\n}\n\njump-tab-item {\n display: flex;\n align-items: flex-end;\n overflow: hidden;\n\n .tab-title {\n display: block;\n white-space: normal;\n text-align: center;\n }\n}","import { Component, Host, Event, EventEmitter, Prop, h, Listen } from '@stencil/core';\n\n@Component({\n tag: 'jump-tab',\n styleUrl: 'jump-tab.scss',\n shadow: true,\n})\nexport class JumpTab {\n JumpTabEl: HTMLElement;\n\n @Prop() disabled: boolean = false;\n @Prop() alignment: string = 'left';\n @Prop() fullBorder: boolean = false;\n @Prop() tabGroupName: string = undefined;\n @Prop() variant: string = 'inline';\n\n @Event({ eventName: 'jump-change-activetab' }) setActiveTab: EventEmitter;\n\n @Listen('jump-change-active-tab')\n changeActiveTabHandler(event: CustomEvent) {\n this.setActiveTab.emit(event.detail);\n\n const rootStyles = getComputedStyle(document.documentElement);\n const primaryColor = rootStyles.getPropertyValue('--neutral-grey-secondary').trim();\n\n let items = this.JumpTabEl.querySelectorAll('jump-tab-item');\n if (items.length > 0) {\n items.forEach((item) => {\n if (item.getAttribute('identifier') === event.detail.id) {\n item.setAttribute('active', '');\n\n if (this.variant === 'sheet') {\n items.forEach((sibling, index) => {\n if (sibling !== item && index !== items.length - 1) {\n sibling.style.borderRight = `1px solid ${primaryColor}`;\n } else {\n sibling.style.borderRight = '1px solid transparent';\n }\n });\n\n let previousSibling = item.previousElementSibling as any;\n if (previousSibling) {\n previousSibling.style.borderRight = '1px solid transparent';\n }\n }\n\n } else {\n item.removeAttribute('active');\n }\n });\n }\n\n let panel = this.JumpTabEl.querySelectorAll('jump-tab-panel');\n if (panel.length > 0) {\n panel.forEach((panel) => {\n if (panel.getAttribute('identifier') === event.detail.id) {\n panel.setAttribute('active', '');\n } else {\n panel.removeAttribute('active');\n }\n });\n }\n }\n\n componentDidLoad() {\n if (this.variant === 'sheet') {\n const rootStyles = getComputedStyle(document.documentElement);\n const primaryColor = rootStyles.getPropertyValue('--neutral-grey-secondary').trim();\n\n let items = this.JumpTabEl.querySelectorAll('jump-tab-item');\n if (items.length > 0) {\n items.forEach((item, index) => {\n if (index === items.length - 1 || item.classList.contains('active')) {\n item.style.borderRight = '1px solid transparent';\n } else {\n item.style.borderRight = `1px solid ${primaryColor}`;\n }\n });\n }\n }\n }\n\n render() {\n return (\n <Host class={\"JumpTab \" + this.variant} id={this.tabGroupName} ref={(el) => { this.JumpTabEl = el; }}>\n <div class={\"Wrapper \" + (this.fullBorder ? 'fullBorder' : '')}>\n <div class={\"ContentWrapper\"} style={{ '--alignment': this.getAlignment(this.alignment) }}>\n <div class={\"Content \" + this.variant + \" \" + (this.disabled ? 'disabled' : '') + \" \" + (this.fullBorder ? 'fullBorder' : '')} style={{ '--alignment': this.getAlignment(this.alignment) }}>\n <slot name=\"tab-item\"></slot>\n </div>\n </div>\n <div class=\"ContentWrapper\">\n <slot name=\"tab-content\"></slot>\n </div>\n </div>\n </Host>\n );\n }\n\n private getAlignment(alignment: string): string {\n switch (alignment) {\n case 'center':\n return 'center';\n case 'right':\n return 'flex-end';\n default:\n return 'flex-start';\n }\n }\n}\n"],"mappings":"yDAAA,MAAMA,EAAa,g+BACnB,MAAAC,EAAeD,E,MCMFE,EAAO,M,2FAGU,M,eACA,O,gBACE,M,kBACCC,U,aACL,Q,CAK1B,sBAAAC,CAAuBC,GACrBC,KAAKC,aAAaC,KAAKH,EAAMI,QAE7B,MAAMC,EAAaC,iBAAiBC,SAASC,iBAC7C,MAAMC,EAAeJ,EAAWK,iBAAiB,4BAA4BC,OAE7E,IAAIC,EAAQX,KAAKY,UAAU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AAAE,IAAA,2CAAKC,MAAO,YAAcpC,KAAKwC,WAAa,aAAe,KACzDP,EAAA,OAAAE,IAAA,2CAAKC,MAAO,iBAAkBb,MAAO,CAAE,cAAevB,KAAKyC,aAAazC,KAAK0C,aAC3ET,EAAA,OAAAE,IAAA,2CAAKC,MAAO,WAAapC,KAAKoB,QAAU,KAAOpB,KAAK2C,SAAW,WAAa,IAAM,KAAO3C,KAAKwC,WAAa,aAAe,IAAKjB,MAAO,CAAE,cAAevB,KAAKyC,aAAazC,KAAK0C,aAC5KT,EAAA,QAAAE,IAAA,2CAAMS,KAAK,eAGfX,EAAA,OAAAE,IAAA,2CAAKC,MAAM,kBACTH,EAAA,QAAAE,IAAA,2CAAMS,KAAK,kB,CAOb,YAAAH,CAAaC,GACnB,OAAQA,GACN,IAAK,SACH,MAAO,SACT,IAAK,QACH,MAAO,WACT,QACE,MAAO,a"}
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,H as a}from"./p-1c5db8d3.js";const s=":host{display:block;--jump-tab-bg-color:var(--gray-ultralight, #f8f8f8);--jump-tab-border-color:var(--neutral-grey-disabled, #CBCBCB)}:host .Wrapper{display:flex;flex-direction:column}:host .ContentWrapper{display:flex;width:100%;justify-content:var(--alignment, flex-start)}:host .Content{display:flex;flex-direction:row;align-items:flex-end;width:fit-content}:host .Content.fullBorder{width:100%;border-bottom:1px solid var(--jump-tab-border-color);justify-content:var(--alignment, flex-start)}:host .Content.fullBorder.inline ::slotted([slot=tab-item]){margin-bottom:-1px}:host .Content.rounded{border-radius:50px;background-color:var(--jump-tab-bg-color)}:host .Content.disabled{cursor:not-allowed;opacity:0.5;pointer-events:none}:host jump-tab-item{display:flex;align-items:flex-end;overflow:hidden}:host jump-tab-item .tab-title{display:block;white-space:normal;text-align:center}";const n=s;const o=class{constructor(i){t(this,i);this.setActiveTab=e(this,"jump-change-activetab",7);this.disabled=false;this.alignment="left";this.fullBorder=false;this.tabGroupName=undefined;this.variant="inline"}changeActiveTabHandler(t){this.setActiveTab.emit(t.detail);const e=getComputedStyle(document.documentElement);const i=e.getPropertyValue("--neutral-grey-secondary").trim();let a=this.JumpTabEl.querySelectorAll("jump-tab-item");if(a.length>0){a.forEach((e=>{if(e.getAttribute("identifier")===t.detail.id){e.setAttribute("active","");if(this.variant==="sheet"){a.forEach(((t,s)=>{if(t!==e&&s!==a.length-1){t.style.borderRight=`1px solid ${i}`}else{t.style.borderRight="1px solid transparent"}}));let t=e.previousElementSibling;if(t){t.style.borderRight="1px solid transparent"}}}else{e.removeAttribute("active")}}))}let s=this.JumpTabEl.querySelectorAll("jump-tab-panel");if(s.length>0){s.forEach((e=>{if(e.getAttribute("identifier")===t.detail.id){e.setAttribute("active","")}else{e.removeAttribute("active")}}))}}componentDidLoad(){if(this.variant==="sheet"){const t=getComputedStyle(document.documentElement);const e=t.getPropertyValue("--neutral-grey-secondary").trim();let i=this.JumpTabEl.querySelectorAll("jump-tab-item");if(i.length>0){i.forEach(((t,a)=>{if(a===i.length-1||t.classList.contains("active")){t.style.borderRight="1px solid transparent"}else{t.style.borderRight=`1px solid ${e}`}}))}}}render(){return i(a,{key:"2375f577b5d1691b0f82ef3c2b54cfc4afd949fa",class:"JumpTab "+this.variant,id:this.tabGroupName,ref:t=>{this.JumpTabEl=t}},i("div",{key:"f073494433715e96f782124311b0d8ac447bf157",class:"Wrapper "+(this.fullBorder?"fullBorder":"")},i("div",{key:"ae12f817900aca44de6f75deb0e7a9f193611331",class:"ContentWrapper",style:{"--alignment":this.getAlignment(this.alignment)}},i("div",{key:"0f4317b86e0b3f0fde02c6ed3847d1d1b7d0e16d",class:"Content "+this.variant+" "+(this.disabled?"disabled":"")+" "+(this.fullBorder?"fullBorder":""),style:{"--alignment":this.getAlignment(this.alignment)}},i("slot",{key:"7fab1b1ca960c05732b390608f4ce61f2c8d5bf2",name:"tab-item"}))),i("div",{key:"cba8b1d398833aeeaeddaf9964893b82f6b008f3",class:"ContentWrapper"},i("slot",{key:"7f7d3582f30f21d495b517ace5139babc66e4445",name:"tab-content"}))))}getAlignment(t){switch(t){case"center":return"center";case"right":return"flex-end";default:return"flex-start"}}};o.style=n;export{o as jump_tab};
|
|
2
|
-
//# sourceMappingURL=p-26d18480.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["jumpTabCss","JumpTabStyle0","JumpTab","undefined","changeActiveTabHandler","event","this","setActiveTab","emit","detail","rootStyles","getComputedStyle","document","documentElement","primaryColor","getPropertyValue","trim","items","JumpTabEl","querySelectorAll","length","forEach","item","getAttribute","id","setAttribute","variant","sibling","index","style","borderRight","previousSibling","previousElementSibling","removeAttribute","panel","componentDidLoad","classList","contains","render","h","Host","key","class","tabGroupName","ref","el","fullBorder","getAlignment","alignment","disabled","name"],"sources":["src/components/jump-tab/jump-tab.scss?tag=jump-tab&encapsulation=shadow","src/components/jump-tab/jump-tab.tsx"],"sourcesContent":[":host {\n display: block;\n\n --jump-tab-bg-color: var(--gray-ultralight, #f8f8f8);\n --jump-tab-border-color: var(--neutral-grey-disabled, #CBCBCB);\n\n .Wrapper {\n display: flex;\n flex-direction: column;\n }\n\n .ContentWrapper {\n display: flex;\n width: 100%;\n justify-content: var(--alignment, flex-start);\n }\n\n .Content {\n display: flex;\n flex-direction: row;\n align-items: flex-end;\n width: fit-content;\n\n &.fullBorder {\n width: 100%;\n border-bottom: 1px solid var(--jump-tab-border-color);\n justify-content: var(--alignment, flex-start);\n }\n\n &.fullBorder.inline ::slotted([slot=\"tab-item\"]) {\n margin-bottom: -1px;\n }\n\n &.rounded {\n border-radius: 50px;\n background-color: var(--jump-tab-bg-color);\n }\n\n &.disabled {\n cursor: not-allowed;\n opacity: 0.5;\n pointer-events: none;\n }\n }\n\n jump-tab-item {\n display: flex;\n align-items: flex-end;\n overflow: hidden;\n\n .tab-title {\n display: block;\n white-space: normal;\n text-align: center;\n }\n }\n}","import { Component, Host, Event, EventEmitter, Prop, h, Listen } from '@stencil/core';\n\n@Component({\n tag: 'jump-tab',\n styleUrl: 'jump-tab.scss',\n shadow: true,\n})\nexport class JumpTab {\n JumpTabEl: HTMLElement;\n\n @Prop() disabled: boolean = false;\n @Prop() alignment: string = 'left';\n @Prop() fullBorder: boolean = false;\n @Prop() tabGroupName: string = undefined;\n @Prop() variant: string = 'inline';\n\n @Event({ eventName: 'jump-change-activetab' }) setActiveTab: EventEmitter;\n\n @Listen('jump-change-active-tab')\n changeActiveTabHandler(event: CustomEvent) {\n this.setActiveTab.emit(event.detail);\n\n const rootStyles = getComputedStyle(document.documentElement);\n const primaryColor = rootStyles.getPropertyValue('--neutral-grey-secondary').trim();\n\n let items = this.JumpTabEl.querySelectorAll('jump-tab-item');\n if (items.length > 0) {\n items.forEach((item) => {\n if (item.getAttribute('identifier') === event.detail.id) {\n item.setAttribute('active', '');\n\n if (this.variant === 'sheet') {\n items.forEach((sibling, index) => {\n if (sibling !== item && index !== items.length - 1) {\n sibling.style.borderRight = `1px solid ${primaryColor}`;\n } else {\n sibling.style.borderRight = '1px solid transparent';\n }\n });\n\n let previousSibling = item.previousElementSibling as any;\n if (previousSibling) {\n previousSibling.style.borderRight = '1px solid transparent';\n }\n }\n\n } else {\n item.removeAttribute('active');\n }\n });\n }\n\n let panel = this.JumpTabEl.querySelectorAll('jump-tab-panel');\n if (panel.length > 0) {\n panel.forEach((panel) => {\n if (panel.getAttribute('identifier') === event.detail.id) {\n panel.setAttribute('active', '');\n } else {\n panel.removeAttribute('active');\n }\n });\n }\n }\n\n componentDidLoad() {\n if (this.variant === 'sheet') {\n const rootStyles = getComputedStyle(document.documentElement);\n const primaryColor = rootStyles.getPropertyValue('--neutral-grey-secondary').trim();\n\n let items = this.JumpTabEl.querySelectorAll('jump-tab-item');\n if (items.length > 0) {\n items.forEach((item, index) => {\n if (index === items.length - 1 || item.classList.contains('active')) {\n item.style.borderRight = '1px solid transparent';\n } else {\n item.style.borderRight = `1px solid ${primaryColor}`;\n }\n });\n }\n }\n }\n\n render() {\n return (\n <Host class={\"JumpTab \" + this.variant} id={this.tabGroupName} ref={(el) => { this.JumpTabEl = el; }}>\n <div class={\"Wrapper \" + (this.fullBorder ? 'fullBorder' : '')}>\n <div class={\"ContentWrapper\"} style={{ '--alignment': this.getAlignment(this.alignment) }}>\n <div class={\"Content \" + this.variant + \" \" + (this.disabled ? 'disabled' : '') + \" \" + (this.fullBorder ? 'fullBorder' : '')} style={{ '--alignment': this.getAlignment(this.alignment) }}>\n <slot name=\"tab-item\"></slot>\n </div>\n </div>\n <div class=\"ContentWrapper\">\n <slot name=\"tab-content\"></slot>\n </div>\n </div>\n </Host>\n );\n }\n\n private getAlignment(alignment: string): string {\n switch (alignment) {\n case 'center':\n return 'center';\n case 'right':\n return 'flex-end';\n default:\n return 'flex-start';\n }\n }\n}\n"],"mappings":"yDAAA,MAAMA,EAAa,y3BACnB,MAAAC,EAAeD,E,MCMFE,EAAO,M,2FAGU,M,eACA,O,gBACE,M,kBACCC,U,aACL,Q,CAK1B,sBAAAC,CAAuBC,GACrBC,KAAKC,aAAaC,KAAKH,EAAMI,QAE7B,MAAMC,EAAaC,iBAAiBC,SAASC,iBAC7C,MAAMC,EAAeJ,EAAWK,iBAAiB,4BAA4BC,OAE7E,IAAIC,EAAQX,KAAKY,UAAUC,iBAAiB,iBAC5C,GAAIF,EAAMG,OAAS,EAAG,CACpBH,EAAMI,SAASC,IACb,GAAIA,EAAKC,aAAa,gBAAkBlB,EAAMI,OAAOe,GAAI,CACvDF,EAAKG,aAAa,SAAU,IAE5B,GAAInB,KAAKoB,UAAY,QAAS,CAC5BT,EAAMI,SAAQ,CAACM,EAASC,KACtB,GAAID,IAAYL,GAAQM,IAAUX,EAAMG,OAAS,EAAG,CAClDO,EAAQE,MAAMC,YAAc,aAAahB,G,KACpC,CACLa,EAAQE,MAAMC,YAAc,uB,KAIhC,IAAIC,EAAkBT,EAAKU,uBAC3B,GAAID,EAAiB,CACnBA,EAAgBF,MAAMC,YAAc,uB,OAInC,C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,2CAAMS,KAAK,kB,CAOb,YAAAH,CAAaC,GACnB,OAAQA,GACN,IAAK,SACH,MAAO,SACT,IAAK,QACH,MAAO,WACT,QACE,MAAO,a"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,c as o,h as e,H as n}from"./p-1c5db8d3.js";const r=":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)}:host .Content{display:flex;}:host .Content:hover:not(.disabled){cursor:pointer}:host .Content label{font-size:16px}: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:12px 24px;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:15px 39px;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:12px 32px;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:12px 32px;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}";const a=r;const i=class{constructor(e){t(this,e);this.changeActiveTab=o(this,"jump-change-active-tab",7);this.identifier=undefined;this.iconName=undefined;this.iconPosition="left";this.label="";this.active=false;this.disabled=false;this.variant="inline"}changeTab(t){this.changeActiveTab.emit({id:t})}componentDidLoad(){let t=this.tabEl.parentElement.getAttribute("variant");this.variant=t}render(){return e(n,{key:"7007ce478b8de6630f88ec8ed6da7f3fb0d5dd97",ref:t=>{this.tabEl=t},class:"JumpTabItem "+(this.active?"active":"")+" "+this.variant+" "+(this.disabled?"disabled":"")},e("div",{key:"04b6b822ddc49ede102e391c99976a6a41f97ee2",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")&&e("jump-icon",{key:"4337d05e761c69a29d431528992ea7c7efe36268",library:"fa",category:"regular",name:this.iconName,size:"small"}),e("span",{key:"17ca0b360fc1bf629d7ddd1598c903a437c833ae",class:"label"},this.label)))}};i.style=a;export{i as jump_tab_item};
|
|
2
|
-
//# sourceMappingURL=p-87d6c01a.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["jumpTabItemCss","JumpTabItemStyle0","JumpTabItem","undefined","changeTab","identifier","this","changeActiveTab","emit","id","componentDidLoad","parentVariant","tabEl","parentElement","getAttribute","variant","render","h","Host","key","ref","el","class","active","disabled","iconName","iconPosition","onClick","library","category","name","size","label"],"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 \n font-family: var(--ff-primary);\n \n .Content {\n \n display: flex;\n\n &:hover:not(.disabled){\n cursor: pointer;\n }\n\n label {\n font-size: 16px;\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: 12px 24px;\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: 15px 39px;\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: 12px 32px;\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: 12px 32px;\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"],"mappings":"yDAAA,MAAMA,EAAiB,6/EACvB,MAAAC,EAAeD,E,MCMFE,EAAW,M,iGAOOC,U,cAKFA,U,kBAMI,O,WACP,G,YACE,M,cAEE,M,aAMD,Q,CAI3B,SAAAC,CAAUC,GACRC,KAAKC,gBAAgBC,KAAK,CAACC,GAAIJ,G,CAGjC,gBAAAK,GAEE,IAAIC,EAAgBL,KAAKM,MAAMC,cAAcC,aAAa,WAC1DR,KAAKS,QAAUJ,C,CAKjB,MAAAK,GACE,OACEC,EAACC,EAAI,CAAAC,IAAA,2CACHC,IAAMC,IAASf,KAAKM,MAAQS,CAAE,EAC9BC,MAAO,gBAAkBhB,KAAKiB,OAAS,SAAW,IAAM,IAAOjB,KAAY,QAAI,KAAOA,KAAKkB,SAAW,WAAa,KACnHP,EAAA,OAAAE,IAAA,2CAAKG,MAAO,YAAchB,KAAKmB,SAAWnB,KAAKoB,aAAe,IAAM,IAAOpB,KAAY,QAAI,KAAOA,KAAKiB,OAAS,SAAW,IAAM,KAAOjB,KAAKkB,SAAW,WAAa,IAAKG,QAAS,IAAMrB,KAAKF,UAAUE,KAAKD,YAAaI,GAAIH,KAAKD,YAC/NC,KAAKmB,WAAanB,KAAKS,SAAW,UAAYT,KAAKS,SAAW,UAC9DE,EAAA,aAAAE,IAAA,2CAAWS,QAAQ,KAAKC,SAAS,UAAUC,KAAMxB,KAAKmB,SAAUM,KAAK,UAEvEd,EAAA,QAAAE,IAAA,2CAAMG,MAAM,SAAShB,KAAK0B,Q"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as e,h as a,H as i}from"./p-1c5db8d3.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:var(--header-height);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}}.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-e441d6ea.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["jumpFilterCss","JumpFilterStyle0","JumpFilter","filterChangeHandler","event","this","filters","Object","assign","detail","name","values","console","log","handleResize","isMobile","window","innerWidth","mobileThreshold","watchHandler","newValue","oldValue","_a","mobileToggle","setAttribute","_b","filtersDrawer","offCanvasClasses","_c","_d","getFilters","componentDidLoad","render","h","Host","key","mobileFilters","showMobileFilters","ref","el","buttonId","filterButtonIcon","variant","outline","onClick","library","category","size","filterButtonLabel","activeFilters","label","toString","soft","dimension","offCanvasOverlay","class","direction","filterHeading"],"sources":["src/components/jump-filter/jump-filter.scss?tag=jump-filter&encapsulation=shadow","src/components/jump-filter/jump-filter.tsx"],"sourcesContent":[":host {\n --primary-standard: var(--secondary-hard, #435171);\n //--jump-button-background-hover: var(--secondary-hard, #435171);\n --jump-button-background-hover: red;\n --bg-drawer: var(--bg-drawer, #fff);\n --header-height: var(--header-height, 80px);\n --drawer-width: var(--drawer-width, 240px);\n --overlay-bg-color: var(--overlay-bg-color, rgba(0, 0, 0, 0.35));\n\n h3 {\n margin: 0;\n }\n}\n\n@mixin fade-in-out($duration: 0.3s, $ease: ease-in-out) {\n opacity: 0;\n transition: opacity $duration $ease;\n\n &.filtersDrawer__overlay--active {\n opacity: 1;\n }\n}\n\n.filtersDrawer__overlay {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n background-color: var(--overlay-bg-color, rgba(0, 0, 0, 0.35));\n z-index: 1;\n width: 100vw;\n height: 100vh;\n display: none;\n\n &.filtersDrawer__overlay--active {\n display: block;\n }\n\n @include fade-in-out();\n}\n\n.filtersDrawer {\n position: fixed;\n display: flex;\n flex-direction: column;\n gap: 2.5rem;\n left: -100vw;\n top: var(--header-height);\n height: -webkit-fill-available;\n max-height: calc(100vh - var(--header-height));\n transition: 0.3s all ease-in-out;\n background-color: var(--bg-drawer, #fff);\n padding: 1rem;\n width: 100%;\n max-width: var(--drawer-width);\n box-shadow: 8px 0 15px 0 #00000026;\n z-index: 2;\n overflow: auto;\n\n &[aria-hidden=\"false\"] {\n left: 0;\n right: 0;\n width: auto;\n transition: 0.3s all ease-in-out;\n\n .filtersDrawer__close {\n position: fixed;\n top: calc(var(--header-height) + 1rem);\n left: calc(var(--drawer-width) - 2rem);\n }\n }\n\n @media (min-width: 768px) { //md breakpoint tailwind\n position: relative;\n left: 0;\n height: auto;\n max-width: initial;\n max-height: initial;\n box-shadow: none;\n }\n\n .filtersDrawer__header {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n gap: 0.5rem;\n }\n}\n","import { Component, Host, Prop, h, State, Listen, Method, Watch } from '@stencil/core';\n\n@Component({\n tag: 'jump-filter',\n styleUrl: 'jump-filter.scss',\n shadow: true,\n})\nexport class JumpFilter {\n\n @Prop() direction: 'horizontal' | 'vertical' = 'vertical';\n @Prop() filterHeading: string = 'Filtra per';\n @Prop() filterButtonLabel: string = 'Filtri';\n @Prop() filterButtonIcon: string = 'sliders';\n @Prop() mobileThreshold: number = 768;\n @Prop() filters: any;\n @Prop() showCount: boolean = false;\n @Prop() offCanvasOverlay: boolean = false;\n\n @State() activeFilters: number = 0;\n @State() showMobileFilters: boolean = false;\n @State() isMobile: boolean = false;\n @State() offCanvasClasses: string = 'filtersDrawer__overlay';\n\n mobileToggle: HTMLElement | null;\n filtersDrawer: HTMLElement;\n\n @Listen('jump-filterchange')\n filterChangeHandler(event: CustomEvent) {\n //set this.filter as this.filters[event.detail.name] = event.detail.value; even if not present\n this.filters = { ...this.filters, [event.detail.name]: event.detail.values };\n console.log('Received the custom filterChange event: ', this.filters);\n\n\n //TODO: increment this.activeFilters\n }\n\n @Listen('resize', { target: 'window' })\n handleResize() {\n this.isMobile = window.innerWidth < this.mobileThreshold;\n }\n\n @Watch('showMobileFilters')\n watchHandler(newValue: boolean, oldValue: boolean) {\n if (newValue !== oldValue) {\n if (newValue) {\n this.mobileToggle?.setAttribute('aria-expanded', 'true');\n this.filtersDrawer?.setAttribute('aria-hidden', 'false');\n this.offCanvasClasses = 'filtersDrawer__overlay filtersDrawer__overlay--active';\n } else {\n this.mobileToggle?.setAttribute('aria-expanded', 'false');\n this.filtersDrawer?.setAttribute('aria-hidden', 'true');\n this.offCanvasClasses = 'filtersDrawer__overlay';\n }\n }\n }\n\n /**\n * Get the active filters from the component\n */\n @Method()\n async getFilters() {\n return this.filters;\n }\n\n componentDidLoad() {\n this.handleResize();\n }\n\n render() {\n return (\n <Host mobileFilters={this.showMobileFilters}>\n {this.isMobile && <jump-button\n ref={(el) => {\n this.mobileToggle = el;\n }}\n buttonId={this.filterButtonIcon} variant={'primary'} outline\n onClick={() => this.showMobileFilters = !this.showMobileFilters}>\n <slot name=\"prefix\">\n {this.filterButtonIcon &&\n <jump-icon library=\"fa\" category=\"regular\" name={this.filterButtonIcon} size=\"small\"></jump-icon>}\n {this.filterButtonLabel}\n </slot>\n <slot name=\"suffix\">\n {this.activeFilters > 0 &&\n <jump-badge label={this.activeFilters.toString()} variant=\"success\" soft dimension=\"dot\">1</jump-badge>}\n </slot>\n </jump-button>}\n\n {this.offCanvasOverlay &&\n <div class={this.offCanvasClasses}\n onClick={() => this.showMobileFilters = false}></div>}\n\n {<div\n ref={(el) => {\n this.filtersDrawer = el;\n }}\n class=\"filtersDrawer\" data-variant={this.direction}>\n {!this.isMobile &&\n <div class={'filtersDrawer__header'}>\n <jump-icon class=\"small\" name={this.filterButtonIcon}></jump-icon>\n <h3>{this.filterHeading}</h3>\n </div>}\n {this.isMobile && <jump-icon library=\"lucide\" name=\"x\" size=\"small\" label=\"\" class={'filtersDrawer__close'}\n onClick={() => this.showMobileFilters = false}></jump-icon>}\n <slot></slot>\n </div>}\n </Host>\n );\n }\n}\n"],"mappings":"kDAAA,MAAMA,EAAgB,wgDACtB,MAAAC,EAAeD,E,MCMFE,EAAU,M,wCAE0B,W,mBACf,a,uBACI,S,sBACD,U,qBACD,I,sCAEL,M,sBACO,M,mBAEH,E,uBACK,M,cACT,M,sBACO,wB,CAMpC,mBAAAC,CAAoBC,GAElBC,KAAKC,QAAOC,OAAAC,OAAAD,OAAAC,OAAA,GAAQH,KAAKC,SAAO,CAAE,CAACF,EAAMK,OAAOC,MAAON,EAAMK,OAAOE,SACpEC,QAAQC,IAAI,2CAA4CR,KAAKC,Q,CAO/D,YAAAQ,GACET,KAAKU,SAAWC,OAAOC,WAAaZ,KAAKa,e,CAI3C,YAAAC,CAAaC,EAAmBC,G,YAC9B,GAAID,IAAaC,EAAU,CACzB,GAAID,EAAU,EACZE,EAAAjB,KAAKkB,gBAAY,MAAAD,SAAA,SAAAA,EAAEE,aAAa,gBAAiB,SACjDC,EAAApB,KAAKqB,iBAAa,MAAAD,SAAA,SAAAA,EAAED,aAAa,cAAe,SAChDnB,KAAKsB,iBAAmB,uD,KACnB,EACLC,EAAAvB,KAAKkB,gBAAY,MAAAK,SAAA,SAAAA,EAAEJ,aAAa,gBAAiB,UACjDK,EAAAxB,KAAKqB,iBAAa,MAAAG,SAAA,SAAAA,EAAEL,aAAa,cAAe,QAChDnB,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