@kompasid/lit-web-components 0.9.49 → 0.9.51

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.
@@ -27,15 +27,12 @@ export class KompasPaywallModalRegister extends LitElement {
27
27
  height: 100%;
28
28
  background-color: rgba(0, 0, 0, 0.5);
29
29
  display: flex;
30
- justify-content: center;
31
- align-items: center;
32
30
  z-index: 1000;
33
31
  }
34
32
 
35
33
  .modal-content {
36
34
  background-color: #222222;
37
35
  border-radius: 12px;
38
- overflow: hidden;
39
36
  position: relative;
40
37
  }
41
38
 
@@ -254,7 +251,8 @@ export class KompasPaywallModalRegister extends LitElement {
254
251
  private redirectToHelpdesk(): void {
255
252
  this.sendDataLayeronHelpDesk()
256
253
  window.open(
257
- 'https://api.whatsapp.com/send/?phone=6281290050800&text=Halo,%20saya%20perlu%20informasi%20mengenai%20kompas.id'
254
+ this.dataModalRegister.modal.registerPopUp.hotline.url ||
255
+ 'https://api.whatsapp.com/send/?phone=6281290050800&text=Halo,%20saya%20perlu%20informasi%20mengenai%20kompas.id'
258
256
  )
259
257
  }
260
258
 
@@ -292,7 +290,7 @@ export class KompasPaywallModalRegister extends LitElement {
292
290
  name="nameUser"
293
291
  type="text"
294
292
  placeholder=""
295
- class="p-2 bg-grey-500 rounded border border-grey-400"
293
+ class="p-2 bg-grey-600 rounded border border-grey-500"
296
294
  .value="${this.formData.nameUser}"
297
295
  @input="${this.handleInput}"
298
296
  @blur="${this.handleBlur}"
@@ -325,7 +323,7 @@ export class KompasPaywallModalRegister extends LitElement {
325
323
  name="email"
326
324
  type="email"
327
325
  placeholder=""
328
- class="p-2 bg-grey-500 rounded border border-grey-400"
326
+ class="p-2 bg-grey-600 rounded border border-grey-500"
329
327
  .value="${this.formData.email}"
330
328
  @input="${this.handleInput}"
331
329
  @blur="${this.handleBlur}"
@@ -358,7 +356,7 @@ export class KompasPaywallModalRegister extends LitElement {
358
356
  name="nomor"
359
357
  type="tel"
360
358
  placeholder=""
361
- class="p-2 bg-grey-500 rounded border border-grey-400"
359
+ class="p-2 bg-grey-600 rounded border border-grey-500"
362
360
  .value="${this.formData.nomor}"
363
361
  @input="${this.handleInput}"
364
362
  @blur="${this.handleBlur}"
@@ -390,7 +388,7 @@ export class KompasPaywallModalRegister extends LitElement {
390
388
  name="nameCompany"
391
389
  type="text"
392
390
  placeholder=""
393
- class="p-2 bg-grey-500 rounded border border-grey-400"
391
+ class="p-2 bg-grey-600 rounded border border-grey-500"
394
392
  .value="${this.formData.nameCompany}"
395
393
  @input="${this.handleInput}"
396
394
  @blur="${this.handleBlur}"
@@ -426,7 +424,7 @@ export class KompasPaywallModalRegister extends LitElement {
426
424
  render() {
427
425
  return this.showModalRegister
428
426
  ? html`<div
429
- class="px-4 font-sans flex flex-wrap items-center justify-between rounded-lg md:mx-0 w-full min-h-[68px] bg-white relative"
427
+ class="p-4 gap-2 font-sans flex flex-wrap items-center justify-between rounded-lg md:mx-0 w-full min-h-[68px] bg-white relative"
430
428
  >
431
429
  <div class="flex flex-col gap-1">
432
430
  <span class="text-xs leading-tight text-grey-500">
@@ -444,7 +442,7 @@ export class KompasPaywallModalRegister extends LitElement {
444
442
  ? 'bg-green-500 text-white'
445
443
  : 'bg-white border border-green-500 text-green-500'} flex items-center"
446
444
  >
447
- <h6 class="text-xs md:text-sm font-bold py-2 px-4">
445
+ <h6 class="text-sm font-bold py-2 px-4">
448
446
  ${this.dataModalRegister.card.textButton}
449
447
  </h6>
450
448
  </button>
@@ -458,14 +456,14 @@ export class KompasPaywallModalRegister extends LitElement {
458
456
  @keydown=${() => this.closeModal()}
459
457
  >
460
458
  <div
461
- class="modal-content max-w-7xl w-full flex flex-col lg:flex-row max-h-full overflow-auto"
459
+ class="modal-content max-w-7xl w-full flex flex-col lg:flex-row max-h-full overflow-auto lg:overflow-hidden"
462
460
  @click="${(e: { stopPropagation: () => any }) =>
463
461
  e.stopPropagation()}"
464
462
  @keydown=${(e: { stopPropagation: () => any }) =>
465
463
  e.stopPropagation()}
466
464
  >
467
465
  <button class="close-button" @click="${this.closeModal}">
468
- ${unsafeSVG(getFontAwesomeIcon('fa', 'times', 20, 20))}
466
+ ${unsafeSVG(getFontAwesomeIcon('fa', 'times', 32, 32))}
469
467
  </button>
470
468
  <div
471
469
  class="bg-grey-600 lg:max-w-[515px] w-full p-4 md:p-16 justify-between items-center flex flex-col relative"
@@ -485,7 +483,7 @@ export class KompasPaywallModalRegister extends LitElement {
485
483
  class="flex flex-col mt-6 md:mt-10 gap-2 text-left overflow-hidden ${this
486
484
  .showMobileBenefit
487
485
  ? 'max-h-fit'
488
- : 'max-h-[150px] md:max-h-fit'}"
486
+ : 'max-h-[150px] lg:max-h-fit'}"
489
487
  >
490
488
  ${this.dataModalRegister.modal.registerPopUp
491
489
  .benefits &&
@@ -522,7 +520,7 @@ export class KompasPaywallModalRegister extends LitElement {
522
520
  </div>
523
521
  <button
524
522
  @click="${this.toggleMobileBenefit}"
525
- class="bg-grey-600 absolute text-grey-100 py-6 w-full bottom-0 left-0 text-center md:hidden"
523
+ class="bg-grey-600 absolute text-grey-100 py-6 w-full bottom-0 left-0 text-center lg:hidden"
526
524
  >
527
525
  <div
528
526
  class="h-12 transparent-linear-dark -mt-[72px] z-0 w-full absolute ${this
@@ -547,18 +545,33 @@ export class KompasPaywallModalRegister extends LitElement {
547
545
  </div>
548
546
  </button>
549
547
  <div
550
- class="hidden md:block text-grey-300 pt-10 border-t border-grey-500 w-full text-center"
548
+ class="hidden lg:block text-grey-300 pt-10 border-t border-grey-500 w-full text-center"
551
549
  >
552
550
  Butuh bantuan? Hubungi
553
551
  <button
554
552
  @click=${this.customerServiceClicked}
555
- class="font-bold underline"
553
+ class="font-bold underline text-white"
556
554
  >
557
- Layanan Pelanggan.
555
+ ${this.dataModalRegister.modal.registerPopUp.hotline
556
+ .text}
557
+ </button>
558
+ </div>
559
+ </div>
560
+ <div class="w-full h-full lg:overflow-auto">
561
+ ${this.templateForm()}
562
+ <div
563
+ class="block lg:hidden text-grey-300 py-5 bg-grey-600 w-full text-center text-xs"
564
+ >
565
+ Butuh bantuan? Hubungi
566
+ <button
567
+ @click=${this.customerServiceClicked}
568
+ class="font-bold underline text-white"
569
+ >
570
+ ${this.dataModalRegister.modal.registerPopUp.hotline
571
+ .text}
558
572
  </button>
559
573
  </div>
560
574
  </div>
561
- <div class="w-full h-full">${this.templateForm()}</div>
562
575
  </div>
563
576
  </div>
564
577
  `
@@ -75,7 +75,7 @@ export class KompasWidgetRecirculationsDefault extends LitElement {
75
75
  }
76
76
 
77
77
  async relatedArticles() {
78
- const kompasApiAi = 'https://ai.kompas.id/api/v1'
78
+ const kompasApiAi = 'https://api.kompas.id/icm/api/v1'
79
79
 
80
80
  // Constructing parameters
81
81
  const params = new URLSearchParams()
@@ -86,7 +86,7 @@ export class KompasWidgetRecirculationsDefault extends LitElement {
86
86
  params.append('slugs', this.slugs)
87
87
 
88
88
  // Constructing the URL with parameters
89
- const endpoint = `${kompasApiAi}/recommendation?${params.toString()}`
89
+ const endpoint = `${kompasApiAi}/recommendations?${params.toString()}`
90
90
 
91
91
  const response = await fetch(endpoint, {
92
92
  headers: {
@@ -997,6 +997,19 @@ video {
997
997
  max-height: 100%;
998
998
  }
999
999
 
1000
+ .max-h-screen {
1001
+ max-height: 100vh;
1002
+ }
1003
+
1004
+ .max-h-\[90vh\] {
1005
+ max-height: 90vh;
1006
+ }
1007
+
1008
+ .max-h-max {
1009
+ max-height: -moz-max-content;
1010
+ max-height: max-content;
1011
+ }
1012
+
1000
1013
  .min-h-\[68px\] {
1001
1014
  min-height: 68px;
1002
1015
  }
@@ -2435,11 +2448,6 @@ video {
2435
2448
  max-height: 220px;
2436
2449
  }
2437
2450
 
2438
- .md\:max-h-fit {
2439
- max-height: -moz-fit-content;
2440
- max-height: fit-content;
2441
- }
2442
-
2443
2451
  .md\:min-h-\[244px\] {
2444
2452
  min-height: 244px;
2445
2453
  }
@@ -2821,6 +2829,11 @@ video {
2821
2829
  height: 2rem;
2822
2830
  }
2823
2831
 
2832
+ .lg\:max-h-fit {
2833
+ max-height: -moz-fit-content;
2834
+ max-height: fit-content;
2835
+ }
2836
+
2824
2837
  .lg\:max-h-none {
2825
2838
  max-height: none;
2826
2839
  }
@@ -2906,6 +2919,14 @@ video {
2906
2919
  column-gap: 1.5rem;
2907
2920
  }
2908
2921
 
2922
+ .lg\:overflow-auto {
2923
+ overflow: auto;
2924
+ }
2925
+
2926
+ .lg\:overflow-hidden {
2927
+ overflow: hidden;
2928
+ }
2929
+
2909
2930
  .lg\:px-0 {
2910
2931
  padding-left: 0px;
2911
2932
  padding-right: 0px;
@@ -1004,6 +1004,19 @@ Constrain images and videos to the parent width and preserve their intrinsic asp
1004
1004
  max-height: 100%;
1005
1005
  }
1006
1006
 
1007
+ .max-h-screen {
1008
+ max-height: 100vh;
1009
+ }
1010
+
1011
+ .max-h-\\[90vh\\] {
1012
+ max-height: 90vh;
1013
+ }
1014
+
1015
+ .max-h-max {
1016
+ max-height: -moz-max-content;
1017
+ max-height: max-content;
1018
+ }
1019
+
1007
1020
  .min-h-\\[68px\\] {
1008
1021
  min-height: 68px;
1009
1022
  }
@@ -2458,11 +2471,6 @@ Constrain images and videos to the parent width and preserve their intrinsic asp
2458
2471
  max-height: 220px;
2459
2472
  }
2460
2473
 
2461
- .md\\:max-h-fit {
2462
- max-height: -moz-fit-content;
2463
- max-height: fit-content;
2464
- }
2465
-
2466
2474
  .md\\:min-h-\\[244px\\] {
2467
2475
  min-height: 244px;
2468
2476
  }
@@ -2844,6 +2852,11 @@ Constrain images and videos to the parent width and preserve their intrinsic asp
2844
2852
  height: 2rem;
2845
2853
  }
2846
2854
 
2855
+ .lg\\:max-h-fit {
2856
+ max-height: -moz-fit-content;
2857
+ max-height: fit-content;
2858
+ }
2859
+
2847
2860
  .lg\\:max-h-none {
2848
2861
  max-height: none;
2849
2862
  }
@@ -2929,6 +2942,14 @@ Constrain images and videos to the parent width and preserve their intrinsic asp
2929
2942
  column-gap: 1.5rem;
2930
2943
  }
2931
2944
 
2945
+ .lg\\:overflow-auto {
2946
+ overflow: auto;
2947
+ }
2948
+
2949
+ .lg\\:overflow-hidden {
2950
+ overflow: hidden;
2951
+ }
2952
+
2932
2953
  .lg\\:px-0 {
2933
2954
  padding-left: 0px;
2934
2955
  padding-right: 0px;