@sankhyalabs/ezui 4.13.0 → 4.14.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 (102) hide show
  1. package/dist/cjs/{ApplicationUtils-8cc2f37b.js → ApplicationUtils-b2cda4d5.js} +1 -0
  2. package/dist/cjs/ez-actions-button.cjs.entry.js +1 -1
  3. package/dist/cjs/ez-check.cjs.entry.js +13 -5
  4. package/dist/cjs/ez-collapsible-box.cjs.entry.js +1 -1
  5. package/dist/cjs/ez-combo-box.cjs.entry.js +2 -2
  6. package/dist/cjs/ez-date-input.cjs.entry.js +2 -1
  7. package/dist/cjs/ez-date-time-input.cjs.entry.js +2 -1
  8. package/dist/cjs/ez-form-view.cjs.entry.js +20 -20
  9. package/dist/cjs/ez-form.cjs.entry.js +1 -1
  10. package/dist/cjs/ez-list.cjs.entry.js +2 -2
  11. package/dist/cjs/ez-modal.cjs.entry.js +4 -2
  12. package/dist/cjs/ez-number-input.cjs.entry.js +2 -1
  13. package/dist/cjs/ez-search.cjs.entry.js +2 -1
  14. package/dist/cjs/ez-text-edit.cjs.entry.js +1 -1
  15. package/dist/cjs/ez-time-input.cjs.entry.js +2 -1
  16. package/dist/cjs/ez-upload.cjs.entry.js +1 -1
  17. package/dist/cjs/ezui.cjs.js +1 -1
  18. package/dist/cjs/loader.cjs.js +1 -1
  19. package/dist/collection/collection-manifest.json +1 -1
  20. package/dist/collection/components/ez-check/ez-check.css +7 -1
  21. package/dist/collection/components/ez-check/ez-check.js +30 -4
  22. package/dist/collection/components/ez-combo-box/ez-combo-box.js +1 -1
  23. package/dist/collection/components/ez-date-input/ez-date-input.js +20 -1
  24. package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +20 -1
  25. package/dist/collection/components/ez-form-view/fieldbuilder/templates/ComboBox.tpl.js +2 -2
  26. package/dist/collection/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.js +6 -6
  27. package/dist/collection/components/ez-form-view/fieldbuilder/templates/NumberInput.tpl.js +6 -6
  28. package/dist/collection/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.js +2 -2
  29. package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextArea.tpl.js +2 -2
  30. package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.js +2 -2
  31. package/dist/collection/components/ez-list/ez-list.css +3 -0
  32. package/dist/collection/components/ez-list/ez-list.js +1 -1
  33. package/dist/collection/components/ez-modal/ez-modal.css +11 -2
  34. package/dist/collection/components/ez-modal/ez-modal.js +21 -1
  35. package/dist/collection/components/ez-number-input/ez-number-input.js +20 -1
  36. package/dist/collection/components/ez-search/ez-search.js +20 -1
  37. package/dist/collection/components/ez-time-input/ez-time-input.js +20 -1
  38. package/dist/collection/utils/ApplicationUtils.js +1 -0
  39. package/dist/custom-elements/index.js +58 -42
  40. package/dist/esm/{ApplicationUtils-19857f60.js → ApplicationUtils-0becebd0.js} +1 -0
  41. package/dist/esm/ez-actions-button.entry.js +1 -1
  42. package/dist/esm/ez-check.entry.js +13 -5
  43. package/dist/esm/ez-collapsible-box.entry.js +1 -1
  44. package/dist/esm/ez-combo-box.entry.js +2 -2
  45. package/dist/esm/ez-date-input.entry.js +2 -1
  46. package/dist/esm/ez-date-time-input.entry.js +2 -1
  47. package/dist/esm/ez-form-view.entry.js +20 -20
  48. package/dist/esm/ez-form.entry.js +1 -1
  49. package/dist/esm/ez-list.entry.js +2 -2
  50. package/dist/esm/ez-modal.entry.js +4 -2
  51. package/dist/esm/ez-number-input.entry.js +2 -1
  52. package/dist/esm/ez-search.entry.js +2 -1
  53. package/dist/esm/ez-text-edit.entry.js +1 -1
  54. package/dist/esm/ez-time-input.entry.js +2 -1
  55. package/dist/esm/ez-upload.entry.js +1 -1
  56. package/dist/esm/ezui.js +1 -1
  57. package/dist/esm/loader.js +1 -1
  58. package/dist/ezui/ezui.esm.js +1 -1
  59. package/dist/ezui/{p-439168e8.entry.js → p-30c5535f.entry.js} +1 -1
  60. package/dist/ezui/p-3173d988.entry.js +1 -0
  61. package/dist/ezui/{p-18d7de85.entry.js → p-40e9475c.entry.js} +1 -1
  62. package/dist/ezui/{p-22b106d7.entry.js → p-4d1356b0.entry.js} +1 -1
  63. package/dist/ezui/p-5110b212.entry.js +1 -0
  64. package/dist/ezui/p-71d4f489.entry.js +1 -0
  65. package/dist/ezui/p-7cce14cd.entry.js +1 -0
  66. package/dist/ezui/p-855c4290.entry.js +1 -0
  67. package/dist/ezui/{p-805ee4c2.entry.js → p-8790b4cd.entry.js} +1 -1
  68. package/dist/ezui/p-967758ac.entry.js +1 -0
  69. package/dist/ezui/p-9ba304e9.entry.js +1 -0
  70. package/dist/ezui/p-b945133d.entry.js +1 -0
  71. package/dist/ezui/p-c0f7917c.entry.js +1 -0
  72. package/dist/ezui/{p-370ad5c9.entry.js → p-c567c679.entry.js} +1 -1
  73. package/dist/ezui/p-d96793f1.entry.js +1 -0
  74. package/dist/ezui/p-ee3ced9c.js +1 -0
  75. package/dist/types/components/ez-check/ez-check.d.ts +5 -1
  76. package/dist/types/components/ez-date-input/ez-date-input.d.ts +4 -0
  77. package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +4 -0
  78. package/dist/types/components/ez-form-view/fieldbuilder/templates/ComboBox.tpl.d.ts +1 -1
  79. package/dist/types/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.d.ts +3 -3
  80. package/dist/types/components/ez-form-view/fieldbuilder/templates/NumberInput.tpl.d.ts +2 -2
  81. package/dist/types/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.d.ts +1 -1
  82. package/dist/types/components/ez-form-view/fieldbuilder/templates/TextArea.tpl.d.ts +1 -1
  83. package/dist/types/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.d.ts +1 -1
  84. package/dist/types/components/ez-form-view/interfaces/IFormViewField.d.ts +4 -0
  85. package/dist/types/components/ez-modal/ez-modal.d.ts +4 -0
  86. package/dist/types/components/ez-number-input/ez-number-input.d.ts +4 -0
  87. package/dist/types/components/ez-search/ez-search.d.ts +4 -0
  88. package/dist/types/components/ez-time-input/ez-time-input.d.ts +4 -0
  89. package/dist/types/components.d.ts +56 -0
  90. package/dist/types/utils/ApplicationUtils.d.ts +1 -0
  91. package/package.json +1 -1
  92. package/dist/ezui/p-11431283.entry.js +0 -1
  93. package/dist/ezui/p-15e29287.entry.js +0 -1
  94. package/dist/ezui/p-39d2dc1b.entry.js +0 -1
  95. package/dist/ezui/p-41ce6f98.js +0 -1
  96. package/dist/ezui/p-5d8d9a2e.entry.js +0 -1
  97. package/dist/ezui/p-751aa882.entry.js +0 -1
  98. package/dist/ezui/p-9a58e143.entry.js +0 -1
  99. package/dist/ezui/p-a7892495.entry.js +0 -1
  100. package/dist/ezui/p-a9f0f910.entry.js +0 -1
  101. package/dist/ezui/p-c99bca75.entry.js +0 -1
  102. package/dist/ezui/p-ff4141d8.entry.js +0 -1
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "entries": [
3
3
  "./components/ez-modal/ez-modal.js",
4
+ "./components/ez-combo-box/ez-combo-box.js",
4
5
  "./components/ez-actions-button/ez-actions-button.js",
5
6
  "./components/ez-breadcrumb/ez-breadcrumb.js",
6
7
  "./components/ez-card-item/ez-card-item.js",
7
- "./components/ez-combo-box/ez-combo-box.js",
8
8
  "./components/ez-list/ez-list.js",
9
9
  "./components/ez-radio-button/ez-radio-button.js",
10
10
  "./components/ez-tabselector/ez-tabselector.js",
@@ -136,6 +136,9 @@ input.regular-mode {
136
136
  height: var(--ez-check--height);
137
137
  }
138
138
 
139
+ input.compact{
140
+ margin-right: 0px;
141
+ }
139
142
 
140
143
  input.regular-mode:enabled:hover {
141
144
  /*public*/
@@ -352,9 +355,12 @@ input.switch-mode:checked:disabled::after {
352
355
  font-size: var(--ez-check--label--font-size);
353
356
  font-family: var(--ez-check--label--font-family);
354
357
  cursor: default;
355
- padding-left: var(--space--small);
356
358
  }
357
359
 
358
360
  .label--disabled {
359
361
  color: var(--ez-check--label--disabled--color);
362
+ }
363
+
364
+ .label--padding {
365
+ padding-left: var(--space--small);
360
366
  }
@@ -8,6 +8,7 @@ export class EzCheck {
8
8
  this.enabled = true;
9
9
  this.indeterminate = undefined;
10
10
  this.mode = CheckMode.REGULAR;
11
+ this.compact = false;
11
12
  }
12
13
  observeValue(newValue, oldValue) {
13
14
  if (!this._inputElem)
@@ -54,15 +55,22 @@ export class EzCheck {
54
55
  this.ezChange.emit(this.value);
55
56
  }
56
57
  getLabelClasses() {
57
- let classes = "label";
58
+ const classes = ["label"];
58
59
  if (!this.enabled) {
59
- classes += " label--disabled";
60
+ classes.push("label--disabled");
60
61
  }
61
- return classes;
62
+ if (!this.compact) {
63
+ classes.push("label--padding");
64
+ }
65
+ return classes.join(" ");
62
66
  }
63
67
  getInputClasses() {
64
68
  var _a;
65
- return ((_a = this.mode) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === CheckMode.SWITCH ? "switch-mode" : "regular-mode";
69
+ const classes = [""];
70
+ classes.push(((_a = this.mode) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === CheckMode.SWITCH ? "switch-mode" : "regular-mode");
71
+ if (this.compact)
72
+ classes.push("compact");
73
+ return classes.join(" ");
66
74
  }
67
75
  render() {
68
76
  return (h(Host, null, h("input", { type: "checkbox", ref: (el) => this._inputElem = el, class: this.getInputClasses(), checked: this.value === true, onChange: () => { this.changeValue(); }, indeterminate: this.indeterminate, disabled: !this.enabled, "data-element-id": ElementIDUtils.getInternalIDInfo("input") }), this.label ? h("label", { class: this.getLabelClasses(), onClick: () => { this.changeValue(); }, title: this.label }, this.label) : undefined));
@@ -172,6 +180,24 @@ export class EzCheck {
172
180
  "attribute": "mode",
173
181
  "reflect": true,
174
182
  "defaultValue": "CheckMode.REGULAR"
183
+ },
184
+ "compact": {
185
+ "type": "boolean",
186
+ "mutable": false,
187
+ "complexType": {
188
+ "original": "boolean",
189
+ "resolved": "boolean",
190
+ "references": {}
191
+ },
192
+ "required": false,
193
+ "optional": false,
194
+ "docs": {
195
+ "tags": [],
196
+ "text": "Define o modo compacto com espa\u00E7amento menor entre label e o input"
197
+ },
198
+ "attribute": "compact",
199
+ "reflect": false,
200
+ "defaultValue": "false"
175
201
  }
176
202
  };
177
203
  }
@@ -208,7 +208,7 @@ export class EzComboBox {
208
208
  }
209
209
  scrollToOption(opt, down) {
210
210
  window.requestAnimationFrame(() => {
211
- const liElem = (opt === null || opt === void 0 ? void 0 : opt.value) ? this._optionsList.querySelector(`li#item_${opt.value}`) : undefined;
211
+ const liElem = (opt === null || opt === void 0 ? void 0 : opt.value) ? this._optionsList.querySelector(`li#item_${opt.value.replace(/[<>\[\]#=]/g, '\\$&')}`) : undefined;
212
212
  if (liElem) {
213
213
  const parent = liElem.parentElement;
214
214
  const parentRect = parent.getBoundingClientRect();
@@ -9,6 +9,7 @@ export class EzDateInput {
9
9
  this.enabled = true;
10
10
  this.errorMessage = undefined;
11
11
  this.mode = "regular";
12
+ this.canShowError = true;
12
13
  }
13
14
  observeLabel() {
14
15
  if (this._textInput) {
@@ -131,7 +132,7 @@ export class EzDateInput {
131
132
  }
132
133
  render() {
133
134
  ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
134
- return (h(Host, null, h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), ref: elem => this._textInput = elem, "data-slave-mode": "true", label: this.label, onBlur: () => this.handleBlur(), onInput: (evt) => this.handleInput(evt), restrict: "0123456789/", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode }, h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-cal", onClick: () => this.showCalendar(), slot: "leftIcon" })), h("ez-calendar", { "data-element-id": ElementIDUtils.getInternalIDInfo("calendar"), onEzChange: (event) => { this.hideCalendar(); event.stopPropagation(); }, floating: true, ref: elem => this._calendar = elem })));
135
+ return (h(Host, null, h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), ref: elem => this._textInput = elem, "data-slave-mode": "true", label: this.label, onBlur: () => this.handleBlur(), onInput: (evt) => this.handleInput(evt), restrict: "0123456789/", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, canShowError: this.canShowError }, h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-cal", onClick: () => this.showCalendar(), slot: "leftIcon" })), h("ez-calendar", { "data-element-id": ElementIDUtils.getInternalIDInfo("calendar"), onEzChange: (event) => { this.hideCalendar(); event.stopPropagation(); }, floating: true, ref: elem => this._calendar = elem })));
135
136
  }
136
137
  static get is() { return "ez-date-input"; }
137
138
  static get encapsulation() { return "shadow"; }
@@ -235,6 +236,24 @@ export class EzDateInput {
235
236
  "attribute": "mode",
236
237
  "reflect": true,
237
238
  "defaultValue": "\"regular\""
239
+ },
240
+ "canShowError": {
241
+ "type": "boolean",
242
+ "mutable": false,
243
+ "complexType": {
244
+ "original": "boolean",
245
+ "resolved": "boolean",
246
+ "references": {}
247
+ },
248
+ "required": false,
249
+ "optional": false,
250
+ "docs": {
251
+ "tags": [],
252
+ "text": "Se false deixa de exibir a mensagem de erro dentro do campo."
253
+ },
254
+ "attribute": "can-show-error",
255
+ "reflect": true,
256
+ "defaultValue": "true"
238
257
  }
239
258
  };
240
259
  }
@@ -10,6 +10,7 @@ export class EzDateTimeInput {
10
10
  this.errorMessage = undefined;
11
11
  this.showSeconds = false;
12
12
  this.mode = "regular";
13
+ this.canShowError = true;
13
14
  }
14
15
  observeLabel() {
15
16
  if (this._textInput) {
@@ -182,7 +183,7 @@ export class EzDateTimeInput {
182
183
  }
183
184
  render() {
184
185
  ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
185
- return (h(Host, null, h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), ref: elem => this._textInput = elem, "data-slave-mode": "true", label: this.label, restrict: "0123456789/: ", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, onKeyDown: event => { this.handleKeyDown(event); }, onBlur: () => this.handleBlur(), onInput: (evt) => this.handleInput(evt), onFocus: () => this.handleFocus(), onClick: () => this.handleClick() }, h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-cal", onClick: () => this.showCalendar(), slot: "leftIcon" })), h("ez-calendar", { "data-element-id": ElementIDUtils.getInternalIDInfo("calendar"), onEzChange: (event) => { this.hideCalendar(); event.stopPropagation(); }, floating: true, ref: elem => this._calendar = elem, time: true, showSeconds: this.showSeconds })));
186
+ return (h(Host, null, h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), ref: elem => this._textInput = elem, "data-slave-mode": "true", label: this.label, restrict: "0123456789/: ", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, onKeyDown: event => { this.handleKeyDown(event); }, onBlur: () => this.handleBlur(), onInput: (evt) => this.handleInput(evt), onFocus: () => this.handleFocus(), onClick: () => this.handleClick(), canShowError: this.canShowError }, h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-cal", onClick: () => this.showCalendar(), slot: "leftIcon" })), h("ez-calendar", { "data-element-id": ElementIDUtils.getInternalIDInfo("calendar"), onEzChange: (event) => { this.hideCalendar(); event.stopPropagation(); }, floating: true, ref: elem => this._calendar = elem, time: true, showSeconds: this.showSeconds })));
186
187
  }
187
188
  static get is() { return "ez-date-time-input"; }
188
189
  static get encapsulation() { return "shadow"; }
@@ -304,6 +305,24 @@ export class EzDateTimeInput {
304
305
  "attribute": "mode",
305
306
  "reflect": true,
306
307
  "defaultValue": "\"regular\""
308
+ },
309
+ "canShowError": {
310
+ "type": "boolean",
311
+ "mutable": false,
312
+ "complexType": {
313
+ "original": "boolean",
314
+ "resolved": "boolean",
315
+ "references": {}
316
+ },
317
+ "required": false,
318
+ "optional": false,
319
+ "docs": {
320
+ "tags": [],
321
+ "text": "Se false deixa de exibir a mensagem de erro dentro do campo."
322
+ },
323
+ "attribute": "can-show-error",
324
+ "reflect": true,
325
+ "defaultValue": "true"
307
326
  }
308
327
  };
309
328
  }
@@ -1,5 +1,5 @@
1
1
  import { h } from "@stencil/core";
2
- export const buildComboBox = ({ name, label, readOnly, required, props, contextName }) => {
2
+ export const buildComboBox = ({ name, label, readOnly, required, props, contextName, canShowError }) => {
3
3
  const prop = props === null || props === void 0 ? void 0 : props.options;
4
4
  let options;
5
5
  if (typeof prop === "string") {
@@ -9,5 +9,5 @@ export const buildComboBox = ({ name, label, readOnly, required, props, contextN
9
9
  else {
10
10
  options = prop;
11
11
  }
12
- return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" }, h("ez-combo-box", { enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, "data-context-name": contextName, key: name, options: options })));
12
+ return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" }, h("ez-combo-box", { enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, "data-context-name": contextName, key: name, options: options, canShowError: canShowError })));
13
13
  };
@@ -1,10 +1,10 @@
1
1
  import { h } from "@stencil/core";
2
- export const buildDate = ({ name, label, readOnly }) => {
3
- return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" }, h("ez-date-input", { enabled: !readOnly, label: label, "data-field-name": name, key: name })));
2
+ export const buildDate = ({ name, label, readOnly, canShowError }) => {
3
+ return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" }, h("ez-date-input", { enabled: !readOnly, label: label, "data-field-name": name, key: name, canShowError: canShowError })));
4
4
  };
5
- export const buildTime = ({ name, label, readOnly }) => {
6
- return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" }, h("ez-time-input", { enabled: !readOnly, label: label, "data-field-name": name, key: name })));
5
+ export const buildTime = ({ name, label, readOnly, canShowError }) => {
6
+ return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" }, h("ez-time-input", { enabled: !readOnly, label: label, "data-field-name": name, key: name, canShowError: canShowError })));
7
7
  };
8
- export const buildDateTime = ({ name, label, readOnly, contextName }) => {
9
- return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" }, h("ez-date-time-input", { enabled: !readOnly, label: label, "data-field-name": name, "data-context-name": contextName, key: name })));
8
+ export const buildDateTime = ({ name, label, readOnly, contextName, canShowError }) => {
9
+ return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" }, h("ez-date-time-input", { enabled: !readOnly, label: label, "data-field-name": name, "data-context-name": contextName, key: name, canShowError: canShowError })));
10
10
  };
@@ -1,12 +1,12 @@
1
1
  import { h } from "@stencil/core";
2
- export const buildDecimal = ({ name, label, readOnly, props, contextName }) => {
2
+ export const buildDecimal = ({ name, label, readOnly, props, contextName, canShowError }) => {
3
3
  const precision = Number((props === null || props === void 0 ? void 0 : props.precision) || 2);
4
4
  const prettyPrecision = Number((props === null || props === void 0 ? void 0 : props.prettyPrecision) || precision);
5
- return buildNumeric(name, label, readOnly, precision, prettyPrecision, contextName);
5
+ return buildNumeric(name, label, readOnly, precision, prettyPrecision, contextName, canShowError);
6
6
  };
7
- export const buildInteger = ({ name, label, readOnly, contextName }) => {
8
- return buildNumeric(name, label, readOnly, 0, 0, contextName);
7
+ export const buildInteger = ({ name, label, readOnly, contextName, canShowError }) => {
8
+ return buildNumeric(name, label, readOnly, 0, 0, contextName, canShowError);
9
9
  };
10
- function buildNumeric(fieldName, fieldLabel, readOnly, precision, prettyPrecision, contextName) {
11
- return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" }, h("ez-number-input", { enabled: !readOnly, label: fieldLabel, precision: precision, prettyPrecision: prettyPrecision, "data-field-name": fieldName, "data-context-name": contextName, key: fieldName })));
10
+ function buildNumeric(fieldName, fieldLabel, readOnly, precision, prettyPrecision, contextName, canShowError) {
11
+ return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" }, h("ez-number-input", { enabled: !readOnly, label: fieldLabel, precision: precision, prettyPrecision: prettyPrecision, "data-field-name": fieldName, "data-context-name": contextName, key: fieldName, canShowError: canShowError })));
12
12
  }
@@ -1,4 +1,4 @@
1
1
  import { h } from "@stencil/core";
2
- export const buildSearch = ({ name, label, readOnly, required, contextName }) => {
3
- return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" }, h("ez-search", { enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, "data-context-name": contextName, key: name })));
2
+ export const buildSearch = ({ name, label, readOnly, required, contextName, canShowError, optionLoader }) => {
3
+ return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" }, h("ez-search", { enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, "data-context-name": contextName, key: name, canShowError: canShowError, optionLoader: optionLoader })));
4
4
  };
@@ -1,4 +1,4 @@
1
1
  import { h } from "@stencil/core";
2
- export const buildTextArea = ({ name, label, readOnly, contextName }) => {
3
- return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small", key: name }, h("ez-text-area", { enabled: !readOnly, label: label, "data-field-name": name, "data-context-name": contextName })));
2
+ export const buildTextArea = ({ name, label, readOnly, contextName, rows, canShowError }) => {
3
+ return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small", key: name }, h("ez-text-area", { enabled: !readOnly, label: label, "data-field-name": name, "data-context-name": contextName, rows: rows, canShowError: canShowError })));
4
4
  };
@@ -1,4 +1,4 @@
1
1
  import { h } from "@stencil/core";
2
- export const buildTextInput = ({ name, label, readOnly, contextName }) => {
3
- return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" }, h("ez-text-input", { label: label, "data-field-name": name, "data-context-name": contextName, key: name, enabled: !readOnly })));
2
+ export const buildTextInput = ({ name, label, readOnly, contextName, canShowError }) => {
3
+ return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" }, h("ez-text-input", { label: label, "data-field-name": name, "data-context-name": contextName, key: name, enabled: !readOnly, canShowError: canShowError })));
4
4
  };
@@ -277,6 +277,9 @@ p {
277
277
  -moz-user-select: -moz-none;
278
278
  -ms-user-select: none;
279
279
  user-select: none;
280
+ white-space: nowrap;
281
+ overflow: hidden;
282
+ text-overflow: ellipsis;
280
283
 
281
284
  /*public*/
282
285
  color: var(--title--primary);
@@ -519,7 +519,7 @@ export class EzList {
519
519
  render() {
520
520
  return (h(Host, { ref: (el) => this._element = el }, this.useGroups ?
521
521
  h("div", { class: "group-container", ref: (el) => this._groupContainer = el, tabIndex: 0, onKeyDown: (event) => { this.keyDownHandler(event); } }, this._listGroupItems.map(group => {
522
- return h("div", { id: this.getDivGroupId(group.group), class: "group", key: group.group + group.items.length, onDrop: () => this.onDropGroup(group) }, h("label", { draggable: false, class: "group-name" }, group.group), h("section", { class: "section-container", onDragOver: (ev) => ev.preventDefault() }, h("div", { class: "group-items-container" }, h("div", { class: "draggable-list" }, group.items.map((item, index) => (h("li", Object.assign({ id: "item_" + this.getItemId(item.label), class: {
522
+ return h("div", { id: this.getDivGroupId(group.group), class: "group", key: group.group + group.items.length, onDrop: () => this.onDropGroup(group) }, h("label", { draggable: false, class: "group-name", title: group.group }, group.group), h("section", { class: "section-container", onDragOver: (ev) => ev.preventDefault() }, h("div", { class: "group-items-container" }, h("div", { class: "draggable-list" }, group.items.map((item, index) => (h("li", Object.assign({ id: "item_" + this.getItemId(item.label), class: {
523
523
  "selectable-container": this.ezSelectable,
524
524
  "hover-feedback": this.hoverFeedback
525
525
  }, key: "item_" + this.getItemId(item.label) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(`ezListItem__${StringUtils.replaceAccentuatedChars(item.label)}`) }), h("div", { class: "draggable" + (item.selected == true ? " selected-item " : "") + (this.ezSelectable == true ? " selectable " : ""), onClick: () => { this.setSelection(item); }, onDragLeave: () => { group.sort ? undefined : this.removeOverClass(); }, onDragEnd: () => this.onDragEnd(), onDragStart: () => this.onDragStart(item, group, index), onDragOver: (event) => { group.sort ? undefined : this.onDragOverItem(event); }, onDrop: (event) => this.onDrop(event, { groupName: group.group, item: item, index: index }), draggable: this.ezDraggable }, h("div", { class: "item-content" }, this.ezDraggable ? h("span", { class: "draggable-icon" }) : undefined, this.listMode === "regular" ?
@@ -3,6 +3,8 @@
3
3
  --ez-modal-z-index: var(--most-visible, 3);
4
4
  /*@doc Define o espaçamento vertical do conteúdo do modal.*/
5
5
  --ez-modal-vertical-padding: var(--space--large, 24px);
6
+ /*@doc Define o padding entre o conteúdo e o modal */
7
+ --ez-modal-content-padding: 24px;
6
8
  display: block;
7
9
  }
8
10
 
@@ -15,8 +17,15 @@
15
17
  width: 100%;
16
18
  box-sizing: border-box;
17
19
  height: 100vh;
20
+ }
21
+
22
+ .modal__screen-light{
23
+ background: rgba(0, 4, 12, 0.1);
24
+ }
25
+
26
+ .modal__screen-medium{
18
27
  backdrop-filter: blur(4px);
19
- background: rgba(0, 4, 12, 0.4);
28
+ background: rgba(0, 4, 12, 0.4)
20
29
  }
21
30
 
22
31
  .modal__vertical-padding{
@@ -62,7 +71,7 @@
62
71
  height: 100%;
63
72
  overflow-y: auto;
64
73
  background-color: rgb(255, 255, 255);
65
- padding: 24px;
74
+ padding: var(--ez-modal-content-padding);
66
75
  box-shadow: rgb(0 38 111 / 12%) 0px 0px 16px 0px;
67
76
  }
68
77
 
@@ -13,6 +13,7 @@ export class EzModal {
13
13
  this.opened = true;
14
14
  this.closeEsc = false;
15
15
  this.closeOutsideClick = false;
16
+ this.scrim = "medium";
16
17
  }
17
18
  observeOpened() {
18
19
  if (this.opened) {
@@ -45,9 +46,10 @@ export class EzModal {
45
46
  const positionSufix = this.align === "left" ? "left" : "right";
46
47
  const regularVerticalPaddingClass = this.heightMode === "regular" ? 'modal__vertical-padding' : '';
47
48
  const modalContentHeightMode = this.heightMode === "regular" ? `modal__content--${positionSufix}` : '';
49
+ const scrimType = `modal__screen-${this.scrim}`;
48
50
  return (h(Host, null, this.opened
49
51
  ?
50
- h("div", { ref: ref => this._modalRef = ref, class: `modal ${regularVerticalPaddingClass}`, onMouseDown: evt => this.onMouseDownHandler(evt) }, h("div", { class: `modal__container modal__container--${positionSufix}`, ref: ref => this._overlay = ref }, h("div", { class: `modal__content ${modalContentHeightMode} ${this.modalSize}` }, h("slot", null))))
52
+ h("div", { ref: ref => this._modalRef = ref, class: `modal ${scrimType} ${regularVerticalPaddingClass}`, onMouseDown: evt => this.onMouseDownHandler(evt) }, h("div", { class: `modal__container modal__container--${positionSufix}`, ref: ref => this._overlay = ref }, h("div", { class: `modal__content ${modalContentHeightMode} ${this.modalSize}` }, h("slot", null))))
51
53
  :
52
54
  undefined));
53
55
  }
@@ -174,6 +176,24 @@ export class EzModal {
174
176
  "attribute": "close-outside-click",
175
177
  "reflect": false,
176
178
  "defaultValue": "false"
179
+ },
180
+ "scrim": {
181
+ "type": "string",
182
+ "mutable": false,
183
+ "complexType": {
184
+ "original": "\"medium\" | \"light\"",
185
+ "resolved": "\"light\" | \"medium\"",
186
+ "references": {}
187
+ },
188
+ "required": false,
189
+ "optional": false,
190
+ "docs": {
191
+ "tags": [],
192
+ "text": "Define o tipo de scrim a ser aplicado no overlay do modal"
193
+ },
194
+ "attribute": "scrim",
195
+ "reflect": false,
196
+ "defaultValue": "\"medium\""
177
197
  }
178
198
  };
179
199
  }
@@ -7,6 +7,7 @@ export class EzNumberInput {
7
7
  this.label = undefined;
8
8
  this.value = undefined;
9
9
  this.enabled = true;
10
+ this.canShowError = true;
10
11
  this.errorMessage = undefined;
11
12
  this.precision = undefined;
12
13
  this.prettyPrecision = undefined;
@@ -128,7 +129,7 @@ export class EzNumberInput {
128
129
  }
129
130
  render() {
130
131
  ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
131
- return (h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), ref: elem => this._textInput = elem, "data-slave-mode": "true", label: this.label, onBlur: () => this.handleBlur(), onInput: () => this.handleInput(), restrict: this.precision > 0 ? "0123456789-,." : "0123456789-", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode }));
132
+ return (h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), ref: elem => this._textInput = elem, "data-slave-mode": "true", label: this.label, onBlur: () => this.handleBlur(), onInput: () => this.handleInput(), restrict: this.precision > 0 ? "0123456789-,." : "0123456789-", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, canShowError: this.canShowError }));
132
133
  }
133
134
  static get is() { return "ez-number-input"; }
134
135
  static get encapsulation() { return "shadow"; }
@@ -196,6 +197,24 @@ export class EzNumberInput {
196
197
  "reflect": false,
197
198
  "defaultValue": "true"
198
199
  },
200
+ "canShowError": {
201
+ "type": "boolean",
202
+ "mutable": false,
203
+ "complexType": {
204
+ "original": "boolean",
205
+ "resolved": "boolean",
206
+ "references": {}
207
+ },
208
+ "required": false,
209
+ "optional": false,
210
+ "docs": {
211
+ "tags": [],
212
+ "text": "Se false deixa de exibir a mensagem de erro dentro do campo."
213
+ },
214
+ "attribute": "can-show-error",
215
+ "reflect": true,
216
+ "defaultValue": "true"
217
+ },
199
218
  "errorMessage": {
200
219
  "type": "string",
201
220
  "mutable": true,
@@ -12,6 +12,7 @@ export class EzSearch {
12
12
  this.showOptionValue = true;
13
13
  this.suppressEmptyOption = false;
14
14
  this.mode = "regular";
15
+ this.canShowError = true;
15
16
  }
16
17
  observeErrorMessage() {
17
18
  if (this._comboElement) {
@@ -54,7 +55,7 @@ export class EzSearch {
54
55
  }
55
56
  render() {
56
57
  ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
57
- return (h("ez-combo-box", { "data-element-id": ElementIDUtils.getInternalIDInfo("combo"), ref: elem => this._comboElement = elem, value: this.value, label: this.label, enabled: this.enabled, errorMessage: this.errorMessage, optionLoader: this.optionLoader, searchMode: true, onEzChange: event => this.onComboChange(event), showSelectedValue: this.showSelectedValue, showOptionValue: this.showOptionValue, suppressEmptyOption: this.suppressEmptyOption, mode: this.mode }));
58
+ return (h("ez-combo-box", { "data-element-id": ElementIDUtils.getInternalIDInfo("combo"), ref: elem => this._comboElement = elem, value: this.value, label: this.label, enabled: this.enabled, errorMessage: this.errorMessage, optionLoader: this.optionLoader, searchMode: true, onEzChange: event => this.onComboChange(event), showSelectedValue: this.showSelectedValue, showOptionValue: this.showOptionValue, suppressEmptyOption: this.suppressEmptyOption, mode: this.mode, canShowError: this.canShowError }));
58
59
  }
59
60
  ;
60
61
  static get is() { return "ez-search"; }
@@ -246,6 +247,24 @@ export class EzSearch {
246
247
  "attribute": "mode",
247
248
  "reflect": true,
248
249
  "defaultValue": "\"regular\""
250
+ },
251
+ "canShowError": {
252
+ "type": "boolean",
253
+ "mutable": false,
254
+ "complexType": {
255
+ "original": "boolean",
256
+ "resolved": "boolean",
257
+ "references": {}
258
+ },
259
+ "required": false,
260
+ "optional": false,
261
+ "docs": {
262
+ "tags": [],
263
+ "text": "Se false deixa de exibir a mensagem de erro dentro do campo."
264
+ },
265
+ "attribute": "can-show-error",
266
+ "reflect": true,
267
+ "defaultValue": "true"
249
268
  }
250
269
  };
251
270
  }
@@ -9,6 +9,7 @@ export class EzTimeInput {
9
9
  this.errorMessage = undefined;
10
10
  this.showSeconds = false;
11
11
  this.mode = "regular";
12
+ this.canShowError = true;
12
13
  }
13
14
  observeErrorMessage() {
14
15
  var _a;
@@ -137,7 +138,7 @@ export class EzTimeInput {
137
138
  }
138
139
  render() {
139
140
  ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
140
- return (h(Host, null, h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), ref: (el) => this._textInput = el, "data-slave-mode": "true", value: this._viewValue, enabled: this.enabled, label: this.label, restrict: "0123456789:", onBlur: () => this.handleBlur(), onInput: () => this.handleInput(), errorMessage: this.errorMessage, mode: this.mode }, h("ez-icon", { slot: "leftIcon", iconName: "timer-outline" }))));
141
+ return (h(Host, null, h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), ref: (el) => this._textInput = el, "data-slave-mode": "true", value: this._viewValue, enabled: this.enabled, label: this.label, restrict: "0123456789:", onBlur: () => this.handleBlur(), onInput: () => this.handleInput(), errorMessage: this.errorMessage, mode: this.mode, canShowError: this.canShowError }, h("ez-icon", { slot: "leftIcon", iconName: "timer-outline" }))));
141
142
  }
142
143
  static get is() { return "ez-time-input"; }
143
144
  static get encapsulation() { return "shadow"; }
@@ -258,6 +259,24 @@ export class EzTimeInput {
258
259
  "attribute": "mode",
259
260
  "reflect": true,
260
261
  "defaultValue": "\"regular\""
262
+ },
263
+ "canShowError": {
264
+ "type": "boolean",
265
+ "mutable": false,
266
+ "complexType": {
267
+ "original": "boolean",
268
+ "resolved": "boolean",
269
+ "references": {}
270
+ },
271
+ "required": false,
272
+ "optional": false,
273
+ "docs": {
274
+ "tags": [],
275
+ "text": "Se false deixa de exibir a mensagem de erro dentro do campo."
276
+ },
277
+ "attribute": "can-show-error",
278
+ "reflect": true,
279
+ "defaultValue": "true"
261
280
  }
262
281
  };
263
282
  }
@@ -66,6 +66,7 @@ export default class ApplicationUtils {
66
66
  modal.heightMode = modalProps.heightMode;
67
67
  modal.closeEsc = modalProps.closeEsc;
68
68
  modal.closeOutsideClick = modalProps.closeOutsideClick;
69
+ modal.scrim = modalProps.useScrimLight ? 'light' : 'medium';
69
70
  if (modalProps.content instanceof String || typeof modalProps.content === 'string') {
70
71
  modal.innerHTML = modalProps.content;
71
72
  }