@sankhyalabs/ezui 1.1.8 → 1.1.9

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 (141) hide show
  1. package/README.md +72 -72
  2. package/dist/cjs/{DataUnit-28b290cb.js → DataUnit-9a4a35ca.js} +415 -371
  3. package/dist/cjs/ez-action-chip.cjs.entry.js +41 -41
  4. package/dist/cjs/ez-button_14.cjs.entry.js +1911 -1911
  5. package/dist/cjs/ez-label-chip.cjs.entry.js +120 -120
  6. package/dist/cjs/ez-modal.cjs.entry.js +104 -104
  7. package/dist/cjs/ez-number-input.cjs.entry.js +236 -236
  8. package/dist/cjs/ez-time-input.cjs.entry.js +168 -168
  9. package/dist/cjs/form-metadata.cjs.entry.js +65 -65
  10. package/dist/collection/components/ez-action-chip/ez-action-chip.css +82 -82
  11. package/dist/collection/components/ez-action-chip/ez-action-chip.js +109 -109
  12. package/dist/collection/components/ez-button/ez-button.css +94 -94
  13. package/dist/collection/components/ez-button/ez-button.js +125 -125
  14. package/dist/collection/components/ez-calendar/ez-calendar.css +210 -210
  15. package/dist/collection/components/ez-calendar/ez-calendar.js +215 -215
  16. package/dist/collection/components/ez-check/ez-check.css +265 -265
  17. package/dist/collection/components/ez-check/ez-check.js +168 -168
  18. package/dist/collection/components/ez-collapsable-box/ez-collapsable-box.css +67 -67
  19. package/dist/collection/components/ez-collapsable-box/ez-collapsable-box.js +108 -108
  20. package/dist/collection/components/ez-combo-box/ez-combo-box-interfaces.js +2 -2
  21. package/dist/collection/components/ez-combo-box/ez-combo-box.css +167 -167
  22. package/dist/collection/components/ez-combo-box/ez-combo-box.js +363 -363
  23. package/dist/collection/components/ez-date-input/ez-date-input.css +38 -38
  24. package/dist/collection/components/ez-date-input/ez-date-input.js +172 -172
  25. package/dist/collection/components/ez-form/ez-form.css +19 -19
  26. package/dist/collection/components/ez-form/ez-form.js +368 -368
  27. package/dist/collection/components/ez-form/store/Form.actions.js +132 -132
  28. package/dist/collection/components/ez-form/store/Form.reducer.js +194 -194
  29. package/dist/collection/components/ez-form/store/Form.selectors.js +44 -44
  30. package/dist/collection/components/ez-form/subcomponents/DataUnit.js +251 -207
  31. package/dist/collection/components/ez-form/subcomponents/FormMetadata.js +16 -16
  32. package/dist/collection/components/ez-form/subcomponents/css/place-holder.css +23 -23
  33. package/dist/collection/components/ez-form/subcomponents/form-metadata.js +173 -173
  34. package/dist/collection/components/ez-form/subcomponents/place-holder.js +14 -14
  35. package/dist/collection/components/ez-form/subcomponents/structure/Field.js +71 -71
  36. package/dist/collection/components/ez-form/subcomponents/structure/FieldSet.js +27 -27
  37. package/dist/collection/components/ez-form/subcomponents/structure/FormSheet.js +40 -40
  38. package/dist/collection/components/ez-form/subcomponents/structure/NavigationBar.js +27 -27
  39. package/dist/collection/components/ez-icon/ez-icon.css +36 -36
  40. package/dist/collection/components/ez-icon/ez-icon.js +56 -56
  41. package/dist/collection/components/ez-label-chip/ez-label-chip.css +117 -117
  42. package/dist/collection/components/ez-label-chip/ez-label-chip.js +276 -276
  43. package/dist/collection/components/ez-modal/ez-modal.css +86 -86
  44. package/dist/collection/components/ez-modal/ez-modal.js +224 -224
  45. package/dist/collection/components/ez-number-input/ez-number-input.css +144 -144
  46. package/dist/collection/components/ez-number-input/ez-number-input.js +465 -465
  47. package/dist/collection/components/ez-popover/ez-popover.css +38 -38
  48. package/dist/collection/components/ez-popover/ez-popover.js +323 -323
  49. package/dist/collection/components/ez-search/ez-search.css +295 -295
  50. package/dist/collection/components/ez-search/ez-search.js +527 -527
  51. package/dist/collection/components/ez-tabselector/ez-tabselector.css +125 -125
  52. package/dist/collection/components/ez-tabselector/ez-tabselector.js +283 -283
  53. package/dist/collection/components/ez-text-area/ez-text-area.css +139 -139
  54. package/dist/collection/components/ez-text-area/ez-text-area.js +267 -267
  55. package/dist/collection/components/ez-text-input/ez-text-input.css +169 -169
  56. package/dist/collection/components/ez-text-input/ez-text-input.js +395 -395
  57. package/dist/collection/components/ez-time-input/ez-time-input.css +155 -155
  58. package/dist/collection/components/ez-time-input/ez-time-input.js +326 -326
  59. package/dist/collection/index.js +1 -1
  60. package/dist/collection/servidor.js +100 -100
  61. package/dist/collection/utils/FloatingManager.js +15 -15
  62. package/dist/collection/utils/utils.js +6 -6
  63. package/dist/custom-elements/index.js +3125 -3081
  64. package/dist/esm/{DataUnit-69e518fa.js → DataUnit-d5d4c9a3.js} +415 -371
  65. package/dist/esm/ez-action-chip.entry.js +41 -41
  66. package/dist/esm/ez-button_14.entry.js +1911 -1911
  67. package/dist/esm/ez-label-chip.entry.js +120 -120
  68. package/dist/esm/ez-modal.entry.js +104 -104
  69. package/dist/esm/ez-number-input.entry.js +236 -236
  70. package/dist/esm/ez-time-input.entry.js +168 -168
  71. package/dist/esm/form-metadata.entry.js +65 -65
  72. package/dist/esm/polyfills/core-js.js +0 -0
  73. package/dist/esm/polyfills/dom.js +0 -0
  74. package/dist/esm/polyfills/es5-html-element.js +0 -0
  75. package/dist/esm/polyfills/index.js +0 -0
  76. package/dist/esm/polyfills/system.js +0 -0
  77. package/dist/ezui/ezui.esm.js +1 -1
  78. package/dist/ezui/{p-b0974f4f.entry.js → p-0fcdfb51.entry.js} +1 -1
  79. package/dist/ezui/p-dac7a6c2.js +1 -0
  80. package/dist/ezui/{p-db11c600.entry.js → p-dbef7060.entry.js} +1 -1
  81. package/dist/types/components/ez-action-chip/ez-action-chip.d.ts +16 -16
  82. package/dist/types/components/ez-button/ez-button.d.ts +20 -20
  83. package/dist/types/components/ez-calendar/ez-calendar.d.ts +42 -42
  84. package/dist/types/components/ez-check/ez-check.d.ts +32 -32
  85. package/dist/types/components/ez-collapsable-box/ez-collapsable-box.d.ts +18 -18
  86. package/dist/types/components/ez-combo-box/ez-combo-box-interfaces.d.ts +4 -4
  87. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +68 -68
  88. package/dist/types/components/ez-date-input/ez-date-input.d.ts +31 -31
  89. package/dist/types/components/ez-form/ez-form.d.ts +26 -31
  90. package/dist/types/components/ez-form/store/Form.actions.d.ts +111 -111
  91. package/dist/types/components/ez-form/store/Form.reducer.d.ts +20 -20
  92. package/dist/types/components/ez-form/store/Form.selectors.d.ts +14 -14
  93. package/dist/types/components/ez-form/subcomponents/DataUnit.d.ts +60 -55
  94. package/dist/types/components/ez-form/subcomponents/FormMetadata.d.ts +41 -41
  95. package/dist/types/components/ez-form/subcomponents/form-metadata.d.ts +15 -15
  96. package/dist/types/components/ez-form/subcomponents/place-holder.d.ts +3 -3
  97. package/dist/types/components/ez-form/subcomponents/structure/Field.d.ts +10 -10
  98. package/dist/types/components/ez-form/subcomponents/structure/FieldSet.d.ts +12 -12
  99. package/dist/types/components/ez-form/subcomponents/structure/FormSheet.d.ts +13 -13
  100. package/dist/types/components/ez-form/subcomponents/structure/NavigationBar.d.ts +17 -17
  101. package/dist/types/components/ez-icon/ez-icon.d.ts +5 -5
  102. package/dist/types/components/ez-label-chip/ez-label-chip.d.ts +40 -40
  103. package/dist/types/components/ez-modal/ez-modal.d.ts +32 -32
  104. package/dist/types/components/ez-number-input/ez-number-input.d.ts +73 -73
  105. package/dist/types/components/ez-popover/ez-popover.d.ts +52 -52
  106. package/dist/types/components/ez-search/ez-search.d.ts +95 -95
  107. package/dist/types/components/ez-tabselector/ez-tabselector.d.ts +31 -31
  108. package/dist/types/components/ez-text-area/ez-text-area.d.ts +49 -49
  109. package/dist/types/components/ez-text-input/ez-text-input.d.ts +64 -64
  110. package/dist/types/components/ez-time-input/ez-time-input.d.ts +53 -53
  111. package/dist/types/index.d.ts +1 -1
  112. package/dist/types/utils/utils.d.ts +2 -2
  113. package/package.json +114 -114
  114. package/dist/ezui/p-10ef58b3.js +0 -1
  115. package/react/components.d.ts +0 -22
  116. package/react/components.js +0 -25
  117. package/react/components.js.map +0 -1
  118. package/react/react-component-lib/createComponent.d.ts +0 -10
  119. package/react/react-component-lib/createComponent.js +0 -59
  120. package/react/react-component-lib/createComponent.js.map +0 -1
  121. package/react/react-component-lib/createOverlayComponent.d.ts +0 -20
  122. package/react/react-component-lib/createOverlayComponent.js +0 -89
  123. package/react/react-component-lib/createOverlayComponent.js.map +0 -1
  124. package/react/react-component-lib/index.d.ts +0 -2
  125. package/react/react-component-lib/index.js +0 -3
  126. package/react/react-component-lib/index.js.map +0 -1
  127. package/react/react-component-lib/interfaces.d.ts +0 -29
  128. package/react/react-component-lib/interfaces.js +0 -1
  129. package/react/react-component-lib/interfaces.js.map +0 -1
  130. package/react/react-component-lib/utils/attachProps.d.ts +0 -12
  131. package/react/react-component-lib/utils/attachProps.js +0 -96
  132. package/react/react-component-lib/utils/attachProps.js.map +0 -1
  133. package/react/react-component-lib/utils/case.d.ts +0 -2
  134. package/react/react-component-lib/utils/case.js +0 -7
  135. package/react/react-component-lib/utils/case.js.map +0 -1
  136. package/react/react-component-lib/utils/dev.d.ts +0 -2
  137. package/react/react-component-lib/utils/dev.js +0 -13
  138. package/react/react-component-lib/utils/dev.js.map +0 -1
  139. package/react/react-component-lib/utils/index.d.ts +0 -7
  140. package/react/react-component-lib/utils/index.js +0 -21
  141. package/react/react-component-lib/utils/index.js.map +0 -1
