@zanichelli/albe-web-components 2.48.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/CHANGELOG.md +21 -0
  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-switcher_11.cjs.entry.js → z-app-switcher_12.cjs.entry.js} +42 -6
  5. package/dist/cjs/z-cookiebar.cjs.entry.js +3 -3
  6. package/dist/cjs/z-date-picker.cjs.entry.js +104 -4
  7. package/dist/cjs/z-file-upload.cjs.entry.js +14 -11
  8. package/dist/cjs/z-footer.cjs.entry.js +12 -7
  9. package/dist/cjs/z-modal-login.cjs.entry.js +5 -4
  10. package/dist/cjs/z-myz-card-dictionary.cjs.entry.js +2 -2
  11. package/dist/cjs/z-myz-topbar.cjs.entry.js +2 -2
  12. package/dist/cjs/z-navigation-tab-link.cjs.entry.js +12 -11
  13. package/dist/cjs/z-navigation-tab.cjs.entry.js +12 -11
  14. package/dist/cjs/z-navigation-tabs.cjs.entry.js +5 -8
  15. package/dist/cjs/z-table-cell.cjs.entry.js +1 -1
  16. package/dist/cjs/z-table-header.cjs.entry.js +1 -1
  17. package/dist/cjs/z-table.cjs.entry.js +2 -2
  18. package/dist/cjs/z-toast-notification.cjs.entry.js +1 -1
  19. package/dist/collection/collection-manifest.json +1 -0
  20. package/dist/collection/components/buttons/z-button/index.js +72 -52
  21. package/dist/collection/components/buttons/z-button/styles.css +32 -111
  22. package/dist/collection/components/file-upload/z-file-upload/index.js +13 -10
  23. package/dist/collection/components/file-upload/z-file-upload/styles.css +2 -2
  24. package/dist/collection/components/footer/z-footer/index.js +19 -14
  25. package/dist/collection/components/footer/z-footer/styles.css +2 -2
  26. package/dist/collection/components/modal/z-modal-login/index.js +5 -4
  27. package/dist/collection/components/modal/z-modal-login/styles.css +8 -8
  28. package/dist/collection/components/navigation/tabs/navigation-tab.css +49 -31
  29. package/dist/collection/components/navigation/tabs/z-navigation-tab/index.js +14 -21
  30. package/dist/collection/components/navigation/tabs/z-navigation-tab-link/index.js +14 -21
  31. package/dist/collection/components/navigation/tabs/z-navigation-tabs/index.js +4 -7
  32. package/dist/collection/components/navigation/tabs/z-navigation-tabs/styles.css +6 -20
  33. package/dist/collection/components/notification/z-cookiebar/index.js +2 -2
  34. package/dist/collection/components/notification/z-cookiebar/styles.css +3 -3
  35. package/dist/collection/components/notification/z-toast-notification/styles.css +4 -2
  36. package/dist/collection/components/z-date-picker/index.js +111 -4
  37. package/dist/collection/components/z-date-picker/styles.css +14 -4
  38. package/dist/collection/components/z-table/z-table/index.js +4 -4
  39. package/dist/collection/components/z-table/z-table-cell/index.js +1 -1
  40. package/dist/collection/components/z-table/z-table-header/index.js +1 -1
  41. package/dist/collection/deprecated/z-button-deprecated/index.js +218 -0
  42. package/dist/collection/deprecated/z-button-deprecated/styles.css +231 -0
  43. package/dist/collection/snowflakes/myz/card/z-myz-card-dictionary/index.js +1 -1
  44. package/dist/collection/snowflakes/myz/card/z-myz-card-dictionary/styles.css +1 -1
  45. package/dist/collection/snowflakes/myz/topbar/index.js +1 -1
  46. package/dist/collection/snowflakes/myz/topbar/styles.css +8 -8
  47. package/dist/esm/loader.js +1 -1
  48. package/dist/esm/web-components-library.js +1 -1
  49. package/dist/esm/{z-app-switcher_11.entry.js → z-app-switcher_12.entry.js} +42 -7
  50. package/dist/esm/z-cookiebar.entry.js +3 -3
  51. package/dist/esm/z-date-picker.entry.js +104 -4
  52. package/dist/esm/z-file-upload.entry.js +14 -11
  53. package/dist/esm/z-footer.entry.js +12 -7
  54. package/dist/esm/z-modal-login.entry.js +5 -4
  55. package/dist/esm/z-myz-card-dictionary.entry.js +2 -2
  56. package/dist/esm/z-myz-topbar.entry.js +2 -2
  57. package/dist/esm/z-navigation-tab-link.entry.js +13 -12
  58. package/dist/esm/z-navigation-tab.entry.js +13 -12
  59. package/dist/esm/z-navigation-tabs.entry.js +5 -8
  60. package/dist/esm/z-table-cell.entry.js +1 -1
  61. package/dist/esm/z-table-header.entry.js +1 -1
  62. package/dist/esm/z-table.entry.js +2 -2
  63. package/dist/esm/z-toast-notification.entry.js +1 -1
  64. package/dist/types/components/buttons/z-button/index.d.ts +13 -7
  65. package/dist/types/components/navigation/tabs/z-navigation-tab/index.d.ts +8 -5
  66. package/dist/types/components/navigation/tabs/z-navigation-tab-link/index.d.ts +8 -5
  67. package/dist/types/components/navigation/tabs/z-navigation-tabs/index.d.ts +2 -0
  68. package/dist/types/components/z-date-picker/index.d.ts +6 -0
  69. package/dist/types/components.d.ts +99 -6
  70. package/dist/types/deprecated/z-button-deprecated/index.d.ts +28 -0
  71. package/dist/web-components-library/p-0b590426.entry.js +1 -0
  72. package/dist/web-components-library/p-2b8975b1.entry.js +1 -0
  73. package/dist/web-components-library/p-2ff952a3.entry.js +1 -0
  74. package/dist/web-components-library/p-393c31c0.entry.js +1 -0
  75. package/dist/web-components-library/p-459dab30.entry.js +1 -0
  76. package/dist/web-components-library/p-709ab23c.entry.js +1 -0
  77. package/dist/web-components-library/p-8b62bd85.entry.js +1 -0
  78. package/dist/web-components-library/{p-791cbcab.entry.js → p-a391566a.entry.js} +1 -1
  79. package/{www/build/p-ae2e17b4.entry.js → dist/web-components-library/p-adad78fc.entry.js} +1 -1
  80. package/dist/web-components-library/{p-3dba3a83.entry.js → p-bbb0e7a7.entry.js} +2 -2
  81. package/dist/web-components-library/p-cadcf677.entry.js +1 -0
  82. package/dist/web-components-library/p-cce20009.entry.js +1 -0
  83. package/dist/web-components-library/p-cd2ca92b.entry.js +1 -0
  84. package/dist/web-components-library/p-da7760a3.entry.js +1 -0
  85. package/dist/web-components-library/p-dcf4d1b6.entry.js +1 -0
  86. package/dist/web-components-library/web-components-library.esm.js +1 -1
  87. package/package.json +1 -1
  88. package/react/components.d.ts +1 -0
  89. package/react/components.js +4 -3
  90. package/react/components.js.map +1 -1
  91. package/www/build/p-0b590426.entry.js +1 -0
  92. package/www/build/p-2b8975b1.entry.js +1 -0
  93. package/www/build/p-2ff952a3.entry.js +1 -0
  94. package/www/build/p-393c31c0.entry.js +1 -0
  95. package/www/build/p-459dab30.entry.js +1 -0
  96. package/www/build/p-709ab23c.entry.js +1 -0
  97. package/www/build/p-8b62bd85.entry.js +1 -0
  98. package/www/build/{p-791cbcab.entry.js → p-a391566a.entry.js} +1 -1
  99. package/{dist/web-components-library/p-ae2e17b4.entry.js → www/build/p-adad78fc.entry.js} +1 -1
  100. package/www/build/{p-3dba3a83.entry.js → p-bbb0e7a7.entry.js} +2 -2
  101. package/www/build/p-cadcf677.entry.js +1 -0
  102. package/www/build/p-cce20009.entry.js +1 -0
  103. package/www/build/p-cd2ca92b.entry.js +1 -0
  104. package/www/build/p-da7760a3.entry.js +1 -0
  105. package/www/build/p-dcf4d1b6.entry.js +1 -0
  106. package/www/build/web-components-library.esm.js +1 -1
  107. package/www/index.html +2 -2
  108. package/www/pages/notification.html +10 -7
  109. package/dist/web-components-library/p-114f3a85.entry.js +0 -1
  110. package/dist/web-components-library/p-1e1cb4ad.entry.js +0 -1
  111. package/dist/web-components-library/p-29f07a9b.entry.js +0 -1
  112. package/dist/web-components-library/p-3edd463d.entry.js +0 -1
  113. package/dist/web-components-library/p-4b166956.entry.js +0 -1
  114. package/dist/web-components-library/p-6ef6464c.entry.js +0 -1
  115. package/dist/web-components-library/p-8188846a.entry.js +0 -1
  116. package/dist/web-components-library/p-a15db194.entry.js +0 -1
  117. package/dist/web-components-library/p-a2a3a537.entry.js +0 -1
  118. package/dist/web-components-library/p-a6a9be81.entry.js +0 -1
  119. package/dist/web-components-library/p-b60fe58c.entry.js +0 -1
  120. package/dist/web-components-library/p-bea1f6b8.entry.js +0 -1
  121. package/www/build/p-114f3a85.entry.js +0 -1
  122. package/www/build/p-1e1cb4ad.entry.js +0 -1
  123. package/www/build/p-29f07a9b.entry.js +0 -1
  124. package/www/build/p-3edd463d.entry.js +0 -1
  125. package/www/build/p-4b166956.entry.js +0 -1
  126. package/www/build/p-6ef6464c.entry.js +0 -1
  127. package/www/build/p-8188846a.entry.js +0 -1
  128. package/www/build/p-a15db194.entry.js +0 -1
  129. package/www/build/p-a2a3a537.entry.js +0 -1
  130. package/www/build/p-a6a9be81.entry.js +0 -1
  131. package/www/build/p-a9db7c4f.js +0 -129
  132. package/www/build/p-b60fe58c.entry.js +0 -1
  133. package/www/build/p-bea1f6b8.entry.js +0 -1
  134. package/www/build/p-fcff1237.css +0 -812
