dk-plus
Version:
81 lines (80 loc) • 3.33 kB
JavaScript
import p from "./index2.js";
import { openBlock as r, createElementBlock as i, normalizeClass as a, normalizeStyle as s, createElementVNode as l, createCommentVNode as d, withDirectives as t, vModelText as k } from "vue";
import u from "../../_virtual/index.js";
const c = { class: "dk-color-picker-panel_main" }, v = /* @__PURE__ */ l("div", { class: "dk-color-picker-panel_sv-white" }, null, -1), h = /* @__PURE__ */ l("div", { class: "dk-color-picker-panel_sv-black" }, null, -1), m = { class: "dk-color-picker-panel_controls" }, w = { class: "dk-color-picker-panel_preview" }, b = /* @__PURE__ */ l("div", { class: "dk-color-picker-panel_checker" }, null, -1), y = { class: "dk-color-picker-panel_bars" }, f = /* @__PURE__ */ l("div", { class: "dk-color-picker-panel_checker" }, null, -1), D = { class: "dk-color-picker-panel_footer" }, S = ["disabled"];
function T(o, e, B, _, A, H) {
return r(), i("div", {
class: a(["dk-color-picker-panel", { "is-disabled": o.disabled }]),
style: s(o.rootStyle)
}, [
l("div", c, [
l("div", {
ref: "svRef",
class: "dk-color-picker-panel_sv",
style: s(o.svBgStyle),
onMousedown: e[0] || (e[0] = (...n) => o.onSvDown && o.onSvDown(...n)),
onTouchstart: e[1] || (e[1] = (...n) => o.onSvDown && o.onSvDown(...n))
}, [
v,
h,
l("div", {
class: "dk-color-picker-panel_sv-thumb",
style: s(o.svThumbStyle)
}, null, 4)
], 36),
l("div", m, [
l("div", w, [
b,
l("div", {
class: "dk-color-picker-panel_preview-color",
style: s(o.previewStyle)
}, null, 4)
]),
l("div", y, [
l("div", {
ref: "hueRef",
class: "dk-color-picker-panel_bar dk-color-picker-panel_hue",
onMousedown: e[2] || (e[2] = (...n) => o.onHueDown && o.onHueDown(...n)),
onTouchstart: e[3] || (e[3] = (...n) => o.onHueDown && o.onHueDown(...n))
}, [
l("div", {
class: "dk-color-picker-panel_bar-thumb",
style: s(o.hueThumbStyle)
}, null, 4)
], 544),
o.showAlpha ? (r(), i("div", {
key: 0,
ref: "alphaRef",
class: "dk-color-picker-panel_bar dk-color-picker-panel_alpha",
onMousedown: e[4] || (e[4] = (...n) => o.onAlphaDown && o.onAlphaDown(...n)),
onTouchstart: e[5] || (e[5] = (...n) => o.onAlphaDown && o.onAlphaDown(...n))
}, [
f,
l("div", {
class: "dk-color-picker-panel_alpha-bg",
style: s(o.alphaBgStyle)
}, null, 4),
l("div", {
class: "dk-color-picker-panel_bar-thumb",
style: s(o.alphaThumbStyle)
}, null, 4)
], 544)) : d("", !0)
])
])
]),
l("div", D, [
t(l("input", {
"onUpdate:modelValue": e[6] || (e[6] = (n) => o.state.inputText = n),
class: "dk-color-picker-panel_input",
disabled: o.disabled,
onBlur: e[7] || (e[7] = (...n) => o.onInputBlur && o.onInputBlur(...n))
}, null, 40, S), [
[k, o.state.inputText]
])
])
], 6);
}
const R = /* @__PURE__ */ u(p, [["render", T]]);
export {
R as default
};