@@ -1,109 +1,109 @@
1
- import { Component, Prop, h, Event } from '@stencil/core';
2
- export class EzLabelChip {
3
- constructor() {
4
- /**
5
- * Deixa o componente disponível ou não para seleção.
6
- */
7
- this.enabled = true;
8
- }
9
- //---------------------------------------------
10
- // Event handlers
11
- //---------------------------------------------
12
- handleSlotChange(ev) {
13
- const slot = ev.target;
14
- const content = slot.assignedElements()[0];
15
- if (content) {
16
- content.style.position = "absolute";
17
- content.style.display = "flex";
18
- content.style.alignItems = "center";
19
- content.style.justifyContent = "center";
20
- content.style.overflow = "hidden";
21
- content.style.top = "0px";
22
- content.style.width = "var(--ac__icon--width)";
23
- content.style.height = "var(--ac--height)";
24
- if (slot.name == "leftIcon") {
25
- content.style.left = "0px";
26
- this._labelElem.classList.add('padding-left--small');
27
- }
28
- else if (slot.name == "rightIcon") {
29
- content.style.right = "0px";
30
- this._labelElem.classList.add('padding-right--small');
31
- }
32
- }
33
- }
34
- //---------------------------------------------
35
- // Lifecycle web component
36
- //---------------------------------------------
37
- render() {
38
- return (h("div", { onClick: () => this.actionClick.emit(), class: "label__container" },
39
- h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }),
40
- h("label", { ref: (el) => this._labelElem = el }, this.label),
41
- h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } })));
42
- }
43
- static get is() { return "ez-action-chip"; }
44
- static get encapsulation() { return "shadow"; }
45
- static get originalStyleUrls() { return {
46
- "$": ["ez-action-chip.css"]
47
- }; }
48
- static get styleUrls() { return {
49
- "$": ["ez-action-chip.css"]
50
- }; }
51
- static get properties() { return {
52
- "label": {
53
- "type": "string",
54
- "mutable": false,
55
- "complexType": {
56
- "original": "string",
57
- "resolved": "string",
58
- "references": {}
59
- },
60
- "required": false,
61
- "optional": false,
62
- "docs": {
63
- "tags": [],
64
- "text": "Label \u00E9 o t\u00EDtulo exibido no componente."
65
- },
66
- "attribute": "label",
67
- "reflect": true
68
- },
69
- "enabled": {
70
- "type": "boolean",
71
- "mutable": false,
72
- "complexType": {
73
- "original": "boolean",
74
- "resolved": "boolean",
75
- "references": {}
76
- },
77
- "required": false,
78
- "optional": false,
79
- "docs": {
80
- "tags": [],
81
- "text": "Deixa o componente dispon\u00EDvel ou n\u00E3o para sele\u00E7\u00E3o."
82
- },
83
- "attribute": "enabled",
84
- "reflect": true,
85
- "defaultValue": "true"
86
- }
87
- }; }
88
- static get events() { return [{
89
- "method": "actionClick",
90
- "name": "actionClick",
91
- "bubbles": true,
92
- "cancelable": true,
93
- "composed": true,
94
- "docs": {
95
- "tags": [],
96
- "text": ""
97
- },
98
- "complexType": {
99
- "original": "ClickOptions",
100
- "resolved": "ClickOptions",
101
- "references": {
102
- "ClickOptions": {
103
- "location": "import",
104
- "path": "puppeteer"
105
- }
106
- }
107
- }
108
- }]; }
109
- }
1
+ import { Component, Prop, h, Event } from '@stencil/core';
2
+ export class EzLabelChip {
3
+ constructor() {
4
+ /**
5
+ * Deixa o componente disponível ou não para seleção.
6
+ */
7
+ this.enabled = true;
8
+ }
9
+ //---------------------------------------------
10
+ // Event handlers
11
+ //---------------------------------------------
12
+ handleSlotChange(ev) {
13
+ const slot = ev.target;
14
+ const content = slot.assignedElements()[0];
15
+ if (content) {
16
+ content.style.position = "absolute";
17
+ content.style.display = "flex";
18
+ content.style.alignItems = "center";
19
+ content.style.justifyContent = "center";
20
+ content.style.overflow = "hidden";
21
+ content.style.top = "0px";
22
+ content.style.width = "var(--ac__icon--width)";
23
+ content.style.height = "var(--ac--height)";
24
+ if (slot.name == "leftIcon") {
25
+ content.style.left = "0px";
26
+ this._labelElem.classList.add('padding-left--small');
27
+ }
28
+ else if (slot.name == "rightIcon") {
29
+ content.style.right = "0px";
30
+ this._labelElem.classList.add('padding-right--small');
31
+ }
32
+ }
33
+ }
34
+ //---------------------------------------------
35
+ // Lifecycle web component
36
+ //---------------------------------------------
37
+ render() {
38
+ return (h("div", { onClick: () => this.actionClick.emit(), class: "label__container" },
39
+ h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }),
40
+ h("label", { ref: (el) => this._labelElem = el }, this.label),
41
+ h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } })));
42
+ }
43
+ static get is() { return "ez-action-chip"; }
44
+ static get encapsulation() { return "shadow"; }
45
+ static get originalStyleUrls() { return {
46
+ "$": ["ez-action-chip.css"]
47
+ }; }
48
+ static get styleUrls() { return {
49
+ "$": ["ez-action-chip.css"]
50
+ }; }
51
+ static get properties() { return {
52
+ "label": {
53
+ "type": "string",
54
+ "mutable": false,
55
+ "complexType": {
56
+ "original": "string",
57
+ "resolved": "string",
58
+ "references": {}
59
+ },
60
+ "required": false,
61
+ "optional": false,
62
+ "docs": {
63
+ "tags": [],
64
+ "text": "Label \u00E9 o t\u00EDtulo exibido no componente."
65
+ },
66
+ "attribute": "label",
67
+ "reflect": true
68
+ },
69
+ "enabled": {
70
+ "type": "boolean",
71
+ "mutable": false,
72
+ "complexType": {
73
+ "original": "boolean",
74
+ "resolved": "boolean",
75
+ "references": {}
76
+ },
77
+ "required": false,
78
+ "optional": false,
79
+ "docs": {
80
+ "tags": [],
81
+ "text": "Deixa o componente dispon\u00EDvel ou n\u00E3o para sele\u00E7\u00E3o."
82
+ },
83
+ "attribute": "enabled",
84
+ "reflect": true,
85
+ "defaultValue": "true"
86
+ }
87
+ }; }
88
+ static get events() { return [{
89
+ "method": "actionClick",
90
+ "name": "actionClick",
91
+ "bubbles": true,
92
+ "cancelable": true,
93
+ "composed": true,
94
+ "docs": {
95
+ "tags": [],
96
+ "text": ""
97
+ },
98
+ "complexType": {
99
+ "original": "ClickOptions",
100
+ "resolved": "ClickOptions",
101
+ "references": {
102
+ "ClickOptions": {
103
+ "location": "import",
104
+ "path": "puppeteer"
105
+ }
106
+ }
107
+ }
108
+ }]; }
109
+ }
@@ -1,94 +1,94 @@
1
- :host {
2
-
3
- /* dimensions */
4
- --bt--min-width: 100px;
5
-
6
- /* dimensions */
7
- --bt--height: 42px;
8
- --bt__icon--width: 18px;
9
- --bt__inline__icon--padding: 12px;
10
-
11
- --bt--padding-top: var(--space--medium, 12px);
12
- --bt--padding-bottom: var(--space--medium, 12px);
13
- --bt--padding-right: var(--space--large, 24px);
14
- --bt--padding-left: var(--space--large, 24px);
15
-
16
- /* general */
17
- --bt--color: var(--text--inverted, #FFF);
18
- --bt--font-size: var(--text--medium, 14px);
19
- --bt--font-family: var(--font-pattern, Arial);
20
- --bt--font-weight: var(--text-weight--large);
21
- --bt--background-color: var(--color--primary, #c0c0c0);
22
- --bt--border-radius: var(--border--radius-large, 12px);
23
- --bt--border: none;
24
-
25
- --bt--hover--background-color: var(--color--primary-700, var(--bt--background-color));
26
-
27
- --bt--disabled--color: var(--color--disable-primary, var(--bt--color));
28
- --bt--disabled--background-color: var(--color--disabled, var(--bt--background-color));
29
-
30
- --bt--focus--border: var(--bt--border);
31
- --bt--focus--box-shadow: none;
32
- }
33
-
34
- button {
35
- /*private*/
36
- display: flex;
37
- align-items: center;
38
- justify-content: center;
39
- margin: 0;
40
- cursor: pointer;
41
- transition: background-color 0.2s linear;
42
-
43
- /*public*/
44
- min-width: var(--bt--min-width);
45
- height: var(--bt--height);
46
- font-family: var(--bt--font-family);
47
- font-size: var(--bt--font-size);
48
- font-weight: var(--bt--font-weight);
49
- padding: var(--bt--padding-top) var(--bt--padding-right) var(--bt--padding-bottom) var(--bt--padding-left);
50
- border-radius: var(--bt--border-radius);
51
-
52
- background-color: var(--bt--background-color);
53
- color: var(--bt--color);
54
- fill: var(--bt--color);
55
- border: var(--bt--border);
56
- }
57
-
58
- button:hover{
59
- background-color: var(--bt--hover--background-color);
60
- }
61
-
62
- button:focus{
63
- /*FIXME: Estranho o botão não dar nenhuma indicação de que recebeu foco*/
64
- outline: none;
65
- border: var(--bt--focus--border);
66
- box-shadow: var(--bt--focus--box-shadow);
67
- }
68
-
69
- button:disabled{
70
- background-color: var(--bt--disabled--background-color);
71
- color: var(--bt--disabled--color);
72
- fill: var(--bt--disabled--color);
73
- border: none;
74
- cursor: no-drop;
75
- }
76
-
77
- button.icon{
78
- width: 42px;
79
- min-width: 42px;
80
- height: 42px;
81
- padding: 0px;
82
- }
83
-
84
- a {
85
- /*private*/
86
- font-family: var(--bt--font-family);
87
- font-size: var(--bt--font-size);
88
- font-weight: var(--bt--font-weight);
89
- cursor: pointer;
90
- display: flex;
91
- align-items: center;
92
- justify-content: center;
93
- }
94
-
1
+ :host {
2
+
3
+ /* dimensions */
4
+ --bt--min-width: 100px;
5
+
6
+ /* dimensions */
7
+ --bt--height: 42px;
8
+ --bt__icon--width: 18px;
9
+ --bt__inline__icon--padding: 12px;
10
+
11
+ --bt--padding-top: var(--space--medium, 12px);
12
+ --bt--padding-bottom: var(--space--medium, 12px);
13
+ --bt--padding-right: var(--space--large, 24px);
14
+ --bt--padding-left: var(--space--large, 24px);
15
+
16
+ /* general */
17
+ --bt--color: var(--text--inverted, #FFF);
18
+ --bt--font-size: var(--text--medium, 14px);
19
+ --bt--font-family: var(--font-pattern, Arial);
20
+ --bt--font-weight: var(--text-weight--large);
21
+ --bt--background-color: var(--color--primary, #c0c0c0);
22
+ --bt--border-radius: var(--border--radius-large, 12px);
23
+ --bt--border: none;
24
+
25
+ --bt--hover--background-color: var(--color--primary-700, var(--bt--background-color));
26
+
27
+ --bt--disabled--color: var(--color--disable-primary, var(--bt--color));
28
+ --bt--disabled--background-color: var(--color--disabled, var(--bt--background-color));
29
+
30
+ --bt--focus--border: var(--bt--border);
31
+ --bt--focus--box-shadow: none;
32
+ }
33
+
34
+ button {
35
+ /*private*/
36
+ display: flex;
37
+ align-items: center;
38
+ justify-content: center;
39
+ margin: 0;
40
+ cursor: pointer;
41
+ transition: background-color 0.2s linear;
42
+
43
+ /*public*/
44
+ min-width: var(--bt--min-width);
45
+ height: var(--bt--height);
46
+ font-family: var(--bt--font-family);
47
+ font-size: var(--bt--font-size);
48
+ font-weight: var(--bt--font-weight);
49
+ padding: var(--bt--padding-top) var(--bt--padding-right) var(--bt--padding-bottom) var(--bt--padding-left);
50
+ border-radius: var(--bt--border-radius);
51
+
52
+ background-color: var(--bt--background-color);
53
+ color: var(--bt--color);
54
+ fill: var(--bt--color);
55
+ border: var(--bt--border);
56
+ }
57
+
58
+ button:hover{
59
+ background-color: var(--bt--hover--background-color);
60
+ }
61
+
62
+ button:focus{
63
+ /*FIXME: Estranho o botão não dar nenhuma indicação de que recebeu foco*/
64
+ outline: none;
65
+ border: var(--bt--focus--border);
66
+ box-shadow: var(--bt--focus--box-shadow);
67
+ }
68
+
69
+ button:disabled{
70
+ background-color: var(--bt--disabled--background-color);
71
+ color: var(--bt--disabled--color);
72
+ fill: var(--bt--disabled--color);
73
+ border: none;
74
+ cursor: no-drop;
75
+ }
76
+
77
+ button.icon{
78
+ width: 42px;
79
+ min-width: 42px;
80
+ height: 42px;
81
+ padding: 0px;
82
+ }
83
+
84
+ a {
85
+ /*private*/
86
+ font-family: var(--bt--font-family);
87
+ font-size: var(--bt--font-size);
88
+ font-weight: var(--bt--font-weight);
89
+ cursor: pointer;
90
+ display: flex;
91
+ align-items: center;
92
+ justify-content: center;
93
+ }
94
+
@@ -1,125 +1,125 @@
1
- import { Component, h, Prop } from '@stencil/core';
2
- export class EzButton {
3
- constructor() {
4
- /**
5
- * Deixa o botão disponível ou não para interação com o usuário.
6
- */
7
- this.enabled = true;
8
- /**
9
- * Define o modo de uso do botão; opções: icon, link e regular
10
- */
11
- this.mode = "regular";
12
- }
13
- handleSlotChange(ev) {
14
- const slot = ev.target;
15
- const content = slot.assignedElements()[0];
16
- if (this.mode == "link") {
17
- content.style.display = "inline";
18
- if (slot.name == "leftIcon") {
19
- content.style.paddingRight = "var(--bt__inline__icon--padding)";
20
- }
21
- else if (slot.name == "rightIcon") {
22
- content.style.paddingLeft = "var(--bt__inline__icon--padding)";
23
- }
24
- }
25
- }
26
- render() {
27
- if (this.mode == "icon") {
28
- return (h("button", { class: "icon", type: "button", disabled: !this.enabled },
29
- h("ez-icon", { class: "icon", href: this.image, size: "large", onClick: evt => { if (!this.enabled)
30
- evt.stopPropagation(); } })));
31
- }
32
- else if (this.mode == "link") {
33
- return (h("a", null,
34
- h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }),
35
- this.label,
36
- h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } })));
37
- }
38
- else {
39
- return (h("button", { type: "button", disabled: !this.enabled },
40
- h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }),
41
- this.label,
42
- h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } })));
43
- }
44
- }
45
- static get is() { return "ez-button"; }
46
- static get encapsulation() { return "shadow"; }
47
- static get originalStyleUrls() { return {
48
- "$": ["ez-button.css"]
49
- }; }
50
- static get styleUrls() { return {
51
- "$": ["ez-button.css"]
52
- }; }
53
- static get properties() { return {
54
- "label": {
55
- "type": "string",
56
- "mutable": false,
57
- "complexType": {
58
- "original": "string",
59
- "resolved": "string",
60
- "references": {}
61
- },
62
- "required": false,
63
- "optional": false,
64
- "docs": {
65
- "tags": [],
66
- "text": "Texto indicativo da a\u00E7\u00E3o do bot\u00E3o."
67
- },
68
- "attribute": "label",
69
- "reflect": true
70
- },
71
- "enabled": {
72
- "type": "boolean",
73
- "mutable": false,
74
- "complexType": {
75
- "original": "boolean",
76
- "resolved": "boolean",
77
- "references": {}
78
- },
79
- "required": false,
80
- "optional": false,
81
- "docs": {
82
- "tags": [],
83
- "text": "Deixa o bot\u00E3o dispon\u00EDvel ou n\u00E3o para intera\u00E7\u00E3o com o usu\u00E1rio."
84
- },
85
- "attribute": "enabled",
86
- "reflect": true,
87
- "defaultValue": "true"
88
- },
89
- "mode": {
90
- "type": "string",
91
- "mutable": false,
92
- "complexType": {
93
- "original": "string",
94
- "resolved": "string",
95
- "references": {}
96
- },
97
- "required": false,
98
- "optional": false,
99
- "docs": {
100
- "tags": [],
101
- "text": "Define o modo de uso do bot\u00E3o; op\u00E7\u00F5es: icon, link e regular"
102
- },
103
- "attribute": "mode",
104
- "reflect": true,
105
- "defaultValue": "\"regular\""
106
- },
107
- "image": {
108
- "type": "string",
109
- "mutable": false,
110
- "complexType": {
111
- "original": "string",
112
- "resolved": "string",
113
- "references": {}
114
- },
115
- "required": false,
116
- "optional": false,
117
- "docs": {
118
- "tags": [],
119
- "text": "Define o icone svg que ser\u00E1 utilizado no bot\u00E3o, est\u00E1 propriedade s\u00F3 \u00E9 utilizada caso o componente esteja no modo 'icon'"
120
- },
121
- "attribute": "image",
122
- "reflect": true
123
- }
124
- }; }
125
- }
1
+ import { Component, h, Prop } from '@stencil/core';
2
+ export class EzButton {
3
+ constructor() {
4
+ /**
5
+ * Deixa o botão disponível ou não para interação com o usuário.
6
+ */
7
+ this.enabled = true;
8
+ /**
9
+ * Define o modo de uso do botão; opções: icon, link e regular
10
+ */
11
+ this.mode = "regular";
12
+ }
13
+ handleSlotChange(ev) {
14
+ const slot = ev.target;
15
+ const content = slot.assignedElements()[0];
16
+ if (this.mode == "link") {
17
+ content.style.display = "inline";
18
+ if (slot.name == "leftIcon") {
19
+ content.style.paddingRight = "var(--bt__inline__icon--padding)";
20
+ }
21
+ else if (slot.name == "rightIcon") {
22
+ content.style.paddingLeft = "var(--bt__inline__icon--padding)";
23
+ }
24
+ }
25
+ }
26
+ render() {
27
+ if (this.mode == "icon") {
28
+ return (h("button", { class: "icon", type: "button", disabled: !this.enabled },
29
+ h("ez-icon", { class: "icon", href: this.image, size: "large", onClick: evt => { if (!this.enabled)
30
+ evt.stopPropagation(); } })));
31
+ }
32
+ else if (this.mode == "link") {
33
+ return (h("a", null,
34
+ h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }),
35
+ this.label,
36
+ h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } })));
37
+ }
38
+ else {
39
+ return (h("button", { type: "button", disabled: !this.enabled },
40
+ h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }),
41
+ this.label,
42
+ h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } })));
43
+ }
44
+ }
45
+ static get is() { return "ez-button"; }
46
+ static get encapsulation() { return "shadow"; }
47
+ static get originalStyleUrls() { return {
48
+ "$": ["ez-button.css"]
49
+ }; }
50
+ static get styleUrls() { return {
51
+ "$": ["ez-button.css"]
52
+ }; }
53
+ static get properties() { return {
54
+ "label": {
55
+ "type": "string",
56
+ "mutable": false,
57
+ "complexType": {
58
+ "original": "string",
59
+ "resolved": "string",
60
+ "references": {}
61
+ },
62
+ "required": false,
63
+ "optional": false,
64
+ "docs": {
65
+ "tags": [],
66
+ "text": "Texto indicativo da a\u00E7\u00E3o do bot\u00E3o."
67
+ },
68
+ "attribute": "label",
69
+ "reflect": true
70
+ },
71
+ "enabled": {
72
+ "type": "boolean",
73
+ "mutable": false,
74
+ "complexType": {
75
+ "original": "boolean",
76
+ "resolved": "boolean",
77
+ "references": {}
78
+ },
79
+ "required": false,
80
+ "optional": false,
81
+ "docs": {
82
+ "tags": [],
83
+ "text": "Deixa o bot\u00E3o dispon\u00EDvel ou n\u00E3o para intera\u00E7\u00E3o com o usu\u00E1rio."
84
+ },
85
+ "attribute": "enabled",
86
+ "reflect": true,
87
+ "defaultValue": "true"
88
+ },
89
+ "mode": {
90
+ "type": "string",
91
+ "mutable": false,
92
+ "complexType": {
93
+ "original": "string",
94
+ "resolved": "string",
95
+ "references": {}
96
+ },
97
+ "required": false,
98
+ "optional": false,
99
+ "docs": {
100
+ "tags": [],
101
+ "text": "Define o modo de uso do bot\u00E3o; op\u00E7\u00F5es: icon, link e regular"
102
+ },
103
+ "attribute": "mode",
104
+ "reflect": true,
105
+ "defaultValue": "\"regular\""
106
+ },
107
+ "image": {
108
+ "type": "string",
109
+ "mutable": false,
110
+ "complexType": {
111
+ "original": "string",
112
+ "resolved": "string",
113
+ "references": {}
114
+ },
115
+ "required": false,
116
+ "optional": false,
117
+ "docs": {
118
+ "tags": [],
119
+ "text": "Define o icone svg que ser\u00E1 utilizado no bot\u00E3o, est\u00E1 propriedade s\u00F3 \u00E9 utilizada caso o componente esteja no modo 'icon'"
120
+ },
121
+ "attribute": "image",
122
+ "reflect": true
123
+ }
124
+ }; }
125
+ }