@zanichelli/albe-web-components 10.0.7 → 11.0.0
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/{icons-7da210ed.js → icons-b3352331.js} +77 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/web-components-library.cjs.js +1 -1
- package/dist/cjs/z-app-header_11.cjs.entry.js +4 -4
- package/dist/cjs/z-navigation-tab-link.cjs.entry.js +6 -3
- package/dist/cjs/z-navigation-tab.cjs.entry.js +2 -2
- package/dist/cjs/z-navigation-tabs.cjs.entry.js +108 -96
- package/dist/cjs/z-popover.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/components/icons/icons.js +77 -0
- package/dist/collection/components/inputs/z-searchbar/styles.css +1 -1
- package/dist/collection/components/navigation/z-app-header/index.js +3 -2
- package/dist/collection/components/navigation/z-app-header/styles.css +9 -1
- package/dist/collection/components/navigation/z-navigation-tabs/index.js +335 -0
- package/dist/collection/components/navigation/z-navigation-tabs/index.stories.js +12 -0
- package/dist/collection/components/navigation/z-navigation-tabs/styles.css +212 -0
- package/dist/collection/components/z-popover/index.js +2 -2
- package/dist/collection/{components/navigation/tabs → deprecated}/navigation-tab.css +5 -4
- package/dist/collection/deprecated/z-link/index.js +1 -0
- package/dist/collection/{components/navigation/tabs → deprecated}/z-navigation-tab/index.js +8 -5
- package/dist/collection/{components/navigation/tabs → deprecated}/z-navigation-tab-link/index.js +7 -3
- package/dist/esm/{icons-4b57811d.js → icons-6b29d7ea.js} +77 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/web-components-library.js +1 -1
- package/dist/esm/z-app-header_11.entry.js +4 -4
- package/dist/esm/z-navigation-tab-link.entry.js +6 -3
- package/dist/esm/z-navigation-tab.entry.js +2 -2
- package/dist/esm/z-navigation-tabs.entry.js +110 -98
- package/dist/esm/z-popover.entry.js +2 -2
- package/dist/types/components/icons/icons.d.ts +154 -1
- package/dist/types/components/navigation/z-app-header/index.d.ts +2 -1
- package/dist/types/components/navigation/{tabs/z-navigation-tabs → z-navigation-tabs}/index.d.ts +43 -31
- package/dist/types/components.d.ts +20 -2
- package/dist/types/deprecated/z-link/index.d.ts +1 -0
- package/dist/types/{components/navigation/tabs → deprecated}/z-navigation-tab/index.d.ts +2 -1
- package/dist/types/{components/navigation/tabs → deprecated}/z-navigation-tab-link/index.d.ts +2 -1
- package/dist/web-components-library/p-0b1c8f55.entry.js +1 -0
- package/dist/web-components-library/p-31a19318.entry.js +1 -0
- package/dist/web-components-library/p-6c452dbc.entry.js +1 -0
- package/dist/web-components-library/p-9f2bfd3b.entry.js +1 -0
- package/dist/web-components-library/{p-f5b5f897.entry.js → p-a69d9a1c.entry.js} +1 -1
- package/dist/web-components-library/p-e90c27f8.js +1 -0
- package/dist/web-components-library/web-components-library.css +1 -1
- package/dist/web-components-library/web-components-library.esm.js +1 -1
- package/package.json +1 -1
- package/www/build/p-0b1c8f55.entry.js +1 -0
- package/www/build/p-31a19318.entry.js +1 -0
- package/www/build/{p-d7785559.js → p-5db9e573.js} +1 -1
- package/www/build/{p-06f4a3d5.css → p-5fcf6d3b.css} +1 -1
- package/www/build/p-6c452dbc.entry.js +1 -0
- package/www/build/p-9f2bfd3b.entry.js +1 -0
- package/www/build/{p-f5b5f897.entry.js → p-a69d9a1c.entry.js} +1 -1
- package/www/build/p-e90c27f8.js +1 -0
- package/www/build/web-components-library.css +1 -1
- package/www/build/web-components-library.esm.js +1 -1
- package/www/index.html +1 -1
- package/CHANGELOG.md +0 -2751
- package/dist/collection/components/navigation/tabs/z-navigation-tabs/index.js +0 -291
- package/dist/collection/components/navigation/tabs/z-navigation-tabs/index.stories.js +0 -11
- package/dist/collection/components/navigation/tabs/z-navigation-tabs/styles.css +0 -102
- package/dist/web-components-library/p-0d2c1891.entry.js +0 -1
- package/dist/web-components-library/p-0d38e9a8.js +0 -1
- package/dist/web-components-library/p-36487afc.entry.js +0 -1
- package/dist/web-components-library/p-5505a3c0.entry.js +0 -1
- package/dist/web-components-library/p-fa7b1ee3.entry.js +0 -1
- package/src-react/index.ts +0 -1
- package/www/build/p-0d2c1891.entry.js +0 -1
- package/www/build/p-0d38e9a8.js +0 -1
- package/www/build/p-36487afc.entry.js +0 -1
- package/www/build/p-5505a3c0.entry.js +0 -1
- package/www/build/p-fa7b1ee3.entry.js +0 -1
|
@@ -5,11 +5,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-e3299e0a.js');
|
|
6
6
|
const index$1 = require('./index-e8ce94a1.js');
|
|
7
7
|
|
|
8
|
-
const stylesCss = "
|
|
8
|
+
const stylesCss = "z-navigation-tabs{position:relative;z-index:0;display:flex;overflow:hidden;flex-direction:row;font-family:var(--font-family-sans);font-weight:var(--font-rg)}z-navigation-tabs,z-navigation-tabs *{box-sizing:border-box}z-navigation-tabs>nav::-webkit-scrollbar{display:none}.navigation-button{position:absolute;z-index:1;display:flex;align-items:center;justify-content:center;padding:0;border:none;margin:0;background-color:var(--z-navigation-tabs-nav-buttons-bg, var(--color-surface01));border-radius:var(--border-no-radius);box-shadow:0 0 4px 1px var(--shadow-color-base);cursor:pointer;fill:var(--z-navigation-tabs-nav-buttons-fg, var(--color-primary01));outline:none}z-navigation-tabs .navigation-button:disabled{display:none}z-navigation-tabs>nav{z-index:0;display:flex;overflow:auto;align-items:center;justify-content:flex-start;scroll-behavior:smooth;scrollbar-width:none}z-navigation-tabs[orientation=\"horizontal\"]>nav{width:100%}z-navigation-tabs[orientation=\"horizontal\"] .navigation-button{top:0;width:calc(var(--space-unit) * 4);height:100%}z-navigation-tabs[orientation=\"horizontal\"] .navigation-button:first-child{left:0}z-navigation-tabs[orientation=\"horizontal\"] .navigation-button:last-child{right:0}z-navigation-tabs[orientation=\"vertical\"]{width:fit-content;flex-direction:column}z-navigation-tabs[orientation=\"vertical\"]>nav{height:100%;flex-direction:column;align-items:stretch}z-navigation-tabs[orientation=\"vertical\"] .navigation-button{left:0;width:100%;height:calc(var(--space-unit) * 4)}z-navigation-tabs[orientation=\"vertical\"] .navigation-button:first-child{top:0}z-navigation-tabs[orientation=\"vertical\"] .navigation-button:last-child{bottom:0}z-navigation-tabs[size=\"small\"][orientation=\"vertical\"] .navigation-button{height:calc(var(--space-unit) * 4)}z-navigation-tabs>nav>*{position:relative;z-index:0;display:inline-flex;width:auto;align-items:center;justify-content:center;padding:calc(var(--space-unit) * 2) calc(var(--space-unit) * 5);border:none;margin:0;background-color:unset;border-radius:var(--border-no-radius);color:var(--color-primary01);cursor:pointer;fill:currentcolor;font-family:var(--font-family-sans);font-size:inherit;gap:var(--space-unit);letter-spacing:inherit;line-height:inherit;outline:none;text-align:center;white-space:nowrap}z-navigation-tabs>nav>a{text-decoration:none}z-navigation-tabs>nav>*:focus:focus-visible{z-index:1;box-shadow:inset 0 0 4px 3px var(--color-highlight)}z-navigation-tabs>nav>:not([disabled]):hover{background-color:var(--color-surface02)}z-navigation-tabs>nav>button[disabled]{color:var(--color-disabled03);cursor:not-allowed;fill:currentcolor;pointer-events:all}z-navigation-tabs>nav>:not([disabled]):hover,nav>[aria-selected=\"true\"]{color:var(--color-hover-secondary);fill:currentcolor}z-navigation-tabs>nav>:not([disabled]):hover::after,nav>[aria-selected=\"true\"]::after{position:absolute;background-color:var(--color-hover-secondary);content:\"\"}z-navigation-tabs[orientation=\"horizontal\"]>nav>:not([disabled]):hover::after,z-navigation-tabs[orientation=\"horizontal\"]>nav>[aria-selected=\"true\"]::after{bottom:0;left:0;width:100%;height:var(--border-size-large)}z-navigation-tabs>nav>* z-icon{--z-icon-width:calc(var(--space-unit) * 2);--z-icon-height:calc(var(--space-unit) * 2);display:flex;margin:0}z-navigation-tabs[size=\"small\"][orientation=\"horizontal\"]>nav>*{padding:var(--space-unit) calc(var(--space-unit) * 2)}z-navigation-tabs[size=\"small\"][orientation=\"horizontal\"]>nav>:not([disabled]):hover::after,z-navigation-tabs[size=\"small\"][orientation=\"horizontal\"]>nav>[aria-selected=\"true\"]::after{height:var(--border-size-medium)}z-navigation-tabs[size=\"small\"]:not([orientation=\"vertical\"])>nav>* z-icon{--z-icon-width:14px;--z-icon-height:14px}z-navigation-tabs[orientation=\"vertical\"]>nav>*{padding:calc(var(--space-unit) * 3) calc(var(--space-unit) * 2)}z-navigation-tabs[orientation=\"vertical\"]>nav>*>:not(z-icon){display:none}z-navigation-tabs[orientation=\"vertical\"]>nav>:not([disabled]):hover::after,z-navigation-tabs[orientation=\"vertical\"]>nav>[aria-selected=\"true\"]::after{top:0;right:0;width:var(--border-size-large);height:100%}";
|
|
9
9
|
|
|
10
10
|
const ZNavigationTabs = class {
|
|
11
11
|
constructor(hostRef) {
|
|
12
12
|
index.registerInstance(this, hostRef);
|
|
13
|
+
this.selected = index.createEvent(this, "selected", 7);
|
|
13
14
|
/**
|
|
14
15
|
* Navigation tabs orientation.
|
|
15
16
|
*/
|
|
@@ -18,6 +19,14 @@ const ZNavigationTabs = class {
|
|
|
18
19
|
* Navigation tabs size.
|
|
19
20
|
*/
|
|
20
21
|
this.size = index$1.NavigationTabsSize.BIG;
|
|
22
|
+
/**
|
|
23
|
+
* Index of the selected tab.
|
|
24
|
+
*/
|
|
25
|
+
this.selectedTab = undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Index of the last tab that held focus.
|
|
28
|
+
*/
|
|
29
|
+
this.focusedTab = 0;
|
|
21
30
|
}
|
|
22
31
|
/**
|
|
23
32
|
* Getter for the direction to check based on current orientation.
|
|
@@ -32,158 +41,161 @@ const ZNavigationTabs = class {
|
|
|
32
41
|
return this.orientation == index$1.NavigationTabsOrientation.HORIZONTAL ? "Width" : "Height";
|
|
33
42
|
}
|
|
34
43
|
get tabs() {
|
|
35
|
-
return Array.from(this.
|
|
44
|
+
return Array.from(this.nav.children);
|
|
36
45
|
}
|
|
37
46
|
/**
|
|
38
|
-
*
|
|
47
|
+
* Scroll into view to center the tab.
|
|
39
48
|
*/
|
|
40
|
-
|
|
41
|
-
this.
|
|
42
|
-
|
|
49
|
+
scrollToTab(tabElement) {
|
|
50
|
+
const scrollOptions = (this.orientation === index$1.NavigationTabsOrientation.HORIZONTAL
|
|
51
|
+
? { block: "nearest", inline: "center" }
|
|
52
|
+
: { block: "center", inline: "nearest" });
|
|
53
|
+
tabElement.scrollIntoView(Object.assign({ behavior: "smooth" }, scrollOptions));
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Scroll the navigation bar half of its size backward.
|
|
57
|
+
*/
|
|
58
|
+
navigateBackwards() {
|
|
59
|
+
this.nav.scrollBy({
|
|
60
|
+
[this.direction.toLowerCase()]: 0 - this.nav[`client${this.dimension}`] / 2,
|
|
61
|
+
behavior: "smooth",
|
|
43
62
|
});
|
|
44
63
|
}
|
|
45
64
|
/**
|
|
46
|
-
*
|
|
65
|
+
* Scroll the navigation bar half of its size forward.
|
|
47
66
|
*/
|
|
48
|
-
|
|
49
|
-
this.
|
|
50
|
-
|
|
67
|
+
navigateForward() {
|
|
68
|
+
this.nav.scrollBy({
|
|
69
|
+
[this.direction.toLowerCase()]: this.nav[`scroll${this.direction}`] + this.nav[`client${this.dimension}`] / 2,
|
|
70
|
+
behavior: "smooth",
|
|
51
71
|
});
|
|
52
72
|
}
|
|
53
73
|
/**
|
|
54
|
-
* Check if
|
|
74
|
+
* Check if a keyboard event was triggered by an arrow key.
|
|
55
75
|
*/
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
this.canNavigate = this.tabsNav[`scroll${this.dimension}`] > this.tabsNav[`client${this.dimension}`];
|
|
76
|
+
isArrowNavigation(e) {
|
|
77
|
+
return Object.values(index$1.NavigationTabsKeyboardEvents).includes(e.key);
|
|
61
78
|
}
|
|
62
79
|
/**
|
|
63
80
|
* Check if navigation buttons can be enabled for each direction.
|
|
64
81
|
*/
|
|
65
82
|
checkScrollEnabled() {
|
|
66
|
-
if (!this.
|
|
83
|
+
if (!this.nav) {
|
|
67
84
|
return;
|
|
68
85
|
}
|
|
69
86
|
this.canNavigateNext =
|
|
70
|
-
this.
|
|
71
|
-
|
|
72
|
-
this.canNavigatePrev = this.tabsNav[`scroll${this.direction}`] > 0;
|
|
87
|
+
this.nav[`scroll${this.direction}`] + this.nav[`client${this.dimension}`] < this.nav[`scroll${this.dimension}`];
|
|
88
|
+
this.canNavigatePrev = this.nav[`scroll${this.direction}`] > 0;
|
|
73
89
|
}
|
|
74
90
|
/**
|
|
75
|
-
*
|
|
76
|
-
* Deselect all other previously selected tabs,
|
|
77
|
-
* then scroll to the new selected tab and center it.
|
|
78
|
-
* @param {CustomEvent} event `selected` event triggered by a child tab
|
|
91
|
+
* When the selected tab changes, update the `aria-selected` attribute on each tab and scroll to the selected tab.
|
|
79
92
|
*/
|
|
80
|
-
onTabSelected(
|
|
81
|
-
const selectedTab = event.target;
|
|
93
|
+
onTabSelected() {
|
|
82
94
|
this.tabs.forEach((tab, i) => {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
95
|
+
const zicon = tab.querySelector("z-icon");
|
|
96
|
+
const strokeIcon = zicon === null || zicon === void 0 ? void 0 : zicon.getAttribute("name").replace("-filled", "");
|
|
97
|
+
if (i !== this.selectedTab) {
|
|
98
|
+
tab.setAttribute("aria-selected", "false");
|
|
99
|
+
tab.tabIndex = -1;
|
|
100
|
+
zicon === null || zicon === void 0 ? void 0 : zicon.setAttribute("name", strokeIcon);
|
|
101
|
+
return;
|
|
88
102
|
}
|
|
103
|
+
zicon === null || zicon === void 0 ? void 0 : zicon.setAttribute("name", `${strokeIcon}-filled`);
|
|
104
|
+
tab.tabIndex = 0;
|
|
105
|
+
tab.setAttribute("aria-selected", "true");
|
|
89
106
|
});
|
|
107
|
+
this.scrollToTab(this.tabs[this.selectedTab]);
|
|
108
|
+
this.selected.emit(this.selectedTab);
|
|
90
109
|
}
|
|
91
110
|
/**
|
|
92
|
-
*
|
|
111
|
+
* Check if the navigation buttons are needed on window resize.
|
|
93
112
|
*/
|
|
94
|
-
|
|
95
|
-
this.
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}
|
|
113
|
+
checkScrollVisible() {
|
|
114
|
+
if (!this.nav) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
this.canNavigate = this.nav[`scroll${this.dimension}`] > this.nav[`client${this.dimension}`];
|
|
99
118
|
}
|
|
100
119
|
/**
|
|
101
|
-
*
|
|
120
|
+
* Handle click on the tabs.
|
|
121
|
+
* @param event `click` event triggered by a child tab
|
|
102
122
|
*/
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
123
|
+
handleTabClick(event) {
|
|
124
|
+
const clickedTab = event.target.closest("[role='tab']");
|
|
125
|
+
if (!this.tabs.some((child) => child.contains(clickedTab))) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
this.selectedTab = this.tabs.indexOf(clickedTab);
|
|
108
129
|
}
|
|
109
130
|
/**
|
|
110
|
-
* Move focus through tabs
|
|
111
|
-
* When `TAB` is pressed, focus the currently selected tab
|
|
131
|
+
* Move focus through tabs when an arrow key is pressed.
|
|
132
|
+
* When `TAB` is pressed, focus the currently selected tab if any.
|
|
112
133
|
*/
|
|
113
|
-
navigateThroughTabs(
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
});
|
|
121
|
-
tabs[this.tabFocus].children[0].tabIndex = 0;
|
|
122
|
-
tabs[this.tabFocus].children[0].focus();
|
|
134
|
+
navigateThroughTabs(event) {
|
|
135
|
+
if (!this.tabs.some((tab) => tab.contains(event.target))) {
|
|
136
|
+
return true;
|
|
137
|
+
}
|
|
138
|
+
if (event.key === index$1.KeyboardCode.TAB) {
|
|
139
|
+
this.focusedTab = this.selectedTab || 0;
|
|
140
|
+
this.tabs[this.focusedTab].focus({ preventScroll: true });
|
|
123
141
|
return;
|
|
124
142
|
}
|
|
125
|
-
if (!this.isArrowNavigation(
|
|
143
|
+
if (!this.isArrowNavigation(event)) {
|
|
126
144
|
return true;
|
|
127
145
|
}
|
|
128
|
-
|
|
129
|
-
tabs[this.
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
this.
|
|
134
|
-
if (this.
|
|
135
|
-
this.
|
|
146
|
+
event.preventDefault();
|
|
147
|
+
this.tabs[this.focusedTab].tabIndex = -1;
|
|
148
|
+
if ((event.key === index$1.NavigationTabsKeyboardEvents.RIGHT && this.orientation == index$1.NavigationTabsOrientation.HORIZONTAL) ||
|
|
149
|
+
(event.key === index$1.NavigationTabsKeyboardEvents.DOWN && this.orientation == index$1.NavigationTabsOrientation.VERTICAL)) {
|
|
150
|
+
// Move forward
|
|
151
|
+
this.focusedTab++;
|
|
152
|
+
if (this.focusedTab >= this.tabs.length) {
|
|
153
|
+
this.focusedTab = 0;
|
|
136
154
|
}
|
|
137
|
-
// Move backward
|
|
138
155
|
}
|
|
139
|
-
else if ((
|
|
140
|
-
(
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
156
|
+
else if ((event.key === index$1.NavigationTabsKeyboardEvents.LEFT && this.orientation == index$1.NavigationTabsOrientation.HORIZONTAL) ||
|
|
157
|
+
(event.key === index$1.NavigationTabsKeyboardEvents.UP && this.orientation == index$1.NavigationTabsOrientation.VERTICAL)) {
|
|
158
|
+
// Move backward
|
|
159
|
+
this.focusedTab--;
|
|
160
|
+
if (this.focusedTab < 0) {
|
|
161
|
+
this.focusedTab = this.tabs.length - 1;
|
|
144
162
|
}
|
|
145
163
|
}
|
|
146
|
-
//
|
|
147
|
-
if (tabs[this.
|
|
148
|
-
this.
|
|
149
|
-
|
|
150
|
-
else {
|
|
151
|
-
tabs[this.tabFocus].children[0].tabIndex = 0;
|
|
152
|
-
tabs[this.tabFocus].children[0].focus();
|
|
164
|
+
// Ignore disabled tabs
|
|
165
|
+
if (this.tabs[this.focusedTab].hasAttribute("disabled") &&
|
|
166
|
+
this.tabs[this.focusedTab].getAttribute("disabled") !== "false") {
|
|
167
|
+
return this.navigateThroughTabs(event);
|
|
153
168
|
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
*/
|
|
158
|
-
isArrowNavigation(e) {
|
|
159
|
-
return Object.values(index$1.NavigationTabsKeyboardEvents).includes(e.key);
|
|
169
|
+
this.tabs[this.focusedTab].tabIndex = 0;
|
|
170
|
+
this.tabs[this.focusedTab].focus();
|
|
171
|
+
this.scrollToTab(this.tabs[this.focusedTab]);
|
|
160
172
|
}
|
|
161
173
|
componentDidRender() {
|
|
162
|
-
this.setChildrenSize();
|
|
163
|
-
this.setChildrenOrientation();
|
|
164
174
|
this.checkScrollVisible();
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
175
|
+
}
|
|
176
|
+
componentDidLoad() {
|
|
177
|
+
// Set role and tabindex to each slotted tab
|
|
178
|
+
this.tabs.forEach((tab) => {
|
|
179
|
+
tab.setAttribute("role", "tab");
|
|
180
|
+
tab.tabIndex = -1;
|
|
181
|
+
});
|
|
182
|
+
this.tabs[0].tabIndex = 0;
|
|
183
|
+
if (this.selectedTab !== undefined) {
|
|
184
|
+
this.onTabSelected();
|
|
172
185
|
}
|
|
173
186
|
}
|
|
174
187
|
render() {
|
|
175
188
|
return (index.h(index.Host, { class: {
|
|
176
189
|
"interactive-2": this.size === index$1.NavigationTabsSize.SMALL,
|
|
177
190
|
"interactive-1": this.size !== index$1.NavigationTabsSize.SMALL,
|
|
178
|
-
}, scrollable: this.canNavigate }, this.canNavigate && (index.h("button", { class: "navigation-button", onClick: this.navigateBackwards.bind(this),
|
|
191
|
+
}, scrollable: this.canNavigate }, this.canNavigate && (index.h("button", { class: "navigation-button", onClick: this.navigateBackwards.bind(this), tabIndex: -1, disabled: !this.canNavigatePrev, "aria-label": "Mostra elementi precedenti" }, index.h("z-icon", { name: this.orientation === index$1.NavigationTabsOrientation.HORIZONTAL ? "chevron-left" : "chevron-up", width: 16, height: 16 }))), index.h("nav", { role: "tablist", "aria-label": this.ariaLabel, ref: (el) => (this.nav = el !== null && el !== void 0 ? el : this.nav), onScroll: this.checkScrollEnabled.bind(this), "aria-orientation": this.orientation }, index.h("slot", null)), this.canNavigate && (index.h("button", { class: "navigation-button", onClick: this.navigateForward.bind(this), onKeyDown: (e) => {
|
|
179
192
|
this.navigateThroughTabs(e);
|
|
180
193
|
}, tabindex: "-1", disabled: !this.canNavigateNext, "aria-label": "Mostra elementi successivi" }, index.h("z-icon", { name: this.orientation === index$1.NavigationTabsOrientation.HORIZONTAL ? "chevron-right" : "chevron-down", width: 16, height: 16 })))));
|
|
181
194
|
}
|
|
182
195
|
get host() { return index.getElement(this); }
|
|
183
196
|
static get watchers() { return {
|
|
184
|
-
"
|
|
185
|
-
"
|
|
186
|
-
"canNavigate": ["checkScrollEnabled"]
|
|
197
|
+
"canNavigate": ["checkScrollEnabled"],
|
|
198
|
+
"selectedTab": ["onTabSelected"]
|
|
187
199
|
}; }
|
|
188
200
|
};
|
|
189
201
|
ZNavigationTabs.style = stylesCss;
|
|
@@ -130,7 +130,7 @@ const ZPopover = class {
|
|
|
130
130
|
}
|
|
131
131
|
if (!e.composedPath().includes(this.host)) {
|
|
132
132
|
const target = e.target;
|
|
133
|
-
const triggerElemClicked = this.bindTo instanceof HTMLElement ? this.bindTo.contains(target) : target.closest(this.bindTo);
|
|
133
|
+
const triggerElemClicked = this.bindTo instanceof HTMLElement ? this.bindTo.contains(target) : target.closest(CSS.escape(this.bindTo));
|
|
134
134
|
if (triggerElemClicked) {
|
|
135
135
|
e.stopPropagation();
|
|
136
136
|
}
|
|
@@ -174,7 +174,7 @@ const ZPopover = class {
|
|
|
174
174
|
setPosition() {
|
|
175
175
|
let element;
|
|
176
176
|
if (typeof this.bindTo === "string") {
|
|
177
|
-
element = this.host.ownerDocument.querySelector(this.bindTo);
|
|
177
|
+
element = this.host.ownerDocument.querySelector(CSS.escape(this.bindTo));
|
|
178
178
|
}
|
|
179
179
|
else if (this.bindTo) {
|
|
180
180
|
element = this.bindTo;
|
|
@@ -25,12 +25,10 @@
|
|
|
25
25
|
"./components/list/z-toast-notification-list/index.js",
|
|
26
26
|
"./components/logo/z-logo/index.js",
|
|
27
27
|
"./components/modal/z-modal/index.js",
|
|
28
|
-
"./components/navigation/tabs/z-navigation-tab/index.js",
|
|
29
|
-
"./components/navigation/tabs/z-navigation-tab-link/index.js",
|
|
30
|
-
"./components/navigation/tabs/z-navigation-tabs/index.js",
|
|
31
28
|
"./components/navigation/z-app-header/index.js",
|
|
32
29
|
"./components/navigation/z-menu/index.js",
|
|
33
30
|
"./components/navigation/z-menu-section/index.js",
|
|
31
|
+
"./components/navigation/z-navigation-tabs/index.js",
|
|
34
32
|
"./components/notification/z-info-box/index.js",
|
|
35
33
|
"./components/notification/z-notification/index.js",
|
|
36
34
|
"./components/notification/z-toast-notification/index.js",
|
|
@@ -64,6 +62,8 @@
|
|
|
64
62
|
"./components/z-tag/index.js",
|
|
65
63
|
"./components/z-visually-hidden/index.js",
|
|
66
64
|
"./deprecated/z-link/index.js",
|
|
65
|
+
"./deprecated/z-navigation-tab/index.js",
|
|
66
|
+
"./deprecated/z-navigation-tab-link/index.js",
|
|
67
67
|
"./deprecated/z-table-deprecated/z-table-body/index.js",
|
|
68
68
|
"./deprecated/z-table-deprecated/z-table-cell/index.js",
|
|
69
69
|
"./deprecated/z-table-deprecated/z-table-empty-box/index.js",
|