@elmethis/qwik 0.0.20 → 0.0.22

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$t = {
13
+ const styles$u = {
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$s = {
73
+ const styles$t = {
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$s.path,
89
+ class: styles$t.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", {
@@ -526,13 +526,13 @@ const C = qwik.component$(({ size = 24, ...props }) => {
526
526
  ]
527
527
  });
528
528
  });
529
- const icon$3 = "_icon_1gvln_1";
530
- const styles$r = {
531
- icon: icon$3
529
+ const icon$4 = "_icon_1gvln_1";
530
+ const styles$s = {
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$r.icon,
535
+ class: styles$s.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$q = {
644
+ const styles$r = {
645
645
  text: text$3,
646
646
  code: code$1,
647
647
  kbd,
@@ -651,17 +651,17 @@ const text$2 = "_text_zryur_1";
651
651
  const textStyles = {
652
652
  text: text$2
653
653
  };
654
- const icon$2 = "_icon_19g82_1";
655
- const styles$p = {
656
- icon: icon$2
654
+ const icon$3 = "_icon_19g82_1";
655
+ const styles$q = {
656
+ icon: icon$3
657
657
  };
658
658
  const ElmInlineIcon = qwik.component$(({ src, alt }) => {
659
659
  return /* @__PURE__ */ jsxRuntime.jsx("span", {
660
- class: styles$p.icon,
660
+ class: styles$q.icon,
661
661
  children: /* @__PURE__ */ jsxRuntime.jsx("img", {
662
662
  src,
663
663
  alt,
664
- class: styles$p.icon
664
+ class: styles$q.icon
665
665
  })
666
666
  });
667
667
  });
@@ -672,7 +672,7 @@ const ElmInlineText = qwik.component$((props) => {
672
672
  }) : /* @__PURE__ */ jsxRuntime.jsx(qwik.Slot, {});
673
673
  if (props.kbd) {
674
674
  vnode = /* @__PURE__ */ jsxRuntime.jsx("kbd", {
675
- class: styles$q.kbd,
675
+ class: styles$r.kbd,
676
676
  children: vnode
677
677
  });
678
678
  }
@@ -698,13 +698,13 @@ const ElmInlineText = qwik.component$((props) => {
698
698
  }
699
699
  if (code2) {
700
700
  vnode = /* @__PURE__ */ jsxRuntime.jsx("code", {
701
- class: styles$q.code,
701
+ class: styles$r.code,
702
702
  children: vnode
703
703
  });
704
704
  }
705
705
  if (props.ruby) {
706
706
  vnode = /* @__PURE__ */ jsxRuntime.jsxs("ruby", {
707
- class: styles$q.text,
707
+ class: styles$r.text,
708
708
  children: [
709
709
  /* @__PURE__ */ jsxRuntime.jsx("span", {
710
710
  children: vnode
@@ -717,7 +717,7 @@ const ElmInlineText = qwik.component$((props) => {
717
717
  }
718
718
  const wrappedVnode = /* @__PURE__ */ jsxRuntime.jsx("span", {
719
719
  class: [
720
- styles$q.text,
720
+ styles$r.text,
721
721
  textStyles.text
722
722
  ],
723
723
  style: {
@@ -729,7 +729,7 @@ const ElmInlineText = qwik.component$((props) => {
729
729
  });
730
730
  if (props.href) {
731
731
  return /* @__PURE__ */ jsxRuntime.jsxs("a", {
732
- class: styles$q.link,
732
+ class: styles$r.link,
733
733
  href: props.href,
734
734
  style: {
735
735
  "--font-size": size
@@ -747,7 +747,7 @@ const ElmInlineText = qwik.component$((props) => {
747
747
  return wrappedVnode;
748
748
  });
749
749
  const code = "_code_1sw1e_1";
750
- const styles$o = {
750
+ const styles$p = {
751
751
  code
752
752
  };
753
753
  const ElmShikiHighlighter = qwik.component$(({ code: code2, language = "txt" }) => {
@@ -772,7 +772,7 @@ const ElmShikiHighlighter = qwik.component$(({ code: code2, language = "txt" })
772
772
  }
773
773
  });
774
774
  return /* @__PURE__ */ jsxRuntime.jsx("pre", {
775
- class: styles$o.code,
775
+ class: styles$p.code,
776
776
  dangerouslySetInnerHTML: rawHtml.value
777
777
  });
778
778
  });
@@ -791,19 +791,19 @@ const ElmCodeBlock = qwik.component$(({ code: code2, language = "txt", caption:
791
791
  }
792
792
  });
793
793
  return /* @__PURE__ */ jsxRuntime.jsxs("figure", {
794
- class: styles$t["code-block"],
794
+ class: styles$u["code-block"],
795
795
  style: {
796
796
  margin
797
797
  },
798
798
  children: [
799
799
  /* @__PURE__ */ jsxRuntime.jsx("span", {
800
- class: styles$t["language-icon"],
800
+ class: styles$u["language-icon"],
801
801
  children: /* @__PURE__ */ jsxRuntime.jsx(ElmLanguageIcon, {
802
802
  language
803
803
  })
804
804
  }),
805
805
  /* @__PURE__ */ jsxRuntime.jsx("span", {
806
- class: styles$t.caption,
806
+ class: styles$u.caption,
807
807
  children: /* @__PURE__ */ jsxRuntime.jsxs(ElmInlineText, {
808
808
  children: [
809
809
  caption2 || language,
@@ -812,7 +812,7 @@ const ElmCodeBlock = qwik.component$(({ code: code2, language = "txt", caption:
812
812
  })
813
813
  }),
814
814
  /* @__PURE__ */ jsxRuntime.jsx("div", {
815
- class: styles$t["copy-icon"],
815
+ class: styles$u["copy-icon"],
816
816
  onClick$: copyToClipboard,
817
817
  children: /* @__PURE__ */ jsxRuntime.jsx(ElmMdiIcon, {
818
818
  size: "1.25rem",
@@ -821,10 +821,10 @@ const ElmCodeBlock = qwik.component$(({ code: code2, language = "txt", caption:
821
821
  })
822
822
  }),
823
823
  /* @__PURE__ */ jsxRuntime.jsx("hr", {
824
- class: styles$t.divider
824
+ class: styles$u.divider
825
825
  }),
826
826
  /* @__PURE__ */ jsxRuntime.jsx("div", {
827
- class: styles$t.code,
827
+ class: styles$u.code,
828
828
  children: /* @__PURE__ */ jsxRuntime.jsx(ElmShikiHighlighter, {
829
829
  code: code2,
830
830
  language
@@ -844,7 +844,7 @@ const ElmKatex = qwik.component$(({ expression, block = false }) => {
844
844
  });
845
845
  });
846
846
  const parallax = "_parallax_1kb0k_1";
847
- const styles$n = {
847
+ const styles$o = {
848
848
  "parallax-watcher": "_parallax-watcher_1kb0k_1",
849
849
  parallax
850
850
  };
@@ -853,13 +853,13 @@ const ElmParallax = qwik.component$(({ images }) => {
853
853
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
854
854
  children: [
855
855
  /* @__PURE__ */ jsxRuntime.jsx("div", {
856
- class: styles$n["parallax-watcher"],
856
+ class: styles$o["parallax-watcher"],
857
857
  "window:onScroll$": () => {
858
858
  y.value = window.scrollY;
859
859
  }
860
860
  }),
861
861
  images.map((image2, index) => /* @__PURE__ */ jsxRuntime.jsx("div", {
862
- class: styles$n.parallax,
862
+ class: styles$o.parallax,
863
863
  style: {
864
864
  backgroundImage: `url(${image2})`,
865
865
  transform: `scale(1.2) translateY(${y.value / (1e3 * (index + 1))}%)`,
@@ -873,7 +873,7 @@ const toggle = "_toggle_1nxqa_1";
873
873
  const summary = "_summary_1nxqa_14";
874
874
  const content$2 = "_content_1nxqa_60";
875
875
  const footer = "_footer_1nxqa_80";
876
- const styles$m = {
876
+ const styles$n = {
877
877
  toggle,
878
878
  "toggle-closed": "_toggle-closed_1nxqa_7",
879
879
  "toggle-open": "_toggle-open_1nxqa_10",
@@ -901,29 +901,29 @@ const ElmToggle = qwik.component$(({ summary: summary2 }) => {
901
901
  });
902
902
  return /* @__PURE__ */ jsxRuntime.jsxs("div", {
903
903
  class: [
904
- styles$m.toggle,
904
+ styles$n.toggle,
905
905
  {
906
- [styles$m["toggle-open"]]: isOpen.value,
907
- [styles$m["toggle-closed"]]: !isOpen.value
906
+ [styles$n["toggle-open"]]: isOpen.value,
907
+ [styles$n["toggle-closed"]]: !isOpen.value
908
908
  }
909
909
  ],
910
910
  children: [
911
911
  /* @__PURE__ */ jsxRuntime.jsxs("div", {
912
912
  class: [
913
- styles$m.summary,
913
+ styles$n.summary,
914
914
  {
915
- [styles$m["summary-open"]]: isOpen.value,
916
- [styles$m["summary-closed"]]: !isOpen.value
915
+ [styles$n["summary-open"]]: isOpen.value,
916
+ [styles$n["summary-closed"]]: !isOpen.value
917
917
  }
918
918
  ],
919
919
  onClick$: toggle2,
920
920
  children: [
921
921
  /* @__PURE__ */ jsxRuntime.jsx("span", {
922
922
  class: [
923
- styles$m["chevron-icon"],
923
+ styles$n["chevron-icon"],
924
924
  {
925
- [styles$m["chevron-icon-open"]]: isOpen.value,
926
- [styles$m["chevron-icon-closed"]]: !isOpen.value
925
+ [styles$n["chevron-icon-open"]]: isOpen.value,
926
+ [styles$n["chevron-icon-closed"]]: !isOpen.value
927
927
  }
928
928
  ],
929
929
  children: /* @__PURE__ */ jsxRuntime.jsx(ElmMdiIcon, {
@@ -931,17 +931,17 @@ const ElmToggle = qwik.component$(({ summary: summary2 }) => {
931
931
  })
932
932
  }),
933
933
  /* @__PURE__ */ jsxRuntime.jsx("span", {
934
- class: styles$m["summary-text"],
934
+ class: styles$n["summary-text"],
935
935
  children: summary2 ? summary2 : /* @__PURE__ */ jsxRuntime.jsx(qwik.Slot, {
936
936
  name: "summary"
937
937
  })
938
938
  }),
939
939
  /* @__PURE__ */ jsxRuntime.jsx("span", {
940
940
  class: [
941
- styles$m["plus-icon"],
941
+ styles$n["plus-icon"],
942
942
  {
943
- [styles$m["plus-icon-open"]]: isOpen.value,
944
- [styles$m["plus-icon-closed"]]: !isOpen.value
943
+ [styles$n["plus-icon-open"]]: isOpen.value,
944
+ [styles$n["plus-icon-closed"]]: !isOpen.value
945
945
  }
946
946
  ],
947
947
  children: /* @__PURE__ */ jsxRuntime.jsx(ElmMdiIcon, {
@@ -954,30 +954,30 @@ const ElmToggle = qwik.component$(({ summary: summary2 }) => {
954
954
  }),
955
955
  /* @__PURE__ */ jsxRuntime.jsx("div", {
956
956
  class: [
957
- styles$m.content,
957
+ styles$n.content,
958
958
  {
959
- [styles$m["content-open"]]: isOpen.value,
960
- [styles$m["content-closed"]]: !isOpen.value
959
+ [styles$n["content-open"]]: isOpen.value,
960
+ [styles$n["content-closed"]]: !isOpen.value
961
961
  }
962
962
  ],
963
963
  children: /* @__PURE__ */ jsxRuntime.jsx(qwik.Slot, {})
964
964
  }),
965
965
  /* @__PURE__ */ jsxRuntime.jsxs("div", {
966
- class: styles$m.footer,
966
+ class: styles$n.footer,
967
967
  onClick$: toggle2,
968
968
  children: [
969
969
  /* @__PURE__ */ jsxRuntime.jsx("span", {
970
- class: styles$m["footer-chevron-icon"],
970
+ class: styles$n["footer-chevron-icon"],
971
971
  children: /* @__PURE__ */ jsxRuntime.jsx(ElmMdiIcon, {
972
972
  d: js.mdiChevronRight,
973
973
  color: "gray"
974
974
  })
975
975
  }),
976
976
  /* @__PURE__ */ jsxRuntime.jsx("hr", {
977
- class: styles$m["footer-line"]
977
+ class: styles$n["footer-line"]
978
978
  }),
979
979
  /* @__PURE__ */ jsxRuntime.jsx("span", {
980
- class: styles$m["footer-cross-icon"],
980
+ class: styles$n["footer-cross-icon"],
981
981
  children: /* @__PURE__ */ jsxRuntime.jsx(ElmMdiIcon, {
982
982
  d: js.mdiPlus,
983
983
  color: "#c56565"
@@ -987,17 +987,17 @@ const ElmToggle = qwik.component$(({ summary: summary2 }) => {
987
987
  children: "CLOSE"
988
988
  }),
989
989
  /* @__PURE__ */ jsxRuntime.jsx("span", {
990
- class: styles$m["footer-cross-icon"],
990
+ class: styles$n["footer-cross-icon"],
991
991
  children: /* @__PURE__ */ jsxRuntime.jsx(ElmMdiIcon, {
992
992
  d: js.mdiPlus,
993
993
  color: "#c56565"
994
994
  })
995
995
  }),
996
996
  /* @__PURE__ */ jsxRuntime.jsx("hr", {
997
- class: styles$m["footer-line"]
997
+ class: styles$n["footer-line"]
998
998
  }),
999
999
  /* @__PURE__ */ jsxRuntime.jsx("span", {
1000
- class: styles$m["footer-chevron-icon"],
1000
+ class: styles$n["footer-chevron-icon"],
1001
1001
  children: /* @__PURE__ */ jsxRuntime.jsx(ElmMdiIcon, {
1002
1002
  d: js.mdiChevronRight,
1003
1003
  color: "gray"
@@ -1008,50 +1008,50 @@ const ElmToggle = qwik.component$(({ summary: summary2 }) => {
1008
1008
  ]
1009
1009
  });
1010
1010
  });
1011
- const styles$l = {
1011
+ const styles$m = {
1012
1012
  "block-fallback": "_block-fallback_rt986_1"
1013
1013
  };
1014
- const wrapper$1 = "_wrapper_1yktj_12";
1014
+ const wrapper$2 = "_wrapper_1yktj_12";
1015
1015
  const dot = "_dot_1yktj_22";
1016
- const styles$k = {
1017
- wrapper: wrapper$1,
1016
+ const styles$l = {
1017
+ wrapper: wrapper$2,
1018
1018
  dot
1019
1019
  };
1020
1020
  const ElmDotLoadingIcon = qwik.component$(({ size = "4em", color = "#606875" }) => {
1021
1021
  return /* @__PURE__ */ jsxRuntime.jsxs("div", {
1022
- class: styles$k.wrapper,
1022
+ class: styles$l.wrapper,
1023
1023
  style: {
1024
1024
  "--size": size,
1025
1025
  "--color": color
1026
1026
  },
1027
1027
  children: [
1028
1028
  /* @__PURE__ */ jsxRuntime.jsx("div", {
1029
- class: styles$k.dot,
1029
+ class: styles$l.dot,
1030
1030
  "aria-hidden": "true"
1031
1031
  }),
1032
1032
  /* @__PURE__ */ jsxRuntime.jsx("div", {
1033
- class: styles$k.dot,
1033
+ class: styles$l.dot,
1034
1034
  "aria-hidden": "true"
1035
1035
  }),
1036
1036
  /* @__PURE__ */ jsxRuntime.jsx("div", {
1037
- class: styles$k.dot,
1037
+ class: styles$l.dot,
1038
1038
  "aria-hidden": "true"
1039
1039
  })
1040
1040
  ]
1041
1041
  });
1042
1042
  });
1043
- const styles$j = {
1043
+ const styles$k = {
1044
1044
  "rectangle-wave": "_rectangle-wave_hej9g_17"
1045
1045
  };
1046
1046
  const ElmRectangleWave = qwik.component$(() => {
1047
1047
  return /* @__PURE__ */ jsxRuntime.jsx("div", {
1048
1048
  "aria-hidden": "true",
1049
- class: styles$j["rectangle-wave"]
1049
+ class: styles$k["rectangle-wave"]
1050
1050
  });
1051
1051
  });
1052
1052
  const ElmBlockFallback = qwik.component$(({ height = "16rem" }) => {
1053
1053
  return /* @__PURE__ */ jsxRuntime.jsxs("div", {
1054
- class: styles$l["block-fallback"],
1054
+ class: styles$m["block-fallback"],
1055
1055
  style: {
1056
1056
  "--height": height
1057
1057
  },
@@ -1061,6 +1061,153 @@ const ElmBlockFallback = qwik.component$(({ height = "16rem" }) => {
1061
1061
  ]
1062
1062
  });
1063
1063
  });
1064
+ const loading = "_loading_1yj0v_19";
1065
+ const wrapper$1 = "_wrapper_1yj0v_33";
1066
+ const active = "_active_1yj0v_55";
1067
+ const header$1 = "_header_1yj0v_59";
1068
+ const label = "_label_1yj0v_67";
1069
+ const requierd = "_requierd_1yj0v_82";
1070
+ const body$1 = "_body_1yj0v_88";
1071
+ const input = "_input_1yj0v_109";
1072
+ const icon$2 = "_icon_1yj0v_136";
1073
+ const suffix = "_suffix_1yj0v_153";
1074
+ const styles$j = {
1075
+ loading,
1076
+ wrapper: wrapper$1,
1077
+ active,
1078
+ header: header$1,
1079
+ label,
1080
+ requierd,
1081
+ body: body$1,
1082
+ input,
1083
+ "icon-box": "_icon-box_1yj0v_136",
1084
+ icon: icon$2,
1085
+ suffix
1086
+ };
1087
+ const ElmTextField = qwik.component$((props) => {
1088
+ const id = qwik.useId();
1089
+ const isFocused = qwik.useSignal(false);
1090
+ const inputType = qwik.useSignal(props.isPassword ? "password" : "text");
1091
+ const internalValue = qwik.useSignal("");
1092
+ const input2 = props.value ?? internalValue;
1093
+ const handleDelete = qwik.$(() => {
1094
+ if (!props.loading && !props.disabled) {
1095
+ input2.value = "";
1096
+ }
1097
+ });
1098
+ const handleVisibleSwitch = qwik.$(() => {
1099
+ if (!props.loading && !props.disabled) {
1100
+ inputType.value = inputType.value === "text" ? "password" : "text";
1101
+ }
1102
+ });
1103
+ const iconMap = {
1104
+ text: js.mdiText,
1105
+ pen: js.mdiPen,
1106
+ email: js.mdiEmail,
1107
+ user: js.mdiAccount,
1108
+ lock: js.mdiLock,
1109
+ key: js.mdiKey,
1110
+ earth: js.mdiEarth,
1111
+ tag: js.mdiTag,
1112
+ archive: js.mdiArchive,
1113
+ link: js.mdiLinkVariant,
1114
+ search: js.mdiMagnify
1115
+ };
1116
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", {
1117
+ class: [
1118
+ styles$j.wrapper,
1119
+ isFocused.value && styles$j.active
1120
+ ],
1121
+ style: {
1122
+ backgroundColor: props.disabled || props.loading ? "rgba(0,0,0,0.15)" : void 0,
1123
+ "--highlight-color": isFocused.value ? "#bfa056" : void 0
1124
+ },
1125
+ children: [
1126
+ /* @__PURE__ */ jsxRuntime.jsxs("div", {
1127
+ class: styles$j.header,
1128
+ children: [
1129
+ /* @__PURE__ */ jsxRuntime.jsxs("label", {
1130
+ for: id,
1131
+ class: styles$j.label,
1132
+ children: [
1133
+ /* @__PURE__ */ jsxRuntime.jsx("span", {
1134
+ children: props.label
1135
+ }),
1136
+ props.required && /* @__PURE__ */ jsxRuntime.jsx("span", {
1137
+ class: styles$j.requierd,
1138
+ children: "*"
1139
+ })
1140
+ ]
1141
+ }),
1142
+ props.maxLength != null && /* @__PURE__ */ jsxRuntime.jsx(ElmInlineText, {
1143
+ text: `${input2.value.length} / ${props.maxLength}`,
1144
+ color: input2.value.length > props.maxLength ? "#c56565" : "gray",
1145
+ size: "0.75rem"
1146
+ })
1147
+ ]
1148
+ }),
1149
+ /* @__PURE__ */ jsxRuntime.jsxs("div", {
1150
+ class: styles$j.body,
1151
+ children: [
1152
+ props.icon && /* @__PURE__ */ jsxRuntime.jsx(ElmMdiIcon, {
1153
+ d: iconMap[props.icon],
1154
+ size: "1.5rem",
1155
+ color: "gray"
1156
+ }),
1157
+ /* @__PURE__ */ jsxRuntime.jsx("input", {
1158
+ id,
1159
+ "bind:value": input2,
1160
+ type: inputType.value,
1161
+ class: styles$j.input,
1162
+ placeholder: props.placeholder,
1163
+ onFocus$: () => isFocused.value = true,
1164
+ onBlur$: () => isFocused.value = false,
1165
+ disabled: props.disabled || props.loading,
1166
+ style: {
1167
+ cursor: props.disabled ? "not-allowed" : props.loading ? "progress" : "auto"
1168
+ },
1169
+ "aria-required": props.required
1170
+ }),
1171
+ /* @__PURE__ */ jsxRuntime.jsxs("div", {
1172
+ class: styles$j["icon-box"],
1173
+ children: [
1174
+ /* @__PURE__ */ jsxRuntime.jsx("span", {
1175
+ class: styles$j.suffix,
1176
+ children: props.suffix != null && /* @__PURE__ */ jsxRuntime.jsx(ElmInlineText, {
1177
+ text: props.suffix
1178
+ })
1179
+ }),
1180
+ /* @__PURE__ */ jsxRuntime.jsx("div", {
1181
+ class: styles$j.icon,
1182
+ onClick$: handleVisibleSwitch,
1183
+ children: /* @__PURE__ */ jsxRuntime.jsx(ElmMdiIcon, {
1184
+ d: inputType.value === "text" ? js.mdiEyeOutline : js.mdiEyeOffOutline,
1185
+ size: "1.75em",
1186
+ color: "gray"
1187
+ })
1188
+ }),
1189
+ /* @__PURE__ */ jsxRuntime.jsx("div", {
1190
+ class: styles$j.icon,
1191
+ onClick$: handleDelete,
1192
+ children: /* @__PURE__ */ jsxRuntime.jsx(ElmMdiIcon, {
1193
+ d: js.mdiBackspaceOutline,
1194
+ size: "1.75em",
1195
+ color: "gray"
1196
+ })
1197
+ })
1198
+ ]
1199
+ })
1200
+ ]
1201
+ }),
1202
+ /* @__PURE__ */ jsxRuntime.jsx("div", {
1203
+ class: styles$j.loading,
1204
+ style: {
1205
+ opacity: props.loading ? 0.2 : 0
1206
+ }
1207
+ })
1208
+ ]
1209
+ });
1210
+ });
1064
1211
  const LOCAL_STORAGE_KEY = "elmethis-theme";
1065
1212
  function useElmethisTheme() {
1066
1213
  const isDarkTheme = qwik.useSignal(false);
@@ -1085,13 +1232,18 @@ function useElmethisTheme() {
1085
1232
  }
1086
1233
  }));
1087
1234
  qwik.useVisibleTask$(() => {
1088
- const currentTheme = document.documentElement.getAttribute("data-theme");
1089
- if (currentTheme != null) {
1090
- isDarkTheme.value = currentTheme === "dark";
1235
+ const localStorageTheme = localStorage.getItem(LOCAL_STORAGE_KEY);
1236
+ if (localStorageTheme != null) {
1237
+ isDarkTheme.value = localStorageTheme === "dark";
1238
+ document.documentElement.setAttribute("data-theme", localStorageTheme);
1239
+ const body2 = document.querySelector("body");
1240
+ if (body2 != null) {
1241
+ body2.style.colorScheme = localStorageTheme;
1242
+ }
1091
1243
  } else {
1092
- const localStorageTheme = localStorage.getItem(LOCAL_STORAGE_KEY);
1093
- if (localStorageTheme != null) {
1094
- isDarkTheme.value = localStorageTheme === "dark";
1244
+ const currentTheme = document.documentElement.getAttribute("data-theme");
1245
+ if (currentTheme != null) {
1246
+ isDarkTheme.value = currentTheme === "dark";
1095
1247
  }
1096
1248
  }
1097
1249
  }, {
@@ -2634,5 +2786,6 @@ exports.ElmTableBody = ElmTableBody;
2634
2786
  exports.ElmTableCell = ElmTableCell;
2635
2787
  exports.ElmTableHeader = ElmTableHeader;
2636
2788
  exports.ElmTableRow = ElmTableRow;
2789
+ exports.ElmTextField = ElmTextField;
2637
2790
  exports.ElmToggle = ElmToggle;
2638
2791
  exports.ElmToggleTheme = ElmToggleTheme;