@3t-transform/threeteeui 0.0.6 → 0.0.8

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 (121) hide show
  1. package/dist/cjs/{index-8a7479e4.js → index-8a4cb9bc.js} +256 -407
  2. package/dist/cjs/loader.cjs.js +4 -3
  3. package/dist/cjs/tttx-button.cjs.entry.js +28 -0
  4. package/dist/cjs/tttx-checkbox.cjs.entry.js +28 -0
  5. package/dist/cjs/tttx-form.cjs.entry.js +58 -0
  6. package/dist/cjs/tttx-icon.cjs.entry.js +1845 -5
  7. package/dist/cjs/tttx-input.cjs.entry.js +44 -0
  8. package/dist/cjs/tttx-loading-spinner.cjs.entry.js +26 -0
  9. package/dist/cjs/tttx-popover-content.cjs.entry.js +23 -0
  10. package/dist/cjs/tttx.cjs.js +7 -3
  11. package/dist/collection/collection-manifest.json +9 -5
  12. package/dist/collection/components/atoms/tttx-button/tttx-button.css +61 -0
  13. package/dist/collection/components/atoms/tttx-button/tttx-button.js +93 -0
  14. package/dist/collection/components/atoms/tttx-button/tttx-button.stories.js +27 -0
  15. package/dist/collection/components/atoms/tttx-icon/tttx-icon.css +101 -0
  16. package/dist/collection/components/atoms/tttx-icon/tttx-icon.js +114 -0
  17. package/dist/collection/components/atoms/tttx-icon/tttx-icon.stories.js +47 -0
  18. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.css +48 -0
  19. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.js +66 -0
  20. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.js +15 -0
  21. package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.css +30 -0
  22. package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.js +96 -0
  23. package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.stories.js +23 -0
  24. package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.css +135 -0
  25. package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.js +101 -0
  26. package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.stories.js +13 -0
  27. package/dist/collection/components/molecules/tttx-form/tttx-form.js +109 -0
  28. package/dist/collection/components/molecules/tttx-form/tttx-form.stories.js +33 -0
  29. package/dist/collection/components/molecules/tttx-input/tttx-input.css +149 -0
  30. package/dist/collection/components/molecules/tttx-input/tttx-input.js +259 -0
  31. package/dist/collection/components/molecules/tttx-input/tttx-input.stories.js +106 -0
  32. package/dist/collection/components/palette.stories.js +88 -0
  33. package/dist/collection/icons.js +2838 -0
  34. package/dist/components/index.d.ts +16 -3
  35. package/dist/components/index.js +7 -3
  36. package/dist/components/{tttx-worksheet.d.ts → tttx-button.d.ts} +4 -4
  37. package/dist/components/tttx-button.js +45 -0
  38. package/dist/components/tttx-checkbox.d.ts +11 -0
  39. package/dist/components/tttx-checkbox.js +46 -0
  40. package/dist/components/{tttx-page.d.ts → tttx-form.d.ts} +4 -4
  41. package/dist/components/tttx-form.js +75 -0
  42. package/dist/components/tttx-icon.js +1 -32
  43. package/dist/components/tttx-icon2.js +1875 -0
  44. package/dist/components/tttx-input.d.ts +11 -0
  45. package/dist/components/tttx-input.js +77 -0
  46. package/dist/components/tttx-loading-spinner.d.ts +11 -0
  47. package/dist/components/tttx-loading-spinner.js +43 -0
  48. package/dist/components/tttx-popover-content.d.ts +11 -0
  49. package/dist/components/tttx-popover-content.js +42 -0
  50. package/dist/esm/{index-854ff56f.js → index-9654537d.js} +254 -408
  51. package/dist/esm/loader.js +4 -3
  52. package/dist/esm/polyfills/css-shim.js +1 -1
  53. package/dist/esm/tttx-button.entry.js +24 -0
  54. package/dist/esm/tttx-checkbox.entry.js +24 -0
  55. package/dist/esm/tttx-form.entry.js +54 -0
  56. package/dist/esm/tttx-icon.entry.js +1845 -5
  57. package/dist/esm/tttx-input.entry.js +40 -0
  58. package/dist/esm/tttx-loading-spinner.entry.js +22 -0
  59. package/dist/esm/tttx-popover-content.entry.js +19 -0
  60. package/dist/esm/tttx.js +4 -3
  61. package/dist/tttx/p-1884203f.entry.js +1 -0
  62. package/dist/tttx/p-317b13d3.entry.js +1 -0
  63. package/dist/tttx/p-3cb692d6.entry.js +1 -0
  64. package/dist/tttx/p-3cd7ad04.entry.js +1 -0
  65. package/dist/tttx/p-674e2f18.entry.js +1 -0
  66. package/dist/tttx/p-a23389f1.entry.js +1 -0
  67. package/dist/tttx/p-b6cc2780.js +2 -0
  68. package/dist/tttx/p-f30a0e84.entry.js +1 -0
  69. package/dist/tttx/tttx.esm.js +1 -1
  70. package/dist/types/components/atoms/tttx-button/tttx-button.d.ts +9 -0
  71. package/dist/types/components/atoms/tttx-button/tttx-button.stories.d.ts +20 -0
  72. package/dist/types/components/atoms/tttx-icon/tttx-icon.d.ts +14 -0
  73. package/dist/types/components/atoms/tttx-icon/tttx-icon.stories.d.ts +21 -0
  74. package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.d.ts +6 -0
  75. package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.d.ts +5 -0
  76. package/dist/types/components/atoms/tttx-popover-content/tttx-popover-content.d.ts +7 -0
  77. package/dist/types/components/atoms/tttx-popover-content/tttx-popover-content.stories.d.ts +18 -0
  78. package/dist/types/components/atoms/ttx-checkbox/tttx-checkbox.d.ts +9 -0
  79. package/dist/types/{docs/template.stories.d.ts → components/atoms/ttx-checkbox/tttx-checkbox.stories.d.ts} +1 -0
  80. package/dist/types/components/molecules/tttx-form/tttx-form.d.ts +11 -0
  81. package/dist/types/components/molecules/tttx-form/tttx-form.stories.d.ts +13 -0
  82. package/dist/types/components/molecules/tttx-input/tttx-input.d.ts +20 -0
  83. package/dist/types/components/molecules/tttx-input/tttx-input.stories.d.ts +60 -0
  84. package/dist/types/components/palette.stories.d.ts +6 -0
  85. package/dist/types/components.d.ts +142 -38
  86. package/dist/types/icons.d.ts +2 -0
  87. package/dist/types/stencil-public-runtime.d.ts +59 -3
  88. package/loader/index.d.ts +9 -0
  89. package/package.json +33 -25
  90. package/readme.md +14 -32
  91. package/dist/cjs/toolbar-656be6e6.js +0 -34259
  92. package/dist/cjs/tttx-page.cjs.entry.js +0 -927
  93. package/dist/cjs/tttx-worksheet.cjs.entry.js +0 -47
  94. package/dist/collection/components/components/tttx-icon/tttx-icon.css +0 -89
  95. package/dist/collection/components/components/tttx-icon/tttx-icon.js +0 -59
  96. package/dist/collection/components/components/tttx-icon/tttx-icon.stories.js +0 -40
  97. package/dist/collection/components/patterns/tttx-page/tttx-page.css +0 -162
  98. package/dist/collection/components/patterns/tttx-page/tttx-page.js +0 -213
  99. package/dist/collection/components/patterns/tttx-page/tttx-page.stories.js +0 -80
  100. package/dist/collection/components/patterns/tttx-worksheet/tttx-worksheet.css +0 -134
  101. package/dist/collection/components/patterns/tttx-worksheet/tttx-worksheet.js +0 -70
  102. package/dist/collection/components/patterns/tttx-worksheet/tttx-worksheet.stories.js +0 -44
  103. package/dist/collection/docs/template.stories.js +0 -10
  104. package/dist/components/tttx-page.js +0 -953
  105. package/dist/components/tttx-worksheet.js +0 -6
  106. package/dist/components/tttx-worksheet2.js +0 -34288
  107. package/dist/esm/toolbar-cede4385.js +0 -34231
  108. package/dist/esm/tttx-page.entry.js +0 -923
  109. package/dist/esm/tttx-worksheet.entry.js +0 -43
  110. package/dist/tttx/p-4b57de2e.entry.js +0 -1
  111. package/dist/tttx/p-61f78304.entry.js +0 -1
  112. package/dist/tttx/p-7244abd4.entry.js +0 -1
  113. package/dist/tttx/p-d038fe18.js +0 -1
  114. package/dist/tttx/p-ddfeb0ba.js +0 -2
  115. package/dist/tttx/tttx.css +0 -1
  116. package/dist/types/components/components/tttx-icon/tttx-icon.d.ts +0 -5
  117. package/dist/types/components/components/tttx-icon/tttx-icon.stories.d.ts +0 -24
  118. package/dist/types/components/patterns/tttx-page/tttx-page.d.ts +0 -21
  119. package/dist/types/components/patterns/tttx-page/tttx-page.stories.d.ts +0 -48
  120. package/dist/types/components/patterns/tttx-worksheet/tttx-worksheet.d.ts +0 -9
  121. package/dist/types/components/patterns/tttx-worksheet/tttx-worksheet.stories.d.ts +0 -23
