@sankhyalabs/ezui 1.1.109 → 1.1.112

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/cjs/ApplicationUtils-c8f07135.js +39 -0
  2. package/dist/cjs/CSSVarsUtils-8fbdf2e0.js +19 -0
  3. package/dist/cjs/ez-button.cjs.entry.js +79 -0
  4. package/dist/cjs/ez-calendar.cjs.entry.js +223 -0
  5. package/dist/cjs/ez-check.cjs.entry.js +76 -0
  6. package/dist/cjs/ez-collapsible-box.cjs.entry.js +47 -0
  7. package/dist/cjs/ez-combo-box.cjs.entry.js +278 -0
  8. package/dist/cjs/ez-date-input.cjs.entry.js +102 -0
  9. package/dist/cjs/ez-date-time-input.cjs.entry.js +145 -0
  10. package/dist/cjs/ez-form.cjs.entry.js +785 -0
  11. package/dist/cjs/ez-icon.cjs.entry.js +41 -0
  12. package/dist/cjs/{ez-button_3.cjs.entry.js → ez-list.cjs.entry.js} +0 -89
  13. package/dist/cjs/ez-modal.cjs.entry.js +65 -0
  14. package/dist/cjs/ez-number-input.cjs.entry.js +86 -0
  15. package/dist/cjs/ez-search.cjs.entry.js +64 -0
  16. package/dist/cjs/ez-tabselector.cjs.entry.js +198 -0
  17. package/dist/cjs/ez-text-area.cjs.entry.js +114 -0
  18. package/dist/cjs/ez-text-input.cjs.entry.js +201 -0
  19. package/dist/cjs/ez-time-input.cjs.entry.js +118 -0
  20. package/dist/cjs/ez-upload.cjs.entry.js +356 -0
  21. package/dist/cjs/ezui.cjs.js +1 -1
  22. package/dist/cjs/{ez-modal_2.cjs.entry.js → grid-config.cjs.entry.js} +0 -59
  23. package/dist/cjs/loader.cjs.js +1 -1
  24. package/dist/cjs/select-box.cjs.entry.js +22 -0
  25. package/dist/cjs/test-du.cjs.entry.js +76 -0
  26. package/dist/collection/collection-manifest.json +132 -1
  27. package/dist/esm/ApplicationUtils-36e38de9.js +37 -0
  28. package/dist/esm/CSSVarsUtils-667e0016.js +17 -0
  29. package/dist/esm/ez-button.entry.js +75 -0
  30. package/dist/esm/ez-calendar.entry.js +219 -0
  31. package/dist/esm/ez-check.entry.js +72 -0
  32. package/dist/esm/ez-collapsible-box.entry.js +43 -0
  33. package/dist/esm/ez-combo-box.entry.js +274 -0
  34. package/dist/esm/ez-date-input.entry.js +98 -0
  35. package/dist/esm/ez-date-time-input.entry.js +141 -0
  36. package/dist/esm/ez-form.entry.js +781 -0
  37. package/dist/esm/ez-icon.entry.js +37 -0
  38. package/dist/esm/{ez-button_3.entry.js → ez-list.entry.js} +2 -89
  39. package/dist/esm/ez-modal.entry.js +61 -0
  40. package/dist/esm/ez-number-input.entry.js +82 -0
  41. package/dist/esm/ez-search.entry.js +60 -0
  42. package/dist/esm/ez-tabselector.entry.js +194 -0
  43. package/dist/esm/ez-text-area.entry.js +110 -0
  44. package/dist/esm/ez-text-input.entry.js +197 -0
  45. package/dist/esm/ez-time-input.entry.js +114 -0
  46. package/dist/esm/ez-upload.entry.js +352 -0
  47. package/dist/esm/ezui.js +1 -1
  48. package/dist/esm/{ez-modal_2.entry.js → grid-config.entry.js} +1 -59
  49. package/dist/esm/loader.js +1 -1
  50. package/dist/esm/select-box.entry.js +18 -0
  51. package/dist/esm/test-du.entry.js +72 -0
  52. package/dist/ezui/ezui.esm.js +1 -1
  53. package/dist/ezui/p-25e87823.entry.js +1 -0
  54. package/dist/ezui/p-31b0e21a.entry.js +1 -0
  55. package/dist/ezui/p-363fc3af.entry.js +1 -0
  56. package/dist/ezui/p-3662c09e.entry.js +1 -0
  57. package/dist/ezui/p-3a8bf0a8.entry.js +1 -0
  58. package/dist/ezui/p-3c954800.entry.js +1 -0
  59. package/dist/ezui/p-44d4f8d6.entry.js +1 -0
  60. package/dist/ezui/p-59a8448a.entry.js +1 -0
  61. package/dist/ezui/p-62daf508.js +1 -0
  62. package/dist/ezui/p-65893e25.entry.js +1 -0
  63. package/dist/ezui/p-73d3f767.entry.js +1 -0
  64. package/dist/ezui/p-73d45b12.entry.js +1 -0
  65. package/dist/ezui/p-804c118a.entry.js +1 -0
  66. package/dist/ezui/p-97f77023.entry.js +1 -0
  67. package/dist/ezui/p-9aecc079.entry.js +1 -0
  68. package/dist/ezui/p-a5f1f9c4.entry.js +1 -0
  69. package/dist/ezui/p-bc2834fa.entry.js +1 -0
  70. package/dist/ezui/p-c27495d9.entry.js +1 -0
  71. package/dist/ezui/p-c6f2aa6c.entry.js +1 -0
  72. package/dist/ezui/p-d54c157f.js +1 -0
  73. package/dist/ezui/p-f26f6d67.entry.js +1 -0
  74. package/dist/ezui/p-f3f9c7e6.entry.js +1 -0
  75. package/dist/ezui/p-f78c7ec9.entry.js +1 -0
  76. package/package.json +3 -37
  77. package/dist/cjs/ez-calendar_16.cjs.entry.js +0 -2855
  78. package/dist/esm/ez-calendar_16.entry.js +0 -2836
  79. package/dist/ezui/p-6b257393.entry.js +0 -1
  80. package/dist/ezui/p-ae7c92b7.entry.js +0 -1
  81. package/dist/ezui/p-eaeaea64.entry.js +0 -1
