@luminescent/ui-qwik 6.8.3-2 → 7.0.0-0
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/LICENSE +661 -0
- package/lib/assets/BBIagblG-bundle-graph.json +1 -0
- package/lib/assets/ChtqwOpy-bundle-graph.json +1 -0
- package/lib/components/elements/Anchor.d.ts +1 -4
- package/lib/components/elements/Anchor.qwik.cjs +21 -25
- package/lib/components/elements/Anchor.qwik.mjs +21 -25
- package/lib/components/elements/Blobs.d.ts +3 -4
- package/lib/components/elements/Blobs.qwik.cjs +181 -187
- package/lib/components/elements/Blobs.qwik.mjs +182 -189
- package/lib/components/elements/ColorPicker.d.ts +1 -4
- package/lib/components/elements/ColorPicker.qwik.cjs +285 -303
- package/lib/components/elements/ColorPicker.qwik.mjs +285 -303
- package/lib/components/elements/Dropdown.d.ts +1 -4
- package/lib/components/elements/Dropdown.qwik.cjs +20 -30
- package/lib/components/elements/Dropdown.qwik.mjs +20 -30
- package/lib/components/elements/Label.d.ts +6 -0
- package/lib/components/elements/Label.qwik.cjs +10 -0
- package/lib/components/elements/Label.qwik.mjs +10 -0
- package/lib/components/elements/Nav.d.ts +3 -6
- package/lib/components/elements/Nav.qwik.cjs +63 -97
- package/lib/components/elements/Nav.qwik.mjs +63 -97
- package/lib/components/elements/NumberInput.d.ts +4 -11
- package/lib/components/elements/NumberInput.qwik.cjs +52 -78
- package/lib/components/elements/NumberInput.qwik.mjs +51 -77
- package/lib/components/elements/RangeInput.d.ts +2 -9
- package/lib/components/elements/RangeInput.qwik.cjs +45 -76
- package/lib/components/elements/RangeInput.qwik.mjs +46 -77
- package/lib/components/elements/SelectMenu.d.ts +5 -8
- package/lib/components/elements/SelectMenu.qwik.cjs +90 -133
- package/lib/components/elements/SelectMenu.qwik.mjs +90 -133
- package/lib/components/elements/Sidebar.d.ts +1 -4
- package/lib/components/elements/Sidebar.qwik.cjs +19 -36
- package/lib/components/elements/Sidebar.qwik.mjs +20 -37
- package/lib/components/elements/Toggle.d.ts +1 -2
- package/lib/components/elements/Toggle.qwik.cjs +22 -38
- package/lib/components/elements/Toggle.qwik.mjs +23 -39
- package/lib/components/elements.d.ts +1 -0
- package/lib/components/functions.d.ts +2 -0
- package/lib/components/functions.qwik.cjs +19 -16
- package/lib/components/functions.qwik.mjs +19 -17
- package/lib/index.d.ts +0 -1
- package/lib/index.qwik.cjs +26 -48
- package/lib/index.qwik.mjs +6 -42
- package/lib/q-manifest.json +239 -0
- package/lib/svg/ChevronDown.d.ts +1 -1
- package/lib/svg/ChevronDown.qwik.cjs +18 -22
- package/lib/svg/ChevronDown.qwik.mjs +19 -23
- package/lib/svg/Link.d.ts +1 -1
- package/lib/svg/Link.qwik.cjs +27 -33
- package/lib/svg/Link.qwik.mjs +28 -34
- package/lib/svg/Menu.d.ts +1 -1
- package/lib/svg/Menu.qwik.cjs +22 -30
- package/lib/svg/Menu.qwik.mjs +23 -31
- package/lib/svg/Minus.d.ts +1 -1
- package/lib/svg/Minus.qwik.cjs +18 -22
- package/lib/svg/Minus.qwik.mjs +19 -23
- package/lib/svg/Plus.d.ts +1 -1
- package/lib/svg/Plus.qwik.cjs +18 -27
- package/lib/svg/Plus.qwik.mjs +19 -28
- package/lib/svg/Shuffle.d.ts +1 -1
- package/lib/svg/Shuffle.qwik.cjs +24 -36
- package/lib/svg/Shuffle.qwik.mjs +25 -37
- package/lib/utils/color.qwik.cjs +101 -115
- package/lib/utils/color.qwik.mjs +102 -122
- package/package.json +14 -14
- package/lib/components/logos/Birdflop.d.ts +0 -7
- package/lib/components/logos/Birdflop.qwik.cjs +0 -73
- package/lib/components/logos/Birdflop.qwik.mjs +0 -73
- package/lib/components/logos/Discord.d.ts +0 -2
- package/lib/components/logos/Discord.qwik.cjs +0 -18
- package/lib/components/logos/Discord.qwik.mjs +0 -18
- package/lib/components/logos/Fabric.d.ts +0 -2
- package/lib/components/logos/Fabric.qwik.cjs +0 -32
- package/lib/components/logos/Fabric.qwik.mjs +0 -32
- package/lib/components/logos/Forge.d.ts +0 -2
- package/lib/components/logos/Forge.qwik.cjs +0 -31
- package/lib/components/logos/Forge.qwik.mjs +0 -31
- package/lib/components/logos/Luminescent.d.ts +0 -3
- package/lib/components/logos/Luminescent.qwik.cjs +0 -143
- package/lib/components/logos/Luminescent.qwik.mjs +0 -143
- package/lib/components/logos/Paper.d.ts +0 -2
- package/lib/components/logos/Paper.qwik.cjs +0 -40
- package/lib/components/logos/Paper.qwik.mjs +0 -40
- package/lib/components/logos/Pterodactyl.d.ts +0 -2
- package/lib/components/logos/Pterodactyl.qwik.cjs +0 -35
- package/lib/components/logos/Pterodactyl.qwik.mjs +0 -35
- package/lib/components/logos/Purpur.d.ts +0 -2
- package/lib/components/logos/Purpur.qwik.cjs +0 -76
- package/lib/components/logos/Purpur.qwik.mjs +0 -76
- package/lib/components/logos/Velocity.d.ts +0 -2
- package/lib/components/logos/Velocity.qwik.cjs +0 -27
- package/lib/components/logos/Velocity.qwik.mjs +0 -27
- package/lib/components/logos/Waterfall.d.ts +0 -2
- package/lib/components/logos/Waterfall.qwik.cjs +0 -21
- package/lib/components/logos/Waterfall.qwik.mjs +0 -21
- package/lib/components/logos.d.ts +0 -10
- /package/lib/components/docs/{IconsLogos.d.ts → Label.d.ts} +0 -0
- /package/lib/{components/logos → svg}/IconProps.d.ts +0 -0
|
@@ -1,27 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
children: [
|
|
11
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", {
|
|
12
|
-
for: props.id,
|
|
13
|
-
class: "pb-1 text-lum-text select-none",
|
|
14
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(core.Slot, {})
|
|
15
|
-
}),
|
|
16
|
-
/* @__PURE__ */ jsxRuntime.jsx(NumberInputRaw, {
|
|
17
|
-
...props,
|
|
18
|
-
children: void 0
|
|
19
|
-
})
|
|
20
|
-
]
|
|
21
|
-
});
|
|
22
|
-
});
|
|
23
|
-
const NumberInputRaw = core.component$(({ input, onDecrement$, onIncrement$, value = 0, step = 1, ...props }) => {
|
|
24
|
-
core.useStyles$(`
|
|
1
|
+
const require_functions = require("../functions.qwik.cjs");
|
|
2
|
+
const require_Plus = require("../../svg/Plus.qwik.cjs");
|
|
3
|
+
const require_Minus = require("../../svg/Minus.qwik.cjs");
|
|
4
|
+
let _qwik_dev_core = require("@qwik.dev/core");
|
|
5
|
+
//#region src/components/elements/NumberInput.tsx
|
|
6
|
+
var _hf0 = (p0, p1) => p0.min ? p1 <= p0.min : false;
|
|
7
|
+
var _hf1 = (p0, p1) => p0.max ? p1 >= p0.max : false;
|
|
8
|
+
var NumberInput = /* @__PURE__ */ (0, _qwik_dev_core.componentQrl)(/* @__PURE__ */ (0, _qwik_dev_core.inlinedQrl)(({ input, class: Class, onDecrement$, onIncrement$, value = 0, step = 1, ...props }) => {
|
|
9
|
+
(0, _qwik_dev_core.useStylesQrl)(/* @__PURE__ */ (0, _qwik_dev_core.inlinedQrl)(`
|
|
25
10
|
input::-webkit-outer-spin-button,
|
|
26
11
|
input::-webkit-inner-spin-button {
|
|
27
12
|
-webkit-appearance: none;
|
|
@@ -30,58 +15,47 @@ const NumberInputRaw = core.component$(({ input, onDecrement$, onIncrement$, val
|
|
|
30
15
|
input[type=number] {
|
|
31
16
|
-moz-appearance: textfield;
|
|
32
17
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
siblingInput.stepUp();
|
|
77
|
-
await onIncrement$(event, element, siblingInput);
|
|
78
|
-
}) : onIncrement$,
|
|
79
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(Plus.Plus, {
|
|
80
|
-
size: 20
|
|
81
|
-
})
|
|
82
|
-
})
|
|
83
|
-
]
|
|
84
|
-
});
|
|
85
|
-
});
|
|
18
|
+
`, "NumberInput_component_useStyles_9gV0k9qgkUU"));
|
|
19
|
+
return /* @__PURE__ */ (0, _qwik_dev_core._jsxSorted)("div", null, { class: { "flex touch-manipulation gap-1 text-lum-text": true } }, [
|
|
20
|
+
/* @__PURE__ */ (0, _qwik_dev_core._jsxSorted)("button", {
|
|
21
|
+
disabled: (0, _qwik_dev_core._fnSignal)(_hf0, [props, value]),
|
|
22
|
+
"q-e:click": input ? /* @__PURE__ */ (0, _qwik_dev_core.inlinedQrl)(async (event, element) => {
|
|
23
|
+
const onDecrement$ = _qwik_dev_core._captures[0];
|
|
24
|
+
const siblingInput = element.nextElementSibling;
|
|
25
|
+
siblingInput.stepDown();
|
|
26
|
+
await onDecrement$?.(event, element, siblingInput);
|
|
27
|
+
}, "NumberInput_component_div_button_q_e_click_x56P4mcwT0M", [onDecrement$]) : onDecrement$
|
|
28
|
+
}, {
|
|
29
|
+
type: "button",
|
|
30
|
+
class: { "lum-btn p-2 rounded-r-sm": true },
|
|
31
|
+
"data-action": "decrement",
|
|
32
|
+
"aria-label": "Decrement"
|
|
33
|
+
}, /* @__PURE__ */ (0, _qwik_dev_core._jsxSorted)(require_Minus.Minus, null, { size: 20 }, null, 3, "kR_0"), 0, null),
|
|
34
|
+
input && /* @__PURE__ */ (0, _qwik_dev_core._jsxSplit)("input", {
|
|
35
|
+
...(0, _qwik_dev_core._getVarProps)(props),
|
|
36
|
+
...(0, _qwik_dev_core._getConstProps)(props),
|
|
37
|
+
value,
|
|
38
|
+
step,
|
|
39
|
+
class: {
|
|
40
|
+
"lum-input text-center rounded-sm lum-input-p-1": true,
|
|
41
|
+
...require_functions.getClassObject(Class)
|
|
42
|
+
}
|
|
43
|
+
}, { type: "number" }, null, 0, "kR_1"),
|
|
44
|
+
/* @__PURE__ */ (0, _qwik_dev_core._jsxSorted)("button", {
|
|
45
|
+
disabled: (0, _qwik_dev_core._fnSignal)(_hf1, [props, value]),
|
|
46
|
+
"q-e:click": input ? /* @__PURE__ */ (0, _qwik_dev_core.inlinedQrl)(async (event, element) => {
|
|
47
|
+
const onIncrement$ = _qwik_dev_core._captures[0];
|
|
48
|
+
const siblingInput = element.previousElementSibling;
|
|
49
|
+
siblingInput.stepUp();
|
|
50
|
+
await onIncrement$?.(event, element, siblingInput);
|
|
51
|
+
}, "NumberInput_component_div_button_q_e_click_1_oHOVxz0RzY0", [onIncrement$]) : onIncrement$
|
|
52
|
+
}, {
|
|
53
|
+
type: "button",
|
|
54
|
+
class: { "lum-btn p-2 rounded-l-sm": true },
|
|
55
|
+
"data-action": "increment",
|
|
56
|
+
"aria-label": "Increment"
|
|
57
|
+
}, /* @__PURE__ */ (0, _qwik_dev_core._jsxSorted)(require_Plus.Plus, null, { size: 20 }, null, 3, "kR_2"), 0, null)
|
|
58
|
+
], 1, "kR_3");
|
|
59
|
+
}, "NumberInput_component_2YJwSaeO64g"));
|
|
60
|
+
//#endregion
|
|
86
61
|
exports.NumberInput = NumberInput;
|
|
87
|
-
exports.NumberInputRaw = NumberInputRaw;
|
|
@@ -1,25 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { component$, Slot, useStyles$, $ } from "@qwik.dev/core";
|
|
1
|
+
import { getClassObject } from "../functions.qwik.mjs";
|
|
3
2
|
import { Plus } from "../../svg/Plus.qwik.mjs";
|
|
4
3
|
import { Minus } from "../../svg/Minus.qwik.mjs";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
class: "pb-1 text-lum-text select-none",
|
|
12
|
-
children: /* @__PURE__ */ jsx(Slot, {})
|
|
13
|
-
}),
|
|
14
|
-
/* @__PURE__ */ jsx(NumberInputRaw, {
|
|
15
|
-
...props,
|
|
16
|
-
children: void 0
|
|
17
|
-
})
|
|
18
|
-
]
|
|
19
|
-
});
|
|
20
|
-
});
|
|
21
|
-
const NumberInputRaw = component$(({ input, onDecrement$, onIncrement$, value = 0, step = 1, ...props }) => {
|
|
22
|
-
useStyles$(`
|
|
4
|
+
import { _captures, _fnSignal, _getConstProps, _getVarProps, _jsxSorted, _jsxSplit, componentQrl, inlinedQrl, useStylesQrl } from "@qwik.dev/core";
|
|
5
|
+
//#region src/components/elements/NumberInput.tsx
|
|
6
|
+
var _hf0 = (p0, p1) => p0.min ? p1 <= p0.min : false;
|
|
7
|
+
var _hf1 = (p0, p1) => p0.max ? p1 >= p0.max : false;
|
|
8
|
+
var NumberInput = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(({ input, class: Class, onDecrement$, onIncrement$, value = 0, step = 1, ...props }) => {
|
|
9
|
+
useStylesQrl(/* @__PURE__ */ inlinedQrl(`
|
|
23
10
|
input::-webkit-outer-spin-button,
|
|
24
11
|
input::-webkit-inner-spin-button {
|
|
25
12
|
-webkit-appearance: none;
|
|
@@ -28,60 +15,47 @@ const NumberInputRaw = component$(({ input, onDecrement$, onIncrement$, value =
|
|
|
28
15
|
input[type=number] {
|
|
29
16
|
-moz-appearance: textfield;
|
|
30
17
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
await onIncrement$(event, element, siblingInput);
|
|
76
|
-
}) : onIncrement$,
|
|
77
|
-
children: /* @__PURE__ */ jsx(Plus, {
|
|
78
|
-
size: 20
|
|
79
|
-
})
|
|
80
|
-
})
|
|
81
|
-
]
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
export {
|
|
85
|
-
NumberInput,
|
|
86
|
-
NumberInputRaw
|
|
87
|
-
};
|
|
18
|
+
`, "NumberInput_component_useStyles_9gV0k9qgkUU"));
|
|
19
|
+
return /* @__PURE__ */ _jsxSorted("div", null, { class: { "flex touch-manipulation gap-1 text-lum-text": true } }, [
|
|
20
|
+
/* @__PURE__ */ _jsxSorted("button", {
|
|
21
|
+
disabled: _fnSignal(_hf0, [props, value]),
|
|
22
|
+
"q-e:click": input ? /* @__PURE__ */ inlinedQrl(async (event, element) => {
|
|
23
|
+
const onDecrement$ = _captures[0];
|
|
24
|
+
const siblingInput = element.nextElementSibling;
|
|
25
|
+
siblingInput.stepDown();
|
|
26
|
+
await onDecrement$?.(event, element, siblingInput);
|
|
27
|
+
}, "NumberInput_component_div_button_q_e_click_x56P4mcwT0M", [onDecrement$]) : onDecrement$
|
|
28
|
+
}, {
|
|
29
|
+
type: "button",
|
|
30
|
+
class: { "lum-btn p-2 rounded-r-sm": true },
|
|
31
|
+
"data-action": "decrement",
|
|
32
|
+
"aria-label": "Decrement"
|
|
33
|
+
}, /* @__PURE__ */ _jsxSorted(Minus, null, { size: 20 }, null, 3, "kR_0"), 0, null),
|
|
34
|
+
input && /* @__PURE__ */ _jsxSplit("input", {
|
|
35
|
+
..._getVarProps(props),
|
|
36
|
+
..._getConstProps(props),
|
|
37
|
+
value,
|
|
38
|
+
step,
|
|
39
|
+
class: {
|
|
40
|
+
"lum-input text-center rounded-sm lum-input-p-1": true,
|
|
41
|
+
...getClassObject(Class)
|
|
42
|
+
}
|
|
43
|
+
}, { type: "number" }, null, 0, "kR_1"),
|
|
44
|
+
/* @__PURE__ */ _jsxSorted("button", {
|
|
45
|
+
disabled: _fnSignal(_hf1, [props, value]),
|
|
46
|
+
"q-e:click": input ? /* @__PURE__ */ inlinedQrl(async (event, element) => {
|
|
47
|
+
const onIncrement$ = _captures[0];
|
|
48
|
+
const siblingInput = element.previousElementSibling;
|
|
49
|
+
siblingInput.stepUp();
|
|
50
|
+
await onIncrement$?.(event, element, siblingInput);
|
|
51
|
+
}, "NumberInput_component_div_button_q_e_click_1_oHOVxz0RzY0", [onIncrement$]) : onIncrement$
|
|
52
|
+
}, {
|
|
53
|
+
type: "button",
|
|
54
|
+
class: { "lum-btn p-2 rounded-l-sm": true },
|
|
55
|
+
"data-action": "increment",
|
|
56
|
+
"aria-label": "Increment"
|
|
57
|
+
}, /* @__PURE__ */ _jsxSorted(Plus, null, { size: 20 }, null, 3, "kR_2"), 0, null)
|
|
58
|
+
], 1, "kR_3");
|
|
59
|
+
}, "NumberInput_component_2YJwSaeO64g"));
|
|
60
|
+
//#endregion
|
|
61
|
+
export { NumberInput };
|
|
@@ -1,18 +1,11 @@
|
|
|
1
1
|
import type { PropsOf, QRL } from '@qwik.dev/core';
|
|
2
|
-
interface
|
|
2
|
+
interface RangeInputProps extends Omit<PropsOf<'input'> & {
|
|
3
3
|
type: 'number';
|
|
4
|
-
}, '
|
|
4
|
+
}, 'type'> {
|
|
5
5
|
onInput$?: QRL<(event: InputEvent, element: HTMLInputElement) => void>;
|
|
6
|
-
class?: {
|
|
7
|
-
[key: string]: boolean;
|
|
8
|
-
};
|
|
9
6
|
value?: number;
|
|
10
7
|
min?: number;
|
|
11
8
|
max?: number;
|
|
12
9
|
}
|
|
13
|
-
interface RangeInputProps extends Omit<RangeInputRawProps, 'children'> {
|
|
14
|
-
id: string;
|
|
15
|
-
}
|
|
16
10
|
export declare const RangeInput: import("@qwik.dev/core").Component<RangeInputProps>;
|
|
17
|
-
export declare const RangeInputRaw: import("@qwik.dev/core").Component<RangeInputRawProps>;
|
|
18
11
|
export {};
|
|
@@ -1,77 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
47
|
-
class: "absolute -top-1 flex flex-col gap-4 items-center",
|
|
48
|
-
style: {
|
|
49
|
-
left: `calc(${filledPercentage.value}% - 0.5rem)`
|
|
50
|
-
},
|
|
51
|
-
children: [
|
|
52
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
53
|
-
class: "w-4 h-4 lum-bg-lum-accent group-hover:lum-bg-lum-accent rounded-full"
|
|
54
|
-
}),
|
|
55
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
56
|
-
class: "absolute top-6 lum-bg-lum-card-bg lum-btn-p-2 text-center rounded-lum opacity-0 group-hover:opacity-100 transition-all z-50",
|
|
57
|
-
children: valueSignal.value
|
|
58
|
-
})
|
|
59
|
-
]
|
|
60
|
-
}),
|
|
61
|
-
/* @__PURE__ */ jsxRuntime.jsx("input", {
|
|
62
|
-
...props,
|
|
63
|
-
min,
|
|
64
|
-
max,
|
|
65
|
-
type: "range",
|
|
66
|
-
value: valueSignal.value,
|
|
67
|
-
class: "absolute top-0 h-2 w-full opacity-0 cursor-pointer",
|
|
68
|
-
onInput$: async (event, element) => {
|
|
69
|
-
valueSignal.value = parseFloat(element.value);
|
|
70
|
-
if (onInput$) await onInput$(event, element);
|
|
71
|
-
}
|
|
72
|
-
})
|
|
73
|
-
]
|
|
74
|
-
});
|
|
75
|
-
});
|
|
1
|
+
let _qwik_dev_core = require("@qwik.dev/core");
|
|
2
|
+
//#region src/components/elements/RangeInput.tsx
|
|
3
|
+
var _hf0 = (p0) => ({ width: `${p0.value}%` });
|
|
4
|
+
var _hf1 = (p0) => ({ left: `calc(${p0.value}% - 0.5rem)` });
|
|
5
|
+
var RangeInput = /* @__PURE__ */ (0, _qwik_dev_core.componentQrl)(/* @__PURE__ */ (0, _qwik_dev_core.inlinedQrl)(({ value, min = 0, max = 10, onInput$, ...props }) => {
|
|
6
|
+
const valueSignal = (0, _qwik_dev_core.useSignal)(value ?? min);
|
|
7
|
+
const filledPercentage = (0, _qwik_dev_core.useComputedQrl)(/* @__PURE__ */ (0, _qwik_dev_core.inlinedQrl)(() => {
|
|
8
|
+
const max = _qwik_dev_core._captures[0], min = _qwik_dev_core._captures[1];
|
|
9
|
+
return (_qwik_dev_core._captures[2].value - min) / (max - min) * 100;
|
|
10
|
+
}, "RangeInput_component_filledPercentage_useComputed_Vta9t9J9C4k", [
|
|
11
|
+
max,
|
|
12
|
+
min,
|
|
13
|
+
valueSignal
|
|
14
|
+
]));
|
|
15
|
+
const tickCount = max - min - 1;
|
|
16
|
+
return /* @__PURE__ */ (0, _qwik_dev_core._jsxSorted)("div", null, { class: { "group relative flex touch-manipulation gap-1 text-lum-text lum-input p-0": true } }, [
|
|
17
|
+
/* @__PURE__ */ (0, _qwik_dev_core._jsxSorted)("div", null, { class: "absolute w-full flex justify-evenly" }, tickCount > 0 && [...Array(tickCount)].map((_, i) => {
|
|
18
|
+
return /* @__PURE__ */ (0, _qwik_dev_core._jsxSorted)("div", null, { class: "border-l border-l-lum-border/20 h-1 my-0.5" }, null, 3, i);
|
|
19
|
+
}), 1, null),
|
|
20
|
+
/* @__PURE__ */ (0, _qwik_dev_core._jsxSorted)("div", null, {
|
|
21
|
+
class: "h-2 lum-bg-lum-accent group-hover:lum-bg-lum-accent rounded-lum",
|
|
22
|
+
style: (0, _qwik_dev_core._fnSignal)(_hf0, [filledPercentage])
|
|
23
|
+
}, null, 3, null),
|
|
24
|
+
/* @__PURE__ */ (0, _qwik_dev_core._jsxSorted)("div", null, {
|
|
25
|
+
class: "absolute -top-1 flex flex-col gap-4 items-center",
|
|
26
|
+
style: (0, _qwik_dev_core._fnSignal)(_hf1, [filledPercentage])
|
|
27
|
+
}, [/* @__PURE__ */ (0, _qwik_dev_core._jsxSorted)("div", null, { class: "w-4 h-4 lum-bg-lum-accent group-hover:lum-bg-lum-accent rounded-full" }, null, 3, null), /* @__PURE__ */ (0, _qwik_dev_core._jsxSorted)("div", null, { class: "absolute top-6 lum-bg-lum-card-bg lum-btn-p-2 text-center rounded-lum opacity-0 group-hover:opacity-100 transition-all z-50" }, (0, _qwik_dev_core._wrapProp)(valueSignal), 3, null)], 3, null),
|
|
28
|
+
/* @__PURE__ */ (0, _qwik_dev_core._jsxSplit)("input", {
|
|
29
|
+
...(0, _qwik_dev_core._getVarProps)(props),
|
|
30
|
+
...(0, _qwik_dev_core._getConstProps)(props),
|
|
31
|
+
min,
|
|
32
|
+
max,
|
|
33
|
+
"q-e:input": /* @__PURE__ */ (0, _qwik_dev_core.inlinedQrl)(async (event, element, onInput$, valueSignal) => {
|
|
34
|
+
valueSignal.value = parseFloat(element.value);
|
|
35
|
+
if (onInput$) await onInput$(event, element);
|
|
36
|
+
}, "RangeInput_component_div_input_q_e_input_0hUtvpnN79M"),
|
|
37
|
+
"q:ps": [onInput$, valueSignal]
|
|
38
|
+
}, {
|
|
39
|
+
type: "range",
|
|
40
|
+
value: (0, _qwik_dev_core._wrapProp)(valueSignal),
|
|
41
|
+
class: "absolute top-0 h-2 w-full opacity-0 cursor-pointer"
|
|
42
|
+
}, null, 4, null)
|
|
43
|
+
], 1, "Wb_0");
|
|
44
|
+
}, "RangeInput_component_wN5xjLYsT00"));
|
|
45
|
+
//#endregion
|
|
76
46
|
exports.RangeInput = RangeInput;
|
|
77
|
-
exports.RangeInputRaw = RangeInputRaw;
|
|
@@ -1,77 +1,46 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
left: `calc(${filledPercentage.value}% - 0.5rem)`
|
|
48
|
-
},
|
|
49
|
-
children: [
|
|
50
|
-
/* @__PURE__ */ jsx("div", {
|
|
51
|
-
class: "w-4 h-4 lum-bg-lum-accent group-hover:lum-bg-lum-accent rounded-full"
|
|
52
|
-
}),
|
|
53
|
-
/* @__PURE__ */ jsx("div", {
|
|
54
|
-
class: "absolute top-6 lum-bg-lum-card-bg lum-btn-p-2 text-center rounded-lum opacity-0 group-hover:opacity-100 transition-all z-50",
|
|
55
|
-
children: valueSignal.value
|
|
56
|
-
})
|
|
57
|
-
]
|
|
58
|
-
}),
|
|
59
|
-
/* @__PURE__ */ jsx("input", {
|
|
60
|
-
...props,
|
|
61
|
-
min,
|
|
62
|
-
max,
|
|
63
|
-
type: "range",
|
|
64
|
-
value: valueSignal.value,
|
|
65
|
-
class: "absolute top-0 h-2 w-full opacity-0 cursor-pointer",
|
|
66
|
-
onInput$: async (event, element) => {
|
|
67
|
-
valueSignal.value = parseFloat(element.value);
|
|
68
|
-
if (onInput$) await onInput$(event, element);
|
|
69
|
-
}
|
|
70
|
-
})
|
|
71
|
-
]
|
|
72
|
-
});
|
|
73
|
-
});
|
|
74
|
-
export {
|
|
75
|
-
RangeInput,
|
|
76
|
-
RangeInputRaw
|
|
77
|
-
};
|
|
1
|
+
import { _captures, _fnSignal, _getConstProps, _getVarProps, _jsxSorted, _jsxSplit, _wrapProp, componentQrl, inlinedQrl, useComputedQrl, useSignal } from "@qwik.dev/core";
|
|
2
|
+
//#region src/components/elements/RangeInput.tsx
|
|
3
|
+
var _hf0 = (p0) => ({ width: `${p0.value}%` });
|
|
4
|
+
var _hf1 = (p0) => ({ left: `calc(${p0.value}% - 0.5rem)` });
|
|
5
|
+
var RangeInput = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(({ value, min = 0, max = 10, onInput$, ...props }) => {
|
|
6
|
+
const valueSignal = useSignal(value ?? min);
|
|
7
|
+
const filledPercentage = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
8
|
+
const max = _captures[0], min = _captures[1];
|
|
9
|
+
return (_captures[2].value - min) / (max - min) * 100;
|
|
10
|
+
}, "RangeInput_component_filledPercentage_useComputed_Vta9t9J9C4k", [
|
|
11
|
+
max,
|
|
12
|
+
min,
|
|
13
|
+
valueSignal
|
|
14
|
+
]));
|
|
15
|
+
const tickCount = max - min - 1;
|
|
16
|
+
return /* @__PURE__ */ _jsxSorted("div", null, { class: { "group relative flex touch-manipulation gap-1 text-lum-text lum-input p-0": true } }, [
|
|
17
|
+
/* @__PURE__ */ _jsxSorted("div", null, { class: "absolute w-full flex justify-evenly" }, tickCount > 0 && [...Array(tickCount)].map((_, i) => {
|
|
18
|
+
return /* @__PURE__ */ _jsxSorted("div", null, { class: "border-l border-l-lum-border/20 h-1 my-0.5" }, null, 3, i);
|
|
19
|
+
}), 1, null),
|
|
20
|
+
/* @__PURE__ */ _jsxSorted("div", null, {
|
|
21
|
+
class: "h-2 lum-bg-lum-accent group-hover:lum-bg-lum-accent rounded-lum",
|
|
22
|
+
style: _fnSignal(_hf0, [filledPercentage])
|
|
23
|
+
}, null, 3, null),
|
|
24
|
+
/* @__PURE__ */ _jsxSorted("div", null, {
|
|
25
|
+
class: "absolute -top-1 flex flex-col gap-4 items-center",
|
|
26
|
+
style: _fnSignal(_hf1, [filledPercentage])
|
|
27
|
+
}, [/* @__PURE__ */ _jsxSorted("div", null, { class: "w-4 h-4 lum-bg-lum-accent group-hover:lum-bg-lum-accent rounded-full" }, null, 3, null), /* @__PURE__ */ _jsxSorted("div", null, { class: "absolute top-6 lum-bg-lum-card-bg lum-btn-p-2 text-center rounded-lum opacity-0 group-hover:opacity-100 transition-all z-50" }, _wrapProp(valueSignal), 3, null)], 3, null),
|
|
28
|
+
/* @__PURE__ */ _jsxSplit("input", {
|
|
29
|
+
..._getVarProps(props),
|
|
30
|
+
..._getConstProps(props),
|
|
31
|
+
min,
|
|
32
|
+
max,
|
|
33
|
+
"q-e:input": /* @__PURE__ */ inlinedQrl(async (event, element, onInput$, valueSignal) => {
|
|
34
|
+
valueSignal.value = parseFloat(element.value);
|
|
35
|
+
if (onInput$) await onInput$(event, element);
|
|
36
|
+
}, "RangeInput_component_div_input_q_e_input_0hUtvpnN79M"),
|
|
37
|
+
"q:ps": [onInput$, valueSignal]
|
|
38
|
+
}, {
|
|
39
|
+
type: "range",
|
|
40
|
+
value: _wrapProp(valueSignal),
|
|
41
|
+
class: "absolute top-0 h-2 w-full opacity-0 cursor-pointer"
|
|
42
|
+
}, null, 4, null)
|
|
43
|
+
], 1, "Wb_0");
|
|
44
|
+
}, "RangeInput_component_wN5xjLYsT00"));
|
|
45
|
+
//#endregion
|
|
46
|
+
export { RangeInput };
|
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
import type { JSXChildren, PropsOf } from '@qwik.dev/core';
|
|
2
|
-
interface SelectMenuProps extends Omit<PropsOf<'select'>, '
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
};
|
|
6
|
-
panelClass?: string;
|
|
7
|
-
btnClass?: string;
|
|
1
|
+
import type { ClassList, JSXChildren, PropsOf, QRL } from '@qwik.dev/core';
|
|
2
|
+
interface SelectMenuProps extends Omit<PropsOf<'select'>, 'onChange$'> {
|
|
3
|
+
panelClass?: ClassList;
|
|
4
|
+
btnClass?: ClassList;
|
|
8
5
|
noblur?: boolean;
|
|
9
6
|
nocloseonclick?: boolean;
|
|
10
7
|
customDropdown?: boolean;
|
|
11
8
|
hover?: boolean;
|
|
12
9
|
align?: 'left' | 'right' | 'center';
|
|
10
|
+
onChange$?: QRL<(event: Event, element: HTMLSelectElement) => void>;
|
|
13
11
|
values?: {
|
|
14
12
|
name: JSXChildren;
|
|
15
13
|
value: string | number;
|
|
16
14
|
}[];
|
|
17
15
|
}
|
|
18
16
|
export declare const SelectMenu: import("@qwik.dev/core").Component<SelectMenuProps>;
|
|
19
|
-
export declare const SelectMenuRaw: import("@qwik.dev/core").Component<SelectMenuProps>;
|
|
20
17
|
export {};
|