@luminescent/ui 0.4.1 → 0.5.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/README.md +8 -1
- package/lib/index.qwik.cjs +350 -246
- package/lib/index.qwik.mjs +351 -247
- package/lib-types/components/elements/Button.d.ts +1 -0
- package/lib-types/components/elements/Card.d.ts +11 -1
- package/lib-types/components/elements/ColorInput.d.ts +2 -2
- package/lib-types/components/elements/SelectInput.d.ts +6 -5
- package/lib-types/components/elements/{TextAreaInput.d.ts → TextArea.d.ts} +4 -3
- package/lib-types/components/elements/TextInput.d.ts +1 -0
- package/lib-types/components/elements.d.ts +1 -2
- package/lib-types/svg/ChevronDown.d.ts +2 -0
- package/lib-types/svg/Minus.d.ts +2 -0
- package/lib-types/svg/Plus.d.ts +2 -0
- package/lib-types/tailwind.config.d.ts +1 -0
- package/lib-types/utils/simple-color-picker/color.d.ts +1 -0
- package/package.json +2 -2
- package/src/tailwind.config.js +6 -3
- package/lib-types/components/elements/OutputField.d.ts +0 -19
- package/lib-types/tailwind-config.d.ts +0 -114
package/lib/index.qwik.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { componentQrl, inlinedQrl, _jsxQ, _fnSignal, _restProps, _jsxS, _jsxC, Slot,
|
|
1
|
+
import { componentQrl, inlinedQrl, _jsxQ, _fnSignal, _restProps, _jsxS, _jsxC, Slot, _jsxBranch, _IMMUTABLE, useStylesQrl, useStore, _wrapSignal, useLexicalScope } from "@builder.io/qwik";
|
|
2
2
|
import { isServer } from "@builder.io/qwik/build";
|
|
3
3
|
import { Fragment } from "@builder.io/qwik/jsx-runtime";
|
|
4
4
|
const Anchor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => /* @__PURE__ */ _jsxQ("span", null, {
|
|
@@ -8,21 +8,22 @@ const Anchor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =
|
|
|
8
8
|
], "p0.id")
|
|
9
9
|
}, null, 3, "Oa_0"), "Anchor_component_O7y4zyaazA0"));
|
|
10
10
|
const buttonColorClasses = {
|
|
11
|
-
blue: "bg-blue-600/90 border-blue-500 hover:bg-blue-500
|
|
12
|
-
purple: "bg-purple-600/90 border-purple-500 hover:bg-purple-500
|
|
13
|
-
pink: "bg-pink-600/90 border-pink-500 hover:bg-pink-500
|
|
14
|
-
gray: "bg-gray-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
blue: "bg-blue-600/90 border-blue-500 hover:bg-blue-500 active:bg-blue-400 focus:border-blue-400",
|
|
12
|
+
purple: "bg-purple-600/90 border-purple-500 hover:bg-purple-500 active:bg-purple-400 focus:border-purple-400",
|
|
13
|
+
pink: "bg-pink-600/90 border-pink-500 hover:bg-pink-500 active:bg-pink-400 focus:border-pink-400",
|
|
14
|
+
gray: "bg-gray-700/90 border-gray-600 hover:bg-gray-600 active:bg-gray-500 focus:border-gray-500",
|
|
15
|
+
darkgray: "bg-gray-800/90 border-gray-700 hover:bg-gray-700 active:bg-gray-600 focus:border-gray-600",
|
|
16
|
+
red: "bg-red-700/90 border-red-600 hover:bg-red-600 active:bg-red-500 focus:border-red-500",
|
|
17
|
+
green: "bg-green-700/90 border-green-600 hover:bg-green-600 active:bg-green-500 focus:border-green-500",
|
|
18
|
+
yellow: "bg-yellow-700/90 border-yellow-600 hover:bg-yellow-600 active:bg-yellow-500 focus:border-yellow-500"
|
|
18
19
|
};
|
|
19
20
|
const sizeClasses = {
|
|
20
|
-
sm: "text-sm px-2 py-1 rounded-md gap-2",
|
|
21
|
+
sm: "text-sm px-2 py-1 rounded-md gap-2 active:px-1",
|
|
21
22
|
md: "text-base px-4 py-2 rounded-md gap-3",
|
|
22
23
|
lg: "text-base px-6 py-3 rounded-lg gap-3",
|
|
23
24
|
xl: "text-base px-8 py-4 rounded-xl gap-4"
|
|
24
25
|
};
|
|
25
|
-
const buttonClass = "relative flex items-center gap-3 transition ease-in-out border text-gray-50 fill-gray-50 disabled:opacity-50";
|
|
26
|
+
const buttonClass = "relative flex items-center gap-3 transition ease-in-out border text-gray-50 fill-gray-50 disabled:opacity-50 hover:shadow-lg active:scale-95";
|
|
26
27
|
const Button = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
27
28
|
const props1 = _restProps(props, [
|
|
28
29
|
"color",
|
|
@@ -30,7 +31,7 @@ const Button = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =
|
|
|
30
31
|
]);
|
|
31
32
|
props1.class = {
|
|
32
33
|
[buttonClass]: true,
|
|
33
|
-
[buttonColorClasses[props.color ?? "
|
|
34
|
+
[buttonColorClasses[props.color ?? "darkgray"]]: true,
|
|
34
35
|
[sizeClasses[props.size ?? "md"]]: true,
|
|
35
36
|
...props1.class
|
|
36
37
|
};
|
|
@@ -46,7 +47,7 @@ const ButtonAnchor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
|
|
|
46
47
|
]);
|
|
47
48
|
props1.class = {
|
|
48
49
|
[buttonClass]: true,
|
|
49
|
-
[buttonColorClasses[props.color ?? "
|
|
50
|
+
[buttonColorClasses[props.color ?? "darkgray"]]: true,
|
|
50
51
|
[sizeClasses[props.size ?? "md"]]: true,
|
|
51
52
|
...props1.class
|
|
52
53
|
};
|
|
@@ -56,7 +57,9 @@ const ButtonAnchor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
|
|
|
56
57
|
}, null, 0, "7H_3");
|
|
57
58
|
}, "ButtonAnchor_component_vQT9xS0lqew"));
|
|
58
59
|
const LoadingIcon = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
59
|
-
return /* @__PURE__ */
|
|
60
|
+
return /* @__PURE__ */ _jsxQ("div", null, {
|
|
61
|
+
class: "animate-spin"
|
|
62
|
+
}, /* @__PURE__ */ _jsxS("svg", {
|
|
60
63
|
...props,
|
|
61
64
|
children: [
|
|
62
65
|
/* @__PURE__ */ _jsxQ("circle", null, {
|
|
@@ -74,23 +77,17 @@ const LoadingIcon = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pro
|
|
|
74
77
|
}, null, 3, null)
|
|
75
78
|
]
|
|
76
79
|
}, {
|
|
77
|
-
class: _fnSignal((p0) => ({
|
|
78
|
-
"animate-spin": true,
|
|
79
|
-
...p0.class
|
|
80
|
-
}), [
|
|
81
|
-
props
|
|
82
|
-
], '{"animate-spin":true,...p0.class}'),
|
|
83
|
-
fill: "none",
|
|
84
80
|
viewBox: "0 0 24 24",
|
|
85
81
|
xmlns: "http://www.w3.org/2000/svg"
|
|
86
|
-
}, 0, "XP_0");
|
|
82
|
+
}, 0, null), 1, "XP_0");
|
|
87
83
|
}, "LoadingIcon_component_iXFSRNToIus"));
|
|
88
84
|
const cardColorClasses = {
|
|
89
85
|
pink: {
|
|
90
86
|
card: {
|
|
91
87
|
bg_blobs: "bg-pink-400/10 border-pink-400/20",
|
|
92
88
|
bg: "bg-pink-400/60 border-pink-400",
|
|
93
|
-
hover: "hover:bg-pink-400/20"
|
|
89
|
+
hover: "hover:bg-pink-400/20",
|
|
90
|
+
click: "active:bg-pink-300/20"
|
|
94
91
|
},
|
|
95
92
|
blobs: [
|
|
96
93
|
"bg-pink-400",
|
|
@@ -100,9 +97,10 @@ const cardColorClasses = {
|
|
|
100
97
|
},
|
|
101
98
|
red: {
|
|
102
99
|
card: {
|
|
103
|
-
bg_blobs: "bg-
|
|
100
|
+
bg_blobs: "bg-red-400/10 border-red-400/20",
|
|
104
101
|
bg: "bg-red-400/60 border-red-400",
|
|
105
|
-
hover: "hover:bg-
|
|
102
|
+
hover: "hover:bg-red-400/20",
|
|
103
|
+
click: "active:bg-red-300/20"
|
|
106
104
|
},
|
|
107
105
|
blobs: [
|
|
108
106
|
"bg-red-400",
|
|
@@ -114,7 +112,8 @@ const cardColorClasses = {
|
|
|
114
112
|
card: {
|
|
115
113
|
bg_blobs: "bg-orange-400/10 border-orange-400/20",
|
|
116
114
|
bg: "bg-orange-400/60 border-orange-400",
|
|
117
|
-
hover: "hover:bg-orange-400/20"
|
|
115
|
+
hover: "hover:bg-orange-400/20",
|
|
116
|
+
click: "active:bg-orange-300/20"
|
|
118
117
|
},
|
|
119
118
|
blobs: [
|
|
120
119
|
"bg-orange-400",
|
|
@@ -126,7 +125,8 @@ const cardColorClasses = {
|
|
|
126
125
|
card: {
|
|
127
126
|
bg_blobs: "bg-yellow-400/10 border-yellow-400/20",
|
|
128
127
|
bg: "bg-yellow-400/60 border-yellow-400",
|
|
129
|
-
hover: "hover:bg-yellow-400/20"
|
|
128
|
+
hover: "hover:bg-yellow-400/20",
|
|
129
|
+
click: "active:bg-yellow-300/20"
|
|
130
130
|
},
|
|
131
131
|
blobs: [
|
|
132
132
|
"bg-yellow-400",
|
|
@@ -138,7 +138,8 @@ const cardColorClasses = {
|
|
|
138
138
|
card: {
|
|
139
139
|
bg_blobs: "bg-green-400/10 border-green-400/20",
|
|
140
140
|
bg: "bg-green-400/60 border-green-400",
|
|
141
|
-
hover: "hover:bg-green-400/20"
|
|
141
|
+
hover: "hover:bg-green-400/20",
|
|
142
|
+
click: "active:bg-green-300/20"
|
|
142
143
|
},
|
|
143
144
|
blobs: [
|
|
144
145
|
"bg-green-400",
|
|
@@ -150,7 +151,8 @@ const cardColorClasses = {
|
|
|
150
151
|
card: {
|
|
151
152
|
bg_blobs: "bg-blue-400/10 border-blue-400/20",
|
|
152
153
|
bg: "bg-blue-400/60 border-blue-400",
|
|
153
|
-
hover: "hover:bg-blue-400/20"
|
|
154
|
+
hover: "hover:bg-blue-400/20",
|
|
155
|
+
click: "active:bg-blue-300/20"
|
|
154
156
|
},
|
|
155
157
|
blobs: [
|
|
156
158
|
"bg-blue-400",
|
|
@@ -162,7 +164,8 @@ const cardColorClasses = {
|
|
|
162
164
|
card: {
|
|
163
165
|
bg_blobs: "bg-purple-400/10 border-purple-400/20",
|
|
164
166
|
bg: "bg-purple-400/60 border-purple-400",
|
|
165
|
-
hover: "hover:bg-purple-400/20"
|
|
167
|
+
hover: "hover:bg-purple-400/20",
|
|
168
|
+
click: "active:bg-purple-300/20"
|
|
166
169
|
},
|
|
167
170
|
blobs: [
|
|
168
171
|
"bg-purple-400",
|
|
@@ -174,7 +177,8 @@ const cardColorClasses = {
|
|
|
174
177
|
card: {
|
|
175
178
|
bg_blobs: "bg-gray-400/10 border-gray-400/20",
|
|
176
179
|
bg: "bg-gray-400/60 border-gray-400",
|
|
177
|
-
hover: "hover:bg-gray-400/20"
|
|
180
|
+
hover: "hover:bg-gray-400/20",
|
|
181
|
+
click: "active:bg-gray-300/20"
|
|
178
182
|
},
|
|
179
183
|
blobs: [
|
|
180
184
|
"bg-gray-400",
|
|
@@ -186,7 +190,8 @@ const cardColorClasses = {
|
|
|
186
190
|
card: {
|
|
187
191
|
bg_blobs: "bg-gray-800/10 border-gray-800/20",
|
|
188
192
|
bg: "bg-gray-800/60 border-gray-800",
|
|
189
|
-
hover: "hover:bg-gray-800/20"
|
|
193
|
+
hover: "hover:bg-gray-800/20",
|
|
194
|
+
click: "active:bg-gray-700/20"
|
|
190
195
|
},
|
|
191
196
|
blobs: [
|
|
192
197
|
"bg-gray-400",
|
|
@@ -198,7 +203,8 @@ const cardColorClasses = {
|
|
|
198
203
|
card: {
|
|
199
204
|
bg_blobs: "bg-gray-900/10 border-gray-900/20",
|
|
200
205
|
bg: "bg-gray-900/60 border-gray-900",
|
|
201
|
-
hover: "hover:bg-gray-900/20"
|
|
206
|
+
hover: "hover:bg-gray-900/20",
|
|
207
|
+
click: "active:bg-gray-800/20"
|
|
202
208
|
},
|
|
203
209
|
blobs: [
|
|
204
210
|
"bg-gray-400",
|
|
@@ -219,17 +225,12 @@ const blobClasses = [
|
|
|
219
225
|
const Card = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
220
226
|
const props1 = _restProps(props, [
|
|
221
227
|
"color",
|
|
222
|
-
"
|
|
228
|
+
"hover",
|
|
223
229
|
"href",
|
|
224
230
|
"row",
|
|
225
231
|
"blobs"
|
|
226
232
|
]);
|
|
227
|
-
useStylesQrl(/* @__PURE__ */ inlinedQrl(`
|
|
228
|
-
.-animation-delay-5 { animation-delay: -5s; }
|
|
229
|
-
.-animation-delay-10 { animation-delay: -10s; }
|
|
230
|
-
`, "Card_component_useStyles_POiiuoB0EmE"));
|
|
231
233
|
const blob = Math.round(Math.random() * 6);
|
|
232
|
-
const button = !!props1.onClick$ || props.hoverable;
|
|
233
234
|
return /* @__PURE__ */ _jsxS("div", {
|
|
234
235
|
...props1,
|
|
235
236
|
children: /* @__PURE__ */ _jsxQ("div", null, {
|
|
@@ -244,7 +245,7 @@ const Card = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
244
245
|
], "p0.href")
|
|
245
246
|
}, null, 3, "OW_0"),
|
|
246
247
|
/* @__PURE__ */ _jsxQ("div", null, {
|
|
247
|
-
class: "relative
|
|
248
|
+
class: "relative"
|
|
248
249
|
}, /* @__PURE__ */ _jsxQ("div", null, {
|
|
249
250
|
class: _fnSignal((p0) => ({
|
|
250
251
|
"flex gap-4": true,
|
|
@@ -255,7 +256,7 @@ const Card = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
255
256
|
], '{"flex gap-4":true,"flex-col":!p0.row,"flex-row items-center":p0.row}')
|
|
256
257
|
}, /* @__PURE__ */ _jsxC(Slot, null, 3, "OW_1"), 1, null), 1, null),
|
|
257
258
|
props.blobs && /* @__PURE__ */ _jsxQ("div", null, {
|
|
258
|
-
class: "absolute -z-10 inset-0 w-full h-full transition-all overflow-clip",
|
|
259
|
+
class: "absolute -z-10 inset-0 w-full h-full transition-all overflow-clip animate-in fade-in anim-duration-[2s]",
|
|
259
260
|
style: {
|
|
260
261
|
containerType: "size"
|
|
261
262
|
}
|
|
@@ -270,7 +271,7 @@ const Card = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
270
271
|
/* @__PURE__ */ _jsxQ("div", {
|
|
271
272
|
class: {
|
|
272
273
|
"absolute top-0 w-[30cqw] h-[30cqw] rounded-full opacity-20 ease-in-out blur-xl": true,
|
|
273
|
-
"-
|
|
274
|
+
"anim-delay-[-5s]": true,
|
|
274
275
|
[blobClasses[blob]]: true,
|
|
275
276
|
[cardColorClasses[props.color ?? "darkgray"].blobs[1]]: true
|
|
276
277
|
}
|
|
@@ -278,7 +279,7 @@ const Card = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
278
279
|
/* @__PURE__ */ _jsxQ("div", {
|
|
279
280
|
class: {
|
|
280
281
|
"absolute top-0 w-[30cqw] h-[30cqw] rounded-full opacity-20 ease-in-out blur-xl": true,
|
|
281
|
-
"-
|
|
282
|
+
"anim-delay-[-10s]": true,
|
|
282
283
|
[blobClasses[blob]]: true,
|
|
283
284
|
[cardColorClasses[props.color ?? "darkgray"].blobs[2]]: true
|
|
284
285
|
}
|
|
@@ -289,8 +290,8 @@ const Card = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
289
290
|
"flex-1 relative border rounded-lg group transition-all": true,
|
|
290
291
|
[cardColorClasses[props.color ?? "darkgray"].card.bg]: !props.blobs,
|
|
291
292
|
[cardColorClasses[props.color ?? "darkgray"].card.bg_blobs]: props.blobs,
|
|
292
|
-
[cardColorClasses[props.color ?? "darkgray"].card.hover]: props.
|
|
293
|
-
"
|
|
293
|
+
[cardColorClasses[props.color ?? "darkgray"].card.hover + " hover:shadow-lg"]: props.hover,
|
|
294
|
+
[cardColorClasses[props.color ?? "darkgray"].card.click + " active:scale-[99%] cursor-pointer"]: props.hover == "clickable",
|
|
294
295
|
...props1.class
|
|
295
296
|
}
|
|
296
297
|
}, null, 0, "OW_3");
|
|
@@ -345,12 +346,13 @@ const CardHeader = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((prop
|
|
|
345
346
|
}, 3, "OW_7"), 1, "OW_8")
|
|
346
347
|
], 1, "OW_9");
|
|
347
348
|
}, "CardHeader_component_2xQZ6Uv7R4A"));
|
|
349
|
+
const InputClasses = "transition ease-in-out text-lg border border-gray-700 bg-gray-800 text-gray-50 hover:bg-gray-700 hover:shadow-lg focus:bg-gray-700 focus:outline-none focus:border-gray-400 rounded-md px-3 py-2";
|
|
348
350
|
const TextInput = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
349
351
|
return /* @__PURE__ */ _jsxQ("div", null, {
|
|
350
352
|
class: "flex flex-col"
|
|
351
353
|
}, [
|
|
352
354
|
/* @__PURE__ */ _jsxQ("label", null, {
|
|
353
|
-
class: "
|
|
355
|
+
class: "pb-2",
|
|
354
356
|
for: _fnSignal((p0) => p0.id, [
|
|
355
357
|
props
|
|
356
358
|
], "p0.id")
|
|
@@ -365,7 +367,7 @@ const TextInputRaw = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
|
|
|
365
367
|
return /* @__PURE__ */ _jsxS("input", {
|
|
366
368
|
...props,
|
|
367
369
|
class: {
|
|
368
|
-
|
|
370
|
+
[InputClasses]: true,
|
|
369
371
|
...props.class
|
|
370
372
|
}
|
|
371
373
|
}, null, 0, "dC_3");
|
|
@@ -434,8 +436,7 @@ class Color {
|
|
|
434
436
|
this._updateBrightness();
|
|
435
437
|
}
|
|
436
438
|
_updateBrightness() {
|
|
437
|
-
|
|
438
|
-
this._brightness = (r * 299 + g * 587 + b * 114) / 1e3;
|
|
439
|
+
this._brightness = getBrightness(this._rgba);
|
|
439
440
|
this._isDark = this._brightness < 0.5;
|
|
440
441
|
this._isLight = !this._isDark;
|
|
441
442
|
}
|
|
@@ -461,6 +462,10 @@ class Color {
|
|
|
461
462
|
return this._isLight;
|
|
462
463
|
}
|
|
463
464
|
}
|
|
465
|
+
function getBrightness(color) {
|
|
466
|
+
const { r, g, b } = color;
|
|
467
|
+
return (r * 299 + g * 587 + b * 114) / 1e3;
|
|
468
|
+
}
|
|
464
469
|
function hexNumberToRgb(color) {
|
|
465
470
|
const r = (color >> 16 & 255) / 255;
|
|
466
471
|
const g = (color >> 8 & 255) / 255;
|
|
@@ -874,7 +879,8 @@ const ColorInput = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((prop
|
|
|
874
879
|
const props1 = _restProps(props, [
|
|
875
880
|
"onInput$",
|
|
876
881
|
"value",
|
|
877
|
-
"presetColors"
|
|
882
|
+
"presetColors",
|
|
883
|
+
"preview"
|
|
878
884
|
]);
|
|
879
885
|
useStylesQrl(/* @__PURE__ */ inlinedQrl(`
|
|
880
886
|
.color-picker {
|
|
@@ -890,6 +896,7 @@ const ColorInput = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((prop
|
|
|
890
896
|
backdrop-filter: blur(10px);
|
|
891
897
|
user-select: none;
|
|
892
898
|
position: relative;
|
|
899
|
+
z-index: 1000;
|
|
893
900
|
}
|
|
894
901
|
|
|
895
902
|
.color-picker-saturation {
|
|
@@ -918,8 +925,7 @@ const ColorInput = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((prop
|
|
|
918
925
|
top: -7px;
|
|
919
926
|
left: -7px;
|
|
920
927
|
box-sizing: border-box;
|
|
921
|
-
|
|
922
|
-
}
|
|
928
|
+
≈ }
|
|
923
929
|
|
|
924
930
|
.color-picker-hue {
|
|
925
931
|
width: 8px;
|
|
@@ -961,11 +967,10 @@ const ColorInput = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((prop
|
|
|
961
967
|
top: -6px;
|
|
962
968
|
left: -4px;
|
|
963
969
|
box-sizing: border-box;
|
|
964
|
-
z-index: 10;
|
|
965
970
|
}
|
|
966
971
|
`, "ColorInput_component_useStyles_SMNFl4Oy0IA"));
|
|
967
972
|
const store = useStore({
|
|
968
|
-
value: (props.value ?? "#
|
|
973
|
+
value: (props.value ?? "#000000") || "#FFFFFF"
|
|
969
974
|
});
|
|
970
975
|
return /* @__PURE__ */ _jsxQ("div", null, null, [
|
|
971
976
|
/* @__PURE__ */ _jsxQ("label", {
|
|
@@ -981,7 +986,7 @@ const ColorInput = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((prop
|
|
|
981
986
|
onBlur$: /* @__PURE__ */ inlinedQrl(() => {
|
|
982
987
|
const [props12] = useLexicalScope();
|
|
983
988
|
const pickerDiv = document.getElementById(`${props12.id}-color-picker`);
|
|
984
|
-
pickerDiv.
|
|
989
|
+
pickerDiv.classList.add("opacity-0", "pointer-events-none", "scale-95");
|
|
985
990
|
}, "ColorInput_component_div_TextInputRaw_onBlur_giB7aSy8tnc", [
|
|
986
991
|
props1
|
|
987
992
|
]),
|
|
@@ -1009,23 +1014,25 @@ const ColorInput = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((prop
|
|
|
1009
1014
|
picker.setColor(element.value);
|
|
1010
1015
|
});
|
|
1011
1016
|
}
|
|
1012
|
-
pickerDiv.
|
|
1017
|
+
pickerDiv.classList.remove("opacity-0", "pointer-events-none", "scale-95");
|
|
1013
1018
|
}, "ColorInput_component_div_TextInputRaw_onFocus_9bHrhSeTgfI", [
|
|
1014
1019
|
props1,
|
|
1015
1020
|
props,
|
|
1016
1021
|
store
|
|
1017
1022
|
]),
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
+
style: (props.preview ?? "left") == "full" ? {
|
|
1024
|
+
backgroundColor: `${store.value}`,
|
|
1025
|
+
color: getBrightness(hexNumberToRgb(hexStringToNumber(store.value))) > 0.5 ? "black" : "white"
|
|
1026
|
+
} : (props.preview ?? "left") == "left" ? {
|
|
1027
|
+
borderLeft: `40px solid ${store.value}`
|
|
1028
|
+
} : (props.preview ?? "left") == "right" ? {
|
|
1029
|
+
borderRight: `40px solid ${store.value}`
|
|
1030
|
+
} : (props.preview ?? "left") == "top" ? {
|
|
1031
|
+
borderTop: `10px solid ${store.value}`
|
|
1032
|
+
} : (props.preview ?? "left") == "bottom" ? {
|
|
1033
|
+
borderBottom: `10px solid ${store.value}`
|
|
1034
|
+
} : {},
|
|
1023
1035
|
[_IMMUTABLE]: {
|
|
1024
|
-
style: _fnSignal((p0) => ({
|
|
1025
|
-
borderLeft: `40px solid ${p0.value}`
|
|
1026
|
-
}), [
|
|
1027
|
-
store
|
|
1028
|
-
], "{borderLeft:`40px solid ${p0.value}`}"),
|
|
1029
1036
|
value: _fnSignal((p0) => p0.value, [
|
|
1030
1037
|
store
|
|
1031
1038
|
], "p0.value")
|
|
@@ -1034,63 +1041,54 @@ const ColorInput = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((prop
|
|
|
1034
1041
|
/* @__PURE__ */ _jsxQ("div", {
|
|
1035
1042
|
id: `${props1.id}-color-picker`
|
|
1036
1043
|
}, {
|
|
1037
|
-
class: "
|
|
1044
|
+
class: "absolute mt-2 opacity-0 transition-all pointer-events-none scale-95"
|
|
1038
1045
|
}, null, 3, null)
|
|
1039
1046
|
], 1, "0s_2");
|
|
1040
1047
|
}, "ColorInput_component_jilGo0Bn3Ps"));
|
|
1041
|
-
const
|
|
1042
|
-
const props = {
|
|
1043
|
-
...rawProps
|
|
1044
|
-
};
|
|
1045
|
-
props.class = ((props.class ?? "") + " ionicon").trim();
|
|
1048
|
+
const Plus = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
1046
1049
|
return /* @__PURE__ */ _jsxS("svg", {
|
|
1047
1050
|
...props,
|
|
1048
|
-
children:
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
/* @__PURE__ */ _jsxQ("line", null, {
|
|
1057
|
-
x1: "400",
|
|
1058
|
-
y1: "256",
|
|
1059
|
-
x2: "112",
|
|
1060
|
-
y2: "256",
|
|
1061
|
-
style: "fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"
|
|
1062
|
-
}, null, 3, null)
|
|
1063
|
-
]
|
|
1051
|
+
children: /* @__PURE__ */ _jsxQ("path", null, {
|
|
1052
|
+
d: "M256 112v288M400 256H112",
|
|
1053
|
+
fill: "none",
|
|
1054
|
+
stroke: "currentColor",
|
|
1055
|
+
"stroke-linecap": "round",
|
|
1056
|
+
"stroke-linejoin": "round",
|
|
1057
|
+
"stroke-width": "32"
|
|
1058
|
+
}, null, 3, null)
|
|
1064
1059
|
}, {
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
props.class = ((props.class ?? "") + " ionicon").trim();
|
|
1060
|
+
height: _fnSignal((p0) => p0.width, [
|
|
1061
|
+
props
|
|
1062
|
+
], "p0.width"),
|
|
1063
|
+
viewBox: "0 0 512 512",
|
|
1064
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
1065
|
+
}, 0, "qR_0");
|
|
1066
|
+
}, "Plus_component_a7LdBXNrC2w"));
|
|
1067
|
+
const Minus = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
1074
1068
|
return /* @__PURE__ */ _jsxS("svg", {
|
|
1075
1069
|
...props,
|
|
1076
|
-
children: /* @__PURE__ */ _jsxQ("
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1070
|
+
children: /* @__PURE__ */ _jsxQ("path", null, {
|
|
1071
|
+
d: "M400 256H112",
|
|
1072
|
+
fill: "none",
|
|
1073
|
+
stroke: "currentColor",
|
|
1074
|
+
"stroke-linecap": "round",
|
|
1075
|
+
"stroke-linejoin": "round",
|
|
1076
|
+
"stroke-width": "32"
|
|
1082
1077
|
}, null, 3, null)
|
|
1083
1078
|
}, {
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1079
|
+
height: _fnSignal((p0) => p0.width, [
|
|
1080
|
+
props
|
|
1081
|
+
], "p0.width"),
|
|
1082
|
+
viewBox: "0 0 512 512",
|
|
1083
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
1084
|
+
}, 0, "0g_0");
|
|
1085
|
+
}, "Minus_component_oP9l58XNP1Q"));
|
|
1088
1086
|
const NumberInput = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
1089
1087
|
return /* @__PURE__ */ _jsxQ("div", null, {
|
|
1090
1088
|
class: "flex flex-col"
|
|
1091
1089
|
}, [
|
|
1092
1090
|
/* @__PURE__ */ _jsxQ("label", null, {
|
|
1093
|
-
class: "
|
|
1091
|
+
class: "pb-2",
|
|
1094
1092
|
for: _fnSignal((p0) => p0.id, [
|
|
1095
1093
|
props
|
|
1096
1094
|
], "p0.id")
|
|
@@ -1109,6 +1107,16 @@ const NumberInputRaw = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((
|
|
|
1109
1107
|
"value",
|
|
1110
1108
|
"step"
|
|
1111
1109
|
]);
|
|
1110
|
+
useStylesQrl(/* @__PURE__ */ inlinedQrl(`
|
|
1111
|
+
input::-webkit-outer-spin-button,
|
|
1112
|
+
input::-webkit-inner-spin-button {
|
|
1113
|
+
-webkit-appearance: none;
|
|
1114
|
+
margin: 0;
|
|
1115
|
+
}
|
|
1116
|
+
input[type=number] {
|
|
1117
|
+
-moz-appearance: textfield;
|
|
1118
|
+
}
|
|
1119
|
+
`, "NumberInputRaw_component_useStyles_v5EsWTMt0DU"));
|
|
1112
1120
|
const store = useStore({
|
|
1113
1121
|
value: props.value ?? 0
|
|
1114
1122
|
});
|
|
@@ -1120,37 +1128,52 @@ const NumberInputRaw = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((
|
|
|
1120
1128
|
props
|
|
1121
1129
|
], '{"flex text-gray-50":true,"gap-2":!p0.input}')
|
|
1122
1130
|
}, [
|
|
1123
|
-
/* @__PURE__ */
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
"px-3 rounded-l-md border-r-0": props.input,
|
|
1127
|
-
"w-[50%] rounded-md": !props.input,
|
|
1128
|
-
"opacity-50 pointer-events-none": props1.min ? store.value <= props1.min : false
|
|
1131
|
+
/* @__PURE__ */ _jsxC(Button, {
|
|
1132
|
+
get color() {
|
|
1133
|
+
return props.input ? "gray" : "darkgray";
|
|
1129
1134
|
},
|
|
1130
|
-
disabled: props1.min ? store.value <= props1.min : false
|
|
1131
|
-
}, {
|
|
1132
1135
|
"aria-label": "Decrement",
|
|
1133
1136
|
"data-action": "decrement",
|
|
1137
|
+
disabled: props1.min ? store.value <= props1.min : false,
|
|
1134
1138
|
onClick$: /* @__PURE__ */ inlinedQrl((event, element) => {
|
|
1135
1139
|
const [props2, store2] = useLexicalScope();
|
|
1136
1140
|
store2.value = store2.value - (props2.step ?? 1);
|
|
1137
1141
|
props2.onDecrement$(event, element, store2);
|
|
1138
|
-
}, "
|
|
1142
|
+
}, "NumberInputRaw_component_div_Button_onClick_PgKg57gfX0I", [
|
|
1139
1143
|
props,
|
|
1140
1144
|
store
|
|
1141
|
-
])
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
+
]),
|
|
1146
|
+
get class() {
|
|
1147
|
+
return {
|
|
1148
|
+
"mr-2": props.input
|
|
1149
|
+
};
|
|
1150
|
+
},
|
|
1151
|
+
children: /* @__PURE__ */ _jsxC(Minus, {
|
|
1152
|
+
class: "fill-current",
|
|
1153
|
+
width: "24",
|
|
1154
|
+
[_IMMUTABLE]: {
|
|
1155
|
+
class: _IMMUTABLE,
|
|
1156
|
+
width: _IMMUTABLE
|
|
1157
|
+
}
|
|
1158
|
+
}, 3, "gk_3"),
|
|
1145
1159
|
[_IMMUTABLE]: {
|
|
1146
|
-
|
|
1147
|
-
|
|
1160
|
+
"aria-label": _IMMUTABLE,
|
|
1161
|
+
class: _fnSignal((p0) => ({
|
|
1162
|
+
"mr-2": p0.input
|
|
1163
|
+
}), [
|
|
1164
|
+
props
|
|
1165
|
+
], '{"mr-2":p0.input}'),
|
|
1166
|
+
color: _fnSignal((p0) => p0.input ? "gray" : "darkgray", [
|
|
1167
|
+
props
|
|
1168
|
+
], 'p0.input?"gray":"darkgray"'),
|
|
1169
|
+
"data-action": _IMMUTABLE,
|
|
1170
|
+
onClick$: _IMMUTABLE
|
|
1148
1171
|
}
|
|
1149
|
-
},
|
|
1172
|
+
}, 1, "gk_4"),
|
|
1150
1173
|
props.input && /* @__PURE__ */ _jsxS("input", {
|
|
1151
1174
|
...props1,
|
|
1152
1175
|
class: {
|
|
1153
|
-
|
|
1176
|
+
[InputClasses]: true,
|
|
1154
1177
|
...props1.class
|
|
1155
1178
|
}
|
|
1156
1179
|
}, {
|
|
@@ -1161,158 +1184,238 @@ const NumberInputRaw = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((
|
|
|
1161
1184
|
value: _fnSignal((p0) => p0.value, [
|
|
1162
1185
|
store
|
|
1163
1186
|
], "p0.value")
|
|
1164
|
-
}, 0, "
|
|
1165
|
-
/* @__PURE__ */
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
"px-3 rounded-r-md border-l-0": props.input,
|
|
1169
|
-
"w-[50%] rounded-md": !props.input,
|
|
1170
|
-
"opacity-50 pointer-events-none": props1.max ? store.value >= props1.max : false
|
|
1187
|
+
}, 0, "gk_5"),
|
|
1188
|
+
/* @__PURE__ */ _jsxC(Button, {
|
|
1189
|
+
get color() {
|
|
1190
|
+
return props.input ? "gray" : "darkgray";
|
|
1171
1191
|
},
|
|
1172
|
-
disabled: props1.max ? store.value >= props1.max : false
|
|
1173
|
-
}, {
|
|
1174
1192
|
"aria-label": "Increment",
|
|
1175
1193
|
"data-action": "increment",
|
|
1194
|
+
disabled: props1.max ? store.value >= props1.max : false,
|
|
1176
1195
|
onClick$: /* @__PURE__ */ inlinedQrl((event, element) => {
|
|
1177
1196
|
const [props2, store2] = useLexicalScope();
|
|
1178
1197
|
store2.value = store2.value + (props2.step ?? 1);
|
|
1179
1198
|
props2.onIncrement$(event, element, store2);
|
|
1180
|
-
}, "
|
|
1199
|
+
}, "NumberInputRaw_component_div_Button_onClick_1_UzVlUpg1uGs", [
|
|
1181
1200
|
props,
|
|
1182
1201
|
store
|
|
1183
|
-
])
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1202
|
+
]),
|
|
1203
|
+
get class() {
|
|
1204
|
+
return {
|
|
1205
|
+
"ml-2": props.input
|
|
1206
|
+
};
|
|
1207
|
+
},
|
|
1208
|
+
children: /* @__PURE__ */ _jsxC(Plus, {
|
|
1209
|
+
class: "fill-current",
|
|
1210
|
+
width: "24",
|
|
1211
|
+
[_IMMUTABLE]: {
|
|
1212
|
+
class: _IMMUTABLE,
|
|
1213
|
+
width: _IMMUTABLE
|
|
1214
|
+
}
|
|
1215
|
+
}, 3, "gk_6"),
|
|
1187
1216
|
[_IMMUTABLE]: {
|
|
1188
|
-
|
|
1189
|
-
|
|
1217
|
+
"aria-label": _IMMUTABLE,
|
|
1218
|
+
class: _fnSignal((p0) => ({
|
|
1219
|
+
"ml-2": p0.input
|
|
1220
|
+
}), [
|
|
1221
|
+
props
|
|
1222
|
+
], '{"ml-2":p0.input}'),
|
|
1223
|
+
color: _fnSignal((p0) => p0.input ? "gray" : "darkgray", [
|
|
1224
|
+
props
|
|
1225
|
+
], 'p0.input?"gray":"darkgray"'),
|
|
1226
|
+
"data-action": _IMMUTABLE,
|
|
1227
|
+
onClick$: _IMMUTABLE
|
|
1190
1228
|
}
|
|
1191
|
-
},
|
|
1192
|
-
], 1, "
|
|
1229
|
+
}, 1, "gk_7")
|
|
1230
|
+
], 1, "gk_8");
|
|
1193
1231
|
}, "NumberInputRaw_component_8sGf0eS1rvo"));
|
|
1194
|
-
const
|
|
1232
|
+
const ChevronDown = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
1233
|
+
return /* @__PURE__ */ _jsxS("svg", {
|
|
1234
|
+
...props,
|
|
1235
|
+
children: /* @__PURE__ */ _jsxQ("path", null, {
|
|
1236
|
+
d: "M112 184l144 144 144-144",
|
|
1237
|
+
fill: "none",
|
|
1238
|
+
stroke: "currentColor",
|
|
1239
|
+
"stroke-linecap": "round",
|
|
1240
|
+
"stroke-linejoin": "round",
|
|
1241
|
+
"stroke-width": "48"
|
|
1242
|
+
}, null, 3, null)
|
|
1243
|
+
}, {
|
|
1244
|
+
height: _fnSignal((p0) => p0.width, [
|
|
1245
|
+
props
|
|
1246
|
+
], "p0.width"),
|
|
1247
|
+
viewBox: "0 0 512 512",
|
|
1248
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
1249
|
+
}, 0, "rN_0");
|
|
1250
|
+
}, "ChevronDown_component_V0linof0cMQ"));
|
|
1251
|
+
const SelectInput = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
1195
1252
|
return /* @__PURE__ */ _jsxQ("div", null, {
|
|
1196
1253
|
class: "flex flex-col"
|
|
1197
1254
|
}, [
|
|
1198
1255
|
/* @__PURE__ */ _jsxQ("label", null, {
|
|
1199
|
-
class: "
|
|
1256
|
+
class: "pb-2",
|
|
1200
1257
|
for: _fnSignal((p0) => p0.id, [
|
|
1201
1258
|
props
|
|
1202
1259
|
], "p0.id")
|
|
1203
|
-
}, /* @__PURE__ */ _jsxC(Slot, null, 3, "
|
|
1204
|
-
/* @__PURE__ */ _jsxC(
|
|
1205
|
-
...props
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
const OutputFieldRaw = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
1260
|
+
}, /* @__PURE__ */ _jsxC(Slot, null, 3, "cA_0"), 1, null),
|
|
1261
|
+
/* @__PURE__ */ _jsxC(SelectInputRaw, {
|
|
1262
|
+
...props
|
|
1263
|
+
}, 0, "cA_1")
|
|
1264
|
+
], 1, "cA_2");
|
|
1265
|
+
}, "SelectInput_component_m80ag1KuJSk"));
|
|
1266
|
+
const SelectInputRaw = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
1211
1267
|
const props1 = _restProps(props, [
|
|
1212
|
-
"
|
|
1268
|
+
"id",
|
|
1269
|
+
"values"
|
|
1213
1270
|
]);
|
|
1214
|
-
const
|
|
1215
|
-
|
|
1216
|
-
}, {
|
|
1217
|
-
deep: true
|
|
1271
|
+
const store = useStore({
|
|
1272
|
+
opened: false
|
|
1218
1273
|
});
|
|
1219
|
-
return /* @__PURE__ */ _jsxC(Fragment, {
|
|
1220
|
-
children: [
|
|
1221
|
-
/* @__PURE__ */ _jsxS("textarea", {
|
|
1222
|
-
...props1,
|
|
1223
|
-
class: {
|
|
1224
|
-
"transition ease-in-out cursor-pointer text-lg border border-gray-700 bg-gray-800 text-gray-50 hover:bg-gray-700 focus:bg-gray-700 rounded-md px-3 py-2 break-words": true,
|
|
1225
|
-
...props1.class
|
|
1226
|
-
},
|
|
1227
|
-
onChange$: /* @__PURE__ */ inlinedQrl((event, element) => {
|
|
1228
|
-
const [alertsStore2, props2] = useLexicalScope();
|
|
1229
|
-
if (props2.onChange$)
|
|
1230
|
-
props2.onChange$(event, element, alertsStore2);
|
|
1231
|
-
}, "OutputFieldRaw_component__Fragment_textarea_onChange_sGG9tIcP0OY", [
|
|
1232
|
-
alertsStore,
|
|
1233
|
-
props
|
|
1234
|
-
]),
|
|
1235
|
-
onClick$: /* @__PURE__ */ inlinedQrl((event, element) => {
|
|
1236
|
-
const [alertsStore2] = useLexicalScope();
|
|
1237
|
-
navigator.clipboard.writeText(element.value);
|
|
1238
|
-
const alert = {
|
|
1239
|
-
class: "text-green-500",
|
|
1240
|
-
text: "Copied to clipboard!"
|
|
1241
|
-
};
|
|
1242
|
-
alertsStore2.alerts.push(alert);
|
|
1243
|
-
setTimeout(() => {
|
|
1244
|
-
alertsStore2.alerts.splice(alertsStore2.alerts.indexOf(alert), 1);
|
|
1245
|
-
}, 1e3);
|
|
1246
|
-
}, "OutputFieldRaw_component__Fragment_textarea_onClick_7OWCYv02KFs", [
|
|
1247
|
-
alertsStore
|
|
1248
|
-
])
|
|
1249
|
-
}, null, 0, null),
|
|
1250
|
-
alertsStore.alerts.map((alert, i) => /* @__PURE__ */ _jsxQ("p", {
|
|
1251
|
-
class: _wrapSignal(alert, "class"),
|
|
1252
|
-
dangerouslySetInnerHTML: _wrapSignal(alert, "text")
|
|
1253
|
-
}, null, null, 3, `output-alert${i}`))
|
|
1254
|
-
]
|
|
1255
|
-
}, 1, "ze_3");
|
|
1256
|
-
}, "OutputFieldRaw_component_OxiM0W3AR0o"));
|
|
1257
|
-
const SelectInput = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
1258
1274
|
return /* @__PURE__ */ _jsxQ("div", null, {
|
|
1259
|
-
class: "
|
|
1275
|
+
class: "relative"
|
|
1260
1276
|
}, [
|
|
1261
|
-
/* @__PURE__ */
|
|
1262
|
-
|
|
1263
|
-
|
|
1277
|
+
/* @__PURE__ */ _jsxS("select", {
|
|
1278
|
+
...props1,
|
|
1279
|
+
children: props.values.map((value, i) => {
|
|
1280
|
+
return /* @__PURE__ */ _jsxQ("option", {
|
|
1281
|
+
value: _wrapSignal(value, "value")
|
|
1282
|
+
}, null, value.name, 1, i);
|
|
1283
|
+
})
|
|
1284
|
+
}, {
|
|
1285
|
+
class: {
|
|
1286
|
+
"hidden": true
|
|
1287
|
+
},
|
|
1288
|
+
id: _fnSignal((p0) => p0.id, [
|
|
1264
1289
|
props
|
|
1265
1290
|
], "p0.id")
|
|
1266
|
-
},
|
|
1267
|
-
|
|
1291
|
+
}, 0, null),
|
|
1292
|
+
/* @__PURE__ */ _jsxC(Button, {
|
|
1293
|
+
children: [
|
|
1294
|
+
/* @__PURE__ */ _jsxQ("span", null, {
|
|
1295
|
+
id: _fnSignal((p0) => `lui-${p0.id}-name`, [
|
|
1296
|
+
props
|
|
1297
|
+
], "`lui-${p0.id}-name`")
|
|
1298
|
+
}, props.values.find((value) => value.value.toString() === props1.value)?.name ?? props.values[0].name, 1, null),
|
|
1299
|
+
/* @__PURE__ */ _jsxC(ChevronDown, {
|
|
1300
|
+
width: 20,
|
|
1301
|
+
get class() {
|
|
1302
|
+
return {
|
|
1303
|
+
"transition-all duration-200": true,
|
|
1304
|
+
"transform rotate-180": store.opened
|
|
1305
|
+
};
|
|
1306
|
+
},
|
|
1307
|
+
[_IMMUTABLE]: {
|
|
1308
|
+
class: _fnSignal((p0) => ({
|
|
1309
|
+
"transition-all duration-200": true,
|
|
1310
|
+
"transform rotate-180": p0.opened
|
|
1311
|
+
}), [
|
|
1312
|
+
store
|
|
1313
|
+
], '{"transition-all duration-200":true,"transform rotate-180":p0.opened}'),
|
|
1314
|
+
width: _IMMUTABLE
|
|
1315
|
+
}
|
|
1316
|
+
}, 3, "cA_3")
|
|
1317
|
+
],
|
|
1318
|
+
class: {
|
|
1319
|
+
...props1.class
|
|
1320
|
+
},
|
|
1321
|
+
onClick$: /* @__PURE__ */ inlinedQrl(() => {
|
|
1322
|
+
const [store2] = useLexicalScope();
|
|
1323
|
+
store2.opened = !store2.opened;
|
|
1324
|
+
}, "SelectInputRaw_component_div_Button_onClick_9Gkbglaqsdw", [
|
|
1325
|
+
store
|
|
1326
|
+
]),
|
|
1268
1327
|
[_IMMUTABLE]: {
|
|
1269
|
-
|
|
1328
|
+
onClick$: _IMMUTABLE
|
|
1270
1329
|
}
|
|
1271
|
-
},
|
|
1272
|
-
/* @__PURE__ */
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
},
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1330
|
+
}, 1, "cA_4"),
|
|
1331
|
+
/* @__PURE__ */ _jsxQ("div", {
|
|
1332
|
+
class: {
|
|
1333
|
+
"transition-all absolute top-full p-1 mt-2 gap-1 left-0 bg-gray-800/50 backdrop-blur-xl flex flex-col rounded-lg border border-gray-700 z-[1000] max-h-72 overflow-scroll": true,
|
|
1334
|
+
"pointer-events-none opacity-0 scale-95": !store.opened
|
|
1335
|
+
}
|
|
1336
|
+
}, {
|
|
1337
|
+
id: _fnSignal((p0) => `lui-${p0.id}-opts`, [
|
|
1338
|
+
props
|
|
1339
|
+
], "`lui-${p0.id}-opts`")
|
|
1340
|
+
}, props.values.map((value, i) => {
|
|
1341
|
+
return /* @__PURE__ */ _jsxC(Button, {
|
|
1342
|
+
onClick$: /* @__PURE__ */ inlinedQrl(() => {
|
|
1343
|
+
const [props2, store2, value2] = useLexicalScope();
|
|
1344
|
+
store2.opened = false;
|
|
1345
|
+
const select = document.getElementById(props2.id);
|
|
1346
|
+
select.value = value2.value.toString();
|
|
1347
|
+
const name = document.getElementById(`lui-${props2.id}-name`);
|
|
1348
|
+
name.textContent = value2.name;
|
|
1349
|
+
select.dispatchEvent(new Event("change"));
|
|
1350
|
+
}, "SelectInputRaw_component_div_div_Button_onClick_mLa0FdeKCLw", [
|
|
1351
|
+
props,
|
|
1352
|
+
store,
|
|
1353
|
+
value
|
|
1354
|
+
]),
|
|
1355
|
+
get class() {
|
|
1356
|
+
return {
|
|
1357
|
+
"border-0 bg-transparent": true,
|
|
1358
|
+
"opacity-0": !store.opened
|
|
1359
|
+
};
|
|
1360
|
+
},
|
|
1361
|
+
children: _wrapSignal(value, "name"),
|
|
1362
|
+
[_IMMUTABLE]: {
|
|
1363
|
+
class: _fnSignal((p0) => ({
|
|
1364
|
+
"border-0 bg-transparent": true,
|
|
1365
|
+
"opacity-0": !p0.opened
|
|
1366
|
+
}), [
|
|
1367
|
+
store
|
|
1368
|
+
], '{"border-0 bg-transparent":true,"opacity-0":!p0.opened}')
|
|
1369
|
+
}
|
|
1370
|
+
}, 1, i);
|
|
1371
|
+
}), 1, null)
|
|
1372
|
+
], 1, "cA_5");
|
|
1291
1373
|
}, "SelectInputRaw_component_Itdx5yPeQd4"));
|
|
1292
|
-
const
|
|
1374
|
+
const TextArea = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
1293
1375
|
return /* @__PURE__ */ _jsxQ("div", null, {
|
|
1294
1376
|
class: "flex flex-col"
|
|
1295
1377
|
}, [
|
|
1296
1378
|
/* @__PURE__ */ _jsxQ("label", null, {
|
|
1297
|
-
class: "
|
|
1379
|
+
class: "pb-2",
|
|
1298
1380
|
for: _fnSignal((p0) => p0.id, [
|
|
1299
1381
|
props
|
|
1300
1382
|
], "p0.id")
|
|
1301
|
-
}, /* @__PURE__ */ _jsxC(Slot, null, 3, "
|
|
1302
|
-
/* @__PURE__ */ _jsxC(
|
|
1383
|
+
}, /* @__PURE__ */ _jsxC(Slot, null, 3, "UP_0"), 1, null),
|
|
1384
|
+
/* @__PURE__ */ _jsxC(TextAreaRaw, {
|
|
1303
1385
|
...props
|
|
1304
|
-
}, 0, "
|
|
1305
|
-
], 1, "
|
|
1306
|
-
}, "
|
|
1307
|
-
const
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1386
|
+
}, 0, "UP_1")
|
|
1387
|
+
], 1, "UP_2");
|
|
1388
|
+
}, "TextArea_component_rWDoQFL2c0g"));
|
|
1389
|
+
const TextAreaRaw = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
1390
|
+
const props1 = _restProps(props, [
|
|
1391
|
+
"output"
|
|
1392
|
+
]);
|
|
1393
|
+
return /* @__PURE__ */ _jsxC(Fragment, {
|
|
1394
|
+
children: /* @__PURE__ */ _jsxS("textarea", {
|
|
1395
|
+
...props1,
|
|
1396
|
+
class: {
|
|
1397
|
+
[InputClasses]: true,
|
|
1398
|
+
"h-32": true,
|
|
1399
|
+
"cursor-pointer active:bg-gray-600": props.output,
|
|
1400
|
+
...props1.class
|
|
1401
|
+
},
|
|
1402
|
+
onClick$: props.output ? /* @__PURE__ */ inlinedQrl((event, element) => {
|
|
1403
|
+
navigator.clipboard.writeText(element.value);
|
|
1404
|
+
const notification = document.createElement("div");
|
|
1405
|
+
notification.className = "fixed bottom-0 right-0 px-6 py-4 m-6 bg-green-600/50 border border-green-500 text-gray-50 rounded-md shadow-lg whitespace-nowrap backdrop-blur-xl";
|
|
1406
|
+
notification.innerText = "Copied to clipboard!";
|
|
1407
|
+
document.body.appendChild(notification);
|
|
1408
|
+
setTimeout(() => {
|
|
1409
|
+
notification.remove();
|
|
1410
|
+
}, 1e3);
|
|
1411
|
+
}, "TextAreaRaw_component__Fragment_textarea_onClick_YAQUkxxJ6Sg") : void 0
|
|
1412
|
+
}, {
|
|
1413
|
+
readOnly: _fnSignal((p0) => p0.output, [
|
|
1414
|
+
props
|
|
1415
|
+
], "p0.output")
|
|
1416
|
+
}, 0, null)
|
|
1417
|
+
}, 1, "UP_3");
|
|
1418
|
+
}, "TextAreaRaw_component_PZiPScYxgNk"));
|
|
1316
1419
|
const Toggle = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
1317
1420
|
const props1 = _restProps(props, [
|
|
1318
1421
|
"center"
|
|
@@ -1339,10 +1442,12 @@ const Toggle = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =
|
|
|
1339
1442
|
}, 0, null),
|
|
1340
1443
|
/* @__PURE__ */ _jsxQ("div", null, {
|
|
1341
1444
|
class: {
|
|
1342
|
-
"transition ease-in-out w-12 h-7 rounded-md peer
|
|
1343
|
-
"
|
|
1344
|
-
"after:content-[''] after:absolute after:top-[4px] after:left-[4px] after:
|
|
1345
|
-
"
|
|
1445
|
+
"transition ease-in-out w-12 h-7 rounded-md peer border hover:shadow-lg": true,
|
|
1446
|
+
"bg-gray-800 border-gray-700 hover:bg-gray-700 active:bg-gray-600": true,
|
|
1447
|
+
"after:content-[''] after:absolute after:top-[4px] after:left-[4px] after:border after:rounded-md after:h-5 after:w-5 after:transition-all after:ease-in-out": true,
|
|
1448
|
+
"after:bg-gray-700 after:border-gray-600 after:hover:bg-gray-600 after:active:bg-gray-500": true,
|
|
1449
|
+
"peer-checked:bg-blue-700 peer-checked:border-blue-600 peer-checked:hover:bg-blue-600 peer-checked:active:bg-blue-500": true,
|
|
1450
|
+
"peer-checked:after:translate-x-full peer-checked:after:bg-blue-600 peer-checked:after:border-blue-500 peer-checked:after:hover:bg-blue-500 peer-checked:after:active:bg-blue-400": true
|
|
1346
1451
|
}
|
|
1347
1452
|
}, null, 3, null)
|
|
1348
1453
|
], 1, null),
|
|
@@ -1791,6 +1896,7 @@ export {
|
|
|
1791
1896
|
Card,
|
|
1792
1897
|
CardHeader,
|
|
1793
1898
|
ColorInput,
|
|
1899
|
+
InputClasses,
|
|
1794
1900
|
LoadingIcon,
|
|
1795
1901
|
LogoBirdflop,
|
|
1796
1902
|
LogoDiscord,
|
|
@@ -1805,12 +1911,10 @@ export {
|
|
|
1805
1911
|
LogoWaterfall,
|
|
1806
1912
|
NumberInput,
|
|
1807
1913
|
NumberInputRaw,
|
|
1808
|
-
OutputField,
|
|
1809
|
-
OutputFieldRaw,
|
|
1810
1914
|
SelectInput,
|
|
1811
1915
|
SelectInputRaw,
|
|
1812
|
-
|
|
1813
|
-
|
|
1916
|
+
TextArea,
|
|
1917
|
+
TextAreaRaw,
|
|
1814
1918
|
TextInput,
|
|
1815
1919
|
TextInputRaw,
|
|
1816
1920
|
Toggle,
|