xv-webcomponents 0.1.39 → 0.1.42
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.
- package/dist/cjs/{index-D41mMXvd.js → index-MLh9SbX2.js} +349 -8
- package/dist/cjs/index-MLh9SbX2.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{xv-accordion-v2_27.cjs.entry.js → xv-accordion-v2_34.cjs.entry.js} +2323 -97
- package/dist/cjs/xv-accordion-v2_34.cjs.entry.js.map +1 -0
- package/dist/cjs/xv-breadcrumbs-v2.cjs.entry.js +1 -1
- package/dist/cjs/xv-webcomponents.cjs.js +3 -3
- package/dist/cjs/xv-webcomponents.cjs.js.map +1 -1
- package/dist/collection/collection-manifest.json +8 -1
- package/dist/collection/components/xv-button/xv-button-v2.css +136 -118
- package/dist/collection/components/xv-button/xv-button.js +132 -67
- package/dist/collection/components/xv-button/xv-button.js.map +1 -1
- package/dist/collection/components/xv-card/xv-card.js +1 -1
- package/dist/collection/components/xv-checkbox/xv-checkbox.css +3 -0
- package/dist/collection/components/xv-checkbox/xv-checkbox.js +1 -1
- package/dist/collection/components/xv-data-table/_vars.js +3 -0
- package/dist/collection/components/xv-data-table/_vars.js.map +1 -0
- package/dist/collection/components/xv-data-table/xv-data-table-cell/xv-data-table-cell.css +90 -0
- package/dist/collection/components/xv-data-table/xv-data-table-cell/xv-data-table-cell.js +182 -0
- package/dist/collection/components/xv-data-table/xv-data-table-cell/xv-data-table-cell.js.map +1 -0
- package/dist/collection/components/xv-data-table/xv-data-table-collapse/xv-data-table-collapse.css +7 -0
- package/dist/collection/components/xv-data-table/xv-data-table-collapse/xv-data-table-collapse.js +101 -0
- package/dist/collection/components/xv-data-table/xv-data-table-collapse/xv-data-table-collapse.js.map +1 -0
- package/dist/collection/components/xv-data-table/xv-data-table-row/xv-data-table-row.css +71 -0
- package/dist/collection/components/xv-data-table/xv-data-table-row/xv-data-table-row.js +354 -0
- package/dist/collection/components/xv-data-table/xv-data-table-row/xv-data-table-row.js.map +1 -0
- package/dist/collection/components/xv-data-table/xv-data-table.css +104 -0
- package/dist/collection/components/xv-data-table/xv-data-table.js +114 -0
- package/dist/collection/components/xv-data-table/xv-data-table.js.map +1 -0
- package/dist/collection/components/xv-dropdown/xv-dropdown-item/xv-dropdown-item.js +1 -1
- package/dist/collection/components/xv-dropdown/xv-dropdown.css +6 -1
- package/dist/collection/components/xv-dropdown/xv-dropdown.js +20 -1
- package/dist/collection/components/xv-dropdown/xv-dropdown.js.map +1 -1
- package/dist/collection/components/xv-file-uploader/_vars.js +6 -0
- package/dist/collection/components/xv-file-uploader/_vars.js.map +1 -0
- package/dist/collection/components/xv-file-uploader/xv-file-uploader.css +136 -0
- package/dist/collection/components/xv-file-uploader/xv-file-uploader.js +448 -0
- package/dist/collection/components/xv-file-uploader/xv-file-uploader.js.map +1 -0
- package/dist/collection/components/xv-footer/xv-footer.js +1 -1
- package/dist/collection/components/xv-header/xv-header.js +1 -1
- package/dist/collection/components/xv-link/xv-link.css +1 -0
- package/dist/collection/components/xv-link/xv-link.js +1 -1
- package/dist/collection/components/xv-modal/xv-modal.js +1 -1
- package/dist/collection/components/xv-notification/xv-notification.css +1 -0
- package/dist/collection/components/xv-notification/xv-notification.js +1 -1
- package/dist/collection/components/xv-number-input/xv-number-input.css +128 -0
- package/dist/collection/components/xv-number-input/xv-number-input.js +373 -0
- package/dist/collection/components/xv-number-input/xv-number-input.js.map +1 -0
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu-item/xv-overflow-menu-item.js +1 -1
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu.js +1 -1
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator-item/xv-progress-indicator-item.js +1 -1
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator.js +1 -1
- package/dist/collection/components/xv-table/_vars.js +0 -6
- package/dist/collection/components/xv-table/_vars.js.map +1 -1
- package/dist/collection/components/xv-table/xv-table-cell/xv-table-cell.js +4 -4
- package/dist/collection/components/xv-table/xv-table-cell/xv-table-cell.js.map +1 -1
- package/dist/collection/components/xv-table/xv-table-expand/xv-table-expand.js +1 -1
- package/dist/collection/components/xv-table/xv-table-row/xv-table-row.js +1 -1
- package/dist/collection/components/xv-table/xv-table.js +1 -1
- package/dist/collection/components/xv-tabs/xv-tab/xv-tab.js +1 -1
- package/dist/collection/components/xv-tabs/xv-tabs.js +1 -2
- package/dist/collection/components/xv-tabs/xv-tabs.js.map +1 -1
- package/dist/collection/components/xv-tag/xv-tag.js +1 -1
- package/dist/collection/components/xv-text-input/xv-text-input.css +110 -89
- package/dist/collection/components/xv-text-input/xv-text-input.js +113 -80
- package/dist/collection/components/xv-text-input/xv-text-input.js.map +1 -1
- package/dist/collection/components/xv-toggle-tip/xv-toggle-tip.css +95 -0
- package/dist/collection/components/xv-toggle-tip/xv-toggle-tip.js +201 -0
- package/dist/collection/components/xv-toggle-tip/xv-toggle-tip.js.map +1 -0
- package/dist/collection/components/xv-tooltip/xv-tooltip.css +31 -147
- package/dist/collection/components/xv-tooltip/xv-tooltip.js +59 -34
- package/dist/collection/components/xv-tooltip/xv-tooltip.js.map +1 -1
- package/dist/collection/types/enum.js +6 -0
- package/dist/collection/types/enum.js.map +1 -1
- package/dist/esm/{index-Datpns0U.js → index-DLYJiP99.js} +349 -8
- package/dist/esm/index-DLYJiP99.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{xv-accordion-v2_27.entry.js → xv-accordion-v2_34.entry.js} +2317 -98
- package/dist/esm/xv-accordion-v2_34.entry.js.map +1 -0
- package/dist/esm/xv-breadcrumbs-v2.entry.js +1 -1
- package/dist/esm/xv-webcomponents.js +4 -4
- package/dist/esm/xv-webcomponents.js.map +1 -1
- package/dist/types/components/xv-button/xv-button.d.ts +21 -12
- package/dist/types/components/xv-data-table/_vars.d.ts +11 -0
- package/dist/types/components/xv-data-table/xv-data-table-cell/xv-data-table-cell.d.ts +13 -0
- package/dist/types/components/xv-data-table/xv-data-table-collapse/xv-data-table-collapse.d.ts +9 -0
- package/dist/types/components/xv-data-table/xv-data-table-row/xv-data-table-row.d.ts +25 -0
- package/dist/types/components/xv-data-table/xv-data-table.d.ts +9 -0
- package/dist/types/components/xv-dropdown/xv-dropdown.d.ts +1 -0
- package/dist/types/components/xv-file-uploader/_vars.d.ts +4 -0
- package/dist/types/components/xv-file-uploader/xv-file-uploader.d.ts +36 -0
- package/dist/types/components/xv-number-input/xv-number-input.d.ts +26 -0
- package/dist/types/components/xv-table/_vars.d.ts +1 -5
- package/dist/types/components/xv-table/xv-table-cell/xv-table-cell.d.ts +2 -1
- package/dist/types/components/xv-text-input/xv-text-input.d.ts +10 -11
- package/dist/types/components/xv-toggle-tip/xv-toggle-tip.d.ts +19 -0
- package/dist/types/components/xv-tooltip/xv-tooltip.d.ts +10 -8
- package/dist/types/components.d.ts +761 -53
- package/dist/types/types/enum.d.ts +5 -0
- package/dist/xv-webcomponents/{p-054f5d59.entry.js → p-5b63a259.entry.js} +2 -2
- package/dist/xv-webcomponents/p-9c06f44c.entry.js +2 -0
- package/dist/xv-webcomponents/p-9c06f44c.entry.js.map +1 -0
- package/dist/xv-webcomponents/p-DLYJiP99.js +3 -0
- package/dist/xv-webcomponents/p-DLYJiP99.js.map +1 -0
- package/dist/xv-webcomponents/xv-webcomponents.esm.js +1 -1
- package/dist/xv-webcomponents/xv-webcomponents.esm.js.map +1 -1
- package/package.json +6 -4
- package/dist/cjs/index-D41mMXvd.js.map +0 -1
- package/dist/cjs/xv-accordion-v2_27.cjs.entry.js.map +0 -1
- package/dist/collection/components/xv-text-input/_vars.js +0 -7
- package/dist/collection/components/xv-text-input/_vars.js.map +0 -1
- package/dist/esm/index-Datpns0U.js.map +0 -1
- package/dist/esm/xv-accordion-v2_27.entry.js.map +0 -1
- package/dist/types/components/xv-text-input/_vars.d.ts +0 -5
- package/dist/xv-webcomponents/p-6a4cc790.entry.js +0 -2
- package/dist/xv-webcomponents/p-6a4cc790.entry.js.map +0 -1
- package/dist/xv-webcomponents/p-Datpns0U.js +0 -3
- package/dist/xv-webcomponents/p-Datpns0U.js.map +0 -1
- /package/dist/xv-webcomponents/{p-054f5d59.entry.js.map → p-5b63a259.entry.js.map} +0 -0
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
2
|
import { SIZE_VAR } from "../../types/enum";
|
|
3
|
-
import { TextInputStatus } from "./_vars";
|
|
4
3
|
/**
|
|
5
4
|
* xv-text-input — custom input
|
|
6
5
|
* ti get data you can use default Input event
|
|
@@ -8,38 +7,25 @@ import { TextInputStatus } from "./_vars";
|
|
|
8
7
|
*/
|
|
9
8
|
export class XvTextInput {
|
|
10
9
|
constructor() {
|
|
11
|
-
this.
|
|
12
|
-
this.size = SIZE_VAR.MD;
|
|
13
|
-
this.status = TextInputStatus.DEF;
|
|
10
|
+
this.type = 'text';
|
|
14
11
|
this.value = '';
|
|
15
|
-
this.disabled = false;
|
|
16
|
-
this.readonly = false;
|
|
17
12
|
this.loading = false;
|
|
13
|
+
this.size = SIZE_VAR.MD;
|
|
18
14
|
this.handleInput = (e) => {
|
|
19
15
|
const target = e.target;
|
|
20
16
|
this.value = target.value;
|
|
21
17
|
this.valueChange.emit(this.value);
|
|
22
18
|
this.internals.setFormValue(target.value);
|
|
23
19
|
};
|
|
24
|
-
this.getControlIcon = (status) => {
|
|
25
|
-
if (this.loading) {
|
|
26
|
-
return h("xv-loader-v2", { class: "control_icon", size: SIZE_VAR.XS });
|
|
27
|
-
}
|
|
28
|
-
switch (status) {
|
|
29
|
-
case TextInputStatus.ERROR: {
|
|
30
|
-
return (h("svg", { class: "control_icon error", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512" }, h("path", { fill: "currentColor", d: "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z" })));
|
|
31
|
-
}
|
|
32
|
-
case TextInputStatus.WARNING:
|
|
33
|
-
return (h("svg", { class: "control_icon warning", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512" }, h("path", { fill: "currentColor", d: "M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480L40 480c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24l0 112c0 13.3 10.7 24 24 24s24-10.7 24-24l0-112c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z" })));
|
|
34
|
-
default: return null;
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
20
|
}
|
|
38
21
|
render() {
|
|
39
|
-
return (h(Host, { key: '
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
22
|
+
return (h(Host, { key: 'b9c4820d1f0ba4e6baf9cd405c42380577f5379d', class: { disabled: !!this.disabled } }, h("label", { key: 'e331f40fc28c74833276e75c8376270589a17279', class: "control" }, this.label && h("span", { key: '4d48b122402bd36b98495a9bfdf991512126049d', class: "control_label" }, this.label), h("div", { key: '7c4f26d5a943417b54500a54b993108a70a5ed83', class: {
|
|
23
|
+
'control_input': true,
|
|
24
|
+
readonly: !!this.readonly,
|
|
25
|
+
[this.size]: true,
|
|
26
|
+
error: !!this.error,
|
|
27
|
+
warning: !!this.warning,
|
|
28
|
+
} }, h("input", { key: 'b6e5cf7ed95c5649b7c1aff16fe7668c2a05c71b', type: this.type, placeholder: this.placeholder, disabled: this.disabled, readonly: this.readonly, onInput: this.handleInput, name: this.name, value: this.value }), h("div", { key: '739c31f7939b0baaa3e8d49ec61b016005c427ad', class: "control_input__icons" }, this.loading && h("xv-loader-v2", { key: '8aaa989d7ad0fe3b9f86908c648fe2e01c551bc9', size: SIZE_VAR.XS }), !!this.error ? (h("span", { class: "status-icon error", "aria-hidden": "true" }, "!")) : !!this.warning ? (h("span", { class: "status-icon warning", "aria-hidden": "true" }, "\u26A0")) : null))), this.helper && h("p", { key: '7d613edeffa7c6d8e2a76bc69217347187a3b008', 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));
|
|
43
29
|
}
|
|
44
30
|
static get is() { return "xv-text-input-v2"; }
|
|
45
31
|
static get encapsulation() { return "shadow"; }
|
|
@@ -56,6 +42,26 @@ export class XvTextInput {
|
|
|
56
42
|
}
|
|
57
43
|
static get properties() {
|
|
58
44
|
return {
|
|
45
|
+
"type": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"attribute": "type",
|
|
48
|
+
"mutable": false,
|
|
49
|
+
"complexType": {
|
|
50
|
+
"original": "'text' | 'email' | 'password' | 'url' | 'tel'",
|
|
51
|
+
"resolved": "\"email\" | \"password\" | \"tel\" | \"text\" | \"url\"",
|
|
52
|
+
"references": {}
|
|
53
|
+
},
|
|
54
|
+
"required": false,
|
|
55
|
+
"optional": false,
|
|
56
|
+
"docs": {
|
|
57
|
+
"tags": [],
|
|
58
|
+
"text": ""
|
|
59
|
+
},
|
|
60
|
+
"getter": false,
|
|
61
|
+
"setter": false,
|
|
62
|
+
"reflect": false,
|
|
63
|
+
"defaultValue": "'text'"
|
|
64
|
+
},
|
|
59
65
|
"label": {
|
|
60
66
|
"type": "string",
|
|
61
67
|
"attribute": "label",
|
|
@@ -66,14 +72,14 @@ export class XvTextInput {
|
|
|
66
72
|
"references": {}
|
|
67
73
|
},
|
|
68
74
|
"required": false,
|
|
69
|
-
"optional":
|
|
75
|
+
"optional": false,
|
|
70
76
|
"docs": {
|
|
71
77
|
"tags": [],
|
|
72
78
|
"text": ""
|
|
73
79
|
},
|
|
74
80
|
"getter": false,
|
|
75
81
|
"setter": false,
|
|
76
|
-
"reflect":
|
|
82
|
+
"reflect": false
|
|
77
83
|
},
|
|
78
84
|
"placeholder": {
|
|
79
85
|
"type": "string",
|
|
@@ -94,9 +100,9 @@ export class XvTextInput {
|
|
|
94
100
|
"setter": false,
|
|
95
101
|
"reflect": true
|
|
96
102
|
},
|
|
97
|
-
"
|
|
103
|
+
"name": {
|
|
98
104
|
"type": "string",
|
|
99
|
-
"attribute": "
|
|
105
|
+
"attribute": "name",
|
|
100
106
|
"mutable": false,
|
|
101
107
|
"complexType": {
|
|
102
108
|
"original": "string",
|
|
@@ -111,12 +117,31 @@ export class XvTextInput {
|
|
|
111
117
|
},
|
|
112
118
|
"getter": false,
|
|
113
119
|
"setter": false,
|
|
114
|
-
"reflect": true
|
|
120
|
+
"reflect": true
|
|
121
|
+
},
|
|
122
|
+
"value": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"attribute": "value",
|
|
125
|
+
"mutable": true,
|
|
126
|
+
"complexType": {
|
|
127
|
+
"original": "string",
|
|
128
|
+
"resolved": "string",
|
|
129
|
+
"references": {}
|
|
130
|
+
},
|
|
131
|
+
"required": false,
|
|
132
|
+
"optional": false,
|
|
133
|
+
"docs": {
|
|
134
|
+
"tags": [],
|
|
135
|
+
"text": ""
|
|
136
|
+
},
|
|
137
|
+
"getter": false,
|
|
138
|
+
"setter": false,
|
|
139
|
+
"reflect": false,
|
|
115
140
|
"defaultValue": "''"
|
|
116
141
|
},
|
|
117
|
-
"
|
|
142
|
+
"helper": {
|
|
118
143
|
"type": "string",
|
|
119
|
-
"attribute": "
|
|
144
|
+
"attribute": "helper",
|
|
120
145
|
"mutable": false,
|
|
121
146
|
"complexType": {
|
|
122
147
|
"original": "string",
|
|
@@ -131,79 +156,64 @@ export class XvTextInput {
|
|
|
131
156
|
},
|
|
132
157
|
"getter": false,
|
|
133
158
|
"setter": false,
|
|
134
|
-
"reflect":
|
|
159
|
+
"reflect": false
|
|
135
160
|
},
|
|
136
|
-
"
|
|
137
|
-
"type": "
|
|
138
|
-
"attribute": "
|
|
161
|
+
"error": {
|
|
162
|
+
"type": "any",
|
|
163
|
+
"attribute": "error",
|
|
139
164
|
"mutable": false,
|
|
140
165
|
"complexType": {
|
|
141
|
-
"original": "
|
|
142
|
-
"resolved": "
|
|
143
|
-
"references": {
|
|
144
|
-
"SIZE_VAR": {
|
|
145
|
-
"location": "import",
|
|
146
|
-
"path": "../../types/enum",
|
|
147
|
-
"id": "src/types/enum.ts::SIZE_VAR"
|
|
148
|
-
}
|
|
149
|
-
}
|
|
166
|
+
"original": "string | boolean",
|
|
167
|
+
"resolved": "boolean | string",
|
|
168
|
+
"references": {}
|
|
150
169
|
},
|
|
151
170
|
"required": false,
|
|
152
|
-
"optional":
|
|
171
|
+
"optional": true,
|
|
153
172
|
"docs": {
|
|
154
173
|
"tags": [],
|
|
155
174
|
"text": ""
|
|
156
175
|
},
|
|
157
176
|
"getter": false,
|
|
158
177
|
"setter": false,
|
|
159
|
-
"reflect":
|
|
160
|
-
"defaultValue": "SIZE_VAR.MD"
|
|
178
|
+
"reflect": false
|
|
161
179
|
},
|
|
162
|
-
"
|
|
163
|
-
"type": "
|
|
164
|
-
"attribute": "
|
|
180
|
+
"warning": {
|
|
181
|
+
"type": "any",
|
|
182
|
+
"attribute": "warning",
|
|
165
183
|
"mutable": false,
|
|
166
184
|
"complexType": {
|
|
167
|
-
"original": "
|
|
168
|
-
"resolved": "
|
|
169
|
-
"references": {
|
|
170
|
-
"TextInputStatus": {
|
|
171
|
-
"location": "import",
|
|
172
|
-
"path": "./_vars",
|
|
173
|
-
"id": "src/components/xv-text-input/_vars.ts::TextInputStatus"
|
|
174
|
-
}
|
|
175
|
-
}
|
|
185
|
+
"original": "string | boolean",
|
|
186
|
+
"resolved": "boolean | string",
|
|
187
|
+
"references": {}
|
|
176
188
|
},
|
|
177
189
|
"required": false,
|
|
178
|
-
"optional":
|
|
190
|
+
"optional": true,
|
|
179
191
|
"docs": {
|
|
180
192
|
"tags": [],
|
|
181
193
|
"text": ""
|
|
182
194
|
},
|
|
183
195
|
"getter": false,
|
|
184
196
|
"setter": false,
|
|
185
|
-
"reflect":
|
|
186
|
-
"defaultValue": "TextInputStatus.DEF"
|
|
197
|
+
"reflect": false
|
|
187
198
|
},
|
|
188
|
-
"
|
|
189
|
-
"type": "
|
|
190
|
-
"attribute": "
|
|
191
|
-
"mutable":
|
|
199
|
+
"readonly": {
|
|
200
|
+
"type": "boolean",
|
|
201
|
+
"attribute": "readonly",
|
|
202
|
+
"mutable": false,
|
|
192
203
|
"complexType": {
|
|
193
|
-
"original": "
|
|
194
|
-
"resolved": "
|
|
204
|
+
"original": "boolean",
|
|
205
|
+
"resolved": "boolean",
|
|
195
206
|
"references": {}
|
|
196
207
|
},
|
|
197
208
|
"required": false,
|
|
198
|
-
"optional":
|
|
209
|
+
"optional": true,
|
|
199
210
|
"docs": {
|
|
200
211
|
"tags": [],
|
|
201
212
|
"text": ""
|
|
202
213
|
},
|
|
203
214
|
"getter": false,
|
|
204
215
|
"setter": false,
|
|
205
|
-
"reflect":
|
|
206
|
-
"defaultValue": "''"
|
|
216
|
+
"reflect": false
|
|
207
217
|
},
|
|
208
218
|
"disabled": {
|
|
209
219
|
"type": "boolean",
|
|
@@ -215,19 +225,18 @@ export class XvTextInput {
|
|
|
215
225
|
"references": {}
|
|
216
226
|
},
|
|
217
227
|
"required": false,
|
|
218
|
-
"optional":
|
|
228
|
+
"optional": true,
|
|
219
229
|
"docs": {
|
|
220
230
|
"tags": [],
|
|
221
231
|
"text": ""
|
|
222
232
|
},
|
|
223
233
|
"getter": false,
|
|
224
234
|
"setter": false,
|
|
225
|
-
"reflect":
|
|
226
|
-
"defaultValue": "false"
|
|
235
|
+
"reflect": false
|
|
227
236
|
},
|
|
228
|
-
"
|
|
237
|
+
"loading": {
|
|
229
238
|
"type": "boolean",
|
|
230
|
-
"attribute": "
|
|
239
|
+
"attribute": "loading",
|
|
231
240
|
"mutable": false,
|
|
232
241
|
"complexType": {
|
|
233
242
|
"original": "boolean",
|
|
@@ -242,12 +251,12 @@ export class XvTextInput {
|
|
|
242
251
|
},
|
|
243
252
|
"getter": false,
|
|
244
253
|
"setter": false,
|
|
245
|
-
"reflect":
|
|
254
|
+
"reflect": false,
|
|
246
255
|
"defaultValue": "false"
|
|
247
256
|
},
|
|
248
|
-
"
|
|
257
|
+
"block": {
|
|
249
258
|
"type": "boolean",
|
|
250
|
-
"attribute": "
|
|
259
|
+
"attribute": "block",
|
|
251
260
|
"mutable": false,
|
|
252
261
|
"complexType": {
|
|
253
262
|
"original": "boolean",
|
|
@@ -255,6 +264,31 @@ export class XvTextInput {
|
|
|
255
264
|
"references": {}
|
|
256
265
|
},
|
|
257
266
|
"required": false,
|
|
267
|
+
"optional": true,
|
|
268
|
+
"docs": {
|
|
269
|
+
"tags": [],
|
|
270
|
+
"text": ""
|
|
271
|
+
},
|
|
272
|
+
"getter": false,
|
|
273
|
+
"setter": false,
|
|
274
|
+
"reflect": false
|
|
275
|
+
},
|
|
276
|
+
"size": {
|
|
277
|
+
"type": "string",
|
|
278
|
+
"attribute": "size",
|
|
279
|
+
"mutable": false,
|
|
280
|
+
"complexType": {
|
|
281
|
+
"original": "SIZE_VAR",
|
|
282
|
+
"resolved": "SIZE_VAR.LG | SIZE_VAR.MD | SIZE_VAR.SM | SIZE_VAR.XL | SIZE_VAR.XS",
|
|
283
|
+
"references": {
|
|
284
|
+
"SIZE_VAR": {
|
|
285
|
+
"location": "import",
|
|
286
|
+
"path": "../../types/enum",
|
|
287
|
+
"id": "src/types/enum.ts::SIZE_VAR"
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
"required": false,
|
|
258
292
|
"optional": false,
|
|
259
293
|
"docs": {
|
|
260
294
|
"tags": [],
|
|
@@ -263,7 +297,7 @@ export class XvTextInput {
|
|
|
263
297
|
"getter": false,
|
|
264
298
|
"setter": false,
|
|
265
299
|
"reflect": true,
|
|
266
|
-
"defaultValue": "
|
|
300
|
+
"defaultValue": "SIZE_VAR.MD"
|
|
267
301
|
}
|
|
268
302
|
};
|
|
269
303
|
}
|
|
@@ -285,7 +319,6 @@ export class XvTextInput {
|
|
|
285
319
|
}
|
|
286
320
|
}];
|
|
287
321
|
}
|
|
288
|
-
static get elementRef() { return "el"; }
|
|
289
322
|
static get attachInternalsMemberName() { return "internals"; }
|
|
290
323
|
}
|
|
291
324
|
//# sourceMappingURL=xv-text-input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xv-text-input.js","sourceRoot":"","sources":["../../../src/components/xv-text-input/xv-text-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"xv-text-input.js","sourceRoot":"","sources":["../../../src/components/xv-text-input/xv-text-input.tsx"],"names":[],"mappings":"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","sourcesContent":["import { AttachInternals, Component, h, Host, Prop, Event, EventEmitter } from '@stencil/core';\nimport { SIZE_VAR } from '../../types/enum';\n\n/**\n * xv-text-input — custom input\n * ti get data you can use default Input event\n * Angular - (input), React - (onInput), Pure - addEventListener('input', e => ...)\n */\n@Component({\n tag: 'xv-text-input-v2',\n styleUrl: 'xv-text-input.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class XvTextInput {\n @Prop() type: 'text' | 'email' | 'password' | 'url' | 'tel' = 'text';\n @Prop() label: string;\n @Prop({ reflect: true }) placeholder?: string;\n @Prop({ reflect: true }) name: string;\n @Prop({ mutable: true }) value: string = '';\n @Event({ eventName: 'valueChange' }) valueChange: EventEmitter<string>;\n @Prop() helper?: string;\n @Prop() error?: string | boolean;\n @Prop() warning?: string | boolean;\n @Prop() readonly?: boolean;\n @Prop() disabled?: boolean;\n @Prop() loading: boolean = false;\n @Prop() block?: boolean;\n @Prop({ reflect: true }) size: SIZE_VAR = SIZE_VAR.MD;\n\n @AttachInternals() internals: ElementInternals;\n\n private handleInput = (e: InputEvent) => {\n const target = e.target as HTMLInputElement;\n this.value = target.value;\n this.valueChange.emit(this.value);\n this.internals.setFormValue(target.value);\n }\n\n render() {\n return (\n <Host class={{ disabled: !!this.disabled }}>\n <label class=\"control\">\n {this.label && <span class=\"control_label\">{this.label}</span>}\n\n <div class={{\n 'control_input': true,\n readonly: !!this.readonly,\n [this.size]: true,\n error: !!this.error,\n warning: !!this.warning,\n }}>\n <input\n type={this.type}\n placeholder={this.placeholder}\n disabled={this.disabled}\n readonly={this.readonly}\n onInput={this.handleInput}\n name={this.name}\n value={this.value}\n />\n\n <div class=\"control_input__icons\">\n {this.loading && <xv-loader-v2 size={SIZE_VAR.XS} />}\n {!!this.error ? (\n <span class=\"status-icon error\" aria-hidden=\"true\">!</span>\n ) : !!this.warning ? (\n <span class=\"status-icon warning\" aria-hidden=\"true\">⚠</span>\n ) : null}\n </div>\n </div>\n </label>\n\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"]}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
font-family: inherit;
|
|
4
|
+
}
|
|
5
|
+
:host .trigger {
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
transition: 250ms ease-in-out color;
|
|
10
|
+
color: var(--icon-secondary);
|
|
11
|
+
}
|
|
12
|
+
:host .trigger_icon {
|
|
13
|
+
color: inherit;
|
|
14
|
+
}
|
|
15
|
+
:host .trigger ::slotted([slot=trigger]) {
|
|
16
|
+
transition: 250ms ease-in-out color;
|
|
17
|
+
color: var(--icon-secondary);
|
|
18
|
+
}
|
|
19
|
+
:host .trigger:hover, :host .trigger:active,
|
|
20
|
+
:host .trigger ::slotted([slot=trigger]:hover),
|
|
21
|
+
:host .trigger ::slotted([slot=trigger]:active) {
|
|
22
|
+
color: var(--icon-primary);
|
|
23
|
+
}
|
|
24
|
+
:host .trigger:focus,
|
|
25
|
+
:host .trigger ::slotted([slot=trigger]:focus) {
|
|
26
|
+
color: var(--focus);
|
|
27
|
+
}
|
|
28
|
+
:host .popover {
|
|
29
|
+
opacity: 1;
|
|
30
|
+
z-index: 1000;
|
|
31
|
+
position: absolute;
|
|
32
|
+
background-color: var(--background-inverse);
|
|
33
|
+
color: var(--text-inverse);
|
|
34
|
+
border-radius: 4px;
|
|
35
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
|
|
36
|
+
max-width: 288px;
|
|
37
|
+
font-size: 0.875rem;
|
|
38
|
+
line-height: 1.5;
|
|
39
|
+
margin-top: 8px;
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
display: flex;
|
|
42
|
+
}
|
|
43
|
+
:host .popover[data-popper-placement^=top] .popover-tip {
|
|
44
|
+
bottom: -4px;
|
|
45
|
+
}
|
|
46
|
+
:host .popover[data-popper-placement^=bottom] .popover-tip {
|
|
47
|
+
top: -4px;
|
|
48
|
+
}
|
|
49
|
+
:host .popover[data-popper-placement^=left] .popover-tip {
|
|
50
|
+
right: -4px;
|
|
51
|
+
}
|
|
52
|
+
:host .popover[data-popper-placement^=right] .popover-tip {
|
|
53
|
+
left: -4px;
|
|
54
|
+
}
|
|
55
|
+
:host .popover .popover-tip {
|
|
56
|
+
width: 10px;
|
|
57
|
+
height: 10px;
|
|
58
|
+
background-color: transparent;
|
|
59
|
+
z-index: -1;
|
|
60
|
+
}
|
|
61
|
+
:host .popover .popover-tip:before {
|
|
62
|
+
content: "";
|
|
63
|
+
transform: rotate(45deg);
|
|
64
|
+
background-color: var(--background-inverse);
|
|
65
|
+
width: inherit;
|
|
66
|
+
height: inherit;
|
|
67
|
+
display: inline-block;
|
|
68
|
+
}
|
|
69
|
+
:host .popover .popover-content {
|
|
70
|
+
padding: var(--gap-md);
|
|
71
|
+
display: flex;
|
|
72
|
+
flex-direction: column;
|
|
73
|
+
gap: var(--spacing-04);
|
|
74
|
+
}
|
|
75
|
+
:host .popover .popover-content ::slotted([slot=header]) {
|
|
76
|
+
font-size: 0.875rem;
|
|
77
|
+
font-weight: 600;
|
|
78
|
+
color: var(--text-secondary);
|
|
79
|
+
}
|
|
80
|
+
:host .popover .popover-content ::slotted([slot=body]) {
|
|
81
|
+
font-size: 0.875rem;
|
|
82
|
+
color: var(--text-inverse);
|
|
83
|
+
}
|
|
84
|
+
:host .popover .popover-content ::slotted([slot=footer]) {
|
|
85
|
+
font-size: 0.75rem;
|
|
86
|
+
color: var(--text-inverse);
|
|
87
|
+
opacity: 0.8;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
:host(:not([open])) .popover {
|
|
91
|
+
opacity: 0;
|
|
92
|
+
z-index: -1;
|
|
93
|
+
user-select: none;
|
|
94
|
+
pointer-events: none;
|
|
95
|
+
}
|