@jumpgroup/jump-design-system 0.3.31 → 0.3.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/jump-design-system.cjs.js +1 -1
- package/dist/cjs/jump-navbar.cjs.entry.js +45 -0
- package/dist/cjs/jump-navbar.cjs.entry.js.map +1 -0
- package/dist/cjs/jump-pagination-table.cjs.entry.js +3 -3
- package/dist/cjs/jump-pagination.cjs.entry.js +3 -3
- package/dist/cjs/jump-quantity.cjs.entry.js +3 -3
- package/dist/cjs/jump-tab-item.cjs.entry.js +3 -4
- package/dist/cjs/jump-tab-item.cjs.entry.js.map +1 -1
- package/dist/cjs/jump-tab-panel.cjs.entry.js +1 -1
- package/dist/cjs/jump-tab.cjs.entry.js +4 -2
- package/dist/cjs/jump-tab.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/jump-navbar/jump-navbar.css +13 -0
- package/dist/collection/components/jump-navbar/jump-navbar.js +260 -0
- package/dist/collection/components/jump-navbar/jump-navbar.js.map +1 -0
- package/dist/collection/components/jump-pagination/jump-pagination.js +3 -3
- package/dist/collection/components/jump-pagination-table/jump-pagination-table.js +3 -3
- package/dist/collection/components/jump-quantity/jump-quantity.js +3 -3
- package/dist/collection/components/jump-tab/jump-tab.css +28 -0
- package/dist/collection/components/jump-tab/jump-tab.js +39 -1
- package/dist/collection/components/jump-tab/jump-tab.js.map +1 -1
- package/dist/collection/components/jump-tab/jump-tab.stories.js +28 -5
- package/dist/collection/components/jump-tab/jump-tab.stories.js.map +1 -1
- package/dist/collection/components/jump-tab-item/jump-tab-item.css +5 -2
- package/dist/collection/components/jump-tab-item/jump-tab-item.js +2 -3
- package/dist/collection/components/jump-tab-item/jump-tab-item.js.map +1 -1
- package/dist/collection/components/jump-tab-panel/jump-tab-panel.js +1 -1
- package/dist/components/jump-navbar.d.ts +11 -0
- package/dist/components/jump-navbar.js +84 -0
- package/dist/components/jump-navbar.js.map +1 -0
- package/dist/components/jump-pagination-table.js +3 -3
- package/dist/components/jump-pagination.js +3 -3
- package/dist/components/jump-quantity.js +3 -3
- package/dist/components/jump-tab-item.js +3 -4
- package/dist/components/jump-tab-item.js.map +1 -1
- package/dist/components/jump-tab-panel.js +1 -1
- package/dist/components/jump-tab.js +6 -2
- package/dist/components/jump-tab.js.map +1 -1
- package/dist/esm/jump-design-system.js +1 -1
- package/dist/esm/jump-navbar.entry.js +41 -0
- package/dist/esm/jump-navbar.entry.js.map +1 -0
- package/dist/esm/jump-pagination-table.entry.js +3 -3
- package/dist/esm/jump-pagination.entry.js +3 -3
- package/dist/esm/jump-quantity.entry.js +3 -3
- package/dist/esm/jump-tab-item.entry.js +3 -4
- package/dist/esm/jump-tab-item.entry.js.map +1 -1
- package/dist/esm/jump-tab-panel.entry.js +1 -1
- package/dist/esm/jump-tab.entry.js +4 -2
- package/dist/esm/jump-tab.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/jump-design-system/jump-design-system.esm.js +1 -1
- package/dist/jump-design-system/jump-design-system.esm.js.map +1 -1
- package/dist/jump-design-system/p-108990a7.entry.js +2 -0
- package/dist/jump-design-system/p-108990a7.entry.js.map +1 -0
- package/dist/jump-design-system/p-1a8f69e1.entry.js +2 -0
- package/dist/jump-design-system/p-1a8f69e1.entry.js.map +1 -0
- package/dist/jump-design-system/p-2c95396a.entry.js +2 -0
- package/dist/jump-design-system/{p-d93e4ed5.entry.js → p-7b854194.entry.js} +2 -2
- package/dist/jump-design-system/{p-3094f68c.entry.js → p-80d94f0f.entry.js} +2 -2
- package/dist/jump-design-system/p-81fdf870.entry.js +2 -0
- package/dist/jump-design-system/p-81fdf870.entry.js.map +1 -0
- package/dist/jump-design-system/{p-f3c9fa96.entry.js → p-dbff34ba.entry.js} +2 -2
- package/dist/jump-design-system-elements.json +71 -0
- package/dist/types/components/jump-navbar/jump-navbar.d.ts +47 -0
- package/dist/types/components/jump-tab/jump-tab.d.ts +5 -0
- package/dist/types/components/jump-tab/jump-tab.stories.d.ts +12 -0
- package/dist/types/components.d.ts +105 -0
- package/package.json +1 -1
- package/dist/jump-design-system/p-188c7c2e.entry.js +0 -2
- package/dist/jump-design-system/p-188c7c2e.entry.js.map +0 -1
- package/dist/jump-design-system/p-62b52857.entry.js +0 -2
- package/dist/jump-design-system/p-eebee8f5.entry.js +0 -2
- package/dist/jump-design-system/p-eebee8f5.entry.js.map +0 -1
- /package/dist/jump-design-system/{p-62b52857.entry.js.map → p-2c95396a.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-d93e4ed5.entry.js.map → p-7b854194.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-3094f68c.entry.js.map → p-80d94f0f.entry.js.map} +0 -0
- /package/dist/jump-design-system/{p-f3c9fa96.entry.js.map → p-dbff34ba.entry.js.map} +0 -0
|
@@ -13,7 +13,9 @@
|
|
|
13
13
|
/* Tipologia boxed */
|
|
14
14
|
/* Tipologia rounded */
|
|
15
15
|
/** Tipologia sheet */
|
|
16
|
-
|
|
16
|
+
}
|
|
17
|
+
:host .Content:hover:not(.disabled) {
|
|
18
|
+
cursor: pointer;
|
|
17
19
|
}
|
|
18
20
|
:host .Content label {
|
|
19
21
|
font-size: 16px;
|
|
@@ -89,7 +91,8 @@
|
|
|
89
91
|
background-color: var(--jump-tabitem-rounded-bg-color);
|
|
90
92
|
border-radius: 8px 8px 0px 0px;
|
|
91
93
|
}
|
|
92
|
-
|
|
94
|
+
|
|
95
|
+
:host(.disabled) {
|
|
93
96
|
cursor: not-allowed;
|
|
94
97
|
opacity: 0.5;
|
|
95
98
|
pointer-events: none;
|
|
@@ -13,14 +13,13 @@ export class JumpTabItem {
|
|
|
13
13
|
this.changeActiveTab.emit({ id: identifier });
|
|
14
14
|
}
|
|
15
15
|
componentDidLoad() {
|
|
16
|
-
console.log('Component has been rendered');
|
|
17
16
|
// Deve leggere la prop "variant" del componente babbo jump-tab e popolare la propria prop "variant"
|
|
18
17
|
let parentVariant = this.tabEl.parentElement.getAttribute('variant');
|
|
19
18
|
this.variant = parentVariant;
|
|
20
19
|
}
|
|
21
20
|
render() {
|
|
22
|
-
return (h(Host, { key: '
|
|
23
|
-
h("jump-icon", { key: '
|
|
21
|
+
return (h(Host, { key: '4dc150c666d0387bb0fe8215837a45050deee930', ref: (el) => { this.tabEl = el; }, class: "JumpTabItem " + (this.active ? 'active' : '') + " " + (this.variant) + " " + (this.disabled ? 'disabled' : '') }, h("div", { key: 'ef7ea196d84f892abad92c7c28cde1fcbc3b9573', 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')) &&
|
|
22
|
+
h("jump-icon", { key: '9c4b48264448f202cb514e63b236aa5dbe44dd11', library: "fa", category: "regular", name: this.iconName, size: "small" }), h("span", { key: '62429460a5e9204775f54be22a713453c276eb0a', class: "label" }, this.label))));
|
|
24
23
|
}
|
|
25
24
|
static get is() { return "jump-tab-item"; }
|
|
26
25
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jump-tab-item.js","sourceRoot":"","sources":["../../../src/components/jump-tab-item/jump-tab-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAC,KAAK,EAAG,CAAC,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAOrF,MAAM,OAAO,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;IAC9C,CAAC;IAED,gB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AC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,UAAU;gBAC1O,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,QAAQ,IAAI,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,CAAC;oBACvE,kEAAW,OAAO,EAAC,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAC,OAAO,GAAa;gBAE3F,6DAAM,KAAK,EAAC,OAAO,IAAE,IAAI,CAAC,KAAK,CAAQ,CACnC,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["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"]}
|
|
@@ -5,7 +5,7 @@ export class JumpTabPanel {
|
|
|
5
5
|
this.active = false;
|
|
6
6
|
}
|
|
7
7
|
render() {
|
|
8
|
-
return (h(Host, { key: '
|
|
8
|
+
return (h(Host, { key: '14fc22857d3f935d1a573375d0bae6267d616099', class: "JumpTabPanel", id: this.identifier }, h("div", { key: '6e690078d627fd44b8542a2979b0a53ad9ba5d2c', class: "JumpTabPanel__Content " + (this.active ? 'active' : '') }, h("slot", { key: '41c5be2ee7a664d028d781e9c48f7feca1d25bf7' }))));
|
|
9
9
|
}
|
|
10
10
|
static get is() { return "jump-tab-panel"; }
|
|
11
11
|
static get encapsulation() { return "shadow"; }
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface JumpNavbar extends Components.JumpNavbar, HTMLElement {}
|
|
4
|
+
export const JumpNavbar: {
|
|
5
|
+
prototype: JumpNavbar;
|
|
6
|
+
new (): JumpNavbar;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$3 } from './jump-button2.js';
|
|
3
|
+
import { d as defineCustomElement$2 } from './jump-icon2.js';
|
|
4
|
+
|
|
5
|
+
const jumpNavbarCss = ":host{--jump-navbar-height:var(--header-height, 100px);--jump-navbar-background:var(--bg-drawer, #fff);--jump-navbar-width:var(--drawer-width, 240px);--jump-navbar-shadow:8px 0 15px 0 #00000026;--jump-navbar-zindex:2;--jump-navbar-transition:0.3s all ease-in-out;--jump-navbar-gap:2.5rem;--jump-navbar-padding:1rem;--jump-navbar-close-top:calc(var(--header-height) + 1rem);--jump-navbar-close-left:calc(var(--drawer-width) - 2rem);--jump-navbar-close-gap:0.5rem}";
|
|
6
|
+
const JumpNavbarStyle0 = jumpNavbarCss;
|
|
7
|
+
|
|
8
|
+
const JumpNavbar$1 = /*@__PURE__*/ proxyCustomElement(class JumpNavbar extends HTMLElement {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
this.__registerHost();
|
|
12
|
+
this.__attachShadow();
|
|
13
|
+
this.logo = { image_url: '', alt: '', link: '#', target: '_self' };
|
|
14
|
+
this.navItems = [];
|
|
15
|
+
this.secondaryNavItems = [];
|
|
16
|
+
this.mobileThreshold = 768;
|
|
17
|
+
this.type = 'basic';
|
|
18
|
+
this.navPosition = 'inline';
|
|
19
|
+
this.megaMenuAlignment = 'left';
|
|
20
|
+
this.sticky = false;
|
|
21
|
+
this.stickyThreshold = 0;
|
|
22
|
+
this.mobileLogo = this.logo;
|
|
23
|
+
this.user = null;
|
|
24
|
+
this.isMobile = false;
|
|
25
|
+
}
|
|
26
|
+
handleResize() {
|
|
27
|
+
this.isMobile = window.innerWidth < this.mobileThreshold;
|
|
28
|
+
}
|
|
29
|
+
render() {
|
|
30
|
+
var _a, _b;
|
|
31
|
+
return (h(Host, { key: '87fa483a27dc0314a3fadcc0b7c4cf61013ad98d' }, h("jump-button", { key: 'b2756659bde1018ea284a59d0919729e593364ac', variant: "primary", size: "small", text: true, href: this.logo['link'], target: (_a = this.logo['target']) !== null && _a !== void 0 ? _a : '_self' }, h("img", { key: 'b3b7d8f6028d16d0967d7fdb71068cd9f2a0636c', src: this.logo['image_url'], alt: this.logo['alt'] })), this.isMobile &&
|
|
32
|
+
h("div", { key: '9ff3e44a80259536f2bbb58ccc6be5967a3dc189', class: "MobileMenuOffCanvas" }, h("div", { key: 'c8e35bfbea3eb84d9df53fe8f18fa5cdccfe31c0', class: "MobileMenuOffCanvas__Header" }, "/* TODO: ricerca + pulsante chiusura + profilo utente con immagine */"), h("div", { key: 'ac6ad3c511ce635f4aa541a8326e97a77d3c4f2b', class: "MobileMenuOffCanvas__Navbar" }, this.navbar.cloneNode(true)), h("div", { key: 'f0f1ef266da0efa437c08df92a7d481b68892329', class: "MobileMenuOffCanvas__Footer" }, "/* TODO: langswitcher */", this.mobileLogo &&
|
|
33
|
+
h("jump-button", { key: '6eaa0a821b15ea28e8a8672e03cf51c5e57a1ca1', variant: "primary", size: "small", text: true, href: this.mobileLogo['link'], target: (_b = this.mobileLogo['target']) !== null && _b !== void 0 ? _b : '_self' }, h("img", { key: '7ef8f3187b555bc27172d062fb19a20423409bbc', src: this.mobileLogo['image_url'], alt: this.mobileLogo['alt'] })))), h("nav", { key: 'ab7a9bcbd9e907448a6dc393f1efa32e80752856', ref: (el) => {
|
|
34
|
+
this.navbar = el;
|
|
35
|
+
} }, h("ul", { key: '70c90191941c1b371218a69216f30921c5e097af' }, this.navItems.map((item) => (h("li", null, h("jump-button", { variant: "primary", size: "small", text: true, href: item.link, target: item.target, class: item.class }, item.text, this.secondaryNavItems.some(secondaryItem => secondaryItem.parent === item.id) &&
|
|
36
|
+
h("jump-icon", { slot: "suffix", library: "lucide", name: "chevron-down", size: "small" })), this.secondaryNavItems.map((secondaryItem) => (secondaryItem.parent === item.id &&
|
|
37
|
+
h("ul", { "data-parent": secondaryItem.parent }, secondaryItem.title &&
|
|
38
|
+
h("h4", null, secondaryItem.title), " /* TODO: utilizzare jump-heading? */", secondaryItem.items.map((subItem) => (h("li", null, h("jump-button", { variant: "primary", size: "small", text: true, href: subItem.link, target: subItem.target, class: subItem.class }, subItem.text)))))))))))), h("slot", { key: '7edb581eab5c8942b9670129f893e92eefe9b5f3', name: "actions" }, h("slot", { key: '9e1eaf7c15bd2767d78d00a594a28f1d867ebb6d', name: "lang_switcher" }), h("slot", { key: '9cff169f4012c9dc87e9b6b78497f3c0e53dae58', name: "search" }), h("slot", { key: '465d61b9266c7ff12cfd434decd44579b84ab908', name: "buttons" }), h("slot", { key: 'c7e66e9bc83921f327f4f7fe74e3e68ac3d4a44a', name: "cart" }))));
|
|
39
|
+
}
|
|
40
|
+
static get style() { return JumpNavbarStyle0; }
|
|
41
|
+
}, [1, "jump-navbar", {
|
|
42
|
+
"logo": [16],
|
|
43
|
+
"navItems": [16],
|
|
44
|
+
"secondaryNavItems": [16],
|
|
45
|
+
"mobileThreshold": [2, "mobile-threshold"],
|
|
46
|
+
"type": [1],
|
|
47
|
+
"navPosition": [1, "nav-position"],
|
|
48
|
+
"megaMenuAlignment": [1, "mega-menu-alignment"],
|
|
49
|
+
"sticky": [4],
|
|
50
|
+
"stickyThreshold": [2, "sticky-threshold"],
|
|
51
|
+
"mobileLogo": [16],
|
|
52
|
+
"user": [16],
|
|
53
|
+
"isMobile": [32]
|
|
54
|
+
}, [[9, "resize", "handleResize"]]]);
|
|
55
|
+
function defineCustomElement$1() {
|
|
56
|
+
if (typeof customElements === "undefined") {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
const components = ["jump-navbar", "jump-button", "jump-icon"];
|
|
60
|
+
components.forEach(tagName => { switch (tagName) {
|
|
61
|
+
case "jump-navbar":
|
|
62
|
+
if (!customElements.get(tagName)) {
|
|
63
|
+
customElements.define(tagName, JumpNavbar$1);
|
|
64
|
+
}
|
|
65
|
+
break;
|
|
66
|
+
case "jump-button":
|
|
67
|
+
if (!customElements.get(tagName)) {
|
|
68
|
+
defineCustomElement$3();
|
|
69
|
+
}
|
|
70
|
+
break;
|
|
71
|
+
case "jump-icon":
|
|
72
|
+
if (!customElements.get(tagName)) {
|
|
73
|
+
defineCustomElement$2();
|
|
74
|
+
}
|
|
75
|
+
break;
|
|
76
|
+
} });
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const JumpNavbar = JumpNavbar$1;
|
|
80
|
+
const defineCustomElement = defineCustomElement$1;
|
|
81
|
+
|
|
82
|
+
export { JumpNavbar, defineCustomElement };
|
|
83
|
+
|
|
84
|
+
//# sourceMappingURL=jump-navbar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"jump-navbar.js","mappings":";;;;AAAA,MAAM,aAAa,GAAG,gdAAgd,CAAC;AACve,yBAAe,aAAa;;MCMfA,YAAU;;;;;oBAMjB,EAAE,SAAS,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE;wBAOrD,EAAE;iCAUF,EAAE;+BAC2B,GAAG;oBAC0B,OAAO;2BACd,QAAQ;iCAClB,MAAM;sBAC1B,KAAK;+BACG,CAAC;0BAMxB,IAAI,CAAC,IAAI;oBAMT,IAAI;wBAEc,KAAK;;IAKlC,YAAY;QACV,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,UAAU,GAAG,IAAI,CAAC,eAAe,CAAC;KAC1D;IAED,MAAM;;QACJ,QACE,EAAC,IAAI,uDACH,oEAAa,OAAO,EAAC,SAAS,EAAC,IAAI,EAAC,OAAO,EAAC,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C,IAAI,CAAC,aAAa,IAAI,aAAa,CAAC,MAAM,KAAK,IAAI,CAAC,EAAE,CAAC;YAC7E,iBAAW,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAC,QAAQ,EAAC,IAAI,EAAC,cAAc,EAAC,IAAI,EAAC,OAAO,GAAa,CAE7E,EAEb,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,aAAa,MACxC,aAAa,CAAC,MAAM,KAAK,IAAI,CAAC,EAAE;YAChC,yBAAiB,aAAa,CAAC,MAAM,IAClC,aAAa,CAAC,KAAK;gBAClB,cAAK,aAAa,CAAC,KAAK,CAAM,2CAC/B,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,OAAO,MAC/B,cACE,mBAAa,OAAO,EAAC,SAAS,EAAC,IAAI,EAAC,OAAO,EAAC,IAAI,QAAC,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAC9E,KAAK,EAAE,OAAO,CAAC,KAAK,IAC9B,OAAO,CAAC,IAAI,CACD,CACX,CACN,CAAC,CACC,CACN,CAAC,CACC,CACN,CAAC,CACC,CACD,EACN,6DAAM,IAAI,EAAC,SAAS,IAClB,6DAAM,IAAI,EAAC,eAAe,GAAQ,EAClC,6DAAM,IAAI,EAAC,QAAQ,GAAQ,EAC3B,6DAAM,IAAI,EAAC,SAAS,GAAQ,EAC5B,6DAAM,IAAI,EAAC,MAAM,GAAQ,CACpB,CACF,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["JumpNavbar"],"sources":["src/components/jump-navbar/jump-navbar.scss?tag=jump-navbar&encapsulation=shadow","src/components/jump-navbar/jump-navbar.tsx"],"sourcesContent":[":host {\n --jump-navbar-height: var(--header-height, 100px);\n --jump-navbar-background: var(--bg-drawer, #fff);\n --jump-navbar-width: var(--drawer-width, 240px);\n --jump-navbar-shadow: 8px 0 15px 0 #00000026;\n --jump-navbar-zindex: 2;\n --jump-navbar-transition: 0.3s all ease-in-out;\n --jump-navbar-gap: 2.5rem;\n --jump-navbar-padding: 1rem;\n --jump-navbar-close-top: calc(var(--header-height) + 1rem);\n --jump-navbar-close-left: calc(var(--drawer-width) - 2rem);\n --jump-navbar-close-gap: 0.5rem;\n}\n","import { Component, Host, Prop, h, Listen, State } from '@stencil/core';\n\n@Component({\n tag: 'jump-navbar',\n styleUrl: 'jump-navbar.scss',\n shadow: true,\n})\nexport class JumpNavbar {\n @Prop() logo: {\n image_url: string,\n alt: string,\n link: string,\n target: '_blank' | '_parent' | '_self' | '_top'\n } = { image_url: '', alt: '', link: '#', target: '_self' };\n @Prop() navItems: Array<{\n id: string,\n text: string,\n link: string,\n class: string,\n target: '_blank' | '_parent' | '_self' | '_top'\n }> = [];\n @Prop() secondaryNavItems: Array<{\n parent: string | null,\n title: string | null,\n items: Array<{\n text: string,\n link: string,\n class: string,\n target: '_blank' | '_parent' | '_self' | '_top'\n }>\n }> = [];\n @Prop() mobileThreshold: number = 768;\n @Prop() type: 'basic' | 'hamburger_left' | 'hamburger_right' = 'basic';\n @Prop() navPosition: 'inline' | 'bottom' | 'megamenu' = 'inline'; //TODO: Chiedere a Vale se può essere inline + sulla riga sotto mostriamo la tendina oppure è un menu a sé stante quello sotto\n @Prop() megaMenuAlignment: 'left' | 'right' = 'left';\n @Prop() sticky: boolean = false;\n @Prop() stickyThreshold: number = 0; // Possible to get sticky on mobile only after a certain scroll threshold\n @Prop() mobileLogo: {\n image_url: string,\n alt: string,\n link: string,\n target: '_blank' | '_parent' | '_self' | '_top'\n } | null = this.logo;\n @Prop() user : {\n image_url: string,\n alt: string,\n link: string,\n target: '_blank' | '_parent' | '_self' | '_top'\n } | null = null;\n\n @State() isMobile: boolean = false;\n\n navbar: HTMLElement;\n\n @Listen('resize', { target: 'window' })\n handleResize() {\n this.isMobile = window.innerWidth < this.mobileThreshold;\n }\n\n render() {\n return (\n <Host>\n <jump-button variant=\"primary\" size=\"small\" text href={this.logo['link']}\n target={this.logo['target'] ?? '_self'}>\n <img src={this.logo['image_url']} alt={this.logo['alt']} />\n </jump-button>\n {this.isMobile &&\n <div class=\"MobileMenuOffCanvas\">\n <div class=\"MobileMenuOffCanvas__Header\">\n /* TODO: ricerca + pulsante chiusura + profilo utente con immagine */\n </div>\n <div class=\"MobileMenuOffCanvas__Navbar\">\n {this.navbar.cloneNode(true)}\n </div>\n <div class=\"MobileMenuOffCanvas__Footer\">\n /* TODO: langswitcher */\n {this.mobileLogo &&\n <jump-button variant=\"primary\" size=\"small\" text href={this.mobileLogo['link']}\n target={this.mobileLogo['target'] ?? '_self'}>\n <img src={this.mobileLogo['image_url']} alt={this.mobileLogo['alt']} />\n </jump-button>\n }\n </div>\n </div>}\n <nav ref={(el: HTMLElement) => {\n this.navbar = el;\n }}>\n <ul>\n {this.navItems.map((item) => (\n <li>\n <jump-button variant=\"primary\" size=\"small\" text href={item.link} target={item.target}\n class={item.class}>\n {item.text}\n {this.secondaryNavItems.some(secondaryItem => secondaryItem.parent === item.id) &&\n <jump-icon slot=\"suffix\" library=\"lucide\" name=\"chevron-down\" size=\"small\"></jump-icon>\n }\n </jump-button>\n\n {this.secondaryNavItems.map((secondaryItem) => (\n secondaryItem.parent === item.id &&\n <ul data-parent={secondaryItem.parent}>\n {secondaryItem.title &&\n <h4>{secondaryItem.title}</h4>} /* TODO: utilizzare jump-heading? */\n {secondaryItem.items.map((subItem) => (\n <li>\n <jump-button variant=\"primary\" size=\"small\" text href={subItem.link} target={subItem.target}\n class={subItem.class}>\n {subItem.text}\n </jump-button>\n </li>\n ))}\n </ul>\n ))}\n </li>\n ))}\n </ul>\n </nav>\n <slot name=\"actions\">\n <slot name=\"lang_switcher\"></slot>\n <slot name=\"search\"></slot>\n <slot name=\"buttons\"></slot>\n <slot name=\"cart\"></slot>\n </slot>\n </Host>\n );\n }\n}\n\n"],"version":3}
|
|
@@ -80,9 +80,9 @@ const JumpPaginationTable$1 = /*@__PURE__*/ proxyCustomElement(class JumpPaginat
|
|
|
80
80
|
/* --------------------- RENDER ------------------------------- */
|
|
81
81
|
render() {
|
|
82
82
|
var _a;
|
|
83
|
-
return (h(Host, { key: '
|
|
84
|
-
h("jump-button", { key: '
|
|
85
|
-
h("jump-button", { key: '
|
|
83
|
+
return (h(Host, { key: '68cfdc8f670c77a14605e4f151b41e2d551531e5', class: "JumpPaginationTable" }, h("div", { key: '80d51c132999625d22b6e7ed73867e79a043ae99', class: "JumpPaginationTable__Wrapper" }, h("div", { key: '709e412acf386ad3149e7a04208a0ea4948b4f0b', class: "elementsPerPage" }, h("label", { key: '73985f2877b3c242b8deccb68ac11c878780e6ee', htmlFor: "elements" }, (_a = this.labelElementsPerPage) !== null && _a !== void 0 ? _a : 'Elements per page'), h("select", { key: '0def3077b6dc04018aecd2f50b0301bc19c29527', name: "elements", id: "elements", onChange: (e) => this.setElPerPage(e) }, this.elementsRangesArray.map((range) => (h("option", { value: range, selected: (this.elPerPage == range) && true }, range))))), h("div", { key: 'c2691bc0e79d043625977b276ac38ec10a41d73b', class: "indicators" }, h("div", { key: 'd9d62ca7b06479244bb396d38fc01dd86236515d', class: "elements" }, h("span", { key: '51ea23a9d77319738404c8b6ead86ea0a9052e1c' }, h("span", { key: '8fd64ef028151ae61c31998f72036ff4c9c9f151' }, this.first), " - ", h("span", { key: 'a001b2a509920566c34a41afb24a823e0445c3e2' }, this.last), " ", this.pagLabel, " ", h("span", { key: '9a27e142353e7d410655f270988183a82c0792a1' }, this.total))), h("div", { key: 'ba778721da92c9147449de9d0869a06d65615602', class: "arrow" }, this.showFirstAndLast &&
|
|
84
|
+
h("jump-button", { key: '76dfd54bfa05a6c33489aa41f9150c793fac5f85', onClick: () => this.doChangePage('first'), variant: "primary", text: true, size: "small", name: "scopri", value: "value", "aria-label": "Scopri di pi\u00F9", id: "button", onlyIcon: true, disabled: this.first === 1 }, " ", h("jump-icon", { key: '0aee871e37e2e5b5190fc62cd8c8617d209f57ed', slot: "suffix", name: "chevrons-left" }), " "), h("jump-button", { key: '9e82cf38238d358a4084078b975a3f75bf55e9fe', onClick: () => this.doChangePage('previous'), variant: "primary", text: true, size: "small", name: "scopri", value: "value", "aria-label": "Scopri di pi\u00F9", id: "button", onlyIcon: true, disabled: this.first === 1 }, " ", h("jump-icon", { key: '7303a4371e0540dfa28feaf4a1f69662b646e64b', slot: "suffix", name: "chevron-left" }), " "), h("jump-button", { key: '4bfb0713a9a374c30873e046b7ded26965cfce84', onClick: () => this.doChangePage('next'), variant: "primary", text: true, size: "small", name: "scopri", value: "value", "aria-label": "Scopri di pi\u00F9", id: "button", onlyIcon: true, disabled: this.last === this.total }, " ", h("jump-icon", { key: '52c929962accd14480152a0dfd2e03904fd79fc4', slot: "suffix", name: "chevron-right" }), " "), this.showFirstAndLast &&
|
|
85
|
+
h("jump-button", { key: '6f0c43ef094c622447cd1095ab70ce6bfd2c464a', onClick: () => this.doChangePage('last'), variant: "primary", text: true, size: "small", name: "scopri", value: "value", "aria-label": "Scopri di pi\u00F9", id: "button", onlyIcon: true, disabled: this.last === this.total }, " ", h("jump-icon", { key: 'cb05b4a61efdebf03a17b353f17572d038df251f', slot: "suffix", name: "chevrons-right" }), " "))))));
|
|
86
86
|
}
|
|
87
87
|
static get watchers() { return {
|
|
88
88
|
"elementsRanges": ["elementsRangesChanged"],
|
|
@@ -32,7 +32,7 @@ const JumpPagination$1 = /*@__PURE__*/ proxyCustomElement(class JumpPagination e
|
|
|
32
32
|
}
|
|
33
33
|
/* --------------------- RENDER ------------------------------- */
|
|
34
34
|
render() {
|
|
35
|
-
return (h(Host, { key: '
|
|
35
|
+
return (h(Host, { key: 'e7b289bce3ef2bcfe2b45135b463feb2390c50a3', class: "JumpPagination" }, h("div", { key: '6559e463bf9d9973dd037f6b6a23f20816ef1882', class: "JumpPagination__Wrapper" }, h("div", { key: '5650bf9580bd470604e8841faf33e6b029549cda', class: "indicators" }, h("div", { key: 'b40e74ede39cd17fd770cf1fc46d46644a86fc63', class: "elements" }, h("span", { key: 'af919f31f94448c99291a830dd35da7169cd24ec' }, h("span", { key: '96b8773daf276e9285b91f06cf6f5fa28a5d6727' }, this.current), " ", this.pagLabel, " ", h("span", { key: 'e7dd92a3a48e23d5c28d1b6e0f3c07cddd837598' }, this.last))), h("div", { key: '1a3338a3e913f9c92a530203f91e93f6085b607c', class: "arrow" }, this.showFirstAndLast &&
|
|
36
36
|
// <button
|
|
37
37
|
// onClick={() => {this.current = 1} }
|
|
38
38
|
// disabled={(this.current === 1) ? true : false}>
|
|
@@ -40,14 +40,14 @@ const JumpPagination$1 = /*@__PURE__*/ proxyCustomElement(class JumpPagination e
|
|
|
40
40
|
// disabled={(this.current === 1) ? true : false}
|
|
41
41
|
// ></jump-icon>
|
|
42
42
|
// </button>
|
|
43
|
-
h("jump-button", { key: '
|
|
43
|
+
h("jump-button", { key: '23075cb5a2513048e7ee690242f0ce5a54c95538', onClick: () => { this.current = 1; }, variant: "primary", text: true, size: "small", name: "scopri", value: "value", "aria-label": "Scopri di pi\u00F9", id: "button", onlyIcon: true, disabled: (this.current === 1) ? true : false }, " ", h("jump-icon", { key: '0e834c3117fca9d2dd593a4b5ceb3934e7eb547a', slot: "suffix", name: "chevrons-left" }), " "), h("jump-button", { key: 'fc27582a142ed6051187692f6a31a2c51f91e4af', onClick: () => { this.current--; }, variant: "primary", text: true, size: "small", name: "scopri", value: "value", "aria-label": "Scopri di pi\u00F9", id: "button", onlyIcon: true, disabled: (this.current === 1) ? true : false }, " ", h("jump-icon", { key: 'a2998274cf27c33b80f7fd0c917a5583b70ef8f0', slot: "suffix", name: "chevron-left" }), " "), h("jump-button", { key: '26d7a56a2a0312cf526dcf9bc432679c756534f1', onClick: () => { this.current++; }, variant: "primary", text: true, size: "small", name: "scopri", value: "value", "aria-label": "Scopri di pi\u00F9", id: "button", onlyIcon: true, disabled: (this.current === this.last) ? true : false }, " ", h("jump-icon", { key: '6769d3484fdd63d2fff5268392111137273b9541', slot: "suffix", name: "chevron-right" }), " "), this.showFirstAndLast &&
|
|
44
44
|
// <button
|
|
45
45
|
// onClick={() => {this.current = this.last}}
|
|
46
46
|
// disabled={(this.current === this.last) ? true : false}
|
|
47
47
|
// >
|
|
48
48
|
// <jump-icon library="fa" category="regular" name="chevrons-right" size="small" slot="prefix"></jump-icon>
|
|
49
49
|
// </button>
|
|
50
|
-
h("jump-button", { key: '
|
|
50
|
+
h("jump-button", { key: '7e3c33e8a7c7d7c1dbaeb6009781602023f71133', onClick: () => { this.current = this.last; }, variant: "primary", text: true, size: "small", name: "scopri", value: "value", "aria-label": "Scopri di pi\u00F9", id: "button", onlyIcon: true, disabled: (this.current === this.last) ? true : false }, " ", h("jump-icon", { key: '418f61b2481e76f5766a92e6b7c8d0fad5dcd70a', slot: "suffix", name: "chevrons-right" }), " "))))));
|
|
51
51
|
}
|
|
52
52
|
static get watchers() { return {
|
|
53
53
|
"current": ["watchcurrent"]
|
|
@@ -55,11 +55,11 @@ const JumpQuantity$1 = /*@__PURE__*/ proxyCustomElement(class JumpQuantity exten
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
render() {
|
|
58
|
-
return (h(Host, { key: '
|
|
59
|
-
h("jump-button", { key: '
|
|
58
|
+
return (h(Host, { key: '60bf7e8f2de0ccc25763b9248e9c6ef3d60fcc92', value: this.value, "data-variant": this.variant, "data-hasbuttons": this.showButtons }, this.label && h("label", { key: '5f29838b2bf5606ed50ee6e09c57b67286f8095f' }, this.label), h("div", { key: 'e6934083f54d1b84748936569b687b725756cac6', class: `jump-quantity__InnerWrapper` }, this.showButtons &&
|
|
59
|
+
h("jump-button", { key: '7687a84784a5fc55c3194dcc36292cff61507cb3', onClick: () => this.value = this.value - this.step, disabled: this.value <= this.min, variant: 'neutral', size: 'custom' }, h("jump-icon", { key: '2251771f3d182371ee59e09a475b13c9057920c7', library: "lucide", name: "minus", size: "small" })), h("input", { key: '708d3a835e62bc14b1f64bcfe5470b11ad997b1a', ref: (el) => {
|
|
60
60
|
this.inputEl = el;
|
|
61
61
|
}, type: 'number', value: this.value, onInput: (event) => this.handleChange(event), min: this.min, max: this.max, step: this.step, "aria-hasbuttons": this.showButtons }), this.showButtons &&
|
|
62
|
-
h("jump-button", { key: '
|
|
62
|
+
h("jump-button", { key: '922c17979037b3849f175def9c5d10d8d4722793', onClick: () => this.value = this.value + this.step, disabled: this.value >= this.max, variant: 'neutral', size: 'custom' }, h("jump-icon", { key: '84fa52f7203049c7a7793579a8bf3d612dcfba83', library: "lucide", name: "plus", size: "small" })))));
|
|
63
63
|
}
|
|
64
64
|
static get formAssociated() { return true; }
|
|
65
65
|
get el() { return this; }
|
|
@@ -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;font-family:var(--ff-primary)}:host .Content{display:flex;}: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}:host .Content.inline.active{color:var(--jump-tabitem-active-color)}:host .Content.inline.active span{font-weight:bold}: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
|
|
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;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}:host .Content.inline.active{color:var(--jump-tabitem-active-color)}:host .Content.inline.active span{font-weight:bold}: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}:host(.inline){border-bottom:1px solid var(--jump-tabitem-hover-color)}:host(.inline):hover:not(.disabled):not(.active){border-bottom:3px solid var(--jump-tabitem-hover-color);cursor:pointer}:host(.inline.active){border-bottom:3px solid var(--jump-tabitem-active-color)}";
|
|
5
5
|
const JumpTabItemStyle0 = jumpTabItemCss;
|
|
6
6
|
|
|
7
7
|
const JumpTabItem$1 = /*@__PURE__*/ proxyCustomElement(class JumpTabItem extends HTMLElement {
|
|
@@ -22,14 +22,13 @@ const JumpTabItem$1 = /*@__PURE__*/ proxyCustomElement(class JumpTabItem extends
|
|
|
22
22
|
this.changeActiveTab.emit({ id: identifier });
|
|
23
23
|
}
|
|
24
24
|
componentDidLoad() {
|
|
25
|
-
console.log('Component has been rendered');
|
|
26
25
|
// Deve leggere la prop "variant" del componente babbo jump-tab e popolare la propria prop "variant"
|
|
27
26
|
let parentVariant = this.tabEl.parentElement.getAttribute('variant');
|
|
28
27
|
this.variant = parentVariant;
|
|
29
28
|
}
|
|
30
29
|
render() {
|
|
31
|
-
return (h(Host, { key: '
|
|
32
|
-
h("jump-icon", { key: '
|
|
30
|
+
return (h(Host, { key: '4dc150c666d0387bb0fe8215837a45050deee930', ref: (el) => { this.tabEl = el; }, class: "JumpTabItem " + (this.active ? 'active' : '') + " " + (this.variant) + " " + (this.disabled ? 'disabled' : '') }, h("div", { key: 'ef7ea196d84f892abad92c7c28cde1fcbc3b9573', 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')) &&
|
|
31
|
+
h("jump-icon", { key: '9c4b48264448f202cb514e63b236aa5dbe44dd11', library: "fa", category: "regular", name: this.iconName, size: "small" }), h("span", { key: '62429460a5e9204775f54be22a713453c276eb0a', class: "label" }, this.label))));
|
|
33
32
|
}
|
|
34
33
|
static get style() { return JumpTabItemStyle0; }
|
|
35
34
|
}, [1, "jump-tab-item", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"jump-tab-item.js","mappings":";;;AAAA,MAAM,cAAc,GAAG,
|
|
1
|
+
{"file":"jump-tab-item.js","mappings":";;;AAAA,MAAM,cAAc,GAAG,83EAA83E,CAAC;AACt5E,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 \n font-family: var(--ff-primary);\n \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 }\n \n &.inline.active {\n color: var(--jump-tabitem-active-color);\n \n \n span {\n font-weight: bold;\n }\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 \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 // border: 1px solid transparent;\n \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: 1px solid 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:host(.inline){\n border-bottom: 1px solid var(--jump-tabitem-hover-color);\n}\n\n:host(.inline):hover:not(.disabled):not(.active) {\n border-bottom: 3px solid var(--jump-tabitem-hover-color);\n cursor: pointer;\n}\n\n:host(.inline.active) {\n border-bottom: 3px solid var(--jump-tabitem-active-color);\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}
|
|
@@ -12,7 +12,7 @@ const JumpTabPanel$1 = /*@__PURE__*/ proxyCustomElement(class JumpTabPanel exten
|
|
|
12
12
|
this.active = false;
|
|
13
13
|
}
|
|
14
14
|
render() {
|
|
15
|
-
return (h(Host, { key: '
|
|
15
|
+
return (h(Host, { key: '14fc22857d3f935d1a573375d0bae6267d616099', class: "JumpTabPanel", id: this.identifier }, h("div", { key: '6e690078d627fd44b8542a2979b0a53ad9ba5d2c', class: "JumpTabPanel__Content " + (this.active ? 'active' : '') }, h("slot", { key: '41c5be2ee7a664d028d781e9c48f7feca1d25bf7' }))));
|
|
16
16
|
}
|
|
17
17
|
static get style() { return JumpTabPanelStyle0; }
|
|
18
18
|
}, [1, "jump-tab-panel", {
|
|
@@ -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)}:host .Wrapper{display:flex;width:fit-content}:host .Wrapper.rounded{border-radius:50px;background-color:#f8f8f8}";
|
|
3
|
+
const jumpTabCss = ":host{display:block;--jump-tab-bg-color:var(--gray-ultralight, #f8f8f8);--jump-tab-border-color:var(--neutral-grey-disabled, #CBCBCB)}:host .Wrapper{display:flex;width:fit-content}:host .Wrapper.rounded{border-radius:50px;background-color:#f8f8f8}:host(.center){display:flex;justify-content:center;align-items:center}:host(.left){display:flex;justify-content:flex-start;align-items:center}:host(.right){display:flex;justify-content:flex-end;align-items:center}:host(.fullBorder){border-bottom:1px solid var(--jump-tab-border-color)}:host(.fullBorder) ::slotted([slot=tab-item]){margin-bottom:-1px}";
|
|
4
4
|
const JumpTabStyle0 = jumpTabCss;
|
|
5
5
|
|
|
6
6
|
const JumpTab$1 = /*@__PURE__*/ proxyCustomElement(class JumpTab extends HTMLElement {
|
|
@@ -9,6 +9,8 @@ const JumpTab$1 = /*@__PURE__*/ proxyCustomElement(class JumpTab extends HTMLEle
|
|
|
9
9
|
this.__registerHost();
|
|
10
10
|
this.__attachShadow();
|
|
11
11
|
this.setActiveTab = createEvent(this, "jump-change-activetab", 7);
|
|
12
|
+
this.alignment = 'left';
|
|
13
|
+
this.fullBorder = false;
|
|
12
14
|
this.tabGroupName = undefined;
|
|
13
15
|
this.variant = 'inline';
|
|
14
16
|
}
|
|
@@ -80,10 +82,12 @@ const JumpTab$1 = /*@__PURE__*/ proxyCustomElement(class JumpTab extends HTMLEle
|
|
|
80
82
|
}
|
|
81
83
|
}
|
|
82
84
|
render() {
|
|
83
|
-
return (h(Host, { key: '
|
|
85
|
+
return (h(Host, { key: '12b0209abd23ebbff1779b77bf7a32e0c2070eed', class: "JumpTab" + " " + this.alignment + " " + (this.fullBorder && 'fullBorder'), id: this.tabGroupName, ref: (el) => { this.JumpTabEl = el; } }, h("div", { key: 'f9c9158f7c4c61ae42cc1adf125be173288d4aac' }, h("div", { key: '31e61ea8666fa867a6e287729ece824a90b584ff', class: "Wrapper " + this.variant }, h("slot", { key: '2b215a056c8ab946ba8c58269a87b0de2537b759', name: "tab-item" })), h("div", { key: 'e2e0110cc23e5c7e808551f977746fec95466d66' }, h("slot", { key: '15a062d1f5ca5b1f7717b27e1192dbe76e5f8fba', name: "tab-content" })))));
|
|
84
86
|
}
|
|
85
87
|
static get style() { return JumpTabStyle0; }
|
|
86
88
|
}, [1, "jump-tab", {
|
|
89
|
+
"alignment": [1],
|
|
90
|
+
"fullBorder": [4, "full-border"],
|
|
87
91
|
"tabGroupName": [1, "tab-group-name"],
|
|
88
92
|
"variant": [1]
|
|
89
93
|
}, [[0, "jump-change-active-tab", "changeActiveTabHandler"]]]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"jump-tab.js","mappings":";;AAAA,MAAM,UAAU,GAAG,
|
|
1
|
+
{"file":"jump-tab.js","mappings":";;AAAA,MAAM,UAAU,GAAG,ulBAAulB,CAAC;AAC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;aACJ;SACF;KAEF;IAED,MAAM;QACJ,QACE,EAAC,IAAI,qDAAC,KAAK,EAAE,SAAS,GAAG,GAAG,GAAG,IAAI,CAAC,SAAS,GAAG,GAAG,IAAI,IAAI,CAAC,UAAU,IAAI,YAAY,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,YAAY,EAAE,GAAG,EAAE,CAAC,EAAE,OAAM,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,EAAC,IACjJ,8DACA,4DAAK,KAAK,EAAE,UAAU,GAAG,IAAI,CAAC,OAAO,IACnC,6DAAM,IAAI,EAAC,UAAU,GAAQ,CACzB,EACN,8DACE,6DAAM,IAAI,EAAC,aAAa,GAAQ,CAC5B,CACA,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;","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 .Wrapper {\n display: flex;\n width: fit-content;\n \n &.rounded {\n border-radius: 50px;\n background-color: #f8f8f8; // dovrà andarci var(--jump-tab-bg-color)\n }\n }\n}\n\n\n\n:host(.center) {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n:host(.left) {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n}\n\n:host(.right) {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n}\n\n/* Stile fullBorder */\n:host(.fullBorder) {\n border-bottom: 1px solid var(--jump-tab-border-color);\n}\n\n:host(.fullBorder) ::slotted([slot=\"tab-item\"]) {\n margin-bottom: -1px;\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\n JumpTabEl: HTMLElement;\n /* ---------------------- @PROPERTIES ------------------------- */\n @Prop() alignment: string = 'left';\n\n /**\n * If true, the jump-tab component have a full bottom border\n */\n @Prop() fullBorder: boolean = false;\n\n @Prop() tabGroupName: string = undefined;\n\n /**\n * The style of the tab. The same value must be passed to all the items.\n * Choosed from \"inline\", \"boxed\", \"sheet\", \"rounded\"\n */\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 // Recupera il valore della variabile CSS\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 // Aggiungi il bordo ai fratelli dell'elemento attivo tranne l'ultimo\n items.forEach((sibling, index) => {\n if (sibling !== item && index !== items.length - 1) {\n sibling.style.borderRight = `1px solid ${primaryColor}`; // Usa i backticks\n } else {\n sibling.style.borderRight = '1px solid transparent';\n }\n });\n\n // Rimuovi il bordo dal fratello precedente\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\n componentDidLoad() {\n console.log('Component has been rendered');\n if(this.variant === 'sheet') {\n // Recupera il valore della variabile CSS\n const rootStyles = getComputedStyle(document.documentElement);\n const primaryColor = rootStyles.getPropertyValue('--neutral-grey-secondary').trim();\n\n // Seleziona tutti gli elementi jump-tab-item\n let items = this.JumpTabEl.querySelectorAll('jump-tab-item');\n if (items.length > 0) {\n items.forEach((item, index) => {\n // Aggiungi bordo destro a tutti tranne:\n // - l'ultimo elemento\n // - l'elemento attivo (avente classe \"active\")\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\n render() {\n return (\n <Host class={\"JumpTab\" + \" \" + this.alignment + \" \" + (this.fullBorder && 'fullBorder')} id={this.tabGroupName} ref={(el) => {this.JumpTabEl = el;}}> \n <div>\n <div class={\"Wrapper \" + this.variant}>\n <slot name=\"tab-item\"></slot>\n </div>\n <div>\n <slot name=\"tab-content\"></slot>\n </div>\n </div>\n </Host>\n );\n }\n}"],"version":3}
|
|
@@ -16,7 +16,7 @@ var patchBrowser = () => {
|
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(async (options) => {
|
|
18
18
|
await globalScripts();
|
|
19
|
-
return bootstrapLazy([["jump-button_2",[[1,"jump-button",{"disabled":[4],"variant":[1],"outline":[4],"size":[1],"full":[4],"pill":[4],"text":[4],"onlyIcon":[4,"only-icon"],"href":[1],"target":[1],"type":[1],"name":[1],"value":[1],"ariaLabel":[1,"aria-label"],"class":[1],"buttonId":[1,"button-id"]}],[1,"jump-icon",{"class":[1],"library":[1],"name":[1],"category":[1],"size":[1],"label":[1],"src":[1]}]]],["jump-card-ecommerce",[[1,"jump-card-ecommerce",{"onlyIconButton":[4,"only-icon-button"],"hasBackground":[4,"has-background"],"badge":[1],"favorite":[1540],"hasFavorite":[4,"has-favorite"],"hasSlotForFavorite":[4,"has-slot-for-favorite"],"favoriteHref":[1,"favorite-href"],"link":[1],"img":[1],"imgAlt":[1,"img-alt"],"hoverImg":[1,"hover-img"],"hoverImgAlt":[1,"hover-img-alt"],"videoSrc":[1,"video-src"],"notificationUrl":[1,"notification-url"],"notificationText":[1,"notification-text"],"productName":[1,"product-name"],"subtitle":[1],"productId":[1,"product-id"],"price":[2],"salePrice":[2,"sale-price"],"currency":[1],"outOfStock":[1540,"out-of-stock"],"outOfStockText":[1,"out-of-stock-text"],"addToCartText":[1,"add-to-cart-text"],"waitingListText":[1,"waiting-list-text"],"addToWaitingList":[4,"add-to-waiting-list"],"isMini":[4,"is-mini"],"addedToCart":[4,"added-to-cart"],"endAddedToCart":[4,"end-added-to-cart"],"variations":[32],"selectedVariation":[32],"priceFormatted":[32],"salePriceFormatted":[32],"setPrice":[64]},[[0,"jump-card-ecommerce-option-connected","addOption"]]]]],["jump-filter",[[1,"jump-filter",{"direction":[1],"filterHeading":[1,"filter-heading"],"filterButtonLabel":[1,"filter-button-label"],"filterButtonIcon":[1,"filter-button-icon"],"mobileThreshold":[2,"mobile-threshold"],"filters":[8],"activeFilters":[32],"showMobileFilters":[32],"isMobile":[32],"getFilters":[64]},[[0,"jump-filterchange","filterChangeHandler"],[9,"resize","handleResize"]],{"showMobileFilters":["watchHandler"]}]]],["jump-filtergroup",[[1,"jump-filtergroup",{"name":[1],"heading":[1],"otherLabel":[1,"other-label"],"lessLabel":[1,"less-label"],"maxElements":[2,"max-elements"],"variant":[1],"label":[32],"values":[32],"value":[32],"slotItems":[32],"inputs":[32],"showMore":[32],"getValues":[64],"getActiveAmount":[64],"getInputs":[64],"getName":[64]},null,{"showMore":["watchShowMore"]}]]],["jump-pagination",[[1,"jump-pagination",{"pagLabel":[1,"pag-label"],"last":[2],"showFirstAndLast":[4,"show-first-and-last"],"current":[32]},null,{"current":["watchcurrent"]}]]],["jump-pagination-table",[[0,"jump-pagination-table",{"elementsRanges":[1,"elements-ranges"],"pagLabel":[513,"pag-label"],"labelElementsPerPage":[513,"label-elements-per-page"],"total":[514],"first":[514],"last":[514],"showFirstAndLast":[516,"show-first-and-last"],"elementsRangesArray":[32],"elPerPage":[32]},null,{"elementsRanges":["elementsRangesChanged"],"elPerPage":["elPerPageChanged"]}]]],["jump-quantity",[[65,"jump-quantity",{"min":[2],"max":[2],"step":[2],"label":[1],"type":[1],"variant":[1],"showButtons":[4,"show-buttons"],"value":[2],"getValue":[64],"reset":[64]},null,{"value":["onValueChange"]}]]],["jump-accordion",[[1,"jump-accordion",{"variant":[1],"summary":[1],"disabled":[4],"open":[516],"icon":[1],"identifier":[1]},[[0,"sl-show","handleShow"]]]]],["jump-tab-item",[[1,"jump-tab-item",{"identifier":[1],"iconName":[1,"icon-name"],"iconPosition":[1,"icon-position"],"label":[1],"active":[4],"disabled":[4],"variant":[32]}]]],["jump-accordion-group",[[1,"jump-accordion-group",{"variant":[1],"groupIdentifier":[1,"group-identifier"]}]]],["jump-card",[[4,"jump-card",{"horizontal":[4],"dark":[4],"shadow":[4],"border":[4],"borderRadius":[4,"border-radius"],"topBorderContentRadius":[4,"top-border-content-radius"],"boxed":[4],"roundedMedia":[4,"rounded-media"],"imgSrc":[1,"img-src"],"imgAlt":[1,"img-alt"],"videoSrc":[1,"video-src"]}]]],["jump-card-ecommerce-option",[[1,"jump-card-ecommerce-option",{"code":[1],"imgUrl":[1,"img-url"],"label":[1],"sku":[1],"taxonomy":[1]}]]],["jump-filter-checkbox",[[1,"jump-filter-checkbox",{"value":[1],"label":[1],"checked":[516],"count":[8],"isChecked":[64]}]]],["jump-tab",[[1,"jump-tab",{"tabGroupName":[1,"tab-group-name"],"variant":[1]},[[0,"jump-change-active-tab","changeActiveTabHandler"]]]]],["jump-tab-panel",[[1,"jump-tab-panel",{"identifier":[1],"active":[4]}]]],["jump-badge",[[1,"jump-badge",{"label":[1],"variant":[513],"dimension":[513],"soft":[516],"outline":[516]}]]]], options);
|
|
19
|
+
return bootstrapLazy([["jump-button_2",[[1,"jump-button",{"disabled":[4],"variant":[1],"outline":[4],"size":[1],"full":[4],"pill":[4],"text":[4],"onlyIcon":[4,"only-icon"],"href":[1],"target":[1],"type":[1],"name":[1],"value":[1],"ariaLabel":[1,"aria-label"],"class":[1],"buttonId":[1,"button-id"]}],[1,"jump-icon",{"class":[1],"library":[1],"name":[1],"category":[1],"size":[1],"label":[1],"src":[1]}]]],["jump-card-ecommerce",[[1,"jump-card-ecommerce",{"onlyIconButton":[4,"only-icon-button"],"hasBackground":[4,"has-background"],"badge":[1],"favorite":[1540],"hasFavorite":[4,"has-favorite"],"hasSlotForFavorite":[4,"has-slot-for-favorite"],"favoriteHref":[1,"favorite-href"],"link":[1],"img":[1],"imgAlt":[1,"img-alt"],"hoverImg":[1,"hover-img"],"hoverImgAlt":[1,"hover-img-alt"],"videoSrc":[1,"video-src"],"notificationUrl":[1,"notification-url"],"notificationText":[1,"notification-text"],"productName":[1,"product-name"],"subtitle":[1],"productId":[1,"product-id"],"price":[2],"salePrice":[2,"sale-price"],"currency":[1],"outOfStock":[1540,"out-of-stock"],"outOfStockText":[1,"out-of-stock-text"],"addToCartText":[1,"add-to-cart-text"],"waitingListText":[1,"waiting-list-text"],"addToWaitingList":[4,"add-to-waiting-list"],"isMini":[4,"is-mini"],"addedToCart":[4,"added-to-cart"],"endAddedToCart":[4,"end-added-to-cart"],"variations":[32],"selectedVariation":[32],"priceFormatted":[32],"salePriceFormatted":[32],"setPrice":[64]},[[0,"jump-card-ecommerce-option-connected","addOption"]]]]],["jump-filter",[[1,"jump-filter",{"direction":[1],"filterHeading":[1,"filter-heading"],"filterButtonLabel":[1,"filter-button-label"],"filterButtonIcon":[1,"filter-button-icon"],"mobileThreshold":[2,"mobile-threshold"],"filters":[8],"activeFilters":[32],"showMobileFilters":[32],"isMobile":[32],"getFilters":[64]},[[0,"jump-filterchange","filterChangeHandler"],[9,"resize","handleResize"]],{"showMobileFilters":["watchHandler"]}]]],["jump-filtergroup",[[1,"jump-filtergroup",{"name":[1],"heading":[1],"otherLabel":[1,"other-label"],"lessLabel":[1,"less-label"],"maxElements":[2,"max-elements"],"variant":[1],"label":[32],"values":[32],"value":[32],"slotItems":[32],"inputs":[32],"showMore":[32],"getValues":[64],"getActiveAmount":[64],"getInputs":[64],"getName":[64]},null,{"showMore":["watchShowMore"]}]]],["jump-navbar",[[1,"jump-navbar",{"logo":[16],"navItems":[16],"secondaryNavItems":[16],"mobileThreshold":[2,"mobile-threshold"],"type":[1],"navPosition":[1,"nav-position"],"megaMenuAlignment":[1,"mega-menu-alignment"],"sticky":[4],"stickyThreshold":[2,"sticky-threshold"],"mobileLogo":[16],"user":[16],"isMobile":[32]},[[9,"resize","handleResize"]]]]],["jump-pagination",[[1,"jump-pagination",{"pagLabel":[1,"pag-label"],"last":[2],"showFirstAndLast":[4,"show-first-and-last"],"current":[32]},null,{"current":["watchcurrent"]}]]],["jump-pagination-table",[[0,"jump-pagination-table",{"elementsRanges":[1,"elements-ranges"],"pagLabel":[513,"pag-label"],"labelElementsPerPage":[513,"label-elements-per-page"],"total":[514],"first":[514],"last":[514],"showFirstAndLast":[516,"show-first-and-last"],"elementsRangesArray":[32],"elPerPage":[32]},null,{"elementsRanges":["elementsRangesChanged"],"elPerPage":["elPerPageChanged"]}]]],["jump-quantity",[[65,"jump-quantity",{"min":[2],"max":[2],"step":[2],"label":[1],"type":[1],"variant":[1],"showButtons":[4,"show-buttons"],"value":[2],"getValue":[64],"reset":[64]},null,{"value":["onValueChange"]}]]],["jump-accordion",[[1,"jump-accordion",{"variant":[1],"summary":[1],"disabled":[4],"open":[516],"icon":[1],"identifier":[1]},[[0,"sl-show","handleShow"]]]]],["jump-tab-item",[[1,"jump-tab-item",{"identifier":[1],"iconName":[1,"icon-name"],"iconPosition":[1,"icon-position"],"label":[1],"active":[4],"disabled":[4],"variant":[32]}]]],["jump-accordion-group",[[1,"jump-accordion-group",{"variant":[1],"groupIdentifier":[1,"group-identifier"]}]]],["jump-card",[[4,"jump-card",{"horizontal":[4],"dark":[4],"shadow":[4],"border":[4],"borderRadius":[4,"border-radius"],"topBorderContentRadius":[4,"top-border-content-radius"],"boxed":[4],"roundedMedia":[4,"rounded-media"],"imgSrc":[1,"img-src"],"imgAlt":[1,"img-alt"],"videoSrc":[1,"video-src"]}]]],["jump-card-ecommerce-option",[[1,"jump-card-ecommerce-option",{"code":[1],"imgUrl":[1,"img-url"],"label":[1],"sku":[1],"taxonomy":[1]}]]],["jump-filter-checkbox",[[1,"jump-filter-checkbox",{"value":[1],"label":[1],"checked":[516],"count":[8],"isChecked":[64]}]]],["jump-tab",[[1,"jump-tab",{"alignment":[1],"fullBorder":[4,"full-border"],"tabGroupName":[1,"tab-group-name"],"variant":[1]},[[0,"jump-change-active-tab","changeActiveTabHandler"]]]]],["jump-tab-panel",[[1,"jump-tab-panel",{"identifier":[1],"active":[4]}]]],["jump-badge",[[1,"jump-badge",{"label":[1],"variant":[513],"dimension":[513],"soft":[516],"outline":[516]}]]]], options);
|
|
20
20
|
});
|
|
21
21
|
|
|
22
22
|
//# sourceMappingURL=jump-design-system.js.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-a94d133e.js';
|
|
2
|
+
|
|
3
|
+
const jumpNavbarCss = ":host{--jump-navbar-height:var(--header-height, 100px);--jump-navbar-background:var(--bg-drawer, #fff);--jump-navbar-width:var(--drawer-width, 240px);--jump-navbar-shadow:8px 0 15px 0 #00000026;--jump-navbar-zindex:2;--jump-navbar-transition:0.3s all ease-in-out;--jump-navbar-gap:2.5rem;--jump-navbar-padding:1rem;--jump-navbar-close-top:calc(var(--header-height) + 1rem);--jump-navbar-close-left:calc(var(--drawer-width) - 2rem);--jump-navbar-close-gap:0.5rem}";
|
|
4
|
+
const JumpNavbarStyle0 = jumpNavbarCss;
|
|
5
|
+
|
|
6
|
+
const JumpNavbar = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
this.logo = { image_url: '', alt: '', link: '#', target: '_self' };
|
|
10
|
+
this.navItems = [];
|
|
11
|
+
this.secondaryNavItems = [];
|
|
12
|
+
this.mobileThreshold = 768;
|
|
13
|
+
this.type = 'basic';
|
|
14
|
+
this.navPosition = 'inline';
|
|
15
|
+
this.megaMenuAlignment = 'left';
|
|
16
|
+
this.sticky = false;
|
|
17
|
+
this.stickyThreshold = 0;
|
|
18
|
+
this.mobileLogo = this.logo;
|
|
19
|
+
this.user = null;
|
|
20
|
+
this.isMobile = false;
|
|
21
|
+
}
|
|
22
|
+
handleResize() {
|
|
23
|
+
this.isMobile = window.innerWidth < this.mobileThreshold;
|
|
24
|
+
}
|
|
25
|
+
render() {
|
|
26
|
+
var _a, _b;
|
|
27
|
+
return (h(Host, { key: '87fa483a27dc0314a3fadcc0b7c4cf61013ad98d' }, h("jump-button", { key: 'b2756659bde1018ea284a59d0919729e593364ac', variant: "primary", size: "small", text: true, href: this.logo['link'], target: (_a = this.logo['target']) !== null && _a !== void 0 ? _a : '_self' }, h("img", { key: 'b3b7d8f6028d16d0967d7fdb71068cd9f2a0636c', src: this.logo['image_url'], alt: this.logo['alt'] })), this.isMobile &&
|
|
28
|
+
h("div", { key: '9ff3e44a80259536f2bbb58ccc6be5967a3dc189', class: "MobileMenuOffCanvas" }, h("div", { key: 'c8e35bfbea3eb84d9df53fe8f18fa5cdccfe31c0', class: "MobileMenuOffCanvas__Header" }, "/* TODO: ricerca + pulsante chiusura + profilo utente con immagine */"), h("div", { key: 'ac6ad3c511ce635f4aa541a8326e97a77d3c4f2b', class: "MobileMenuOffCanvas__Navbar" }, this.navbar.cloneNode(true)), h("div", { key: 'f0f1ef266da0efa437c08df92a7d481b68892329', class: "MobileMenuOffCanvas__Footer" }, "/* TODO: langswitcher */", this.mobileLogo &&
|
|
29
|
+
h("jump-button", { key: '6eaa0a821b15ea28e8a8672e03cf51c5e57a1ca1', variant: "primary", size: "small", text: true, href: this.mobileLogo['link'], target: (_b = this.mobileLogo['target']) !== null && _b !== void 0 ? _b : '_self' }, h("img", { key: '7ef8f3187b555bc27172d062fb19a20423409bbc', src: this.mobileLogo['image_url'], alt: this.mobileLogo['alt'] })))), h("nav", { key: 'ab7a9bcbd9e907448a6dc393f1efa32e80752856', ref: (el) => {
|
|
30
|
+
this.navbar = el;
|
|
31
|
+
} }, h("ul", { key: '70c90191941c1b371218a69216f30921c5e097af' }, this.navItems.map((item) => (h("li", null, h("jump-button", { variant: "primary", size: "small", text: true, href: item.link, target: item.target, class: item.class }, item.text, this.secondaryNavItems.some(secondaryItem => secondaryItem.parent === item.id) &&
|
|
32
|
+
h("jump-icon", { slot: "suffix", library: "lucide", name: "chevron-down", size: "small" })), this.secondaryNavItems.map((secondaryItem) => (secondaryItem.parent === item.id &&
|
|
33
|
+
h("ul", { "data-parent": secondaryItem.parent }, secondaryItem.title &&
|
|
34
|
+
h("h4", null, secondaryItem.title), " /* TODO: utilizzare jump-heading? */", secondaryItem.items.map((subItem) => (h("li", null, h("jump-button", { variant: "primary", size: "small", text: true, href: subItem.link, target: subItem.target, class: subItem.class }, subItem.text)))))))))))), h("slot", { key: '7edb581eab5c8942b9670129f893e92eefe9b5f3', name: "actions" }, h("slot", { key: '9e1eaf7c15bd2767d78d00a594a28f1d867ebb6d', name: "lang_switcher" }), h("slot", { key: '9cff169f4012c9dc87e9b6b78497f3c0e53dae58', name: "search" }), h("slot", { key: '465d61b9266c7ff12cfd434decd44579b84ab908', name: "buttons" }), h("slot", { key: 'c7e66e9bc83921f327f4f7fe74e3e68ac3d4a44a', name: "cart" }))));
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
JumpNavbar.style = JumpNavbarStyle0;
|
|
38
|
+
|
|
39
|
+
export { JumpNavbar as jump_navbar };
|
|
40
|
+
|
|
41
|
+
//# sourceMappingURL=jump-navbar.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"jump-navbar.entry.js","mappings":";;AAAA,MAAM,aAAa,GAAG,gdAAgd,CAAC;AACve,yBAAe,aAAa;;MCMf,UAAU;;;oBAMjB,EAAE,SAAS,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE;wBAOrD,EAAE;iCAUF,EAAE;+BAC2B,GAAG;oBAC0B,OAAO;2BACd,QAAQ;iC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src/components/jump-navbar/jump-navbar.scss?tag=jump-navbar&encapsulation=shadow","src/components/jump-navbar/jump-navbar.tsx"],"sourcesContent":[":host {\n --jump-navbar-height: var(--header-height, 100px);\n --jump-navbar-background: var(--bg-drawer, #fff);\n --jump-navbar-width: var(--drawer-width, 240px);\n --jump-navbar-shadow: 8px 0 15px 0 #00000026;\n --jump-navbar-zindex: 2;\n --jump-navbar-transition: 0.3s all ease-in-out;\n --jump-navbar-gap: 2.5rem;\n --jump-navbar-padding: 1rem;\n --jump-navbar-close-top: calc(var(--header-height) + 1rem);\n --jump-navbar-close-left: calc(var(--drawer-width) - 2rem);\n --jump-navbar-close-gap: 0.5rem;\n}\n","import { Component, Host, Prop, h, Listen, State } from '@stencil/core';\n\n@Component({\n tag: 'jump-navbar',\n styleUrl: 'jump-navbar.scss',\n shadow: true,\n})\nexport class JumpNavbar {\n @Prop() logo: {\n image_url: string,\n alt: string,\n link: string,\n target: '_blank' | '_parent' | '_self' | '_top'\n } = { image_url: '', alt: '', link: '#', target: '_self' };\n @Prop() navItems: Array<{\n id: string,\n text: string,\n link: string,\n class: string,\n target: '_blank' | '_parent' | '_self' | '_top'\n }> = [];\n @Prop() secondaryNavItems: Array<{\n parent: string | null,\n title: string | null,\n items: Array<{\n text: string,\n link: string,\n class: string,\n target: '_blank' | '_parent' | '_self' | '_top'\n }>\n }> = [];\n @Prop() mobileThreshold: number = 768;\n @Prop() type: 'basic' | 'hamburger_left' | 'hamburger_right' = 'basic';\n @Prop() navPosition: 'inline' | 'bottom' | 'megamenu' = 'inline'; //TODO: Chiedere a Vale se può essere inline + sulla riga sotto mostriamo la tendina oppure è un menu a sé stante quello sotto\n @Prop() megaMenuAlignment: 'left' | 'right' = 'left';\n @Prop() sticky: boolean = false;\n @Prop() stickyThreshold: number = 0; // Possible to get sticky on mobile only after a certain scroll threshold\n @Prop() mobileLogo: {\n image_url: string,\n alt: string,\n link: string,\n target: '_blank' | '_parent' | '_self' | '_top'\n } | null = this.logo;\n @Prop() user : {\n image_url: string,\n alt: string,\n link: string,\n target: '_blank' | '_parent' | '_self' | '_top'\n } | null = null;\n\n @State() isMobile: boolean = false;\n\n navbar: HTMLElement;\n\n @Listen('resize', { target: 'window' })\n handleResize() {\n this.isMobile = window.innerWidth < this.mobileThreshold;\n }\n\n render() {\n return (\n <Host>\n <jump-button variant=\"primary\" size=\"small\" text href={this.logo['link']}\n target={this.logo['target'] ?? '_self'}>\n <img src={this.logo['image_url']} alt={this.logo['alt']} />\n </jump-button>\n {this.isMobile &&\n <div class=\"MobileMenuOffCanvas\">\n <div class=\"MobileMenuOffCanvas__Header\">\n /* TODO: ricerca + pulsante chiusura + profilo utente con immagine */\n </div>\n <div class=\"MobileMenuOffCanvas__Navbar\">\n {this.navbar.cloneNode(true)}\n </div>\n <div class=\"MobileMenuOffCanvas__Footer\">\n /* TODO: langswitcher */\n {this.mobileLogo &&\n <jump-button variant=\"primary\" size=\"small\" text href={this.mobileLogo['link']}\n target={this.mobileLogo['target'] ?? '_self'}>\n <img src={this.mobileLogo['image_url']} alt={this.mobileLogo['alt']} />\n </jump-button>\n }\n </div>\n </div>}\n <nav ref={(el: HTMLElement) => {\n this.navbar = el;\n }}>\n <ul>\n {this.navItems.map((item) => (\n <li>\n <jump-button variant=\"primary\" size=\"small\" text href={item.link} target={item.target}\n class={item.class}>\n {item.text}\n {this.secondaryNavItems.some(secondaryItem => secondaryItem.parent === item.id) &&\n <jump-icon slot=\"suffix\" library=\"lucide\" name=\"chevron-down\" size=\"small\"></jump-icon>\n }\n </jump-button>\n\n {this.secondaryNavItems.map((secondaryItem) => (\n secondaryItem.parent === item.id &&\n <ul data-parent={secondaryItem.parent}>\n {secondaryItem.title &&\n <h4>{secondaryItem.title}</h4>} /* TODO: utilizzare jump-heading? */\n {secondaryItem.items.map((subItem) => (\n <li>\n <jump-button variant=\"primary\" size=\"small\" text href={subItem.link} target={subItem.target}\n class={subItem.class}>\n {subItem.text}\n </jump-button>\n </li>\n ))}\n </ul>\n ))}\n </li>\n ))}\n </ul>\n </nav>\n <slot name=\"actions\">\n <slot name=\"lang_switcher\"></slot>\n <slot name=\"search\"></slot>\n <slot name=\"buttons\"></slot>\n <slot name=\"cart\"></slot>\n </slot>\n </Host>\n );\n }\n}\n\n"],"version":3}
|