@3t-transform/threeteeui 0.0.10 → 0.0.11
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-8a4cb9bc.js → index-bf39be87.js} +41 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/tttx-button.cjs.entry.js +2 -2
- package/dist/cjs/tttx-checkbox.cjs.entry.js +3 -3
- package/dist/cjs/tttx-form.cjs.entry.js +169 -41
- package/dist/cjs/tttx-icon.cjs.entry.js +2 -2
- package/dist/cjs/tttx-loading-spinner.cjs.entry.js +4 -4
- package/dist/cjs/tttx-popover-content.cjs.entry.js +2 -2
- package/dist/cjs/tttx-standalone-input.cjs.entry.js +134 -0
- package/dist/cjs/tttx.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/atoms/tttx-button/tttx-button.css +1 -0
- package/dist/collection/components/atoms/tttx-button/tttx-button.stories.js +3 -3
- package/dist/collection/components/atoms/tttx-icon/tttx-icon.css +3 -3
- package/dist/collection/components/atoms/tttx-icon/tttx-icon.stories.js +15 -15
- package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.css +1 -1
- package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.js +2 -2
- package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.js +1 -1
- package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.js +1 -1
- package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.stories.js +3 -3
- package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.css +85 -39
- package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.js +1 -1
- package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.stories.js +5 -5
- package/dist/collection/components/molecules/tttx-form/tttx-form.css +230 -0
- package/dist/collection/components/molecules/tttx-form/tttx-form.js +195 -55
- package/dist/collection/components/molecules/tttx-form/tttx-form.stories.js +97 -28
- package/dist/collection/components/molecules/{tttx-input/tttx-input.css → tttx-standalone-input/tttx-standalone-input.css} +77 -49
- package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.js +561 -0
- package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.js +156 -0
- package/dist/collection/components/palette.stories.js +81 -81
- package/dist/collection/docs/gettingstarted-developer.stories.js +4 -4
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/tttx-button.js +1 -1
- package/dist/components/tttx-checkbox.js +2 -2
- package/dist/components/tttx-form.js +167 -39
- package/dist/components/tttx-icon2.js +1 -1
- package/dist/components/tttx-loading-spinner.js +3 -3
- package/dist/components/tttx-popover-content.js +1 -1
- package/dist/components/{tttx-input.d.ts → tttx-standalone-input.d.ts} +4 -4
- package/dist/components/tttx-standalone-input.js +178 -0
- package/dist/esm/{index-9654537d.js → index-63c4d25e.js} +41 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/tttx-button.entry.js +2 -2
- package/dist/esm/tttx-checkbox.entry.js +3 -3
- package/dist/esm/tttx-form.entry.js +169 -41
- package/dist/esm/tttx-icon.entry.js +2 -2
- package/dist/esm/tttx-loading-spinner.entry.js +4 -4
- package/dist/esm/tttx-popover-content.entry.js +2 -2
- package/dist/esm/tttx-standalone-input.entry.js +130 -0
- package/dist/esm/tttx.js +3 -3
- package/dist/tttx/{p-3cb692d6.entry.js → p-1a4eb1f3.entry.js} +1 -1
- package/dist/tttx/p-2d54f8aa.entry.js +1 -0
- package/dist/tttx/p-338b3976.entry.js +1 -0
- package/dist/tttx/{p-674e2f18.entry.js → p-4c57bcbd.entry.js} +1 -1
- package/dist/tttx/{p-f4855113.entry.js → p-709246f5.entry.js} +1 -1
- package/dist/tttx/p-95a29e09.entry.js +1 -0
- package/dist/tttx/{p-1884203f.entry.js → p-ad0c3fe4.entry.js} +1 -1
- package/dist/tttx/p-bec472d8.js +2 -0
- package/dist/tttx/tttx.esm.js +1 -1
- package/dist/types/components/molecules/tttx-form/tttx-form.d.ts +14 -7
- package/dist/types/components/molecules/tttx-form/tttx-form.stories.d.ts +1 -8
- package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.d.ts +38 -0
- package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.d.ts +106 -0
- package/dist/types/components.d.ts +66 -41
- package/package.json +67 -65
- package/readme.md +89 -86
- package/dist/cjs/tttx-input.cjs.entry.js +0 -44
- package/dist/collection/components/molecules/tttx-input/tttx-input.js +0 -259
- package/dist/collection/components/molecules/tttx-input/tttx-input.stories.js +0 -106
- package/dist/components/tttx-input.js +0 -77
- package/dist/esm/tttx-input.entry.js +0 -40
- package/dist/tttx/p-317b13d3.entry.js +0 -1
- package/dist/tttx/p-3cd7ad04.entry.js +0 -1
- package/dist/tttx/p-b6cc2780.js +0 -2
- package/dist/tttx/p-f30a0e84.entry.js +0 -1
- package/dist/types/components/molecules/tttx-input/tttx-input.d.ts +0 -20
- package/dist/types/components/molecules/tttx-input/tttx-input.stories.d.ts +0 -60
|
@@ -1,259 +0,0 @@
|
|
|
1
|
-
import { Host, h } from '@stencil/core';
|
|
2
|
-
export class TttxInput {
|
|
3
|
-
constructor() {
|
|
4
|
-
this.handleFocus = () => {
|
|
5
|
-
this.isfocused = true;
|
|
6
|
-
};
|
|
7
|
-
this.handleBlur = () => {
|
|
8
|
-
this.isfocused = false;
|
|
9
|
-
};
|
|
10
|
-
this.isfocused = false;
|
|
11
|
-
this.label = undefined;
|
|
12
|
-
this.valid = undefined;
|
|
13
|
-
this.showerrormsg = undefined;
|
|
14
|
-
this.errormsg = undefined;
|
|
15
|
-
this.value = undefined;
|
|
16
|
-
this.type = 'text';
|
|
17
|
-
this.placeholder = undefined;
|
|
18
|
-
this.pattern = undefined;
|
|
19
|
-
this.iconleft = undefined;
|
|
20
|
-
this.iconright = undefined;
|
|
21
|
-
this.required = undefined;
|
|
22
|
-
}
|
|
23
|
-
handleChange(event) {
|
|
24
|
-
const target = event.target;
|
|
25
|
-
this.value = target.value;
|
|
26
|
-
this.valueChanged.emit(target.value);
|
|
27
|
-
}
|
|
28
|
-
render() {
|
|
29
|
-
const inputClass = ['container', this.showerrormsg ? 'errorstate' : '', this.isfocused ? 'focused' : '', this.iconleft ? 'iconleft' : ''].join(' ');
|
|
30
|
-
return (h(Host, null, h("div", { class: "field spacing" }, this.label && h("label", { class: "label" }, this.label, !this.required ? h("span", { class: "optional" }, " (optional)") : ''), h("div", { class: inputClass }, this.iconleft && (h("div", { class: "icon-left" }, h("tttx-icon", { icon: this.iconleft, colour: "grey" }))), h("input", { class: "input", onFocus: this.handleFocus.bind(this), onBlur: this.handleBlur.bind(this), type: this.type, placeholder: this.placeholder, value: this.value, onInput: event => this.handleChange(event) }), this.iconright && (h("div", { class: "icon-right" }, h("tttx-icon", { icon: this.iconright, colour: "grey" })))), this.showerrormsg && this.errormsg && h("div", { class: "errormsg" }, h("span", { class: "material-symbols-rounded validationicon" }, "warning"), " ", this.errormsg))));
|
|
31
|
-
}
|
|
32
|
-
static get is() { return "tttx-input"; }
|
|
33
|
-
static get encapsulation() { return "shadow"; }
|
|
34
|
-
static get originalStyleUrls() {
|
|
35
|
-
return {
|
|
36
|
-
"$": ["tttx-input.scss"]
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
static get styleUrls() {
|
|
40
|
-
return {
|
|
41
|
-
"$": ["tttx-input.css"]
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
static get properties() {
|
|
45
|
-
return {
|
|
46
|
-
"label": {
|
|
47
|
-
"type": "string",
|
|
48
|
-
"mutable": false,
|
|
49
|
-
"complexType": {
|
|
50
|
-
"original": "string",
|
|
51
|
-
"resolved": "string",
|
|
52
|
-
"references": {}
|
|
53
|
-
},
|
|
54
|
-
"required": false,
|
|
55
|
-
"optional": false,
|
|
56
|
-
"docs": {
|
|
57
|
-
"tags": [],
|
|
58
|
-
"text": ""
|
|
59
|
-
},
|
|
60
|
-
"attribute": "label",
|
|
61
|
-
"reflect": false
|
|
62
|
-
},
|
|
63
|
-
"valid": {
|
|
64
|
-
"type": "boolean",
|
|
65
|
-
"mutable": false,
|
|
66
|
-
"complexType": {
|
|
67
|
-
"original": "boolean",
|
|
68
|
-
"resolved": "boolean",
|
|
69
|
-
"references": {}
|
|
70
|
-
},
|
|
71
|
-
"required": false,
|
|
72
|
-
"optional": false,
|
|
73
|
-
"docs": {
|
|
74
|
-
"tags": [],
|
|
75
|
-
"text": ""
|
|
76
|
-
},
|
|
77
|
-
"attribute": "valid",
|
|
78
|
-
"reflect": false
|
|
79
|
-
},
|
|
80
|
-
"showerrormsg": {
|
|
81
|
-
"type": "boolean",
|
|
82
|
-
"mutable": false,
|
|
83
|
-
"complexType": {
|
|
84
|
-
"original": "boolean",
|
|
85
|
-
"resolved": "boolean",
|
|
86
|
-
"references": {}
|
|
87
|
-
},
|
|
88
|
-
"required": false,
|
|
89
|
-
"optional": false,
|
|
90
|
-
"docs": {
|
|
91
|
-
"tags": [],
|
|
92
|
-
"text": ""
|
|
93
|
-
},
|
|
94
|
-
"attribute": "showerrormsg",
|
|
95
|
-
"reflect": false
|
|
96
|
-
},
|
|
97
|
-
"errormsg": {
|
|
98
|
-
"type": "string",
|
|
99
|
-
"mutable": false,
|
|
100
|
-
"complexType": {
|
|
101
|
-
"original": "string",
|
|
102
|
-
"resolved": "string",
|
|
103
|
-
"references": {}
|
|
104
|
-
},
|
|
105
|
-
"required": false,
|
|
106
|
-
"optional": false,
|
|
107
|
-
"docs": {
|
|
108
|
-
"tags": [],
|
|
109
|
-
"text": ""
|
|
110
|
-
},
|
|
111
|
-
"attribute": "errormsg",
|
|
112
|
-
"reflect": false
|
|
113
|
-
},
|
|
114
|
-
"value": {
|
|
115
|
-
"type": "string",
|
|
116
|
-
"mutable": true,
|
|
117
|
-
"complexType": {
|
|
118
|
-
"original": "string",
|
|
119
|
-
"resolved": "string",
|
|
120
|
-
"references": {}
|
|
121
|
-
},
|
|
122
|
-
"required": false,
|
|
123
|
-
"optional": false,
|
|
124
|
-
"docs": {
|
|
125
|
-
"tags": [],
|
|
126
|
-
"text": ""
|
|
127
|
-
},
|
|
128
|
-
"attribute": "value",
|
|
129
|
-
"reflect": false
|
|
130
|
-
},
|
|
131
|
-
"type": {
|
|
132
|
-
"type": "string",
|
|
133
|
-
"mutable": false,
|
|
134
|
-
"complexType": {
|
|
135
|
-
"original": "string",
|
|
136
|
-
"resolved": "string",
|
|
137
|
-
"references": {}
|
|
138
|
-
},
|
|
139
|
-
"required": false,
|
|
140
|
-
"optional": false,
|
|
141
|
-
"docs": {
|
|
142
|
-
"tags": [],
|
|
143
|
-
"text": ""
|
|
144
|
-
},
|
|
145
|
-
"attribute": "type",
|
|
146
|
-
"reflect": false,
|
|
147
|
-
"defaultValue": "'text'"
|
|
148
|
-
},
|
|
149
|
-
"placeholder": {
|
|
150
|
-
"type": "string",
|
|
151
|
-
"mutable": false,
|
|
152
|
-
"complexType": {
|
|
153
|
-
"original": "string",
|
|
154
|
-
"resolved": "string",
|
|
155
|
-
"references": {}
|
|
156
|
-
},
|
|
157
|
-
"required": false,
|
|
158
|
-
"optional": false,
|
|
159
|
-
"docs": {
|
|
160
|
-
"tags": [],
|
|
161
|
-
"text": ""
|
|
162
|
-
},
|
|
163
|
-
"attribute": "placeholder",
|
|
164
|
-
"reflect": false
|
|
165
|
-
},
|
|
166
|
-
"pattern": {
|
|
167
|
-
"type": "string",
|
|
168
|
-
"mutable": false,
|
|
169
|
-
"complexType": {
|
|
170
|
-
"original": "string",
|
|
171
|
-
"resolved": "string",
|
|
172
|
-
"references": {}
|
|
173
|
-
},
|
|
174
|
-
"required": false,
|
|
175
|
-
"optional": false,
|
|
176
|
-
"docs": {
|
|
177
|
-
"tags": [],
|
|
178
|
-
"text": ""
|
|
179
|
-
},
|
|
180
|
-
"attribute": "pattern",
|
|
181
|
-
"reflect": false
|
|
182
|
-
},
|
|
183
|
-
"iconleft": {
|
|
184
|
-
"type": "string",
|
|
185
|
-
"mutable": false,
|
|
186
|
-
"complexType": {
|
|
187
|
-
"original": "string",
|
|
188
|
-
"resolved": "string",
|
|
189
|
-
"references": {}
|
|
190
|
-
},
|
|
191
|
-
"required": false,
|
|
192
|
-
"optional": false,
|
|
193
|
-
"docs": {
|
|
194
|
-
"tags": [],
|
|
195
|
-
"text": ""
|
|
196
|
-
},
|
|
197
|
-
"attribute": "iconleft",
|
|
198
|
-
"reflect": false
|
|
199
|
-
},
|
|
200
|
-
"iconright": {
|
|
201
|
-
"type": "string",
|
|
202
|
-
"mutable": false,
|
|
203
|
-
"complexType": {
|
|
204
|
-
"original": "string",
|
|
205
|
-
"resolved": "string",
|
|
206
|
-
"references": {}
|
|
207
|
-
},
|
|
208
|
-
"required": false,
|
|
209
|
-
"optional": false,
|
|
210
|
-
"docs": {
|
|
211
|
-
"tags": [],
|
|
212
|
-
"text": ""
|
|
213
|
-
},
|
|
214
|
-
"attribute": "iconright",
|
|
215
|
-
"reflect": false
|
|
216
|
-
},
|
|
217
|
-
"required": {
|
|
218
|
-
"type": "boolean",
|
|
219
|
-
"mutable": false,
|
|
220
|
-
"complexType": {
|
|
221
|
-
"original": "boolean",
|
|
222
|
-
"resolved": "boolean",
|
|
223
|
-
"references": {}
|
|
224
|
-
},
|
|
225
|
-
"required": false,
|
|
226
|
-
"optional": false,
|
|
227
|
-
"docs": {
|
|
228
|
-
"tags": [],
|
|
229
|
-
"text": ""
|
|
230
|
-
},
|
|
231
|
-
"attribute": "required",
|
|
232
|
-
"reflect": false
|
|
233
|
-
}
|
|
234
|
-
};
|
|
235
|
-
}
|
|
236
|
-
static get states() {
|
|
237
|
-
return {
|
|
238
|
-
"isfocused": {}
|
|
239
|
-
};
|
|
240
|
-
}
|
|
241
|
-
static get events() {
|
|
242
|
-
return [{
|
|
243
|
-
"method": "valueChanged",
|
|
244
|
-
"name": "valueChanged",
|
|
245
|
-
"bubbles": true,
|
|
246
|
-
"cancelable": true,
|
|
247
|
-
"composed": true,
|
|
248
|
-
"docs": {
|
|
249
|
-
"tags": [],
|
|
250
|
-
"text": ""
|
|
251
|
-
},
|
|
252
|
-
"complexType": {
|
|
253
|
-
"original": "string",
|
|
254
|
-
"resolved": "string",
|
|
255
|
-
"references": {}
|
|
256
|
-
}
|
|
257
|
-
}];
|
|
258
|
-
}
|
|
259
|
-
}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import icons from '../../../icons';
|
|
2
|
-
export default {
|
|
3
|
-
title: 'Molecules/Text Input',
|
|
4
|
-
component: 'tttx-input',
|
|
5
|
-
argTypes: {
|
|
6
|
-
iconleft: {
|
|
7
|
-
options: icons,
|
|
8
|
-
control: { type: 'select' },
|
|
9
|
-
},
|
|
10
|
-
iconright: {
|
|
11
|
-
options: icons,
|
|
12
|
-
control: { type: 'select' },
|
|
13
|
-
},
|
|
14
|
-
type: {
|
|
15
|
-
options: ['text', 'password', 'email', 'number'],
|
|
16
|
-
control: { type: 'radio' },
|
|
17
|
-
},
|
|
18
|
-
value: {
|
|
19
|
-
control: { type: 'text' },
|
|
20
|
-
},
|
|
21
|
-
label: {
|
|
22
|
-
control: { type: 'text' },
|
|
23
|
-
},
|
|
24
|
-
required: {
|
|
25
|
-
control: { type: 'boolean' },
|
|
26
|
-
},
|
|
27
|
-
errormsg: {
|
|
28
|
-
control: { type: 'text' },
|
|
29
|
-
},
|
|
30
|
-
showerrormsg: {
|
|
31
|
-
control: { type: 'boolean' },
|
|
32
|
-
},
|
|
33
|
-
placeholder: {
|
|
34
|
-
control: { type: 'text' },
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
};
|
|
38
|
-
const TemplateTextInput = ({ value, label, iconleft, iconright, type, required, errormsg, showerrormsg, placeholder }) => `
|
|
39
|
-
<tttx-input
|
|
40
|
-
placeholder="${placeholder}"
|
|
41
|
-
iconleft="${iconleft || ''}"
|
|
42
|
-
iconright="${iconright || ''}"
|
|
43
|
-
value="${value}"
|
|
44
|
-
label="${label}"
|
|
45
|
-
type="${type}"
|
|
46
|
-
errormsg="${errormsg}"
|
|
47
|
-
${required ? `required` : ''}
|
|
48
|
-
${showerrormsg ? `showerrormsg` : ''}
|
|
49
|
-
></tttx-input>
|
|
50
|
-
`;
|
|
51
|
-
export const TextInputBasic = TemplateTextInput.bind({});
|
|
52
|
-
TextInputBasic.args = {
|
|
53
|
-
value: 'Uh egg',
|
|
54
|
-
label: 'Please tell me about your egg',
|
|
55
|
-
iconleft: 'egg',
|
|
56
|
-
type: 'text',
|
|
57
|
-
errormsg: 'Incorrect egg, please egg again.',
|
|
58
|
-
required: true,
|
|
59
|
-
showerrormsg: true,
|
|
60
|
-
placeholder: 'Please for the love of god tell me about your egg',
|
|
61
|
-
};
|
|
62
|
-
export const TextInputIconRight = TemplateTextInput.bind({});
|
|
63
|
-
TextInputIconRight.args = {
|
|
64
|
-
value: 'Uh egg',
|
|
65
|
-
label: 'Please tell me about your egg',
|
|
66
|
-
iconright: 'egg',
|
|
67
|
-
type: 'text',
|
|
68
|
-
errormsg: 'Incorrect egg, please egg again.',
|
|
69
|
-
required: true,
|
|
70
|
-
showerrormsg: true,
|
|
71
|
-
placeholder: 'Please for the love of god tell me about your egg',
|
|
72
|
-
};
|
|
73
|
-
export const PasswordInputBasic = TemplateTextInput.bind({});
|
|
74
|
-
PasswordInputBasic.args = {
|
|
75
|
-
value: 'qwefdweferg',
|
|
76
|
-
label: 'Input your Password',
|
|
77
|
-
iconleft: 'lock',
|
|
78
|
-
type: 'password',
|
|
79
|
-
errormsg: 'Password is not strong enough',
|
|
80
|
-
required: true,
|
|
81
|
-
showerrormsg: true,
|
|
82
|
-
placeholder: 'Your password',
|
|
83
|
-
};
|
|
84
|
-
export const EmailInputBasic = TemplateTextInput.bind({});
|
|
85
|
-
EmailInputBasic.args = {
|
|
86
|
-
value: 'email.address@website.com',
|
|
87
|
-
label: 'Choose an email address',
|
|
88
|
-
iconleft: 'mail',
|
|
89
|
-
type: 'email',
|
|
90
|
-
errormsg: 'This email smells funny',
|
|
91
|
-
required: true,
|
|
92
|
-
valid: false,
|
|
93
|
-
showerrormsg: true,
|
|
94
|
-
placeholder: 'Your email address',
|
|
95
|
-
};
|
|
96
|
-
export const NumberInputBasic = TemplateTextInput.bind({});
|
|
97
|
-
NumberInputBasic.args = {
|
|
98
|
-
value: '42069',
|
|
99
|
-
label: 'What is your favourite number?',
|
|
100
|
-
iconleft: '123',
|
|
101
|
-
type: 'number',
|
|
102
|
-
errormsg: 'This number feels wrong',
|
|
103
|
-
required: true,
|
|
104
|
-
showerrormsg: true,
|
|
105
|
-
placeholder: 'Your favourite number',
|
|
106
|
-
};
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { d as defineCustomElement$2 } from './tttx-icon2.js';
|
|
3
|
-
|
|
4
|
-
const tttxInputCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.material-symbols-rounded{font-family:\"Material Symbols Rounded\", sans-serif;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color:#9e9e9e}.field{clear:both}.container{display:flex;flex-wrap:wrap;box-sizing:border-box;height:36px;border:1px solid #c8c8c8;border-radius:4px}.icon-left,.icon-right{flex-basis:24px}.icon-left span,.icon-right span{font-size:24px;line-height:24px;text-align:center;display:block;width:24px;height:24px;margin-top:4px}.icon-left span{margin-left:4px}.icon-right span{margin-right:4px}.input{flex-grow:1;border:none;outline:none;font-size:16px;padding:8px 16px;background-color:transparent}.iconleft .input{padding-left:4px}.iconright .input{padding-right:4px}.label{display:block;height:18px;font-weight:600;color:#212121;font-size:16px;margin-bottom:4px;z-index:1}.disabled{background:#f0f0f0;color:#9e9e9e;border-color:#c8c8c8}.focused{border-color:#1479c6}.errormsg{display:flex;justify-content:center;align-items:center;float:left;margin-bottom:16px;box-sizing:border-box;background-color:transparent;height:26px;font-size:14px;border-radius:none;z-index:2;color:#DC0000}.errormsg .validationicon{width:16px;height:16px;font-size:16px;margin-right:4px;vertical-align:middle;color:#DC0000}.danger{color:#DC0000}.optional{color:#757575;font-weight:normal}:host{display:block}.spacing{margin-bottom:16px}.errorstate{border-color:#DC0000}.icon-right{margin-top:5px;margin-right:4px}.icon-left{margin-top:5px;margin-left:4px}";
|
|
5
|
-
|
|
6
|
-
const TttxInput$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
7
|
-
constructor() {
|
|
8
|
-
super();
|
|
9
|
-
this.__registerHost();
|
|
10
|
-
this.__attachShadow();
|
|
11
|
-
this.valueChanged = createEvent(this, "valueChanged", 7);
|
|
12
|
-
this.handleFocus = () => {
|
|
13
|
-
this.isfocused = true;
|
|
14
|
-
};
|
|
15
|
-
this.handleBlur = () => {
|
|
16
|
-
this.isfocused = false;
|
|
17
|
-
};
|
|
18
|
-
this.isfocused = false;
|
|
19
|
-
this.label = undefined;
|
|
20
|
-
this.valid = undefined;
|
|
21
|
-
this.showerrormsg = undefined;
|
|
22
|
-
this.errormsg = undefined;
|
|
23
|
-
this.value = undefined;
|
|
24
|
-
this.type = 'text';
|
|
25
|
-
this.placeholder = undefined;
|
|
26
|
-
this.pattern = undefined;
|
|
27
|
-
this.iconleft = undefined;
|
|
28
|
-
this.iconright = undefined;
|
|
29
|
-
this.required = undefined;
|
|
30
|
-
}
|
|
31
|
-
handleChange(event) {
|
|
32
|
-
const target = event.target;
|
|
33
|
-
this.value = target.value;
|
|
34
|
-
this.valueChanged.emit(target.value);
|
|
35
|
-
}
|
|
36
|
-
render() {
|
|
37
|
-
const inputClass = ['container', this.showerrormsg ? 'errorstate' : '', this.isfocused ? 'focused' : '', this.iconleft ? 'iconleft' : ''].join(' ');
|
|
38
|
-
return (h(Host, null, h("div", { class: "field spacing" }, this.label && h("label", { class: "label" }, this.label, !this.required ? h("span", { class: "optional" }, " (optional)") : ''), h("div", { class: inputClass }, this.iconleft && (h("div", { class: "icon-left" }, h("tttx-icon", { icon: this.iconleft, colour: "grey" }))), h("input", { class: "input", onFocus: this.handleFocus.bind(this), onBlur: this.handleBlur.bind(this), type: this.type, placeholder: this.placeholder, value: this.value, onInput: event => this.handleChange(event) }), this.iconright && (h("div", { class: "icon-right" }, h("tttx-icon", { icon: this.iconright, colour: "grey" })))), this.showerrormsg && this.errormsg && h("div", { class: "errormsg" }, h("span", { class: "material-symbols-rounded validationicon" }, "warning"), " ", this.errormsg))));
|
|
39
|
-
}
|
|
40
|
-
static get style() { return tttxInputCss; }
|
|
41
|
-
}, [1, "tttx-input", {
|
|
42
|
-
"label": [1],
|
|
43
|
-
"valid": [4],
|
|
44
|
-
"showerrormsg": [4],
|
|
45
|
-
"errormsg": [1],
|
|
46
|
-
"value": [1025],
|
|
47
|
-
"type": [1],
|
|
48
|
-
"placeholder": [1],
|
|
49
|
-
"pattern": [1],
|
|
50
|
-
"iconleft": [1],
|
|
51
|
-
"iconright": [1],
|
|
52
|
-
"required": [4],
|
|
53
|
-
"isfocused": [32]
|
|
54
|
-
}]);
|
|
55
|
-
function defineCustomElement$1() {
|
|
56
|
-
if (typeof customElements === "undefined") {
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
const components = ["tttx-input", "tttx-icon"];
|
|
60
|
-
components.forEach(tagName => { switch (tagName) {
|
|
61
|
-
case "tttx-input":
|
|
62
|
-
if (!customElements.get(tagName)) {
|
|
63
|
-
customElements.define(tagName, TttxInput$1);
|
|
64
|
-
}
|
|
65
|
-
break;
|
|
66
|
-
case "tttx-icon":
|
|
67
|
-
if (!customElements.get(tagName)) {
|
|
68
|
-
defineCustomElement$2();
|
|
69
|
-
}
|
|
70
|
-
break;
|
|
71
|
-
} });
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
const TttxInput = TttxInput$1;
|
|
75
|
-
const defineCustomElement = defineCustomElement$1;
|
|
76
|
-
|
|
77
|
-
export { TttxInput, defineCustomElement };
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-9654537d.js';
|
|
2
|
-
|
|
3
|
-
const tttxInputCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.material-symbols-rounded{font-family:\"Material Symbols Rounded\", sans-serif;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color:#9e9e9e}.field{clear:both}.container{display:flex;flex-wrap:wrap;box-sizing:border-box;height:36px;border:1px solid #c8c8c8;border-radius:4px}.icon-left,.icon-right{flex-basis:24px}.icon-left span,.icon-right span{font-size:24px;line-height:24px;text-align:center;display:block;width:24px;height:24px;margin-top:4px}.icon-left span{margin-left:4px}.icon-right span{margin-right:4px}.input{flex-grow:1;border:none;outline:none;font-size:16px;padding:8px 16px;background-color:transparent}.iconleft .input{padding-left:4px}.iconright .input{padding-right:4px}.label{display:block;height:18px;font-weight:600;color:#212121;font-size:16px;margin-bottom:4px;z-index:1}.disabled{background:#f0f0f0;color:#9e9e9e;border-color:#c8c8c8}.focused{border-color:#1479c6}.errormsg{display:flex;justify-content:center;align-items:center;float:left;margin-bottom:16px;box-sizing:border-box;background-color:transparent;height:26px;font-size:14px;border-radius:none;z-index:2;color:#DC0000}.errormsg .validationicon{width:16px;height:16px;font-size:16px;margin-right:4px;vertical-align:middle;color:#DC0000}.danger{color:#DC0000}.optional{color:#757575;font-weight:normal}:host{display:block}.spacing{margin-bottom:16px}.errorstate{border-color:#DC0000}.icon-right{margin-top:5px;margin-right:4px}.icon-left{margin-top:5px;margin-left:4px}";
|
|
4
|
-
|
|
5
|
-
const TttxInput = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
this.valueChanged = createEvent(this, "valueChanged", 7);
|
|
9
|
-
this.handleFocus = () => {
|
|
10
|
-
this.isfocused = true;
|
|
11
|
-
};
|
|
12
|
-
this.handleBlur = () => {
|
|
13
|
-
this.isfocused = false;
|
|
14
|
-
};
|
|
15
|
-
this.isfocused = false;
|
|
16
|
-
this.label = undefined;
|
|
17
|
-
this.valid = undefined;
|
|
18
|
-
this.showerrormsg = undefined;
|
|
19
|
-
this.errormsg = undefined;
|
|
20
|
-
this.value = undefined;
|
|
21
|
-
this.type = 'text';
|
|
22
|
-
this.placeholder = undefined;
|
|
23
|
-
this.pattern = undefined;
|
|
24
|
-
this.iconleft = undefined;
|
|
25
|
-
this.iconright = undefined;
|
|
26
|
-
this.required = undefined;
|
|
27
|
-
}
|
|
28
|
-
handleChange(event) {
|
|
29
|
-
const target = event.target;
|
|
30
|
-
this.value = target.value;
|
|
31
|
-
this.valueChanged.emit(target.value);
|
|
32
|
-
}
|
|
33
|
-
render() {
|
|
34
|
-
const inputClass = ['container', this.showerrormsg ? 'errorstate' : '', this.isfocused ? 'focused' : '', this.iconleft ? 'iconleft' : ''].join(' ');
|
|
35
|
-
return (h(Host, null, h("div", { class: "field spacing" }, this.label && h("label", { class: "label" }, this.label, !this.required ? h("span", { class: "optional" }, " (optional)") : ''), h("div", { class: inputClass }, this.iconleft && (h("div", { class: "icon-left" }, h("tttx-icon", { icon: this.iconleft, colour: "grey" }))), h("input", { class: "input", onFocus: this.handleFocus.bind(this), onBlur: this.handleBlur.bind(this), type: this.type, placeholder: this.placeholder, value: this.value, onInput: event => this.handleChange(event) }), this.iconright && (h("div", { class: "icon-right" }, h("tttx-icon", { icon: this.iconright, colour: "grey" })))), this.showerrormsg && this.errormsg && h("div", { class: "errormsg" }, h("span", { class: "material-symbols-rounded validationicon" }, "warning"), " ", this.errormsg))));
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
TttxInput.style = tttxInputCss;
|
|
39
|
-
|
|
40
|
-
export { TttxInput as tttx_input };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,c as o,h as t,H as e}from"./p-b6cc2780.js";const n=class{constructor(t){i(this,t),this.valueChanged=o(this,"valueChanged",7),this.value=void 0,this.label=void 0,this.required=void 0}handleClick(i){const o=i.target;this.value=o.checked,this.valueChanged.emit(o.checked)}render(){return t(e,null,t("div",{class:"field spacing"},this.label&&t("label",{class:"label"},this.label,this.required?"":t("span",{class:"optional"}," (optional)")),t("input",{type:"checkbox",class:"input",onChange:i=>this.handleClick(i),checked:this.value})))}};n.style='.material-symbols-rounded{font-variation-settings:"FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24}.material-symbols-rounded{font-family:"Material Symbols Rounded", sans-serif;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color:#9e9e9e}.field{clear:both}.container{display:flex;flex-wrap:wrap;box-sizing:border-box;height:36px;border:1px solid #c8c8c8;border-radius:4px}.icon-left,.icon-right{flex-basis:24px}.icon-left span,.icon-right span{font-size:24px;line-height:24px;text-align:center;display:block;width:24px;height:24px;margin-top:4px}.icon-left span{margin-left:4px}.icon-right span{margin-right:4px}.input{flex-grow:1;border:none;outline:none;font-size:16px;padding:8px 16px;background-color:transparent}.iconleft .input{padding-left:4px}.iconright .input{padding-right:4px}.label{display:block;height:18px;font-weight:600;color:#212121;font-size:16px;margin-bottom:4px;z-index:1}.disabled{background:#f0f0f0;color:#9e9e9e;border-color:#c8c8c8}.focused{border-color:#1479c6}.errormsg{display:flex;justify-content:center;align-items:center;float:left;margin-bottom:16px;box-sizing:border-box;background-color:transparent;height:26px;font-size:14px;border-radius:none;z-index:2;color:#DC0000}.errormsg .validationicon{width:16px;height:16px;font-size:16px;margin-right:4px;vertical-align:middle;color:#DC0000}.danger{color:#DC0000}.optional{color:#757575;font-weight:normal}:host{display:block}.spacing{margin-bottom:16px}';export{n as tttx_checkbox}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,c as t,h as o,H as n}from"./p-b6cc2780.js";const s=class{constructor(o){i(this,o),this.valueChanged=t(this,"valueChanged",7),this.handleFocus=()=>{this.isfocused=!0},this.handleBlur=()=>{this.isfocused=!1},this.isfocused=!1,this.label=void 0,this.valid=void 0,this.showerrormsg=void 0,this.errormsg=void 0,this.value=void 0,this.type="text",this.placeholder=void 0,this.pattern=void 0,this.iconleft=void 0,this.iconright=void 0,this.required=void 0}handleChange(i){const t=i.target;this.value=t.value,this.valueChanged.emit(t.value)}render(){const i=["container",this.showerrormsg?"errorstate":"",this.isfocused?"focused":"",this.iconleft?"iconleft":""].join(" ");return o(n,null,o("div",{class:"field spacing"},this.label&&o("label",{class:"label"},this.label,this.required?"":o("span",{class:"optional"}," (optional)")),o("div",{class:i},this.iconleft&&o("div",{class:"icon-left"},o("tttx-icon",{icon:this.iconleft,colour:"grey"})),o("input",{class:"input",onFocus:this.handleFocus.bind(this),onBlur:this.handleBlur.bind(this),type:this.type,placeholder:this.placeholder,value:this.value,onInput:i=>this.handleChange(i)}),this.iconright&&o("div",{class:"icon-right"},o("tttx-icon",{icon:this.iconright,colour:"grey"}))),this.showerrormsg&&this.errormsg&&o("div",{class:"errormsg"},o("span",{class:"material-symbols-rounded validationicon"},"warning")," ",this.errormsg)))}};s.style='.material-symbols-rounded{font-variation-settings:"FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24}.material-symbols-rounded{font-family:"Material Symbols Rounded", sans-serif;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color:#9e9e9e}.field{clear:both}.container{display:flex;flex-wrap:wrap;box-sizing:border-box;height:36px;border:1px solid #c8c8c8;border-radius:4px}.icon-left,.icon-right{flex-basis:24px}.icon-left span,.icon-right span{font-size:24px;line-height:24px;text-align:center;display:block;width:24px;height:24px;margin-top:4px}.icon-left span{margin-left:4px}.icon-right span{margin-right:4px}.input{flex-grow:1;border:none;outline:none;font-size:16px;padding:8px 16px;background-color:transparent}.iconleft .input{padding-left:4px}.iconright .input{padding-right:4px}.label{display:block;height:18px;font-weight:600;color:#212121;font-size:16px;margin-bottom:4px;z-index:1}.disabled{background:#f0f0f0;color:#9e9e9e;border-color:#c8c8c8}.focused{border-color:#1479c6}.errormsg{display:flex;justify-content:center;align-items:center;float:left;margin-bottom:16px;box-sizing:border-box;background-color:transparent;height:26px;font-size:14px;border-radius:none;z-index:2;color:#DC0000}.errormsg .validationicon{width:16px;height:16px;font-size:16px;margin-right:4px;vertical-align:middle;color:#DC0000}.danger{color:#DC0000}.optional{color:#757575;font-weight:normal}:host{display:block}.spacing{margin-bottom:16px}.errorstate{border-color:#DC0000}.icon-right{margin-top:5px;margin-right:4px}.icon-left{margin-top:5px;margin-left:4px}';export{s as tttx_input}
|
package/dist/tttx/p-b6cc2780.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
let e,t,n=!1;const l={},o=e=>"object"==(e=typeof e)||"function"===e;function s(e){var t,n,l;return null!==(l=null===(n=null===(t=e.head)||void 0===t?void 0:t.querySelector('meta[name="csp-nonce"]'))||void 0===n?void 0:n.getAttribute("content"))&&void 0!==l?l:void 0}const c=(e,t,...n)=>{let l=null,s=!1,c=!1;const r=[],u=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?u(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!o(l))&&(l+=""),s&&c?r[r.length-1].t+=l:r.push(s?i(null,l):l),c=s)};if(u(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}const a=i(e,null);return a.l=t,r.length>0&&(a.o=r),a},i=(e,t)=>({i:0,u:e,t,h:null,o:null,l:null}),r={},u=e=>V(e).m,a=(e,t,n)=>{const l=u(e);return{emit:e=>f(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},f=(e,t,n)=>{const l=Y.ce(t,n);return e.dispatchEvent(l),l},d=new WeakMap,h=e=>"sc-"+e.$,m=(e,t,n,l,s,c)=>{if(n!==l){let i=B(e,t),r=t.toLowerCase();if("class"===t){const t=e.classList,o=p(n),s=p(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("ref"===t)l&&l(e);else if(i||"o"!==t[0]||"n"!==t[1]){const r=o(l);if((i||r&&null!==l)&&!s)try{if(e.tagName.includes("-"))e[t]=l;else{const o=null==l?"":l;"list"===t?i=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&c||s)&&!r&&e.setAttribute(t,l=!0===l?"":l)}else t="-"===t[2]?t.slice(3):B(Q,r)?r.slice(2):r[2]+t.slice(3),n&&Y.rel(e,t,n,!1),l&&Y.ael(e,t,l,!1)}},$=/\s/,p=e=>e?e.split($):[],y=(e,t,n,o)=>{const s=11===t.h.nodeType&&t.h.host?t.h.host:t.h,c=e&&e.l||l,i=t.l||l;for(o in c)o in i||m(s,o,c[o],void 0,n,t.i);for(o in i)m(s,o,c[o],i[o],n,t.i)},b=(t,n,l)=>{const o=n.o[l];let s,c,i=0;if(null!==o.t)s=o.h=X.createTextNode(o.t);else if(s=o.h=X.createElement(o.u),y(null,o,!1),null!=e&&s["s-si"]!==e&&s.classList.add(s["s-si"]=e),o.o)for(i=0;i<o.o.length;++i)c=b(t,o,i),c&&s.appendChild(c);return s},w=(e,n,l,o,s,c)=>{let i,r=e;for(r.shadowRoot&&r.tagName===t&&(r=r.shadowRoot);s<=c;++s)o[s]&&(i=b(null,l,s),i&&(o[s].h=i,r.insertBefore(i,n)))},v=(e,t,n,l,o)=>{for(;t<=n;++t)(l=e[t])&&(o=l.h,j(l),o.remove())},S=(e,t)=>e.u===t.u,g=(e,t)=>{const n=t.h=e.h,l=e.o,o=t.o,s=t.t;null===s?("slot"===t.u||y(e,t,!1),null!==l&&null!==o?((e,t,n,l)=>{let o,s=0,c=0,i=t.length-1,r=t[0],u=t[i],a=l.length-1,f=l[0],d=l[a];for(;s<=i&&c<=a;)null==r?r=t[++s]:null==u?u=t[--i]:null==f?f=l[++c]:null==d?d=l[--a]:S(r,f)?(g(r,f),r=t[++s],f=l[++c]):S(u,d)?(g(u,d),u=t[--i],d=l[--a]):S(r,d)?(g(r,d),e.insertBefore(r.h,u.h.nextSibling),r=t[++s],d=l[--a]):S(u,f)?(g(u,f),e.insertBefore(u.h,r.h),u=t[--i],f=l[++c]):(o=b(t&&t[c],n,c),f=l[++c],o&&r.h.parentNode.insertBefore(o,r.h));s>i?w(e,null==l[a+1]?null:l[a+1].h,n,l,c,a):c>a&&v(t,s,i)})(n,l,t,o):null!==o?(null!==e.t&&(n.textContent=""),w(n,null,t,o,0,o.length-1)):null!==l&&v(l,0,l.length-1)):e.t!==s&&(n.data=s)},j=e=>{e.l&&e.l.ref&&e.l.ref(null),e.o&&e.o.map(j)},M=(e,t)=>{t&&!e.p&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.p=t)))},k=(e,t)=>{if(e.i|=16,!(4&e.i))return M(e,e.v),ie((()=>C(e,t)));e.i|=512},C=(e,t)=>{const n=e.S;let l;return t&&(e.i|=256,e.g&&(e.g.map((([e,t])=>E(n,e,t))),e.g=null),l=E(n,"componentWillLoad")),N(l,(()=>O(e,n,t)))},O=async(e,t,n)=>{const l=e.m,o=l["s-rc"];n&&(e=>{const t=e.j,n=e.m,l=t.i,o=((e,t)=>{var n;let l=h(t);const o=K.get(l);if(e=11===e.nodeType?e:X,o)if("string"==typeof o){let t,c=d.get(e=e.head||e);if(c||d.set(e,c=new Set),!c.has(l)){{t=X.createElement("style"),t.innerHTML=o;const l=null!==(n=Y.M)&&void 0!==n?n:s(X);null!=l&&t.setAttribute("nonce",l),e.insertBefore(t,e.querySelector("link"))}c&&c.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);x(e,t),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>L(e);0===t.length?n():(Promise.all(t).then(n),e.i|=4,t.length=0)}},x=(n,l)=>{try{l=l.render(),n.i&=-17,n.i|=2,((n,l)=>{const o=n.m,s=n.k||i(null,null),u=(e=>e&&e.u===r)(l)?l:c(null,null,l);t=o.tagName,u.u=null,u.i|=4,n.k=u,u.h=s.h=o.shadowRoot||o,e=o["s-sc"],g(s,u)})(n,l)}catch(e){G(e,n.m)}return null},L=e=>{const t=e.m,n=e.S,l=e.v;64&e.i||(e.i|=64,T(t),E(n,"componentDidLoad"),e.C(t),l||P()),e.p&&(e.p(),e.p=void 0),512&e.i&&ce((()=>k(e,!1))),e.i&=-517},P=()=>{T(X.documentElement),ce((()=>f(Q,"appload",{detail:{namespace:"tttx"}})))},E=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){G(e)}},N=(e,t)=>e&&e.then?e.then(t):t(),T=e=>e.classList.add("hydrated"),W=(e,t,n)=>{if(t.O){const l=Object.entries(t.O),s=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(s,e,{get(){return((e,t)=>V(this).L.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=V(e),c=s.L.get(t),i=s.i,r=s.S;n=((e,t)=>null==e||o(e)?e:4&t?"false"!==e&&(""===e||!!e):1&t?e+"":e)(n,l.O[t][0]),8&i&&void 0!==c||n===c||Number.isNaN(c)&&Number.isNaN(n)||(s.L.set(t,n),r&&2==(18&i)&&k(s,!1))})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const t=new Map;s.attributeChangedCallback=function(e,n,l){Y.jmp((()=>{const n=t.get(e);if(this.hasOwnProperty(n))l=this[n],delete this[n];else if(s.hasOwnProperty(n)&&"number"==typeof this[n]&&this[n]==l)return;this[n]=(null!==l||"boolean"!=typeof this[n])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,n])=>{const l=n[1]||e;return t.set(l,e),l}))}}return e},A=(e,t={})=>{var n;const l=[],o=t.exclude||[],c=Q.customElements,i=X.head,r=i.querySelector("meta[charset]"),u=X.createElement("style"),a=[];let f,d=!0;Object.assign(Y,t),Y.P=new URL(t.resourcesUrl||"./",X.baseURI).href,e.map((e=>{e[1].map((t=>{const n={i:t[0],$:t[1],O:t[2],N:t[3]};n.O=t[2],n.N=t[3];const s=n.$,i=class extends HTMLElement{constructor(e){super(e),z(e=this,n),1&n.i&&e.attachShadow({mode:"open"})}connectedCallback(){f&&(clearTimeout(f),f=null),d?a.push(this):Y.jmp((()=>(e=>{if(0==(1&Y.i)){const t=V(e),n=t.j,l=()=>{};if(1&t.i)H(e,t,n.N);else{t.i|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){M(t,t.v=n);break}}n.O&&Object.entries(n.O).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,o)=>{if(0==(32&t.i)){{if(t.i|=32,(o=J(n)).then){const e=()=>{};o=await o,e()}o.isProxied||(W(o,n,2),o.isProxied=!0);const e=()=>{};t.i|=8;try{new o(t)}catch(e){G(e)}t.i&=-9,e()}if(o.style){let e=o.style;const t=h(n);if(!K.has(t)){const l=()=>{};((e,t,n)=>{let l=K.get(e);ee&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,K.set(e,l)})(t,e,!!(1&n.i)),l()}}}const s=t.v,c=()=>k(t,!0);s&&s["s-rc"]?s["s-rc"].push(c):c()})(0,t,n)}l()}})(this)))}disconnectedCallback(){Y.jmp((()=>(()=>{if(0==(1&Y.i)){const e=V(this),t=e.S;e.T&&(e.T.map((e=>e())),e.T=void 0),E(t,"disconnectedCallback")}})()))}componentOnReady(){return V(this).W}};n.A=e[0],o.includes(s)||c.get(s)||(l.push(s),c.define(s,W(i,n,1)))}))}));{u.innerHTML=l+"{visibility:hidden}.hydrated{visibility:inherit}",u.setAttribute("data-styles","");const e=null!==(n=Y.M)&&void 0!==n?n:s(X);null!=e&&u.setAttribute("nonce",e),i.insertBefore(u,r?r.nextSibling:i.firstChild)}d=!1,a.length?a.map((e=>e.connectedCallback())):Y.jmp((()=>f=setTimeout(P,30)))},H=(e,t,n)=>{n&&n.map((([n,l,o])=>{const s=U(e,n),c=R(t,o),i=q(n);Y.ael(s,l,c,i),(t.T=t.T||[]).push((()=>Y.rel(s,l,c,i)))}))},R=(e,t)=>n=>{try{256&e.i?e.S[t](n):(e.g=e.g||[]).push([t,n])}catch(e){G(e)}},U=(e,t)=>4&t?X:e,q=e=>0!=(2&e),D=e=>Y.M=e,F=new WeakMap,V=e=>F.get(e),_=(e,t)=>F.set(t.S=e,t),z=(e,t)=>{const n={i:0,m:e,j:t,L:new Map};return n.W=new Promise((e=>n.C=e)),e["s-p"]=[],e["s-rc"]=[],H(e,n,t.N),F.set(e,n)},B=(e,t)=>t in e,G=(e,t)=>(0,console.error)(e,t),I=new Map,J=e=>{const t=e.$.replace(/-/g,"_"),n=e.A,l=I.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(I.set(n,e),e[t])),G)
|
|
2
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/},K=new Map,Q="undefined"!=typeof window?window:{},X=Q.document||{head:{}},Y={i:0,P:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},Z=e=>Promise.resolve(e),ee=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),te=[],ne=[],le=(e,t)=>l=>{e.push(l),n||(n=!0,t&&4&Y.i?ce(se):Y.raf(se))},oe=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){G(e)}e.length=0},se=()=>{oe(te),oe(ne),(n=te.length>0)&&Y.raf(se)},ce=e=>Z().then(e),ie=le(ne,!0);export{r as H,A as b,a as c,u as g,c as h,Z as p,_ as r,D as s}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as s,h as r,g as i}from"./p-b6cc2780.js";const o=class{constructor(r){t(this,r),this.formSubmit=s(this,"formSubmit",7),this.fetchFormData=()=>{let t=!0;const s={};return this.el.querySelectorAll(`[${this.dataAttribute}]`).forEach((r=>{const i=r;t=!!t&&this.validateFormField(i),s[i.getAttribute(this.dataAttribute)]=i.value})),t?s:null},this.dataAttribute="form-data",this.functionAttribute="function-data"}validateFormField(t){let s=!0;return t.hasAttribute("required")&&!t.value?(t.setAttribute("showerrormsg","true"),s=!1):t.removeAttribute("showerrormsg"),s}componentDidLoad(){this.el.querySelectorAll(`[${this.functionAttribute}]`).forEach((t=>{t.addEventListener("click",(t=>{t.preventDefault(),this.fetchFormData()&&this.formSubmit.emit(this.fetchFormData())}))}))}render(){return r("div",null,r("slot",null))}get el(){return i(this)}};export{o as tttx_form}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
2
|
-
export declare class TttxInput {
|
|
3
|
-
isfocused: boolean;
|
|
4
|
-
label: string;
|
|
5
|
-
valid: boolean;
|
|
6
|
-
showerrormsg: boolean;
|
|
7
|
-
errormsg: string;
|
|
8
|
-
value: string;
|
|
9
|
-
type: string;
|
|
10
|
-
placeholder: string;
|
|
11
|
-
pattern: string;
|
|
12
|
-
iconleft: string;
|
|
13
|
-
iconright: string;
|
|
14
|
-
required: boolean;
|
|
15
|
-
valueChanged: EventEmitter<string>;
|
|
16
|
-
handleChange(event: Event): void;
|
|
17
|
-
handleFocus: () => void;
|
|
18
|
-
handleBlur: () => void;
|
|
19
|
-
render(): any;
|
|
20
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
title: string;
|
|
3
|
-
component: string;
|
|
4
|
-
argTypes: {
|
|
5
|
-
iconleft: {
|
|
6
|
-
options: string[];
|
|
7
|
-
control: {
|
|
8
|
-
type: string;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
iconright: {
|
|
12
|
-
options: string[];
|
|
13
|
-
control: {
|
|
14
|
-
type: string;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
type: {
|
|
18
|
-
options: string[];
|
|
19
|
-
control: {
|
|
20
|
-
type: string;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
value: {
|
|
24
|
-
control: {
|
|
25
|
-
type: string;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
label: {
|
|
29
|
-
control: {
|
|
30
|
-
type: string;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
required: {
|
|
34
|
-
control: {
|
|
35
|
-
type: string;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
errormsg: {
|
|
39
|
-
control: {
|
|
40
|
-
type: string;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
showerrormsg: {
|
|
44
|
-
control: {
|
|
45
|
-
type: string;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
placeholder: {
|
|
49
|
-
control: {
|
|
50
|
-
type: string;
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
export default _default;
|
|
56
|
-
export declare const TextInputBasic: any;
|
|
57
|
-
export declare const TextInputIconRight: any;
|
|
58
|
-
export declare const PasswordInputBasic: any;
|
|
59
|
-
export declare const EmailInputBasic: any;
|
|
60
|
-
export declare const NumberInputBasic: any;
|