@zanichelli/albe-web-components 7.3.2 → 7.3.3

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.
Files changed (121) hide show
  1. package/dist/cjs/index-e3299e0a.js +6 -30
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/web-components-library.cjs.js +1 -1
  4. package/dist/cjs/z-app-header_11.cjs.entry.js +1052 -0
  5. package/dist/cjs/z-dragdrop-area_2.cjs.entry.js +865 -2
  6. package/dist/cjs/z-menu-section.cjs.entry.js +1 -1
  7. package/dist/cjs/z-menu.cjs.entry.js +1 -1
  8. package/dist/collection/components/inputs/z-searchbar/index.js +6 -17
  9. package/dist/collection/components/inputs/z-searchbar/styles.css +46 -95
  10. package/dist/collection/components/modal/z-modal/index.js +8 -1
  11. package/dist/collection/components/modal/z-modal/styles.css +13 -0
  12. package/dist/collection/components/navigation/z-app-header/index.js +171 -47
  13. package/dist/collection/components/navigation/z-app-header/index.stories.js +393 -0
  14. package/dist/collection/components/navigation/z-app-header/styles.css +167 -166
  15. package/dist/collection/components/navigation/z-menu/index.js +1 -0
  16. package/dist/collection/components/navigation/z-menu/styles.css +7 -7
  17. package/dist/collection/components/navigation/z-menu-section/styles.css +8 -9
  18. package/dist/collection/components/z-offcanvas/index.js +34 -50
  19. package/dist/esm/index-a2ca4b97.js +6 -30
  20. package/dist/esm/index.js +1 -1
  21. package/dist/esm/loader.js +1 -1
  22. package/dist/esm/{utils-970ac457.js → utils-a52a81ba.js} +1 -1
  23. package/dist/esm/web-components-library.js +1 -1
  24. package/dist/esm/z-app-header_11.entry.js +1038 -0
  25. package/dist/esm/z-chip.entry.js +1 -1
  26. package/dist/esm/z-combobox.entry.js +1 -1
  27. package/dist/esm/z-dragdrop-area_2.entry.js +865 -2
  28. package/dist/esm/z-file-upload.entry.js +1 -1
  29. package/dist/esm/z-menu-section.entry.js +1 -1
  30. package/dist/esm/z-menu.entry.js +1 -1
  31. package/dist/esm/z-myz-card-info.entry.js +1 -1
  32. package/dist/esm/z-myz-list-item.entry.js +1 -1
  33. package/dist/esm/z-pocket_3.entry.js +1 -1
  34. package/dist/esm/z-select.entry.js +1 -1
  35. package/dist/esm/z-skip-to-content.entry.js +1 -1
  36. package/dist/esm/z-slideshow.entry.js +1 -1
  37. package/dist/esm/z-table-header.entry.js +1 -1
  38. package/dist/esm/z-toggle-switch.entry.js +1 -1
  39. package/dist/types/components/inputs/z-searchbar/index.d.ts +0 -2
  40. package/dist/types/components/navigation/z-app-header/index.d.ts +49 -17
  41. package/dist/types/components/navigation/z-menu/index.d.ts +1 -0
  42. package/dist/types/components/z-offcanvas/index.d.ts +10 -12
  43. package/dist/types/components.d.ts +41 -13
  44. package/dist/web-components-library/index.esm.js +1 -1
  45. package/dist/web-components-library/{p-1f259ec0.entry.js → p-0bf3a704.entry.js} +1 -1
  46. package/{www/build/p-d982fc4c.entry.js → dist/web-components-library/p-10e036e4.entry.js} +1 -1
  47. package/dist/web-components-library/p-161a4e84.entry.js +1 -0
  48. package/dist/web-components-library/{p-dfc69cc3.js → p-1c6b0e09.js} +1 -1
  49. package/dist/web-components-library/{p-10625725.entry.js → p-1e71778f.entry.js} +1 -1
  50. package/dist/web-components-library/{p-068951a7.entry.js → p-1eaef57d.entry.js} +1 -1
  51. package/dist/web-components-library/p-27441384.entry.js +1 -0
  52. package/dist/web-components-library/{p-779c8d20.entry.js → p-378e3fd3.entry.js} +1 -1
  53. package/dist/web-components-library/{p-e2758870.entry.js → p-5c5a2680.entry.js} +1 -1
  54. package/dist/web-components-library/p-6d377fcb.entry.js +1 -0
  55. package/{www/build/p-191c9901.entry.js → dist/web-components-library/p-84b23d4b.entry.js} +1 -1
  56. package/dist/web-components-library/p-8ff45f5f.entry.js +1 -0
  57. package/dist/web-components-library/p-b36fc3db.entry.js +1 -0
  58. package/dist/web-components-library/{p-bca446ef.entry.js → p-c9bb584c.entry.js} +1 -1
  59. package/dist/web-components-library/{p-59b1f1e9.entry.js → p-d986024a.entry.js} +1 -1
  60. package/dist/web-components-library/p-eefde77a.entry.js +1 -0
  61. package/dist/web-components-library/web-components-library.esm.js +1 -1
  62. package/package.json +3 -2
  63. package/www/build/index.esm.js +1 -1
  64. package/www/build/{p-1f259ec0.entry.js → p-0bf3a704.entry.js} +1 -1
  65. package/{dist/web-components-library/p-d982fc4c.entry.js → www/build/p-10e036e4.entry.js} +1 -1
  66. package/www/build/p-161a4e84.entry.js +1 -0
  67. package/www/build/{p-dfc69cc3.js → p-1c6b0e09.js} +1 -1
  68. package/www/build/{p-10625725.entry.js → p-1e71778f.entry.js} +1 -1
  69. package/www/build/{p-068951a7.entry.js → p-1eaef57d.entry.js} +1 -1
  70. package/www/build/p-27441384.entry.js +1 -0
  71. package/www/build/{p-779c8d20.entry.js → p-378e3fd3.entry.js} +1 -1
  72. package/www/build/{p-e2758870.entry.js → p-5c5a2680.entry.js} +1 -1
  73. package/www/build/p-6d377fcb.entry.js +1 -0
  74. package/www/build/p-70021fac.js +1 -0
  75. package/{dist/web-components-library/p-191c9901.entry.js → www/build/p-84b23d4b.entry.js} +1 -1
  76. package/www/build/p-8ff45f5f.entry.js +1 -0
  77. package/www/build/p-b36fc3db.entry.js +1 -0
  78. package/www/build/{p-bca446ef.entry.js → p-c9bb584c.entry.js} +1 -1
  79. package/www/build/{p-59b1f1e9.entry.js → p-d986024a.entry.js} +1 -1
  80. package/www/build/p-eefde77a.entry.js +1 -0
  81. package/www/build/web-components-library.esm.js +1 -1
  82. package/www/index.html +1 -1
  83. package/dist/cjs/z-app-header_2.cjs.entry.js +0 -152
  84. package/dist/cjs/z-button.cjs.entry.js +0 -43
  85. package/dist/cjs/z-divider.cjs.entry.js +0 -26
  86. package/dist/cjs/z-input_2.cjs.entry.js +0 -273
  87. package/dist/cjs/z-list_3.cjs.entry.js +0 -261
  88. package/dist/cjs/z-offcanvas.cjs.entry.js +0 -57
  89. package/dist/cjs/z-searchbar.cjs.entry.js +0 -248
  90. package/dist/esm/z-app-header_2.entry.js +0 -147
  91. package/dist/esm/z-button.entry.js +0 -39
  92. package/dist/esm/z-divider.entry.js +0 -22
  93. package/dist/esm/z-input_2.entry.js +0 -268
  94. package/dist/esm/z-list_3.entry.js +0 -255
  95. package/dist/esm/z-offcanvas.entry.js +0 -53
  96. package/dist/esm/z-searchbar.entry.js +0 -244
  97. package/dist/web-components-library/p-1570917d.entry.js +0 -1
  98. package/dist/web-components-library/p-157aea3b.entry.js +0 -1
  99. package/dist/web-components-library/p-1c8e7c24.entry.js +0 -1
  100. package/dist/web-components-library/p-20682781.entry.js +0 -1
  101. package/dist/web-components-library/p-3d0f5e36.entry.js +0 -1
  102. package/dist/web-components-library/p-4f266607.entry.js +0 -1
  103. package/dist/web-components-library/p-51c946a5.entry.js +0 -1
  104. package/dist/web-components-library/p-af283478.entry.js +0 -1
  105. package/dist/web-components-library/p-bae1911e.entry.js +0 -1
  106. package/dist/web-components-library/p-d0760bb1.entry.js +0 -1
  107. package/dist/web-components-library/p-deda8776.entry.js +0 -1
  108. package/dist/web-components-library/p-f3a8cc14.entry.js +0 -1
  109. package/www/build/p-1570917d.entry.js +0 -1
  110. package/www/build/p-157aea3b.entry.js +0 -1
  111. package/www/build/p-1c8e7c24.entry.js +0 -1
  112. package/www/build/p-20682781.entry.js +0 -1
  113. package/www/build/p-3d0f5e36.entry.js +0 -1
  114. package/www/build/p-4b0934c2.js +0 -1
  115. package/www/build/p-4f266607.entry.js +0 -1
  116. package/www/build/p-51c946a5.entry.js +0 -1
  117. package/www/build/p-af283478.entry.js +0 -1
  118. package/www/build/p-bae1911e.entry.js +0 -1
  119. package/www/build/p-d0760bb1.entry.js +0 -1
  120. package/www/build/p-deda8776.entry.js +0 -1
  121. package/www/build/p-f3a8cc14.entry.js +0 -1
