xv-webcomponents 0.1.46 → 0.1.50

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 (90) hide show
  1. package/dist/cjs/{index-MLh9SbX2.js → index-CjhPTfz8.js} +41 -14
  2. package/dist/cjs/index-CjhPTfz8.js.map +1 -0
  3. package/dist/cjs/loader.cjs.js +3 -4
  4. package/dist/cjs/loader.cjs.js.map +1 -1
  5. package/dist/cjs/xv-accordion-v2_38.cjs.entry.js +79193 -0
  6. package/dist/cjs/xv-accordion-v2_38.cjs.entry.js.map +1 -0
  7. package/dist/cjs/xv-breadcrumbs-v2.cjs.entry.js +1 -1
  8. package/dist/cjs/xv-webcomponents.cjs.js +4 -5
  9. package/dist/cjs/xv-webcomponents.cjs.js.map +1 -1
  10. package/dist/collection/collection-manifest.json +5 -1
  11. package/dist/collection/components/xv-datepicker/xv-datepicker.css +401 -0
  12. package/dist/collection/components/xv-datepicker/xv-datepicker.js +570 -0
  13. package/dist/collection/components/xv-datepicker/xv-datepicker.js.map +1 -0
  14. package/dist/collection/components/xv-dropdown/xv-dropdown-item/xv-dropdown-item.js +1 -1
  15. package/dist/collection/components/xv-dropdown/xv-dropdown.js +2 -2
  16. package/dist/collection/components/xv-dropdown/xv-dropdown.js.map +1 -1
  17. package/dist/collection/components/xv-file-uploader/xv-file-uploader.js +2 -2
  18. package/dist/collection/components/xv-footer/xv-footer.js +1 -1
  19. package/dist/collection/components/xv-header/xv-header.css +109 -0
  20. package/dist/collection/components/xv-header/xv-header.js +131 -3
  21. package/dist/collection/components/xv-header/xv-header.js.map +1 -1
  22. package/dist/collection/components/xv-link/xv-link.js +1 -1
  23. package/dist/collection/components/xv-modal/xv-modal.js +1 -1
  24. package/dist/collection/components/xv-notification/xv-notification.css +1 -1
  25. package/dist/collection/components/xv-notification/xv-notification.js +1 -1
  26. package/dist/collection/components/xv-number-input/xv-number-input.js +2 -2
  27. package/dist/collection/components/xv-overflow-menu/xv-overflow-menu-item/xv-overflow-menu-item.js +1 -1
  28. package/dist/collection/components/xv-overflow-menu/xv-overflow-menu.js +1 -1
  29. package/dist/collection/components/xv-progress-indicator/xv-progress-indicator-item/xv-progress-indicator-item.js +1 -1
  30. package/dist/collection/components/xv-progress-indicator/xv-progress-indicator.js +1 -1
  31. package/dist/collection/components/xv-slider/xv-slider.css +196 -0
  32. package/dist/collection/components/xv-slider/xv-slider.js +259 -0
  33. package/dist/collection/components/xv-slider/xv-slider.js.map +1 -0
  34. package/dist/collection/components/xv-table/xv-table-cell/xv-table-cell.js +1 -1
  35. package/dist/collection/components/xv-table/xv-table-expand/xv-table-expand.js +1 -1
  36. package/dist/collection/components/xv-table/xv-table-row/xv-table-row.js +1 -1
  37. package/dist/collection/components/xv-table/xv-table.js +1 -1
  38. package/dist/collection/components/xv-tabs/xv-tab/xv-tab.js +1 -1
  39. package/dist/collection/components/xv-tag/xv-tag.js +1 -1
  40. package/dist/collection/components/xv-text-input/xv-text-input.js +2 -2
  41. package/dist/collection/components/xv-textarea/xv-textarea.css +254 -0
  42. package/dist/collection/components/xv-textarea/xv-textarea.js +411 -0
  43. package/dist/collection/components/xv-textarea/xv-textarea.js.map +1 -0
  44. package/dist/collection/components/xv-tile/xv-tile.css +294 -0
  45. package/dist/collection/components/xv-tile/xv-tile.js +264 -0
  46. package/dist/collection/components/xv-tile/xv-tile.js.map +1 -0
  47. package/dist/collection/components/xv-toggle-tip/xv-toggle-tip.js +1 -1
  48. package/dist/collection/components/xv-tooltip/xv-tooltip.js +2 -2
  49. package/dist/esm/{index-DLYJiP99.js → index-BQoQLd_U.js} +41 -15
  50. package/dist/esm/index-BQoQLd_U.js.map +1 -0
  51. package/dist/esm/loader.js +3 -4
  52. package/dist/esm/loader.js.map +1 -1
  53. package/dist/esm/xv-accordion-v2_38.entry.js +79154 -0
  54. package/dist/esm/xv-accordion-v2_38.entry.js.map +1 -0
  55. package/dist/esm/xv-breadcrumbs-v2.entry.js +1 -1
  56. package/dist/esm/xv-webcomponents.js +4 -5
  57. package/dist/esm/xv-webcomponents.js.map +1 -1
  58. package/dist/types/components/xv-datepicker/xv-datepicker.d.ts +69 -0
  59. package/dist/types/components/xv-header/xv-header.d.ts +30 -0
  60. package/dist/types/components/xv-slider/xv-slider.d.ts +20 -0
  61. package/dist/types/components/xv-textarea/xv-textarea.d.ts +27 -0
  62. package/dist/types/components/xv-tile/xv-tile.d.ts +24 -0
  63. package/dist/types/components.d.ts +344 -0
  64. package/dist/types/stencil-public-runtime.d.ts +1 -1
  65. package/dist/xv-webcomponents/loader.esm.js.map +1 -1
  66. package/dist/xv-webcomponents/p-BQoQLd_U.js +3 -0
  67. package/dist/xv-webcomponents/p-BQoQLd_U.js.map +1 -0
  68. package/dist/xv-webcomponents/{p-851c4716.entry.js → p-a8d785da.entry.js} +2 -2
  69. package/dist/xv-webcomponents/p-f00c82ed.entry.js +2 -0
  70. package/dist/xv-webcomponents/p-f00c82ed.entry.js.map +1 -0
  71. package/dist/xv-webcomponents/xv-webcomponents.esm.js +1 -1
  72. package/dist/xv-webcomponents/xv-webcomponents.esm.js.map +1 -1
  73. package/package.json +7 -4
  74. package/dist/cjs/app-globals-V2Kpy_OQ.js +0 -8
  75. package/dist/cjs/app-globals-V2Kpy_OQ.js.map +0 -1
  76. package/dist/cjs/index-MLh9SbX2.js.map +0 -1
  77. package/dist/cjs/xv-accordion-v2_34.cjs.entry.js +0 -3542
  78. package/dist/cjs/xv-accordion-v2_34.cjs.entry.js.map +0 -1
  79. package/dist/esm/app-globals-DQuL1Twl.js +0 -6
  80. package/dist/esm/app-globals-DQuL1Twl.js.map +0 -1
  81. package/dist/esm/index-DLYJiP99.js.map +0 -1
  82. package/dist/esm/xv-accordion-v2_34.entry.js +0 -3507
  83. package/dist/esm/xv-accordion-v2_34.entry.js.map +0 -1
  84. package/dist/xv-webcomponents/p-DLYJiP99.js +0 -3
  85. package/dist/xv-webcomponents/p-DLYJiP99.js.map +0 -1
  86. package/dist/xv-webcomponents/p-DQuL1Twl.js +0 -2
  87. package/dist/xv-webcomponents/p-DQuL1Twl.js.map +0 -1
  88. package/dist/xv-webcomponents/p-d96c1b6a.entry.js +0 -2
  89. package/dist/xv-webcomponents/p-d96c1b6a.entry.js.map +0 -1
  90. /package/dist/xv-webcomponents/{p-851c4716.entry.js.map → p-a8d785da.entry.js.map} +0 -0
