@teammodlr/ui-kit 2.3.6 → 2.3.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teammodlr/ui-kit",
3
- "version": "2.3.6",
3
+ "version": "2.3.7",
4
4
  "description": "",
5
5
  "main": "lib/index.cjs.js",
6
6
  "module": "lib/index.es.js",
@@ -251,17 +251,24 @@ export default defineComponent({
251
251
  }
252
252
  return;
253
253
  }
254
- const color = hexToRGB(hexInput.value);
254
+
255
+ let hex = hexInput.value.replace("#", "");
256
+ if (hex.length === 3) {
257
+ hex = hex.split("").map(char => char + char).join("");
258
+ }
259
+ const color = hexToRGB(`#${hex}`);
255
260
  if (color.a === 0) {
256
261
  color.a = 1;
257
262
  opacitySlider.value = 100;
258
263
  }
264
+
259
265
  updateFromHSV(RGBToHSV(color.r, color.g, color.b), color.a);
260
266
  if (modelModifiers.lazy) {
261
267
  emitModelValue();
262
268
  }
263
269
  };
264
270
 
271
+
265
272
  const toggleInherit = () => {
266
273
  if (props.modelValue === "inherit") {
267
274
  hexInput.value = "#FFFFFF";