@3t-transform/threeteeui 0.0.7 → 0.0.9

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 (76) hide show
  1. package/dist/cjs/{index-253ca97c.js → index-8a4cb9bc.js} +26 -1
  2. package/dist/cjs/loader.cjs.js +2 -2
  3. package/dist/cjs/tttx-button.cjs.entry.js +1 -1
  4. package/dist/cjs/tttx-checkbox.cjs.entry.js +1 -1
  5. package/dist/cjs/tttx-form.cjs.entry.js +1 -1
  6. package/dist/cjs/tttx-icon.cjs.entry.js +1861 -0
  7. package/dist/cjs/tttx-input.cjs.entry.js +44 -0
  8. package/dist/cjs/tttx-popover-content.cjs.entry.js +23 -0
  9. package/dist/cjs/tttx.cjs.js +2 -2
  10. package/dist/collection/collection-manifest.json +4 -3
  11. package/dist/collection/components/atoms/tttx-button/tttx-button.stories.js +1 -4
  12. package/dist/collection/components/atoms/tttx-icon/tttx-icon.css +101 -0
  13. package/dist/collection/components/atoms/tttx-icon/tttx-icon.js +114 -0
  14. package/dist/collection/components/atoms/tttx-icon/tttx-icon.stories.js +47 -0
  15. package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.css +30 -0
  16. package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.js +96 -0
  17. package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.stories.js +23 -0
  18. package/dist/collection/components/molecules/tttx-form/tttx-form.stories.js +18 -22
  19. package/dist/collection/components/{atoms/tttx-text-box/tttx-text-box.css → molecules/tttx-input/tttx-input.css} +10 -0
  20. package/dist/collection/components/{atoms/tttx-single-input/tttx-single-input.js → molecules/tttx-input/tttx-input.js} +5 -5
  21. package/dist/collection/components/molecules/tttx-input/tttx-input.stories.js +106 -0
  22. package/dist/collection/components/palette.stories.js +88 -0
  23. package/dist/components/index.d.ts +3 -2
  24. package/dist/components/index.js +3 -2
  25. package/dist/components/{tttx-text-box.d.ts → tttx-icon.d.ts} +4 -4
  26. package/dist/components/tttx-icon.js +6 -0
  27. package/dist/components/tttx-icon2.js +1875 -0
  28. package/dist/components/{tttx-single-input.d.ts → tttx-input.d.ts} +4 -4
  29. package/dist/components/tttx-input.js +77 -0
  30. package/dist/components/tttx-popover-content.d.ts +11 -0
  31. package/dist/components/tttx-popover-content.js +42 -0
  32. package/dist/esm/{index-fcca6c58.js → index-9654537d.js} +26 -1
  33. package/dist/esm/loader.js +3 -3
  34. package/dist/esm/tttx-button.entry.js +1 -1
  35. package/dist/esm/tttx-checkbox.entry.js +1 -1
  36. package/dist/esm/tttx-form.entry.js +1 -1
  37. package/dist/esm/tttx-icon.entry.js +1857 -0
  38. package/dist/esm/tttx-input.entry.js +40 -0
  39. package/dist/esm/tttx-popover-content.entry.js +19 -0
  40. package/dist/esm/tttx.js +3 -3
  41. package/dist/tttx/p-1884203f.entry.js +1 -0
  42. package/dist/tttx/{p-8d1f2e5c.entry.js → p-3cb692d6.entry.js} +1 -1
  43. package/dist/tttx/p-8e977b49.entry.js +1 -0
  44. package/dist/tttx/p-b6cc2780.js +2 -0
  45. package/dist/tttx/p-beb8e3fc.entry.js +1 -0
  46. package/dist/tttx/{p-64703252.entry.js → p-ece1c722.entry.js} +1 -1
  47. package/dist/tttx/{p-40709c59.entry.js → p-f30a0e84.entry.js} +1 -1
  48. package/dist/tttx/tttx.esm.js +1 -1
  49. package/dist/types/components/atoms/tttx-icon/tttx-icon.d.ts +14 -0
  50. package/dist/types/components/atoms/tttx-icon/tttx-icon.stories.d.ts +21 -0
  51. package/dist/types/components/atoms/tttx-popover-content/tttx-popover-content.d.ts +7 -0
  52. package/dist/types/components/atoms/tttx-popover-content/tttx-popover-content.stories.d.ts +18 -0
  53. package/dist/types/components/molecules/tttx-form/tttx-form.stories.d.ts +12 -5
  54. package/dist/types/components/{atoms/tttx-single-input/tttx-single-input.d.ts → molecules/tttx-input/tttx-input.d.ts} +1 -1
  55. package/dist/types/components/molecules/tttx-input/tttx-input.stories.d.ts +60 -0
  56. package/dist/types/components.d.ts +46 -36
  57. package/package.json +23 -14
  58. package/readme.md +14 -27
  59. package/dist/cjs/tttx-single-input.cjs.entry.js +0 -44
  60. package/dist/cjs/tttx-text-box.cjs.entry.js +0 -38
  61. package/dist/collection/components/atoms/tttx-single-input/tttx-single-input.css +0 -142
  62. package/dist/collection/components/atoms/tttx-single-input/tttx-single-input.stories.js +0 -92
  63. package/dist/collection/components/atoms/tttx-text-box/tttx-text-box.js +0 -150
  64. package/dist/collection/components/atoms/tttx-text-box/tttx-text-box.stories.js +0 -17
  65. package/dist/collection/docs/template.stories.js +0 -10
  66. package/dist/components/tttx-single-input.js +0 -71
  67. package/dist/components/tttx-text-box.js +0 -59
  68. package/dist/esm/tttx-single-input.entry.js +0 -40
  69. package/dist/esm/tttx-text-box.entry.js +0 -34
  70. package/dist/tttx/p-05d7d002.entry.js +0 -1
  71. package/dist/tttx/p-9bf836ed.entry.js +0 -1
  72. package/dist/tttx/p-a7b95fd2.js +0 -2
  73. package/dist/types/components/atoms/tttx-single-input/tttx-single-input.stories.d.ts +0 -27
  74. package/dist/types/components/atoms/tttx-text-box/tttx-text-box.d.ts +0 -14
  75. package/dist/types/docs/template.stories.d.ts +0 -5
  76. /package/dist/types/components/{atoms/tttx-text-box/tttx-text-box.stories.d.ts → palette.stories.d.ts} +0 -0
