@sankhyalabs/ezui 1.1.69 → 1.1.72

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 (81) hide show
  1. package/dist/assets/actions-sprite.svg +257 -0
  2. package/dist/cjs/CSSVarsUtils-f8827674.js +18 -0
  3. package/dist/cjs/ez-action-chip.cjs.entry.js +1 -1
  4. package/dist/cjs/ez-button_16.cjs.entry.js +101 -97
  5. package/dist/cjs/ez-dialog.cjs.entry.js +5 -2
  6. package/dist/cjs/ez-label-chip.cjs.entry.js +1 -1
  7. package/dist/cjs/ez-modal.cjs.entry.js +16 -69
  8. package/dist/cjs/ez-number-input.cjs.entry.js +1 -1
  9. package/dist/cjs/ez-popover.cjs.entry.js +14 -15
  10. package/dist/cjs/ez-popup.cjs.entry.js +2 -2
  11. package/dist/cjs/ez-time-input.cjs.entry.js +7 -70
  12. package/dist/cjs/ez-toast.cjs.entry.js +1 -1
  13. package/dist/cjs/ezui.cjs.js +2 -2
  14. package/dist/cjs/{index-0f668cc5.js → index-bb6cdd1a.js} +5 -0
  15. package/dist/cjs/loader.cjs.js +2 -2
  16. package/dist/collection/components/assets/actions-sprite.svg +257 -0
  17. package/dist/collection/components/ez-button/ez-button.css +8 -4
  18. package/dist/collection/components/ez-button/ez-button.js +5 -2
  19. package/dist/collection/components/ez-combo-box/ez-combo-box.css +46 -44
  20. package/dist/collection/components/ez-combo-box/ez-combo-box.js +34 -35
  21. package/dist/collection/components/ez-date-input/ez-date-input.css +0 -9
  22. package/dist/collection/components/ez-date-input/ez-date-input.js +5 -1
  23. package/dist/collection/components/ez-dialog/ez-dialog.css +43 -43
  24. package/dist/collection/components/ez-dialog/ez-dialog.js +5 -2
  25. package/dist/collection/components/ez-form/subcomponents/structure/FormSheet.js +1 -1
  26. package/dist/collection/components/ez-modal/ez-modal.js +27 -80
  27. package/dist/collection/components/ez-popover/ez-popover.css +4 -5
  28. package/dist/collection/components/ez-popover/ez-popover.js +25 -26
  29. package/dist/collection/components/ez-popup/ez-popup.css +5 -5
  30. package/dist/collection/components/ez-popup/ez-popup.js +1 -1
  31. package/dist/collection/components/ez-search/ez-search.js +1 -1
  32. package/dist/collection/components/ez-tabselector/ez-tabselector.css +7 -10
  33. package/dist/collection/components/ez-tabselector/ez-tabselector.js +67 -69
  34. package/dist/collection/components/ez-time-input/ez-time-input.css +0 -168
  35. package/dist/collection/components/ez-time-input/ez-time-input.js +8 -75
  36. package/dist/collection/utils/CSSVarsUtils.js +14 -0
  37. package/dist/custom-elements/index.js +157 -254
  38. package/dist/esm/CSSVarsUtils-e0128b01.js +16 -0
  39. package/dist/esm/ez-action-chip.entry.js +1 -1
  40. package/dist/esm/ez-button_16.entry.js +101 -97
  41. package/dist/esm/ez-dialog.entry.js +5 -2
  42. package/dist/esm/ez-label-chip.entry.js +1 -1
  43. package/dist/esm/ez-modal.entry.js +16 -69
  44. package/dist/esm/ez-number-input.entry.js +1 -1
  45. package/dist/esm/ez-popover.entry.js +14 -15
  46. package/dist/esm/ez-popup.entry.js +2 -2
  47. package/dist/esm/ez-time-input.entry.js +7 -70
  48. package/dist/esm/ez-toast.entry.js +1 -1
  49. package/dist/esm/ezui.js +2 -2
  50. package/dist/esm/{index-89fc9bfd.js → index-989e6e7d.js} +5 -1
  51. package/dist/esm/loader.js +2 -2
  52. package/dist/ezui/ezui.esm.js +1 -1
  53. package/dist/ezui/{p-762ac7a0.js → p-384f89f7.js} +1 -1
  54. package/dist/ezui/p-55003571.entry.js +1 -0
  55. package/dist/ezui/p-5c5ba099.entry.js +1 -0
  56. package/dist/ezui/p-65ea9879.entry.js +1 -0
  57. package/dist/ezui/{p-9702db61.entry.js → p-889030b3.entry.js} +1 -1
  58. package/dist/ezui/{p-8d547517.entry.js → p-8b945611.entry.js} +1 -1
  59. package/dist/ezui/p-a6a87bc5.entry.js +1 -0
  60. package/dist/ezui/p-d01bcce1.entry.js +1 -0
  61. package/dist/ezui/p-d1889704.js +1 -0
  62. package/dist/ezui/{p-74e4415e.entry.js → p-e2533df1.entry.js} +1 -1
  63. package/dist/ezui/p-edcc9e6f.entry.js +1 -0
  64. package/dist/ezui/{p-1c33a56d.entry.js → p-f8f92f68.entry.js} +1 -1
  65. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +5 -5
  66. package/dist/types/components/ez-date-input/ez-date-input.d.ts +1 -0
  67. package/dist/types/components/ez-dialog/ez-dialog.d.ts +4 -1
  68. package/dist/types/components/ez-modal/ez-modal.d.ts +7 -7
  69. package/dist/types/components/ez-popover/ez-popover.d.ts +4 -5
  70. package/dist/types/components/ez-popup/ez-popup.d.ts +1 -1
  71. package/dist/types/components/ez-tabselector/ez-tabselector.d.ts +19 -10
  72. package/dist/types/components/ez-time-input/ez-time-input.d.ts +1 -8
  73. package/dist/types/components.d.ts +56 -35
  74. package/dist/types/utils/CSSVarsUtils.d.ts +4 -0
  75. package/package.json +1 -1
  76. package/dist/ezui/p-169d99a1.entry.js +0 -1
  77. package/dist/ezui/p-7c7dbfcb.entry.js +0 -1
  78. package/dist/ezui/p-8c8f1c00.entry.js +0 -1
  79. package/dist/ezui/p-d185d7e8.entry.js +0 -1
  80. package/dist/ezui/p-ee5058c1.entry.js +0 -1
  81. package/dist/ezui/p-f7d7fb7f.entry.js +0 -1