@@ -6,12 +6,12 @@ const index = require('./index-84b7063a.js');
6
6
  const index$1 = require('./index-b1289f95.js');
7
7
  const icons = require('./icons-30810e62.js');
8
8
 
9
- const navigationTabCss = ":host>button,:host>a{position:relative;z-index:0;display:inline-flex;align-items:center;justify-content:center;width:auto;margin:0;padding:calc(var(--space-unit) * 2) calc(var(--space-unit) * 5);background-color:unset;text-align:center;font-size:inherit;font-family:var(--font-family-sans);line-height:inherit;letter-spacing:inherit;white-space:nowrap;color:var(--color-primary01);fill:currentColor;border:none;border-radius:var(--border-no-radius);outline:none;cursor:pointer}:host>a{text-decoration:none}:host *::before,:host *::after{box-sizing:border-box}:host(:not([disabled]):hover)>*,:host([selected])>*{color:var(--color-hover-secondary);fill:currentColor}:host(:not([disabled]):hover)>*::after,:host([selected])>*::after{content:'';position:absolute;background-color:var(--color-hover-secondary)}:host([orientation='horizontal']:not([disabled]):hover)>*::after,:host([orientation='horizontal'][selected])>*::after{bottom:0;left:0;width:100%;height:var(--border-size-large)}slot[name=\"icon\"] z-icon,::slotted([slot=\"icon\"]){--z-icon-width:calc(var(--space-unit) * 2);--z-icon-height:calc(var(--space-unit) * 2);display:flex;margin:0}:host([orientation='horizontal']) slot[name=\"icon\"] z-icon,:host([orientation='horizontal']) ::slotted([slot=\"icon\"]){margin-right:var(--space-unit)}:host(:not([disabled]):hover)>*{background-color:var(--color-background)}:host>*:focus:focus-visible{box-shadow:var(--shadow-focus-primary)}:host([disabled])>*{pointer-events:all;cursor:not-allowed;color:var(--gray500);fill:currentColor}:host([size='small'])>*{font-size:var(--font-size-2);line-height:1.4;letter-spacing:0.16px}:host([size='small'][orientation='horizontal'])>*{padding:var(--space-unit) calc(var(--space-unit) * 2)}:host([size='small'][orientation='horizontal']:not([disabled]):hover)>*::after,:host([size='small'][orientation='horizontal'][selected])>*::after{height:var(--border-size-medium)}:host([size='small']:not([orientation='vertical'])) slot[name=\"icon\"] z-icon,:host([size='small']:not([orientation='vertical'])) ::slotted([slot=\"icon\"]){--z-icon-width:14px;--z-icon-height:14px}:host([orientation='vertical'])>*{padding:calc(var(--space-unit) * 3) calc(var(--space-unit) * 2)}:host([orientation='vertical']:hover:not([disabled]))>*::after,:host([orientation='vertical'][selected])>*::after{width:var(--border-size-large);height:100%;top:0;right:0}";
9
+ const navigationTabCss = "z-navigation-tab>button,z-navigation-tab-link>a{position:relative;z-index:0;display:inline-flex;align-items:center;justify-content:center;width:auto;margin:0;padding:calc(var(--space-unit) * 2) calc(var(--space-unit) * 5);background-color:unset;text-align:center;font-size:inherit;font-family:var(--font-family-sans);line-height:inherit;letter-spacing:inherit;white-space:nowrap;color:var(--color-primary01);fill:currentColor;border:none;border-radius:var(--border-no-radius);outline:none;cursor:pointer}z-navigation-tab-link>a{text-decoration:none}z-navigation-tab *,z-navigation-tab-link *,z-navigation-tab *::before,z-navigation-tab *::after,z-navigation-tab-link *::before,z-navigation-tab-link *::after{box-sizing:border-box}z-navigation-tab>*:focus:focus-visible,z-navigation-tab-link>*:focus:focus-visible{box-shadow:inset var(--shadow-focus-primary)}z-navigation-tab:not([disabled]):hover>*,z-navigation-tab[selected]>*,z-navigation-tab-link:not([disabled]):hover>*,z-navigation-tab-link[selected]>*{color:var(--color-hover-secondary);fill:currentColor}z-navigation-tab:not([disabled]):hover>*::after,z-navigation-tab[selected]>*::after,z-navigation-tab-link:not([disabled]):hover>*::after,z-navigation-tab-link[selected]>*::after{content:\"\";position:absolute;background-color:var(--color-hover-secondary)}z-navigation-tab[orientation=\"horizontal\"]:not([disabled]):hover>*::after,z-navigation-tab[orientation=\"horizontal\"][selected]>*::after,z-navigation-tab-link[orientation=\"horizontal\"]:not([disabled]):hover>*::after,z-navigation-tab-link[orientation=\"horizontal\"][selected]>*::after{bottom:0;left:0;width:100%;height:var(--border-size-large)}z-navigation-tab z-icon,z-navigation-tab-link z-icon{--z-icon-width:calc(var(--space-unit) * 2);--z-icon-height:calc(var(--space-unit) * 2);display:flex;margin:0}z-navigation-tab[orientation=\"horizontal\"] z-icon,z-navigation-tab-link[orientation=\"horizontal\"] z-icon{margin-right:var(--space-unit)}z-navigation-tab:not([disabled]):hover>*{background-color:var(--color-background)}z-navigation-tab[disabled]>*{pointer-events:all;cursor:not-allowed;color:var(--gray500);fill:currentColor}z-navigation-tab[size=\"small\"]>*,z-navigation-tab-link[size=\"small\"]>*{font-size:var(--font-size-2);line-height:1.4;letter-spacing:0.16px}z-navigation-tab[size=\"small\"][orientation=\"horizontal\"]>*,z-navigation-tab-link[size=\"small\"][orientation=\"horizontal\"]>*{padding:var(--space-unit) calc(var(--space-unit) * 2)}z-navigation-tab[size=\"small\"][orientation=\"horizontal\"]:not([disabled]):hover>*::after,z-navigation-tab[size=\"small\"][orientation=\"horizontal\"][selected]>*::after,z-navigation-tab-link[size=\"small\"][orientation=\"horizontal\"]:hover>*::after,z-navigation-tab-link[size=\"small\"][orientation=\"horizontal\"][selected]>*::after{height:var(--border-size-medium)}z-navigation-tab[size=\"small\"]:not([orientation=\"vertical\"]) z-icon,z-navigation-tab-link[size=\"small\"]:not([orientation=\"vertical\"]) z-icon{--z-icon-width:14px;--z-icon-height:14px}z-navigation-tab[orientation=\"vertical\"]>*,z-navigation-tab-link[orientation=\"vertical\"]>*{padding:calc(var(--space-unit) * 3) calc(var(--space-unit) * 2)}z-navigation-tab[orientation=\"vertical\"]:hover:not([disabled])>*::after,z-navigation-tab[orientation=\"vertical\"][selected]>*::after,z-navigation-tab-link[orientation=\"vertical\"]:hover>*::after,z-navigation-tab-link[orientation=\"vertical\"][selected]>*::after{width:var(--border-size-large);height:100%;top:0;right:0}";
10
10
 
