@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
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-e3299e0a.js');
6
6
 
7
- const stylesCss = ":host{display:inline-flex;flex-direction:column;align-items:flex-start;justify-content:center;padding:0;font-family:var(--font-family-sans)}:host,::slotted(*),*{box-sizing:border-box}::slotted(a){text-decoration:none}::slotted(*){color:var(--color-text01);font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host(:is([active],[open])) .label,.label:hover{border-color:var(--color-secondary01)}:is(:host(:is([active],[open])) .label,.label:hover) ::slotted(*){font-weight:var(--font-bd)}.label{display:flex;width:100%;align-items:center;padding:calc(var(--space-unit) * 2) calc(var(--space-unit) * 0.5);border:0;border-bottom:var(--border-size-small) solid var(--color-surface05);margin:0;background:transparent;border-radius:0;cursor:pointer;text-align:left}::slotted([data-text]){display:inline-flex;flex-direction:column}::slotted([data-text])::after{overflow:hidden;height:0;content:attr(data-text);content:attr(data-text) / \"\";font-weight:var(--font-bd);pointer-events:none;user-select:none;visibility:hidden}@media speech{::slotted([data-text])::after{display:none}}.label ::slotted(*){width:100%;margin:0;font-size:var(--font-size-3);line-height:1.25}.label:focus:focus-visible{box-shadow:var(--shadow-focus-primary);outline:none}.label z-icon{margin-left:calc(var(--space-unit) * 4);fill:var(--color-icon02)}.items{display:flex;width:100%;flex-direction:column;padding:calc(var(--space-unit) * 0.5);padding-bottom:calc(var(--space-unit) * 2)}.items>::slotted([slot=\"item\"]){display:inline-flex;padding:calc(var(--space-unit) * 0.5);margin:0;font-size:var(--font-size-2);line-height:1.4;outline:none}.items>::slotted([slot=\"item\"]:last-child){padding-bottom:0}.items>::slotted([slot=\"item\"]:focus:focus-visible){box-shadow:var(--shadow-focus-primary);color:var(--color-secondary01)}.items>::slotted([slot=\"item\"]:hover),.items>::slotted([slot=\"item\"][active]){color:var(--color-secondary01);font-weight:var(--font-bd)}";
7
+ const stylesCss = ":host{display:inline-flex;flex-direction:column;align-items:flex-start;justify-content:center;padding:0;font-family:var(--font-family-sans)}:host,::slotted(*),*{box-sizing:border-box}::slotted(a){text-decoration:none}::slotted(*){color:var(--color-text01);font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host(:is([active],[open])) .label,.label:hover{border-color:var(--color-secondary01)}:host(:is([active],[open])) .label ::slotted(*),.label:focus:focus-visible ::slotted(*),.label:hover ::slotted(*){font-weight:var(--font-bd)}.label{display:flex;width:100%;align-items:center;padding:calc(var(--space-unit) * 2) calc(var(--space-unit) / 2);border:0;border-bottom:var(--border-size-small) solid var(--color-surface05);margin:0;background:transparent;border-radius:0;cursor:pointer;text-align:left}::slotted([data-text]){display:inline-flex;flex-direction:column}::slotted([data-text])::after{overflow:hidden;height:0;content:attr(data-text);content:attr(data-text) / \"\";font-weight:var(--font-bd);pointer-events:none;user-select:none;visibility:hidden}@media speech{::slotted([data-text])::after{display:none}}.label ::slotted(*){width:100%;margin:0;font-size:var(--font-size-3);line-height:1.25}.label:focus:focus-visible{box-shadow:var(--shadow-focus-primary);outline:none}.label z-icon{margin-left:calc(var(--space-unit) * 4);fill:var(--color-icon02)}.items{display:flex;width:100%;flex-direction:column;padding:calc(var(--space-unit) / 2);padding-bottom:calc(var(--space-unit) * 1.5)}.items>::slotted([slot=\"item\"]){display:inline-flex;padding:calc(var(--space-unit) / 2);margin:0;font-size:var(--font-size-2);line-height:1.4;outline:none}.items>::slotted([slot=\"item\"]:focus:focus-visible){box-shadow:var(--shadow-focus-primary);color:var(--color-secondary01)}.items>::slotted([slot=\"item\"]:hover),.items>::slotted([slot=\"item\"]:focus:focus-visible),.items>::slotted([slot=\"item\"][active]){color:var(--color-secondary01);font-weight:var(--font-bd)}";
8
8
 
