@ptcwebops/ptcw-design 0.0.4 → 0.0.6
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/icon-asset.cjs.entry.js +64 -0
- package/dist/cjs/{index-825cf1b6.js → index-ac192914.js} +268 -6
- package/dist/cjs/list-item.cjs.entry.js +27 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/lottie-player.cjs.entry.js +13476 -0
- package/dist/cjs/my-component.cjs.entry.js +26 -0
- package/dist/cjs/ptc-button.cjs.entry.js +48 -0
- package/dist/cjs/ptc-card.cjs.entry.js +52 -3
- package/dist/cjs/ptc-date.cjs.entry.js +39 -0
- package/dist/cjs/ptc-footer.cjs.entry.js +19 -0
- package/dist/cjs/ptc-image.cjs.entry.js +2 -6
- package/dist/cjs/ptc-img.cjs.entry.js +84 -0
- package/dist/cjs/ptc-link.cjs.entry.js +15 -5
- package/dist/cjs/ptc-list.cjs.entry.js +11 -3
- package/dist/cjs/ptc-lottie.cjs.entry.js +23 -0
- package/dist/cjs/ptc-nav-item.cjs.entry.js +94 -0
- package/dist/cjs/ptc-nav.cjs.entry.js +19 -0
- package/dist/cjs/ptc-overlay.cjs.entry.js +19 -0
- package/dist/cjs/ptc-para.cjs.entry.js +39 -0
- package/dist/cjs/ptc-picture.cjs.entry.js +26 -0
- package/dist/cjs/ptc-spacer.cjs.entry.js +46 -0
- package/dist/cjs/ptc-span.cjs.entry.js +26 -0
- package/dist/cjs/ptc-title.cjs.entry.js +49 -0
- package/dist/cjs/ptcw-design.cjs.js +2 -2
- package/dist/collection/assets/responsive-background-image.min.js +1 -0
- package/dist/collection/collection-manifest.json +20 -1
- package/dist/collection/components/icon-asset/assets/footer-social.svg +0 -0
- package/dist/collection/components/icon-asset/assets/ptc-sprite.svg +73 -0
- package/dist/collection/components/icon-asset/icon-asset.css +6 -2
- package/dist/collection/components/icon-asset/icon-asset.js +25 -16
- package/dist/collection/components/list-item/list-item.css +3 -0
- package/dist/collection/components/list-item/list-item.js +63 -0
- package/dist/collection/components/ptc-button/ptc-button.css +35 -136
- package/dist/collection/components/ptc-button/ptc-button.js +45 -47
- package/dist/collection/components/ptc-card/ptc-card.css +87 -0
- package/dist/collection/components/ptc-card/ptc-card.js +233 -7
- package/dist/collection/components/ptc-date/ptc-date.css +3 -0
- package/dist/collection/components/ptc-date/ptc-date.js +110 -0
- package/dist/collection/components/ptc-footer/ptc-footer.css +40 -0
- package/dist/collection/components/ptc-footer/ptc-footer.js +25 -0
- package/dist/collection/components/ptc-image/ptc-image.css +3 -2
- package/dist/collection/components/ptc-image/ptc-image.js +0 -4
- package/dist/collection/components/ptc-img/ptc-img.css +48 -0
- package/dist/collection/components/ptc-img/ptc-img.js +192 -0
- package/dist/collection/components/ptc-link/ptc-link.css +133 -13
- package/dist/collection/components/ptc-link/ptc-link.js +47 -16
- package/dist/collection/components/ptc-list/ptc-list.css +23 -2
- package/dist/collection/components/ptc-list/ptc-list.js +53 -5
- package/dist/collection/components/ptc-lottie/ptc-lottie.css +5 -0
- package/dist/collection/components/ptc-lottie/ptc-lottie.js +58 -0
- package/dist/collection/components/ptc-nav/ptc-nav.css +29 -0
- package/dist/collection/components/ptc-nav/ptc-nav.js +21 -0
- package/dist/collection/components/ptc-nav-item/ptc-nav-item.css +81 -0
- package/dist/collection/components/ptc-nav-item/ptc-nav-item.js +252 -0
- package/dist/collection/components/ptc-overlay/ptc-overlay.css +3 -0
- package/dist/collection/components/ptc-overlay/ptc-overlay.js +14 -0
- package/dist/collection/components/ptc-para/ptc-para.css +53 -0
- package/dist/collection/components/ptc-para/ptc-para.js +92 -0
- package/dist/collection/components/ptc-picture/ptc-picture.css +3 -0
- package/dist/collection/components/ptc-picture/ptc-picture.js +44 -0
- package/dist/collection/components/ptc-spacer/ptc-spacer.css +307 -0
- package/dist/collection/components/ptc-spacer/ptc-spacer.js +99 -0
- package/dist/collection/components/ptc-span/ptc-span.css +16 -0
- package/dist/collection/components/ptc-span/ptc-span.js +44 -0
- package/dist/collection/utils/interfaces.js +6 -1
- package/dist/custom-elements/index.d.ts +72 -0
- package/dist/custom-elements/index.js +13997 -40
- package/dist/esm/icon-asset.entry.js +60 -0
- package/dist/esm/{index-4bbf8fa5.js → index-5b1c792c.js} +268 -7
- package/dist/esm/list-item.entry.js +23 -0
- package/dist/esm/loader.js +2 -2
- package/dist/esm/lottie-player.entry.js +13472 -0
- package/dist/esm/my-component.entry.js +22 -0
- package/dist/esm/ptc-button.entry.js +44 -0
- package/dist/esm/ptc-card.entry.js +52 -3
- package/dist/esm/ptc-date.entry.js +35 -0
- package/dist/esm/ptc-footer.entry.js +15 -0
- package/dist/esm/ptc-image.entry.js +2 -6
- package/dist/esm/ptc-img.entry.js +80 -0
- package/dist/esm/ptc-link.entry.js +15 -5
- package/dist/esm/ptc-list.entry.js +11 -3
- package/dist/esm/ptc-lottie.entry.js +19 -0
- package/dist/esm/ptc-nav-item.entry.js +90 -0
- package/dist/esm/ptc-nav.entry.js +15 -0
- package/dist/esm/ptc-overlay.entry.js +15 -0
- package/dist/esm/ptc-para.entry.js +35 -0
- package/dist/esm/ptc-picture.entry.js +22 -0
- package/dist/esm/ptc-spacer.entry.js +42 -0
- package/dist/esm/ptc-span.entry.js +22 -0
- package/dist/esm/ptc-title.entry.js +45 -0
- package/dist/esm/ptcw-design.js +2 -2
- package/dist/node_modules/@teamhive/lottie-player/dist/collection/components/lottie-player/lottie-player.css +187 -0
- package/dist/ptcw-design/assets/footer-social.svg +0 -0
- package/dist/ptcw-design/assets/ptc-sprite.svg +73 -0
- package/dist/ptcw-design/p-01dc360c.entry.js +1 -0
- package/dist/ptcw-design/p-07624831.entry.js +1 -0
- package/dist/ptcw-design/p-0a44a2f7.entry.js +1 -0
- package/dist/ptcw-design/p-15a428d4.entry.js +1 -0
- package/dist/ptcw-design/p-1a26bade.entry.js +1 -0
- package/dist/ptcw-design/p-1b4fd3da.entry.js +1 -0
- package/dist/ptcw-design/p-29d02e2b.entry.js +1 -0
- package/dist/ptcw-design/p-2d357f92.entry.js +1 -0
- package/dist/ptcw-design/p-31f4bd0c.entry.js +1 -0
- package/dist/ptcw-design/p-3af43980.entry.js +1 -0
- package/dist/ptcw-design/p-4f366fc3.js +1 -0
- package/dist/ptcw-design/p-662ae9b6.entry.js +1 -0
- package/dist/ptcw-design/p-77f87fa3.entry.js +1 -0
- package/dist/ptcw-design/p-85131a2a.entry.js +1 -0
- package/dist/ptcw-design/p-8b6c805c.entry.js +1 -0
- package/dist/ptcw-design/p-9f96864d.entry.js +1 -0
- package/dist/ptcw-design/p-ac0ad25e.entry.js +1 -0
- package/dist/ptcw-design/p-b0b2e82c.entry.js +1 -0
- package/dist/ptcw-design/{p-9aef6d0e.entry.js → p-c169281f.entry.js} +1 -1
- package/dist/ptcw-design/p-ce8b8a72.entry.js +1 -0
- package/dist/ptcw-design/p-df01ac95.entry.js +1 -0
- package/dist/ptcw-design/p-fe6a3ba5.entry.js +1 -0
- package/dist/ptcw-design/ptcw-design.css +2 -2
- package/dist/ptcw-design/ptcw-design.esm.js +1 -1
- package/dist/types/components/icon-asset/icon-asset.d.ts +6 -5
- package/dist/types/components/list-item/list-item.d.ts +6 -0
- package/dist/types/components/ptc-button/ptc-button.d.ts +9 -7
- package/dist/types/components/ptc-card/ptc-card.d.ts +42 -2
- package/dist/types/components/ptc-date/ptc-date.d.ts +22 -0
- package/dist/types/components/ptc-footer/ptc-footer.d.ts +3 -0
- package/dist/types/components/ptc-img/ptc-img.d.ts +14 -0
- package/dist/types/components/ptc-link/ptc-link.d.ts +7 -3
- package/dist/types/components/ptc-list/ptc-list.d.ts +3 -0
- package/dist/types/components/ptc-lottie/ptc-lottie.d.ts +12 -0
- package/dist/types/components/ptc-nav/ptc-nav.d.ts +3 -0
- package/dist/types/components/ptc-nav-item/ptc-nav-item.d.ts +53 -0
- package/dist/types/components/ptc-overlay/ptc-overlay.d.ts +3 -0
- package/dist/types/components/ptc-para/ptc-para.d.ts +16 -0
- package/dist/types/components/ptc-picture/ptc-picture.d.ts +5 -0
- package/dist/types/components/ptc-spacer/ptc-spacer.d.ts +16 -0
- package/dist/types/components/ptc-span/ptc-span.d.ts +5 -0
- package/dist/types/components.d.ts +450 -38
- package/dist/types/utils/interfaces.d.ts +7 -1
- package/package.json +2 -1
- package/dist/cjs/icon-asset_4.cjs.entry.js +0 -165
- package/dist/esm/icon-asset_4.entry.js +0 -158
- package/dist/ptcw-design/p-0492a377.entry.js +0 -1
- package/dist/ptcw-design/p-bd9fac27.entry.js +0 -1
- package/dist/ptcw-design/p-d855d70c.js +0 -1
- package/dist/ptcw-design/p-e33cba65.entry.js +0 -1
- package/dist/ptcw-design/p-e899eb48.entry.js +0 -1
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Component, Host, h, Prop } from '@stencil/core';
|
|
2
|
+
export class ListItem {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.listType = 'para-list';
|
|
5
|
+
this.linkHref = undefined;
|
|
6
|
+
}
|
|
7
|
+
render() {
|
|
8
|
+
const classMap = this.getCssClassMap();
|
|
9
|
+
return (h(Host, { class: classMap },
|
|
10
|
+
h("li", null, this.linkHref ? (h("a", Object.assign({}, (this.linkHref ? { href: this.linkHref } : {})),
|
|
11
|
+
h("slot", null))) : (h("slot", null)))));
|
|
12
|
+
}
|
|
13
|
+
getCssClassMap() {
|
|
14
|
+
return {
|
|
15
|
+
[this.listType]: true,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
static get is() { return "list-item"; }
|
|
19
|
+
static get originalStyleUrls() { return {
|
|
20
|
+
"$": ["list-item.scss"]
|
|
21
|
+
}; }
|
|
22
|
+
static get styleUrls() { return {
|
|
23
|
+
"$": ["list-item.css"]
|
|
24
|
+
}; }
|
|
25
|
+
static get properties() { return {
|
|
26
|
+
"listType": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"mutable": false,
|
|
29
|
+
"complexType": {
|
|
30
|
+
"original": "'link-primary' | 'link-sub' | 'icon' | 'para-list'",
|
|
31
|
+
"resolved": "\"icon\" | \"link-primary\" | \"link-sub\" | \"para-list\"",
|
|
32
|
+
"references": {}
|
|
33
|
+
},
|
|
34
|
+
"required": false,
|
|
35
|
+
"optional": false,
|
|
36
|
+
"docs": {
|
|
37
|
+
"tags": [],
|
|
38
|
+
"text": ""
|
|
39
|
+
},
|
|
40
|
+
"attribute": "list-type",
|
|
41
|
+
"reflect": false,
|
|
42
|
+
"defaultValue": "'para-list'"
|
|
43
|
+
},
|
|
44
|
+
"linkHref": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"mutable": false,
|
|
47
|
+
"complexType": {
|
|
48
|
+
"original": "string",
|
|
49
|
+
"resolved": "string",
|
|
50
|
+
"references": {}
|
|
51
|
+
},
|
|
52
|
+
"required": false,
|
|
53
|
+
"optional": true,
|
|
54
|
+
"docs": {
|
|
55
|
+
"tags": [],
|
|
56
|
+
"text": ""
|
|
57
|
+
},
|
|
58
|
+
"attribute": "link-href",
|
|
59
|
+
"reflect": false,
|
|
60
|
+
"defaultValue": "undefined"
|
|
61
|
+
}
|
|
62
|
+
}; }
|
|
63
|
+
}
|
|
@@ -1,177 +1,76 @@
|
|
|
1
|
-
:
|
|
2
|
-
display: block;
|
|
3
|
-
box-sizing: border-box;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
:host([disabled]) {
|
|
1
|
+
button:disabled {
|
|
7
2
|
pointer-events: none;
|
|
3
|
+
opacity: 0.6;
|
|
8
4
|
}
|
|
9
5
|
|
|
10
|
-
@keyframes gradient {
|
|
11
|
-
0% {
|
|
12
|
-
background-position: 0%;
|
|
13
|
-
}
|
|
14
|
-
100% {
|
|
15
|
-
background-position: 100%;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
6
|
button {
|
|
19
7
|
background-color: var(--color-primary-uigrey);
|
|
20
8
|
display: inline-block;
|
|
21
9
|
border-style: solid;
|
|
22
|
-
border-width:
|
|
10
|
+
border-width: 1px;
|
|
23
11
|
white-space: normal;
|
|
24
12
|
position: relative;
|
|
25
|
-
/* -webkit-backface-visibility: hidden; */
|
|
26
|
-
transition: box-shadow 0.4s cubic-bezier(0, 0, 0.23, 1);
|
|
27
|
-
text-transform: uppercase;
|
|
28
13
|
text-decoration: none;
|
|
29
14
|
cursor: pointer;
|
|
15
|
+
padding: 9.4px 17.5px;
|
|
16
|
+
border-radius: 3px;
|
|
30
17
|
}
|
|
31
|
-
button.
|
|
32
|
-
padding: 15px 28px;
|
|
33
|
-
}
|
|
34
|
-
button.small {
|
|
35
|
-
padding: 10px 20px;
|
|
36
|
-
}
|
|
37
|
-
button.round {
|
|
38
|
-
border-radius: var(--ptc-border-radius-medium);
|
|
39
|
-
}
|
|
40
|
-
button.icon svg, button.icon-right svg, button.icon-down svg {
|
|
18
|
+
button.animation-right svg, button.animation-down svg {
|
|
41
19
|
transition: all ease-out 0.25s;
|
|
42
20
|
position: relative;
|
|
43
|
-
top: 4px;
|
|
44
21
|
}
|
|
45
|
-
button:hover.
|
|
22
|
+
button:hover.animation-right svg {
|
|
46
23
|
transform: translateX(var(--ptc-element-spacing-02));
|
|
47
24
|
}
|
|
48
|
-
button:hover.
|
|
25
|
+
button:hover.animation-down svg {
|
|
49
26
|
transform: translateY(var(--ptc-element-spacing-02));
|
|
50
27
|
}
|
|
51
28
|
button span {
|
|
52
|
-
font-
|
|
53
|
-
font-size: 19px;
|
|
29
|
+
font-size: var(--ptc-font-size-small);
|
|
54
30
|
font-weight: bold;
|
|
55
|
-
|
|
56
|
-
text-align: center;
|
|
57
|
-
position: relative;
|
|
58
|
-
z-index: 2;
|
|
31
|
+
line-height: 0.86;
|
|
59
32
|
}
|
|
60
33
|
|
|
61
|
-
.
|
|
62
|
-
|
|
63
|
-
border: solid 2.5px var(--color-primary-uigrey);
|
|
64
|
-
background-image: linear-gradient(to right, #ffffff, #d3d3d3, #e5e5e5);
|
|
65
|
-
}
|
|
66
|
-
.offwhite:hover:after {
|
|
67
|
-
opacity: 1;
|
|
68
|
-
}
|
|
69
|
-
.offwhite:after {
|
|
70
|
-
position: absolute;
|
|
71
|
-
content: "";
|
|
72
|
-
top: 0;
|
|
73
|
-
left: 0;
|
|
74
|
-
bottom: 0;
|
|
75
|
-
right: 0;
|
|
76
|
-
width: 100%;
|
|
77
|
-
height: 100%;
|
|
78
|
-
background-image: linear-gradient(to right, #e5e5e5, #d3d3d3, #ffffff);
|
|
79
|
-
opacity: 0;
|
|
80
|
-
transition: opacity 0.6s cubic-bezier(0, 0, 0.23, 1);
|
|
81
|
-
}
|
|
82
|
-
.offwhite:hover {
|
|
83
|
-
box-shadow: 0 0 49px 6.1px rgba(0, 0, 0, 0.55);
|
|
84
|
-
}
|
|
85
|
-
.offwhite span {
|
|
86
|
-
color: var(--color-primary-uigrey);
|
|
34
|
+
.icon-left svg {
|
|
35
|
+
margin-right: var(--ptc-element-spacing-01);
|
|
87
36
|
}
|
|
88
37
|
|
|
89
|
-
.
|
|
90
|
-
|
|
91
|
-
border: 0px;
|
|
92
|
-
position: relative;
|
|
93
|
-
-webkit-box-shadow: 0 0 49px 0 rgba(116, 195, 77, 0.35);
|
|
94
|
-
box-shadow: 0 0 49px 0 rgba(116, 195, 77, 0.35);
|
|
95
|
-
}
|
|
96
|
-
.neon:hover {
|
|
97
|
-
-webkit-box-shadow: 0 0 49px 0 rgba(116, 195, 77, 0.6);
|
|
98
|
-
box-shadow: 0 0 49px 0 rgba(116, 195, 77, 0.6);
|
|
99
|
-
}
|
|
100
|
-
.neon:before {
|
|
101
|
-
content: "";
|
|
102
|
-
position: absolute;
|
|
103
|
-
top: calc(-1 * 2.5px);
|
|
104
|
-
left: calc(-1 * 3px);
|
|
105
|
-
width: calc(100% + 2 * 3px);
|
|
106
|
-
height: calc(100% + 2 * 2.5px);
|
|
107
|
-
background: linear-gradient(to right, var(--color-secondary-turquoiseblue), var(--color-secondary-turtlegreen), var(--color-secondary-turtlegreen), var(--color-secondary-turquoiseblue));
|
|
108
|
-
z-index: -1;
|
|
109
|
-
background-size: 200% 200%;
|
|
110
|
-
border-radius: 4px;
|
|
111
|
-
}
|
|
112
|
-
.neon:hover:before {
|
|
113
|
-
-webkit-animation: gradient 0.6s cubic-bezier(0, 0, 0.23, 1) forwards 1;
|
|
114
|
-
animation: gradient 0.6s cubic-bezier(0, 0, 0.23, 1) forwards 1;
|
|
115
|
-
}
|
|
116
|
-
.neon span {
|
|
117
|
-
color: var(--color-white);
|
|
38
|
+
.icon-right svg {
|
|
39
|
+
margin-left: var(--ptc-element-spacing-01);
|
|
118
40
|
}
|
|
119
41
|
|
|
120
42
|
.blackgrey {
|
|
121
|
-
box-shadow:
|
|
122
|
-
border: solid
|
|
123
|
-
background-image: linear-gradient(
|
|
124
|
-
}
|
|
125
|
-
.blackgrey:after {
|
|
126
|
-
position: absolute;
|
|
127
|
-
content: "";
|
|
128
|
-
top: 0;
|
|
129
|
-
left: 0;
|
|
130
|
-
bottom: 0;
|
|
131
|
-
right: 0;
|
|
132
|
-
width: 100%;
|
|
133
|
-
height: 100%;
|
|
134
|
-
background-color: var(--color-primary-uigrey);
|
|
135
|
-
background-image: linear-gradient(to left, var(--color-black), var(--color-primary-uigrey));
|
|
136
|
-
opacity: 0;
|
|
137
|
-
transition: opacity 0.6s cubic-bezier(0, 0, 0.23, 1);
|
|
138
|
-
border-radius: 4px;
|
|
43
|
+
box-shadow: var(--ptc-shadow-x-small);
|
|
44
|
+
border: solid 1px var(--color-primary-uigrey);
|
|
45
|
+
background-image: linear-gradient(285deg, var(--color-primary-uigrey) 155%, #6e717c 62%);
|
|
139
46
|
}
|
|
140
47
|
.blackgrey:hover {
|
|
141
|
-
box-shadow:
|
|
142
|
-
}
|
|
143
|
-
.blackgrey:hover:after {
|
|
144
|
-
opacity: 1;
|
|
48
|
+
box-shadow: var(--ptc-shadow-x-large);
|
|
145
49
|
}
|
|
146
50
|
.blackgrey span {
|
|
147
|
-
color:
|
|
51
|
+
color: var(--color-white);
|
|
148
52
|
}
|
|
149
53
|
|
|
150
54
|
.turtlegreen {
|
|
151
|
-
box-shadow:
|
|
152
|
-
border: solid
|
|
153
|
-
background-image: linear-gradient(
|
|
154
|
-
}
|
|
155
|
-
.turtlegreen:after {
|
|
156
|
-
position: absolute;
|
|
157
|
-
content: "";
|
|
158
|
-
top: -1px;
|
|
159
|
-
left: 0;
|
|
160
|
-
bottom: 0;
|
|
161
|
-
right: 0;
|
|
162
|
-
width: 100%;
|
|
163
|
-
height: 103%;
|
|
164
|
-
background-image: linear-gradient(to right, var(--color-secondary-tutlegreen-dark), var(--color-secondary-turtlegreen));
|
|
165
|
-
opacity: 0;
|
|
166
|
-
transition: opacity 0.6s cubic-bezier(0, 0, 0.23, 1);
|
|
167
|
-
border-radius: 2px;
|
|
55
|
+
box-shadow: var(--ptc-shadow-x-small);
|
|
56
|
+
border: solid 1px #5bb73b;
|
|
57
|
+
background-image: linear-gradient(285deg, #5bb73b 155%, #178642 62%);
|
|
168
58
|
}
|
|
169
59
|
.turtlegreen:hover {
|
|
170
|
-
box-shadow:
|
|
171
|
-
}
|
|
172
|
-
.turtlegreen:hover:after {
|
|
173
|
-
opacity: 1;
|
|
60
|
+
box-shadow: var(--ptc-shadow-x-large);
|
|
174
61
|
}
|
|
175
62
|
.turtlegreen span {
|
|
176
63
|
color: var(--color-white);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.offwhite {
|
|
67
|
+
box-shadow: var(--ptc-shadow-x-small);
|
|
68
|
+
border: solid 1px var(--color-primary-uigrey);
|
|
69
|
+
background-image: linear-gradient(to right, #ffffff, #d3d3d3, #e5e5e5);
|
|
70
|
+
}
|
|
71
|
+
.offwhite:hover {
|
|
72
|
+
box-shadow: var(--ptc-shadow-x-large);
|
|
73
|
+
}
|
|
74
|
+
.offwhite span {
|
|
75
|
+
color: var(--color-primary-uigrey);
|
|
177
76
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, Prop, h } from '@stencil/core';
|
|
1
|
+
import { Component, Prop, h, Event, Host } from '@stencil/core';
|
|
2
2
|
export class PtcButton {
|
|
3
3
|
constructor() {
|
|
4
4
|
/**
|
|
@@ -10,30 +10,30 @@ export class PtcButton {
|
|
|
10
10
|
*/
|
|
11
11
|
this.color = 'blackgrey';
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
14
|
-
*/
|
|
15
|
-
this.shape = 'round';
|
|
16
|
-
/**
|
|
17
|
-
* Button Size
|
|
13
|
+
* Icon Animation
|
|
18
14
|
*/
|
|
19
|
-
this.
|
|
15
|
+
this.iconAnimation = '';
|
|
20
16
|
/**
|
|
21
|
-
* Icon
|
|
17
|
+
* Icon Position
|
|
22
18
|
*/
|
|
23
|
-
this.
|
|
19
|
+
this.iconPosition = 'icon-right';
|
|
20
|
+
}
|
|
21
|
+
clickEventHandler() {
|
|
22
|
+
this.clickEvent.emit();
|
|
23
|
+
console.log('click!');
|
|
24
24
|
}
|
|
25
25
|
render() {
|
|
26
26
|
const classMap = this.getCssClassMap();
|
|
27
|
-
return (h(
|
|
28
|
-
h("
|
|
29
|
-
h("
|
|
27
|
+
return (h(Host, null,
|
|
28
|
+
h("button", { type: this.type, class: classMap, disabled: this.disabled, onClick: this.clickEventHandler.bind(this) },
|
|
29
|
+
h("span", null,
|
|
30
|
+
h("slot", null)))));
|
|
30
31
|
}
|
|
31
32
|
getCssClassMap() {
|
|
32
33
|
return {
|
|
33
34
|
[this.color]: true,
|
|
34
|
-
[this.
|
|
35
|
-
[this.
|
|
36
|
-
[this.icon]: true,
|
|
35
|
+
[this.iconAnimation]: true,
|
|
36
|
+
[this.iconPosition]: true,
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
39
|
static get is() { return "ptc-button"; }
|
|
@@ -48,12 +48,12 @@ export class PtcButton {
|
|
|
48
48
|
"type": "boolean",
|
|
49
49
|
"mutable": false,
|
|
50
50
|
"complexType": {
|
|
51
|
-
"original": "boolean",
|
|
51
|
+
"original": "boolean | undefined",
|
|
52
52
|
"resolved": "boolean",
|
|
53
53
|
"references": {}
|
|
54
54
|
},
|
|
55
55
|
"required": false,
|
|
56
|
-
"optional":
|
|
56
|
+
"optional": true,
|
|
57
57
|
"docs": {
|
|
58
58
|
"tags": [],
|
|
59
59
|
"text": "Disabled button"
|
|
@@ -83,7 +83,7 @@ export class PtcButton {
|
|
|
83
83
|
"type": "string",
|
|
84
84
|
"mutable": false,
|
|
85
85
|
"complexType": {
|
|
86
|
-
"original": "'offwhite' | 'blackgrey' | 'turtlegreen'| 'neon'",
|
|
86
|
+
"original": "'offwhite' | 'blackgrey' | 'turtlegreen' | 'neon'",
|
|
87
87
|
"resolved": "\"blackgrey\" | \"neon\" | \"offwhite\" | \"turtlegreen\"",
|
|
88
88
|
"references": {}
|
|
89
89
|
},
|
|
@@ -97,59 +97,57 @@ export class PtcButton {
|
|
|
97
97
|
"reflect": false,
|
|
98
98
|
"defaultValue": "'blackgrey'"
|
|
99
99
|
},
|
|
100
|
-
"
|
|
100
|
+
"iconAnimation": {
|
|
101
101
|
"type": "string",
|
|
102
102
|
"mutable": false,
|
|
103
103
|
"complexType": {
|
|
104
|
-
"original": "'
|
|
105
|
-
"resolved": "\"
|
|
104
|
+
"original": "'animation-right' | 'animation-down' | ''",
|
|
105
|
+
"resolved": "\"\" | \"animation-down\" | \"animation-right\"",
|
|
106
106
|
"references": {}
|
|
107
107
|
},
|
|
108
108
|
"required": false,
|
|
109
109
|
"optional": false,
|
|
110
110
|
"docs": {
|
|
111
111
|
"tags": [],
|
|
112
|
-
"text": "
|
|
112
|
+
"text": "Icon Animation"
|
|
113
113
|
},
|
|
114
|
-
"attribute": "
|
|
114
|
+
"attribute": "icon-animation",
|
|
115
115
|
"reflect": false,
|
|
116
|
-
"defaultValue": "'
|
|
116
|
+
"defaultValue": "''"
|
|
117
117
|
},
|
|
118
|
-
"
|
|
118
|
+
"iconPosition": {
|
|
119
119
|
"type": "string",
|
|
120
120
|
"mutable": false,
|
|
121
121
|
"complexType": {
|
|
122
|
-
"original": "'
|
|
123
|
-
"resolved": "\"
|
|
122
|
+
"original": "'icon-left' | 'icon-right'",
|
|
123
|
+
"resolved": "\"icon-left\" | \"icon-right\"",
|
|
124
124
|
"references": {}
|
|
125
125
|
},
|
|
126
126
|
"required": false,
|
|
127
127
|
"optional": false,
|
|
128
128
|
"docs": {
|
|
129
129
|
"tags": [],
|
|
130
|
-
"text": "
|
|
130
|
+
"text": "Icon Position"
|
|
131
131
|
},
|
|
132
|
-
"attribute": "
|
|
132
|
+
"attribute": "icon-position",
|
|
133
133
|
"reflect": false,
|
|
134
|
-
"defaultValue": "'
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
"
|
|
139
|
-
"
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
},
|
|
144
|
-
"required": false,
|
|
145
|
-
"optional": false,
|
|
134
|
+
"defaultValue": "'icon-right'"
|
|
135
|
+
}
|
|
136
|
+
}; }
|
|
137
|
+
static get events() { return [{
|
|
138
|
+
"method": "clickEvent",
|
|
139
|
+
"name": "clickEvent",
|
|
140
|
+
"bubbles": true,
|
|
141
|
+
"cancelable": true,
|
|
142
|
+
"composed": true,
|
|
146
143
|
"docs": {
|
|
147
144
|
"tags": [],
|
|
148
|
-
"text": "
|
|
145
|
+
"text": "Emitted when the button has focus."
|
|
149
146
|
},
|
|
150
|
-
"
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
147
|
+
"complexType": {
|
|
148
|
+
"original": "void",
|
|
149
|
+
"resolved": "void",
|
|
150
|
+
"references": {}
|
|
151
|
+
}
|
|
152
|
+
}]; }
|
|
155
153
|
}
|