@memobit/libs 3.1.3 → 3.1.5
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/dist/components/ColorPicker/ColorPicker.css +1 -1
- package/dist/components/ColorPicker/ColorPicker2.js +178 -148
- package/dist/components/ControlPanel/ControlPanelFilter.js +60 -57
- package/dist/components/Drawer/Drawer2.js +65 -54
- package/dist/components/EmojiPicker/EmojiPicker2.js +21 -18
- package/dist/components/EventCalendar/EventCalendar2.js +30 -32
- package/dist/components/IconPicker/IconPicker2.js +28 -25
- package/dist/helpers/VersionInfo.js +1 -1
- package/dist/hooks/useBodyScrollLock.js +17 -21
- package/dist/index.d.ts +10 -0
- package/dist/version.js +2 -2
- package/dist/version.json +4 -4
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
.color-picker{gap:var(--spacing-12);border:1px solid var(--delimiter-color);border-radius:var(--radius);padding:var(--spacing-16);background:var(--card-background-color);flex-direction:column;width:320px;display:flex}.color-picker__preview{border-radius:var(--radius);border:1px solid var(--delimiter-color);width:100%;height:40px}.color-picker__controls{gap:var(--spacing-12);flex-direction:column;display:flex}.color-picker__sv{border-radius:var(--radius);cursor:crosshair;touch-action:none;-webkit-user-select:none;user-select:none;width:100%;height:180px;position:relative;overflow:hidden}.color-picker__sv-white,.color-picker__sv-black{position:absolute;inset:0}.color-picker__sv-white{background:linear-gradient(90deg,#fff,#fff0)}.color-picker__sv-black{background:linear-gradient(#0000,#000)}.color-picker__sv-handle{border:2px solid #fff;border-radius:50%;width:12px;height:12px;position:absolute;transform:translate(-6px,-6px);box-shadow:0 0 0 1px #0000004d}.color-picker__slider input[type=range]{width:100%}.color-picker__mode-toggle{gap:var(--spacing-8);display:flex}.color-picker__mode-toggle .button{padding:6px 10px}.color-picker__mode-toggle .button.is-active{border:1px solid var(--body-accent-color);color:var(--body-accent-color)}.color-picker__fields{gap:var(--spacing-8);grid-template-columns:1fr;display:grid}.color-picker__fields .input-text-wrapper,.color-picker__fields .input-number-wrapper{width:100%}.color-picker__fields--rgb,.color-picker__fields--hsl,.color-picker__fields--hex{grid-template-columns:repeat(3,1fr)}.color-picker__fields--hex .input-text-wrapper{grid-column:span 3}
|
|
1
|
+
.color-picker{gap:var(--spacing-12);border:1px solid var(--delimiter-color);border-radius:var(--radius);padding:var(--spacing-16);background:var(--card-background-color);flex-direction:column;width:320px;display:flex}.color-picker__swatches{gap:var(--spacing-6);flex-direction:column;display:flex}.color-picker__swatches-label{font-size:var(--font-size-xxs);color:var(--body-sub-title-color)}.color-picker__swatches-row{gap:var(--spacing-6);flex-wrap:wrap;display:flex}.color-picker__swatch{width:var(--spacing-20);height:var(--spacing-20);border:1px solid var(--delimiter-color);cursor:pointer;transition:transform var(--transition-fast);border-radius:50%;padding:0}.color-picker__swatch:hover{transform:scale(1.15)}.color-picker__swatch.is-selected{outline:2px solid var(--body-accent-color);outline-offset:2px}.color-picker__preview{border-radius:var(--radius);border:1px solid var(--delimiter-color);width:100%;height:40px}.color-picker__controls{gap:var(--spacing-12);flex-direction:column;display:flex}.color-picker__sv{border-radius:var(--radius);cursor:crosshair;touch-action:none;-webkit-user-select:none;user-select:none;width:100%;height:180px;position:relative;overflow:hidden}.color-picker__sv-white,.color-picker__sv-black{position:absolute;inset:0}.color-picker__sv-white{background:linear-gradient(90deg,#fff,#fff0)}.color-picker__sv-black{background:linear-gradient(#0000,#000)}.color-picker__sv-handle{border:2px solid #fff;border-radius:50%;width:12px;height:12px;position:absolute;transform:translate(-6px,-6px);box-shadow:0 0 0 1px #0000004d}.color-picker__slider input[type=range]{width:100%}.color-picker__mode-toggle{gap:var(--spacing-8);display:flex}.color-picker__mode-toggle .button{padding:6px 10px}.color-picker__mode-toggle .button.is-active{border:1px solid var(--body-accent-color);color:var(--body-accent-color)}.color-picker__fields{gap:var(--spacing-8);grid-template-columns:1fr;display:grid}.color-picker__fields .input-text-wrapper,.color-picker__fields .input-number-wrapper{width:100%}.color-picker__fields--rgb,.color-picker__fields--hsl,.color-picker__fields--hex{grid-template-columns:repeat(3,1fr)}.color-picker__fields--hex .input-text-wrapper{grid-column:span 3}
|
|
@@ -1,250 +1,280 @@
|
|
|
1
1
|
import './ColorPicker.css';
|
|
2
|
-
import { Button as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { Button as H } from "../Button/Button2.js";
|
|
3
|
+
import { Tooltip as G } from "../Tooltip/Tooltip2.js";
|
|
4
|
+
import { InputNumber as N } from "../InputNumber/InputNumber2.js";
|
|
5
|
+
import { InputText as X } from "../InputText/InputText2.js";
|
|
5
6
|
/* empty css */
|
|
6
|
-
import { useEffect as
|
|
7
|
-
import { jsx as
|
|
8
|
-
var
|
|
9
|
-
const
|
|
10
|
-
if (![3, 6].includes(
|
|
11
|
-
const
|
|
12
|
-
return Number.isNaN(
|
|
13
|
-
r:
|
|
14
|
-
g:
|
|
15
|
-
b:
|
|
7
|
+
import { useEffect as Y, useMemo as A, useRef as B, useState as y } from "react";
|
|
8
|
+
import { jsx as d, jsxs as b } from "react/jsx-runtime";
|
|
9
|
+
var k = (t, i, h) => Math.min(h, Math.max(i, t)), x = (t) => {
|
|
10
|
+
const i = t.replace("#", "").trim();
|
|
11
|
+
if (![3, 6].includes(i.length)) return null;
|
|
12
|
+
const h = i.length === 3 ? i.split("").map((s) => s + s).join("") : i, c = parseInt(h, 16);
|
|
13
|
+
return Number.isNaN(c) ? null : {
|
|
14
|
+
r: c >> 16 & 255,
|
|
15
|
+
g: c >> 8 & 255,
|
|
16
|
+
b: c & 255
|
|
16
17
|
};
|
|
17
|
-
}, L = (
|
|
18
|
-
|
|
19
|
-
h
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const
|
|
18
|
+
}, L = (t) => {
|
|
19
|
+
const i = t.trim().replace("#", "").toLowerCase();
|
|
20
|
+
return `#${i.length === 3 ? i.split("").map((h) => h + h).join("") : i}`;
|
|
21
|
+
}, R = ({ r: t, g: i, b: h }) => `#${[
|
|
22
|
+
t,
|
|
23
|
+
i,
|
|
24
|
+
h
|
|
25
|
+
].map((c) => k(Math.round(c), 0, 255).toString(16).padStart(2, "0")).join("")}`, v = ({ r: t, g: i, b: h }) => {
|
|
26
|
+
const c = t / 255, s = i / 255, r = h / 255, o = Math.max(c, s, r), l = o - Math.min(c, s, r);
|
|
27
|
+
let n = 0;
|
|
28
|
+
l !== 0 && (o === c ? n = (s - r) / l % 6 : o === s ? n = (r - c) / l + 2 : n = (c - s) / l + 4, n = Math.round(n * 60), n < 0 && (n += 360));
|
|
29
|
+
const a = o === 0 ? 0 : l / o, m = o;
|
|
26
30
|
return {
|
|
27
|
-
h:
|
|
31
|
+
h: n,
|
|
28
32
|
s: Math.round(a * 100),
|
|
29
|
-
v: Math.round(
|
|
33
|
+
v: Math.round(m * 100)
|
|
30
34
|
};
|
|
31
|
-
},
|
|
32
|
-
const
|
|
33
|
-
let
|
|
34
|
-
return
|
|
35
|
-
r: Math.round((
|
|
36
|
-
g: Math.round((a +
|
|
37
|
-
b: Math.round((
|
|
35
|
+
}, E = ({ h: t, s: i, v: h }) => {
|
|
36
|
+
const c = i / 100, s = h / 100, r = s * c, o = r * (1 - Math.abs(t / 60 % 2 - 1)), l = s - r;
|
|
37
|
+
let n = 0, a = 0, m = 0;
|
|
38
|
+
return t < 60 ? (n = r, a = o) : t < 120 ? (n = o, a = r) : t < 180 ? (a = r, m = o) : t < 240 ? (a = o, m = r) : t < 300 ? (n = o, m = r) : (n = r, m = o), {
|
|
39
|
+
r: Math.round((n + l) * 255),
|
|
40
|
+
g: Math.round((a + l) * 255),
|
|
41
|
+
b: Math.round((m + l) * 255)
|
|
38
42
|
};
|
|
39
|
-
},
|
|
40
|
-
const
|
|
43
|
+
}, F = ({ r: t, g: i, b: h }) => {
|
|
44
|
+
const c = t / 255, s = i / 255, r = h / 255, o = Math.max(c, s, r), l = Math.min(c, s, r), n = o - l;
|
|
41
45
|
let a = 0;
|
|
42
|
-
|
|
43
|
-
const
|
|
46
|
+
n !== 0 && (o === c ? a = (s - r) / n % 6 : o === s ? a = (r - c) / n + 2 : a = (c - s) / n + 4, a = Math.round(a * 60), a < 0 && (a += 360));
|
|
47
|
+
const m = (o + l) / 2, M = n === 0 ? 0 : n / (1 - Math.abs(2 * m - 1));
|
|
44
48
|
return {
|
|
45
49
|
h: a,
|
|
46
|
-
s: Math.round(
|
|
47
|
-
l: Math.round(
|
|
50
|
+
s: Math.round(M * 100),
|
|
51
|
+
l: Math.round(m * 100)
|
|
48
52
|
};
|
|
49
|
-
},
|
|
50
|
-
const
|
|
51
|
-
let
|
|
52
|
-
return
|
|
53
|
-
r: Math.round((
|
|
54
|
-
g: Math.round((a +
|
|
55
|
-
b: Math.round((
|
|
53
|
+
}, T = ({ h: t, s: i, l: h }) => {
|
|
54
|
+
const c = i / 100, s = h / 100, r = (1 - Math.abs(2 * s - 1)) * c, o = r * (1 - Math.abs(t / 60 % 2 - 1)), l = s - r / 2;
|
|
55
|
+
let n = 0, a = 0, m = 0;
|
|
56
|
+
return t < 60 ? (n = r, a = o) : t < 120 ? (n = o, a = r) : t < 180 ? (a = r, m = o) : t < 240 ? (a = o, m = r) : t < 300 ? (n = o, m = r) : (n = r, m = o), {
|
|
57
|
+
r: Math.round((n + l) * 255),
|
|
58
|
+
g: Math.round((a + l) * 255),
|
|
59
|
+
b: Math.round((m + l) * 255)
|
|
56
60
|
};
|
|
57
|
-
},
|
|
58
|
-
const [
|
|
59
|
-
const
|
|
61
|
+
}, Z = ({ value: t = "#4e79a7", onChange: i, swatches: h, swatchesLabel: c = "Already in use" }) => {
|
|
62
|
+
const [s, r] = y("hex"), o = A(() => {
|
|
63
|
+
const e = /* @__PURE__ */ new Set();
|
|
64
|
+
return (h ?? []).forEach((p) => {
|
|
65
|
+
const u = x(p);
|
|
66
|
+
u && e.add(R(u));
|
|
67
|
+
}), [...e];
|
|
68
|
+
}, [h]), [l, n] = y(() => {
|
|
69
|
+
const e = x(t) || {
|
|
60
70
|
r: 78,
|
|
61
71
|
g: 121,
|
|
62
72
|
b: 167
|
|
63
73
|
};
|
|
64
|
-
return
|
|
65
|
-
}),
|
|
66
|
-
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
}, [
|
|
70
|
-
const
|
|
71
|
-
const
|
|
72
|
-
h:
|
|
73
|
-
s:
|
|
74
|
-
v:
|
|
74
|
+
return v(e);
|
|
75
|
+
}), [a, m] = y(() => x(t) ? L(t) : null), M = B(null), S = B(l);
|
|
76
|
+
S.current = l, Y(() => {
|
|
77
|
+
const e = x(t);
|
|
78
|
+
e && (n(v(e)), m(L(t)));
|
|
79
|
+
}, [t]);
|
|
80
|
+
const g = (e) => {
|
|
81
|
+
const p = {
|
|
82
|
+
h: k(e.h, 0, 360),
|
|
83
|
+
s: k(e.s, 0, 100),
|
|
84
|
+
v: k(e.v, 0, 100)
|
|
75
85
|
};
|
|
76
|
-
|
|
77
|
-
const u =
|
|
78
|
-
|
|
79
|
-
},
|
|
80
|
-
const
|
|
86
|
+
n(p), m(null);
|
|
87
|
+
const u = R(E(p));
|
|
88
|
+
i?.(u);
|
|
89
|
+
}, $ = (e) => {
|
|
90
|
+
const p = x(e);
|
|
91
|
+
p && (n(v(p)), m(L(e)), i?.(e));
|
|
92
|
+
}, j = (e, p) => {
|
|
93
|
+
const u = M.current?.getBoundingClientRect();
|
|
81
94
|
if (!u) return;
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
h:
|
|
85
|
-
s:
|
|
86
|
-
v:
|
|
95
|
+
const w = k(e - u.left, 0, u.width), P = k(p - u.top, 0, u.height), z = Math.round(w / u.width * 100), D = Math.round(100 - P / u.height * 100);
|
|
96
|
+
g({
|
|
97
|
+
h: S.current.h,
|
|
98
|
+
s: z,
|
|
99
|
+
v: D
|
|
87
100
|
});
|
|
88
|
-
},
|
|
89
|
-
|
|
101
|
+
}, I = (e) => {
|
|
102
|
+
e.preventDefault();
|
|
90
103
|
try {
|
|
91
|
-
|
|
104
|
+
e.currentTarget.setPointerCapture(e.pointerId);
|
|
92
105
|
} catch {
|
|
93
106
|
}
|
|
94
|
-
|
|
95
|
-
const
|
|
96
|
-
window.removeEventListener("pointermove",
|
|
107
|
+
j(e.clientX, e.clientY);
|
|
108
|
+
const p = (w) => j(w.clientX, w.clientY), u = () => {
|
|
109
|
+
window.removeEventListener("pointermove", p), window.removeEventListener("pointerup", u), window.removeEventListener("pointercancel", u);
|
|
97
110
|
};
|
|
98
|
-
window.addEventListener("pointermove",
|
|
99
|
-
},
|
|
100
|
-
return /* @__PURE__ */
|
|
111
|
+
window.addEventListener("pointermove", p), window.addEventListener("pointerup", u), window.addEventListener("pointercancel", u);
|
|
112
|
+
}, f = a ? x(a) ?? E(l) : E(l), C = a ?? R(f), _ = F(f);
|
|
113
|
+
return /* @__PURE__ */ b("div", {
|
|
101
114
|
className: "color-picker",
|
|
102
115
|
children: [
|
|
103
|
-
/* @__PURE__ */
|
|
116
|
+
o.length > 0 && /* @__PURE__ */ b("div", {
|
|
117
|
+
className: "color-picker__swatches",
|
|
118
|
+
children: [/* @__PURE__ */ d("span", {
|
|
119
|
+
className: "color-picker__swatches-label",
|
|
120
|
+
children: c
|
|
121
|
+
}), /* @__PURE__ */ d("div", {
|
|
122
|
+
className: "color-picker__swatches-row",
|
|
123
|
+
children: o.map((e) => /* @__PURE__ */ d(G, {
|
|
124
|
+
title: e,
|
|
125
|
+
children: /* @__PURE__ */ d("button", {
|
|
126
|
+
className: `color-picker__swatch${e === C.toLowerCase() ? " is-selected" : ""}`,
|
|
127
|
+
onClick: () => $(e),
|
|
128
|
+
style: { backgroundColor: e },
|
|
129
|
+
type: "button"
|
|
130
|
+
})
|
|
131
|
+
}, e))
|
|
132
|
+
})]
|
|
133
|
+
}),
|
|
134
|
+
/* @__PURE__ */ d("div", {
|
|
104
135
|
className: "color-picker__preview",
|
|
105
136
|
style: { backgroundColor: C }
|
|
106
137
|
}),
|
|
107
|
-
/* @__PURE__ */
|
|
138
|
+
/* @__PURE__ */ b("div", {
|
|
108
139
|
className: "color-picker__controls",
|
|
109
|
-
children: [/* @__PURE__ */
|
|
140
|
+
children: [/* @__PURE__ */ b("div", {
|
|
110
141
|
className: "color-picker__sv",
|
|
111
|
-
ref:
|
|
112
|
-
style: { backgroundColor: `hsl(${
|
|
113
|
-
onPointerDown:
|
|
142
|
+
ref: M,
|
|
143
|
+
style: { backgroundColor: `hsl(${l.h}, 100%, 50%)` },
|
|
144
|
+
onPointerDown: I,
|
|
114
145
|
children: [
|
|
115
|
-
/* @__PURE__ */
|
|
116
|
-
/* @__PURE__ */
|
|
117
|
-
/* @__PURE__ */
|
|
146
|
+
/* @__PURE__ */ d("div", { className: "color-picker__sv-white" }),
|
|
147
|
+
/* @__PURE__ */ d("div", { className: "color-picker__sv-black" }),
|
|
148
|
+
/* @__PURE__ */ d("div", {
|
|
118
149
|
className: "color-picker__sv-handle",
|
|
119
150
|
style: {
|
|
120
|
-
left: `${
|
|
121
|
-
top: `${100 -
|
|
151
|
+
left: `${l.s}%`,
|
|
152
|
+
top: `${100 - l.v}%`
|
|
122
153
|
}
|
|
123
154
|
})
|
|
124
155
|
]
|
|
125
|
-
}), /* @__PURE__ */
|
|
156
|
+
}), /* @__PURE__ */ d("div", {
|
|
126
157
|
className: "color-picker__slider",
|
|
127
|
-
children: /* @__PURE__ */
|
|
158
|
+
children: /* @__PURE__ */ d("input", {
|
|
128
159
|
type: "range",
|
|
129
160
|
min: 0,
|
|
130
161
|
max: 360,
|
|
131
|
-
value:
|
|
132
|
-
onChange: (
|
|
133
|
-
...
|
|
134
|
-
h: Number(
|
|
162
|
+
value: l.h,
|
|
163
|
+
onChange: (e) => g({
|
|
164
|
+
...l,
|
|
165
|
+
h: Number(e.target.value)
|
|
135
166
|
})
|
|
136
167
|
})
|
|
137
168
|
})]
|
|
138
169
|
}),
|
|
139
|
-
/* @__PURE__ */
|
|
170
|
+
/* @__PURE__ */ b("div", {
|
|
140
171
|
className: "color-picker__mode-toggle",
|
|
141
172
|
children: [
|
|
142
|
-
/* @__PURE__ */
|
|
173
|
+
/* @__PURE__ */ d(H, {
|
|
143
174
|
variant: "plain",
|
|
144
|
-
className:
|
|
145
|
-
onClick: () =>
|
|
175
|
+
className: s === "hex" ? "is-active" : "",
|
|
176
|
+
onClick: () => r("hex"),
|
|
146
177
|
children: "Hex"
|
|
147
178
|
}),
|
|
148
|
-
/* @__PURE__ */
|
|
179
|
+
/* @__PURE__ */ d(H, {
|
|
149
180
|
variant: "plain",
|
|
150
|
-
className:
|
|
151
|
-
onClick: () =>
|
|
181
|
+
className: s === "rgb" ? "is-active" : "",
|
|
182
|
+
onClick: () => r("rgb"),
|
|
152
183
|
children: "RGB"
|
|
153
184
|
}),
|
|
154
|
-
/* @__PURE__ */
|
|
185
|
+
/* @__PURE__ */ d(H, {
|
|
155
186
|
variant: "plain",
|
|
156
|
-
className:
|
|
157
|
-
onClick: () =>
|
|
187
|
+
className: s === "hsl" ? "is-active" : "",
|
|
188
|
+
onClick: () => r("hsl"),
|
|
158
189
|
children: "HSL"
|
|
159
190
|
})
|
|
160
191
|
]
|
|
161
192
|
}),
|
|
162
|
-
|
|
193
|
+
s === "hex" && /* @__PURE__ */ d("div", {
|
|
163
194
|
className: "color-picker__fields color-picker__fields--hex",
|
|
164
|
-
children: /* @__PURE__ */
|
|
195
|
+
children: /* @__PURE__ */ d(X, {
|
|
165
196
|
label: "Hex",
|
|
166
197
|
value: C,
|
|
167
|
-
onChange: (
|
|
168
|
-
|
|
169
|
-
v && e(g(v));
|
|
198
|
+
onChange: (e) => {
|
|
199
|
+
x(e) && $(e.startsWith("#") ? e : `#${e}`);
|
|
170
200
|
}
|
|
171
201
|
})
|
|
172
202
|
}),
|
|
173
|
-
|
|
203
|
+
s === "rgb" && /* @__PURE__ */ b("div", {
|
|
174
204
|
className: "color-picker__fields color-picker__fields--rgb",
|
|
175
205
|
children: [
|
|
176
|
-
/* @__PURE__ */
|
|
206
|
+
/* @__PURE__ */ d(N, {
|
|
177
207
|
label: "R",
|
|
178
208
|
min: 0,
|
|
179
209
|
max: 255,
|
|
180
|
-
value:
|
|
181
|
-
onChange: (
|
|
182
|
-
...
|
|
183
|
-
r:
|
|
210
|
+
value: f.r,
|
|
211
|
+
onChange: (e) => g(v({
|
|
212
|
+
...f,
|
|
213
|
+
r: e ?? 0
|
|
184
214
|
}))
|
|
185
215
|
}),
|
|
186
|
-
/* @__PURE__ */
|
|
216
|
+
/* @__PURE__ */ d(N, {
|
|
187
217
|
label: "G",
|
|
188
218
|
min: 0,
|
|
189
219
|
max: 255,
|
|
190
|
-
value:
|
|
191
|
-
onChange: (
|
|
192
|
-
...
|
|
193
|
-
g:
|
|
220
|
+
value: f.g,
|
|
221
|
+
onChange: (e) => g(v({
|
|
222
|
+
...f,
|
|
223
|
+
g: e ?? 0
|
|
194
224
|
}))
|
|
195
225
|
}),
|
|
196
|
-
/* @__PURE__ */
|
|
226
|
+
/* @__PURE__ */ d(N, {
|
|
197
227
|
label: "B",
|
|
198
228
|
min: 0,
|
|
199
229
|
max: 255,
|
|
200
|
-
value:
|
|
201
|
-
onChange: (
|
|
202
|
-
...
|
|
203
|
-
b:
|
|
230
|
+
value: f.b,
|
|
231
|
+
onChange: (e) => g(v({
|
|
232
|
+
...f,
|
|
233
|
+
b: e ?? 0
|
|
204
234
|
}))
|
|
205
235
|
})
|
|
206
236
|
]
|
|
207
237
|
}),
|
|
208
|
-
|
|
238
|
+
s === "hsl" && /* @__PURE__ */ b("div", {
|
|
209
239
|
className: "color-picker__fields color-picker__fields--hsl",
|
|
210
240
|
children: [
|
|
211
|
-
/* @__PURE__ */
|
|
241
|
+
/* @__PURE__ */ d(N, {
|
|
212
242
|
label: "H",
|
|
213
243
|
min: 0,
|
|
214
244
|
max: 360,
|
|
215
|
-
value:
|
|
216
|
-
onChange: (
|
|
217
|
-
const
|
|
218
|
-
...
|
|
219
|
-
h:
|
|
245
|
+
value: _.h,
|
|
246
|
+
onChange: (e) => {
|
|
247
|
+
const p = T({
|
|
248
|
+
..._,
|
|
249
|
+
h: e ?? 0
|
|
220
250
|
});
|
|
221
|
-
|
|
251
|
+
g(v(p));
|
|
222
252
|
}
|
|
223
253
|
}),
|
|
224
|
-
/* @__PURE__ */
|
|
254
|
+
/* @__PURE__ */ d(N, {
|
|
225
255
|
label: "S",
|
|
226
256
|
min: 0,
|
|
227
257
|
max: 100,
|
|
228
|
-
value:
|
|
229
|
-
onChange: (
|
|
230
|
-
const
|
|
231
|
-
...
|
|
232
|
-
s:
|
|
258
|
+
value: _.s,
|
|
259
|
+
onChange: (e) => {
|
|
260
|
+
const p = T({
|
|
261
|
+
..._,
|
|
262
|
+
s: e ?? 0
|
|
233
263
|
});
|
|
234
|
-
|
|
264
|
+
g(v(p));
|
|
235
265
|
}
|
|
236
266
|
}),
|
|
237
|
-
/* @__PURE__ */
|
|
267
|
+
/* @__PURE__ */ d(N, {
|
|
238
268
|
label: "L",
|
|
239
269
|
min: 0,
|
|
240
270
|
max: 100,
|
|
241
|
-
value:
|
|
242
|
-
onChange: (
|
|
243
|
-
const
|
|
244
|
-
...
|
|
245
|
-
l:
|
|
271
|
+
value: _.l,
|
|
272
|
+
onChange: (e) => {
|
|
273
|
+
const p = T({
|
|
274
|
+
..._,
|
|
275
|
+
l: e ?? 0
|
|
246
276
|
});
|
|
247
|
-
|
|
277
|
+
g(v(p));
|
|
248
278
|
}
|
|
249
279
|
})
|
|
250
280
|
]
|
|
@@ -253,5 +283,5 @@ var _ = (s, h, i) => Math.min(i, Math.max(h, s)), k = (s) => {
|
|
|
253
283
|
});
|
|
254
284
|
};
|
|
255
285
|
export {
|
|
256
|
-
|
|
286
|
+
Z as ColorPicker
|
|
257
287
|
};
|