@kompasid/lit-web-components 0.3.0 → 0.4.0
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/.github/workflows/npm-publish.yml +2 -2
- package/demo/index.html +12 -12
- package/dist/src/components/{kompas-footer → kompasid-footer}/KompasFooter.js +16 -4
- package/dist/src/components/kompasid-footer/KompasFooter.js.map +1 -0
- package/dist/src/components/kompasid-footer/types.js.map +1 -0
- package/dist/src/components/{kompas-metered-paywall → kompasid-metered-paywall}/KompasMeteredPaywall.js +3 -3
- package/dist/src/components/kompasid-metered-paywall/KompasMeteredPaywall.js.map +1 -0
- package/dist/src/components/{kompas-paywall → kompasid-paywall}/KompasPaywall.d.ts +3 -3
- package/dist/src/components/{kompas-paywall → kompasid-paywall}/KompasPaywall.js +35 -14
- package/dist/src/components/kompasid-paywall/KompasPaywall.js.map +1 -0
- package/dist/src/components/kompasid-paywall/types.js.map +1 -0
- package/dist/src/components/{kompas-paywall-banner-registration → kompasid-paywall-banner-registration}/KompasPaywallBannerRegistration.d.ts +1 -1
- package/dist/src/components/{kompas-paywall-banner-registration → kompasid-paywall-banner-registration}/KompasPaywallBannerRegistration.js +1 -1
- package/dist/src/components/kompasid-paywall-banner-registration/KompasPaywallBannerRegistration.js.map +1 -0
- package/dist/src/components/{kompas-paywall-body → kompasid-paywall-body}/KompasPaywallBody.d.ts +2 -2
- package/dist/src/components/{kompas-paywall-body → kompasid-paywall-body}/KompasPaywallBody.js +52 -42
- package/dist/src/components/kompasid-paywall-body/KompasPaywallBody.js.map +1 -0
- package/dist/src/components/{kompas-paywall-information-header → kompasid-paywall-information-header}/KompasPaywallInformationHeader.js +1 -1
- package/dist/src/components/kompasid-paywall-information-header/KompasPaywallInformationHeader.js.map +1 -0
- package/dist/src/components/{kompas-paywall-video → kompasid-paywall-video}/KompasPaywallVideo.js +1 -1
- package/dist/src/components/kompasid-paywall-video/KompasPaywallVideo.js.map +1 -0
- package/dist/src/index.d.ts +4 -4
- package/dist/src/index.js +4 -4
- package/dist/src/index.js.map +1 -1
- package/dist/tailwind/tailwind.js +1369 -1343
- package/dist/tailwind/tailwind.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/components/{kompas-footer → kompasid-footer}/KompasFooter.ts +16 -4
- package/src/components/{kompas-metered-paywall → kompasid-metered-paywall}/KompasMeteredPaywall.ts +3 -3
- package/src/components/{kompas-metered-paywall → kompasid-metered-paywall}/readme.md +1 -1
- package/src/components/{kompas-paywall → kompasid-paywall}/KompasPaywall.ts +35 -14
- package/src/components/{kompas-paywall → kompasid-paywall}/readme.md +8 -8
- package/src/components/{kompas-paywall-banner-registration → kompasid-paywall-banner-registration}/KompasPaywallBannerRegistration.ts +2 -2
- package/src/components/{kompas-paywall-banner-registration → kompasid-paywall-banner-registration}/readme.md +4 -4
- package/src/components/{kompas-paywall-body → kompasid-paywall-body}/KompasPaywallBody.ts +14 -4
- package/src/components/{kompas-paywall-body → kompasid-paywall-body}/readme.md +4 -4
- package/src/components/{kompas-paywall-information-header → kompasid-paywall-information-header}/KompasPaywallInformationHeader.ts +1 -1
- package/src/components/{kompas-paywall-information-header → kompasid-paywall-information-header}/readme.md +4 -4
- package/src/components/{kompas-paywall-video → kompasid-paywall-video}/KompasPaywallVideo.ts +1 -1
- package/src/components/{kompas-paywall-video → kompasid-paywall-video}/readme.md +3 -3
- package/src/index.ts +4 -4
- package/tailwind/tailwind.css +10 -0
- package/tailwind/tailwind.ts +1369 -1344
- package/dist/src/components/kompas-footer/KompasFooter.js.map +0 -1
- package/dist/src/components/kompas-footer/types.js.map +0 -1
- package/dist/src/components/kompas-metered-paywall/KompasMeteredPaywall.js.map +0 -1
- package/dist/src/components/kompas-paywall/KompasPaywall.js.map +0 -1
- package/dist/src/components/kompas-paywall/types.js.map +0 -1
- package/dist/src/components/kompas-paywall-banner-registration/KompasPaywallBannerRegistration.js.map +0 -1
- package/dist/src/components/kompas-paywall-body/KompasPaywallBody.js.map +0 -1
- package/dist/src/components/kompas-paywall-information-header/KompasPaywallInformationHeader.js.map +0 -1
- package/dist/src/components/kompas-paywall-video/KompasPaywallVideo.js.map +0 -1
- /package/dist/src/components/{kompas-footer → kompasid-footer}/KompasFooter.d.ts +0 -0
- /package/dist/src/components/{kompas-footer → kompasid-footer}/types.d.ts +0 -0
- /package/dist/src/components/{kompas-footer → kompasid-footer}/types.js +0 -0
- /package/dist/src/components/{kompas-metered-paywall → kompasid-metered-paywall}/KompasMeteredPaywall.d.ts +0 -0
- /package/dist/src/components/{kompas-paywall → kompasid-paywall}/types.d.ts +0 -0
- /package/dist/src/components/{kompas-paywall → kompasid-paywall}/types.js +0 -0
- /package/dist/src/components/{kompas-paywall-information-header → kompasid-paywall-information-header}/KompasPaywallInformationHeader.d.ts +0 -0
- /package/dist/src/components/{kompas-paywall-video → kompasid-paywall-video}/KompasPaywallVideo.d.ts +0 -0
- /package/src/components/{kompas-footer → kompasid-footer}/types.ts +0 -0
- /package/src/components/{kompas-paywall → kompasid-paywall}/types.ts +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# kompasid-paywall
|
|
2
2
|
|
|
3
3
|
Ini adalah redesign komponen _paywall_ yang digunakan pada [epaper.kompas.id](https://epaper.kompas.id) dan [kompas.id](https://kompas.id). Penggunaan komponen ini dapat dibedakan berdasarkan type productnya ( epaper atau reguler(kompas.id)).
|
|
4
4
|
|
|
@@ -37,17 +37,17 @@ Ini adalah redesign komponen _paywall_ yang digunakan pada [epaper.kompas.id](ht
|
|
|
37
37
|
|
|
38
38
|
### Depends on
|
|
39
39
|
|
|
40
|
-
- [
|
|
41
|
-
- [
|
|
42
|
-
- [
|
|
40
|
+
- [kompasid-paywall-body](../kompasid-paywall-body)
|
|
41
|
+
- [kompasid-paywall-information-header](../kompasid-paywall-information-header)
|
|
42
|
+
- [kompasid-paywall-banner-registration](../kompasid-paywall-banner-registration)
|
|
43
43
|
|
|
44
44
|
### Graph
|
|
45
45
|
```mermaid
|
|
46
46
|
graph TD;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
style
|
|
47
|
+
kompasid-paywall --> kompasid-paywall-body
|
|
48
|
+
kompasid-paywall --> kompasid-paywall-information-header
|
|
49
|
+
kompasid-paywall --> kompasid-paywall-banner-registration
|
|
50
|
+
style kompasid-paywall fill:#f9f,stroke:#333,stroke-width:4px
|
|
51
51
|
```
|
|
52
52
|
|
|
53
53
|
----------------------------------------------
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { html, css, LitElement } from 'lit'
|
|
2
2
|
import { property, customElement } from 'lit/decorators.js'
|
|
3
3
|
import { TWStyles } from '../../../tailwind/tailwind.js'
|
|
4
|
-
import { Registration } from '../
|
|
4
|
+
import { Registration } from '../kompasid-paywall/types.js'
|
|
5
5
|
import { deviceType } from '../../utils/deviceType.js'
|
|
6
6
|
|
|
7
|
-
@customElement('
|
|
7
|
+
@customElement('kompasid-paywall-banner-registration')
|
|
8
8
|
export class KompasPaywallBannerRegistration extends LitElement {
|
|
9
9
|
static styles = [css``, TWStyles]
|
|
10
10
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# kompasid-paywall-banner-registration
|
|
2
2
|
|
|
3
3
|
## Properties
|
|
4
4
|
|
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
|
|
13
13
|
### Used by
|
|
14
14
|
|
|
15
|
-
- [
|
|
15
|
+
- [kompasid-paywall](../kompasid-paywall)
|
|
16
16
|
|
|
17
17
|
### Graph
|
|
18
18
|
```mermaid
|
|
19
19
|
graph TD;
|
|
20
|
-
|
|
21
|
-
style
|
|
20
|
+
kompasid-paywall --> kompasid-paywall-banner-registration
|
|
21
|
+
style kompasid-paywall-banner-registration fill:#f9f,stroke:#333,stroke-width:4px
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
----------------------------------------------
|
|
@@ -9,13 +9,23 @@ import {
|
|
|
9
9
|
Product,
|
|
10
10
|
Packages,
|
|
11
11
|
PaymentImage,
|
|
12
|
-
} from '../
|
|
12
|
+
} from '../kompasid-paywall/types.js'
|
|
13
13
|
import { getFontAwesomeIcon } from '../../utils/fontawesome-setup.js'
|
|
14
14
|
import { deviceType } from '../../utils/deviceType.js'
|
|
15
15
|
|
|
16
|
-
@customElement('
|
|
17
|
-
export class
|
|
18
|
-
static styles = [
|
|
16
|
+
@customElement('kompasid-paywall-body')
|
|
17
|
+
export class KompasIdPaywallBody extends LitElement {
|
|
18
|
+
static styles = [
|
|
19
|
+
css`
|
|
20
|
+
.wrapper-body {
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
justify-items: center;
|
|
24
|
+
align-items: center;
|
|
25
|
+
}
|
|
26
|
+
`,
|
|
27
|
+
TWStyles,
|
|
28
|
+
]
|
|
19
29
|
|
|
20
30
|
/**
|
|
21
31
|
* Props
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# kompasid-paywall-body
|
|
2
2
|
|
|
3
3
|
## Properties
|
|
4
4
|
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
|
|
36
36
|
### Used by
|
|
37
37
|
|
|
38
|
-
- [
|
|
38
|
+
- [kompasid-paywall](../kompasid-paywall)
|
|
39
39
|
|
|
40
40
|
### Graph
|
|
41
41
|
```mermaid
|
|
42
42
|
graph TD;
|
|
43
|
-
|
|
44
|
-
style
|
|
43
|
+
kompasid-paywall --> kompasid-paywall-body
|
|
44
|
+
style kompasid-paywall-body fill:#f9f,stroke:#333,stroke-width:4px
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
----------------------------------------------
|
|
@@ -3,7 +3,7 @@ import { html, css, LitElement } from 'lit'
|
|
|
3
3
|
import { property, customElement } from 'lit/decorators.js'
|
|
4
4
|
import { TWStyles } from '../../../tailwind/tailwind.js'
|
|
5
5
|
|
|
6
|
-
@customElement('
|
|
6
|
+
@customElement('kompasid-paywall-information-header')
|
|
7
7
|
export class KompasPaywallInformationHeader extends LitElement {
|
|
8
8
|
static styles = [css``, TWStyles]
|
|
9
9
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# kompasid-paywall-information-header
|
|
2
2
|
|
|
3
3
|
## Properties
|
|
4
4
|
|
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
|
|
12
12
|
### Used by
|
|
13
13
|
|
|
14
|
-
- [
|
|
14
|
+
- [kompasid-paywall](../kompasid-paywall)
|
|
15
15
|
|
|
16
16
|
### Graph
|
|
17
17
|
```mermaid
|
|
18
18
|
graph TD;
|
|
19
|
-
|
|
20
|
-
style
|
|
19
|
+
kompasid-paywall --> kompasid-paywall-information-header
|
|
20
|
+
style kompasid-paywall-information-header fill:#f9f,stroke:#333,stroke-width:4px
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
----------------------------------------------
|
package/src/components/{kompas-paywall-video → kompasid-paywall-video}/KompasPaywallVideo.ts
RENAMED
|
@@ -4,7 +4,7 @@ import { property, customElement, state } from 'lit/decorators.js'
|
|
|
4
4
|
import { TWStyles } from '../../../tailwind/tailwind.js'
|
|
5
5
|
import { deviceType } from '../../utils/deviceType.js'
|
|
6
6
|
|
|
7
|
-
@customElement('
|
|
7
|
+
@customElement('kompasid-paywall-video')
|
|
8
8
|
export class KompasPaywallVideo extends LitElement {
|
|
9
9
|
static styles = [css``, TWStyles]
|
|
10
10
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
#
|
|
1
|
+
# kompasid-paywall-video
|
|
2
2
|
|
|
3
3
|
### Standar
|
|
4
|
-
Anda perlu meletakkan _tag_ komponen `<
|
|
4
|
+
Anda perlu meletakkan _tag_ komponen `<kompasid-paywall-video />` pada child component (komponen ini memiliki style `position: absolute` sehingga parent componentnya harus menggunakan style `position:relative`).
|
|
5
5
|
|
|
6
6
|
### Elemen
|
|
7
7
|
```javascript
|
|
8
8
|
<div style="position:relative">
|
|
9
9
|
<your-content-component/>
|
|
10
|
-
<
|
|
10
|
+
<kompasid-paywall-video />
|
|
11
11
|
</div>
|
|
12
12
|
```
|
|
13
13
|
|
package/src/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { KompasPaywall } from './components/
|
|
2
|
-
export { KompasFooter } from './components/
|
|
3
|
-
export { KompasPaywallVideo } from './components/
|
|
4
|
-
export { KompasMeteredPaywall } from './components/
|
|
1
|
+
export { KompasPaywall } from './components/kompasid-paywall/KompasPaywall.js'
|
|
2
|
+
export { KompasFooter } from './components/kompasid-footer/KompasFooter.js'
|
|
3
|
+
export { KompasPaywallVideo } from './components/kompasid-paywall-video/KompasPaywallVideo.js'
|
|
4
|
+
export { KompasMeteredPaywall } from './components/kompasid-metered-paywall/KompasMeteredPaywall.js'
|
|
5
5
|
|
|
6
6
|
declare global {
|
|
7
7
|
interface Window {
|
package/tailwind/tailwind.css
CHANGED
|
@@ -1114,6 +1114,16 @@ video {
|
|
|
1114
1114
|
background-color: rgb(255 220 63 / var(--tw-bg-opacity));
|
|
1115
1115
|
}
|
|
1116
1116
|
|
|
1117
|
+
.bg-red-400 {
|
|
1118
|
+
--tw-bg-opacity: 1;
|
|
1119
|
+
background-color: rgb(243 32 19 / var(--tw-bg-opacity));
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
.bg-yellow-400 {
|
|
1123
|
+
--tw-bg-opacity: 1;
|
|
1124
|
+
background-color: rgb(255 204 0 / var(--tw-bg-opacity));
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1117
1127
|
.bg-opacity-50 {
|
|
1118
1128
|
--tw-bg-opacity: 0.5;
|
|
1119
1129
|
}
|