@zanichelli/albe-web-components 7.3.7 → 7.4.1
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/{breakpoints-88c4fd6c.js → breakpoints-ebe1a437.js} +3 -1
- package/dist/cjs/{index-2dfdb7e2.js → index-b7c319f2.js} +11 -0
- package/dist/cjs/index-e3299e0a.js +4 -0
- package/dist/cjs/index.cjs.js +15 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-b447f1da.js → utils-38f8555a.js} +5 -3
- package/dist/cjs/{utils-f21f9a4f.js → utils-938e5834.js} +1 -1
- package/dist/cjs/web-components-library.cjs.js +1 -1
- package/dist/cjs/z-anchor-navigation.cjs.entry.js +1 -1
- package/dist/cjs/z-app-header_11.cjs.entry.js +5 -5
- package/dist/cjs/z-aria-alert.cjs.entry.js +1 -1
- package/dist/cjs/z-avatar.cjs.entry.js +1 -1
- package/dist/cjs/z-breadcrumb.cjs.entry.js +237 -0
- package/dist/cjs/z-button-sort.cjs.entry.js +1 -1
- package/dist/cjs/z-card.cjs.entry.js +1 -1
- package/dist/cjs/z-carousel.cjs.entry.js +1 -1
- package/dist/cjs/z-chip.cjs.entry.js +4 -4
- package/dist/cjs/z-combobox.cjs.entry.js +3 -3
- package/dist/cjs/z-contextual-menu.cjs.entry.js +1 -1
- package/dist/cjs/z-cover-hero.cjs.entry.js +1 -1
- package/dist/cjs/z-date-picker.cjs.entry.js +2 -2
- package/dist/cjs/z-dragdrop-area_2.cjs.entry.js +1 -1
- package/dist/cjs/z-file-upload.cjs.entry.js +4 -4
- package/dist/cjs/z-file.cjs.entry.js +2 -2
- package/dist/cjs/z-info-reveal.cjs.entry.js +1 -1
- package/dist/cjs/z-messages-pocket.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-alert.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-dictionary.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-footer.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-info.cjs.entry.js +3 -3
- package/dist/cjs/z-myz-card_4.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-list-item.cjs.entry.js +3 -3
- package/dist/cjs/z-navigation-tab-link.cjs.entry.js +1 -1
- package/dist/cjs/z-navigation-tab.cjs.entry.js +1 -1
- package/dist/cjs/z-navigation-tabs.cjs.entry.js +1 -1
- package/dist/cjs/z-otp.cjs.entry.js +1 -1
- package/dist/cjs/z-pagination.cjs.entry.js +1 -1
- package/dist/cjs/z-pocket_3.cjs.entry.js +3 -3
- package/dist/cjs/z-popover.cjs.entry.js +1 -1
- package/dist/cjs/z-range-picker.cjs.entry.js +2 -2
- package/dist/cjs/z-section-title.cjs.entry.js +1 -1
- package/dist/cjs/z-select.cjs.entry.js +3 -3
- package/dist/cjs/z-skip-to-content.cjs.entry.js +3 -3
- package/dist/cjs/z-slideshow.cjs.entry.js +3 -3
- package/dist/cjs/z-table-cell.cjs.entry.js +1 -1
- package/dist/cjs/z-table-header.cjs.entry.js +3 -3
- package/dist/cjs/z-table-row.cjs.entry.js +1 -1
- package/dist/cjs/z-table.cjs.entry.js +2 -2
- package/dist/cjs/z-toast-notification-list.cjs.entry.js +1 -1
- package/dist/cjs/z-toast-notification.cjs.entry.js +2 -2
- package/dist/cjs/z-toggle-switch.cjs.entry.js +3 -3
- package/dist/cjs/z-tooltip.cjs.entry.js +1 -1
- package/dist/collection/beans/index.js +11 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/buttons/z-chip/index.js +1 -1
- package/dist/collection/components/file-upload/z-file-upload/index.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/index.js +421 -0
- package/dist/collection/components/z-breadcrumb/styles.css +139 -0
- package/dist/collection/constants/breakpoints.js +3 -2
- package/dist/collection/utils/utils.js +4 -2
- package/dist/esm/breakpoints-9b81eb1b.js +5 -0
- package/dist/esm/{index-f3202f58.js → index-7e4df1be.js} +12 -1
- package/dist/esm/index-a2ca4b97.js +4 -0
- package/dist/esm/index.js +3 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-0cfc97ad.js → utils-825aed23.js} +5 -3
- package/dist/esm/{utils-930405dd.js → utils-af924ea4.js} +1 -1
- package/dist/esm/web-components-library.js +1 -1
- package/dist/esm/z-anchor-navigation.entry.js +1 -1
- package/dist/esm/z-app-header_11.entry.js +5 -5
- package/dist/esm/z-aria-alert.entry.js +1 -1
- package/dist/esm/z-avatar.entry.js +1 -1
- package/dist/esm/z-breadcrumb.entry.js +233 -0
- package/dist/esm/z-button-sort.entry.js +1 -1
- package/dist/esm/z-card.entry.js +1 -1
- package/dist/esm/z-carousel.entry.js +1 -1
- package/dist/esm/z-chip.entry.js +4 -4
- package/dist/esm/z-combobox.entry.js +3 -3
- package/dist/esm/z-contextual-menu.entry.js +1 -1
- package/dist/esm/z-cover-hero.entry.js +1 -1
- package/dist/esm/z-date-picker.entry.js +2 -2
- package/dist/esm/z-dragdrop-area_2.entry.js +1 -1
- package/dist/esm/z-file-upload.entry.js +4 -4
- package/dist/esm/z-file.entry.js +2 -2
- package/dist/esm/z-info-reveal.entry.js +1 -1
- package/dist/esm/z-messages-pocket.entry.js +1 -1
- package/dist/esm/z-myz-card-alert.entry.js +1 -1
- package/dist/esm/z-myz-card-dictionary.entry.js +1 -1
- package/dist/esm/z-myz-card-footer.entry.js +1 -1
- package/dist/esm/z-myz-card-info.entry.js +3 -3
- package/dist/esm/z-myz-card_4.entry.js +1 -1
- package/dist/esm/z-myz-list-item.entry.js +3 -3
- package/dist/esm/z-navigation-tab-link.entry.js +1 -1
- package/dist/esm/z-navigation-tab.entry.js +1 -1
- package/dist/esm/z-navigation-tabs.entry.js +1 -1
- package/dist/esm/z-otp.entry.js +1 -1
- package/dist/esm/z-pagination.entry.js +1 -1
- package/dist/esm/z-pocket_3.entry.js +3 -3
- package/dist/esm/z-popover.entry.js +1 -1
- package/dist/esm/z-range-picker.entry.js +2 -2
- package/dist/esm/z-section-title.entry.js +1 -1
- package/dist/esm/z-select.entry.js +3 -3
- package/dist/esm/z-skip-to-content.entry.js +3 -3
- package/dist/esm/z-slideshow.entry.js +3 -3
- package/dist/esm/z-table-cell.entry.js +1 -1
- package/dist/esm/z-table-header.entry.js +3 -3
- package/dist/esm/z-table-row.entry.js +1 -1
- package/dist/esm/z-table.entry.js +2 -2
- package/dist/esm/z-toast-notification-list.entry.js +1 -1
- package/dist/esm/z-toast-notification.entry.js +2 -2
- package/dist/esm/z-toggle-switch.entry.js +3 -3
- package/dist/esm/z-tooltip.entry.js +1 -1
- package/dist/types/beans/index.d.ts +15 -1
- package/dist/types/components/z-breadcrumb/index.d.ts +58 -0
- package/dist/types/components.d.ts +78 -1
- package/dist/types/constants/breakpoints.d.ts +3 -2
- package/dist/web-components-library/index.esm.js +1 -1
- package/dist/web-components-library/{p-39c52a0d.entry.js → p-0418f9fb.entry.js} +1 -1
- package/dist/web-components-library/{p-b85be817.entry.js → p-079357ba.entry.js} +1 -1
- package/dist/web-components-library/{p-c736b92c.entry.js → p-0b822ad0.entry.js} +1 -1
- package/dist/web-components-library/{p-5d651052.entry.js → p-0b942851.entry.js} +1 -1
- package/{www/build/p-cf53ce51.entry.js → dist/web-components-library/p-0c0735e5.entry.js} +1 -1
- package/dist/web-components-library/{p-93191e1d.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-5449fd41.entry.js → p-10f2be79.entry.js} +1 -1
- package/dist/web-components-library/p-14c2c56c.js +1 -0
- package/dist/web-components-library/{p-6736e894.entry.js → p-14db3f16.entry.js} +1 -1
- package/dist/web-components-library/p-1cc1a418.js +1 -0
- package/dist/web-components-library/{p-74c27fc5.entry.js → p-227667b6.entry.js} +1 -1
- package/dist/web-components-library/{p-daf06f6f.entry.js → p-27100ea1.entry.js} +1 -1
- package/dist/web-components-library/p-2e7da553.entry.js +1 -0
- package/dist/web-components-library/{p-0c07b4f9.entry.js → p-2f547970.entry.js} +1 -1
- package/dist/web-components-library/{p-7a276150.entry.js → p-39863e41.entry.js} +1 -1
- package/dist/web-components-library/{p-06de959d.entry.js → p-447a7c51.entry.js} +1 -1
- package/dist/web-components-library/{p-515b46d9.entry.js → p-4610db36.entry.js} +1 -1
- package/dist/web-components-library/{p-a93e5cad.entry.js → p-4b9882b3.entry.js} +1 -1
- package/dist/web-components-library/{p-ffc56e80.entry.js → p-5825ef19.entry.js} +1 -1
- package/dist/web-components-library/{p-4c85652a.entry.js → p-6be6a2f4.entry.js} +1 -1
- package/{www/build/p-82291408.entry.js → dist/web-components-library/p-7ac431a5.entry.js} +1 -1
- package/dist/web-components-library/{p-c64c5cbb.entry.js → p-8f7680ef.entry.js} +1 -1
- package/dist/web-components-library/{p-562eb005.entry.js → p-910ca14c.entry.js} +1 -1
- package/dist/web-components-library/{p-98eac308.entry.js → p-98dcf178.entry.js} +1 -1
- package/dist/web-components-library/{p-dcea357f.entry.js → p-98df8460.entry.js} +1 -1
- package/{www/build/p-9566edeb.entry.js → dist/web-components-library/p-9e400a11.entry.js} +1 -1
- package/dist/web-components-library/{p-adce9752.entry.js → p-9fee86aa.entry.js} +1 -1
- package/dist/web-components-library/{p-eb293bba.entry.js → p-a19a70a0.entry.js} +1 -1
- package/dist/web-components-library/{p-c085be1d.entry.js → p-ac5dda12.entry.js} +1 -1
- package/dist/web-components-library/{p-84116d2d.entry.js → p-af5103a0.entry.js} +1 -1
- package/dist/web-components-library/{p-2c871e12.entry.js → p-b44030d0.entry.js} +1 -1
- package/dist/web-components-library/p-b497e33e.js +1 -0
- package/dist/web-components-library/p-b8a2aea6.entry.js +1 -0
- package/dist/web-components-library/{p-7d8711d1.entry.js → p-c241bab0.entry.js} +1 -1
- package/dist/web-components-library/{p-8d4b2131.entry.js → p-c47d529f.entry.js} +1 -1
- package/dist/web-components-library/{p-33251591.entry.js → p-cd456854.entry.js} +1 -1
- package/dist/web-components-library/{p-66c4eda8.entry.js → p-cfc9cf52.entry.js} +1 -1
- package/{www/build/p-8539c6f2.entry.js → dist/web-components-library/p-d966a1b9.entry.js} +1 -1
- package/dist/web-components-library/{p-9c3f4437.entry.js → p-d98d3cf1.entry.js} +1 -1
- package/dist/web-components-library/{p-1505703f.entry.js → p-dcad3493.entry.js} +1 -1
- package/dist/web-components-library/{p-3bd60dc8.entry.js → p-e606b019.entry.js} +1 -1
- package/dist/web-components-library/{p-32c36f6c.entry.js → p-ec5242da.entry.js} +1 -1
- package/{www/build/p-e9bf5f75.js → dist/web-components-library/p-ee918c17.js} +1 -1
- package/dist/web-components-library/{p-a4e68d80.entry.js → p-f5a247b9.entry.js} +1 -1
- package/dist/web-components-library/p-fa7a11fd.entry.js +1 -0
- package/{www/build/p-642d6be4.entry.js → dist/web-components-library/p-fd8eae32.entry.js} +1 -1
- package/dist/web-components-library/{p-c75451cc.entry.js → p-ff838f90.entry.js} +1 -1
- package/dist/web-components-library/web-components-library.esm.js +1 -1
- package/package.json +1 -1
- package/react/components.d.ts +1 -0
- package/react/components.js +3 -2
- package/react/components.js.map +1 -1
- package/www/build/index.esm.js +1 -1
- package/www/build/{p-39c52a0d.entry.js → p-0418f9fb.entry.js} +1 -1
- package/www/build/{p-b85be817.entry.js → p-079357ba.entry.js} +1 -1
- package/www/build/{p-c736b92c.entry.js → p-0b822ad0.entry.js} +1 -1
- package/www/build/{p-5d651052.entry.js → p-0b942851.entry.js} +1 -1
- package/{dist/web-components-library/p-cf53ce51.entry.js → www/build/p-0c0735e5.entry.js} +1 -1
- package/www/build/{p-93191e1d.entry.js → p-0eb7cb35.entry.js} +1 -1
- package/www/build/p-0fd40ac5.entry.js +1 -0
- package/www/build/{p-5449fd41.entry.js → p-10f2be79.entry.js} +1 -1
- package/www/build/p-14c2c56c.js +1 -0
- package/www/build/{p-6736e894.entry.js → p-14db3f16.entry.js} +1 -1
- package/www/build/p-1cc1a418.js +1 -0
- package/www/build/{p-74c27fc5.entry.js → p-227667b6.entry.js} +1 -1
- package/www/build/{p-daf06f6f.entry.js → p-27100ea1.entry.js} +1 -1
- package/www/build/p-2e7da553.entry.js +1 -0
- package/www/build/{p-0c07b4f9.entry.js → p-2f547970.entry.js} +1 -1
- package/www/build/{p-7a276150.entry.js → p-39863e41.entry.js} +1 -1
- package/www/build/p-3d1f6711.js +1 -0
- package/www/build/{p-06de959d.entry.js → p-447a7c51.entry.js} +1 -1
- package/www/build/{p-515b46d9.entry.js → p-4610db36.entry.js} +1 -1
- package/www/build/{p-a93e5cad.entry.js → p-4b9882b3.entry.js} +1 -1
- package/www/build/{p-ffc56e80.entry.js → p-5825ef19.entry.js} +1 -1
- package/www/build/{p-4c85652a.entry.js → p-6be6a2f4.entry.js} +1 -1
- package/{dist/web-components-library/p-82291408.entry.js → www/build/p-7ac431a5.entry.js} +1 -1
- package/www/build/{p-c64c5cbb.entry.js → p-8f7680ef.entry.js} +1 -1
- package/www/build/{p-562eb005.entry.js → p-910ca14c.entry.js} +1 -1
- package/www/build/{p-98eac308.entry.js → p-98dcf178.entry.js} +1 -1
- package/www/build/{p-dcea357f.entry.js → p-98df8460.entry.js} +1 -1
- package/{dist/web-components-library/p-9566edeb.entry.js → www/build/p-9e400a11.entry.js} +1 -1
- package/www/build/{p-adce9752.entry.js → p-9fee86aa.entry.js} +1 -1
- package/www/build/{p-eb293bba.entry.js → p-a19a70a0.entry.js} +1 -1
- package/www/build/{p-c085be1d.entry.js → p-ac5dda12.entry.js} +1 -1
- package/www/build/{p-84116d2d.entry.js → p-af5103a0.entry.js} +1 -1
- package/www/build/{p-2c871e12.entry.js → p-b44030d0.entry.js} +1 -1
- package/www/build/p-b497e33e.js +1 -0
- package/www/build/p-b8a2aea6.entry.js +1 -0
- package/www/build/{p-7d8711d1.entry.js → p-c241bab0.entry.js} +1 -1
- package/www/build/{p-8d4b2131.entry.js → p-c47d529f.entry.js} +1 -1
- package/www/build/{p-33251591.entry.js → p-cd456854.entry.js} +1 -1
- package/www/build/{p-66c4eda8.entry.js → p-cfc9cf52.entry.js} +1 -1
- package/{dist/web-components-library/p-8539c6f2.entry.js → www/build/p-d966a1b9.entry.js} +1 -1
- package/www/build/{p-9c3f4437.entry.js → p-d98d3cf1.entry.js} +1 -1
- package/www/build/{p-1505703f.entry.js → p-dcad3493.entry.js} +1 -1
- package/www/build/{p-3bd60dc8.entry.js → p-e606b019.entry.js} +1 -1
- package/www/build/{p-32c36f6c.entry.js → p-ec5242da.entry.js} +1 -1
- package/{dist/web-components-library/p-e9bf5f75.js → www/build/p-ee918c17.js} +1 -1
- package/www/build/{p-a4e68d80.entry.js → p-f5a247b9.entry.js} +1 -1
- package/www/build/p-fa7a11fd.entry.js +1 -0
- package/{dist/web-components-library/p-642d6be4.entry.js → www/build/p-fd8eae32.entry.js} +1 -1
- package/www/build/{p-c75451cc.entry.js → p-ff838f90.entry.js} +1 -1
- package/www/build/web-components-library.esm.js +1 -1
- package/www/index.html +1 -1
- package/dist/esm/breakpoints-c386984e.js +0 -4
- package/dist/web-components-library/p-1b4d5a24.entry.js +0 -1
- package/dist/web-components-library/p-6816cba3.entry.js +0 -1
- package/dist/web-components-library/p-6b454593.js +0 -1
- package/dist/web-components-library/p-7c94ae08.entry.js +0 -1
- package/dist/web-components-library/p-b1068026.js +0 -1
- package/dist/web-components-library/p-d69e14fb.js +0 -1
- package/www/build/p-1b4d5a24.entry.js +0 -1
- package/www/build/p-6816cba3.entry.js +0 -1
- package/www/build/p-6b454593.js +0 -1
- package/www/build/p-7c94ae08.entry.js +0 -1
- package/www/build/p-b1068026.js +0 -1
- package/www/build/p-d69e14fb.js +0 -1
- package/www/build/p-f8cba0b0.js +0 -1
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
import { BreadcrumbHomepageVariant, BreadcrumbPathStyle, Device, KeyboardCode, ListDividerType, ListSize, PopoverPosition, } from "../../beans";
|
|
3
|
+
import { getDevice, handleKeyboardSubmit } from "../../utils/utils";
|
|
4
|
+
export class ZBreadcrumb {
|
|
5
|
+
constructor() {
|
|
6
|
+
/** [optional] Sets the path style */
|
|
7
|
+
this.pathStyle = BreadcrumbPathStyle.UNDERLINED;
|
|
8
|
+
/** [optional] Variant of first node */
|
|
9
|
+
this.homepageVariant = BreadcrumbHomepageVariant.ICON;
|
|
10
|
+
/** [optional] Sets max number of element to show */
|
|
11
|
+
this.maxNodesToShow = 5;
|
|
12
|
+
/** [optional] Controls the behaviour on <a> tag click/enter */
|
|
13
|
+
this.preventFollowUrl = false;
|
|
14
|
+
/** [optional] Sets max number of row for each path inside the popover. Zero equals unlimited */
|
|
15
|
+
this.overflowMenuItemRows = 0;
|
|
16
|
+
/** [optional] Sets the maximun number of chars per single node */
|
|
17
|
+
this.truncateChar = 30;
|
|
18
|
+
/** Detect whether the length of the nodes shown exceeds the container length */
|
|
19
|
+
this.hasOverflow = false;
|
|
20
|
+
this.popoverEllipsisOpen = false;
|
|
21
|
+
this.collapsedElements = [];
|
|
22
|
+
this.currentIndex = 0;
|
|
23
|
+
this.truncatePosition = null;
|
|
24
|
+
}
|
|
25
|
+
handleResize() {
|
|
26
|
+
this.viewPortWidth = getDevice();
|
|
27
|
+
if (this.viewPortWidth !== Device.MOBILE &&
|
|
28
|
+
this.wrapElement &&
|
|
29
|
+
this.wrapElement.scrollWidth > this.wrapElement.clientWidth) {
|
|
30
|
+
this.hasOverflow = true;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
// eslint-disable-next-line lines-between-class-members
|
|
34
|
+
handlePropChange() {
|
|
35
|
+
this.initializeBreadcrumb(this.viewPortWidth === Device.MOBILE);
|
|
36
|
+
}
|
|
37
|
+
handleResizeUp(newValue, oldValue) {
|
|
38
|
+
if (newValue === Device.MOBILE ||
|
|
39
|
+
(oldValue === Device.MOBILE && newValue === Device.TABLET) ||
|
|
40
|
+
(oldValue === Device.MOBILE && newValue === Device.DESKTOP) ||
|
|
41
|
+
(oldValue === Device.MOBILE && newValue === Device.DESKTOP_WIDE) ||
|
|
42
|
+
(oldValue === Device.TABLET && newValue === Device.DESKTOP) ||
|
|
43
|
+
(oldValue === Device.TABLET && newValue === Device.DESKTOP_WIDE) ||
|
|
44
|
+
(oldValue === Device.DESKTOP && newValue === Device.DESKTOP_WIDE)) {
|
|
45
|
+
this.initializeBreadcrumb(this.viewPortWidth === Device.MOBILE);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
componentWillLoad() {
|
|
49
|
+
this.viewPortWidth = getDevice();
|
|
50
|
+
this.initializeBreadcrumb(this.viewPortWidth === Device.MOBILE);
|
|
51
|
+
}
|
|
52
|
+
componentWillRender() {
|
|
53
|
+
if (this.viewPortWidth !== Device.MOBILE && this.hasOverflow) {
|
|
54
|
+
this.checkEllipsisOrOverflowMenu();
|
|
55
|
+
this.hasOverflow = false;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
componentDidRender() {
|
|
59
|
+
if (this.collapsedElementsRef) {
|
|
60
|
+
this.anchorElements = Array.from(this.hostElement.shadowRoot.querySelectorAll("z-list-group a"));
|
|
61
|
+
}
|
|
62
|
+
if (this.viewPortWidth !== Device.MOBILE && this.wrapElement.scrollWidth > this.wrapElement.clientWidth) {
|
|
63
|
+
this.hasOverflow = true;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
initializeBreadcrumb(isMobile) {
|
|
67
|
+
if (isMobile) {
|
|
68
|
+
this.pathsList = this.getPathsItemsList().filter((item) => !!item.path);
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
this.pathsList = this.getPathsItemsList();
|
|
72
|
+
}
|
|
73
|
+
this.totalLenght = this.pathsList.length;
|
|
74
|
+
this.homepageNode = this.pathsList.shift();
|
|
75
|
+
this.pathListCopy = JSON.parse(JSON.stringify(this.pathsList));
|
|
76
|
+
this.collapsedElements = [];
|
|
77
|
+
if (this.totalLenght > this.maxNodesToShow) {
|
|
78
|
+
this.collapsedElements = this.pathsList.splice(0, this.pathsList.length - 2);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
checkEllipsisOrOverflowMenu() {
|
|
82
|
+
if (this.pathListCopy.length > 0) {
|
|
83
|
+
for (let i = 0; i < this.pathsList.length; i++) {
|
|
84
|
+
if (this.pathsList[i].text.length > this.truncateChar) {
|
|
85
|
+
if (this.truncatePosition !== null) {
|
|
86
|
+
if (this.truncatePosition > 0) {
|
|
87
|
+
const arrayToPush = this.pathListCopy.splice(0, this.truncatePosition);
|
|
88
|
+
arrayToPush.forEach((item) => {
|
|
89
|
+
this.collapsedElements.push(item);
|
|
90
|
+
});
|
|
91
|
+
this.pathsList.splice(0, this.truncatePosition);
|
|
92
|
+
this.truncatePosition = 0;
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
if (this.truncatePosition === 0) {
|
|
96
|
+
const arrayToPush = this.pathListCopy.splice(0, this.truncatePosition + 1);
|
|
97
|
+
this.collapsedElements.push(...arrayToPush);
|
|
98
|
+
this.pathsList.splice(0, this.truncatePosition + 1);
|
|
99
|
+
this.truncatePosition = null;
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
if (i !== this.pathsList.length - 1) {
|
|
104
|
+
const truncatedString = this.truncateWithEllipsis(this.pathsList[i].text, this.truncateChar);
|
|
105
|
+
this.currentEllipsisText = this.pathsList[i].text;
|
|
106
|
+
this.pathsList[i].text = truncatedString;
|
|
107
|
+
this.pathsList[i].hasTooltip = true;
|
|
108
|
+
this.truncatePosition = i;
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
truncateWithEllipsis(str, length) {
|
|
116
|
+
const ending = "…";
|
|
117
|
+
if (str.length > length) {
|
|
118
|
+
return str.substring(0, length - 1) + ending;
|
|
119
|
+
}
|
|
120
|
+
return str;
|
|
121
|
+
}
|
|
122
|
+
getPathsItemsList() {
|
|
123
|
+
if (!this.paths) {
|
|
124
|
+
return Array.from(this.hostElement.children).map((item) => {
|
|
125
|
+
return {
|
|
126
|
+
text: item.textContent,
|
|
127
|
+
path: item.href,
|
|
128
|
+
hasTooltip: false,
|
|
129
|
+
};
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
const ret = typeof this.paths === "string" ? JSON.parse(this.paths) : this.paths;
|
|
133
|
+
return ret.map((item) => {
|
|
134
|
+
return Object.assign(Object.assign({}, item), { hasTooltip: false });
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
renderMobileBreadcrumb() {
|
|
138
|
+
const lastPath = this.pathsList[this.pathsList.length - 1];
|
|
139
|
+
return (h("nav", { "aria-label": "Breadcrumb", class: {
|
|
140
|
+
underlined: this.pathStyle === BreadcrumbPathStyle.UNDERLINED,
|
|
141
|
+
semibold: this.pathStyle === BreadcrumbPathStyle.SEMIBOLD,
|
|
142
|
+
} }, h("ol", null, this.renderNode(lastPath, true))));
|
|
143
|
+
}
|
|
144
|
+
renderHomepageNode(item) {
|
|
145
|
+
return (h("li", null, h("a", { class: {
|
|
146
|
+
"homepage-icon": this.homepageVariant === BreadcrumbHomepageVariant.ICON,
|
|
147
|
+
"homepage-text": this.homepageVariant === BreadcrumbHomepageVariant.TEXT,
|
|
148
|
+
}, href: item.path, onClick: (e) => this.handlePreventFollowUrl(e, item) }, this.homepageVariant === BreadcrumbHomepageVariant.ICON ? (h("z-icon", { name: "home", fill: "color-link-primary", height: 16, width: 16 })) : ("Home"))));
|
|
149
|
+
}
|
|
150
|
+
renderNode(item, mobile) {
|
|
151
|
+
return (h("li", null, item.hasTooltip && (h("z-popover", { class: "full-path-tooltip", "bind-to": this.triggerEllipsis, open: this.popoverEllipsisOpen, position: PopoverPosition.BOTTOM, closable: false, showArrow: true }, h("span", { class: "tooltip-content" }, this.currentEllipsisText))), h("a", { class: {
|
|
152
|
+
"missing-path": !item.path,
|
|
153
|
+
"text-ellipsis": mobile,
|
|
154
|
+
}, ref: (val) => (this.triggerEllipsis = val), "aria-current": item.path ? undefined : "page", href: item.path, onClick: (e) => this.handlePreventFollowUrl(e, item), onMouseOver: () => {
|
|
155
|
+
if (item.hasTooltip) {
|
|
156
|
+
this.popoverEllipsisOpen = true;
|
|
157
|
+
}
|
|
158
|
+
}, onMouseLeave: () => {
|
|
159
|
+
if (item.hasTooltip) {
|
|
160
|
+
this.popoverEllipsisOpen = false;
|
|
161
|
+
}
|
|
162
|
+
}, innerHTML: mobile ? `<z-icon fill="color-link-primary" name="chevron-left"></z-icon> ${item.text}` : item.text })));
|
|
163
|
+
}
|
|
164
|
+
renderBreadcrumb() {
|
|
165
|
+
return (h("nav", { ref: (val) => (this.wrapElement = val), "aria-label": "Breadcrumb", class: {
|
|
166
|
+
underlined: this.pathStyle === BreadcrumbPathStyle.UNDERLINED,
|
|
167
|
+
semibold: this.pathStyle === BreadcrumbPathStyle.SEMIBOLD,
|
|
168
|
+
} }, h("ol", null, this.renderHomepageNode(this.homepageNode), this.collapsedElements.length ? this.renderOverflowMenu() : "", this.pathsList.map((item) => this.renderNode(item, false)))));
|
|
169
|
+
}
|
|
170
|
+
togglePopover() {
|
|
171
|
+
if (!this.collapsedElementsRef.open) {
|
|
172
|
+
this.collapsedElementsRef.open = true;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
handlePreventFollowUrl(e, item) {
|
|
176
|
+
if (this.preventFollowUrl) {
|
|
177
|
+
e.preventDefault();
|
|
178
|
+
this.clickOnNode.emit(item.path);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
handleOverflowMenuAccessibility(e) {
|
|
182
|
+
const anchorElementsLenght = this.anchorElements.length;
|
|
183
|
+
if (e.key === KeyboardCode.TAB) {
|
|
184
|
+
e.preventDefault();
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
e.stopPropagation();
|
|
188
|
+
const arrows = [KeyboardCode.ARROW_DOWN, KeyboardCode.ARROW_UP];
|
|
189
|
+
if (arrows.includes(e.key)) {
|
|
190
|
+
e.preventDefault();
|
|
191
|
+
if (e.key === KeyboardCode.ARROW_DOWN) {
|
|
192
|
+
this.currentIndex = anchorElementsLenght === this.currentIndex + 1 ? 0 : this.currentIndex + 1;
|
|
193
|
+
}
|
|
194
|
+
if (e.key === KeyboardCode.ARROW_UP) {
|
|
195
|
+
this.currentIndex = this.currentIndex <= 0 ? anchorElementsLenght - 1 : this.currentIndex - 1;
|
|
196
|
+
}
|
|
197
|
+
this.anchorElements[this.currentIndex].focus();
|
|
198
|
+
}
|
|
199
|
+
if (e.key === KeyboardCode.ESC) {
|
|
200
|
+
this.triggerButton.focus();
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
renderOverflowMenu() {
|
|
204
|
+
if (this.collapsedElements.length) {
|
|
205
|
+
return (h("li", null, h("z-popover", { class: "hidden-paths-popover", ref: (val) => (this.collapsedElementsRef = val), "bind-to": this.triggerButton, position: PopoverPosition.BOTTOM_RIGHT, closable: true, showArrow: true }, h("div", { class: "popover-content" }, h("z-list", null, h("z-list-group", { dividerType: ListDividerType.ELEMENT, size: ListSize.SMALL }, this.collapsedElements.map((item) => (h("z-list-element", { clickable: true }, h("a", { class: "text-ellipsis", href: item.path, onClick: (e) => this.handlePreventFollowUrl(e, item), onKeyDown: (e) => this.handleOverflowMenuAccessibility(e) }, item.text)))))))), h("button", { "aria-label": "Mostra pi\u00F9 breadcrumb", "aria-haspopup": "true", ref: (el) => (this.triggerButton = el), class: "dots", onClick: () => {
|
|
206
|
+
this.togglePopover();
|
|
207
|
+
}, onKeyDown: (e) => {
|
|
208
|
+
handleKeyboardSubmit(e, this.togglePopover.bind(this));
|
|
209
|
+
setTimeout(() => {
|
|
210
|
+
this.anchorElements[0].focus();
|
|
211
|
+
}, 100);
|
|
212
|
+
} }, "...")));
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
render() {
|
|
216
|
+
return (h(Host, { style: { "--line-clamp": `${this.overflowMenuItemRows}` } }, this.viewPortWidth === Device.MOBILE ? this.renderMobileBreadcrumb() : this.renderBreadcrumb()));
|
|
217
|
+
}
|
|
218
|
+
static get is() { return "z-breadcrumb"; }
|
|
219
|
+
static get encapsulation() { return "shadow"; }
|
|
220
|
+
static get originalStyleUrls() {
|
|
221
|
+
return {
|
|
222
|
+
"$": ["styles.css"]
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
static get styleUrls() {
|
|
226
|
+
return {
|
|
227
|
+
"$": ["styles.css"]
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
static get properties() {
|
|
231
|
+
return {
|
|
232
|
+
"paths": {
|
|
233
|
+
"type": "string",
|
|
234
|
+
"mutable": false,
|
|
235
|
+
"complexType": {
|
|
236
|
+
"original": "BreadcrumbPath[] | string",
|
|
237
|
+
"resolved": "BreadcrumbPath[] | string",
|
|
238
|
+
"references": {
|
|
239
|
+
"BreadcrumbPath": {
|
|
240
|
+
"location": "import",
|
|
241
|
+
"path": "../../beans"
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
"required": false,
|
|
246
|
+
"optional": true,
|
|
247
|
+
"docs": {
|
|
248
|
+
"tags": [],
|
|
249
|
+
"text": "[optional] Path elements, the first of which is the home path"
|
|
250
|
+
},
|
|
251
|
+
"attribute": "paths",
|
|
252
|
+
"reflect": false
|
|
253
|
+
},
|
|
254
|
+
"pathStyle": {
|
|
255
|
+
"type": "string",
|
|
256
|
+
"mutable": false,
|
|
257
|
+
"complexType": {
|
|
258
|
+
"original": "BreadcrumbPathStyle",
|
|
259
|
+
"resolved": "BreadcrumbPathStyle.SEMIBOLD | BreadcrumbPathStyle.UNDERLINED",
|
|
260
|
+
"references": {
|
|
261
|
+
"BreadcrumbPathStyle": {
|
|
262
|
+
"location": "import",
|
|
263
|
+
"path": "../../beans"
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
"required": false,
|
|
268
|
+
"optional": true,
|
|
269
|
+
"docs": {
|
|
270
|
+
"tags": [],
|
|
271
|
+
"text": "[optional] Sets the path style"
|
|
272
|
+
},
|
|
273
|
+
"attribute": "path-style",
|
|
274
|
+
"reflect": true,
|
|
275
|
+
"defaultValue": "BreadcrumbPathStyle.UNDERLINED"
|
|
276
|
+
},
|
|
277
|
+
"homepageVariant": {
|
|
278
|
+
"type": "string",
|
|
279
|
+
"mutable": false,
|
|
280
|
+
"complexType": {
|
|
281
|
+
"original": "BreadcrumbHomepageVariant",
|
|
282
|
+
"resolved": "BreadcrumbHomepageVariant.ICON | BreadcrumbHomepageVariant.TEXT",
|
|
283
|
+
"references": {
|
|
284
|
+
"BreadcrumbHomepageVariant": {
|
|
285
|
+
"location": "import",
|
|
286
|
+
"path": "../../beans"
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
"required": false,
|
|
291
|
+
"optional": true,
|
|
292
|
+
"docs": {
|
|
293
|
+
"tags": [],
|
|
294
|
+
"text": "[optional] Variant of first node"
|
|
295
|
+
},
|
|
296
|
+
"attribute": "homepage-variant",
|
|
297
|
+
"reflect": false,
|
|
298
|
+
"defaultValue": "BreadcrumbHomepageVariant.ICON"
|
|
299
|
+
},
|
|
300
|
+
"maxNodesToShow": {
|
|
301
|
+
"type": "number",
|
|
302
|
+
"mutable": false,
|
|
303
|
+
"complexType": {
|
|
304
|
+
"original": "number",
|
|
305
|
+
"resolved": "number",
|
|
306
|
+
"references": {}
|
|
307
|
+
},
|
|
308
|
+
"required": false,
|
|
309
|
+
"optional": true,
|
|
310
|
+
"docs": {
|
|
311
|
+
"tags": [],
|
|
312
|
+
"text": "[optional] Sets max number of element to show"
|
|
313
|
+
},
|
|
314
|
+
"attribute": "max-nodes-to-show",
|
|
315
|
+
"reflect": false,
|
|
316
|
+
"defaultValue": "5"
|
|
317
|
+
},
|
|
318
|
+
"preventFollowUrl": {
|
|
319
|
+
"type": "boolean",
|
|
320
|
+
"mutable": false,
|
|
321
|
+
"complexType": {
|
|
322
|
+
"original": "boolean",
|
|
323
|
+
"resolved": "boolean",
|
|
324
|
+
"references": {}
|
|
325
|
+
},
|
|
326
|
+
"required": false,
|
|
327
|
+
"optional": true,
|
|
328
|
+
"docs": {
|
|
329
|
+
"tags": [],
|
|
330
|
+
"text": "[optional] Controls the behaviour on <a> tag click/enter"
|
|
331
|
+
},
|
|
332
|
+
"attribute": "prevent-follow-url",
|
|
333
|
+
"reflect": false,
|
|
334
|
+
"defaultValue": "false"
|
|
335
|
+
},
|
|
336
|
+
"overflowMenuItemRows": {
|
|
337
|
+
"type": "number",
|
|
338
|
+
"mutable": false,
|
|
339
|
+
"complexType": {
|
|
340
|
+
"original": "number",
|
|
341
|
+
"resolved": "number",
|
|
342
|
+
"references": {}
|
|
343
|
+
},
|
|
344
|
+
"required": false,
|
|
345
|
+
"optional": true,
|
|
346
|
+
"docs": {
|
|
347
|
+
"tags": [],
|
|
348
|
+
"text": "[optional] Sets max number of row for each path inside the popover. Zero equals unlimited"
|
|
349
|
+
},
|
|
350
|
+
"attribute": "overflow-menu-item-rows",
|
|
351
|
+
"reflect": false,
|
|
352
|
+
"defaultValue": "0"
|
|
353
|
+
},
|
|
354
|
+
"truncateChar": {
|
|
355
|
+
"type": "number",
|
|
356
|
+
"mutable": false,
|
|
357
|
+
"complexType": {
|
|
358
|
+
"original": "number",
|
|
359
|
+
"resolved": "number",
|
|
360
|
+
"references": {}
|
|
361
|
+
},
|
|
362
|
+
"required": false,
|
|
363
|
+
"optional": true,
|
|
364
|
+
"docs": {
|
|
365
|
+
"tags": [],
|
|
366
|
+
"text": "[optional] Sets the maximun number of chars per single node"
|
|
367
|
+
},
|
|
368
|
+
"attribute": "truncate-char",
|
|
369
|
+
"reflect": false,
|
|
370
|
+
"defaultValue": "30"
|
|
371
|
+
}
|
|
372
|
+
};
|
|
373
|
+
}
|
|
374
|
+
static get states() {
|
|
375
|
+
return {
|
|
376
|
+
"viewPortWidth": {},
|
|
377
|
+
"hasOverflow": {},
|
|
378
|
+
"popoverEllipsisOpen": {}
|
|
379
|
+
};
|
|
380
|
+
}
|
|
381
|
+
static get events() {
|
|
382
|
+
return [{
|
|
383
|
+
"method": "clickOnNode",
|
|
384
|
+
"name": "clickOnNode",
|
|
385
|
+
"bubbles": true,
|
|
386
|
+
"cancelable": true,
|
|
387
|
+
"composed": true,
|
|
388
|
+
"docs": {
|
|
389
|
+
"tags": [],
|
|
390
|
+
"text": "Emitted when preventFollowUrl=true to handle custom page transition"
|
|
391
|
+
},
|
|
392
|
+
"complexType": {
|
|
393
|
+
"original": "any",
|
|
394
|
+
"resolved": "any",
|
|
395
|
+
"references": {}
|
|
396
|
+
}
|
|
397
|
+
}];
|
|
398
|
+
}
|
|
399
|
+
static get elementRef() { return "hostElement"; }
|
|
400
|
+
static get watchers() {
|
|
401
|
+
return [{
|
|
402
|
+
"propName": "paths",
|
|
403
|
+
"methodName": "handlePropChange"
|
|
404
|
+
}, {
|
|
405
|
+
"propName": "maxNodesToShow",
|
|
406
|
+
"methodName": "handlePropChange"
|
|
407
|
+
}, {
|
|
408
|
+
"propName": "viewPortWidth",
|
|
409
|
+
"methodName": "handleResizeUp"
|
|
410
|
+
}];
|
|
411
|
+
}
|
|
412
|
+
static get listeners() {
|
|
413
|
+
return [{
|
|
414
|
+
"name": "resize",
|
|
415
|
+
"method": "handleResize",
|
|
416
|
+
"target": "window",
|
|
417
|
+
"capture": false,
|
|
418
|
+
"passive": true
|
|
419
|
+
}];
|
|
420
|
+
}
|
|
421
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/* stylelint-disable value-no-vendor-prefix */
|
|
2
|
+
:host {
|
|
3
|
+
font-family: var(--font-family-sans);
|
|
4
|
+
font-weight: var(--font-rg);
|
|
5
|
+
|
|
6
|
+
--line-clamp-popover: 0;
|
|
7
|
+
--line-clamp-mobile: 1;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
button {
|
|
11
|
+
padding: 0;
|
|
12
|
+
border: none;
|
|
13
|
+
margin: 0;
|
|
14
|
+
background-color: transparent;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
nav {
|
|
18
|
+
display: flex;
|
|
19
|
+
height: 30px;
|
|
20
|
+
align-items: center;
|
|
21
|
+
padding-left: calc(var(--space-unit) / 2);
|
|
22
|
+
overflow-x: hidden;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
li {
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: baseline;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:host a:focus,
|
|
31
|
+
:host button:focus {
|
|
32
|
+
box-shadow: var(--shadow-focus-primary);
|
|
33
|
+
outline: 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:host a {
|
|
37
|
+
color: var(--color-link-primary);
|
|
38
|
+
font-size: var(--font-size-2);
|
|
39
|
+
text-decoration: none;
|
|
40
|
+
white-space: nowrap;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
:host a.homepage-icon {
|
|
44
|
+
display: list-item;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
:host a.homepage-text {
|
|
48
|
+
display: initial;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
:host a.missing-path {
|
|
52
|
+
color: var(--color-text01);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
:host a.text-ellipsis {
|
|
56
|
+
display: -webkit-box !important;
|
|
57
|
+
overflow: hidden;
|
|
58
|
+
-webkit-box-orient: vertical;
|
|
59
|
+
-webkit-line-clamp: var(--line-clamp-mobile);
|
|
60
|
+
text-overflow: ellipsis;
|
|
61
|
+
white-space: normal;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
:host ol {
|
|
65
|
+
display: flex;
|
|
66
|
+
padding: 0;
|
|
67
|
+
margin: 0;
|
|
68
|
+
list-style-type: none;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
:host ol > li:not(:last-child) {
|
|
72
|
+
margin-right: var(--space-unit);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
nav.underlined > ol > li a:not(.missing-path),
|
|
76
|
+
nav.underlined > ol > li button {
|
|
77
|
+
text-decoration: underline;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
nav.semibold > ol > li a:not(.missing-path),
|
|
81
|
+
nav.semibold > ol > li button {
|
|
82
|
+
font-weight: var(--font-sb);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
:host z-icon {
|
|
86
|
+
margin-right: var(--space-unit);
|
|
87
|
+
|
|
88
|
+
--z-icon-width: 12px;
|
|
89
|
+
--z-icon-height: 12px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
:host button.dots {
|
|
93
|
+
display: inline-block;
|
|
94
|
+
color: var(--color-link-primary);
|
|
95
|
+
cursor: pointer;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
:host .popover-content {
|
|
99
|
+
max-width: 302px;
|
|
100
|
+
padding: calc(var(--space-unit) / 2) var(--space-unit);
|
|
101
|
+
text-align: left;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
:host .popover-content a {
|
|
105
|
+
font-weight: var(--font-rg);
|
|
106
|
+
text-decoration: none;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
:host .hidden-paths-popover {
|
|
110
|
+
--z-popover-theme--surface: var(--color-surface02);
|
|
111
|
+
--z-popover-padding: 0;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
:host .full-path-tooltip {
|
|
115
|
+
--z-popover-theme--surface: var(--color-surface05);
|
|
116
|
+
--z-popover-theme--text: var(--color-text-inverse);
|
|
117
|
+
--z-popover-padding: 0;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
:host .tooltip-content {
|
|
121
|
+
padding: 0 var(--space-unit);
|
|
122
|
+
font-size: var(--font-size-2);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
@media (min-width: 768px) {
|
|
126
|
+
/* https://www.w3.org/WAI/ARIA/apg/patterns/breadcrumb/examples/breadcrumb/#accessibilityfeatures */
|
|
127
|
+
:host ol > li + li::before {
|
|
128
|
+
display: inline-block;
|
|
129
|
+
width: 10px;
|
|
130
|
+
height: 10px;
|
|
131
|
+
flex: 1;
|
|
132
|
+
color: var(--color-disabled03);
|
|
133
|
+
content: "\203A";
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
:host a.text-ellipsis {
|
|
137
|
+
-webkit-line-clamp: var(--line-clamp-popover);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { KeyboardCode, Device } from "../beans/index";
|
|
2
|
-
import { mobileBreakpoint, tabletBreakpoint } from "../constants/breakpoints";
|
|
2
|
+
import { desktopBreakpoint, mobileBreakpoint, tabletBreakpoint } from "../constants/breakpoints";
|
|
3
3
|
export function format(first, middle, last) {
|
|
4
4
|
return (first || "") + (middle ? ` ${middle}` : "") + (last ? ` ${last}` : "");
|
|
5
5
|
}
|
|
@@ -87,8 +87,10 @@ export function getDevice() {
|
|
|
87
87
|
return Device.MOBILE;
|
|
88
88
|
case window.innerWidth <= tabletBreakpoint:
|
|
89
89
|
return Device.TABLET;
|
|
90
|
-
|
|
90
|
+
case window.innerWidth <= desktopBreakpoint:
|
|
91
91
|
return Device.DESKTOP;
|
|
92
|
+
default:
|
|
93
|
+
return Device.DESKTOP_WIDE;
|
|
92
94
|
}
|
|
93
95
|
}
|
|
94
96
|
export function convertJson(data) {
|
|
@@ -201,6 +201,7 @@ var Device;
|
|
|
201
201
|
Device["MOBILE"] = "mobile";
|
|
202
202
|
Device["TABLET"] = "tablet";
|
|
203
203
|
Device["DESKTOP"] = "desktop";
|
|
204
|
+
Device["DESKTOP_WIDE"] = "desktop-wide";
|
|
204
205
|
})(Device || (Device = {}));
|
|
205
206
|
var PocketStatus;
|
|
206
207
|
(function (PocketStatus) {
|
|
@@ -323,5 +324,15 @@ var CarouselProgressMode;
|
|
|
323
324
|
CarouselProgressMode["DOTS"] = "dots";
|
|
324
325
|
CarouselProgressMode["NUMBERS"] = "numbers";
|
|
325
326
|
})(CarouselProgressMode || (CarouselProgressMode = {}));
|
|
327
|
+
var BreadcrumbPathStyle;
|
|
328
|
+
(function (BreadcrumbPathStyle) {
|
|
329
|
+
BreadcrumbPathStyle["SEMIBOLD"] = "semibold";
|
|
330
|
+
BreadcrumbPathStyle["UNDERLINED"] = "underlined";
|
|
331
|
+
})(BreadcrumbPathStyle || (BreadcrumbPathStyle = {}));
|
|
332
|
+
var BreadcrumbHomepageVariant;
|
|
333
|
+
(function (BreadcrumbHomepageVariant) {
|
|
334
|
+
BreadcrumbHomepageVariant["TEXT"] = "text";
|
|
335
|
+
BreadcrumbHomepageVariant["ICON"] = "icon";
|
|
336
|
+
})(BreadcrumbHomepageVariant || (BreadcrumbHomepageVariant = {}));
|
|
326
337
|
|
|
327
|
-
export { AvatarSize as A, ButtonVariant as B, CardVariant as C, DividerSize as D, ExpandableListStyle as E, ZDatePickerMode as F, ZDatePickerModeValue as G, ZDatePickerPosition as H, InputType as I, ZRangePickerMode as J, KeyboardKeyCode as K, LicenseType as L, InfoRevealPosition as M, NavigationTabsOrientation as N, OffCanvasVariant as O, PopoverPosition as P, CoverHeroVariant as Q, CoverHeroContentPosition as R, SortDirection as S, ThemeVariant as T, CarouselArrowsPosition as U, CarouselProgressMode as V, ZTableRowExpandedType as Z, NavigationTabsSize as a, NavigationTabsKeyboardEvents as b, ButtonType as c, ButtonSize as d, ControlSize as e, InputStatus as f, KeyboardCode as g, DividerOrientation as h, ListSize as i, Size as j, ExpandableListButtonAlign as k, LabelPosition as l, ListDividerType as m, ListType as n, NotificationType as o, AlertType as p, Device as q, PocketStatus as r, ToastNotification as s, ToastNotificationTransition as t, ToastNotificationPosition as u, ZAriaAlertMode as v, TransitionDirection as w, ZFileUploadType as x, ZChipType as y, ZSectionTitleDividerPosition as z };
|
|
338
|
+
export { AvatarSize as A, ButtonVariant as B, CardVariant as C, DividerSize as D, ExpandableListStyle as E, ZDatePickerMode as F, ZDatePickerModeValue as G, ZDatePickerPosition as H, InputType as I, ZRangePickerMode as J, KeyboardKeyCode as K, LicenseType as L, InfoRevealPosition as M, NavigationTabsOrientation as N, OffCanvasVariant as O, PopoverPosition as P, CoverHeroVariant as Q, CoverHeroContentPosition as R, SortDirection as S, ThemeVariant as T, CarouselArrowsPosition as U, CarouselProgressMode as V, BreadcrumbPathStyle as W, BreadcrumbHomepageVariant as X, ZTableRowExpandedType as Z, NavigationTabsSize as a, NavigationTabsKeyboardEvents as b, ButtonType as c, ButtonSize as d, ControlSize as e, InputStatus as f, KeyboardCode as g, DividerOrientation as h, ListSize as i, Size as j, ExpandableListButtonAlign as k, LabelPosition as l, ListDividerType as m, ListType as n, NotificationType as o, AlertType as p, Device as q, PocketStatus as r, ToastNotification as s, ToastNotificationTransition as t, ToastNotificationPosition as u, ZAriaAlertMode as v, TransitionDirection as w, ZFileUploadType as x, ZChipType as y, ZSectionTitleDividerPosition as z };
|
|
@@ -1912,6 +1912,10 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1912
1912
|
return import(
|
|
1913
1913
|
/* webpackMode: "lazy" */
|
|
1914
1914
|
'./z-body.entry.js').then(processMod, consoleError);
|
|
1915
|
+
case 'z-breadcrumb':
|
|
1916
|
+
return import(
|
|
1917
|
+
/* webpackMode: "lazy" */
|
|
1918
|
+
'./z-breadcrumb.entry.js').then(processMod, consoleError);
|
|
1915
1919
|
case 'z-button-sort':
|
|
1916
1920
|
return import(
|
|
1917
1921
|
/* webpackMode: "lazy" */
|
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as colorFromId } from './utils-
|
|
2
|
-
export { p as AlertType, A as AvatarSize, d as ButtonSize, c as ButtonType, B as ButtonVariant, C as CardVariant, U as CarouselArrowsPosition, V as CarouselProgressMode, e as ControlSize, R as CoverHeroContentPosition, Q as CoverHeroVariant, q as Device, h as DividerOrientation, D as DividerSize, k as ExpandableListButtonAlign, E as ExpandableListStyle, M as InfoRevealPosition, f as InputStatus, I as InputType, g as KeyboardCode, K as KeyboardKeyCode, l as LabelPosition, L as LicenseType, m as ListDividerType, i as ListSize, n as ListType, b as NavigationTabsKeyboardEvents, N as NavigationTabsOrientation, a as NavigationTabsSize, o as NotificationType, O as OffCanvasVariant, r as PocketStatus, P as PopoverPosition, j as Size, S as SortDirection, T as ThemeVariant, s as ToastNotification, u as ToastNotificationPosition, t as ToastNotificationTransition, w as TransitionDirection, v as ZAriaAlertMode, y as ZChipType, F as ZDatePickerMode, G as ZDatePickerModeValue, H as ZDatePickerPosition, x as ZFileUploadType, J as ZRangePickerMode, z as ZSectionTitleDividerPosition, Z as ZTableRowExpandedType } from './index-
|
|
3
|
-
import './breakpoints-
|
|
1
|
+
import { c as colorFromId } from './utils-825aed23.js';
|
|
2
|
+
export { p as AlertType, A as AvatarSize, X as BreadcrumbHomepageVariant, W as BreadcrumbPathStyle, d as ButtonSize, c as ButtonType, B as ButtonVariant, C as CardVariant, U as CarouselArrowsPosition, V as CarouselProgressMode, e as ControlSize, R as CoverHeroContentPosition, Q as CoverHeroVariant, q as Device, h as DividerOrientation, D as DividerSize, k as ExpandableListButtonAlign, E as ExpandableListStyle, M as InfoRevealPosition, f as InputStatus, I as InputType, g as KeyboardCode, K as KeyboardKeyCode, l as LabelPosition, L as LicenseType, m as ListDividerType, i as ListSize, n as ListType, b as NavigationTabsKeyboardEvents, N as NavigationTabsOrientation, a as NavigationTabsSize, o as NotificationType, O as OffCanvasVariant, r as PocketStatus, P as PopoverPosition, j as Size, S as SortDirection, T as ThemeVariant, s as ToastNotification, u as ToastNotificationPosition, t as ToastNotificationTransition, w as TransitionDirection, v as ZAriaAlertMode, y as ZChipType, F as ZDatePickerMode, G as ZDatePickerModeValue, H as ZDatePickerPosition, x as ZFileUploadType, J as ZRangePickerMode, z as ZSectionTitleDividerPosition, Z as ZTableRowExpandedType } from './index-7e4df1be.js';
|
|
3
|
+
import './breakpoints-9b81eb1b.js';
|
|
4
4
|
|
|
5
5
|
const UTILS = {
|
|
6
6
|
colorFromId,
|