9
9
  const ZMenuSection = class {
10
10
  constructor(hostRef) {
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-e3299e0a.js');
6
6
 
7
- const stylesCss = ":host,::slotted(*),*{box-sizing:border-box}:host{position:relative;display:inline-flex;flex-direction:column}::slotted(a){text-decoration:none}::slotted(*){color:var(--color-text01);font-family:var(--font-family-sans);font-weight:var(--font-rg);letter-spacing:0.36px}.menu-label{padding:0;border:0;margin:0;background:transparent;border-radius:0;color:inherit;outline:none;text-align:left}button.menu-label{cursor:pointer}.menu-label:focus-within{z-index:1;padding-right:calc(var(--space-unit) * 0.5);padding-left:calc(var(--space-unit) * 0.5);margin-right:calc(var(--space-unit) * -0.5);margin-left:calc(var(--space-unit) * -0.5);box-shadow:var(--shadow-focus-primary)}.menu-label .menu-label-content{position:relative;display:flex;align-items:center}:host(:is([active],[open])) .menu-label-content,.menu-label .menu-label-content:hover,.menu-label:focus-within .menu-label-content{font-weight:var(--font-bd)}:host(:is([active],[open])) .menu-label-content ::slotted(*),.menu-label .menu-label-content:hover ::slotted(*),.menu-label:focus-within .menu-label-content ::slotted(*){letter-spacing:normal}:host(:is([active],[open],[vertical-context])) .menu-label .menu-label-content::after,.menu-label .menu-label-content:hover::after,.menu-label:focus-within .menu-label-content::after{position:absolute;bottom:0;left:0;width:100%;content:\"\";pointer-events:none}:host([vertical-context]) .menu-label-content::after{height:var(--border-size-small);background-color:var(--color-surface03)}:host(:is([active],[open])) .menu-label .menu-label-content::after,.menu-label .menu-label-content:hover::after,.menu-label:focus-within .menu-label-content::after{height:var(--border-size-large);background-color:var(--color-secondary01)}::slotted([data-text])::after{height:0;content:attr(data-text);content:attr(data-text) / \"\";font-weight:var(--font-bd);letter-spacing:normal;pointer-events:none;user-select:none;visibility:hidden}@media speech{::slotted([data-text])::after{display:none}}::slotted([data-text]){display:inline-flex;flex-direction:column}.menu-label .menu-label-content ::slotted(*){display:inline-flex;width:100%;margin:0;appearance:none;font-size:var(--font-size-5);font-weight:inherit;line-height:1.2;outline:none}.menu-label .menu-label-content ::slotted(*),.menu-label .menu-label-content z-icon{padding:var(--space-unit) 0}.menu-label .menu-label-content z-icon{margin-left:calc(var(--space-unit) * 1.5);fill:var(--color-icon02)}.content{background:var(--color-surface01)}:host(:not([open])) .content{display:none}:host([floating]) .content{position:absolute;top:100%;left:0;width:375px;min-width:100%;max-width:100vw;padding:var(--space-unit) var(--space-unit) calc(var(--space-unit) * 2);box-shadow:var(--shadow-2)}:host(:not([floating])) .content{width:100%}.header{display:flex;align-items:center;padding:var(--space-unit) 0 calc(var(--space-unit) * 2)}.header ::slotted(img[slot=\"header\"]){width:calc(var(--space-unit) * 11.25);height:auto;object-fit:contain}.header ::slotted([slot=\"header\"]:not(:first-child)){margin:auto 0;margin-left:calc(var(--space-unit) * 2.5);font-size:var(--font-size-3);font-weight:var(--font-sb);line-height:1.5}.items{display:flex;flex-direction:column;align-items:flex-start;background:inherit}.items>::slotted([slot=\"item\"]){width:100%;margin:0;font-size:var(--font-size-3);line-height:1.25;outline:none}.items>::slotted([slot=\"item\"]:focus:focus-visible){box-shadow:var(--shadow-focus-primary)}.items>::slotted([slot=\"item\"]:not(z-menu-section)){padding:calc(var(--space-unit) * 2) calc(var(--space-unit) * 0.5);border-bottom:var(--border-size-small) solid var(--color-surface05)}.items>::slotted([slot=\"item\"]:hover),.items>::slotted([slot=\"item\"]:active){border-color:var(--color-secondary01);font-weight:var(--font-bd)}";
7
+ const stylesCss = ":host,::slotted(*),*{box-sizing:border-box}:host{position:relative;display:inline-flex;flex-direction:column;--z-menu-label-color:var(--color-text01)}::slotted(a){text-decoration:none}::slotted(*){color:var(--color-text01);font-family:var(--font-family-sans);font-weight:var(--font-rg)}.menu-label{padding:0;border:0;margin:0;background:transparent;border-radius:0;color:inherit;outline:none;text-align:left}button.menu-label{cursor:pointer}.menu-label:focus-within{z-index:1;padding-right:calc(var(--space-unit) * 0.5);padding-left:calc(var(--space-unit) * 0.5);margin-right:calc(var(--space-unit) * -0.5);margin-left:calc(var(--space-unit) * -0.5);box-shadow:var(--shadow-focus-primary)}.menu-label .menu-label-content{position:relative;display:flex;align-items:center}:host(:is([active],[open])) .menu-label-content,.menu-label:focus-within .menu-label-content{font-weight:var(--font-bd)}:host(:is([active],[open])) .menu-label-content ::slotted(*),.menu-label:focus-within .menu-label-content ::slotted(*){letter-spacing:normal}:host(:is([active],[open],[vertical-context])) .menu-label .menu-label-content::after,.menu-label .menu-label-content:hover::after,.menu-label:focus-within .menu-label-content::after{position:absolute;bottom:0;left:0;width:100%;content:\"\";pointer-events:none}:host([vertical-context]) .menu-label-content::after{height:var(--border-size-small);background-color:var(--color-surface03)}:host(:is([active],[open])) .menu-label .menu-label-content::after,.menu-label .menu-label-content:hover::after,.menu-label:focus-within .menu-label-content::after{height:var(--border-size-large);background-color:var(--color-secondary01)}::slotted([data-text])::after{height:0;content:attr(data-text);content:attr(data-text) / \"\";font-weight:var(--font-bd);letter-spacing:normal;pointer-events:none;user-select:none;visibility:hidden}@media speech{::slotted([data-text])::after{display:none}}::slotted([data-text]){display:inline-flex;flex-direction:column}.menu-label .menu-label-content ::slotted(*){display:inline-flex;width:100%;margin:0;appearance:none;color:var(--z-menu-label-color);font-family:var(--font-family-sans);font-size:var(--font-size-5);font-weight:inherit;letter-spacing:0.36px;line-height:1.2;outline:none}.menu-label .menu-label-content ::slotted(*),.menu-label .menu-label-content z-icon{padding:var(--space-unit) 0}.menu-label .menu-label-content z-icon{margin-left:calc(var(--space-unit) * 1.5);fill:currentcolor}.content{background:var(--color-surface01)}:host(:not([open])) .content{display:none}:host([floating]) .content{position:absolute;top:100%;left:0;width:375px;min-width:100%;max-width:100vw;padding:var(--space-unit) var(--space-unit) calc(var(--space-unit) * 2);box-shadow:var(--shadow-2)}:host(:not([floating])) .content{width:100%}.header{display:flex;align-items:center;padding:var(--space-unit) 0 calc(var(--space-unit) * 2)}.header ::slotted(img[slot=\"header\"]){width:calc(var(--space-unit) * 11.25);height:auto;object-fit:contain}.header ::slotted([slot=\"header\"]:not(:first-child)){margin:auto 0;margin-left:calc(var(--space-unit) * 2.5);font-size:var(--font-size-3);font-weight:var(--font-sb);line-height:1.5}.items{display:flex;flex-direction:column;align-items:flex-start;background:inherit}.items>::slotted([slot=\"item\"]){width:100%;margin:0;font-size:var(--font-size-3);line-height:1.25;outline:none}.items>::slotted([slot=\"item\"]:focus:focus-visible){box-shadow:var(--shadow-focus-primary)}.items>::slotted([slot=\"item\"]:not(z-menu-section)){padding:calc(var(--space-unit) * 2) calc(var(--space-unit) * 0.5);border-bottom:var(--border-size-small) solid var(--color-surface05)}.items>::slotted([slot=\"item\"]:hover),.items>::slotted([slot=\"item\"]:focus:focus-visible),.items>::slotted([slot=\"item\"]:active){border-color:var(--color-secondary01);font-weight:var(--font-bd)}";
8
8
 
9
9
  const ZMenu = class {
10
10
  constructor(hostRef) {
@@ -49,7 +49,7 @@ export class ZSearchbar {
49
49
  this.currResultsCount = this.resultsCount;
50
50
  }
51
51
  watchValue() {
52
- this.handleInput(this.value);
52
+ this.searchString = this.value;
53
53
  }
54
54
  watchSearchString() {
55
55
  this.emitSearchTyping(this.searchString);
@@ -57,13 +57,10 @@ export class ZSearchbar {
57
57
  this.currResultsCount = this.resultsCount;
58
58
  }
59
59
  }
60
- clickListener(e) {
61
- this.handleOutsideClick(e);
62
- }
63
60
  componentWillLoad() {
64
61
  this.resultsItemsList = this.getResultsItemsList();
65
62
  this.currResultsCount = this.resultsCount;
66
- this.handleInput(this.value);
63
+ this.searchString = this.value;
67
64
  }
68
65
  getResultsItemsList() {
69
66
  return typeof this.resultsItems === "string" ? JSON.parse(this.resultsItems) : this.resultsItems;
@@ -108,15 +105,7 @@ export class ZSearchbar {
108
105
  }
109
106
  handleStopTyping(e) {
110
107
  e.stopPropagation();
111
- this.handleInput(e.detail.value);
112
- }
113
- handleInput(value) {
114
- if ((value === null || value === void 0 ? void 0 : value.length) >= this.autocompleteMinChars) {
115
- this.searchString = value;
116
- }
117
- else if (this.searchString) {
118
- this.searchString = "";
119
- }
108
+ this.searchString = e.detail.value;
120
109
  }
121
110
  handleSubmit() {
122
111
  if (this.preventSubmit) {
@@ -222,10 +211,10 @@ export class ZSearchbar {
222
211
  this.currResultsCount >= ((_b = this.resultsItemsList) === null || _b === void 0 ? void 0 : _b.length)) {
223
212
  return null;
224
213
  }
225
- return (h("z-list-element", { role: "option", tabindex: 0, clickable: true, id: `list-item-${this.htmlid}-show-all`, onClickItem: () => (this.currResultsCount = 0) }, h("span", { class: "item-show-all" }, h("z-link", null, "Vedi tutti i risultati"))));
214
+ return (h("z-list-element", { role: "option", tabindex: 0, clickable: true, id: `list-item-${this.htmlid}-show-all`, onClickItem: () => (this.currResultsCount = 0), color: "color-primary01" }, h("div", { class: "item-show-all" }, "Vedi tutti i risultati")));
226
215
  }
227
216
  render() {
228
- return (h(Host, { onFocus: () => (this.showResults = true), onClick: (e) => this.handleOutsideClick(e) }, h("div", { class: { "has-submit": this.showSearchButton, "has-results": this.autocomplete } }, this.renderInput(), this.renderResults(), this.renderButton())));
217
+ return (h(Host, { onFocus: () => (this.showResults = true), onClick: (e) => this.handleOutsideClick(e), class: { "has-submit": this.showSearchButton, "has-results": this.autocomplete } }, h("div", { class: "input-container" }, this.renderInput(), this.renderResults()), this.renderButton()));
229
218
  }
230
219
  static get is() { return "z-searchbar"; }
231
220
  static get encapsulation() { return "shadow"; }
@@ -602,7 +591,7 @@ export class ZSearchbar {
602
591
  static get listeners() {
603
592
  return [{
604
593
  "name": "click",
605
- "method": "clickListener",
594
+ "method": "handleOutsideClick",
606
595
  "target": "document",
607
596
  "capture": false,
608
597
  "passive": false
@@ -1,224 +1,175 @@
1
1
  :host {
2
- position: relative;
3
- z-index: 5;
4
- display: block;
5
- width: inherit;
6
- height: 44px;
2
+ z-index: 10;
3
+ display: flex;
4
+ column-gap: calc(var(--space-unit) * 2);
7
5
  font-family: var(--font-family-sans);
8
6
  font-weight: var(--font-rg);
9
7
  }
10
8
 
11
- :host > div {
12
- position: absolute;
13
- z-index: 10;
14
- display: grid;
15
- width: 100%;
16
- gap: 0 calc(var(--space-unit) * 2);
17
- grid-template-columns: auto;
18
- grid-template-rows: auto;
9
+ :host,
10
+ * {
11
+ box-sizing: border-box;
19
12
  }
20
13
 
21
- :host > div.has-submit {
22
- grid-template-columns: auto min-content;
23
- }
24
-
25
- :host > div.has-results {
26
- grid-template-rows: auto auto;
27
- }
28
-
29
- :host > div > z-input {
14
+ .input-container {
15
+ position: relative;
16
+ display: flex;
30
17
  width: 100%;
31
- grid-column: 1;
32
- grid-row: 1;
33
- }
34
-
35
- :host > div > z-button {
36
- grid-column: 2;
37
- grid-row: 1;
18
+ flex-direction: column;
38
19
  }
39
20
 
40
- :host > div > div.results-wrapper {
41
- overflow: auto;
21
+ .results-wrapper {
22
+ position: absolute;
23
+ top: calc(100% - 1px);
24
+ left: 0;
25
+ width: 100%;
42
26
  padding: calc(var(--space-unit) / 4);
43
- padding-bottom: calc(var(--space-unit) / 4);
44
27
  border: var(--border-size-small) solid var(--color-surface03);
45
28
  border-top: none;
46
- margin-top: -1px;
47
29
  background: var(--color-surface01);
48
- grid-column: 1;
49
- grid-row: 2;
50
30
  }
51
31
 
52
- :host > div > div.results-wrapper > div.results {
32
+ .results {
53
33
  overflow: auto;
54
34
  max-height: var(--z-searchbar-results-height, 540px);
55
- padding: var(--space-unit) calc(var(--space-unit) * 1.5);
56
- padding-bottom: calc(var(--space-unit) / 2);
35
+ padding: calc(var(--space-unit) / 2) calc(var(--space-unit) * 1.5);
57
36
  scrollbar-color: var(--color-primary01) transparent;
58
37
  }
59
38
 
60
- :host > div > div.results-wrapper > div.results::-webkit-scrollbar {
39
+ .results::-webkit-scrollbar {
61
40
  width: 10px;
62
41
  background: linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);
63
42
  border-radius: var(--border-radius);
64
43
  }
65
44
 
66
- :host > div > div.results-wrapper > div.results::-webkit-scrollbar-track {
45
+ .results::-webkit-scrollbar-track {
67
46
  background-color: transparent;
68
47
  }
69
48
 
70
- :host > div > div.results-wrapper > div.results::-webkit-scrollbar-thumb {
49
+ .results::-webkit-scrollbar-thumb {
71
50
  width: 10px;
72
51
  background-color: var(--color-primary01);
73
52
  border-radius: var(--border-radius);
74
53
  }
75
54
 
76
- :host > div > div.results-wrapper > div.results .category-heading {
55
+ .results .category-heading {
77
56
  display: block;
78
57
  font-size: var(--font-size-2);
79
58
  font-weight: var(--font-rg);
80
59
  line-height: var(--font-size-3);
81
60
  }
82
61
 
83
- :host > div > div.results-wrapper > div.results .category-heading > * {
62
+ .results .category-heading > * {
84
63
  display: block;
85
64
  }
86
65
 
87
- :host > div > div.results-wrapper > div.results span.category-heading > span.category {
66
+ .results .category-heading > .category {
88
67
  color: var(--color-text05);
89
68
  font-style: italic;
90
69
  }
91
70
 
92
- :host > div > div.results-wrapper > div.results span.category-heading > span.subcategory {
93
- margin-top: 8px;
71
+ .results .category-heading > .subcategory {
72
+ margin-top: var(--space-unit);
94
73
  color: var(--color-text01);
95
74
  text-transform: uppercase;
96
75
  }
97
76
 
98
- :host > div > div.results-wrapper > div.results z-list-element {
77
+ .results z-list-element {
99
78
  display: block;
100
79
  }
101
80
 
102
- :host > div > div.results-wrapper > div.results z-list-element:focus {
103
- box-shadow: var(--shadow-focus-primary);
104
- }
105
-
106
- :host > div > div.results-wrapper > div.results .item {
81
+ .results .item {
107
82
  --z-icon-height: 12px;
108
83
  --z-icon-width: 12px;
109
84
 
110
85
  display: flex;
111
86
  flex-flow: row nowrap;
112
- align-content: stretch;
113
- align-items: flex-start;
87
+ align-items: center;
114
88
  justify-content: flex-start;
115
89
  color: var(--color-text01);
90
+ column-gap: calc(var(--space-unit) * 1.5);
116
91
  fill: var(--color-icon02);
117
92
  font-size: var(--font-size-2);
118
93
  line-height: var(--font-size-3);
119
94
  }
120
95
 
121
- :host > div > div.results-wrapper > div.results .item.ellipsis > span.item-label {
96
+ .results .item.ellipsis > .item-label {
122
97
  overflow: hidden;
123
98
  text-overflow: ellipsis;
124
99
  white-space: nowrap;
125
100
  }
126
101
 
127
- :host > div > div.results-wrapper > div.results .item > span.item-label > mark,
128
- :host > div > div.results-wrapper > div.results .item > span.item-label > * > mark {
102
+ .results .item > .item-label mark {
129
103
  background: var(--color-primary03);
130
104
  }
131
105
 
132
- :host > div > div.results-wrapper > div.results .item.has-category {
106
+ .results .item.has-category {
133
107
  padding-left: calc(var(--space-unit) * 3);
134
108
  }
135
109
 
136
- :host > div > div.results-wrapper > div.results .item > z-icon.item-icon {
137
- padding: 2px 0;
138
- margin-right: calc(var(--space-unit) * 1.5);
139
- }
140
-
141
- :host > div > div.results-wrapper > div.results .item.item-search {
110
+ .results .item.item-search {
142
111
  --z-icon-height: 16px;
143
112
  --z-icon-width: 16px;
144
113
  }
145
114
 
146
- :host > div > div.results-wrapper > div.results .item.item-search > z-icon {
147
- margin-right: var(--space-unit);
148
- }
149
-
150
- :host > div > div.results-wrapper > div.results .item-show-all {
151
- display: block;
115
+ .results .item-show-all {
152
116
  text-align: center;
153
117
  }
154
118
 
155
- :host > div > div.results-wrapper > div.results .item-no-results {
119
+ .results .item-no-results {
156
120
  display: block;
157
121
  font-size: var(--font-size-2);
158
122
  font-style: italic;
159
123
  line-height: var(--font-size-5);
160
124
  }
161
125
 
162
- :host > div > div.results-wrapper > div.results .item-no-results > ul {
126
+ .results .item-no-results > ul {
163
127
  padding-left: calc(var(--space-unit) * 2);
164
128
  margin: var(--space-unit);
165
129
  }
166
130
 
167
131
  /* Tablet breakpoint */
168
132
  @media (min-width: 768px) {
169
- :host > div > div.results-wrapper > div.results .category-heading {
133
+ .results .category-heading {
170
134
  font-size: var(--font-size-3);
171
135
  line-height: var(--font-size-6);
172
136
  }
173
137
 
174
- :host > div > div.results-wrapper > div.results .item {
175
- --z-icon-height: 12px;
176
- --z-icon-width: 12px;
177
-
138
+ .results .item {
178
139
  font-size: var(--font-size-3);
179
140
  line-height: var(--font-size-6);
180
141
  }
181
142
 
182
- :host > div > div.results-wrapper > div.results .item.item-search {
143
+ .results .item.item-search {
183
144
  --z-icon-height: 18px;
184
145
  --z-icon-width: 18px;
185
146
  }
186
147
 
187
- :host > div > div.results-wrapper > div.results .item.item-search > z-icon {
188
- margin-top: calc(var(--space-unit) / 4);
189
- }
190
-
191
- :host > div > div.results-wrapper > div.results .item.ellipsis > span.item-label {
148
+ .results .item.ellipsis > .item-label {
192
149
  height: 24px;
193
150
  }
194
-
195
- :host > div > div.results-wrapper > div.results .item > z-icon.item-icon {
196
- padding: 6px 0;
197
- }
198
151
  }
199
152
 
200
153
  /* Desktop breakpoint */
201
154
  @media (min-width: 1152px) {
202
- :host > div > div.results-wrapper > div.results .item {
155
+ .results .item {
203
156
  cursor: pointer;
204
157
  }
205
158
 
206
- :host > div > div.results-wrapper > div.results .item-no-results {
159
+ .results .item-no-results {
207
160
  cursor: default;
208
161
  font-size: var(--font-size-3);
209
162
  line-height: var(--font-size-6);
210
163
  }
211
164
  }
212
165
 
213
- :host([size="small"]) > div > div.results-wrapper > div.results .item,
214
- :host([size="x-small"]) > div > div.results-wrapper > div.results .item,
215
- :host([size="small"]) > div > div.results-wrapper > div.results .category-heading,
216
- :host([size="x-small"]) > div > div.results-wrapper > div.results .category-heading {
166
+ :host([size="small"]) .results :is(.item, .category-heading),
167
+ :host([size="x-small"]) .results :is(.item, .category-heading) {
217
168
  font-size: var(--font-size-2);
218
169
  }
219
170
 
220
- :host([size="small"]) > div > div.results-wrapper > div.results .item:not(.has-category),
221
- :host([size="x-small"]) > div > div.results-wrapper > div.results .item:not(.has-category) {
171
+ :host([size="small"]) .results .item:not(.has-category),
172
+ :host([size="x-small"]) .results .item:not(.has-category) {
222
173
  --z-icon-height: 16px;
223
174
  --z-icon-width: 16px;
224
175
  }
@@ -1,4 +1,5 @@
1
1
  import { h } from "@stencil/core";
2
+ import dialogPolyfill from "dialog-polyfill";
2
3
  import { KeyboardCode } from "../../../beans";
3
4
  const FOCUSABLE_ELEMENTS_SELECTOR = ':is(button, input, select, textarea, [contenteditable=""], [contenteditable="true"], a[href], [tabindex], summary):not([disabled], [disabled=""], [tabindex="-1"], [aria-hidden="true"], [hidden])';
4
5
  /**
@@ -28,7 +29,13 @@ export class ZModal {
28
29
  }
29
30
  }
30
31
  componentDidLoad() {
31
- this.open();
32
+ if (typeof HTMLDialogElement !== "function") {
33
+ dialogPolyfill.registerDialog(this.dialog);
34
+ this.dialog.setAttribute("open", "true");
35
+ }
36
+ else {
37
+ this.open();
38
+ }
32
39
  }
33
40
  /** open modal */
34
41
  async open() {
@@ -20,6 +20,19 @@
20
20
  display: none;
21
21
  }
22
22
 
23
+ /* polyfill style */
24
+ :host > dialog + .backdrop {
25
+ display: none;
26
+ }
27
+
28
+ :host > dialog:not([open]) {
29
+ display: none;
30
+ }
31
+
32
+ :host > dialog[open] {
33
+ display: block;
34
+ }
35
+
23
36
  .modal-container {
24
37
  z-index: 1010;
25
38
  display: flex;