@kompasid/lit-web-components 0.5.2 → 0.5.4

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.
@@ -124,6 +124,10 @@ export class KompasIdPaywallBody extends LitElement {
124
124
  return this.theme === 'dark'
125
125
  }
126
126
 
127
+ get isEntitledForIntroductoryPrice(): boolean {
128
+ return !this.isLogin || this.tracker_subscription_status === 'IA'
129
+ }
130
+
127
131
  /**
128
132
  * Logic Function
129
133
  */
@@ -641,16 +645,6 @@ export class KompasIdPaywallBody extends LitElement {
641
645
  </div>`
642
646
  }
643
647
 
644
- private separatorLine() {
645
- return html`
646
- <div class="flex flex-row w-full justify-center">
647
- <p class="px-4 pt-1 ${this.isDark ? 'text-dark-1' : 'text-grey-500'}">
648
- atau
649
- </p>
650
- </div>
651
- `
652
- }
653
-
654
648
  private epaperRegistrationSection() {
655
649
  return html`
656
650
  <div>
@@ -753,7 +747,8 @@ export class KompasIdPaywallBody extends LitElement {
753
747
  private primaryPackages(product: Product) {
754
748
  return html`
755
749
  <div
756
- class="flex flex-wrap justify-between items-center ${this.isDark
750
+ class="flex flex-wrap justify-between h-[68px] items-center ${this
751
+ .isDark
757
752
  ? 'bg-grey-600'
758
753
  : 'bg-white'} rounded-lg md:mx-0 w-full max-w-xs md:max-w-sm md:w-3/5 mt-2.5 md:mt-4 border border-yellow-400 relative"
759
754
  >
@@ -777,9 +772,9 @@ export class KompasIdPaywallBody extends LitElement {
777
772
  </div>
778
773
  </div>
779
774
  <button
780
- class="h-auto ${this.isDark
775
+ class="h-8 ${this.isDark
781
776
  ? 'bg-green-300 border border-green-400'
782
- : 'bg-green-500'} rounded mr-4"
777
+ : 'bg-green-500'} rounded mr-4 flex items-center"
783
778
  @click=${() =>
784
779
  this.redirectToCheckout(
785
780
  product.url,
@@ -790,7 +785,7 @@ export class KompasIdPaywallBody extends LitElement {
790
785
  )}
791
786
  >
792
787
  <h6
793
- class="text-xs md:text-base ${this.isDark
788
+ class="text-xs md:text-sm ${this.isDark
794
789
  ? 'text-black'
795
790
  : 'text-white'} font-bold py-2 px-4"
796
791
  >
@@ -809,9 +804,9 @@ export class KompasIdPaywallBody extends LitElement {
809
804
  private secondaryPackages(product: Product) {
810
805
  return html`
811
806
  <div
812
- class="flex flex-wrap justify-between ${this.isDark
807
+ class="flex flex-wrap items-center justify-between ${this.isDark
813
808
  ? 'bg-grey-600'
814
- : 'bg-white'} py-3 px-4 rounded-lg md:mx-0 w-full max-w-xs md:max-w-sm md:w-3/5 mt-3 md:mt-4"
809
+ : 'bg-white'} py-3 px-4 rounded-lg md:mx-0 w-full h-[68px] max-w-xs md:max-w-sm md:w-3/5 mt-3 md:mt-4"
815
810
  >
816
811
  <div class="flex items-center">
817
812
  <h5 class="text-base md:text-lg font-bold text-orange-400">
@@ -834,13 +829,13 @@ export class KompasIdPaywallBody extends LitElement {
834
829
  50000,
835
830
  2
836
831
  )}
837
- class="h-auto ${!this.isDark &&
832
+ class="h-8 ${!this.isDark &&
838
833
  'bg-white'} border border-green-500 rounded"
839
834
  >
840
835
  <h6
841
- class="text-xs md:text-base ${this.isDark
836
+ class="text-xs md:text-sm ${this.isDark
842
837
  ? 'text-green-300'
843
- : 'text-green-500'} font-bold py-2 px-4"
838
+ : 'text-green-500'} font-bold px-4 "
844
839
  >
845
840
  Langganan
846
841
  </h6>
@@ -857,6 +852,7 @@ export class KompasIdPaywallBody extends LitElement {
857
852
  ? this.primaryPackages(item)
858
853
  : this.secondaryPackages(item)
859
854
  )}
855
+ ${this.swgEnable ? this.swgPackageSection() : nothing}
860
856
  </div>
861
857
  `
862
858
  }
@@ -907,6 +903,65 @@ export class KompasIdPaywallBody extends LitElement {
907
903
  `
908
904
  }
909
905
 