@@ -1,5 +1,5 @@
1
- import { FloatingManager } from '@sankhyalabs/core';
2
- import { Component, h, Host, Prop, State, Event, Element, Watch } from '@stencil/core';
1
+ import { FloatingManager } from "@sankhyalabs/core";
2
+ import { Component, h, Host, Prop, State, Event, Element, Watch } from "@stencil/core";
3
3
  export class EzComboBox {
4
4
  constructor() {
5
5
  /**
@@ -9,11 +9,11 @@ export class EzComboBox {
9
9
  /**
10
10
  * Ajusta a opção de mostrar o "value" ao selecionar uma opção. Por padrão não mostra.
11
11
  */
12
- this.showselectedvalue = false;
12
+ this.showSelectedValue = false;
13
13
  /**
14
14
  * Ajusta a opção de mostrar o "value" para cada opção. Por padrão não mostra
15
15
  */
16
- this.showoptionvalue = false;
16
+ this.showOptionValue = false;
17
17
  }
18
18
  internalUpdate() {
19
19
  if (this._inputElement) {
@@ -25,31 +25,31 @@ export class EzComboBox {
25
25
  this.updateVisibleOptions();
26
26
  }
27
27
  getText() {
28
- let text = '';
28
+ let text = "";
29
29
  const selected = this.getSelectedOption();
30
30
  if (selected) {
31
- text = this.showselectedvalue ? `${selected.value} - ${selected.label}` : selected.label;
31
+ text = this.showSelectedValue ? `${selected.value} - ${selected.label}` : selected.label;
32
32
  }
33
33
  return text;
34
34
  }
35
35
  getSelectedOption() {
36
- if (typeof this.value === 'string' || this.value instanceof String) {
36
+ if (typeof this.value === "string" || this.value instanceof String) {
37
37
  return this._visibleOptions.find(o => o.value === this.value);
38
38
  }
39
39
  return this.value;
40
40
  }
41
41
  updateVisibleOptions() {
42
42
  let opts = this._source || [];
43
- if (!this.searchmode && this._criteria) {
43
+ if (!this.searchMode && this._criteria) {
44
44
  const upperCriteria = this._criteria.toUpperCase();
45
45
  opts = opts.filter(opt => opt.label.toLocaleUpperCase().indexOf(upperCriteria) > -1);
46
46
  }
47
- this._visibleOptions = [{ value: null, label: '' }].concat(opts);
47
+ this._visibleOptions = [{ value: undefined, label: "" }].concat(opts);
48
48
  }
49
49
  buildItem(opt, index) {
50
50
  return h("li", { class: index === this._preSelection ? "item preselected" : "item", id: `item_${opt.value}`, onMouseDown: () => this.selectOption(opt), onMouseOver: () => this._preSelection = undefined },
51
51
  h("span", { class: "item--label", title: opt.label }, opt.label),
52
- this.showoptionvalue ? h("span", { class: "item--value", title: opt.value }, opt.value) : null);
52
+ this.showOptionValue ? h("span", { class: "item--value", title: opt.value }, opt.value) : undefined);
53
53
  }
54
54
  showOptions() {
55
55
  if (!this.enabled) {
@@ -58,10 +58,10 @@ export class EzComboBox {
58
58
  //FIXME: Provavelmente isso fará com que o popup abra em uma
59
59
  //posição errada no futuro. Preferi fazer simples no começo,
60
60
  //porque não quis onerar o text input com essa funcionalidade...
61
- const top = this.errorMessage ? '0px' : '-17px';
61
+ const top = this.errorMessage ? "0px" : "-17px";
62
62
  this._floatingID = FloatingManager.float(this._optionsList, this._listContainer, { autoClose: true, top });
63
63
  window.requestAnimationFrame(() => {
64
- this._optionsList.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'nearest' });
64
+ this._optionsList.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
65
65
  });
66
66
  }
67
67
  hideOptions() {
@@ -74,7 +74,7 @@ export class EzComboBox {
74
74
  return this._floatingID !== undefined && FloatingManager.isFloating(this._floatingID);
75
75
  }
76
76
  nextOption() {
77
- if (this.searchmode && !this.isOptionsVisible()) {
77
+ if (this.searchMode && !this.isOptionsVisible()) {
78
78
  return;
79
79
  }
80
80
  this.showOptions();
@@ -110,7 +110,7 @@ export class EzComboBox {
110
110
  selectOption(opt) {
111
111
  const currentOpt = this.getSelectedOption();
112
112
  if (currentOpt !== opt) {
113
- const adjustedOpt = !(opt === null || opt === void 0 ? void 0 : opt.value) ? null : opt;
113
+ const adjustedOpt = !(opt === null || opt === void 0 ? void 0 : opt.value) ? undefined : opt;
114
114
  this.value = adjustedOpt;
115
115
  this.ezChange.emit(adjustedOpt);
116
116
  }
@@ -128,10 +128,10 @@ export class EzComboBox {
128
128
  this.updateVisibleOptions();
129
129
  }
130
130
  }
131
- loadOptions(mode, argument = '') {
131
+ loadOptions(mode, argument = "") {
132
132
  this._criteria = argument;
133
- if (this.optionloader) {
134
- this.updateSource(this.optionloader({ mode, argument }));
133
+ if (this.optionLoader) {
134
+ this.updateSource(this.optionLoader({ mode, argument }));
135
135
  }
136
136
  else {
137
137
  this.updateSource(this.options);
@@ -139,7 +139,7 @@ export class EzComboBox {
139
139
  }
140
140
  cancelPreselection() {
141
141
  if (!this._inputElement.value && this.value) {
142
- this.selectOption(null);
142
+ this.selectOption(undefined);
143
143
  }
144
144
  else {
145
145
  this.internalUpdate();
@@ -151,11 +151,11 @@ export class EzComboBox {
151
151
  componentWillLoad() {
152
152
  if (this.options === undefined) {
153
153
  this.options = [];
154
- const optionsTags = this.el.querySelectorAll('option');
154
+ const optionsTags = this.el.querySelectorAll("option");
155
155
  if (optionsTags) {
156
156
  optionsTags.forEach(e => {
157
157
  let label = e.innerText;
158
- let value = e.getAttribute('value');
158
+ let value = e.getAttribute("value");
159
159
  if (!value) {
160
160
  value = label;
161
161
  }
@@ -164,11 +164,11 @@ export class EzComboBox {
164
164
  });
165
165
  }
166
166
  }
167
- if (this.searchmode) {
167
+ if (this.searchMode) {
168
168
  this.updateSource([]);
169
169
  }
170
170
  else {
171
- this.loadOptions('PRELOAD');
171
+ this.loadOptions("PRELOAD");
172
172
  }
173
173
  }
174
174
  componentDidRender() {
@@ -186,13 +186,12 @@ export class EzComboBox {
186
186
  const argument = event.target.value;
187
187
  this._criteria = argument;
188
188
  if (this._criteria) {
189
- if (this.searchmode) {
189
+ if (this.searchMode) {
190
190
  if (this._changeDeboucingTimeout) {
191
191
  window.clearTimeout(this._changeDeboucingTimeout);
192
192
  }
193
193
  this._changeDeboucingTimeout = window.setTimeout(() => {
194
- /* load data */
195
- this.loadOptions('PREDICTIVE', argument);
194
+ this.loadOptions("PREDICTIVE", argument);
196
195
  }, 200);
197
196
  }
198
197
  else {
@@ -202,7 +201,7 @@ export class EzComboBox {
202
201
  }
203
202
  }
204
203
  onTextInputClickHandler() {
205
- if (!this.searchmode) {
204
+ if (!this.searchMode) {
206
205
  this.showOptions();
207
206
  }
208
207
  }
@@ -228,8 +227,8 @@ export class EzComboBox {
228
227
  }
229
228
  render() {
230
229
  return (h(Host, null,
231
- h("ez-text-input", { ref: elem => this._inputElement = elem, enabled: this.enabled, onInput: evt => this.onTextInputChangeHandler(evt), onClick: () => this.onTextInputClickHandler(), onFocusout: () => this.onTextInputFocusOutHandler(), onEzChange: event => event.stopPropagation(), onKeyDown: event => this.keyDownHandler(event), label: this.label, value: this.getText(), errorMessage: this.errorMessage }, this.searchmode ?
232
- h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-search", onClick: () => { this.loadOptions('ADVANCED'); }, slot: "leftIcon" })
230
+ h("ez-text-input", { ref: elem => this._inputElement = elem, enabled: this.enabled, onInput: evt => this.onTextInputChangeHandler(evt), onClick: () => this.onTextInputClickHandler(), onFocusout: () => this.onTextInputFocusOutHandler(), onEzChange: event => event.stopPropagation(), onKeyDown: event => this.keyDownHandler(event), label: this.label, value: this.getText(), errorMessage: this.errorMessage }, this.searchMode ?
231
+ h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-search", onClick: () => { this.loadOptions("ADVANCED"); }, slot: "leftIcon" })
233
232
  :
234
233
  h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-options", slot: "rightIcon", onClick: () => this.showOptions() })),
235
234
  h("section", { class: "list-container", ref: elem => this._listContainer = elem },
@@ -339,7 +338,7 @@ export class EzComboBox {
339
338
  "attribute": "error-message",
340
339
  "reflect": true
341
340
  },
342
- "searchmode": {
341
+ "searchMode": {
343
342
  "type": "boolean",
344
343
  "mutable": false,
345
344
  "complexType": {
@@ -353,10 +352,10 @@ export class EzComboBox {
353
352
  "tags": [],
354
353
  "text": ""
355
354
  },
356
- "attribute": "searchmode",
355
+ "attribute": "search-mode",
357
356
  "reflect": false
358
357
  },
359
- "showselectedvalue": {
358
+ "showSelectedValue": {
360
359
  "type": "boolean",
361
360
  "mutable": false,
362
361
  "complexType": {
@@ -370,11 +369,11 @@ export class EzComboBox {
370
369
  "tags": [],
371
370
  "text": "Ajusta a op\u00E7\u00E3o de mostrar o \"value\" ao selecionar uma op\u00E7\u00E3o. Por padr\u00E3o n\u00E3o mostra."
372
371
  },
373
- "attribute": "showselectedvalue",
372
+ "attribute": "show-selected-value",
374
373
  "reflect": false,
375
374
  "defaultValue": "false"
376
375
  },
377
- "showoptionvalue": {
376
+ "showOptionValue": {
378
377
  "type": "boolean",
379
378
  "mutable": false,
380
379
  "complexType": {
@@ -388,11 +387,11 @@ export class EzComboBox {
388
387
  "tags": [],
389
388
  "text": "Ajusta a op\u00E7\u00E3o de mostrar o \"value\" para cada op\u00E7\u00E3o. Por padr\u00E3o n\u00E3o mostra"
390
389
  },
391
- "attribute": "showoptionvalue",
390
+ "attribute": "show-option-value",
392
391
  "reflect": false,
393
392
  "defaultValue": "false"
394
393
  },
395
- "optionloader": {
394
+ "optionLoader": {
396
395
  "type": "unknown",
397
396
  "mutable": false,
398
397
  "complexType": {
@@ -1,19 +1,10 @@
1
1
  :host {
2
2
  display: block;
3
3
  width: 100%;
4
- /*@doc Define a cor de fundo do input.*/
5
- --it__input--background-color: var(--background--medium, #e0e0e0);
6
- /*@doc Define a cor da borda do input.*/
7
- --it__input--border-color: var(--it__input--background-color);
8
4
  /*@doc Contém a imagem do calendário.*/
9
5
  --di__calendar-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="15px"><path d="M 3.171875,5.25 C 2.6485088,5.25 2.21875,5.6797588 2.21875,6.203125 2.21875,6.7264912 2.6485088,7.15625 3.171875,7.15625 3.6952412,7.15625 4.125,6.7264912 4.125,6.203125 4.125,5.6797588 3.6952412,5.25 3.171875,5.25 Z m 2.875,0 C 5.5235088,5.25 5.09375,5.6797588 5.09375,6.203125 5.09375,6.7264912 5.5235088,7.15625 6.046875,7.15625 6.5702412,7.15625 7,6.7264912 7,6.203125 7,5.6797588 6.5702412,5.25 6.046875,5.25 Z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.9511719,-0.4297588 0.9511719,-0.953125 C 9.8730469,5.6797588 9.4452412,5.25 8.921875,5.25 Z m 2.873047,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.953125 0.953125,0.953125 0.523366,0 0.953125,-0.4297588 0.953125,-0.953125 C 12.748047,5.6797588 12.318288,5.25 11.794922,5.25 Z M 3.171875,8.1230469 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 0.5233662,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 C 6.5702412,10.029297 7,9.5995381 7,9.0761719 7,8.5528057 6.5702412,8.1230469 6.046875,8.1230469 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297587,0.9531251 0.953125,0.9531251 0.5233661,0 0.9531249,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.9531251 0.953125,0.9531251 0.523367,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.171875,10.998047 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 C 6.5702412,12.904297 7,12.474538 7,11.951172 7,11.427806 6.5702412,10.998047 6.046875,10.998047 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297587,0.953125 0.953125,0.953125 0.5233661,0 0.9531249,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.429759,0.953125 0.953125,0.953125 0.523367,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.5,0 c -0.554,0 -1,0.446 -1,1 v 0.050781 C 1.0853217,1.2909766 0,2.5186658 0,4 v 9 c 0,1.652487 1.3475134,3 3,3 h 9 c 1.652487,0 3,-1.347513 3,-3 V 4 C 15,2.5186658 13.914678,1.2909766 12.5,1.0507812 V 1 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 C 4.5,0.446 4.054,0 3.5,0 Z m 1,2.0996094 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 v -0.640625 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 V 2.1738281 C 13.311725,2.3905225 13.900391,3.11278 13.900391,4 v 9 c 0,1.062113 -0.838278,1.900391 -1.900391,1.900391 H 3 C 1.9378864,14.900391 1.0996094,14.062113 1.0996094,13 V 4 C 1.0996094,3.11278 1.6882747,2.3905225 2.5,2.1738281 v 0.5664063 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 z"/></svg>');
10
6
  }
11
7
 
12
- .text-input {
13
- --it__input--background-color: inherit;
14
- --it__input--border-color: inherit;
15
- }
16
-
17
8
  .btn-open-cal {
18
9
  outline: none;
19
10
  border: none;
@@ -1,5 +1,6 @@
1
1
  import { Component, Element, Host, h, Prop, Watch, Event } from '@stencil/core';
2
2
  import { DateUtils } from '@sankhyalabs/core';
3
+ import CSSVarsUtils from '../../utils/CSSVarsUtils';
3
4
  export class EzDateInput {
4
5
  constructor() {
5
6
  /**
@@ -57,9 +58,12 @@ export class EzDateInput {
57
58
  getTextValue(d) {
58
59
  return d ? new Intl.DateTimeFormat('pt-BR').format(d) : null;
59
60
  }
61
+ componentDidLoad() {
62
+ CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
63
+ }
60
64
  render() {
61
65
  return (h(Host, null,
62
- h("ez-text-input", { class: "text-input", ref: elem => this._textInput = elem, onBlur: () => this.parseDate(), onKeyDown: event => { if (event.key === 'H' || event.key === 'h')
66
+ h("ez-text-input", { ref: elem => this._textInput = elem, onBlur: () => this.parseDate(), onKeyDown: event => { if (event.key === 'H' || event.key === 'h')
63
67
  this.changeValue(new Date()); }, label: this.label, onEzChange: event => event.stopPropagation(), value: this.getTextValue(this.value), restrict: "0123456789/", enabled: this.enabled, errorMessage: this.errorMessage },
64
68
  h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-cal", onClick: () => this.showCalendar(), slot: "leftIcon" })),
65
69
  h("ez-calendar", { onEzChange: (event) => { this.hideCalendar(); event.stopPropagation(); }, floating: true, ref: elem => this._calendar = elem })));
@@ -2,52 +2,52 @@
2
2
 
3
3
  /* Container */
4
4
  /*@doc Define o espaçamento do container.*/
5
- --dlg__container-padding: var(--space--large, 24px);
5
+ --dialog__container-padding: var(--space--large, 24px);
6
6
 
7
7
  /* Botões */
8
8
  /*@doc Define a cor de fundo do botão de fechar.*/
9
- --dlg__btn__close--background-color: var(--title--primary, #2b3a54);
9
+ --dialog__btn__close--background-color: var(--title--primary, #2b3a54);
10
10
  /*@doc Define o espaçamento direito do botão de negação.*/
11
- --dlg__btn__no--padding-right: var(--space--large, 24px);
11
+ --dialog__btn__no--padding-right: var(--space--large, 24px);
12
12
  /*@doc Contém a imagem do ícone de fechamento.*/
13
- --dlg__btn__close__image: url('data:image/svg+xml;utf8,<svg width="12" height="12" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg%22%3E<path d="M 7.0060773,5.995511 11.461972,1.5397722 c 0.132856,-0.1328413 0.207547,-0.3130253 0.207547,-0.5009046 0,-0.18786999 -0.07469,-0.3680541 -0.207547,-0.5009048 -0.132857,-0.13284126 -0.31302,-0.20748126 -0.500927,-0.20748126 -0.187812,0 -0.36807,0.07464 -0.500926,0.20748126 L 6.0042244,4.9937015 1.5482921,0.5379628 C 1.4154357,0.40512154 1.2352533,0.33048154 1.0473657,0.33048154 c -0.18787813,0 -0.36807,0.07464 -0.50092647,0.20748126 -0.13285646,0.1328507 -0.20749026,0.31303481 -0.20749026,0.5009048 0,0.1878793 0.0746338,0.3680633 0.20749026,0.5009046 L 5.0023715,5.995511 0.54643923,10.452213 c -0.0676086,0.06534 -0.12151598,0.14352 -0.15859681,0.229916 -0.0370714,0.08639 -0.0565645,0.1794 -0.0573369,0.27335 -7.724e-4,0.09404 0.0171873,0.187331 0.0528423,0.274293 0.0356455,0.08705 0.0882688,0.166087 0.15479148,0.23256 0.0665321,0.06648 0.14562277,0.11897 0.2326735,0.154567 0.0870507,0.0356 0.18031463,0.05344 0.2743433,0.05259 0.094029,-8.5e-4 0.1869528,-0.02049 0.2733331,-0.0576 0.08639,-0.0372 0.1645078,-0.09121 0.2298029,-0.158817 L 6.0042244,6.9973204 10.460119,11.453078 c 0.132856,0.132851 0.313114,0.207444 0.500926,0.207444 0.187907,0 0.36807,-0.07459 0.500927,-0.207444 0.132856,-0.13285 0.207547,-0.313006 0.207547,-0.500904 0,-0.187898 -0.07469,-0.368054 -0.207547,-0.500905 z"/></svg>');
13
+ --dialog__btn__close__image: url('data:image/svg+xml;utf8,<svg width="12" height="12" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg%22%3E<path d="M 7.0060773,5.995511 11.461972,1.5397722 c 0.132856,-0.1328413 0.207547,-0.3130253 0.207547,-0.5009046 0,-0.18786999 -0.07469,-0.3680541 -0.207547,-0.5009048 -0.132857,-0.13284126 -0.31302,-0.20748126 -0.500927,-0.20748126 -0.187812,0 -0.36807,0.07464 -0.500926,0.20748126 L 6.0042244,4.9937015 1.5482921,0.5379628 C 1.4154357,0.40512154 1.2352533,0.33048154 1.0473657,0.33048154 c -0.18787813,0 -0.36807,0.07464 -0.50092647,0.20748126 -0.13285646,0.1328507 -0.20749026,0.31303481 -0.20749026,0.5009048 0,0.1878793 0.0746338,0.3680633 0.20749026,0.5009046 L 5.0023715,5.995511 0.54643923,10.452213 c -0.0676086,0.06534 -0.12151598,0.14352 -0.15859681,0.229916 -0.0370714,0.08639 -0.0565645,0.1794 -0.0573369,0.27335 -7.724e-4,0.09404 0.0171873,0.187331 0.0528423,0.274293 0.0356455,0.08705 0.0882688,0.166087 0.15479148,0.23256 0.0665321,0.06648 0.14562277,0.11897 0.2326735,0.154567 0.0870507,0.0356 0.18031463,0.05344 0.2743433,0.05259 0.094029,-8.5e-4 0.1869528,-0.02049 0.2733331,-0.0576 0.08639,-0.0372 0.1645078,-0.09121 0.2298029,-0.158817 L 6.0042244,6.9973204 10.460119,11.453078 c 0.132856,0.132851 0.313114,0.207444 0.500926,0.207444 0.187907,0 0.36807,-0.07459 0.500927,-0.207444 0.132856,-0.13285 0.207547,-0.313006 0.207547,-0.500904 0,-0.187898 -0.07469,-0.368054 -0.207547,-0.500905 z"/></svg>');
14
14
 
15
15
  /* Título */
16
16
  /*@doc Define o estilo da mensagem exibida no título.*/
17
- --dlg__title--font-pattern: var(--font-pattern, "'Sora', 'Algerian'");
17
+ --dialog__title--font-pattern: var(--font-pattern, "'Sora', 'Algerian'");
18
18
  /*@doc Define o espaçamento a esquerda do título.*/
19
- --dlg__title--padding-left: var(--space--small, 6px);
19
+ --dialog__title--padding-left: var(--space--small, 6px);
20
20
  /*@doc Define o espaçamento abaixo do container do título.*/
21
- --dlg__title__container--padding-bottom: var(--space--medium, 12px);
21
+ --dialog__title__container--padding-bottom: var(--space--medium, 12px);
22
22
  /*@doc Define o peso do título.*/
23
- --dlg__title--weight--large: var(--text-weight--large, 600);
23
+ --dialog__title--weight--large: var(--text-weight--large, 600);
24
24
 
25
25
 
26
26
  /* Corpo da Mensagem */
27
27
  /*@doc Define o estilo do texto da mensagem.*/
28
- --dlg__body--font-pattern: var(--font-pattern, "'Sora', 'Algerian'");
28
+ --dialog__body--font-pattern: var(--font-pattern, "'Sora', 'Algerian'");
29
29
  /*@doc Define a sombra do texto da mensagem.*/
30
- --dlg__body--text-shadow: var(--text-shadow, "0 0 0 #353535, 0 0 1px transparent");
30
+ --dialog__body--text-shadow: var(--text-shadow, "0 0 0 #353535, 0 0 1px transparent");
31
31
  /*@doc Define o peso do texto da mensagem.*/
32
- --dlg__body--text-weight--medium: var(--text-weight--medium, 400);
32
+ --dialog__body--text-weight--medium: var(--text-weight--medium, 400);
33
33
  /*@doc Define o espaçamento inferior do texto da mensagem.*/
34
- --dlg__body--padding-bottom: var(--space--large, 24px);
34
+ --dialog__body--padding-bottom: var(--space--large, 24px);
35
35
  /*@doc Define o tamanho do texto da mensagem.*/
36
- --dlg__body--font-size: var(--text--medium, 14px);
36
+ --dialog__body--font-size: var(--text--medium, 14px);
37
37
  /*@doc Define a cor do texto da mensagem.*/
38
- --dlg__body--color: var(--text--primary, #626e82);
38
+ --dialog__body--color: var(--text--primary, #626e82);
39
39
 
40
40
  /*@doc Define a cor de fundo dos indicadores do modo crítico.*/
41
- --dlg__critical--background-color: var(--color--alert-error-800, #BD0025);
41
+ --dialog__critical--background-color: var(--color--alert-error-800, #BD0025);
42
42
  /*@doc Define a cor de fundo da lista de opções.*/
43
- --dlg__warning--background-color: var(--color--alert-warning-500, #EFB103);
43
+ --dialog__warning--background-color: var(--color--alert-warning-500, #EFB103);
44
44
 
45
45
  /*@doc Define a camada que o dialog será exibido.*/
46
- --dlg-z-index: var(--most-visible, 3);
46
+ --dialog-z-index: var(--most-visible, 3);
47
47
  /*@doc Contém a imagem do ícone de alerta.*/
48
- --dlg--warning__image: url('data: image/svg+xml;utf8,<svg width="15" height="15" viewBox="0 0 15 15" xmlns="http://www.w3.org/2000/svg"><path d="M 7.5,0 0,13 h 15 z m 0,2.73684 5.1341,8.89476 H 2.36591 Z M 6.81818,5.47368 V 8.21053 H 8.18182 V 5.47368 Z m 0,4.10527 V 10.9474 H 8.18182 V 9.57895"/></svg>');
48
+ --dialog--warning__image: url('data: image/svg+xml;utf8,<svg width="15" height="15" viewBox="0 0 15 15" xmlns="http://www.w3.org/2000/svg"><path d="M 7.5,0 0,13 h 15 z m 0,2.73684 5.1341,8.89476 H 2.36591 Z M 6.81818,5.47368 V 8.21053 H 8.18182 V 5.47368 Z m 0,4.10527 V 10.9474 H 8.18182 V 9.57895"/></svg>');
49
49
  /*@doc Contém a imagem do ícone crítico.*/
50
- --dlg--critical__image: url('data: image/svg+xml;utf8,<svg width="13" height="13" viewBox="0 0 13 13" xmlns="http://www.w3.org/2000/svg"><path d="M 7.6534493,6.4948538 12.762051,1.3864299 C 12.914368,1.2341297 13,1.027552 13,0.81215179 13,0.59676225 12.914369,0.39018443 12.762051,0.23787352 12.609733,0.08557341 12.40318,0 12.187747,0 11.972425,0 11.765762,0.08557341 11.613445,0.23787352 L 6.5048431,5.3462975 1.3961977,0.23787352 C 1.2438802,0.08557341 1.0373043,0 0.82189458,0 0.60649572,0 0.39990901,0.08557341 0.24759147,0.23787352 0.09527396,0.39018443 0.00970766,0.59676225 0.00970766,0.81215179 c 0,0.21540021 0.0855663,0.42197791 0.23788381,0.57427811 L 5.3562369,6.4948538 0.24759147,11.604381 c -0.0775121,0.07492 -0.13931586,0.164543 -0.18182835,0.263595 -0.04250169,0.09905 -0.064850182,0.205678 -0.0657357237,0.313391 -8.8554258e-4,0.107813 0.0197049337,0.214771 0.0605827337,0.314472 0.04086693,0.0998 0.10119858,0.190415 0.17746563,0.266625 0.0762779,0.07622 0.16695386,0.136398 0.26675594,0.177208 0.099802,0.04082 0.20672745,0.06127 0.31452961,0.06029 0.1078025,-9.53e-4 0.21433799,-0.0235 0.31337139,-0.06604 0.099045,-0.04265 0.1886052,-0.104571 0.263465,-0.182081 L 6.5048431,7.6434102 11.613445,12.751855 c 0.152317,0.152312 0.35898,0.237831 0.574302,0.237831 0.215433,0 0.421986,-0.08552 0.574304,-0.237831 C 12.914368,12.599545 13,12.393 13,12.177578 13,11.962157 12.91437,11.75561 12.762051,11.603299 Z"/></svg>');
50
+ --dialog--critical__image: url('data: image/svg+xml;utf8,<svg width="13" height="13" viewBox="0 0 13 13" xmlns="http://www.w3.org/2000/svg"><path d="M 7.6534493,6.4948538 12.762051,1.3864299 C 12.914368,1.2341297 13,1.027552 13,0.81215179 13,0.59676225 12.914369,0.39018443 12.762051,0.23787352 12.609733,0.08557341 12.40318,0 12.187747,0 11.972425,0 11.765762,0.08557341 11.613445,0.23787352 L 6.5048431,5.3462975 1.3961977,0.23787352 C 1.2438802,0.08557341 1.0373043,0 0.82189458,0 0.60649572,0 0.39990901,0.08557341 0.24759147,0.23787352 0.09527396,0.39018443 0.00970766,0.59676225 0.00970766,0.81215179 c 0,0.21540021 0.0855663,0.42197791 0.23788381,0.57427811 L 5.3562369,6.4948538 0.24759147,11.604381 c -0.0775121,0.07492 -0.13931586,0.164543 -0.18182835,0.263595 -0.04250169,0.09905 -0.064850182,0.205678 -0.0657357237,0.313391 -8.8554258e-4,0.107813 0.0197049337,0.214771 0.0605827337,0.314472 0.04086693,0.0998 0.10119858,0.190415 0.17746563,0.266625 0.0762779,0.07622 0.16695386,0.136398 0.26675594,0.177208 0.099802,0.04082 0.20672745,0.06127 0.31452961,0.06029 0.1078025,-9.53e-4 0.21433799,-0.0235 0.31337139,-0.06604 0.099045,-0.04265 0.1886052,-0.104571 0.263465,-0.182081 L 6.5048431,7.6434102 11.613445,12.751855 c 0.152317,0.152312 0.35898,0.237831 0.574302,0.237831 0.215433,0 0.421986,-0.08552 0.574304,-0.237831 C 12.914368,12.599545 13,12.393 13,12.177578 13,11.962157 12.91437,11.75561 12.762051,11.603299 Z"/></svg>');
51
51
  }
52
52
 
53
53
  h2 {
@@ -61,7 +61,7 @@ h2 {
61
61
  position: fixed;
62
62
  display: flex;
63
63
  top: 0px;
64
- z-index: var(--dlg-z-index);
64
+ z-index: var(--dialog-z-index);
65
65
  left: 0px;
66
66
  width: 100%;
67
67
  box-sizing: border-box;
@@ -99,30 +99,30 @@ h2 {
99
99
  background: #FFFF;
100
100
  border-radius: 0px 6px 6px 0px;
101
101
  box-sizing: border-box;
102
- padding: var(--dlg__container-padding)
102
+ padding: var(--dialog__container-padding)
103
103
  }
104
104
 
105
105
  .dialog__critical--indicator {
106
106
  box-sizing: border-box;
107
107
  width: 12px;
108
108
  border-radius: 6px 0px 0px 6px;
109
- background-color: var(--dlg__critical--background-color);
109
+ background-color: var(--dialog__critical--background-color);
110
110
  }
111
111
 
112
112
  .dialog__warning--indicator {
113
113
  width: 12px;
114
114
  border-radius: 6px 0px 0px 6px;
115
115
  box-sizing: border-box;
116
- background-color: var(--dlg__warning--background-color);
116
+ background-color: var(--dialog__warning--background-color);
117
117
  }
118
118
 
119
119
  .message {
120
- font-size: var(--dlg__body--font-size);
121
- font-weight: var(--dlg__body--text-weight--medium);
122
- font-family: var(--dlg__body--font-pattern);
123
- text-shadow: var(--dlg__body--text-shadow);
124
- padding-bottom: var(--dlg__body--padding-bottom);
125
- color: var(--dlg__body--color);
120
+ font-size: var(--dialog__body--font-size);
121
+ font-weight: var(--dialog__body--text-weight--medium);
122
+ font-family: var(--dialog__body--font-pattern);
123
+ text-shadow: var(--dialog__body--text-shadow);
124
+ padding-bottom: var(--dialog__body--padding-bottom);
125
+ color: var(--dialog__body--color);
126
126
  max-height: 30vh;
127
127
  content-visibility: auto;
128
128
  margin-bottom: 24px;
@@ -136,15 +136,15 @@ h2 {
136
136
 
137
137
  .title {
138
138
  display: flex;
139
- font-family: var(--dlg__title--font-pattern);
139
+ font-family: var(--dialog__title--font-pattern);
140
140
  margin: 0;
141
- font-weight: var(--dlg__title--weight--large);
141
+ font-weight: var(--dialog__title--weight--large);
142
142
  line-height: 1.3;
143
143
  }
144
144
 
145
145
  .title__container {
146
146
  display: flex;
147
- padding-bottom: var(--dlg__title__container--padding-bottom);
147
+ padding-bottom: var(--dialog__title__container--padding-bottom);
148
148
  }
149
149
 
150
150
  .title__box {
@@ -155,13 +155,13 @@ h2 {
155
155
  }
156
156
 
157
157
  .title--label {
158
- padding-left: var(--dlg__title--padding-left);
158
+ padding-left: var(--dialog__title--padding-left);
159
159
  }
160
160
 
161
161
  .title-icon {
162
162
  outline: none;
163
163
  border: none;
164
- background-color: var(--dlg__warning--background-color);
164
+ background-color: var(--dialog__warning--background-color);
165
165
  width: 26px;
166
166
  height: 26px;
167
167
  border-radius: 100%;
@@ -172,7 +172,7 @@ h2 {
172
172
  }
173
173
 
174
174
  .title-icon--critical {
175
- background-color: var(--dlg__critical--background-color);
175
+ background-color: var(--dialog__critical--background-color);
176
176
  }
177
177
 
178
178
  .btn-close {
@@ -190,11 +190,11 @@ h2 {
190
190
  .btn-close::after {
191
191
  content: '';
192
192
  display: flex;
193
- background-color: var(--dlg__btn__close--background-color);
193
+ background-color: var(--dialog__btn__close--background-color);
194
194
  width: 12px;
195
195
  height: 12px;
196
- -webkit-mask-image: var(--dlg__btn__close__image);
197
- mask-image: var(--dlg__btn__close__image);
196
+ -webkit-mask-image: var(--dialog__btn__close__image);
197
+ mask-image: var(--dialog__btn__close__image);
198
198
  }
199
199
 
200
200
  .title-icon::after {
@@ -203,8 +203,8 @@ h2 {
203
203
  background-color: #FFFF;
204
204
  width: 15px;
205
205
  height: 15px;
206
- -webkit-mask-image: var(--dlg--warning__image);
207
- mask-image: var(--dlg--warning__image);
206
+ -webkit-mask-image: var(--dialog--warning__image);
207
+ mask-image: var(--dialog--warning__image);
208
208
  }
209
209
 
210
210
  .title-icon--critical::after {
@@ -213,8 +213,8 @@ h2 {
213
213
  background-color: #FFFF;
214
214
  width: 13px;
215
215
  height: 13px;
216
- -webkit-mask-image: var(--dlg--critical__image);
217
- mask-image: var(--dlg--critical__image);
216
+ -webkit-mask-image: var(--dialog--critical__image);
217
+ mask-image: var(--dialog--critical__image);
218
218
  }
219
219
 
220
220
  .button-yes-no__container {
@@ -226,7 +226,7 @@ h2 {
226
226
  }
227
227
 
228
228
  .button__no {
229
- padding-right: var(--dlg__btn__no--padding-right);
229
+ padding-right: var(--dialog__btn__no--padding-right);
230
230
  }
231
231
 
232
232
  .button__ok--container {
@@ -1,4 +1,4 @@
1
- import { Component, h, Prop, Method, Event, forceUpdate } from '@stencil/core';
1
+ import { Component, h, Prop, Method, Event, forceUpdate } from "@stencil/core";
2
2
  class Message {
3
3
  constructor(title, message, critical, confirm, icon, callBack) {
4
4
  this.title = title;
@@ -25,6 +25,9 @@ export class EzDialog {
25
25
  this.opened = false;
26
26
  this._messageQueue = [];
27
27
  }
28
+ /**
29
+ * Lida com o clique nos botões de dentro do componente.
30
+ */
28
31
  async handleButtonClick(selectedOption) {
29
32
  this.opened = this._messageQueue.length > 0;
30
33
  if (this._currentMessage.callBack) {
@@ -248,7 +251,7 @@ export class EzDialog {
248
251
  "return": "Promise<void>"
249
252
  },
250
253
  "docs": {
251
- "text": "",
254
+ "text": "Lida com o clique nos bot\u00F5es de dentro do componente.",
252
255
  "tags": []
253
256
  }
254
257
  },
@@ -33,7 +33,7 @@ export const FormSheet = ({ store, parentName, source, parentDataUnit, dataUnitB
33
33
  buttons.previousVisible = false;
34
34
  }
35
35
  return h("div", { class: "form-sheet" },
36
- tabs ? h("ez-tabselector", { selectedindex: selectedTab, selectedtab: name, onChange: (evt) => changeTabHandler(evt.target.selectedindex) }, tabs) : null,
36
+ tabs ? h("ez-tabselector", { selectedIndex: selectedTab, selectedTab: name, onChange: (evt) => changeTabHandler(evt.target.selectedindex) }, tabs) : null,
37
37
  dataUnit ? h(NavigationBar, { enabled: enabled, dataUnit: dataUnit, buttonProps: buttons }) : null,
38
38
  h("div", { class: "tab__container" },
39
39
  items ? items.map(item => buildFormItem(item, name, store, currentDU, enabled)) : null,