@@ -0,0 +1,39 @@
1
+ 'use strict';
2
+
3
+ class ApplicationUtils {
4
+ static async showDialog(title, message, icon = null, confirm, critical = false) {
5
+ return new Promise(resolve => {
6
+ let dialog = document.querySelector("ez-dialog");
7
+ if (!dialog) {
8
+ dialog = document.createElement("ez-dialog");
9
+ window.document.body.appendChild(dialog);
10
+ }
11
+ dialog.show(title, message, critical, confirm, icon).then(ok => resolve(ok));
12
+ });
13
+ }
14
+ static async alert(title, message, icon = null) {
15
+ return ApplicationUtils.showDialog(title, message, icon, false, false);
16
+ }
17
+ static async error(title, message, icon = null) {
18
+ return ApplicationUtils.showDialog(title, message, icon, false, true);
19
+ }
20
+ static async confirm(title, message, icon = null, critical = false) {
21
+ return ApplicationUtils.showDialog(title, message, icon, true, critical);
22
+ }
23
+ static async info(message, options = ApplicationUtils.defaultMessageOptions) {
24
+ let toast = document.querySelector("ez-toast");
25
+ if (!toast) {
26
+ toast = document.createElement("ez-toast");
27
+ window.document.body.appendChild(toast);
28
+ }
29
+ toast.canClose = options.canClose;
30
+ toast.message = message;
31
+ toast.fadeTime = 4000;
32
+ toast.show();
33
+ }
34
+ }
35
+ ApplicationUtils.defaultMessageOptions = {
36
+ canClose: true
37
+ };
38
+
39
+ exports.ApplicationUtils = ApplicationUtils;
@@ -0,0 +1,19 @@
1
+ 'use strict';
2
+
3
+ class CSSVarsUtils {
4
+ static applyVarsTextInput(host, child) {
5
+ if (child) {
6
+ CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--background-color');
7
+ CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--border-color');
8
+ CSSVarsUtils.applyIfExists(host, child, '--ez-text-input--height');
9
+ }
10
+ }
11
+ static applyIfExists(host, element, varName) {
12
+ const prop = getComputedStyle(host).getPropertyValue(varName);
13
+ if (prop) {
14
+ element.style.setProperty(varName, prop);
15
+ }
16
+ }
17
+ }
18
+
19
+ exports.CSSVarsUtils = CSSVarsUtils;
@@ -0,0 +1,79 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-88286449.js');
6
+
7
+ const ezButtonCss = ":host{--ez-button--min-width:100px;--ez-button--height:42px;--ez-button__icon--width:18px;--ez-button__inline__icon--padding:12px;--ez-button--padding-top:var(--space--medium, 12px);--ez-button--padding-bottom:var(--space--medium, 12px);--ez-button--padding-right:var(--space--large, 24px);--ez-button--padding-left:var(--space--large, 24px);--ez-button--color:var(--text--primary, #FFF);--ez-button--font-size:var(--text--medium, 14px);--ez-button--font-family:var(--font-pattern, Arial);--ez-button--font-weight:var(--text-weight--large);--ez-button--background-color:var(--background--medium, #c0c0c0);--ez-button--border-radius:var(--border--radius-large, 12px);--ez-button--border:none;--ez-button--hover--background-color:var(--background--strong, var(--ez-button--background-color));--ez-button--disabled-color:var(--text--disable);--ez-button--disabled--background-color:var(--color--disable-secondary);--ez-button--focus--border:var(--ez-button--border);--ez-button--focus--box-shadow:none;--ez-button--link-color:var(--color--primary, '#008561');--ez-button--link--hover-color:var(--color--primary-700, '#1C1D22');--ez-button--link--small--font-size:var(--text--small, 12px);--ez-button--link--medium--font-size:var(--text--medium, 14px);--ez-button--link--large--font-size:var(--text--large, 16px)}ez-icon{--ez-icon--color:inherit}button{display:flex;align-items:center;justify-content:center;margin:0;cursor:pointer;transition:background-color 0.2s linear;min-width:var(--ez-button--min-width);height:var(--ez-button--height);font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);padding:var(--ez-button--padding-top) var(--ez-button--padding-right) var(--ez-button--padding-bottom) var(--ez-button--padding-left);border-radius:var(--ez-button--border-radius);background-color:var(--ez-button--background-color);color:var(--ez-button--color);fill:var(--ez-button--color);border:var(--ez-button--border)}button:hover{background-color:var(--ez-button--hover--background-color)}button:focus{outline:none;border:var(--ez-button--focus--border);box-shadow:var(--ez-button--focus--box-shadow)}button:disabled{background-color:var(--ez-button--disabled--background-color);color:var(--ez-button--disabled-color);fill:var(--ez-button--disabled-color);border:none;cursor:no-drop}button.icon{padding:0px}button.small{width:32px;min-width:32px;height:32px}button.medium{width:42px;min-width:42px;height:42px}button.large{width:52px;min-width:52px;height:52px}.label-icon{display:flex;flex-direction:column;align-items:center;color:var(--ez-button--color)}.label-icon label{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight)}a{font-family:var(--ez-button--font-family);font-weight:var(--ez-button--font-weight);color:var(--ez-button--link-color);cursor:pointer;display:flex;align-items:center;justify-content:center;}a:hover{color:var(--ez-button--link--hover-color)}a.small{font-size:var(--ez-button--link--small--font-size);line-height:var(--ez-button--link--small--font-size)}a.medium{font-size:var(--ez-button--link--medium--font-size);line-height:var(--ez-button--link--medium--font-size)}a.large{font-size:var(--ez-button--link--large--font-size);line-height:var(--ez-button--link--large--font-size)}";
8
+
9
+ let EzButton = class {
10
+ constructor(hostRef) {
11
+ index.registerInstance(this, hostRef);
12
+ /**
13
+ * Deixa o botão disponível ou não para interação com o usuário.
14
+ */
15
+ this.enabled = true;
16
+ /**
17
+ * Define o modo de uso do botão; opções: icon, link e regular
18
+ */
19
+ this.mode = "regular";
20
+ /**
21
+ * É possível escolher entre [small,medium,large] (somente para os modos "icon" e "link")
22
+ */
23
+ this.size = "medium";
24
+ }
25
+ /**
26
+ * Realiza o foco no botão
27
+ */
28
+ async setFocus() {
29
+ this._button.focus();
30
+ }
31
+ /**
32
+ * Remove o foco no botão
33
+ */
34
+ async setBlur() {
35
+ this._button.blur();
36
+ }
37
+ getIconSize() {
38
+ return this.size;
39
+ }
40
+ handleSlotChange(ev) {
41
+ const slot = ev.target;
42
+ const content = slot.assignedElements()[0];
43
+ if (this.mode == "link") {
44
+ content.style.display = "inline";
45
+ if (slot.name == "leftIcon") {
46
+ content.style.paddingRight = "var(--ez-button__inline__icon--padding)";
47
+ }
48
+ else if (slot.name == "rightIcon") {
49
+ content.style.paddingLeft = "var(--ez-button__inline__icon--padding)";
50
+ }
51
+ }
52
+ else {
53
+ content.style.setProperty('--ez-icon--color', 'var(--ez-icon--color)');
54
+ }
55
+ }
56
+ render() {
57
+ if (this.mode == "icon") {
58
+ return (index.h("button", { class: "icon " + this.size, type: "button", disabled: !this.enabled, ref: (el) => this._button = el }, index.h("ez-icon", { class: "icon", href: this.image, iconName: this.iconName, size: this.getIconSize(), onClick: evt => {
59
+ if (!this.enabled)
60
+ evt.stopPropagation();
61
+ } })));
62
+ }
63
+ else if (this.mode == "label-icon") {
64
+ return (index.h("div", { class: "label-icon" }, index.h("button", { class: "icon", type: "button", disabled: !this.enabled, ref: (el) => this._button = el }, index.h("ez-icon", { class: "icon", href: this.image, iconName: this.iconName, size: "large", onClick: evt => {
65
+ if (!this.enabled)
66
+ evt.stopPropagation();
67
+ } })), index.h("label", { title: this.label }, this.label)));
68
+ }
69
+ else if (this.mode == "link") {
70
+ return (index.h("a", { class: this.size, ref: (el) => this._button = el }, index.h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.label, index.h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } })));
71
+ }
72
+ else {
73
+ return (index.h("button", { type: "button", disabled: !this.enabled, ref: (el) => this._button = el }, index.h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.label, index.h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } })));
74
+ }
75
+ }
76
+ };
77
+ EzButton.style = ezButtonCss;
78
+
79
+ exports.ez_button = EzButton;
@@ -0,0 +1,223 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-88286449.js');
6
+ const core = require('@sankhyalabs/core');
7
+
8
+ const ezCalendarCss = ":host{--ez-calendar--font-family:var(--font-pattern, Arial);--ez-calendar--color:var(--title--primary, #626e82);--ez-calendar--text-shadow:var(--text-shadow, 0 0 0 #353535, 0 0 1px transparent);--ez-calendar__body--background-color:var(--background--xlight, #FFF);--ez-calendar__time--background-color:var(--background--xlight, #FAFAFA);--ez-calendar__body--padding:var(--space--medium, 12px) var(--space--small, 6px);--ez-calendar__body--border-radius:var(--border--radius-medium, 12px);--ez-calendar__body--shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-container--z-index:var(--more-visible, 2);--ez-calendar__header-line--stroke:1px;--ez-calendar__header-line--color:var(--color--strokes, #C0C0C0);--ez-calendar__nav-btn--fill:var(--text--primary, #008561);--ez-calendar__nav-btn--hover--fill:var(--color--primary, #350404);--ez-calendar__nav-btn--width:10px;--ez-calendar__nav-btn--height:16px;--ez-calendar__nav-btn--previous-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 9.7808475,13.860393 3.9204526,8.0000004 9.7808475,2.0624965 7.9301965,0.28895552 0.21915255,8.0000004 7.9301965,15.711044 Z\"/></svg>');--ez-calendar__nav-btn--next-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 0.21915251,13.860393 6.0795475,8.0000007 0.21915251,2.0624968 2.0698036,0.28895588 9.7808475,8.0000007 2.0698036,15.711044 Z\"/></svg>');--ez-calendar__cell--margin:0px 1.5px;--ez-calendar__cell--width:var(--space--large, 24px);--ez-calendar__cell--padding:1.5px 0px;--ez-calendar__cell--border-radius:var(--border--radius-small, 6px);--ez-calendar__cell--over--background-color:var(--color--primary, #E2F4EF);--ez-calendar__cell--over--color:var(--color--primary-300, #008561);--ez-calendar__cell--outset--color:var(--color--disable-primary, #E5EAF0);--ez-calendar__cell--selected--background-color:var(--color--primary, #008561);--ez-calendar__cell--selected--color:var(--color--inverted, #FFF);--ez-calendar__btn-today--color:var(--color--primary);--ez-calendar__btn-today--hover--background-color:var(--color--primary-300, #E2F4EF);--ez-calendar__btn-today--border-radius:var(--border--radius-small, 6px);position:relative;display:flex;user-select:none}.calendar__container{display:flex;z-index:var(--more-visible, 2)}.calendar{z-index:var(--more-visible, 2);display:flex;flex-direction:column;background-color:var(--ez-calendar__body--background-color);padding:var(--ez-calendar__body--padding);border-radius:var(--ez-calendar__body--border-radius);box-shadow:var(--ez-calendar__body--shadow)}.calendar__header{display:flex;justify-content:space-between;padding-bottom:var(--space--small, 6px);margin:0px var(--space--, 12px) var(--space--small, 6px) var(--space--, 12px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);border-bottom:solid var(--ez-calendar__header-line--stroke) var(--ez-calendar__header-line--color)}.calendar__btn-next,.calendar__btn-previous{outline:none;border:none;background-color:unset;cursor:pointer;padding:0px}.calendar__btn-next::after,.calendar__btn-previous::after{content:'';display:flex;background-color:var(--ez-calendar__nav-btn--fill);width:var(--ez-calendar__nav-btn--width);height:var(--ez-calendar__nav-btn--height)}.calendar__btn-previous::after{-webkit-mask-image:var(--ez-calendar__nav-btn--previous-image);mask-image:var(--ez-calendar__nav-btn--previous-image)}.calendar__btn-next::after{-webkit-mask-image:var(--ez-calendar__nav-btn--next-image);mask-image:var(--ez-calendar__nav-btn--next-image)}.calendar__btn-next:hover::after,.calendar__btn-previous:hover::after{background-color:var(--ez-calendar__nav-btn--hover--fill)}.calendar__lbl-month{font-weight:var(--text-weight--extra-large, 700);font-size:var(--title--small, 14px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.calendar__line{display:flex;padding:0px;margin:0px}.calendar__cell{display:flex;justify-content:center;align-content:center;cursor:pointer;font-size:var(--text--extra-small, 10px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);padding:var(--ez-calendar__cell--padding);margin:var(--ez-calendar__cell--margin);min-width:var(--ez-calendar__cell--width);border-radius:var(--ez-calendar__cell--border-radius)}.calendar__cell:hover{background-color:var(--ez-calendar__cell--over--background-color);color:var(--ez-calendar__cell--over--color)}.calendar__cell--secondary{color:var(--ez-calendar__cell--outset--color)}.calendar__cell--unselectable:hover{background-color:unset;border-radius:unset;cursor:unset}.calendar__cell--unselectable{font-weight:var(--text-weight--large, 600);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.calendar__cell--selected,.calendar__cell--selected:hover{background-color:var(--ez-calendar__cell--selected--background-color);color:var(--ez-calendar__cell--selected--color)}.calendar__footer{display:flex;flex-direction:column}.calendar__btn-today{border:none;background-color:unset;cursor:pointer;font-weight:var(--text-weight--large, 600);font-size:var(--title--extra-small, 12px);padding:0px;font-family:var(--ez-calendar--font-family);text-shadow:var(--ez-calendar--text-shadow);color:var(--ez-calendar__btn-today--color);border-radius:var(--ez-calendar__btn-today--border-radius)}.calendar__btn-today:hover{background-color:var(--ez-calendar__btn-today--hover--background-color)}section{display:flex}.calendar-time{margin-left:-10px;display:flex;flex-direction:column;padding:12px 0px 0px 10px;background-color:var(--ez-calendar__time--background-color);border-top-right-radius:var(--ez-calendar__body--border-radius);border-bottom-right-radius:var(--ez-calendar__body--border-radius);box-shadow:var(--ez-calendar__body--shadow)}.calendar__column{height:136px;padding:0px;margin:0px;overflow:auto}.calendar__column::-webkit-scrollbar{width:0px;max-width:0px;min-width:0px}.calendar-time__header{padding-left:var(--space--small, 6px);padding-right:var(--space--small, 6px);display:flex;justify-content:space-between;padding-bottom:var(--space--small, 6px);margin:0px var(--space--, 12px) var(--space--small, 6px) var(--space--, 12px);font-weight:var(--text-weight--extra-large, 700);font-size:var(--title--small, 14px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);border-bottom:solid var(--ez-calendar__header-line--stroke) var(--ez-calendar__header-line--color);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.separatorTime{color:#A2ABB9;padding:0px 1px;line-height:16px;font-size:17px;font-weight:normal}.endHidden{-webkit-mask-image:linear-gradient(180deg, #000 calc(100% - 48px), transparent 100%)}.calendar__column .calendar__cell{margin:0px;padding:1.5px 1.5px}";
9
+
10
+ let EzCalendar = class {
11
+ constructor(hostRef) {
12
+ index.registerInstance(this, hostRef);
13
+ this.ezChange = index.createEvent(this, "ezChange", 7);
14
+ this._firstRender = true;
15
+ this._todayLabel = "Hoje";
16
+ this._weekDayLabels = ["D", "S", "T", "Q", "Q", "S", "S"];
17
+ this._monthLabels = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"];
18
+ this._hoursLabel = ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23"];
19
+ this._minutosLabel = ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59"];
20
+ /**
21
+ * A data selecionada no calendário
22
+ */
23
+ this.value = new Date();
24
+ /**
25
+ * No modo floating o calendário só se tornará visível
26
+ * quando o método show() for acionado.
27
+ */
28
+ this.floating = false;
29
+ /**
30
+ * Exibe ou não as horas e minutos no calendario
31
+ */
32
+ this.time = false;
33
+ /**
34
+ * Exibe ou não os segundos no calendario
35
+ */
36
+ this.showSeconds = false;
37
+ }
38
+ /**
39
+ * Usado no modo floating. Faz com que o componente seja exibido.
40
+ * É possível determinar ajustes de posicionamento através dos parâmetros
41
+ * top, left, bottom e right. Esses parâmetros devem ser informados como
42
+ * strings no formato css.
43
+ */
44
+ async show(top, left, bottom, right) {
45
+ if (this.floating) {
46
+ this._floatingID = core.FloatingManager.float(this._box, this._container, { autoClose: true, top, left, bottom, right });
47
+ window.requestAnimationFrame(() => {
48
+ this._box.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
49
+ });
50
+ this.scroll();
51
+ }
52
+ }
53
+ /**
54
+ * Método necessário para ajustar o posicionamento do calendar acima ou abaixo do ez-date-input conforme a disponibilidade de espaço.
55
+ */
56
+ async fitVertical(topOffset, bottomOffset) {
57
+ const neededHeight = this._container.getBoundingClientRect().bottom + this._calendarHeight;
58
+ const availableBottom = (window.innerHeight || document.documentElement.clientHeight) > neededHeight;
59
+ if (availableBottom) {
60
+ this.show(topOffset + "px", undefined, "unset");
61
+ }
62
+ else {
63
+ this.show("unset", undefined, bottomOffset + "px");
64
+ }
65
+ }
66
+ /**
67
+ * Usado no modo floating. Faz com que o componente seja ocultado.
68
+ */
69
+ async hide() {
70
+ if (this._floatingID !== undefined) {
71
+ core.FloatingManager.close(this._floatingID);
72
+ this._floatingID = undefined;
73
+ }
74
+ }
75
+ valueChanged() {
76
+ if (this.value) {
77
+ this._currentPosition.setTime(this.value.getTime());
78
+ this._currentPosition.setDate(1);
79
+ }
80
+ }
81
+ getMonthLabel() {
82
+ return this._monthLabels[this._currentPosition.getMonth()] + " " + this._currentPosition.getFullYear();
83
+ }
84
+ isSelectedDate(d) {
85
+ if (this.value) {
86
+ return this.value.getDate() == d.getDate() && this.value.getMonth() == d.getMonth() && this.value.getFullYear() == d.getFullYear();
87
+ }
88
+ return false;
89
+ }
90
+ changeMonth(offset) {
91
+ this._currentPosition.setMonth(this._currentPosition.getMonth() + offset);
92
+ index.forceUpdate(this);
93
+ }
94
+ selectDate(d) {
95
+ let newDate = d;
96
+ if (this.value && (this.time || this.showSeconds)) {
97
+ newDate.setHours(this.value.getHours());
98
+ newDate.setMinutes(this.value.getMinutes());
99
+ if (this.showSeconds) {
100
+ newDate.setSeconds(this.value.getSeconds());
101
+ }
102
+ else {
103
+ newDate.setSeconds(0);
104
+ }
105
+ }
106
+ this.value = newDate;
107
+ this.ezChange.emit(this.value);
108
+ }
109
+ selectHours(hour) {
110
+ if (!this.value) {
111
+ this.value = new Date();
112
+ }
113
+ this.value = new Date(this.value.getFullYear(), this.value.getMonth(), this.value.getDate(), hour, this.value.getMinutes(), this.value.getSeconds());
114
+ this.ezChange.emit(this.value);
115
+ }
116
+ selectMinutes(minute) {
117
+ if (!this.value) {
118
+ this.value = new Date();
119
+ }
120
+ this.value = new Date(this.value.getFullYear(), this.value.getMonth(), this.value.getDate(), this.value.getHours(), minute, this.value.getSeconds());
121
+ this.ezChange.emit(this.value);
122
+ }
123
+ selectSeconds(second) {
124
+ if (!this.value) {
125
+ this.value = new Date();
126
+ }
127
+ this.value = new Date(this.value.getFullYear(), this.value.getMonth(), this.value.getDate(), this.value.getHours(), this.value.getMinutes(), second);
128
+ this.ezChange.emit(this.value);
129
+ }
130
+ updateScroll(element) {
131
+ if (element) {
132
+ const { scrollHeight, clientHeight, scrollTop } = element;
133
+ const remainingScroll = scrollHeight - clientHeight - Math.ceil(scrollTop);
134
+ if (remainingScroll > 0) {
135
+ element.classList.add("endHidden");
136
+ }
137
+ else {
138
+ element.classList.remove("endHidden");
139
+ }
140
+ }
141
+ }
142
+ componentDidRender() {
143
+ if (this.floating && this._firstRender) {
144
+ this._calendarHeight = this._box.clientHeight;
145
+ this._box.remove();
146
+ this._firstRender = false;
147
+ }
148
+ this.updateScroll(this._hoursScroll);
149
+ this.updateScroll(this._minutesScroll);
150
+ this.updateScroll(this._secondsScroll);
151
+ }
152
+ componentDidLoad() {
153
+ this.scroll();
154
+ }
155
+ scroll() {
156
+ if (this.time || this.showSeconds) {
157
+ this._hoursScroll.scrollTop = this._hoursSelect.offsetTop - 64;
158
+ this._minutesScroll.scrollTop = this._minutesSelect.offsetTop - 64;
159
+ this.updateScroll(this._hoursScroll);
160
+ this.updateScroll(this._minutesScroll);
161
+ if (this.showSeconds) {
162
+ this._secondsScroll.scrollTop = this._secondsSelect.offsetTop - 64;
163
+ this.updateScroll(this._secondsScroll);
164
+ }
165
+ }
166
+ }
167
+ render() {
168
+ if (this._currentPosition == null) {
169
+ this._currentPosition = new Date();
170
+ if (this.value) {
171
+ this._currentPosition.setTime(this.value.getTime());
172
+ }
173
+ this._currentPosition.setDate(1);
174
+ }
175
+ const firstDate = new Date();
176
+ firstDate.setTime(this._currentPosition.getTime());
177
+ firstDate.setDate(1 - firstDate.getDay());
178
+ return (index.h("section", { ref: elem => this._container = elem }, index.h("div", { ref: elem => this._box = elem, class: "calendar__container" }, index.h("div", { class: "calendar" }, index.h("div", { class: "calendar__header" }, index.h("button", { class: "calendar__btn-previous", onClick: () => this.changeMonth(-1) }), index.h("label", { class: "calendar__lbl-month" }, this.getMonthLabel()), index.h("button", { class: "calendar__btn-next", onClick: () => this.changeMonth(1) })), index.h("div", { class: "calendar__body" }, index.h("div", { class: "calendar__line" }, this._weekDayLabels.map(day => index.h("div", { class: "calendar__cell calendar__cell--unselectable" }, day))), [0, 7, 14, 21, 28, 35].map(offset => index.h("div", { class: "calendar__line" }, [0, 1, 2, 3, 4, 5, 6].map(index$1 => {
179
+ const date = new Date();
180
+ date.setTime(firstDate.getTime());
181
+ date.setDate(date.getDate() + offset + index$1);
182
+ let classNames = "calendar__cell";
183
+ if (this._currentPosition.getMonth() != date.getMonth()) {
184
+ classNames += " calendar__cell--secondary";
185
+ }
186
+ else if (this.isSelectedDate(date)) {
187
+ classNames += " calendar__cell--selected";
188
+ }
189
+ return index.h("div", { class: classNames, onClick: () => this.selectDate(date) }, date.getDate());
190
+ })))), index.h("div", { class: "calendar__footer" }, index.h("button", { class: "calendar__btn-today", onClick: () => this.selectDate(new Date()) }, this._todayLabel))), (this.time || this.showSeconds) &&
191
+ index.h("div", { class: "calendar-time" }, index.h("div", { class: "calendar-time__header" }, index.h("div", null, "H"), index.h("div", { class: "separatorTime" }, ":"), index.h("div", null, "M"), this.showSeconds &&
192
+ index.h("div", { class: "separatorTime" }, ":"), this.showSeconds &&
193
+ index.h("div", null, "S")), index.h("div", { class: "calendar__body ", style: { display: 'flex', paddingLeft: '12px', paddingRight: '12px' } }, index.h("div", { class: "calendar__column", ref: elem => this._hoursScroll = elem, onScroll: () => this.updateScroll(this._hoursScroll) }, this._hoursLabel.map((offset, index$1) => {
194
+ if (index$1 === this.value.getHours()) {
195
+ return (index.h("div", { style: { display: 'flex' }, ref: elem => this._hoursSelect = elem }, index.h("div", { class: "calendar__cell calendar__cell--selected", onClick: () => this.selectHours(index$1) }, offset), index.h("div", { class: "separatorTime" }, ":")));
196
+ }
197
+ else {
198
+ return (index.h("div", { style: { display: 'flex' } }, index.h("div", { class: "calendar__cell", onClick: () => this.selectHours(index$1) }, offset), index.h("div", { class: "separatorTime" }, ":")));
199
+ }
200
+ })), index.h("div", { class: "calendar__column", ref: elem => this._minutesScroll = elem, onScroll: () => this.updateScroll(this._minutesScroll) }, this._minutosLabel.map((offset, index$1) => {
201
+ if (index$1 === this.value.getMinutes()) {
202
+ return (index.h("div", { style: { display: 'flex' }, ref: elem => this._minutesSelect = elem }, index.h("div", { class: "calendar__cell calendar__cell--selected", onClick: () => this.selectMinutes(index$1) }, offset), this.showSeconds && index.h("div", { class: "separatorTime" }, ":")));
203
+ }
204
+ else {
205
+ return (index.h("div", { style: { display: 'flex' } }, index.h("div", { class: "calendar__cell", onClick: () => this.selectMinutes(index$1) }, offset), this.showSeconds && index.h("div", { class: "separatorTime" }, ":")));
206
+ }
207
+ })), this.showSeconds &&
208
+ index.h("div", { class: "calendar__column", ref: elem => this._secondsScroll = elem, onScroll: () => this.updateScroll(this._secondsScroll) }, this._minutosLabel.map((offset, index$1) => {
209
+ if (index$1 === this.value.getSeconds()) {
210
+ return (index.h("div", { class: "calendar__cell calendar__cell--selected", onClick: () => this.selectSeconds(index$1), ref: elem => this._secondsSelect = elem }, offset));
211
+ }
212
+ else {
213
+ return (index.h("div", { class: "calendar__cell", onClick: () => this.selectSeconds(index$1) }, offset));
214
+ }
215
+ })))))));
216
+ }
217
+ static get watchers() { return {
218
+ "value": ["valueChanged"]
219
+ }; }
220
+ };
221
+ EzCalendar.style = ezCalendarCss;
222
+
223
+ exports.ez_calendar = EzCalendar;
@@ -0,0 +1,76 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-88286449.js');
6
+
7
+ const ezCheckCss = ":host{--ez-check--box--width:18px;--ez-check--box--height:18px;--ez-check--width:calc(var(--ez-check--box--width) + 14px);--ez-check--height:calc(var(--ez-check--box--width) + 14px);--ez-check--border-radius:var(--border--radius-small);--ez-check--checked--background-color:var(--color--primary-200);--ez-check--focus--background-color:var(--color--strokes, #FFFFFF);--ez-check--hover--background-color:var(--background--medium);--ez-check--checked--disabled--background-color:var(--color--disable-secondary);--ez-check--border:var(--border--medium) var(--title--primary);--ez-check--disabled--border:var(--border--medium) var(--color--strokes);--ez-check--checked--border:var(--border--medium) var(--color--primary);--ez-check--checked--hover--background-color:var(--color--primary-200);--ez-check--checked--focus--background-color:var(--color--primary-300, #FFFFFF);--ez-check--check--image:url('data:image/svg+xml;utf8,<svg width=\"8\" height=\"7\" viewBox=\"0 0 8 7\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M7.70002 0.398999L7.48502 0.207997C7.31524 0.0598858 7.09376 -0.0150438 6.86894 -0.000430025C6.64411 0.0141838 6.43419 0.117153 6.28502 0.285997L2.70002 4.332L1.61802 3.384C1.44837 3.23576 1.22697 3.16067 1.00214 3.17509C0.77732 3.18952 0.567332 3.2923 0.418019 3.461L0.229019 3.674C0.0752361 3.84797 -0.00437434 4.07521 0.00721192 4.30713C0.0187982 4.53904 0.120661 4.75722 0.291019 4.915L2.27402 6.762C2.35832 6.8432 2.45842 6.90618 2.56811 6.94702C2.67779 6.98787 2.79471 7.00571 2.91159 6.99942C3.02846 6.99314 3.14279 6.96287 3.24747 6.91049C3.35214 6.85812 3.44492 6.78477 3.52002 6.695L7.79102 1.638C7.94063 1.46048 8.01486 1.23149 7.99786 0.999963C7.98085 0.768436 7.87396 0.552749 7.70002 0.398999Z\"/></svg>');--ez-check--check--background-color:var(--color--primary);--ez-check--check--disabled--background-color:var(--color--strokes);--ez-switch--slider--width:34px;--ez-switch--slider--height:14px;--ez-switch--pin--width:20px;--ez-switch--pin--height:20px;--ez-switch--focus--width:32px;--ez-switch--focus--height:32px;--ez-switch--background-color:var(--color--strokes);--ez-switch--disabled--background-color:var(--color--disable-secondary);--ez-switch--checked--background-color:var(--color--primary-300);--ez-switch--pin--background-color:var(--background--xlight);--ez-switch--pin--disabled--background-color:var(--color--disable-secondary);--ez-switch--pin--checked--background-color:var(--color--primary);--ez-switch--pin--checked--disabled--background-color:#E8F7F4;--ez-switch--pin--focus--background-color:var(--text--disable);--ez-switch--pin--checked--focus--background-color:var(--color--primary);--ez-check--label--font-size:var(--text--medium, 14px);--ez-check--label--font-family:var(--font-pattern, Arial);--ez-check--label--color:var(--title--primary, #000);--ez-check--label--disabled--color:var(--text--disable, #AFB6C0);display:flex;width:100%;align-items:center;margin:0}input.regularMode{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;box-sizing:border-box;-webkit-appearance:none;appearance:none;cursor:pointer;border-radius:50%;position:relative;width:var(--ez-check--width);height:var(--ez-check--height)}input.regularMode:enabled:hover{background-color:var(--ez-check--hover--background-color)}input.regularMode:enabled:focus{outline:none;background-color:var(--ez-check--focus--background-color)}input.regularMode:disabled{cursor:auto;background:none}input.regularMode::before{box-sizing:border-box;content:\"\";display:block;width:var(--ez-check--box--width);height:var(--ez-check--box--height);border-radius:var(--ez-check--border-radius);border:var(--ez-check--border)}input.regularMode:disabled::before{border:var(--ez-check--disabled--border)}input.regularMode:checked:enabled:hover{background-color:var(--ez-check--checked--hover--background-color)}input.regularMode:checked:enabled:focus{background-color:var(--ez-check--checked--focus--background-color)}input.regularMode:checked::before{border:var(--ez-check--checked--border);background-color:var(--ez-check--checked--background-color)}input.regularMode:checked:disabled:before{border:var(--ez-check--disabled--border);background-color:var(--ez-check--checked--disabled--background-color)}input.regularMode:checked::after{display:flex;position:absolute;content:\"\";background-color:var(--ez-check--check--background-color);width:8px;height:7px;-webkit-mask-image:var(--ez-check--check--image);mask-image:var(--ez-check--check--image)}input.regularMode:checked:disabled::after{background-color:var(--ez-check--check--disabled--background-color)}input.switchMode{flex-shrink:0;-webkit-appearance:none;appearance:none;position:relative;outline:none;cursor:pointer;border-radius:20px;border:var(--border--small, 1px solid) var(--text--secondary, #a2abb9);transition:background-color var(--transition);width:var(--ez-switch--slider--width);height:var(--ez-switch--slider--height);background-color:var(--ez-switch--background-color)}input.switchMode:disabled{background-color:var(--ez-switch--disabled--background-color)}input.switchMode::after{content:\"\";display:block;position:absolute;box-shadow:var(--shadow);transition:transform var(--transition);transition:background-color var(--transition);transform:translateX(-2px) translateY(-3px);border-radius:50%;width:var(--ez-switch--pin--width);height:var(--ez-switch--pin--height);background-color:var(--ez-switch--pin--background-color)}input.switchMode:disabled::after{background-color:var(--ez-switch--pin--disabled--background-color)}input.switchMode:checked{transition:background-color var(--transition), border var(--transition);background-color:var(--ez-switch--checked--background-color);border:var(--border--small, 1px solid) var(--color--primary, #008561)}input.switchMode::before{display:block;content:\"\";display:block;position:absolute;border-radius:50%;opacity:0;width:var(--ez-switch--focus--width);height:var(--ez-switch--focus--height);top:calc((var(--ez-switch--slider--height) - var(--ez-switch--focus--height)) / 2);left:calc((var(--ez-switch--pin--width) - var(--ez-switch--focus--width))/2);background-color:var(--ez-switch--pin--focus--background-color)}input.switchMode:focus::before{opacity:0.24;transition:opacity var(--transition)}input.switchMode:checked:focus::before{background-color:var(--ez-switch--pin--checked--focus--background-color);transform:translateX(calc(var(--ez-switch--slider--width) - var(--ez-switch--pin--width)))}input.switchMode:checked::after{transition:transform var(--transition);transition:background-color var(--transition);transform:translateX(calc(var(--ez-switch--slider--width) - var(--ez-switch--pin--width))) translateY(-3px);box-shadow:var(--shadow);background-color:var(--ez-switch--pin--checked--background-color)}input.switchMode:checked:disabled::after{background-color:var(--ez-switch--pin--checked--disabled--background-color)}.label{flex-shrink:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-check--label--color);text-shadow:var(--text-shadow);font-size:var(--ez-check--label--font-size);font-family:var(--ez-check--label--font-family);cursor:default;padding-left:var(--space--small)}.label--disabled{color:var(--ez-check--label--disabled--color)}";
8
+
9
+ let EzCheck = class {
10
+ constructor(hostRef) {
11
+ index.registerInstance(this, hostRef);
12
+ this.ezChange = index.createEvent(this, "ezChange", 7);
13
+ /**
14
+ * Deixa o campo disponível ou não para interação com o usuário.
15
+ */
16
+ this.enabled = true;
17
+ /**
18
+ * Existem dois modos de visualização: regular e switch.
19
+ * Se esta propriedade for omitida, o componete assume o formato "regular".
20
+ * No modo "regular" a visualização é a tradicional de uma caixinha marcada/desmarcada.
21
+ * No modo "switch" o campo tem uma interface em formato de um pino liga/desliga.
22
+ */
23
+ this.mode = "regular";
24
+ }
25
+ adjustMode() {
26
+ if (this.mode === "switch") {
27
+ this._inputElem.classList.remove("regularMode");
28
+ this._inputElem.classList.add("switchMode");
29
+ }
30
+ else {
31
+ this._inputElem.classList.remove("switchMode");
32
+ this._inputElem.classList.add("regularMode");
33
+ }
34
+ }
35
+ //---------------------------------------------
36
+ // Public methods
37
+ //---------------------------------------------
38
+ /**
39
+ * Devolve o modo escolhido para o componente
40
+ */
41
+ async getMode() {
42
+ return this.mode;
43
+ }
44
+ /**
45
+ * Faz o foco no componente de input
46
+ */
47
+ async setFocus() {
48
+ this._inputElem.focus();
49
+ }
50
+ componentDidLoad() {
51
+ this.adjustMode();
52
+ }
53
+ changeValue() {
54
+ if (!this.enabled) {
55
+ return;
56
+ }
57
+ this.value = !this.value;
58
+ this.ezChange.emit(this.value);
59
+ }
60
+ getLabelClasses() {
61
+ let classes = "label";
62
+ if (!this.enabled) {
63
+ classes += " label--disabled";
64
+ }
65
+ return classes;
66
+ }
67
+ render() {
68
+ return (index.h(index.Host, null, index.h("input", { type: "checkbox", class: "regularMode", checked: this.value === true, onChange: () => { this.changeValue(); }, disabled: !this.enabled, ref: (el) => this._inputElem = el }), this.label ? index.h("label", { class: this.getLabelClasses(), onClick: () => { this.changeValue(); }, title: this.label }, this.label) : undefined));
69
+ }
70
+ static get watchers() { return {
71
+ "mode": ["adjustMode"]
72
+ }; }
73
+ };
74
+ EzCheck.style = ezCheckCss;
75
+
76
+ exports.ez_check = EzCheck;
@@ -0,0 +1,47 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-88286449.js');
6
+
7
+ const ezCollapsibleBoxCss = ":host{--ez-collapsible-box--height:42px;--ez-collapsible-box--font-size:var(--title--medium, 14px);--ez-collapsible-box--font-family:var(--font-pattern, Arial);--ez-collapsible-box--font-weight:var(--text-weight--large, 600);--ez-collapsible-box--color:var(--title--primary);--ez-collapsible-box__btn--image--xsmall:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"12px\" width=\"7.5px\"><path d=\"M 0,10.56 4.5967752,6.0000006 0,1.3800006 1.4516132,0 7.5,6.0000006 1.4516132,12 Z\"/></svg>');--ez-collapsible-box__btn--image--small:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"14px\" width=\"8.68px\"><path d=\"M 0,12.32 5.3200012,7.0000007 0,1.6100007 1.6800004,0 8.68,7.0000007 1.6800004,14 Z\"/></svg>');--ez-collapsible-box__btn--image--medium:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 0.21915251,13.860393 6.0795475,8.0000007 0.21915251,2.0624968 2.0698036,0.28895588 9.7808475,8.0000007 2.0698036,15.711044 Z\"/></svg>');--ez-collapsible-box__btn--image--large:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"18px\" width=\"11.25px\"><path d=\"M 0,15.84 6.8951628,9.0000009 0,2.0700009 2.1774198,0 11.25,9.0000009 2.1774198,18 Z\"/></svg>');--ez-collapsible-box__btn--image--xlarge:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"20px\" width=\"12.5px\"><path d=\"M 0,17.6 7.661292,10.000001 0,2.300001 2.4193553,0 12.5,10.000001 2.4193553,20 Z\"/></svg>');--ez-collapsible-box__btn--fill:var(--ez-collapsible-box--color);--ez-collapsible-box__btn--width:10px;--ez-collapsible-box__btn--height:16px;display:flex;flex-wrap:wrap;width:100%}.collapsible-box__title{width:100%;align-self:center;display:flex;box-sizing:border-box}.collapsible-box__label{white-space:nowrap;overflow:hidden;cursor:pointer;text-overflow:ellipsis;width:100%;font-family:var(--ez-collapsible-box--font-family);font-size:var(--ez-collapsible-box--font-size);font-weight:var(--ez-collapsible-box--font-weight);color:var(--ez-collapsible-box--color)}.collapsible-box__label--icon-right{white-space:nowrap;overflow:hidden;cursor:pointer;text-overflow:ellipsis;font-family:var(--ez-collapsible-box--font-family);font-size:var(--ez-collapsible-box--font-size);font-weight:var(--ez-collapsible-box--font-weight);color:var(--ez-collapsible-box--color)}.collapsible-box__btn{outline:none;border:none;background-color:unset;cursor:pointer;padding:1px 6px}.collapsible-box__btn::after{content:'';display:flex;background-color:var(--ez-collapsible-box__btn--fill);width:var(--ez-collapsible-box__btn--width);height:var(--ez-collapsible-box__btn--height);transition:transform var(--transition);transform:rotate(90deg)}.collapsible-box__btn--xsmall::after{width:7.5px;height:12px;-webkit-mask-image:var(--ez-collapsible-box__btn--image--xsmall);mask-image:var(--ez-collapsible-box__btn--image--xsmall)}.collapsible-box__btn--small::after{width:8.68px;height:14px;-webkit-mask-image:var(--ez-collapsible-box__btn--image--small);mask-image:var(--ez-collapsible-box__btn--image--small)}.collapsible-box__btn--medium::after{width:10px;height:16px;-webkit-mask-image:var(--ez-collapsible-box__btn--image--medium);mask-image:var(--ez-collapsible-box__btn--image--medium)}.collapsible-box__btn--large::after{width:11.25px;height:18px;-webkit-mask-image:var(--ez-collapsible-box__btn--image--large);mask-image:var(--ez-collapsible-box__btn--image--large)}.collapsible-box__btn--xlarge::after{width:12.5px;height:20px;-webkit-mask-image:var(--ez-collapsible-box__btn--image--xlarge);mask-image:var(--ez-collapsible-box__btn--image--xlarge)}.collapsible-box__btn--collapsed::after{transform:rotate(0deg)}.font--xsmall{font-size:10px}.font--small{font-size:12px}.font--medium{font-size:14px}.font--large{font-size:16px}.font--xlarge{font-size:20px}";
8
+
9
+ let EzCollapsibleBox = class {
10
+ constructor(hostRef) {
11
+ index.registerInstance(this, hostRef);
12
+ this.ezChange = index.createEvent(this, "ezChange", 7);
13
+ /**
14
+ * Valor externalizado que garante a exibição ou não do componente
15
+ */
16
+ this.value = false;
17
+ /**
18
+ * Define o tamanho do texto e do ícone do componente.
19
+ */
20
+ this.headerSize = "small";
21
+ /**
22
+ * Define o local onde o ícone será renderizado.
23
+ */
24
+ this.iconPlacement = "left";
25
+ }
26
+ observeValue() {
27
+ this.ezChange.emit(this.value);
28
+ }
29
+ /**
30
+ * Esconde ou revela o conteúdo do componente
31
+ */
32
+ async showHide() {
33
+ this.value = !this.value;
34
+ }
35
+ render() {
36
+ return (index.h(index.Host, null, this.iconPlacement == "right" ?
37
+ index.h("div", { class: "collapsible-box__title" }, index.h("label", { class: (this.iconPlacement == "right" ? "collapsible-box__label--icon-right " : "collapsible-box__label ") + (this.headerSize ? "font--" + this.headerSize : ""), onClick: () => this.showHide(), title: this.label }, this.label), index.h("button", { class: this.value ? "collapsible-box__btn collapsible-box__btn--collapsed " + "collapsible-box__btn--" + this.headerSize : "collapsible-box__btn " + "collapsible-box__btn--" + this.headerSize, onClick: () => this.showHide() }))
38
+ :
39
+ index.h("div", { class: "collapsible-box__title" }, index.h("button", { class: this.value ? "collapsible-box__btn collapsible-box__btn--collapsed " + "collapsible-box__btn--" + this.headerSize : "collapsible-box__btn " + "collapsible-box__btn--" + this.headerSize, onClick: () => this.showHide() }), index.h("label", { class: (this.iconPlacement == "right" ? "collapsible-box__label--icon-right " : "collapsible-box__label ") + (this.headerSize ? "font--" + this.headerSize : ""), onClick: () => this.showHide(), title: this.label }, this.label)), !this.value ? index.h("slot", null) : null));
40
+ }
41
+ static get watchers() { return {
42
+ "value": ["observeValue"]
43
+ }; }
44
+ };
45
+ EzCollapsibleBox.style = ezCollapsibleBoxCss;
46
+
47
+ exports.ez_collapsible_box = EzCollapsibleBox;