@jumpgroup/jump-design-system 0.3.44 → 0.3.46
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-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 +2 -2
- package/dist/cjs/jump-tab.cjs.entry.js.map +1 -1
- package/dist/collection/components/jump-tab/jump-tab.css +40 -9
- package/dist/collection/components/jump-tab/jump-tab.js +1 -1
- package/dist/collection/components/jump-tab/jump-tab.js.map +1 -1
- package/dist/collection/components/jump-tab/jump-tab.stories.js +70 -0
- package/dist/collection/components/jump-tab/jump-tab.stories.js.map +1 -1
- package/dist/collection/components/jump-tab-item/jump-tab-item.css +1 -0
- 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 +2 -2
- package/dist/components/jump-tab.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 +2 -2
- 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-3dd1f9a0.entry.js +2 -0
- package/dist/jump-design-system/p-3dd1f9a0.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/types/components/jump-tab/jump-tab.stories.d.ts +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
|
@@ -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,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,QACEA,QAACC,UAAI,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,IACtHD,kEAAK,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;YACtEA,wEAAW,OAAO,EAAC,IAAI,EAAC,QAAQ,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)}@media (max-width: 768px){.ContentWrapper.ContentWrapper--Items{justify-content:flex-start;overflow-x:auto}.ContentWrapper.ContentWrapper--Items .fullBorder{justify-content:flex-start}}.Content{display:flex;flex-direction:row;align-items:flex-end;width:fit-content}.Content.fullBorder{width:100%;border-bottom:1px solid var(--jump-tab-border-color);justify-content:var(--alignment, flex-start)}.Content.fullBorder.inline ::slotted([slot=tab-item]){margin-bottom:-1px}.Content.rounded{border-radius:50px;background-color:var(--jump-tab-bg-color)}.Content.disabled{cursor:not-allowed;opacity:0.5;pointer-events:none}jump-tab-item{display:flex;align-items:flex-end;overflow:hidden}jump-tab-item .tab-title{display:block;white-space:normal;text-align:center}";
|
|
8
8
|
const JumpTabStyle0 = jumpTabCss;
|
|
9
9
|
|
|
10
10
|
const JumpTab = class {
|
|
@@ -76,7 +76,7 @@ const JumpTab = class {
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
render() {
|
|
79
|
-
return (index.h(index.Host, { key: '2375f577b5d1691b0f82ef3c2b54cfc4afd949fa', class: "JumpTab " + this.variant, id: this.tabGroupName, ref: (el) => { this.JumpTabEl = el; } }, index.h("div", { key: 'f073494433715e96f782124311b0d8ac447bf157', class: "Wrapper " + (this.fullBorder ? 'fullBorder' : '') }, index.h("div", { key: '
|
|
79
|
+
return (index.h(index.Host, { key: '2375f577b5d1691b0f82ef3c2b54cfc4afd949fa', class: "JumpTab " + this.variant, id: this.tabGroupName, ref: (el) => { this.JumpTabEl = el; } }, index.h("div", { key: 'f073494433715e96f782124311b0d8ac447bf157', class: "Wrapper " + (this.fullBorder ? 'fullBorder' : '') }, index.h("div", { key: '8b33fcc870db99b2f63770ba7234c687dc3289b6', class: "ContentWrapper ContentWrapper--Items", style: { '--alignment': this.getAlignment(this.alignment) } }, index.h("div", { key: 'fd87be2f9960845e6f13e583b325173fb5c75780', class: "Content " + this.variant + " " + (this.disabled ? 'disabled' : '') + " " + (this.fullBorder ? 'fullBorder' : ''), style: { '--alignment': this.getAlignment(this.alignment) } }, index.h("slot", { key: '2cd61f99305c97139575033fe2e8ddd22e551c16', name: "tab-item" }))), index.h("div", { key: '2aecf7da9e8d1bcbf6c1d3b54288b84bd71c999d', class: "ContentWrapper ContentWrapper--Panel" }, index.h("slot", { key: 'd9b8e534b11b039bafa0fcc5ecfcb966cf78663d', name: "tab-content" })))));
|
|
80
80
|
}
|
|
81
81
|
getAlignment(alignment) {
|
|
82
82
|
switch (alignment) {
|
|
@@ -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,wpCAAwpC,CAAC;AAC5qC,sBAAe,UAAU;;MCMZ,OAAO;;;;wBAGU,KAAK;yBACL,MAAM;0BACJ,KAAK;4BACJ,SAAS;uBACd,QAAQ;;IAKlC,sBAAsB,CAAC,KAAkB;QACvC,IAAI,CAA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AC,EAAE,IAClGD,kEAAK,KAAK,EAAE,UAAU,IAAI,IAAI,CAAC,UAAU,GAAG,YAAY,GAAG,EAAE,CAAC,IAC5DA,kEAAK,KAAK,EAAE,sCAAsC,EAAE,KAAK,EAAE,EAAE,aAAa,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,IAC7GA,kEAAK,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,IACxLA,mEAAM,IAAI,EAAC,UAAU,GAAQ,CACzB,CACF,EACNA,kEAAK,KAAK,EAAC,sCAAsC,IAC/CA,mEAAM,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":["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 &.ContentWrapper--Items {\n @media (max-width: 768px) {\n justify-content: flex-start;\n overflow-x: auto;\n\n .fullBorder {\n justify-content: flex-start;\n }\n }\n }\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}\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 ContentWrapper--Items\"} 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 ContentWrapper--Panel\">\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}
|
|
@@ -2,45 +2,76 @@
|
|
|
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
|
+
@media (max-width: 768px) {
|
|
36
|
+
.ContentWrapper.ContentWrapper--Items {
|
|
37
|
+
justify-content: flex-start;
|
|
38
|
+
overflow-x: auto;
|
|
39
|
+
}
|
|
40
|
+
.ContentWrapper.ContentWrapper--Items .fullBorder {
|
|
41
|
+
justify-content: flex-start;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.Content {
|
|
16
46
|
display: flex;
|
|
17
47
|
flex-direction: row;
|
|
18
48
|
align-items: flex-end;
|
|
19
49
|
width: fit-content;
|
|
20
50
|
}
|
|
21
|
-
|
|
51
|
+
.Content.fullBorder {
|
|
22
52
|
width: 100%;
|
|
23
53
|
border-bottom: 1px solid var(--jump-tab-border-color);
|
|
24
54
|
justify-content: var(--alignment, flex-start);
|
|
25
55
|
}
|
|
26
|
-
|
|
56
|
+
.Content.fullBorder.inline ::slotted([slot=tab-item]) {
|
|
27
57
|
margin-bottom: -1px;
|
|
28
58
|
}
|
|
29
|
-
|
|
59
|
+
.Content.rounded {
|
|
30
60
|
border-radius: 50px;
|
|
31
61
|
background-color: var(--jump-tab-bg-color);
|
|
32
62
|
}
|
|
33
|
-
|
|
63
|
+
.Content.disabled {
|
|
34
64
|
cursor: not-allowed;
|
|
35
65
|
opacity: 0.5;
|
|
36
66
|
pointer-events: none;
|
|
37
67
|
}
|
|
38
|
-
|
|
68
|
+
|
|
69
|
+
jump-tab-item {
|
|
39
70
|
display: flex;
|
|
40
71
|
align-items: flex-end;
|
|
41
72
|
overflow: hidden;
|
|
42
73
|
}
|
|
43
|
-
|
|
74
|
+
jump-tab-item .tab-title {
|
|
44
75
|
display: block;
|
|
45
76
|
white-space: normal;
|
|
46
77
|
text-align: center;
|
|
@@ -66,7 +66,7 @@ export class JumpTab {
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
render() {
|
|
69
|
-
return (h(Host, { key: '2375f577b5d1691b0f82ef3c2b54cfc4afd949fa', class: "JumpTab " + this.variant, id: this.tabGroupName, ref: (el) => { this.JumpTabEl = el; } }, h("div", { key: 'f073494433715e96f782124311b0d8ac447bf157', class: "Wrapper " + (this.fullBorder ? 'fullBorder' : '') }, h("div", { key: '
|
|
69
|
+
return (h(Host, { key: '2375f577b5d1691b0f82ef3c2b54cfc4afd949fa', class: "JumpTab " + this.variant, id: this.tabGroupName, ref: (el) => { this.JumpTabEl = el; } }, h("div", { key: 'f073494433715e96f782124311b0d8ac447bf157', class: "Wrapper " + (this.fullBorder ? 'fullBorder' : '') }, h("div", { key: '8b33fcc870db99b2f63770ba7234c687dc3289b6', class: "ContentWrapper ContentWrapper--Items", style: { '--alignment': this.getAlignment(this.alignment) } }, h("div", { key: 'fd87be2f9960845e6f13e583b325173fb5c75780', class: "Content " + this.variant + " " + (this.disabled ? 'disabled' : '') + " " + (this.fullBorder ? 'fullBorder' : ''), style: { '--alignment': this.getAlignment(this.alignment) } }, h("slot", { key: '2cd61f99305c97139575033fe2e8ddd22e551c16', name: "tab-item" }))), h("div", { key: '2aecf7da9e8d1bcbf6c1d3b54288b84bd71c999d', class: "ContentWrapper ContentWrapper--Panel" }, h("slot", { key: 'd9b8e534b11b039bafa0fcc5ecfcb966cf78663d', name: "tab-content" })))));
|
|
70
70
|
}
|
|
71
71
|
getAlignment(alignment) {
|
|
72
72
|
switch (alignment) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jump-tab.js","sourceRoot":"","sources":["../../../src/components/jump-tab/jump-tab.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAgB,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAOtF,MAAM,OAAO,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,EA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AE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;wBACxL,6DAAM,IAAI,EAAC,UAAU,GAAQ,CACzB,CACF;gBACN,4DAAK,KAAK,EAAC,sCAAsC;oBAC/C,6DAAM,IAAI,EAAC,aAAa,GAAQ,CAC5B,CACF,CACD,CACR,CAAC;IACJ,CAAC;IAEO,YAAY,CAAC,SAAiB;QACpC,QAAQ,SAAS,EAAE,CAAC;YAClB,KAAK,QAAQ;gBACX,OAAO,QAAQ,CAAC;YAClB,KAAK,OAAO;gBACV,OAAO,UAAU,CAAC;YACpB;gBACE,OAAO,YAAY,CAAC;QACxB,CAAC;IACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["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 ContentWrapper--Items\"} 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 ContentWrapper--Panel\">\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"]}
|
|
@@ -179,4 +179,74 @@ TabInlineWithPanel.args = {
|
|
|
179
179
|
fullBorder: true,
|
|
180
180
|
alignment: 'center',
|
|
181
181
|
};
|
|
182
|
+
const TemplateRobinson = () => {
|
|
183
|
+
return formatHtml(`<jump-tab tab-group-name="Product Tab" variant="inline" full-border="" alignment="center" class="JumpTab inline hydrated" id="Product Tab">
|
|
184
|
+
<jump-tab-item identifier="description" label="Dettagli" slot="tab-item" class="JumpTabItem inline hydrated"></jump-tab-item>
|
|
185
|
+
<style>
|
|
186
|
+
* {
|
|
187
|
+
--alignment: center;
|
|
188
|
+
}
|
|
189
|
+
</style>
|
|
190
|
+
<jump-tab-panel identifier="description" slot="tab-content" class="JumpTabPanel hydrated" id="description">
|
|
191
|
+
<section class="Section Section--Boxed Section--Tab">
|
|
192
|
+
<div class="Section__Wrapper">
|
|
193
|
+
<div class="tab-pane fade in active show" id="description" role="tabpanel"> <div class="h4">Informazioni prodotto</div> <div class="product-description"><p>Le<strong> crocchette per cuccioli </strong>Canagan Puppy Free Range Chicken sono le <strong>crocchette </strong>per <strong>cuccioli migliori </strong>e per ogni taglia e razza, totalmente <strong>Grain Free</strong> ovvero privi di cereali, ritenuti non solo fonte di allergie ed intolleranze, ma anche di nessun valore nutrizionale per animali carnivori come cane e gatti. <strong>Ogni ingrediente è prodotto in Inghilterra è altamente selezionato e adatto al consumo umano.</strong></p><p><strong>Canagan Puppy Free Range Chicken </strong>è realizzato seguendo il rapporto ancestrale: il perfetto equilibrio tra carne, frutta, verdura e oli che segue la <strong>dieta ancestrale</strong> del tuo pelosetto. Le <strong>crocchette </strong>per <strong>cuccioli </strong>di <strong>cane </strong>di Canagan garantiscono di supportare la sua crescita con un mangime estremamente gustoso, che segue la sua <strong>alimentazione naturale. </strong></p><p><strong>Canagan Puppy Free Range Chicken</strong> è composto solo da ingredienti di prima scelta per l'alimentazione del tuo cucciolo. <strong>Pollo allevato a terra</strong>, che fornisce proteine e vitamine fondamentali, <strong>patata dolce</strong> ricca di antiossidanti, <strong>alga marina</strong> che con lo iodio supporta il metabolismo, e fibre vegetali come <strong>mirtillo rosso e calendula</strong>, per il sostegno delle difese immunitarie.</p><p>Le <strong>crocchette per cuccioli</strong> sono arricchite con <strong>acidi grassi omega-3 e DHA, </strong>che promuovono il corretto sviluppo del sistema nervoso del tuo nuovo cucciolo.</p><p><strong>Grain Free di produzione inglese con ingredienti adatti al consumo umano a base di pollo allevato a terra, patate, verdura e frutta.</strong></p><div id="magicdomid4"><span class="author-0NApaNI9Jb0n b"><b>**SPEDIZIONE GRATIS! </b></span></div><div id="magicdomid5"><span class="author-0NApaNI9Jb0n b"><b>Valida esclusivamente per il costo di spedizione standard</b></span><span class="author-0NApaNI9Jb0n">, escluso servizi aggiuntivi. La scelta di qualsiasi servizio a pagamento (Express/Subito, località soggette a supplemento, ecc...) comporta il riaddebito totale dei costi di spedizione sul carrello. Per lo storno parziale del costo di spedizione standard si prega di contattare l'Assistenza Clienti al numero 0543.096850.</span></div><h2><span class="author-0NApaNI9Jb0n">Canagan</span></h2><p><span class="author-0NApaNI9Jb0n">I mangimi per cani e gatti <strong>Canagan</strong>, azienda britannica, forniscono un tipo di alimentazione di pregiata qualità attraverso l’utilizzo di <strong>fonti alimentari reperibili in natura</strong>. Nel pieno rispetto della filosofia del <strong>‘Biologicamente Appropriato’</strong>, l’azienda sceglie di avvicinarsi a ciò che l’animale mangerebbe effettivamente allo stato brado, senza distinguere i propri alimenti a seconda delle differenti fasce d’età. Oltre all’utilizzo di materie prime provenienti <strong>dalla filiera per l’alimentazione umana</strong>, tutti i prodotti Canagan sono <strong>grain free</strong>, contraddistinti da un contenuto ridotto di carboidrati, senza l’aggiunta di conservanti, aromi o coloranti.</span></p></div> </div>
|
|
194
|
+
</div>
|
|
195
|
+
</section>
|
|
196
|
+
</jump-tab-panel>
|
|
197
|
+
<jump-tab-item identifier="extra-0" label="Ingredienti" slot="tab-item" class="JumpTabItem inline hydrated"></jump-tab-item>
|
|
198
|
+
<style>
|
|
199
|
+
* {
|
|
200
|
+
--alignment: center;
|
|
201
|
+
}
|
|
202
|
+
</style>
|
|
203
|
+
<jump-tab-panel identifier="extra-0" slot="tab-content" class="JumpTabPanel hydrated" id="extra-0">
|
|
204
|
+
<section class="Section Section--Boxed Section--Tab">
|
|
205
|
+
<div class="Section__Wrapper">
|
|
206
|
+
<div class="tab-pane fade in extra" id="extra-0" role="tabpanel"> <p>Pollo Ruspante appena preparato (29%), pollo essiccato (26,5%), patate dolci (11%), patate, piselli, grasso di pollo (4%), erba medica, uovo in polvere (3%), brodo di pollo (1,5%), minerali, olio di salmone (1%), glucosamina (1.000 mg/kg), MSM (1.000 mg/kg), mela, carota, spinaci, psillio, estratto di olio di alghe marine, fruttoligosaccaridi, mannanoligosaccaridi, condroitina solfato (700 mg/kg), cozza verde, camomilla, menta piperita, calendula, mirtillo rosso, anice e fieno greco.</p> </div>
|
|
207
|
+
</div>
|
|
208
|
+
</section>
|
|
209
|
+
</jump-tab-panel>
|
|
210
|
+
<jump-tab-item identifier="extra-1" label="Tenori analitici" slot="tab-item" class="JumpTabItem inline hydrated"></jump-tab-item>
|
|
211
|
+
<style>
|
|
212
|
+
* {
|
|
213
|
+
--alignment: center;
|
|
214
|
+
}
|
|
215
|
+
</style>
|
|
216
|
+
<jump-tab-panel identifier="extra-1" slot="tab-content" class="JumpTabPanel hydrated" id="extra-1">
|
|
217
|
+
<section class="Section Section--Boxed Section--Tab">
|
|
218
|
+
<div class="Section__Wrapper">
|
|
219
|
+
<div class="tab-pane fade in extra" id="extra-1" role="tabpanel"> <p>Proteina grezza 34%, grasso grezzo 15%, fibra grezza 4%, ceneri grezze 9%, umidità 8%, Omega 6 3,6%, Omega 3 0,8%, calcio 1,6%, fosforo 1,3%.</p> </div>
|
|
220
|
+
</div>
|
|
221
|
+
</section>
|
|
222
|
+
</jump-tab-panel>
|
|
223
|
+
<jump-tab-item identifier="extra-2" label="Additivi nutrizionali" slot="tab-item" class="JumpTabItem inline hydrated"></jump-tab-item>
|
|
224
|
+
<style>
|
|
225
|
+
* {
|
|
226
|
+
--alignment: center;
|
|
227
|
+
}
|
|
228
|
+
</style>
|
|
229
|
+
<jump-tab-panel identifier="extra-2" slot="tab-content" class="JumpTabPanel hydrated" id="extra-2">
|
|
230
|
+
<section class="Section Section--Boxed Section--Tab">
|
|
231
|
+
<div class="Section__Wrapper">
|
|
232
|
+
<div class="tab-pane fade in extra" id="extra-2" role="tabpanel"> <p>Vitamina A 16.230 UI, Vitamina D3 1.980 UI, Vitamina E 240 UI. Oligoelementi: ferro (solfato di ferro (II) monoidrato) 192 mg, zinco (solfato di zinco monoidrato) 144 mg, manganese (solfato di manganese monoidrato) 45 mg, rame (solfato di rame (II) pentaidrato) 12 mg, iodio (calcio iodato anidro) 1,92 mg, selenio (selenito di sodio) 0,1 mg.</p> </div>
|
|
233
|
+
</div>
|
|
234
|
+
</section>
|
|
235
|
+
</jump-tab-panel>
|
|
236
|
+
<jump-tab-item identifier="extra-3" label="Dosi" slot="tab-item" class="JumpTabItem inline hydrated active" active=""></jump-tab-item>
|
|
237
|
+
<style>
|
|
238
|
+
* {
|
|
239
|
+
--alignment: center;
|
|
240
|
+
}
|
|
241
|
+
</style>
|
|
242
|
+
<jump-tab-panel identifier="extra-3" slot="tab-content" class="JumpTabPanel hydrated" id="extra-3" active="">
|
|
243
|
+
<section class="Section Section--Boxed Section--Tab">
|
|
244
|
+
<div class="Section__Wrapper">
|
|
245
|
+
<div class="tab-pane fade in extra" id="extra-3" role="tabpanel"> <p>Razione giornaliera consigliata:</p><div class="table-responsive"><table class="table table-bordered"><thead><tr class="table-success align-middle text-center"><th class="text-left align-middle">Peso del cane in kg</th><th>1-5</th><th>5-10</th><th>10-25</th><th>25-45</th></tr></thead><tbody><tr class="align-middle text-center"><th class="text-left align-middle">Grammi al giorno 2-3 mesi</th><td>65</td><td>145</td><td>215</td><td>375</td></tr></tbody><tbody><tr class="align-middle text-center"><th class="text-left align-middle">Grammi al giorno 4-5 mesi</th><td>85</td><td>165</td><td>235</td><td>395</td></tr></tbody><tbody><tr class="align-middle text-center"><th class="text-left align-middle">Grammi al giorno 6-7 mesi</th><td>90</td><td>180</td><td>255</td><td>415</td></tr></tbody><tbody><tr class="align-middle text-center"><th class="text-left align-middle">Grammi al giorno 8-9 mesi</th><td>85</td><td>165</td><td>255</td><td>430</td></tr></tbody><tbody><tr class="align-middle text-center"><th class="text-left align-middle">Grammi al giorno 10-11 mesi</th><td>65</td><td>145</td><td>235</td><td>415</td></tr></tbody><tbody><tr class="align-middle text-center"><th class="text-left align-middle">Grammi al giorno 12-13 mesi</th><td>Adulti</td><td>Adulti</td><td>215</td><td>395</td></tr></tbody><tbody><tr class="align-middle text-center"><th class="text-left align-middle">Grammi al giorno 14-15 mesi</th><td>Adulti</td><td>Adulti</td><td>Adulti</td><td>375</td></tr></tbody></table></div> </div>
|
|
246
|
+
</div>
|
|
247
|
+
</section>
|
|
248
|
+
</jump-tab-panel>
|
|
249
|
+
</jump-tab>`);
|
|
250
|
+
};
|
|
251
|
+
export const TabRobinson = TemplateRobinson.bind({});
|
|
182
252
|
//# sourceMappingURL=jump-tab.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jump-tab.stories.js","sourceRoot":"","sources":["../../../src/components/jump-tab/jump-tab.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAE1E,eAAe;IACX,KAAK,EAAE,qBAAqB;IAC5B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,QAAQ,EAAE;QACN,YAAY,EAAE;YACV,IAAI,EAAE,gBAAgB;YACtB,OAAO,EAAE,MAAM;YACf,WAAW,EAAE,sBAAsB;YAClC,KAAK,EAAE;gBACJ,IAAI,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;aAC9B;SACJ;QACD,OAAO,EAAE;YACL,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,QAAQ;YACjB,OAAO,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC;YAChD,WAAW,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UAAU,CAAC,aAAa,UAAU;;;;;;;;;;8DAUiB,EAAE;;;;;;;;SAQvD,CAAC,CAAC;AACX,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG,iBAAiB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAE7D,kBAAkB,CAAC,IAAI,GAAG;IACtB,YAAY,EAAE,OAAO;IACrB,OAAO,EAAE,QAAQ;IACjB,UAAU,EAAE,IAAI;IAChB,SAAS,EAAE,QAAQ;CACtB,CAAC","sourcesContent":["import { generateAttributesFromArgs, formatHtml} from '../../utils/utils';\n\nexport default {\n title: 'Components/Tab/Tabs',\n tags: ['autodocs'],\n argTypes: {\n tabGroupName: {\n name: 'tab-group-name',\n control: 'text',\n description: 'Indica la tab attiva',\n table: {\n type: { summary: 'string' },\n },\n },\n variant: {\n name: 'variant',\n control: 'select',\n options: ['inline', 'boxed', 'sheet', 'rounded'],\n description: 'Stile del tab e di tutti i suoi item',\n table: {\n type: { summary: 'string' },\n defaultValue: { summary: 'inline' },\n },\n },\n disabled: {\n name: 'disabled',\n control: 'boolean',\n description: 'Se true, tutte le tab item sono disabilitate',\n table: {\n type: { summary: 'boolean' },\n defaultValue: { summary: false },\n },\n },\n alignment: {\n name: 'alignment',\n control: 'select',\n options: ['left', 'center', 'right'],\n description: 'Allineamento delle tab item',\n table: {\n type: { summary: 'string' },\n defaultValue: { summary: 'left' },\n }\n },\n fullBorder: {\n name: 'full-border',\n control: 'boolean',\n description: 'Se true, il tab ha un bordo inferiore pieno',\n if: {\n arg: 'variant',\n eq: 'inline'\n },\n table: {\n type: { summary: 'boolean' },\n defaultValue: { summary: false },\n }\n }\n }\n}\n\nconst Template = (args) => {\n const attributes = generateAttributesFromArgs(args);\n return formatHtml(`<jump-tab ${attributes}>\n <jump-tab-item identifier=\"tab1\" variant=${args.variant} active label=\"Tab 1\" icon-name=\"gear\" slot=\"tab-item\"></jump-tab-item>\n <jump-tab-item identifier=\"tab2\" variant=${args.variant} label=\"Tab 2\" icon-name=\"gear\" slot=\"tab-item\"></jump-tab-item>\n <jump-tab-item identifier=\"tab3\" variant=${args.variant} label=\"Tab 3\" icon-name=\"gear\" slot=\"tab-item\"></jump-tab-item>\n </jump-tab>`);\n}\n\nexport const TabInline = Template.bind({});\n\nTabInline.args = {\n tabGroupName: 'Tab 1',\n variant: 'inline',\n alignment: 'center',\n};\n\nexport const TabBoxed = Template.bind({});\nTabBoxed.args = {\n tabGroupName: 'Tab 1',\n variant: 'boxed',\n alignment: 'left'\n};\n\n\nexport const TabRounded = Template.bind({});\nTabRounded.args = {\n tabGroupName: 'tabRounded',\n variant: 'rounded',\n alignment: 'right'\n};\n\nexport const TabInlineFullBorder = Template.bind({});\nTabInlineFullBorder.args = {\n tabGroupName: 'Tab 1',\n variant: 'inline',\n alignment: 'center',\n fullBorder: true \n};\n\n\nconst TemplateDisabled = (args) => {\n const attributes = generateAttributesFromArgs(args);\n return formatHtml(`<jump-tab ${attributes}>\n <jump-tab-item identifier=\"tab1\" active label=\"Tab 1\" icon-name=\"gear\" slot=\"tab-item\"></jump-tab-item>\n <jump-tab-item identifier=\"tab2\" label=\"Tab 2\" icon-name=\"gear\" slot=\"tab-item\"></jump-tab-item>\n <jump-tab-item identifier=\"tab3\" disabled label=\"Tab 3\" icon-name=\"gear\" slot=\"tab-item\"></jump-tab-item>\n </jump-tab>`);\n}\n\nexport const OneTabDisabled = TemplateDisabled.bind({});\nOneTabDisabled.args = {\n tabGroupName: 'Tab 1',\n variant: 'boxed',\n alignment: 'left'\n};\n\nconst TemplateWithListenerExample = (args, data) => {\n let id = data.id;\n const attributes = generateAttributesFromArgs(args);\n return formatHtml(`<div style=\"background-color: #EEEEEE; padding: 2rem;\"><jump-tab ${attributes}>\n <jump-tab-item identifier=\"tab1\" active label=\"Tab 1\" icon-name=\"gear\" slot=\"tab-item\"></jump-tab-item>\n <jump-tab-item identifier=\"tab2\" label=\"Tab 2\" icon-name=\"gear\" slot=\"tab-item\"></jump-tab-item>\n <jump-tab-item identifier=\"tab3\" label=\"Tab 3\" icon-name=\"gear\" slot=\"tab-item\"></jump-tab-item>\n <jump-tab-item identifier=\"tab4\" label=\"Tab 4\" icon-name=\"gear\" slot=\"tab-item\"></jump-tab-item>\n </jump-tab>\n <div>La tab attiva ha l'id: <span id=\"active-tab\">loading..<span></div>\n </div>\n <script>\n (function(){\n let container = document.querySelector('#story--${id}');\n container.querySelector('#active-tab').innerText = \"tab1\";\n container.querySelector('jump-tab').addEventListener('jump-change-activetab', (ev) => {\n container.querySelector('#active-tab').innerText = ev.detail.id;\n console.log('TemplateWithListenerExample - event:', ev.detail.id);\n });\n })();\n </script>`);\n};\n\nexport const TabInlineWithListener = TemplateWithListenerExample.bind({});\nTabInlineWithListener.args = { \n tabGroupName: 'tabInline',\n iconName: 'settings',\n variant: 'inline',\n alignment: 'center'\n};\n\nexport const TabBoxedWithListener = TemplateWithListenerExample.bind({});\nTabBoxedWithListener.args = { \n tabGroupName: 'tabBoxed',\n iconName: 'settings',\n variant: 'boxed'\n};\n\nexport const TaRoundedWithListener = TemplateWithListenerExample.bind({});\nTaRoundedWithListener.args = { \n tabGroupName: 'tabRounded',\n iconName: 'settings',\n variant: 'rounded'\n};\n\nexport const TabSheetWithListener = TemplateWithListenerExample.bind({});\nTabSheetWithListener.args = { \n tabGroupName: 'tabSheet',\n iconName: 'settings',\n variant: 'sheet'\n};\n\nconst TemplateWithPanel = (args,data) => {\n let id = data.id;\n const attributes = generateAttributesFromArgs(args);\n return formatHtml(`<jump-tab ${attributes}>\n <jump-tab-item identifier=\"tab1\" active label=\"Tab 1\" icon-name=\"gear\" slot=\"tab-item\"></jump-tab-item>\n <jump-tab-item identifier=\"tab2\" label=\"Tab 2\" icon-name=\"gear\" slot=\"tab-item\"></jump-tab-item>\n <jump-tab-item identifier=\"tab3\" label=\"Tab 3\" icon-name=\"gear\" slot=\"tab-item\"></jump-tab-item>\n <jump-tab-panel identifier=\"tab1\" active slot=\"tab-content\">Tab 1 content</jump-tab-panel>\n <jump-tab-panel identifier=\"tab2\" slot=\"tab-content\">Tab 2 content</jump-tab-panel>\n <jump-tab-panel identifier=\"tab3\" slot=\"tab-content\">Tab 3 content</jump-tab-panel>\n </jump-tab> <div>La tab attiva ha l'id: <span id=\"active-tab\">loading..<span></div>\n </div><script>\n (function(){\n let container = document.querySelector('#story--${id}');\n container.querySelector('#active-tab').innerText = \"tab1\";\n container.querySelector('jump-tab').addEventListener('jump-change-activetab', (ev) => {\n container.querySelector('#active-tab').innerText = ev.detail.id;\n console.log('TemplateWithPanel - event:', ev.detail.id);\n });\n })();\n </script>\n `);\n}\n\nexport const TabInlineWithPanel = TemplateWithPanel.bind({});\n\nTabInlineWithPanel.args = {\n tabGroupName: 'Tab 1',\n variant: 'inline',\n fullBorder: true,\n alignment: 'center',\n};"]}
|
|
1
|
+
{"version":3,"file":"jump-tab.stories.js","sourceRoot":"","sources":["../../../src/components/jump-tab/jump-tab.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAE1E,eAAe;IACX,KAAK,EAAE,qBAAqB;IAC5B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,QAAQ,EAAE;QACN,YAAY,EAAE;YACV,IAAI,EAAE,gBAAgB;YACtB,OAAO,EAAE,MAAM;YACf,WAAW,EAAE,sBAAsB;YAClC,KAAK,EAAE;gBACJ,IAAI,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;aAC9B;SACJ;QACD,OAAO,EAAE;YACL,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,QAAQ;YACjB,OAAO,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC;YAChD,WAAW,EAAE,sCAAsC;YACnD,KAAK,EAAE;gBACH,IAAI,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;gBAC3B,YAAY,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;aACtC;SACJ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C,IAAI,CAAC,EAAE,CAAC,CAAC;AAE7D,kBAAkB,CAAC,IAAI,GAAG;IACtB,YAAY,EAAE,OAAO;IACrB,OAAO,EAAE,QAAQ;IACjB,UAAU,EAAE,IAAI;IAChB,SAAS,EAAE,QAAQ;CACtB,CAAC;AAEF,MAAM,gBAAgB,GAAG,GAAG,EAAE;IAC5B,OAAO,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAkEF,CAAC,CAAC;AACpB,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import { generateAttributesFromArgs, formatHtml} from '../../utils/utils';\n\nexport default {\n title: 'Components/Tab/Tabs',\n tags: ['autodocs'],\n argTypes: {\n tabGroupName: {\n name: 'tab-group-name',\n control: 'text',\n description: 'Indica la tab attiva',\n table: {\n type: { summary: 'string' },\n },\n },\n variant: {\n name: 'variant',\n control: 'select',\n options: ['inline', 'boxed', 'sheet', 'rounded'],\n description: 'Stile del tab e di tutti i suoi item',\n table: {\n type: { summary: 'string' },\n defaultValue: { summary: 'inline' },\n },\n },\n disabled: {\n name: 'disabled',\n control: 'boolean',\n description: 'Se true, tutte le tab item sono disabilitate',\n table: {\n type: { summary: 'boolean' },\n defaultValue: { summary: false },\n },\n },\n alignment: {\n name: 'alignment',\n control: 'select',\n options: ['left', 'center', 'right'],\n description: 'Allineamento delle tab item',\n table: {\n type: { summary: 'string' },\n defaultValue: { summary: 'left' },\n }\n },\n fullBorder: {\n name: 'full-border',\n control: 'boolean',\n description: 'Se true, il tab ha un bordo inferiore pieno',\n if: {\n arg: 'variant',\n eq: 'inline'\n },\n table: {\n type: { summary: 'boolean' },\n defaultValue: { summary: false },\n }\n }\n }\n}\n\nconst Template = (args) => {\n const attributes = generateAttributesFromArgs(args);\n return formatHtml(`<jump-tab ${attributes}>\n <jump-tab-item identifier=\"tab1\" variant=${args.variant} active label=\"Tab 1\" icon-name=\"gear\" slot=\"tab-item\"></jump-tab-item>\n <jump-tab-item identifier=\"tab2\" variant=${args.variant} label=\"Tab 2\" icon-name=\"gear\" slot=\"tab-item\"></jump-tab-item>\n <jump-tab-item identifier=\"tab3\" variant=${args.variant} label=\"Tab 3\" icon-name=\"gear\" slot=\"tab-item\"></jump-tab-item>\n </jump-tab>`);\n}\n\nexport const TabInline = Template.bind({});\n\nTabInline.args = {\n tabGroupName: 'Tab 1',\n variant: 'inline',\n alignment: 'center',\n};\n\nexport const TabBoxed = Template.bind({});\nTabBoxed.args = {\n tabGroupName: 'Tab 1',\n variant: 'boxed',\n alignment: 'left'\n};\n\n\nexport const TabRounded = Template.bind({});\nTabRounded.args = {\n tabGroupName: 'tabRounded',\n variant: 'rounded',\n alignment: 'right'\n};\n\nexport const TabInlineFullBorder = Template.bind({});\nTabInlineFullBorder.args = {\n tabGroupName: 'Tab 1',\n variant: 'inline',\n alignment: 'center',\n fullBorder: true\n};\n\n\nconst TemplateDisabled = (args) => {\n const attributes = generateAttributesFromArgs(args);\n return formatHtml(`<jump-tab ${attributes}>\n <jump-tab-item identifier=\"tab1\" active label=\"Tab 1\" icon-name=\"gear\" slot=\"tab-item\"></jump-tab-item>\n <jump-tab-item identifier=\"tab2\" label=\"Tab 2\" icon-name=\"gear\" slot=\"tab-item\"></jump-tab-item>\n <jump-tab-item identifier=\"tab3\" disabled label=\"Tab 3\" icon-name=\"gear\" slot=\"tab-item\"></jump-tab-item>\n </jump-tab>`);\n}\n\nexport const OneTabDisabled = TemplateDisabled.bind({});\nOneTabDisabled.args = {\n tabGroupName: 'Tab 1',\n variant: 'boxed',\n alignment: 'left'\n};\n\nconst TemplateWithListenerExample = (args, data) => {\n let id = data.id;\n const attributes = generateAttributesFromArgs(args);\n return formatHtml(`<div style=\"background-color: #EEEEEE; padding: 2rem;\"><jump-tab ${attributes}>\n <jump-tab-item identifier=\"tab1\" active label=\"Tab 1\" icon-name=\"gear\" slot=\"tab-item\"></jump-tab-item>\n <jump-tab-item identifier=\"tab2\" label=\"Tab 2\" icon-name=\"gear\" slot=\"tab-item\"></jump-tab-item>\n <jump-tab-item identifier=\"tab3\" label=\"Tab 3\" icon-name=\"gear\" slot=\"tab-item\"></jump-tab-item>\n <jump-tab-item identifier=\"tab4\" label=\"Tab 4\" icon-name=\"gear\" slot=\"tab-item\"></jump-tab-item>\n </jump-tab>\n <div>La tab attiva ha l'id: <span id=\"active-tab\">loading..<span></div>\n </div>\n <script>\n (function(){\n let container = document.querySelector('#story--${id}');\n container.querySelector('#active-tab').innerText = \"tab1\";\n container.querySelector('jump-tab').addEventListener('jump-change-activetab', (ev) => {\n container.querySelector('#active-tab').innerText = ev.detail.id;\n console.log('TemplateWithListenerExample - event:', ev.detail.id);\n });\n })();\n </script>`);\n};\n\nexport const TabInlineWithListener = TemplateWithListenerExample.bind({});\nTabInlineWithListener.args = {\n tabGroupName: 'tabInline',\n iconName: 'settings',\n variant: 'inline',\n alignment: 'center'\n};\n\nexport const TabBoxedWithListener = TemplateWithListenerExample.bind({});\nTabBoxedWithListener.args = {\n tabGroupName: 'tabBoxed',\n iconName: 'settings',\n variant: 'boxed'\n};\n\nexport const TaRoundedWithListener = TemplateWithListenerExample.bind({});\nTaRoundedWithListener.args = {\n tabGroupName: 'tabRounded',\n iconName: 'settings',\n variant: 'rounded'\n};\n\nexport const TabSheetWithListener = TemplateWithListenerExample.bind({});\nTabSheetWithListener.args = {\n tabGroupName: 'tabSheet',\n iconName: 'settings',\n variant: 'sheet'\n};\n\nconst TemplateWithPanel = (args,data) => {\n let id = data.id;\n const attributes = generateAttributesFromArgs(args);\n return formatHtml(`<jump-tab ${attributes}>\n <jump-tab-item identifier=\"tab1\" active label=\"Tab 1\" icon-name=\"gear\" slot=\"tab-item\"></jump-tab-item>\n <jump-tab-item identifier=\"tab2\" label=\"Tab 2\" icon-name=\"gear\" slot=\"tab-item\"></jump-tab-item>\n <jump-tab-item identifier=\"tab3\" label=\"Tab 3\" icon-name=\"gear\" slot=\"tab-item\"></jump-tab-item>\n <jump-tab-panel identifier=\"tab1\" active slot=\"tab-content\">Tab 1 content</jump-tab-panel>\n <jump-tab-panel identifier=\"tab2\" slot=\"tab-content\">Tab 2 content</jump-tab-panel>\n <jump-tab-panel identifier=\"tab3\" slot=\"tab-content\">Tab 3 content</jump-tab-panel>\n </jump-tab> <div>La tab attiva ha l'id: <span id=\"active-tab\">loading..<span></div>\n </div><script>\n (function(){\n let container = document.querySelector('#story--${id}');\n container.querySelector('#active-tab').innerText = \"tab1\";\n container.querySelector('jump-tab').addEventListener('jump-change-activetab', (ev) => {\n container.querySelector('#active-tab').innerText = ev.detail.id;\n console.log('TemplateWithPanel - event:', ev.detail.id);\n });\n })();\n </script>\n `);\n}\n\nexport const TabInlineWithPanel = TemplateWithPanel.bind({});\n\nTabInlineWithPanel.args = {\n tabGroupName: 'Tab 1',\n variant: 'inline',\n fullBorder: true,\n alignment: 'center',\n};\n\nconst TemplateRobinson = () => {\n return formatHtml(`<jump-tab tab-group-name=\"Product Tab\" variant=\"inline\" full-border=\"\" alignment=\"center\" class=\"JumpTab inline hydrated\" id=\"Product Tab\">\n <jump-tab-item identifier=\"description\" label=\"Dettagli\" slot=\"tab-item\" class=\"JumpTabItem inline hydrated\"></jump-tab-item>\n <style>\n * {\n --alignment: center;\n }\n </style>\n <jump-tab-panel identifier=\"description\" slot=\"tab-content\" class=\"JumpTabPanel hydrated\" id=\"description\">\n <section class=\"Section Section--Boxed Section--Tab\">\n\t\t<div class=\"Section__Wrapper\">\n\t\t\t\t\t<div class=\"tab-pane fade in active show\" id=\"description\" role=\"tabpanel\"> <div class=\"h4\">Informazioni prodotto</div> <div class=\"product-description\"><p>Le<strong> crocchette per cuccioli </strong>Canagan Puppy Free Range Chicken sono le <strong>crocchette </strong>per <strong>cuccioli migliori </strong>e per ogni taglia e razza, totalmente <strong>Grain Free</strong> ovvero privi di cereali, ritenuti non solo fonte di allergie ed intolleranze, ma anche di nessun valore nutrizionale per animali carnivori come cane e gatti. <strong>Ogni ingrediente è prodotto in Inghilterra è altamente selezionato e adatto al consumo umano.</strong></p><p><strong>Canagan Puppy Free Range Chicken </strong>è realizzato seguendo il rapporto ancestrale: il perfetto equilibrio tra carne, frutta, verdura e oli che segue la <strong>dieta ancestrale</strong> del tuo pelosetto. Le <strong>crocchette </strong>per <strong>cuccioli </strong>di <strong>cane </strong>di Canagan garantiscono di supportare la sua crescita con un mangime estremamente gustoso, che segue la sua <strong>alimentazione naturale. </strong></p><p><strong>Canagan Puppy Free Range Chicken</strong> è composto solo da ingredienti di prima scelta per l'alimentazione del tuo cucciolo. <strong>Pollo allevato a terra</strong>, che fornisce proteine e vitamine fondamentali, <strong>patata dolce</strong> ricca di antiossidanti, <strong>alga marina</strong> che con lo iodio supporta il metabolismo, e fibre vegetali come <strong>mirtillo rosso e calendula</strong>, per il sostegno delle difese immunitarie.</p><p>Le <strong>crocchette per cuccioli</strong> sono arricchite con <strong>acidi grassi omega-3 e DHA, </strong>che promuovono il corretto sviluppo del sistema nervoso del tuo nuovo cucciolo.</p><p><strong>Grain Free di produzione inglese con ingredienti adatti al consumo umano a base di pollo allevato a terra, patate, verdura e frutta.</strong></p><div id=\"magicdomid4\"><span class=\"author-0NApaNI9Jb0n b\"><b>**SPEDIZIONE GRATIS! </b></span></div><div id=\"magicdomid5\"><span class=\"author-0NApaNI9Jb0n b\"><b>Valida esclusivamente per il costo di spedizione standard</b></span><span class=\"author-0NApaNI9Jb0n\">, escluso servizi aggiuntivi. La scelta di qualsiasi servizio a pagamento (Express/Subito, località soggette a supplemento, ecc...) comporta il riaddebito totale dei costi di spedizione sul carrello. Per lo storno parziale del costo di spedizione standard si prega di contattare l'Assistenza Clienti al numero 0543.096850.</span></div><h2><span class=\"author-0NApaNI9Jb0n\">Canagan</span></h2><p><span class=\"author-0NApaNI9Jb0n\">I mangimi per cani e gatti <strong>Canagan</strong>, azienda britannica, forniscono un tipo di alimentazione di pregiata qualità attraverso l’utilizzo di <strong>fonti alimentari reperibili in natura</strong>. Nel pieno rispetto della filosofia del <strong>‘Biologicamente Appropriato’</strong>, l’azienda sceglie di avvicinarsi a ciò che l’animale mangerebbe effettivamente allo stato brado, senza distinguere i propri alimenti a seconda delle differenti fasce d’età. Oltre all’utilizzo di materie prime provenienti <strong>dalla filiera per l’alimentazione umana</strong>, tutti i prodotti Canagan sono <strong>grain free</strong>, contraddistinti da un contenuto ridotto di carboidrati, senza l’aggiunta di conservanti, aromi o coloranti.</span></p></div> </div>\n\t\t\t</div>\n\t</section>\n </jump-tab-panel>\n <jump-tab-item identifier=\"extra-0\" label=\"Ingredienti\" slot=\"tab-item\" class=\"JumpTabItem inline hydrated\"></jump-tab-item>\n <style>\n * {\n --alignment: center;\n }\n </style>\n <jump-tab-panel identifier=\"extra-0\" slot=\"tab-content\" class=\"JumpTabPanel hydrated\" id=\"extra-0\">\n <section class=\"Section Section--Boxed Section--Tab\">\n\t\t<div class=\"Section__Wrapper\">\n\t\t\t\t\t<div class=\"tab-pane fade in extra\" id=\"extra-0\" role=\"tabpanel\"> <p>Pollo Ruspante appena preparato (29%), pollo essiccato (26,5%), patate dolci (11%), patate, piselli, grasso di pollo (4%), erba medica, uovo in polvere (3%), brodo di pollo (1,5%), minerali, olio di salmone (1%), glucosamina (1.000 mg/kg), MSM (1.000 mg/kg), mela, carota, spinaci, psillio, estratto di olio di alghe marine, fruttoligosaccaridi, mannanoligosaccaridi, condroitina solfato (700 mg/kg), cozza verde, camomilla, menta piperita, calendula, mirtillo rosso, anice e fieno greco.</p> </div>\n\t\t\t</div>\n\t</section>\n </jump-tab-panel>\n <jump-tab-item identifier=\"extra-1\" label=\"Tenori analitici\" slot=\"tab-item\" class=\"JumpTabItem inline hydrated\"></jump-tab-item>\n <style>\n * {\n --alignment: center;\n }\n </style>\n <jump-tab-panel identifier=\"extra-1\" slot=\"tab-content\" class=\"JumpTabPanel hydrated\" id=\"extra-1\">\n <section class=\"Section Section--Boxed Section--Tab\">\n\t\t<div class=\"Section__Wrapper\">\n\t\t\t\t\t<div class=\"tab-pane fade in extra\" id=\"extra-1\" role=\"tabpanel\"> <p>Proteina grezza 34%, grasso grezzo 15%, fibra grezza 4%, ceneri grezze 9%, umidità 8%, Omega 6 3,6%, Omega 3 0,8%, calcio 1,6%, fosforo 1,3%.</p> </div>\n\t\t\t</div>\n\t</section>\n </jump-tab-panel>\n <jump-tab-item identifier=\"extra-2\" label=\"Additivi nutrizionali\" slot=\"tab-item\" class=\"JumpTabItem inline hydrated\"></jump-tab-item>\n <style>\n * {\n --alignment: center;\n }\n </style>\n <jump-tab-panel identifier=\"extra-2\" slot=\"tab-content\" class=\"JumpTabPanel hydrated\" id=\"extra-2\">\n <section class=\"Section Section--Boxed Section--Tab\">\n\t\t<div class=\"Section__Wrapper\">\n\t\t\t\t\t<div class=\"tab-pane fade in extra\" id=\"extra-2\" role=\"tabpanel\"> <p>Vitamina A 16.230 UI, Vitamina D3 1.980 UI, Vitamina E 240 UI. Oligoelementi: ferro (solfato di ferro (II) monoidrato) 192 mg, zinco (solfato di zinco monoidrato) 144 mg, manganese (solfato di manganese monoidrato) 45 mg, rame (solfato di rame (II) pentaidrato) 12 mg, iodio (calcio iodato anidro) 1,92 mg, selenio (selenito di sodio) 0,1 mg.</p> </div>\n\t\t\t</div>\n\t</section>\n </jump-tab-panel>\n <jump-tab-item identifier=\"extra-3\" label=\"Dosi\" slot=\"tab-item\" class=\"JumpTabItem inline hydrated active\" active=\"\"></jump-tab-item>\n <style>\n * {\n --alignment: center;\n }\n </style>\n <jump-tab-panel identifier=\"extra-3\" slot=\"tab-content\" class=\"JumpTabPanel hydrated\" id=\"extra-3\" active=\"\">\n <section class=\"Section Section--Boxed Section--Tab\">\n\t\t<div class=\"Section__Wrapper\">\n\t\t\t\t\t<div class=\"tab-pane fade in extra\" id=\"extra-3\" role=\"tabpanel\"> <p>Razione giornaliera consigliata:</p><div class=\"table-responsive\"><table class=\"table table-bordered\"><thead><tr class=\"table-success align-middle text-center\"><th class=\"text-left align-middle\">Peso del cane in kg</th><th>1-5</th><th>5-10</th><th>10-25</th><th>25-45</th></tr></thead><tbody><tr class=\"align-middle text-center\"><th class=\"text-left align-middle\">Grammi al giorno 2-3 mesi</th><td>65</td><td>145</td><td>215</td><td>375</td></tr></tbody><tbody><tr class=\"align-middle text-center\"><th class=\"text-left align-middle\">Grammi al giorno 4-5 mesi</th><td>85</td><td>165</td><td>235</td><td>395</td></tr></tbody><tbody><tr class=\"align-middle text-center\"><th class=\"text-left align-middle\">Grammi al giorno 6-7 mesi</th><td>90</td><td>180</td><td>255</td><td>415</td></tr></tbody><tbody><tr class=\"align-middle text-center\"><th class=\"text-left align-middle\">Grammi al giorno 8-9 mesi</th><td>85</td><td>165</td><td>255</td><td>430</td></tr></tbody><tbody><tr class=\"align-middle text-center\"><th class=\"text-left align-middle\">Grammi al giorno 10-11 mesi</th><td>65</td><td>145</td><td>235</td><td>415</td></tr></tbody><tbody><tr class=\"align-middle text-center\"><th class=\"text-left align-middle\">Grammi al giorno 12-13 mesi</th><td>Adulti</td><td>Adulti</td><td>215</td><td>395</td></tr></tbody><tbody><tr class=\"align-middle text-center\"><th class=\"text-left align-middle\">Grammi al giorno 14-15 mesi</th><td>Adulti</td><td>Adulti</td><td>Adulti</td><td>375</td></tr></tbody></table></div> </div>\n\t\t\t</div>\n\t</section>\n </jump-tab-panel>\n </jump-tab>`);\n}\n\nexport const TabRobinson = TemplateRobinson.bind({});\n"]}
|
|
@@ -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)}@media (max-width: 768px){.ContentWrapper.ContentWrapper--Items{justify-content:flex-start;overflow-x:auto}.ContentWrapper.ContentWrapper--Items .fullBorder{justify-content:flex-start}}.Content{display:flex;flex-direction:row;align-items:flex-end;width:fit-content}.Content.fullBorder{width:100%;border-bottom:1px solid var(--jump-tab-border-color);justify-content:var(--alignment, flex-start)}.Content.fullBorder.inline ::slotted([slot=tab-item]){margin-bottom:-1px}.Content.rounded{border-radius:50px;background-color:var(--jump-tab-bg-color)}.Content.disabled{cursor:not-allowed;opacity:0.5;pointer-events:none}jump-tab-item{display:flex;align-items:flex-end;overflow:hidden}jump-tab-item .tab-title{display:block;white-space:normal;text-align:center}";
|
|
4
4
|
const JumpTabStyle0 = jumpTabCss;
|
|
5
5
|
|
|
6
6
|
const JumpTab$1 = /*@__PURE__*/ proxyCustomElement(class JumpTab extends HTMLElement {
|
|
@@ -74,7 +74,7 @@ const JumpTab$1 = /*@__PURE__*/ proxyCustomElement(class JumpTab extends HTMLEle
|
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
render() {
|
|
77
|
-
return (h(Host, { key: '2375f577b5d1691b0f82ef3c2b54cfc4afd949fa', class: "JumpTab " + this.variant, id: this.tabGroupName, ref: (el) => { this.JumpTabEl = el; } }, h("div", { key: 'f073494433715e96f782124311b0d8ac447bf157', class: "Wrapper " + (this.fullBorder ? 'fullBorder' : '') }, h("div", { key: '
|
|
77
|
+
return (h(Host, { key: '2375f577b5d1691b0f82ef3c2b54cfc4afd949fa', class: "JumpTab " + this.variant, id: this.tabGroupName, ref: (el) => { this.JumpTabEl = el; } }, h("div", { key: 'f073494433715e96f782124311b0d8ac447bf157', class: "Wrapper " + (this.fullBorder ? 'fullBorder' : '') }, h("div", { key: '8b33fcc870db99b2f63770ba7234c687dc3289b6', class: "ContentWrapper ContentWrapper--Items", style: { '--alignment': this.getAlignment(this.alignment) } }, h("div", { key: 'fd87be2f9960845e6f13e583b325173fb5c75780', class: "Content " + this.variant + " " + (this.disabled ? 'disabled' : '') + " " + (this.fullBorder ? 'fullBorder' : ''), style: { '--alignment': this.getAlignment(this.alignment) } }, h("slot", { key: '2cd61f99305c97139575033fe2e8ddd22e551c16', name: "tab-item" }))), h("div", { key: '2aecf7da9e8d1bcbf6c1d3b54288b84bd71c999d', class: "ContentWrapper ContentWrapper--Panel" }, h("slot", { key: 'd9b8e534b11b039bafa0fcc5ecfcb966cf78663d', name: "tab-content" })))));
|
|
78
78
|
}
|
|
79
79
|
getAlignment(alignment) {
|
|
80
80
|
switch (alignment) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"jump-tab.js","mappings":";;AAAA,MAAM,UAAU,GAAG,
|
|
1
|
+
{"file":"jump-tab.js","mappings":";;AAAA,MAAM,UAAU,GAAG,wpCAAwpC,CAAC;AAC5qC,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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4DAAK,KAAK,EAAE,sCAAsC,EAAE,KAAK,EAAE,EAAE,aAAa,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,IAC7G,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,sCAAsC,IAC/C,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 &.ContentWrapper--Items {\n @media (max-width: 768px) {\n justify-content: flex-start;\n overflow-x: auto;\n\n .fullBorder {\n justify-content: flex-start;\n }\n }\n }\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}\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 ContentWrapper--Items\"} 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 ContentWrapper--Panel\">\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, 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)}@media (max-width: 768px){.ContentWrapper.ContentWrapper--Items{justify-content:flex-start;overflow-x:auto}.ContentWrapper.ContentWrapper--Items .fullBorder{justify-content:flex-start}}.Content{display:flex;flex-direction:row;align-items:flex-end;width:fit-content}.Content.fullBorder{width:100%;border-bottom:1px solid var(--jump-tab-border-color);justify-content:var(--alignment, flex-start)}.Content.fullBorder.inline ::slotted([slot=tab-item]){margin-bottom:-1px}.Content.rounded{border-radius:50px;background-color:var(--jump-tab-bg-color)}.Content.disabled{cursor:not-allowed;opacity:0.5;pointer-events:none}jump-tab-item{display:flex;align-items:flex-end;overflow:hidden}jump-tab-item .tab-title{display:block;white-space:normal;text-align:center}";
|
|
4
4
|
const JumpTabStyle0 = jumpTabCss;
|
|
5
5
|
|
|
6
6
|
const JumpTab = class {
|
|
@@ -72,7 +72,7 @@ const JumpTab = class {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
render() {
|
|
75
|
-
return (h(Host, { key: '2375f577b5d1691b0f82ef3c2b54cfc4afd949fa', class: "JumpTab " + this.variant, id: this.tabGroupName, ref: (el) => { this.JumpTabEl = el; } }, h("div", { key: 'f073494433715e96f782124311b0d8ac447bf157', class: "Wrapper " + (this.fullBorder ? 'fullBorder' : '') }, h("div", { key: '
|
|
75
|
+
return (h(Host, { key: '2375f577b5d1691b0f82ef3c2b54cfc4afd949fa', class: "JumpTab " + this.variant, id: this.tabGroupName, ref: (el) => { this.JumpTabEl = el; } }, h("div", { key: 'f073494433715e96f782124311b0d8ac447bf157', class: "Wrapper " + (this.fullBorder ? 'fullBorder' : '') }, h("div", { key: '8b33fcc870db99b2f63770ba7234c687dc3289b6', class: "ContentWrapper ContentWrapper--Items", style: { '--alignment': this.getAlignment(this.alignment) } }, h("div", { key: 'fd87be2f9960845e6f13e583b325173fb5c75780', class: "Content " + this.variant + " " + (this.disabled ? 'disabled' : '') + " " + (this.fullBorder ? 'fullBorder' : ''), style: { '--alignment': this.getAlignment(this.alignment) } }, h("slot", { key: '2cd61f99305c97139575033fe2e8ddd22e551c16', name: "tab-item" }))), h("div", { key: '2aecf7da9e8d1bcbf6c1d3b54288b84bd71c999d', class: "ContentWrapper ContentWrapper--Panel" }, h("slot", { key: 'd9b8e534b11b039bafa0fcc5ecfcb966cf78663d', name: "tab-content" })))));
|
|
76
76
|
}
|
|
77
77
|
getAlignment(alignment) {
|
|
78
78
|
switch (alignment) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"jump-tab.entry.js","mappings":";;AAAA,MAAM,UAAU,GAAG,
|
|
1
|
+
{"file":"jump-tab.entry.js","mappings":";;AAAA,MAAM,UAAU,GAAG,wpCAAwpC,CAAC;AAC5qC,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,UA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AAY,GAAG,EAAE,CAAC,IAC5D,4DAAK,KAAK,EAAE,sCAAsC,EAAE,KAAK,EAAE,EAAE,aAAa,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,IAC7G,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,sCAAsC,IAC/C,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 &.ContentWrapper--Items {\n @media (max-width: 768px) {\n justify-content: flex-start;\n overflow-x: auto;\n\n .fullBorder {\n justify-content: flex-start;\n }\n }\n }\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}\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 ContentWrapper--Items\"} 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 ContentWrapper--Panel\">\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-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-
|
|
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-3dd1f9a0",[[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 t,c as e,h as n,H as a}from"./p-1c5db8d3.js";const i=":host{display:block;--jump-tab-bg-color:var(--gray-ultralight, #f8f8f8);--jump-tab-border-color:var(--neutral-grey-disabled, #CBCBCB);overflow-x:auto;scrollbar-width:none;}:host::-webkit-scrollbar{display:none;}.Wrapper{display:flex;flex-direction:column;overflow-x:auto;scrollbar-width:none;}.Wrapper::-webkit-scrollbar{display:none;}.ContentWrapper{display:flex;width:100%;justify-content:var(--alignment, flex-start)}@media (max-width: 768px){.ContentWrapper.ContentWrapper--Items{justify-content:flex-start;overflow-x:auto}.ContentWrapper.ContentWrapper--Items .fullBorder{justify-content:flex-start}}.Content{display:flex;flex-direction:row;align-items:flex-end;width:fit-content}.Content.fullBorder{width:100%;border-bottom:1px solid var(--jump-tab-border-color);justify-content:var(--alignment, flex-start)}.Content.fullBorder.inline ::slotted([slot=tab-item]){margin-bottom:-1px}.Content.rounded{border-radius:50px;background-color:var(--jump-tab-bg-color)}.Content.disabled{cursor:not-allowed;opacity:0.5;pointer-events:none}jump-tab-item{display:flex;align-items:flex-end;overflow:hidden}jump-tab-item .tab-title{display:block;white-space:normal;text-align:center}";const r=i;const s=class{constructor(n){t(this,n);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 n=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,i)=>{if(t!==e&&i!==a.length-1){t.style.borderRight=`1px solid ${n}`}else{t.style.borderRight="1px solid transparent"}}));let t=e.previousElementSibling;if(t){t.style.borderRight="1px solid transparent"}}}else{e.removeAttribute("active")}}))}let i=this.JumpTabEl.querySelectorAll("jump-tab-panel");if(i.length>0){i.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 n=this.JumpTabEl.querySelectorAll("jump-tab-item");if(n.length>0){n.forEach(((t,a)=>{if(a===n.length-1||t.classList.contains("active")){t.style.borderRight="1px solid transparent"}else{t.style.borderRight=`1px solid ${e}`}}))}}}render(){return n(a,{key:"2375f577b5d1691b0f82ef3c2b54cfc4afd949fa",class:"JumpTab "+this.variant,id:this.tabGroupName,ref:t=>{this.JumpTabEl=t}},n("div",{key:"f073494433715e96f782124311b0d8ac447bf157",class:"Wrapper "+(this.fullBorder?"fullBorder":"")},n("div",{key:"8b33fcc870db99b2f63770ba7234c687dc3289b6",class:"ContentWrapper ContentWrapper--Items",style:{"--alignment":this.getAlignment(this.alignment)}},n("div",{key:"fd87be2f9960845e6f13e583b325173fb5c75780",class:"Content "+this.variant+" "+(this.disabled?"disabled":"")+" "+(this.fullBorder?"fullBorder":""),style:{"--alignment":this.getAlignment(this.alignment)}},n("slot",{key:"2cd61f99305c97139575033fe2e8ddd22e551c16",name:"tab-item"}))),n("div",{key:"2aecf7da9e8d1bcbf6c1d3b54288b84bd71c999d",class:"ContentWrapper ContentWrapper--Panel"},n("slot",{key:"d9b8e534b11b039bafa0fcc5ecfcb966cf78663d",name:"tab-content"}))))}getAlignment(t){switch(t){case"center":return"center";case"right":return"flex-end";default:return"flex-start"}}};s.style=r;export{s as jump_tab};
|
|
2
|
+
//# sourceMappingURL=p-3dd1f9a0.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 &.ContentWrapper--Items {\n @media (max-width: 768px) {\n justify-content: flex-start;\n overflow-x: auto;\n\n .fullBorder {\n justify-content: flex-start;\n }\n }\n }\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}\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 ContentWrapper--Items\"} 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 ContentWrapper--Panel\">\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,ypCACnB,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,CACLR,EAAKW,gBAAgB,S,KAK3B,IAAIC,EAAQ5B,KAAKY,UAAUC,iBAAiB,kBAC5C,GAAIe,EAAMd,OAAS,EAAG,CACpBc,EAAMb,SAASa,IACb,GAAIA,EAAMX,aAAa,gBAAkBlB,EAAMI,OAAOe,GAAI,CACxDU,EAAMT,aAAa,SAAU,G,KACxB,CACLS,EAAMD,gBAAgB,S,MAM9B,gBAAAE,GACE,GAAI7B,KAAKoB,UAAY,QAAS,CAC5B,MAAMhB,EAAaC,iBAAiBC,SAASC,iBAC7C,MAAMC,EAAeJ,EAAWK,iBAAiB,4BAA4BC,OAE7E,IAAIC,EAAQX,KAAKY,UAAUC,iBAAiB,iBAC5C,GAAIF,EAAMG,OAAS,EAAG,CACpBH,EAAMI,SAAQ,CAACC,EAAMM,KACnB,GAAIA,IAAUX,EAAMG,OAAS,GAAKE,EAAKc,UAAUC,SAAS,UAAW,CACnEf,EAAKO,MAAMC,YAAc,uB,KACpB,CACLR,EAAKO,MAAMC,YAAc,aAAahB,G,OAOhD,MAAAwB,GACE,OACEC,EAACC,EAAI,CAAAC,IAAA,2CAACC,MAAO,WAAapC,KAAKoB,QAASF,GAAIlB,KAAKqC,aAAcC,IAAMC,IAASvC,KAAKY,UAAY2B,CAAE,GAC/FN,EAAA,OAAAE,IAAA,2CAAKC,MAAO,YAAcpC,KAAKwC,WAAa,aAAe,KACzDP,EAAA,OAAAE,IAAA,2CAAKC,MAAO,uCAAwCb,MAAO,CAAE,cAAevB,KAAKyC,aAAazC,KAAK0C,aACjGT,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,wCACTH,EAAA,QAAAE,IAAA,2CAAMS,KAAK,kB,CAOb,YAAAH,CAAaC,GACnB,OAAQA,GACN,IAAK,SACH,MAAO,SACT,IAAK,QACH,MAAO,WACT,QACE,MAAO,a"}
|
|
@@ -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"}
|
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,M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AIlB,KAAKqC,aAAcC,IAAMC,IAASvC,KAAKY,UAAY2B,CAAE,GAC/FN,EAAA,OAAAE,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"}
|
|
@@ -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"}
|