@@ -1,248 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-e3299e0a.js');
6
- const index$1 = require('./index-7a9a8430.js');
7
- const utils = require('./utils-305151da.js');
8
- require('./breakpoints-88c4fd6c.js');
9
-
10
- const stylesCss = ":host{position:relative;z-index:5;display:block;width:inherit;height:44px;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>div{position:absolute;z-index:10;display:grid;width:100%;gap:0 calc(var(--space-unit) * 2);grid-template-columns:auto;grid-template-rows:auto}:host>div.has-submit{grid-template-columns:auto min-content}:host>div.has-results{grid-template-rows:auto auto}:host>div>z-input{width:100%;grid-column:1;grid-row:1}:host>div>z-button{grid-column:2;grid-row:1}:host>div>div.results-wrapper{overflow:auto;padding:calc(var(--space-unit) / 4);padding-bottom:calc(var(--space-unit) / 4);border:var(--border-size-small) solid var(--color-surface03);border-top:none;margin-top:-1px;background:var(--color-surface01);grid-column:1;grid-row:2}:host>div>div.results-wrapper>div.results{overflow:auto;max-height:var(--z-searchbar-results-height, 540px);padding:var(--space-unit) calc(var(--space-unit) * 1.5);padding-bottom:calc(var(--space-unit) / 2);scrollbar-color:var(--color-primary01) transparent}:host>div>div.results-wrapper>div.results::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}:host>div>div.results-wrapper>div.results::-webkit-scrollbar-track{background-color:transparent}:host>div>div.results-wrapper>div.results::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01);border-radius:var(--border-radius)}:host>div>div.results-wrapper>div.results .category-heading{display:block;font-size:var(--font-size-2);font-weight:var(--font-rg);line-height:var(--font-size-3)}:host>div>div.results-wrapper>div.results .category-heading>*{display:block}:host>div>div.results-wrapper>div.results span.category-heading>span.category{color:var(--color-text05);font-style:italic}:host>div>div.results-wrapper>div.results span.category-heading>span.subcategory{margin-top:8px;color:var(--color-text01);text-transform:uppercase}:host>div>div.results-wrapper>div.results z-list-element{display:block}:host>div>div.results-wrapper>div.results z-list-element:focus{box-shadow:var(--shadow-focus-primary)}:host>div>div.results-wrapper>div.results .item{--z-icon-height:12px;--z-icon-width:12px;display:flex;flex-flow:row nowrap;align-content:stretch;align-items:flex-start;justify-content:flex-start;color:var(--color-text01);fill:var(--color-icon02);font-size:var(--font-size-2);line-height:var(--font-size-3)}:host>div>div.results-wrapper>div.results .item.ellipsis>span.item-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host>div>div.results-wrapper>div.results .item>span.item-label>mark,:host>div>div.results-wrapper>div.results .item>span.item-label>*>mark{background:var(--color-primary03)}:host>div>div.results-wrapper>div.results .item.has-category{padding-left:calc(var(--space-unit) * 3)}:host>div>div.results-wrapper>div.results .item>z-icon.item-icon{padding:2px 0;margin-right:calc(var(--space-unit) * 1.5)}:host>div>div.results-wrapper>div.results .item.item-search{--z-icon-height:16px;--z-icon-width:16px}:host>div>div.results-wrapper>div.results .item.item-search>z-icon{margin-right:var(--space-unit)}:host>div>div.results-wrapper>div.results .item-show-all{display:block;text-align:center}:host>div>div.results-wrapper>div.results .item-no-results{display:block;font-size:var(--font-size-2);font-style:italic;line-height:var(--font-size-5)}:host>div>div.results-wrapper>div.results .item-no-results>ul{padding-left:calc(var(--space-unit) * 2);margin:var(--space-unit)}@media (min-width: 768px){:host>div>div.results-wrapper>div.results .category-heading{font-size:var(--font-size-3);line-height:var(--font-size-6)}:host>div>div.results-wrapper>div.results .item{--z-icon-height:12px;--z-icon-width:12px;font-size:var(--font-size-3);line-height:var(--font-size-6)}:host>div>div.results-wrapper>div.results .item.item-search{--z-icon-height:18px;--z-icon-width:18px}:host>div>div.results-wrapper>div.results .item.item-search>z-icon{margin-top:calc(var(--space-unit) / 4)}:host>div>div.results-wrapper>div.results .item.ellipsis>span.item-label{height:24px}:host>div>div.results-wrapper>div.results .item>z-icon.item-icon{padding:6px 0}}@media (min-width: 1152px){:host>div>div.results-wrapper>div.results .item{cursor:pointer}:host>div>div.results-wrapper>div.results .item-no-results{cursor:default;font-size:var(--font-size-3);line-height:var(--font-size-6)}}:host([size=\"small\"])>div>div.results-wrapper>div.results .item,:host([size=\"x-small\"])>div>div.results-wrapper>div.results .item,:host([size=\"small\"])>div>div.results-wrapper>div.results .category-heading,:host([size=\"x-small\"])>div>div.results-wrapper>div.results .category-heading{font-size:var(--font-size-2)}:host([size=\"small\"])>div>div.results-wrapper>div.results .item:not(.has-category),:host([size=\"x-small\"])>div>div.results-wrapper>div.results .item:not(.has-category){--z-icon-height:16px;--z-icon-width:16px}:host([size=\"small\"])::part(list-item-container){min-height:calc(var(--space-unit) * 4.5);padding:0}:host([size=\"x-small\"])::part(list-item-container){min-height:calc(var(--space-unit) * 4);padding:0}";
11
-
12
- const ZSearchbar = class {
13
- constructor(hostRef) {
14
- index.registerInstance(this, hostRef);
15
- this.searchSubmit = index.createEvent(this, "searchSubmit", 7);
16
- this.searchTyping = index.createEvent(this, "searchTyping", 7);
17
- this.searchItemClick = index.createEvent(this, "searchItemClick", 7);
18
- /** the id of the searchbar element */
19
- this.htmlid = `searchbar-${utils.randomId()}`;
20
- /** Prevent submit action */
21
- this.preventSubmit = false;
22
- /** Show autocomplete results */
23
- this.autocomplete = false;
24
- /** Minimun number of characters to dispatch typing event */
25
- this.autocompleteMinChars = 3;
26
- /** Truncate results to single row */
27
- this.resultsEllipsis = true;
28
- /** Search helper text */
29
- this.searchHelperLabel = "Cerca {searchString}";
30
- /** Sort autocomplete results items */
31
- this.sortResultsItems = false;
32
- /** Show submit button */
33
- this.showSearchButton = false;
34
- /** Set button icon without label*/
35
- this.searchButtonIconOnly = false;
36
- /** Available sizes: `big`, `small` and `x-small`. Defaults to `big`. */
37
- this.size = index$1.ControlSize.BIG;
38
- /** Graphical variant: `primary`, `secondary`, `tertiary`. Defaults to `primary`. */
39
- this.variant = index$1.ButtonVariant.PRIMARY;
40
- this.searchString = "";
41
- this.currResultsCount = 0;
42
- this.showResults = false;
43
- this.resultsItemsList = null;
44
- }
45
- emitSearchSubmit() {
46
- this.searchSubmit.emit(this.inputRef.value);
47
- }
48
- emitSearchTyping(search) {
49
- this.searchTyping.emit(search);
50
- }
51
- emitSearchItemClick(item) {
52
- this.searchItemClick.emit(item);
53
- }
54
- watchItems() {
55
- this.resultsItemsList = this.getResultsItemsList();
56
- }
57
- watchResultsCount() {
58
- this.currResultsCount = this.resultsCount;
59
- }
60
- watchValue() {
61
- this.handleInput(this.value);
62
- }
63
- watchSearchString() {
64
- this.emitSearchTyping(this.searchString);
65
- if (!this.searchString) {
66
- this.currResultsCount = this.resultsCount;
67
- }
68
- }
69
- clickListener(e) {
70
- this.handleOutsideClick(e);
71
- }
72
- componentWillLoad() {
73
- this.resultsItemsList = this.getResultsItemsList();
74
- this.currResultsCount = this.resultsCount;
75
- this.handleInput(this.value);
76
- }
77
- getResultsItemsList() {
78
- return typeof this.resultsItems === "string" ? JSON.parse(this.resultsItems) : this.resultsItems;
79
- }
80
- getGroupedItems(items) {
81
- const groupedItems = {};
82
- items.forEach((item) => {
83
- var _a;
84
- const key = `${item === null || item === void 0 ? void 0 : item.category}${item === null || item === void 0 ? void 0 : item.subcategory}`;
85
- groupedItems[key] = (_a = groupedItems[key]) !== null && _a !== void 0 ? _a : {
86
- category: item === null || item === void 0 ? void 0 : item.category,
87
- subcategory: item === null || item === void 0 ? void 0 : item.subcategory,
88
- items: [],
89
- };
90
- groupedItems[key]["items"].push(item);
91
- });
92
- if (this.sortResultsItems) {
93
- return Object.keys(groupedItems)
94
- .sort()
95
- .reduce((obj, key) => {
96
- obj[key] = Object.assign(Object.assign({}, groupedItems[key]), { items: groupedItems[key]["items"].sort((a, b) => {
97
- const nameA = a.label.toUpperCase();
98
- const nameB = b.label.toUpperCase();
99
- if (nameA < nameB) {
100
- return -1;
101
- }
102
- if (nameA > nameB) {
103
- return 1;
104
- }
105
- return 0;
106
- }) });
107
- return obj;
108
- }, {});
109
- }
110
- return groupedItems;
111
- }
112
- checkResultsCount(counter) {
113
- if (!this.currResultsCount || counter < this.currResultsCount) {
114
- return true;
115
- }
116
- return false;
117
- }
118
- handleStopTyping(e) {
119
- e.stopPropagation();
120
- this.handleInput(e.detail.value);
121
- }
122
- handleInput(value) {
123
- if ((value === null || value === void 0 ? void 0 : value.length) >= this.autocompleteMinChars) {
124
- this.searchString = value;
125
- }
126
- else if (this.searchString) {
127
- this.searchString = "";
128
- }
129
- }
130
- handleSubmit() {
131
- if (this.preventSubmit) {
132
- return;
133
- }
134
- this.emitSearchSubmit();
135
- }
136
- handleOutsideClick(e) {
137
- const cp = e.composedPath();
138
- const searchbar = cp.find((elem) => elem.nodeName === "Z-SEARCHBAR");
139
- if (!searchbar || searchbar.htmlid !== this.htmlid) {
140
- this.showResults = false;
141
- return;
142
- }
143
- 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")); })) {
144
- this.showResults = true;
145
- return;
146
- }
147
- this.showResults = false;
148
- }
149
- renderInput() {
150
- return (index.h("z-input", { ref: (val) => {
151
- this.inputRef = val;
152
- }, message: false, placeholder: this.placeholder, onStopTyping: (e) => this.handleStopTyping(e), onKeyUp: (e) => utils.handleEnterKeydSubmit(e, () => this.handleSubmit()), value: this.value, size: this.size }));
153
- }
154
- renderButton() {
155
- if (!this.showSearchButton) {
156
- return null;
157
- }
158
- const iconProp = this.searchButtonIconOnly ? { icon: "search" } : null;
159
- const buttonLabel = this.searchButtonIconOnly ? "" : "CERCA";
160
- const defaultProps = Object.assign({ disabled: this.preventSubmit, variant: this.variant, size: this.size, onClick: () => this.handleSubmit() }, iconProp);
161
- return index.h("z-button", Object.assign({}, defaultProps), buttonLabel);
162
- }
163
- renderResults() {
164
- if (!this.showResults ||
165
- !this.autocomplete ||
166
- !this.searchString ||
167
- this.searchString.length < this.autocompleteMinChars ||
168
- !this.resultsItemsList) {
169
- return null;
170
- }
171
- return (index.h("div", { class: "results-wrapper" }, index.h("div", { class: "results" }, this.renderResultsList())));
172
- }
173
- renderResultsList() {
174
- var _a, _b;
175
- if (this.preventSubmit && !((_a = this.resultsItemsList) === null || _a === void 0 ? void 0 : _a.length)) {
176
- return (index.h("span", { class: "item item-no-results" }, "Non abbiamo trovato risultati per ", index.h("b", null, this.searchString), index.h("br", null), index.h("br", null), "Cosa puoi fare?", index.h("ul", null, index.h("li", null, "Verificare di aver scritto bene"), index.h("li", null, "Provare a cercare un'altra parola"), index.h("li", null, "Provare a cercare qualcosa di pi\u00F9 generico"))));
177
- }
178
- return (index.h("z-list", { role: "listbox", id: `list-${this.htmlid}` }, this.renderSearchHelper(!!((_b = this.resultsItemsList) === null || _b === void 0 ? void 0 : _b.length)), this.renderItems(), this.renderShowAllResults()));
179
- }
180
- renderItems() {
181
- var _a;
182
- if (!((_a = this.resultsItemsList) === null || _a === void 0 ? void 0 : _a.length)) {
183
- return [];
184
- }
185
- const groupedItems = this.getGroupedItems(this.resultsItemsList);
186
- const listGroups = [];
187
- let counter = 0;
188
- Object.values(groupedItems).forEach((groupItem, index$2, array) => {
189
- if (this.checkResultsCount(counter)) {
190
- const listGroupsElements = [];
191
- groupItem.items.forEach((item, subindex, subarray) => {
192
- if (this.checkResultsCount(counter)) {
193
- const isLast = index$2 === array.length - 1 && subindex === subarray.length - 1;
194
- listGroupsElements.push(this.renderItem(item, subindex, !isLast));
195
- }
196
- counter++;
197
- });
198
- if (listGroupsElements.length) {
199
- listGroups.push(index.h("z-list-group", { "divider-type": index$1.ListDividerType.ELEMENT }, this.renderItemCategory(groupItem), listGroupsElements));
200
- }
201
- }
202
- });
203
- return listGroups;
204
- }
205
- renderItem(item, key, divider) {
206
- return (index.h("z-list-element", { id: `list-item-${this.htmlid}-${key}`, role: "option", tabindex: 0, dividerType: divider ? index$1.ListDividerType.ELEMENT : undefined, clickable: true, onClickItem: () => this.emitSearchItemClick(item) }, index.h("span", { class: { "item": true, "ellipsis": this.resultsEllipsis, "has-category": !!item.category } }, (item === null || item === void 0 ? void 0 : item.icon) && (index.h("z-icon", { class: "item-icon", name: item.icon })), index.h("span", { class: "item-label", title: item.label, innerHTML: this.renderItemLabel(item.label) }))));
207
- }
208
- renderItemLabel(label) {
209
- if (!this.searchString) {
210
- return label;
211
- }
212
- return label.replace(new RegExp(this.searchString.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "gmi"), (found) => `<mark>${found}</mark>`);
213
- }
214
- renderItemCategory(groupItem) {
215
- if (!(groupItem === null || groupItem === void 0 ? void 0 : groupItem.category)) {
216
- return null;
217
- }
218
- return (index.h("span", { class: "category-heading", slot: "header-title" }, index.h("span", { class: "category" }, groupItem.category), (groupItem === null || groupItem === void 0 ? void 0 : groupItem.subcategory) && index.h("span", { class: "subcategory" }, groupItem.subcategory)));
219
- }
220
- renderSearchHelper(hasDivider = true) {
221
- if (!this.autocomplete || this.preventSubmit || !this.searchString) {
222
- return null;
223
- }
224
- return (index.h("z-list-element", { role: "option", tabindex: 0, dividerType: hasDivider ? index$1.ListDividerType.ELEMENT : undefined, clickable: true, id: `list-item-${this.htmlid}-search`, onClickItem: () => this.emitSearchSubmit() }, index.h("span", { class: "item item-search" }, index.h("z-icon", { class: "search-icon", name: "left-magnifying-glass" }), index.h("span", { class: "item-label", innerHTML: this.searchHelperLabel.replace("{searchString}", `<mark>${this.searchString}</mark>`) }))));
225
- }
226
- renderShowAllResults() {
227
- var _a, _b;
228
- if (!this.currResultsCount ||
229
- !this.searchString ||
230
- !((_a = this.resultsItemsList) === null || _a === void 0 ? void 0 : _a.length) ||
231
- this.currResultsCount >= ((_b = this.resultsItemsList) === null || _b === void 0 ? void 0 : _b.length)) {
232
- return null;
233
- }
234
- return (index.h("z-list-element", { role: "option", tabindex: 0, clickable: true, id: `list-item-${this.htmlid}-show-all`, onClickItem: () => (this.currResultsCount = 0) }, index.h("span", { class: "item-show-all" }, index.h("z-link", null, "Vedi tutti i risultati"))));
235
- }
236
- render() {
237
- return (index.h(index.Host, { onFocus: () => (this.showResults = true), onClick: (e) => this.handleOutsideClick(e) }, index.h("div", { class: { "has-submit": this.showSearchButton, "has-results": this.autocomplete } }, this.renderInput(), this.renderResults(), this.renderButton())));
238
- }
239
- static get watchers() { return {
240
- "resultsItems": ["watchItems"],
241
- "resultsCount": ["watchResultsCount"],
242
- "value": ["watchValue"],
243
- "searchString": ["watchSearchString"]
244
- }; }
245
- };
246
- ZSearchbar.style = stylesCss;
247
-
248
- exports.z_searchbar = ZSearchbar;
@@ -1,147 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a2ca4b97.js';
2
- import { I as ICONS } from './icons-6cd265c6.js';
3
-
4
- const stylesCss$1 = ":host{--app-header-content-max-width:100%;--app-header-height:auto;--app-header-typography-1-size:24px;--app-header-typography-2-size:28px;--app-header-typography-3-size:32px;--app-header-typography-4-size:36px;--app-header-typography-5-size:42px;--app-header-typography-6-size:48px;--app-header-typography-7-size:54px;--app-header-typography-8-size:60px;--app-header-typography-9-size:68px;--app-header-typography-10-size:76px;--app-header-typography-11-size:84px;--app-header-typography-12-size:92px;--app-header-typography-1-lineheight:1.33;--app-header-typography-2-lineheight:1.29;--app-header-typography-3-lineheight:1.25;--app-header-typography-4-lineheight:1.24;--app-header-typography-5-lineheight:1.24;--app-header-typography-6-lineheight:1.25;--app-header-typography-7-lineheight:1.2;--app-header-typography-8-lineheight:1.26;--app-header-typography-9-lineheight:1.24;--app-header-typography-10-lineheight:1.26;--app-header-typography-11-lineheight:1.2;--app-header-typography-12-lineheight:1.2;--app-header-typography-1-tracking:calc(-0.2 / 1em);--app-header-typography-2-tracking:calc(-0.4 / 1em);--app-header-typography-3-tracking:calc(-0.6 / 1em);--app-header-typography-4-tracking:calc(-0.8 / 1em);--app-header-typography-5-tracking:calc(-1 / 1em);--app-header-typography-6-tracking:calc(-1.2 / 1em);--app-header-typography-7-tracking:calc(-1.4 / 1em);--app-header-typography-8-tracking:calc(-1.6 / 1em);--app-header-typography-9-tracking:calc(-1.8 / 1em);--app-header-typography-10-tracking:calc(-2 / 1em);--app-header-typography-11-tracking:calc(-2.2 / 1em);--app-header-typography-12-tracking:calc(-2.4 / 1em);--app-header-top-offset:48px;--app-header-drawer-trigger-size:calc(var(--space-unit) * 4);--app-header-bg:var(--color-white);--app-header-stucked-bg:var(--color-white);--app-header-text-color:var(--gray800);--app-header-stucked-text-color:var(--gray800);display:block;color:var(--app-header-text-color)}:host,*{box-sizing:border-box}.heading-panel{position:relative;display:flex;width:100%;max-width:var(--app-header-content-max-width);height:var(--app-header-height);flex-direction:column;flex-grow:0;flex-shrink:0;align-items:baseline;justify-content:flex-start;padding:var(--grid-margin);margin:0 auto;background:var(--app-header-bg)}:host(:empty) .heading-panel{padding:0}.heading-title{display:flex;max-width:100%;flex-direction:row;align-items:center}:host(:not([menu-length=\"0\"])) .heading-subtitle{padding-left:calc(var(--app-header-drawer-trigger-size) + (var(--space-unit) * 1.5))}.heading-stuck{position:fixed;z-index:20;top:var(--app-header-top-offset);left:0;width:100%;max-width:100%;animation:slide-stuck-heading-in 250ms ease-out;background:var(--app-header-stucked-bg);box-shadow:var(--shadow-2);color:var(--app-header-stucked-text-color)}.heading-stuck-content{display:flex;max-width:var(--app-header-content-max-width);padding:var(--space-unit) var(--grid-margin);margin:0 auto}.heading-stuck .heading-title,.heading-stuck .heading-title>*,.heading-stuck .heading-title ::slotted([slot=\"stucked-title\"]){display:block;overflow:hidden;line-height:1.2;text-overflow:ellipsis;white-space:nowrap}.heading-stuck .heading-title>*,::slotted([slot=\"title\"]),::slotted([slot=\"stucked-title\"]){margin:0;font-family:\"IBM Plex Serif\", serif;font-size:var(--app-header-typography-3-size);font-weight:700;letter-spacing:var(--app-header-typography-3-tracking)}::slotted([slot=\"title\"]){line-height:1}::slotted([slot=\"subtitle\"]){margin:var(--space-unit) 0 0;font-family:var(--font-family-sans);font-size:20px;font-style:italic;font-weight:500;line-height:1.2}.heading-container{position:relative;z-index:1;display:flex;max-width:100%;flex-direction:column;align-items:flex-start;justify-content:flex-start;margin-right:auto}.menu-container{display:none;flex-flow:row wrap;align-items:baseline}.menu-container ::slotted([open]){position:relative;z-index:3}.menu-container ::slotted(*:not(:last-of-type)){margin-right:calc(var(--space-unit) * 4.5)}.drawer-trigger{padding:0;border:0;margin:0 calc(var(--space-unit) * 1.5) 0 0;appearance:none;background:none;border-radius:0;color:inherit;cursor:pointer}.drawer-trigger z-icon{--z-icon-width:var(--app-header-drawer-trigger-size);--z-icon-height:var(--app-header-drawer-trigger-size);fill:currentcolor}.drawer-container{position:fixed;z-index:100;top:var(--app-header-top-offset);left:0;width:100%;height:100%;pointer-events:none}.drawer-container .drawer-overlay{position:absolute;z-index:1;top:0;left:0;display:block;width:100%;height:100%;background:var(--gray900);opacity:0;pointer-events:none;transition:opacity 400ms ease-out}.drawer-panel{position:absolute;z-index:2;top:0;left:0;display:flex;width:375px;max-width:100%;height:100%;flex-direction:column;align-items:flex-start;padding:calc(var(--space-unit) * 2) var(--space-unit);background:var(--color-white);color:var(--gray800);pointer-events:none;transform:translate3d(-100%, 0, 0);transition:transform 400ms ease-out}.drawer-content{display:flex;overflow:auto;width:100%;flex:1 auto;flex-direction:column;padding:calc(var(--space-unit) * 0.5) var(--space-unit)}.drawer-content::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}.drawer-content::-webkit-scrollbar-track{background-color:transparent}.drawer-content::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01);border-radius:var(--border-radius)}.drawer-content::-webkit-scrollbar-thumb:hover{background-color:var(--color-hover-primary)}.drawer-content ::slotted(z-menu){width:100%}.drawer-content ::slotted(z-menu:not(:last-of-type)){margin-bottom:calc(var(--space-unit) * 2.5)}.drawer-close{--z-icon-width:var(--app-header-drawer-trigger-size);--z-icon-height:var(--app-header-drawer-trigger-size);padding:0;border:0;margin:0 0 calc(var(--space-unit) * 2.5) var(--space-unit);appearance:none;background:transparent;border-radius:0;color:inherit;cursor:pointer;fill:currentcolor;font-size:inherit;outline:none}.drawer-close:focus-visible{box-shadow:var(--shadow-focus-primary)}:host([drawer-open]) .drawer-container .drawer-overlay{opacity:0.7;pointer-events:all}:host([drawer-open]) .drawer-container .drawer-panel{pointer-events:all;transform:none}.hero-container{position:absolute;z-index:0;top:0;left:0;width:100%;height:100%}:host([overlay]) .heading-panel .drawer-trigger z-icon,:host([overlay]) .heading-panel .heading-container,:host([overlay]) .heading-panel .menu-container{color:var(--color-white);fill:var(--color-white)}:host([overlay]) .heading-panel .menu-container ::slotted(z-menu:not([open])){--color-surface05:var(--color-white)}:host([overlay]) .hero-container::after{position:absolute;z-index:0;top:0;left:0;width:100%;height:100%;background:var(--color-black);content:\"\";opacity:0.5}.hero-container img,.hero-container ::slotted(*){position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;object-position:top center;-webkit-user-drag:none}@media (min-width: 768px){:host(:not([flow=\"offcanvas\"])) .heading-subtitle{padding-left:0}:host(:not([flow=\"offcanvas\"])) .menu-container{display:flex}:host(:not([flow=\"offcanvas\"])) .heading-container .drawer-trigger{display:none}:host(:not([flow=\"offcanvas\"],[menu-length=\"0\"])) .heading-container:not(:last-child){margin-bottom:calc(var(--space-unit) * 3)}::slotted([slot=\"title\"]){font-size:var(--app-header-typography-6-size);letter-spacing:var(--app-header-typography-6-tracking)}::slotted([slot=\"subtitle\"]){margin-top:calc(var(--space-unit) * 1.5)}}@media (min-width: 1152px){:host(:not([flow=\"stack\"])) .heading-panel{flex-flow:row wrap}::slotted([slot=\"title\"]){margin-right:var(--grid-gutter);font-size:var(--app-header-typography-7-size);letter-spacing:var(--app-header-typography-7-tracking)}:host(:not([flow=\"offcanvas\"],[menu-length=\"0\"])) .heading-container:not(:last-child){margin-bottom:calc(var(--space-unit) * 2)}.menu-container{margin-top:var(--space-unit)}}@media (min-width: 1366px){::slotted([slot=\"title\"]){font-size:var(--app-header-typography-9-size);letter-spacing:var(--app-header-typography-9-tracking)}:host(:not([flow=\"offcanvas\"],[menu-length=\"0\"])) .heading-container:not(:last-child){margin-bottom:0}}@keyframes slide-stuck-heading-in{0%{transform:translate3d(0, -100%, 0)}100%{transform:none}}";
5
-
6
- const SUPPORT_INTERSECTION_OBSERVER = typeof IntersectionObserver !== "undefined";
7
- const ZAppHeader = class {
8
- constructor(hostRef) {
9
- registerInstance(this, hostRef);
10
- this.sticking = createEvent(this, "sticking", 7);
11
- /**
12
- * Stuck mode for the header.
13
- * You can programmatically set it using an IntersectionObserver.
14
- * **Optional**
15
- */
16
- this.stuck = false;
17
- /**
18
- * Should place an overlay over the hero image.
19
- * Useful for legibility purpose.
20
- * **Optional**
21
- */
22
- this.overlay = false;
23
- /**
24
- * Control menu bar position in the header.
25
- * - auto: the menu bar is positioned near the title
26
- * - stack: the menu bar is positioned below the title
27
- * - offcanvas: the menu bar is not displayed and a burger icon appears to open the offcanvas menu
28
- */
29
- this.flow = "auto";
30
- /**
31
- * The opening state of the drawer.
32
- */
33
- this.drawerOpen = false;
34
- /**
35
- * The stuck state of the bar.
36
- */
37
- this._stuck = false;
38
- this.observer = SUPPORT_INTERSECTION_OBSERVER &&
39
- new IntersectionObserver(([entry]) => {
40
- this._stuck = !entry.isIntersecting;
41
- }, {
42
- threshold: 0.5,
43
- });
44
- this.openDrawer = this.openDrawer.bind(this);
45
- this.closeDrawer = this.closeDrawer.bind(this);
46
- this.collectMenuElements = this.collectMenuElements.bind(this);
47
- }
48
- emitStickingEvent() {
49
- this.sticking.emit(this._stuck);
50
- }
51
- openDrawer() {
52
- this.drawerOpen = true;
53
- }
54
- closeDrawer() {
55
- this.drawerOpen = false;
56
- }
57
- componentDidLoad() {
58
- this.collectMenuElements();
59
- this.onStuckMode();
60
- }
61
- get title() {
62
- const titleElement = this.hostElement.querySelector('[slot="title"]');
63
- if (titleElement === null) {
64
- return "";
65
- }
66
- return titleElement.textContent.trim();
67
- }
68
- get scrollParent() {
69
- const parent = this.hostElement.offsetParent;
70
- if (parent === document.body || parent === document.documentElement) {
71
- return window;
72
- }
73
- return parent;
74
- }
75
- collectMenuElements() {
76
- const menuElements = (this.menuElements = this.hostElement.querySelectorAll('[slot="menu"]'));
77
- this.menuLength = menuElements.length;
78
- this.setMenuFloatingMode();
79
- }
80
- onStuckMode() {
81
- if (this.stuck) {
82
- this.enableStuckObserver();
83
- }
84
- else {
85
- this.disableStuckMode();
86
- }
87
- }
88
- enableStuckObserver() {
89
- if (this.observer) {
90
- this.observer.observe(this.container);
91
- }
92
- }
93
- disableStuckMode() {
94
- this._stuck = false;
95
- if (this.observer) {
96
- this.observer.unobserve(this.container);
97
- }
98
- }
99
- onStuck() {
100
- const scrollParent = this.scrollParent;
101
- if (!scrollParent) {
102
- return;
103
- }
104
- this.emitStickingEvent();
105
- }
106
- setMenuFloatingMode() {
107
- if (this.menuElements.length === 0) {
108
- return;
109
- }
110
- const elements = this.menuElements;
111
- elements.forEach((element) => {
112
- element.open = false;
113
- element.floating = !this.drawerOpen;
114
- element.verticalContext = this.drawerOpen;
115
- });
116
- }
117
- render() {
118
- return (h(Host, { "menu-length": this.menuLength }, h("div", { class: "heading-panel", ref: (el) => (this.container = el) }, h("div", { class: "hero-container" }, h("slot", { name: "hero" }, this.hero && (h("img", { alt: "", src: this.hero })))), h("div", { class: "heading-container" }, h("div", { class: "heading-title" }, this.menuLength > 0 && (h("button", { class: "drawer-trigger", "aria-label": "Apri menu", onClick: this.openDrawer }, h("z-icon", { name: "burger-menu" }))), h("slot", { name: "title" })), h("div", { class: "heading-subtitle" }, h("slot", { name: "subtitle" }))), h("div", { class: "menu-container" }, !this.drawerOpen && this.flow !== "offcanvas" && (h("slot", { name: "menu", onSlotchange: this.collectMenuElements })))), h("div", { class: "drawer-container" }, h("div", { class: "drawer-overlay", onClick: this.closeDrawer }), h("div", { class: "drawer-panel" }, h("button", { class: "drawer-close", "aria-label": "Chiudi menu", onClick: this.closeDrawer }, h("z-icon", { name: "close" })), h("div", { class: "drawer-content" }, this.drawerOpen && (h("slot", { name: "menu", onSlotchange: this.collectMenuElements }))))), this._stuck && (h("div", { class: "heading-stuck" }, h("div", { class: "heading-stuck-content" }, this.menuLength > 0 && (h("button", { class: "drawer-trigger", "aria-label": "Apri menu", onClick: this.openDrawer }, h("z-icon", { name: "burger-menu" }))), h("div", { class: "heading-title" }, h("slot", { name: "stucked-title" }, this.title)))))));
119
- }
120
- get hostElement() { return getElement(this); }
121
- static get watchers() { return {
122
- "stuck": ["onStuckMode"],
123
- "_stuck": ["onStuck"],
124
- "drawerOpen": ["setMenuFloatingMode"]
125
- }; }
126
- };
127
- ZAppHeader.style = stylesCss$1;
128
-
129
- const stylesCss = ":host{margin-right:var(--z-icon-right-margin, 0);margin-left:var(--z-icon-left-margin, 0);line-height:0;vertical-align:middle}:host svg:not([width]){width:var(--z-icon-width, 18px)}:host svg:not([height]){height:var(--z-icon-height, 18px)}";
130
-
131
- const ZIcon = class {
132
- constructor(hostRef) {
133
- registerInstance(this, hostRef);
134
- }
135
- selectPathOrPolygon(iconValue) {
136
- if (iconValue === null || iconValue === void 0 ? void 0 : iconValue.startsWith("M")) {
137
- return h("path", { d: ICONS[this.name] });
138
- }
139
- return h("polygon", { points: ICONS[this.name] });
140
- }
141
- render() {
142
- return (h(Host, { "aria-hidden": "true" }, h("svg", { viewBox: "0 0 1000 1000", width: this.width, height: this.height, id: this.iconid, fill: this.fill ? `var(--${this.fill})` : "" }, this.selectPathOrPolygon(ICONS[this.name]))));
143
- }
144
- };
145
- ZIcon.style = stylesCss;
146
-
147
- export { ZAppHeader as z_app_header, ZIcon as z_icon };
@@ -1,39 +0,0 @@
1
- import { r as registerInstance, h, g as getElement } from './index-a2ca4b97.js';
2
- import { b as ButtonType, B as ButtonVariant, d as ControlSize } from './index-e36ec4a4.js';
3
-
4
- const stylesCss = ".sc-z-button-h{display:inline-block;--z-icon-width:16px;--z-icon-height:16px;--z-icon-right-margin:0}[disabled].sc-z-button-h:not([disabled=\"false\"]){pointer-events:none}.sc-z-button-h .z-button--container.sc-z-button{display:inline-flex;width:100%;box-sizing:border-box;align-items:center;justify-content:center;padding:0;border-width:var(--border-size-medium);border-style:solid;border-radius:var(--border-radius);cursor:pointer;fill:currentcolor;font-family:var(--font-family-sans);font-size:14px;font-weight:var(--font-sb);letter-spacing:0.3px;line-height:1;outline:none;text-decoration:none;text-transform:uppercase;white-space:nowrap}.sc-z-button-h .z-button--container.sc-z-button:focus:focus-visible{box-shadow:var(--shadow-focus-primary)}.sc-z-button-h .z-button--container.z-button--has-text.sc-z-button{min-width:calc(var(--space-unit) * 8);padding:0 calc(var(--space-unit) * 2)}.sc-z-button-h .z-button--container.z-button--has-text.sc-z-button z-icon.sc-z-button{--z-icon-right-margin:var(--space-unit)}[size=\"big\"].sc-z-button-h .z-button--container.sc-z-button{min-width:44px;height:44px}[size=\"small\"].sc-z-button-h .z-button--container.sc-z-button{min-width:36px;height:36px}[size=\"x-small\"].sc-z-button-h .z-button--container.sc-z-button{min-width:32px;height:32px}[variant=\"primary\"].sc-z-button-h .z-button--container.sc-z-button{border-color:var(--color-primary01);background-color:var(--color-primary01);color:var(--color-text-inverse)}@media (hover: hover){[variant=\"primary\"].sc-z-button-h .z-button--container.sc-z-button:hover{border-color:var(--color-hover-primary);background-color:var(--color-hover-primary);color:var(--color-text-inverse)}}[variant=\"primary\"].sc-z-button-h .z-button--container.sc-z-button:active{border-color:var(--color-pressed-primary);background-color:var(--color-pressed-primary);box-shadow:var(--shadow-2);color:var(--color-text-inverse)}[variant=\"primary\"][disabled].sc-z-button-h:not([disabled=\"false\"]) .z-button--container.sc-z-button{border-color:var(--color-disabled01);background-color:var(--color-disabled01);color:var(--color-disabled02)}[variant=\"secondary\"].sc-z-button-h .z-button--container.sc-z-button{border-color:var(--color-primary01);background-color:var(--color-surface01);color:var(--color-primary01)}@media (hover: hover){[variant=\"secondary\"].sc-z-button-h .z-button--container.sc-z-button:hover{border-color:var(--color-hover-primary);background-color:var(--color-surface01);color:var(--color-hover-primary)}}[variant=\"secondary\"].sc-z-button-h .z-button--container.sc-z-button:active{border-color:var(--color-pressed-primary);background-color:var(--color-surface01);box-shadow:var(--shadow-2);color:var(--color-pressed-primary)}[variant=\"secondary\"][disabled].sc-z-button-h:not([disabled=\"false\"]) .z-button--container.sc-z-button{border-color:var(--color-disabled01);background-color:var(--color-surface01);color:var(--color-disabled02)}[variant=\"tertiary\"].sc-z-button-h .z-button--container.sc-z-button{border-color:transparent;background-color:transparent;color:var(--color-primary01)}@media (hover: hover){[variant=\"tertiary\"].sc-z-button-h .z-button--container.sc-z-button:hover{border-color:var(--color-primary03);background-color:var(--color-primary03);color:var(--color-hover-primary)}}[variant=\"tertiary\"].sc-z-button-h .z-button--container.sc-z-button:focus:focus-visible{border-color:var(--color-surface01);background-color:var(--color-surface01);color:var(--color-primary01)}[variant=\"tertiary\"].sc-z-button-h .z-button--container.sc-z-button:active{border-color:var(--color-surface01);background-color:var(--color-surface01);box-shadow:var(--shadow-2);color:var(--color-primary01)}[variant=\"tertiary\"][disabled].sc-z-button-h:not([disabled=\"false\"]) .z-button--container.sc-z-button{border-color:transparent;background-color:transparent;color:var(--color-disabled02)}";
5
-
6
- const ZButton = class {
7
- constructor(hostRef) {
8
- registerInstance(this, hostRef);
9
- /** defines a string value that labels an interactive element, used for accessibility. */
10
- this.ariaLabel = "";
11
- /** HTML button disabled attribute. */
12
- this.disabled = false;
13
- /** HTML button type attribute. */
14
- this.type = ButtonType.BUTTON;
15
- /** Graphical variant: `primary`, `secondary`, `tertiary`. Defaults to `primary`. */
16
- this.variant = ButtonVariant.PRIMARY;
17
- /** Available sizes: `big`, `small` and `x-small`. Defaults to `big`. */
18
- this.size = ControlSize.BIG;
19
- }
20
- getAttributes() {
21
- return {
22
- id: this.htmlid,
23
- class: {
24
- "z-button--container": true,
25
- "z-button--has-text": !!this.hostElement.textContent.trim(),
26
- },
27
- };
28
- }
29
- render() {
30
- if (this.href) {
31
- return (h("a", Object.assign({}, this.getAttributes(), { "aria-label": this.ariaLabel, href: this.href, target: this.target }), this.icon && (h("z-icon", { name: this.icon, width: 16, height: 16 })), h("slot", null)));
32
- }
33
- return (h("button", Object.assign({}, this.getAttributes(), { "aria-label": this.ariaLabel, name: this.name, type: this.type, disabled: this.disabled }), this.icon && (h("z-icon", { name: this.icon, width: 16, height: 16 })), h("slot", null)));
34
- }
35
- get hostElement() { return getElement(this); }
36
- };
37
- ZButton.style = stylesCss;
38
-
39
- export { ZButton as z_button };
@@ -1,22 +0,0 @@
1
- import { r as registerInstance, h, H as Host } from './index-a2ca4b97.js';
2
- import { D as DividerSize, g as DividerOrientation } from './index-e36ec4a4.js';
3
-
4
- const stylesCss = ".sc-z-divider-h{display:block;padding:0;margin:0}.divider-horizontal.sc-z-divider-h{width:100%}.divider-vertical.sc-z-divider-h{height:100%}.divider-small.divider-horizontal.sc-z-divider-h{height:var(--border-size-small)}.divider-medium.divider-horizontal.sc-z-divider-h{height:var(--border-size-medium)}.divider-large.divider-horizontal.sc-z-divider-h{height:var(--border-size-large)}.divider-small.divider-vertical.sc-z-divider-h{width:var(--border-size-small)}.divider-medium.divider-vertical.sc-z-divider-h{width:var(--border-size-medium)}.divider-large.divider-vertical.sc-z-divider-h{width:var(--border-size-large)}";
5
-
6
- const ZDivider = class {
7
- constructor(hostRef) {
8
- registerInstance(this, hostRef);
9
- /** [optional] Divider size */
10
- this.size = DividerSize.SMALL;
11
- /** [optional] Divider color */
12
- this.color = "gray200";
13
- /** [optional] Divider orintation */
14
- this.orientation = DividerOrientation.HORIZONTAL;
15
- }
16
- render() {
17
- return (h(Host, { class: `divider-${this.size} divider-${this.orientation}`, style: { backgroundColor: `var(--${this.color})` } }));
18
- }
19
- };
20
- ZDivider.style = stylesCss;
21
-
22
- export { ZDivider as z_divider };