@@ -0,0 +1,254 @@
1
+ .xv-tooltip[role=tooltip] {
2
+ position: absolute;
3
+ background-color: var(--background-inverse, #333333);
4
+ color: var(--text-on-color);
5
+ padding: var(--spacing-03) var(--spacing-04);
6
+ border-radius: 3px;
7
+ font-size: var(--fz-sm);
8
+ z-index: 999;
9
+ min-width: min(150px, 90vw);
10
+ max-width: min(400px, 90vw);
11
+ }
12
+ .xv-tooltip[role=tooltip]::after {
13
+ content: "";
14
+ position: absolute;
15
+ width: 0;
16
+ height: 0;
17
+ border-style: solid;
18
+ }
19
+ .xv-tooltip[role=tooltip][data-popper-placement=top]::after {
20
+ bottom: -5px;
21
+ left: 50%;
22
+ transform: translateX(-50%);
23
+ border-width: 5px 5px 0 5px;
24
+ border-color: var(--background-inverse, black) transparent transparent transparent;
25
+ }
26
+ .xv-tooltip[role=tooltip][data-popper-placement=top-start]::after {
27
+ bottom: -5px;
28
+ left: 12px;
29
+ border-width: 5px 5px 0 5px;
30
+ border-color: var(--background-inverse, black) transparent transparent transparent;
31
+ }
32
+ .xv-tooltip[role=tooltip][data-popper-placement=top-end]::after {
33
+ bottom: -5px;
34
+ right: 12px;
35
+ border-width: 5px 5px 0 5px;
36
+ border-color: var(--background-inverse, black) transparent transparent transparent;
37
+ }
38
+ .xv-tooltip[role=tooltip][data-popper-placement=bottom]::after {
39
+ top: -5px;
40
+ left: 50%;
41
+ transform: translateX(-50%);
42
+ border-width: 0 5px 5px 5px;
43
+ border-color: transparent transparent var(--background-inverse, black) transparent;
44
+ }
45
+ .xv-tooltip[role=tooltip][data-popper-placement=bottom-start]::after {
46
+ top: -5px;
47
+ left: 12px;
48
+ border-width: 0 5px 5px 5px;
49
+ border-color: transparent transparent var(--background-inverse, black) transparent;
50
+ }
51
+ .xv-tooltip[role=tooltip][data-popper-placement=bottom-end]::after {
52
+ top: -5px;
53
+ right: 12px;
54
+ border-width: 0 5px 5px 5px;
55
+ border-color: transparent transparent var(--background-inverse, black) transparent;
56
+ }
57
+ .xv-tooltip[role=tooltip][data-popper-placement=left]::after {
58
+ top: 50%;
59
+ right: -5px;
60
+ transform: translateY(-50%);
61
+ border-width: 5px 0 5px 5px;
62
+ border-color: transparent transparent transparent var(--background-inverse, black);
63
+ }
64
+ .xv-tooltip[role=tooltip][data-popper-placement=left-start]::after {
65
+ top: 12px;
66
+ right: -5px;
67
+ border-width: 5px 0 5px 5px;
68
+ border-color: transparent transparent transparent var(--background-inverse, black);
69
+ }
70
+ .xv-tooltip[role=tooltip][data-popper-placement=left-end]::after {
71
+ bottom: 12px;
72
+ right: -5px;
73
+ border-width: 5px 0 5px 5px;
74
+ border-color: transparent transparent transparent var(--background-inverse, black);
75
+ }
76
+ .xv-tooltip[role=tooltip][data-popper-placement=right]::after {
77
+ top: 50%;
78
+ left: -5px;
79
+ transform: translateY(-50%);
80
+ border-width: 5px 5px 5px 0;
81
+ border-color: transparent var(--background-inverse, black) transparent transparent;
82
+ }
83
+ .xv-tooltip[role=tooltip][data-popper-placement=right-start]::after {
84
+ top: 12px;
85
+ left: -5px;
86
+ border-width: 5px 5px 5px 0;
87
+ border-color: transparent var(--background-inverse, black) transparent transparent;
88
+ }
89
+ .xv-tooltip[role=tooltip][data-popper-placement=right-end]::after {
90
+ bottom: 12px;
91
+ left: -5px;
92
+ border-width: 5px 5px 5px 0;
93
+ border-color: transparent var(--background-inverse, black) transparent transparent;
94
+ }
95
+
96
+ :host {
97
+ display: inline-block;
98
+ text-align: left;
99
+ }
100
+ :host .control_label {
101
+ display: flex;
102
+ justify-content: space-between;
103
+ column-gap: var(--spacing-03);
104
+ margin: 0 0 var(--spacing-03);
105
+ color: var(--text-secondary, #515151);
106
+ font-family: var(--ff-body, Tahoma);
107
+ font-size: var(--fz-sm, 12px);
108
+ font-style: normal;
109
+ font-weight: 700;
110
+ line-height: var(--fz-md);
111
+ letter-spacing: 0.32px;
112
+ }
113
+ :host .control_label__count {
114
+ font-weight: 400;
115
+ }
116
+ :host .control_label [role=tooltip] {
117
+ margin-left: var(--spacing-03);
118
+ }
119
+ :host .control_input {
120
+ display: flex;
121
+ position: relative;
122
+ border: 1px solid var(--border-subtle-01);
123
+ font-size: var(--fz-md, 14px);
124
+ outline: 2px solid transparent;
125
+ background-color: transparent;
126
+ border-radius: 3px;
127
+ transition: 250ms ease-in-out border-color, 250ms ease-in-out outline-color;
128
+ }
129
+ :host .control_input:hover {
130
+ border-color: var(--border-subtle-selected-01);
131
+ }
132
+ :host .control_input:focus-within {
133
+ outline-color: var(--focus);
134
+ }
135
+ :host .control_input.error {
136
+ outline-color: var(--support-error);
137
+ }
138
+ :host .control_input.readonly {
139
+ border-radius: 0;
140
+ border-top-width: 0;
141
+ border-left-width: 0;
142
+ border-right-width: 0;
143
+ outline-color: transparent;
144
+ }
145
+ :host .control_input.error textarea, :host .control_input.warning textarea {
146
+ padding-inline-end: calc(var(--spacing-05, 16px) + 16px);
147
+ }
148
+ :host .control_input textarea {
149
+ flex: 1;
150
+ border: none;
151
+ outline: none;
152
+ margin: 0;
153
+ font-family: inherit;
154
+ background-color: transparent;
155
+ padding-block: var(--spacing-05);
156
+ padding-inline: var(--spacing-05);
157
+ box-sizing: border-box;
158
+ color: var(--text-primary);
159
+ min-width: 20px;
160
+ font-size: inherit;
161
+ font-style: normal;
162
+ font-weight: 400;
163
+ letter-spacing: 0.16px;
164
+ }
165
+ :host .control_input textarea.no-resize {
166
+ resize: none;
167
+ }
168
+ :host .control_input__icons {
169
+ position: absolute;
170
+ right: var(--spacing-05);
171
+ top: var(--spacing-05);
172
+ display: inline-flex;
173
+ align-items: stretch;
174
+ column-gap: 2px;
175
+ }
176
+ :host .control_input__icons .status-icon {
177
+ display: inline-flex;
178
+ align-items: center;
179
+ align-self: center;
180
+ font-size: 16px;
181
+ line-height: 1;
182
+ }
183
+ :host .control_input__icons .status-icon.error {
184
+ background-color: var(--support-error);
185
+ color: white;
186
+ width: 16px;
187
+ height: 16px;
188
+ border-radius: 8px;
189
+ font-size: 12px;
190
+ font-weight: bold;
191
+ align-items: center;
192
+ justify-content: center;
193
+ }
194
+ :host .control_input__icons .status-icon.warning {
195
+ color: var(--support-warning);
196
+ }
197
+ :host .message {
198
+ margin: var(--spacing-02) 0 0;
199
+ color: var(--text-helper, #646464);
200
+ font-size: var(--fz-sm, 12px);
201
+ font-style: normal;
202
+ font-weight: 400;
203
+ line-height: var(--fz-md, 16px);
204
+ letter-spacing: 0.32px;
205
+ }
206
+ :host .message.error {
207
+ color: var(--text-error);
208
+ }
209
+ :host .message.warning {
210
+ color: var(--text-secondary, #515151);
211
+ }
212
+
213
+ :host(.disabled) {
214
+ cursor: not-allowed;
215
+ }
216
+ :host(.disabled) .control_label,
217
+ :host(.disabled) .control_input textarea,
218
+ :host(.disabled) .control_input textarea::placeholder,
219
+ :host(.disabled) .message:not(.error) {
220
+ color: var(--text-disabled);
221
+ cursor: not-allowed;
222
+ }
223
+ :host(.disabled) .control_input__icons,
224
+ :host(.disabled) .message.error {
225
+ opacity: 0.5;
226
+ cursor: not-allowed;
227
+ }
228
+
229
+ :host([block]) {
230
+ display: block;
231
+ }
232
+ :host([block]) .control_input textarea {
233
+ width: 100%;
234
+ }
235
+
236
+ :host([size=xs]) .control_input textarea {
237
+ padding-block: var(--spacing-03);
238
+ font-size: 0.8em;
239
+ }
240
+
241
+ :host([size=sm]) .control_input textarea {
242
+ padding-block: var(--spacing-04);
243
+ font-size: 0.9em;
244
+ }
245
+
246
+ :host([size=lg]) .control_input textarea {
247
+ padding-block: var(--spacing-06);
248
+ font-size: 1.1em;
249
+ }
250
+
251
+ :host([size=xl]) .control_input textarea {
252
+ padding-block: var(--spacing-07);
253
+ font-size: 1.2em;
254
+ }
@@ -0,0 +1,411 @@
1
+ import { Host, h } from "@stencil/core";
2
+ import { SIZE_VAR } from "../../types/enum";
3
+ export class XvTextarea {
4
+ constructor() {
5
+ this.value = '';
6
+ this.loading = false;
7
+ this.rows = 4;
8
+ this.size = SIZE_VAR.MD;
9
+ this.onInput = (e) => {
10
+ const target = e.target;
11
+ const val = target.value;
12
+ if (val.length <= this.max) {
13
+ this.value = val;
14
+ this.valueChange.emit(val);
15
+ this.internals.setFormValue(this.value);
16
+ }
17
+ };
18
+ }
19
+ componentWillLoad() {
20
+ this.value && this.internals.setFormValue(this.value);
21
+ }
22
+ render() {
23
+ return (h(Host, { key: '66ee739c5464a1493088ad58a7da49d21a61a23f', class: { disabled: !!this.disabled } }, h("label", { key: 'f4cba05eba103c29f6b51de880ebfc828db7a923', class: "control" }, (this.label || this.max) && (h("p", { key: '4e69830461cde1cbc829fc2e17bc303500caf2b8', class: "control_label" }, h("span", { key: '1c29b130c1afb95fec41a1bbb20988423982ee0c' }, this.label, this.info && h("xv-tooltip-v2", { key: '9c76a92576e409ac09253e3cb968232ba3f44119', message: this.info })), this.max !== undefined && !this.counterHide && (h("span", { key: 'e6acf33410925c87e259769cea174f92915fe83f', class: "control_label__count" }, this.value.length || 0, "/", this.max)))), h("div", { key: 'b986d86299a720deb8b740b1c9aa5a3106a97a86', class: {
24
+ 'control_input': true,
25
+ readonly: !!this.readonly,
26
+ error: this.error !== undefined,
27
+ warning: this.warning !== undefined,
28
+ } }, h("textarea", { key: '4b149e70ac094efee896d5a1a2b6a678aa778685', class: { 'no-resize': !!this.noResize }, name: this.name, rows: this.rows, value: this.value, maxLength: this.max, disabled: this.disabled, readOnly: this.readonly, placeholder: this.placeholder, onInput: this.onInput }), h("div", { key: '58714d7348eb9952f393d7e7b2044caf0929878d', class: "control_input__icons" }, this._renderIcon()))), this.helper && h("p", { key: '2ad9e9892167ed2f459f159bfc6159686c4eb803', class: "message" }, this.helper), typeof this.error === 'string' ? (h("p", { class: "message error" }, this.error)) : typeof this.warning === 'string' ? (h("p", { class: "message warning" }, this.warning)) : null));
29
+ }
30
+ _renderIcon() {
31
+ if (this.loading)
32
+ return h("xv-loader-v2", { size: SIZE_VAR.XS });
33
+ if (this.error !== undefined) {
34
+ return h("span", { class: "status-icon error", "aria-hidden": "true" }, "!");
35
+ }
36
+ else if (this.warning !== undefined) {
37
+ return h("span", { class: "status-icon warning", "aria-hidden": "true" }, "\u26A0");
38
+ }
39
+ return null;
40
+ }
41
+ static get is() { return "xv-textarea"; }
42
+ static get encapsulation() { return "shadow"; }
43
+ static get formAssociated() { return true; }
44
+ static get originalStyleUrls() {
45
+ return {
46
+ "$": ["xv-textarea.scss"]
47
+ };
48
+ }
49
+ static get styleUrls() {
50
+ return {
51
+ "$": ["xv-textarea.css"]
52
+ };
53
+ }
54
+ static get properties() {
55
+ return {
56
+ "value": {
57
+ "type": "string",
58
+ "attribute": "value",
59
+ "mutable": true,
60
+ "complexType": {
61
+ "original": "string",
62
+ "resolved": "string",
63
+ "references": {}
64
+ },
65
+ "required": false,
66
+ "optional": false,
67
+ "docs": {
68
+ "tags": [],
69
+ "text": ""
70
+ },
71
+ "getter": false,
72
+ "setter": false,
73
+ "reflect": false,
74
+ "defaultValue": "''"
75
+ },
76
+ "name": {
77
+ "type": "string",
78
+ "attribute": "name",
79
+ "mutable": false,
80
+ "complexType": {
81
+ "original": "string",
82
+ "resolved": "string",
83
+ "references": {}
84
+ },
85
+ "required": false,
86
+ "optional": true,
87
+ "docs": {
88
+ "tags": [],
89
+ "text": ""
90
+ },
91
+ "getter": false,
92
+ "setter": false,
93
+ "reflect": false
94
+ },
95
+ "label": {
96
+ "type": "string",
97
+ "attribute": "label",
98
+ "mutable": false,
99
+ "complexType": {
100
+ "original": "string",
101
+ "resolved": "string",
102
+ "references": {}
103
+ },
104
+ "required": false,
105
+ "optional": true,
106
+ "docs": {
107
+ "tags": [],
108
+ "text": ""
109
+ },
110
+ "getter": false,
111
+ "setter": false,
112
+ "reflect": false
113
+ },
114
+ "placeholder": {
115
+ "type": "string",
116
+ "attribute": "placeholder",
117
+ "mutable": false,
118
+ "complexType": {
119
+ "original": "string",
120
+ "resolved": "string",
121
+ "references": {}
122
+ },
123
+ "required": false,
124
+ "optional": true,
125
+ "docs": {
126
+ "tags": [],
127
+ "text": ""
128
+ },
129
+ "getter": false,
130
+ "setter": false,
131
+ "reflect": false
132
+ },
133
+ "helper": {
134
+ "type": "string",
135
+ "attribute": "helper",
136
+ "mutable": false,
137
+ "complexType": {
138
+ "original": "string",
139
+ "resolved": "string",
140
+ "references": {}
141
+ },
142
+ "required": false,
143
+ "optional": true,
144
+ "docs": {
145
+ "tags": [],
146
+ "text": ""
147
+ },
148
+ "getter": false,
149
+ "setter": false,
150
+ "reflect": false
151
+ },
152
+ "info": {
153
+ "type": "string",
154
+ "attribute": "info",
155
+ "mutable": false,
156
+ "complexType": {
157
+ "original": "string",
158
+ "resolved": "string",
159
+ "references": {}
160
+ },
161
+ "required": false,
162
+ "optional": true,
163
+ "docs": {
164
+ "tags": [],
165
+ "text": ""
166
+ },
167
+ "getter": false,
168
+ "setter": false,
169
+ "reflect": false
170
+ },
171
+ "error": {
172
+ "type": "any",
173
+ "attribute": "error",
174
+ "mutable": false,
175
+ "complexType": {
176
+ "original": "string | boolean",
177
+ "resolved": "boolean | string",
178
+ "references": {}
179
+ },
180
+ "required": false,
181
+ "optional": true,
182
+ "docs": {
183
+ "tags": [],
184
+ "text": ""
185
+ },
186
+ "getter": false,
187
+ "setter": false,
188
+ "reflect": false
189
+ },
190
+ "warning": {
191
+ "type": "any",
192
+ "attribute": "warning",
193
+ "mutable": false,
194
+ "complexType": {
195
+ "original": "string | boolean",
196
+ "resolved": "boolean | string",
197
+ "references": {}
198
+ },
199
+ "required": false,
200
+ "optional": true,
201
+ "docs": {
202
+ "tags": [],
203
+ "text": ""
204
+ },
205
+ "getter": false,
206
+ "setter": false,
207
+ "reflect": false
208
+ },
209
+ "disabled": {
210
+ "type": "boolean",
211
+ "attribute": "disabled",
212
+ "mutable": false,
213
+ "complexType": {
214
+ "original": "boolean",
215
+ "resolved": "boolean",
216
+ "references": {}
217
+ },
218
+ "required": false,
219
+ "optional": true,
220
+ "docs": {
221
+ "tags": [],
222
+ "text": ""
223
+ },
224
+ "getter": false,
225
+ "setter": false,
226
+ "reflect": false
227
+ },
228
+ "readonly": {
229
+ "type": "boolean",
230
+ "attribute": "readonly",
231
+ "mutable": false,
232
+ "complexType": {
233
+ "original": "boolean",
234
+ "resolved": "boolean",
235
+ "references": {}
236
+ },
237
+ "required": false,
238
+ "optional": true,
239
+ "docs": {
240
+ "tags": [],
241
+ "text": ""
242
+ },
243
+ "getter": false,
244
+ "setter": false,
245
+ "reflect": false
246
+ },
247
+ "block": {
248
+ "type": "boolean",
249
+ "attribute": "block",
250
+ "mutable": false,
251
+ "complexType": {
252
+ "original": "boolean",
253
+ "resolved": "boolean",
254
+ "references": {}
255
+ },
256
+ "required": false,
257
+ "optional": true,
258
+ "docs": {
259
+ "tags": [],
260
+ "text": ""
261
+ },
262
+ "getter": false,
263
+ "setter": false,
264
+ "reflect": false
265
+ },
266
+ "counterHide": {
267
+ "type": "boolean",
268
+ "attribute": "counter-hide",
269
+ "mutable": false,
270
+ "complexType": {
271
+ "original": "boolean",
272
+ "resolved": "boolean",
273
+ "references": {}
274
+ },
275
+ "required": false,
276
+ "optional": true,
277
+ "docs": {
278
+ "tags": [],
279
+ "text": ""
280
+ },
281
+ "getter": false,
282
+ "setter": false,
283
+ "reflect": false
284
+ },
285
+ "noResize": {
286
+ "type": "boolean",
287
+ "attribute": "no-resize",
288
+ "mutable": false,
289
+ "complexType": {
290
+ "original": "boolean",
291
+ "resolved": "boolean",
292
+ "references": {}
293
+ },
294
+ "required": false,
295
+ "optional": true,
296
+ "docs": {
297
+ "tags": [],
298
+ "text": ""
299
+ },
300
+ "getter": false,
301
+ "setter": false,
302
+ "reflect": false
303
+ },
304
+ "loading": {
305
+ "type": "boolean",
306
+ "attribute": "loading",
307
+ "mutable": false,
308
+ "complexType": {
309
+ "original": "boolean",
310
+ "resolved": "boolean",
311
+ "references": {}
312
+ },
313
+ "required": false,
314
+ "optional": false,
315
+ "docs": {
316
+ "tags": [],
317
+ "text": ""
318
+ },
319
+ "getter": false,
320
+ "setter": false,
321
+ "reflect": false,
322
+ "defaultValue": "false"
323
+ },
324
+ "max": {
325
+ "type": "number",
326
+ "attribute": "max",
327
+ "mutable": false,
328
+ "complexType": {
329
+ "original": "number",
330
+ "resolved": "number",
331
+ "references": {}
332
+ },
333
+ "required": false,
334
+ "optional": true,
335
+ "docs": {
336
+ "tags": [],
337
+ "text": ""
338
+ },
339
+ "getter": false,
340
+ "setter": false,
341
+ "reflect": false
342
+ },
343
+ "rows": {
344
+ "type": "number",
345
+ "attribute": "rows",
346
+ "mutable": false,
347
+ "complexType": {
348
+ "original": "number",
349
+ "resolved": "number",
350
+ "references": {}
351
+ },
352
+ "required": false,
353
+ "optional": false,
354
+ "docs": {
355
+ "tags": [],
356
+ "text": ""
357
+ },
358
+ "getter": false,
359
+ "setter": false,
360
+ "reflect": false,
361
+ "defaultValue": "4"
362
+ },
363
+ "size": {
364
+ "type": "string",
365
+ "attribute": "size",
366
+ "mutable": false,
367
+ "complexType": {
368
+ "original": "SIZE_VAR",
369
+ "resolved": "SIZE_VAR.LG | SIZE_VAR.MD | SIZE_VAR.SM | SIZE_VAR.XL | SIZE_VAR.XS",
370
+ "references": {
371
+ "SIZE_VAR": {
372
+ "location": "import",
373
+ "path": "../../types/enum",
374
+ "id": "src/types/enum.ts::SIZE_VAR"
375
+ }
376
+ }
377
+ },
378
+ "required": false,
379
+ "optional": false,
380
+ "docs": {
381
+ "tags": [],
382
+ "text": ""
383
+ },
384
+ "getter": false,
385
+ "setter": false,
386
+ "reflect": true,
387
+ "defaultValue": "SIZE_VAR.MD"
388
+ }
389
+ };
390
+ }
391
+ static get events() {
392
+ return [{
393
+ "method": "valueChange",
394
+ "name": "valueChange",
395
+ "bubbles": true,
396
+ "cancelable": true,
397
+ "composed": true,
398
+ "docs": {
399
+ "tags": [],
400
+ "text": ""
401
+ },
402
+ "complexType": {
403
+ "original": "string",
404
+ "resolved": "string",
405
+ "references": {}
406
+ }
407
+ }];
408
+ }
409
+ static get attachInternalsMemberName() { return "internals"; }
410
+ }
411
+ //# sourceMappingURL=xv-textarea.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"xv-textarea.js","sourceRoot":"","sources":["../../../src/components/xv-textarea/xv-textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAC/F,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAQ5C,MAAM,OAAO,UAAU;IANvB;QAO2B,UAAK,GAAW,EAAE,CAAC;QAapC,YAAO,GAAY,KAAK,CAAC;QAEzB,SAAI,GAAW,CAAC,CAAC;QACA,SAAI,GAAa,QAAQ,CAAC,EAAE,CAAC;QAM9C,YAAO,GAAG,CAAC,CAAQ,EAAE,EAAE;YAC7B,MAAM,MAAM,GAAG,CAAC,CAAC,MAA6B,CAAC;YAC/C,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC;YAEzB,IAAI,GAAG,CAAC,MAAM,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;gBAC3B,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC;gBACjB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBAC3B,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC1C,CAAC;QACH,CAAC,CAAC;KAkEH;IAhEC,iBAAiB;QACf,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACxD,CAAC;IAED,MAAM;QACJ,OAAO,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ent":["import { Component, Host, h, Prop, AttachInternals, Event, EventEmitter } from '@stencil/core';\nimport { SIZE_VAR } from '../../types/enum';\n\n@Component({\n tag: 'xv-textarea',\n styleUrl: 'xv-textarea.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class XvTextarea {\n @Prop({ mutable: true }) value: string = '';\n @Prop() name?: string;\n @Prop() label?: string;\n @Prop() placeholder?: string;\n @Prop() helper?: string;\n @Prop() info?: string;\n @Prop() error?: string | boolean;\n @Prop() warning?: string | boolean;\n @Prop() disabled?: boolean;\n @Prop() readonly?: boolean;\n @Prop() block?: boolean;\n @Prop({ attribute: 'counter-hide' }) counterHide?: boolean;\n @Prop() noResize?: boolean;\n @Prop() loading: boolean = false;\n @Prop() max?: number;\n @Prop() rows: number = 4;\n @Prop({ reflect: true }) size: SIZE_VAR = SIZE_VAR.MD;\n\n @AttachInternals() internals: ElementInternals;\n\n @Event() valueChange: EventEmitter<string>;\n\n private onInput = (e: Event) => {\n const target = e.target as HTMLTextAreaElement;\n const val = target.value;\n\n if (val.length <= this.max) {\n this.value = val;\n this.valueChange.emit(val);\n this.internals.setFormValue(this.value);\n }\n };\n\n componentWillLoad() {\n this.value && this.internals.setFormValue(this.value);\n }\n\n render() {\n return (\n <Host class={{ disabled: !!this.disabled }}>\n <label class=\"control\">\n {(this.label || this.max) && (\n <p class=\"control_label\">\n <span>\n {this.label}\n {this.info && <xv-tooltip-v2 message={this.info}></xv-tooltip-v2>}\n </span>\n {this.max !== undefined && !this.counterHide && (\n <span class=\"control_label__count\">{this.value.length || 0}/{this.max}</span>\n )}\n </p>\n )}\n <div class={{\n 'control_input': true,\n readonly: !!this.readonly,\n error: this.error !== undefined,\n warning: this.warning !== undefined,\n }}>\n <textarea\n class={{ 'no-resize': !!this.noResize }}\n name={this.name}\n rows={this.rows}\n value={this.value}\n maxLength={this.max}\n disabled={this.disabled}\n readOnly={this.readonly}\n placeholder={this.placeholder}\n onInput={this.onInput}\n ></textarea>\n\n <div class=\"control_input__icons\">\n {this._renderIcon()}\n </div>\n </div>\n </label>\n\n {this.helper && <p class=\"message\">{this.helper}</p>}\n {typeof this.error === 'string' ? (\n <p class=\"message error\">{this.error}</p>\n ) : typeof this.warning === 'string' ? (\n <p class=\"message warning\">{this.warning}</p>\n ) : null}\n </Host>\n );\n }\n\n private _renderIcon() {\n if (this.loading) return <xv-loader-v2 size={SIZE_VAR.XS} />;\n\n if (this.error !== undefined) {\n return <span class=\"status-icon error\" aria-hidden=\"true\">!</span>\n } else if (this.warning !== undefined) {\n return <span class=\"status-icon warning\" aria-hidden=\"true\">⚠</span>\n }\n\n return null;\n }\n}\n"]}