@@ -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({});
@@ -2,8 +2,9 @@
2
2
  export { TttxButton as TttxButton } from '../types/components/atoms/tttx-button/tttx-button';
3
3
  export { TttxCheckbox as TttxCheckbox } from '../types/components/atoms/ttx-checkbox/tttx-checkbox';
4
4
  export { TttxForm as TttxForm } from '../types/components/molecules/tttx-form/tttx-form';
5
- export { TttxSingleInput as TttxSingleInput } from '../types/components/atoms/tttx-single-input/tttx-single-input';
6
- export { TttxTextBox as TttxTextBox } from '../types/components/atoms/tttx-text-box/tttx-text-box';
5
+ export { TttxIcon as TttxIcon } from '../types/components/atoms/tttx-icon/tttx-icon';
6
+ export { TttxInput as TttxInput } from '../types/components/molecules/tttx-input/tttx-input';
7
+ export { TttxPopoverContent as TttxPopoverContent } from '../types/components/atoms/tttx-popover-content/tttx-popover-content';
7
8
 
8
9
  /**
9
10
  * Used to manually set the base path where assets can be found.
@@ -2,5 +2,6 @@ export { setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/intern
2
2
  export { TttxButton, defineCustomElement as defineCustomElementTttxButton } from './tttx-button.js';
3
3
  export { TttxCheckbox, defineCustomElement as defineCustomElementTttxCheckbox } from './tttx-checkbox.js';
4
4
  export { TttxForm, defineCustomElement as defineCustomElementTttxForm } from './tttx-form.js';
5
- export { TttxSingleInput, defineCustomElement as defineCustomElementTttxSingleInput } from './tttx-single-input.js';
6
- export { TttxTextBox, defineCustomElement as defineCustomElementTttxTextBox } from './tttx-text-box.js';
5
+ export { TttxIcon, defineCustomElement as defineCustomElementTttxIcon } from './tttx-icon.js';
6
+ export { TttxInput, defineCustomElement as defineCustomElementTttxInput } from './tttx-input.js';
7
+ export { TttxPopoverContent, defineCustomElement as defineCustomElementTttxPopoverContent } from './tttx-popover-content.js';
@@ -1,9 +1,9 @@
1
1
  import type { Components, JSX } from "../types/components";
2
2
 
3
- interface TttxTextBox extends Components.TttxTextBox, HTMLElement {}
4
- export const TttxTextBox: {
5
- prototype: TttxTextBox;
6
- new (): TttxTextBox;
3
+ interface TttxIcon extends Components.TttxIcon, HTMLElement {}
4
+ export const TttxIcon: {
5
+ prototype: TttxIcon;
6
+ new (): TttxIcon;
7
7
  };
8
8
  /**
9
9
  * Used to define this component and all nested components recursively.
@@ -0,0 +1,6 @@
1
+ import { T as TttxIcon$1, d as defineCustomElement$1 } from './tttx-icon2.js';
2
+
3
+ const TttxIcon = TttxIcon$1;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { TttxIcon, defineCustomElement };