@3t-transform/threeteeui 0.1.5 → 0.1.7
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/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/css-shim-211819bc.js +6 -0
- package/dist/cjs/dom-9deb26c8.js +75 -0
- package/dist/cjs/index-11cfdabe.js +3297 -0
- package/dist/cjs/{index-906c2757.js → index-451f61dd.js} +3 -102
- package/dist/cjs/loader.cjs.js +19 -4
- package/dist/cjs/shadow-css-bf3843d2.js +389 -0
- package/dist/cjs/{tttx-button_2.cjs.entry.js → tttx-button.cjs.entry.js} +24 -50
- package/dist/cjs/tttx-form.cjs.entry.js +364 -364
- package/dist/cjs/tttx-icon.cjs.entry.js +21 -0
- package/dist/cjs/tttx-keyvalue-block.cjs.entry.js +57 -57
- package/dist/cjs/tttx-list.cjs.entry.js +76 -46
- package/dist/cjs/tttx-loading-spinner.cjs.entry.js +16 -16
- package/dist/cjs/tttx-standalone-input.cjs.entry.js +61 -58
- package/dist/cjs/tttx-toolbar.cjs.entry.js +20 -0
- package/dist/cjs/tttx.cjs.js +117 -9
- package/dist/collection/collection-manifest.json +4 -3
- package/dist/collection/components/atoms/tttx-button/test/tttx-button.e2e.js +9 -0
- package/dist/collection/components/atoms/tttx-button/test/tttx-button.spec.js +83 -0
- package/dist/collection/components/atoms/tttx-button/tttx-button.js +110 -116
- package/dist/collection/components/atoms/tttx-button/tttx-button.stories.js +14 -14
- package/dist/collection/components/atoms/tttx-icon/test/tttx-icon.e2e.js +9 -0
- package/dist/collection/components/atoms/tttx-icon/test/tttx-icon.spec.js +16 -0
- package/dist/collection/components/atoms/tttx-icon/tttx-icon.css +4 -0
- package/dist/collection/components/atoms/tttx-icon/tttx-icon.js +62 -62
- package/dist/collection/components/atoms/tttx-icon/tttx-icon.stories.js +22 -22
- package/dist/collection/components/atoms/tttx-keyvalue-block/test/tttx-keyvalue-block.spec.js +216 -0
- package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.js +107 -107
- package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.stories.js +38 -38
- package/dist/collection/components/atoms/tttx-loading-spinner/Test/tttx-loading-spinner.spec.js +64 -0
- package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.js +67 -67
- package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.js +17 -17
- package/dist/collection/components/molecules/tttx-form/lib/setErrorState.js +35 -35
- package/dist/collection/components/molecules/tttx-form/lib/setErrorState.spec.js +38 -0
- package/dist/collection/components/molecules/tttx-form/lib/validityCheck.js +58 -58
- package/dist/collection/components/molecules/tttx-form/lib/validityCheck.spec.js +214 -0
- package/dist/collection/components/molecules/tttx-form/test/tttx-form.e2e.js +9 -0
- package/dist/collection/components/molecules/tttx-form/test/tttx-form.spec.js +232 -0
- package/dist/collection/components/molecules/tttx-form/tttx-form.css +32 -3
- package/dist/collection/components/molecules/tttx-form/tttx-form.js +364 -364
- package/dist/collection/components/molecules/tttx-form/tttx-form.stories.js +127 -127
- package/dist/collection/components/molecules/tttx-list/test/ttttx-list.spec.e2e.js +26 -0
- package/dist/collection/components/molecules/tttx-list/test/tttx-list.spec.js +183 -0
- package/dist/collection/components/molecules/tttx-list/tttx-list.js +105 -105
- package/dist/collection/components/molecules/tttx-list/tttx-list.stories.js +43 -43
- package/dist/collection/components/molecules/tttx-standalone-input/test/tttx-standalone-input.e2e.js +9 -0
- package/dist/collection/components/molecules/tttx-standalone-input/test/tttx-standalone-input.spec.js +219 -0
- package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.css +32 -3
- package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.js +627 -572
- package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.js +148 -135
- package/dist/collection/components/molecules/tttx-toolbar/test/tttx-toolbar.test.js +0 -0
- package/dist/collection/components/molecules/tttx-toolbar/tttx-toolbar.css +30 -0
- package/dist/collection/components/molecules/tttx-toolbar/tttx-toolbar.js +44 -0
- package/dist/collection/components/molecules/tttx-toolbar/tttx-toolbar.stories.js +20 -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/collection/shared/domsanitiser.options.js +14 -14
- package/dist/collection/shared/test/domsanitiser.options.spec.js +23 -0
- package/dist/components/index.d.ts +1 -9
- package/dist/components/index.js +6 -1
- package/dist/components/tttx-button.js +48 -59
- package/dist/components/tttx-form.js +381 -381
- package/dist/components/tttx-icon2.js +29 -29
- package/dist/components/tttx-keyvalue-block.js +74 -74
- package/dist/components/tttx-list.js +98 -68
- package/dist/components/tttx-loading-spinner.js +33 -33
- package/dist/components/tttx-standalone-input.js +108 -102
- package/dist/components/tttx-toolbar.d.ts +11 -0
- package/dist/components/tttx-toolbar.js +36 -0
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/css-shim-9d54a2f2.js +4 -0
- package/dist/esm/dom-6be6f662.js +73 -0
- package/dist/esm/{index-4010ad69.js → index-0350f122.js} +4 -101
- package/dist/esm/index-dbe25028.js +3262 -0
- package/dist/esm/loader.js +19 -4
- package/dist/esm/polyfills/core-js.js +0 -0
- package/dist/esm/polyfills/css-shim.js +1 -1
- 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/shadow-css-ed4599f8.js +387 -0
- package/dist/esm/{tttx-button_2.entry.js → tttx-button.entry.js} +25 -50
- package/dist/esm/tttx-form.entry.js +364 -364
- package/dist/esm/tttx-icon.entry.js +17 -0
- package/dist/esm/tttx-keyvalue-block.entry.js +57 -57
- package/dist/esm/tttx-list.entry.js +76 -46
- package/dist/esm/tttx-loading-spinner.entry.js +16 -16
- package/dist/esm/tttx-standalone-input.entry.js +61 -58
- package/dist/esm/tttx-toolbar.entry.js +16 -0
- package/dist/esm/tttx.js +117 -6
- package/dist/tttx/app-globals-0f993ce5.js +3 -0
- package/dist/tttx/css-shim-9d54a2f2.js +4 -0
- package/dist/tttx/dom-6be6f662.js +73 -0
- package/dist/tttx/index-dbe25028.js +3262 -0
- package/dist/tttx/index.esm.js +1 -0
- package/dist/tttx/p-0a85dda4.entry.js +1 -0
- package/dist/tttx/{p-3281444a.entry.js → p-1b015a9d.entry.js} +1 -1
- package/dist/tttx/p-4f3958fa.entry.js +1 -0
- package/dist/tttx/p-5cae1beb.entry.js +1 -0
- package/dist/tttx/p-62869344.js +2 -0
- package/dist/tttx/p-92465671.entry.js +1 -0
- package/dist/tttx/{p-dab7ee1b.entry.js → p-a0179cb1.entry.js} +1 -1
- package/dist/tttx/p-cc6644c9.entry.js +1 -0
- package/dist/tttx/p-cd1565e0.entry.js +3 -0
- package/dist/tttx/shadow-css-ed4599f8.js +387 -0
- package/dist/tttx/tttx-button.entry.js +30 -0
- package/dist/tttx/tttx-form.entry.js +373 -0
- package/dist/tttx/tttx-icon.entry.js +17 -0
- package/dist/tttx/tttx-keyvalue-block.entry.js +63 -0
- package/dist/tttx/tttx-list.entry.js +1730 -0
- package/dist/tttx/tttx-loading-spinner.entry.js +22 -0
- package/dist/tttx/tttx-standalone-input.entry.js +66 -0
- package/dist/tttx/tttx-toolbar.entry.js +16 -0
- package/dist/tttx/tttx.esm.js +129 -1
- package/dist/types/components/atoms/tttx-button/test/tttx-button.e2e.d.ts +1 -0
- package/dist/types/components/atoms/tttx-button/test/tttx-button.spec.d.ts +1 -0
- package/dist/types/components/atoms/tttx-button/tttx-button.d.ts +10 -13
- package/dist/types/components/atoms/tttx-button/tttx-button.stories.d.ts +10 -10
- package/dist/types/components/atoms/tttx-icon/test/tttx-icon.e2e.d.ts +1 -0
- package/dist/types/components/atoms/tttx-icon/test/tttx-icon.spec.d.ts +1 -0
- package/dist/types/components/atoms/tttx-icon/tttx-icon.d.ts +5 -5
- package/dist/types/components/atoms/tttx-icon/tttx-icon.stories.d.ts +20 -20
- package/dist/types/components/atoms/tttx-keyvalue-block/test/tttx-keyvalue-block.spec.d.ts +1 -0
- package/dist/types/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.d.ts +7 -7
- package/dist/types/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.stories.d.ts +9 -9
- package/dist/types/components/atoms/tttx-loading-spinner/Test/tttx-loading-spinner.spec.d.ts +1 -0
- 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/molecules/tttx-form/lib/setErrorState.d.ts +13 -13
- package/dist/types/components/molecules/tttx-form/lib/setErrorState.spec.d.ts +1 -0
- package/dist/types/components/molecules/tttx-form/lib/validityCheck.d.ts +17 -17
- package/dist/types/components/molecules/tttx-form/lib/validityCheck.spec.d.ts +1 -0
- package/dist/types/components/molecules/tttx-form/test/tttx-form.e2e.d.ts +1 -0
- package/dist/types/components/molecules/tttx-form/test/tttx-form.spec.d.ts +1 -0
- package/dist/types/components/molecules/tttx-form/tttx-form.d.ts +114 -114
- package/dist/types/components/molecules/tttx-form/tttx-form.stories.d.ts +13 -13
- package/dist/types/components/molecules/tttx-list/test/ttttx-list.spec.e2e.d.ts +1 -0
- package/dist/types/components/molecules/tttx-list/test/tttx-list.spec.d.ts +1 -0
- package/dist/types/components/molecules/tttx-list/tttx-list.d.ts +11 -11
- package/dist/types/components/molecules/tttx-list/tttx-list.stories.d.ts +14 -14
- package/dist/types/components/molecules/tttx-standalone-input/test/tttx-standalone-input.e2e.d.ts +1 -0
- package/dist/types/components/molecules/tttx-standalone-input/test/tttx-standalone-input.spec.d.ts +1 -0
- package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.d.ts +56 -53
- package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.d.ts +122 -106
- package/dist/types/components/molecules/tttx-toolbar/test/tttx-toolbar.test.d.ts +0 -0
- package/dist/types/components/molecules/tttx-toolbar/tttx-toolbar.d.ts +4 -0
- package/dist/types/components/molecules/tttx-toolbar/tttx-toolbar.stories.d.ts +13 -0
- package/dist/types/components/palette.stories.d.ts +6 -6
- package/dist/types/components.d.ts +21 -0
- 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/dist/types/shared/domsanitiser.options.d.ts +10 -10
- package/dist/types/shared/test/domsanitiser.options.spec.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +3 -59
- package/loader/index.d.ts +0 -9
- package/package.json +1 -1
- package/dist/collection/transform-tag-name.js +0 -5
- package/dist/tttx/p-083eeedc.entry.js +0 -1
- package/dist/tttx/p-5687f4ad.js +0 -2
- package/dist/tttx/p-5c9a1626.entry.js +0 -3
- package/dist/tttx/p-931e42c9.entry.js +0 -1
- package/dist/tttx/p-b5c1dd86.entry.js +0 -1
- package/dist/types/transform-tag-name.d.ts +0 -1
package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.js
CHANGED
|
@@ -1,77 +1,90 @@
|
|
|
1
|
-
import icons from '../../../icons';
|
|
2
|
-
export default {
|
|
3
|
-
title: 'Molecules/Standalone Input',
|
|
4
|
-
component: 'tttx-standalone-input',
|
|
5
|
-
argTypes: {
|
|
6
|
-
iconleft: {
|
|
7
|
-
options: icons,
|
|
8
|
-
control: { type: 'select' },
|
|
9
|
-
},
|
|
10
|
-
iconright: {
|
|
11
|
-
options: icons,
|
|
12
|
-
control: { type: 'select' },
|
|
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
|
-
control: { type: '
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
control: { type: '
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
|
|
1
|
+
import icons from '../../../icons';
|
|
2
|
+
export default {
|
|
3
|
+
title: 'Molecules/Standalone Input',
|
|
4
|
+
component: 'tttx-standalone-input',
|
|
5
|
+
argTypes: {
|
|
6
|
+
iconleft: {
|
|
7
|
+
options: icons,
|
|
8
|
+
control: { type: 'select' },
|
|
9
|
+
},
|
|
10
|
+
iconright: {
|
|
11
|
+
options: icons,
|
|
12
|
+
control: { type: 'select' },
|
|
13
|
+
},
|
|
14
|
+
inputIcon: {
|
|
15
|
+
options: icons,
|
|
16
|
+
control: { type: 'select' },
|
|
17
|
+
},
|
|
18
|
+
label: {
|
|
19
|
+
control: { type: 'text' },
|
|
20
|
+
},
|
|
21
|
+
errormsg: {
|
|
22
|
+
control: { type: 'text' },
|
|
23
|
+
},
|
|
24
|
+
showerrorbubble: {
|
|
25
|
+
control: { type: 'boolean' },
|
|
26
|
+
},
|
|
27
|
+
showerrormsg: {
|
|
28
|
+
control: { type: 'boolean' },
|
|
29
|
+
},
|
|
30
|
+
inline: {
|
|
31
|
+
control: { type: 'boolean' },
|
|
32
|
+
},
|
|
33
|
+
checked: {
|
|
34
|
+
control: { type: 'boolean' },
|
|
35
|
+
},
|
|
36
|
+
disabled: {
|
|
37
|
+
control: { type: 'boolean' },
|
|
38
|
+
},
|
|
39
|
+
max: {
|
|
40
|
+
control: { type: 'text' },
|
|
41
|
+
},
|
|
42
|
+
maxlength: {
|
|
43
|
+
control: { type: 'text' },
|
|
44
|
+
},
|
|
45
|
+
min: {
|
|
46
|
+
control: { type: 'text' },
|
|
47
|
+
},
|
|
48
|
+
minlength: {
|
|
49
|
+
control: { type: 'text' },
|
|
50
|
+
},
|
|
51
|
+
name: {
|
|
52
|
+
control: { type: 'text' },
|
|
53
|
+
},
|
|
54
|
+
pattern: {
|
|
55
|
+
control: { type: 'text' },
|
|
56
|
+
},
|
|
57
|
+
placeholder: {
|
|
58
|
+
control: { type: 'text' },
|
|
59
|
+
},
|
|
60
|
+
readonly: {
|
|
61
|
+
control: { type: 'boolean' },
|
|
62
|
+
},
|
|
63
|
+
required: {
|
|
64
|
+
control: { type: 'boolean' },
|
|
65
|
+
},
|
|
66
|
+
step: {
|
|
67
|
+
control: { type: 'text' },
|
|
68
|
+
},
|
|
69
|
+
type: {
|
|
70
|
+
options: ['text', 'password', 'email', 'number'],
|
|
71
|
+
control: { type: 'radio' },
|
|
72
|
+
},
|
|
73
|
+
value: {
|
|
74
|
+
control: { type: 'text' },
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
const TemplateTextInput = ({ iconleft, iconright, inputIcon, label, errormsg, showerrorbubble, showerrormsg, inline, checked, disabled, max, maxlength, min, minlength, name, pattern, placeholder, readonly, required, step, type, value, }) => `
|
|
69
79
|
<tttx-standalone-input
|
|
70
80
|
iconleft="${iconleft || ''}"
|
|
71
81
|
iconright="${iconright || ''}"
|
|
82
|
+
inputicon="${inputIcon || ''}"
|
|
72
83
|
label="${label}"
|
|
73
84
|
errormsg="${errormsg}"
|
|
85
|
+
showerrorbubble="${showerrorbubble === false ? 'false' : 'true'}"
|
|
74
86
|
${showerrormsg ? 'showerrormsg' : ''}
|
|
87
|
+
${inline ? 'inline' : ''}
|
|
75
88
|
${checked ? 'checked' : ''}
|
|
76
89
|
${disabled ? 'disabled' : ''}
|
|
77
90
|
${max ? `max=${max}` : ''}
|
|
@@ -87,70 +100,70 @@ const TemplateTextInput = ({ iconleft, iconright, label, errormsg, showerrormsg,
|
|
|
87
100
|
type="${type}"
|
|
88
101
|
value="${value}"
|
|
89
102
|
/>
|
|
90
|
-
`;
|
|
91
|
-
export const InputField = TemplateTextInput.bind({});
|
|
92
|
-
InputField.args = {
|
|
93
|
-
value: '',
|
|
94
|
-
label: 'First name',
|
|
95
|
-
type: 'text',
|
|
96
|
-
errormsg: 'Please enter your first name',
|
|
97
|
-
required: false,
|
|
98
|
-
showerrormsg: false,
|
|
99
|
-
placeholder: 'Enter first name',
|
|
100
|
-
};
|
|
101
|
-
// export const TextInputIconLeft = TemplateTextInput.bind({});
|
|
102
|
-
// TextInputIconLeft.args = {
|
|
103
|
-
// value: 'Uh egg',
|
|
104
|
-
// label: 'Please tell me about your egg',
|
|
105
|
-
// iconleft: 'egg',
|
|
106
|
-
// type: 'text',
|
|
107
|
-
// errormsg: 'Incorrect egg, please egg again.',
|
|
108
|
-
// required: true,
|
|
109
|
-
// showerrormsg: true,
|
|
110
|
-
// placeholder: 'Please for the love of god tell me about your egg',
|
|
111
|
-
// };
|
|
112
|
-
// export const TextInputIconRight = TemplateTextInput.bind({});
|
|
113
|
-
// TextInputIconRight.args = {
|
|
114
|
-
// value: 'Uh egg',
|
|
115
|
-
// label: 'Please tell me about your egg',
|
|
116
|
-
// iconright: 'egg',
|
|
117
|
-
// type: 'text',
|
|
118
|
-
// errormsg: 'Incorrect egg, please egg again.',
|
|
119
|
-
// required: true,
|
|
120
|
-
// showerrormsg: true,
|
|
121
|
-
// placeholder: 'Please for the love of god tell me about your egg',
|
|
122
|
-
// };
|
|
123
|
-
// export const PasswordInputBasic = TemplateTextInput.bind({});
|
|
124
|
-
// PasswordInputBasic.args = {
|
|
125
|
-
// value: 'qwefdweferg',
|
|
126
|
-
// label: 'Input your Password',
|
|
127
|
-
// iconleft: 'lock',
|
|
128
|
-
// type: 'password',
|
|
129
|
-
// errormsg: 'Password is not strong enough',
|
|
130
|
-
// required: true,
|
|
131
|
-
// showerrormsg: true,
|
|
132
|
-
// placeholder: 'Your password',
|
|
133
|
-
// };
|
|
134
|
-
// export const EmailInputBasic = TemplateTextInput.bind({});
|
|
135
|
-
// EmailInputBasic.args = {
|
|
136
|
-
// value: 'email.address@website.com',
|
|
137
|
-
// label: 'Choose an email address',
|
|
138
|
-
// iconleft: 'mail',
|
|
139
|
-
// type: 'email',
|
|
140
|
-
// errormsg: 'This email smells funny',
|
|
141
|
-
// required: true,
|
|
142
|
-
// valid: false,
|
|
143
|
-
// showerrormsg: true,
|
|
144
|
-
// placeholder: 'Your email address',
|
|
145
|
-
// };
|
|
146
|
-
// export const NumberInputBasic = TemplateTextInput.bind({});
|
|
147
|
-
// NumberInputBasic.args = {
|
|
148
|
-
// value: '42069',
|
|
149
|
-
// label: 'What is your favourite number?',
|
|
150
|
-
// iconleft: '123',
|
|
151
|
-
// type: 'number',
|
|
152
|
-
// errormsg: 'This number feels wrong',
|
|
153
|
-
// required: true,
|
|
154
|
-
// showerrormsg: true,
|
|
155
|
-
// placeholder: 'Your favourite number',
|
|
156
|
-
// };
|
|
103
|
+
`;
|
|
104
|
+
export const InputField = TemplateTextInput.bind({});
|
|
105
|
+
InputField.args = {
|
|
106
|
+
value: '',
|
|
107
|
+
label: 'First name',
|
|
108
|
+
type: 'text',
|
|
109
|
+
errormsg: 'Please enter your first name',
|
|
110
|
+
required: false,
|
|
111
|
+
showerrormsg: false,
|
|
112
|
+
placeholder: 'Enter first name',
|
|
113
|
+
};
|
|
114
|
+
// export const TextInputIconLeft = TemplateTextInput.bind({});
|
|
115
|
+
// TextInputIconLeft.args = {
|
|
116
|
+
// value: 'Uh egg',
|
|
117
|
+
// label: 'Please tell me about your egg',
|
|
118
|
+
// iconleft: 'egg',
|
|
119
|
+
// type: 'text',
|
|
120
|
+
// errormsg: 'Incorrect egg, please egg again.',
|
|
121
|
+
// required: true,
|
|
122
|
+
// showerrormsg: true,
|
|
123
|
+
// placeholder: 'Please for the love of god tell me about your egg',
|
|
124
|
+
// };
|
|
125
|
+
// export const TextInputIconRight = TemplateTextInput.bind({});
|
|
126
|
+
// TextInputIconRight.args = {
|
|
127
|
+
// value: 'Uh egg',
|
|
128
|
+
// label: 'Please tell me about your egg',
|
|
129
|
+
// iconright: 'egg',
|
|
130
|
+
// type: 'text',
|
|
131
|
+
// errormsg: 'Incorrect egg, please egg again.',
|
|
132
|
+
// required: true,
|
|
133
|
+
// showerrormsg: true,
|
|
134
|
+
// placeholder: 'Please for the love of god tell me about your egg',
|
|
135
|
+
// };
|
|
136
|
+
// export const PasswordInputBasic = TemplateTextInput.bind({});
|
|
137
|
+
// PasswordInputBasic.args = {
|
|
138
|
+
// value: 'qwefdweferg',
|
|
139
|
+
// label: 'Input your Password',
|
|
140
|
+
// iconleft: 'lock',
|
|
141
|
+
// type: 'password',
|
|
142
|
+
// errormsg: 'Password is not strong enough',
|
|
143
|
+
// required: true,
|
|
144
|
+
// showerrormsg: true,
|
|
145
|
+
// placeholder: 'Your password',
|
|
146
|
+
// };
|
|
147
|
+
// export const EmailInputBasic = TemplateTextInput.bind({});
|
|
148
|
+
// EmailInputBasic.args = {
|
|
149
|
+
// value: 'email.address@website.com',
|
|
150
|
+
// label: 'Choose an email address',
|
|
151
|
+
// iconleft: 'mail',
|
|
152
|
+
// type: 'email',
|
|
153
|
+
// errormsg: 'This email smells funny',
|
|
154
|
+
// required: true,
|
|
155
|
+
// valid: false,
|
|
156
|
+
// showerrormsg: true,
|
|
157
|
+
// placeholder: 'Your email address',
|
|
158
|
+
// };
|
|
159
|
+
// export const NumberInputBasic = TemplateTextInput.bind({});
|
|
160
|
+
// NumberInputBasic.args = {
|
|
161
|
+
// value: '42069',
|
|
162
|
+
// label: 'What is your favourite number?',
|
|
163
|
+
// iconleft: '123',
|
|
164
|
+
// type: 'number',
|
|
165
|
+
// errormsg: 'This number feels wrong',
|
|
166
|
+
// required: true,
|
|
167
|
+
// showerrormsg: true,
|
|
168
|
+
// placeholder: 'Your favourite number',
|
|
169
|
+
// };
|
|
File without changes
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
height: 36px;
|
|
3
|
+
display: flex;
|
|
4
|
+
padding: 8px 0;
|
|
5
|
+
gap: 8px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
:host(.bordered) {
|
|
9
|
+
border-bottom: 1px solid #d5d5d5;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
slot[name=before] {
|
|
13
|
+
display: flex;
|
|
14
|
+
flex: 1 1 0px;
|
|
15
|
+
gap: 8px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
slot[name=center] {
|
|
19
|
+
display: flex;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
flex: 1 1 0px;
|
|
22
|
+
gap: 8px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
slot[name=after] {
|
|
26
|
+
display: flex;
|
|
27
|
+
justify-content: end;
|
|
28
|
+
flex: 1 1 0px;
|
|
29
|
+
gap: 8px;
|
|
30
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2
|
+
import { h, Host } from '@stencil/core';
|
|
3
|
+
export class TttxToolbar {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.border = true;
|
|
6
|
+
}
|
|
7
|
+
render() {
|
|
8
|
+
return (h(Host, { class: this.border ? 'bordered' : '' }, h("slot", { name: 'before' }), h("slot", { name: 'center' }), h("slot", { name: 'after' })));
|
|
9
|
+
}
|
|
10
|
+
static get is() { return "tttx-toolbar"; }
|
|
11
|
+
static get encapsulation() { return "shadow"; }
|
|
12
|
+
static get originalStyleUrls() {
|
|
13
|
+
return {
|
|
14
|
+
"$": ["tttx-toolbar.scss"]
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
static get styleUrls() {
|
|
18
|
+
return {
|
|
19
|
+
"$": ["tttx-toolbar.css"]
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
static get properties() {
|
|
23
|
+
return {
|
|
24
|
+
"border": {
|
|
25
|
+
"type": "boolean",
|
|
26
|
+
"mutable": false,
|
|
27
|
+
"complexType": {
|
|
28
|
+
"original": "boolean",
|
|
29
|
+
"resolved": "boolean",
|
|
30
|
+
"references": {}
|
|
31
|
+
},
|
|
32
|
+
"required": false,
|
|
33
|
+
"optional": false,
|
|
34
|
+
"docs": {
|
|
35
|
+
"tags": [],
|
|
36
|
+
"text": ""
|
|
37
|
+
},
|
|
38
|
+
"attribute": "border",
|
|
39
|
+
"reflect": false,
|
|
40
|
+
"defaultValue": "true"
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
title: 'molecules/Toolbar',
|
|
3
|
+
component: 'tttx-toolbar',
|
|
4
|
+
argTypes: {
|
|
5
|
+
border: {
|
|
6
|
+
control: { type: 'boolean' }
|
|
7
|
+
},
|
|
8
|
+
},
|
|
9
|
+
};
|
|
10
|
+
const Default = ({ border }) => `
|
|
11
|
+
<tttx-toolbar border="${border ? 'true' : 'false'}">
|
|
12
|
+
<span slot="before"><tttx-button design="primary">Before</tttx-button></span>
|
|
13
|
+
<span slot="center"><div style="position: relative; top: -4px;"><tttx-standalone-input placeholder="center" inline required showerrorbubble="false" inputicon="search" /></div></span>
|
|
14
|
+
<span slot="after"><tttx-keyvalue-block horizontal keyvalues='{"Position":"after"}' /></span>
|
|
15
|
+
<tttx-toolbar>
|
|
16
|
+
`;
|
|
17
|
+
export const BasicStringList = Default.bind({});
|
|
18
|
+
BasicStringList.args = {
|
|
19
|
+
border: true
|
|
20
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
title: 'Foundations/Palette',
|
|
3
|
-
component: 'tttx-palette',
|
|
4
|
-
};
|
|
1
|
+
export default {
|
|
2
|
+
title: 'Foundations/Palette',
|
|
3
|
+
component: 'tttx-palette',
|
|
4
|
+
};
|
|
5
5
|
const Swatch = (colour, name = '') => `
|
|
6
6
|
<div class="swatch">
|
|
7
7
|
<div class="swatchcontent" style="background-color:${colour};">
|
|
@@ -9,7 +9,7 @@ const Swatch = (colour, name = '') => `
|
|
|
9
9
|
</div>
|
|
10
10
|
<p>${name}</p>
|
|
11
11
|
</div>
|
|
12
|
-
`;
|
|
12
|
+
`;
|
|
13
13
|
const Template = () => `
|
|
14
14
|
|
|
15
15
|
<style>
|
|
@@ -84,5 +84,5 @@ ${Swatch('#EA6100', '$dv-high')}
|
|
|
84
84
|
${Swatch('#DC0000', '$dv-very-high')}
|
|
85
85
|
${Swatch('#A20000', '$dv-highest')}
|
|
86
86
|
|
|
87
|
-
`;
|
|
88
|
-
export const Default = Template.bind({});
|
|
87
|
+
`;
|
|
88
|
+
export const Default = Template.bind({});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
title: 'Getting Started/Developer',
|
|
3
|
-
};
|
|
1
|
+
export default {
|
|
2
|
+
title: 'Getting Started/Developer',
|
|
3
|
+
};
|
|
4
4
|
const Template = () => `
|
|
5
5
|
<tttx-typography>
|
|
6
6
|
<p>Quick start guide for developers</p>
|
|
7
7
|
</tttx-typography>
|
|
8
|
-
`;
|
|
9
|
-
export const Default = Template.bind({});
|
|
8
|
+
`;
|
|
9
|
+
export const Default = Template.bind({});
|