@zanichelli/albe-web-components 2.48.1 → 3.1.1

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 (111) hide show
  1. package/CHANGELOG.md +1647 -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} +45 -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-table-cell.cjs.entry.js +1 -1
  13. package/dist/cjs/z-table-header.cjs.entry.js +1 -1
  14. package/dist/cjs/z-table.cjs.entry.js +2 -2
  15. package/dist/cjs/z-toast-notification.cjs.entry.js +1 -1
  16. package/dist/collection/collection-manifest.json +1 -0
  17. package/dist/collection/components/buttons/z-button/index.js +75 -52
  18. package/dist/collection/components/buttons/z-button/styles.css +32 -111
  19. package/dist/collection/components/file-upload/z-file-upload/index.js +13 -10
  20. package/dist/collection/components/file-upload/z-file-upload/styles.css +2 -2
  21. package/dist/collection/components/footer/z-footer/index.js +19 -14
  22. package/dist/collection/components/footer/z-footer/styles.css +2 -2
  23. package/dist/collection/components/modal/z-modal-login/index.js +5 -4
  24. package/dist/collection/components/modal/z-modal-login/styles.css +8 -8
  25. package/dist/collection/components/notification/z-cookiebar/index.js +2 -2
  26. package/dist/collection/components/notification/z-cookiebar/styles.css +3 -3
  27. package/dist/collection/components/notification/z-toast-notification/styles.css +4 -2
  28. package/dist/collection/components/z-date-picker/index.js +111 -4
  29. package/dist/collection/components/z-date-picker/styles.css +14 -4
  30. package/dist/collection/components/z-table/z-table/index.js +4 -4
  31. package/dist/collection/components/z-table/z-table-cell/index.js +1 -1
  32. package/dist/collection/components/z-table/z-table-header/index.js +1 -1
  33. package/dist/collection/deprecated/z-button-deprecated/index.js +218 -0
  34. package/dist/collection/deprecated/z-button-deprecated/styles.css +231 -0
  35. package/dist/collection/snowflakes/myz/card/z-myz-card-dictionary/index.js +1 -1
  36. package/dist/collection/snowflakes/myz/card/z-myz-card-dictionary/styles.css +1 -1
  37. package/dist/collection/snowflakes/myz/topbar/index.js +1 -1
  38. package/dist/collection/snowflakes/myz/topbar/styles.css +8 -8
  39. package/dist/esm/loader.js +1 -1
  40. package/dist/esm/web-components-library.js +1 -1
  41. package/dist/esm/{z-app-switcher_11.entry.js → z-app-switcher_12.entry.js} +45 -7
  42. package/dist/esm/z-cookiebar.entry.js +3 -3
  43. package/dist/esm/z-date-picker.entry.js +104 -4
  44. package/dist/esm/z-file-upload.entry.js +14 -11
  45. package/dist/esm/z-footer.entry.js +12 -7
  46. package/dist/esm/z-modal-login.entry.js +5 -4
  47. package/dist/esm/z-myz-card-dictionary.entry.js +2 -2
  48. package/dist/esm/z-myz-topbar.entry.js +2 -2
  49. package/dist/esm/z-table-cell.entry.js +1 -1
  50. package/dist/esm/z-table-header.entry.js +1 -1
  51. package/dist/esm/z-table.entry.js +2 -2
  52. package/dist/esm/z-toast-notification.entry.js +1 -1
  53. package/dist/types/components/buttons/z-button/index.d.ts +14 -7
  54. package/dist/types/components/z-date-picker/index.d.ts +6 -0
  55. package/dist/types/components.d.ts +95 -2
  56. package/dist/types/deprecated/z-button-deprecated/index.d.ts +28 -0
  57. package/dist/web-components-library/p-0b590426.entry.js +1 -0
  58. package/dist/web-components-library/p-2b8975b1.entry.js +1 -0
  59. package/dist/web-components-library/p-2ff952a3.entry.js +1 -0
  60. package/dist/web-components-library/p-459dab30.entry.js +1 -0
  61. package/dist/web-components-library/{p-791cbcab.entry.js → p-a391566a.entry.js} +1 -1
  62. package/dist/web-components-library/{p-ae2e17b4.entry.js → p-adad78fc.entry.js} +1 -1
  63. package/dist/web-components-library/{p-3dba3a83.entry.js → p-bbb0e7a7.entry.js} +2 -2
  64. package/dist/web-components-library/p-cce20009.entry.js +1 -0
  65. package/dist/web-components-library/p-cd2ca92b.entry.js +1 -0
  66. package/dist/web-components-library/p-da7760a3.entry.js +1 -0
  67. package/dist/web-components-library/p-dcf4d1b6.entry.js +1 -0
  68. package/dist/web-components-library/p-f6254eeb.entry.js +1 -0
  69. package/dist/web-components-library/web-components-library.esm.js +1 -1
  70. package/package.json +1 -1
  71. package/react/components.d.ts +1 -0
  72. package/react/components.js +4 -3
  73. package/react/components.js.map +1 -1
  74. package/src-react/index.ts +1 -0
  75. package/www/build/p-0b590426.entry.js +1 -0
  76. package/www/build/p-2b8975b1.entry.js +1 -0
  77. package/www/build/p-2ff952a3.entry.js +1 -0
  78. package/www/build/p-459dab30.entry.js +1 -0
  79. package/www/build/p-9ab0287a.js +129 -0
  80. package/www/build/{p-791cbcab.entry.js → p-a391566a.entry.js} +1 -1
  81. package/www/build/{p-ae2e17b4.entry.js → p-adad78fc.entry.js} +1 -1
  82. package/www/build/{p-3dba3a83.entry.js → p-bbb0e7a7.entry.js} +2 -2
  83. package/www/build/p-cce20009.entry.js +1 -0
  84. package/www/build/p-cd2ca92b.entry.js +1 -0
  85. package/www/build/p-da7760a3.entry.js +1 -0
  86. package/www/build/p-dcf4d1b6.entry.js +1 -0
  87. package/www/build/p-f6254eeb.entry.js +1 -0
  88. package/www/build/p-fcff1237.css +812 -0
  89. package/www/build/web-components-library.esm.js +1 -1
  90. package/www/index.html +2 -2
  91. package/www/pages/notification.html +10 -7
  92. package/dist/web-components-library/p-114f3a85.entry.js +0 -1
  93. package/dist/web-components-library/p-29f07a9b.entry.js +0 -1
  94. package/dist/web-components-library/p-3edd463d.entry.js +0 -1
  95. package/dist/web-components-library/p-4b166956.entry.js +0 -1
  96. package/dist/web-components-library/p-6ef6464c.entry.js +0 -1
  97. package/dist/web-components-library/p-8188846a.entry.js +0 -1
  98. package/dist/web-components-library/p-a15db194.entry.js +0 -1
  99. package/dist/web-components-library/p-a2a3a537.entry.js +0 -1
  100. package/dist/web-components-library/p-b60fe58c.entry.js +0 -1
  101. package/www/build/p-114f3a85.entry.js +0 -1
  102. package/www/build/p-29f07a9b.entry.js +0 -1
  103. package/www/build/p-3edd463d.entry.js +0 -1
  104. package/www/build/p-4b166956.entry.js +0 -1
  105. package/www/build/p-6ef6464c.entry.js +0 -1
  106. package/www/build/p-8188846a.entry.js +0 -1
  107. package/www/build/p-88b56b6e.css +0 -1
  108. package/www/build/p-a15db194.entry.js +0 -1
  109. package/www/build/p-a2a3a537.entry.js +0 -1
  110. package/www/build/p-b60fe58c.entry.js +0 -1
  111. package/www/build/p-f8ba306b.js +0 -1
