@maptiler/geocoding-control 0.0.84 → 0.0.85

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.
@@ -389,14 +389,13 @@ function unwrapBbox(bbox0) {
389
389
  aria-label={placeholder}
390
390
  />
391
391
 
392
- <div class="clear-button-container">
392
+ <div class="clear-button-container" class:displayable={searchValue !== ""}>
393
393
  <button
394
394
  type="button"
395
395
  on:click={() => {
396
396
  searchValue = "";
397
397
  input.focus();
398
398
  }}
399
- class:displayable={searchValue !== ""}
400
399
  title={clearButtonTitle}
401
400
  >
402
401
  <ClearIcon />
@@ -464,229 +463,214 @@ function unwrapBbox(bbox0) {
464
463
  {/if}
465
464
  </form>
466
465
 
467
- <style>
468
- form,
469
- form *,
470
- form *:after,
471
- form *:before {
472
- box-sizing: border-box;
473
- }
474
-
475
- form {
476
- font-family: "Open Sans", "Ubuntu", "Helvetica Neue", Arial, Helvetica,
477
- sans-serif;
478
- position: relative;
479
- background-color: #fff;
480
- width: 100%;
481
- z-index: 10;
482
- border-radius: 4px;
483
- transition: max-width 0.25s;
484
- box-shadow: 0px 5px 10px rgba(51, 51, 89, 0.15);
485
- --color-text: #444952;
486
- --color-icon-button: #444952;
487
- }
488
-
489
- form.can-collapse {
490
- max-width: 35px;
491
- }
492
-
493
- form,
494
- form:focus-within,
495
- form:hover {
496
- max-width: 240px;
497
- }
498
-
499
- input {
500
- font: inherit;
501
- font-size: 14px;
502
- width: 100%;
503
- border: 0;
504
- background-color: transparent;
505
- margin: 0;
506
- height: 36px;
507
- color: #444952;
508
- white-space: nowrap;
509
- overflow: hidden;
510
- padding: 0;
511
- }
512
-
513
- input:focus {
514
- color: #444952;
515
- outline: 0;
516
- outline: none;
517
- box-shadow: none;
518
- }
519
-
520
- ul,
521
- div.error,
522
- div.no-results {
523
- background-color: #fff;
524
- border-radius: 4px;
525
- left: 0;
526
- list-style: none;
527
- margin: 0;
528
- padding: 0;
529
- position: absolute;
530
- width: 100%;
531
- top: calc(100% + 6px);
532
- font-size: 14px;
533
- box-shadow: 0px 2px 8px rgba(51, 51, 89, 0.15);
534
- line-height: 16px;
535
- overflow: hidden;
536
- }
537
-
538
- :global(.maplibregl-ctrl-bottom-left) ul,
539
- :global(.maplibregl-ctrl-bottom-right) ul {
540
- top: auto;
541
- bottom: 100%;
542
- }
543
-
544
- li {
545
- text-align: left;
546
- cursor: default;
547
- display: grid;
548
- grid-template-columns: 1fr;
549
- color: var(--color-text);
550
- padding: 8px 0px;
551
- font-size: 14px;
552
- line-height: 18px;
553
- }
554
-
555
- li:first-child {
556
- padding-top: 10px;
557
- }
558
-
559
- li:last-child {
560
- padding-bottom: 10px;
561
- }
466
+ <style>form {
467
+ font-family: "Open Sans", "Ubuntu", "Helvetica Neue", Arial, Helvetica, sans-serif;
468
+ position: relative;
469
+ background-color: #fff;
470
+ z-index: 10;
471
+ border-radius: 4px;
472
+ transition: max-width 0.25s;
473
+ /* box-shadow: 0px 5px 10px rgba(51, 51, 89, 0.15); */
474
+ --color-text: #444952;
475
+ --color-icon-button: #444952;
476
+ }
477
+ form, form *, form *:after, form *:before {
478
+ box-sizing: border-box;
479
+ }
480
+ form.can-collapse {
481
+ max-width: 30px;
482
+ }
483
+ form.can-collapse .input-group {
484
+ padding-inline: 5px;
485
+ transition: padding-inline 0.25s;
486
+ }
487
+ form.can-collapse:focus-within .input-group, form.can-collapse:hover .input-group {
488
+ padding-inline: 8px;
489
+ }
490
+ form, form:focus-within, form:hover {
491
+ width: 240px;
492
+ max-width: 240px;
493
+ }
562
494
 
563
- .texts {
564
- padding: 0 17px;
565
- }
495
+ input {
496
+ font: inherit;
497
+ font-size: 14px;
498
+ width: 100%;
499
+ border: 0;
500
+ background-color: transparent;
501
+ margin: 0;
502
+ color: #444952;
503
+ white-space: nowrap;
504
+ overflow: hidden;
505
+ padding: 0;
506
+ }
507
+ input:focus {
508
+ color: #444952;
509
+ outline: 0;
510
+ outline: none;
511
+ box-shadow: none;
512
+ }
566
513
 
567
- .texts > * {
568
- white-space: nowrap;
569
- display: block;
570
- min-width: fit-content;
571
- }
514
+ ul,
515
+ div.error,
516
+ div.no-results {
517
+ background-color: #fff;
518
+ border-radius: 4px;
519
+ left: 0;
520
+ list-style: none;
521
+ margin: 0;
522
+ padding: 0;
523
+ position: absolute;
524
+ width: 100%;
525
+ top: calc(100% + 6px);
526
+ font-size: 14px;
527
+ box-shadow: 0px 2px 8px rgba(51, 51, 89, 0.15);
528
+ line-height: 16px;
529
+ overflow: hidden;
530
+ }
572
531
 
573
- li.selected .texts > * {
574
- animation: backAndForth 5s linear infinite;
575
- }
532
+ :global(.maplibregl-ctrl-bottom-left) ul,
533
+ :global(.maplibregl-ctrl-bottom-right) ul {
534
+ top: auto;
535
+ bottom: 100%;
536
+ }
576
537
 
577
- .primary {
578
- font-weight: 600;
579
- }
538
+ li {
539
+ text-align: left;
540
+ cursor: default;
541
+ display: grid;
542
+ grid-template-columns: 1fr;
543
+ color: var(--color-text);
544
+ padding: 8px 0px;
545
+ font-size: 14px;
546
+ line-height: 18px;
547
+ }
548
+ li:first-child {
549
+ padding-top: 10px;
550
+ }
551
+ li:last-child {
552
+ padding-bottom: 10px;
553
+ }
554
+ li.selected {
555
+ background-color: #f3f6ff;
556
+ }
557
+ li.selected .texts > * {
558
+ animation: backAndForth 5s linear infinite;
559
+ }
560
+ li.selected .primary {
561
+ color: #2b8bfb;
562
+ }
580
563
 
581
- li.selected .primary {
582
- color: #2b8bfb;
583
- }
564
+ .texts {
565
+ padding: 0 17px;
566
+ }
567
+ .texts > * {
568
+ white-space: nowrap;
569
+ display: block;
570
+ min-width: fit-content;
571
+ }
584
572
 
585
- .secondary {
586
- color: #aeb6c7;
587
- padding-left: 4px;
588
- }
573
+ .primary {
574
+ font-weight: 600;
575
+ }
589
576
 
590
- .line2 {
591
- color: #aeb6c7;
592
- }
577
+ .secondary {
578
+ color: #aeb6c7;
579
+ padding-left: 4px;
580
+ }
593
581
 
594
- li.selected {
595
- background-color: #f3f6ff;
596
- }
582
+ .line2 {
583
+ color: #aeb6c7;
584
+ }
597
585
 
598
- button:hover {
599
- background-color: transparent;
600
- }
586
+ button {
587
+ padding: 0;
588
+ margin: 0;
589
+ border: 0;
590
+ background-color: transparent;
591
+ width: auto;
592
+ }
593
+ button:hover {
594
+ background-color: transparent;
595
+ }
601
596
 
602
- button:hover :global(svg),
603
- button.active :global(svg) {
604
- fill: #6b7c92;
605
- }
597
+ button:hover :global(svg),
598
+ button.active :global(svg) {
599
+ fill: #3588d4;
600
+ }
606
601
 
607
- button {
608
- padding: 0;
609
- margin: 0;
610
- border: 0;
611
- background-color: transparent;
612
- }
602
+ .input-group {
603
+ display: flex;
604
+ align-items: stretch;
605
+ gap: 7px;
606
+ padding-inline: 8px;
607
+ border-radius: 4px;
608
+ overflow: hidden;
609
+ }
610
+ .input-group:focus-within {
611
+ outline: #2b8bfb solid 2px;
612
+ }
613
613
 
614
- .input-group {
615
- display: flex;
616
- align-items: stretch;
617
- gap: 7px;
618
- padding-inline: 8px;
619
- outline: #c1cfe4 solid 1.5px;
620
- border-radius: 4px;
621
- overflow: hidden;
622
- }
614
+ .clear-button-container.displayable {
615
+ display: flex;
616
+ }
623
617
 
624
- .input-group:hover .displayable {
625
- visibility: visible;
626
- }
618
+ div.error,
619
+ div.no-results {
620
+ font: inherit;
621
+ font-size: 14px;
622
+ padding: 6px 10px;
623
+ }
627
624
 
628
- .input-group:focus-within {
629
- outline: #2b8bfb solid 1.5px;
630
- }
625
+ div.error {
626
+ color: #e25041;
627
+ }
631
628
 
632
- div.error,
633
- div.no-results {
634
- font: inherit;
635
- font-size: 14px;
636
- padding: 6px 10px;
637
- }
629
+ div.no-results {
630
+ color: var(--color-text);
631
+ }
638
632
 
639
- div.error {
640
- color: #e25041;
641
- }
633
+ .clear-button-container {
634
+ display: none;
635
+ position: relative;
636
+ align-items: stretch;
637
+ }
642
638
 
643
- div.no-results {
644
- color: var(--color-text);
639
+ @keyframes backAndForth {
640
+ 0% {
641
+ transform: translateX(0);
645
642
  }
646
-
647
- .clear-button-container {
648
- position: relative;
649
- display: flex;
650
- align-items: stretch;
643
+ 10% {
644
+ transform: translateX(0);
651
645
  }
652
-
653
- .clear-button-container button {
654
- visibility: hidden;
646
+ 45% {
647
+ transform: translateX(calc(-100% + 206px));
655
648
  }
656
-
657
- @keyframes backAndForth {
658
- 0% {
659
- transform: translateX(0);
660
- }
661
- 10% {
662
- transform: translateX(0);
663
- }
664
- 45% {
665
- transform: translateX(calc(-100% + 206px));
666
- }
667
- 55% {
668
- transform: translateX(calc(-100% + 206px));
669
- }
670
- 90% {
671
- transform: translateX(0);
672
- }
673
- 100% {
674
- transform: translateX(0);
675
- }
649
+ 55% {
650
+ transform: translateX(calc(-100% + 206px));
676
651
  }
677
-
678
- form.can-collapse button:not(:nth-of-type(1)) {
679
- opacity: 0;
680
- transition: opacity 0.25s;
652
+ 90% {
653
+ transform: translateX(0);
681
654
  }
682
-
683
- form.can-collapse:focus-within :not(:nth-of-type(1)),
684
- form.can-collapse:hover :not(:nth-of-type(1)) {
685
- opacity: 1;
655
+ 100% {
656
+ transform: translateX(0);
686
657
  }
658
+ }
659
+ :global(.maplibregl-ctrl-geocoder) {
660
+ position: relative;
661
+ z-index: 3;
662
+ }
687
663
 
688
- :global(.maplibregl-ctrl-geocoder) {
689
- position: relative;
690
- z-index: 3;
691
- }
692
- </style>
664
+ :global(.maptiler-ctrl) .input-group:focus-within {
665
+ outline: #2b8bfb solid 1.5px;
666
+ }
667
+ :global(.maptiler-ctrl) form.can-collapse {
668
+ max-width: 34px;
669
+ }
670
+ :global(.maptiler-ctrl) form.can-collapse .input-group {
671
+ padding-inline: 7px;
672
+ }
673
+ :global(.maptiler-ctrl) form, :global(.maptiler-ctrl) form:focus-within, :global(.maptiler-ctrl) form:hover {
674
+ width: 240px;
675
+ max-width: 240px;
676
+ }</style>
package/leaflet.js CHANGED
@@ -420,7 +420,7 @@ function ua(r) {
420
420
  "title",
421
421
  /*reverseButtonTitle*/
422
422
  r[9]
423
- ), B(t, "class", "svelte-gpexd2"), en(
423
+ ), B(t, "class", "svelte-1qszo8o"), en(
424
424
  t,
425
425
  "active",
426
426
  /*reverseActive*/
@@ -473,7 +473,7 @@ function Rl(r) {
473
473
  t = oe("ul");
474
474
  for (let s = 0; s < o.length; s += 1)
475
475
  o[s].c();
476
- B(t, "class", "svelte-gpexd2");
476
+ B(t, "class", "svelte-1qszo8o");
477
477
  },
478
478
  m(s, a) {
479
479
  We(s, t, a);
@@ -521,7 +521,7 @@ function Ol(r) {
521
521
  t = oe("div"), e = Ur(
522
522
  /*noResultsMessage*/
523
523
  r[7]
524
- ), B(t, "class", "no-results svelte-gpexd2");
524
+ ), B(t, "class", "no-results svelte-1qszo8o");
525
525
  },
526
526
  m(n, i) {
527
527
  We(n, t, i), ct(t, e);
@@ -561,7 +561,7 @@ function Tl(r) {
561
561
  t = oe("div"), e = Ur(
562
562
  /*errorMessage*/
563
563
  r[6]
564
- ), B(t, "class", "error svelte-gpexd2");
564
+ ), B(t, "class", "error svelte-1qszo8o");
565
565
  },
566
566
  m(n, i) {
567
567
  We(n, t, i), ct(t, e);
@@ -588,7 +588,7 @@ function la(r) {
588
588
  ), n;
589
589
  return {
590
590
  c() {
591
- t = oe("span"), n = Ur(e), B(t, "class", "line2 svelte-gpexd2");
591
+ t = oe("span"), n = Ur(e), B(t, "class", "line2 svelte-1qszo8o");
592
592
  },
593
593
  m(s, a) {
594
594
  We(s, t, a), ct(t, n);
@@ -636,9 +636,9 @@ function ca(r) {
636
636
  }
637
637
  return {
638
638
  c() {
639
- t = oe("li"), e = oe("span"), n = oe("span"), i = oe("span"), s = Ur(o), a = er(), u = oe("span"), c = Ur(l), f = er(), d && d.c(), h = er(), B(i, "class", "primary svelte-gpexd2"), B(u, "class", "secondary svelte-gpexd2"), B(n, "class", "line1 svelte-gpexd2"), B(e, "class", "texts svelte-gpexd2"), B(t, "tabindex", "0"), B(t, "data-selected", g = /*selectedItemIndex*/
639
+ t = oe("li"), e = oe("span"), n = oe("span"), i = oe("span"), s = Ur(o), a = er(), u = oe("span"), c = Ur(l), f = er(), d && d.c(), h = er(), B(i, "class", "primary svelte-1qszo8o"), B(u, "class", "secondary svelte-1qszo8o"), B(n, "class", "line1 svelte-1qszo8o"), B(e, "class", "texts svelte-1qszo8o"), B(t, "tabindex", "0"), B(t, "data-selected", g = /*selectedItemIndex*/
640
640
  r[13] === /*i*/
641
- r[71]), B(t, "class", "svelte-gpexd2"), en(
641
+ r[71]), B(t, "class", "svelte-1qszo8o"), en(
642
642
  t,
643
643
  "selected",
644
644
  /*selectedItemIndex*/
@@ -720,7 +720,7 @@ function Ml(r) {
720
720
  let F = A(r), D = F && F(r);
721
721
  return {
722
722
  c() {
723
- t = oe("form"), e = oe("div"), n = oe("button"), Do(i.$$.fragment), o = er(), s = oe("input"), a = er(), u = oe("div"), l = oe("button"), Do(c.$$.fragment), f = er(), E && E.c(), h = er(), N && N.c(), g = er(), b && b.c(), p = er(), D && D.c(), B(n, "type", "button"), B(n, "class", "svelte-gpexd2"), B(
723
+ t = oe("form"), e = oe("div"), n = oe("button"), Do(i.$$.fragment), o = er(), s = oe("input"), a = er(), u = oe("div"), l = oe("button"), Do(c.$$.fragment), f = er(), E && E.c(), h = er(), N && N.c(), g = er(), b && b.c(), p = er(), D && D.c(), B(n, "type", "button"), B(n, "class", "svelte-1qszo8o"), B(
724
724
  s,
725
725
  "placeholder",
726
726
  /*placeholder*/
@@ -730,20 +730,20 @@ function Ml(r) {
730
730
  "aria-label",
731
731
  /*placeholder*/
732
732
  r[8]
733
- ), B(s, "class", "svelte-gpexd2"), B(l, "type", "button"), B(
733
+ ), B(s, "class", "svelte-1qszo8o"), B(l, "type", "button"), B(
734
734
  l,
735
735
  "title",
736
736
  /*clearButtonTitle*/
737
737
  r[3]
738
- ), B(l, "class", "svelte-gpexd2"), en(
739
- l,
738
+ ), B(l, "class", "svelte-1qszo8o"), B(u, "class", "clear-button-container svelte-1qszo8o"), en(
739
+ u,
740
740
  "displayable",
741
741
  /*searchValue*/
742
742
  r[1] !== ""
743
- ), B(u, "class", "clear-button-container svelte-gpexd2"), B(e, "class", "input-group svelte-gpexd2"), B(t, "tabindex", "0"), B(t, "class", _ = ea(
743
+ ), B(e, "class", "input-group svelte-1qszo8o"), B(t, "tabindex", "0"), B(t, "class", _ = ea(
744
744
  /*className*/
745
745
  r[2]
746
- ) + " svelte-gpexd2"), en(
746
+ ) + " svelte-1qszo8o"), en(
747
747
  t,
748
748
  "can-collapse",
749
749
  /*collapsed*/
@@ -830,17 +830,17 @@ function Ml(r) {
830
830
  "title",
831
831
  /*clearButtonTitle*/
832
832
  R[3]
833
- ), (!d || z[0] & /*searchValue*/
834
- 2) && en(
835
- l,
836
- "displayable",
837
- /*searchValue*/
838
- R[1] !== ""
839
833
  ), /*abortController*/
840
834
  R[17] ? E ? z[0] & /*abortController*/
841
835
  131072 && Je(E, 1) : (E = aa(), E.c(), Je(E, 1), E.m(u, null)) : E && (ia(), $n(E, 1, 1, () => {
842
836
  E = null;
843
- }), oa()), /*enableReverse*/
837
+ }), oa()), (!d || z[0] & /*searchValue*/
838
+ 2) && en(
839
+ u,
840
+ "displayable",
841
+ /*searchValue*/
842
+ R[1] !== ""
843
+ ), /*enableReverse*/
844
844
  R[5] === !0 ? N ? (N.p(R, z), z[0] & /*enableReverse*/
845
845
  32 && Je(N, 1)) : (N = ua(R), N.c(), Je(N, 1), N.m(e, g)) : N && (ia(), $n(N, 1, 1, () => {
846
846
  N = null;
@@ -866,7 +866,7 @@ function Ml(r) {
866
866
  4 && _ !== (_ = ea(
867
867
  /*className*/
868
868
  R[2]
869
- ) + " svelte-gpexd2")) && B(t, "class", _), (!d || z[0] & /*className, collapsed, searchValue*/
869
+ ) + " svelte-1qszo8o")) && B(t, "class", _), (!d || z[0] & /*className, collapsed, searchValue*/
870
870
  22) && en(
871
871
  t,
872
872
  "can-collapse",