@kompasid/lit-web-components 0.7.3 → 0.7.5

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 (22) hide show
  1. package/.github/workflows/npm-publish.yml +2 -2
  2. package/demo/index.html +66 -50
  3. package/dist/src/components/kompasid-grace-period/KompasGracePeriod.d.ts +32 -2
  4. package/dist/src/components/kompasid-grace-period/KompasGracePeriod.js +110 -4
  5. package/dist/src/components/kompasid-grace-period/KompasGracePeriod.js.map +1 -1
  6. package/dist/src/components/kompasid-header-account/KompasHeaderAccount.js +34 -9
  7. package/dist/src/components/kompasid-header-account/KompasHeaderAccount.js.map +1 -1
  8. package/dist/src/components/kompasid-header-account-help-center/KompasHeaderAccountHelpCenter.js +14 -10
  9. package/dist/src/components/kompasid-header-account-help-center/KompasHeaderAccountHelpCenter.js.map +1 -1
  10. package/dist/src/components/kompasid-header-account-menu/KompasHeaderAccountMenu.js +5 -2
  11. package/dist/src/components/kompasid-header-account-menu/KompasHeaderAccountMenu.js.map +1 -1
  12. package/dist/tailwind/tailwind.js +31 -22
  13. package/dist/tailwind/tailwind.js.map +1 -1
  14. package/dist/tsconfig.tsbuildinfo +1 -1
  15. package/package.json +1 -1
  16. package/src/components/kompasid-grace-period/KompasGracePeriod.ts +74 -3
  17. package/src/components/kompasid-grace-period/readme.md +21 -7
  18. package/src/components/kompasid-header-account/KompasHeaderAccount.ts +34 -9
  19. package/src/components/kompasid-header-account-help-center/KompasHeaderAccountHelpCenter.ts +14 -10
  20. package/src/components/kompasid-header-account-menu/KompasHeaderAccountMenu.ts +5 -2
  21. package/tailwind/tailwind.css +31 -22
  22. package/tailwind/tailwind.ts +31 -22