@@ -15,9 +15,9 @@
15
15
  align-items: stretch;
16
16
  }
17
17
 
18
- z-button,
18
+ z-button-deprecated,
19
19
  z-input,
20
- ::slotted(z-button),
20
+ ::slotted(z-button-deprecated),
21
21
  ::slotted(z-input) {
22
22
  display: inline-block;
23
23
  width: 100%;
@@ -48,8 +48,8 @@ div.wrapper > form > div.password::slotted(z-input),
48
48
  align-self: flex-end;
49
49
  }
50
50
 
51
- div.wrapper > form > div.login::slotted(z-button),
52
- :host div.wrapper > form > div.login z-button {
51
+ div.wrapper > form > div.login::slotted(z-button-deprecated),
52
+ :host div.wrapper > form > div.login z-button-deprecated {
53
53
  margin: calc(var(--space-unit) * 3) 0;
54
54
  align-self: flex-start;
55
55
  }
@@ -62,8 +62,8 @@ div.wrapper > form > div.login::slotted(z-button),
62
62
  margin-block-start: unset;
63
63
  }
64
64
 
65
- div.wrapper > div.signup::slotted(z-button),
66
- :host div.wrapper > div.signup z-button {
65
+ div.wrapper > div.signup::slotted(z-button-deprecated),
66
+ :host div.wrapper > div.signup z-button-deprecated {
67
67
  display: inline-block;
68
68
  margin: calc(var(--space-unit) * 2) 0;
69
69
  }
@@ -101,8 +101,8 @@ slot-fb[name="provider"] {
101
101
 
102
102
  /* Tablet breakpoint */
103
103
  @media only screen and (min-width: 768px) {
104
- z-button,
105
- ::slotted(z-button) {
104
+ z-button-deprecated,
105
+ ::slotted(z-button-deprecated) {
106
106
  width: initial;
107
107
  }
108
108
 
@@ -28,10 +28,10 @@ export class ZCookiebar {
28
28
  "Se continui a navigare ci permetti di farlo secondo le regole spiegate nella nostra informativa sulla privacy relativa ai \u00A0",
29
29
  h("a", { href: this.cookiepolicyurl, target: "_blank" }, "cookie"),
30
30
  "."))),
31
- h("z-button", { variant: ButtonVariantEnum.primary, onClick: (ev) => this.handleOkButtonClick(ev), onKeyUp: (ev) => this.handleOkButtonKeyUp(ev) }, "ACCETTA")));
31
+ h("z-button-deprecated", { variant: ButtonVariantEnum.primary, onClick: (ev) => this.handleOkButtonClick(ev), onKeyUp: (ev) => this.handleOkButtonKeyUp(ev) }, "ACCETTA")));
32
32
  }
