@elmethis/qwik 0.0.35 → 0.0.37

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.
@@ -10,7 +10,7 @@ const marked = require("marked");
10
10
  const caption$1 = "_caption_1j0ec_27";
11
11
  const divider = "_divider_1j0ec_50";
12
12
  const code$2 = "_code_1j0ec_1";
13
- const styles$A = {
13
+ const styles$B = {
14
14
  "code-block": "_code-block_1j0ec_1",
15
15
  "language-icon": "_language-icon_1j0ec_22",
16
16
  caption: caption$1,
@@ -70,7 +70,7 @@ const Typescript = qwik.component$(({ size = 24, ...props }) => {
70
70
  });
71
71
  });
72
72
  const path = "_path_1ccs2_1";
73
- const styles$z = {
73
+ const styles$A = {
74
74
  path
75
75
  };
76
76
  const Bash = qwik.component$(({ size = 24, ...props }) => {
@@ -86,7 +86,7 @@ const Bash = qwik.component$(({ size = 24, ...props }) => {
86
86
  d: "M4.24 4.24h119.53v119.53H4.24z"
87
87
  }),
88
88
  /* @__PURE__ */ jsxRuntime.jsx("path", {
89
- class: styles$z.path,
89
+ class: styles$A.path,
90
90
  d: "M109.01 28.64L71.28 6.24c-2.25-1.33-4.77-2-7.28-2s-5.03.67-7.28 2.01l-37.74 22.4c-4.5 2.67-7.28 7.61-7.28 12.96v44.8c0 5.35 2.77 10.29 7.28 12.96l37.73 22.4c2.25 1.34 4.76 2 7.28 2c2.51 0 5.03-.67 7.28-2l37.74-22.4c4.5-2.67 7.28-7.62 7.28-12.96V41.6c0-5.34-2.77-10.29-7.28-12.96M79.79 98.59l.06 3.22c0 .39-.25.83-.55.99l-1.91 1.1c-.3.15-.56-.03-.56-.42l-.03-3.17c-1.63.68-3.29.84-4.34.42c-.2-.08-.29-.37-.21-.71l.69-2.91c.06-.23.18-.46.34-.6c.06-.06.12-.1.18-.13c.11-.06.22-.07.31-.03c1.14.38 2.59.2 3.99-.5c1.78-.9 2.97-2.72 2.95-4.52c-.02-1.64-.9-2.31-3.05-2.33c-2.74.01-5.3-.53-5.34-4.57c-.03-3.32 1.69-6.78 4.43-8.96l-.03-3.25c0-.4.24-.84.55-1l1.85-1.18c.3-.15.56.04.56.43l.03 3.25c1.36-.54 2.54-.69 3.61-.44c.23.06.34.38.24.75l-.72 2.88c-.06.22-.18.44-.33.58a.8.8 0 0 1-.19.14c-.1.05-.19.06-.28.05c-.49-.11-1.65-.36-3.48.56c-1.92.97-2.59 2.64-2.58 3.88c.02 1.48.77 1.93 3.39 1.97c3.49.06 4.99 1.58 5.03 5.09c.05 3.44-1.79 7.15-4.61 9.41m26.34-60.5l-35.7 22.05c-4.45 2.6-7.73 5.52-7.74 10.89v43.99c0 3.21 1.3 5.29 3.29 5.9c-.65.11-1.32.19-1.98.19c-2.09 0-4.15-.57-5.96-1.64l-37.73-22.4c-3.69-2.19-5.98-6.28-5.98-10.67V41.6c0-4.39 2.29-8.48 5.98-10.67l37.74-22.4c1.81-1.07 3.87-1.64 5.96-1.64s4.15.57 5.96 1.64l37.74 22.4c3.11 1.85 5.21 5.04 5.8 8.63c-1.27-2.67-4.09-3.39-7.38-1.47"
91
91
  }),
92
92
  /* @__PURE__ */ jsxRuntime.jsx("path", {
@@ -527,12 +527,12 @@ const C = qwik.component$(({ size = 24, ...props }) => {
527
527
  });
528
528
  });
529
529
  const icon$4 = "_icon_1gvln_1";
530
- const styles$y = {
530
+ const styles$z = {
531
531
  icon: icon$4
532
532
  };
533
533
  const ElmMdiIcon = qwik.component$(({ d, size = "1em", color, lightColor, darkColor }) => {
534
534
  return /* @__PURE__ */ jsxRuntime.jsx("svg", {
535
- class: styles$y.icon,
535
+ class: styles$z.icon,
536
536
  style: {
537
537
  "--color": lightColor ?? color,
538
538
  "--dark-color": darkColor ?? color
@@ -641,7 +641,7 @@ const text$3 = "_text_1gswr_1";
641
641
  const code$1 = "_code_1gswr_12";
642
642
  const kbd = "_kbd_1gswr_21";
643
643
  const link$1 = "_link_1gswr_47";
644
- const styles$x = {
644
+ const styles$y = {
645
645
  text: text$3,
646
646
  code: code$1,
647
647
  kbd,
@@ -652,16 +652,16 @@ const textStyles = {
652
652
  text: text$2
653
653
  };
654
654
  const icon$3 = "_icon_19g82_1";
655
- const styles$w = {
655
+ const styles$x = {
656
656
  icon: icon$3
657
657
  };
658
658
  const ElmInlineIcon = qwik.component$(({ src, alt, width, height, size = 16 }) => {
659
659
  return /* @__PURE__ */ jsxRuntime.jsx("span", {
660
- class: styles$w.icon,
660
+ class: styles$x.icon,
661
661
  children: /* @__PURE__ */ jsxRuntime.jsx("img", {
662
662
  src,
663
663
  alt,
664
- class: styles$w.icon,
664
+ class: styles$x.icon,
665
665
  width: width ?? size,
666
666
  height: height ?? size
667
667
  })
@@ -674,7 +674,7 @@ const ElmInlineText = qwik.component$((props) => {
674
674
  }) : /* @__PURE__ */ jsxRuntime.jsx(qwik.Slot, {});
675
675
  if (props.kbd) {
676
676
  vnode = /* @__PURE__ */ jsxRuntime.jsx("kbd", {
677
- class: styles$x.kbd,
677
+ class: styles$y.kbd,
678
678
  children: vnode
679
679
  });
680
680
  }
@@ -700,13 +700,13 @@ const ElmInlineText = qwik.component$((props) => {
700
700
  }
701
701
  if (code2) {
702
702
  vnode = /* @__PURE__ */ jsxRuntime.jsx("code", {
703
- class: styles$x.code,
703
+ class: styles$y.code,
704
704
  children: vnode
705
705
  });
706
706
  }
707
707
  if (props.ruby) {
708
708
  vnode = /* @__PURE__ */ jsxRuntime.jsxs("ruby", {
709
- class: styles$x.text,
709
+ class: styles$y.text,
710
710
  children: [
711
711
  /* @__PURE__ */ jsxRuntime.jsx("span", {
712
712
  children: vnode
@@ -719,7 +719,7 @@ const ElmInlineText = qwik.component$((props) => {
719
719
  }
720
720
  const wrappedVnode = /* @__PURE__ */ jsxRuntime.jsx("span", {
721
721
  class: [
722
- styles$x.text,
722
+ styles$y.text,
723
723
  textStyles.text
724
724
  ],
725
725
  style: {
@@ -732,7 +732,7 @@ const ElmInlineText = qwik.component$((props) => {
732
732
  });
733
733
  if (props.href) {
734
734
  return /* @__PURE__ */ jsxRuntime.jsxs("a", {
735
- class: styles$x.link,
735
+ class: styles$y.link,
736
736
  href: props.href,
737
737
  style: {
738
738
  "--font-size": size
@@ -751,7 +751,7 @@ const ElmInlineText = qwik.component$((props) => {
751
751
  return wrappedVnode;
752
752
  });
753
753
  const code = "_code_1sw1e_1";
754
- const styles$v = {
754
+ const styles$w = {
755
755
  code
756
756
  };
757
757
  const ElmShikiHighlighter = qwik.component$(({ code: code2, language = "txt" }) => {
@@ -776,7 +776,7 @@ const ElmShikiHighlighter = qwik.component$(({ code: code2, language = "txt" })
776
776
  }
777
777
  });
778
778
  return /* @__PURE__ */ jsxRuntime.jsx("pre", {
779
- class: styles$v.code,
779
+ class: styles$w.code,
780
780
  dangerouslySetInnerHTML: rawHtml.value
781
781
  });
782
782
  });
@@ -795,17 +795,17 @@ const ElmCodeBlock = qwik.component$(({ code: code2, language = "txt", caption:
795
795
  }
796
796
  });
797
797
  return /* @__PURE__ */ jsxRuntime.jsxs("figure", {
798
- class: styles$A["code-block"],
798
+ class: styles$B["code-block"],
799
799
  style,
800
800
  children: [
801
801
  /* @__PURE__ */ jsxRuntime.jsx("span", {
802
- class: styles$A["language-icon"],
802
+ class: styles$B["language-icon"],
803
803
  children: /* @__PURE__ */ jsxRuntime.jsx(ElmLanguageIcon, {
804
804
  language
805
805
  })
806
806
  }),
807
807
  /* @__PURE__ */ jsxRuntime.jsx("span", {
808
- class: styles$A.caption,
808
+ class: styles$B.caption,
809
809
  children: /* @__PURE__ */ jsxRuntime.jsxs(ElmInlineText, {
810
810
  children: [
811
811
  caption2 || language,
@@ -814,7 +814,7 @@ const ElmCodeBlock = qwik.component$(({ code: code2, language = "txt", caption:
814
814
  })
815
815
  }),
816
816
  /* @__PURE__ */ jsxRuntime.jsx("div", {
817
- class: styles$A["copy-icon"],
817
+ class: styles$B["copy-icon"],
818
818
  onClick$: copyToClipboard,
819
819
  children: /* @__PURE__ */ jsxRuntime.jsx(ElmMdiIcon, {
820
820
  size: "1.25rem",
@@ -823,10 +823,10 @@ const ElmCodeBlock = qwik.component$(({ code: code2, language = "txt", caption:
823
823
  })
824
824
  }),
825
825
  /* @__PURE__ */ jsxRuntime.jsx("hr", {
826
- class: styles$A.divider
826
+ class: styles$B.divider
827
827
  }),
828
828
  /* @__PURE__ */ jsxRuntime.jsx("div", {
829
- class: styles$A.code,
829
+ class: styles$B.code,
830
830
  children: /* @__PURE__ */ jsxRuntime.jsx(ElmShikiHighlighter, {
831
831
  code: code2,
832
832
  language
@@ -846,7 +846,7 @@ const ElmKatex = qwik.component$(({ expression, block = false }) => {
846
846
  });
847
847
  });
848
848
  const parallax = "_parallax_1kb0k_1";
849
- const styles$u = {
849
+ const styles$v = {
850
850
  "parallax-watcher": "_parallax-watcher_1kb0k_1",
851
851
  parallax
852
852
  };
@@ -855,13 +855,13 @@ const ElmParallax = qwik.component$(({ images }) => {
855
855
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
856
856
  children: [
857
857
  /* @__PURE__ */ jsxRuntime.jsx("div", {
858
- class: styles$u["parallax-watcher"],
858
+ class: styles$v["parallax-watcher"],
859
859
  "window:onScroll$": () => {
860
860
  y.value = window.scrollY;
861
861
  }
862
862
  }),
863
863
  images.map((image2, index) => /* @__PURE__ */ jsxRuntime.jsx("div", {
864
- class: styles$u.parallax,
864
+ class: styles$v.parallax,
865
865
  style: {
866
866
  backgroundImage: `url(${image2})`,
867
867
  transform: `scale(1.2) translateY(${y.value / (1e3 * (index + 1))}%)`,
@@ -871,6 +871,47 @@ const ElmParallax = qwik.component$(({ images }) => {
871
871
  ]
872
872
  });
873
873
  });
874
+ const tab = "_tab_1vih2_18";
875
+ const active$2 = "_active_1vih2_40";
876
+ const styles$u = {
877
+ "elm-tabs": "_elm-tabs_1vih2_1",
878
+ "tab-container": "_tab-container_1vih2_18",
879
+ tab,
880
+ active: active$2,
881
+ "tab-content-container": "_tab-content-container_1vih2_51",
882
+ "tab-content": "_tab-content_1vih2_51"
883
+ };
884
+ const ElmTabs = qwik.component$(({ renderTabFunctions$, renderTabContentFunctions$ }) => {
885
+ const selectedTabIndex = qwik.useSignal(0);
886
+ const selectTab = qwik.$((index) => {
887
+ selectedTabIndex.value = index;
888
+ });
889
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", {
890
+ class: styles$u["elm-tabs"],
891
+ children: [
892
+ /* @__PURE__ */ jsxRuntime.jsx("div", {
893
+ class: styles$u["tab-container"],
894
+ children: renderTabFunctions$.map((renderTabFunction$, index) => /* @__PURE__ */ jsxRuntime.jsx("div", {
895
+ class: [
896
+ styles$u["tab"],
897
+ {
898
+ [styles$u["active"]]: selectedTabIndex.value === index
899
+ }
900
+ ],
901
+ onClick$: () => selectTab(index),
902
+ children: renderTabFunction$()
903
+ }, index))
904
+ }),
905
+ /* @__PURE__ */ jsxRuntime.jsx("div", {
906
+ class: styles$u["tab-content-container"],
907
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", {
908
+ class: styles$u["tab-content"],
909
+ children: renderTabContentFunctions$[selectedTabIndex.value]()
910
+ }, selectedTabIndex.value)
911
+ })
912
+ ]
913
+ });
914
+ });
874
915
  const toggle = "_toggle_pbyu8_1";
875
916
  const summary = "_summary_pbyu8_14";
876
917
  const content$2 = "_content_pbyu8_60";
@@ -2224,7 +2265,14 @@ const ElmBlockImage = qwik.component$(({ src, alt, caption: caption2, width, hei
2224
2265
  isShowModal.value = !isShowModal.value;
2225
2266
  }
2226
2267
  });
2268
+ const imgRef = qwik.useSignal();
2269
+ qwik.useVisibleTask$(() => {
2270
+ imgRef.value.decode().then(() => {
2271
+ isLoading.value = false;
2272
+ });
2273
+ });
2227
2274
  const ImageComponent = /* @__PURE__ */ jsxRuntime.jsx("img", {
2275
+ ref: imgRef,
2228
2276
  class: styles$h.image,
2229
2277
  src,
2230
2278
  alt: alt ?? caption2 ?? "Image",
@@ -3352,6 +3400,7 @@ exports.ElmTableBody = ElmTableBody;
3352
3400
  exports.ElmTableCell = ElmTableCell;
3353
3401
  exports.ElmTableHeader = ElmTableHeader;
3354
3402
  exports.ElmTableRow = ElmTableRow;
3403
+ exports.ElmTabs = ElmTabs;
3355
3404
  exports.ElmTextField = ElmTextField;
3356
3405
  exports.ElmToggle = ElmToggle;
3357
3406
  exports.ElmToggleTheme = ElmToggleTheme;
@@ -8,7 +8,7 @@ import { marked } from "marked";
8
8
  const caption$1 = "_caption_1j0ec_27";
9
9
  const divider = "_divider_1j0ec_50";
10
10
  const code$2 = "_code_1j0ec_1";
11
- const styles$A = {
11
+ const styles$B = {
12
12
  "code-block": "_code-block_1j0ec_1",
13
13
  "language-icon": "_language-icon_1j0ec_22",
14
14
  caption: caption$1,
@@ -68,7 +68,7 @@ const Typescript = component$(({ size = 24, ...props }) => {
68
68
  });
69
69
  });
70
70
  const path = "_path_1ccs2_1";
71
- const styles$z = {
71
+ const styles$A = {
72
72
  path
73
73
  };
74
74
  const Bash = component$(({ size = 24, ...props }) => {
@@ -84,7 +84,7 @@ const Bash = component$(({ size = 24, ...props }) => {
84
84
  d: "M4.24 4.24h119.53v119.53H4.24z"
85
85
  }),
86
86
  /* @__PURE__ */ jsx("path", {
87
- class: styles$z.path,
87
+ class: styles$A.path,
88
88
  d: "M109.01 28.64L71.28 6.24c-2.25-1.33-4.77-2-7.28-2s-5.03.67-7.28 2.01l-37.74 22.4c-4.5 2.67-7.28 7.61-7.28 12.96v44.8c0 5.35 2.77 10.29 7.28 12.96l37.73 22.4c2.25 1.34 4.76 2 7.28 2c2.51 0 5.03-.67 7.28-2l37.74-22.4c4.5-2.67 7.28-7.62 7.28-12.96V41.6c0-5.34-2.77-10.29-7.28-12.96M79.79 98.59l.06 3.22c0 .39-.25.83-.55.99l-1.91 1.1c-.3.15-.56-.03-.56-.42l-.03-3.17c-1.63.68-3.29.84-4.34.42c-.2-.08-.29-.37-.21-.71l.69-2.91c.06-.23.18-.46.34-.6c.06-.06.12-.1.18-.13c.11-.06.22-.07.31-.03c1.14.38 2.59.2 3.99-.5c1.78-.9 2.97-2.72 2.95-4.52c-.02-1.64-.9-2.31-3.05-2.33c-2.74.01-5.3-.53-5.34-4.57c-.03-3.32 1.69-6.78 4.43-8.96l-.03-3.25c0-.4.24-.84.55-1l1.85-1.18c.3-.15.56.04.56.43l.03 3.25c1.36-.54 2.54-.69 3.61-.44c.23.06.34.38.24.75l-.72 2.88c-.06.22-.18.44-.33.58a.8.8 0 0 1-.19.14c-.1.05-.19.06-.28.05c-.49-.11-1.65-.36-3.48.56c-1.92.97-2.59 2.64-2.58 3.88c.02 1.48.77 1.93 3.39 1.97c3.49.06 4.99 1.58 5.03 5.09c.05 3.44-1.79 7.15-4.61 9.41m26.34-60.5l-35.7 22.05c-4.45 2.6-7.73 5.52-7.74 10.89v43.99c0 3.21 1.3 5.29 3.29 5.9c-.65.11-1.32.19-1.98.19c-2.09 0-4.15-.57-5.96-1.64l-37.73-22.4c-3.69-2.19-5.98-6.28-5.98-10.67V41.6c0-4.39 2.29-8.48 5.98-10.67l37.74-22.4c1.81-1.07 3.87-1.64 5.96-1.64s4.15.57 5.96 1.64l37.74 22.4c3.11 1.85 5.21 5.04 5.8 8.63c-1.27-2.67-4.09-3.39-7.38-1.47"
89
89
  }),
90
90
  /* @__PURE__ */ jsx("path", {
@@ -525,12 +525,12 @@ const C = component$(({ size = 24, ...props }) => {
525
525
  });
526
526
  });
527
527
  const icon$4 = "_icon_1gvln_1";
528
- const styles$y = {
528
+ const styles$z = {
529
529
  icon: icon$4
530
530
  };
531
531
  const ElmMdiIcon = component$(({ d, size = "1em", color, lightColor, darkColor }) => {
532
532
  return /* @__PURE__ */ jsx("svg", {
533
- class: styles$y.icon,
533
+ class: styles$z.icon,
534
534
  style: {
535
535
  "--color": lightColor ?? color,
536
536
  "--dark-color": darkColor ?? color
@@ -639,7 +639,7 @@ const text$3 = "_text_1gswr_1";
639
639
  const code$1 = "_code_1gswr_12";
640
640
  const kbd = "_kbd_1gswr_21";
641
641
  const link$1 = "_link_1gswr_47";
642
- const styles$x = {
642
+ const styles$y = {
643
643
  text: text$3,
644
644
  code: code$1,
645
645
  kbd,
@@ -650,16 +650,16 @@ const textStyles = {
650
650
  text: text$2
651
651
  };
652
652
  const icon$3 = "_icon_19g82_1";
653
- const styles$w = {
653
+ const styles$x = {
654
654
  icon: icon$3
655
655
  };
656
656
  const ElmInlineIcon = component$(({ src, alt, width, height, size = 16 }) => {
657
657
  return /* @__PURE__ */ jsx("span", {
658
- class: styles$w.icon,
658
+ class: styles$x.icon,
659
659
  children: /* @__PURE__ */ jsx("img", {
660
660
  src,
661
661
  alt,
662
- class: styles$w.icon,
662
+ class: styles$x.icon,
663
663
  width: width ?? size,
664
664
  height: height ?? size
665
665
  })
@@ -672,7 +672,7 @@ const ElmInlineText = component$((props) => {
672
672
  }) : /* @__PURE__ */ jsx(Slot, {});
673
673
  if (props.kbd) {
674
674
  vnode = /* @__PURE__ */ jsx("kbd", {
675
- class: styles$x.kbd,
675
+ class: styles$y.kbd,
676
676
  children: vnode
677
677
  });
678
678
  }
@@ -698,13 +698,13 @@ const ElmInlineText = component$((props) => {
698
698
  }
699
699
  if (code2) {
700
700
  vnode = /* @__PURE__ */ jsx("code", {
701
- class: styles$x.code,
701
+ class: styles$y.code,
702
702
  children: vnode
703
703
  });
704
704
  }
705
705
  if (props.ruby) {
706
706
  vnode = /* @__PURE__ */ jsxs("ruby", {
707
- class: styles$x.text,
707
+ class: styles$y.text,
708
708
  children: [
709
709
  /* @__PURE__ */ jsx("span", {
710
710
  children: vnode
@@ -717,7 +717,7 @@ const ElmInlineText = component$((props) => {
717
717
  }
718
718
  const wrappedVnode = /* @__PURE__ */ jsx("span", {
719
719
  class: [
720
- styles$x.text,
720
+ styles$y.text,
721
721
  textStyles.text
722
722
  ],
723
723
  style: {
@@ -730,7 +730,7 @@ const ElmInlineText = component$((props) => {
730
730
  });
731
731
  if (props.href) {
732
732
  return /* @__PURE__ */ jsxs("a", {
733
- class: styles$x.link,
733
+ class: styles$y.link,
734
734
  href: props.href,
735
735
  style: {
736
736
  "--font-size": size
@@ -749,7 +749,7 @@ const ElmInlineText = component$((props) => {
749
749
  return wrappedVnode;
750
750
  });
751
751
  const code = "_code_1sw1e_1";
752
- const styles$v = {
752
+ const styles$w = {
753
753
  code
754
754
  };
755
755
  const ElmShikiHighlighter = component$(({ code: code2, language = "txt" }) => {
@@ -774,7 +774,7 @@ const ElmShikiHighlighter = component$(({ code: code2, language = "txt" }) => {
774
774
  }
775
775
  });
776
776
  return /* @__PURE__ */ jsx("pre", {
777
- class: styles$v.code,
777
+ class: styles$w.code,
778
778
  dangerouslySetInnerHTML: rawHtml.value
779
779
  });
780
780
  });
@@ -793,17 +793,17 @@ const ElmCodeBlock = component$(({ code: code2, language = "txt", caption: capti
793
793
  }
794
794
  });
795
795
  return /* @__PURE__ */ jsxs("figure", {
796
- class: styles$A["code-block"],
796
+ class: styles$B["code-block"],
797
797
  style,
798
798
  children: [
799
799
  /* @__PURE__ */ jsx("span", {
800
- class: styles$A["language-icon"],
800
+ class: styles$B["language-icon"],
801
801
  children: /* @__PURE__ */ jsx(ElmLanguageIcon, {
802
802
  language
803
803
  })
804
804
  }),
805
805
  /* @__PURE__ */ jsx("span", {
806
- class: styles$A.caption,
806
+ class: styles$B.caption,
807
807
  children: /* @__PURE__ */ jsxs(ElmInlineText, {
808
808
  children: [
809
809
  caption2 || language,
@@ -812,7 +812,7 @@ const ElmCodeBlock = component$(({ code: code2, language = "txt", caption: capti
812
812
  })
813
813
  }),
814
814
  /* @__PURE__ */ jsx("div", {
815
- class: styles$A["copy-icon"],
815
+ class: styles$B["copy-icon"],
816
816
  onClick$: copyToClipboard,
817
817
  children: /* @__PURE__ */ jsx(ElmMdiIcon, {
818
818
  size: "1.25rem",
@@ -821,10 +821,10 @@ const ElmCodeBlock = component$(({ code: code2, language = "txt", caption: capti
821
821
  })
822
822
  }),
823
823
  /* @__PURE__ */ jsx("hr", {
824
- class: styles$A.divider
824
+ class: styles$B.divider
825
825
  }),
826
826
  /* @__PURE__ */ jsx("div", {
827
- class: styles$A.code,
827
+ class: styles$B.code,
828
828
  children: /* @__PURE__ */ jsx(ElmShikiHighlighter, {
829
829
  code: code2,
830
830
  language
@@ -844,7 +844,7 @@ const ElmKatex = component$(({ expression, block = false }) => {
844
844
  });
845
845
  });
846
846
  const parallax = "_parallax_1kb0k_1";
847
- const styles$u = {
847
+ const styles$v = {
848
848
  "parallax-watcher": "_parallax-watcher_1kb0k_1",
849
849
  parallax
850
850
  };
@@ -853,13 +853,13 @@ const ElmParallax = component$(({ images }) => {
853
853
  return /* @__PURE__ */ jsxs(Fragment, {
854
854
  children: [
855
855
  /* @__PURE__ */ jsx("div", {
856
- class: styles$u["parallax-watcher"],
856
+ class: styles$v["parallax-watcher"],
857
857
  "window:onScroll$": () => {
858
858
  y.value = window.scrollY;
859
859
  }
860
860
  }),
861
861
  images.map((image2, index) => /* @__PURE__ */ jsx("div", {
862
- class: styles$u.parallax,
862
+ class: styles$v.parallax,
863
863
  style: {
864
864
  backgroundImage: `url(${image2})`,
865
865
  transform: `scale(1.2) translateY(${y.value / (1e3 * (index + 1))}%)`,
@@ -869,6 +869,47 @@ const ElmParallax = component$(({ images }) => {
869
869
  ]
870
870
  });
871
871
  });
872
+ const tab = "_tab_1vih2_18";
873
+ const active$2 = "_active_1vih2_40";
874
+ const styles$u = {
875
+ "elm-tabs": "_elm-tabs_1vih2_1",
876
+ "tab-container": "_tab-container_1vih2_18",
877
+ tab,
878
+ active: active$2,
879
+ "tab-content-container": "_tab-content-container_1vih2_51",
880
+ "tab-content": "_tab-content_1vih2_51"
881
+ };
882
+ const ElmTabs = component$(({ renderTabFunctions$, renderTabContentFunctions$ }) => {
883
+ const selectedTabIndex = useSignal(0);
884
+ const selectTab = $((index) => {
885
+ selectedTabIndex.value = index;
886
+ });
887
+ return /* @__PURE__ */ jsxs("div", {
888
+ class: styles$u["elm-tabs"],
889
+ children: [
890
+ /* @__PURE__ */ jsx("div", {
891
+ class: styles$u["tab-container"],
892
+ children: renderTabFunctions$.map((renderTabFunction$, index) => /* @__PURE__ */ jsx("div", {
893
+ class: [
894
+ styles$u["tab"],
895
+ {
896
+ [styles$u["active"]]: selectedTabIndex.value === index
897
+ }
898
+ ],
899
+ onClick$: () => selectTab(index),
900
+ children: renderTabFunction$()
901
+ }, index))
902
+ }),
903
+ /* @__PURE__ */ jsx("div", {
904
+ class: styles$u["tab-content-container"],
905
+ children: /* @__PURE__ */ jsx("div", {
906
+ class: styles$u["tab-content"],
907
+ children: renderTabContentFunctions$[selectedTabIndex.value]()
908
+ }, selectedTabIndex.value)
909
+ })
910
+ ]
911
+ });
912
+ });
872
913
  const toggle = "_toggle_pbyu8_1";
873
914
  const summary = "_summary_pbyu8_14";
874
915
  const content$2 = "_content_pbyu8_60";
@@ -2222,7 +2263,14 @@ const ElmBlockImage = component$(({ src, alt, caption: caption2, width, height,
2222
2263
  isShowModal.value = !isShowModal.value;
2223
2264
  }
2224
2265
  });
2266
+ const imgRef = useSignal();
2267
+ useVisibleTask$(() => {
2268
+ imgRef.value.decode().then(() => {
2269
+ isLoading.value = false;
2270
+ });
2271
+ });
2225
2272
  const ImageComponent = /* @__PURE__ */ jsx("img", {
2273
+ ref: imgRef,
2226
2274
  class: styles$h.image,
2227
2275
  src,
2228
2276
  alt: alt ?? caption2 ?? "Image",
@@ -3351,6 +3399,7 @@ export {
3351
3399
  ElmTableCell,
3352
3400
  ElmTableHeader,
3353
3401
  ElmTableRow,
3402
+ ElmTabs,
3354
3403
  ElmTextField,
3355
3404
  ElmToggle,
3356
3405
  ElmToggleTheme,
package/lib/style.css CHANGED
@@ -240,7 +240,75 @@
240
240
  }
241
241
  [data-theme=dark] ._parallax_1kb0k_1 {
242
242
  opacity: 0.1;
243
- }._toggle_pbyu8_1 {
243
+ }._elm-tabs_1vih2_1 {
244
+ display: flex;
245
+ flex-direction: column;
246
+ gap: 0;
247
+ width: 100%;
248
+ border: solid 1px oklch(from black l c h / 0.1);
249
+ border-radius: 0.25rem;
250
+ box-shadow: 0 0 0.125rem oklch(from black l c h / 0.1);
251
+ overflow: hidden;
252
+
253
+ background-color: oklch(from white l c h / 0.5);
254
+
255
+ [data-theme="dark"] & {
256
+ background-color: oklch(from black l c h / 0.1);
257
+ }
258
+ }
259
+
260
+ ._tab-container_1vih2_18 {
261
+ display: flex;
262
+ flex-direction: row;
263
+ border-bottom: solid 1px oklch(from gray l c h / 0.3);
264
+ }
265
+
266
+ ._tab_1vih2_18 {
267
+ box-sizing: border-box;
268
+ min-width: 6rem;
269
+ padding: 1rem;
270
+ margin: 0;
271
+ cursor: pointer;
272
+ border-right: dashed 1px oklch(from gray l c h / 0.2);
273
+ border-bottom: solid 2px transparent;
274
+ display: flex;
275
+ align-items: center;
276
+ justify-content: center;
277
+
278
+ transition:
279
+ background-color 200ms,
280
+ border-color 200ms;
281
+
282
+ &._active_1vih2_40 {
283
+ background-color: oklch(from #7cbac5 l c h / 0.025);
284
+ border-bottom-color: #7cbac5;
285
+ cursor: default;
286
+ }
287
+
288
+ &:hover {
289
+ background-color: oklch(from #7cbac5 l c h / 0.05);
290
+ }
291
+ }
292
+
293
+ ._tab-content-container_1vih2_51 {
294
+ box-sizing: border-box;
295
+ width: 100%;
296
+ padding: 1em;
297
+ }
298
+
299
+ ._tab-content_1vih2_51 {
300
+ width: 100%;
301
+ margin: 0;
302
+ transition:
303
+ transform 200ms,
304
+ opacity 200ms;
305
+
306
+ @starting-style {
307
+ transform: translateY(-8px);
308
+ opacity: 0;
309
+ }
310
+ }
311
+ ._toggle_pbyu8_1 {
244
312
  margin-block: var(--margin-block, 0);
245
313
  display: grid;
246
314
  transition: grid 200ms;
@@ -0,0 +1,6 @@
1
+ import { JSXOutput, QRL } from "@builder.io/qwik";
2
+ export interface ElmTabsProps {
3
+ renderTabFunctions$: QRL<() => JSXOutput>[];
4
+ renderTabContentFunctions$: QRL<() => JSXOutput>[];
5
+ }
6
+ export declare const ElmTabs: import("@builder.io/qwik").Component<ElmTabsProps>;
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from "storybook-framework-qwik";
2
+ import { ElmTabs } from "./elm-tabs";
3
+ declare const meta: Meta<typeof ElmTabs>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Primary: Story;
@@ -2,6 +2,7 @@ export { ElmCodeBlock, type ElmCodeBlockProps, } from "./components/code/elm-cod
2
2
  export { ElmKatex, type ElmKatexProps } from "./components/code/elm-katex";
3
3
  export { ElmShikiHighlighter, type ElmShikiHighlighterProps, } from "./components/code/elm-shiki-highlighter";
4
4
  export { ElmParallax, type ElmParallaxProps, } from "./components/containments/elm-parallax";
5
+ export { ElmTabs, type ElmTabsProps } from "./components/containments/elm-tabs";
5
6
  export { ElmToggle, type ElmToggleProps, } from "./components/containments/elm-toggle";
6
7
  export { ElmBlockFallback, type ElmBlockFallbackProps, } from "./components/fallback/elm-block-fallback";
7
8
  export { ElmRectangleWave, type ElmRectangleWaveProps, } from "./components/fallback/elm-rectangle-wave";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elmethis/qwik",
3
- "version": "0.0.35",
3
+ "version": "0.0.37",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -42,28 +42,28 @@
42
42
  "@storybook/addon-essentials": "8.6.18",
43
43
  "@types/lodash-es": "^4.17.12",
44
44
  "@types/node": "25.5.0",
45
- "eslint": "10.0.3",
45
+ "eslint": "10.1.0",
46
46
  "eslint-plugin-qwik": "1.19.2",
47
47
  "globals": "17.4.0",
48
48
  "jarkup-ts": "^0.9.0",
49
49
  "np": "^11.0.2",
50
- "prettier": "3.6.2",
51
- "sass": "^1.97.3",
50
+ "prettier": "3.8.1",
51
+ "sass": "^1.98.0",
52
52
  "storybook": "8",
53
53
  "storybook-framework-qwik": "^0.4.0",
54
- "typescript": "5.4.5",
55
- "typescript-eslint": "8.57.1",
54
+ "typescript": "5.9.3",
55
+ "typescript-eslint": "8.57.2",
56
56
  "undici": "*",
57
57
  "vite": "^6.4.1",
58
58
  "vite-tsconfig-paths": "^6.1.1"
59
59
  },
60
60
  "dependencies": {
61
61
  "@mdi/js": "^7.4.47",
62
- "katex": "^0.16.38",
62
+ "katex": "^0.16.42",
63
63
  "lodash-es": "^4.17.23",
64
- "marked": "^17.0.4",
64
+ "marked": "^17.0.5",
65
65
  "polished": "^4.3.1",
66
- "shiki": "^4.0.1"
66
+ "shiki": "^4.0.2"
67
67
  },
68
68
  "scripts": {
69
69
  "build": "qwik build",