@@ -4,13 +4,27 @@ Ini adalah redesign komponen _grace period_ yang digunakan pada [kompas.id](http
4
4
 
5
5
  ## Properties
6
6
 
7
- | Property | Attribute | Description | Type | Default |
8
- | ------------------------------ | ------------------------------ | ----------- | ------------------------------------------- | ----------- |
9
- | `totalGracePeriod` | `total-grace-period` | how many days are left in grace period | `number` | `0` |
10
- | `isColumn` | `is-column` | changes how the component looks on different screen sizes | `boolean` | `false` |
11
- | `isShowButton` | `is-show-button` | shows or hides a subscription button | `boolean` | `false` |
12
- | `subscriptionId` | `subscription-id` | used for renewal subs | `string` | `false` |
13
-
7
+ | Property | Attribute | Description | Type | Default |
8
+ | ------------------------------ | ------------------------------ | ----------- | ------------------------| ----------- |
9
+ | `totalGracePeriod` | `total-grace-period` | | `number` | `0` |
10
+ | `isColumn` | `is-column` | | `boolean` | `false` |
11
+ | `isShowButton` | `is-show-button` | | `boolean` | `false` |
12
+ | `subscriptionId` | `subscription-id` | | `string` | `false` |
13
+ | `paywall_location` | `paywall_location` | | `string` | `''` |
14
+ | `paywall_position` | `paywall_position` | | `number` | `0` |
15
+ | `paywall_subscription_id` | `paywall_subscription_id` | | `number` | `0` |
16
+ | `paywall_subscription_package` | `paywall_subscription_package` | | `string` | `''` |
17
+ | `paywall_subscription_price` | `paywall_subscription_price` | | `number` | `0` |
18
+ | `tracker_content_categories` | `tracker_content_categories` | | `string` | `''` |
19
+ | `tracker_content_id` | `tracker_content_id` | | `string` | `''` |
20
+ | `tracker_content_title` | `tracker_content_title` | | `string` | `''` |
21
+ | `tracker_content_type` | `tracker_content_type` | | `string` | `''` |
22
+ | `tracker_metered_wall_balance` | `tracker_metered_wall_balance` | | `number` | `0` |
23
+ | `tracker_metered_wall_type` | `tracker_metered_wall_type` | | `string` | `''` |
24
+ | `tracker_page_domain` | `tracker_page_domain` | | `string` | `''` |
25
+ | `tracker_page_type` | `tracker_page_type` | | `string` | `''` |
26
+ | `tracker_subscription_status` | `tracker_subscription_status` | | `string` | `''` |
27
+ | `tracker_user_type` | `tracker_user_type` | | `string` | `''` |
14
28
 
15
29
  ----------------------------------------------
16
30
 
@@ -63,6 +63,31 @@ export class KompasHeaderAccount extends LitElement {
63
63
  font-family: 'PT Sans', sans-serif;
64
64
  font-size: 0.875rem;
65
65
  }
66
+ .z-index-max {
67
+ z-index: 99999;
68
+ }
69
+
70
+ /* Custom Scrollbar for header */
71
+ /* width */
72
+ ::-webkit-scrollbar {
73
+ width: 4px;
74
+ }
75
+
76
+ /* Track */
77
+ ::-webkit-scrollbar-track {
78
+ background: transparent;
79
+ }
80
+
81
+ /* Handle */
82
+ ::-webkit-scrollbar-thumb {
83
+ background: #0356a8;
84
+ border-radius: 100px;
85
+ }
86
+
87
+ /* Handle on hover */
88
+ ::-webkit-scrollbar-thumb:hover {
89
+ background: #0356a8;
90
+ }
66
91
  `,
67
92
  TWStyles,
68
93
  ]
@@ -113,7 +138,7 @@ export class KompasHeaderAccount extends LitElement {
113
138
  }
114
139
 
115
140
  return html`
116
- <button @click=${this.toggleSidebar} class="cursor-pointer p-3">
141
+ <button @click=${this.toggleSidebar} class="cursor-pointer ">
117
142
  <div class="flex flex-row items-center self-center">
118
143
  ${!this.getInitialUserName()
119
144
  ? html`<div
@@ -143,11 +168,15 @@ export class KompasHeaderAccount extends LitElement {
143
168
 
144
169
  private accountSidebar() {
145
170
  return html`
146
- <nav @keyup="${this.onkeyup}" @click=${this.toggleSidebar}>
171
+ <nav
172
+ class="w-screen fixed right-0 top-0 bottom-0"
173
+ @keyup="${this.onkeyup}"
174
+ @click=${this.toggleSidebar}
175
+ >
147
176
  <div
177
+ class="bg-grey-100 pb-20 pt-0 shadow-lg w-76 z-index-max ml-auto"
178
+ style=${`margin-top: ${this.sidebarTopSpacing}px;height:100vh;overflow-y:auto`}
148
179
  @keyup="${this.onkeyup}"
149
- class="bg-grey-100 pb-20 pt-0 shadow-lg w-76 z-99 ml-auto"
150
- style=${`margin-top: ${this.sidebarTopSpacing}px`}
151
180
  @click=${(ev: any) => ev.stopPropagation()}
152
181
  >
153
182
  <kompasid-header-account-profile
@@ -187,11 +216,7 @@ export class KompasHeaderAccount extends LitElement {
187
216
 
188
217
  render() {
189
218
  return html`
190
- <header class="header flex flex-row justify-end h-[49px] relative z-50">
191
- <div class="text-end">
192
- ${this.account()} ${this.isShowSidebar ? this.accountSidebar() : ''}
193
- </div>
194
- </header>
219
+ ${this.account()} ${this.isShowSidebar ? this.accountSidebar() : ''}
195
220
  `
196
221
  }
197
222
  }
@@ -15,23 +15,27 @@ export class KompasHeaderAccountHelpCenter extends LitElement {
15
15
  display: flex;
16
16
  flex-direction: row;
17
17
  align-items: center;
18
- padding: 0.75rem;
19
- transition: background-color 0.3s ease-in-out;
20
- border-radius: 0.25rem;
18
+ padding: 0 0.75rem;
21
19
  }
22
- .header-account-help-center--item:hover {
23
- background-color: #e5e7eb;
24
- }
25
- .header-help-center--content {
26
- text-align: left;
20
+ .header-account-help-center--content {
21
+ display: flex;
22
+ flex-direction: column;
23
+ flex-grow: 1;
24
+ margin-left: 1rem; /* Equivalent to mx-4 (margin-left: 1rem and margin-right: 1rem) */
25
+ margin-right: 1rem;
26
+ line-height: 1.25rem; /* Equivalent to leading-4 (line-height: 1.25rem) */
27
+ font-size: 1rem; /* Equivalent to text-base (font-size: 1rem) */
28
+ gap: 0.5rem; /* Equivalent to gap-y-2 (gap between rows: 0.5rem) */
27
29
  }
28
30
  .icon {
29
- width: 20px;
30
- height: 20px;
31
31
  margin-top: auto;
32
32
  margin-bottom: auto;
33
33
  color: rgb(0 85 154);
34
34
  }
35
+ .icon svg {
36
+ width: 20px;
37
+ height: 20px;
38
+ }
35
39
  `,
36
40
  TWStyles,
37
41
  ]
@@ -40,12 +40,15 @@ export class KompasHeaderAccountMenu extends LitElement {
40
40
  width: 1.75rem;
41
41
  }
42
42
  .icon {
43
- width: 20px;
44
- height: 20px;
45
43
  margin-top: auto;
46
44
  margin-bottom: auto;
47
45
  color: rgb(0 85 154);
48
46
  }
47
+ .icon svg {
48
+ width: 20px;
49
+ height: 20px;
50
+ }
51
+ .
49
52
  `,
50
53
  TWStyles,
51
54
  ]
@@ -845,10 +845,6 @@ video {
845
845
  height: 17px;
846
846
  }
847
847
 
848
- .h-\[49px\] {
849
- height: 49px;
850
- }
851
-
852
848
  .h-\[68px\] {
853
849
  height: 68px;
854
850
  }
@@ -870,6 +866,14 @@ video {
870
866
  height: max-content;
871
867
  }
872
868
 
869
+ .h-1\/2 {
870
+ height: 50%;
871
+ }
872
+
873
+ .h-3\/4 {
874
+ height: 75%;
875
+ }
876
+
873
877
  .w-1\/2 {
874
878
  width: 50%;
875
879
  }
@@ -974,6 +978,10 @@ video {
974
978
  width: 100%;
975
979
  }
976
980
 
981
+ .w-screen {
982
+ width: 100vw;
983
+ }
984
+
977
985
  .max-w-7xl {
978
986
  max-width: 80rem;
979
987
  }
@@ -1391,6 +1399,11 @@ video {
1391
1399
  background-color: rgb(255 238 204 / var(--tw-bg-opacity));
1392
1400
  }
1393
1401
 
1402
+ .bg-red-500 {
1403
+ --tw-bg-opacity: 1;
1404
+ background-color: rgb(208 13 18 / var(--tw-bg-opacity));
1405
+ }
1406
+
1394
1407
  .bg-white {
1395
1408
  --tw-bg-opacity: 1;
1396
1409
  background-color: rgb(255 255 255 / var(--tw-bg-opacity));
@@ -1401,6 +1414,11 @@ video {
1401
1414
  background-color: rgb(255 220 63 / var(--tw-bg-opacity));
1402
1415
  }
1403
1416
 
1417
+ .bg-dark-2 {
1418
+ --tw-bg-opacity: 1;
1419
+ background-color: rgb(56 56 56 / var(--tw-bg-opacity));
1420
+ }
1421
+
1404
1422
  .bg-opacity-75 {
1405
1423
  --tw-bg-opacity: 0.75;
1406
1424
  }
@@ -1625,10 +1643,6 @@ video {
1625
1643
  text-align: start;
1626
1644
  }
1627
1645
 
1628
- .text-end {
1629
- text-align: end;
1630
- }
1631
-
1632
1646
  .font-sans {
1633
1647
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
1634
1648
  }
@@ -2016,14 +2030,14 @@ video {
2016
2030
  width: 580px;
2017
2031
  }
2018
2032
 
2019
- .md\:w-full {
2020
- width: 100%;
2021
- }
2022
-
2023
2033
  .md\:w-auto {
2024
2034
  width: auto;
2025
2035
  }
2026
2036
 
2037
+ .md\:w-full {
2038
+ width: 100%;
2039
+ }
2040
+
2027
2041
  .md\:max-w-\[137px\] {
2028
2042
  max-width: 137px;
2029
2043
  }
@@ -2361,26 +2375,21 @@ video {
2361
2375
  padding-right: 0px;
2362
2376
  }
2363
2377
 
2364
- .lg\:px-20 {
2365
- padding-left: 5rem;
2366
- padding-right: 5rem;
2367
- }
2368
-
2369
2378
  .lg\:px-24 {
2370
2379
  padding-left: 6rem;
2371
2380
  padding-right: 6rem;
2372
2381
  }
2373
2382
 
2374
- .lg\:py-10 {
2375
- padding-top: 2.5rem;
2376
- padding-bottom: 2.5rem;
2377
- }
2378
-
2379
2383
  .lg\:px-8 {
2380
2384
  padding-left: 2rem;
2381
2385
  padding-right: 2rem;
2382
2386
  }
2383
2387
 
2388
+ .lg\:py-10 {
2389
+ padding-top: 2.5rem;
2390
+ padding-bottom: 2.5rem;
2391
+ }
2392
+
2384
2393
  .lg\:pb-0 {
2385
2394
  padding-bottom: 0px;
2386
2395
  }
@@ -855,10 +855,6 @@ Constrain images and videos to the parent width and preserve their intrinsic asp
855
855
  height: 17px;
856
856
  }
857
857
 
858
- .h-\\[49px\\] {
859
- height: 49px;
860
- }
861
-
862
858
  .h-\\[68px\\] {
863
859
  height: 68px;
864
860
  }
@@ -880,6 +876,14 @@ Constrain images and videos to the parent width and preserve their intrinsic asp
880
876
  height: max-content;
881
877
  }
882
878
 
879
+ .h-1\\/2 {
880
+ height: 50%;
881
+ }
882
+
883
+ .h-3\\/4 {
884
+ height: 75%;
885
+ }
886
+
883
887
  .w-1\\/2 {
884
888
  width: 50%;
885
889
  }
@@ -984,6 +988,10 @@ Constrain images and videos to the parent width and preserve their intrinsic asp
984
988
  width: 100%;
985
989
  }