@@ -0,0 +1,149 @@
1
+ .material-symbols-rounded {
2
+ font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
3
+ }
4
+
5
+ .material-symbols-rounded {
6
+ font-family: "Material Symbols Rounded", sans-serif;
7
+ font-weight: 400;
8
+ font-style: normal;
9
+ font-size: 24px;
10
+ line-height: 1;
11
+ letter-spacing: normal;
12
+ text-transform: none;
13
+ display: inline-block;
14
+ white-space: nowrap;
15
+ word-wrap: normal;
16
+ direction: ltr;
17
+ text-rendering: optimizeLegibility;
18
+ -webkit-font-smoothing: antialiased;
19
+ color: #9e9e9e;
20
+ }
21
+
22
+ .field {
23
+ clear: both;
24
+ }
25
+
26
+ .container {
27
+ display: flex;
28
+ flex-wrap: wrap;
29
+ box-sizing: border-box;
30
+ height: 36px;
31
+ border: 1px solid #c8c8c8;
32
+ border-radius: 4px;
33
+ }
34
+
35
+ .icon-left,
36
+ .icon-right {
37
+ flex-basis: 24px;
38
+ }
39
+
40
+ .icon-left span,
41
+ .icon-right span {
42
+ font-size: 24px;
43
+ line-height: 24px;
44
+ text-align: center;
45
+ display: block;
46
+ width: 24px;
47
+ height: 24px;
48
+ margin-top: 4px;
49
+ }
50
+
51
+ .icon-left span {
52
+ margin-left: 4px;
53
+ }
54
+
55
+ .icon-right span {
56
+ margin-right: 4px;
57
+ }
58
+
59
+ .input {
60
+ flex-grow: 1;
61
+ border: none;
62
+ outline: none;
63
+ font-size: 16px;
64
+ padding: 8px 16px;
65
+ background-color: transparent;
66
+ }
67
+
68
+ .iconleft .input {
69
+ padding-left: 4px;
70
+ }
71
+
72
+ .iconright .input {
73
+ padding-right: 4px;
74
+ }
75
+
76
+ .label {
77
+ display: block;
78
+ height: 18px;
79
+ font-weight: 600;
80
+ color: #212121;
81
+ font-size: 16px;
82
+ margin-bottom: 4px;
83
+ z-index: 1;
84
+ }
85
+
86
+ .disabled {
87
+ background: #f0f0f0;
88
+ color: #9e9e9e;
89
+ border-color: #c8c8c8;
90
+ }
91
+
92
+ .focused {
93
+ border-color: #1479c6;
94
+ }
95
+
96
+ .errormsg {
97
+ display: flex;
98
+ justify-content: center;
99
+ align-items: center;
100
+ float: left;
101
+ margin-bottom: 16px;
102
+ box-sizing: border-box;
103
+ background-color: transparent;
104
+ height: 26px;
105
+ font-size: 14px;
106
+ border-radius: none;
107
+ z-index: 2;
108
+ color: #DC0000;
109
+ }
110
+
111
+ .errormsg .validationicon {
112
+ width: 16px;
113
+ height: 16px;
114
+ font-size: 16px;
115
+ margin-right: 4px;
116
+ vertical-align: middle;
117
+ color: #DC0000;
118
+ }
119
+
120
+ .danger {
121
+ color: #DC0000;
122
+ }
123
+
124
+ .optional {
125
+ color: #757575;
126
+ font-weight: normal;
127
+ }
128
+
129
+ :host {
130
+ display: block;
131
+ }
132
+
133
+ .spacing {
134
+ margin-bottom: 16px;
135
+ }
136
+
137
+ .errorstate {
138
+ border-color: #DC0000;
139
+ }
140
+
141
+ .icon-right {
142
+ margin-top: 5px;
143
+ margin-right: 4px;
144
+ }
145
+
146
+ .icon-left {
147
+ margin-top: 5px;
148
+ margin-left: 4px;
149
+ }
@@ -0,0 +1,259 @@
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
+ }
@@ -0,0 +1,106 @@
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
+ };
@@ -0,0 +1,88 @@
1
+ export default {
2
+ title: 'Foundations/Palette',
3
+ component: 'tttx-palette',
4
+ };
5
+ const Swatch = (colour, name = "") => `
6
+ <div class="swatch">
7
+ <div class="swatchcontent" style="background-color:${colour};">
8
+ <div class="pill">${colour}</div>
9
+ </div>
10
+ <p>${name}</p>
11
+ </div>
12
+ `;
13
+ const Template = () => `
14
+
15
+ <style>
16
+ h2 { clear:both; margin-top: 2em; display: block; }
17
+ .swatch { width:130px; height:130px; float:left; font-size: 12px; }
18
+ .swatchcontent { width:120px; height:80px; }
19
+ .pill {
20
+ margin: 0.5em;
21
+ display: inline-block;
22
+ padding: 0.25em 0.5em;
23
+ border-radius: 1em;
24
+ background-color: #FFFFFF;
25
+ color: #000000;
26
+ font-size: 1em;
27
+ font-weight: bold;
28
+ }
29
+ p { margin: 8px 0 0 0; }
30
+ </style>
31
+
32
+ <h2>Primary</h2>
33
+ ${Swatch("#111111", "$black")}
34
+ ${Swatch("#FFFFFF", "$white")}
35
+ ${Swatch("#00187C", "$brand")}
36
+ ${Swatch("#1579C6", "$accent")}
37
+ ${Swatch("#E7F1F9", "$selected")}
38
+
39
+ <h2>Text and icons</h2>
40
+ ${Swatch("#212121", "$ui-primary")}
41
+ ${Swatch("#757575", "$ui-secondary")}
42
+ ${Swatch("#9E9E9E", "$ui-placeholder")}
43
+ ${Swatch("#4C4C4C", "$ui-disabled")}
44
+
45
+ <h2>Layout</h2>
46
+ ${Swatch("#F0F0F0", "$background")}
47
+ ${Swatch("#FAFAFA", "$backround-secondary")}
48
+ ${Swatch("#D5D5D5", "$ui-border")}
49
+
50
+ <h2>Buttons</h2>
51
+ ${Swatch("#1579C6", "$btn-accent")}
52
+ ${Swatch("#146EB3", "$btn-accent-hover")}
53
+ ${Swatch("#10609D", "$btn-accent-active")}
54
+ <div style="clear:both;"></div>
55
+ ${Swatch("#FFFFFF", "$btn-default")}
56
+ ${Swatch("#e6e6e6", "$btn-hover")}
57
+ ${Swatch("#cccccc", "$btn-active")}
58
+ <div style="clear:both;"></div>
59
+ ${Swatch("#DC0000", "$btn-danger")}
60
+ ${Swatch("#C70101", "$btn-danger-hover")}
61
+ ${Swatch("#B30303", "$btn-danger-active")}
62
+ <div style="clear:both;"></div>
63
+ ${Swatch("#BDBDBD", "$btn-disabled")}
64
+
65
+ <h2>Severity</h2>
66
+ ${Swatch("#DC0000", "$severity-critical")}
67
+ ${Swatch("#F59500", "$severity-warning")}
68
+ ${Swatch("#A2BB31", "$severity-success")}
69
+ ${Swatch("#00187C", "$severity-info")}
70
+ <div style="clear:both;"></div>
71
+ ${Swatch("#F2BEBE", "$message-critical")}
72
+ ${Swatch("#F9E1BE", "$message-warning")}
73
+ ${Swatch("#E4EBC9", "$message-success")}
74
+ ${Swatch("#C2DAEE", "$message-info")}
75
+
76
+ <h2>Diverging</h2>
77
+ ${Swatch("#0373A5", "$dv-lowest")}
78
+ ${Swatch("#00C2D1", "$dv-very-low")}
79
+ ${Swatch("#50A472", "$dv-low")}
80
+ ${Swatch("#A2BB31", "$dv-med-low")}
81
+ ${Swatch("#FDC500", "$dv-medium")}
82
+ ${Swatch("#F59500", "$dv-med-high")}
83
+ ${Swatch("#EA6100", "$dv-high")}
84
+ ${Swatch("#DC0000", "$dv-very-high")}
85
+ ${Swatch("#A20000", "$dv-highest")}
86
+
87
+ `;
88
+ export const Default = Template.bind({});