@zanichelli/albe-web-components 19.2.6 → 19.2.7
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 +10 -0
- package/dist/cjs/index-D_S5lGcb.js +4 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/web-components-library.cjs.js +1 -1
- package/dist/cjs/z-alert.cjs.entry.js +1 -1
- package/dist/cjs/z-app-header_12.cjs.entry.js +126 -198
- package/dist/cjs/z-combobox.cjs.entry.js +5 -3
- 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-sections.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-footer.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-icon.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-info.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-list.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card_4.cjs.entry.js +4 -4
- package/dist/cjs/z-myz-list-item.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-list.cjs.entry.js +1 -1
- package/dist/cjs/z-otp.cjs.entry.js +2 -2
- package/dist/cjs/z-skip-to-content.cjs.entry.js +1 -1
- package/dist/cjs/z-stepper-item.cjs.entry.js +1 -1
- package/dist/cjs/z-stepper.cjs.entry.js +1 -1
- package/dist/cjs/z-td.cjs.entry.js +3 -3
- package/dist/cjs/z-th.cjs.entry.js +5 -3
- package/dist/cjs/z-toast-notification-list.cjs.entry.js +1 -1
- package/dist/cjs/z-toast-notification.cjs.entry.js +3 -3
- package/dist/cjs/z-toggle-button.cjs.entry.js +2 -2
- package/dist/cjs/z-toggle-switch.cjs.entry.js +3 -3
- package/dist/cjs/z-tool.cjs.entry.js +2 -2
- package/dist/cjs/z-toolbar.cjs.entry.js +1 -1
- package/dist/cjs/z-tooltip.cjs.entry.js +1 -1
- package/dist/collection/components/css-components/z-scrollbar/styles.css +40 -0
- package/dist/collection/components/table/cells/{z-td/styles.css → z-table-cells.css} +0 -1
- package/dist/collection/components/table/cells/z-td/index.js +3 -3
- package/dist/collection/components/table/cells/z-th/index.js +3 -3
- package/dist/collection/components/table/cells/z-th/styles.css +0 -72
- package/dist/collection/components/z-combobox/index.js +3 -3
- package/dist/collection/components/z-combobox/styles.css +0 -12
- package/dist/collection/components/z-input/index.js +3 -3
- package/dist/collection/components/z-input/styles-checkbox-radio.css +130 -0
- package/dist/collection/components/z-input/styles-general.css +166 -0
- package/dist/collection/components/z-input/styles-text.css +87 -0
- package/dist/collection/components/z-input/styles-textarea.css +19 -0
- package/dist/collection/components/z-searchbar/index.js +111 -193
- package/dist/collection/components/z-searchbar/index.stories.js +3 -16
- package/dist/collection/components/z-searchbar/styles.css +87 -201
- package/dist/collection/components/z-skip-to-content/index.js +1 -1
- package/dist/collection/components/z-stepper/index.js +1 -1
- package/dist/collection/components/z-stepper-item/index.js +1 -1
- package/dist/collection/components/z-toast-notification/index.js +3 -3
- package/dist/collection/components/z-toast-notification-list/index.js +1 -1
- package/dist/collection/components/z-toggle-button/index.js +2 -2
- package/dist/collection/components/z-toggle-switch/index.js +3 -3
- package/dist/collection/components/z-tool/index.js +2 -2
- package/dist/collection/components/z-toolbar/index.js +1 -1
- package/dist/collection/components/z-tooltip/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-alert/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-body/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-cover/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-dictionary/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-footer/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-footer-sections/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-header/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-icon/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-info/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-list/index.js +1 -1
- package/dist/collection/snowflakes/myz/list/z-myz-list/index.js +1 -1
- package/dist/collection/snowflakes/myz/list/z-myz-list-item/index.js +1 -1
- package/dist/collection/snowflakes/myz/z-alert/index.js +1 -1
- package/dist/collection/snowflakes/myz/z-otp/index.js +2 -2
- package/dist/components/index13.js +1 -1
- package/dist/components/index22.js +1 -1
- package/dist/components/index23.js +1 -1
- package/dist/components/index24.js +1 -1
- package/dist/components/index25.js +1 -1
- package/dist/components/index26.js +1 -1
- package/dist/components/index27.js +1 -1
- package/dist/components/index4.js +1 -1
- package/dist/components/index7.js +1 -1
- package/dist/components/z-combobox.js +1 -1
- package/dist/components/z-myz-card-alert.js +1 -1
- package/dist/components/z-myz-card-dictionary.js +1 -1
- package/dist/components/z-myz-card-footer-sections.js +1 -1
- package/dist/components/z-myz-card-footer.js +1 -1
- package/dist/components/z-myz-card-icon.js +1 -1
- package/dist/components/z-myz-card-info.js +1 -1
- package/dist/components/z-myz-card-list.js +1 -1
- package/dist/components/z-myz-list.js +1 -1
- package/dist/components/z-otp.js +1 -1
- package/dist/components/z-skip-to-content.js +1 -1
- package/dist/components/z-stepper-item.js +1 -1
- package/dist/components/z-stepper.js +1 -1
- package/dist/components/z-td.js +1 -1
- package/dist/components/z-th.js +1 -1
- package/dist/components/z-toast-notification-list.js +1 -1
- package/dist/components/z-toast-notification.js +1 -1
- package/dist/components/z-toggle-button.js +1 -1
- package/dist/components/z-toggle-switch.js +1 -1
- package/dist/components/z-tool.js +1 -1
- package/dist/components/z-toolbar.js +1 -1
- package/dist/esm/index-DPdXlnVe.js +4 -4
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-0PByxJyN.js → utils-DYd3kO0P.js} +1 -1
- package/dist/esm/web-components-library.js +1 -1
- package/dist/esm/z-alert.entry.js +1 -1
- package/dist/esm/z-app-header_12.entry.js +128 -200
- package/dist/esm/z-book-card-deprecated.entry.js +1 -1
- package/dist/esm/z-breadcrumb.entry.js +1 -1
- package/dist/esm/z-color-picker.entry.js +1 -1
- package/dist/esm/z-combobox.entry.js +6 -4
- package/dist/esm/z-menu.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-sections.entry.js +1 -1
- package/dist/esm/z-myz-card-footer.entry.js +1 -1
- package/dist/esm/z-myz-card-icon.entry.js +1 -1
- package/dist/esm/z-myz-card-info.entry.js +2 -2
- package/dist/esm/z-myz-card-list.entry.js +1 -1
- package/dist/esm/z-myz-card_4.entry.js +4 -4
- package/dist/esm/z-myz-list-item.entry.js +2 -2
- package/dist/esm/z-myz-list.entry.js +1 -1
- package/dist/esm/z-otp.entry.js +2 -2
- package/dist/esm/z-popover.entry.js +1 -1
- package/dist/esm/z-select.entry.js +1 -1
- package/dist/esm/z-skip-to-content.entry.js +2 -2
- package/dist/esm/z-slideshow.entry.js +1 -1
- package/dist/esm/z-stepper-item.entry.js +1 -1
- package/dist/esm/z-stepper.entry.js +1 -1
- package/dist/esm/z-table.entry.js +1 -1
- package/dist/esm/z-td.entry.js +3 -3
- package/dist/esm/z-th.entry.js +5 -3
- package/dist/esm/z-toast-notification-list.entry.js +1 -1
- package/dist/esm/z-toast-notification.entry.js +3 -3
- package/dist/esm/z-toggle-button.entry.js +2 -2
- package/dist/esm/z-toggle-switch.entry.js +4 -4
- package/dist/esm/z-tool.entry.js +3 -3
- package/dist/esm/z-toolbar.entry.js +1 -1
- package/dist/esm/z-tooltip.entry.js +1 -1
- package/dist/esm/z-tr.entry.js +1 -1
- package/dist/types/components/z-searchbar/index.d.ts +24 -28
- package/dist/types/components.d.ts +14 -14
- package/dist/web-components-library/index.esm.js +1 -1
- package/dist/web-components-library/{p-5fa910e4.entry.js → p-13e7f751.entry.js} +1 -1
- package/dist/web-components-library/{p-2ce3ac48.entry.js → p-14b804f9.entry.js} +1 -1
- package/dist/web-components-library/{p-45866f64.entry.js → p-1580db58.entry.js} +1 -1
- package/dist/web-components-library/{p-eed4e897.entry.js → p-1d023220.entry.js} +1 -1
- package/{www/build/p-de0b7109.entry.js → dist/web-components-library/p-299f0f85.entry.js} +1 -1
- package/dist/web-components-library/{p-d11d39f5.entry.js → p-2c036e17.entry.js} +1 -1
- package/dist/web-components-library/{p-5b9cacd7.entry.js → p-2df6d169.entry.js} +1 -1
- package/dist/web-components-library/{p-550ee6c3.entry.js → p-37e84b71.entry.js} +1 -1
- package/dist/web-components-library/{p-6fb8a984.entry.js → p-3ea03d34.entry.js} +1 -1
- package/dist/web-components-library/p-41584e90.entry.js +1 -0
- package/dist/web-components-library/p-53670be4.entry.js +1 -0
- package/dist/web-components-library/{p-7d9477ed.entry.js → p-583b8152.entry.js} +1 -1
- package/dist/web-components-library/{p-538a1bd2.entry.js → p-5d20fc3d.entry.js} +1 -1
- package/dist/web-components-library/{p-364b0ca4.entry.js → p-658f022d.entry.js} +1 -1
- package/dist/web-components-library/{p-f94c360f.entry.js → p-788eaac7.entry.js} +1 -1
- package/dist/web-components-library/{p-a40ae683.entry.js → p-8261c869.entry.js} +1 -1
- package/{www/build/p-4ae7df7f.entry.js → dist/web-components-library/p-83da1031.entry.js} +1 -1
- package/{www/build/p-c6920758.entry.js → dist/web-components-library/p-85cac60d.entry.js} +1 -1
- package/dist/web-components-library/{p-c6ae9241.entry.js → p-88a3ba7c.entry.js} +1 -1
- package/dist/web-components-library/{p-e2d94c86.entry.js → p-8a8df4f4.entry.js} +1 -1
- package/dist/web-components-library/{p-ab50e989.entry.js → p-8b026993.entry.js} +1 -1
- package/dist/web-components-library/{p-8fd25c59.entry.js → p-9d15ecdf.entry.js} +1 -1
- package/dist/web-components-library/{p-D4yqZKyM.js → p-CPsEG702.js} +1 -1
- package/dist/web-components-library/{p-f5bbcaa6.entry.js → p-a4f673f8.entry.js} +1 -1
- package/dist/web-components-library/{p-2d6a4515.entry.js → p-b6223d7e.entry.js} +1 -1
- package/dist/web-components-library/{p-7835fdda.entry.js → p-b9343431.entry.js} +1 -1
- package/dist/web-components-library/{p-c539ae57.entry.js → p-c42ddd93.entry.js} +1 -1
- package/{www/build/p-eadf2552.entry.js → dist/web-components-library/p-c4e7bd16.entry.js} +1 -1
- package/dist/web-components-library/{p-3f996a63.entry.js → p-c944a943.entry.js} +1 -1
- package/dist/web-components-library/{p-19f5fdd3.entry.js → p-cd33f4b1.entry.js} +1 -1
- package/dist/web-components-library/p-d10e6b1a.entry.js +1 -0
- package/dist/web-components-library/p-dc5ab2cc.entry.js +1 -0
- package/dist/web-components-library/p-e48497f0.entry.js +1 -0
- package/{www/build/p-19d3a16b.entry.js → dist/web-components-library/p-eddc2d19.entry.js} +1 -1
- package/dist/web-components-library/{p-91503030.entry.js → p-ef5018bb.entry.js} +1 -1
- package/dist/web-components-library/{p-7a9d19b8.entry.js → p-f7e46ef2.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-5fa910e4.entry.js → p-13e7f751.entry.js} +1 -1
- package/www/build/{p-2ce3ac48.entry.js → p-14b804f9.entry.js} +1 -1
- package/www/build/{p-45866f64.entry.js → p-1580db58.entry.js} +1 -1
- package/www/build/{p-eed4e897.entry.js → p-1d023220.entry.js} +1 -1
- package/www/build/{p-804ab9a4.js → p-23143b48.js} +1 -1
- package/{dist/web-components-library/p-de0b7109.entry.js → www/build/p-299f0f85.entry.js} +1 -1
- package/www/build/{p-d11d39f5.entry.js → p-2c036e17.entry.js} +1 -1
- package/www/build/{p-5b9cacd7.entry.js → p-2df6d169.entry.js} +1 -1
- package/www/build/{p-550ee6c3.entry.js → p-37e84b71.entry.js} +1 -1
- package/www/build/{p-6fb8a984.entry.js → p-3ea03d34.entry.js} +1 -1
- package/www/build/p-41584e90.entry.js +1 -0
- package/www/build/p-53670be4.entry.js +1 -0
- package/www/build/{p-7d9477ed.entry.js → p-583b8152.entry.js} +1 -1
- package/www/build/{p-538a1bd2.entry.js → p-5d20fc3d.entry.js} +1 -1
- package/www/build/{p-364b0ca4.entry.js → p-658f022d.entry.js} +1 -1
- package/www/build/{p-f94c360f.entry.js → p-788eaac7.entry.js} +1 -1
- package/www/build/{p-a40ae683.entry.js → p-8261c869.entry.js} +1 -1
- package/{dist/web-components-library/p-4ae7df7f.entry.js → www/build/p-83da1031.entry.js} +1 -1
- package/{dist/web-components-library/p-c6920758.entry.js → www/build/p-85cac60d.entry.js} +1 -1
- package/www/build/{p-c6ae9241.entry.js → p-88a3ba7c.entry.js} +1 -1
- package/www/build/{p-e2d94c86.entry.js → p-8a8df4f4.entry.js} +1 -1
- package/www/build/{p-ab50e989.entry.js → p-8b026993.entry.js} +1 -1
- package/www/build/{p-8fd25c59.entry.js → p-9d15ecdf.entry.js} +1 -1
- package/www/build/{p-D4yqZKyM.js → p-CPsEG702.js} +1 -1
- package/www/build/{p-f5bbcaa6.entry.js → p-a4f673f8.entry.js} +1 -1
- package/www/build/{p-2d6a4515.entry.js → p-b6223d7e.entry.js} +1 -1
- package/www/build/{p-7835fdda.entry.js → p-b9343431.entry.js} +1 -1
- package/www/build/{p-c539ae57.entry.js → p-c42ddd93.entry.js} +1 -1
- package/{dist/web-components-library/p-eadf2552.entry.js → www/build/p-c4e7bd16.entry.js} +1 -1
- package/www/build/{p-3f996a63.entry.js → p-c944a943.entry.js} +1 -1
- package/www/build/{p-19f5fdd3.entry.js → p-cd33f4b1.entry.js} +1 -1
- package/www/build/p-d10e6b1a.entry.js +1 -0
- package/www/build/p-dc5ab2cc.entry.js +1 -0
- package/www/build/p-e48497f0.entry.js +1 -0
- package/{dist/web-components-library/p-19d3a16b.entry.js → www/build/p-eddc2d19.entry.js} +1 -1
- package/www/build/{p-91503030.entry.js → p-ef5018bb.entry.js} +1 -1
- package/www/build/{p-7a9d19b8.entry.js → p-f7e46ef2.entry.js} +1 -1
- package/www/build/web-components-library.esm.js +1 -1
- package/www/index.html +1 -1
- package/dist/collection/components/z-input/styles.css +0 -406
- package/dist/web-components-library/p-32440f4c.entry.js +0 -1
- package/dist/web-components-library/p-a9f848ef.entry.js +0 -1
- package/dist/web-components-library/p-ae69bb7d.entry.js +0 -1
- package/dist/web-components-library/p-f3436721.entry.js +0 -1
- package/dist/web-components-library/p-fc15a666.entry.js +0 -1
- package/www/build/p-32440f4c.entry.js +0 -1
- package/www/build/p-a9f848ef.entry.js +0 -1
- package/www/build/p-ae69bb7d.entry.js +0 -1
- package/www/build/p-f3436721.entry.js +0 -1
- package/www/build/p-fc15a666.entry.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Host, h, } from "@stencil/core";
|
|
2
|
-
import { ButtonVariant, ControlSize,
|
|
3
|
-
import {
|
|
2
|
+
import { ButtonVariant, ControlSize, KeyboardCode, } from "../../beans";
|
|
3
|
+
import { handleEnterKeydSubmit, randomId } from "../../utils/utils";
|
|
4
4
|
/**
|
|
5
5
|
* @cssprop --z-searchbar-results-height - Max height of the results container (default: 540px)
|
|
6
6
|
* @cssprop --z-searchbar-tag-text-color - Color of tag's text (default --color-primary03);
|
|
@@ -8,7 +8,7 @@ import { getDevice, handleEnterKeydSubmit, randomId } from "../../utils/utils";
|
|
|
8
8
|
*/
|
|
9
9
|
export class ZSearchbar {
|
|
10
10
|
constructor() {
|
|
11
|
-
/**
|
|
11
|
+
/** The id of the searchbar element */
|
|
12
12
|
this.htmlid = `searchbar-${randomId()}`;
|
|
13
13
|
/** Prevent submit action */
|
|
14
14
|
this.preventSubmit = false;
|
|
@@ -22,30 +22,26 @@ export class ZSearchbar {
|
|
|
22
22
|
this.sortResultsItems = false;
|
|
23
23
|
/** Show submit button */
|
|
24
24
|
this.showSearchButton = false;
|
|
25
|
-
/**
|
|
25
|
+
/** Hide the label of the submit button, showing only the icon */
|
|
26
26
|
this.searchButtonIconOnly = false;
|
|
27
|
-
/**
|
|
27
|
+
/** Size of the `z-input` and submit `z-button` */
|
|
28
28
|
this.size = ControlSize.BIG;
|
|
29
|
-
/**
|
|
29
|
+
/** Submit `z-button` variant */
|
|
30
30
|
this.variant = ButtonVariant.PRIMARY;
|
|
31
31
|
this.searchString = this.value;
|
|
32
|
-
this.currResultsCount =
|
|
32
|
+
this.currResultsCount = this.resultsCount;
|
|
33
33
|
this.showResults = false;
|
|
34
34
|
this.isMobile = false;
|
|
35
35
|
this.resultsItemsList = null;
|
|
36
|
-
this.items = [];
|
|
37
|
-
}
|
|
38
|
-
emitSearchSubmit() {
|
|
39
|
-
this.searchSubmit.emit(this.inputRef.value);
|
|
40
|
-
}
|
|
41
|
-
emitSearchTyping(search) {
|
|
42
|
-
this.searchTyping.emit(search);
|
|
43
36
|
}
|
|
44
37
|
emitSearchItemClick(item) {
|
|
45
38
|
this.searchItemClick.emit(item);
|
|
46
39
|
this.selectedItem = item;
|
|
47
40
|
this.searchString = "";
|
|
48
41
|
}
|
|
42
|
+
emitSearchSubmit() {
|
|
43
|
+
this.searchSubmit.emit(this.inputRef.value);
|
|
44
|
+
}
|
|
49
45
|
watchItems() {
|
|
50
46
|
this.resultsItemsList = this.getResultsItemsList();
|
|
51
47
|
}
|
|
@@ -56,42 +52,17 @@ export class ZSearchbar {
|
|
|
56
52
|
this.searchString = this.value;
|
|
57
53
|
}
|
|
58
54
|
watchSearchString() {
|
|
59
|
-
this.
|
|
60
|
-
this.items = [];
|
|
55
|
+
this.searchTyping.emit(this.searchString);
|
|
61
56
|
if (!this.searchString) {
|
|
62
57
|
this.currResultsCount = this.resultsCount;
|
|
63
58
|
}
|
|
64
59
|
}
|
|
65
|
-
watchShowResults() {
|
|
66
|
-
if (!this.showResults) {
|
|
67
|
-
this.items = [];
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
disconnectedCallback() {
|
|
71
|
-
var _a;
|
|
72
|
-
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
73
|
-
}
|
|
74
|
-
componentDidLoad() {
|
|
75
|
-
this.resizeObserver = new ResizeObserver(() => {
|
|
76
|
-
if (getDevice() === Device.MOBILE && !this.isMobile) {
|
|
77
|
-
this.isMobile = true;
|
|
78
|
-
}
|
|
79
|
-
if (getDevice() !== Device.MOBILE && this.isMobile) {
|
|
80
|
-
this.isMobile = false;
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
this.resizeObserver.observe(this.element);
|
|
84
|
-
}
|
|
85
|
-
componentWillLoad() {
|
|
86
|
-
this.resultsItemsList = this.getResultsItemsList();
|
|
87
|
-
this.currResultsCount = this.resultsCount;
|
|
88
|
-
}
|
|
89
60
|
getResultsItemsList() {
|
|
90
61
|
return typeof this.resultsItems === "string" ? JSON.parse(this.resultsItems) : this.resultsItems;
|
|
91
62
|
}
|
|
92
|
-
getGroupedItems(
|
|
63
|
+
getGroupedItems() {
|
|
93
64
|
const groupedItems = {};
|
|
94
|
-
|
|
65
|
+
this.resultsItemsList.forEach((item) => {
|
|
95
66
|
var _a;
|
|
96
67
|
const key = `${item === null || item === void 0 ? void 0 : item.category}${item === null || item === void 0 ? void 0 : item.subcategory}`;
|
|
97
68
|
groupedItems[key] = (_a = groupedItems[key]) !== null && _a !== void 0 ? _a : {
|
|
@@ -121,148 +92,77 @@ export class ZSearchbar {
|
|
|
121
92
|
}
|
|
122
93
|
return groupedItems;
|
|
123
94
|
}
|
|
124
|
-
|
|
125
|
-
if (
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
return false;
|
|
129
|
-
}
|
|
130
|
-
handleStopTyping(e) {
|
|
131
|
-
e.stopPropagation();
|
|
132
|
-
this.searchString = e.detail.value;
|
|
133
|
-
if (this.selectedItem) {
|
|
134
|
-
this.selectedItem = undefined;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
handleSubmit() {
|
|
138
|
-
if (this.preventSubmit) {
|
|
95
|
+
onListItemKeyDown(e, item) {
|
|
96
|
+
if (e.key === KeyboardCode.ENTER) {
|
|
97
|
+
e.preventDefault();
|
|
98
|
+
this.emitSearchItemClick(item);
|
|
139
99
|
return;
|
|
140
100
|
}
|
|
141
|
-
this.
|
|
101
|
+
this.handleArrowsNavigation(e);
|
|
142
102
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
this.showResults = false;
|
|
148
|
-
return;
|
|
149
|
-
}
|
|
150
|
-
if (cp.find((elem) => { var _a; return (elem === null || elem === void 0 ? void 0 : elem.nodeName) === "Z-INPUT" || ((_a = elem === null || elem === void 0 ? void 0 : elem.classList) === null || _a === void 0 ? void 0 : _a.contains("results")); })) {
|
|
151
|
-
this.showResults = true;
|
|
103
|
+
onSearchHelperKeyDown(e) {
|
|
104
|
+
if (e.key === KeyboardCode.ENTER) {
|
|
105
|
+
e.preventDefault();
|
|
106
|
+
this.emitSearchSubmit();
|
|
152
107
|
return;
|
|
153
108
|
}
|
|
154
|
-
this.
|
|
155
|
-
}
|
|
156
|
-
renderInput() {
|
|
157
|
-
var _a;
|
|
158
|
-
return (h("z-input", { ref: (val) => {
|
|
159
|
-
this.inputRef = val;
|
|
160
|
-
}, htmlid: `input-${this.htmlid}`, message: false, placeholder: this.placeholder, onStopTyping: (e) => this.handleStopTyping(e), onKeyUp: (e) => {
|
|
161
|
-
handleEnterKeydSubmit(e, () => this.handleSubmit());
|
|
162
|
-
this.handleArrowsNavigation(e);
|
|
163
|
-
}, value: this.searchString || ((_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.label), size: this.size, label: this.label, "aria-label": this.htmlAriaLabel || this.placeholder }));
|
|
164
|
-
}
|
|
165
|
-
renderButton() {
|
|
166
|
-
if (!this.showSearchButton) {
|
|
167
|
-
return null;
|
|
168
|
-
}
|
|
169
|
-
const iconProp = this.searchButtonIconOnly ? { icon: "search" } : null;
|
|
170
|
-
const buttonLabel = this.searchButtonIconOnly ? "" : "CERCA";
|
|
171
|
-
const ariaLabel = this.searchButtonIconOnly ? { "aria-label": "CERCA" } : null;
|
|
172
|
-
const defaultProps = Object.assign(Object.assign({ disabled: this.preventSubmit, variant: this.variant, size: this.size, onClick: () => this.handleSubmit() }, iconProp), ariaLabel);
|
|
173
|
-
return h("z-button", Object.assign({}, defaultProps), buttonLabel);
|
|
174
|
-
}
|
|
175
|
-
renderResults() {
|
|
176
|
-
if (!this.showResults ||
|
|
177
|
-
!this.autocomplete ||
|
|
178
|
-
!this.searchString ||
|
|
179
|
-
this.searchString.length < this.autocompleteMinChars ||
|
|
180
|
-
!this.resultsItemsList) {
|
|
181
|
-
return null;
|
|
182
|
-
}
|
|
183
|
-
return (h("div", { class: "results-wrapper" }, h("div", { class: "results" }, this.renderResultsList())));
|
|
184
|
-
}
|
|
185
|
-
renderResultsList() {
|
|
186
|
-
var _a, _b;
|
|
187
|
-
if (this.preventSubmit && !((_a = this.resultsItemsList) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
188
|
-
return (h("span", { class: "item item-no-results" }, "Non abbiamo trovato risultati per ", h("b", null, this.searchString), h("br", null), h("br", null), "Cosa puoi fare?", h("ul", null, h("li", null, "Verificare di aver scritto bene"), h("li", null, "Provare a cercare un'altra parola"), h("li", null, "Provare a cercare qualcosa di pi\u00F9 generico"))));
|
|
189
|
-
}
|
|
190
|
-
return (h("z-list", { role: "listbox", id: `list-${this.htmlid}`, "aria-label": this.htmlAriaLabel || this.label }, this.renderSearchHelper(!!((_b = this.resultsItemsList) === null || _b === void 0 ? void 0 : _b.length)), this.renderItems(), this.renderShowAllResults()));
|
|
191
|
-
}
|
|
192
|
-
renderItems() {
|
|
193
|
-
var _a;
|
|
194
|
-
if (!((_a = this.resultsItemsList) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
195
|
-
return [];
|
|
196
|
-
}
|
|
197
|
-
const groupedItems = this.getGroupedItems(this.resultsItemsList);
|
|
198
|
-
const listGroups = [];
|
|
199
|
-
let counter = 0;
|
|
200
|
-
Object.values(groupedItems).forEach((groupItem, index, array) => {
|
|
201
|
-
if (this.checkResultsCount(counter)) {
|
|
202
|
-
const listGroupsElements = [];
|
|
203
|
-
groupItem.items.forEach((item, subindex, subarray) => {
|
|
204
|
-
if (this.checkResultsCount(counter)) {
|
|
205
|
-
const isLast = index === array.length - 1 && subindex === subarray.length - 1;
|
|
206
|
-
listGroupsElements.push(this.renderItem(item, subindex, !isLast));
|
|
207
|
-
}
|
|
208
|
-
counter++;
|
|
209
|
-
});
|
|
210
|
-
if (listGroupsElements.length) {
|
|
211
|
-
listGroups.push(h("z-list-group", { "divider-type": ListDividerType.ELEMENT }, this.renderItemCategory(groupItem), listGroupsElements));
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
});
|
|
215
|
-
return listGroups;
|
|
109
|
+
this.handleArrowsNavigation(e);
|
|
216
110
|
}
|
|
217
111
|
handleArrowsNavigation(e) {
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
if (!arrows.includes(e.key)) {
|
|
221
|
-
e.preventDefault();
|
|
112
|
+
var _a, _b, _c, _d, _e, _f;
|
|
113
|
+
if (![KeyboardCode.ARROW_DOWN, KeyboardCode.ARROW_UP].includes(e.key)) {
|
|
222
114
|
return;
|
|
223
115
|
}
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
return;
|
|
228
|
-
}
|
|
229
|
-
this.items = Array.from(list.querySelectorAll(".list-element"));
|
|
230
|
-
}
|
|
231
|
-
this.items.forEach((item) => {
|
|
232
|
-
item.classList.toggle("focused", false);
|
|
233
|
-
});
|
|
234
|
-
const currentIndex = this.items.indexOf(currentElement);
|
|
116
|
+
const currentElement = e.target;
|
|
117
|
+
const items = Array.from((_b = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll("z-list .list-item")) !== null && _b !== void 0 ? _b : []);
|
|
118
|
+
const currentIndex = items.indexOf(currentElement);
|
|
235
119
|
if (e.key === KeyboardCode.ARROW_DOWN) {
|
|
236
120
|
e.preventDefault();
|
|
237
121
|
const nextIndex = currentIndex + 1;
|
|
238
|
-
if (nextIndex <
|
|
239
|
-
|
|
240
|
-
this.items[nextIndex].classList.add("focused");
|
|
122
|
+
if (nextIndex < items.length) {
|
|
123
|
+
items[nextIndex].focus();
|
|
241
124
|
}
|
|
242
125
|
}
|
|
243
126
|
if (e.key === KeyboardCode.ARROW_UP) {
|
|
244
127
|
e.preventDefault();
|
|
245
128
|
const prevIndex = currentIndex - 1;
|
|
246
129
|
if (prevIndex < 0) {
|
|
247
|
-
this.
|
|
248
|
-
this.
|
|
249
|
-
.querySelector("input")
|
|
250
|
-
.setSelectionRange(this.inputRef.value.length, this.inputRef.value.length);
|
|
130
|
+
(_d = (_c = this.host.shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelector("input")) === null || _d === void 0 ? void 0 : _d.focus();
|
|
131
|
+
(_f = (_e = this.host.shadowRoot) === null || _e === void 0 ? void 0 : _e.querySelector("input")) === null || _f === void 0 ? void 0 : _f.setSelectionRange(this.inputRef.value.length, this.inputRef.value.length);
|
|
251
132
|
}
|
|
252
133
|
if (prevIndex >= 0) {
|
|
253
|
-
|
|
254
|
-
this.items[prevIndex].classList.add("focused");
|
|
134
|
+
items[prevIndex].focus();
|
|
255
135
|
}
|
|
256
136
|
}
|
|
257
137
|
}
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
138
|
+
handleStopTyping(e) {
|
|
139
|
+
e.stopPropagation();
|
|
140
|
+
this.searchString = e.detail.value;
|
|
141
|
+
this.selectedItem = undefined;
|
|
142
|
+
}
|
|
143
|
+
handleSubmit() {
|
|
144
|
+
if (this.preventSubmit) {
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
this.emitSearchSubmit();
|
|
148
|
+
}
|
|
149
|
+
handleOutsideClick(e) {
|
|
150
|
+
const cp = e.composedPath();
|
|
151
|
+
if (cp.includes(this.host)) {
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
this.showResults = false;
|
|
155
|
+
}
|
|
156
|
+
componentWillLoad() {
|
|
157
|
+
this.resultsItemsList = this.getResultsItemsList();
|
|
158
|
+
this.mql = matchMedia("(max-width: 767px)");
|
|
159
|
+
this.onMobileViewChange = (e) => (this.isMobile = e.matches);
|
|
160
|
+
this.mql.addEventListener("change", this.onMobileViewChange);
|
|
161
|
+
this.isMobile = this.mql.matches;
|
|
162
|
+
}
|
|
163
|
+
disconnectedCallback() {
|
|
164
|
+
var _a;
|
|
165
|
+
(_a = this.mql) === null || _a === void 0 ? void 0 : _a.removeEventListener("change", this.onMobileViewChange);
|
|
266
166
|
}
|
|
267
167
|
renderItemLabel(label) {
|
|
268
168
|
if (!this.searchString) {
|
|
@@ -270,41 +170,62 @@ export class ZSearchbar {
|
|
|
270
170
|
}
|
|
271
171
|
return label.replace(new RegExp(this.searchString.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "gmi"), (found) => `<mark>${found}</mark>`);
|
|
272
172
|
}
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
}
|
|
277
|
-
return (h("span", { class: "category-heading", slot: "header-title" }, h("span", { class: "category" }, groupItem.category), (groupItem === null || groupItem === void 0 ? void 0 : groupItem.subcategory) && h("span", { class: "subcategory" }, groupItem.subcategory)));
|
|
173
|
+
renderItem(item, index) {
|
|
174
|
+
var _a;
|
|
175
|
+
return (h("z-list-element", { id: `list-item-${this.htmlid}-${index}`, role: "presentation", htmlTabindex: -1, onKeyDown: (e) => this.onListItemKeyDown(e, item), onClick: () => this.emitSearchItemClick(item) }, h("div", { class: "list-item ellipsis", role: "option", tabindex: 0 }, !!(item === null || item === void 0 ? void 0 : item.icon) && (h("z-icon", { class: "item-icon", name: item.icon })), h("div", { class: "item-label body-3 mobile-body-4", title: item.label, innerHTML: this.renderItemLabel(item.label) }), !!(item === null || item === void 0 ? void 0 : item.tag) && h("z-tag", { icon: item.tag.icon }, !this.isMobile ? item.tag.text : "")), !!((_a = item.children) === null || _a === void 0 ? void 0 : _a.length) && (h("z-list", { class: "sub-list", role: "group", "aria-label": item.label || undefined }, item.children.map((child, index) => this.renderItem(child, index))))));
|
|
278
176
|
}
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
177
|
+
/**
|
|
178
|
+
* Renders the item grouped by category and subcategory. If `resultsCount` is set, it limits the number of rendered items.
|
|
179
|
+
*/
|
|
180
|
+
renderItemGroups() {
|
|
181
|
+
var _a;
|
|
182
|
+
if (!((_a = this.resultsItemsList) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
183
|
+
return;
|
|
282
184
|
}
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
185
|
+
const groupedItems = Object.values(this.getGroupedItems());
|
|
186
|
+
const listGroups = [];
|
|
187
|
+
const hasResultsLimit = !!this.currResultsCount;
|
|
188
|
+
let renderedCount = 0;
|
|
189
|
+
for (const groupItem of groupedItems) {
|
|
190
|
+
const remaining = hasResultsLimit ? this.currResultsCount - renderedCount : groupItem.items.length;
|
|
191
|
+
if (remaining <= 0) {
|
|
192
|
+
break;
|
|
193
|
+
}
|
|
194
|
+
const visibleItems = groupItem.items.slice(0, remaining);
|
|
195
|
+
const listGroupsElements = visibleItems.map((item, subindex) => this.renderItem(item, subindex));
|
|
196
|
+
renderedCount += listGroupsElements.length;
|
|
197
|
+
if (!listGroupsElements.length) {
|
|
198
|
+
continue;
|
|
199
|
+
}
|
|
200
|
+
const ariaLabel = [groupItem.category, groupItem.subcategory].filter(Boolean).join(" ");
|
|
201
|
+
listGroups.push(h("z-list-group", { "aria-label": ariaLabel || undefined }, groupItem.category && (h("z-list-element", { class: "category-heading body-3 mobile-body-4", slot: "header-title", role: "presentation", htmlTabindex: -1 }, h("div", { class: "category" }, groupItem.category), groupItem.subcategory && h("div", { class: "subcategory" }, groupItem.subcategory))), listGroupsElements));
|
|
292
202
|
}
|
|
293
|
-
return
|
|
203
|
+
return listGroups;
|
|
294
204
|
}
|
|
295
205
|
render() {
|
|
296
|
-
|
|
206
|
+
var _a, _b, _c, _d, _e;
|
|
207
|
+
return (h(Host, { key: 'ef0ac81207a219b31d80fd2091070deea1f4314a', onFocus: () => (this.showResults = true), onClick: (e) => this.handleOutsideClick(e), class: { "has-submit": !!this.showSearchButton, "has-results": !!this.autocomplete } }, h("div", { key: 'cb73f19a10f7c26ef0f627916fb8d7dd6a28409c', class: "input-container" }, h("z-input", { key: '11c8ec74157a8a6a278d1e7928b6c819167ff3f4', ref: (el) => (this.inputRef = el), htmlid: `input-${this.htmlid}`, message: false, placeholder: this.placeholder, onStopTyping: (e) => this.handleStopTyping(e), onKeyUp: (e) => {
|
|
208
|
+
handleEnterKeydSubmit(e, () => this.handleSubmit());
|
|
209
|
+
this.handleArrowsNavigation(e);
|
|
210
|
+
}, onFocus: () => (this.showResults = true), value: this.searchString || ((_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.label), size: this.size, label: this.label, "aria-label": this.htmlAriaLabel || this.placeholder || undefined }), !!(this.showResults &&
|
|
211
|
+
this.autocomplete &&
|
|
212
|
+
this.searchString &&
|
|
213
|
+
this.searchString.length >= this.autocompleteMinChars &&
|
|
214
|
+
this.resultsItemsList) && (h("div", { key: '072a63a8d3f91b4325c53c0ec56fa90f925199f2', class: "results z-scrollbar" }, this.preventSubmit && !((_b = this.resultsItemsList) === null || _b === void 0 ? void 0 : _b.length) ? (h("div", { class: "item-no-results body-3 mobile-body-4" }, "Non abbiamo trovato risultati per ", h("b", null, this.searchString), h("br", null), h("br", null), "Cosa puoi fare?", h("ul", null, h("li", null, "Verificare di aver scritto bene"), h("li", null, "Provare a cercare un'altra parola"), h("li", null, "Provare a cercare qualcosa di pi\u00F9 generico")))) : (h("z-list", { role: "listbox", id: `list-${this.htmlid}`, "aria-label": this.htmlAriaLabel || this.label || undefined }, this.autocomplete && !this.preventSubmit && !!this.searchString && (h("z-list-element", { role: "presentation", htmlTabindex: -1, id: `list-item-${this.htmlid}-search`, onKeyDown: (e) => this.onSearchHelperKeyDown(e), onClick: () => this.emitSearchSubmit() }, h("div", { class: "list-item item-search", role: "option", tabindex: 0 }, h("z-icon", { class: "search-icon", name: "left-magnifying-glass" }), h("div", { class: "item-label body-3 mobile-body-4", innerHTML: (_c = this.searchHelperLabel) === null || _c === void 0 ? void 0 : _c.replace("{searchString}", `<mark>${this.searchString}</mark>`) })))), this.renderItemGroups(), !!(this.searchString &&
|
|
215
|
+
((_d = this.resultsItemsList) === null || _d === void 0 ? void 0 : _d.length) &&
|
|
216
|
+
this.currResultsCount &&
|
|
217
|
+
this.currResultsCount < ((_e = this.resultsItemsList) === null || _e === void 0 ? void 0 : _e.length)) && (h("z-list-element", { role: "presentation", htmlTabindex: -1, id: `list-item-${this.htmlid}-show-all` }, h("div", { role: "option", class: "item-show-all body-3 mobile-body-4", tabindex: 0, onClick: () => (this.currResultsCount = undefined) }, "Vedi tutti i risultati")))))))), this.showSearchButton && (h("z-button", { key: 'c839b4c5fa6d46f28f9ab83e0a02b1bc3d9594bf', icon: this.searchButtonIconOnly ? "search" : undefined, "aria-label": this.searchButtonIconOnly ? "CERCA" : undefined, disabled: !!this.preventSubmit, variant: this.variant, size: this.size, onClick: () => this.handleSubmit() }, this.searchButtonIconOnly ? "" : "CERCA"))));
|
|
297
218
|
}
|
|
298
219
|
static get is() { return "z-searchbar"; }
|
|
299
220
|
static get encapsulation() { return "shadow"; }
|
|
300
221
|
static get originalStyleUrls() {
|
|
301
222
|
return {
|
|
302
|
-
"$": ["styles.css", "../css-components/z-label/styles.css"]
|
|
223
|
+
"$": ["styles.css", "../css-components/z-label/styles.css", "../css-components/z-scrollbar/styles.css", "../../tokens/typography.css"]
|
|
303
224
|
};
|
|
304
225
|
}
|
|
305
226
|
static get styleUrls() {
|
|
306
227
|
return {
|
|
307
|
-
"$": ["styles.css", "../css-components/z-label/styles.css"]
|
|
228
|
+
"$": ["styles.css", "../css-components/z-label/styles.css", "../css-components/z-scrollbar/styles.css", "../../tokens/typography.css"]
|
|
308
229
|
};
|
|
309
230
|
}
|
|
310
231
|
static get properties() {
|
|
@@ -321,7 +242,7 @@ export class ZSearchbar {
|
|
|
321
242
|
"optional": false,
|
|
322
243
|
"docs": {
|
|
323
244
|
"tags": [],
|
|
324
|
-
"text": "
|
|
245
|
+
"text": "The id of the searchbar element"
|
|
325
246
|
},
|
|
326
247
|
"getter": false,
|
|
327
248
|
"setter": false,
|
|
@@ -361,7 +282,7 @@ export class ZSearchbar {
|
|
|
361
282
|
"optional": true,
|
|
362
283
|
"docs": {
|
|
363
284
|
"tags": [],
|
|
364
|
-
"text": "
|
|
285
|
+
"text": "The input label"
|
|
365
286
|
},
|
|
366
287
|
"getter": false,
|
|
367
288
|
"setter": false,
|
|
@@ -380,7 +301,7 @@ export class ZSearchbar {
|
|
|
380
301
|
"optional": true,
|
|
381
302
|
"docs": {
|
|
382
303
|
"tags": [],
|
|
383
|
-
"text": "
|
|
304
|
+
"text": "The input aria-label"
|
|
384
305
|
},
|
|
385
306
|
"getter": false,
|
|
386
307
|
"setter": false,
|
|
@@ -477,7 +398,7 @@ export class ZSearchbar {
|
|
|
477
398
|
"optional": true,
|
|
478
399
|
"docs": {
|
|
479
400
|
"tags": [],
|
|
480
|
-
"text": "Number of results shown
|
|
401
|
+
"text": "Number of results shown. Default: all"
|
|
481
402
|
},
|
|
482
403
|
"getter": false,
|
|
483
404
|
"setter": false,
|
|
@@ -582,7 +503,7 @@ export class ZSearchbar {
|
|
|
582
503
|
"optional": true,
|
|
583
504
|
"docs": {
|
|
584
505
|
"tags": [],
|
|
585
|
-
"text": "
|
|
506
|
+
"text": "Hide the label of the submit button, showing only the icon"
|
|
586
507
|
},
|
|
587
508
|
"getter": false,
|
|
588
509
|
"setter": false,
|
|
@@ -609,7 +530,7 @@ export class ZSearchbar {
|
|
|
609
530
|
"optional": true,
|
|
610
531
|
"docs": {
|
|
611
532
|
"tags": [],
|
|
612
|
-
"text": "
|
|
533
|
+
"text": "Size of the `z-input` and submit `z-button`"
|
|
613
534
|
},
|
|
614
535
|
"getter": false,
|
|
615
536
|
"setter": false,
|
|
@@ -636,7 +557,7 @@ export class ZSearchbar {
|
|
|
636
557
|
"optional": true,
|
|
637
558
|
"docs": {
|
|
638
559
|
"tags": [],
|
|
639
|
-
"text": "
|
|
560
|
+
"text": "Submit `z-button` variant"
|
|
640
561
|
},
|
|
641
562
|
"getter": false,
|
|
642
563
|
"setter": false,
|
|
@@ -710,7 +631,7 @@ export class ZSearchbar {
|
|
|
710
631
|
}
|
|
711
632
|
}];
|
|
712
633
|
}
|
|
713
|
-
static get elementRef() { return "
|
|
634
|
+
static get elementRef() { return "host"; }
|
|
714
635
|
static get watchers() {
|
|
715
636
|
return [{
|
|
716
637
|
"propName": "resultsItems",
|
|
@@ -724,9 +645,6 @@ export class ZSearchbar {
|
|
|
724
645
|
}, {
|
|
725
646
|
"propName": "searchString",
|
|
726
647
|
"methodName": "watchSearchString"
|
|
727
|
-
}, {
|
|
728
|
-
"propName": "showResults",
|
|
729
|
-
"methodName": "watchShowResults"
|
|
730
648
|
}];
|
|
731
649
|
}
|
|
732
650
|
static get listeners() {
|
|
@@ -24,29 +24,16 @@ const StoryMeta = {
|
|
|
24
24
|
"searchButtonIconOnly": false,
|
|
25
25
|
"autocomplete": false,
|
|
26
26
|
"autocompleteMinChars": 3,
|
|
27
|
-
"resultsCount":
|
|
27
|
+
"resultsCount": undefined,
|
|
28
28
|
"searchHelperLabel": "Cerca {searchString}",
|
|
29
|
-
"resultsItems": [
|
|
30
|
-
{
|
|
31
|
-
label: "first item",
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
label: "second item",
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
label: "third item",
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
label: "fourth item",
|
|
41
|
-
},
|
|
42
|
-
],
|
|
29
|
+
"resultsItems": [{ label: "first item" }, { label: "second item" }, { label: "third item" }, { label: "fourth item" }],
|
|
43
30
|
"sortResultsItems": false,
|
|
44
31
|
"htmlid": "myId",
|
|
45
32
|
"placeholder": "my placeholder",
|
|
46
33
|
"value": "",
|
|
47
34
|
"label": "",
|
|
48
35
|
"htmlAriaLabel": "",
|
|
49
|
-
"--z-searchbar-results-height": "",
|
|
36
|
+
"--z-searchbar-results-height": "540px",
|
|
50
37
|
"--z-searchbar-tag-text-color": "var(--color-primary03)",
|
|
51
38
|
"--z-searchbar-tag-bg": "var(--color-hover-primary)",
|
|
52
39
|
"size": ControlSize.BIG,
|