986
990
 
991
+ .w-screen {
992
+ width: 100vw;
993
+ }
994
+
987
995
  .max-w-7xl {
988
996
  max-width: 80rem;
989
997
  }
@@ -1405,6 +1413,11 @@ Constrain images and videos to the parent width and preserve their intrinsic asp
1405
1413
  background-color: rgb(255 238 204 / var(--tw-bg-opacity));
1406
1414
  }
1407
1415
 
1416
+ .bg-red-500 {
1417
+ --tw-bg-opacity: 1;
1418
+ background-color: rgb(208 13 18 / var(--tw-bg-opacity));
1419
+ }
1420
+
1408
1421
  .bg-white {
1409
1422
  --tw-bg-opacity: 1;
1410
1423
  background-color: rgb(255 255 255 / var(--tw-bg-opacity));
@@ -1415,6 +1428,11 @@ Constrain images and videos to the parent width and preserve their intrinsic asp
1415
1428
  background-color: rgb(255 220 63 / var(--tw-bg-opacity));
1416
1429
  }
1417
1430
 
1431
+ .bg-dark-2 {
1432
+ --tw-bg-opacity: 1;
1433
+ background-color: rgb(56 56 56 / var(--tw-bg-opacity));
1434
+ }
1435
+
1418
1436
  .bg-opacity-75 {
1419
1437
  --tw-bg-opacity: 0.75;
1420
1438
  }