11
11
  const ZNavigationTabLink = class {
12
12
  constructor(hostRef) {
13
13
  index.registerInstance(this, hostRef);
14
- this.emitSelected = index.createEvent(this, "selected", 7);
14
+ this.selectedEvent = index.createEvent(this, "selected", 7);
15
15
  /**
16
16
  * Whether the tab is selected.
17
17
  */
@@ -29,19 +29,21 @@ const ZNavigationTabLink = class {
29
29
  */
30
30
  this.size = index$1.NavigationTabsSizes.big;
31
31
  }
32
- onFocus() {
33
- this.host.scrollIntoView({
34
- behavior: "smooth",
35
- block: "nearest",
36
- inline: "nearest",
37
- });
32
+ /**
33
+ * Scroll into view to center the tab.
34
+ */
35
+ scrollToTab({ target: button }) {
36
+ const scrollOptions = this.orientation === index$1.NavigationTabsOrientations.horizontal ?
37
+ { block: "nearest", inline: "center" } :
38
+ { block: "center", inline: "nearest" };
39
+ button.scrollIntoView(Object.assign({ behavior: "smooth" }, scrollOptions));
38
40
  }
39
41
  onClick() {
40
42
  this.selected = true;
41
43
  }
42
44
  onSelected() {
43
45
  if (this.selected) {
44
- this.emitSelected.emit();
46
+ this.selectedEvent.emit();
45
47
  }
46
48
  }
47
49
  /**
@@ -58,9 +60,8 @@ const ZNavigationTabLink = class {
58
60
  return index.h("z-icon", { name: icon });
59
61
  }
60
62
  render() {
61
- return (index.h("a", { role: "tab", href: !this.disabled && this.href, title: this.htmlTitle, target: this.target }, index.h("slot", { name: "icon" }, this.icon && this.renderIcon()), this.orientation === "horizontal" && this.label));
63
+ return (index.h("a", { role: "tab", href: !this.disabled && this.href, title: this.htmlTitle, target: this.target, onFocus: this.scrollToTab.bind(this) }, this.icon && this.renderIcon(), this.orientation === "horizontal" && this.label));
62
64
  }
63
- get host() { return index.getElement(this); }
64
65
  static get watchers() { return {
65
66
  "selected": ["onSelected"]
66
67
  }; }
@@ -6,12 +6,12 @@ const index = require('./index-84b7063a.js');
6
6
  const index$1 = require('./index-b1289f95.js');
7
7
  const icons = require('./icons-30810e62.js');
8
8
 
9
- const navigationTabCss = ":host>button,:host>a{position:relative;z-index:0;display:inline-flex;align-items:center;justify-content:center;width:auto;margin:0;padding:calc(var(--space-unit) * 2) calc(var(--space-unit) * 5);background-color:unset;text-align:center;font-size:inherit;font-family:var(--font-family-sans);line-height:inherit;letter-spacing:inherit;white-space:nowrap;color:var(--color-primary01);fill:currentColor;border:none;border-radius:var(--border-no-radius);outline:none;cursor:pointer}:host>a{text-decoration:none}:host *::before,:host *::after{box-sizing:border-box}:host(:not([disabled]):hover)>*,:host([selected])>*{color:var(--color-hover-secondary);fill:currentColor}:host(:not([disabled]):hover)>*::after,:host([selected])>*::after{content:'';position:absolute;background-color:var(--color-hover-secondary)}:host([orientation='horizontal']:not([disabled]):hover)>*::after,:host([orientation='horizontal'][selected])>*::after{bottom:0;left:0;width:100%;height:var(--border-size-large)}slot[name=\"icon\"] z-icon,::slotted([slot=\"icon\"]){--z-icon-width:calc(var(--space-unit) * 2);--z-icon-height:calc(var(--space-unit) * 2);display:flex;margin:0}:host([orientation='horizontal']) slot[name=\"icon\"] z-icon,:host([orientation='horizontal']) ::slotted([slot=\"icon\"]){margin-right:var(--space-unit)}:host(:not([disabled]):hover)>*{background-color:var(--color-background)}:host>*:focus:focus-visible{box-shadow:var(--shadow-focus-primary)}:host([disabled])>*{pointer-events:all;cursor:not-allowed;color:var(--gray500);fill:currentColor}:host([size='small'])>*{font-size:var(--font-size-2);line-height:1.4;letter-spacing:0.16px}:host([size='small'][orientation='horizontal'])>*{padding:var(--space-unit) calc(var(--space-unit) * 2)}:host([size='small'][orientation='horizontal']:not([disabled]):hover)>*::after,:host([size='small'][orientation='horizontal'][selected])>*::after{height:var(--border-size-medium)}:host([size='small']:not([orientation='vertical'])) slot[name=\"icon\"] z-icon,:host([size='small']:not([orientation='vertical'])) ::slotted([slot=\"icon\"]){--z-icon-width:14px;--z-icon-height:14px}:host([orientation='vertical'])>*{padding:calc(var(--space-unit) * 3) calc(var(--space-unit) * 2)}:host([orientation='vertical']:hover:not([disabled]))>*::after,:host([orientation='vertical'][selected])>*::after{width:var(--border-size-large);height:100%;top:0;right:0}";
9
+ const navigationTabCss = "z-navigation-tab>button,z-navigation-tab-link>a{position:relative;z-index:0;display:inline-flex;align-items:center;justify-content:center;width:auto;margin:0;padding:calc(var(--space-unit) * 2) calc(var(--space-unit) * 5);background-color:unset;text-align:center;font-size:inherit;font-family:var(--font-family-sans);line-height:inherit;letter-spacing:inherit;white-space:nowrap;color:var(--color-primary01);fill:currentColor;border:none;border-radius:var(--border-no-radius);outline:none;cursor:pointer}z-navigation-tab-link>a{text-decoration:none}z-navigation-tab *,z-navigation-tab-link *,z-navigation-tab *::before,z-navigation-tab *::after,z-navigation-tab-link *::before,z-navigation-tab-link *::after{box-sizing:border-box}z-navigation-tab>*:focus:focus-visible,z-navigation-tab-link>*:focus:focus-visible{box-shadow:inset var(--shadow-focus-primary)}z-navigation-tab:not([disabled]):hover>*,z-navigation-tab[selected]>*,z-navigation-tab-link:not([disabled]):hover>*,z-navigation-tab-link[selected]>*{color:var(--color-hover-secondary);fill:currentColor}z-navigation-tab:not([disabled]):hover>*::after,z-navigation-tab[selected]>*::after,z-navigation-tab-link:not([disabled]):hover>*::after,z-navigation-tab-link[selected]>*::after{content:\"\";position:absolute;background-color:var(--color-hover-secondary)}z-navigation-tab[orientation=\"horizontal\"]:not([disabled]):hover>*::after,z-navigation-tab[orientation=\"horizontal\"][selected]>*::after,z-navigation-tab-link[orientation=\"horizontal\"]:not([disabled]):hover>*::after,z-navigation-tab-link[orientation=\"horizontal\"][selected]>*::after{bottom:0;left:0;width:100%;height:var(--border-size-large)}z-navigation-tab z-icon,z-navigation-tab-link z-icon{--z-icon-width:calc(var(--space-unit) * 2);--z-icon-height:calc(var(--space-unit) * 2);display:flex;margin:0}z-navigation-tab[orientation=\"horizontal\"] z-icon,z-navigation-tab-link[orientation=\"horizontal\"] z-icon{margin-right:var(--space-unit)}z-navigation-tab:not([disabled]):hover>*{background-color:var(--color-background)}z-navigation-tab[disabled]>*{pointer-events:all;cursor:not-allowed;color:var(--gray500);fill:currentColor}z-navigation-tab[size=\"small\"]>*,z-navigation-tab-link[size=\"small\"]>*{font-size:var(--font-size-2);line-height:1.4;letter-spacing:0.16px}z-navigation-tab[size=\"small\"][orientation=\"horizontal\"]>*,z-navigation-tab-link[size=\"small\"][orientation=\"horizontal\"]>*{padding:var(--space-unit) calc(var(--space-unit) * 2)}z-navigation-tab[size=\"small\"][orientation=\"horizontal\"]:not([disabled]):hover>*::after,z-navigation-tab[size=\"small\"][orientation=\"horizontal\"][selected]>*::after,z-navigation-tab-link[size=\"small\"][orientation=\"horizontal\"]:hover>*::after,z-navigation-tab-link[size=\"small\"][orientation=\"horizontal\"][selected]>*::after{height:var(--border-size-medium)}z-navigation-tab[size=\"small\"]:not([orientation=\"vertical\"]) z-icon,z-navigation-tab-link[size=\"small\"]:not([orientation=\"vertical\"]) z-icon{--z-icon-width:14px;--z-icon-height:14px}z-navigation-tab[orientation=\"vertical\"]>*,z-navigation-tab-link[orientation=\"vertical\"]>*{padding:calc(var(--space-unit) * 3) calc(var(--space-unit) * 2)}z-navigation-tab[orientation=\"vertical\"]:hover:not([disabled])>*::after,z-navigation-tab[orientation=\"vertical\"][selected]>*::after,z-navigation-tab-link[orientation=\"vertical\"]:hover>*::after,z-navigation-tab-link[orientation=\"vertical\"][selected]>*::after{width:var(--border-size-large);height:100%;top:0;right:0}";
10
10
 
11
11
  const ZNavigationTab = class {
12
12
  constructor(hostRef) {
13
13
  index.registerInstance(this, hostRef);
14
- this.emitSelected = index.createEvent(this, "selected", 7);
14
+ this.selectedEvent = index.createEvent(this, "selected", 7);
15
15
  /**
16
16
  * Whether the tab is selected.
17
17
  */
@@ -29,12 +29,14 @@ const ZNavigationTab = class {
29
29
  */
30
30
  this.size = index$1.NavigationTabsSizes.big;
31
31
  }
32
- onFocus() {
33
- this.host.scrollIntoView({
34
- behavior: "smooth",
35
- block: "nearest",
36
- inline: "nearest",
37
- });
32
+ /**
33
+ * Scroll into view to center the tab.
34
+ */
35
+ scrollToTab({ target: button }) {
36
+ const scrollOptions = this.orientation === index$1.NavigationTabsOrientations.horizontal ?
37
+ { block: "nearest", inline: "center" } :
38
+ { block: "center", inline: "nearest" };
39
+ button.scrollIntoView(Object.assign({ behavior: "smooth" }, scrollOptions));
38
40
  }
39
41
  onClick() {
40
42
  if (!this.disabled) {
@@ -43,7 +45,7 @@ const ZNavigationTab = class {
43
45
  }
44
46
  onSelected() {
45
47
  if (this.selected) {
46
- this.emitSelected.emit();
48
+ this.selectedEvent.emit();
47
49
  }
48
50
  }
49
51
  /**
@@ -60,9 +62,8 @@ const ZNavigationTab = class {
60
62
  return index.h("z-icon", { name: icon });
61
63
  }
62
64
  render() {
63
- return (index.h("button", { role: "tab", disabled: this.disabled, title: this.htmlTitle }, index.h("slot", { name: "icon" }, this.icon && this.renderIcon()), this.orientation === "horizontal" && this.label));
65
+ return (index.h("button", { role: "tab", disabled: this.disabled, title: this.htmlTitle, onFocus: this.scrollToTab.bind(this) }, this.icon && this.renderIcon(), this.orientation === "horizontal" && this.label));
64
66
  }
65
- get host() { return index.getElement(this); }
66
67
  static get watchers() { return {
67
68
  "selected": ["onSelected"]
68
69
  }; }
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-84b7063a.js');
6
6
  const index$1 = require('./index-b1289f95.js');
7
7
 
8
- const stylesCss = ":host{--safe-scroll-area:4px;--negative-safe-scroll-area:calc(-1 * var(--safe-scroll-area));position:relative;display:flex;flex-direction:row;z-index:0;margin:var(--negative-safe-scroll-area);padding:var(--safe-scroll-area);font-family:var(--font-family-sans);font-weight:var(--font-rg);overflow:hidden}:host,:host *,::slotted(*){box-sizing:border-box}::-webkit-scrollbar{display:none}.navigation-button{position:absolute;display:flex;align-items:center;justify-content:center;margin:0;padding:0;background:var(--color-white);border:none;outline:none;fill:var(--color-primary01);border-radius:var(--border-no-radius);cursor:pointer;z-index:1}.navigation-button:focus{fill:var(--color-primary01);box-shadow:var(--shadow-focus-primary)}.navigation-button:disabled{display:none}nav{display:flex;align-items:center;justify-content:flex-start;overflow:auto;margin:var(--negative-safe-scroll-area);padding:var(--safe-scroll-area);scroll-padding:var(--safe-scroll-area);scrollbar-width:none}:host([orientation='horizontal']) nav{width:100%}:host([orientation='horizontal']) .navigation-button{top:0;height:100%;width:calc((var(--space-unit) * 4) + var(--safe-scroll-area))}:host([orientation='horizontal']) .navigation-button:first-child{left:0;padding-left:var(--safe-scroll-area);box-shadow:5px 0px var(--safe-scroll-area) var(--negative-safe-scroll-area) rgba(66, 69, 72, 0.40)}:host([orientation='horizontal']) .navigation-button:last-child{right:0;padding-right:4px;box-shadow:-5px 0px var(--safe-scroll-area) var(--negative-safe-scroll-area) rgba(66, 69, 72, 0.40)}:host([orientation='vertical']){flex-direction:column;width:fit-content}:host([orientation='vertical']) nav{flex-direction:column;align-items:stretch;height:100%}:host([orientation='vertical']) .navigation-button{left:0;width:100%;height:calc((var(--space-unit) * 4) + var(--safe-scroll-area))}:host([orientation='vertical']) .navigation-button:first-child{top:0;padding-top:var(--safe-scroll-area);box-shadow:0px 5px var(--safe-scroll-area) var(--negative-safe-scroll-area) rgba(66, 69, 72, 0.40)}:host([orientation='vertical']) .navigation-button:last-child{bottom:0;padding-bottom:var(--safe-scroll-area);box-shadow:0px -5px var(--safe-scroll-area) var(--negative-safe-scroll-area) rgba(66, 69, 72, 0.40)}:host([size='small'][orientation='vertical']) .navigation-button{height:calc(var(--space-unit) * 4)}";
8
+ const stylesCss = ":host{position:relative;display:flex;flex-direction:row;z-index:0;font-family:var(--font-family-sans);font-weight:var(--font-rg);overflow:hidden}:host,:host *,::slotted(*){box-sizing:border-box}::-webkit-scrollbar{display:none}.navigation-button{position:absolute;display:flex;align-items:center;justify-content:center;margin:0;padding:0;background:var(--color-white);border:none;outline:none;fill:var(--color-primary01);border-radius:var(--border-no-radius);cursor:pointer;z-index:1;box-shadow:0px 0px 4px 1px rgb(66, 69, 72, 0.40)}.navigation-button:focus:focus-visible{fill:var(--color-primary01);box-shadow:inset var(--shadow-focus-primary)}.navigation-button:disabled{display:none}nav{display:flex;align-items:center;justify-content:flex-start;overflow:auto;scroll-behavior:smooth;scrollbar-width:none}:host([orientation='horizontal']) nav{width:100%}:host([orientation='horizontal']) .navigation-button{top:0;height:100%;width:calc(var(--space-unit) * 4)}:host([orientation='horizontal']) .navigation-button:first-child{left:0}:host([orientation='horizontal']) .navigation-button:last-child{right:0}:host([orientation='vertical']){flex-direction:column;width:fit-content}:host([orientation='vertical']) nav{flex-direction:column;align-items:stretch;height:100%}:host([orientation='vertical']) .navigation-button{left:0;width:100%;height:calc(var(--space-unit) * 4)}:host([orientation='vertical']) .navigation-button:first-child{top:0}:host([orientation='vertical']) .navigation-button:last-child{bottom:0}:host([size='small'][orientation='vertical']) .navigation-button{height:calc(var(--space-unit) * 4)}";
9
9
 
10
10
  const ZNavigationTabs = class {
11
11
  constructor(hostRef) {
@@ -71,6 +71,8 @@ const ZNavigationTabs = class {
71
71
  }
72
72
  /**
73
73
  * Listen for child tab selection.
74
+ * Deselect all other previously selected tabs,
75
+ * then scroll to the new selected tab and center it.
74
76
  * @param {CustomEvent} event `selected` event triggered by a child tab
75
77
  */
76
78
  onTabSelected(event) {
@@ -86,11 +88,8 @@ const ZNavigationTabs = class {
86
88
  * Scroll the navigation bar half of its size backward.
87
89
  */
88
90
  navigateBackwards() {
89
- const safeScrollAreaSize = parseFloat(getComputedStyle(this.host).getPropertyValue('--safe-scroll-area'));
90
91
  this.tabsNav.scrollBy({
91
- [this.direction.toLowerCase()]: 0 -
92
- (this.tabsNav[`client${this.dimension}`] / 2) -
93
- safeScrollAreaSize,
92
+ [this.direction.toLowerCase()]: 0 - (this.tabsNav[`client${this.dimension}`] / 2),
94
93
  behavior: 'smooth',
95
94
  });
96
95
  }
@@ -98,11 +97,9 @@ const ZNavigationTabs = class {
98
97
  * Scroll the navigation bar half of its size forward.
99
98
  */
100
99
  navigateForward() {
101
- const safeScrollAreaSize = parseFloat(getComputedStyle(this.host).getPropertyValue('--safe-scroll-area'));
102
100
  this.tabsNav.scrollBy({
103
101
  [this.direction.toLowerCase()]: this.tabsNav[`scroll${this.direction}`] +
104
- (this.tabsNav[`client${this.dimension}`] / 2) +
105
- safeScrollAreaSize,
102
+ (this.tabsNav[`client${this.dimension}`] / 2),
106
103
  behavior: 'smooth',
107
104
  });
108
105
  }
@@ -25,7 +25,7 @@ const ZTableCell = class {
25
25
  render() {
26
26
  return (index.h(index.Host, null, this.showButton && (index.h("div", { class: index$2.classnames("button-container", {
27
27
  visible: this.isMenuOpened,
28
- }) }, index.h("div", { class: "button-content" }, index.h("z-button", { icon: "contextual-menu", variant: index$1.ButtonVariantEnum.tertiary, size: index$1.ButtonSizeEnum["x-small"], onClick: () => this.handleMenu(), square: true }), index.h("div", { class: index$2.classnames("contextual-menu-container", {
28
+ }) }, index.h("div", { class: "button-content" }, index.h("z-button-deprecated", { icon: "contextual-menu", variant: index$1.ButtonVariantEnum.tertiary, size: index$1.ButtonSizeEnum["x-small"], onClick: () => this.handleMenu(), square: true }), index.h("div", { class: index$2.classnames("contextual-menu-container", {
29
29
  visible: this.isMenuOpened,
30
30
  }) }, index.h("slot", { name: "contextual-menu" }))))), index.h("slot", null)));
31
31
  }
@@ -79,7 +79,7 @@ const ZTableHeader = class {
79
79
  ? "arrow-up"
80
80
  : "arrow-down", class: "arrow" }))), this.showButton && (index.h("div", { class: index$2.classnames("popover-container", {
81
81
  visible: this.isMenuOpened,
82
- }) }, index.h("z-popover", { position: index$1.PopoverPosition["below-center"], "background-color": "gray200" }, index.h("z-button", { icon: "contextual-menu", variant: index$1.ButtonVariantEnum["tertiary"], size: index$1.ButtonSizeEnum["x-small"], square: true, slot: "trigger", onClick: () => this.handleMenuClick() }), index.h("div", { slot: "popover" }, index.h("slot", { name: "contextual-menu" })))))));
82
+ }) }, index.h("z-popover", { position: index$1.PopoverPosition["below-center"], "background-color": "gray200" }, index.h("z-button-deprecated", { icon: "contextual-menu", variant: index$1.ButtonVariantEnum["tertiary"], size: index$1.ButtonSizeEnum["x-small"], square: true, slot: "trigger", onClick: () => this.handleMenuClick() }), index.h("div", { slot: "popover" }, index.h("slot", { name: "contextual-menu" })))))));
83
83
  }
