@luminescent/ui 0.16.5 → 0.17.0

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.
@@ -771,7 +771,7 @@ const ColorInput = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inline
771
771
  const props1 = qwik._restProps(props, [
772
772
  "onInput$",
773
773
  "value",
774
- "presetColors",
774
+ "colors",
775
775
  "preview",
776
776
  "class"
777
777
  ]);
@@ -845,30 +845,16 @@ const ColorInput = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inline
845
845
  onBlur$: qwik._IMMUTABLE
846
846
  }
847
847
  }, 0, "0s_1"),
848
- /* @__PURE__ */ qwik._jsxC(ColorPickerRaw, {
848
+ /* @__PURE__ */ qwik._jsxC(ColorPicker, {
849
849
  get id() {
850
850
  return props1.id;
851
851
  },
852
- get color() {
852
+ get value() {
853
853
  return props.value ?? "#000000";
854
854
  },
855
- colors: [
856
- "#FAEDCB",
857
- "#C9E4DE",
858
- "#C6DEF1",
859
- "#DBCDF0",
860
- "#F2C6DE",
861
- "#FCD05C",
862
- "#5FE2C5",
863
- "#4498DB",
864
- "#9863E7",
865
- "#E43A96",
866
- "#000000",
867
- "#555555",
868
- "#AAAAAA",
869
- "#FFFFFF",
870
- ...props.presetColors ?? []
871
- ],
855
+ get colors() {
856
+ return props.colors;
857
+ },
872
858
  get class() {
873
859
  return {
874
860
  "motion-safe:transition-all absolute top-full mt-2 left-0 gap-1 z-[1000]": true,
@@ -898,15 +884,18 @@ const ColorInput = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inline
898
884
  break;
899
885
  }
900
886
  props2.onInput$?.(color);
901
- }, "ColorInput_component_div_ColorPickerRaw_onInput_wTO4B2czR7s", [
887
+ }, "ColorInput_component_div_ColorPicker_onInput_iZguRdHILBQ", [
902
888
  props1,
903
889
  props
904
890
  ]),
905
891
  [qwik._IMMUTABLE]: {
906
892
  id: qwik._wrapProp(props1, "id"),
907
- color: qwik._fnSignal((p0) => p0.value ?? "#000000", [
893
+ value: qwik._fnSignal((p0) => p0.value ?? "#000000", [
908
894
  props
909
895
  ], 'p0.value??"#000000"'),
896
+ colors: qwik._fnSignal((p0) => p0.colors, [
897
+ props
898
+ ], "p0.colors"),
910
899
  class: qwik._fnSignal((p0) => ({
911
900
  "motion-safe:transition-all absolute top-full mt-2 left-0 gap-1 z-[1000]": true,
912
901
  "opacity-0 scale-95 pointer-events-none": !p0.opened
@@ -917,16 +906,16 @@ const ColorInput = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inline
917
906
  }, 3, "0s_2")
918
907
  ], 1, "0s_3");
919
908
  }, "ColorInput_component_jilGo0Bn3Ps"));
920
- const ColorPickerRaw = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
909
+ const ColorPicker = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
921
910
  const props1 = qwik._restProps(props, [
922
911
  "id",
923
- "color",
912
+ "value",
924
913
  "colors",
925
914
  "onInput$"
926
915
  ]);
927
916
  const width = 125;
928
917
  const maxHue = 148;
929
- const hsvColor = rgbToHsv(hexNumberToRgb(hexStringToNumber(props.color)));
918
+ const hsvColor = rgbToHsv(hexNumberToRgb(hexStringToNumber(props.value ?? "#000000")));
930
919
  const store = qwik.useStore({
931
920
  hue: {
932
921
  position: hsvColor.h * maxHue,
@@ -938,11 +927,11 @@ const ColorPickerRaw = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.in
938
927
  },
939
928
  bPosition: (1 - hsvColor.v) * maxHue,
940
929
  sPosition: hsvColor.s * width,
941
- color: props.color
930
+ value: props.value ?? "#000000"
942
931
  });
943
932
  const setColor = /* @__PURE__ */ qwik.inlinedQrl((color) => {
944
933
  const [maxHue2, props2, store2, width2] = qwik.useLexicalScope();
945
- store2.color = color;
934
+ store2.value = color;
946
935
  const hsv = rgbToHsv(hexNumberToRgb(hexStringToNumber(color)));
947
936
  store2.hue.position = hsv.h * maxHue2;
948
937
  store2.hue.color = rgbToHex(hsvToRgb({
@@ -953,7 +942,7 @@ const ColorPickerRaw = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.in
953
942
  store2.sPosition = hsv.s * width2;
954
943
  store2.bPosition = (1 - hsv.v) * maxHue2;
955
944
  props2.onInput$?.(color);
956
- }, "ColorPickerRaw_component_setColor_KSE5T0GnULs", [
945
+ }, "ColorPicker_component_setColor_dQW0vdqeCN0", [
957
946
  maxHue,
958
947
  props,
959
948
  store,
@@ -963,7 +952,7 @@ const ColorPickerRaw = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.in
963
952
  const [maxHue2, props2, store2] = qwik.useLexicalScope();
964
953
  const { y } = getMousePosition(e);
965
954
  store2.hue.position = clamp(maxHue2 - (y - hOffset), 0, maxHue2);
966
- const hsvColor2 = rgbToHsv(hexNumberToRgb(hexStringToNumber(store2.color)));
955
+ const hsvColor2 = rgbToHsv(hexNumberToRgb(hexStringToNumber(store2.value)));
967
956
  const h = store2.hue.position / maxHue2;
968
957
  hsvColor2.h = h;
969
958
  store2.hue.color = rgbToHex(hsvToRgb({
@@ -971,9 +960,9 @@ const ColorPickerRaw = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.in
971
960
  s: 1,
972
961
  v: 1
973
962
  }));
974
- store2.color = rgbToHex(hsvToRgb(hsvColor2));
975
- props2.onInput$?.(store2.color);
976
- }, "ColorPickerRaw_component_hueChange_za4ruRb84uA", [
963
+ store2.value = rgbToHex(hsvToRgb(hsvColor2));
964
+ props2.onInput$?.(store2.value);
965
+ }, "ColorPicker_component_hueChange_hJtp8803ipI", [
977
966
  maxHue,
978
967
  props,
979
968
  store
@@ -993,7 +982,7 @@ const ColorPickerRaw = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.in
993
982
  };
994
983
  window.addEventListener("mouseup", mouseUpListener);
995
984
  window.addEventListener("touchend", mouseUpListener);
996
- }, "ColorPickerRaw_component_hueMouseDown_IbHBnI0jzpg", [
985
+ }, "ColorPicker_component_hueMouseDown_6A9i0ZBsZm8", [
997
986
  hueChange
998
987
  ]);
999
988
  const sbChange = /* @__PURE__ */ qwik.inlinedQrl((e, hOffset) => {
@@ -1003,13 +992,13 @@ const ColorPickerRaw = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.in
1003
992
  store2.sPosition = clamp(x - hOffset.left, 0, width2);
1004
993
  const s = store2.sPosition / width2;
1005
994
  const v = 1 - store2.bPosition / maxHue2;
1006
- store2.color = rgbToHex(hsvToRgb({
995
+ store2.value = rgbToHex(hsvToRgb({
1007
996
  h: store2.hue.position / maxHue2,
1008
997
  s,
1009
998
  v
1010
999
  }));
1011
- props2.onInput$?.(store2.color);
1012
- }, "ColorPickerRaw_component_sbChange_yhwlg2HYP8Y", [
1000
+ props2.onInput$?.(store2.value);
1001
+ }, "ColorPicker_component_sbChange_0v0ifR3opLw", [
1013
1002
  maxHue,
1014
1003
  props,
1015
1004
  store,
@@ -1030,7 +1019,7 @@ const ColorPickerRaw = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.in
1030
1019
  };
1031
1020
  window.addEventListener("mouseup", mouseUpListener);
1032
1021
  window.addEventListener("touchend", mouseUpListener);
1033
- }, "ColorPickerRaw_component_sbMouseDown_hRgkP7lymfY", [
1022
+ }, "ColorPicker_component_sbMouseDown_hy5wUud5AMs", [
1034
1023
  sbChange
1035
1024
  ]);
1036
1025
  qwik.useOn("change", /* @__PURE__ */ qwik.inlinedQrl(() => {
@@ -1041,7 +1030,7 @@ const ColorPickerRaw = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.in
1041
1030
  if (!inputElement)
1042
1031
  return;
1043
1032
  setColor2(inputElement.value);
1044
- }, "ColorPickerRaw_component_useOn_hsh00WCnzOE", [
1033
+ }, "ColorPicker_component_useOn_M72kyUTBS6Q", [
1045
1034
  props,
1046
1035
  setColor
1047
1036
  ]));
@@ -1078,11 +1067,11 @@ const ColorPickerRaw = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.in
1078
1067
  /* @__PURE__ */ qwik._jsxQ("div", null, {
1079
1068
  class: "absolute -top-2 -left-2 w-4 h-4 border border-white rounded-full bg-white",
1080
1069
  style: qwik._fnSignal((p0) => ({
1081
- background: p0.color,
1070
+ background: p0.value,
1082
1071
  transform: `translate(${p0.sPosition}px, ${p0.bPosition}px)`
1083
1072
  }), [
1084
1073
  store
1085
- ], "{background:p0.color,transform:`translate(${p0.sPosition}px, ${p0.bPosition}px)`}")
1074
+ ], "{background:p0.value,transform:`translate(${p0.sPosition}px, ${p0.bPosition}px)`}")
1086
1075
  }, null, 3, null)
1087
1076
  ], 3, null),
1088
1077
  /* @__PURE__ */ qwik._jsxQ("div", null, {
@@ -1107,20 +1096,35 @@ const ColorPickerRaw = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.in
1107
1096
  /* @__PURE__ */ qwik._jsxQ("div", null, {
1108
1097
  class: "w-[150px] flex flex-wrap gap-1 justify-evenly"
1109
1098
  }, [
1110
- props.colors.map((color, i) => {
1099
+ (props.colors ?? [
1100
+ "#FAEDCB",
1101
+ "#C9E4DE",
1102
+ "#C6DEF1",
1103
+ "#DBCDF0",
1104
+ "#F2C6DE",
1105
+ "#FCD05C",
1106
+ "#5FE2C5",
1107
+ "#4498DB",
1108
+ "#9863E7",
1109
+ "#E43A96",
1110
+ "#000000",
1111
+ "#555555",
1112
+ "#AAAAAA",
1113
+ "#FFFFFF"
1114
+ ]).map((color, i) => {
1111
1115
  return /* @__PURE__ */ qwik._jsxQ("button", {
1112
1116
  style: `background: ${color}`,
1113
1117
  onMouseDown$: /* @__PURE__ */ qwik.inlinedQrl(() => {
1114
1118
  const [color2, setColor2] = qwik.useLexicalScope();
1115
1119
  setColor2(color2);
1116
- }, "ColorPickerRaw_component_div_div_button_onMouseDown_C5tqQYvx7wA", [
1120
+ }, "ColorPicker_component_div_div_button_onMouseDown_Q70JtgqzpdY", [
1117
1121
  color,
1118
1122
  setColor
1119
1123
  ]),
1120
1124
  onTouchStart$: /* @__PURE__ */ qwik.inlinedQrl(() => {
1121
1125
  const [color2, setColor2] = qwik.useLexicalScope();
1122
1126
  setColor2(color2);
1123
- }, "ColorPickerRaw_component_div_div_button_onTouchStart_qgiiO8Blb88", [
1127
+ }, "ColorPicker_component_div_div_button_onTouchStart_m0QkWI0vvWo", [
1124
1128
  color,
1125
1129
  setColor
1126
1130
  ])
@@ -1138,14 +1142,14 @@ const ColorPickerRaw = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.in
1138
1142
  const [setColor2] = qwik.useLexicalScope();
1139
1143
  const color = `#${Math.floor(Math.random() * 16777215).toString(16)}`;
1140
1144
  setColor2(color);
1141
- }, "ColorPickerRaw_component_div_div_button_onMouseDown_1_30vaDl3iDKc", [
1145
+ }, "ColorPicker_component_div_div_button_onMouseDown_1_BkgpnioHbWM", [
1142
1146
  setColor
1143
1147
  ]),
1144
1148
  onTouchStart$: /* @__PURE__ */ qwik.inlinedQrl(() => {
1145
1149
  const [setColor2] = qwik.useLexicalScope();
1146
1150
  const color = `#${Math.floor(Math.random() * 16777215).toString(16)}`;
1147
1151
  setColor2(color);
1148
- }, "ColorPickerRaw_component_div_div_button_onTouchStart_1_w30s4j6SxyE", [
1152
+ }, "ColorPicker_component_div_div_button_onTouchStart_1_WXsfg0rO47c", [
1149
1153
  setColor
1150
1154
  ])
1151
1155
  }, /* @__PURE__ */ qwik._jsxC(Shuffle, {
@@ -1156,7 +1160,7 @@ const ColorPickerRaw = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.in
1156
1160
  }, 3, "0s_4"), 1, null)
1157
1161
  ], 1, null)
1158
1162
  ], 1, "0s_5");
1159
- }, "ColorPickerRaw_component_CWQPPcezhyA"));
1163
+ }, "ColorPicker_component_01s3C1v6iWI"));
1160
1164
  const ChevronDown = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
