@luminescent/ui-qwik 6.8.3-2 → 7.0.0-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.
- package/LICENSE +661 -0
- package/lib/assets/BBIagblG-bundle-graph.json +1 -0
- package/lib/assets/ChtqwOpy-bundle-graph.json +1 -0
- package/lib/components/elements/Anchor.d.ts +1 -4
- package/lib/components/elements/Anchor.qwik.cjs +21 -25
- package/lib/components/elements/Anchor.qwik.mjs +21 -25
- package/lib/components/elements/Blobs.d.ts +3 -4
- package/lib/components/elements/Blobs.qwik.cjs +181 -187
- package/lib/components/elements/Blobs.qwik.mjs +182 -189
- package/lib/components/elements/ColorPicker.d.ts +1 -4
- package/lib/components/elements/ColorPicker.qwik.cjs +285 -303
- package/lib/components/elements/ColorPicker.qwik.mjs +285 -303
- package/lib/components/elements/Dropdown.d.ts +1 -4
- package/lib/components/elements/Dropdown.qwik.cjs +20 -30
- package/lib/components/elements/Dropdown.qwik.mjs +20 -30
- package/lib/components/elements/Label.d.ts +6 -0
- package/lib/components/elements/Label.qwik.cjs +10 -0
- package/lib/components/elements/Label.qwik.mjs +10 -0
- package/lib/components/elements/Nav.d.ts +3 -6
- package/lib/components/elements/Nav.qwik.cjs +63 -97
- package/lib/components/elements/Nav.qwik.mjs +63 -97
- package/lib/components/elements/NumberInput.d.ts +4 -11
- package/lib/components/elements/NumberInput.qwik.cjs +52 -78
- package/lib/components/elements/NumberInput.qwik.mjs +51 -77
- package/lib/components/elements/RangeInput.d.ts +2 -9
- package/lib/components/elements/RangeInput.qwik.cjs +45 -76
- package/lib/components/elements/RangeInput.qwik.mjs +46 -77
- package/lib/components/elements/SelectMenu.d.ts +5 -8
- package/lib/components/elements/SelectMenu.qwik.cjs +90 -133
- package/lib/components/elements/SelectMenu.qwik.mjs +90 -133
- package/lib/components/elements/Sidebar.d.ts +1 -4
- package/lib/components/elements/Sidebar.qwik.cjs +19 -36
- package/lib/components/elements/Sidebar.qwik.mjs +20 -37
- package/lib/components/elements/Toggle.d.ts +1 -2
- package/lib/components/elements/Toggle.qwik.cjs +22 -38
- package/lib/components/elements/Toggle.qwik.mjs +23 -39
- package/lib/components/elements.d.ts +1 -0
- package/lib/components/functions.d.ts +2 -0
- package/lib/components/functions.qwik.cjs +19 -16
- package/lib/components/functions.qwik.mjs +19 -17
- package/lib/index.d.ts +0 -1
- package/lib/index.qwik.cjs +26 -48
- package/lib/index.qwik.mjs +6 -42
- package/lib/q-manifest.json +239 -0
- package/lib/svg/ChevronDown.d.ts +1 -1
- package/lib/svg/ChevronDown.qwik.cjs +18 -22
- package/lib/svg/ChevronDown.qwik.mjs +19 -23
- package/lib/svg/Link.d.ts +1 -1
- package/lib/svg/Link.qwik.cjs +27 -33
- package/lib/svg/Link.qwik.mjs +28 -34
- package/lib/svg/Menu.d.ts +1 -1
- package/lib/svg/Menu.qwik.cjs +22 -30
- package/lib/svg/Menu.qwik.mjs +23 -31
- package/lib/svg/Minus.d.ts +1 -1
- package/lib/svg/Minus.qwik.cjs +18 -22
- package/lib/svg/Minus.qwik.mjs +19 -23
- package/lib/svg/Plus.d.ts +1 -1
- package/lib/svg/Plus.qwik.cjs +18 -27
- package/lib/svg/Plus.qwik.mjs +19 -28
- package/lib/svg/Shuffle.d.ts +1 -1
- package/lib/svg/Shuffle.qwik.cjs +24 -36
- package/lib/svg/Shuffle.qwik.mjs +25 -37
- package/lib/utils/color.qwik.cjs +101 -115
- package/lib/utils/color.qwik.mjs +102 -122
- package/package.json +14 -14
- package/lib/components/logos/Birdflop.d.ts +0 -7
- package/lib/components/logos/Birdflop.qwik.cjs +0 -73
- package/lib/components/logos/Birdflop.qwik.mjs +0 -73
- package/lib/components/logos/Discord.d.ts +0 -2
- package/lib/components/logos/Discord.qwik.cjs +0 -18
- package/lib/components/logos/Discord.qwik.mjs +0 -18
- package/lib/components/logos/Fabric.d.ts +0 -2
- package/lib/components/logos/Fabric.qwik.cjs +0 -32
- package/lib/components/logos/Fabric.qwik.mjs +0 -32
- package/lib/components/logos/Forge.d.ts +0 -2
- package/lib/components/logos/Forge.qwik.cjs +0 -31
- package/lib/components/logos/Forge.qwik.mjs +0 -31
- package/lib/components/logos/Luminescent.d.ts +0 -3
- package/lib/components/logos/Luminescent.qwik.cjs +0 -143
- package/lib/components/logos/Luminescent.qwik.mjs +0 -143
- package/lib/components/logos/Paper.d.ts +0 -2
- package/lib/components/logos/Paper.qwik.cjs +0 -40
- package/lib/components/logos/Paper.qwik.mjs +0 -40
- package/lib/components/logos/Pterodactyl.d.ts +0 -2
- package/lib/components/logos/Pterodactyl.qwik.cjs +0 -35
- package/lib/components/logos/Pterodactyl.qwik.mjs +0 -35
- package/lib/components/logos/Purpur.d.ts +0 -2
- package/lib/components/logos/Purpur.qwik.cjs +0 -76
- package/lib/components/logos/Purpur.qwik.mjs +0 -76
- package/lib/components/logos/Velocity.d.ts +0 -2
- package/lib/components/logos/Velocity.qwik.cjs +0 -27
- package/lib/components/logos/Velocity.qwik.mjs +0 -27
- package/lib/components/logos/Waterfall.d.ts +0 -2
- package/lib/components/logos/Waterfall.qwik.cjs +0 -21
- package/lib/components/logos/Waterfall.qwik.mjs +0 -21
- package/lib/components/logos.d.ts +0 -10
- /package/lib/components/docs/{IconsLogos.d.ts → Label.d.ts} +0 -0
- /package/lib/{components/logos → svg}/IconProps.d.ts +0 -0
|
@@ -1,314 +1,296 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { rgbToHsv, hexToRgba, rgbToHex, hsvToRgb, getMousePosition, clamp, getBrightness } from "../../utils/color.qwik.mjs";
|
|
1
|
+
import { getClassObject } from "../functions.qwik.mjs";
|
|
2
|
+
import { clamp, getBrightness, getMousePosition, hexToRgba, hsvToRgb, rgbToHex, rgbToHsv } from "../../utils/color.qwik.mjs";
|
|
4
3
|
import { Shuffle } from "../../svg/Shuffle.qwik.mjs";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
4
|
+
import { _captures, _fnSignal, _jsxSorted, _wrapProp, componentQrl, inlinedQrl, useStore } from "@qwik.dev/core";
|
|
5
|
+
//#region src/components/elements/ColorPicker.tsx
|
|
6
|
+
var _hf0 = (p0) => ({ background: `linear-gradient(to right, #FFFFFF, ${p0.hue.color})` });
|
|
7
|
+
var _hf1 = (p0) => ({
|
|
8
|
+
"--bg-color": p0.value,
|
|
9
|
+
transform: `translate(${p0.sPosition}px, ${p0.bPosition}px)`
|
|
10
|
+
});
|
|
11
|
+
var _hf2 = (p0) => ({
|
|
12
|
+
transform: `translateY(${-p0.hue.position}px)`,
|
|
13
|
+
"--bg-color": p0.hue.color
|
|
14
|
+
});
|
|
15
|
+
var _hf3 = (p0) => ({ background: `linear-gradient(to right, ${p0.value}, transparent)` });
|
|
16
|
+
var _hf4 = (p0) => ({ backgroundColor: `${p0.value}` });
|
|
17
|
+
var _hf5 = (p0, p1) => ({
|
|
18
|
+
"lum-btn rounded-sm h-[1.6rem] w-[1.6rem] p-0 lum-bg hover:brightness-150": true,
|
|
19
|
+
"border-lum-accent": p0 === p1.value
|
|
20
|
+
});
|
|
21
|
+
var ColorPicker = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(({ id, class: Class, value = "#000000", colors = [
|
|
22
|
+
"#FAEDCB",
|
|
23
|
+
"#C9E4DE",
|
|
24
|
+
"#C6DEF1",
|
|
25
|
+
"#DBCDF0",
|
|
26
|
+
"#F2C6DE",
|
|
27
|
+
"#FCD05C",
|
|
28
|
+
"#5FE2C5",
|
|
29
|
+
"#4498DB",
|
|
30
|
+
"#9863E7",
|
|
31
|
+
"#E43A96",
|
|
32
|
+
"#000000",
|
|
33
|
+
"#555555",
|
|
34
|
+
"#AAAAAA",
|
|
35
|
+
"#FFFFFF"
|
|
36
|
+
], onInput$, preview = "left", horizontal, showInput = true, opacity }) => {
|
|
37
|
+
const height = 150;
|
|
38
|
+
const width = height - 25;
|
|
39
|
+
const maxHue = height - 2;
|
|
40
|
+
const hsvColor = rgbToHsv(hexToRgba(value));
|
|
41
|
+
const store = useStore({
|
|
42
|
+
hue: {
|
|
43
|
+
position: hsvColor.h * maxHue,
|
|
44
|
+
color: rgbToHex(hsvToRgb({
|
|
45
|
+
h: hsvColor.h,
|
|
46
|
+
s: 1,
|
|
47
|
+
v: 1
|
|
48
|
+
}))
|
|
49
|
+
},
|
|
50
|
+
opacity: { position: hsvColor.a !== void 0 ? (1 - hsvColor.a) * maxHue : 0 },
|
|
51
|
+
bPosition: (1 - hsvColor.v) * maxHue,
|
|
52
|
+
sPosition: hsvColor.s * width,
|
|
53
|
+
value
|
|
54
|
+
});
|
|
55
|
+
const setColor = /* @__PURE__ */ inlinedQrl(async (color) => {
|
|
56
|
+
const maxHue = _captures[0], onInput$ = _captures[1], store = _captures[2], width = _captures[3];
|
|
57
|
+
if (!/^#[0-9a-f]{0,8}$/i.test(color)) return;
|
|
58
|
+
const hsv = rgbToHsv(hexToRgba(color));
|
|
59
|
+
store.hue.position = hsv.h * maxHue;
|
|
60
|
+
store.hue.color = rgbToHex(hsvToRgb({
|
|
61
|
+
h: hsv.h,
|
|
62
|
+
s: 1,
|
|
63
|
+
v: 1,
|
|
64
|
+
a: hsv.a
|
|
65
|
+
}));
|
|
66
|
+
store.sPosition = hsv.s * width;
|
|
67
|
+
store.bPosition = (1 - hsv.v) * maxHue;
|
|
68
|
+
store.value = color;
|
|
69
|
+
await onInput$?.(store.value);
|
|
70
|
+
}, "ColorPicker_component_setColor_m9tT2MF9iI8", [
|
|
71
|
+
maxHue,
|
|
72
|
+
onInput$,
|
|
73
|
+
store,
|
|
74
|
+
width
|
|
75
|
+
]);
|
|
76
|
+
const hueMouseDown = /* @__PURE__ */ inlinedQrl(async (e, el) => {
|
|
77
|
+
const hueChange = _captures[0];
|
|
78
|
+
const hOffset = el.getBoundingClientRect().top;
|
|
79
|
+
await hueChange(e, hOffset);
|
|
80
|
+
const eventListener = (e) => void hueChange(e, hOffset);
|
|
81
|
+
window.addEventListener("mousemove", eventListener);
|
|
82
|
+
window.addEventListener("touchmove", eventListener);
|
|
83
|
+
const mouseUpListener = () => {
|
|
84
|
+
window.removeEventListener("mousemove", eventListener);
|
|
85
|
+
window.removeEventListener("touchmove", eventListener);
|
|
86
|
+
window.removeEventListener("mouseup", mouseUpListener);
|
|
87
|
+
window.removeEventListener("touchend", mouseUpListener);
|
|
88
|
+
};
|
|
89
|
+
window.addEventListener("mouseup", mouseUpListener);
|
|
90
|
+
window.addEventListener("touchend", mouseUpListener);
|
|
91
|
+
}, "ColorPicker_component_hueMouseDown_cw08gCPBKtw", [/* @__PURE__ */ inlinedQrl(async (e, hOffset) => {
|
|
92
|
+
const maxHue = _captures[0], onInput$ = _captures[1], store = _captures[2];
|
|
93
|
+
const { y } = getMousePosition(e);
|
|
94
|
+
store.hue.position = clamp(maxHue - (y - hOffset), 0, maxHue);
|
|
95
|
+
const hsvColor = rgbToHsv(hexToRgba(store.value));
|
|
96
|
+
const h = store.hue.position / maxHue;
|
|
97
|
+
hsvColor.h = h;
|
|
98
|
+
store.hue.color = rgbToHex(hsvToRgb({
|
|
99
|
+
h,
|
|
100
|
+
s: 1,
|
|
101
|
+
v: 1,
|
|
102
|
+
a: hsvColor.a
|
|
103
|
+
}));
|
|
104
|
+
store.value = rgbToHex(hsvToRgb(hsvColor));
|
|
105
|
+
await onInput$?.(store.value);
|
|
106
|
+
}, "ColorPicker_component_hueChange_c0i9qwof0Yw", [
|
|
107
|
+
maxHue,
|
|
108
|
+
onInput$,
|
|
109
|
+
store
|
|
110
|
+
])]);
|
|
111
|
+
const sbMouseDown = /* @__PURE__ */ inlinedQrl(async (e, el) => {
|
|
112
|
+
const sbChange = _captures[0];
|
|
113
|
+
const offset = el.getBoundingClientRect();
|
|
114
|
+
await sbChange(e, offset);
|
|
115
|
+
const eventListener = (e) => void sbChange(e, offset);
|
|
116
|
+
window.addEventListener("mousemove", eventListener);
|
|
117
|
+
window.addEventListener("touchmove", eventListener);
|
|
118
|
+
const mouseUpListener = () => {
|
|
119
|
+
window.removeEventListener("mousemove", eventListener);
|
|
120
|
+
window.removeEventListener("touchmove", eventListener);
|
|
121
|
+
window.removeEventListener("mouseup", mouseUpListener);
|
|
122
|
+
window.removeEventListener("touchend", mouseUpListener);
|
|
123
|
+
};
|
|
124
|
+
window.addEventListener("mouseup", mouseUpListener);
|
|
125
|
+
window.addEventListener("touchend", mouseUpListener);
|
|
126
|
+
}, "ColorPicker_component_sbMouseDown_Vor71dUNt7g", [/* @__PURE__ */ inlinedQrl(async (e, hOffset) => {
|
|
127
|
+
const maxHue = _captures[0], onInput$ = _captures[1], store = _captures[2], width = _captures[3];
|
|
128
|
+
const { x, y } = getMousePosition(e);
|
|
129
|
+
store.bPosition = clamp(y - hOffset.top, 0, maxHue);
|
|
130
|
+
store.sPosition = clamp(x - hOffset.left, 0, width);
|
|
131
|
+
const s = store.sPosition / width;
|
|
132
|
+
const v = 1 - store.bPosition / maxHue;
|
|
133
|
+
store.value = rgbToHex(hsvToRgb({
|
|
134
|
+
h: store.hue.position / maxHue,
|
|
135
|
+
s,
|
|
136
|
+
v,
|
|
137
|
+
a: store.opacity.position !== void 0 ? 1 - store.opacity.position / maxHue : 1
|
|
138
|
+
}));
|
|
139
|
+
await onInput$?.(store.value);
|
|
140
|
+
}, "ColorPicker_component_sbChange_NwrBaY0ccx0", [
|
|
141
|
+
maxHue,
|
|
142
|
+
onInput$,
|
|
143
|
+
store,
|
|
144
|
+
width
|
|
145
|
+
])]);
|
|
146
|
+
const opacityMouseDown = /* @__PURE__ */ inlinedQrl(async (e, el) => {
|
|
147
|
+
const opacityChange = _captures[0];
|
|
148
|
+
const offset = el.getBoundingClientRect();
|
|
149
|
+
await opacityChange(e, offset);
|
|
150
|
+
const eventListener = (e) => void opacityChange(e, offset);
|
|
151
|
+
window.addEventListener("mousemove", eventListener);
|
|
152
|
+
window.addEventListener("touchmove", eventListener);
|
|
153
|
+
const mouseUpListener = () => {
|
|
154
|
+
window.removeEventListener("mousemove", eventListener);
|
|
155
|
+
window.removeEventListener("touchmove", eventListener);
|
|
156
|
+
window.removeEventListener("mouseup", mouseUpListener);
|
|
157
|
+
window.removeEventListener("touchend", mouseUpListener);
|
|
158
|
+
};
|
|
159
|
+
window.addEventListener("mouseup", mouseUpListener);
|
|
160
|
+
window.addEventListener("touchend", mouseUpListener);
|
|
161
|
+
}, "ColorPicker_component_opacityMouseDown_U0p127RN2e0", [/* @__PURE__ */ inlinedQrl(async (e, hOffset) => {
|
|
162
|
+
const maxHue = _captures[0], onInput$ = _captures[1], store = _captures[2];
|
|
163
|
+
const { x } = getMousePosition(e);
|
|
164
|
+
store.opacity.position = clamp(x - hOffset.left, 0, maxHue);
|
|
165
|
+
const a = 1 - store.opacity.position / maxHue;
|
|
166
|
+
const hsvColor = rgbToHsv(hexToRgba(store.value));
|
|
167
|
+
hsvColor.a = a;
|
|
168
|
+
store.value = rgbToHex(hsvToRgb(hsvColor));
|
|
169
|
+
await onInput$?.(store.value);
|
|
170
|
+
}, "ColorPicker_component_opacityChange_WBZtDRHmnMU", [
|
|
171
|
+
maxHue,
|
|
172
|
+
onInput$,
|
|
173
|
+
store
|
|
174
|
+
])]);
|
|
175
|
+
return /* @__PURE__ */ _jsxSorted("div", {
|
|
176
|
+
class: {
|
|
177
|
+
"lum-card touch-none p-4": true,
|
|
178
|
+
"flex-col": !horizontal,
|
|
179
|
+
...getClassObject(Class)
|
|
180
|
+
},
|
|
181
|
+
id,
|
|
182
|
+
"q-e:input": /* @__PURE__ */ inlinedQrl(async (e, el, setColor) => {
|
|
183
|
+
if (!el.dataset.value) return;
|
|
184
|
+
await setColor(el.dataset.value);
|
|
185
|
+
}, "ColorPicker_component_div_q_e_input_6CeAo90QNf4"),
|
|
186
|
+
"q:p": setColor
|
|
187
|
+
}, null, [
|
|
188
|
+
/* @__PURE__ */ _jsxSorted("div", null, { class: "flex gap-4" }, [/* @__PURE__ */ _jsxSorted("div", null, {
|
|
189
|
+
class: "relative h-37.5 w-31.25 rounded-md",
|
|
190
|
+
style: _fnSignal(_hf0, [store]),
|
|
191
|
+
"q-e:mousedown": sbMouseDown,
|
|
192
|
+
"q-e:touchstart": sbMouseDown,
|
|
193
|
+
"preventdefault:mousedown": true,
|
|
194
|
+
"preventdefault:touchstart": true
|
|
195
|
+
}, [/* @__PURE__ */ _jsxSorted("div", null, { class: "h-37.5 w-31.25 rounded-md border border-gray-700 bg-linear-to-b from-transparent to-black" }, null, 3, null), /* @__PURE__ */ _jsxSorted("div", null, {
|
|
196
|
+
class: { "absolute -top-2 -left-2 h-4 w-4 rounded-md border lum-bg drop-shadow-lg": true },
|
|
197
|
+
style: _fnSignal(_hf1, [store])
|
|
198
|
+
}, null, 3, null)], 3, null), /* @__PURE__ */ _jsxSorted("div", null, {
|
|
199
|
+
class: "relative h-37.5 w-2 rounded-md border border-gray-700",
|
|
200
|
+
style: { background: "linear-gradient(to bottom, #ff0000, #ff00ff, #0000ff, #00ffff, #00ff00, #ffff00, #ff0000)" },
|
|
201
|
+
"q-e:mousedown": hueMouseDown,
|
|
202
|
+
"q-e:touchstart": hueMouseDown,
|
|
203
|
+
"preventdefault:mousedown": true,
|
|
204
|
+
"preventdefault:touchstart": true
|
|
205
|
+
}, /* @__PURE__ */ _jsxSorted("div", null, {
|
|
206
|
+
class: "absolute -bottom-2 -left-1.25 h-4 w-4 rounded-md lum-bg! bg-[#ff0000] ",
|
|
207
|
+
style: _fnSignal(_hf2, [store])
|
|
208
|
+
}, null, 3, null), 3, null)], 3, null),
|
|
209
|
+
opacity && /* @__PURE__ */ _jsxSorted("div", null, {
|
|
210
|
+
class: "relative h-2 w-full rounded-md",
|
|
211
|
+
"q-e:mousedown": opacityMouseDown,
|
|
212
|
+
"q-e:touchstart": opacityMouseDown,
|
|
213
|
+
"preventdefault:mousedown": true,
|
|
214
|
+
"preventdefault:touchstart": true,
|
|
215
|
+
style: {
|
|
216
|
+
backgroundColor: "white",
|
|
217
|
+
backgroundImage: `
|
|
206
218
|
linear-gradient(45deg, #ccc 25%, transparent 25%),
|
|
207
219
|
linear-gradient(135deg, #ccc 25%, transparent 25%),
|
|
208
220
|
linear-gradient(45deg, transparent 75%, #ccc 75%),
|
|
209
221
|
linear-gradient(135deg, transparent 75%, #ccc 75%);
|
|
210
222
|
`,
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
/* @__PURE__ */ jsx("div", {
|
|
222
|
-
class: "absolute -bottom-1.25 -left-1.25 h-4 w-4 rounded-md",
|
|
223
|
-
style: {
|
|
224
|
-
transform: `translateX(${store.opacity.position ?? 1}px)`,
|
|
225
|
-
backgroundColor: store.value,
|
|
226
|
-
backgroundImage: `
|
|
223
|
+
backgroundSize: "8px 8px",
|
|
224
|
+
backgroundPosition: "0 0, 4px 0, 4px -4px, 0 4px"
|
|
225
|
+
}
|
|
226
|
+
}, [/* @__PURE__ */ _jsxSorted("div", null, {
|
|
227
|
+
class: "alsolute inset-0 h-2 w-full rounded-md border border-gray-700",
|
|
228
|
+
style: _fnSignal(_hf3, [store])
|
|
229
|
+
}, null, 3, null), /* @__PURE__ */ _jsxSorted("div", { style: {
|
|
230
|
+
transform: `translateX(${store.opacity.position ?? 1}px)`,
|
|
231
|
+
backgroundColor: store.value,
|
|
232
|
+
backgroundImage: `
|
|
227
233
|
linear-gradient(45deg, #ccc4 25%, transparent 25%),
|
|
228
234
|
linear-gradient(135deg, #ccc4 25%, transparent 25%),
|
|
229
235
|
linear-gradient(45deg, transparent 75%, #ccc4 75%),
|
|
230
236
|
linear-gradient(135deg, transparent 75%, #ccc4 75%);
|
|
231
237
|
`,
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
await setColor(color);
|
|
292
|
-
}
|
|
293
|
-
}, i);
|
|
294
|
-
}),
|
|
295
|
-
/* @__PURE__ */ jsx("button", {
|
|
296
|
-
type: "button",
|
|
297
|
-
class: "lum-btn rounded-sm h-[1.6rem] w-[1.6rem] p-0.5",
|
|
298
|
-
name: "Randomize",
|
|
299
|
-
onClick$: async () => {
|
|
300
|
-
const color = `#${Math.floor(Math.random() * 16777215).toString(16)}`;
|
|
301
|
-
await setColor(color);
|
|
302
|
-
},
|
|
303
|
-
children: /* @__PURE__ */ jsx(Shuffle, {
|
|
304
|
-
class: "p-0.5 pl-0.5 text-lum-text"
|
|
305
|
-
})
|
|
306
|
-
})
|
|
307
|
-
]
|
|
308
|
-
})
|
|
309
|
-
]
|
|
310
|
-
});
|
|
311
|
-
});
|
|
312
|
-
export {
|
|
313
|
-
ColorPicker
|
|
314
|
-
};
|
|
238
|
+
backgroundSize: "8px 8px",
|
|
239
|
+
backgroundPosition: "0 0, 4px 0, 4px -4px, 0 4px"
|
|
240
|
+
} }, { class: "absolute -bottom-1.25 -left-1.25 h-4 w-4 rounded-md" }, null, 3, null)], 1, "Xr_0"),
|
|
241
|
+
/* @__PURE__ */ _jsxSorted("div", null, { class: "flex w-37.5 flex-wrap justify-between gap-1" }, [
|
|
242
|
+
showInput && /* @__PURE__ */ _jsxSorted("div", { class: {
|
|
243
|
+
"mb-2 flex w-37.5 border-b border-b-gray-700 pb-3": true,
|
|
244
|
+
"flex-row gap-1": preview == "left",
|
|
245
|
+
"flex-row-reverse gap-1": preview == "right",
|
|
246
|
+
"flex-col": preview == "top",
|
|
247
|
+
"flex-col-reverse": preview == "bottom"
|
|
248
|
+
} }, null, [preview != "full" && /* @__PURE__ */ _jsxSorted("div", { class: {
|
|
249
|
+
"border border-gray-700 rounded-sm": true,
|
|
250
|
+
"aspect-square h-full": preview == "left" || preview == "right",
|
|
251
|
+
"h-3 w-full": preview == "top" || preview == "bottom",
|
|
252
|
+
"rounded-b-none": preview == "top",
|
|
253
|
+
"rounded-t-none": preview == "bottom"
|
|
254
|
+
} }, { style: _fnSignal(_hf4, [store]) }, null, 3, "Xr_1"), /* @__PURE__ */ _jsxSorted("input", {
|
|
255
|
+
class: {
|
|
256
|
+
"lum-input w-full p-1 text-xs rounded-sm": true,
|
|
257
|
+
"rounded-t-none border-t-0": preview == "top",
|
|
258
|
+
"rounded-b-none border-b-0": preview == "bottom"
|
|
259
|
+
},
|
|
260
|
+
"q-e:input": /* @__PURE__ */ inlinedQrl(async (e, el, setColor) => {
|
|
261
|
+
await setColor(el.value);
|
|
262
|
+
}, "ColorPicker_component_div_div_div_input_q_e_input_ExKkgH2ke0g"),
|
|
263
|
+
"q:p": setColor,
|
|
264
|
+
style: preview == "full" ? {
|
|
265
|
+
backgroundColor: `${store.value}`,
|
|
266
|
+
color: getBrightness(hexToRgba(store.value)) > .5 ? "black" : "white"
|
|
267
|
+
} : {}
|
|
268
|
+
}, { value: _wrapProp(store) }, null, 6, null)], 1, "Xr_2"),
|
|
269
|
+
colors.map((color, i) => {
|
|
270
|
+
const qrl_4294901768 = /* @__PURE__ */ inlinedQrl(async (_, _1, color) => {
|
|
271
|
+
const setColor = _captures[0];
|
|
272
|
+
await setColor(color);
|
|
273
|
+
}, "ColorPicker_component_div_div_button_q_e_click_iKRo0q0pNkI", [setColor]);
|
|
274
|
+
return /* @__PURE__ */ _jsxSorted("button", {
|
|
275
|
+
class: _fnSignal(_hf5, [color, store]),
|
|
276
|
+
name: color,
|
|
277
|
+
"q-e:click": qrl_4294901768,
|
|
278
|
+
"q:p": color,
|
|
279
|
+
style: { "--bg-color": color }
|
|
280
|
+
}, { type: "button" }, null, 6, i);
|
|
281
|
+
}),
|
|
282
|
+
/* @__PURE__ */ _jsxSorted("button", {
|
|
283
|
+
"q-e:click": /* @__PURE__ */ inlinedQrl(async (_, _1, setColor) => {
|
|
284
|
+
await setColor(`#${Math.floor(Math.random() * 16777215).toString(16)}`);
|
|
285
|
+
}, "ColorPicker_component_div_div_button_q_e_click_1_50T6z49ncA8"),
|
|
286
|
+
"q:p": setColor
|
|
287
|
+
}, {
|
|
288
|
+
type: "button",
|
|
289
|
+
class: "lum-btn rounded-sm h-[1.6rem] w-[1.6rem] p-0.5",
|
|
290
|
+
name: "Randomize"
|
|
291
|
+
}, /* @__PURE__ */ _jsxSorted(Shuffle, null, { class: "p-0.5 pl-0.5 text-lum-text" }, null, 3, "Xr_3"), 4, null)
|
|
292
|
+
], 1, null)
|
|
293
|
+
], 4, "Xr_4");
|
|
294
|
+
}, "ColorPicker_component_8ldznufwKro"));
|
|
295
|
+
//#endregion
|
|
296
|
+
export { ColorPicker };
|