@3t-transform/threeteeui 0.0.16 → 0.0.18
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-864b7110.js → index-bf777121.js} +3 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/tttx-button.cjs.entry.js +25 -19
- package/dist/cjs/tttx-checkbox.cjs.entry.js +18 -18
- package/dist/cjs/tttx-form.cjs.entry.js +365 -365
- package/dist/cjs/tttx-icon.cjs.entry.js +14 -1856
- package/dist/cjs/tttx-input-calendar.cjs.entry.js +125 -0
- package/dist/cjs/tttx-keyvalue-block.cjs.entry.js +33 -0
- 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 +50 -50
- package/dist/cjs/tttx.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/atoms/tttx-button/tttx-button.css +94 -18
- package/dist/collection/components/atoms/tttx-button/tttx-button.js +110 -93
- package/dist/collection/components/atoms/tttx-button/tttx-button.stories.js +74 -27
- package/dist/collection/components/atoms/tttx-icon/tttx-icon.css +8 -5
- package/dist/collection/components/atoms/tttx-icon/tttx-icon.js +62 -116
- package/dist/collection/components/atoms/tttx-icon/tttx-icon.stories.js +22 -47
- package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.css +26 -0
- package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.js +56 -0
- package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.stories.js +12 -0
- package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.js +67 -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 +97 -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 +102 -101
- package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.stories.js +9 -9
- package/dist/collection/components/molecules/tttx-form/tttx-form.css +95 -11
- package/dist/collection/components/molecules/tttx-form/tttx-form.js +452 -451
- package/dist/collection/components/molecules/tttx-form/tttx-form.stories.js +109 -109
- package/dist/collection/components/molecules/tttx-input-calendar/tttx-input-calendar.css +93 -0
- package/dist/collection/components/molecules/tttx-input-calendar/tttx-input-calendar.js +174 -0
- package/dist/collection/components/molecules/tttx-input-calendar/tttx-input-calendar.stories.js +27 -0
- package/dist/collection/components/molecules/tttx-list/tttx-list.js +312 -311
- package/dist/collection/components/molecules/tttx-list/tttx-list.stories.js +14 -14
- package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.js +570 -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.js +174 -177
- package/dist/collection/components/molecules/tttx-table/tttx-table.stories.js +65 -65
- 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 +2 -0
- package/dist/components/index.js +2 -0
- package/dist/components/tttx-button.js +1 -40
- package/dist/components/tttx-button2.js +56 -0
- package/dist/components/tttx-checkbox.js +36 -36
- package/dist/components/tttx-form.js +382 -382
- package/dist/components/tttx-icon2.js +32 -1874
- package/dist/components/tttx-input-calendar.d.ts +11 -0
- package/dist/components/tttx-input-calendar.js +157 -0
- package/dist/components/tttx-keyvalue-block.d.ts +11 -0
- package/dist/components/tttx-keyvalue-block.js +49 -0
- package/dist/components/tttx-list.js +214 -214
- package/dist/components/tttx-loading-spinner2.js +33 -33
- package/dist/components/tttx-popover-content2.js +32 -32
- package/dist/components/tttx-standalone-input.js +168 -169
- package/dist/components/tttx-table.js +79 -79
- package/dist/esm/{index-232e347b.js → index-a05bd606.js} +3 -0
- 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 +25 -19
- package/dist/esm/tttx-checkbox.entry.js +18 -18
- package/dist/esm/tttx-form.entry.js +365 -365
- package/dist/esm/tttx-icon.entry.js +14 -1856
- package/dist/esm/tttx-input-calendar.entry.js +121 -0
- package/dist/esm/tttx-keyvalue-block.entry.js +29 -0
- 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 +50 -50
- package/dist/esm/tttx.js +3 -3
- package/dist/tttx/{p-3973b7dd.entry.js → p-037d286f.entry.js} +1 -1
- package/dist/tttx/{p-184c4fae.js → p-07b134af.js} +1 -1
- package/dist/tttx/{p-125f06b3.entry.js → p-1b63f16a.entry.js} +1 -1
- package/dist/tttx/p-45afb84c.entry.js +1 -0
- package/dist/tttx/p-68ff0f39.entry.js +1 -0
- package/dist/tttx/{p-6828fe6f.entry.js → p-93763d3c.entry.js} +1 -1
- package/dist/tttx/p-a5808741.entry.js +1 -0
- package/dist/tttx/{p-fe4c70b2.entry.js → p-a92ca87e.entry.js} +1 -1
- package/dist/tttx/{p-5ce1ba22.entry.js → p-a96ca037.entry.js} +1 -1
- package/dist/tttx/p-dc087fd8.entry.js +1 -0
- package/dist/tttx/p-e3cc75bb.entry.js +1 -0
- package/dist/tttx/{p-01e1894e.entry.js → p-f579ed1e.entry.js} +1 -1
- package/dist/tttx/tttx.esm.js +1 -1
- package/dist/types/components/atoms/tttx-button/tttx-button.d.ts +10 -9
- package/dist/types/components/atoms/tttx-button/tttx-button.stories.d.ts +10 -20
- package/dist/types/components/atoms/tttx-icon/tttx-icon.d.ts +5 -14
- package/dist/types/components/atoms/tttx-icon/tttx-icon.stories.d.ts +20 -21
- package/dist/types/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.d.ts +4 -0
- package/dist/types/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.stories.d.ts +6 -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/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 -134
- package/dist/types/components/molecules/tttx-form/tttx-form.stories.d.ts +12 -12
- package/dist/types/components/molecules/tttx-input-calendar/tttx-input-calendar.d.ts +19 -0
- package/dist/types/components/molecules/tttx-input-calendar/tttx-input-calendar.stories.d.ts +26 -0
- 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 -15
- package/dist/types/components/molecules/tttx-table/tttx-table.stories.d.ts +21 -21
- package/dist/types/components/palette.stories.d.ts +6 -6
- package/dist/types/components.d.ts +46 -15
- 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 +4 -4
- package/dist/tttx/p-10316ff1.entry.js +0 -1
- package/dist/tttx/p-b1c22f5f.entry.js +0 -1
- package/dist/tttx/p-c7f9be65.entry.js +0 -1
|
@@ -1,93 +1,110 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
this.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
this.
|
|
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
|
-
|
|
1
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2
|
+
import { Host, h } from '@stencil/core';
|
|
3
|
+
export class TttxButton {
|
|
4
|
+
constructor() {
|
|
5
|
+
this._iconcolor = 'black';
|
|
6
|
+
this.notext = undefined;
|
|
7
|
+
this.icon = undefined;
|
|
8
|
+
this.iconposition = 'left';
|
|
9
|
+
this.design = 'default';
|
|
10
|
+
}
|
|
11
|
+
componentWillLoad() {
|
|
12
|
+
this._design = this.design;
|
|
13
|
+
const designs = ['primary', 'default', 'disabled', 'danger', 'borderless'];
|
|
14
|
+
if (!designs.includes(this.design)) {
|
|
15
|
+
this._design = 'default';
|
|
16
|
+
}
|
|
17
|
+
if (this._design === 'primary' || this._design === 'danger') {
|
|
18
|
+
this._iconcolor = 'white';
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
render() {
|
|
22
|
+
return (h(Host, null, h("button", { class: `button ${this._design} ${this.icon ? 'withicon' : ''} ${this.icon && this.iconposition ? 'icon' + this.iconposition : ''} ${this.notext ? 'notext' : ''}` }, this.icon && this.iconposition === 'left' && (h("div", { class: "icon-left" }, h("tttx-icon", { icon: this.icon, color: this._iconcolor }))), !this.notext && h("div", { class: "button-content" }, h("slot", null)), this.icon && this.iconposition === 'right' && (h("div", { class: "icon-right" }, h("tttx-icon", { icon: this.icon, color: this._iconcolor }))))));
|
|
23
|
+
}
|
|
24
|
+
static get is() { return "tttx-button"; }
|
|
25
|
+
static get encapsulation() { return "shadow"; }
|
|
26
|
+
static get originalStyleUrls() {
|
|
27
|
+
return {
|
|
28
|
+
"$": ["tttx-button.scss"]
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
static get styleUrls() {
|
|
32
|
+
return {
|
|
33
|
+
"$": ["tttx-button.css"]
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
static get properties() {
|
|
37
|
+
return {
|
|
38
|
+
"notext": {
|
|
39
|
+
"type": "boolean",
|
|
40
|
+
"mutable": false,
|
|
41
|
+
"complexType": {
|
|
42
|
+
"original": "boolean",
|
|
43
|
+
"resolved": "boolean",
|
|
44
|
+
"references": {}
|
|
45
|
+
},
|
|
46
|
+
"required": false,
|
|
47
|
+
"optional": false,
|
|
48
|
+
"docs": {
|
|
49
|
+
"tags": [],
|
|
50
|
+
"text": ""
|
|
51
|
+
},
|
|
52
|
+
"attribute": "notext",
|
|
53
|
+
"reflect": false
|
|
54
|
+
},
|
|
55
|
+
"icon": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"mutable": false,
|
|
58
|
+
"complexType": {
|
|
59
|
+
"original": "string",
|
|
60
|
+
"resolved": "string",
|
|
61
|
+
"references": {}
|
|
62
|
+
},
|
|
63
|
+
"required": false,
|
|
64
|
+
"optional": false,
|
|
65
|
+
"docs": {
|
|
66
|
+
"tags": [],
|
|
67
|
+
"text": ""
|
|
68
|
+
},
|
|
69
|
+
"attribute": "icon",
|
|
70
|
+
"reflect": false
|
|
71
|
+
},
|
|
72
|
+
"iconposition": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"mutable": false,
|
|
75
|
+
"complexType": {
|
|
76
|
+
"original": "'left' | 'right'",
|
|
77
|
+
"resolved": "\"left\" | \"right\"",
|
|
78
|
+
"references": {}
|
|
79
|
+
},
|
|
80
|
+
"required": false,
|
|
81
|
+
"optional": false,
|
|
82
|
+
"docs": {
|
|
83
|
+
"tags": [],
|
|
84
|
+
"text": ""
|
|
85
|
+
},
|
|
86
|
+
"attribute": "iconposition",
|
|
87
|
+
"reflect": false,
|
|
88
|
+
"defaultValue": "'left'"
|
|
89
|
+
},
|
|
90
|
+
"design": {
|
|
91
|
+
"type": "string",
|
|
92
|
+
"mutable": false,
|
|
93
|
+
"complexType": {
|
|
94
|
+
"original": "string",
|
|
95
|
+
"resolved": "string",
|
|
96
|
+
"references": {}
|
|
97
|
+
},
|
|
98
|
+
"required": false,
|
|
99
|
+
"optional": false,
|
|
100
|
+
"docs": {
|
|
101
|
+
"tags": [],
|
|
102
|
+
"text": ""
|
|
103
|
+
},
|
|
104
|
+
"attribute": "design",
|
|
105
|
+
"reflect": false,
|
|
106
|
+
"defaultValue": "'default'"
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
}
|
|
@@ -1,27 +1,74 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
title: 'Atoms/Button',
|
|
3
|
-
component: 'tttx-button'
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
};
|
|
19
|
-
const
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
1
|
+
export default {
|
|
2
|
+
title: 'Atoms/Button',
|
|
3
|
+
component: 'tttx-button'
|
|
4
|
+
};
|
|
5
|
+
const PrimaryButtons = () => `
|
|
6
|
+
<h2>Standard</h2>
|
|
7
|
+
<tttx-button design="primary">Primary</tttx-button>
|
|
8
|
+
<hr />
|
|
9
|
+
<h2>Icon Right</h2>
|
|
10
|
+
<tttx-button design="primary" icon="chevron_right" iconposition="right">Primary</tttx-button>
|
|
11
|
+
<hr />
|
|
12
|
+
<h2>Icon Left</h2>
|
|
13
|
+
<tttx-button design="primary" icon="add">Primary</tttx-button>
|
|
14
|
+
<hr />
|
|
15
|
+
<h2>Icon Only</h2>
|
|
16
|
+
<tttx-button design="primary" icon="more_vert" notext></tttx-button>
|
|
17
|
+
`;
|
|
18
|
+
export const Primary = PrimaryButtons.bind({});
|
|
19
|
+
const DefaultButtons = () => `
|
|
20
|
+
<h2>Standard</h2>
|
|
21
|
+
<tttx-button>Default</tttx-button>
|
|
22
|
+
<hr />
|
|
23
|
+
<h2>Icon Right</h2>
|
|
24
|
+
<tttx-button icon="chevron_right" iconposition="right">Default</tttx-button>
|
|
25
|
+
<hr />
|
|
26
|
+
<h2>Icon Left</h2>
|
|
27
|
+
<tttx-button icon="edit">Default</tttx-button>
|
|
28
|
+
<hr />
|
|
29
|
+
<h2>Icon Only</h2>
|
|
30
|
+
<tttx-button icon="more_vert" notext></tttx-button>
|
|
31
|
+
`;
|
|
32
|
+
export const Default = DefaultButtons.bind({});
|
|
33
|
+
const BorderlessButtons = () => `
|
|
34
|
+
<h2>Standard</h2>
|
|
35
|
+
<tttx-button design="borderless">Borderless</tttx-button>
|
|
36
|
+
<hr />
|
|
37
|
+
<h2>Icon Right</h2>
|
|
38
|
+
<tttx-button design="borderless" icon="chevron_right" iconposition="right">Borderless</tttx-button>
|
|
39
|
+
<hr />
|
|
40
|
+
<h2>Icon Left</h2>
|
|
41
|
+
<tttx-button design="borderless" icon="edit">Borderless</tttx-button>
|
|
42
|
+
<hr />
|
|
43
|
+
<h2>Icon Only</h2>
|
|
44
|
+
<tttx-button design="borderless" icon="more_vert" notext></tttx-button>
|
|
45
|
+
`;
|
|
46
|
+
export const Borderless = BorderlessButtons.bind({});
|
|
47
|
+
const DangerButtons = () => `
|
|
48
|
+
<h2>Standard</h2>
|
|
49
|
+
<tttx-button design="danger">Danger</tttx-button>
|
|
50
|
+
<hr />
|
|
51
|
+
<h2>Icon Right</h2>
|
|
52
|
+
<tttx-button design="danger" icon="chevron_right" iconposition="right">Danger</tttx-button>
|
|
53
|
+
<hr />
|
|
54
|
+
<h2>Icon Left</h2>
|
|
55
|
+
<tttx-button design="danger" icon="delete">Danger</tttx-button>
|
|
56
|
+
<hr />
|
|
57
|
+
<h2>Icon Only</h2>
|
|
58
|
+
<tttx-button design="danger" icon="more_vert" notext></tttx-button>
|
|
59
|
+
`;
|
|
60
|
+
export const Danger = DangerButtons.bind({});
|
|
61
|
+
const DisabledButtons = () => `
|
|
62
|
+
<h2>Standard</h2>
|
|
63
|
+
<tttx-button design="disabled">Disabled</tttx-button>
|
|
64
|
+
<hr />
|
|
65
|
+
<h2>Icon Right</h2>
|
|
66
|
+
<tttx-button design="disabled" icon="chevron_right" iconposition="right">Disabled</tttx-button>
|
|
67
|
+
<hr />
|
|
68
|
+
<h2>Icon Left</h2>
|
|
69
|
+
<tttx-button design="disabled" icon="edit">Disabled</tttx-button>
|
|
70
|
+
<hr />
|
|
71
|
+
<h2>Icon Only</h2>
|
|
72
|
+
<tttx-button design="disabled" icon="more_vert" notext></tttx-button>
|
|
73
|
+
`;
|
|
74
|
+
export const Disabled = DisabledButtons.bind({});
|
|
@@ -20,7 +20,14 @@
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
:host {
|
|
23
|
-
display: block;
|
|
23
|
+
display: inline-block;
|
|
24
|
+
cursor: default;
|
|
25
|
+
user-select: none;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.icon-size {
|
|
29
|
+
width: 24px;
|
|
30
|
+
height: 24px;
|
|
24
31
|
}
|
|
25
32
|
|
|
26
33
|
.tooltip {
|
|
@@ -98,8 +105,4 @@
|
|
|
98
105
|
|
|
99
106
|
.white {
|
|
100
107
|
color: white;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.clickable {
|
|
104
|
-
cursor: pointer;
|
|
105
108
|
}
|
|
@@ -1,116 +1,62 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
export class TttxIcon {
|
|
4
|
-
constructor() {
|
|
5
|
-
this.icon = undefined;
|
|
6
|
-
this.
|
|
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
|
-
return {
|
|
64
|
-
"$": ["tttx-icon.css"]
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
static get properties() {
|
|
68
|
-
return {
|
|
69
|
-
"icon": {
|
|
70
|
-
"type": "string",
|
|
71
|
-
"mutable": false,
|
|
72
|
-
"complexType": {
|
|
73
|
-
"original": "string",
|
|
74
|
-
"resolved": "string",
|
|
75
|
-
"references": {}
|
|
76
|
-
},
|
|
77
|
-
"required": false,
|
|
78
|
-
"optional": false,
|
|
79
|
-
"docs": {
|
|
80
|
-
"tags": [],
|
|
81
|
-
"text": ""
|
|
82
|
-
},
|
|
83
|
-
"attribute": "icon",
|
|
84
|
-
"reflect": false
|
|
85
|
-
},
|
|
86
|
-
"colour": {
|
|
87
|
-
"type": "string",
|
|
88
|
-
"mutable": false,
|
|
89
|
-
"complexType": {
|
|
90
|
-
"original": "string",
|
|
91
|
-
"resolved": "string",
|
|
92
|
-
"references": {}
|
|
93
|
-
},
|
|
94
|
-
"required": false,
|
|
95
|
-
"optional": false,
|
|
96
|
-
"docs": {
|
|
97
|
-
"tags": [],
|
|
98
|
-
"text": ""
|
|
99
|
-
},
|
|
100
|
-
"attribute": "colour",
|
|
101
|
-
"reflect": false,
|
|
102
|
-
"defaultValue": "'grey'"
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
static get elementRef() { return "el"; }
|
|
107
|
-
static get listeners() {
|
|
108
|
-
return [{
|
|
109
|
-
"name": "click",
|
|
110
|
-
"method": "handleDocumentClick",
|
|
111
|
-
"target": "document",
|
|
112
|
-
"capture": false,
|
|
113
|
-
"passive": false
|
|
114
|
-
}];
|
|
115
|
-
}
|
|
116
|
-
}
|
|
1
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2
|
+
import { Host, h } from '@stencil/core';
|
|
3
|
+
export class TttxIcon {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.icon = undefined;
|
|
6
|
+
this.color = 'grey';
|
|
7
|
+
}
|
|
8
|
+
render() {
|
|
9
|
+
return (h(Host, null, h("span", { class: `material-symbols-rounded ${this.color ? this.color : ''}` }, this.icon)));
|
|
10
|
+
}
|
|
11
|
+
static get is() { return "tttx-icon"; }
|
|
12
|
+
static get encapsulation() { return "shadow"; }
|
|
13
|
+
static get originalStyleUrls() {
|
|
14
|
+
return {
|
|
15
|
+
"$": ["tttx-icon.scss"]
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
static get styleUrls() {
|
|
19
|
+
return {
|
|
20
|
+
"$": ["tttx-icon.css"]
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
static get properties() {
|
|
24
|
+
return {
|
|
25
|
+
"icon": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"mutable": false,
|
|
28
|
+
"complexType": {
|
|
29
|
+
"original": "string",
|
|
30
|
+
"resolved": "string",
|
|
31
|
+
"references": {}
|
|
32
|
+
},
|
|
33
|
+
"required": false,
|
|
34
|
+
"optional": false,
|
|
35
|
+
"docs": {
|
|
36
|
+
"tags": [],
|
|
37
|
+
"text": ""
|
|
38
|
+
},
|
|
39
|
+
"attribute": "icon",
|
|
40
|
+
"reflect": false
|
|
41
|
+
},
|
|
42
|
+
"color": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"mutable": false,
|
|
45
|
+
"complexType": {
|
|
46
|
+
"original": "string",
|
|
47
|
+
"resolved": "string",
|
|
48
|
+
"references": {}
|
|
49
|
+
},
|
|
50
|
+
"required": false,
|
|
51
|
+
"optional": false,
|
|
52
|
+
"docs": {
|
|
53
|
+
"tags": [],
|
|
54
|
+
"text": ""
|
|
55
|
+
},
|
|
56
|
+
"attribute": "color",
|
|
57
|
+
"reflect": false,
|
|
58
|
+
"defaultValue": "'grey'"
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -1,47 +1,22 @@
|
|
|
1
|
-
import icons from './../../../icons';
|
|
2
|
-
const
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Atoms/Icons',
|
|
5
|
-
component: 'tttx-icon',
|
|
6
|
-
argTypes: {
|
|
7
|
-
icon: {
|
|
8
|
-
control: {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
Basic.args = {
|
|
24
|
-
icon: 'warning',
|
|
25
|
-
colour: 'red',
|
|
26
|
-
};
|
|
27
|
-
const WithPopoverTemplate = ({ icon, colour }) => `
|
|
28
|
-
<div style="overflow: auto; height: 300px;">
|
|
29
|
-
<div style="margin-top:150px; height:300px;">
|
|
30
|
-
<tttx-icon icon="${icon}" colour="${colour}">
|
|
31
|
-
<div slot="popover">
|
|
32
|
-
<tttx-popover-content
|
|
33
|
-
header="The humble egg"
|
|
34
|
-
body="Most arthropods such as insects, vertebrates (excluding live-bearing mammals), and mollusks lay eggs, although some, such as scorpions, do not."
|
|
35
|
-
linkcontext="Wikipedia_egg"
|
|
36
|
-
linktext="Learn more about eggs"
|
|
37
|
-
/>
|
|
38
|
-
</div>
|
|
39
|
-
</tttx-icon>
|
|
40
|
-
</div>
|
|
41
|
-
</div>
|
|
42
|
-
`;
|
|
43
|
-
export const WithPopover = WithPopoverTemplate.bind({});
|
|
44
|
-
WithPopover.args = {
|
|
45
|
-
icon: 'warning',
|
|
46
|
-
colour: 'red',
|
|
47
|
-
};
|
|
1
|
+
import icons from './../../../icons';
|
|
2
|
+
const colors = ['red', 'blue', 'black', 'grey', 'green'];
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Atoms/Icons',
|
|
5
|
+
component: 'tttx-icon',
|
|
6
|
+
argTypes: {
|
|
7
|
+
icon: {
|
|
8
|
+
control: { type: 'select' },
|
|
9
|
+
options: icons,
|
|
10
|
+
},
|
|
11
|
+
color: {
|
|
12
|
+
control: { type: 'select' },
|
|
13
|
+
options: colors,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
const Template = ({ icon, color }) => `<tttx-icon icon="${icon}" color="${color}" />`;
|
|
18
|
+
export const Icon = Template.bind({});
|
|
19
|
+
Icon.args = {
|
|
20
|
+
icon: 'warning',
|
|
21
|
+
color: 'red',
|
|
22
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
dl {
|
|
6
|
+
margin: 0;
|
|
7
|
+
padding: 0;
|
|
8
|
+
font-family: "Roboto", sans-serif;
|
|
9
|
+
cursor: default;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
dt {
|
|
13
|
+
font-weight: 400;
|
|
14
|
+
line-height: 21px;
|
|
15
|
+
font-size: 16px;
|
|
16
|
+
color: #757575;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
dd {
|
|
20
|
+
margin: 0;
|
|
21
|
+
font-weight: 400;
|
|
22
|
+
font-size: 16px;
|
|
23
|
+
color: #212121;
|
|
24
|
+
line-height: 21px;
|
|
25
|
+
margin-bottom: 18px;
|
|
26
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2
|
+
import { h, Host } from '@stencil/core';
|
|
3
|
+
export class TttxKeyvalueBlock {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.keyvalues = undefined;
|
|
6
|
+
}
|
|
7
|
+
render() {
|
|
8
|
+
let values;
|
|
9
|
+
if (typeof this.keyvalues === 'string') {
|
|
10
|
+
values = JSON.parse(this.keyvalues);
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
values = this.keyvalues;
|
|
14
|
+
}
|
|
15
|
+
const keys = Object.keys(values);
|
|
16
|
+
const elements = [];
|
|
17
|
+
for (let i = 0; i < keys.length; i++) {
|
|
18
|
+
elements.push(h("dt", null, keys[i]));
|
|
19
|
+
elements.push(h("dd", null, values[keys[i]]));
|
|
20
|
+
}
|
|
21
|
+
return (h(Host, null, h("dl", null, elements)));
|
|
22
|
+
}
|
|
23
|
+
static get is() { return "tttx-keyvalue-block"; }
|
|
24
|
+
static get encapsulation() { return "shadow"; }
|
|
25
|
+
static get originalStyleUrls() {
|
|
26
|
+
return {
|
|
27
|
+
"$": ["tttx-keyvalue-block.scss"]
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
static get styleUrls() {
|
|
31
|
+
return {
|
|
32
|
+
"$": ["tttx-keyvalue-block.css"]
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
static get properties() {
|
|
36
|
+
return {
|
|
37
|
+
"keyvalues": {
|
|
38
|
+
"type": "any",
|
|
39
|
+
"mutable": false,
|
|
40
|
+
"complexType": {
|
|
41
|
+
"original": "any",
|
|
42
|
+
"resolved": "any",
|
|
43
|
+
"references": {}
|
|
44
|
+
},
|
|
45
|
+
"required": false,
|
|
46
|
+
"optional": false,
|
|
47
|
+
"docs": {
|
|
48
|
+
"tags": [],
|
|
49
|
+
"text": ""
|
|
50
|
+
},
|
|
51
|
+
"attribute": "keyvalues",
|
|
52
|
+
"reflect": false
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
}
|