33
33
  render() {
34
- return h("z-candybar", { class: `${this.hide ? "hidden" : ""}` }, this.renderContentSlot());
34
+ return (h("z-candybar", { class: `${this.hide ? "hidden" : ""}` }, this.renderContentSlot()));
35
35
  }
36
36
  static get is() { return "z-cookiebar"; }
37
37
  static get encapsulation() { return "shadow"; }
@@ -15,7 +15,7 @@ z-candybar.hidden {
15
15
  align-items: stretch;
16
16
  align-content: space-between;
17
17
  color: var(--text-grey-800);
18
- border-radius: calc(var(--space-unit) * .5);
18
+ border-radius: calc(var(--space-unit) * 0.5);
19
19
  font-size: 16px;
20
20
  letter-spacing: 0px;
21
21
  line-height: 24px;
@@ -58,7 +58,7 @@ z-candybar.hidden {
58
58
  z-index: 1000;
59
59
  }
60
60
 
61
- .content > z-button {
61
+ .content > z-button-deprecated {
62
62
  margin: 0;
63
63
  width: 100%;
64
64
  }
@@ -87,7 +87,7 @@ z-candybar.hidden {
87
87
  padding: 0;
88
88
  }
89
89
 
90
- .content > z-button {
90
+ .content > z-button-deprecated {
91
91
  margin: 0;
92
92
  width: initial;
93
93
  }
@@ -172,7 +172,10 @@
172
172
  font-weight: 600;
173
173
  }
174
174
 
175
- :host > #external-container.mobile-wrapped #button ::slotted(z-button) {
175
+ :host
176
+ > #external-container.mobile-wrapped
177
+ #button
178
+ ::slotted(z-button-deprecated) {
176
179
  margin-top: calc(var(--space-unit) * 2);
177
180
  }
178
181
 
@@ -219,7 +222,6 @@
219
222
 
220
223
  /* Tablet breakpoint */
221
224
  @media only screen and (min-width: 768px) {
222
-
223
225
  :host {
224
226
  width: unset;
225
227
  max-width: 50vw;
@@ -1,4 +1,4 @@
1
- import { Component, Prop, Element, h, Event, State, } from "@stencil/core";
1
+ import { Component, Prop, Element, h, Event, Listen, State, } from "@stencil/core";
2
2
  import flatpickr from "flatpickr";
3
3
  import { Italian } from "flatpickr/dist/l10n/it.js";
4
4
  import monthSelectPlugin from "flatpickr/dist/plugins/monthSelect";
@@ -13,16 +13,55 @@ export class ZDatePicker {
13
13
  emitDateSelect(date) {
14
14
  this.dateSelect.emit(date);
15
15
  }
16
+ handleKeyDown(ev) {
17
+ if (ev.key === "Enter" || ev.key === " ") {
18
+ let isPrevArrowEntered = document.activeElement.classList.contains("flatpickr-prev-month");
19
+ let isNextArrowEntered = document.activeElement.classList.contains("flatpickr-next-month");
20
+ let arrowPressed = isPrevArrowEntered || isNextArrowEntered;
21
+ arrowPressed && ev.key === " " && ev.preventDefault();
22
+ if (this.mode === ZDatePickerMode.months) {
23
+ isPrevArrowEntered &&
24
+ this.flatpickrInstance.changeYear(this.flatpickrInstance.currentYear - 1);
25
+ isNextArrowEntered &&
26
+ this.flatpickrInstance.changeYear(this.flatpickrInstance.currentYear + 1);
27
+ if (arrowPressed) {
28
+ let calendar = this.element.getElementsByClassName("flatpickr-calendar")[0];
29
+ let months = calendar.querySelectorAll(".flatpickr-monthSelect-month");
30
+ months.forEach((element) => {
31
+ element.setAttribute("aria-label", `${element.innerHTML} ${this.flatpickrInstance.currentYear}`);
32
+ });
33
+ //Force check of the current day
34
+ Array.from(months).forEach((element, index) => {
35
+ let curMonth = new Date().getMonth();
36
+ let curYear = new Date().getFullYear();
37
+ if (index === curMonth) {
38
+ if (this.flatpickrInstance.currentYear === curYear) {
39
+ element.setAttribute("class", "flatpickr-monthSelect-month today");
40
+ }
41
+ else {
42
+ element.setAttribute("class", "flatpickr-monthSelect-month");
43
+ }
44
+ }
45
+ });
46
+ }
47
+ }
48
+ else {
49
+ isPrevArrowEntered && this.flatpickrInstance.changeMonth(-1);
50
+ isNextArrowEntered && this.flatpickrInstance.changeMonth(1);
51
+ }
52
+ }
53
+ }
16
54
  componentWillLoad() {
17
55
  let customToggle = this.element.querySelector("[slot=toggle]");
18
56
  this.hasChildren = !!customToggle;
19
57
  this.hasChildren && customToggle.setAttribute("data-toggle", "data-toggle");
20
58
  }
21
59
  componentDidLoad() {
22
- flatpickr(`.${this.datepickerid}`, {
60
+ this.flatpickrInstance = flatpickr(`.${this.datepickerid}`, {
23
61
  appendTo: this.element.children[0],
24
62
  enableTime: this.mode === ZDatePickerMode.dateTime,
25
63
  locale: Italian,
64
+ allowInput: true,
26
65
  dateFormat: this.mode === ZDatePickerMode.dateTime ? "d-m-Y - H:i" : "d-m-Y",
27
66
  ariaDateFormat: this.mode === ZDatePickerMode.months ? "F Y" : "d F Y",
28
67
  minuteIncrement: 1,
@@ -30,6 +69,13 @@ export class ZDatePicker {
30
69
  onChange: (_selectedDates, dateStr) => {
31
70
  this.emitDateSelect(dateStr);
32
71
  },
72
+ onOpen: () => {
73
+ this.setAriaOptions();
74
+ this.setFlatpickrPosition();
75
+ },
76
+ onKeyDown: () => {
77
+ this.setAriaOptions();
78
+ },
33
79
  wrap: this.hasChildren,
34
80
  plugins: this.mode === ZDatePickerMode.months && [
35
81
  monthSelectPlugin({
@@ -42,6 +88,60 @@ export class ZDatePicker {
42
88
  element.innerHTML = element.innerHTML.trim().charAt(0);
43
89
  });
44
90
  }
91
+ setAriaOptions() {
92
+ let calendar = this.element.getElementsByClassName("flatpickr-calendar")[0];
93
+ let prevMonthArrow = calendar.getElementsByClassName("flatpickr-prev-month")[0];
94
+ let nextMonthArrow = calendar.getElementsByClassName("flatpickr-next-month")[0];
95
+ let tabindexElements = calendar.querySelectorAll('[tabindex = "-1"]');
96
+ tabindexElements.forEach((element) => element.setAttribute("tabindex", "0"));
97
+ prevMonthArrow.setAttribute("tabindex", "0");
98
+ nextMonthArrow.setAttribute("tabindex", "0");
99
+ prevMonthArrow.setAttribute("role", "button");
100
+ nextMonthArrow.setAttribute("role", "button");
101
+ calendar
102
+ .getElementsByClassName("cur-year")[0]
103
+ .setAttribute("aria-label", "Anno");
104
+ if (this.mode === ZDatePickerMode.months) {
105
+ this.setMonthsAriaOptions(calendar, prevMonthArrow, nextMonthArrow);
106
+ }
107
+ if (this.mode === ZDatePickerMode.date) {
108
+ this.setDateAriaOptions(calendar, prevMonthArrow, nextMonthArrow);
109
+ }
110
+ if (this.mode === ZDatePickerMode.dateTime) {
111
+ this.setDateTimeAriaOptions(calendar, prevMonthArrow, nextMonthArrow);
112
+ }
113
+ }
114
+ setMonthsAriaOptions(calendar, prevMonthArrow, nextMonthArrow) {
115
+ Array.from(calendar.getElementsByClassName("flatpickr-monthSelect-months")).forEach((element) => element.setAttribute("tabindex", "-1"));
116
+ Array.from(calendar.getElementsByClassName("flatpickr-monthSelect-month")).forEach((element) => element.setAttribute("role", "button"));
117
+ prevMonthArrow.setAttribute("aria-label", "Anno precedente");
118
+ nextMonthArrow.setAttribute("aria-label", "Anno successivo");
119
+ }
120
+ setDateAriaOptions(calendar, prevMonthArrow, nextMonthArrow) {
121
+ Array.from(calendar.getElementsByClassName("flatpickr-days")).forEach((element) => element.setAttribute("tabindex", "-1"));
122
+ Array.from(calendar.getElementsByClassName("flatpickr-day")).forEach((element) => element.setAttribute("role", "button"));
123
+ calendar
124
+ .getElementsByClassName("flatpickr-monthDropdown-months")[0]
125
+ .setAttribute("aria-label", "Mese");
126
+ prevMonthArrow.setAttribute("aria-label", "Mese precedente");
127
+ nextMonthArrow.setAttribute("aria-label", "Mese successivo");
128
+ }
129
+ setDateTimeAriaOptions(calendar, prevMonthArrow, nextMonthArrow) {
130
+ Array.from(calendar.getElementsByClassName("flatpickr-days")).forEach((element) => element.setAttribute("tabindex", "-1"));
131
+ Array.from(calendar.getElementsByClassName("flatpickr-day")).forEach((element) => element.setAttribute("role", "button"));
132
+ calendar
133
+ .getElementsByClassName("flatpickr-monthDropdown-months")[0]
134
+ .setAttribute("aria-label", "Mese");
135
+ prevMonthArrow.setAttribute("aria-label", "Mese precedente");
136
+ nextMonthArrow.setAttribute("aria-label", "Mese successivo");
137
+ Array.from(calendar.getElementsByClassName("time24hr")).forEach((element) => element.setAttribute("tabindex", "-1"));
138
+ calendar
139
+ .getElementsByClassName("flatpickr-hour")[0]
140
+ .setAttribute("aria-label", "Ora");
141
+ calendar
142
+ .getElementsByClassName("flatpickr-minute")[0]
143
+ .setAttribute("aria-label", "Minuti");
144
+ }
45
145
  setFlatpickrPosition() {
46
146
  const toggleHeight = this.element.children[0].clientHeight;
47
147
  this.element.style.setProperty("--toggle-height", `${toggleHeight}px`);
@@ -66,10 +166,10 @@ export class ZDatePicker {
66
166
  h("slot", { name: "toggle" })));
67
167
  }
68
168
  renderZInput() {
69
- return (h("z-input", { class: classNames(this.datepickerid), type: "text", name: "datepicker", icon: "event", hasmessage: false }));
169
+ return (h("z-input", { class: classNames(this.datepickerid), type: "text", icon: "event", hasmessage: false, tabindex: "0" }));
70
170
  }
71
171
  render() {
72
- return (h("div", { class: classNames("flatpickr-toggle-container", this.hasChildren && this.datepickerid, this.flatpickrPosition, this.mode), onClick: () => this.setFlatpickrPosition() }, this.hasChildren ? this.renderSlottedContent() : this.renderZInput()));
172
+ return (h("div", { class: classNames("flatpickr-toggle-container", this.hasChildren && this.datepickerid, this.flatpickrPosition, this.mode) }, this.hasChildren ? this.renderSlottedContent() : this.renderZInput()));
73
173
  }
74
174
  static get is() { return "z-date-picker"; }
75
175
  static get originalStyleUrls() { return {
@@ -140,4 +240,11 @@ export class ZDatePicker {
140
240
  }
141
241
  }]; }
142
242
  static get elementRef() { return "element"; }
243
+ static get listeners() { return [{
244
+ "name": "keydown",
245
+ "method": "handleKeyDown",
246
+ "target": "body",
247
+ "capture": true,
248
+ "passive": false
249
+ }]; }
143
250
  }
@@ -257,11 +257,15 @@ z-date-picker > div > * {
257
257
  }
258
258
 
259
259
  .flatpickr-next-month:hover,
260
- .flatpickr-prev-month:hover {
260
+ .flatpickr-prev-month:hover,
261
+ .flatpickr-next-month:focus,
262
+ .flatpickr-prev-month:focus {
261
263
  border-radius: var(--border-radius);
262
264
  background-color: var(--color-primary03) !important;
263
265
  border-color: var(--color-primary03) !important;
264
266
  color: var(--color-hover-primary) !important;
267
+ border: none !important;
268
+ outline: none !important;
265
269
  }
266
270
 
267
271
  .flatpickr-next-month:hover svg,
@@ -296,7 +300,8 @@ z-date-picker > div > * {
296
300
  padding-left: var(--space-unit) !important;
297
301
  }
298
302
 
299
- .flatpickr-monthDropdown-months:hover {
303
+ .flatpickr-monthDropdown-months:hover,
304
+ .flatpickr-monthDropdown-months:focus {
300
305
  outline: 1px solid var(--color-primary01) !important;
301
306
  }
302
307
 
@@ -311,7 +316,8 @@ z-date-picker > div > * {
311
316
  width: calc(var(--space-unit) * 10);
312
317
  }
313
318
 
314
- .flatpickr-current-month > .numInputWrapper:hover {
319
+ .flatpickr-current-month > .numInputWrapper:hover,
320
+ .flatpickr-current-month > .numInputWrapper:focus-within {
315
321
  outline: 1px solid var(--color-primary01) !important;
316
322
  }
317
323
 
@@ -368,7 +374,8 @@ z-date-picker > div > * {
368
374
  .flatpickr-day:hover,
369
375
  .flatpickr-day.prevMonthDay:hover,
370
376
  .flatpickr-day.selected:hover,
371
- .flatpickr-monthSelect-month:hover {
377
+ .flatpickr-monthSelect-month:hover,
378
+ .flatpickr-monthSelect-month:focus {
372
379
  background-color: var(--myz-blue-dark) !important;
373
380
  border-color: var(--myz-blue-dark) !important;
374
381
  color: var(--color-white) !important;
@@ -441,6 +448,9 @@ z-date-picker > div > * {
441
448
 
442
449
  .flatpickr-minute,
443
450
  .flatpickr-hour {
451
+ font-size: var(--font-size-3) !important;
452
+ font-weight: var(--font-rg) !important;
453
+
444
454
  outline: 1px solid black !important;
445
455
  }
446
456
 
@@ -66,15 +66,15 @@ export class ZTable {
66
66
  h("div", { class: tableContentClass },
67
67
  h("slot", { name: "table-body" }),
68
68
  h("z-table-empty-box", { class: this.bordered && "bordered", message: this.message, subtitle: this.subtitle },
69
- !!this.callToActionLabel && (h("z-button", { slot: "cta1", variant: ButtonVariantEnum.tertiary, onClick: () => this.callToAction.emit(), size: buttonSize }, this.callToActionLabel)),
70
- !!this.callToActionTwoLabel && (h("z-button", { slot: "cta2", variant: ButtonVariantEnum.tertiary, onClick: () => this.callToActionTwo.emit(), size: buttonSize }, this.callToActionTwoLabel)))))));
69
+ !!this.callToActionLabel && (h("z-button-deprecated", { slot: "cta1", variant: ButtonVariantEnum.tertiary, onClick: () => this.callToAction.emit(), size: buttonSize }, this.callToActionLabel)),
70
+ !!this.callToActionTwoLabel && (h("z-button-deprecated", { slot: "cta2", variant: ButtonVariantEnum.tertiary, onClick: () => this.callToActionTwo.emit(), size: buttonSize }, this.callToActionTwoLabel)))))));
71
71
  }
72
72
  return (h(Host, null,
73
73
  h("div", { class: tableClass },
74
74
  h("slot", { name: "table-header" })),
75
75
  h("z-table-empty-box", { class: this.bordered && "bordered", message: this.message, subtitle: this.subtitle },
76
- !!this.callToActionLabel && (h("z-button", { slot: "cta1", variant: ButtonVariantEnum.tertiary, onClick: () => this.callToAction.emit(), size: buttonSize }, this.callToActionLabel)),
77
- !!this.callToActionTwoLabel && (h("z-button", { slot: "cta2", variant: ButtonVariantEnum.tertiary, onClick: () => this.callToActionTwo.emit(), size: buttonSize }, this.callToActionTwoLabel)))));
76
+ !!this.callToActionLabel && (h("z-button-deprecated", { slot: "cta1", variant: ButtonVariantEnum.tertiary, onClick: () => this.callToAction.emit(), size: buttonSize }, this.callToActionLabel)),
77
+ !!this.callToActionTwoLabel && (h("z-button-deprecated", { slot: "cta2", variant: ButtonVariantEnum.tertiary, onClick: () => this.callToActionTwo.emit(), size: buttonSize }, this.callToActionTwoLabel)))));
78
78
  }
79
79
  render() {
80
80
  const tableClass = `table ${this.empty ? "table-empty" : ""} ${this.bordered ? "table-bordered" : ""}
@@ -19,7 +19,7 @@ export class ZTableCell {
19
19
  visible: this.isMenuOpened,
20
20
  }) },
21
21
  h("div", { class: "button-content" },
22
- h("z-button", { icon: "contextual-menu", variant: ButtonVariantEnum.tertiary, size: ButtonSizeEnum["x-small"], onClick: () => this.handleMenu(), square: true }),
22
+ h("z-button-deprecated", { icon: "contextual-menu", variant: ButtonVariantEnum.tertiary, size: ButtonSizeEnum["x-small"], onClick: () => this.handleMenu(), square: true }),
23
23
  h("div", { class: classNames("contextual-menu-container", {
24
24
  visible: this.isMenuOpened,
25
25
  }) },
@@ -74,7 +74,7 @@ export class ZTableHeader {
74
74
  visible: this.isMenuOpened,
75
75
  }) },
76
76
  h("z-popover", { position: PopoverPosition["below-center"], "background-color": "gray200" },
77
- h("z-button", { icon: "contextual-menu", variant: ButtonVariantEnum["tertiary"], size: ButtonSizeEnum["x-small"], square: true, slot: "trigger", onClick: () => this.handleMenuClick() }),
77
+ h("z-button-deprecated", { icon: "contextual-menu", variant: ButtonVariantEnum["tertiary"], size: ButtonSizeEnum["x-small"], square: true, slot: "trigger", onClick: () => this.handleMenuClick() }),
78
78
  h("div", { slot: "popover" },
79
79
  h("slot", { name: "contextual-menu" })))))));
80
80
  }
@@ -0,0 +1,218 @@
1
+ import { Component, Prop, h, Element } from "@stencil/core";
2
+ import classNames from "classnames";
3
+ import { ButtonVariantEnum, ButtonTypeEnum, ButtonSizeEnum, } from "../../beans";
4
+ /**
5
+ * @slot - button label
6
+ */
7
+ export class ZButtonDeprecated {
8
+ constructor() {
9
+ /** HTML button disabled attribute. */
10
+ this.disabled = false;
11
+ /** HTML button type attribute. */
12
+ this.type = ButtonTypeEnum.button;
13
+ /** Graphical variant: `primary`, `secondary`, `tertiary`, `dark-bg`. Defaults to `primary`. */
14
+ this.variant = ButtonVariantEnum.primary;
15
+ /** Available sizes: `big`, `small` and `x-small`. Defaults to `big`. */
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;
23
+ }
24
+ 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 }) },
28
+ this.icon && h("z-icon", { name: this.icon, width: 16, height: 16 }),
29
+ h("slot", null))));
30
+ }
31
+ static get is() { return "z-button-deprecated"; }
32
+ static get encapsulation() { return "shadow"; }
33
+ static get originalStyleUrls() { return {
34
+ "$": ["styles.css"]
35
+ }; }
36
+ static get styleUrls() { return {
37
+ "$": ["styles.css"]
38
+ }; }
39
+ static get properties() { return {
40
+ "htmlid": {
41
+ "type": "string",
42
+ "mutable": false,
43
+ "complexType": {
44
+ "original": "string",
45
+ "resolved": "string",
46
+ "references": {}
47
+ },
48
+ "required": false,
49
+ "optional": true,
50
+ "docs": {
51
+ "tags": [],
52
+ "text": "Identifier, should be unique."
53
+ },
54
+ "attribute": "htmlid",
55
+ "reflect": false
56
+ },
57
+ "name": {
58
+ "type": "string",
59
+ "mutable": false,
60
+ "complexType": {
61
+ "original": "string",
62
+ "resolved": "string",
63
+ "references": {}
64
+ },
65
+ "required": false,
66
+ "optional": true,
67
+ "docs": {
68
+ "tags": [],
69
+ "text": "HTML button name attribute."
70
+ },
71
+ "attribute": "name",
72
+ "reflect": false
73
+ },
74
+ "disabled": {
75
+ "type": "boolean",
76
+ "mutable": false,
77
+ "complexType": {
78
+ "original": "boolean",
79
+ "resolved": "boolean",
80
+ "references": {}
81
+ },
82
+ "required": false,
83
+ "optional": true,
84
+ "docs": {
85
+ "tags": [],
86
+ "text": "HTML button disabled attribute."
87
+ },
88
+ "attribute": "disabled",
89
+ "reflect": true,
90
+ "defaultValue": "false"
91
+ },
92
+ "type": {
93
+ "type": "string",
94
+ "mutable": false,
95
+ "complexType": {
96
+ "original": "HTMLButtonElement[\"type\"]",
97
+ "resolved": "string",
98
+ "references": {
99
+ "HTMLButtonElement": {
100
+ "location": "global"
101
+ }
102
+ }
103
+ },
104
+ "required": false,
105
+ "optional": true,
106
+ "docs": {
107
+ "tags": [],
108
+ "text": "HTML button type attribute."
109
+ },
110
+ "attribute": "type",
111
+ "reflect": false,
112
+ "defaultValue": "ButtonTypeEnum.button"
113
+ },
114
+ "variant": {
115
+ "type": "string",
116
+ "mutable": false,
117
+ "complexType": {
118
+ "original": "ButtonVariantBean",
119
+ "resolved": "ButtonVariantEnum.primary | ButtonVariantEnum.secondary | ButtonVariantEnum.tertiary | typeof ButtonVariantEnum[\"dark-bg\"]",
120
+ "references": {
121
+ "ButtonVariantBean": {
122
+ "location": "import",
123
+ "path": "../../beans"
124
+ }
125
+ }
126
+ },
127
+ "required": false,
128
+ "optional": true,
129
+ "docs": {
130
+ "tags": [],
131
+ "text": "Graphical variant: `primary`, `secondary`, `tertiary`, `dark-bg`. Defaults to `primary`."
132
+ },
133
+ "attribute": "variant",
134
+ "reflect": true,
135
+ "defaultValue": "ButtonVariantEnum.primary"
136
+ },
137
+ "icon": {
138
+ "type": "string",
139
+ "mutable": false,
140
+ "complexType": {
141
+ "original": "string",
142
+ "resolved": "string",
143
+ "references": {}
144
+ },
145
+ "required": false,
146
+ "optional": true,
147
+ "docs": {
148
+ "tags": [],
149
+ "text": "`z-icon` name to use (optional)."
150
+ },
151
+ "attribute": "icon",
152
+ "reflect": false
153
+ },
154
+ "size": {
155
+ "type": "string",
156
+ "mutable": false,
157
+ "complexType": {
158
+ "original": "ButtonSizeEnum",
159
+ "resolved": "ButtonSizeEnum.big | ButtonSizeEnum.small | typeof ButtonSizeEnum[\"x-small\"]",
160
+ "references": {
161
+ "ButtonSizeEnum": {
162
+ "location": "import",
163
+ "path": "../../beans"
164
+ }
165
+ }
166
+ },
167
+ "required": false,
168
+ "optional": true,
169
+ "docs": {
170
+ "tags": [],
171
+ "text": "Available sizes: `big`, `small` and `x-small`. Defaults to `big`."
172
+ },
173
+ "attribute": "size",
174
+ "reflect": true,
175
+ "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
+ }
216
+ }; }
217
+ static get elementRef() { return "hostElement"; }
218
+ }