@3t-transform/threeteeui 0.0.9 → 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.
Files changed (82) hide show
  1. package/dist/cjs/{index-8a4cb9bc.js → index-bf39be87.js} +41 -0
  2. package/dist/cjs/loader.cjs.js +2 -2
  3. package/dist/cjs/tttx-button.cjs.entry.js +2 -2
  4. package/dist/cjs/tttx-checkbox.cjs.entry.js +3 -3
  5. package/dist/cjs/tttx-form.cjs.entry.js +169 -41
  6. package/dist/cjs/tttx-icon.cjs.entry.js +2 -2
  7. package/dist/cjs/tttx-loading-spinner.cjs.entry.js +26 -0
  8. package/dist/cjs/tttx-popover-content.cjs.entry.js +2 -2
  9. package/dist/cjs/tttx-standalone-input.cjs.entry.js +134 -0
  10. package/dist/cjs/tttx.cjs.js +2 -2
  11. package/dist/collection/collection-manifest.json +3 -2
  12. package/dist/collection/components/atoms/tttx-button/tttx-button.css +1 -0
  13. package/dist/collection/components/atoms/tttx-button/tttx-button.stories.js +3 -3
  14. package/dist/collection/components/atoms/tttx-icon/tttx-icon.css +8 -4
  15. package/dist/collection/components/atoms/tttx-icon/tttx-icon.stories.js +15 -15
  16. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.css +48 -0
  17. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.js +66 -0
  18. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.js +17 -0
  19. package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.js +1 -1
  20. package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.stories.js +3 -3
  21. package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.css +86 -43
  22. package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.js +1 -1
  23. package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.stories.js +5 -5
  24. package/dist/collection/components/molecules/tttx-form/tttx-form.css +230 -0
  25. package/dist/collection/components/molecules/tttx-form/tttx-form.js +195 -55
  26. package/dist/collection/components/molecules/tttx-form/tttx-form.stories.js +97 -28
  27. package/dist/collection/components/molecules/{tttx-input/tttx-input.css → tttx-standalone-input/tttx-standalone-input.css} +78 -53
  28. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.js +561 -0
  29. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.js +156 -0
  30. package/dist/collection/components/palette.stories.js +81 -81
  31. package/dist/collection/docs/gettingstarted-developer.stories.js +4 -4
  32. package/dist/components/index.d.ts +2 -1
  33. package/dist/components/index.js +2 -1
  34. package/dist/components/tttx-button.js +1 -1
  35. package/dist/components/tttx-checkbox.js +2 -2
  36. package/dist/components/tttx-form.js +167 -39
  37. package/dist/components/tttx-icon2.js +1 -1
  38. package/dist/components/{tttx-input.d.ts → tttx-loading-spinner.d.ts} +4 -4
  39. package/dist/components/tttx-loading-spinner.js +43 -0
  40. package/dist/components/tttx-popover-content.js +1 -1
  41. package/dist/components/tttx-standalone-input.d.ts +11 -0
  42. package/dist/components/tttx-standalone-input.js +178 -0
  43. package/dist/esm/{index-9654537d.js → index-63c4d25e.js} +41 -0
  44. package/dist/esm/loader.js +3 -3
  45. package/dist/esm/tttx-button.entry.js +2 -2
  46. package/dist/esm/tttx-checkbox.entry.js +3 -3
  47. package/dist/esm/tttx-form.entry.js +169 -41
  48. package/dist/esm/tttx-icon.entry.js +2 -2
  49. package/dist/esm/tttx-loading-spinner.entry.js +22 -0
  50. package/dist/esm/tttx-popover-content.entry.js +2 -2
  51. package/dist/esm/tttx-standalone-input.entry.js +130 -0
  52. package/dist/esm/tttx.js +3 -3
  53. package/dist/tttx/{p-3cb692d6.entry.js → p-1a4eb1f3.entry.js} +1 -1
  54. package/dist/tttx/p-2d54f8aa.entry.js +1 -0
  55. package/dist/tttx/p-338b3976.entry.js +1 -0
  56. package/dist/tttx/p-4c57bcbd.entry.js +1 -0
  57. package/dist/tttx/p-709246f5.entry.js +1 -0
  58. package/dist/tttx/p-95a29e09.entry.js +1 -0
  59. package/dist/tttx/{p-1884203f.entry.js → p-ad0c3fe4.entry.js} +1 -1
  60. package/dist/tttx/p-bec472d8.js +2 -0
  61. package/dist/tttx/tttx.esm.js +1 -1
  62. package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.d.ts +6 -0
  63. package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.d.ts +17 -0
  64. package/dist/types/components/molecules/tttx-form/tttx-form.d.ts +14 -7
  65. package/dist/types/components/molecules/tttx-form/tttx-form.stories.d.ts +1 -8
  66. package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.d.ts +38 -0
  67. package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.d.ts +106 -0
  68. package/dist/types/components.d.ts +73 -31
  69. package/package.json +67 -65
  70. package/readme.md +89 -86
  71. package/dist/cjs/tttx-input.cjs.entry.js +0 -44
  72. package/dist/collection/components/molecules/tttx-input/tttx-input.js +0 -259
  73. package/dist/collection/components/molecules/tttx-input/tttx-input.stories.js +0 -106
  74. package/dist/components/tttx-input.js +0 -77
  75. package/dist/esm/tttx-input.entry.js +0 -40
  76. package/dist/tttx/p-8e977b49.entry.js +0 -1
  77. package/dist/tttx/p-b6cc2780.js +0 -2
  78. package/dist/tttx/p-beb8e3fc.entry.js +0 -1
  79. package/dist/tttx/p-ece1c722.entry.js +0 -1
  80. package/dist/tttx/p-f30a0e84.entry.js +0 -1
  81. package/dist/types/components/molecules/tttx-input/tttx-input.d.ts +0 -20
  82. package/dist/types/components/molecules/tttx-input/tttx-input.stories.d.ts +0 -60
