@luminescent/ui 0.10.0-0 → 0.10.0-2
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.qwik.cjs +173 -80
- package/lib/index.qwik.mjs +174 -81
- package/lib-types/components/elements/Button.d.ts +21 -4
- package/lib-types/components/elements/Nav.d.ts +2 -1
- package/lib-types/components/elements/SelectInput.d.ts +4 -1
- package/lib-types/components/elements/TextInput.d.ts +1 -1
- package/lib-types/utils/color.d.ts +36 -0
- package/package.json +8 -8
- package/LICENSE +0 -661
- package/README.md +0 -48
- package/lib-types/tailwind.config.d.ts +0 -122
package/lib/index.qwik.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { componentQrl, inlinedQrl, _jsxQ, _fnSignal, _restProps, _jsxS, _jsxC, Slot, _wrapSignal, useStore, useLexicalScope, _IMMUTABLE, _wrapProp, useOn, _jsxBranch, useStylesQrl } from "@builder.io/qwik";
|
|
1
|
+
import { componentQrl, inlinedQrl, _jsxQ, _fnSignal, _restProps, _jsxS, _jsxC, Slot, _wrapSignal, useStore, useLexicalScope, _IMMUTABLE, _wrapProp, useOn, _jsxBranch, useSignal, useStylesQrl } from "@builder.io/qwik";
|
|
2
2
|
import { Fragment } from "@builder.io/qwik/jsx-runtime";
|
|
3
3
|
const Anchor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => /* @__PURE__ */ _jsxQ("span", null, {
|
|
4
4
|
class: "block h-32 -mt-32",
|
|
@@ -15,24 +15,43 @@ const buttonColorClasses = {
|
|
|
15
15
|
yellow: "bg-yellow-700/90 border-yellow-600 hover:bg-yellow-600 active:bg-yellow-500 focus:border-yellow-500",
|
|
16
16
|
gray: "bg-gray-700/90 border-gray-600 hover:bg-gray-600 active:bg-gray-500 focus:border-gray-500",
|
|
17
17
|
darkgray: "bg-gray-800/90 border-gray-700 hover:bg-gray-700 active:bg-gray-600 focus:border-gray-600",
|
|
18
|
-
transparent: "bg-transparent border-transparent hover:bg-gray-
|
|
18
|
+
transparent: "bg-transparent border-transparent hover:bg-gray-600/50 active:bg-gray-600/60 focus:border-gray-600/60"
|
|
19
19
|
};
|
|
20
20
|
const sizeClasses = {
|
|
21
|
-
sm:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
sm: {
|
|
22
|
+
base: "text-base rounded-md gap-2",
|
|
23
|
+
pad: "px-2.5 py-1.5",
|
|
24
|
+
equal: "p-1.5"
|
|
25
|
+
},
|
|
26
|
+
md: {
|
|
27
|
+
base: "text-base rounded-md gap-3",
|
|
28
|
+
pad: "px-4 py-2",
|
|
29
|
+
equal: "p-2"
|
|
30
|
+
},
|
|
31
|
+
lg: {
|
|
32
|
+
base: "text-lg rounded-lg gap-3",
|
|
33
|
+
pad: "px-6 py-3",
|
|
34
|
+
equal: "p-3"
|
|
35
|
+
},
|
|
36
|
+
xl: {
|
|
37
|
+
base: "text-lg rounded-xl gap-4",
|
|
38
|
+
pad: "px-8 py-4",
|
|
39
|
+
equal: "p-4"
|
|
40
|
+
}
|
|
25
41
|
};
|
|
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 whitespace-nowrap";
|
|
42
|
+
const buttonClass = "relative flex items-center gap-3 motion-safe:transition ease-in-out border text-gray-50 fill-gray-50 disabled:opacity-50 hover:shadow-lg motion-safe:active:scale-95 whitespace-nowrap touch-manipulation select-none";
|
|
27
43
|
const Button = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
28
44
|
const props1 = _restProps(props, [
|
|
29
45
|
"color",
|
|
30
|
-
"size"
|
|
46
|
+
"size",
|
|
47
|
+
"square"
|
|
31
48
|
]);
|
|
32
49
|
props1.class = {
|
|
33
50
|
[buttonClass]: true,
|
|
34
51
|
[buttonColorClasses[props.color ?? "darkgray"]]: true,
|
|
35
|
-
[sizeClasses[props.size ?? "md"]]: true,
|
|
52
|
+
[sizeClasses[props.size ?? "md"].base]: true,
|
|
53
|
+
[sizeClasses[props.size ?? "md"].pad]: !props.square,
|
|
54
|
+
[sizeClasses[props.size ?? "md"].equal]: props.square,
|
|
36
55
|
...props1.class
|
|
37
56
|
};
|
|
38
57
|
return /* @__PURE__ */ _jsxS("button", {
|
|
@@ -43,12 +62,15 @@ const Button = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =
|
|
|
43
62
|
const ButtonAnchor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
44
63
|
const props1 = _restProps(props, [
|
|
45
64
|
"color",
|
|
46
|
-
"size"
|
|
65
|
+
"size",
|
|
66
|
+
"square"
|
|
47
67
|
]);
|
|
48
68
|
props1.class = {
|
|
49
69
|
[buttonClass]: true,
|
|
50
70
|
[buttonColorClasses[props.color ?? "darkgray"]]: true,
|
|
51
|
-
[sizeClasses[props.size ?? "md"]]: true,
|
|
71
|
+
[sizeClasses[props.size ?? "md"].base]: true,
|
|
72
|
+
[sizeClasses[props.size ?? "md"].pad]: !props.square,
|
|
73
|
+
[sizeClasses[props.size ?? "md"].equal]: props.square,
|
|
52
74
|
...props1.class
|
|
53
75
|
};
|
|
54
76
|
return /* @__PURE__ */ _jsxS("a", {
|
|
@@ -223,7 +245,7 @@ const Card = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
223
245
|
class: "absolute inset-0"
|
|
224
246
|
}, null, 3, "OW_1"),
|
|
225
247
|
props.blobs && /* @__PURE__ */ _jsxQ("div", null, {
|
|
226
|
-
class: "absolute -z-10 inset-0 transition-all overflow-clip animate-in fade-in anim-duration-[2s]",
|
|
248
|
+
class: "motion-reduce:hidden absolute -z-10 inset-0 transition-all overflow-clip animate-in fade-in anim-duration-[2s]",
|
|
227
249
|
style: {
|
|
228
250
|
containerType: "size"
|
|
229
251
|
}
|
|
@@ -254,22 +276,22 @@ const Card = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
254
276
|
], 1, "OW_2")
|
|
255
277
|
],
|
|
256
278
|
class: {
|
|
257
|
-
"relative p-8 border rounded-lg transition-all": true,
|
|
279
|
+
"relative p-8 border rounded-lg motion-safe:transition-all": true,
|
|
258
280
|
[cardColorClasses[props.color ?? "darkgray"].card.bg]: !props.blobs,
|
|
259
281
|
[cardColorClasses[props.color ?? "darkgray"].card.bg_blobs]: props.blobs,
|
|
260
282
|
[cardColorClasses[props.color ?? "darkgray"].card.hover + " hover:shadow-lg"]: props.hover,
|
|
261
|
-
[cardColorClasses[props.color ?? "darkgray"].card.click + " active:scale-[99%] cursor-pointer select-none"]: props.hover == "clickable",
|
|
283
|
+
[cardColorClasses[props.color ?? "darkgray"].card.click + " active:scale-[99%] cursor-pointer select-none touch-manipulation"]: props.hover == "clickable",
|
|
262
284
|
...props1.class
|
|
263
285
|
}
|
|
264
286
|
}, null, 0, "OW_3");
|
|
265
287
|
}, "Card_component_DlkkcTEVka4"));
|
|
266
|
-
const InputClasses = "transition ease-in-out 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-2.5 py-1.5";
|
|
288
|
+
const InputClasses = "motion-safe:transition ease-in-out 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-2.5 py-1.5 touch-manipulation";
|
|
267
289
|
const TextInput = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
268
290
|
return /* @__PURE__ */ _jsxQ("div", null, {
|
|
269
291
|
class: "flex flex-col"
|
|
270
292
|
}, [
|
|
271
293
|
/* @__PURE__ */ _jsxQ("label", null, {
|
|
272
|
-
class: "text-gray-300 pb-1",
|
|
294
|
+
class: "text-gray-300 pb-1 select-none",
|
|
273
295
|
for: _fnSignal((p0) => p0.id, [
|
|
274
296
|
props
|
|
275
297
|
], "p0.id")
|
|
@@ -414,7 +436,7 @@ const ColorInput = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((prop
|
|
|
414
436
|
/* @__PURE__ */ _jsxQ("label", {
|
|
415
437
|
for: _wrapSignal(props1, "id")
|
|
416
438
|
}, {
|
|
417
|
-
class: "text-gray-300 pb-1 flex"
|
|
439
|
+
class: "text-gray-300 pb-1 flex select-none"
|
|
418
440
|
}, /* @__PURE__ */ _jsxC(Slot, null, 3, "0s_0"), 1, null),
|
|
419
441
|
/* @__PURE__ */ _jsxC(TextInputRaw, {
|
|
420
442
|
...props1,
|
|
@@ -487,7 +509,7 @@ const ColorInput = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((prop
|
|
|
487
509
|
},
|
|
488
510
|
get class() {
|
|
489
511
|
return {
|
|
490
|
-
"transition-all absolute top-full mt-2 left-0 gap-1 z-[1000]": true,
|
|
512
|
+
"motion-safe:transition-all absolute top-full mt-2 left-0 gap-1 z-[1000]": true,
|
|
491
513
|
"opacity-0 pointer-events-none scale-95": !store.opened
|
|
492
514
|
};
|
|
493
515
|
},
|
|
@@ -520,11 +542,11 @@ const ColorInput = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((prop
|
|
|
520
542
|
]),
|
|
521
543
|
[_IMMUTABLE]: {
|
|
522
544
|
class: _fnSignal((p0) => ({
|
|
523
|
-
"transition-all absolute top-full mt-2 left-0 gap-1 z-[1000]": true,
|
|
545
|
+
"motion-safe:transition-all absolute top-full mt-2 left-0 gap-1 z-[1000]": true,
|
|
524
546
|
"opacity-0 pointer-events-none scale-95": !p0.opened
|
|
525
547
|
}), [
|
|
526
548
|
store
|
|
527
|
-
], '{"transition-all absolute top-full mt-2 left-0 gap-1 z-[1000]":true,"opacity-0 pointer-events-none scale-95":!p0.opened}'),
|
|
549
|
+
], '{"motion-safe:transition-all absolute top-full mt-2 left-0 gap-1 z-[1000]":true,"opacity-0 pointer-events-none scale-95":!p0.opened}'),
|
|
528
550
|
color: _fnSignal((p0) => p0.value ?? "#000000", [
|
|
529
551
|
props
|
|
530
552
|
], 'p0.value??"#000000"'),
|
|
@@ -678,7 +700,7 @@ const ColorPickerRaw = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((
|
|
|
678
700
|
]));
|
|
679
701
|
return /* @__PURE__ */ _jsxQ("div", {
|
|
680
702
|
class: {
|
|
681
|
-
"transition-all p-4 bg-gray-800/50 backdrop-blur-xl flex flex-col gap-6 rounded-lg border border-gray-700 touch-none": true,
|
|
703
|
+
"motion-safe:transition-all p-4 bg-gray-800/50 backdrop-blur-xl flex flex-col gap-6 rounded-lg border border-gray-700 touch-none": true,
|
|
682
704
|
...props1.class
|
|
683
705
|
}
|
|
684
706
|
}, {
|
|
@@ -755,7 +777,7 @@ const ColorPickerRaw = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((
|
|
|
755
777
|
]),
|
|
756
778
|
style: `background: ${color}`
|
|
757
779
|
}, {
|
|
758
|
-
class: "w-[25px] h-[25px] border border-gray-700 rounded-md hover:scale-110 transition-all",
|
|
780
|
+
class: "w-[25px] h-[25px] border border-gray-700 rounded-md hover:scale-110 motion-safe:transition-all",
|
|
759
781
|
"preventdefault:mousedown": true,
|
|
760
782
|
"preventdefault:touchstart": true
|
|
761
783
|
}, null, 2, i);
|
|
@@ -821,12 +843,12 @@ const Header = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =
|
|
|
821
843
|
Component,
|
|
822
844
|
/* @__PURE__ */ _jsxQ("div", null, {
|
|
823
845
|
class: _fnSignal((p0) => ({
|
|
824
|
-
"transition-all duration-200": true,
|
|
846
|
+
"motion-safe:transition-all duration-200": true,
|
|
825
847
|
"opacity-0": !p0.loading,
|
|
826
848
|
"opacity-100": p0.loading
|
|
827
849
|
}), [
|
|
828
850
|
props
|
|
829
|
-
], '{"transition-all duration-200":true,"opacity-0":!p0.loading,"opacity-100":p0.loading}')
|
|
851
|
+
], '{"motion-safe:transition-all duration-200":true,"opacity-0":!p0.loading,"opacity-100":p0.loading}')
|
|
830
852
|
}, /* @__PURE__ */ _jsxC(LoadingIcon, {
|
|
831
853
|
width: 24,
|
|
832
854
|
[_IMMUTABLE]: {
|
|
@@ -836,48 +858,108 @@ const Header = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =
|
|
|
836
858
|
], 1, "dL_5");
|
|
837
859
|
return Component;
|
|
838
860
|
}, "Header_component_FfGOhhBNG5k"));
|
|
839
|
-
const
|
|
861
|
+
const Nav = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
862
|
+
const menu = useSignal(false);
|
|
840
863
|
return /* @__PURE__ */ _jsxQ("nav", null, {
|
|
841
864
|
class: _fnSignal((p0) => ({
|
|
842
|
-
"transition-all duration-200 flex flex-col
|
|
843
|
-
"
|
|
865
|
+
"motion-safe:transition-all duration-200 flex flex-col top-0 left-0 w-full z-50": true,
|
|
866
|
+
"fixed": p0.fixed,
|
|
867
|
+
"absolute": !p0.fixed
|
|
844
868
|
}), [
|
|
845
869
|
props
|
|
846
|
-
], '{"transition-all duration-200 flex flex-col
|
|
847
|
-
}, /* @__PURE__ */ _jsxQ("div", null, {
|
|
848
|
-
class: _fnSignal((p0) => ({
|
|
849
|
-
"flex justify-evenly w-full mx-auto px-4 py-2 max-w-7xl": true,
|
|
850
|
-
"bg-gray-800/50 backdrop-blur-lg drop-shadow-xl mt-3 rounded-lg": p0.floating
|
|
851
|
-
}), [
|
|
852
|
-
props
|
|
853
|
-
], '{"flex justify-evenly w-full mx-auto px-4 py-2 max-w-7xl":true,"bg-gray-800/50 backdrop-blur-lg drop-shadow-xl mt-3 rounded-lg":p0.floating}')
|
|
870
|
+
], '{"motion-safe:transition-all duration-200 flex flex-col top-0 left-0 w-full z-50":true,"fixed":p0.fixed,"absolute":!p0.fixed}')
|
|
854
871
|
}, [
|
|
855
872
|
/* @__PURE__ */ _jsxQ("div", null, {
|
|
856
|
-
class:
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
873
|
+
class: _fnSignal((p0) => ({
|
|
874
|
+
"sm:hidden motion-safe:transition-all flex flex-col px-2 items-center absolute w-full": true,
|
|
875
|
+
"top-full mt-2": p0.value,
|
|
876
|
+
"opacity-0 top-0": !p0.value
|
|
877
|
+
}), [
|
|
878
|
+
menu
|
|
879
|
+
], '{"sm:hidden motion-safe:transition-all flex flex-col px-2 items-center absolute w-full":true,"top-full mt-2":p0.value,"opacity-0 top-0":!p0.value}')
|
|
880
|
+
}, /* @__PURE__ */ _jsxQ("div", null, {
|
|
881
|
+
class: {
|
|
882
|
+
"flex flex-col motion-safe:transition-all max-w-7xl w-full p-2 bg-gray-800/50 border border-gray-700/50 backdrop-blur-lg drop-shadow-xl rounded-lg": true
|
|
861
883
|
}
|
|
862
|
-
}, 3, "8r_0"), 1, null),
|
|
863
|
-
/* @__PURE__ */ _jsxQ("div", null, {
|
|
864
|
-
class: "flex flex-1 justify-center"
|
|
865
884
|
}, /* @__PURE__ */ _jsxC(Slot, {
|
|
866
|
-
name: "
|
|
885
|
+
name: "mobile",
|
|
867
886
|
[_IMMUTABLE]: {
|
|
868
887
|
name: _IMMUTABLE
|
|
869
888
|
}
|
|
870
|
-
}, 3, "
|
|
889
|
+
}, 3, "8r_0"), 1, null), 1, null),
|
|
871
890
|
/* @__PURE__ */ _jsxQ("div", null, {
|
|
872
|
-
class:
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
[
|
|
876
|
-
|
|
891
|
+
class: _fnSignal((p0) => ({
|
|
892
|
+
"bg-gray-800/50 border-b border-gray-700/50 backdrop-blur-lg drop-shadow-xl": !p0.floating,
|
|
893
|
+
"p-2 pb-0": p0.floating
|
|
894
|
+
}), [
|
|
895
|
+
props
|
|
896
|
+
], '{"bg-gray-800/50 border-b border-gray-700/50 backdrop-blur-lg drop-shadow-xl":!p0.floating,"p-2 pb-0":p0.floating}')
|
|
897
|
+
}, /* @__PURE__ */ _jsxQ("div", {
|
|
898
|
+
class: {
|
|
899
|
+
"flex justify-evenly w-full mx-auto px-4 py-2 max-w-7xl": true,
|
|
900
|
+
"bg-gray-800/50 border border-gray-700/50 backdrop-blur-lg drop-shadow-xl rounded-lg": props.floating
|
|
877
901
|
}
|
|
878
|
-
},
|
|
879
|
-
|
|
880
|
-
|
|
902
|
+
}, null, [
|
|
903
|
+
/* @__PURE__ */ _jsxQ("div", null, {
|
|
904
|
+
class: "flex flex-1 gap-2 justify-start"
|
|
905
|
+
}, /* @__PURE__ */ _jsxC(Slot, {
|
|
906
|
+
name: "start",
|
|
907
|
+
[_IMMUTABLE]: {
|
|
908
|
+
name: _IMMUTABLE
|
|
909
|
+
}
|
|
910
|
+
}, 3, "8r_1"), 1, null),
|
|
911
|
+
/* @__PURE__ */ _jsxQ("div", null, {
|
|
912
|
+
class: "flex flex-1 gap-2 justify-center"
|
|
913
|
+
}, /* @__PURE__ */ _jsxC(Slot, {
|
|
914
|
+
name: "center",
|
|
915
|
+
[_IMMUTABLE]: {
|
|
916
|
+
name: _IMMUTABLE
|
|
917
|
+
}
|
|
918
|
+
}, 3, "8r_2"), 1, null),
|
|
919
|
+
/* @__PURE__ */ _jsxQ("div", null, {
|
|
920
|
+
class: "flex flex-1 gap-2 justify-end"
|
|
921
|
+
}, [
|
|
922
|
+
/* @__PURE__ */ _jsxC(Slot, {
|
|
923
|
+
name: "end",
|
|
924
|
+
[_IMMUTABLE]: {
|
|
925
|
+
name: _IMMUTABLE
|
|
926
|
+
}
|
|
927
|
+
}, 3, "8r_3"),
|
|
928
|
+
/* @__PURE__ */ _jsxC(Button, {
|
|
929
|
+
children: /* @__PURE__ */ _jsxQ("svg", null, {
|
|
930
|
+
class: "w-6 h-6",
|
|
931
|
+
fill: "none",
|
|
932
|
+
stroke: "currentColor",
|
|
933
|
+
viewBox: "0 0 24 24",
|
|
934
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
935
|
+
}, /* @__PURE__ */ _jsxQ("path", null, {
|
|
936
|
+
d: "M4 6h16M4 12h16m-7 6h7",
|
|
937
|
+
"stroke-linecap": "round",
|
|
938
|
+
"stroke-linejoin": "round",
|
|
939
|
+
"stroke-width": "2"
|
|
940
|
+
}, null, 3, null), 3, null),
|
|
941
|
+
class: {
|
|
942
|
+
"sm:hidden": true
|
|
943
|
+
},
|
|
944
|
+
color: "transparent",
|
|
945
|
+
onClick$: /* @__PURE__ */ inlinedQrl(() => {
|
|
946
|
+
const [menu2] = useLexicalScope();
|
|
947
|
+
return menu2.value = !menu2.value;
|
|
948
|
+
}, "Nav_component_nav_div_div_div_Button_onClick_J0TKJTxh4N4", [
|
|
949
|
+
menu
|
|
950
|
+
]),
|
|
951
|
+
square: true,
|
|
952
|
+
[_IMMUTABLE]: {
|
|
953
|
+
class: _IMMUTABLE,
|
|
954
|
+
color: _IMMUTABLE,
|
|
955
|
+
onClick$: _IMMUTABLE,
|
|
956
|
+
square: _IMMUTABLE
|
|
957
|
+
}
|
|
958
|
+
}, 3, "8r_4")
|
|
959
|
+
], 1, null)
|
|
960
|
+
], 1, null), 1, null)
|
|
961
|
+
], 1, "8r_5");
|
|
962
|
+
}, "Nav_component_ZePSmw9628k"));
|
|
881
963
|
const Plus = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
882
964
|
return /* @__PURE__ */ _jsxS("svg", {
|
|
883
965
|
...props,
|
|
@@ -921,7 +1003,7 @@ const NumberInput = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pro
|
|
|
921
1003
|
class: "flex flex-col"
|
|
922
1004
|
}, [
|
|
923
1005
|
/* @__PURE__ */ _jsxQ("label", null, {
|
|
924
|
-
class: "text-gray-300 pb-1",
|
|
1006
|
+
class: "text-gray-300 pb-1 select-none",
|
|
925
1007
|
for: _fnSignal((p0) => p0.id, [
|
|
926
1008
|
props
|
|
927
1009
|
], "p0.id")
|
|
@@ -952,11 +1034,11 @@ const NumberInputRaw = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((
|
|
|
952
1034
|
`, "NumberInputRaw_component_useStyles_v5EsWTMt0DU"));
|
|
953
1035
|
return /* @__PURE__ */ _jsxQ("div", null, {
|
|
954
1036
|
class: _fnSignal((p0) => ({
|
|
955
|
-
"flex text-gray-50": true,
|
|
1037
|
+
"flex text-gray-50 touch-manipulation": true,
|
|
956
1038
|
"gap-2": !p0.input
|
|
957
1039
|
}), [
|
|
958
1040
|
props
|
|
959
|
-
], '{"flex text-gray-50":true,"gap-2":!p0.input}')
|
|
1041
|
+
], '{"flex text-gray-50 touch-manipulation":true,"gap-2":!p0.input}')
|
|
960
1042
|
}, [
|
|
961
1043
|
/* @__PURE__ */ _jsxC(Button, {
|
|
962
1044
|
size: "sm",
|
|
@@ -1086,7 +1168,7 @@ const SelectInput = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pro
|
|
|
1086
1168
|
class: "flex flex-col"
|
|
1087
1169
|
}, [
|
|
1088
1170
|
/* @__PURE__ */ _jsxQ("label", null, {
|
|
1089
|
-
class: "text-gray-300 pb-1",
|
|
1171
|
+
class: "text-gray-300 pb-1 select-none",
|
|
1090
1172
|
for: _fnSignal((p0) => p0.id, [
|
|
1091
1173
|
props
|
|
1092
1174
|
], "p0.id")
|
|
@@ -1100,7 +1182,9 @@ const SelectInputRaw = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((
|
|
|
1100
1182
|
const props1 = _restProps(props, [
|
|
1101
1183
|
"id",
|
|
1102
1184
|
"values",
|
|
1103
|
-
"class"
|
|
1185
|
+
"class",
|
|
1186
|
+
"display",
|
|
1187
|
+
"color"
|
|
1104
1188
|
]);
|
|
1105
1189
|
const store = useStore({
|
|
1106
1190
|
opened: false
|
|
@@ -1128,7 +1212,7 @@ const SelectInputRaw = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((
|
|
|
1128
1212
|
}
|
|
1129
1213
|
`, "SelectInputRaw_component_useStyles_Zc40Za0ngqc"));
|
|
1130
1214
|
return /* @__PURE__ */ _jsxQ("div", null, {
|
|
1131
|
-
class: "relative"
|
|
1215
|
+
class: "relative touch-manipulation"
|
|
1132
1216
|
}, [
|
|
1133
1217
|
/* @__PURE__ */ _jsxS("select", {
|
|
1134
1218
|
...props1,
|
|
@@ -1146,38 +1230,44 @@ const SelectInputRaw = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((
|
|
|
1146
1230
|
], "p0.id")
|
|
1147
1231
|
}, 0, null),
|
|
1148
1232
|
/* @__PURE__ */ _jsxC(Button, {
|
|
1233
|
+
get color() {
|
|
1234
|
+
return props.color;
|
|
1235
|
+
},
|
|
1149
1236
|
size: "sm",
|
|
1150
1237
|
get class() {
|
|
1151
1238
|
return {
|
|
1152
|
-
"flex
|
|
1239
|
+
"flex": true,
|
|
1153
1240
|
...props.class
|
|
1154
1241
|
};
|
|
1155
1242
|
},
|
|
1156
1243
|
children: [
|
|
1157
|
-
|
|
1244
|
+
_fnSignal((p0) => p0.display, [
|
|
1245
|
+
props
|
|
1246
|
+
], "p0.display"),
|
|
1247
|
+
!props.display && /* @__PURE__ */ _jsxQ("span", null, {
|
|
1158
1248
|
class: "flex-1 text-left",
|
|
1159
1249
|
id: _fnSignal((p0) => `lui-${p0.id}-name`, [
|
|
1160
1250
|
props
|
|
1161
1251
|
], "`lui-${p0.id}-name`")
|
|
1162
|
-
}, props.values.find((value) => value.value.toString() === props1.value)?.name ?? props.values[0].name, 1,
|
|
1252
|
+
}, props.values.find((value) => value.value.toString() === props1.value)?.name ?? props.values[0].name, 1, "cA_3"),
|
|
1163
1253
|
/* @__PURE__ */ _jsxC(ChevronDown, {
|
|
1164
1254
|
width: 16,
|
|
1165
1255
|
get class() {
|
|
1166
1256
|
return {
|
|
1167
|
-
"transition-all duration-200": true,
|
|
1257
|
+
"motion-safe:transition-all duration-200": true,
|
|
1168
1258
|
"transform rotate-180": store.opened
|
|
1169
1259
|
};
|
|
1170
1260
|
},
|
|
1171
1261
|
[_IMMUTABLE]: {
|
|
1172
1262
|
class: _fnSignal((p0) => ({
|
|
1173
|
-
"transition-all duration-200": true,
|
|
1263
|
+
"motion-safe:transition-all duration-200": true,
|
|
1174
1264
|
"transform rotate-180": p0.opened
|
|
1175
1265
|
}), [
|
|
1176
1266
|
store
|
|
1177
|
-
], '{"transition-all duration-200":true,"transform rotate-180":p0.opened}'),
|
|
1267
|
+
], '{"motion-safe:transition-all duration-200":true,"transform rotate-180":p0.opened}'),
|
|
1178
1268
|
width: _IMMUTABLE
|
|
1179
1269
|
}
|
|
1180
|
-
}, 3, "
|
|
1270
|
+
}, 3, "cA_4")
|
|
1181
1271
|
],
|
|
1182
1272
|
onClick$: /* @__PURE__ */ inlinedQrl(() => {
|
|
1183
1273
|
const [store2] = useLexicalScope();
|
|
@@ -1187,18 +1277,21 @@ const SelectInputRaw = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((
|
|
|
1187
1277
|
]),
|
|
1188
1278
|
[_IMMUTABLE]: {
|
|
1189
1279
|
class: _fnSignal((p0) => ({
|
|
1190
|
-
"flex
|
|
1280
|
+
"flex": true,
|
|
1191
1281
|
...p0.class
|
|
1192
1282
|
}), [
|
|
1193
1283
|
props
|
|
1194
|
-
], '{"flex
|
|
1284
|
+
], '{"flex":true,...p0.class}'),
|
|
1285
|
+
color: _fnSignal((p0) => p0.color, [
|
|
1286
|
+
props
|
|
1287
|
+
], "p0.color"),
|
|
1195
1288
|
onClick$: _IMMUTABLE,
|
|
1196
1289
|
size: _IMMUTABLE
|
|
1197
1290
|
}
|
|
1198
|
-
}, 1, "
|
|
1291
|
+
}, 1, "cA_5"),
|
|
1199
1292
|
/* @__PURE__ */ _jsxQ("div", {
|
|
1200
1293
|
class: {
|
|
1201
|
-
"transition-all absolute top-full left-0 p-1 mt-2 gap-1 bg-gray-800/50 backdrop-blur-xl flex flex-col rounded-lg border border-gray-700 z-[1000] max-h-72 lui-scroll overflow-auto select-none": true,
|
|
1294
|
+
"motion-safe:transition-all absolute top-full left-0 p-1 mt-2 gap-1 bg-gray-800/50 backdrop-blur-xl flex flex-col rounded-lg border border-gray-700 z-[1000] max-h-72 lui-scroll overflow-auto select-none": true,
|
|
1202
1295
|
"pointer-events-none opacity-0 scale-95": !store.opened
|
|
1203
1296
|
}
|
|
1204
1297
|
}, {
|
|
@@ -1207,6 +1300,7 @@ const SelectInputRaw = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((
|
|
|
1207
1300
|
], "`lui-${p0.id}-opts`")
|
|
1208
1301
|
}, props.values.map((value, i) => {
|
|
1209
1302
|
return /* @__PURE__ */ _jsxC(Button, {
|
|
1303
|
+
color: "transparent",
|
|
1210
1304
|
onClick$: /* @__PURE__ */ inlinedQrl(() => {
|
|
1211
1305
|
const [props2, store2, value2] = useLexicalScope();
|
|
1212
1306
|
store2.opened = false;
|
|
@@ -1222,29 +1316,28 @@ const SelectInputRaw = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((
|
|
|
1222
1316
|
]),
|
|
1223
1317
|
get class() {
|
|
1224
1318
|
return {
|
|
1225
|
-
"border-0 bg-transparent": true,
|
|
1226
1319
|
"opacity-0": !store.opened
|
|
1227
1320
|
};
|
|
1228
1321
|
},
|
|
1229
1322
|
children: _wrapSignal(value, "name"),
|
|
1230
1323
|
[_IMMUTABLE]: {
|
|
1231
1324
|
class: _fnSignal((p0) => ({
|
|
1232
|
-
"border-0 bg-transparent": true,
|
|
1233
1325
|
"opacity-0": !p0.opened
|
|
1234
1326
|
}), [
|
|
1235
1327
|
store
|
|
1236
|
-
], '{"
|
|
1328
|
+
], '{"opacity-0":!p0.opened}'),
|
|
1329
|
+
color: _IMMUTABLE
|
|
1237
1330
|
}
|
|
1238
1331
|
}, 1, i);
|
|
1239
1332
|
}), 1, null)
|
|
1240
|
-
], 1, "
|
|
1333
|
+
], 1, "cA_6");
|
|
1241
1334
|
}, "SelectInputRaw_component_Itdx5yPeQd4"));
|
|
1242
1335
|
const TextArea = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
1243
1336
|
return /* @__PURE__ */ _jsxQ("div", null, {
|
|
1244
1337
|
class: "flex flex-col"
|
|
1245
1338
|
}, [
|
|
1246
1339
|
/* @__PURE__ */ _jsxQ("label", null, {
|
|
1247
|
-
class: "text-gray-300 pb-1",
|
|
1340
|
+
class: "text-gray-300 pb-1 select-none",
|
|
1248
1341
|
for: _fnSignal((p0) => p0.id, [
|
|
1249
1342
|
props
|
|
1250
1343
|
], "p0.id")
|
|
@@ -1291,11 +1384,11 @@ const Toggle = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =
|
|
|
1291
1384
|
]);
|
|
1292
1385
|
return /* @__PURE__ */ _jsxQ("div", null, {
|
|
1293
1386
|
class: _fnSignal((p0) => ({
|
|
1294
|
-
"flex gap-3 items-center": true,
|
|
1387
|
+
"flex gap-3 items-center touch-manipulation": true,
|
|
1295
1388
|
"justify-center": p0.center
|
|
1296
1389
|
}), [
|
|
1297
1390
|
props
|
|
1298
|
-
], '{"flex gap-3 items-center":true,"justify-center":p0.center}')
|
|
1391
|
+
], '{"flex gap-3 items-center touch-manipulation":true,"justify-center":p0.center}')
|
|
1299
1392
|
}, [
|
|
1300
1393
|
/* @__PURE__ */ _jsxQ("label", null, {
|
|
1301
1394
|
class: "inline-flex relative items-center cursor-pointer"
|
|
@@ -1311,9 +1404,9 @@ const Toggle = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =
|
|
|
1311
1404
|
}, 0, null),
|
|
1312
1405
|
/* @__PURE__ */ _jsxQ("div", null, {
|
|
1313
1406
|
class: {
|
|
1314
|
-
"transition ease-in-out w-12 h-7 rounded-md peer border hover:shadow-lg": true,
|
|
1407
|
+
"motion-safe:transition ease-in-out w-12 h-7 rounded-md peer border hover:shadow-lg": true,
|
|
1315
1408
|
"bg-gray-800 border-gray-700 hover:bg-gray-700 active:bg-gray-600": true,
|
|
1316
|
-
"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,
|
|
1409
|
+
"after:content-[''] after:absolute after:top-[4px] after:left-[4px] after:border after:rounded-md after:h-5 after:w-5 after:motion-safe:transition-all after:ease-in-out": true,
|
|
1317
1410
|
"after:bg-gray-700 after:border-gray-600 after:hover:bg-gray-600 after:active:bg-gray-500": true,
|
|
1318
1411
|
"peer-checked:bg-blue-700 peer-checked:border-blue-600 peer-checked:hover:bg-blue-600 peer-checked:active:bg-blue-500": true,
|
|
1319
1412
|
"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
|
|
@@ -1323,7 +1416,7 @@ const Toggle = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =
|
|
|
1323
1416
|
props.label && /* @__PURE__ */ _jsxQ("label", {
|
|
1324
1417
|
for: _wrapSignal(props1, "id")
|
|
1325
1418
|
}, {
|
|
1326
|
-
class: "text-gray-300 flex gap-2"
|
|
1419
|
+
class: "text-gray-300 flex gap-2 select-none"
|
|
1327
1420
|
}, _fnSignal((p0) => p0.label, [
|
|
1328
1421
|
props
|
|
1329
1422
|
], "p0.label"), 3, "yu_0")
|
|
@@ -1785,7 +1878,7 @@ export {
|
|
|
1785
1878
|
LogoPurpur,
|
|
1786
1879
|
LogoVelocity,
|
|
1787
1880
|
LogoWaterfall,
|
|
1788
|
-
|
|
1881
|
+
Nav,
|
|
1789
1882
|
NumberInput,
|
|
1790
1883
|
NumberInputRaw,
|
|
1791
1884
|
SelectInput,
|
|
@@ -11,14 +11,31 @@ export declare const buttonColorClasses: {
|
|
|
11
11
|
transparent: string;
|
|
12
12
|
};
|
|
13
13
|
export declare const sizeClasses: {
|
|
14
|
-
sm:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
sm: {
|
|
15
|
+
base: string;
|
|
16
|
+
pad: string;
|
|
17
|
+
equal: string;
|
|
18
|
+
};
|
|
19
|
+
md: {
|
|
20
|
+
base: string;
|
|
21
|
+
pad: string;
|
|
22
|
+
equal: string;
|
|
23
|
+
};
|
|
24
|
+
lg: {
|
|
25
|
+
base: string;
|
|
26
|
+
pad: string;
|
|
27
|
+
equal: string;
|
|
28
|
+
};
|
|
29
|
+
xl: {
|
|
30
|
+
base: string;
|
|
31
|
+
pad: string;
|
|
32
|
+
equal: string;
|
|
33
|
+
};
|
|
18
34
|
};
|
|
19
35
|
interface GenericButtonProps {
|
|
20
36
|
color?: keyof typeof buttonColorClasses;
|
|
21
37
|
size?: keyof typeof sizeClasses;
|
|
38
|
+
square?: boolean;
|
|
22
39
|
class?: {
|
|
23
40
|
[key: string]: boolean | undefined;
|
|
24
41
|
};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import type { PropsOf } from '@builder.io/qwik';
|
|
1
|
+
import type { JSXChildren, PropsOf } from '@builder.io/qwik';
|
|
2
|
+
import type { buttonColorClasses } from './Button';
|
|
2
3
|
interface SelectInputProps extends Omit<PropsOf<'select'>, 'class'> {
|
|
3
4
|
class?: {
|
|
4
5
|
[key: string]: boolean;
|
|
5
6
|
};
|
|
7
|
+
display?: JSXChildren;
|
|
8
|
+
color?: keyof typeof buttonColorClasses;
|
|
6
9
|
id: string;
|
|
7
10
|
values: {
|
|
8
11
|
name: string;
|
|
@@ -9,7 +9,7 @@ export interface TextInputRawProps extends Omit<(PropsOf<'input'> & {
|
|
|
9
9
|
interface TextInputProps extends Omit<TextInputRawProps, 'children'> {
|
|
10
10
|
id: string;
|
|
11
11
|
}
|
|
12
|
-
export declare const InputClasses = "transition ease-in-out 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-2.5 py-1.5";
|
|
12
|
+
export declare const InputClasses = "motion-safe:transition ease-in-out 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-2.5 py-1.5 touch-manipulation";
|
|
13
13
|
export declare const TextInput: import("@builder.io/qwik").Component<TextInputProps>;
|
|
14
14
|
export declare const TextInputRaw: import("@builder.io/qwik").Component<TextInputRawProps>;
|
|
15
15
|
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export declare const clamp: (value: number, min: number, max: number) => number;
|
|
2
|
+
export declare function getMousePosition(e: MouseEvent | TouchEvent): {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const pad2: (c: string) => string;
|
|
7
|
+
export type RGBAColor = {
|
|
8
|
+
r: number;
|
|
9
|
+
g: number;
|
|
10
|
+
b: number;
|
|
11
|
+
a?: number;
|
|
12
|
+
};
|
|
13
|
+
export type HSVAColor = {
|
|
14
|
+
h: number;
|
|
15
|
+
s: number;
|
|
16
|
+
v: number;
|
|
17
|
+
a?: number;
|
|
18
|
+
};
|
|
19
|
+
export declare function getBrightness(color: RGBAColor): number;
|
|
20
|
+
export declare function hexNumberToRgb(color: number): {
|
|
21
|
+
r: number;
|
|
22
|
+
g: number;
|
|
23
|
+
b: number;
|
|
24
|
+
};
|
|
25
|
+
export declare function rgbToHex(color: RGBAColor): string;
|
|
26
|
+
export declare const hexStringToNumber: (color: string) => number;
|
|
27
|
+
export declare function hsvToRgb(color: HSVAColor): {
|
|
28
|
+
r: number;
|
|
29
|
+
g: number;
|
|
30
|
+
b: number;
|
|
31
|
+
};
|
|
32
|
+
export declare function rgbToHsv(color: RGBAColor): {
|
|
33
|
+
h: number;
|
|
34
|
+
s: number;
|
|
35
|
+
v: number;
|
|
36
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luminescent/ui",
|
|
3
|
-
"version": "0.10.0-
|
|
3
|
+
"version": "0.10.0-2",
|
|
4
4
|
"description": "Luminescent UI library",
|
|
5
5
|
"main": "./lib/index.qwik.mjs",
|
|
6
6
|
"qwik": "./lib/index.qwik.mjs",
|
|
@@ -43,15 +43,15 @@
|
|
|
43
43
|
"@anuragroy/tailwindcss-animate": "^1.0.6",
|
|
44
44
|
"@builder.io/qwik": "1.4.5",
|
|
45
45
|
"@builder.io/qwik-city": "^1.4.5",
|
|
46
|
-
"@types/eslint": "^8.56.
|
|
47
|
-
"@types/node": "^20.11.
|
|
48
|
-
"@typescript-eslint/eslint-plugin": "^7.0
|
|
49
|
-
"@typescript-eslint/parser": "^7.0
|
|
50
|
-
"autoprefixer": "^10.4.
|
|
51
|
-
"chart.js": "^4.4.
|
|
46
|
+
"@types/eslint": "^8.56.5",
|
|
47
|
+
"@types/node": "^20.11.24",
|
|
48
|
+
"@typescript-eslint/eslint-plugin": "^7.1.0",
|
|
49
|
+
"@typescript-eslint/parser": "^7.1.0",
|
|
50
|
+
"autoprefixer": "^10.4.18",
|
|
51
|
+
"chart.js": "^4.4.2",
|
|
52
52
|
"eslint": "^8.57.0",
|
|
53
53
|
"eslint-plugin-qwik": "latest",
|
|
54
|
-
"np": "^
|
|
54
|
+
"np": "^10.0.0",
|
|
55
55
|
"postcss": "^8.4.35",
|
|
56
56
|
"tailwindcss": "3.4.1",
|
|
57
57
|
"typescript": "5.3.3",
|