@luminescent/ui-qwik 5.0.1-6 → 5.0.1
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
CHANGED
|
@@ -683,7 +683,7 @@ const Menu = qwik.component$(({ size, ...props }) => {
|
|
|
683
683
|
]
|
|
684
684
|
});
|
|
685
685
|
});
|
|
686
|
-
const Nav = qwik.component$(({ fixed, floating, nohamburger, colorClass = "lum-bg-lum-card-bg", ...props }) => {
|
|
686
|
+
const Nav = qwik.component$(({ fixed, floating, noblur, nohamburger, colorClass = "lum-bg-lum-card-bg", ...props }) => {
|
|
687
687
|
const menu = qwik.useSignal(false);
|
|
688
688
|
return /* @__PURE__ */ jsxRuntime.jsxs("nav", {
|
|
689
689
|
...props,
|
|
@@ -696,28 +696,23 @@ const Nav = qwik.component$(({ fixed, floating, nohamburger, colorClass = "lum-b
|
|
|
696
696
|
children: [
|
|
697
697
|
!nohamburger && /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
698
698
|
class: {
|
|
699
|
-
"absolute top-full
|
|
699
|
+
"absolute top-full lum-card motion-safe:transition-all sm:hidden max-w-7xl gap-2 px-2 py-4": true,
|
|
700
|
+
"w-[calc(100%-theme(spacing.8))] mx-4": floating,
|
|
701
|
+
"w-[calc(100%-theme(spacing.4))] mx-2": !floating,
|
|
700
702
|
"mt-2": menu.value,
|
|
701
|
-
"pointer-events-none opacity-0": !menu.value,
|
|
702
|
-
"
|
|
703
|
-
|
|
703
|
+
"pointer-events-none opacity-0 -mt-2 scale-95": !menu.value,
|
|
704
|
+
"backdrop-blur-lg": !noblur,
|
|
705
|
+
[colorClass]: true
|
|
704
706
|
},
|
|
705
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
706
|
-
|
|
707
|
-
[colorClass]: true,
|
|
708
|
-
"flex w-full max-w-7xl flex-col gap-2 rounded-lum border px-2 py-4 motion-safe:transition-all": true
|
|
709
|
-
},
|
|
710
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(qwik.Slot, {
|
|
711
|
-
name: "mobile"
|
|
712
|
-
})
|
|
707
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(qwik.Slot, {
|
|
708
|
+
name: "mobile"
|
|
713
709
|
})
|
|
714
710
|
}),
|
|
715
711
|
/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
716
712
|
class: {
|
|
717
713
|
[colorClass]: !floating,
|
|
718
714
|
"!border-x-0 !border-t-0": !floating,
|
|
719
|
-
"
|
|
720
|
-
'before:absolute before:-z-10 before:h-full before:w-full before:drop-shadow-xl before:content-[""]': !floating,
|
|
715
|
+
"backdrop-blur-lg": !noblur && !floating,
|
|
721
716
|
"relative mx-2 mt-2": floating
|
|
722
717
|
},
|
|
723
718
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
@@ -725,8 +720,7 @@ const Nav = qwik.component$(({ fixed, floating, nohamburger, colorClass = "lum-b
|
|
|
725
720
|
"mx-auto flex w-full max-w-7xl justify-evenly px-2": true,
|
|
726
721
|
[colorClass]: floating,
|
|
727
722
|
"rounded-lum border": floating,
|
|
728
|
-
"
|
|
729
|
-
'before:absolute before:-z-10 before:h-full before:w-full before:max-w-7xl before:rounded-lum before:drop-shadow-xl before:content-[""]': floating
|
|
723
|
+
"backdrop-blur-lg": !noblur && floating
|
|
730
724
|
},
|
|
731
725
|
children: [
|
|
732
726
|
/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
@@ -911,7 +905,7 @@ const SelectMenu = qwik.component$((props) => {
|
|
|
911
905
|
]
|
|
912
906
|
});
|
|
913
907
|
});
|
|
914
|
-
const SelectMenuRaw = qwik.component$(({ values, class: Class, customDropdown, hover, align, ...props }) => {
|
|
908
|
+
const SelectMenuRaw = qwik.component$(({ values, class: Class, panelClass = "lum-bg-lum-input-bg", btnClass = "lum-bg-transparent", noblur, customDropdown, hover, align, ...props }) => {
|
|
915
909
|
const store = qwik.useStore({
|
|
916
910
|
opened: false,
|
|
917
911
|
value: props.value
|
|
@@ -957,40 +951,46 @@ const SelectMenuRaw = qwik.component$(({ values, class: Class, customDropdown, h
|
|
|
957
951
|
})
|
|
958
952
|
]
|
|
959
953
|
}),
|
|
960
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
954
|
+
hover && /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
955
|
+
class: "h-2 absolute w-full"
|
|
956
|
+
}),
|
|
957
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
961
958
|
class: {
|
|
962
|
-
"absolute z-[1000]
|
|
959
|
+
"absolute z-[1000] mt-2 transition-all ease-out": true,
|
|
960
|
+
"backdrop-blur-lg": !noblur,
|
|
961
|
+
"lum-scroll flex max-h-72 flex-col gap-1 overflow-auto rounded-lum border p-1 select-none motion-safe:transition-all": true,
|
|
963
962
|
"left-0": align === "left",
|
|
964
963
|
"right-0": align === "right",
|
|
965
964
|
"left-1/2 -translate-x-1/2": align === "center",
|
|
966
965
|
"pointer-events-none scale-95 opacity-0": !store.opened,
|
|
967
966
|
"duration-300 group-hover:pointer-events-auto group-hover:scale-100 group-hover:opacity-100 group-hover:duration-75": hover,
|
|
968
|
-
"focus-within:pointer-events-auto focus-within:scale-100 focus-within:opacity-100 focus-within:duration-75": true
|
|
967
|
+
"focus-within:pointer-events-auto focus-within:scale-100 focus-within:opacity-100 focus-within:duration-75": true,
|
|
968
|
+
[panelClass]: true
|
|
969
969
|
},
|
|
970
|
-
children:
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
})
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
970
|
+
children: [
|
|
971
|
+
values?.map(({ name, value }, i) => {
|
|
972
|
+
return /* @__PURE__ */ jsxRuntime.jsx("button", {
|
|
973
|
+
type: "button",
|
|
974
|
+
class: {
|
|
975
|
+
"lum-btn rounded-lum-1": true,
|
|
976
|
+
[btnClass]: true
|
|
977
|
+
},
|
|
978
|
+
onClick$: () => {
|
|
979
|
+
store.opened = false;
|
|
980
|
+
const select = selectRef.value;
|
|
981
|
+
if (select) {
|
|
982
|
+
select.value = value.toString();
|
|
983
|
+
select.dispatchEvent(new Event("change"));
|
|
984
|
+
}
|
|
985
|
+
store.value = value.toString();
|
|
986
|
+
},
|
|
987
|
+
children: name
|
|
988
|
+
}, i);
|
|
989
|
+
}),
|
|
990
|
+
/* @__PURE__ */ jsxRuntime.jsx(qwik.Slot, {
|
|
991
|
+
name: "extra-buttons"
|
|
992
|
+
})
|
|
993
|
+
]
|
|
994
994
|
})
|
|
995
995
|
]
|
|
996
996
|
});
|
package/lib/index.qwik.mjs
CHANGED
|
@@ -681,7 +681,7 @@ const Menu = component$(({ size, ...props }) => {
|
|
|
681
681
|
]
|
|
682
682
|
});
|
|
683
683
|
});
|
|
684
|
-
const Nav = component$(({ fixed, floating, nohamburger, colorClass = "lum-bg-lum-card-bg", ...props }) => {
|
|
684
|
+
const Nav = component$(({ fixed, floating, noblur, nohamburger, colorClass = "lum-bg-lum-card-bg", ...props }) => {
|
|
685
685
|
const menu = useSignal(false);
|
|
686
686
|
return /* @__PURE__ */ jsxs("nav", {
|
|
687
687
|
...props,
|
|
@@ -694,28 +694,23 @@ const Nav = component$(({ fixed, floating, nohamburger, colorClass = "lum-bg-lum
|
|
|
694
694
|
children: [
|
|
695
695
|
!nohamburger && /* @__PURE__ */ jsx("div", {
|
|
696
696
|
class: {
|
|
697
|
-
"absolute top-full
|
|
697
|
+
"absolute top-full lum-card motion-safe:transition-all sm:hidden max-w-7xl gap-2 px-2 py-4": true,
|
|
698
|
+
"w-[calc(100%-theme(spacing.8))] mx-4": floating,
|
|
699
|
+
"w-[calc(100%-theme(spacing.4))] mx-2": !floating,
|
|
698
700
|
"mt-2": menu.value,
|
|
699
|
-
"pointer-events-none opacity-0": !menu.value,
|
|
700
|
-
"
|
|
701
|
-
|
|
701
|
+
"pointer-events-none opacity-0 -mt-2 scale-95": !menu.value,
|
|
702
|
+
"backdrop-blur-lg": !noblur,
|
|
703
|
+
[colorClass]: true
|
|
702
704
|
},
|
|
703
|
-
children: /* @__PURE__ */ jsx(
|
|
704
|
-
|
|
705
|
-
[colorClass]: true,
|
|
706
|
-
"flex w-full max-w-7xl flex-col gap-2 rounded-lum border px-2 py-4 motion-safe:transition-all": true
|
|
707
|
-
},
|
|
708
|
-
children: /* @__PURE__ */ jsx(Slot, {
|
|
709
|
-
name: "mobile"
|
|
710
|
-
})
|
|
705
|
+
children: /* @__PURE__ */ jsx(Slot, {
|
|
706
|
+
name: "mobile"
|
|
711
707
|
})
|
|
712
708
|
}),
|
|
713
709
|
/* @__PURE__ */ jsx("div", {
|
|
714
710
|
class: {
|
|
715
711
|
[colorClass]: !floating,
|
|
716
712
|
"!border-x-0 !border-t-0": !floating,
|
|
717
|
-
"
|
|
718
|
-
'before:absolute before:-z-10 before:h-full before:w-full before:drop-shadow-xl before:content-[""]': !floating,
|
|
713
|
+
"backdrop-blur-lg": !noblur && !floating,
|
|
719
714
|
"relative mx-2 mt-2": floating
|
|
720
715
|
},
|
|
721
716
|
children: /* @__PURE__ */ jsxs("div", {
|
|
@@ -723,8 +718,7 @@ const Nav = component$(({ fixed, floating, nohamburger, colorClass = "lum-bg-lum
|
|
|
723
718
|
"mx-auto flex w-full max-w-7xl justify-evenly px-2": true,
|
|
724
719
|
[colorClass]: floating,
|
|
725
720
|
"rounded-lum border": floating,
|
|
726
|
-
"
|
|
727
|
-
'before:absolute before:-z-10 before:h-full before:w-full before:max-w-7xl before:rounded-lum before:drop-shadow-xl before:content-[""]': floating
|
|
721
|
+
"backdrop-blur-lg": !noblur && floating
|
|
728
722
|
},
|
|
729
723
|
children: [
|
|
730
724
|
/* @__PURE__ */ jsx("div", {
|
|
@@ -909,7 +903,7 @@ const SelectMenu = component$((props) => {
|
|
|
909
903
|
]
|
|
910
904
|
});
|
|
911
905
|
});
|
|
912
|
-
const SelectMenuRaw = component$(({ values, class: Class, customDropdown, hover, align, ...props }) => {
|
|
906
|
+
const SelectMenuRaw = component$(({ values, class: Class, panelClass = "lum-bg-lum-input-bg", btnClass = "lum-bg-transparent", noblur, customDropdown, hover, align, ...props }) => {
|
|
913
907
|
const store = useStore({
|
|
914
908
|
opened: false,
|
|
915
909
|
value: props.value
|
|
@@ -955,40 +949,46 @@ const SelectMenuRaw = component$(({ values, class: Class, customDropdown, hover,
|
|
|
955
949
|
})
|
|
956
950
|
]
|
|
957
951
|
}),
|
|
958
|
-
/* @__PURE__ */ jsx("div", {
|
|
952
|
+
hover && /* @__PURE__ */ jsx("div", {
|
|
953
|
+
class: "h-2 absolute w-full"
|
|
954
|
+
}),
|
|
955
|
+
/* @__PURE__ */ jsxs("div", {
|
|
959
956
|
class: {
|
|
960
|
-
"absolute z-[1000]
|
|
957
|
+
"absolute z-[1000] mt-2 transition-all ease-out": true,
|
|
958
|
+
"backdrop-blur-lg": !noblur,
|
|
959
|
+
"lum-scroll flex max-h-72 flex-col gap-1 overflow-auto rounded-lum border p-1 select-none motion-safe:transition-all": true,
|
|
961
960
|
"left-0": align === "left",
|
|
962
961
|
"right-0": align === "right",
|
|
963
962
|
"left-1/2 -translate-x-1/2": align === "center",
|
|
964
963
|
"pointer-events-none scale-95 opacity-0": !store.opened,
|
|
965
964
|
"duration-300 group-hover:pointer-events-auto group-hover:scale-100 group-hover:opacity-100 group-hover:duration-75": hover,
|
|
966
|
-
"focus-within:pointer-events-auto focus-within:scale-100 focus-within:opacity-100 focus-within:duration-75": true
|
|
965
|
+
"focus-within:pointer-events-auto focus-within:scale-100 focus-within:opacity-100 focus-within:duration-75": true,
|
|
966
|
+
[panelClass]: true
|
|
967
967
|
},
|
|
968
|
-
children:
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
})
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
968
|
+
children: [
|
|
969
|
+
values?.map(({ name, value }, i) => {
|
|
970
|
+
return /* @__PURE__ */ jsx("button", {
|
|
971
|
+
type: "button",
|
|
972
|
+
class: {
|
|
973
|
+
"lum-btn rounded-lum-1": true,
|
|
974
|
+
[btnClass]: true
|
|
975
|
+
},
|
|
976
|
+
onClick$: () => {
|
|
977
|
+
store.opened = false;
|
|
978
|
+
const select = selectRef.value;
|
|
979
|
+
if (select) {
|
|
980
|
+
select.value = value.toString();
|
|
981
|
+
select.dispatchEvent(new Event("change"));
|
|
982
|
+
}
|
|
983
|
+
store.value = value.toString();
|
|
984
|
+
},
|
|
985
|
+
children: name
|
|
986
|
+
}, i);
|
|
987
|
+
}),
|
|
988
|
+
/* @__PURE__ */ jsx(Slot, {
|
|
989
|
+
name: "extra-buttons"
|
|
990
|
+
})
|
|
991
|
+
]
|
|
992
992
|
})
|
|
993
993
|
]
|
|
994
994
|
});
|
|
@@ -3,6 +3,9 @@ interface SelectMenuProps extends Omit<PropsOf<'select'>, 'class' | 'size'> {
|
|
|
3
3
|
class?: {
|
|
4
4
|
[key: string]: boolean;
|
|
5
5
|
};
|
|
6
|
+
panelClass?: string;
|
|
7
|
+
btnClass?: string;
|
|
8
|
+
noblur?: boolean;
|
|
6
9
|
customDropdown?: boolean;
|
|
7
10
|
hover?: boolean;
|
|
8
11
|
align?: 'left' | 'right' | 'center';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luminescent/ui-qwik",
|
|
3
|
-
"version": "5.0.1
|
|
3
|
+
"version": "5.0.1",
|
|
4
4
|
"description": "Luminescent UI library - Qwik",
|
|
5
5
|
"main": "./lib/index.qwik.mjs",
|
|
6
6
|
"qwik": "./lib/index.qwik.mjs",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"vite-tsconfig-paths": "^5.1.4"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"@luminescent/ui": "5.0.1
|
|
53
|
+
"@luminescent/ui": "5.0.1"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
|
56
56
|
"build": "qwik build",
|