@iroco/ui 0.9.2 → 0.9.3

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/lib/index.js CHANGED
@@ -175,6 +175,37 @@
175
175
  e.initCustomEvent(type, false, false, detail);
176
176
  return e;
177
177
  }
178
+ class HtmlTag {
179
+ constructor(anchor = null) {
180
+ this.a = anchor;
181
+ this.e = this.n = null;
182
+ }
183
+ m(html, target, anchor = null) {
184
+ if (!this.e) {
185
+ this.e = element(target.nodeName);
186
+ this.t = target;
187
+ this.h(html);
188
+ }
189
+ this.i(anchor);
190
+ }
191
+ h(html) {
192
+ this.e.innerHTML = html;
193
+ this.n = Array.from(this.e.childNodes);
194
+ }
195
+ i(anchor) {
196
+ for (let i = 0; i < this.n.length; i += 1) {
197
+ insert(this.t, this.n[i], anchor);
198
+ }
199
+ }
200
+ p(html) {
201
+ this.d();
202
+ this.h(html);
203
+ this.i(this.a);
204
+ }
205
+ d() {
206
+ this.n.forEach(detach);
207
+ }
208
+ }
178
209
 
179
210
  let current_component;
180
211
  function set_current_component(component) {
@@ -478,19 +509,19 @@
478
509
  let current;
479
510
  let mounted;
480
511
  let dispose;
481
- const default_slot_template = /*#slots*/ ctx[7].default;
482
- const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[6], null);
512
+ const default_slot_template = /*#slots*/ ctx[8].default;
513
+ const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[7], null);
483
514
 
484
515
  return {
485
516
  c() {
486
517
  button = element("button");
487
518
  if (default_slot) default_slot.c();
488
- attr(button, "id", /*id*/ ctx[5]);
489
- attr(button, "class", button_class_value = "" + (null_to_empty(`iroco-ui-button iroco-ui-button--${/*size*/ ctx[3]} iroco-ui-button--${/*kind*/ ctx[2]}`) + " svelte-hp8sdi"));
490
- attr(button, "type", /*type*/ ctx[0]);
491
- button.disabled = /*disabled*/ ctx[1];
492
- toggle_class(button, "disabled", /*disabled*/ ctx[1]);
493
- toggle_class(button, "rounded", /*rounded*/ ctx[4]);
519
+ attr(button, "id", /*id*/ ctx[6]);
520
+ attr(button, "class", button_class_value = "" + (null_to_empty(`iroco-ui-button iroco-ui-button--${/*size*/ ctx[4]} iroco-ui-button--${/*kind*/ ctx[3]}`) + " svelte-ahn9t2"));
521
+ attr(button, "type", /*type*/ ctx[1]);
522
+ button.disabled = /*disabled*/ ctx[2];
523
+ toggle_class(button, "disabled", /*disabled*/ ctx[2]);
524
+ toggle_class(button, "rounded", /*rounded*/ ctx[5]);
494
525
  },
495
526
  m(target, anchor) {
496
527
  insert(target, button, anchor);
@@ -499,42 +530,43 @@
499
530
  default_slot.m(button, null);
500
531
  }
501
532
 
533
+ /*button_binding*/ ctx[10](button);
502
534
  current = true;
503
535
 
504
536
  if (!mounted) {
505
- dispose = listen(button, "click", /*click_handler*/ ctx[8]);
537
+ dispose = listen(button, "click", /*click_handler*/ ctx[9]);
506
538
  mounted = true;
507
539
  }
508
540
  },