1161
1165
  return /* @__PURE__ */ qwik._jsxS("svg", {
1162
1166
  xmlns: "http://www.w3.org/2000/svg",
@@ -2718,7 +2722,7 @@ exports.Button = Button;
2718
2722
  exports.ButtonAnchor = ButtonAnchor;
2719
2723
  exports.Card = Card;
2720
2724
  exports.ColorInput = ColorInput;
2721
- exports.ColorPickerRaw = ColorPickerRaw;
2725
+ exports.ColorPicker = ColorPicker;
2722
2726
  exports.Dropdown = Dropdown;
2723
2727
  exports.DropdownRaw = DropdownRaw;
2724
2728
  exports.Header = Header;
@@ -769,7 +769,7 @@ const ColorInput = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((prop
769
769
  const props1 = _restProps(props, [
770
770
  "onInput$",
771
771
  "value",
772
- "presetColors",
772
+ "colors",
773
773
  "preview",
774
774
  "class"
775
775
  ]);
@@ -843,30 +843,16 @@ const ColorInput = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((prop
843
843
  onBlur$: _IMMUTABLE
844
844
  }
845
845
  }, 0, "0s_1"),
846
- /* @__PURE__ */ _jsxC(ColorPickerRaw, {
846
+ /* @__PURE__ */ _jsxC(ColorPicker, {
847
847
  get id() {
848
848
  return props1.id;
849
849
  },
850
- get color() {
850
+ get value() {
851
851
  return props.value ?? "#000000";
852
852
  },
853
- colors: [
854
- "#FAEDCB",
855
- "#C9E4DE",
856
- "#C6DEF1",
857
- "#DBCDF0",
858
- "#F2C6DE",
859
- "#FCD05C",
860
- "#5FE2C5",
861
- "#4498DB",
862
- "#9863E7",
863
- "#E43A96",
864
- "#000000",
865
- "#555555",
866
- "#AAAAAA",
867
- "#FFFFFF",
868
- ...props.presetColors ?? []
869
- ],
853
+ get colors() {
854
+ return props.colors;
855
+ },
870
856
  get class() {
871
857
  return {
872
858
  "motion-safe:transition-all absolute top-full mt-2 left-0 gap-1 z-[1000]": true,
@@ -896,15 +882,18 @@ const ColorInput = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((prop
896
882
  break;
897
883
  }
898
884
  props2.onInput$?.(color);
899
- }, "ColorInput_component_div_ColorPickerRaw_onInput_wTO4B2czR7s", [
885
+ }, "ColorInput_component_div_ColorPicker_onInput_iZguRdHILBQ", [
900
886
  props1,
901
887
  props
902
888
  ]),
903
889
  [_IMMUTABLE]: {
904
890
  id: _wrapProp(props1, "id"),
905
- color: _fnSignal((p0) => p0.value ?? "#000000", [
891
+ value: _fnSignal((p0) => p0.value ?? "#000000", [
906
892
  props
907
893
  ], 'p0.value??"#000000"'),
894
+ colors: _fnSignal((p0) => p0.colors, [
895
+ props
896
+ ], "p0.colors"),
908
897
  class: _fnSignal((p0) => ({
909
898
  "motion-safe:transition-all absolute top-full mt-2 left-0 gap-1 z-[1000]": true,
910
899
  "opacity-0 scale-95 pointer-events-none": !p0.opened
@@ -915,16 +904,16 @@ const ColorInput = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((prop
915
904
  }, 3, "0s_2")
916
905
  ], 1, "0s_3");
917
906
  }, "ColorInput_component_jilGo0Bn3Ps"));
918
- const ColorPickerRaw = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
907
+ const ColorPicker = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
919
908
  const props1 = _restProps(props, [
920
909
  "id",
921
- "color",
910
+ "value",
922
911
  "colors",
923
912
  "onInput$"
924
913
  ]);
925
914
  const width = 125;
926
915
  const maxHue = 148;
927
- const hsvColor = rgbToHsv(hexNumberToRgb(hexStringToNumber(props.color)));
916
+ const hsvColor = rgbToHsv(hexNumberToRgb(hexStringToNumber(props.value ?? "#000000")));
928
917
  const store = useStore({
929
918
  hue: {
930
919
  position: hsvColor.h * maxHue,
@@ -936,11 +925,11 @@ const ColorPickerRaw = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((
936
925
  },
937
926
  bPosition: (1 - hsvColor.v) * maxHue,
938
927
  sPosition: hsvColor.s * width,
939
- color: props.color
928
+ value: props.value ?? "#000000"
940
929
  });
941
930
  const setColor = /* @__PURE__ */ inlinedQrl((color) => {
942
931
  const [maxHue2, props2, store2, width2] = useLexicalScope();
943
- store2.color = color;
932
+ store2.value = color;
944
933
  const hsv = rgbToHsv(hexNumberToRgb(hexStringToNumber(color)));
945
934
  store2.hue.position = hsv.h * maxHue2;
946
935
  store2.hue.color = rgbToHex(hsvToRgb({
@@ -951,7 +940,7 @@ const ColorPickerRaw = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((
951
940
  store2.sPosition = hsv.s * width2;
952
941
  store2.bPosition = (1 - hsv.v) * maxHue2;
953
942
  props2.onInput$?.(color);
954
- }, "ColorPickerRaw_component_setColor_KSE5T0GnULs", [
943
+ }, "ColorPicker_component_setColor_dQW0vdqeCN0", [
955
944
  maxHue,
956
945
  props,
957
946
  store,
@@ -961,7 +950,7 @@ const ColorPickerRaw = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((
961
950
  const [maxHue2, props2, store2] = useLexicalScope();
962
951
  const { y } = getMousePosition(e);
963
952
  store2.hue.position = clamp(maxHue2 - (y - hOffset), 0, maxHue2);
964
- const hsvColor2 = rgbToHsv(hexNumberToRgb(hexStringToNumber(store2.color)));
953
+ const hsvColor2 = rgbToHsv(hexNumberToRgb(hexStringToNumber(store2.value)));
965
954
  const h = store2.hue.position / maxHue2;
966
955
  hsvColor2.h = h;
967
956
  store2.hue.color = rgbToHex(hsvToRgb({
@@ -969,9 +958,9 @@ const ColorPickerRaw = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((
969
958
  s: 1,
970
959
  v: 1
971
960
  }));
972
- store2.color = rgbToHex(hsvToRgb(hsvColor2));
973
- props2.onInput$?.(store2.color);
974
- }, "ColorPickerRaw_component_hueChange_za4ruRb84uA", [
961
+ store2.value = rgbToHex(hsvToRgb(hsvColor2));
962
+ props2.onInput$?.(store2.value);
963
+ }, "ColorPicker_component_hueChange_hJtp8803ipI", [
975
964
  maxHue,
976
965
  props,
977
966
  store
@@ -991,7 +980,7 @@ const ColorPickerRaw = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((
991
980
  };
992
981
  window.addEventListener("mouseup", mouseUpListener);
993
982
  window.addEventListener("touchend", mouseUpListener);
994
- }, "ColorPickerRaw_component_hueMouseDown_IbHBnI0jzpg", [
983
+ }, "ColorPicker_component_hueMouseDown_6A9i0ZBsZm8", [
995
984
  hueChange
996
985
  ]);
997
986
  const sbChange = /* @__PURE__ */ inlinedQrl((e, hOffset) => {
@@ -1001,13 +990,13 @@ const ColorPickerRaw = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((
1001
990
  store2.sPosition = clamp(x - hOffset.left, 0, width2);
1002
991
  const s = store2.sPosition / width2;
1003
992
  const v = 1 - store2.bPosition / maxHue2;
1004
- store2.color = rgbToHex(hsvToRgb({
993
+ store2.value = rgbToHex(hsvToRgb({
1005
994
  h: store2.hue.position / maxHue2,
1006
995
  s,
1007
996
  v
1008
997
  }));
1009
- props2.onInput$?.(store2.color);
1010
- }, "ColorPickerRaw_component_sbChange_yhwlg2HYP8Y", [
998
+ props2.onInput$?.(store2.value);
999
+ }, "ColorPicker_component_sbChange_0v0ifR3opLw", [
1011
1000
  maxHue,
1012
1001
  props,
1013
1002
  store,
@@ -1028,7 +1017,7 @@ const ColorPickerRaw = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((
1028
1017
  };
1029
1018
  window.addEventListener("mouseup", mouseUpListener);
1030
1019
  window.addEventListener("touchend", mouseUpListener);
1031
- }, "ColorPickerRaw_component_sbMouseDown_hRgkP7lymfY", [
1020
+ }, "ColorPicker_component_sbMouseDown_hy5wUud5AMs", [
1032
1021
  sbChange
1033
1022
  ]);
1034
1023
  useOn("change", /* @__PURE__ */ inlinedQrl(() => {
@@ -1039,7 +1028,7 @@ const ColorPickerRaw = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((
1039
1028
  if (!inputElement)
1040
1029
  return;
1041
1030
  setColor2(inputElement.value);
1042
- }, "ColorPickerRaw_component_useOn_hsh00WCnzOE", [
1031
+ }, "ColorPicker_component_useOn_M72kyUTBS6Q", [
1043
1032
  props,
1044
1033
  setColor
1045
1034
  ]));
@@ -1076,11 +1065,11 @@ const ColorPickerRaw = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((
1076
1065
  /* @__PURE__ */ _jsxQ("div", null, {
1077
1066
  class: "absolute -top-2 -left-2 w-4 h-4 border border-white rounded-full bg-white",
1078
1067
  style: _fnSignal((p0) => ({
1079
- background: p0.color,
1068
+ background: p0.value,
1080
1069
  transform: `translate(${p0.sPosition}px, ${p0.bPosition}px)`
1081
1070
  }), [
1082
1071
  store
1083
- ], "{background:p0.color,transform:`translate(${p0.sPosition}px, ${p0.bPosition}px)`}")
1072
+ ], "{background:p0.value,transform:`translate(${p0.sPosition}px, ${p0.bPosition}px)`}")
1084
1073
  }, null, 3, null)
1085
1074
  ], 3, null),
1086
1075
  /* @__PURE__ */ _jsxQ("div", null, {
@@ -1105,20 +1094,35 @@ const ColorPickerRaw = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((
1105
1094
  /* @__PURE__ */ _jsxQ("div", null, {
1106
1095
  class: "w-[150px] flex flex-wrap gap-1 justify-evenly"
1107
1096
  }, [
1108
- props.colors.map((color, i) => {
1097
+ (props.colors ?? [
1098
+ "#FAEDCB",
1099
+ "#C9E4DE",
1100
+ "#C6DEF1",
1101
+ "#DBCDF0",
1102
+ "#F2C6DE",
1103
+ "#FCD05C",
1104
+ "#5FE2C5",
1105
+ "#4498DB",
1106
+ "#9863E7",
1107
+ "#E43A96",
1108
+ "#000000",
1109
+ "#555555",
1110
+ "#AAAAAA",
1111
+ "#FFFFFF"
1112
+ ]).map((color, i) => {
1109
1113
  return /* @__PURE__ */ _jsxQ("button", {
1110
1114
  style: `background: ${color}`,
1111
1115
  onMouseDown$: /* @__PURE__ */ inlinedQrl(() => {
1112
1116
  const [color2, setColor2] = useLexicalScope();
1113
1117
  setColor2(color2);
1114
- }, "ColorPickerRaw_component_div_div_button_onMouseDown_C5tqQYvx7wA", [
1118
+ }, "ColorPicker_component_div_div_button_onMouseDown_Q70JtgqzpdY", [
1115
1119
  color,
1116
1120
  setColor
1117
1121
  ]),
1118
1122
  onTouchStart$: /* @__PURE__ */ inlinedQrl(() => {
1119
1123
  const [color2, setColor2] = useLexicalScope();
1120
1124
  setColor2(color2);
1121
- }, "ColorPickerRaw_component_div_div_button_onTouchStart_qgiiO8Blb88", [
1125
+ }, "ColorPicker_component_div_div_button_onTouchStart_m0QkWI0vvWo", [
1122
1126
  color,
1123
1127
  setColor
1124
1128
  ])
@@ -1136,14 +1140,14 @@ const ColorPickerRaw = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((
1136
1140
  const [setColor2] = useLexicalScope();
1137
1141
  const color = `#${Math.floor(Math.random() * 16777215).toString(16)}`;
1138
1142
  setColor2(color);
1139
- }, "ColorPickerRaw_component_div_div_button_onMouseDown_1_30vaDl3iDKc", [
1143
+ }, "ColorPicker_component_div_div_button_onMouseDown_1_BkgpnioHbWM", [
1140
1144
  setColor
1141
1145
  ]),
1142
1146
  onTouchStart$: /* @__PURE__ */ inlinedQrl(() => {
1143
1147
  const [setColor2] = useLexicalScope();
1144
1148
  const color = `#${Math.floor(Math.random() * 16777215).toString(16)}`;
1145
1149
  setColor2(color);
1146
- }, "ColorPickerRaw_component_div_div_button_onTouchStart_1_w30s4j6SxyE", [
1150
+ }, "ColorPicker_component_div_div_button_onTouchStart_1_WXsfg0rO47c", [
1147
1151
  setColor
1148
1152
  ])
1149
1153
  }, /* @__PURE__ */ _jsxC(Shuffle, {
@@ -1154,7 +1158,7 @@ const ColorPickerRaw = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((
1154
1158
  }, 3, "0s_4"), 1, null)
1155
1159
  ], 1, null)
1156
1160
  ], 1, "0s_5");
1157
- }, "ColorPickerRaw_component_CWQPPcezhyA"));
1161
+ }, "ColorPicker_component_01s3C1v6iWI"));
1158
1162
  const ChevronDown = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
1159
1163
  return /* @__PURE__ */ _jsxS("svg", {
1160
1164
  xmlns: "http://www.w3.org/2000/svg",
@@ -2717,7 +2721,7 @@ export {
2717
2721
  ButtonAnchor,
2718
2722
  Card,
2719
2723
  ColorInput,
2720
- ColorPickerRaw,
2724
+ ColorPicker,
2721
2725
  Dropdown,
2722
2726
  DropdownRaw,
2723
2727
  Header,
@@ -3,7 +3,7 @@ import type { TextInputRawProps } from './TextInput';
3
3
  export interface ColorInputProps extends Omit<TextInputRawProps, 'onInput$' | 'children'> {
4
4
  onInput$?: QRL<(color: string) => void>;
5
5
  value?: string;
6
- presetColors?: string[];
6
+ colors?: string[];
7
7
  preview?: 'left' | 'right' | 'top' | 'bottom' | 'full';
8
8
  id: string;
9
9
  }
@@ -13,7 +13,7 @@ export interface ColorPickerProps extends Omit<PropsOf<'div'>, 'class' | 'onInpu
13
13
  [key: string]: boolean;
14
14
  };
15
15
  onInput$?: QRL<(color: string) => void>;
16
- color: string;
17
- colors: string[];
16
+ value?: string;
17
+ colors?: string[];
18
18
  }
19
- export declare const ColorPickerRaw: import("@builder.io/qwik").Component<ColorPickerProps>;
19
+ export declare const ColorPicker: import("@builder.io/qwik").Component<ColorPickerProps>;
@@ -1,6 +1,6 @@
1
1
  import type { PropsOf } from '@builder.io/qwik';
2
2
  import { InputColorClasses } from './TextInput';
3
- export interface TextAreaRawProps extends Omit<PropsOf<'textarea'>, 'class' | 'onChange$' | 'onClick$'> {
3
+ export interface TextAreaRawProps extends Omit<PropsOf<'textarea'>, 'class' | 'onClick$'> {
4
4
  class?: {
5
5
  [key: string]: boolean;
6
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luminescent/ui",
3
- "version": "0.16.5",
3
+ "version": "0.17.0",
4
4
  "description": "Luminescent UI library",
5
5
  "main": "./lib/index.qwik.mjs",
6
6
  "qwik": "./lib/index.qwik.mjs",
@@ -41,22 +41,22 @@
41
41
  },
42
42
  "devDependencies": {
43
43
  "@anuragroy/tailwindcss-animate": "^1.0.6",
44
- "@builder.io/qwik": "1.5.4",
45
- "@builder.io/qwik-city": "^1.5.4",
44
+ "@builder.io/qwik": "1.5.6",
45
+ "@builder.io/qwik-city": "^1.5.6",
46
46
  "@types/eslint": "^8.56.10",
47
- "@types/node": "^20.12.11",
48
- "@typescript-eslint/eslint-plugin": "^7.8.0",
49
- "@typescript-eslint/parser": "^7.8.0",
47
+ "@types/node": "^20.14.2",
48
+ "@typescript-eslint/eslint-plugin": "^7.13.0",
49
+ "@typescript-eslint/parser": "^7.13.0",
50
50
  "autoprefixer": "^10.4.19",
51
- "chart.js": "^4.4.2",
51
+ "chart.js": "^4.4.3",
52
52
  "eslint": "^8.57.0",
53
53
  "eslint-plugin-qwik": "latest",
54
54
  "np": "^10.0.5",
55
55
  "postcss": "^8.4.38",
56
- "tailwindcss": "3.4.3",
56
+ "tailwindcss": "3.4.4",
57
57
  "typescript": "5.4.5",
58
58
  "undici": "*",
59
- "vite": "^5.2.11",
59
+ "vite": "^5.2.13",
60
60
  "vite-tsconfig-paths": "^4.3.2"
61
61
  }
62
62
  }
@@ -1,2 +0,0 @@
1
- declare const _default: import("@builder.io/qwik").Component<unknown>;
2
- export default _default;
@@ -1,19 +0,0 @@
1
- import type { JSXChildren, PropsOf } from '@builder.io/qwik';
2
- import type { buttonColorClasses, sizeClasses } from './Button';
3
- interface SelectInputProps extends Omit<PropsOf<'select'>, 'class' | 'size'> {
4
- class?: {
5
- [key: string]: boolean;
6
- };
7
- display?: JSXChildren;
8
- color?: keyof typeof buttonColorClasses;
9
- size?: keyof typeof sizeClasses;
10
- id: string;
11
- values: {
12
- name: JSXChildren;
13
- value: string | number;
14
- color?: keyof typeof buttonColorClasses;
15
- }[];
16
- }
17
- export declare const SelectInput: import("@builder.io/qwik").Component<SelectInputProps>;
18
- export declare const SelectInputRaw: import("@builder.io/qwik").Component<SelectInputProps>;
19
- export {};