@luminescent/ui-qwik 5.0.1-0 → 5.0.1-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
|
@@ -911,11 +911,12 @@ const SelectMenu = qwik.component$((props) => {
|
|
|
911
911
|
]
|
|
912
912
|
});
|
|
913
913
|
});
|
|
914
|
-
const SelectMenuRaw = qwik.component$(({
|
|
914
|
+
const SelectMenuRaw = qwik.component$(({ values, class: Class, customDropdown, hover, align, ...props }) => {
|
|
915
915
|
const store = qwik.useStore({
|
|
916
916
|
opened: false,
|
|
917
917
|
value: props.value
|
|
918
918
|
});
|
|
919
|
+
const selectRef = qwik.useSignal();
|
|
919
920
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
920
921
|
class: {
|
|
921
922
|
"relative touch-manipulation": true,
|
|
@@ -924,7 +925,7 @@ const SelectMenuRaw = qwik.component$(({ id, values, class: Class, customDropdow
|
|
|
924
925
|
children: [
|
|
925
926
|
values && /* @__PURE__ */ jsxRuntime.jsx("select", {
|
|
926
927
|
...props,
|
|
927
|
-
|
|
928
|
+
ref: selectRef,
|
|
928
929
|
class: "hidden",
|
|
929
930
|
children: values.map((value, i) => {
|
|
930
931
|
return /* @__PURE__ */ jsxRuntime.jsx("option", {
|
|
@@ -947,7 +948,6 @@ const SelectMenuRaw = qwik.component$(({ id, values, class: Class, customDropdow
|
|
|
947
948
|
name: "dropdown"
|
|
948
949
|
}),
|
|
949
950
|
!customDropdown && /* @__PURE__ */ jsxRuntime.jsxs("span", {
|
|
950
|
-
id: `lui-${id}-name`,
|
|
951
951
|
children: [
|
|
952
952
|
values && (values.find((value) => value.value.toString() === store.value)?.name ?? values[0].name),
|
|
953
953
|
!values && /* @__PURE__ */ jsxRuntime.jsx(qwik.Slot, {
|
|
@@ -958,7 +958,6 @@ const SelectMenuRaw = qwik.component$(({ id, values, class: Class, customDropdow
|
|
|
958
958
|
]
|
|
959
959
|
}),
|
|
960
960
|
/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
961
|
-
id: `lui-${id}-opts-container`,
|
|
962
961
|
class: {
|
|
963
962
|
"absolute z-[1000] pt-2 transition-all ease-out": true,
|
|
964
963
|
"left-0": align === "left",
|
|
@@ -969,7 +968,6 @@ const SelectMenuRaw = qwik.component$(({ id, values, class: Class, customDropdow
|
|
|
969
968
|
"focus-within:pointer-events-auto focus-within:scale-100 focus-within:opacity-100 focus-within:duration-75": true
|
|
970
969
|
},
|
|
971
970
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
972
|
-
id: `lui-${id}-opts`,
|
|
973
971
|
class: "lum-bg-lum-input-bg lum-scroll flex max-h-72 flex-col gap-1 overflow-auto rounded-lum border p-1 select-none motion-safe:transition-all",
|
|
974
972
|
children: [
|
|
975
973
|
values?.map(({ name, value }, i) => {
|
|
@@ -978,7 +976,7 @@ const SelectMenuRaw = qwik.component$(({ id, values, class: Class, customDropdow
|
|
|
978
976
|
class: "lum-btn lum-bg-transparent rounded-lum-1",
|
|
979
977
|
onClick$: () => {
|
|
980
978
|
store.opened = false;
|
|
981
|
-
const select =
|
|
979
|
+
const select = selectRef.value;
|
|
982
980
|
if (select) {
|
|
983
981
|
select.value = value.toString();
|
|
984
982
|
select.dispatchEvent(new Event("change"));
|
package/lib/index.qwik.mjs
CHANGED
|
@@ -909,11 +909,12 @@ const SelectMenu = component$((props) => {
|
|
|
909
909
|
]
|
|
910
910
|
});
|
|
911
911
|
});
|
|
912
|
-
const SelectMenuRaw = component$(({
|
|
912
|
+
const SelectMenuRaw = component$(({ values, class: Class, customDropdown, hover, align, ...props }) => {
|
|
913
913
|
const store = useStore({
|
|
914
914
|
opened: false,
|
|
915
915
|
value: props.value
|
|
916
916
|
});
|
|
917
|
+
const selectRef = useSignal();
|
|
917
918
|
return /* @__PURE__ */ jsxs("div", {
|
|
918
919
|
class: {
|
|
919
920
|
"relative touch-manipulation": true,
|
|
@@ -922,7 +923,7 @@ const SelectMenuRaw = component$(({ id, values, class: Class, customDropdown, ho
|
|
|
922
923
|
children: [
|
|
923
924
|
values && /* @__PURE__ */ jsx("select", {
|
|
924
925
|
...props,
|
|
925
|
-
|
|
926
|
+
ref: selectRef,
|
|
926
927
|
class: "hidden",
|
|
927
928
|
children: values.map((value, i) => {
|
|
928
929
|
return /* @__PURE__ */ jsx("option", {
|
|
@@ -945,7 +946,6 @@ const SelectMenuRaw = component$(({ id, values, class: Class, customDropdown, ho
|
|
|
945
946
|
name: "dropdown"
|
|
946
947
|
}),
|
|
947
948
|
!customDropdown && /* @__PURE__ */ jsxs("span", {
|
|
948
|
-
id: `lui-${id}-name`,
|
|
949
949
|
children: [
|
|
950
950
|
values && (values.find((value) => value.value.toString() === store.value)?.name ?? values[0].name),
|
|
951
951
|
!values && /* @__PURE__ */ jsx(Slot, {
|
|
@@ -956,7 +956,6 @@ const SelectMenuRaw = component$(({ id, values, class: Class, customDropdown, ho
|
|
|
956
956
|
]
|
|
957
957
|
}),
|
|
958
958
|
/* @__PURE__ */ jsx("div", {
|
|
959
|
-
id: `lui-${id}-opts-container`,
|
|
960
959
|
class: {
|
|
961
960
|
"absolute z-[1000] pt-2 transition-all ease-out": true,
|
|
962
961
|
"left-0": align === "left",
|
|
@@ -967,7 +966,6 @@ const SelectMenuRaw = component$(({ id, values, class: Class, customDropdown, ho
|
|
|
967
966
|
"focus-within:pointer-events-auto focus-within:scale-100 focus-within:opacity-100 focus-within:duration-75": true
|
|
968
967
|
},
|
|
969
968
|
children: /* @__PURE__ */ jsxs("div", {
|
|
970
|
-
id: `lui-${id}-opts`,
|
|
971
969
|
class: "lum-bg-lum-input-bg lum-scroll flex max-h-72 flex-col gap-1 overflow-auto rounded-lum border p-1 select-none motion-safe:transition-all",
|
|
972
970
|
children: [
|
|
973
971
|
values?.map(({ name, value }, i) => {
|
|
@@ -976,7 +974,7 @@ const SelectMenuRaw = component$(({ id, values, class: Class, customDropdown, ho
|
|
|
976
974
|
class: "lum-btn lum-bg-transparent rounded-lum-1",
|
|
977
975
|
onClick$: () => {
|
|
978
976
|
store.opened = false;
|
|
979
|
-
const select =
|
|
977
|
+
const select = selectRef.value;
|
|
980
978
|
if (select) {
|
|
981
979
|
select.value = value.toString();
|
|
982
980
|
select.dispatchEvent(new Event("change"));
|
|
@@ -10,7 +10,6 @@ interface SelectMenuProps extends Omit<PropsOf<'select'>, 'class' | 'size'> {
|
|
|
10
10
|
name: JSXChildren;
|
|
11
11
|
value: string | number;
|
|
12
12
|
}[];
|
|
13
|
-
id: string;
|
|
14
13
|
}
|
|
15
14
|
export declare const SelectMenu: import("@builder.io/qwik").Component<SelectMenuProps>;
|
|
16
15
|
export declare const SelectMenuRaw: import("@builder.io/qwik").Component<SelectMenuProps>;
|
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-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-1"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
|
56
56
|
"build": "qwik build",
|