@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/lib/index.cjs.js +3 -3
- package/lib/index.es.js +326 -324
- package/package.json +1 -1
- package/src/components/colorpicker/ColorPicker.vue +8 -1
package/package.json
CHANGED
|
@@ -251,17 +251,24 @@ export default defineComponent({
|
|
|
251
251
|
}
|
|
252
252
|
return;
|
|
253
253
|
}
|
|
254
|
-
|
|
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";
|