84
84
  get host() { return index.getElement(this); }
85
85
  };
@@ -58,9 +58,9 @@ const ZTable = class {
58
58
  : index$1.ButtonSizeEnum.big;
59
59
  const tableContentClass = `${!!this.hasTableBody ? "table-content" : ""}`;
60
60
  if (this.hasTableBody) {
61
- return (index.h(index.Host, null, index.h("div", { class: tableClass }, index.h("slot", { name: "table-header" }), index.h("div", { class: tableContentClass }, index.h("slot", { name: "table-body" }), index.h("z-table-empty-box", { class: this.bordered && "bordered", message: this.message, subtitle: this.subtitle }, !!this.callToActionLabel && (index.h("z-button", { slot: "cta1", variant: index$1.ButtonVariantEnum.tertiary, onClick: () => this.callToAction.emit(), size: buttonSize }, this.callToActionLabel)), !!this.callToActionTwoLabel && (index.h("z-button", { slot: "cta2", variant: index$1.ButtonVariantEnum.tertiary, onClick: () => this.callToActionTwo.emit(), size: buttonSize }, this.callToActionTwoLabel)))))));
61
+ return (index.h(index.Host, null, index.h("div", { class: tableClass }, index.h("slot", { name: "table-header" }), index.h("div", { class: tableContentClass }, index.h("slot", { name: "table-body" }), index.h("z-table-empty-box", { class: this.bordered && "bordered", message: this.message, subtitle: this.subtitle }, !!this.callToActionLabel && (index.h("z-button-deprecated", { slot: "cta1", variant: index$1.ButtonVariantEnum.tertiary, onClick: () => this.callToAction.emit(), size: buttonSize }, this.callToActionLabel)), !!this.callToActionTwoLabel && (index.h("z-button-deprecated", { slot: "cta2", variant: index$1.ButtonVariantEnum.tertiary, onClick: () => this.callToActionTwo.emit(), size: buttonSize }, this.callToActionTwoLabel)))))));
62
62
  }
63
- return (index.h(index.Host, null, index.h("div", { class: tableClass }, index.h("slot", { name: "table-header" })), index.h("z-table-empty-box", { class: this.bordered && "bordered", message: this.message, subtitle: this.subtitle }, !!this.callToActionLabel && (index.h("z-button", { slot: "cta1", variant: index$1.ButtonVariantEnum.tertiary, onClick: () => this.callToAction.emit(), size: buttonSize }, this.callToActionLabel)), !!this.callToActionTwoLabel && (index.h("z-button", { slot: "cta2", variant: index$1.ButtonVariantEnum.tertiary, onClick: () => this.callToActionTwo.emit(), size: buttonSize }, this.callToActionTwoLabel)))));
63
+ return (index.h(index.Host, null, index.h("div", { class: tableClass }, index.h("slot", { name: "table-header" })), index.h("z-table-empty-box", { class: this.bordered && "bordered", message: this.message, subtitle: this.subtitle }, !!this.callToActionLabel && (index.h("z-button-deprecated", { slot: "cta1", variant: index$1.ButtonVariantEnum.tertiary, onClick: () => this.callToAction.emit(), size: buttonSize }, this.callToActionLabel)), !!this.callToActionTwoLabel && (index.h("z-button-deprecated", { slot: "cta2", variant: index$1.ButtonVariantEnum.tertiary, onClick: () => this.callToActionTwo.emit(), size: buttonSize }, this.callToActionTwoLabel)))));
64
64
  }
