@luminescent/ui-qwik 6.5.0-0 → 6.6.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 +9 -11
- package/lib/index.qwik.mjs +9 -11
- package/package.json +2 -2
package/lib/index.qwik.cjs
CHANGED
|
@@ -911,25 +911,22 @@ const RangeInput = qwik.component$((props) => {
|
|
|
911
911
|
]
|
|
912
912
|
});
|
|
913
913
|
});
|
|
914
|
-
const RangeInputRaw = qwik.component$(({ value = 0, max =
|
|
915
|
-
const valueSignal = qwik.useSignal(value);
|
|
916
|
-
const filledPercentage = qwik.useComputed$(() => valueSignal.value / max * 100);
|
|
914
|
+
const RangeInputRaw = qwik.component$(({ value, min = 0, max = 10, onInput$, ...props }) => {
|
|
915
|
+
const valueSignal = qwik.useSignal(value ?? min);
|
|
916
|
+
const filledPercentage = qwik.useComputed$(() => (valueSignal.value - min) / (max - min) * 100);
|
|
917
|
+
const tickCount = max - min - 1;
|
|
917
918
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
918
919
|
class: {
|
|
919
920
|
"group relative flex touch-manipulation gap-1 text-lum-text lum-input p-0": true
|
|
920
921
|
},
|
|
921
922
|
children: [
|
|
922
923
|
/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
923
|
-
class: "absolute w-full flex justify-
|
|
924
|
-
children: [
|
|
925
|
-
...Array(
|
|
924
|
+
class: "absolute w-full flex justify-evenly",
|
|
925
|
+
children: tickCount > 0 && [
|
|
926
|
+
...Array(tickCount)
|
|
926
927
|
].map((_, i) => {
|
|
927
|
-
if (i === 0 || i === max - 1) return null;
|
|
928
928
|
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
929
|
-
class: "border-l border-l-lum-border/20 h-1 my-0.5"
|
|
930
|
-
style: {
|
|
931
|
-
left: `${i / 4 * 100}%`
|
|
932
|
-
}
|
|
929
|
+
class: "border-l border-l-lum-border/20 h-1 my-0.5"
|
|
933
930
|
}, i);
|
|
934
931
|
})
|
|
935
932
|
}),
|
|
@@ -956,6 +953,7 @@ const RangeInputRaw = qwik.component$(({ value = 0, max = 100, onInput$, ...prop
|
|
|
956
953
|
}),
|
|
957
954
|
/* @__PURE__ */ jsxRuntime.jsx("input", {
|
|
958
955
|
...props,
|
|
956
|
+
min,
|
|
959
957
|
max,
|
|
960
958
|
type: "range",
|
|
961
959
|
value: valueSignal.value,
|
package/lib/index.qwik.mjs
CHANGED
|
@@ -909,25 +909,22 @@ const RangeInput = component$((props) => {
|
|
|
909
909
|
]
|
|
910
910
|
});
|
|
911
911
|
});
|
|
912
|
-
const RangeInputRaw = component$(({ value = 0, max =
|
|
913
|
-
const valueSignal = useSignal(value);
|
|
914
|
-
const filledPercentage = useComputed$(() => valueSignal.value / max * 100);
|
|
912
|
+
const RangeInputRaw = component$(({ value, min = 0, max = 10, onInput$, ...props }) => {
|
|
913
|
+
const valueSignal = useSignal(value ?? min);
|
|
914
|
+
const filledPercentage = useComputed$(() => (valueSignal.value - min) / (max - min) * 100);
|
|
915
|
+
const tickCount = max - min - 1;
|
|
915
916
|
return /* @__PURE__ */ jsxs("div", {
|
|
916
917
|
class: {
|
|
917
918
|
"group relative flex touch-manipulation gap-1 text-lum-text lum-input p-0": true
|
|
918
919
|
},
|
|
919
920
|
children: [
|
|
920
921
|
/* @__PURE__ */ jsx("div", {
|
|
921
|
-
class: "absolute w-full flex justify-
|
|
922
|
-
children: [
|
|
923
|
-
...Array(
|
|
922
|
+
class: "absolute w-full flex justify-evenly",
|
|
923
|
+
children: tickCount > 0 && [
|
|
924
|
+
...Array(tickCount)
|
|
924
925
|
].map((_, i) => {
|
|
925
|
-
if (i === 0 || i === max - 1) return null;
|
|
926
926
|
return /* @__PURE__ */ jsx("div", {
|
|
927
|
-
class: "border-l border-l-lum-border/20 h-1 my-0.5"
|
|
928
|
-
style: {
|
|
929
|
-
left: `${i / 4 * 100}%`
|
|
930
|
-
}
|
|
927
|
+
class: "border-l border-l-lum-border/20 h-1 my-0.5"
|
|
931
928
|
}, i);
|
|
932
929
|
})
|
|
933
930
|
}),
|
|
@@ -954,6 +951,7 @@ const RangeInputRaw = component$(({ value = 0, max = 100, onInput$, ...props })
|
|
|
954
951
|
}),
|
|
955
952
|
/* @__PURE__ */ jsx("input", {
|
|
956
953
|
...props,
|
|
954
|
+
min,
|
|
957
955
|
max,
|
|
958
956
|
type: "range",
|
|
959
957
|
value: valueSignal.value,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luminescent/ui-qwik",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.6.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": "^6.0.3"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"@luminescent/ui": "6.
|
|
53
|
+
"@luminescent/ui": "6.6.0-1"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
|
56
56
|
"build": "qwik build",
|