@luminescent/ui-qwik 7.0.0-2 → 7.0.0-4
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/assets/CggnzkAK-bundle-graph.json +1 -0
- package/lib/assets/CyrvYwp8-bundle-graph.json +1 -0
- package/lib/components/docs/index.d.ts +0 -1
- package/lib/components/elements/Anchor.qwik.cjs +5 -5
- package/lib/components/elements/Anchor.qwik.mjs +5 -5
- package/lib/components/elements/ColorPicker.qwik.cjs +24 -24
- package/lib/components/elements/ColorPicker.qwik.mjs +24 -24
- package/lib/components/elements/Dropdown.qwik.cjs +3 -3
- package/lib/components/elements/Dropdown.qwik.mjs +3 -3
- package/lib/components/elements/Label.d.ts +1 -0
- package/lib/components/elements/Label.qwik.cjs +7 -3
- package/lib/components/elements/Label.qwik.mjs +8 -4
- package/lib/components/elements/Nav.d.ts +1 -0
- package/lib/components/elements/Nav.qwik.cjs +29 -25
- package/lib/components/elements/Nav.qwik.mjs +29 -25
- package/lib/components/elements/NumberInput.d.ts +1 -0
- package/lib/components/elements/NumberInput.qwik.cjs +28 -20
- package/lib/components/elements/NumberInput.qwik.mjs +29 -21
- package/lib/components/elements/RangeInput.d.ts +1 -0
- package/lib/components/elements/RangeInput.qwik.cjs +13 -12
- package/lib/components/elements/RangeInput.qwik.mjs +13 -12
- package/lib/components/elements/SelectMenu.d.ts +1 -0
- package/lib/components/elements/SelectMenu.qwik.cjs +18 -14
- package/lib/components/elements/SelectMenu.qwik.mjs +18 -14
- package/lib/components/elements/Sidebar.qwik.cjs +4 -4
- package/lib/components/elements/Sidebar.qwik.mjs +4 -4
- package/lib/components/elements/Toggle.d.ts +1 -0
- package/lib/components/elements/Toggle.qwik.cjs +6 -5
- package/lib/components/elements/Toggle.qwik.mjs +6 -5
- package/lib/components/elements.d.ts +0 -1
- package/lib/index.qwik.cjs +0 -3
- package/lib/index.qwik.mjs +1 -2
- package/lib/q-manifest.json +39 -51
- package/lib/svg/ChevronDown.qwik.cjs +3 -3
- package/lib/svg/ChevronDown.qwik.mjs +3 -3
- package/lib/svg/Link.qwik.cjs +5 -5
- package/lib/svg/Link.qwik.mjs +5 -5
- package/lib/svg/Menu.qwik.cjs +5 -5
- package/lib/svg/Menu.qwik.mjs +5 -5
- package/lib/svg/Minus.qwik.cjs +3 -3
- package/lib/svg/Minus.qwik.mjs +3 -3
- package/lib/svg/Plus.qwik.cjs +3 -3
- package/lib/svg/Plus.qwik.mjs +3 -3
- package/lib/svg/Shuffle.qwik.cjs +7 -7
- package/lib/svg/Shuffle.qwik.mjs +7 -7
- package/package.json +15 -17
- package/lib/assets/BBIagblG-bundle-graph.json +0 -1
- package/lib/assets/ChtqwOpy-bundle-graph.json +0 -1
- package/lib/components/docs/Blobs.d.ts +0 -3
- package/lib/components/elements/Blobs.d.ts +0 -36
- package/lib/components/elements/Blobs.qwik.cjs +0 -190
- package/lib/components/elements/Blobs.qwik.mjs +0 -189
|
@@ -2,11 +2,12 @@ const require_functions = require("../functions.qwik.cjs");
|
|
|
2
2
|
const require_Menu = require("../../svg/Menu.qwik.cjs");
|
|
3
3
|
let _qwik_dev_core = require("@qwik.dev/core");
|
|
4
4
|
//#region src/components/elements/Nav.tsx
|
|
5
|
-
var _hf0 = (p0) =>
|
|
5
|
+
var _hf0 = (p0) => !p0.floating ? { "--lum-depth": 0 } : void 0;
|
|
6
|
+
var _hf1 = (p0) => ({
|
|
6
7
|
"lum-btn lum-bg-transparent p-2 sm:hidden rounded-lum-2": true,
|
|
7
8
|
"nav-ignore-dismiss": p0.value
|
|
8
9
|
});
|
|
9
|
-
var Nav =
|
|
10
|
+
var Nav = /*#__PURE__*/ (0, _qwik_dev_core.componentQrl)(/*#__PURE__*/ (0, _qwik_dev_core.inlinedQrl)((_rawProps) => {
|
|
10
11
|
const props = (0, _qwik_dev_core._restProps)(_rawProps, [
|
|
11
12
|
"fixed",
|
|
12
13
|
"floating",
|
|
@@ -14,19 +15,22 @@ var Nav = /* @__PURE__ */ (0, _qwik_dev_core.componentQrl)(/* @__PURE__ */ (0, _
|
|
|
14
15
|
"nohamburger",
|
|
15
16
|
"nodismiss",
|
|
16
17
|
"class",
|
|
17
|
-
"colorClass"
|
|
18
|
+
"colorClass",
|
|
19
|
+
"innerProps"
|
|
18
20
|
]);
|
|
19
21
|
const menu = (0, _qwik_dev_core.useSignal)(false);
|
|
20
|
-
return
|
|
22
|
+
return /*#__PURE__*/ (0, _qwik_dev_core._jsxSplit)("nav", {
|
|
21
23
|
...(0, _qwik_dev_core._getVarProps)(props),
|
|
22
24
|
...(0, _qwik_dev_core._getConstProps)(props),
|
|
23
25
|
class: {
|
|
24
|
-
"top-0 left-0 z-50 flex
|
|
26
|
+
"top-0 left-0 z-50 flex flex-col": true,
|
|
27
|
+
"w-full": !_rawProps.floating,
|
|
28
|
+
"w-[calc(100%-(--spacing(4)))] mx-2": _rawProps.floating,
|
|
25
29
|
fixed: _rawProps.fixed,
|
|
26
30
|
absolute: !_rawProps.fixed,
|
|
27
31
|
...require_functions.getClassObject(_rawProps.class)
|
|
28
32
|
}
|
|
29
|
-
}, null, [!_rawProps.nohamburger &&
|
|
33
|
+
}, null, [!_rawProps.nohamburger && /*#__PURE__*/ (0, _qwik_dev_core._jsxSorted)("div", { class: {
|
|
30
34
|
"absolute top-full lum-card motion-safe:transition-all sm:hidden max-w-7xl gap-2 px-2 py-4": true,
|
|
31
35
|
"w-[calc(100%-(--spacing(8)))] mx-4": _rawProps.floating,
|
|
32
36
|
"w-[calc(100%-(--spacing(4)))] mx-2": !_rawProps.floating,
|
|
@@ -34,21 +38,21 @@ var Nav = /* @__PURE__ */ (0, _qwik_dev_core.componentQrl)(/* @__PURE__ */ (0, _
|
|
|
34
38
|
"pointer-events-none opacity-0 -mt-2 scale-95": !menu.value,
|
|
35
39
|
"backdrop-blur-lg": !_rawProps.noblur,
|
|
36
40
|
...require_functions.getClassObject(_rawProps.colorClass ?? "lum-bg-lum-card-bg")
|
|
37
|
-
} }, null,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"q-e:click":
|
|
41
|
+
} }, null, /*#__PURE__*/ (0, _qwik_dev_core._jsxSorted)(_qwik_dev_core.Slot, null, { name: "mobile" }, null, 3, "03_0"), 1, "03_1"), /*#__PURE__*/ (0, _qwik_dev_core._jsxSplit)("div", {
|
|
42
|
+
..._rawProps.innerProps,
|
|
43
|
+
style: (0, _qwik_dev_core._fnSignal)(_hf0, [_rawProps]),
|
|
44
|
+
class: {
|
|
45
|
+
"flex w-full justify-evenly px-2": true,
|
|
46
|
+
"backdrop-blur-lg": !_rawProps.noblur,
|
|
47
|
+
"border-x-0! border-t-0!": !_rawProps.floating,
|
|
48
|
+
"mx-auto max-w-7xl mt-2 rounded-lum border": _rawProps.floating,
|
|
49
|
+
...require_functions.getClassObject(_rawProps.colorClass ?? "lum-bg-lum-card-bg")
|
|
50
|
+
}
|
|
51
|
+
}, null, [
|
|
52
|
+
/*#__PURE__*/ (0, _qwik_dev_core._jsxSplit)("div", { ..._rawProps.innerProps }, { class: "flex flex-1 items-center justify-start gap-2 py-2" }, /*#__PURE__*/ (0, _qwik_dev_core._jsxSorted)(_qwik_dev_core.Slot, null, { name: "start" }, null, 3, "03_2"), 0, null),
|
|
53
|
+
/*#__PURE__*/ (0, _qwik_dev_core._jsxSplit)("div", { ..._rawProps.innerProps }, { class: "flex flex-1 items-center justify-center gap-2 py-2" }, /*#__PURE__*/ (0, _qwik_dev_core._jsxSorted)(_qwik_dev_core.Slot, null, { name: "center" }, null, 3, "03_3"), 0, null),
|
|
54
|
+
/*#__PURE__*/ (0, _qwik_dev_core._jsxSplit)("div", { ..._rawProps.innerProps }, { class: "flex flex-1 items-center justify-end gap-2 py-2" }, [/*#__PURE__*/ (0, _qwik_dev_core._jsxSorted)(_qwik_dev_core.Slot, null, { name: "end" }, null, 3, "03_4"), !_rawProps.nohamburger && /*#__PURE__*/ (0, _qwik_dev_core._jsxSorted)("button", {
|
|
55
|
+
"q-e:click": /*#__PURE__*/ (0, _qwik_dev_core.inlinedQrl)((_, _1, _rawProps, menu) => {
|
|
52
56
|
menu.value = !menu.value;
|
|
53
57
|
if (_rawProps.nodismiss) return;
|
|
54
58
|
function onClick(e) {
|
|
@@ -61,14 +65,14 @@ var Nav = /* @__PURE__ */ (0, _qwik_dev_core.componentQrl)(/* @__PURE__ */ (0, _
|
|
|
61
65
|
menu.value = false;
|
|
62
66
|
}
|
|
63
67
|
if (menu.value) window.addEventListener("click", onClick);
|
|
64
|
-
}, "
|
|
68
|
+
}, "Nav_component_nav_div_div_button_q_e_click_Dv3Y0bHaG0E"),
|
|
65
69
|
"q:ps": [_rawProps, menu]
|
|
66
70
|
}, {
|
|
67
71
|
name: "Navigation Menu",
|
|
68
72
|
title: "Navigation Menu",
|
|
69
|
-
class: (0, _qwik_dev_core._fnSignal)(
|
|
70
|
-
},
|
|
71
|
-
],
|
|
73
|
+
class: (0, _qwik_dev_core._fnSignal)(_hf1, [menu])
|
|
74
|
+
}, /*#__PURE__*/ (0, _qwik_dev_core._jsxSorted)(require_Menu.Menu, null, { size: 24 }, null, 3, "03_5"), 4, "03_6")], 0, null)
|
|
75
|
+
], 0, null)], 0, "03_7");
|
|
72
76
|
}, "Nav_component_GVA94DyavJM"));
|
|
73
77
|
//#endregion
|
|
74
78
|
exports.Nav = Nav;
|
|
@@ -2,11 +2,12 @@ import { getClassObject } from "../functions.qwik.mjs";
|
|
|
2
2
|
import { Menu } from "../../svg/Menu.qwik.mjs";
|
|
3
3
|
import { Slot, _fnSignal, _getConstProps, _getVarProps, _jsxSorted, _jsxSplit, _restProps, componentQrl, inlinedQrl, useSignal } from "@qwik.dev/core";
|
|
4
4
|
//#region src/components/elements/Nav.tsx
|
|
5
|
-
var _hf0 = (p0) =>
|
|
5
|
+
var _hf0 = (p0) => !p0.floating ? { "--lum-depth": 0 } : void 0;
|
|
6
|
+
var _hf1 = (p0) => ({
|
|
6
7
|
"lum-btn lum-bg-transparent p-2 sm:hidden rounded-lum-2": true,
|
|
7
8
|
"nav-ignore-dismiss": p0.value
|
|
8
9
|
});
|
|
9
|
-
var Nav =
|
|
10
|
+
var Nav = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl((_rawProps) => {
|
|
10
11
|
const props = _restProps(_rawProps, [
|
|
11
12
|
"fixed",
|
|
12
13
|
"floating",
|
|
@@ -14,19 +15,22 @@ var Nav = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((_rawProps) =>
|
|
|
14
15
|
"nohamburger",
|
|
15
16
|
"nodismiss",
|
|
16
17
|
"class",
|
|
17
|
-
"colorClass"
|
|
18
|
+
"colorClass",
|
|
19
|
+
"innerProps"
|
|
18
20
|
]);
|
|
19
21
|
const menu = useSignal(false);
|
|
20
|
-
return
|
|
22
|
+
return /*#__PURE__*/ _jsxSplit("nav", {
|
|
21
23
|
..._getVarProps(props),
|
|
22
24
|
..._getConstProps(props),
|
|
23
25
|
class: {
|
|
24
|
-
"top-0 left-0 z-50 flex
|
|
26
|
+
"top-0 left-0 z-50 flex flex-col": true,
|
|
27
|
+
"w-full": !_rawProps.floating,
|
|
28
|
+
"w-[calc(100%-(--spacing(4)))] mx-2": _rawProps.floating,
|
|
25
29
|
fixed: _rawProps.fixed,
|
|
26
30
|
absolute: !_rawProps.fixed,
|
|
27
31
|
...getClassObject(_rawProps.class)
|
|
28
32
|
}
|
|
29
|
-
}, null, [!_rawProps.nohamburger &&
|
|
33
|
+
}, null, [!_rawProps.nohamburger && /*#__PURE__*/ _jsxSorted("div", { class: {
|
|
30
34
|
"absolute top-full lum-card motion-safe:transition-all sm:hidden max-w-7xl gap-2 px-2 py-4": true,
|
|
31
35
|
"w-[calc(100%-(--spacing(8)))] mx-4": _rawProps.floating,
|
|
32
36
|
"w-[calc(100%-(--spacing(4)))] mx-2": !_rawProps.floating,
|
|
@@ -34,21 +38,21 @@ var Nav = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((_rawProps) =>
|
|
|
34
38
|
"pointer-events-none opacity-0 -mt-2 scale-95": !menu.value,
|
|
35
39
|
"backdrop-blur-lg": !_rawProps.noblur,
|
|
36
40
|
...getClassObject(_rawProps.colorClass ?? "lum-bg-lum-card-bg")
|
|
37
|
-
} }, null,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"q-e:click":
|
|
41
|
+
} }, null, /*#__PURE__*/ _jsxSorted(Slot, null, { name: "mobile" }, null, 3, "03_0"), 1, "03_1"), /*#__PURE__*/ _jsxSplit("div", {
|
|
42
|
+
..._rawProps.innerProps,
|
|
43
|
+
style: _fnSignal(_hf0, [_rawProps]),
|
|
44
|
+
class: {
|
|
45
|
+
"flex w-full justify-evenly px-2": true,
|
|
46
|
+
"backdrop-blur-lg": !_rawProps.noblur,
|
|
47
|
+
"border-x-0! border-t-0!": !_rawProps.floating,
|
|
48
|
+
"mx-auto max-w-7xl mt-2 rounded-lum border": _rawProps.floating,
|
|
49
|
+
...getClassObject(_rawProps.colorClass ?? "lum-bg-lum-card-bg")
|
|
50
|
+
}
|
|
51
|
+
}, null, [
|
|
52
|
+
/*#__PURE__*/ _jsxSplit("div", { ..._rawProps.innerProps }, { class: "flex flex-1 items-center justify-start gap-2 py-2" }, /*#__PURE__*/ _jsxSorted(Slot, null, { name: "start" }, null, 3, "03_2"), 0, null),
|
|
53
|
+
/*#__PURE__*/ _jsxSplit("div", { ..._rawProps.innerProps }, { class: "flex flex-1 items-center justify-center gap-2 py-2" }, /*#__PURE__*/ _jsxSorted(Slot, null, { name: "center" }, null, 3, "03_3"), 0, null),
|
|
54
|
+
/*#__PURE__*/ _jsxSplit("div", { ..._rawProps.innerProps }, { class: "flex flex-1 items-center justify-end gap-2 py-2" }, [/*#__PURE__*/ _jsxSorted(Slot, null, { name: "end" }, null, 3, "03_4"), !_rawProps.nohamburger && /*#__PURE__*/ _jsxSorted("button", {
|
|
55
|
+
"q-e:click": /*#__PURE__*/ inlinedQrl((_, _1, _rawProps, menu) => {
|
|
52
56
|
menu.value = !menu.value;
|
|
53
57
|
if (_rawProps.nodismiss) return;
|
|
54
58
|
function onClick(e) {
|
|
@@ -61,14 +65,14 @@ var Nav = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((_rawProps) =>
|
|
|
61
65
|
menu.value = false;
|
|
62
66
|
}
|
|
63
67
|
if (menu.value) window.addEventListener("click", onClick);
|
|
64
|
-
}, "
|
|
68
|
+
}, "Nav_component_nav_div_div_button_q_e_click_Dv3Y0bHaG0E"),
|
|
65
69
|
"q:ps": [_rawProps, menu]
|
|
66
70
|
}, {
|
|
67
71
|
name: "Navigation Menu",
|
|
68
72
|
title: "Navigation Menu",
|
|
69
|
-
class: _fnSignal(
|
|
70
|
-
},
|
|
71
|
-
],
|
|
73
|
+
class: _fnSignal(_hf1, [menu])
|
|
74
|
+
}, /*#__PURE__*/ _jsxSorted(Menu, null, { size: 24 }, null, 3, "03_5"), 4, "03_6")], 0, null)
|
|
75
|
+
], 0, null)], 0, "03_7");
|
|
72
76
|
}, "Nav_component_GVA94DyavJM"));
|
|
73
77
|
//#endregion
|
|
74
78
|
export { Nav };
|
|
@@ -7,16 +7,17 @@ var _hf0 = (p0, p1) => p1.min ? (p0.value ?? 0) <= p1.min : false;
|
|
|
7
7
|
var _hf1 = (p0) => p0.value ?? 0;
|
|
8
8
|
var _hf2 = (p0) => p0.step ?? 1;
|
|
9
9
|
var _hf3 = (p0, p1) => p1.max ? (p0.value ?? 0) >= p1.max : false;
|
|
10
|
-
var NumberInput =
|
|
10
|
+
var NumberInput = /*#__PURE__*/ (0, _qwik_dev_core.componentQrl)(/*#__PURE__*/ (0, _qwik_dev_core.inlinedQrl)((_rawProps) => {
|
|
11
11
|
const props = (0, _qwik_dev_core._restProps)(_rawProps, [
|
|
12
12
|
"input",
|
|
13
13
|
"class",
|
|
14
14
|
"onDecrement$",
|
|
15
15
|
"onIncrement$",
|
|
16
16
|
"value",
|
|
17
|
-
"step"
|
|
17
|
+
"step",
|
|
18
|
+
"outerProps"
|
|
18
19
|
]);
|
|
19
|
-
(0, _qwik_dev_core.useStylesQrl)(
|
|
20
|
+
(0, _qwik_dev_core.useStylesQrl)(/*#__PURE__*/ (0, _qwik_dev_core.inlinedQrl)(`
|
|
20
21
|
input::-webkit-outer-spin-button,
|
|
21
22
|
input::-webkit-inner-spin-button {
|
|
22
23
|
-webkit-appearance: none;
|
|
@@ -26,22 +27,21 @@ var NumberInput = /* @__PURE__ */ (0, _qwik_dev_core.componentQrl)(/* @__PURE__
|
|
|
26
27
|
-moz-appearance: textfield;
|
|
27
28
|
}
|
|
28
29
|
`, "NumberInput_component_useStyles_9gV0k9qgkUU"));
|
|
29
|
-
return
|
|
30
|
-
|
|
30
|
+
return /*#__PURE__*/ (0, _qwik_dev_core._jsxSplit)("div", { ..._rawProps.outerProps }, { class: { "flex touch-manipulation gap-1 text-lum-text": true } }, [
|
|
31
|
+
/*#__PURE__*/ (0, _qwik_dev_core._jsxSorted)("button", {
|
|
31
32
|
disabled: (0, _qwik_dev_core._fnSignal)(_hf0, [_rawProps, props]),
|
|
32
|
-
"q-e:click": _rawProps.
|
|
33
|
-
const _rawProps = _qwik_dev_core._captures[0];
|
|
33
|
+
"q-e:click": _rawProps.onDecrement$ ?? /*#__PURE__*/ (0, _qwik_dev_core.inlinedQrl)((event, element) => {
|
|
34
34
|
const siblingInput = element.nextElementSibling;
|
|
35
35
|
siblingInput.stepDown();
|
|
36
|
-
|
|
37
|
-
}, "NumberInput_component_div_button_q_e_click_x56P4mcwT0M"
|
|
36
|
+
siblingInput.dispatchEvent(new Event("input", { bubbles: true }));
|
|
37
|
+
}, "NumberInput_component_div_button_q_e_click_x56P4mcwT0M")
|
|
38
38
|
}, {
|
|
39
39
|
type: "button",
|
|
40
40
|
class: { "lum-btn p-2 rounded-r-sm": true },
|
|
41
41
|
"data-action": "decrement",
|
|
42
42
|
"aria-label": "Decrement"
|
|
43
|
-
},
|
|
44
|
-
_rawProps.input &&
|
|
43
|
+
}, /*#__PURE__*/ (0, _qwik_dev_core._jsxSorted)(require_Minus.Minus, null, { size: 20 }, null, 3, "kR_0"), 0, null),
|
|
44
|
+
_rawProps.input && /*#__PURE__*/ (0, _qwik_dev_core._jsxSplit)("input", {
|
|
45
45
|
...(0, _qwik_dev_core._getVarProps)(props),
|
|
46
46
|
...(0, _qwik_dev_core._getConstProps)(props),
|
|
47
47
|
value: (0, _qwik_dev_core._fnSignal)(_hf1, [_rawProps]),
|
|
@@ -49,23 +49,31 @@ var NumberInput = /* @__PURE__ */ (0, _qwik_dev_core.componentQrl)(/* @__PURE__
|
|
|
49
49
|
class: {
|
|
50
50
|
"lum-input text-center rounded-sm lum-input-p-1": true,
|
|
51
51
|
...require_functions.getClassObject(_rawProps.class)
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
},
|
|
53
|
+
"q-e:wheel": /*#__PURE__*/ (0, _qwik_dev_core.inlinedQrl)((e) => {
|
|
54
|
+
const inputElement = e.target;
|
|
55
|
+
if (e.deltaY < 0) inputElement.stepUp();
|
|
56
|
+
else inputElement.stepDown();
|
|
57
|
+
inputElement.dispatchEvent(new Event("input", { bubbles: true }));
|
|
58
|
+
}, "NumberInput_component_div_input_q_e_wheel_S1w7D4DnPK4")
|
|
59
|
+
}, {
|
|
60
|
+
type: "number",
|
|
61
|
+
"preventdefault:wheel": true
|
|
62
|
+
}, null, 0, "kR_1"),
|
|
63
|
+
/*#__PURE__*/ (0, _qwik_dev_core._jsxSorted)("button", {
|
|
55
64
|
disabled: (0, _qwik_dev_core._fnSignal)(_hf3, [_rawProps, props]),
|
|
56
|
-
"q-e:click": _rawProps.
|
|
57
|
-
const _rawProps = _qwik_dev_core._captures[0];
|
|
65
|
+
"q-e:click": _rawProps.onIncrement$ ?? /*#__PURE__*/ (0, _qwik_dev_core.inlinedQrl)((event, element) => {
|
|
58
66
|
const siblingInput = element.previousElementSibling;
|
|
59
67
|
siblingInput.stepUp();
|
|
60
|
-
|
|
61
|
-
}, "NumberInput_component_div_button_q_e_click_1_oHOVxz0RzY0"
|
|
68
|
+
siblingInput.dispatchEvent(new Event("input", { bubbles: true }));
|
|
69
|
+
}, "NumberInput_component_div_button_q_e_click_1_oHOVxz0RzY0")
|
|
62
70
|
}, {
|
|
63
71
|
type: "button",
|
|
64
72
|
class: { "lum-btn p-2 rounded-l-sm": true },
|
|
65
73
|
"data-action": "increment",
|
|
66
74
|
"aria-label": "Increment"
|
|
67
|
-
},
|
|
68
|
-
],
|
|
75
|
+
}, /*#__PURE__*/ (0, _qwik_dev_core._jsxSorted)(require_Plus.Plus, null, { size: 20 }, null, 3, "kR_2"), 0, null)
|
|
76
|
+
], 0, "kR_3");
|
|
69
77
|
}, "NumberInput_component_2YJwSaeO64g"));
|
|
70
78
|
//#endregion
|
|
71
79
|
exports.NumberInput = NumberInput;
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import { getClassObject } from "../functions.qwik.mjs";
|
|
2
2
|
import { Plus } from "../../svg/Plus.qwik.mjs";
|
|
3
3
|
import { Minus } from "../../svg/Minus.qwik.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { _fnSignal, _getConstProps, _getVarProps, _jsxSorted, _jsxSplit, _restProps, componentQrl, inlinedQrl, useStylesQrl } from "@qwik.dev/core";
|
|
5
5
|
//#region src/components/elements/NumberInput.tsx
|
|
6
6
|
var _hf0 = (p0, p1) => p1.min ? (p0.value ?? 0) <= p1.min : false;
|
|
7
7
|
var _hf1 = (p0) => p0.value ?? 0;
|
|
8
8
|
var _hf2 = (p0) => p0.step ?? 1;
|
|
9
9
|
var _hf3 = (p0, p1) => p1.max ? (p0.value ?? 0) >= p1.max : false;
|
|
10
|
-
var NumberInput =
|
|
10
|
+
var NumberInput = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl((_rawProps) => {
|
|
11
11
|
const props = _restProps(_rawProps, [
|
|
12
12
|
"input",
|
|
13
13
|
"class",
|
|
14
14
|
"onDecrement$",
|
|
15
15
|
"onIncrement$",
|
|
16
16
|
"value",
|
|
17
|
-
"step"
|
|
17
|
+
"step",
|
|
18
|
+
"outerProps"
|
|
18
19
|
]);
|
|
19
|
-
useStylesQrl(
|
|
20
|
+
useStylesQrl(/*#__PURE__*/ inlinedQrl(`
|
|
20
21
|
input::-webkit-outer-spin-button,
|
|
21
22
|
input::-webkit-inner-spin-button {
|
|
22
23
|
-webkit-appearance: none;
|
|
@@ -26,22 +27,21 @@ var NumberInput = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((_rawP
|
|
|
26
27
|
-moz-appearance: textfield;
|
|
27
28
|
}
|
|
28
29
|
`, "NumberInput_component_useStyles_9gV0k9qgkUU"));
|
|
29
|
-
return
|
|
30
|
-
|
|
30
|
+
return /*#__PURE__*/ _jsxSplit("div", { ..._rawProps.outerProps }, { class: { "flex touch-manipulation gap-1 text-lum-text": true } }, [
|
|
31
|
+
/*#__PURE__*/ _jsxSorted("button", {
|
|
31
32
|
disabled: _fnSignal(_hf0, [_rawProps, props]),
|
|
32
|
-
"q-e:click": _rawProps.
|
|
33
|
-
const _rawProps = _captures[0];
|
|
33
|
+
"q-e:click": _rawProps.onDecrement$ ?? /*#__PURE__*/ inlinedQrl((event, element) => {
|
|
34
34
|
const siblingInput = element.nextElementSibling;
|
|
35
35
|
siblingInput.stepDown();
|
|
36
|
-
|
|
37
|
-
}, "NumberInput_component_div_button_q_e_click_x56P4mcwT0M"
|
|
36
|
+
siblingInput.dispatchEvent(new Event("input", { bubbles: true }));
|
|
37
|
+
}, "NumberInput_component_div_button_q_e_click_x56P4mcwT0M")
|
|
38
38
|
}, {
|
|
39
39
|
type: "button",
|
|
40
40
|
class: { "lum-btn p-2 rounded-r-sm": true },
|
|
41
41
|
"data-action": "decrement",
|
|
42
42
|
"aria-label": "Decrement"
|
|
43
|
-
},
|
|
44
|
-
_rawProps.input &&
|
|
43
|
+
}, /*#__PURE__*/ _jsxSorted(Minus, null, { size: 20 }, null, 3, "kR_0"), 0, null),
|
|
44
|
+
_rawProps.input && /*#__PURE__*/ _jsxSplit("input", {
|
|
45
45
|
..._getVarProps(props),
|
|
46
46
|
..._getConstProps(props),
|
|
47
47
|
value: _fnSignal(_hf1, [_rawProps]),
|
|
@@ -49,23 +49,31 @@ var NumberInput = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((_rawP
|
|
|
49
49
|
class: {
|
|
50
50
|
"lum-input text-center rounded-sm lum-input-p-1": true,
|
|
51
51
|
...getClassObject(_rawProps.class)
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
},
|
|
53
|
+
"q-e:wheel": /*#__PURE__*/ inlinedQrl((e) => {
|
|
54
|
+
const inputElement = e.target;
|
|
55
|
+
if (e.deltaY < 0) inputElement.stepUp();
|
|
56
|
+
else inputElement.stepDown();
|
|
57
|
+
inputElement.dispatchEvent(new Event("input", { bubbles: true }));
|
|
58
|
+
}, "NumberInput_component_div_input_q_e_wheel_S1w7D4DnPK4")
|
|
59
|
+
}, {
|
|
60
|
+
type: "number",
|
|
61
|
+
"preventdefault:wheel": true
|
|
62
|
+
}, null, 0, "kR_1"),
|
|
63
|
+
/*#__PURE__*/ _jsxSorted("button", {
|
|
55
64
|
disabled: _fnSignal(_hf3, [_rawProps, props]),
|
|
56
|
-
"q-e:click": _rawProps.
|
|
57
|
-
const _rawProps = _captures[0];
|
|
65
|
+
"q-e:click": _rawProps.onIncrement$ ?? /*#__PURE__*/ inlinedQrl((event, element) => {
|
|
58
66
|
const siblingInput = element.previousElementSibling;
|
|
59
67
|
siblingInput.stepUp();
|
|
60
|
-
|
|
61
|
-
}, "NumberInput_component_div_button_q_e_click_1_oHOVxz0RzY0"
|
|
68
|
+
siblingInput.dispatchEvent(new Event("input", { bubbles: true }));
|
|
69
|
+
}, "NumberInput_component_div_button_q_e_click_1_oHOVxz0RzY0")
|
|
62
70
|
}, {
|
|
63
71
|
type: "button",
|
|
64
72
|
class: { "lum-btn p-2 rounded-l-sm": true },
|
|
65
73
|
"data-action": "increment",
|
|
66
74
|
"aria-label": "Increment"
|
|
67
|
-
},
|
|
68
|
-
],
|
|
75
|
+
}, /*#__PURE__*/ _jsxSorted(Plus, null, { size: 20 }, null, 3, "kR_2"), 0, null)
|
|
76
|
+
], 0, "kR_3");
|
|
69
77
|
}, "NumberInput_component_2YJwSaeO64g"));
|
|
70
78
|
//#endregion
|
|
71
79
|
export { NumberInput };
|
|
@@ -4,37 +4,38 @@ var _hf0 = (p0) => ({ width: `${p0.value}%` });
|
|
|
4
4
|
var _hf1 = (p0) => ({ left: `calc(${p0.value}% - 0.5rem)` });
|
|
5
5
|
var _hf2 = (p0) => p0.min ?? 0;
|
|
6
6
|
var _hf3 = (p0) => p0.max ?? 10;
|
|
7
|
-
var RangeInput =
|
|
7
|
+
var RangeInput = /*#__PURE__*/ (0, _qwik_dev_core.componentQrl)(/*#__PURE__*/ (0, _qwik_dev_core.inlinedQrl)((_rawProps) => {
|
|
8
8
|
const props = (0, _qwik_dev_core._restProps)(_rawProps, [
|
|
9
9
|
"value",
|
|
10
10
|
"min",
|
|
11
11
|
"max",
|
|
12
|
-
"onInput$"
|
|
12
|
+
"onInput$",
|
|
13
|
+
"outerProps"
|
|
13
14
|
]);
|
|
14
15
|
const valueSignal = (0, _qwik_dev_core.useSignal)(_rawProps.value ?? _rawProps.min ?? 0);
|
|
15
|
-
const filledPercentage = (0, _qwik_dev_core.useComputedQrl)(
|
|
16
|
+
const filledPercentage = (0, _qwik_dev_core.useComputedQrl)(/*#__PURE__*/ (0, _qwik_dev_core.inlinedQrl)(() => {
|
|
16
17
|
const _rawProps = _qwik_dev_core._captures[0];
|
|
17
18
|
return (_qwik_dev_core._captures[1].value - (_rawProps.min ?? 0)) / ((_rawProps.max ?? 10) - (_rawProps.min ?? 0)) * 100;
|
|
18
19
|
}, "RangeInput_component_filledPercentage_useComputed_Vta9t9J9C4k", [_rawProps, valueSignal]));
|
|
19
20
|
const tickCount = (_rawProps.max ?? 10) - (_rawProps.min ?? 0) - 1;
|
|
20
|
-
return
|
|
21
|
-
|
|
22
|
-
return
|
|
21
|
+
return /*#__PURE__*/ (0, _qwik_dev_core._jsxSplit)("div", { ..._rawProps.outerProps }, { class: { "group relative flex touch-manipulation gap-1 text-lum-text lum-input p-0": true } }, [
|
|
22
|
+
/*#__PURE__*/ (0, _qwik_dev_core._jsxSorted)("div", null, { class: "absolute w-full flex justify-evenly" }, tickCount > 0 && [...Array(tickCount)].map((_, i) => {
|
|
23
|
+
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);
|
|
23
24
|
}), 1, null),
|
|
24
|
-
|
|
25
|
+
/*#__PURE__*/ (0, _qwik_dev_core._jsxSorted)("div", null, {
|
|
25
26
|
class: "h-2 lum-bg-lum-accent group-hover:lum-bg-lum-accent rounded-lum",
|
|
26
27
|
style: (0, _qwik_dev_core._fnSignal)(_hf0, [filledPercentage])
|
|
27
28
|
}, null, 3, null),
|
|
28
|
-
|
|
29
|
+
/*#__PURE__*/ (0, _qwik_dev_core._jsxSorted)("div", null, {
|
|
29
30
|
class: "absolute -top-1 flex flex-col gap-4 items-center",
|
|
30
31
|
style: (0, _qwik_dev_core._fnSignal)(_hf1, [filledPercentage])
|
|
31
|
-
}, [
|
|
32
|
-
|
|
32
|
+
}, [/*#__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),
|
|
33
|
+
/*#__PURE__*/ (0, _qwik_dev_core._jsxSplit)("input", {
|
|
33
34
|
...(0, _qwik_dev_core._getVarProps)(props),
|
|
34
35
|
...(0, _qwik_dev_core._getConstProps)(props),
|
|
35
36
|
min: (0, _qwik_dev_core._fnSignal)(_hf2, [_rawProps]),
|
|
36
37
|
max: (0, _qwik_dev_core._fnSignal)(_hf3, [_rawProps]),
|
|
37
|
-
"q-e:input":
|
|
38
|
+
"q-e:input": /*#__PURE__*/ (0, _qwik_dev_core.inlinedQrl)(async (event, element, _rawProps, valueSignal) => {
|
|
38
39
|
valueSignal.value = parseFloat(element.value);
|
|
39
40
|
if (_rawProps.onInput$) await _rawProps.onInput$(event, element);
|
|
40
41
|
}, "RangeInput_component_div_input_q_e_input_0hUtvpnN79M"),
|
|
@@ -44,7 +45,7 @@ var RangeInput = /* @__PURE__ */ (0, _qwik_dev_core.componentQrl)(/* @__PURE__ *
|
|
|
44
45
|
value: (0, _qwik_dev_core._wrapProp)(valueSignal),
|
|
45
46
|
class: "absolute top-0 h-2 w-full opacity-0 cursor-pointer"
|
|
46
47
|
}, null, 4, null)
|
|
47
|
-
],
|
|
48
|
+
], 0, "Wb_0");
|
|
48
49
|
}, "RangeInput_component_wN5xjLYsT00"));
|
|
49
50
|
//#endregion
|
|
50
51
|
exports.RangeInput = RangeInput;
|
|
@@ -4,37 +4,38 @@ var _hf0 = (p0) => ({ width: `${p0.value}%` });
|
|
|
4
4
|
var _hf1 = (p0) => ({ left: `calc(${p0.value}% - 0.5rem)` });
|
|
5
5
|
var _hf2 = (p0) => p0.min ?? 0;
|
|
6
6
|
var _hf3 = (p0) => p0.max ?? 10;
|
|
7
|
-
var RangeInput =
|
|
7
|
+
var RangeInput = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl((_rawProps) => {
|
|
8
8
|
const props = _restProps(_rawProps, [
|
|
9
9
|
"value",
|
|
10
10
|
"min",
|
|
11
11
|
"max",
|
|
12
|
-
"onInput$"
|
|
12
|
+
"onInput$",
|
|
13
|
+
"outerProps"
|
|
13
14
|
]);
|
|
14
15
|
const valueSignal = useSignal(_rawProps.value ?? _rawProps.min ?? 0);
|
|
15
|
-
const filledPercentage = useComputedQrl(
|
|
16
|
+
const filledPercentage = useComputedQrl(/*#__PURE__*/ inlinedQrl(() => {
|
|
16
17
|
const _rawProps = _captures[0];
|
|
17
18
|
return (_captures[1].value - (_rawProps.min ?? 0)) / ((_rawProps.max ?? 10) - (_rawProps.min ?? 0)) * 100;
|
|
18
19
|
}, "RangeInput_component_filledPercentage_useComputed_Vta9t9J9C4k", [_rawProps, valueSignal]));
|
|
19
20
|
const tickCount = (_rawProps.max ?? 10) - (_rawProps.min ?? 0) - 1;
|
|
20
|
-
return
|
|
21
|
-
|
|
22
|
-
return
|
|
21
|
+
return /*#__PURE__*/ _jsxSplit("div", { ..._rawProps.outerProps }, { class: { "group relative flex touch-manipulation gap-1 text-lum-text lum-input p-0": true } }, [
|
|
22
|
+
/*#__PURE__*/ _jsxSorted("div", null, { class: "absolute w-full flex justify-evenly" }, tickCount > 0 && [...Array(tickCount)].map((_, i) => {
|
|
23
|
+
return /*#__PURE__*/ _jsxSorted("div", null, { class: "border-l border-l-lum-border/20 h-1 my-0.5" }, null, 3, i);
|
|
23
24
|
}), 1, null),
|
|
24
|
-
|
|
25
|
+
/*#__PURE__*/ _jsxSorted("div", null, {
|
|
25
26
|
class: "h-2 lum-bg-lum-accent group-hover:lum-bg-lum-accent rounded-lum",
|
|
26
27
|
style: _fnSignal(_hf0, [filledPercentage])
|
|
27
28
|
}, null, 3, null),
|
|
28
|
-
|
|
29
|
+
/*#__PURE__*/ _jsxSorted("div", null, {
|
|
29
30
|
class: "absolute -top-1 flex flex-col gap-4 items-center",
|
|
30
31
|
style: _fnSignal(_hf1, [filledPercentage])
|
|
31
|
-
}, [
|
|
32
|
-
|
|
32
|
+
}, [/*#__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),
|
|
33
|
+
/*#__PURE__*/ _jsxSplit("input", {
|
|
33
34
|
..._getVarProps(props),
|
|
34
35
|
..._getConstProps(props),
|
|
35
36
|
min: _fnSignal(_hf2, [_rawProps]),
|
|
36
37
|
max: _fnSignal(_hf3, [_rawProps]),
|
|
37
|
-
"q-e:input":
|
|
38
|
+
"q-e:input": /*#__PURE__*/ inlinedQrl(async (event, element, _rawProps, valueSignal) => {
|
|
38
39
|
valueSignal.value = parseFloat(element.value);
|
|
39
40
|
if (_rawProps.onInput$) await _rawProps.onInput$(event, element);
|
|
40
41
|
}, "RangeInput_component_div_input_q_e_input_0hUtvpnN79M"),
|
|
@@ -44,7 +45,7 @@ var RangeInput = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((_rawPr
|
|
|
44
45
|
value: _wrapProp(valueSignal),
|
|
45
46
|
class: "absolute top-0 h-2 w-full opacity-0 cursor-pointer"
|
|
46
47
|
}, null, 4, null)
|
|
47
|
-
],
|
|
48
|
+
], 0, "Wb_0");
|
|
48
49
|
}, "RangeInput_component_wN5xjLYsT00"));
|
|
49
50
|
//#endregion
|
|
50
51
|
export { RangeInput };
|
|
@@ -12,6 +12,7 @@ interface SelectMenuProps extends Omit<PropsOf<'select'>, 'onChange$'> {
|
|
|
12
12
|
name: JSXChildren;
|
|
13
13
|
value: string | number;
|
|
14
14
|
}[];
|
|
15
|
+
outerProps?: PropsOf<'div'>;
|
|
15
16
|
}
|
|
16
17
|
export declare const SelectMenu: import("@qwik.dev/core").Component<SelectMenuProps>;
|
|
17
18
|
export {};
|