@zanichelli/albe-web-components 9.3.0-rc1 → 10.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/CHANGELOG.md +17 -0
- package/dist/cjs/index-e3299e0a.js +16 -20
- 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 +1056 -0
- package/dist/cjs/z-book-card.cjs.entry.js +5 -1
- package/dist/cjs/z-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/z-date-picker.cjs.entry.js +477 -0
- package/dist/cjs/z-dragdrop-area_2.cjs.entry.js +1016 -0
- package/dist/cjs/z-navigation-tab-link.cjs.entry.js +4 -4
- package/dist/cjs/z-navigation-tab.cjs.entry.js +4 -4
- package/dist/cjs/z-navigation-tabs.cjs.entry.js +36 -44
- package/dist/cjs/z-panel-elem.cjs.entry.js +6 -2
- package/dist/cjs/z-select.cjs.entry.js +333 -0
- package/dist/cjs/z-skip-to-content.cjs.entry.js +10 -2
- package/dist/collection/collection-manifest.json +1 -4
- package/dist/collection/components/modal/z-modal/styles.css +2 -6
- package/dist/collection/components/navigation/tabs/navigation-tab.css +2 -1
- package/dist/collection/components/navigation/tabs/z-navigation-tab/index.js +19 -8
- package/dist/collection/components/navigation/tabs/z-navigation-tab-link/index.js +19 -8
- package/dist/collection/components/navigation/tabs/z-navigation-tabs/index.js +35 -43
- package/dist/collection/components/navigation/tabs/z-navigation-tabs/index.stories.js +11 -0
- package/dist/collection/components/navigation/tabs/z-navigation-tabs/styles.css +2 -2
- package/dist/collection/components/panel/z-panel-elem/index.js +6 -2
- package/dist/collection/components/panel/z-panel-elem/styles.css +9 -2
- package/dist/collection/components/z-book-card/index.js +23 -1
- package/dist/collection/components/z-breadcrumb/index.js +1 -1
- package/dist/collection/components/z-skip-to-content/index.js +9 -1
- package/dist/collection/components/z-skip-to-content/styles.css +18 -17
- package/dist/esm/{index-8528dee0.js → index-1b2e3e53.js} +1 -1
- package/dist/esm/index-a2ca4b97.js +16 -20
- package/dist/esm/{index-5b83b0b1.js → index-d3dfe710.js} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-6c83dfcb.js → utils-4d2d99d9.js} +1 -1
- package/dist/esm/web-components-library.js +1 -1
- package/dist/esm/z-app-header_11.entry.js +1042 -0
- package/dist/esm/z-book-card.entry.js +6 -2
- package/dist/esm/z-breadcrumb.entry.js +2 -2
- package/dist/esm/z-chip.entry.js +1 -1
- package/dist/esm/z-combobox.entry.js +1 -1
- package/dist/esm/z-date-picker.entry.js +473 -0
- package/dist/esm/z-dragdrop-area_2.entry.js +1011 -0
- 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-navigation-tab-link.entry.js +5 -5
- package/dist/esm/z-navigation-tab.entry.js +5 -5
- package/dist/esm/z-navigation-tabs.entry.js +36 -44
- package/dist/esm/z-panel-elem.entry.js +6 -2
- package/dist/esm/z-pocket_3.entry.js +1 -1
- package/dist/esm/z-select.entry.js +329 -0
- package/dist/esm/z-skip-to-content.entry.js +11 -3
- package/dist/esm/z-slideshow.entry.js +1 -1
- package/dist/esm/z-table-deprecated.entry.js +2 -2
- package/dist/esm/z-table-header.entry.js +2 -2
- package/dist/esm/z-table.entry.js +2 -2
- package/dist/esm/z-toggle-switch.entry.js +1 -1
- package/dist/esm/z-tr.entry.js +2 -2
- package/dist/types/components/navigation/tabs/z-navigation-tab/index.d.ts +11 -5
- package/dist/types/components/navigation/tabs/z-navigation-tab-link/index.d.ts +11 -7
- package/dist/types/components/navigation/tabs/z-navigation-tabs/index.d.ts +4 -4
- package/dist/types/components/z-book-card/index.d.ts +4 -0
- package/dist/types/components.d.ts +28 -120
- package/dist/types/{components/navigation → deprecated}/z-link/index.d.ts +1 -1
- package/dist/web-components-library/index.esm.js +1 -1
- package/dist/web-components-library/p-06d2f371.entry.js +1 -0
- package/dist/web-components-library/p-09be4e46.entry.js +1 -0
- package/dist/web-components-library/p-113762ff.entry.js +1 -0
- package/dist/web-components-library/p-1976afea.entry.js +1 -0
- package/dist/web-components-library/{p-7eb6d043.entry.js → p-1cbd8a5f.entry.js} +1 -1
- package/dist/web-components-library/{p-c99acff4.entry.js → p-2d0ac109.entry.js} +1 -1
- package/dist/web-components-library/p-2d600a28.entry.js +1 -0
- package/dist/web-components-library/{p-dca0db1b.entry.js → p-2f013f10.entry.js} +1 -1
- package/dist/web-components-library/p-36487afc.entry.js +1 -0
- package/dist/web-components-library/{p-13ac8bd3.entry.js → p-37e8194f.entry.js} +1 -1
- package/dist/web-components-library/p-386bdb7f.entry.js +1 -0
- package/dist/web-components-library/p-3e61bad0.entry.js +1 -0
- package/dist/web-components-library/{p-327b7b79.js → p-65dd23d7.js} +1 -1
- package/dist/web-components-library/{p-b3093245.entry.js → p-69bde29c.entry.js} +1 -1
- package/dist/web-components-library/p-6b6453ba.entry.js +1 -0
- package/dist/web-components-library/{p-aa8b0c95.entry.js → p-8b2bf3b4.entry.js} +1 -1
- package/dist/web-components-library/p-9829f5bd.entry.js +16 -0
- package/dist/web-components-library/{p-432a2f5b.entry.js → p-a6a09ce6.entry.js} +1 -1
- package/{www/build/p-7f43e400.entry.js → dist/web-components-library/p-c1f20cec.entry.js} +1 -1
- package/dist/web-components-library/p-c97d133c.entry.js +1 -0
- package/dist/web-components-library/{p-c8bd65d9.entry.js → p-cb07de86.entry.js} +1 -1
- package/dist/web-components-library/{p-eb9fa72b.js → p-d7668580.js} +1 -1
- package/dist/web-components-library/p-dd17b462.entry.js +1 -0
- package/dist/web-components-library/{p-91447194.js → p-dd3e0b4e.js} +1 -1
- package/dist/web-components-library/p-f5b5f897.entry.js +1 -0
- package/dist/web-components-library/p-fef8f2e1.entry.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 +2 -2
- package/react/components.d.ts +0 -3
- package/react/components.js +2 -5
- package/react/components.js.map +1 -1
- package/www/build/index.esm.js +1 -1
- package/www/build/p-06d2f371.entry.js +1 -0
- package/www/build/p-09be4e46.entry.js +1 -0
- package/www/build/p-113762ff.entry.js +1 -0
- package/www/build/p-1976afea.entry.js +1 -0
- package/www/build/{p-7eb6d043.entry.js → p-1cbd8a5f.entry.js} +1 -1
- package/www/build/{p-c99acff4.entry.js → p-2d0ac109.entry.js} +1 -1
- package/www/build/p-2d600a28.entry.js +1 -0
- package/www/build/{p-dca0db1b.entry.js → p-2f013f10.entry.js} +1 -1
- package/www/build/p-36487afc.entry.js +1 -0
- package/www/build/{p-13ac8bd3.entry.js → p-37e8194f.entry.js} +1 -1
- package/www/build/p-386bdb7f.entry.js +1 -0
- package/www/build/p-3e61bad0.entry.js +1 -0
- package/www/build/{p-327b7b79.js → p-65dd23d7.js} +1 -1
- package/www/build/{p-b3093245.entry.js → p-69bde29c.entry.js} +1 -1
- package/www/build/p-6b6453ba.entry.js +1 -0
- package/www/build/{p-aa8b0c95.entry.js → p-8b2bf3b4.entry.js} +1 -1
- package/www/build/p-9829f5bd.entry.js +16 -0
- package/www/build/{p-432a2f5b.entry.js → p-a6a09ce6.entry.js} +1 -1
- package/www/build/p-ac088d9a.css +2 -0
- package/{dist/web-components-library/p-7f43e400.entry.js → www/build/p-c1f20cec.entry.js} +1 -1
- package/www/build/p-c97d133c.entry.js +1 -0
- package/www/build/{p-c8bd65d9.entry.js → p-cb07de86.entry.js} +1 -1
- package/www/build/{p-eb9fa72b.js → p-d7668580.js} +1 -1
- package/www/build/p-d8829c48.js +1 -0
- package/www/build/p-dd17b462.entry.js +1 -0
- package/www/build/{p-91447194.js → p-dd3e0b4e.js} +1 -1
- package/www/build/p-f5b5f897.entry.js +1 -0
- package/www/build/p-fef8f2e1.entry.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 -59
- package/dist/cjs/z-app-header_14.cjs.entry.js +0 -2828
- package/dist/cjs/z-body.cjs.entry.js +0 -18
- package/dist/cjs/z-dragdrop-area.cjs.entry.js +0 -37
- package/dist/cjs/z-heading.cjs.entry.js +0 -18
- package/dist/cjs/z-typography.cjs.entry.js +0 -30
- package/dist/collection/deprecated/typography/z-body/index.js +0 -68
- package/dist/collection/deprecated/typography/z-heading/index.js +0 -68
- package/dist/collection/deprecated/typography/z-typography/index.js +0 -91
- package/dist/collection/deprecated/typography/z-typography/styles.css +0 -65
- package/dist/esm/z-app-header_14.entry.js +0 -2811
- package/dist/esm/z-body.entry.js +0 -14
- package/dist/esm/z-dragdrop-area.entry.js +0 -33
- package/dist/esm/z-heading.entry.js +0 -14
- package/dist/esm/z-typography.entry.js +0 -26
- package/dist/types/deprecated/typography/z-body/index.d.ts +0 -9
- package/dist/types/deprecated/typography/z-heading/index.d.ts +0 -9
- package/dist/types/deprecated/typography/z-typography/index.d.ts +0 -11
- package/dist/web-components-library/p-052c06ac.entry.js +0 -1
- package/dist/web-components-library/p-3ee4aa12.entry.js +0 -1
- package/dist/web-components-library/p-438f017e.entry.js +0 -1
- package/dist/web-components-library/p-4423b00c.entry.js +0 -1
- package/dist/web-components-library/p-466c3c0b.entry.js +0 -1
- package/dist/web-components-library/p-52b084fb.entry.js +0 -1
- package/dist/web-components-library/p-5ac6109d.entry.js +0 -1
- package/dist/web-components-library/p-625d603e.entry.js +0 -1
- package/dist/web-components-library/p-76c2c26d.entry.js +0 -1
- package/dist/web-components-library/p-b2420056.entry.js +0 -1
- package/dist/web-components-library/p-bbeb69ae.entry.js +0 -1
- package/dist/web-components-library/p-c1de287b.entry.js +0 -1
- package/dist/web-components-library/p-d147e995.entry.js +0 -1
- package/dist/web-components-library/p-e78ce8ec.entry.js +0 -1
- package/dist/web-components-library/p-f01f4e9b.entry.js +0 -16
- package/www/build/p-052c06ac.entry.js +0 -1
- package/www/build/p-39b528a6.js +0 -129
- package/www/build/p-3ee4aa12.entry.js +0 -1
- package/www/build/p-438f017e.entry.js +0 -1
- package/www/build/p-4423b00c.entry.js +0 -1
- package/www/build/p-466c3c0b.entry.js +0 -1
- package/www/build/p-52b084fb.entry.js +0 -1
- package/www/build/p-5a0a4f69.css +0 -1653
- package/www/build/p-5ac6109d.entry.js +0 -1
- package/www/build/p-625d603e.entry.js +0 -1
- package/www/build/p-76c2c26d.entry.js +0 -1
- package/www/build/p-b2420056.entry.js +0 -1
- package/www/build/p-bbeb69ae.entry.js +0 -1
- package/www/build/p-c1de287b.entry.js +0 -1
- package/www/build/p-d147e995.entry.js +0 -1
- package/www/build/p-e78ce8ec.entry.js +0 -1
- package/www/build/p-f01f4e9b.entry.js +0 -16
- /package/dist/collection/{components/navigation → deprecated}/z-link/index.js +0 -0
- /package/dist/collection/{components/navigation → deprecated}/z-link/styles.css +0 -0
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-a2ca4b97.js';
|
|
2
|
+
import { e as ControlSize, g as KeyboardCode, l as ListDividerType, i as ListSize } from './index-03c8b0f0.js';
|
|
3
|
+
import { r as randomId, b as boolean, d as getElementTree, a as handleKeyboardSubmit, e as getClickedElement } from './utils-4d2d99d9.js';
|
|
4
|
+
import './breakpoints-9b81eb1b.js';
|
|
5
|
+
|
|
6
|
+
const stylesCss = ".sc-z-select-h{display:inline-block;width:inherit;color:var(--color-text02);font-family:var(--font-family-sans);font-size:var(--font-size-3);font-weight:var(--font-rg)}[size=\"small\"].sc-z-select-h,[size=\"x-small\"].sc-z-select-h{font-size:var(--font-size-2)}.select-wrapper.sc-z-select>z-input.sc-z-select{width:100%}.select-wrapper.sc-z-select>div.sc-z-select{position:relative}.select-wrapper.sc-z-select>div.closed.sc-z-select{overflow:hidden;height:0}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select{position:absolute;width:100%;box-sizing:border-box;padding:calc(var(--space-unit) * 0.5) var(--space-unit);border:var(--border-size-small) solid var(--gray200);border-top:none;background:var(--color-surface01);outline:none}.select-wrapper.sc-z-select .closed.sc-z-select .ul-scroll-wrapper.sc-z-select{z-index:10}.select-wrapper.sc-z-select .open.sc-z-select .ul-scroll-wrapper.sc-z-select{z-index:20}.select-wrapper.sc-z-select .ul-scroll-wrapper.fixed.sc-z-select{position:static}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select{position:relative;overflow:auto;max-height:240px;padding:calc(var(--space-unit) * 0.5);outline:none;scrollbar-color:var(--color-primary01) transparent}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select::-webkit-scrollbar-track{background-color:transparent}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01);border-radius:var(--border-radius)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select::-webkit-scrollbar-thumb:hover{background-color:var(--color-hover-primary)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-content.sc-z-select{display:block;padding:calc(var(--space-unit) * 0.5) calc(var(--space-unit) * 1.5)}[size=\"x-small\"].sc-z-select-h .select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-content.sc-z-select{padding:0 calc(var(--space-unit) * 1.5)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-content.selected.sc-z-select{font-weight:bold}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select .no-results.sc-z-select z-icon.sc-z-select{margin-right:var(--space-unit)}.z-list-group-title.sc-z-select{color:var(--gray800)}.reset-item.sc-z-select{color:var(--color-primary01);fill:var(--color-primary01)}.reset-item-content.sc-z-select{display:flex;align-items:center}.reset-item.reset-item-margin.sc-z-select .reset-item-content.sc-z-select{margin-left:calc(var(--space-unit))}.reset-item.sc-z-select .reset-item-content.sc-z-select>z-icon.sc-z-select{margin-right:var(--space-unit)}.reset-item.hide.sc-z-select{display:none}";
|
|
7
|
+
|
|
8
|
+
const ZSelect = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
registerInstance(this, hostRef);
|
|
11
|
+
this.optionSelect = createEvent(this, "optionSelect", 7);
|
|
12
|
+
this.resetSelect = createEvent(this, "resetSelect", 7);
|
|
13
|
+
/** the id of the input element */
|
|
14
|
+
this.htmlid = `id-${randomId()}`;
|
|
15
|
+
/** the input aria-label */
|
|
16
|
+
this.ariaLabel = "";
|
|
17
|
+
/** the input is disabled */
|
|
18
|
+
this.disabled = false;
|
|
19
|
+
/** the input is readonly */
|
|
20
|
+
this.readonly = false;
|
|
21
|
+
/** input helper message (optional) - if set to `false` message won't be displayed */
|
|
22
|
+
this.message = true;
|
|
23
|
+
/** the input has autocomplete option */
|
|
24
|
+
this.autocomplete = false;
|
|
25
|
+
/** no result text message */
|
|
26
|
+
this.noresultslabel = "Nessun risultato";
|
|
27
|
+
/** When fixed, it occupies space and pushes down next elements. */
|
|
28
|
+
this.isfixed = false;
|
|
29
|
+
/** Available sizes: `big`, `small` and `x-small`. Defaults to `big`. */
|
|
30
|
+
this.size = ControlSize.BIG;
|
|
31
|
+
this.isOpen = false;
|
|
32
|
+
this.selectedItem = null;
|
|
33
|
+
this.itemsList = [];
|
|
34
|
+
this.toggleSelectUl = this.toggleSelectUl.bind(this);
|
|
35
|
+
this.selectItem = this.selectItem.bind(this);
|
|
36
|
+
this.handleSelectFocus = this.handleSelectFocus.bind(this);
|
|
37
|
+
}
|
|
38
|
+
watchItems() {
|
|
39
|
+
this.itemsList = this.getInitialItemsArray();
|
|
40
|
+
this.selectedItem = this.itemsList.find((item) => item.selected);
|
|
41
|
+
}
|
|
42
|
+
/** get the input selected options */
|
|
43
|
+
async getSelectedItem() {
|
|
44
|
+
return this.selectedItem;
|
|
45
|
+
}
|
|
46
|
+
/** get the input value */
|
|
47
|
+
async getValue() {
|
|
48
|
+
return this.getSelectedValue();
|
|
49
|
+
}
|
|
50
|
+
/** set the input value */
|
|
51
|
+
async setValue(value) {
|
|
52
|
+
let values = [];
|
|
53
|
+
if (typeof value === "string") {
|
|
54
|
+
values.push(value);
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
values = value;
|
|
58
|
+
}
|
|
59
|
+
this.selectedItem = this.itemsList.find((item) => values.includes(item.id));
|
|
60
|
+
}
|
|
61
|
+
emitOptionSelect() {
|
|
62
|
+
this.optionSelect.emit({
|
|
63
|
+
id: this.htmlid,
|
|
64
|
+
selected: this.getSelectedValue(),
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
emitResetSelect() {
|
|
68
|
+
this.resetSelect.emit({
|
|
69
|
+
id: this.htmlid,
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
componentWillLoad() {
|
|
73
|
+
this.watchItems();
|
|
74
|
+
}
|
|
75
|
+
componentWillRender() {
|
|
76
|
+
this.filterItems(this.searchString);
|
|
77
|
+
}
|
|
78
|
+
getInitialItemsArray() {
|
|
79
|
+
return typeof this.items === "string" ? JSON.parse(this.items) : this.items;
|
|
80
|
+
}
|
|
81
|
+
mapSelectedItemToItemsArray() {
|
|
82
|
+
const initialItemsList = this.getInitialItemsArray();
|
|
83
|
+
return initialItemsList.map((item) => {
|
|
84
|
+
var _a;
|
|
85
|
+
item.selected = item.id === ((_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.id);
|
|
86
|
+
return item;
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
getSelectedValue() {
|
|
90
|
+
var _a;
|
|
91
|
+
return (_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.id;
|
|
92
|
+
}
|
|
93
|
+
filterItems(searchString) {
|
|
94
|
+
const prevList = this.mapSelectedItemToItemsArray();
|
|
95
|
+
if (!(searchString === null || searchString === void 0 ? void 0 : searchString.length)) {
|
|
96
|
+
this.itemsList = prevList;
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
this.itemsList = prevList
|
|
100
|
+
.filter((item) => {
|
|
101
|
+
return item.name.toUpperCase().includes(searchString.toUpperCase());
|
|
102
|
+
})
|
|
103
|
+
.map((item) => {
|
|
104
|
+
const start = item.name.toUpperCase().indexOf(searchString.toUpperCase());
|
|
105
|
+
const end = start + searchString.length;
|
|
106
|
+
const newName = item.name.substring(0, start) +
|
|
107
|
+
`<strong>${item.name.substring(start, end)}</strong>` +
|
|
108
|
+
item.name.substring(end, item.name.length);
|
|
109
|
+
item.name = newName;
|
|
110
|
+
return item;
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
hasAutocomplete() {
|
|
115
|
+
return boolean(this.autocomplete) === true;
|
|
116
|
+
}
|
|
117
|
+
handleInputChange(e) {
|
|
118
|
+
this.searchString = e.detail.value;
|
|
119
|
+
if (!this.isOpen) {
|
|
120
|
+
this.toggleSelectUl();
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
selectItem(item, selected) {
|
|
124
|
+
if (item && item.disabled) {
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
this.itemsList = this.mapSelectedItemToItemsArray();
|
|
128
|
+
this.itemsList = this.itemsList.map((i) => {
|
|
129
|
+
i.selected = false;
|
|
130
|
+
if (i.id === (item === null || item === void 0 ? void 0 : item.id)) {
|
|
131
|
+
i.selected = selected;
|
|
132
|
+
}
|
|
133
|
+
return i;
|
|
134
|
+
});
|
|
135
|
+
this.selectedItem = this.itemsList.find((item) => item.selected);
|
|
136
|
+
this.emitOptionSelect();
|
|
137
|
+
if (this.searchString) {
|
|
138
|
+
this.searchString = null;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
arrowsSelectNav(e, key) {
|
|
142
|
+
const showResetIcon = this.resetItem && !!this.selectedItem;
|
|
143
|
+
const arrows = [KeyboardCode.ARROW_DOWN, KeyboardCode.ARROW_UP];
|
|
144
|
+
if (!arrows.includes(e.key)) {
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
e.preventDefault();
|
|
148
|
+
e.stopPropagation();
|
|
149
|
+
if (!this.isOpen) {
|
|
150
|
+
this.toggleSelectUl();
|
|
151
|
+
}
|
|
152
|
+
let index;
|
|
153
|
+
if (this.resetItem) {
|
|
154
|
+
if (e.key === KeyboardCode.ARROW_DOWN) {
|
|
155
|
+
index = key + 1 === this.itemsList.length + 1 ? +!showResetIcon : key + 1;
|
|
156
|
+
}
|
|
157
|
+
else if (e.key === KeyboardCode.ARROW_UP) {
|
|
158
|
+
index = key <= +!showResetIcon ? this.itemsList.length : key - 1;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
if (!this.resetItem) {
|
|
162
|
+
if (e.key === KeyboardCode.ARROW_DOWN) {
|
|
163
|
+
index = key + 1 === this.itemsList.length ? 0 : key + 1;
|
|
164
|
+
}
|
|
165
|
+
else if (e.key === KeyboardCode.ARROW_UP) {
|
|
166
|
+
index = key <= 0 ? this.itemsList.length - 1 : key - 1;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
this.focusSelectItem(index);
|
|
170
|
+
}
|
|
171
|
+
focusSelectItem(index) {
|
|
172
|
+
const focusElem = this.element.querySelector(`#${this.htmlid}_${index}`);
|
|
173
|
+
if (focusElem) {
|
|
174
|
+
focusElem.focus();
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
toggleSelectUl(selfFocusOnClose = false) {
|
|
178
|
+
if (this.disabled || this.readonly) {
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
if (!this.isOpen) {
|
|
182
|
+
document.addEventListener("click", this.handleSelectFocus);
|
|
183
|
+
document.addEventListener("keyup", this.handleSelectFocus);
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
document.removeEventListener("click", this.handleSelectFocus);
|
|
187
|
+
document.removeEventListener("keyup", this.handleSelectFocus);
|
|
188
|
+
if (selfFocusOnClose) {
|
|
189
|
+
this.element.querySelector(`#${this.htmlid}_input`).focus();
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
this.isOpen = !this.isOpen;
|
|
193
|
+
}
|
|
194
|
+
handleInputClick(e) {
|
|
195
|
+
const cp = e.composedPath();
|
|
196
|
+
const clearIcon = cp.find((item) => item.classList && item.classList.contains("reset-icon"));
|
|
197
|
+
if (clearIcon) {
|
|
198
|
+
e.stopPropagation();
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
this.toggleSelectUl();
|
|
202
|
+
}
|
|
203
|
+
handleSelectFocus(e) {
|
|
204
|
+
if (e instanceof KeyboardEvent && e.key === KeyboardCode.ESC) {
|
|
205
|
+
e.stopPropagation();
|
|
206
|
+
return this.toggleSelectUl(true);
|
|
207
|
+
}
|
|
208
|
+
if (e instanceof KeyboardEvent && e.key !== KeyboardCode.TAB && e.key !== KeyboardCode.ENTER) {
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
const tree = getElementTree(getClickedElement());
|
|
212
|
+
const parent = tree.find((elem) => {
|
|
213
|
+
return elem.nodeName.toLowerCase() === "z-input" && elem.id === `${this.htmlid}_input`;
|
|
214
|
+
});
|
|
215
|
+
if (!parent) {
|
|
216
|
+
this.toggleSelectUl(e instanceof MouseEvent ? true : false);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
scrollToLetter(letter) {
|
|
220
|
+
const foundItem = this.itemsList.find((item) => item.name.charAt(0) === letter);
|
|
221
|
+
if (foundItem) {
|
|
222
|
+
this.focusSelectItem(this.itemsList.indexOf(foundItem));
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
renderInput() {
|
|
226
|
+
return (h("z-input", { class: {
|
|
227
|
+
"active-select": this.isOpen,
|
|
228
|
+
"cursor-select": !this.autocomplete,
|
|
229
|
+
}, id: `${this.htmlid}_input`, htmlid: `${this.htmlid}_input`, placeholder: this.placeholder, value: !this.isOpen && this.selectedItem ? this.selectedItem.name.replace(/<[^>]+>/g, "") : null, label: this.label, "aria-label": this.ariaLabel, icon: this.isOpen ? "caret-up" : "caret-down", hasclearicon: this.hasAutocomplete(), message: false, disabled: this.disabled, readonly: this.readonly || (!this.hasAutocomplete() && this.isOpen), status: this.isOpen ? undefined : this.status, autocomplete: "off", size: this.size, onClick: (e) => {
|
|
230
|
+
this.handleInputClick(e);
|
|
231
|
+
}, onKeyUp: (e) => {
|
|
232
|
+
if (e.keyCode !== 13) {
|
|
233
|
+
e.preventDefault();
|
|
234
|
+
}
|
|
235
|
+
handleKeyboardSubmit(e, this.toggleSelectUl);
|
|
236
|
+
}, onKeyDown: (e) => {
|
|
237
|
+
return this.arrowsSelectNav(e, this.selectedItem ? this.itemsList.indexOf(this.selectedItem) : this.resetItem ? 0 : -1);
|
|
238
|
+
}, onInputChange: (e) => {
|
|
239
|
+
this.handleInputChange(e);
|
|
240
|
+
}, onKeyPress: (e) => {
|
|
241
|
+
if (!this.hasAutocomplete()) {
|
|
242
|
+
e.preventDefault();
|
|
243
|
+
this.scrollToLetter(String.fromCharCode(e.keyCode));
|
|
244
|
+
}
|
|
245
|
+
} }));
|
|
246
|
+
}
|
|
247
|
+
renderSelectUl() {
|
|
248
|
+
var _a;
|
|
249
|
+
return (h("div", { class: this.isOpen ? "open" : "closed", tabindex: "-1" }, h("div", { class: {
|
|
250
|
+
"ul-scroll-wrapper": true,
|
|
251
|
+
"fixed": this.isfixed,
|
|
252
|
+
}, tabindex: "-1" }, h("z-list", { role: "listbox", tabindex: this.disabled || this.readonly || !this.isOpen ? -1 : 0, id: this.htmlid, "aria-activedescendant": (_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.id, "aria-multiselectable": false, size: this.listSizeType(), class: {
|
|
253
|
+
disabled: this.disabled,
|
|
254
|
+
readonly: this.readonly,
|
|
255
|
+
filled: !!this.selectedItem,
|
|
256
|
+
[`input-${this.status}`]: !this.isOpen && !!this.status,
|
|
257
|
+
} }, this.resetItem && this.renderResetItem(), this.renderSelectUlItems()))));
|
|
258
|
+
}
|
|
259
|
+
renderResetItem() {
|
|
260
|
+
return (h("z-list-element", { class: {
|
|
261
|
+
"hide": !this.selectedItem || !this.resetItem,
|
|
262
|
+
"reset-item": true,
|
|
263
|
+
"reset-item-margin": !this.hasGroupItems,
|
|
264
|
+
}, clickable: true, disabled: false, dividerType: ListDividerType.ELEMENT, role: "option", tabindex: "0", "aria-selected": "false", id: `${this.htmlid}_${this.resetItem ? "0" : "none"}`, size: this.listSizeType(), onClickItem: () => {
|
|
265
|
+
this.selectedItem = null;
|
|
266
|
+
this.searchString = null;
|
|
267
|
+
this.emitResetSelect();
|
|
268
|
+
}, onKeyDown: (e) => this.arrowsSelectNav(e, 0) }, h("div", { class: "reset-item-content" }, h("z-icon", { name: "multiply-circled" }), h("span", null, this.resetItem))));
|
|
269
|
+
}
|
|
270
|
+
renderItem(item, key, lastItem) {
|
|
271
|
+
return (h("z-list-element", { clickable: !item.disabled, disabled: item.disabled, dividerType: lastItem ? ListDividerType.HEADER : ListDividerType.ELEMENT, role: "option", tabindex: item.disabled || !this.isOpen ? -1 : 0, "aria-selected": !!item.selected, id: `${this.htmlid}_${key}`, size: this.listSizeType(), onClickItem: () => this.selectItem(item, true), onKeyDown: (e) => this.arrowsSelectNav(e, key) }, h("span", { class: {
|
|
272
|
+
"selected": !!item.selected,
|
|
273
|
+
"list-element-content": true,
|
|
274
|
+
}, innerHTML: item.name })));
|
|
275
|
+
}
|
|
276
|
+
listSizeType() {
|
|
277
|
+
if (this.size === ControlSize.SMALL || this.size === ControlSize.X_SMALL) {
|
|
278
|
+
return ListSize.SMALL;
|
|
279
|
+
}
|
|
280
|
+
return ListSize.MEDIUM;
|
|
281
|
+
}
|
|
282
|
+
renderSelectUlItems() {
|
|
283
|
+
if (!this.itemsList.length) {
|
|
284
|
+
return this.renderNoSearchResults();
|
|
285
|
+
}
|
|
286
|
+
if (this.hasGroupItems) {
|
|
287
|
+
return this.renderSelectGroupItems();
|
|
288
|
+
}
|
|
289
|
+
return this.itemsList.map((item, key, array) => {
|
|
290
|
+
const lastItem = array.length === key + 1;
|
|
291
|
+
const itemKey = this.resetItem ? key + 1 : key;
|
|
292
|
+
return this.renderItem(item, itemKey, lastItem);
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
renderSelectGroupItems() {
|
|
296
|
+
const newData = this.itemsList.reduce((group, item, index, array) => {
|
|
297
|
+
var _a;
|
|
298
|
+
const { category } = item;
|
|
299
|
+
const lastItem = array.length === index + 1;
|
|
300
|
+
const itemKey = this.resetItem ? index + 1 : index;
|
|
301
|
+
const zListItem = this.renderItem(item, itemKey, lastItem);
|
|
302
|
+
group[category] = (_a = group[category]) !== null && _a !== void 0 ? _a : [];
|
|
303
|
+
group[category].push(zListItem);
|
|
304
|
+
return group;
|
|
305
|
+
}, {});
|
|
306
|
+
return Object.entries(newData).map(([key, value]) => {
|
|
307
|
+
return (h("z-list-group", { "divider-type": ListDividerType.ELEMENT }, h("span", { class: "body-3-sb z-list-group-title", slot: "header-title" }, key), value.map((item) => item)));
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
renderNoSearchResults() {
|
|
311
|
+
return (h("z-list-element", { color: "blue500", class: "no-results", size: this.listSizeType() }, h("z-icon", { name: "multiply-circle", fill: "blue500" }), this.noresultslabel));
|
|
312
|
+
}
|
|
313
|
+
renderMessage() {
|
|
314
|
+
if (boolean(this.message) === false) {
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
return (h("z-input-message", { message: boolean(this.message) === true ? undefined : this.message, status: this.status, class: this.size }));
|
|
318
|
+
}
|
|
319
|
+
render() {
|
|
320
|
+
return (h("div", { class: "select-wrapper" }, this.renderInput(), this.renderSelectUl(), this.renderMessage()));
|
|
321
|
+
}
|
|
322
|
+
get element() { return getElement(this); }
|
|
323
|
+
static get watchers() { return {
|
|
324
|
+
"items": ["watchItems"]
|
|
325
|
+
}; }
|
|
326
|
+
};
|
|
327
|
+
ZSelect.style = stylesCss;
|
|
328
|
+
|
|
329
|
+
export { ZSelect as z_select };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-a2ca4b97.js';
|
|
2
|
-
import {
|
|
2
|
+
import { d as getElementTree, a as handleKeyboardSubmit } from './utils-4d2d99d9.js';
|
|
3
3
|
import { T as ThemeVariant } from './index-03c8b0f0.js';
|
|
4
4
|
import './breakpoints-9b81eb1b.js';
|
|
5
5
|
|
|
6
|
-
const stylesCss = ".sc-z-skip-to-content-h{position:absolute;left:-100%;height:60px;box-sizing:border-box;padding:calc(var(--space-unit) * 1.25) calc(var(--space-unit) * 3);background-color:#24f4ff;font-family:var(--font-family-sans);font-weight:var(--font-rg)}.skip-to-content-visible.sc-z-skip-to-content-h,.sc-z-skip-to-content-h:focus{position:static;display:block}.sc-z-skip-to-content-h
|
|
6
|
+
const stylesCss = ".sc-z-skip-to-content-h{position:absolute;left:-100%;height:60px;box-sizing:border-box;padding:calc(var(--space-unit) * 1.25) calc(var(--space-unit) * 3);background-color:#24f4ff;font-family:var(--font-family-sans);font-weight:var(--font-rg);text-align:center}.sc-z-skip-to-content-h>.link-container.sc-z-skip-to-content{display:inline-flex;height:100%;align-items:center}.skip-to-content-visible.sc-z-skip-to-content-h,.sc-z-skip-to-content-h:focus{position:static;display:block}.sc-z-skip-to-content-h>.link-container.sc-z-skip-to-content>a.z-link.link-invisible.sc-z-skip-to-content{overflow:hidden;width:0;height:0}.sc-z-skip-to-content-h>.link-container.sc-z-skip-to-content>a.z-link.link-visible.sc-z-skip-to-content{width:initial;height:initial}.dark.sc-z-skip-to-content-h{background-color:var(--bg-grey-800);color:var(--color-white)}.light.sc-z-skip-to-content-h{border:2px solid var(--text-grey-800);background-color:var(--bg-white);color:var(--text-grey-800)}@media (min-width: 768px){.sc-z-skip-to-content-h{text-align:start}}@media (min-width: 1152px){.sc-z-skip-to-content-h>.link-container.sc-z-skip-to-content{padding:0 calc(var(--space-unit) * 3);border-right:1px solid var(--bg-grey-800)}.sc-z-skip-to-content-h>.link-container.sc-z-skip-to-content>a.z-link.link-invisible.sc-z-skip-to-content{overflow:initial;width:initial;height:initial}.sc-z-skip-to-content-h>.link-container.sc-z-skip-to-content:first-child{padding-left:0}.sc-z-skip-to-content-h>.link-container.sc-z-skip-to-content:last-child,.dark.sc-z-skip-to-content-h>.link-container.sc-z-skip-to-content:last-child,.light.sc-z-skip-to-content-h>.link-container.sc-z-skip-to-content:last-child{padding-right:0;border-right:none}.dark.sc-z-skip-to-content-h>.link-container.sc-z-skip-to-content{border-right:1px solid var(--bg-white)}}";
|
|
7
7
|
|
|
8
8
|
const ZSkipToContent = class {
|
|
9
9
|
constructor(hostRef) {
|
|
@@ -52,7 +52,15 @@ const ZSkipToContent = class {
|
|
|
52
52
|
"skip-to-content-visible": this.visible,
|
|
53
53
|
} }, this.links.map((link, i) => {
|
|
54
54
|
const id = `skip-to-content-${i}`;
|
|
55
|
-
return (h("
|
|
55
|
+
return (h("div", { class: "link-container" }, h("a", { id: id, class: {
|
|
56
|
+
"body-1-sb": true,
|
|
57
|
+
"z-link": true,
|
|
58
|
+
"z-link-underline": true,
|
|
59
|
+
"z-link-white": this.variant === ThemeVariant.DARK,
|
|
60
|
+
"z-link-black": this.variant !== ThemeVariant.DARK,
|
|
61
|
+
"link-visible": id == this.visibleLink,
|
|
62
|
+
"link-invisible": id != this.visibleLink,
|
|
63
|
+
}, "aria-label": link.ariaLabel || link.label, href: link.href, onFocus: () => (this.visibleLink = id), onClick: () => this.handleLinkClick(), onKeyUp: (e) => handleKeyboardSubmit(e, this.handleLinkClick.bind(this)) }, link.label)));
|
|
56
64
|
})));
|
|
57
65
|
}
|
|
58
66
|
get hostElement() { return getElement(this); }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h, g as getElement } from './index-a2ca4b97.js';
|
|
2
2
|
import { p as Device } from './index-03c8b0f0.js';
|
|
3
|
-
import { f as convertJson,
|
|
3
|
+
import { f as convertJson, g as getDevice, a as handleKeyboardSubmit } from './utils-4d2d99d9.js';
|
|
4
4
|
import './breakpoints-9b81eb1b.js';
|
|
5
5
|
|
|
6
6
|
const stylesCss = ":host{display:block;width:inherit;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>div{display:flex;width:inherit;flex-direction:column}main{position:relative;overflow:hidden;width:100%}main z-icon.scroll{position:absolute;z-index:10;top:50%;width:auto;margin:0 var(--space-unit);cursor:pointer;fill:var(--color-primary01);transition:0.6s ease}main .scroll.disabled{opacity:0.5;pointer-events:none}main .scroll.right{right:0}#slides{display:flex;flex-wrap:wrap;line-height:0px;overflow-y:hidden;transition:all 300ms}footer{display:grid;width:100%;height:56px;align-items:center;border-top:var(--border-base) solid var(--color-surface02);grid-template:2 / 2;grid-template-areas:\"center center\" \"left right\"}footer>div{width:100%;align-items:center}footer .footer-center{grid-area:center}footer .footer-left{grid-area:left}footer .footer-right{grid-area:right}footer .bullet-container{display:flex;min-height:60px;align-items:center;justify-content:center;margin:0 auto}footer .bullet-container .bullet{width:8px;height:8px;margin:var(--space-unit) 2px;background-color:var(--bg-neutral-150);border-radius:50%;pointer-events:none}footer .bullet-container .bullet.selected{background-color:var(--bg-neutral-400)}@media only screen and (min-width: 768px){footer{height:76px;border-top:var(--border-base) solid var(--color-surface02);grid-template:1 / 1fr 2fr 1fr;grid-template-areas:\"left center right\"}footer .bullet-container .bullet{width:10px;height:10px;margin:var(--space-unit) 3px}}@media only screen and (min-width: 1025px){main z-icon.scroll{margin:0 10px}footer .bullet-container .bullet{width:16px;height:16px;margin:var(--space-unit) calc(var(--space-unit) * 0.5);cursor:pointer;pointer-events:auto}}";
|
|
@@ -7,11 +7,11 @@ import './index-2cdac489.js';
|
|
|
7
7
|
import './index-83736b34.js';
|
|
8
8
|
import './index-f98f4ad3.js';
|
|
9
9
|
import './index-0e0fa88d.js';
|
|
10
|
-
import './index-
|
|
10
|
+
import './index-d3dfe710.js';
|
|
11
11
|
import './index-e2c8b8b5.js';
|
|
12
12
|
import './index-c84fca22.js';
|
|
13
13
|
import './index-1ae1c122.js';
|
|
14
|
-
import './utils-
|
|
14
|
+
import './utils-4d2d99d9.js';
|
|
15
15
|
|
|
16
16
|
const stylesCss = "z-table-deprecated{display:block;width:100%;background-color:var(--color-white);font-family:var(--dashboard-font);font-weight:var(--font-rg);overflow-x:auto}z-table-deprecated>div.table{display:table;width:100%;border-collapse:separate}z-table-deprecated>div.table-bordered>z-table-body>z-table-row>z-table-cell:not(:last-child),z-table-deprecated>div.table-bordered>z-table-head>z-table-header-row>z-table-header:not(:last-child){border-right:var(--border-size-small) solid var(--bg-grey-200)}z-table-deprecated>div>z-table-body>z-table-row[expandable]>z-table-cell:first-child,z-table-deprecated>div>z-table-head>z-table-header-row[expandable]>z-table-header:first-child{border-right:none}z-table-deprecated>div>z-table-body>z-table-row[expanded]>z-table-cell{background-color:var(--gray50)}z-table-deprecated>div>z-table-body>z-table-row[expanded]+z-table-expanded-row{border-bottom:1px solid var(--gray200)}z-table-deprecated>div.table-column-sticky>z-table-body>z-table-row>z-table-cell:first-child,z-table-deprecated>div.table-column-sticky>z-table-head>z-table-header-row>z-table-header:first-child{position:sticky;z-index:1;left:0;box-shadow:1px 0 4px -1px rgb(66 69 72 / 40%)}z-table-deprecated>div.table-header-sticky>z-table-head>z-table-header-row>z-table-header{position:sticky;z-index:2;top:0;box-shadow:0 2px 3px -3px rgb(66 69 72 / 40%)}z-table-deprecated>div.table-header-sticky>z-table-head>z-table-header-row>z-table-header:first-child,z-table-deprecated>div.table-column-sticky>z-table-head>z-table-header-row>z-table-header:first-child{z-index:5}z-table-body{width:auto;background-color:var(--color-white)}z-table-empty-box{display:flex;flex-direction:column;flex-grow:1;border-bottom:var(--border-size-small) solid var(--bg-grey-200)}z-table-empty-box.bordered{border-left:var(--border-size-small) solid var(--bg-grey-200)}.error-message{margin-top:calc(var(--space-unit) * 2)}.table-content{display:flex;width:100%;flex-direction:row}.error-content{display:flex;padding:calc(var(--space-unit) * 3);font-family:var(--dashboard-font)}.error-content>img{width:244px;height:188px;margin-right:calc(var(--space-unit) * 3)}@media only screen and (max-width: 768px){z-table-deprecated>div.table-empty{display:none}.error-content{display:flex;flex-direction:column}.error-content>img{width:auto;height:auto}.text{padding:calc(var(--space-unit) * 3) 0}}";
|
|
17
17
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { Z as z_table_header } from './index-
|
|
1
|
+
export { Z as z_table_header } from './index-d3dfe710.js';
|
|
2
2
|
import './index-a2ca4b97.js';
|
|
3
3
|
import './index-03c8b0f0.js';
|
|
4
|
-
import './utils-
|
|
4
|
+
import './utils-4d2d99d9.js';
|
|
5
5
|
import './breakpoints-9b81eb1b.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-a2ca4b97.js';
|
|
2
2
|
import './index-6d83248c.js';
|
|
3
3
|
import './index-f171ca51.js';
|
|
4
|
-
import './index-
|
|
4
|
+
import './index-1b2e3e53.js';
|
|
5
5
|
import './index-8c7b48bc.js';
|
|
6
|
-
import './utils-
|
|
6
|
+
import './utils-4d2d99d9.js';
|
|
7
7
|
import './index-03c8b0f0.js';
|
|
8
8
|
import './breakpoints-9b81eb1b.js';
|
|
9
9
|
import './index-49dfba34.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-a2ca4b97.js';
|
|
2
|
-
import { r as randomId } from './utils-
|
|
2
|
+
import { r as randomId } from './utils-4d2d99d9.js';
|
|
3
3
|
import { k as LabelPosition } from './index-03c8b0f0.js';
|
|
4
4
|
import './breakpoints-9b81eb1b.js';
|
|
5
5
|
|
package/dist/esm/z-tr.entry.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { Z as z_tr } from './index-
|
|
1
|
+
export { Z as z_tr } from './index-1b2e3e53.js';
|
|
2
2
|
import './index-a2ca4b97.js';
|
|
3
|
-
import './utils-
|
|
3
|
+
import './utils-4d2d99d9.js';
|
|
4
4
|
import './index-03c8b0f0.js';
|
|
5
5
|
import './breakpoints-9b81eb1b.js';
|
|
6
6
|
import './index-49dfba34.js';
|
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
import { NavigationTabsOrientation, NavigationTabsSize } from "../../../../beans";
|
|
2
2
|
/**
|
|
3
3
|
* Single tab component to use inside `z-navigation-tabs`. It renders a button.
|
|
4
|
+
* This component uses the `tab` role:
|
|
5
|
+
* @link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/tab_role
|
|
4
6
|
*/
|
|
5
7
|
export declare class ZNavigationTab {
|
|
6
8
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
+
* `aria-controls` attribute of the tab.
|
|
10
|
+
* Identifies the element (with `role=tabpanel`) whose contents or presence are controlled by this tab.
|
|
11
|
+
* The value must be the `id` of the element it controls.
|
|
12
|
+
* @link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-controls
|
|
9
13
|
*/
|
|
10
14
|
ariaControls?: string;
|
|
11
15
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
16
|
+
* `id` attribute of the tab.
|
|
17
|
+
* Set this id to the `aria-labelledby` attribute of the controlled `tabpanel` element.
|
|
18
|
+
* @link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-labelledby
|
|
19
|
+
* @deprecated Use native `id` attribute instead
|
|
14
20
|
*/
|
|
15
21
|
tabId?: string;
|
|
16
22
|
/**
|
|
@@ -58,5 +64,5 @@ export declare class ZNavigationTab {
|
|
|
58
64
|
* @returns {HTMLElement}
|
|
59
65
|
*/
|
|
60
66
|
private renderIcon;
|
|
61
|
-
render():
|
|
67
|
+
render(): HTMLZNavigationTabElement;
|
|
62
68
|
}
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
import { NavigationTabsOrientation, NavigationTabsSize } from "../../../../beans";
|
|
2
2
|
/**
|
|
3
3
|
* Single tab component to use inside `z-navigation-tabs`. It renders an anchor element.
|
|
4
|
+
* This component uses the `tab` role:
|
|
5
|
+
* @link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/tab_role
|
|
4
6
|
*/
|
|
5
7
|
export declare class ZNavigationTabLink {
|
|
6
8
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
9
|
+
* `aria-controls` attribute of the tab.
|
|
10
|
+
* Identifies the element (with `role=tabpanel`) whose contents or presence are controlled by this tab.
|
|
11
|
+
* The value must be the `id` of the element it controls.
|
|
12
|
+
* @link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-controls
|
|
11
13
|
*/
|
|
12
14
|
ariaControls?: string;
|
|
13
15
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
+
* `id` attribute of the tab.
|
|
17
|
+
* Set this id to the `aria-labelledby` attribute of the controlled `tabpanel` element.
|
|
18
|
+
* @link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-labelledby
|
|
19
|
+
* @deprecated Use native `id` attribute instead
|
|
16
20
|
*/
|
|
17
21
|
tabId?: string;
|
|
18
22
|
/**
|
|
@@ -68,5 +72,5 @@ export declare class ZNavigationTabLink {
|
|
|
68
72
|
* @returns {HTMLElement}
|
|
69
73
|
*/
|
|
70
74
|
private renderIcon;
|
|
71
|
-
render():
|
|
75
|
+
render(): HTMLZNavigationTabLinkElement;
|
|
72
76
|
}
|
|
@@ -42,6 +42,7 @@ export declare class ZNavigationTabs {
|
|
|
42
42
|
* Getter for the dimension to check based on current orientation.
|
|
43
43
|
*/
|
|
44
44
|
get dimension(): string;
|
|
45
|
+
get tabs(): (HTMLZNavigationTabElement | HTMLZNavigationTabLinkElement)[];
|
|
45
46
|
/**
|
|
46
47
|
* Set the `size` prop to all `z-navigation-tab` children.
|
|
47
48
|
*/
|
|
@@ -74,15 +75,14 @@ export declare class ZNavigationTabs {
|
|
|
74
75
|
*/
|
|
75
76
|
private navigateForward;
|
|
76
77
|
/**
|
|
77
|
-
*
|
|
78
|
+
* Move focus through tabs using keyboard arrows.
|
|
79
|
+
* When `TAB` is pressed, focus the currently selected tab, if any.
|
|
78
80
|
*/
|
|
79
81
|
private navigateThroughTabs;
|
|
80
82
|
/**
|
|
81
|
-
*
|
|
83
|
+
* Check if a keyboard event was triggered by an arrow key.
|
|
82
84
|
*/
|
|
83
85
|
private isArrowNavigation;
|
|
84
|
-
private setTabindex;
|
|
85
|
-
componentWillLoad(): void;
|
|
86
86
|
componentDidRender(): void;
|
|
87
87
|
render(): HTMLZNavigationTabsElement;
|
|
88
88
|
}
|