@zanichelli/albe-web-components 7.4.0 → 7.4.2
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/CHANGELOG.md +14 -0
- package/dist/cjs/index-e3299e0a.js +10 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/web-components-library.cjs.js +1 -1
- package/dist/cjs/{z-app-header_13.cjs.entry.js → z-app-header_11.cjs.entry.js} +22 -571
- package/dist/cjs/z-breadcrumb.cjs.entry.js +237 -0
- package/dist/cjs/z-popover.cjs.entry.js +328 -0
- package/dist/cjs/z-section-title.cjs.entry.js +1 -1
- package/dist/collection/components/navigation/z-app-header/index.js +1 -1
- package/dist/collection/components/navigation/z-app-header/styles.css +5 -0
- package/dist/collection/components/z-breadcrumb/styles.css +4 -1
- package/dist/collection/components/z-section-title/styles.css +2 -1
- package/dist/esm/index-a2ca4b97.js +10 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-b7bdd1bf.js → utils-825aed23.js} +1 -1
- package/dist/esm/web-components-library.js +1 -1
- package/dist/esm/{z-app-header_13.entry.js → z-app-header_11.entry.js} +24 -571
- package/dist/esm/z-breadcrumb.entry.js +233 -0
- package/dist/esm/z-chip.entry.js +1 -1
- package/dist/esm/z-combobox.entry.js +1 -1
- package/dist/esm/z-file-upload.entry.js +1 -1
- package/dist/esm/z-myz-card-info.entry.js +1 -1
- package/dist/esm/z-myz-list-item.entry.js +1 -1
- package/dist/esm/z-pocket_3.entry.js +1 -1
- package/dist/esm/z-popover.entry.js +324 -0
- package/dist/esm/z-section-title.entry.js +1 -1
- package/dist/esm/z-select.entry.js +1 -1
- package/dist/esm/z-skip-to-content.entry.js +1 -1
- package/dist/esm/z-slideshow.entry.js +1 -1
- package/dist/esm/z-table-header.entry.js +1 -1
- package/dist/esm/z-toggle-switch.entry.js +1 -1
- package/dist/web-components-library/index.esm.js +1 -1
- package/dist/web-components-library/{p-ac5dda12.entry.js → p-073f24c9.entry.js} +1 -1
- package/dist/web-components-library/{p-d011d1b5.entry.js → p-0b942851.entry.js} +1 -1
- package/dist/web-components-library/{p-1e7ef8ca.entry.js → p-0eb7cb35.entry.js} +1 -1
- package/dist/web-components-library/p-0fd40ac5.entry.js +1 -0
- package/dist/web-components-library/{p-0397366d.js → p-14c2c56c.js} +1 -1
- package/{www/build/p-0235869e.entry.js → dist/web-components-library/p-2e7da553.entry.js} +1 -1
- package/dist/web-components-library/p-39863e41.entry.js +1 -0
- package/dist/web-components-library/p-447a7c51.entry.js +1 -0
- package/dist/web-components-library/{p-bda48953.entry.js → p-5825ef19.entry.js} +1 -1
- package/dist/web-components-library/p-98dcf178.entry.js +1 -0
- package/dist/web-components-library/p-98df8460.entry.js +1 -0
- package/dist/web-components-library/{p-a250409a.entry.js → p-9e400a11.entry.js} +1 -1
- package/dist/web-components-library/{p-485bff7b.entry.js → p-b44030d0.entry.js} +1 -1
- package/dist/web-components-library/p-bc331dde.entry.js +1 -0
- package/dist/web-components-library/{p-c8b36560.entry.js → p-dcad3493.entry.js} +1 -1
- package/dist/web-components-library/{p-c8bdfb84.entry.js → p-fa7a11fd.entry.js} +1 -1
- package/dist/web-components-library/web-components-library.esm.js +1 -1
- package/package.json +1 -1
- package/www/build/index.esm.js +1 -1
- package/www/build/{p-ac5dda12.entry.js → p-073f24c9.entry.js} +1 -1
- package/www/build/{p-d011d1b5.entry.js → p-0b942851.entry.js} +1 -1
- package/www/build/{p-1e7ef8ca.entry.js → p-0eb7cb35.entry.js} +1 -1
- package/www/build/p-0fd40ac5.entry.js +1 -0
- package/www/build/{p-0397366d.js → p-14c2c56c.js} +1 -1
- package/{dist/web-components-library/p-0235869e.entry.js → www/build/p-2e7da553.entry.js} +1 -1
- package/www/build/p-39863e41.entry.js +1 -0
- package/www/build/p-447a7c51.entry.js +1 -0
- package/www/build/{p-bda48953.entry.js → p-5825ef19.entry.js} +1 -1
- package/www/build/p-98dcf178.entry.js +1 -0
- package/www/build/p-98df8460.entry.js +1 -0
- package/www/build/{p-a250409a.entry.js → p-9e400a11.entry.js} +1 -1
- package/www/build/p-a6cbf32c.js +1 -0
- package/www/build/{p-485bff7b.entry.js → p-b44030d0.entry.js} +1 -1
- package/www/build/p-bc331dde.entry.js +1 -0
- package/www/build/{p-c8b36560.entry.js → p-dcad3493.entry.js} +1 -1
- package/www/build/{p-c8bdfb84.entry.js → p-fa7a11fd.entry.js} +1 -1
- package/www/build/web-components-library.esm.js +1 -1
- package/www/index.html +1 -127
- package/dist/web-components-library/p-14ab82cd.entry.js +0 -1
- package/dist/web-components-library/p-515c2acf.entry.js +0 -1
- package/dist/web-components-library/p-685ae50d.entry.js +0 -1
- package/dist/web-components-library/p-a4b91a8f.entry.js +0 -1
- package/www/build/p-14ab82cd.entry.js +0 -1
- package/www/build/p-515c2acf.entry.js +0 -1
- package/www/build/p-685ae50d.entry.js +0 -1
- package/www/build/p-a4b91a8f.entry.js +0 -1
- package/www/build/p-e35c7022.js +0 -1
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-e3299e0a.js');
|
|
6
|
+
const index$1 = require('./index-b7c319f2.js');
|
|
7
|
+
const utils = require('./utils-38f8555a.js');
|
|
8
|
+
require('./breakpoints-ebe1a437.js');
|
|
9
|
+
|
|
10
|
+
const stylesCss = ":host{font-family:var(--font-family-sans);font-weight:var(--font-rg);--line-clamp-popover:0;--line-clamp-mobile:1}button{padding:0;border:none;margin:0;background-color:transparent}nav{display:flex;height:30px;align-items:center;padding-left:calc(var(--space-unit) / 2);overflow-x:hidden}li{display:flex;align-items:baseline}:host a:focus,:host button:focus{box-shadow:var(--shadow-focus-primary);outline:0}:host a{color:var(--color-link-primary);font-size:var(--font-size-2);text-decoration:none;white-space:nowrap}:host a.homepage-icon{display:list-item}:host a.homepage-text{display:initial;margin-top:calc(var(--space-unit) / 4);margin-right:var(--space-unit)}:host a.missing-path{color:var(--color-text01)}:host a.text-ellipsis{display:-webkit-box !important;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:var(--line-clamp-mobile);text-overflow:ellipsis;white-space:normal}:host ol{display:flex;padding:0;margin:0;list-style-type:none}:host ol>li:not(:first-child,:last-child){margin-right:var(--space-unit)}nav.underlined>ol>li a:not(.missing-path),nav.underlined>ol>li button{text-decoration:underline}nav.semibold>ol>li a:not(.missing-path),nav.semibold>ol>li button{font-weight:var(--font-sb)}:host z-icon{margin-right:var(--space-unit);--z-icon-width:12px;--z-icon-height:12px}:host button.dots{display:inline-block;color:var(--color-link-primary);cursor:pointer}:host .popover-content{max-width:302px;padding:calc(var(--space-unit) / 2) var(--space-unit);text-align:left}:host .popover-content a{font-weight:var(--font-rg);text-decoration:none}:host .hidden-paths-popover{--z-popover-theme--surface:var(--color-surface02);--z-popover-padding:0}:host .full-path-tooltip{--z-popover-theme--surface:var(--color-surface05);--z-popover-theme--text:var(--color-text-inverse);--z-popover-padding:0}:host .tooltip-content{padding:0 var(--space-unit);font-size:var(--font-size-2)}@media (min-width: 768px){:host ol>li+li::before{display:inline-block;width:10px;height:10px;flex:1;margin-right:2px;color:var(--color-disabled03);content:\"\\203A\"}:host a.text-ellipsis{-webkit-line-clamp:var(--line-clamp-popover)}}";
|
|
11
|
+
|
|
12
|
+
const ZBreadcrumb = class {
|
|
13
|
+
constructor(hostRef) {
|
|
14
|
+
index.registerInstance(this, hostRef);
|
|
15
|
+
this.clickOnNode = index.createEvent(this, "clickOnNode", 7);
|
|
16
|
+
/** [optional] Sets the path style */
|
|
17
|
+
this.pathStyle = index$1.BreadcrumbPathStyle.UNDERLINED;
|
|
18
|
+
/** [optional] Variant of first node */
|
|
19
|
+
this.homepageVariant = index$1.BreadcrumbHomepageVariant.ICON;
|
|
20
|
+
/** [optional] Sets max number of element to show */
|
|
21
|
+
this.maxNodesToShow = 5;
|
|
22
|
+
/** [optional] Controls the behaviour on <a> tag click/enter */
|
|
23
|
+
this.preventFollowUrl = false;
|
|
24
|
+
/** [optional] Sets max number of row for each path inside the popover. Zero equals unlimited */
|
|
25
|
+
this.overflowMenuItemRows = 0;
|
|
26
|
+
/** [optional] Sets the maximun number of chars per single node */
|
|
27
|
+
this.truncateChar = 30;
|
|
28
|
+
/** Detect whether the length of the nodes shown exceeds the container length */
|
|
29
|
+
this.hasOverflow = false;
|
|
30
|
+
this.popoverEllipsisOpen = false;
|
|
31
|
+
this.collapsedElements = [];
|
|
32
|
+
this.currentIndex = 0;
|
|
33
|
+
this.truncatePosition = null;
|
|
34
|
+
}
|
|
35
|
+
handleResize() {
|
|
36
|
+
this.viewPortWidth = utils.getDevice();
|
|
37
|
+
if (this.viewPortWidth !== index$1.Device.MOBILE &&
|
|
38
|
+
this.wrapElement &&
|
|
39
|
+
this.wrapElement.scrollWidth > this.wrapElement.clientWidth) {
|
|
40
|
+
this.hasOverflow = true;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
// eslint-disable-next-line lines-between-class-members
|
|
44
|
+
handlePropChange() {
|
|
45
|
+
this.initializeBreadcrumb(this.viewPortWidth === index$1.Device.MOBILE);
|
|
46
|
+
}
|
|
47
|
+
handleResizeUp(newValue, oldValue) {
|
|
48
|
+
if (newValue === index$1.Device.MOBILE ||
|
|
49
|
+
(oldValue === index$1.Device.MOBILE && newValue === index$1.Device.TABLET) ||
|
|
50
|
+
(oldValue === index$1.Device.MOBILE && newValue === index$1.Device.DESKTOP) ||
|
|
51
|
+
(oldValue === index$1.Device.MOBILE && newValue === index$1.Device.DESKTOP_WIDE) ||
|
|
52
|
+
(oldValue === index$1.Device.TABLET && newValue === index$1.Device.DESKTOP) ||
|
|
53
|
+
(oldValue === index$1.Device.TABLET && newValue === index$1.Device.DESKTOP_WIDE) ||
|
|
54
|
+
(oldValue === index$1.Device.DESKTOP && newValue === index$1.Device.DESKTOP_WIDE)) {
|
|
55
|
+
this.initializeBreadcrumb(this.viewPortWidth === index$1.Device.MOBILE);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
componentWillLoad() {
|
|
59
|
+
this.viewPortWidth = utils.getDevice();
|
|
60
|
+
this.initializeBreadcrumb(this.viewPortWidth === index$1.Device.MOBILE);
|
|
61
|
+
}
|
|
62
|
+
componentWillRender() {
|
|
63
|
+
if (this.viewPortWidth !== index$1.Device.MOBILE && this.hasOverflow) {
|
|
64
|
+
this.checkEllipsisOrOverflowMenu();
|
|
65
|
+
this.hasOverflow = false;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
componentDidRender() {
|
|
69
|
+
if (this.collapsedElementsRef) {
|
|
70
|
+
this.anchorElements = Array.from(this.hostElement.shadowRoot.querySelectorAll("z-list-group a"));
|
|
71
|
+
}
|
|
72
|
+
if (this.viewPortWidth !== index$1.Device.MOBILE && this.wrapElement.scrollWidth > this.wrapElement.clientWidth) {
|
|
73
|
+
this.hasOverflow = true;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
initializeBreadcrumb(isMobile) {
|
|
77
|
+
if (isMobile) {
|
|
78
|
+
this.pathsList = this.getPathsItemsList().filter((item) => !!item.path);
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
this.pathsList = this.getPathsItemsList();
|
|
82
|
+
}
|
|
83
|
+
this.totalLenght = this.pathsList.length;
|
|
84
|
+
this.homepageNode = this.pathsList.shift();
|
|
85
|
+
this.pathListCopy = JSON.parse(JSON.stringify(this.pathsList));
|
|
86
|
+
this.collapsedElements = [];
|
|
87
|
+
if (this.totalLenght > this.maxNodesToShow) {
|
|
88
|
+
this.collapsedElements = this.pathsList.splice(0, this.pathsList.length - 2);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
checkEllipsisOrOverflowMenu() {
|
|
92
|
+
if (this.pathListCopy.length > 0) {
|
|
93
|
+
for (let i = 0; i < this.pathsList.length; i++) {
|
|
94
|
+
if (this.pathsList[i].text.length > this.truncateChar) {
|
|
95
|
+
if (this.truncatePosition !== null) {
|
|
96
|
+
if (this.truncatePosition > 0) {
|
|
97
|
+
const arrayToPush = this.pathListCopy.splice(0, this.truncatePosition);
|
|
98
|
+
arrayToPush.forEach((item) => {
|
|
99
|
+
this.collapsedElements.push(item);
|
|
100
|
+
});
|
|
101
|
+
this.pathsList.splice(0, this.truncatePosition);
|
|
102
|
+
this.truncatePosition = 0;
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
if (this.truncatePosition === 0) {
|
|
106
|
+
const arrayToPush = this.pathListCopy.splice(0, this.truncatePosition + 1);
|
|
107
|
+
this.collapsedElements.push(...arrayToPush);
|
|
108
|
+
this.pathsList.splice(0, this.truncatePosition + 1);
|
|
109
|
+
this.truncatePosition = null;
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
if (i !== this.pathsList.length - 1) {
|
|
114
|
+
const truncatedString = this.truncateWithEllipsis(this.pathsList[i].text, this.truncateChar);
|
|
115
|
+
this.currentEllipsisText = this.pathsList[i].text;
|
|
116
|
+
this.pathsList[i].text = truncatedString;
|
|
117
|
+
this.pathsList[i].hasTooltip = true;
|
|
118
|
+
this.truncatePosition = i;
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
truncateWithEllipsis(str, length) {
|
|
126
|
+
const ending = "…";
|
|
127
|
+
if (str.length > length) {
|
|
128
|
+
return str.substring(0, length - 1) + ending;
|
|
129
|
+
}
|
|
130
|
+
return str;
|
|
131
|
+
}
|
|
132
|
+
getPathsItemsList() {
|
|
133
|
+
if (!this.paths) {
|
|
134
|
+
return Array.from(this.hostElement.children).map((item) => {
|
|
135
|
+
return {
|
|
136
|
+
text: item.textContent,
|
|
137
|
+
path: item.href,
|
|
138
|
+
hasTooltip: false,
|
|
139
|
+
};
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
const ret = typeof this.paths === "string" ? JSON.parse(this.paths) : this.paths;
|
|
143
|
+
return ret.map((item) => {
|
|
144
|
+
return Object.assign(Object.assign({}, item), { hasTooltip: false });
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
renderMobileBreadcrumb() {
|
|
148
|
+
const lastPath = this.pathsList[this.pathsList.length - 1];
|
|
149
|
+
return (index.h("nav", { "aria-label": "Breadcrumb", class: {
|
|
150
|
+
underlined: this.pathStyle === index$1.BreadcrumbPathStyle.UNDERLINED,
|
|
151
|
+
semibold: this.pathStyle === index$1.BreadcrumbPathStyle.SEMIBOLD,
|
|
152
|
+
} }, index.h("ol", null, this.renderNode(lastPath, true))));
|
|
153
|
+
}
|
|
154
|
+
renderHomepageNode(item) {
|
|
155
|
+
return (index.h("li", null, index.h("a", { class: {
|
|
156
|
+
"homepage-icon": this.homepageVariant === index$1.BreadcrumbHomepageVariant.ICON,
|
|
157
|
+
"homepage-text": this.homepageVariant === index$1.BreadcrumbHomepageVariant.TEXT,
|
|
158
|
+
}, href: item.path, onClick: (e) => this.handlePreventFollowUrl(e, item) }, this.homepageVariant === index$1.BreadcrumbHomepageVariant.ICON ? (index.h("z-icon", { name: "home", fill: "color-link-primary", height: 16, width: 16 })) : ("Home"))));
|
|
159
|
+
}
|
|
160
|
+
renderNode(item, mobile) {
|
|
161
|
+
return (index.h("li", null, item.hasTooltip && (index.h("z-popover", { class: "full-path-tooltip", "bind-to": this.triggerEllipsis, open: this.popoverEllipsisOpen, position: index$1.PopoverPosition.BOTTOM, closable: false, showArrow: true }, index.h("span", { class: "tooltip-content" }, this.currentEllipsisText))), index.h("a", { class: {
|
|
162
|
+
"missing-path": !item.path,
|
|
163
|
+
"text-ellipsis": mobile,
|
|
164
|
+
}, ref: (val) => (this.triggerEllipsis = val), "aria-current": item.path ? undefined : "page", href: item.path, onClick: (e) => this.handlePreventFollowUrl(e, item), onMouseOver: () => {
|
|
165
|
+
if (item.hasTooltip) {
|
|
166
|
+
this.popoverEllipsisOpen = true;
|
|
167
|
+
}
|
|
168
|
+
}, onMouseLeave: () => {
|
|
169
|
+
if (item.hasTooltip) {
|
|
170
|
+
this.popoverEllipsisOpen = false;
|
|
171
|
+
}
|
|
172
|
+
}, innerHTML: mobile ? `<z-icon fill="color-link-primary" name="chevron-left"></z-icon> ${item.text}` : item.text })));
|
|
173
|
+
}
|
|
174
|
+
renderBreadcrumb() {
|
|
175
|
+
return (index.h("nav", { ref: (val) => (this.wrapElement = val), "aria-label": "Breadcrumb", class: {
|
|
176
|
+
underlined: this.pathStyle === index$1.BreadcrumbPathStyle.UNDERLINED,
|
|
177
|
+
semibold: this.pathStyle === index$1.BreadcrumbPathStyle.SEMIBOLD,
|
|
178
|
+
} }, index.h("ol", null, this.renderHomepageNode(this.homepageNode), this.collapsedElements.length ? this.renderOverflowMenu() : "", this.pathsList.map((item) => this.renderNode(item, false)))));
|
|
179
|
+
}
|
|
180
|
+
togglePopover() {
|
|
181
|
+
if (!this.collapsedElementsRef.open) {
|
|
182
|
+
this.collapsedElementsRef.open = true;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
handlePreventFollowUrl(e, item) {
|
|
186
|
+
if (this.preventFollowUrl) {
|
|
187
|
+
e.preventDefault();
|
|
188
|
+
this.clickOnNode.emit(item.path);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
handleOverflowMenuAccessibility(e) {
|
|
192
|
+
const anchorElementsLenght = this.anchorElements.length;
|
|
193
|
+
if (e.key === index$1.KeyboardCode.TAB) {
|
|
194
|
+
e.preventDefault();
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
e.stopPropagation();
|
|
198
|
+
const arrows = [index$1.KeyboardCode.ARROW_DOWN, index$1.KeyboardCode.ARROW_UP];
|
|
199
|
+
if (arrows.includes(e.key)) {
|
|
200
|
+
e.preventDefault();
|
|
201
|
+
if (e.key === index$1.KeyboardCode.ARROW_DOWN) {
|
|
202
|
+
this.currentIndex = anchorElementsLenght === this.currentIndex + 1 ? 0 : this.currentIndex + 1;
|
|
203
|
+
}
|
|
204
|
+
if (e.key === index$1.KeyboardCode.ARROW_UP) {
|
|
205
|
+
this.currentIndex = this.currentIndex <= 0 ? anchorElementsLenght - 1 : this.currentIndex - 1;
|
|
206
|
+
}
|
|
207
|
+
this.anchorElements[this.currentIndex].focus();
|
|
208
|
+
}
|
|
209
|
+
if (e.key === index$1.KeyboardCode.ESC) {
|
|
210
|
+
this.triggerButton.focus();
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
renderOverflowMenu() {
|
|
214
|
+
if (this.collapsedElements.length) {
|
|
215
|
+
return (index.h("li", null, index.h("z-popover", { class: "hidden-paths-popover", ref: (val) => (this.collapsedElementsRef = val), "bind-to": this.triggerButton, position: index$1.PopoverPosition.BOTTOM_RIGHT, closable: true, showArrow: true }, index.h("div", { class: "popover-content" }, index.h("z-list", null, index.h("z-list-group", { dividerType: index$1.ListDividerType.ELEMENT, size: index$1.ListSize.SMALL }, this.collapsedElements.map((item) => (index.h("z-list-element", { clickable: true }, index.h("a", { class: "text-ellipsis", href: item.path, onClick: (e) => this.handlePreventFollowUrl(e, item), onKeyDown: (e) => this.handleOverflowMenuAccessibility(e) }, item.text)))))))), index.h("button", { "aria-label": "Mostra pi\u00F9 breadcrumb", "aria-haspopup": "true", ref: (el) => (this.triggerButton = el), class: "dots", onClick: () => {
|
|
216
|
+
this.togglePopover();
|
|
217
|
+
}, onKeyDown: (e) => {
|
|
218
|
+
utils.handleKeyboardSubmit(e, this.togglePopover.bind(this));
|
|
219
|
+
setTimeout(() => {
|
|
220
|
+
this.anchorElements[0].focus();
|
|
221
|
+
}, 100);
|
|
222
|
+
} }, "...")));
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
render() {
|
|
226
|
+
return (index.h(index.Host, { style: { "--line-clamp": `${this.overflowMenuItemRows}` } }, this.viewPortWidth === index$1.Device.MOBILE ? this.renderMobileBreadcrumb() : this.renderBreadcrumb()));
|
|
227
|
+
}
|
|
228
|
+
get hostElement() { return index.getElement(this); }
|
|
229
|
+
static get watchers() { return {
|
|
230
|
+
"paths": ["handlePropChange"],
|
|
231
|
+
"maxNodesToShow": ["handlePropChange"],
|
|
232
|
+
"viewPortWidth": ["handleResizeUp"]
|
|
233
|
+
}; }
|
|
234
|
+
};
|
|
235
|
+
ZBreadcrumb.style = stylesCss;
|
|
236
|
+
|
|
237
|
+
exports.z_breadcrumb = ZBreadcrumb;
|
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-e3299e0a.js');
|
|
6
|
+
const index$1 = require('./index-b7c319f2.js');
|
|
7
|
+
|
|
8
|
+
const stylesCss = ":host{--z-popover-theme--surface:var(--color-surface01);--z-popover-theme--text:var(--color-text01);--z-popover-padding:0;--z-popover-shadow-filter:drop-shadow(0 1px 2px var(--shadow-color-base));position:relative;display:none;min-width:calc(var(--space-unit) * 8);min-height:calc(var(--space-unit) * 4);align-items:center;justify-content:center;padding:var(--z-popover-padding);background:var(--z-popover-theme--surface);border-radius:var(--border-radius-small);color:var(--z-popover-theme--text);fill:currentcolor;filter:var(--z-popover-shadow-filter);font-family:var(--font-family-sans);text-align:center}:host([open][current-position]),:host([open=\"true\"][current-position]){display:flex}:host([center][current-position=\"top\"]),:host([center][current-position=\"bottom\"]){transform:translateX(-50%)}:host([center][current-position=\"right\"]),:host([center][current-position=\"left\"]){transform:translateY(-50%)}:host([current-position^=\"top\"]){margin:0 0 var(--space-unit)}:host([current-position^=\"bottom\"]){margin:var(--space-unit) 0 0}:host([current-position^=\"left\"]){margin:0 var(--space-unit) 0 0}:host([current-position^=\"right\"]){margin:0 0 0 var(--space-unit)}:host([current-position])::before{--arrow-size:6px;--arrow-edge-offset:calc(100% - var(--space-unit) - (var(--arrow-size) / 2));--arrow-center-x-offset:calc(50% - (var(--arrow-size) / 2));--arrow-center-y-offset:calc(100% - (var(--arrow-size) / 2));position:absolute;display:block;width:var(--arrow-size);height:var(--arrow-size);background:var(--z-popover-theme--surface);content:\"\";transform:rotate(45deg)}:host([show-arrow=\"false\"])::before,:host(:not([show-arrow]))::before{display:none}:host([current-position^=\"top\"])::before{top:var(--arrow-center-y-offset)}:host([current-position^=\"bottom\"])::before{bottom:var(--arrow-center-y-offset)}:host([current-position=\"top\"])::before,:host([current-position=\"bottom\"])::before{right:var(--arrow-edge-offset)}:host([current-position=\"right\"])::before,:host([current-position=\"left\"])::before{bottom:var(--arrow-edge-offset)}:host([current-position=\"right\"])::before{right:var(--arrow-center-y-offset)}:host([current-position=\"left\"])::before{left:var(--arrow-center-y-offset)}:host([current-position=\"top_right\"])::before,:host([current-position=\"bottom_right\"])::before{right:var(--arrow-edge-offset)}:host([current-position=\"top_left\"])::before,:host([current-position=\"bottom_left\"])::before{left:var(--arrow-edge-offset)}:host([current-position=\"right_top\"])::before,:host([current-position=\"left_top\"])::before{top:var(--arrow-edge-offset)}:host([current-position=\"right_top\"])::before,:host([current-position=\"right_bottom\"])::before{right:var(--arrow-center-y-offset)}:host([current-position=\"left_top\"])::before,:host([current-position=\"left_bottom\"])::before{left:var(--arrow-center-y-offset)}:host([current-position=\"right_bottom\"])::before,:host([current-position=\"left_bottom\"])::before{bottom:var(--arrow-edge-offset)}:host([center][current-position=\"top\"])::before,:host([center][current-position=\"bottom\"])::before{right:auto;left:var(--arrow-center-x-offset)}:host([center][current-position=\"right\"])::before,:host([center][current-position=\"left\"])::before{top:var(--arrow-center-x-offset);bottom:auto}::slotted(*){overflow:auto;flex:1 auto}";
|
|
9
|
+
|
|
10
|
+
const DOCUMENT_ELEMENT = document.documentElement;
|
|
11
|
+
function getParentElement(element) {
|
|
12
|
+
if (element.parentNode.host) {
|
|
13
|
+
return element.parentNode.host;
|
|
14
|
+
}
|
|
15
|
+
return element.parentNode;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Find the closest scrollable parent of a node.
|
|
19
|
+
*
|
|
20
|
+
* @param {Element} element The node
|
|
21
|
+
*/
|
|
22
|
+
function findScrollableParent(element) {
|
|
23
|
+
let parent = getParentElement(element);
|
|
24
|
+
while (parent && parent !== DOCUMENT_ELEMENT) {
|
|
25
|
+
const { overflow, overflowX, overflowY } = window.getComputedStyle(parent);
|
|
26
|
+
if (overflow === "hidden" || overflowY === "hidden" || overflowX === "hidden") {
|
|
27
|
+
return parent;
|
|
28
|
+
}
|
|
29
|
+
if ((parent.scrollHeight > parent.clientHeight && overflow !== "visible" && overflowY !== "visible") ||
|
|
30
|
+
(parent.scrollWidth > parent.clientWidth && overflow !== "visible" && overflowX !== "visible")) {
|
|
31
|
+
return parent;
|
|
32
|
+
}
|
|
33
|
+
parent = getParentElement(parent);
|
|
34
|
+
}
|
|
35
|
+
return DOCUMENT_ELEMENT;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Calculate computed offset.
|
|
39
|
+
* It includes matrix transformations.
|
|
40
|
+
* @param element The target element.
|
|
41
|
+
* @param targetParentOffset The relative offset parent.
|
|
42
|
+
* @return A client rect object.
|
|
43
|
+
*/
|
|
44
|
+
function computeOffset(element, targetParentOffset) {
|
|
45
|
+
const rect = element.getBoundingClientRect();
|
|
46
|
+
const width = rect.width;
|
|
47
|
+
const height = rect.height;
|
|
48
|
+
let top = 0;
|
|
49
|
+
let left = 0;
|
|
50
|
+
let offsetParent = element;
|
|
51
|
+
while (offsetParent && offsetParent != targetParentOffset) {
|
|
52
|
+
left += offsetParent.offsetLeft;
|
|
53
|
+
// document.body sometimes has offsetTop == 0 but still has an
|
|
54
|
+
// offset because of children margins!
|
|
55
|
+
if (offsetParent === document.body) {
|
|
56
|
+
top += offsetParent.getBoundingClientRect().top + window.scrollY;
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
top += offsetParent.offsetTop;
|
|
60
|
+
}
|
|
61
|
+
if (window.DOMMatrix) {
|
|
62
|
+
const style = window.getComputedStyle(offsetParent);
|
|
63
|
+
const transform = style.transform || style.webkitTransform;
|
|
64
|
+
const domMatrix = new DOMMatrix(transform);
|
|
65
|
+
if (domMatrix) {
|
|
66
|
+
left += domMatrix.m41;
|
|
67
|
+
if (offsetParent !== document.body) {
|
|
68
|
+
top += domMatrix.m42;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
if (!offsetParent.offsetParent) {
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
offsetParent = offsetParent.offsetParent;
|
|
76
|
+
}
|
|
77
|
+
let parentWidth;
|
|
78
|
+
let parentHeight;
|
|
79
|
+
if (offsetParent === document.body) {
|
|
80
|
+
parentWidth = window.innerWidth;
|
|
81
|
+
parentHeight = window.innerHeight;
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
parentWidth = offsetParent.offsetWidth;
|
|
85
|
+
parentHeight = offsetParent.offsetHeight;
|
|
86
|
+
}
|
|
87
|
+
const right = parentWidth - left - rect.width;
|
|
88
|
+
const bottom = parentHeight - top - rect.height;
|
|
89
|
+
return { top, right, bottom, left, width, height };
|
|
90
|
+
}
|
|
91
|
+
const ZPopover = class {
|
|
92
|
+
constructor(hostRef) {
|
|
93
|
+
index.registerInstance(this, hostRef);
|
|
94
|
+
this.positionChange = index.createEvent(this, "positionChange", 7);
|
|
95
|
+
this.openChange = index.createEvent(this, "openChange", 7);
|
|
96
|
+
/** Popover position. */
|
|
97
|
+
this.position = index$1.PopoverPosition.AUTO;
|
|
98
|
+
/**
|
|
99
|
+
* The open state of the popover.
|
|
100
|
+
*/
|
|
101
|
+
this.open = false;
|
|
102
|
+
/**
|
|
103
|
+
* Whether to show popover's arrow.
|
|
104
|
+
*/
|
|
105
|
+
this.showArrow = false;
|
|
106
|
+
/**
|
|
107
|
+
* Whether to center the popup on the main side (according to "position").
|
|
108
|
+
*/
|
|
109
|
+
this.center = false;
|
|
110
|
+
/**
|
|
111
|
+
* If true, the popover can be closed by clicking outside of it or pressing the escape key.
|
|
112
|
+
* Otherwise, it will be closed only programmatically (by setting `open` to `false`).
|
|
113
|
+
*/
|
|
114
|
+
this.closable = true;
|
|
115
|
+
}
|
|
116
|
+
closePopoverWithKeyboard(e) {
|
|
117
|
+
if (this.closable && e.key === index$1.KeyboardCode.ESC) {
|
|
118
|
+
this.open = false;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Close the popover when clicking outside of its content.
|
|
123
|
+
* Stop event propagation if the click was fired by popover's trigger element,
|
|
124
|
+
* to prevent close and reopen glitches.
|
|
125
|
+
* @param {MouseEvent} e
|
|
126
|
+
*/
|
|
127
|
+
handleOutsideClick(e) {
|
|
128
|
+
if (!this.closable || !this.open) {
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
if (!e.composedPath().includes(this.host)) {
|
|
132
|
+
const target = e.target;
|
|
133
|
+
const triggerElemClicked = this.bindTo instanceof HTMLElement ? this.bindTo.contains(target) : target.closest(this.bindTo);
|
|
134
|
+
if (triggerElemClicked) {
|
|
135
|
+
e.stopPropagation();
|
|
136
|
+
}
|
|
137
|
+
this.open = false;
|
|
138
|
+
this.positionChange.emit({ position: this.currentPosition });
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
validatePosition(newValue) {
|
|
142
|
+
if (newValue && !Object.values(index$1.PopoverPosition).includes(newValue)) {
|
|
143
|
+
this.position = index$1.PopoverPosition.AUTO;
|
|
144
|
+
}
|
|
145
|
+
this.currentPosition = this.position;
|
|
146
|
+
this.positionChange.emit({ position: this.currentPosition });
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Setup popover behaviors on opening.
|
|
150
|
+
*/
|
|
151
|
+
onOpen() {
|
|
152
|
+
cancelAnimationFrame(this.animationFrameRequestId);
|
|
153
|
+
if (this.open) {
|
|
154
|
+
const setPosition = () => {
|
|
155
|
+
if (this.open) {
|
|
156
|
+
this.setPosition();
|
|
157
|
+
this.animationFrameRequestId = requestAnimationFrame(setPosition);
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
setPosition();
|
|
161
|
+
}
|
|
162
|
+
else if (this.host.hasAttribute("current-position")) {
|
|
163
|
+
this.host.removeAttribute("current-position");
|
|
164
|
+
this.currentPosition = undefined;
|
|
165
|
+
}
|
|
166
|
+
this.openChange.emit({ open: this.open });
|
|
167
|
+
}
|
|
168
|
+
disconnectedCallback() {
|
|
169
|
+
cancelAnimationFrame(this.animationFrameRequestId);
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Set the position of the popover.
|
|
173
|
+
*/
|
|
174
|
+
setPosition() {
|
|
175
|
+
let element;
|
|
176
|
+
if (typeof this.bindTo === "string") {
|
|
177
|
+
element = this.host.ownerDocument.querySelector(this.bindTo);
|
|
178
|
+
}
|
|
179
|
+
else if (this.bindTo) {
|
|
180
|
+
element = this.bindTo;
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
element = this.host.parentElement;
|
|
184
|
+
}
|
|
185
|
+
if (!element) {
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
const scrollContainer = findScrollableParent(element);
|
|
189
|
+
const scrollingBoundingRect = scrollContainer.getBoundingClientRect();
|
|
190
|
+
const offsetContainer = this.host.offsetParent;
|
|
191
|
+
const relativeBoundingRect = offsetContainer
|
|
192
|
+
? computeOffset(offsetContainer, scrollContainer)
|
|
193
|
+
: { top: 0, right: 0, bottom: 0, left: 0 };
|
|
194
|
+
const boundingRect = computeOffset(element, scrollContainer);
|
|
195
|
+
const top = boundingRect.top - scrollContainer.scrollTop;
|
|
196
|
+
const bottom = scrollingBoundingRect.height - (boundingRect.top + boundingRect.height) + scrollContainer.scrollTop;
|
|
197
|
+
const left = boundingRect.left - scrollContainer.scrollLeft;
|
|
198
|
+
const right = scrollingBoundingRect.width - (boundingRect.left + boundingRect.width) + scrollContainer.scrollLeft;
|
|
199
|
+
const overflowBottom = Math.max(0, scrollingBoundingRect.top + scrollingBoundingRect.height - window.innerHeight);
|
|
200
|
+
const overflowRight = Math.max(0, scrollingBoundingRect.left + scrollingBoundingRect.width - window.innerWidth);
|
|
201
|
+
const availableTop = Math.min(top, top + scrollingBoundingRect.top);
|
|
202
|
+
const availableBottom = Math.min(bottom, bottom - overflowBottom);
|
|
203
|
+
const availableLeft = Math.min(left, left + scrollingBoundingRect.left);
|
|
204
|
+
const availableRight = Math.min(right, right - overflowRight);
|
|
205
|
+
const availableHeight = availableTop + availableBottom + boundingRect.height;
|
|
206
|
+
const availableWidth = availableLeft + availableRight + boundingRect.width;
|
|
207
|
+
let position = this.currentPosition;
|
|
208
|
+
const positions = [];
|
|
209
|
+
if (this.position === index$1.PopoverPosition.AUTO) {
|
|
210
|
+
/**
|
|
211
|
+
* The `AUTO` position tries to place the popover in the 'safest' area,
|
|
212
|
+
* where there's more space available.
|
|
213
|
+
*/
|
|
214
|
+
if (availableLeft / availableWidth > 0.6) {
|
|
215
|
+
positions.push(index$1.PopoverPosition.LEFT);
|
|
216
|
+
}
|
|
217
|
+
else if (availableLeft / availableWidth < 0.4) {
|
|
218
|
+
positions.push(index$1.PopoverPosition.RIGHT);
|
|
219
|
+
}
|
|
220
|
+
if (availableTop / availableHeight > 0.9) {
|
|
221
|
+
positions.unshift(index$1.PopoverPosition.TOP);
|
|
222
|
+
}
|
|
223
|
+
else if (availableTop / availableHeight > 0.6) {
|
|
224
|
+
positions.push(index$1.PopoverPosition.TOP);
|
|
225
|
+
}
|
|
226
|
+
else if (availableTop / availableHeight < 0.1) {
|
|
227
|
+
positions.unshift(index$1.PopoverPosition.BOTTOM);
|
|
228
|
+
}
|
|
229
|
+
else {
|
|
230
|
+
positions.push(index$1.PopoverPosition.BOTTOM);
|
|
231
|
+
}
|
|
232
|
+
position = positions.join("_");
|
|
233
|
+
}
|
|
234
|
+
const style = this.host.style;
|
|
235
|
+
style.position = "absolute";
|
|
236
|
+
const offsetTop = boundingRect.top - relativeBoundingRect.top;
|
|
237
|
+
const offsetRight = boundingRect.right - relativeBoundingRect.right;
|
|
238
|
+
const offsetBottom = boundingRect.bottom - relativeBoundingRect.bottom;
|
|
239
|
+
const offsetLeft = boundingRect.left - relativeBoundingRect.left;
|
|
240
|
+
const offsetModifier = this.center ? 0.5 : 0;
|
|
241
|
+
const sizeModifier = this.center ? 0.5 : 0;
|
|
242
|
+
if (position === index$1.PopoverPosition.TOP || position === index$1.PopoverPosition.TOP_RIGHT) {
|
|
243
|
+
style.top = "auto";
|
|
244
|
+
style.right = "auto";
|
|
245
|
+
style.bottom = `${offsetBottom + boundingRect.height}px`;
|
|
246
|
+
style.left = `${offsetLeft + boundingRect.width * offsetModifier}px`;
|
|
247
|
+
style.maxHeight = `${availableTop}px`;
|
|
248
|
+
if (position === index$1.PopoverPosition.TOP_RIGHT) {
|
|
249
|
+
style.maxWidth = `${availableRight + boundingRect.width * sizeModifier}px`;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
else if (position === index$1.PopoverPosition.TOP_LEFT) {
|
|
253
|
+
style.top = "auto";
|
|
254
|
+
style.right = `${offsetRight + boundingRect.width * offsetModifier}px`;
|
|
255
|
+
style.bottom = `${offsetBottom + boundingRect.height}px`;
|
|
256
|
+
style.left = "auto";
|
|
257
|
+
style.maxWidth = `${availableLeft}px`;
|
|
258
|
+
style.maxHeight = `${availableTop}px`;
|
|
259
|
+
}
|
|
260
|
+
else if (position === index$1.PopoverPosition.BOTTOM || position === index$1.PopoverPosition.BOTTOM_RIGHT) {
|
|
261
|
+
style.top = `${offsetTop + boundingRect.height}px`;
|
|
262
|
+
style.right = "auto";
|
|
263
|
+
style.bottom = "auto";
|
|
264
|
+
style.left = `${offsetLeft + boundingRect.width * offsetModifier}px`;
|
|
265
|
+
style.maxHeight = `${availableBottom}px`;
|
|
266
|
+
if (position === index$1.PopoverPosition.BOTTOM_RIGHT) {
|
|
267
|
+
style.maxWidth = `${availableRight + boundingRect.width * sizeModifier}px`;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
else if (position === index$1.PopoverPosition.BOTTOM_LEFT) {
|
|
271
|
+
style.top = `${offsetTop + boundingRect.height}px`;
|
|
272
|
+
style.right = `${offsetRight + boundingRect.width * offsetModifier}px`;
|
|
273
|
+
style.bottom = "auto";
|
|
274
|
+
style.left = "auto";
|
|
275
|
+
style.maxWidth = `${availableLeft}px`;
|
|
276
|
+
style.maxHeight = `${availableBottom}px`;
|
|
277
|
+
}
|
|
278
|
+
else if (position === index$1.PopoverPosition.RIGHT || position === index$1.PopoverPosition.RIGHT_BOTTOM) {
|
|
279
|
+
style.top = `${offsetTop + boundingRect.height * offsetModifier}px`;
|
|
280
|
+
style.right = "auto";
|
|
281
|
+
style.bottom = "auto";
|
|
282
|
+
style.left = `${offsetLeft + boundingRect.width}px`;
|
|
283
|
+
style.maxWidth = `${availableRight}px`;
|
|
284
|
+
style.maxHeight = `${availableBottom + boundingRect.height * sizeModifier}px`;
|
|
285
|
+
}
|
|
286
|
+
else if (position === index$1.PopoverPosition.RIGHT_TOP) {
|
|
287
|
+
style.top = "auto";
|
|
288
|
+
style.right = "auto";
|
|
289
|
+
style.bottom = `${offsetBottom + boundingRect.height * offsetModifier}px`;
|
|
290
|
+
style.left = `${offsetLeft + boundingRect.width}px`;
|
|
291
|
+
style.maxWidth = `${availableRight}px`;
|
|
292
|
+
style.maxHeight = `${availableTop + boundingRect.height * sizeModifier}px`;
|
|
293
|
+
}
|
|
294
|
+
else if (position === index$1.PopoverPosition.LEFT || position === index$1.PopoverPosition.LEFT_BOTTOM) {
|
|
295
|
+
style.top = `${offsetTop + boundingRect.height * offsetModifier}px`;
|
|
296
|
+
style.right = `${offsetRight + boundingRect.width}px`;
|
|
297
|
+
style.bottom = "auto";
|
|
298
|
+
style.left = "auto";
|
|
299
|
+
style.maxWidth = `${availableLeft}px`;
|
|
300
|
+
style.maxHeight = `${availableBottom + boundingRect.height * sizeModifier}px`;
|
|
301
|
+
}
|
|
302
|
+
else if (position === index$1.PopoverPosition.LEFT_TOP) {
|
|
303
|
+
style.top = "auto";
|
|
304
|
+
style.right = `${offsetRight + boundingRect.width}px`;
|
|
305
|
+
style.bottom = `${offsetBottom + boundingRect.height * offsetModifier}px`;
|
|
306
|
+
style.left = "auto";
|
|
307
|
+
style.maxWidth = `${availableLeft}px`;
|
|
308
|
+
style.maxHeight = `${availableTop + boundingRect.height * sizeModifier}px`;
|
|
309
|
+
}
|
|
310
|
+
this.currentPosition = position || this.position;
|
|
311
|
+
this.host.setAttribute("current-position", this.currentPosition);
|
|
312
|
+
}
|
|
313
|
+
componentWillLoad() {
|
|
314
|
+
this.validatePosition(this.position);
|
|
315
|
+
this.onOpen();
|
|
316
|
+
}
|
|
317
|
+
render() {
|
|
318
|
+
return index.h("slot", null);
|
|
319
|
+
}
|
|
320
|
+
get host() { return index.getElement(this); }
|
|
321
|
+
static get watchers() { return {
|
|
322
|
+
"position": ["validatePosition"],
|
|
323
|
+
"open": ["onOpen"]
|
|
324
|
+
}; }
|
|
325
|
+
};
|
|
326
|
+
ZPopover.style = stylesCss;
|
|
327
|
+
|
|
328
|
+
exports.z_popover = ZPopover;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-e3299e0a.js');
|
|
6
6
|
const index$1 = require('./index-b7c319f2.js');
|
|
7
7
|
|
|
8
|
-
const stylesCss = ":host{--z-section-title--divider-color:var(--red500);display:flex;width:fit-content;flex-direction:column;align-items:flex-start;font-family:var(--font-family-sans)
|
|
8
|
+
const stylesCss = ":host{--z-section-title--divider-color:var(--red500);display:flex;width:fit-content;flex-direction:column;align-items:flex-start;font-family:var(--font-family-sans)}:host,:host ::slotted(*){box-sizing:border-box}::slotted(*){margin:0}::slotted([slot=\"secondary-title\"]){padding-bottom:calc(var(--space-unit) / 2);border-bottom:var(--border-size-large) solid var(--z-section-title--divider-color);font-size:var(--font-size-3);font-weight:var(--font-sb);line-height:1.5rem;text-transform:uppercase}::slotted([slot=\"primary-title\"]){font-size:var(--font-size-6);font-weight:var(--font-sb);line-height:2rem}:host([uppercase]:not([uppercase=\"false\"])) ::slotted([slot=\"primary-title\"]){text-transform:uppercase}@media (min-width: 1152px){::slotted([slot=\"primary-title\"]){font-size:var(--font-size-7);line-height:2.25rem}}";
|
|
9
9
|
|
|
10
10
|
const ZSectionTitle = class {
|
|
11
11
|
constructor(hostRef) {
|
|
@@ -153,7 +153,7 @@ export class ZAppHeader {
|
|
|
153
153
|
return parent;
|
|
154
154
|
}
|
|
155
155
|
get canShowMenu() {
|
|
156
|
-
return this.
|
|
156
|
+
return this.flow !== "offcanvas" && this.currentViewport !== "mobile" && !this.drawerOpen;
|
|
157
157
|
}
|
|
158
158
|
get canShowSearchbar() {
|
|
159
159
|
if (!this.enableSearch) {
|
|
@@ -46,6 +46,8 @@ li {
|
|
|
46
46
|
|
|
47
47
|
:host a.homepage-text {
|
|
48
48
|
display: initial;
|
|
49
|
+
margin-top: calc(var(--space-unit) / 4);
|
|
50
|
+
margin-right: var(--space-unit);
|
|
49
51
|
}
|
|
50
52
|
|
|
51
53
|
:host a.missing-path {
|
|
@@ -68,7 +70,7 @@ li {
|
|
|
68
70
|
list-style-type: none;
|
|
69
71
|
}
|
|
70
72
|
|
|
71
|
-
:host ol > li:not(:last-child) {
|
|
73
|
+
:host ol > li:not(:first-child, :last-child) {
|
|
72
74
|
margin-right: var(--space-unit);
|
|
73
75
|
}
|
|
74
76
|
|
|
@@ -129,6 +131,7 @@ nav.semibold > ol > li button {
|
|
|
129
131
|
width: 10px;
|
|
130
132
|
height: 10px;
|
|
131
133
|
flex: 1;
|
|
134
|
+
margin-right: 2px;
|
|
132
135
|
color: var(--color-disabled03);
|
|
133
136
|
content: "\203A";
|
|
134
137
|
}
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
align-items: flex-start;
|
|
8
8
|
font-family: var(--font-family-sans);
|
|
9
|
-
font-weight: var(--font-rg);
|
|
10
9
|
}
|
|
11
10
|
|
|
12
11
|
:host,
|
|
@@ -22,12 +21,14 @@
|
|
|
22
21
|
padding-bottom: calc(var(--space-unit) / 2);
|
|
23
22
|
border-bottom: var(--border-size-large) solid var(--z-section-title--divider-color);
|
|
24
23
|
font-size: var(--font-size-3);
|
|
24
|
+
font-weight: var(--font-sb);
|
|
25
25
|
line-height: 1.5rem;
|
|
26
26
|
text-transform: uppercase;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
::slotted([slot="primary-title"]) {
|
|
30
30
|
font-size: var(--font-size-6);
|
|
31
|
+
font-weight: var(--font-sb);
|
|
31
32
|
line-height: 2rem;
|
|
32
33
|
}
|
|
33
34
|
|