906
+ private introductoryPrice() {
907
+ return html` <div
908
+ class="flex space-x-1 h-5 md:h-max overflow-hidden md:flex-col md:space-x-0 items-center md:items-start md:justify-center"
909
+ >
910
+ <h5 class="text-base md:text-lg font-bold text-orange-400">Rp 10.000</h5>
911
+ <p class="text-xs ${this.isDark ? 'text-dark-7' : 'text-grey-600'}">
912
+ untuk 1 bulan pertama
913
+ </p>
914
+ </div>`
915
+ }
916
+
917
+ private swgRegonText() {
918
+ return html`<p
919
+ class="text-xs leading-4 md:max-w-[137px] ${this.isDark
920
+ ? 'text-dark-7'
921
+ : 'text-grey-600'}"
922
+ >
923
+ Berlangganan lebih mudah dengan Google
924
+ </p>`
925
+ }
926
+
927
+ private swgPackageSection() {
928
+ return html`
929
+ <div
930
+ class="flex flex-col space-y-2 md:space-x-2 md:space-y-0 md:flex-row justify-between items-center ${this
931
+ .isDark
932
+ ? 'bg-grey-600'
933
+ : 'bg-white'} py-3 px-4 rounded-lg md:mx-0 w-full h-[76px] md:h-[68px] max-w-xs md:max-w-sm md:w-3/5 mt-3 md:mt-4"
934
+ >
935
+ ${this.isEntitledForIntroductoryPrice
936
+ ? this.introductoryPrice()
937
+ : this.swgRegonText()}
938
+ <div>
939
+ <button
940
+ class="${this.isDark
941
+ ? 'bg-grey-600'
942
+ : 'bg-grey-100 border-grey-100'} border space-x-2 justify-center border-grey-400 rounded-md px-[22px] md:px-6 shadow-sm flex h-max flex-row flex-nowrap py-[5.6px] md:py-1.5 items-center"
943
+ id="subscribe-with-google"
944
+ >
945
+ <p
946
+ class="${this.isDark
947
+ ? 'text-dark-7'
948
+ : 'text-grey-500'} text-[11px] md:text-xs whitespace-nowrap w-full "
949
+ >
950
+ Subscribe with
951
+ </p>
952
+ <img
953
+ class="object-scale-down h-[17px] md:h-5"
954
+ src=${this.isDark
955
+ ? 'https://kompasid-production-www.s3.ap-southeast-1.amazonaws.com/paywall-asset/google-white.png'
956
+ : 'https://kompasid-production-www.s3.ap-southeast-1.amazonaws.com/paywall-asset/google.png'}
957
+ alt="subscribe with google"
958
+ />
959
+ </button>
960
+ </div>
961
+ </div>
962
+ `
963
+ }
964
+
910
965
  /**
911
966
  * Render Statement
912
967
  */
@@ -936,26 +991,6 @@ export class KompasIdPaywallBody extends LitElement {
936
991
  this.paywallData?.packages ?? ({} as Packages)
937
992
  )}
938
993
  ${this.informationPackages()}
