@3t-transform/threeteeui 0.0.9 → 0.0.11
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-8a4cb9bc.js → index-bf39be87.js} +41 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/tttx-button.cjs.entry.js +2 -2
- package/dist/cjs/tttx-checkbox.cjs.entry.js +3 -3
- package/dist/cjs/tttx-form.cjs.entry.js +169 -41
- package/dist/cjs/tttx-icon.cjs.entry.js +2 -2
- package/dist/cjs/tttx-loading-spinner.cjs.entry.js +26 -0
- package/dist/cjs/tttx-popover-content.cjs.entry.js +2 -2
- package/dist/cjs/tttx-standalone-input.cjs.entry.js +134 -0
- package/dist/cjs/tttx.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +3 -2
- package/dist/collection/components/atoms/tttx-button/tttx-button.css +1 -0
- package/dist/collection/components/atoms/tttx-button/tttx-button.stories.js +3 -3
- package/dist/collection/components/atoms/tttx-icon/tttx-icon.css +8 -4
- package/dist/collection/components/atoms/tttx-icon/tttx-icon.stories.js +15 -15
- package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.css +48 -0
- package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.js +66 -0
- package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.js +17 -0
- package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.js +1 -1
- package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.stories.js +3 -3
- package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.css +86 -43
- package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.js +1 -1
- package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.stories.js +5 -5
- package/dist/collection/components/molecules/tttx-form/tttx-form.css +230 -0
- package/dist/collection/components/molecules/tttx-form/tttx-form.js +195 -55
- package/dist/collection/components/molecules/tttx-form/tttx-form.stories.js +97 -28
- package/dist/collection/components/molecules/{tttx-input/tttx-input.css → tttx-standalone-input/tttx-standalone-input.css} +78 -53
- package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.js +561 -0
- package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.js +156 -0
- package/dist/collection/components/palette.stories.js +81 -81
- package/dist/collection/docs/gettingstarted-developer.stories.js +4 -4
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +2 -1
- package/dist/components/tttx-button.js +1 -1
- package/dist/components/tttx-checkbox.js +2 -2
- package/dist/components/tttx-form.js +167 -39
- package/dist/components/tttx-icon2.js +1 -1
- package/dist/components/{tttx-input.d.ts → tttx-loading-spinner.d.ts} +4 -4
- package/dist/components/tttx-loading-spinner.js +43 -0
- package/dist/components/tttx-popover-content.js +1 -1
- package/dist/components/tttx-standalone-input.d.ts +11 -0
- package/dist/components/tttx-standalone-input.js +178 -0
- package/dist/esm/{index-9654537d.js → index-63c4d25e.js} +41 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/tttx-button.entry.js +2 -2
- package/dist/esm/tttx-checkbox.entry.js +3 -3
- package/dist/esm/tttx-form.entry.js +169 -41
- package/dist/esm/tttx-icon.entry.js +2 -2
- package/dist/esm/tttx-loading-spinner.entry.js +22 -0
- package/dist/esm/tttx-popover-content.entry.js +2 -2
- package/dist/esm/tttx-standalone-input.entry.js +130 -0
- package/dist/esm/tttx.js +3 -3
- package/dist/tttx/{p-3cb692d6.entry.js → p-1a4eb1f3.entry.js} +1 -1
- package/dist/tttx/p-2d54f8aa.entry.js +1 -0
- package/dist/tttx/p-338b3976.entry.js +1 -0
- package/dist/tttx/p-4c57bcbd.entry.js +1 -0
- package/dist/tttx/p-709246f5.entry.js +1 -0
- package/dist/tttx/p-95a29e09.entry.js +1 -0
- package/dist/tttx/{p-1884203f.entry.js → p-ad0c3fe4.entry.js} +1 -1
- package/dist/tttx/p-bec472d8.js +2 -0
- package/dist/tttx/tttx.esm.js +1 -1
- package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.d.ts +6 -0
- package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.d.ts +17 -0
- package/dist/types/components/molecules/tttx-form/tttx-form.d.ts +14 -7
- package/dist/types/components/molecules/tttx-form/tttx-form.stories.d.ts +1 -8
- package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.d.ts +38 -0
- package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.d.ts +106 -0
- package/dist/types/components.d.ts +73 -31
- package/package.json +67 -65
- package/readme.md +89 -86
- package/dist/cjs/tttx-input.cjs.entry.js +0 -44
- package/dist/collection/components/molecules/tttx-input/tttx-input.js +0 -259
- package/dist/collection/components/molecules/tttx-input/tttx-input.stories.js +0 -106
- package/dist/components/tttx-input.js +0 -77
- package/dist/esm/tttx-input.entry.js +0 -40
- package/dist/tttx/p-8e977b49.entry.js +0 -1
- package/dist/tttx/p-b6cc2780.js +0 -2
- package/dist/tttx/p-beb8e3fc.entry.js +0 -1
- package/dist/tttx/p-ece1c722.entry.js +0 -1
- package/dist/tttx/p-f30a0e84.entry.js +0 -1
- package/dist/types/components/molecules/tttx-input/tttx-input.d.ts +0 -20
- package/dist/types/components/molecules/tttx-input/tttx-input.stories.d.ts +0 -60
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"entries": [
|
|
3
|
+
"./components/molecules/tttx-standalone-input/tttx-standalone-input.js",
|
|
3
4
|
"./components/atoms/tttx-button/tttx-button.js",
|
|
4
5
|
"./components/atoms/tttx-icon/tttx-icon.js",
|
|
6
|
+
"./components/atoms/tttx-loading-spinner/tttx-loading-spinner.js",
|
|
5
7
|
"./components/atoms/tttx-popover-content/tttx-popover-content.js",
|
|
6
8
|
"./components/atoms/ttx-checkbox/tttx-checkbox.js",
|
|
7
|
-
"./components/molecules/tttx-form/tttx-form.js"
|
|
8
|
-
"./components/molecules/tttx-input/tttx-input.js"
|
|
9
|
+
"./components/molecules/tttx-form/tttx-form.js"
|
|
9
10
|
],
|
|
10
11
|
"compiler": {
|
|
11
12
|
"name": "@stencil/core",
|
|
@@ -16,12 +16,12 @@ export default {
|
|
|
16
16
|
},
|
|
17
17
|
},
|
|
18
18
|
};
|
|
19
|
-
const Template = ({ content, fontColor, buttonStyle }) => `
|
|
20
|
-
<tttx-button font-color=${fontColor} button-style=${buttonStyle}>${content}</tttx-button>
|
|
19
|
+
const Template = ({ content, fontColor, buttonStyle }) => `
|
|
20
|
+
<tttx-button font-color=${fontColor} button-style=${buttonStyle}>${content}</tttx-button>
|
|
21
21
|
`;
|
|
22
22
|
export const Default = Template.bind({});
|
|
23
23
|
Default.args = {
|
|
24
24
|
content: 'My Button',
|
|
25
25
|
fontColor: 'font-white',
|
|
26
|
-
buttonStyle: 'primary-blue'
|
|
26
|
+
buttonStyle: 'primary-blue',
|
|
27
27
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
.material-symbols-rounded {
|
|
6
|
-
font-family: "Material Symbols Rounded";
|
|
6
|
+
font-family: "Material Symbols Rounded", sans-serif;
|
|
7
7
|
font-weight: 400;
|
|
8
8
|
font-style: normal;
|
|
9
9
|
font-size: 24px;
|
|
@@ -73,11 +73,11 @@
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
.red {
|
|
76
|
-
color: #
|
|
76
|
+
color: #dc0000;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
.orange {
|
|
80
|
-
color: #
|
|
80
|
+
color: #f59500;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
.blue {
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
.green {
|
|
88
|
-
color: #
|
|
88
|
+
color: #a2bb31;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
.gray {
|
|
@@ -96,6 +96,10 @@
|
|
|
96
96
|
color: #212121;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
+
.white {
|
|
100
|
+
color: white;
|
|
101
|
+
}
|
|
102
|
+
|
|
99
103
|
.clickable {
|
|
100
104
|
cursor: pointer;
|
|
101
105
|
}
|
|
@@ -24,21 +24,21 @@ Basic.args = {
|
|
|
24
24
|
icon: 'warning',
|
|
25
25
|
colour: 'red',
|
|
26
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>
|
|
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
42
|
`;
|
|
43
43
|
export const WithPopover = WithPopoverTemplate.bind({});
|
|
44
44
|
WithPopover.args = {
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
.material-symbols-rounded {
|
|
2
|
+
font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.spinner-container {
|
|
6
|
+
position: absolute;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.loading-box {
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.loading-text {
|
|
16
|
+
font-size: 16px;
|
|
17
|
+
font-weight: 400;
|
|
18
|
+
padding-top: 10px;
|
|
19
|
+
text-align: center;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.spinner {
|
|
23
|
+
border: solid #1479c6;
|
|
24
|
+
border-bottom-color: #d5d5d5;
|
|
25
|
+
border-radius: 50%;
|
|
26
|
+
position: relative;
|
|
27
|
+
box-sizing: border-box;
|
|
28
|
+
animation: rotation 1s linear infinite;
|
|
29
|
+
}
|
|
30
|
+
.spinner.small {
|
|
31
|
+
height: 20px;
|
|
32
|
+
width: 20px;
|
|
33
|
+
border-width: 4px;
|
|
34
|
+
}
|
|
35
|
+
.spinner.large {
|
|
36
|
+
height: 60px;
|
|
37
|
+
width: 60px;
|
|
38
|
+
border-width: 8px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@keyframes rotation {
|
|
42
|
+
0% {
|
|
43
|
+
transform: rotate(0deg);
|
|
44
|
+
}
|
|
45
|
+
100% {
|
|
46
|
+
transform: rotate(360deg);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { h } from '@stencil/core';
|
|
2
|
+
export class TttxLoadingSpinner {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.loadingMessage = undefined;
|
|
5
|
+
this.size = 'large';
|
|
6
|
+
}
|
|
7
|
+
renderLoadingMessage() {
|
|
8
|
+
if (!this.loadingMessage)
|
|
9
|
+
return '';
|
|
10
|
+
return h("div", { class: "loading-text" }, "Loading, please wait...");
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
return (h("div", { class: "spinner-container" }, h("div", { class: "loading-box" }, h("span", { class: `spinner ${this.size}` })), this.renderLoadingMessage()));
|
|
14
|
+
}
|
|
15
|
+
static get is() { return "tttx-loading-spinner"; }
|
|
16
|
+
static get encapsulation() { return "shadow"; }
|
|
17
|
+
static get originalStyleUrls() {
|
|
18
|
+
return {
|
|
19
|
+
"$": ["tttx-loading-spinner.scss"]
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
static get styleUrls() {
|
|
23
|
+
return {
|
|
24
|
+
"$": ["tttx-loading-spinner.css"]
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
static get properties() {
|
|
28
|
+
return {
|
|
29
|
+
"loadingMessage": {
|
|
30
|
+
"type": "boolean",
|
|
31
|
+
"mutable": true,
|
|
32
|
+
"complexType": {
|
|
33
|
+
"original": "boolean",
|
|
34
|
+
"resolved": "boolean",
|
|
35
|
+
"references": {}
|
|
36
|
+
},
|
|
37
|
+
"required": false,
|
|
38
|
+
"optional": false,
|
|
39
|
+
"docs": {
|
|
40
|
+
"tags": [],
|
|
41
|
+
"text": ""
|
|
42
|
+
},
|
|
43
|
+
"attribute": "loading-message",
|
|
44
|
+
"reflect": false
|
|
45
|
+
},
|
|
46
|
+
"size": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"mutable": true,
|
|
49
|
+
"complexType": {
|
|
50
|
+
"original": "'small' | 'large'",
|
|
51
|
+
"resolved": "\"large\" | \"small\"",
|
|
52
|
+
"references": {}
|
|
53
|
+
},
|
|
54
|
+
"required": false,
|
|
55
|
+
"optional": false,
|
|
56
|
+
"docs": {
|
|
57
|
+
"tags": [],
|
|
58
|
+
"text": ""
|
|
59
|
+
},
|
|
60
|
+
"attribute": "size",
|
|
61
|
+
"reflect": false,
|
|
62
|
+
"defaultValue": "'large'"
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
title: 'atoms/TTTX Loading Spinner',
|
|
3
|
+
component: 'tttx-loading-spinner',
|
|
4
|
+
argTypes: {
|
|
5
|
+
loadingMessage: {
|
|
6
|
+
control: 'boolean',
|
|
7
|
+
},
|
|
8
|
+
size: {
|
|
9
|
+
control: { type: 'radio' },
|
|
10
|
+
options: ['small', 'large'],
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
export const Example = args => {
|
|
15
|
+
const size = args.size || 'large';
|
|
16
|
+
return `<tttx-loading-spinner ${args.loadingMessage ? 'loading-message' : ''} size='${size}' />`;
|
|
17
|
+
};
|
|
@@ -7,7 +7,7 @@ export class TttxPopoverContent {
|
|
|
7
7
|
this.linktext = undefined;
|
|
8
8
|
}
|
|
9
9
|
render() {
|
|
10
|
-
return (h(Host, null, this.header && h("h4", null, this.header), this.body && h("p", null, this.body), this.linkcontext && h("span", { class: "linky", onClick:
|
|
10
|
+
return (h(Host, null, this.header && h("h4", null, this.header), this.body && h("p", null, this.body), this.linkcontext && (h("span", { class: "linky", onClick: evt => console.log(this.linkcontext, evt) }, this.linktext || 'More Information'))));
|
|
11
11
|
}
|
|
12
12
|
static get is() { return "tttx-popover-content"; }
|
|
13
13
|
static get encapsulation() { return "shadow"; }
|
package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.stories.js
CHANGED
|
@@ -5,12 +5,12 @@ export default {
|
|
|
5
5
|
header: {
|
|
6
6
|
control: {
|
|
7
7
|
type: 'text',
|
|
8
|
-
}
|
|
8
|
+
},
|
|
9
9
|
},
|
|
10
10
|
body: {
|
|
11
11
|
control: {
|
|
12
12
|
type: 'text',
|
|
13
|
-
}
|
|
13
|
+
},
|
|
14
14
|
},
|
|
15
15
|
},
|
|
16
16
|
};
|
|
@@ -19,5 +19,5 @@ export const Basic = Template.bind({});
|
|
|
19
19
|
Basic.args = {
|
|
20
20
|
header: 'HEADER',
|
|
21
21
|
body: 'BODY',
|
|
22
|
-
linkcontext: 'TESTING123'
|
|
22
|
+
linkcontext: 'TESTING123',
|
|
23
23
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
.material-symbols-rounded {
|
|
6
|
-
font-family: "Material Symbols Rounded";
|
|
6
|
+
font-family: "Material Symbols Rounded", sans-serif;
|
|
7
7
|
font-weight: 400;
|
|
8
8
|
font-style: normal;
|
|
9
9
|
font-size: 24px;
|
|
@@ -19,19 +19,6 @@
|
|
|
19
19
|
color: #9e9e9e;
|
|
20
20
|
}
|
|
21
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
22
|
.icon-left,
|
|
36
23
|
.icon-right {
|
|
37
24
|
flex-basis: 24px;
|
|
@@ -56,13 +43,14 @@
|
|
|
56
43
|
margin-right: 4px;
|
|
57
44
|
}
|
|
58
45
|
|
|
59
|
-
.
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
46
|
+
.icon-right {
|
|
47
|
+
margin-top: 5px;
|
|
48
|
+
margin-right: 4px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.icon-left {
|
|
52
|
+
margin-top: 5px;
|
|
53
|
+
margin-left: 4px;
|
|
66
54
|
}
|
|
67
55
|
|
|
68
56
|
.iconleft .input {
|
|
@@ -73,29 +61,11 @@
|
|
|
73
61
|
padding-right: 4px;
|
|
74
62
|
}
|
|
75
63
|
|
|
76
|
-
.label {
|
|
77
|
-
display: block;
|
|
78
|
-
font-size: 16px;
|
|
79
|
-
height: 18px;
|
|
80
|
-
font-weight: 600;
|
|
81
|
-
color: #212121;
|
|
82
|
-
font-size: 16px;
|
|
83
|
-
margin-bottom: 4px;
|
|
84
|
-
z-index: 1;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.disabled {
|
|
88
|
-
background: #f0f0f0;
|
|
89
|
-
color: #9e9e9e;
|
|
90
|
-
border-color: #c8c8c8;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
64
|
.focused {
|
|
94
65
|
border-color: #1479c6;
|
|
95
66
|
}
|
|
96
67
|
|
|
97
68
|
.errormsg {
|
|
98
|
-
height: 16px;
|
|
99
69
|
display: flex;
|
|
100
70
|
justify-content: center;
|
|
101
71
|
align-items: center;
|
|
@@ -105,10 +75,9 @@
|
|
|
105
75
|
background-color: transparent;
|
|
106
76
|
height: 26px;
|
|
107
77
|
font-size: 14px;
|
|
108
|
-
color: white;
|
|
109
78
|
border-radius: none;
|
|
110
79
|
z-index: 2;
|
|
111
|
-
color: #
|
|
80
|
+
color: #dc0000;
|
|
112
81
|
}
|
|
113
82
|
|
|
114
83
|
.errormsg .validationicon {
|
|
@@ -117,11 +86,11 @@
|
|
|
117
86
|
font-size: 16px;
|
|
118
87
|
margin-right: 4px;
|
|
119
88
|
vertical-align: middle;
|
|
120
|
-
color: #
|
|
89
|
+
color: #dc0000;
|
|
121
90
|
}
|
|
122
91
|
|
|
123
92
|
.danger {
|
|
124
|
-
color: #
|
|
93
|
+
color: #dc0000;
|
|
125
94
|
}
|
|
126
95
|
|
|
127
96
|
.optional {
|
|
@@ -129,6 +98,80 @@
|
|
|
129
98
|
font-weight: normal;
|
|
130
99
|
}
|
|
131
100
|
|
|
101
|
+
label.inputBlock {
|
|
102
|
+
display: block;
|
|
103
|
+
position: relative;
|
|
104
|
+
line-height: 21px;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
label {
|
|
108
|
+
font-weight: 500;
|
|
109
|
+
font-size: 16px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
input:not([type=submit]) {
|
|
113
|
+
font-family: "Roboto", serif;
|
|
114
|
+
box-sizing: border-box;
|
|
115
|
+
width: 100%;
|
|
116
|
+
height: 36px;
|
|
117
|
+
padding: 0 16px;
|
|
118
|
+
font-size: 16px;
|
|
119
|
+
border: 1px solid #d5d5d5;
|
|
120
|
+
border-radius: 4px;
|
|
121
|
+
margin-top: 4px;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/* iPhone OS fix */
|
|
125
|
+
input[type=date] {
|
|
126
|
+
background: white;
|
|
127
|
+
display: block;
|
|
128
|
+
min-width: calc(100% - 18px);
|
|
129
|
+
line-height: 37px;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
input.invalid:invalid, input.standalone.invalid {
|
|
133
|
+
border: 1px solid #dc0000;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
input ~ .errorBubble {
|
|
137
|
+
min-height: 27px;
|
|
138
|
+
position: relative;
|
|
139
|
+
font-size: 14px;
|
|
140
|
+
font-weight: normal;
|
|
141
|
+
width: 100%;
|
|
142
|
+
font-family: "Roboto", sans-serif;
|
|
143
|
+
color: #dc0000;
|
|
144
|
+
display: flex;
|
|
145
|
+
align-content: center;
|
|
146
|
+
align-items: center;
|
|
147
|
+
justify-items: center;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
input ~ .errorBubble:not(.visible) {
|
|
151
|
+
visibility: hidden;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
input ~ .errorBubble span {
|
|
155
|
+
color: #dc0000;
|
|
156
|
+
font-size: 16px;
|
|
157
|
+
margin-right: 4px;
|
|
158
|
+
height: 16px;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
input.invalid:invalid ~ .errorBubble {
|
|
162
|
+
position: relative;
|
|
163
|
+
font-size: 14px;
|
|
164
|
+
font-weight: normal;
|
|
165
|
+
width: 100%;
|
|
166
|
+
font-family: "Roboto", sans-serif;
|
|
167
|
+
color: #dc0000;
|
|
168
|
+
visibility: visible;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
input:focus {
|
|
172
|
+
border-color: #1479c6;
|
|
173
|
+
}
|
|
174
|
+
|
|
132
175
|
:host {
|
|
133
176
|
display: block;
|
|
134
177
|
}
|
|
@@ -11,7 +11,7 @@ export class TttxCheckbox {
|
|
|
11
11
|
this.valueChanged.emit(target.checked);
|
|
12
12
|
}
|
|
13
13
|
render() {
|
|
14
|
-
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("input", { type: "checkbox", class: "input", onChange: event => this.handleClick(event), checked: this.value }))));
|
|
14
|
+
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("input", { type: "checkbox", class: "input", onChange: event => this.handleClick(event), checked: this.value }))));
|
|
15
15
|
}
|
|
16
16
|
static get is() { return "tttx-checkbox"; }
|
|
17
17
|
static get encapsulation() { return "shadow"; }
|
|
@@ -2,12 +2,12 @@ export default {
|
|
|
2
2
|
title: 'Atoms/Checkbox',
|
|
3
3
|
component: 'tttx-checkbox',
|
|
4
4
|
};
|
|
5
|
-
const Template = ({ value }) => `
|
|
6
|
-
<tttx-checkbox
|
|
7
|
-
${value ? 'value="true"' : ''}
|
|
8
|
-
></tttx-checkbox>
|
|
5
|
+
const Template = ({ value }) => `
|
|
6
|
+
<tttx-checkbox
|
|
7
|
+
${value ? 'value="true"' : ''}
|
|
8
|
+
></tttx-checkbox>
|
|
9
9
|
`;
|
|
10
10
|
export const Default = Template.bind({});
|
|
11
11
|
Default.args = {
|
|
12
|
-
value: false
|
|
12
|
+
value: false,
|
|
13
13
|
};
|