@luminescent/ui 0.8.1 → 0.8.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
CHANGED
|
@@ -909,9 +909,6 @@ const NumberInputRaw = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.in
|
|
|
909
909
|
-moz-appearance: textfield;
|
|
910
910
|
}
|
|
911
911
|
`, "NumberInputRaw_component_useStyles_v5EsWTMt0DU"));
|
|
912
|
-
const store = qwik.useStore({
|
|
913
|
-
value: props.value ?? 0
|
|
914
|
-
});
|
|
915
912
|
return /* @__PURE__ */ qwik._jsxQ("div", null, {
|
|
916
913
|
class: qwik._fnSignal((p0) => ({
|
|
917
914
|
"flex text-gray-50": true,
|
|
@@ -926,15 +923,15 @@ const NumberInputRaw = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.in
|
|
|
926
923
|
},
|
|
927
924
|
"aria-label": "Decrement",
|
|
928
925
|
"data-action": "decrement",
|
|
929
|
-
disabled: props1.min ?
|
|
930
|
-
onClick$: /* @__PURE__ */ qwik.inlinedQrl((event, element) => {
|
|
931
|
-
const [props2
|
|
932
|
-
|
|
933
|
-
|
|
926
|
+
disabled: props1.min ? (props.value ?? 0) <= props1.min : false,
|
|
927
|
+
onClick$: props.input ? /* @__PURE__ */ qwik.inlinedQrl((event, element) => {
|
|
928
|
+
const [props2] = qwik.useLexicalScope();
|
|
929
|
+
const siblingInput = element.nextElementSibling;
|
|
930
|
+
siblingInput.stepDown();
|
|
931
|
+
props2.onDecrement$(event, element, siblingInput);
|
|
934
932
|
}, "NumberInputRaw_component_div_Button_onClick_PgKg57gfX0I", [
|
|
935
|
-
props
|
|
936
|
-
|
|
937
|
-
]),
|
|
933
|
+
props
|
|
934
|
+
]) : props.onDecrement$,
|
|
938
935
|
get class() {
|
|
939
936
|
return {
|
|
940
937
|
"mr-2": props.input
|
|
@@ -958,10 +955,9 @@ const NumberInputRaw = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.in
|
|
|
958
955
|
color: qwik._fnSignal((p0) => p0.input ? "gray" : "darkgray", [
|
|
959
956
|
props
|
|
960
957
|
], 'p0.input?"gray":"darkgray"'),
|
|
961
|
-
"data-action": qwik._IMMUTABLE
|
|
962
|
-
onClick$: qwik._IMMUTABLE
|
|
958
|
+
"data-action": qwik._IMMUTABLE
|
|
963
959
|
}
|
|
964
|
-
},
|
|
960
|
+
}, 0, "gk_4"),
|
|
965
961
|
props.input && /* @__PURE__ */ qwik._jsxS("input", {
|
|
966
962
|
...props1,
|
|
967
963
|
class: {
|
|
@@ -974,9 +970,9 @@ const NumberInputRaw = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.in
|
|
|
974
970
|
props
|
|
975
971
|
], "p0.step??1"),
|
|
976
972
|
type: "number",
|
|
977
|
-
value: qwik._fnSignal((p0) => p0.value, [
|
|
978
|
-
|
|
979
|
-
], "p0.value")
|
|
973
|
+
value: qwik._fnSignal((p0) => p0.value ?? 0, [
|
|
974
|
+
props
|
|
975
|
+
], "p0.value??0")
|
|
980
976
|
}, 0, "gk_5"),
|
|
981
977
|
/* @__PURE__ */ qwik._jsxC(Button, {
|
|
982
978
|
get color() {
|
|
@@ -984,15 +980,15 @@ const NumberInputRaw = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.in
|
|
|
984
980
|
},
|
|
985
981
|
"aria-label": "Increment",
|
|
986
982
|
"data-action": "increment",
|
|
987
|
-
disabled: props1.max ?
|
|
988
|
-
onClick$: /* @__PURE__ */ qwik.inlinedQrl((event, element) => {
|
|
989
|
-
const [props2
|
|
990
|
-
|
|
991
|
-
|
|
983
|
+
disabled: props1.max ? (props.value ?? 0) >= props1.max : false,
|
|
984
|
+
onClick$: props.input ? /* @__PURE__ */ qwik.inlinedQrl((event, element) => {
|
|
985
|
+
const [props2] = qwik.useLexicalScope();
|
|
986
|
+
const siblingInput = element.previousElementSibling;
|
|
987
|
+
siblingInput.stepUp();
|
|
988
|
+
props2.onIncrement$(event, element, siblingInput);
|
|
992
989
|
}, "NumberInputRaw_component_div_Button_onClick_1_UzVlUpg1uGs", [
|
|
993
|
-
props
|
|
994
|
-
|
|
995
|
-
]),
|
|
990
|
+
props
|
|
991
|
+
]) : props.onIncrement$,
|
|
996
992
|
get class() {
|
|
997
993
|
return {
|
|
998
994
|
"ml-2": props.input
|
|
@@ -1016,10 +1012,9 @@ const NumberInputRaw = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.in
|
|
|
1016
1012
|
color: qwik._fnSignal((p0) => p0.input ? "gray" : "darkgray", [
|
|
1017
1013
|
props
|
|
1018
1014
|
], 'p0.input?"gray":"darkgray"'),
|
|
1019
|
-
"data-action": qwik._IMMUTABLE
|
|
1020
|
-
onClick$: qwik._IMMUTABLE
|
|
1015
|
+
"data-action": qwik._IMMUTABLE
|
|
1021
1016
|
}
|
|
1022
|
-
},
|
|
1017
|
+
}, 0, "gk_7")
|
|
1023
1018
|
], 1, "gk_8");
|
|
1024
1019
|
}, "NumberInputRaw_component_8sGf0eS1rvo"));
|
|
1025
1020
|
const ChevronDown = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
package/lib/index.qwik.mjs
CHANGED
|
@@ -907,9 +907,6 @@ const NumberInputRaw = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((
|
|
|
907
907
|
-moz-appearance: textfield;
|
|
908
908
|
}
|
|
909
909
|
`, "NumberInputRaw_component_useStyles_v5EsWTMt0DU"));
|
|
910
|
-
const store = useStore({
|
|
911
|
-
value: props.value ?? 0
|
|
912
|
-
});
|
|
913
910
|
return /* @__PURE__ */ _jsxQ("div", null, {
|
|
914
911
|
class: _fnSignal((p0) => ({
|
|
915
912
|
"flex text-gray-50": true,
|
|
@@ -924,15 +921,15 @@ const NumberInputRaw = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((
|
|
|
924
921
|
},
|
|
925
922
|
"aria-label": "Decrement",
|
|
926
923
|
"data-action": "decrement",
|
|
927
|
-
disabled: props1.min ?
|
|
928
|
-
onClick$: /* @__PURE__ */ inlinedQrl((event, element) => {
|
|
929
|
-
const [props2
|
|
930
|
-
|
|
931
|
-
|
|
924
|
+
disabled: props1.min ? (props.value ?? 0) <= props1.min : false,
|
|
925
|
+
onClick$: props.input ? /* @__PURE__ */ inlinedQrl((event, element) => {
|
|
926
|
+
const [props2] = useLexicalScope();
|
|
927
|
+
const siblingInput = element.nextElementSibling;
|
|
928
|
+
siblingInput.stepDown();
|
|
929
|
+
props2.onDecrement$(event, element, siblingInput);
|
|
932
930
|
}, "NumberInputRaw_component_div_Button_onClick_PgKg57gfX0I", [
|
|
933
|
-
props
|
|
934
|
-
|
|
935
|
-
]),
|
|
931
|
+
props
|
|
932
|
+
]) : props.onDecrement$,
|
|
936
933
|
get class() {
|
|
937
934
|
return {
|
|
938
935
|
"mr-2": props.input
|
|
@@ -956,10 +953,9 @@ const NumberInputRaw = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((
|
|
|
956
953
|
color: _fnSignal((p0) => p0.input ? "gray" : "darkgray", [
|
|
957
954
|
props
|
|
958
955
|
], 'p0.input?"gray":"darkgray"'),
|
|
959
|
-
"data-action": _IMMUTABLE
|
|
960
|
-
onClick$: _IMMUTABLE
|
|
956
|
+
"data-action": _IMMUTABLE
|
|
961
957
|
}
|
|
962
|
-
},
|
|
958
|
+
}, 0, "gk_4"),
|
|
963
959
|
props.input && /* @__PURE__ */ _jsxS("input", {
|
|
964
960
|
...props1,
|
|
965
961
|
class: {
|
|
@@ -972,9 +968,9 @@ const NumberInputRaw = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((
|
|
|
972
968
|
props
|
|
973
969
|
], "p0.step??1"),
|
|
974
970
|
type: "number",
|
|
975
|
-
value: _fnSignal((p0) => p0.value, [
|
|
976
|
-
|
|
977
|
-
], "p0.value")
|
|
971
|
+
value: _fnSignal((p0) => p0.value ?? 0, [
|
|
972
|
+
props
|
|
973
|
+
], "p0.value??0")
|
|
978
974
|
}, 0, "gk_5"),
|
|
979
975
|
/* @__PURE__ */ _jsxC(Button, {
|
|
980
976
|
get color() {
|
|
@@ -982,15 +978,15 @@ const NumberInputRaw = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((
|
|
|
982
978
|
},
|
|
983
979
|
"aria-label": "Increment",
|
|
984
980
|
"data-action": "increment",
|
|
985
|
-
disabled: props1.max ?
|
|
986
|
-
onClick$: /* @__PURE__ */ inlinedQrl((event, element) => {
|
|
987
|
-
const [props2
|
|
988
|
-
|
|
989
|
-
|
|
981
|
+
disabled: props1.max ? (props.value ?? 0) >= props1.max : false,
|
|
982
|
+
onClick$: props.input ? /* @__PURE__ */ inlinedQrl((event, element) => {
|
|
983
|
+
const [props2] = useLexicalScope();
|
|
984
|
+
const siblingInput = element.previousElementSibling;
|
|
985
|
+
siblingInput.stepUp();
|
|
986
|
+
props2.onIncrement$(event, element, siblingInput);
|
|
990
987
|
}, "NumberInputRaw_component_div_Button_onClick_1_UzVlUpg1uGs", [
|
|
991
|
-
props
|
|
992
|
-
|
|
993
|
-
]),
|
|
988
|
+
props
|
|
989
|
+
]) : props.onIncrement$,
|
|
994
990
|
get class() {
|
|
995
991
|
return {
|
|
996
992
|
"ml-2": props.input
|
|
@@ -1014,10 +1010,9 @@ const NumberInputRaw = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((
|
|
|
1014
1010
|
color: _fnSignal((p0) => p0.input ? "gray" : "darkgray", [
|
|
1015
1011
|
props
|
|
1016
1012
|
], 'p0.input?"gray":"darkgray"'),
|
|
1017
|
-
"data-action": _IMMUTABLE
|
|
1018
|
-
onClick$: _IMMUTABLE
|
|
1013
|
+
"data-action": _IMMUTABLE
|
|
1019
1014
|
}
|
|
1020
|
-
},
|
|
1015
|
+
}, 0, "gk_7")
|
|
1021
1016
|
], 1, "gk_8");
|
|
1022
1017
|
}, "NumberInputRaw_component_8sGf0eS1rvo"));
|
|
1023
1018
|
const ChevronDown = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
@@ -2,12 +2,8 @@ import type { PropsOf, QRL } from '@builder.io/qwik';
|
|
|
2
2
|
interface NumberInputRawProps extends Omit<(PropsOf<'input'> & {
|
|
3
3
|
type: 'number';
|
|
4
4
|
}), 'class' | 'type'> {
|
|
5
|
-
onDecrement$: QRL<(event: PointerEvent, element: HTMLButtonElement,
|
|
6
|
-
|
|
7
|
-
}) => void>;
|
|
8
|
-
onIncrement$: QRL<(event: PointerEvent, element: HTMLButtonElement, store: {
|
|
9
|
-
value: number;
|
|
10
|
-
}) => void>;
|
|
5
|
+
onDecrement$: QRL<(event: PointerEvent, element: HTMLButtonElement, inputElement?: HTMLInputElement) => void>;
|
|
6
|
+
onIncrement$: QRL<(event: PointerEvent, element: HTMLButtonElement, inputElement?: HTMLInputElement) => void>;
|
|
11
7
|
input?: boolean;
|
|
12
8
|
class?: {
|
|
13
9
|
[key: string]: boolean;
|