939
- ${this.swgEnable ? this.separatorLine() : nothing}
940
- ${this.swgEnable
941
- ? html`<button
942
- class="${this.isDark
943
- ? 'bg-grey-600'
944
- : 'border-2 bg-grey-100 border-grey-100'} rounded-lg px-6 shadow-sm flex flex-row py-2 mt-1 items-center"
945
- id="subscribe-with-google"
946
- >
947
- <p class=${this.isDark ? 'text-dark-7' : 'text-grey-500'}>
948
- Subscribe with
949
- </p>
950
- <img
951
- class="pl-2 object-scale-down w-20 pt-0.5"
952
- src=${this.isDark
953
- ? 'https://kompasid-production-www.s3.ap-southeast-1.amazonaws.com/paywall-asset/google-white.png'
954
- : 'https://kompasid-production-www.s3.ap-southeast-1.amazonaws.com/paywall-asset/google.png'}
955
- alt="subscribe with google"
956
- />
957
- </button>`
958
- : nothing}
959
994
  ${!this.isLogin
960
995
  ? html`
961
996
  <div
@@ -672,6 +672,14 @@ video {
672
672
  margin-left: 0.25rem;
673
673
  }
674
674
 
675
+ .ml-2 {
676
+ margin-left: 0.5rem;
677
+ }
678
+
679
+ .ml-3 {
680
+ margin-left: 0.75rem;
681
+ }
682
+
675
683
  .ml-8 {
676
684
  margin-left: 2rem;
677
685
  }
@@ -764,6 +772,18 @@ video {
764
772
  height: 2.25rem;
765
773
  }
766
774
 
775
+ .h-\[17px\] {
776
+ height: 17px;
777
+ }
778
+
779
+ .h-\[68px\] {
780
+ height: 68px;
781
+ }
782
+
783
+ .h-\[76px\] {
784
+ height: 76px;
785
+ }
786
+
767
787
  .h-auto {
768
788
  height: auto;
769
789
  }
@@ -772,6 +792,11 @@ video {
772
792
  height: 100%;
773
793
  }
774
794
 
795
+ .h-max {
796
+ height: -moz-max-content;
797
+ height: max-content;
798
+ }
799
+
775
800
  .w-1\/5 {
776
801
  width: 20%;
777
802
  }
@@ -844,10 +869,6 @@ video {
844
869
  max-width: 80rem;
845
870
  }
846
871
 
847
- .max-w-\[280px\] {
848
- max-width: 280px;
849
- }
850
-
851
872
  .max-w-screen-md {
852
873
  max-width: 768px;
853
874
  }
@@ -925,6 +946,10 @@ video {
925
946
  flex-wrap: wrap;
926
947
  }
927
948
 
949
+ .flex-nowrap {
950
+ flex-wrap: nowrap;
951
+ }
952
+
928
953
  .place-items-center {
929
954
  place-items: center;
930
955
  }
@@ -969,10 +994,16 @@ video {
969
994
  row-gap: 1rem;
970
995
  }
971
996
 
972
- .space-x-3 > :not([hidden]) ~ :not([hidden]) {
997
+ .space-x-1 > :not([hidden]) ~ :not([hidden]) {
973
998
  --tw-space-x-reverse: 0;
974
- margin-right: calc(0.75rem * var(--tw-space-x-reverse));
975
- margin-left: calc(0.75rem * calc(1 - var(--tw-space-x-reverse)));
999
+ margin-right: calc(0.25rem * var(--tw-space-x-reverse));
1000
+ margin-left: calc(0.25rem * calc(1 - var(--tw-space-x-reverse)));
1001
+ }
1002
+
1003
+ .space-x-2 > :not([hidden]) ~ :not([hidden]) {
1004
+ --tw-space-x-reverse: 0;
1005
+ margin-right: calc(0.5rem * var(--tw-space-x-reverse));
1006
+ margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));
976
1007
  }
977
1008
 
978
1009
  .space-x-4 > :not([hidden]) ~ :not([hidden]) {
@@ -1003,6 +1034,10 @@ video {
1003
1034
  align-self: center;
1004
1035
  }
1005
1036
 
1037
+ .overflow-hidden {
1038
+ overflow: hidden;
1039
+ }
1040
+
1006
1041
  .whitespace-nowrap {
1007
1042
  white-space: nowrap;
1008
1043
  }
@@ -1092,6 +1127,11 @@ video {
1092
1127
  border-color: rgb(238 238 238 / var(--tw-border-opacity));
1093
1128
  }
1094
1129
 
1130
+ .border-grey-400 {
1131
+ --tw-border-opacity: 1;
1132
+ border-color: rgb(153 153 153 / var(--tw-border-opacity));
1133
+ }
1134
+
1095
1135
  .border-white {
1096
1136
  --tw-border-opacity: 1;
1097
1137
  border-color: rgb(255 255 255 / var(--tw-border-opacity));
@@ -1187,6 +1227,11 @@ video {
1187
1227
  background-color: rgb(255 220 63 / var(--tw-bg-opacity));
1188
1228
  }
1189
1229
 
1230
+ .bg-red-100 {
1231
+ --tw-bg-opacity: 1;
1232
+ background-color: rgb(254 225 207 / var(--tw-bg-opacity));
1233
+ }
1234
+
1190
1235
  .bg-opacity-75 {
1191
1236
  --tw-bg-opacity: 0.75;
1192
1237
  }
@@ -1223,11 +1268,6 @@ video {
1223
1268
  padding-right: 1rem;
1224
1269
  }
1225
1270
 
1226
- .px-6 {
1227
- padding-left: 1.5rem;
1228
- padding-right: 1.5rem;
1229
- }
1230
-
1231
1271
  .px-8 {
1232
1272
  padding-left: 2rem;
1233
1273
  padding-right: 2rem;
@@ -1238,6 +1278,11 @@ video {
1238
1278
  padding-right: 10px;
1239
1279
  }
1240
1280
 
1281
+ .px-\[22px\] {
1282
+ padding-left: 22px;
1283
+ padding-right: 22px;
1284
+ }
1285
+
1241
1286
  .py-0 {
1242
1287
  padding-top: 0px;
1243
1288
  padding-bottom: 0px;
@@ -1268,6 +1313,11 @@ video {
1268
1313
  padding-bottom: 1.25rem;
1269
1314
  }
1270
1315
 
1316
+ .py-\[5\.6px\] {
1317
+ padding-top: 5.6px;
1318
+ padding-bottom: 5.6px;
1319
+ }
1320
+
1271
1321
  .pb-1 {
1272
1322
  padding-bottom: 0.25rem;
1273
1323
  }
@@ -1324,10 +1374,6 @@ video {
1324
1374
  padding-top: 0.125rem;
1325
1375
  }
1326
1376
 
1327
- .pt-1 {
1328
- padding-top: 0.25rem;
1329
- }
1330
-
1331
1377
  .pt-10 {
1332
1378
  padding-top: 2.5rem;
1333
1379
  }
@@ -1396,6 +1442,10 @@ video {
1396
1442
  font-weight: 400;
1397
1443
  }
1398
1444
 
1445
+ .leading-4 {
1446
+ line-height: 1rem;
1447
+ }
1448
+
1399
1449
  .leading-5 {
1400
1450
  line-height: 1.25rem;
1401
1451
  }
@@ -1459,11 +1509,6 @@ video {
1459
1509
  color: rgb(0 85 154 / var(--tw-text-opacity));
1460
1510
  }
1461
1511
 
1462
- .text-dark-1 {
1463
- --tw-text-opacity: 1;
1464
- color: rgb(160 160 160 / var(--tw-text-opacity));
1465
- }
1466
-
1467
1512
  .text-dark-6 {
1468
1513
  --tw-text-opacity: 1;
1469
1514
  color: rgb(46 46 46 / var(--tw-text-opacity));
@@ -1590,6 +1635,19 @@ video {
1590
1635
  height: 3rem;
1591
1636
  }
1592
1637
 
1638
+ .md\:h-5 {
1639
+ height: 1.25rem;
1640
+ }
1641
+
1642
+ .md\:h-\[68px\] {
1643
+ height: 68px;
1644
+ }
1645
+
1646
+ .md\:h-max {
1647
+ height: -moz-max-content;
1648
+ height: max-content;
1649
+ }
1650
+
1593
1651
  .md\:min-h-\[244px\] {
1594
1652
  min-height: 244px;
1595
1653
  }
@@ -1630,8 +1688,8 @@ video {
1630
1688
  width: 100%;
1631
1689
  }
1632
1690
 
1633
- .md\:max-w-full {
1634
- max-width: 100%;
1691
+ .md\:max-w-\[137px\] {
1692
+ max-width: 137px;
1635
1693
  }
1636
1694
 
1637
1695
  .md\:max-w-sm {
@@ -1646,10 +1704,34 @@ video {
1646
1704
  flex-direction: row;
1647
1705
  }
1648
1706
 
1707
+ .md\:flex-col {
1708
+ flex-direction: column;
1709
+ }
1710
+
1711
+ .md\:items-start {
1712
+ align-items: flex-start;
1713
+ }
1714
+
1649
1715
  .md\:justify-start {
1650
1716
  justify-content: flex-start;
1651
1717
  }
1652
1718
 
1719
+ .md\:justify-center {
1720
+ justify-content: center;
1721
+ }
1722
+
1723
+ .md\:space-x-0 > :not([hidden]) ~ :not([hidden]) {
1724
+ --tw-space-x-reverse: 0;
1725
+ margin-right: calc(0px * var(--tw-space-x-reverse));
1726
+ margin-left: calc(0px * calc(1 - var(--tw-space-x-reverse)));
1727
+ }
1728
+
1729
+ .md\:space-x-2 > :not([hidden]) ~ :not([hidden]) {
1730
+ --tw-space-x-reverse: 0;
1731
+ margin-right: calc(0.5rem * var(--tw-space-x-reverse));
1732
+ margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));
1733
+ }
1734
+
1653
1735
  .md\:space-x-5 > :not([hidden]) ~ :not([hidden]) {
1654
1736
  --tw-space-x-reverse: 0;
1655
1737
  margin-right: calc(1.25rem * var(--tw-space-x-reverse));
@@ -1709,6 +1791,16 @@ video {
1709
1791
  padding-right: 1.5rem;
1710
1792
  }
1711
1793
 
1794
+ .md\:py-1 {
1795
+ padding-top: 0.25rem;
1796
+ padding-bottom: 0.25rem;
1797
+ }
1798
+
1799
+ .md\:py-1\.5 {
1800
+ padding-top: 0.375rem;
1801
+ padding-bottom: 0.375rem;
1802
+ }
1803
+
1712
1804
  .md\:py-2 {
1713
1805
  padding-top: 0.5rem;
1714
1806
  padding-bottom: 0.5rem;
@@ -1759,6 +1851,11 @@ video {
1759
1851
  line-height: 1.75rem;
1760
1852
  }
1761
1853
 
1854
+ .md\:text-xs {
1855
+ font-size: 0.75rem;
1856
+ line-height: 1rem;
1857
+ }
1858
+
1762
1859
  .md\:leading-6 {
1763
1860
  line-height: 1.5rem;
1764
1861
  }