@3t-transform/threeteeui 0.0.14 → 0.0.16
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-bf39be87.js → index-864b7110.js} +4 -3
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/tttx-button.cjs.entry.js +18 -18
- package/dist/cjs/tttx-checkbox.cjs.entry.js +18 -18
- package/dist/cjs/tttx-form.cjs.entry.js +364 -176
- package/dist/cjs/tttx-icon.cjs.entry.js +56 -54
- package/dist/cjs/tttx-list.cjs.entry.js +188 -188
- package/dist/cjs/tttx-loading-spinner.cjs.entry.js +16 -16
- package/dist/cjs/tttx-popover-content.cjs.entry.js +13 -13
- package/dist/cjs/tttx-standalone-input.cjs.entry.js +127 -127
- package/dist/cjs/tttx-table.cjs.entry.js +60 -0
- package/dist/cjs/tttx.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/atoms/tttx-button/tttx-button.js +93 -93
- package/dist/collection/components/atoms/tttx-button/tttx-button.stories.js +25 -25
- package/dist/collection/components/atoms/tttx-icon/tttx-icon.js +116 -114
- package/dist/collection/components/atoms/tttx-icon/tttx-icon.stories.js +32 -32
- package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.js +66 -66
- package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.js +17 -17
- package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.js +96 -96
- package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.stories.js +23 -23
- package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.js +101 -101
- package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.stories.js +9 -9
- package/dist/collection/components/molecules/tttx-form/tttx-form.js +451 -249
- package/dist/collection/components/molecules/tttx-form/tttx-form.stories.js +109 -102
- package/dist/collection/components/molecules/tttx-list/tttx-list.js +311 -311
- package/dist/collection/components/molecules/tttx-list/tttx-list.stories.js +15 -15
- package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.js +569 -569
- package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.js +134 -134
- package/dist/collection/components/molecules/tttx-table/tttx-table.css +166 -0
- package/dist/collection/components/molecules/tttx-table/tttx-table.js +177 -0
- package/dist/collection/components/molecules/tttx-table/tttx-table.stories.js +81 -0
- package/dist/collection/components/palette.stories.js +7 -7
- package/dist/collection/docs/gettingstarted-developer.stories.js +5 -5
- package/dist/collection/icons.js +2838 -2838
- package/dist/collection/index.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/tttx-button.js +35 -35
- package/dist/components/tttx-checkbox.js +36 -36
- package/dist/components/tttx-form.js +381 -193
- package/dist/components/tttx-icon2.js +73 -71
- package/dist/components/tttx-list.js +214 -214
- package/dist/components/tttx-loading-spinner2.js +33 -33
- package/dist/components/tttx-popover-content.js +1 -37
- package/dist/components/tttx-popover-content2.js +39 -0
- package/dist/components/tttx-standalone-input.js +169 -168
- package/dist/components/tttx-table.d.ts +11 -0
- package/dist/components/tttx-table.js +91 -0
- package/dist/esm/{index-63c4d25e.js → index-232e347b.js} +4 -3
- package/dist/esm/loader.js +3 -3
- package/dist/esm/polyfills/core-js.js +0 -0
- package/dist/esm/polyfills/dom.js +0 -0
- package/dist/esm/polyfills/es5-html-element.js +0 -0
- package/dist/esm/polyfills/index.js +0 -0
- package/dist/esm/polyfills/system.js +0 -0
- package/dist/esm/tttx-button.entry.js +18 -18
- package/dist/esm/tttx-checkbox.entry.js +18 -18
- package/dist/esm/tttx-form.entry.js +364 -176
- package/dist/esm/tttx-icon.entry.js +56 -54
- package/dist/esm/tttx-list.entry.js +188 -188
- package/dist/esm/tttx-loading-spinner.entry.js +16 -16
- package/dist/esm/tttx-popover-content.entry.js +13 -13
- package/dist/esm/tttx-standalone-input.entry.js +127 -127
- package/dist/esm/tttx-table.entry.js +56 -0
- package/dist/esm/tttx.js +3 -3
- package/dist/tttx/{p-2d54f8aa.entry.js → p-01e1894e.entry.js} +1 -1
- package/dist/tttx/{p-709246f5.entry.js → p-10316ff1.entry.js} +1 -1
- package/dist/tttx/p-125f06b3.entry.js +1 -0
- package/dist/tttx/p-184c4fae.js +2 -0
- package/dist/tttx/{p-ad0c3fe4.entry.js → p-3973b7dd.entry.js} +1 -1
- package/dist/tttx/p-5ce1ba22.entry.js +1 -0
- package/dist/tttx/{p-4c57bcbd.entry.js → p-6828fe6f.entry.js} +1 -1
- package/dist/tttx/p-b1c22f5f.entry.js +1 -0
- package/dist/tttx/{p-1a4eb1f3.entry.js → p-c7f9be65.entry.js} +1 -1
- package/dist/tttx/{p-2b6720ac.entry.js → p-fe4c70b2.entry.js} +1 -1
- package/dist/tttx/tttx.esm.js +1 -1
- package/dist/types/components/atoms/tttx-button/tttx-button.d.ts +9 -9
- package/dist/types/components/atoms/tttx-button/tttx-button.stories.d.ts +20 -20
- package/dist/types/components/atoms/tttx-icon/tttx-icon.d.ts +14 -14
- package/dist/types/components/atoms/tttx-icon/tttx-icon.stories.d.ts +21 -21
- package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.d.ts +6 -6
- package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.d.ts +17 -17
- package/dist/types/components/atoms/tttx-popover-content/tttx-popover-content.d.ts +7 -7
- package/dist/types/components/atoms/tttx-popover-content/tttx-popover-content.stories.d.ts +18 -18
- package/dist/types/components/atoms/ttx-checkbox/tttx-checkbox.d.ts +9 -9
- package/dist/types/components/atoms/ttx-checkbox/tttx-checkbox.stories.d.ts +6 -6
- package/dist/types/components/molecules/tttx-form/tttx-form.d.ts +134 -18
- package/dist/types/components/molecules/tttx-form/tttx-form.stories.d.ts +12 -6
- package/dist/types/components/molecules/tttx-list/tttx-list.d.ts +51 -51
- package/dist/types/components/molecules/tttx-list/tttx-list.stories.d.ts +13 -13
- package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.d.ts +38 -38
- package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.d.ts +106 -106
- package/dist/types/components/molecules/tttx-table/tttx-table.d.ts +15 -0
- package/dist/types/components/molecules/tttx-table/tttx-table.stories.d.ts +21 -0
- package/dist/types/components/palette.stories.d.ts +6 -6
- package/dist/types/components.d.ts +29 -1
- package/dist/types/docs/gettingstarted-developer.stories.d.ts +5 -5
- package/dist/types/icons.d.ts +2 -2
- package/dist/types/index.d.ts +1 -1
- package/package.json +7 -4
- package/dist/tttx/p-28e4c359.entry.js +0 -1
- package/dist/tttx/p-95a29e09.entry.js +0 -1
- package/dist/tttx/p-bec472d8.js +0 -2
|
@@ -1,102 +1,109 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
1
|
+
import { withActions } from '@storybook/addon-actions/decorator';
|
|
2
|
+
export default {
|
|
3
|
+
title: 'molecules/Form',
|
|
4
|
+
component: 'tttx-form',
|
|
5
|
+
parameters: {
|
|
6
|
+
actions: {
|
|
7
|
+
handles: ['dataSubmitted', 'dataChanged'],
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
decorators: [withActions],
|
|
11
|
+
};
|
|
12
|
+
const formSchema = {
|
|
13
|
+
properties: {
|
|
14
|
+
title: {
|
|
15
|
+
type: 'string',
|
|
16
|
+
format: 'string',
|
|
17
|
+
form: {
|
|
18
|
+
type: 'text',
|
|
19
|
+
placeholder: 'Mr, Mrs, Dr, Hon Rev',
|
|
20
|
+
label: 'Title',
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
forename: {
|
|
24
|
+
type: 'string',
|
|
25
|
+
format: 'string',
|
|
26
|
+
form: {
|
|
27
|
+
type: 'text',
|
|
28
|
+
placeholder: 'John',
|
|
29
|
+
label: 'Forename',
|
|
30
|
+
validation: {
|
|
31
|
+
required: {
|
|
32
|
+
message: 'Please enter your forename',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
surname: {
|
|
38
|
+
type: 'string',
|
|
39
|
+
format: 'string',
|
|
40
|
+
form: {
|
|
41
|
+
type: 'text',
|
|
42
|
+
placeholder: 'Doe',
|
|
43
|
+
label: 'Surname',
|
|
44
|
+
validation: {
|
|
45
|
+
required: {
|
|
46
|
+
message: 'Please enter your surname',
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
postcode: {
|
|
52
|
+
type: 'string',
|
|
53
|
+
format: 'string',
|
|
54
|
+
form: {
|
|
55
|
+
type: 'text',
|
|
56
|
+
placeholder: 'AB10',
|
|
57
|
+
label: 'Start of postcode',
|
|
58
|
+
validation: {
|
|
59
|
+
required: {
|
|
60
|
+
message: 'Please enter the beginning of your postcode',
|
|
61
|
+
},
|
|
62
|
+
pattern: {
|
|
63
|
+
pattern: '^([A-Za-z][0-9])$|^([A-Za-z][0-9]{2})$|^([A-Za-z]{2}[0-9])$|^([A-Za-z]{2}[0-9]{2})$|^([A-Za-z][0-9][A-Za-z])$|^([A-Za-z]{2}[0-9][A-Za-z])$|^(GIR|BF|BX|XX)$',
|
|
64
|
+
message: 'Please enter the first half of your postcode. EG: ZZ99',
|
|
65
|
+
},
|
|
66
|
+
maxlength: 4,
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
age: {
|
|
71
|
+
type: 'number',
|
|
72
|
+
format: 'number',
|
|
73
|
+
form: {
|
|
74
|
+
type: 'number',
|
|
75
|
+
placeholder: '',
|
|
76
|
+
label: 'Age',
|
|
77
|
+
validation: {
|
|
78
|
+
required: {
|
|
79
|
+
message: 'Please enter your age',
|
|
80
|
+
},
|
|
81
|
+
badInput: {
|
|
82
|
+
message: 'Please enter a number',
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
dob: {
|
|
88
|
+
type: 'string',
|
|
89
|
+
format: 'date-time',
|
|
90
|
+
form: {
|
|
91
|
+
type: 'date',
|
|
92
|
+
placeholder: '',
|
|
93
|
+
label: 'Date of birth',
|
|
94
|
+
validation: {
|
|
95
|
+
required: {
|
|
96
|
+
message: 'Please enter your date of birth',
|
|
97
|
+
},
|
|
98
|
+
minmax: {
|
|
99
|
+
min: '1900-01-01',
|
|
100
|
+
max: '2100-12-31',
|
|
101
|
+
message: 'Please enter a date between 1900 and 2100',
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
const jsonFormSchema = JSON.stringify(formSchema);
|
|
109
|
+
export const ExampleFormFromJSON = () => `<tttx-form formSchema='${jsonFormSchema}'></tttx-form>`;
|