@@ -0,0 +1,561 @@
1
+ import { Host, h } from '@stencil/core';
2
+ export class TttxInput {
3
+ constructor() {
4
+ this.isfocused = false;
5
+ this.label = undefined;
6
+ this.valid = undefined;
7
+ this.showerrormsg = undefined;
8
+ this.errormsg = undefined;
9
+ this.iconleft = undefined;
10
+ this.iconright = undefined;
11
+ this.autocapitalize = undefined;
12
+ this.autocomplete = undefined;
13
+ this.autofocus = undefined;
14
+ this.checked = undefined;
15
+ this.disabled = undefined;
16
+ this.max = undefined;
17
+ this.maxlength = undefined;
18
+ this.min = undefined;
19
+ this.minlength = undefined;
20
+ this.name = undefined;
21
+ this.pattern = undefined;
22
+ this.placeholder = undefined;
23
+ this.readonly = undefined;
24
+ this.required = undefined;
25
+ this.step = undefined;
26
+ this.type = 'text';
27
+ this.value = undefined;
28
+ }
29
+ handleChange(event) {
30
+ const target = event.target;
31
+ this.value = target.value;
32
+ this.valueChanged.emit(target.value);
33
+ }
34
+ handleFocus() {
35
+ this.isfocused = true;
36
+ }
37
+ handleBlur() {
38
+ this.isfocused = false;
39
+ }
40
+ render() {
41
+ const classNames = ['standalone', this.showerrormsg ? 'invalid' : ''].join(' ');
42
+ return (h(Host, null, h("label", { class: 'inputBlock' }, this.label, !this.required ? h("span", { class: "optional" }, "\u00A0(optional)") : '', this.iconleft && (h("div", { class: "icon-left" }, h("tttx-icon", { icon: this.iconleft, colour: "grey" }))), h("input", { class: classNames, autocapitalize: this.type === 'url' || this.type === 'email' || this.type === 'password' ? this.autocapitalize : null, autofocus: this.autofocus, autocomplete: this.type === 'text' ||
43
+ this.type === 'search' ||
44
+ this.type === 'url' ||
45
+ this.type === 'tel' ||
46
+ this.type === 'email' ||
47
+ this.type === 'password' ||
48
+ this.type === 'datepickers' ||
49
+ this.type === 'range' ||
50
+ this.type === 'color'
51
+ ? this.autocomplete
52
+ : null, checked: this.type === 'checkbox' || this.type === 'radio' ? this.checked : null, disabled: !this.required ? this.disabled : null, max: this.type === 'date' ||
53
+ this.type === 'month' ||
54
+ this.type === 'week' ||
55
+ this.type === 'time' ||
56
+ this.type === 'datetime-local' ||
57
+ this.type === 'number' ||
58
+ this.type === 'range'
59
+ ? this.max
60
+ : null, maxlength: this.maxlength, min: this.type === 'date' ||
61
+ this.type === 'month' ||
62
+ this.type === 'week' ||
63
+ this.type === 'time' ||
64
+ this.type === 'datetime-local' ||
65
+ this.type === 'number' ||
66
+ this.type === 'range'
67
+ ? this.min
68
+ : null, minlength: this.maxlength, name: this.name, pattern: this.type === 'text' ||
69
+ this.type === 'date' ||
70
+ this.type === 'search' ||
71
+ this.type === 'url' ||
72
+ this.type === 'tel' ||
73
+ this.type === 'email' ||
74
+ this.type === 'password'
75
+ ? this.pattern
76
+ : null, placeholder: this.type === 'text' ||
77
+ this.type === 'tel' ||
78
+ this.type === 'email' ||
79
+ this.type === 'url' ||
80
+ this.type === 'password' ||
81
+ this.type === 'search'
82
+ ? this.placeholder
83
+ : null, readonly: this.type === 'text' ||
84
+ this.type === 'search' ||
85
+ this.type === 'url' ||
86
+ this.type === 'tel' ||
87
+ this.type === 'email' ||
88
+ this.type === 'password' ||
89
+ this.type === 'date' ||
90
+ this.type === 'month' ||
91
+ this.type === 'week' ||
92
+ this.type === 'time' ||
93
+ this.type === 'datetime-local' ||
94
+ this.type === 'number'
95
+ ? this.readonly
96
+ : null, required: this.type === 'text' ||
97
+ this.type === 'search' ||
98
+ this.type === 'url' ||
99
+ this.type === 'tel' ||
100
+ this.type === 'email' ||
101
+ this.type === 'password' ||
102
+ this.type === 'date' ||
103
+ this.type === 'month' ||
104
+ this.type === 'week' ||
105
+ this.type === 'time' ||
106
+ this.type === 'datetime-local' ||
107
+ this.type === 'number' ||
108
+ this.type === 'checkbox' ||
109
+ this.type === 'radio' ||
110
+ this.type === 'file'
111
+ ? this.required
112
+ : null, step: this.type === 'date' ||
113
+ this.type === 'month' ||
114
+ this.type === 'week' ||
115
+ this.type === 'time' ||
116
+ this.type === 'datetime-local' ||
117
+ this.type === 'number' ||
118
+ this.type === 'range'
119
+ ? this.step
120
+ : null, type: this.type, value: this.value, onBlur: this.handleBlur.bind(this), onFocus: this.handleFocus.bind(this), onInput: this.handleChange.bind(this) }), this.iconright && (h("div", { class: "icon-right" }, h("tttx-icon", { icon: this.iconright, colour: "grey" }))), h("span", { class: ['errorBubble', this.showerrormsg && this.errormsg ? 'visible' : ''].join(' ') }, h("span", { class: "material-symbols-rounded validationicon" }, "warning"), " ", this.errormsg))));
121
+ }
122
+ static get is() { return "tttx-standalone-input"; }
123
+ static get encapsulation() { return "scoped"; }
124
+ static get originalStyleUrls() {
125
+ return {
126
+ "$": ["./tttx-standalone-input.scss"]
127
+ };
128
+ }
129
+ static get styleUrls() {
130
+ return {
131
+ "$": ["tttx-standalone-input.css"]
132
+ };
133
+ }
134
+ static get properties() {
135
+ return {
136
+ "label": {
137
+ "type": "string",
138
+ "mutable": false,
139
+ "complexType": {
140
+ "original": "string",
141
+ "resolved": "string",
142
+ "references": {}
143
+ },
144
+ "required": false,
145
+ "optional": false,
146
+ "docs": {
147
+ "tags": [],
148
+ "text": ""
149
+ },
150
+ "attribute": "label",
151
+ "reflect": false
152
+ },
153
+ "valid": {
154
+ "type": "boolean",
155
+ "mutable": false,
156
+ "complexType": {
157
+ "original": "boolean",
158
+ "resolved": "boolean",
159
+ "references": {}
160
+ },
161
+ "required": false,
162
+ "optional": false,
163
+ "docs": {
164
+ "tags": [],
165
+ "text": ""
166
+ },
167
+ "attribute": "valid",
168
+ "reflect": false
169
+ },
170
+ "showerrormsg": {
171
+ "type": "boolean",
172
+ "mutable": false,
173
+ "complexType": {
174
+ "original": "boolean",
175
+ "resolved": "boolean",
176
+ "references": {}
177
+ },
178
+ "required": false,
179
+ "optional": false,
180
+ "docs": {
181
+ "tags": [],
182
+ "text": ""
183
+ },
184
+ "attribute": "showerrormsg",
185
+ "reflect": false
186
+ },
187
+ "errormsg": {
188
+ "type": "string",
189
+ "mutable": false,
190
+ "complexType": {
191
+ "original": "string",
192
+ "resolved": "string",
193
+ "references": {}
194
+ },
195
+ "required": false,
196
+ "optional": false,
197
+ "docs": {
198
+ "tags": [],
199
+ "text": ""
200
+ },
201
+ "attribute": "errormsg",
202
+ "reflect": false
203
+ },
204
+ "iconleft": {
205
+ "type": "string",
206
+ "mutable": false,
207
+ "complexType": {
208
+ "original": "string",
209
+ "resolved": "string",
210
+ "references": {}
211
+ },
212
+ "required": false,
213
+ "optional": false,
214
+ "docs": {
215
+ "tags": [],
216
+ "text": ""
217
+ },
218
+ "attribute": "iconleft",
219
+ "reflect": false
220
+ },
221
+ "iconright": {
222
+ "type": "string",
223
+ "mutable": false,
224
+ "complexType": {
225
+ "original": "string",
226
+ "resolved": "string",
227
+ "references": {}
228
+ },
229
+ "required": false,
230
+ "optional": false,
231
+ "docs": {
232
+ "tags": [],
233
+ "text": ""
234
+ },
235
+ "attribute": "iconright",
236
+ "reflect": false
237
+ },
238
+ "autocapitalize": {
239
+ "type": "string",
240
+ "mutable": false,
241
+ "complexType": {
242
+ "original": "string",
243
+ "resolved": "string",
244
+ "references": {}
245
+ },
246
+ "required": false,
247
+ "optional": false,
248
+ "docs": {
249
+ "tags": [],
250
+ "text": ""
251
+ },
252
+ "attribute": "autocapitalize",
253
+ "reflect": false
254
+ },
255
+ "autocomplete": {
256
+ "type": "string",
257
+ "mutable": false,
258
+ "complexType": {
259
+ "original": "'off' | 'on'",
260
+ "resolved": "\"off\" | \"on\"",
261
+ "references": {}
262
+ },
263
+ "required": false,
264
+ "optional": false,
265
+ "docs": {
266
+ "tags": [],
267
+ "text": ""
268
+ },
269
+ "attribute": "autocomplete",
270
+ "reflect": false
271
+ },
272
+ "autofocus": {
273
+ "type": "boolean",
274
+ "mutable": false,
275
+ "complexType": {
276
+ "original": "boolean",
277
+ "resolved": "boolean",
278
+ "references": {}
279
+ },
280
+ "required": false,
281
+ "optional": false,
282
+ "docs": {
283
+ "tags": [],
284
+ "text": ""
285
+ },
286
+ "attribute": "autofocus",
287
+ "reflect": false
288
+ },
289
+ "checked": {
290
+ "type": "boolean",
291
+ "mutable": false,
292
+ "complexType": {
293
+ "original": "boolean",
294
+ "resolved": "boolean",
295
+ "references": {}
296
+ },
297
+ "required": false,
298
+ "optional": false,
299
+ "docs": {
300
+ "tags": [],
301
+ "text": ""
302
+ },
303
+ "attribute": "checked",
304
+ "reflect": false
305
+ },
306
+ "disabled": {
307
+ "type": "boolean",
308
+ "mutable": false,
309
+ "complexType": {
310
+ "original": "boolean",
311
+ "resolved": "boolean",
312
+ "references": {}
313
+ },
314
+ "required": false,
315
+ "optional": false,
316
+ "docs": {
317
+ "tags": [],
318
+ "text": ""
319
+ },
320
+ "attribute": "disabled",
321
+ "reflect": false
322
+ },
323
+ "max": {
324
+ "type": "any",
325
+ "mutable": false,
326
+ "complexType": {
327
+ "original": "MinMaxDates | number",
328
+ "resolved": "`${number}${number}${number}${number}-${number}${number}-${number}${number}T${number}${number}:${number}${number}` | `${number}${number}${number}${number}-${number}${number}-${number}${number}` | `${number}${number}${number}${number}-${number}${number}` | `${number}${number}${number}${number}-W${number}${number}` | `${number}${number}:${number}${number}` | number",
329
+ "references": {
330
+ "MinMaxDates": {
331
+ "location": "local"
332
+ }
333
+ }
334
+ },
335
+ "required": false,
336
+ "optional": false,
337
+ "docs": {
338
+ "tags": [],
339
+ "text": ""
340
+ },
341
+ "attribute": "max",
342
+ "reflect": false
343
+ },
344
+ "maxlength": {
345
+ "type": "any",
346
+ "mutable": false,
347
+ "complexType": {
348
+ "original": "string | number",
349
+ "resolved": "number | string",
350
+ "references": {}
351
+ },
352
+ "required": false,
353
+ "optional": false,
354
+ "docs": {
355
+ "tags": [],
356
+ "text": ""
357
+ },
358
+ "attribute": "maxlength",
359
+ "reflect": false
360
+ },
361
+ "min": {
362
+ "type": "any",
363
+ "mutable": false,
364
+ "complexType": {
365
+ "original": "MinMaxDates | number",
366
+ "resolved": "`${number}${number}${number}${number}-${number}${number}-${number}${number}T${number}${number}:${number}${number}` | `${number}${number}${number}${number}-${number}${number}-${number}${number}` | `${number}${number}${number}${number}-${number}${number}` | `${number}${number}${number}${number}-W${number}${number}` | `${number}${number}:${number}${number}` | number",
367
+ "references": {
368
+ "MinMaxDates": {
369
+ "location": "local"
370
+ }
371
+ }
372
+ },
373
+ "required": false,
374
+ "optional": false,
375
+ "docs": {
376
+ "tags": [],
377
+ "text": ""
378
+ },
379
+ "attribute": "min",
380
+ "reflect": false
381
+ },
382
+ "minlength": {
383
+ "type": "any",
384
+ "mutable": false,
385
+ "complexType": {
386
+ "original": "string | number",
387
+ "resolved": "number | string",
388
+ "references": {}
389
+ },
390
+ "required": false,
391
+ "optional": false,
392
+ "docs": {
393
+ "tags": [],
394
+ "text": ""
395
+ },
396
+ "attribute": "minlength",
397
+ "reflect": false
398
+ },
399
+ "name": {
400
+ "type": "string",
401
+ "mutable": false,
402
+ "complexType": {
403
+ "original": "string",
404
+ "resolved": "string",
405
+ "references": {}
406
+ },
407
+ "required": false,
408
+ "optional": false,
409
+ "docs": {
410
+ "tags": [],
411
+ "text": ""
412
+ },
413
+ "attribute": "name",
414
+ "reflect": false
415
+ },
416
+ "pattern": {
417
+ "type": "string",
418
+ "mutable": false,
419
+ "complexType": {
420
+ "original": "string",
421
+ "resolved": "string",
422
+ "references": {}
423
+ },
424
+ "required": false,
425
+ "optional": false,
426
+ "docs": {
427
+ "tags": [],
428
+ "text": ""
429
+ },
430
+ "attribute": "pattern",
431
+ "reflect": false
432
+ },
433
+ "placeholder": {
434
+ "type": "string",
435
+ "mutable": false,
436
+ "complexType": {
437
+ "original": "string",
438
+ "resolved": "string",
439
+ "references": {}
440
+ },
441
+ "required": false,
442
+ "optional": false,
443
+ "docs": {
444
+ "tags": [],
445
+ "text": ""
446
+ },
447
+ "attribute": "placeholder",
448
+ "reflect": false
449
+ },
450
+ "readonly": {
451
+ "type": "any",
452
+ "mutable": false,
453
+ "complexType": {
454
+ "original": "string | boolean",
455
+ "resolved": "boolean | string",
456
+ "references": {}
457
+ },
458
+ "required": false,
459
+ "optional": false,
460
+ "docs": {
461
+ "tags": [],
462
+ "text": ""
463
+ },
464
+ "attribute": "readonly",
465
+ "reflect": false
466
+ },
467
+ "required": {
468
+ "type": "boolean",
469
+ "mutable": false,
470
+ "complexType": {
471
+ "original": "boolean",
472
+ "resolved": "boolean",
473
+ "references": {}
474
+ },
475
+ "required": false,
476
+ "optional": false,
477
+ "docs": {
478
+ "tags": [],
479
+ "text": ""
480
+ },
481
+ "attribute": "required",
482
+ "reflect": false
483
+ },
484
+ "step": {
485
+ "type": "any",
486
+ "mutable": false,
487
+ "complexType": {
488
+ "original": "string | number",
489
+ "resolved": "number | string",
490
+ "references": {}
491
+ },
492
+ "required": false,
493
+ "optional": false,
494
+ "docs": {
495
+ "tags": [],
496
+ "text": ""
497
+ },
498
+ "attribute": "step",
499
+ "reflect": false
500
+ },
501
+ "type": {
502
+ "type": "string",
503
+ "mutable": false,
504
+ "complexType": {
505
+ "original": "string",
506
+ "resolved": "string",
507
+ "references": {}
508
+ },
509
+ "required": false,
510
+ "optional": false,
511
+ "docs": {
512
+ "tags": [],
513
+ "text": ""
514
+ },
515
+ "attribute": "type",
516
+ "reflect": false,
517
+ "defaultValue": "'text'"
518
+ },
519
+ "value": {
520
+ "type": "any",
521
+ "mutable": true,
522
+ "complexType": {
523
+ "original": "string | number",
524
+ "resolved": "number | string",
525
+ "references": {}
526
+ },
527
+ "required": false,
528
+ "optional": false,
529
+ "docs": {
530
+ "tags": [],
531
+ "text": ""
532
+ },
533
+ "attribute": "value",
534
+ "reflect": false
535
+ }
536
+ };
537
+ }
538
+ static get states() {
539
+ return {
540
+ "isfocused": {}
541
+ };
542
+ }
543
+ static get events() {
544
+ return [{
545
+ "method": "valueChanged",
546
+ "name": "valueChanged",
547
+ "bubbles": true,
548
+ "cancelable": true,
549
+ "composed": true,
550
+ "docs": {
551
+ "tags": [],
552
+ "text": ""
553
+ },
554
+ "complexType": {
555
+ "original": "string",
556
+ "resolved": "string",
557
+ "references": {}
558
+ }
559
+ }];
560
+ }
561
+ }