@@ -1639,10 +1657,6 @@ Constrain images and videos to the parent width and preserve their intrinsic asp
1639
1657
  text-align: start;
1640
1658
  }
1641
1659
 
1642
- .text-end {
1643
- text-align: end;
1644
- }
1645
-
1646
1660
  .font-sans {
1647
1661
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
1648
1662
  'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif,
@@ -2043,14 +2057,14 @@ Constrain images and videos to the parent width and preserve their intrinsic asp
2043
2057
  width: 580px;
2044
2058
  }
2045
2059
 
2046
- .md\\:w-full {
2047
- width: 100%;
2048
- }
2049
-
2050
2060
  .md\\:w-auto {
2051
2061
  width: auto;
2052
2062
  }
2053
2063
 
2064
+ .md\\:w-full {
2065
+ width: 100%;
2066
+ }
2067
+
2054
2068
  .md\\:max-w-\\[137px\\] {
2055
2069
  max-width: 137px;
2056
2070
  }
@@ -2388,26 +2402,21 @@ Constrain images and videos to the parent width and preserve their intrinsic asp
2388
2402
  padding-right: 0px;
2389
2403
  }
2390
2404
 
2391
- .lg\\:px-20 {
2392
- padding-left: 5rem;
2393
- padding-right: 5rem;
2394
- }
2395
-
2396
2405
  .lg\\:px-24 {
2397
2406
  padding-left: 6rem;
2398
2407
  padding-right: 6rem;
2399
2408
  }
2400
2409
 
2401
- .lg\\:py-10 {
2402
- padding-top: 2.5rem;
2403
- padding-bottom: 2.5rem;
2404
- }
2405
-
2406
2410
  .lg\\:px-8 {
2407
2411
  padding-left: 2rem;
2408
2412
  padding-right: 2rem;
2409
2413
  }
2410
2414
 
2415
+ .lg\\:py-10 {
2416
+ padding-top: 2.5rem;
2417
+ padding-bottom: 2.5rem;
2418
+ }
2419
+
2411
2420
  .lg\\:pb-0 {
2412
2421
  padding-bottom: 0px;
2413
2422
  }