509
541
  p(ctx, [dirty]) {
510
542
  if (default_slot) {
511
- if (default_slot.p && (!current || dirty & /*$$scope*/ 64)) {
512
- update_slot(default_slot, default_slot_template, ctx, /*$$scope*/ ctx[6], dirty, null, null);
543
+ if (default_slot.p && (!current || dirty & /*$$scope*/ 128)) {
544
+ update_slot(default_slot, default_slot_template, ctx, /*$$scope*/ ctx[7], dirty, null, null);
513
545
  }
514
546
  }
515
547
 
516
- if (!current || dirty & /*id*/ 32) {
517
- attr(button, "id", /*id*/ ctx[5]);
548
+ if (!current || dirty & /*id*/ 64) {
549
+ attr(button, "id", /*id*/ ctx[6]);
518
550
  }
519
551
 
520
- if (!current || dirty & /*size, kind*/ 12 && button_class_value !== (button_class_value = "" + (null_to_empty(`iroco-ui-button iroco-ui-button--${/*size*/ ctx[3]} iroco-ui-button--${/*kind*/ ctx[2]}`) + " svelte-hp8sdi"))) {
552
+ if (!current || dirty & /*size, kind*/ 24 && button_class_value !== (button_class_value = "" + (null_to_empty(`iroco-ui-button iroco-ui-button--${/*size*/ ctx[4]} iroco-ui-button--${/*kind*/ ctx[3]}`) + " svelte-ahn9t2"))) {
521
553
  attr(button, "class", button_class_value);
522
554
  }
523
555
 
524
- if (!current || dirty & /*type*/ 1) {
525
- attr(button, "type", /*type*/ ctx[0]);
556
+ if (!current || dirty & /*type*/ 2) {
557
+ attr(button, "type", /*type*/ ctx[1]);
526
558
  }
527
559
 
528
- if (!current || dirty & /*disabled*/ 2) {
529
- button.disabled = /*disabled*/ ctx[1];
560
+ if (!current || dirty & /*disabled*/ 4) {
561
+ button.disabled = /*disabled*/ ctx[2];
530
562
  }
531
563
 
532
- if (dirty & /*size, kind, disabled*/ 14) {
533
- toggle_class(button, "disabled", /*disabled*/ ctx[1]);
564
+ if (dirty & /*size, kind, disabled*/ 28) {
565
+ toggle_class(button, "disabled", /*disabled*/ ctx[2]);
534
566
  }
535
567
 
536
- if (dirty & /*size, kind, rounded*/ 28) {
537
- toggle_class(button, "rounded", /*rounded*/ ctx[4]);
568
+ if (dirty & /*size, kind, rounded*/ 56) {
569
+ toggle_class(button, "rounded", /*rounded*/ ctx[5]);
538
570
  }
539
571
  },
540
572
  i(local) {
@@ -549,6 +581,7 @@
549
581
  d(detaching) {
550
582
  if (detaching) detach(button);
551
583
  if (default_slot) default_slot.d(detaching);
584
+ /*button_binding*/ ctx[10](null);
552
585
  mounted = false;
553
586
  dispose();
554
587
  }
@@ -563,22 +596,43 @@
563
596
  let { size = "regular" } = $$props;
564
597
  let { rounded = false } = $$props;
565
598
  let { id } = $$props;
599
+ let { node } = $$props;
566
600
 
567
601
  function click_handler(event) {
568
602
  bubble($$self, event);
569
603
  }
570
604
 
605
+ function button_binding($$value) {
606
+ binding_callbacks[$$value ? "unshift" : "push"](() => {
607
+ node = $$value;
608
+ $$invalidate(0, node);
609
+ });
610
+ }
611
+
571
612
  $$self.$$set = $$props => {
572
- if ("type" in $$props) $$invalidate(0, type = $$props.type);
573
- if ("disabled" in $$props) $$invalidate(1, disabled = $$props.disabled);
574
- if ("kind" in $$props) $$invalidate(2, kind = $$props.kind);
575
- if ("size" in $$props) $$invalidate(3, size = $$props.size);
576
- if ("rounded" in $$props) $$invalidate(4, rounded = $$props.rounded);
577
- if ("id" in $$props) $$invalidate(5, id = $$props.id);
578
- if ("$$scope" in $$props) $$invalidate(6, $$scope = $$props.$$scope);
613
+ if ("type" in $$props) $$invalidate(1, type = $$props.type);
614
+ if ("disabled" in $$props) $$invalidate(2, disabled = $$props.disabled);
615
+ if ("kind" in $$props) $$invalidate(3, kind = $$props.kind);
616
+ if ("size" in $$props) $$invalidate(4, size = $$props.size);
617
+ if ("rounded" in $$props) $$invalidate(5, rounded = $$props.rounded);
618
+ if ("id" in $$props) $$invalidate(6, id = $$props.id);
619
+ if ("node" in $$props) $$invalidate(0, node = $$props.node);
620
+ if ("$$scope" in $$props) $$invalidate(7, $$scope = $$props.$$scope);
579
621
  };
580
622
 
581
- return [type, disabled, kind, size, rounded, id, $$scope, slots, click_handler];
623
+ return [
624
+ node,
625
+ type,
626
+ disabled,
627
+ kind,
628
+ size,
629
+ rounded,
630
+ id,
631
+ $$scope,
632
+ slots,
633
+ click_handler,
634
+ button_binding
635
+ ];
582
636
  }
583
637
 
584
638
  class Button extends SvelteComponent {
@@ -586,19 +640,20 @@
586
640
  super();
587
641
 
588
642
  init(this, options, instance$f, create_fragment$g, safe_not_equal, {
589
- type: 0,
590
- disabled: 1,
591
- kind: 2,
592
- size: 3,
593
- rounded: 4,
594
- id: 5
643
+ type: 1,
644
+ disabled: 2,
645
+ kind: 3,
646
+ size: 4,
647
+ rounded: 5,
648
+ id: 6,
649
+ node: 0
595
650
  });
596
651
  }
597
652
  }
598
653
 
599
654
  /* src/TextInput.svelte generated by Svelte v3.38.2 */
600
655
 
601
- function create_if_block_1$1(ctx) {
656
+ function create_if_block_2(ctx) {
602
657
  let label_1;
603
658
  let t;
604
659
 
@@ -626,28 +681,91 @@
626
681
  };
627
682
  }
628
683
 
629
- // (40:1) {#if error != null}
684
+ // (41:1) {#if error != null}
630
685
  function create_if_block$4(ctx) {
631
686
  let p;
632
- let t_value = (/*error*/ ctx[4] !== null ? /*error*/ ctx[4] : "") + "";
633
- let t;
687
+
688
+ function select_block_type(ctx, dirty) {
689
+ if (/*htmlError*/ ctx[5]) return create_if_block_1$1;
690
+ return create_else_block$1;
691
+ }
692
+
693
+ let current_block_type = select_block_type(ctx);
694
+ let if_block = current_block_type(ctx);
634
695
 
635
696
  return {
636
697
  c() {
637
698
  p = element("p");
638
- t = text(t_value);
699
+ if_block.c();
639
700
  attr(p, "data-testid", "error");
640
701
  attr(p, "class", "error svelte-11iawkb");
641
702
  },
642
703
  m(target, anchor) {
643
704
  insert(target, p, anchor);
644
- append(p, t);
705
+ if_block.m(p, null);
645
706
  },
646
707
  p(ctx, dirty) {
647
- if (dirty & /*error*/ 16 && t_value !== (t_value = (/*error*/ ctx[4] !== null ? /*error*/ ctx[4] : "") + "")) set_data(t, t_value);
708
+ if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) {
709
+ if_block.p(ctx, dirty);
710
+ } else {
711
+ if_block.d(1);
712
+ if_block = current_block_type(ctx);
713
+
714
+ if (if_block) {
715
+ if_block.c();
716
+ if_block.m(p, null);
717
+ }
718
+ }
648
719
  },
649
720
  d(detaching) {
650
721
  if (detaching) detach(p);
722
+ if_block.d();
723
+ }
724
+ };
725
+ }
726
+
727
+ // (45:3) {:else}
728
+ function create_else_block$1(ctx) {
729
+ let t_value = (/*error*/ ctx[4] !== null ? /*error*/ ctx[4] : "") + "";
730
+ let t;
731
+
732
+ return {
733
+ c() {
734
+ t = text(t_value);
735
+ },
736
+ m(target, anchor) {
737
+ insert(target, t, anchor);
738
+ },
739
+ p(ctx, dirty) {
740
+ if (dirty & /*error*/ 16 && t_value !== (t_value = (/*error*/ ctx[4] !== null ? /*error*/ ctx[4] : "") + "")) set_data(t, t_value);
741
+ },
742
+ d(detaching) {
743
+ if (detaching) detach(t);
744
+ }
745
+ };
746
+ }
747
+
748
+ // (43:3) {#if htmlError}
749
+ function create_if_block_1$1(ctx) {
750
+ let html_tag;
751
+ let raw_value = (/*error*/ ctx[4] !== null ? /*error*/ ctx[4] : "") + "";
752
+ let html_anchor;
753
+
754
+ return {
755
+ c() {
756
+ html_anchor = empty();
757
+ html_tag = new HtmlTag(html_anchor);
758
+ },
759
+ m(target, anchor) {
760
+ html_tag.m(raw_value, target, anchor);
761
+ insert(target, html_anchor, anchor);
762
+ },
763
+ p(ctx, dirty) {
764
+ if (dirty & /*error*/ 16 && raw_value !== (raw_value = (/*error*/ ctx[4] !== null ? /*error*/ ctx[4] : "") + "")) html_tag.p(raw_value);
765
+ },
766
+ d(detaching) {
767
+ if (detaching) detach(html_anchor);
768
+ if (detaching) html_tag.d();
651
769
  }
652
770
  };
653
771
  }
@@ -659,7 +777,7 @@
659
777
  let t1;
660
778
  let mounted;
661
779
  let dispose;
662
- let if_block0 = /*label*/ ctx[2] && create_if_block_1$1(ctx);
780
+ let if_block0 = /*label*/ ctx[2] && create_if_block_2(ctx);
663
781
  let if_block1 = /*error*/ ctx[4] != null && create_if_block$4(ctx);
664
782
 
665
783
  return {
@@ -673,11 +791,11 @@
673
791
  attr(input, "id", /*id*/ ctx[1]);
674
792
  attr(input, "type", "text");
675
793
  attr(input, "placeholder", /*placeholder*/ ctx[3]);
676
- input.readOnly = /*readonly*/ ctx[7];
794
+ input.readOnly = /*readonly*/ ctx[8];
677
795
  attr(input, "class", "svelte-11iawkb");
678
- toggle_class(input, "border", /*border*/ ctx[8]);
796
+ toggle_class(input, "border", /*border*/ ctx[9]);
679
797
  toggle_class(input, "error", /*error*/ ctx[4] !== null);
680
- toggle_class(input, "readonlyInput", /*readonly*/ ctx[7] == true);
798
+ toggle_class(input, "readonlyInput", /*readonly*/ ctx[8] == true);
681
799
  attr(div, "class", "iroco-ui-input svelte-11iawkb");
682
800
  },
683
801
  m(target, anchor) {
@@ -691,15 +809,15 @@
691
809
 
692
810
  if (!mounted) {
693
811
  dispose = [
694
- listen(input, "input", /*input_handler*/ ctx[12]),
695
- listen(input, "input", /*input_input_handler*/ ctx[13]),
812
+ listen(input, "input", /*input_handler*/ ctx[13]),
813
+ listen(input, "input", /*input_input_handler*/ ctx[14]),
696
814
  listen(input, "focus", function () {
697
- if (is_function(/*onFocus*/ ctx[5])) /*onFocus*/ ctx[5].apply(this, arguments);
815
+ if (is_function(/*onFocus*/ ctx[6])) /*onFocus*/ ctx[6].apply(this, arguments);
698
816
  }),
699
817
  listen(input, "blur", function () {
700
- if (is_function(/*onBlur*/ ctx[6])) /*onBlur*/ ctx[6].apply(this, arguments);
818
+ if (is_function(/*onBlur*/ ctx[7])) /*onBlur*/ ctx[7].apply(this, arguments);
701
819
  }),
702
- action_destroyer(/*typeAction*/ ctx[9].call(null, input))
820
+ action_destroyer(/*typeAction*/ ctx[10].call(null, input))
703
821
  ];
704
822
 
705
823
  mounted = true;
@@ -712,7 +830,7 @@
712
830
  if (if_block0) {
713
831
  if_block0.p(ctx, dirty);
714
832
  } else {
715
- if_block0 = create_if_block_1$1(ctx);
833
+ if_block0 = create_if_block_2(ctx);
716
834
  if_block0.c();
717
835
  if_block0.m(div, t0);
718
836
  }
@@ -729,24 +847,24 @@
729
847
  attr(input, "placeholder", /*placeholder*/ ctx[3]);
730
848
  }
731
849
 
732
- if (dirty & /*readonly*/ 128) {
733
- input.readOnly = /*readonly*/ ctx[7];
850
+ if (dirty & /*readonly*/ 256) {
851
+ input.readOnly = /*readonly*/ ctx[8];
734
852
  }
735
853
 
736
854
  if (dirty & /*value*/ 1 && input.value !== /*value*/ ctx[0]) {
737
855
  set_input_value(input, /*value*/ ctx[0]);
738
856
  }
739
857
 
740
- if (dirty & /*border*/ 256) {
741
- toggle_class(input, "border", /*border*/ ctx[8]);
858
+ if (dirty & /*border*/ 512) {
859
+ toggle_class(input, "border", /*border*/ ctx[9]);
742
860
  }
743
861
 
744
862
  if (dirty & /*error*/ 16) {
745
863
  toggle_class(input, "error", /*error*/ ctx[4] !== null);
746
864
  }
747
865
 
748
- if (dirty & /*readonly*/ 128) {
749
- toggle_class(input, "readonlyInput", /*readonly*/ ctx[7] == true);
866
+ if (dirty & /*readonly*/ 256) {
867
+ toggle_class(input, "readonlyInput", /*readonly*/ ctx[8] == true);
750
868
  }
751
869
 
752
870
  if (/*error*/ ctx[4] != null) {
@@ -788,6 +906,7 @@
788
906
  let { label = null } = $$props;
789
907
  let { placeholder } = $$props;
790
908
  let { error = null } = $$props;
909
+ let { htmlError = false } = $$props;
791
910
  let { value = null } = $$props;
792
911
  let { onFocus } = $$props;
793
912
  let { onBlur } = $$props;
@@ -808,17 +927,18 @@
808
927
  }
809
928
 
810
929
  $$self.$$set = $$props => {
811
- if ("TextType" in $$props) $$invalidate(10, TextType = $$props.TextType);
930
+ if ("TextType" in $$props) $$invalidate(11, TextType = $$props.TextType);
812
931
  if ("id" in $$props) $$invalidate(1, id = $$props.id);
813
- if ("type" in $$props) $$invalidate(11, type = $$props.type);
932
+ if ("type" in $$props) $$invalidate(12, type = $$props.type);
814
933
  if ("label" in $$props) $$invalidate(2, label = $$props.label);
815
934
  if ("placeholder" in $$props) $$invalidate(3, placeholder = $$props.placeholder);
816
935
  if ("error" in $$props) $$invalidate(4, error = $$props.error);
936
+ if ("htmlError" in $$props) $$invalidate(5, htmlError = $$props.htmlError);
817
937
  if ("value" in $$props) $$invalidate(0, value = $$props.value);
818
- if ("onFocus" in $$props) $$invalidate(5, onFocus = $$props.onFocus);
819
- if ("onBlur" in $$props) $$invalidate(6, onBlur = $$props.onBlur);
820
- if ("readonly" in $$props) $$invalidate(7, readonly = $$props.readonly);
821
- if ("border" in $$props) $$invalidate(8, border = $$props.border);
938
+ if ("onFocus" in $$props) $$invalidate(6, onFocus = $$props.onFocus);
939
+ if ("onBlur" in $$props) $$invalidate(7, onBlur = $$props.onBlur);
940
+ if ("readonly" in $$props) $$invalidate(8, readonly = $$props.readonly);
941
+ if ("border" in $$props) $$invalidate(9, border = $$props.border);
822
942
  };
823
943
 
824
944
  return [
@@ -827,6 +947,7 @@
827
947
  label,
828
948
  placeholder,
829
949
  error,
950
+ htmlError,
830
951
  onFocus,
831
952
  onBlur,
832
953
  readonly,
@@ -844,17 +965,18 @@
844
965
  super();
845
966
 
846
967
  init(this, options, instance$e, create_fragment$f, safe_not_equal, {
847
- TextType: 10,
968
+ TextType: 11,
848
969
  id: 1,
849
- type: 11,
970
+ type: 12,
850
971
  label: 2,
851
972
  placeholder: 3,
852
973
  error: 4,
974
+ htmlError: 5,
853
975
  value: 0,
854
- onFocus: 5,
855
- onBlur: 6,
856
- readonly: 7,
857
- border: 8
976
+ onFocus: 6,
977
+ onBlur: 7,
978
+ readonly: 8,
979
+ border: 9
858
980
  });
859
981
  }
860
982
  }
@@ -4002,16 +4124,15 @@
4002
4124
 
4003
4125
  function get_each_context$1(ctx, list, i) {
4004
4126
  const child_ctx = ctx.slice();
4005
- child_ctx[6] = list[i].destination;
4006
- child_ctx[7] = list[i].name;
4127
+ child_ctx[6] = list[i];
4007
4128
  return child_ctx;
4008
4129
  }
4009
4130
 
4010
- // (19:2) {#each navigationItems as { destination, name }}
4131
+ // (23:2) {#each navigationItems as item}
4011
4132
  function create_each_block$1(ctx) {
4012
4133
  let li;
4013
4134
  let a;
4014
- let t0_value = /*name*/ ctx[7] + "";
4135
+ let t0_value = /*item*/ ctx[6].name + "";
4015
4136
  let t0;
4016
4137
  let a_href_value;
4017
4138
  let t1;
@@ -4019,7 +4140,7 @@
4019
4140
  let dispose;
4020
4141
 
4021
4142
  function click_handler_1() {
4022
- return /*click_handler_1*/ ctx[4](/*destination*/ ctx[6]);
4143
+ return /*click_handler_1*/ ctx[4](/*item*/ ctx[6]);
4023
4144
  }
4024
4145
 
4025
4146
  return {
@@ -4028,10 +4149,14 @@
4028
4149
  a = element("a");
4029
4150
  t0 = text(t0_value);
4030
4151
  t1 = space();
4031
- attr(a, "href", a_href_value = /*destination*/ ctx[6]);
4032
- attr(a, "class", "svelte-1rx212l");
4033
- attr(li, "class", "account__sidebar__item svelte-1rx212l");
4034
- toggle_class(li, "active", /*active*/ ctx[1] === /*destination*/ ctx[6]);
4152
+
4153
+ attr(a, "href", a_href_value = typeof /*item*/ ctx[6].hrefOrCallback === "string"
4154
+ ? /*item*/ ctx[6].hrefOrCallback
4155
+ : "#");
4156
+
4157
+ attr(a, "class", "svelte-jkys2k");
4158
+ attr(li, "class", "account__sidebar__item svelte-jkys2k");
4159
+ toggle_class(li, "active", /*active*/ ctx[1] === /*item*/ ctx[6].name);
4035
4160
  },
4036
4161
  m(target, anchor) {
4037
4162
  insert(target, li, anchor);
@@ -4046,14 +4171,16 @@
4046
4171
  },
4047
4172
  p(new_ctx, dirty) {
4048
4173
  ctx = new_ctx;
4049
- if (dirty & /*navigationItems*/ 1 && t0_value !== (t0_value = /*name*/ ctx[7] + "")) set_data(t0, t0_value);
4174
+ if (dirty & /*navigationItems*/ 1 && t0_value !== (t0_value = /*item*/ ctx[6].name + "")) set_data(t0, t0_value);
4050
4175
 
4051
- if (dirty & /*navigationItems*/ 1 && a_href_value !== (a_href_value = /*destination*/ ctx[6])) {
4176
+ if (dirty & /*navigationItems*/ 1 && a_href_value !== (a_href_value = typeof /*item*/ ctx[6].hrefOrCallback === "string"
4177
+ ? /*item*/ ctx[6].hrefOrCallback
4178
+ : "#")) {
4052
4179
  attr(a, "href", a_href_value);
4053
4180
  }
4054
4181
 
4055
4182
  if (dirty & /*active, navigationItems*/ 3) {
4056
- toggle_class(li, "active", /*active*/ ctx[1] === /*destination*/ ctx[6]);
4183
+ toggle_class(li, "active", /*active*/ ctx[1] === /*item*/ ctx[6].name);
4057
4184
  }
4058
4185
  },
4059
4186
  d(detaching) {
@@ -4093,10 +4220,10 @@
4093
4220
  each_blocks[i].c();
4094
4221
  }
4095
4222
 
4096
- attr(button, "class", "account__sidebar__close svelte-1rx212l");
4097
- attr(ul, "class", "account__sidebar__item_container svelte-1rx212l");
4223
+ attr(button, "class", "account__sidebar__close svelte-jkys2k");
4224
+ attr(ul, "class", "account__sidebar__item_container svelte-jkys2k");
4098
4225
  attr(nav, "data-testid", "sidebar");
4099
- attr(nav, "class", "account__sidebar svelte-1rx212l");
4226
+ attr(nav, "class", "account__sidebar svelte-jkys2k");
4100
4227
  },
4101
4228
  m(target, anchor) {
4102
4229
  insert(target, nav, anchor);
@@ -4165,8 +4292,14 @@
4165
4292
  let active;
4166
4293
  const dispatch = createEventDispatcher();
4167
4294
 
4168
- const handleClickLink = destination => {
4169
- $$invalidate(1, active = destination);
4295
+ const handleClickLink = menuItem => {
4296
+ $$invalidate(1, active = menuItem.name);
4297
+
4298
+ if (typeof menuItem.hrefOrCallback === "function") {
4299
+ menuItem.hrefOrCallback();
4300
+ return false; // to avoid calling href
4301
+ }
4302
+
4170
4303
  dispatch("click_link");
4171
4304
  };
4172
4305
 
@@ -4174,7 +4307,7 @@
4174
4307
  bubble($$self, event);
4175
4308
  }
4176
4309
 
4177
- const click_handler_1 = destination => handleClickLink(destination);
4310
+ const click_handler_1 = item => handleClickLink(item);
4178
4311
 
4179
4312
  $$self.$$set = $$props => {
4180
4313
  if ("navigationItems" in $$props) $$invalidate(0, navigationItems = $$props.navigationItems);
@@ -4350,13 +4483,13 @@
4350
4483
  t6 = text(/*title*/ ctx[1]);
4351
4484
  t7 = space();
4352
4485
  create_component(sidebar.$$.fragment);
4353
- attr(h10, "class", "svelte-1jgfrsf");
4354
- attr(div0, "class", "account__navigation--mobile__title-container svelte-1jgfrsf");
4355
- attr(button, "class", "account__navigation--mobile__button svelte-1jgfrsf");
4356
- attr(div1, "class", "account__navigation--mobile svelte-1jgfrsf");
4357
- attr(h11, "class", "svelte-1jgfrsf");
4358
- attr(div2, "class", "account__navigation__title-container svelte-1jgfrsf");
4359
- attr(div3, "class", "account__navigation svelte-1jgfrsf");
4486
+ attr(h10, "class", "svelte-1uu9ytm");
4487
+ attr(div0, "class", "account__navigation--mobile__title-container svelte-1uu9ytm");
4488
+ attr(button, "class", "account__navigation--mobile__button svelte-1uu9ytm");
4489
+ attr(div1, "class", "account__navigation--mobile svelte-1uu9ytm");
4490
+ attr(h11, "class", "svelte-1uu9ytm");
4491
+ attr(div2, "class", "account__navigation__title-container svelte-1uu9ytm");
4492
+ attr(div3, "class", "account__navigation svelte-1uu9ytm");
4360
4493
  },
4361
4494
  m(target, anchor) {
4362
4495
  insert(target, div1, anchor);