65
65
  render() {
66
66
  const tableClass = `table ${this.empty ? "table-empty" : ""} ${this.bordered ? "table-bordered" : ""}
@@ -8,7 +8,7 @@ const breakpoints = require('./breakpoints-88c4fd6c.js');
8
8
  const hammer = require('./hammer-4f20813e.js');
9
9
  require('./_commonjsHelpers-537d719a.js');
10
10
 
11
- const stylesCss = ":host{display:inline-block;min-width:200px;width:100vw}:host(.slide-in-left){animation:slideinleft 1s cubic-bezier(0.25, 0.1, 0.25, 0.1);animation-fill-mode:forwards}:host(.slide-in-right){animation:slideinright 1s cubic-bezier(0.25, 0.1, 0.25, 0.1);animation-fill-mode:forwards}:host(.slide-in-down){animation:slideindown 1s cubic-bezier(0.25, 0.1, 0.25, 0.1);animation-fill-mode:forwards}:host(.slide-in-up){animation:slideinup 1s cubic-bezier(0.25, 0.1, 0.25, 0.1);animation-fill-mode:forwards}:host(.slide-out-left){animation:slideoutleft 0.5s cubic-bezier(0.25, 0.1, 0.25, 0.1);animation-fill-mode:forwards}:host(.slide-out-right){animation:slideoutright 0.5s cubic-bezier(0.25, 0.1, 0.25, 0.1);animation-fill-mode:forwards}:host(.slide-out-down){animation:slideoutdown 0.5s cubic-bezier(0.25, 0.1, 0.25, 0.1);animation-fill-mode:forwards}:host(.slide-out-up){animation:slideoutup 0.5s cubic-bezier(0.25, 0.1, 0.25, 0.1);animation-fill-mode:forwards}@keyframes slideinleft{0%{transform:translateX(100%)}100%{transform:translateX(0)}}@keyframes slideinright{0%{transform:translateX(-100%)}100%{transform:translateX(0)}}@keyframes slideinup{0%{transform:translateY(100%);opacity:0}100%{transform:translateY(0);opacity:100%}}@keyframes slideindown{0%{transform:translateY(-100%);opacity:0}100%{transform:translateY(0);opacity:100%}}@keyframes slideoutleft{0%{transform:translateX(var(--percentuale));opacity:calc(100-var(--percentuale))}100%{transform:translateX(-100%);opacity:0%}}@keyframes slideoutright{0%{transform:translateX(var(--percentuale));opacity:calc(100-var(--percentuale))}100%{transform:translateX(100%);opacity:0%}}@keyframes slideoutup{0%{transform:translateY(var(--percentuale));opacity:100%}100%{transform:translateY(-100%);opacity:0}}@keyframes slideoutdown{0%{transform:translateY(var(--percentuale));opacity:100%}100%{transform:translateY(100%);opacity:0}}:host>#external-container{font-family:var(--font-family-sans);font-weight:var(--font-rg);border-radius:4px;font-size:14px;letter-spacing:0.16px;box-sizing:border-box;min-height:52px;padding:calc(var(--space-unit) * 1) calc(var(--space-unit) * 2);display:flex;align-items:center;justify-content:space-between;box-shadow:var(--shadow-3)}:host>#external-container.mobile-wrapped>#icon{align-self:flex-start}:host>#external-container.several-lines-padding{padding:calc(var(--space-unit) * 2)}:host>#external-container>#flex-container{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;width:100%}:host>#external-container #text{color:var(--color-white);line-height:20px;margin-right:calc(var(--space-unit) * 2);letter-spacing:0.16px;text-align:left}:host>#external-container #text>.title{margin-right:4px;font-weight:600}:host>#external-container.mobile-wrapped #button ::slotted(z-button){margin-top:calc(var(--space-unit) * 2)}:host>#external-container #icon{cursor:pointer;fill:var(--color-white);margin-left:calc(var(--space-unit) * 2)}:host>#external-container.dark{background:var(--gray800)}:host>#external-container.light{background:var(--color-background)}:host>#external-container.light #icon,:host>#external-container.warning #text,:host>#external-container.warning #icon{fill:var(--color-icon01)}:host>#external-container.light #text,:host>#external-container.warning #text{color:var(--grey800)}:host>#external-container.accent{background:var(--color-primary01)}:host>#external-container.error{background:var(--color-error-default)}:host>#external-container.success{background:var(--color-success-default)}:host>#external-container.warning{background:var(--color-warning-default)}@media only screen and (min-width: 768px){:host{width:unset;max-width:50vw}:host>#external-container>#flex-container{flex-wrap:nowrap}:host>#external-container #text{width:100%}}@media only screen and (min-width: 1366px){:host{width:unset;max-width:33vw}}";
11
+ const stylesCss = ":host{display:inline-block;min-width:200px;width:100vw}:host(.slide-in-left){animation:slideinleft 1s cubic-bezier(0.25, 0.1, 0.25, 0.1);animation-fill-mode:forwards}:host(.slide-in-right){animation:slideinright 1s cubic-bezier(0.25, 0.1, 0.25, 0.1);animation-fill-mode:forwards}:host(.slide-in-down){animation:slideindown 1s cubic-bezier(0.25, 0.1, 0.25, 0.1);animation-fill-mode:forwards}:host(.slide-in-up){animation:slideinup 1s cubic-bezier(0.25, 0.1, 0.25, 0.1);animation-fill-mode:forwards}:host(.slide-out-left){animation:slideoutleft 0.5s cubic-bezier(0.25, 0.1, 0.25, 0.1);animation-fill-mode:forwards}:host(.slide-out-right){animation:slideoutright 0.5s cubic-bezier(0.25, 0.1, 0.25, 0.1);animation-fill-mode:forwards}:host(.slide-out-down){animation:slideoutdown 0.5s cubic-bezier(0.25, 0.1, 0.25, 0.1);animation-fill-mode:forwards}:host(.slide-out-up){animation:slideoutup 0.5s cubic-bezier(0.25, 0.1, 0.25, 0.1);animation-fill-mode:forwards}@keyframes slideinleft{0%{transform:translateX(100%)}100%{transform:translateX(0)}}@keyframes slideinright{0%{transform:translateX(-100%)}100%{transform:translateX(0)}}@keyframes slideinup{0%{transform:translateY(100%);opacity:0}100%{transform:translateY(0);opacity:100%}}@keyframes slideindown{0%{transform:translateY(-100%);opacity:0}100%{transform:translateY(0);opacity:100%}}@keyframes slideoutleft{0%{transform:translateX(var(--percentuale));opacity:calc(100-var(--percentuale))}100%{transform:translateX(-100%);opacity:0%}}@keyframes slideoutright{0%{transform:translateX(var(--percentuale));opacity:calc(100-var(--percentuale))}100%{transform:translateX(100%);opacity:0%}}@keyframes slideoutup{0%{transform:translateY(var(--percentuale));opacity:100%}100%{transform:translateY(-100%);opacity:0}}@keyframes slideoutdown{0%{transform:translateY(var(--percentuale));opacity:100%}100%{transform:translateY(100%);opacity:0}}:host>#external-container{font-family:var(--font-family-sans);font-weight:var(--font-rg);border-radius:4px;font-size:14px;letter-spacing:0.16px;box-sizing:border-box;min-height:52px;padding:calc(var(--space-unit) * 1) calc(var(--space-unit) * 2);display:flex;align-items:center;justify-content:space-between;box-shadow:var(--shadow-3)}:host>#external-container.mobile-wrapped>#icon{align-self:flex-start}:host>#external-container.several-lines-padding{padding:calc(var(--space-unit) * 2)}:host>#external-container>#flex-container{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;width:100%}:host>#external-container #text{color:var(--color-white);line-height:20px;margin-right:calc(var(--space-unit) * 2);letter-spacing:0.16px;text-align:left}:host>#external-container #text>.title{margin-right:4px;font-weight:600}:host>#external-container.mobile-wrapped #button ::slotted(z-button-deprecated){margin-top:calc(var(--space-unit) * 2)}:host>#external-container #icon{cursor:pointer;fill:var(--color-white);margin-left:calc(var(--space-unit) * 2)}:host>#external-container.dark{background:var(--gray800)}:host>#external-container.light{background:var(--color-background)}:host>#external-container.light #icon,:host>#external-container.warning #text,:host>#external-container.warning #icon{fill:var(--color-icon01)}:host>#external-container.light #text,:host>#external-container.warning #text{color:var(--grey800)}:host>#external-container.accent{background:var(--color-primary01)}:host>#external-container.error{background:var(--color-error-default)}:host>#external-container.success{background:var(--color-success-default)}:host>#external-container.warning{background:var(--color-warning-default)}@media only screen and (min-width: 768px){:host{width:unset;max-width:50vw}:host>#external-container>#flex-container{flex-wrap:nowrap}:host>#external-container #text{width:100%}}@media only screen and (min-width: 1366px){:host{width:unset;max-width:33vw}}";
12
12
 
13
13
  const ZToastNotification = class {
14
14
  constructor(hostRef) {
@@ -76,6 +76,7 @@
76
76
  "./components/z-table/z-table-sticky-footer/index.js",
77
77
  "./components/z-tag/index.js",
78
78
  "./components/z-visually-hidden/index.js",
79
+ "./deprecated/z-button-deprecated/index.js",
79
80
  "./deprecated/z-button-filter/index.js",
80
81
  "./deprecated/z-chip-deprecated/index.js",
81
82
  "./deprecated/z-status-tag/index.js",
@@ -10,26 +10,34 @@ export class ZButton {
10
10
  this.disabled = false;
11
11
  /** HTML button type attribute. */
12
12
  this.type = ButtonTypeEnum.button;
13
- /** Graphical variant: `primary`, `secondary`, `tertiary`, `dark-bg`. Defaults to `primary`. */
13
+ /** Graphical variant: `primary`, `secondary`, `tertiary`. Defaults to `primary`. */
14
14
  this.variant = ButtonVariantEnum.primary;
15
15
  /** Available sizes: `big`, `small` and `x-small`. Defaults to `big`. */
16
16
  this.size = ButtonSizeEnum.big;
17
- /** Reduce button size (deprecated).
18
- * @deprecated Use `size` prop.
19
- */
20
- this.issmall = false;
21
- /** Spy to render square button. */
22
- this.square = false;
17
+ }
18
+ getAttributes() {
19
+ return {
20
+ id: this.htmlid,
21
+ class: classNames(this.variant, this.size),
22
+ "aria-label": this.ariaLabel,
23
+ };
24
+ }
25
+ componentDidLoad() {
26
+ if (this.hostElement.innerText) {
27
+ this.hostElement.classList.add("with-text");
28
+ }
23
29
  }
24
30
  render() {
25
- this.hostElement.style.pointerEvents = this.disabled ? "none" : "auto";
26
- return (h("slot", { name: "element" },
27
- h("button", { id: this.htmlid, name: this.name, type: this.type, disabled: this.disabled, class: classNames(this.variant, this.size, { issmall: this.issmall }, { square: this.square }) },
31
+ if (this.href)
32
+ return (h("a", Object.assign({ href: this.href, target: this.target }, this.getAttributes()),
28
33
  this.icon && h("z-icon", { name: this.icon, width: 16, height: 16 }),
29
- h("slot", null))));
34
+ h("slot", null)));
35
+ return (h("button", Object.assign({ name: this.name, type: this.type, disabled: this.disabled }, this.getAttributes()),
36
+ this.icon && h("z-icon", { name: this.icon, width: 16, height: 16 }),
37
+ h("slot", null)));
30
38
  }
31
39
  static get is() { return "z-button"; }
32
- static get encapsulation() { return "shadow"; }
40
+ static get encapsulation() { return "scoped"; }
33
41
  static get originalStyleUrls() { return {
34
42
  "$": ["styles.css"]
35
43
  }; }
@@ -37,6 +45,57 @@ export class ZButton {
37
45
  "$": ["styles.css"]
38
46
  }; }
39
47
  static get properties() { return {
48
+ "ariaLabel": {
49
+ "type": "string",
50
+ "mutable": false,
51
+ "complexType": {
52
+ "original": "string",
53
+ "resolved": "string",
54
+ "references": {}
55
+ },
56
+ "required": false,
57
+ "optional": true,
58
+ "docs": {
59
+ "tags": [],
60
+ "text": "defines a string value that labels an interactive element, used for accessibility."
61
+ },
62
+ "attribute": "aria-label",
63
+ "reflect": true
64
+ },
65
+ "href": {
66
+ "type": "string",
67
+ "mutable": false,
68
+ "complexType": {
69
+ "original": "string",
70
+ "resolved": "string",
71
+ "references": {}
72
+ },
73
+ "required": false,
74
+ "optional": true,
75
+ "docs": {
76
+ "tags": [],
77
+ "text": "HTML a href attribute. If it is set, it renders an HTML a tag."
78
+ },
79
+ "attribute": "href",
80
+ "reflect": true
81
+ },
82
+ "target": {
83
+ "type": "string",
84
+ "mutable": false,
85
+ "complexType": {
86
+ "original": "string",
87
+ "resolved": "string",
88
+ "references": {}
89
+ },
90
+ "required": false,
91
+ "optional": true,
92
+ "docs": {
93
+ "tags": [],
94
+ "text": "HTML a target attribute."
95
+ },
96
+ "attribute": "target",
97
+ "reflect": true
98
+ },
40
99
  "htmlid": {
41
100
  "type": "string",
42
101
  "mutable": false,
@@ -128,7 +187,7 @@ export class ZButton {
128
187
  "optional": true,
129
188
  "docs": {
130
189
  "tags": [],
131
- "text": "Graphical variant: `primary`, `secondary`, `tertiary`, `dark-bg`. Defaults to `primary`."
190
+ "text": "Graphical variant: `primary`, `secondary`, `tertiary`. Defaults to `primary`."
132
191
  },
133
192
  "attribute": "variant",
134
193
  "reflect": true,
@@ -173,45 +232,6 @@ export class ZButton {
173
232
  "attribute": "size",
174
233
  "reflect": true,
175
234
  "defaultValue": "ButtonSizeEnum.big"
176
- },
177
- "issmall": {
178
- "type": "boolean",
179
- "mutable": false,
180
- "complexType": {
181
- "original": "boolean",
182
- "resolved": "boolean",
183
- "references": {}
184
- },
185
- "required": false,
186
- "optional": true,
187
- "docs": {
188
- "tags": [{
189
- "name": "deprecated",
190
- "text": "Use `size` prop."
191
- }],
192
- "text": "Reduce button size (deprecated)."
193
- },
194
- "attribute": "issmall",
195
- "reflect": true,
196
- "defaultValue": "false"
197
- },
198
- "square": {
199
- "type": "boolean",
200
- "mutable": false,
201
- "complexType": {
202
- "original": "boolean",
203
- "resolved": "boolean",
204
- "references": {}
205
- },
206
- "required": false,
207
- "optional": true,
208
- "docs": {
209
- "tags": [],
210
- "text": "Spy to render square button."
211
- },
212
- "attribute": "square",
213
- "reflect": true,
214
- "defaultValue": "false"
215
235
  }
216
236
  }; }
217
237
  static get elementRef() { return "hostElement"; }