@luminescent/ui-qwik 7.0.0-0 → 7.0.0-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/components/docs/Anchor.d.ts +1 -2
- package/lib/components/docs/Blobs.d.ts +1 -2
- package/lib/components/docs/ColorPicker.d.ts +1 -2
- package/lib/components/docs/Dropdown.d.ts +1 -2
- package/lib/components/docs/Label.d.ts +1 -2
- package/lib/components/docs/LumBtn.d.ts +3 -0
- package/lib/components/docs/LumCard.d.ts +3 -0
- package/lib/components/docs/LumClasses.d.ts +3 -0
- package/lib/components/docs/LumInput.d.ts +3 -0
- package/lib/components/docs/Nav.d.ts +1 -2
- package/lib/components/docs/NumberInput.d.ts +1 -2
- package/lib/components/docs/RangeInput.d.ts +1 -2
- package/lib/components/docs/SelectMenu.d.ts +1 -2
- package/lib/components/docs/Settings.d.ts +1 -2
- package/lib/components/docs/Sidebar.d.ts +1 -2
- package/lib/components/docs/Toggle.d.ts +1 -2
- package/lib/components/docs/index.d.ts +16 -0
- package/lib/components/elements/Anchor.qwik.cjs +19 -16
- package/lib/components/elements/Anchor.qwik.mjs +20 -17
- package/lib/components/elements/Blobs.qwik.cjs +23 -18
- package/lib/components/elements/Blobs.qwik.mjs +24 -19
- package/lib/components/elements/ColorPicker.qwik.cjs +50 -51
- package/lib/components/elements/ColorPicker.qwik.mjs +50 -51
- package/lib/components/elements/Dropdown.qwik.cjs +9 -4
- package/lib/components/elements/Dropdown.qwik.mjs +10 -5
- package/lib/components/elements/Nav.qwik.cjs +46 -36
- package/lib/components/elements/Nav.qwik.mjs +47 -37
- package/lib/components/elements/NumberInput.qwik.cjs +27 -17
- package/lib/components/elements/NumberInput.qwik.mjs +28 -18
- package/lib/components/elements/RangeInput.qwik.cjs +19 -15
- package/lib/components/elements/RangeInput.qwik.mjs +20 -16
- package/lib/components/elements/SelectMenu.qwik.cjs +37 -29
- package/lib/components/elements/SelectMenu.qwik.mjs +38 -30
- package/lib/components/elements/Sidebar.qwik.cjs +5 -4
- package/lib/components/elements/Sidebar.qwik.mjs +6 -5
- package/lib/components/elements/Toggle.qwik.cjs +11 -6
- package/lib/components/elements/Toggle.qwik.mjs +12 -7
- package/lib/q-manifest.json +35 -35
- package/lib/svg/ChevronDown.qwik.cjs +4 -3
- package/lib/svg/ChevronDown.qwik.mjs +5 -4
- package/lib/svg/Link.qwik.cjs +4 -3
- package/lib/svg/Link.qwik.mjs +5 -4
- package/lib/svg/Menu.qwik.cjs +4 -3
- package/lib/svg/Menu.qwik.mjs +5 -4
- package/lib/svg/Minus.qwik.cjs +4 -3
- package/lib/svg/Minus.qwik.mjs +5 -4
- package/lib/svg/Plus.qwik.cjs +4 -3
- package/lib/svg/Plus.qwik.mjs +5 -4
- package/lib/svg/Shuffle.qwik.cjs +4 -3
- package/lib/svg/Shuffle.qwik.mjs +5 -4
- package/package.json +9 -10
- package/lib/components/docs/lum-btn.d.ts +0 -4
- package/lib/components/docs/lum-card.d.ts +0 -4
- package/lib/components/docs/lum-classes.d.ts +0 -4
- package/lib/components/docs/lum-input.d.ts +0 -4
|
@@ -18,26 +18,10 @@ var _hf5 = (p0, p1) => ({
|
|
|
18
18
|
"lum-btn rounded-sm h-[1.6rem] w-[1.6rem] p-0 lum-bg hover:brightness-150": true,
|
|
19
19
|
"border-lum-accent": p0 === p1.value
|
|
20
20
|
});
|
|
21
|
-
var ColorPicker = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"#
|
|
25
|
-
"#DBCDF0",
|
|
26
|
-
"#F2C6DE",
|
|
27
|
-
"#FCD05C",
|
|
28
|
-
"#5FE2C5",
|
|
29
|
-
"#4498DB",
|
|
30
|
-
"#9863E7",
|
|
31
|
-
"#E43A96",
|
|
32
|
-
"#000000",
|
|
33
|
-
"#555555",
|
|
34
|
-
"#AAAAAA",
|
|
35
|
-
"#FFFFFF"
|
|
36
|
-
], onInput$, preview = "left", horizontal, showInput = true, opacity }) => {
|
|
37
|
-
const height = 150;
|
|
38
|
-
const width = height - 25;
|
|
39
|
-
const maxHue = height - 2;
|
|
40
|
-
const hsvColor = rgbToHsv(hexToRgba(value));
|
|
21
|
+
var ColorPicker = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((_rawProps) => {
|
|
22
|
+
const width = 125;
|
|
23
|
+
const maxHue = 148;
|
|
24
|
+
const hsvColor = rgbToHsv(hexToRgba(_rawProps.value ?? "#000000"));
|
|
41
25
|
const store = useStore({
|
|
42
26
|
hue: {
|
|
43
27
|
position: hsvColor.h * maxHue,
|
|
@@ -50,10 +34,10 @@ var ColorPicker = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(({ id,
|
|
|
50
34
|
opacity: { position: hsvColor.a !== void 0 ? (1 - hsvColor.a) * maxHue : 0 },
|
|
51
35
|
bPosition: (1 - hsvColor.v) * maxHue,
|
|
52
36
|
sPosition: hsvColor.s * width,
|
|
53
|
-
value
|
|
37
|
+
value: _rawProps.value ?? "#000000"
|
|
54
38
|
});
|
|
55
39
|
const setColor = /* @__PURE__ */ inlinedQrl(async (color) => {
|
|
56
|
-
const
|
|
40
|
+
const _rawProps = _captures[0], maxHue = _captures[1], store = _captures[2], width = _captures[3];
|
|
57
41
|
if (!/^#[0-9a-f]{0,8}$/i.test(color)) return;
|
|
58
42
|
const hsv = rgbToHsv(hexToRgba(color));
|
|
59
43
|
store.hue.position = hsv.h * maxHue;
|
|
@@ -66,10 +50,10 @@ var ColorPicker = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(({ id,
|
|
|
66
50
|
store.sPosition = hsv.s * width;
|
|
67
51
|
store.bPosition = (1 - hsv.v) * maxHue;
|
|
68
52
|
store.value = color;
|
|
69
|
-
await onInput$?.(store.value);
|
|
53
|
+
await _rawProps.onInput$?.(store.value);
|
|
70
54
|
}, "ColorPicker_component_setColor_m9tT2MF9iI8", [
|
|
55
|
+
_rawProps,
|
|
71
56
|
maxHue,
|
|
72
|
-
onInput$,
|
|
73
57
|
store,
|
|
74
58
|
width
|
|
75
59
|
]);
|
|
@@ -89,7 +73,7 @@ var ColorPicker = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(({ id,
|
|
|
89
73
|
window.addEventListener("mouseup", mouseUpListener);
|
|
90
74
|
window.addEventListener("touchend", mouseUpListener);
|
|
91
75
|
}, "ColorPicker_component_hueMouseDown_cw08gCPBKtw", [/* @__PURE__ */ inlinedQrl(async (e, hOffset) => {
|
|
92
|
-
const
|
|
76
|
+
const _rawProps = _captures[0], maxHue = _captures[1], store = _captures[2];
|
|
93
77
|
const { y } = getMousePosition(e);
|
|
94
78
|
store.hue.position = clamp(maxHue - (y - hOffset), 0, maxHue);
|
|
95
79
|
const hsvColor = rgbToHsv(hexToRgba(store.value));
|
|
@@ -102,10 +86,10 @@ var ColorPicker = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(({ id,
|
|
|
102
86
|
a: hsvColor.a
|
|
103
87
|
}));
|
|
104
88
|
store.value = rgbToHex(hsvToRgb(hsvColor));
|
|
105
|
-
await onInput$?.(store.value);
|
|
89
|
+
await _rawProps.onInput$?.(store.value);
|
|
106
90
|
}, "ColorPicker_component_hueChange_c0i9qwof0Yw", [
|
|
91
|
+
_rawProps,
|
|
107
92
|
maxHue,
|
|
108
|
-
onInput$,
|
|
109
93
|
store
|
|
110
94
|
])]);
|
|
111
95
|
const sbMouseDown = /* @__PURE__ */ inlinedQrl(async (e, el) => {
|
|
@@ -124,7 +108,7 @@ var ColorPicker = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(({ id,
|
|
|
124
108
|
window.addEventListener("mouseup", mouseUpListener);
|
|
125
109
|
window.addEventListener("touchend", mouseUpListener);
|
|
126
110
|
}, "ColorPicker_component_sbMouseDown_Vor71dUNt7g", [/* @__PURE__ */ inlinedQrl(async (e, hOffset) => {
|
|
127
|
-
const
|
|
111
|
+
const _rawProps = _captures[0], maxHue = _captures[1], store = _captures[2], width = _captures[3];
|
|
128
112
|
const { x, y } = getMousePosition(e);
|
|
129
113
|
store.bPosition = clamp(y - hOffset.top, 0, maxHue);
|
|
130
114
|
store.sPosition = clamp(x - hOffset.left, 0, width);
|
|
@@ -136,10 +120,10 @@ var ColorPicker = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(({ id,
|
|
|
136
120
|
v,
|
|
137
121
|
a: store.opacity.position !== void 0 ? 1 - store.opacity.position / maxHue : 1
|
|
138
122
|
}));
|
|
139
|
-
await onInput$?.(store.value);
|
|
123
|
+
await _rawProps.onInput$?.(store.value);
|
|
140
124
|
}, "ColorPicker_component_sbChange_NwrBaY0ccx0", [
|
|
125
|
+
_rawProps,
|
|
141
126
|
maxHue,
|
|
142
|
-
onInput$,
|
|
143
127
|
store,
|
|
144
128
|
width
|
|
145
129
|
])]);
|
|
@@ -159,26 +143,26 @@ var ColorPicker = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(({ id,
|
|
|
159
143
|
window.addEventListener("mouseup", mouseUpListener);
|
|
160
144
|
window.addEventListener("touchend", mouseUpListener);
|
|
161
145
|
}, "ColorPicker_component_opacityMouseDown_U0p127RN2e0", [/* @__PURE__ */ inlinedQrl(async (e, hOffset) => {
|
|
162
|
-
const
|
|
146
|
+
const _rawProps = _captures[0], maxHue = _captures[1], store = _captures[2];
|
|
163
147
|
const { x } = getMousePosition(e);
|
|
164
148
|
store.opacity.position = clamp(x - hOffset.left, 0, maxHue);
|
|
165
149
|
const a = 1 - store.opacity.position / maxHue;
|
|
166
150
|
const hsvColor = rgbToHsv(hexToRgba(store.value));
|
|
167
151
|
hsvColor.a = a;
|
|
168
152
|
store.value = rgbToHex(hsvToRgb(hsvColor));
|
|
169
|
-
await onInput$?.(store.value);
|
|
153
|
+
await _rawProps.onInput$?.(store.value);
|
|
170
154
|
}, "ColorPicker_component_opacityChange_WBZtDRHmnMU", [
|
|
155
|
+
_rawProps,
|
|
171
156
|
maxHue,
|
|
172
|
-
onInput$,
|
|
173
157
|
store
|
|
174
158
|
])]);
|
|
175
159
|
return /* @__PURE__ */ _jsxSorted("div", {
|
|
176
160
|
class: {
|
|
177
161
|
"lum-card touch-none p-4": true,
|
|
178
|
-
"flex-col": !horizontal,
|
|
179
|
-
...getClassObject(
|
|
162
|
+
"flex-col": !_rawProps.horizontal,
|
|
163
|
+
...getClassObject(_rawProps.class)
|
|
180
164
|
},
|
|
181
|
-
id,
|
|
165
|
+
id: _wrapProp(_rawProps, "id"),
|
|
182
166
|
"q-e:input": /* @__PURE__ */ inlinedQrl(async (e, el, setColor) => {
|
|
183
167
|
if (!el.dataset.value) return;
|
|
184
168
|
await setColor(el.dataset.value);
|
|
@@ -206,7 +190,7 @@ var ColorPicker = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(({ id,
|
|
|
206
190
|
class: "absolute -bottom-2 -left-1.25 h-4 w-4 rounded-md lum-bg! bg-[#ff0000] ",
|
|
207
191
|
style: _fnSignal(_hf2, [store])
|
|
208
192
|
}, null, 3, null), 3, null)], 3, null),
|
|
209
|
-
opacity && /* @__PURE__ */ _jsxSorted("div", null, {
|
|
193
|
+
_rawProps.opacity && /* @__PURE__ */ _jsxSorted("div", null, {
|
|
210
194
|
class: "relative h-2 w-full rounded-md",
|
|
211
195
|
"q-e:mousedown": opacityMouseDown,
|
|
212
196
|
"q-e:touchstart": opacityMouseDown,
|
|
@@ -239,34 +223,49 @@ var ColorPicker = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(({ id,
|
|
|
239
223
|
backgroundPosition: "0 0, 4px 0, 4px -4px, 0 4px"
|
|
240
224
|
} }, { class: "absolute -bottom-1.25 -left-1.25 h-4 w-4 rounded-md" }, null, 3, null)], 1, "Xr_0"),
|
|
241
225
|
/* @__PURE__ */ _jsxSorted("div", null, { class: "flex w-37.5 flex-wrap justify-between gap-1" }, [
|
|
242
|
-
showInput && /* @__PURE__ */ _jsxSorted("div", { class: {
|
|
226
|
+
(_rawProps.showInput ?? true) && /* @__PURE__ */ _jsxSorted("div", { class: {
|
|
243
227
|
"mb-2 flex w-37.5 border-b border-b-gray-700 pb-3": true,
|
|
244
|
-
"flex-row gap-1": preview == "left",
|
|
245
|
-
"flex-row-reverse gap-1": preview == "right",
|
|
246
|
-
"flex-col": preview == "top",
|
|
247
|
-
"flex-col-reverse": preview == "bottom"
|
|
248
|
-
} }, null, [preview != "full" && /* @__PURE__ */ _jsxSorted("div", { class: {
|
|
228
|
+
"flex-row gap-1": (_rawProps.preview ?? "left") == "left",
|
|
229
|
+
"flex-row-reverse gap-1": (_rawProps.preview ?? "left") == "right",
|
|
230
|
+
"flex-col": (_rawProps.preview ?? "left") == "top",
|
|
231
|
+
"flex-col-reverse": (_rawProps.preview ?? "left") == "bottom"
|
|
232
|
+
} }, null, [(_rawProps.preview ?? "left") != "full" && /* @__PURE__ */ _jsxSorted("div", { class: {
|
|
249
233
|
"border border-gray-700 rounded-sm": true,
|
|
250
|
-
"aspect-square h-full": preview == "left" || preview == "right",
|
|
251
|
-
"h-3 w-full": preview == "top" || preview == "bottom",
|
|
252
|
-
"rounded-b-none": preview == "top",
|
|
253
|
-
"rounded-t-none": preview == "bottom"
|
|
234
|
+
"aspect-square h-full": (_rawProps.preview ?? "left") == "left" || (_rawProps.preview ?? "left") == "right",
|
|
235
|
+
"h-3 w-full": (_rawProps.preview ?? "left") == "top" || (_rawProps.preview ?? "left") == "bottom",
|
|
236
|
+
"rounded-b-none": (_rawProps.preview ?? "left") == "top",
|
|
237
|
+
"rounded-t-none": (_rawProps.preview ?? "left") == "bottom"
|
|
254
238
|
} }, { style: _fnSignal(_hf4, [store]) }, null, 3, "Xr_1"), /* @__PURE__ */ _jsxSorted("input", {
|
|
255
239
|
class: {
|
|
256
240
|
"lum-input w-full p-1 text-xs rounded-sm": true,
|
|
257
|
-
"rounded-t-none border-t-0": preview == "top",
|
|
258
|
-
"rounded-b-none border-b-0": preview == "bottom"
|
|
241
|
+
"rounded-t-none border-t-0": (_rawProps.preview ?? "left") == "top",
|
|
242
|
+
"rounded-b-none border-b-0": (_rawProps.preview ?? "left") == "bottom"
|
|
259
243
|
},
|
|
260
244
|
"q-e:input": /* @__PURE__ */ inlinedQrl(async (e, el, setColor) => {
|
|
261
245
|
await setColor(el.value);
|
|
262
246
|
}, "ColorPicker_component_div_div_div_input_q_e_input_ExKkgH2ke0g"),
|
|
263
247
|
"q:p": setColor,
|
|
264
|
-
style: preview == "full" ? {
|
|
248
|
+
style: (_rawProps.preview ?? "left") == "full" ? {
|
|
265
249
|
backgroundColor: `${store.value}`,
|
|
266
250
|
color: getBrightness(hexToRgba(store.value)) > .5 ? "black" : "white"
|
|
267
251
|
} : {}
|
|
268
252
|
}, { value: _wrapProp(store) }, null, 6, null)], 1, "Xr_2"),
|
|
269
|
-
colors
|
|
253
|
+
(_rawProps.colors ?? [
|
|
254
|
+
"#FAEDCB",
|
|
255
|
+
"#C9E4DE",
|
|
256
|
+
"#C6DEF1",
|
|
257
|
+
"#DBCDF0",
|
|
258
|
+
"#F2C6DE",
|
|
259
|
+
"#FCD05C",
|
|
260
|
+
"#5FE2C5",
|
|
261
|
+
"#4498DB",
|
|
262
|
+
"#9863E7",
|
|
263
|
+
"#E43A96",
|
|
264
|
+
"#000000",
|
|
265
|
+
"#555555",
|
|
266
|
+
"#AAAAAA",
|
|
267
|
+
"#FFFFFF"
|
|
268
|
+
]).map((color, i) => {
|
|
270
269
|
const qrl_4294901768 = /* @__PURE__ */ inlinedQrl(async (_, _1, color) => {
|
|
271
270
|
const setColor = _captures[0];
|
|
272
271
|
await setColor(color);
|
|
@@ -2,18 +2,23 @@ const require_functions = require("../functions.qwik.cjs");
|
|
|
2
2
|
const require_ChevronDown = require("../../svg/ChevronDown.qwik.cjs");
|
|
3
3
|
let _qwik_dev_core = require("@qwik.dev/core");
|
|
4
4
|
//#region src/components/elements/Dropdown.tsx
|
|
5
|
-
var Dropdown = /* @__PURE__ */ (0, _qwik_dev_core.componentQrl)(/* @__PURE__ */ (0, _qwik_dev_core.inlinedQrl)((
|
|
5
|
+
var Dropdown = /* @__PURE__ */ (0, _qwik_dev_core.componentQrl)(/* @__PURE__ */ (0, _qwik_dev_core.inlinedQrl)((_rawProps) => {
|
|
6
|
+
const props = (0, _qwik_dev_core._restProps)(_rawProps, [
|
|
7
|
+
"class",
|
|
8
|
+
"hover",
|
|
9
|
+
"opened"
|
|
10
|
+
]);
|
|
6
11
|
return /* @__PURE__ */ (0, _qwik_dev_core._jsxSplit)("button", {
|
|
7
12
|
type: "button",
|
|
8
13
|
class: {
|
|
9
14
|
"group lum-btn": true,
|
|
10
|
-
...require_functions.getClassObject(
|
|
15
|
+
...require_functions.getClassObject(_rawProps.class)
|
|
11
16
|
},
|
|
12
17
|
...(0, _qwik_dev_core._getVarProps)(props)
|
|
13
18
|
}, (0, _qwik_dev_core._getConstProps)(props), [/* @__PURE__ */ (0, _qwik_dev_core._jsxSorted)("span", null, { class: "flex-1 text-left" }, /* @__PURE__ */ (0, _qwik_dev_core._jsxSorted)(_qwik_dev_core.Slot, null, null, null, 3, "Q4_0"), 1, null), /* @__PURE__ */ (0, _qwik_dev_core._jsxSorted)(require_ChevronDown.ChevronDown, { class: {
|
|
14
19
|
"ease-out motion-safe:transition-transform": true,
|
|
15
|
-
"rotate-180 transform": opened,
|
|
16
|
-
"duration-300 group-hover:rotate-180 group-hover:transform group-hover:duration-75": hover,
|
|
20
|
+
"rotate-180 transform": _rawProps.opened,
|
|
21
|
+
"duration-300 group-hover:rotate-180 group-hover:transform group-hover:duration-75": _rawProps.hover,
|
|
17
22
|
"focus-within:rotate-180 focus-within:transform focus-within:duration-75": true
|
|
18
23
|
} }, { size: 16 }, null, 3, "Q4_1")], 0, "Q4_2");
|
|
19
24
|
}, "Dropdown_component_uFQ6p5skpCY"));
|
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
import { getClassObject } from "../functions.qwik.mjs";
|
|
2
2
|
import { ChevronDown } from "../../svg/ChevronDown.qwik.mjs";
|
|
3
|
-
import { Slot, _getConstProps, _getVarProps, _jsxSorted, _jsxSplit, componentQrl, inlinedQrl } from "@qwik.dev/core";
|
|
3
|
+
import { Slot, _getConstProps, _getVarProps, _jsxSorted, _jsxSplit, _restProps, componentQrl, inlinedQrl } from "@qwik.dev/core";
|
|
4
4
|
//#region src/components/elements/Dropdown.tsx
|
|
5
|
-
var Dropdown = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((
|
|
5
|
+
var Dropdown = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((_rawProps) => {
|
|
6
|
+
const props = _restProps(_rawProps, [
|
|
7
|
+
"class",
|
|
8
|
+
"hover",
|
|
9
|
+
"opened"
|
|
10
|
+
]);
|
|
6
11
|
return /* @__PURE__ */ _jsxSplit("button", {
|
|
7
12
|
type: "button",
|
|
8
13
|
class: {
|
|
9
14
|
"group lum-btn": true,
|
|
10
|
-
...getClassObject(
|
|
15
|
+
...getClassObject(_rawProps.class)
|
|
11
16
|
},
|
|
12
17
|
..._getVarProps(props)
|
|
13
18
|
}, _getConstProps(props), [/* @__PURE__ */ _jsxSorted("span", null, { class: "flex-1 text-left" }, /* @__PURE__ */ _jsxSorted(Slot, null, null, null, 3, "Q4_0"), 1, null), /* @__PURE__ */ _jsxSorted(ChevronDown, { class: {
|
|
14
19
|
"ease-out motion-safe:transition-transform": true,
|
|
15
|
-
"rotate-180 transform": opened,
|
|
16
|
-
"duration-300 group-hover:rotate-180 group-hover:transform group-hover:duration-75": hover,
|
|
20
|
+
"rotate-180 transform": _rawProps.opened,
|
|
21
|
+
"duration-300 group-hover:rotate-180 group-hover:transform group-hover:duration-75": _rawProps.hover,
|
|
17
22
|
"focus-within:rotate-180 focus-within:transform focus-within:duration-75": true
|
|
18
23
|
} }, { size: 16 }, null, 3, "Q4_1")], 0, "Q4_2");
|
|
19
24
|
}, "Dropdown_component_uFQ6p5skpCY"));
|
|
@@ -2,61 +2,71 @@ 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
|
|
5
|
+
var _hf0 = (p0) => ({
|
|
6
|
+
"lum-btn lum-bg-transparent p-2 sm:hidden rounded-lum-2": true,
|
|
7
|
+
"nav-ignore-dismiss": p0.value
|
|
8
|
+
});
|
|
9
|
+
var Nav = /* @__PURE__ */ (0, _qwik_dev_core.componentQrl)(/* @__PURE__ */ (0, _qwik_dev_core.inlinedQrl)((_rawProps) => {
|
|
10
|
+
const props = (0, _qwik_dev_core._restProps)(_rawProps, [
|
|
11
|
+
"fixed",
|
|
12
|
+
"floating",
|
|
13
|
+
"noblur",
|
|
14
|
+
"nohamburger",
|
|
15
|
+
"nodismiss",
|
|
16
|
+
"class",
|
|
17
|
+
"colorClass"
|
|
18
|
+
]);
|
|
6
19
|
const menu = (0, _qwik_dev_core.useSignal)(false);
|
|
7
|
-
(0, _qwik_dev_core.useTaskQrl)(/* @__PURE__ */ (0, _qwik_dev_core.inlinedQrl)(({ track }) => {
|
|
8
|
-
const menu = _qwik_dev_core._captures[0], nodismiss = _qwik_dev_core._captures[1];
|
|
9
|
-
track(() => menu.value);
|
|
10
|
-
if (menu.value && !nodismiss) {
|
|
11
|
-
const onClick = (e) => {
|
|
12
|
-
let el = e.target;
|
|
13
|
-
while (el) {
|
|
14
|
-
if (el.classList && el.classList.contains("nav-ignore-dismiss")) return;
|
|
15
|
-
el = el.parentElement;
|
|
16
|
-
}
|
|
17
|
-
menu.value = false;
|
|
18
|
-
window.removeEventListener("click", onClick);
|
|
19
|
-
};
|
|
20
|
-
window.addEventListener("click", onClick);
|
|
21
|
-
}
|
|
22
|
-
}, "Nav_component_useTask_ZYe1GvC0CAM", [menu, nodismiss]));
|
|
23
20
|
return /* @__PURE__ */ (0, _qwik_dev_core._jsxSplit)("nav", {
|
|
24
21
|
...(0, _qwik_dev_core._getVarProps)(props),
|
|
25
22
|
...(0, _qwik_dev_core._getConstProps)(props),
|
|
26
23
|
class: {
|
|
27
24
|
"top-0 left-0 z-50 flex w-full flex-col": true,
|
|
28
|
-
fixed,
|
|
29
|
-
absolute: !fixed,
|
|
30
|
-
...require_functions.getClassObject(
|
|
25
|
+
fixed: _rawProps.fixed,
|
|
26
|
+
absolute: !_rawProps.fixed,
|
|
27
|
+
...require_functions.getClassObject(_rawProps.class)
|
|
31
28
|
}
|
|
32
|
-
}, null, [!nohamburger && /* @__PURE__ */ (0, _qwik_dev_core._jsxSorted)("div", { class: {
|
|
29
|
+
}, null, [!_rawProps.nohamburger && /* @__PURE__ */ (0, _qwik_dev_core._jsxSorted)("div", { class: {
|
|
33
30
|
"absolute top-full lum-card motion-safe:transition-all sm:hidden max-w-7xl gap-2 px-2 py-4": true,
|
|
34
|
-
"w-[calc(100%-(--spacing(8)))] mx-4": floating,
|
|
35
|
-
"w-[calc(100%-(--spacing(4)))] mx-2": !floating,
|
|
31
|
+
"w-[calc(100%-(--spacing(8)))] mx-4": _rawProps.floating,
|
|
32
|
+
"w-[calc(100%-(--spacing(4)))] mx-2": !_rawProps.floating,
|
|
36
33
|
"mt-2": menu.value,
|
|
37
34
|
"pointer-events-none opacity-0 -mt-2 scale-95": !menu.value,
|
|
38
|
-
"backdrop-blur-lg": !noblur,
|
|
39
|
-
...require_functions.getClassObject(colorClass)
|
|
35
|
+
"backdrop-blur-lg": !_rawProps.noblur,
|
|
36
|
+
...require_functions.getClassObject(_rawProps.colorClass ?? "lum-bg-lum-card-bg")
|
|
40
37
|
} }, 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._jsxSorted)("div", { class: {
|
|
41
|
-
|
|
42
|
-
"border-x-0! border-t-0!": !floating,
|
|
43
|
-
"backdrop-blur-lg": !noblur && !floating,
|
|
44
|
-
"relative mx-2 mt-2": floating
|
|
38
|
+
...!_rawProps.floating ? require_functions.getClassObject(_rawProps.colorClass ?? "lum-bg-lum-card-bg") : {},
|
|
39
|
+
"border-x-0! border-t-0!": !_rawProps.floating,
|
|
40
|
+
"backdrop-blur-lg": !_rawProps.noblur && !_rawProps.floating,
|
|
41
|
+
"relative mx-2 mt-2": _rawProps.floating
|
|
45
42
|
} }, null, /* @__PURE__ */ (0, _qwik_dev_core._jsxSorted)("div", { class: {
|
|
46
43
|
"mx-auto flex w-full max-w-7xl justify-evenly px-2": true,
|
|
47
|
-
...require_functions.getClassObject(colorClass),
|
|
48
|
-
"rounded-lum border": floating,
|
|
49
|
-
"backdrop-blur-lg": !noblur && floating
|
|
44
|
+
..._rawProps.floating ? require_functions.getClassObject(_rawProps.colorClass ?? "lum-bg-lum-card-bg") : {},
|
|
45
|
+
"rounded-lum border": _rawProps.floating,
|
|
46
|
+
"backdrop-blur-lg": !_rawProps.noblur && _rawProps.floating
|
|
50
47
|
} }, null, [
|
|
51
48
|
/* @__PURE__ */ (0, _qwik_dev_core._jsxSorted)("div", null, { 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"), 1, null),
|
|
52
49
|
/* @__PURE__ */ (0, _qwik_dev_core._jsxSorted)("div", null, { 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"), 1, null),
|
|
53
|
-
/* @__PURE__ */ (0, _qwik_dev_core._jsxSorted)("div", null, { 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"), !nohamburger && /* @__PURE__ */ (0, _qwik_dev_core._jsxSorted)("button", {
|
|
54
|
-
"q-e:click": /* @__PURE__ */ (0, _qwik_dev_core.inlinedQrl)((_, _1, menu) =>
|
|
55
|
-
|
|
50
|
+
/* @__PURE__ */ (0, _qwik_dev_core._jsxSorted)("div", null, { 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", {
|
|
51
|
+
"q-e:click": /* @__PURE__ */ (0, _qwik_dev_core.inlinedQrl)((_, _1, _rawProps, menu) => {
|
|
52
|
+
menu.value = !menu.value;
|
|
53
|
+
if (_rawProps.nodismiss) return;
|
|
54
|
+
function onClick(e) {
|
|
55
|
+
if (menu.value == false) return window.removeEventListener("click", onClick);
|
|
56
|
+
let el = e.target;
|
|
57
|
+
while (el) {
|
|
58
|
+
if (el.classList.contains("nav-ignore-dismiss")) return;
|
|
59
|
+
el = el.parentElement;
|
|
60
|
+
}
|
|
61
|
+
menu.value = false;
|
|
62
|
+
}
|
|
63
|
+
if (menu.value) window.addEventListener("click", onClick);
|
|
64
|
+
}, "Nav_component_nav_div_div_div_button_q_e_click_rIKeLxoPukM"),
|
|
65
|
+
"q:ps": [_rawProps, menu]
|
|
56
66
|
}, {
|
|
57
67
|
name: "Navigation Menu",
|
|
58
68
|
title: "Navigation Menu",
|
|
59
|
-
class:
|
|
69
|
+
class: (0, _qwik_dev_core._fnSignal)(_hf0, [menu])
|
|
60
70
|
}, /* @__PURE__ */ (0, _qwik_dev_core._jsxSorted)(require_Menu.Menu, null, { size: 24 }, null, 3, "03_5"), 4, "03_6")], 1, null)
|
|
61
71
|
], 1, null), 1, null)], 0, "03_7");
|
|
62
72
|
}, "Nav_component_GVA94DyavJM"));
|
|
@@ -1,62 +1,72 @@
|
|
|
1
1
|
import { getClassObject } from "../functions.qwik.mjs";
|
|
2
2
|
import { Menu } from "../../svg/Menu.qwik.mjs";
|
|
3
|
-
import { Slot,
|
|
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
|
|
5
|
+
var _hf0 = (p0) => ({
|
|
6
|
+
"lum-btn lum-bg-transparent p-2 sm:hidden rounded-lum-2": true,
|
|
7
|
+
"nav-ignore-dismiss": p0.value
|
|
8
|
+
});
|
|
9
|
+
var Nav = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((_rawProps) => {
|
|
10
|
+
const props = _restProps(_rawProps, [
|
|
11
|
+
"fixed",
|
|
12
|
+
"floating",
|
|
13
|
+
"noblur",
|
|
14
|
+
"nohamburger",
|
|
15
|
+
"nodismiss",
|
|
16
|
+
"class",
|
|
17
|
+
"colorClass"
|
|
18
|
+
]);
|
|
6
19
|
const menu = useSignal(false);
|
|
7
|
-
useTaskQrl(/* @__PURE__ */ inlinedQrl(({ track }) => {
|
|
8
|
-
const menu = _captures[0], nodismiss = _captures[1];
|
|
9
|
-
track(() => menu.value);
|
|
10
|
-
if (menu.value && !nodismiss) {
|
|
11
|
-
const onClick = (e) => {
|
|
12
|
-
let el = e.target;
|
|
13
|
-
while (el) {
|
|
14
|
-
if (el.classList && el.classList.contains("nav-ignore-dismiss")) return;
|
|
15
|
-
el = el.parentElement;
|
|
16
|
-
}
|
|
17
|
-
menu.value = false;
|
|
18
|
-
window.removeEventListener("click", onClick);
|
|
19
|
-
};
|
|
20
|
-
window.addEventListener("click", onClick);
|
|
21
|
-
}
|
|
22
|
-
}, "Nav_component_useTask_ZYe1GvC0CAM", [menu, nodismiss]));
|
|
23
20
|
return /* @__PURE__ */ _jsxSplit("nav", {
|
|
24
21
|
..._getVarProps(props),
|
|
25
22
|
..._getConstProps(props),
|
|
26
23
|
class: {
|
|
27
24
|
"top-0 left-0 z-50 flex w-full flex-col": true,
|
|
28
|
-
fixed,
|
|
29
|
-
absolute: !fixed,
|
|
30
|
-
...getClassObject(
|
|
25
|
+
fixed: _rawProps.fixed,
|
|
26
|
+
absolute: !_rawProps.fixed,
|
|
27
|
+
...getClassObject(_rawProps.class)
|
|
31
28
|
}
|
|
32
|
-
}, null, [!nohamburger && /* @__PURE__ */ _jsxSorted("div", { class: {
|
|
29
|
+
}, null, [!_rawProps.nohamburger && /* @__PURE__ */ _jsxSorted("div", { class: {
|
|
33
30
|
"absolute top-full lum-card motion-safe:transition-all sm:hidden max-w-7xl gap-2 px-2 py-4": true,
|
|
34
|
-
"w-[calc(100%-(--spacing(8)))] mx-4": floating,
|
|
35
|
-
"w-[calc(100%-(--spacing(4)))] mx-2": !floating,
|
|
31
|
+
"w-[calc(100%-(--spacing(8)))] mx-4": _rawProps.floating,
|
|
32
|
+
"w-[calc(100%-(--spacing(4)))] mx-2": !_rawProps.floating,
|
|
36
33
|
"mt-2": menu.value,
|
|
37
34
|
"pointer-events-none opacity-0 -mt-2 scale-95": !menu.value,
|
|
38
|
-
"backdrop-blur-lg": !noblur,
|
|
39
|
-
...getClassObject(colorClass)
|
|
35
|
+
"backdrop-blur-lg": !_rawProps.noblur,
|
|
36
|
+
...getClassObject(_rawProps.colorClass ?? "lum-bg-lum-card-bg")
|
|
40
37
|
} }, null, /* @__PURE__ */ _jsxSorted(Slot, null, { name: "mobile" }, null, 3, "03_0"), 1, "03_1"), /* @__PURE__ */ _jsxSorted("div", { class: {
|
|
41
|
-
|
|
42
|
-
"border-x-0! border-t-0!": !floating,
|
|
43
|
-
"backdrop-blur-lg": !noblur && !floating,
|
|
44
|
-
"relative mx-2 mt-2": floating
|
|
38
|
+
...!_rawProps.floating ? getClassObject(_rawProps.colorClass ?? "lum-bg-lum-card-bg") : {},
|
|
39
|
+
"border-x-0! border-t-0!": !_rawProps.floating,
|
|
40
|
+
"backdrop-blur-lg": !_rawProps.noblur && !_rawProps.floating,
|
|
41
|
+
"relative mx-2 mt-2": _rawProps.floating
|
|
45
42
|
} }, null, /* @__PURE__ */ _jsxSorted("div", { class: {
|
|
46
43
|
"mx-auto flex w-full max-w-7xl justify-evenly px-2": true,
|
|
47
|
-
...getClassObject(colorClass),
|
|
48
|
-
"rounded-lum border": floating,
|
|
49
|
-
"backdrop-blur-lg": !noblur && floating
|
|
44
|
+
..._rawProps.floating ? getClassObject(_rawProps.colorClass ?? "lum-bg-lum-card-bg") : {},
|
|
45
|
+
"rounded-lum border": _rawProps.floating,
|
|
46
|
+
"backdrop-blur-lg": !_rawProps.noblur && _rawProps.floating
|
|
50
47
|
} }, null, [
|
|
51
48
|
/* @__PURE__ */ _jsxSorted("div", null, { class: "flex flex-1 items-center justify-start gap-2 py-2" }, /* @__PURE__ */ _jsxSorted(Slot, null, { name: "start" }, null, 3, "03_2"), 1, null),
|
|
52
49
|
/* @__PURE__ */ _jsxSorted("div", null, { class: "flex flex-1 items-center justify-center gap-2 py-2" }, /* @__PURE__ */ _jsxSorted(Slot, null, { name: "center" }, null, 3, "03_3"), 1, null),
|
|
53
|
-
/* @__PURE__ */ _jsxSorted("div", null, { class: "flex flex-1 items-center justify-end gap-2 py-2" }, [/* @__PURE__ */ _jsxSorted(Slot, null, { name: "end" }, null, 3, "03_4"), !nohamburger && /* @__PURE__ */ _jsxSorted("button", {
|
|
54
|
-
"q-e:click": /* @__PURE__ */ inlinedQrl((_, _1, menu) =>
|
|
55
|
-
|
|
50
|
+
/* @__PURE__ */ _jsxSorted("div", null, { 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", {
|
|
51
|
+
"q-e:click": /* @__PURE__ */ inlinedQrl((_, _1, _rawProps, menu) => {
|
|
52
|
+
menu.value = !menu.value;
|
|
53
|
+
if (_rawProps.nodismiss) return;
|
|
54
|
+
function onClick(e) {
|
|
55
|
+
if (menu.value == false) return window.removeEventListener("click", onClick);
|
|
56
|
+
let el = e.target;
|
|
57
|
+
while (el) {
|
|
58
|
+
if (el.classList.contains("nav-ignore-dismiss")) return;
|
|
59
|
+
el = el.parentElement;
|
|
60
|
+
}
|
|
61
|
+
menu.value = false;
|
|
62
|
+
}
|
|
63
|
+
if (menu.value) window.addEventListener("click", onClick);
|
|
64
|
+
}, "Nav_component_nav_div_div_div_button_q_e_click_rIKeLxoPukM"),
|
|
65
|
+
"q:ps": [_rawProps, menu]
|
|
56
66
|
}, {
|
|
57
67
|
name: "Navigation Menu",
|
|
58
68
|
title: "Navigation Menu",
|
|
59
|
-
class:
|
|
69
|
+
class: _fnSignal(_hf0, [menu])
|
|
60
70
|
}, /* @__PURE__ */ _jsxSorted(Menu, null, { size: 24 }, null, 3, "03_5"), 4, "03_6")], 1, null)
|
|
61
71
|
], 1, null), 1, null)], 0, "03_7");
|
|
62
72
|
}, "Nav_component_GVA94DyavJM"));
|
|
@@ -3,9 +3,19 @@ const require_Plus = require("../../svg/Plus.qwik.cjs");
|
|
|
3
3
|
const require_Minus = require("../../svg/Minus.qwik.cjs");
|
|
4
4
|
let _qwik_dev_core = require("@qwik.dev/core");
|
|
5
5
|
//#region src/components/elements/NumberInput.tsx
|
|
6
|
-
var _hf0 = (p0, p1) =>
|
|
7
|
-
var _hf1 = (p0
|
|
8
|
-
var
|
|
6
|
+
var _hf0 = (p0, p1) => p1.min ? (p0.value ?? 0) <= p1.min : false;
|
|
7
|
+
var _hf1 = (p0) => p0.value ?? 0;
|
|
8
|
+
var _hf2 = (p0) => p0.step ?? 1;
|
|
9
|
+
var _hf3 = (p0, p1) => p1.max ? (p0.value ?? 0) >= p1.max : false;
|
|
10
|
+
var NumberInput = /* @__PURE__ */ (0, _qwik_dev_core.componentQrl)(/* @__PURE__ */ (0, _qwik_dev_core.inlinedQrl)((_rawProps) => {
|
|
11
|
+
const props = (0, _qwik_dev_core._restProps)(_rawProps, [
|
|
12
|
+
"input",
|
|
13
|
+
"class",
|
|
14
|
+
"onDecrement$",
|
|
15
|
+
"onIncrement$",
|
|
16
|
+
"value",
|
|
17
|
+
"step"
|
|
18
|
+
]);
|
|
9
19
|
(0, _qwik_dev_core.useStylesQrl)(/* @__PURE__ */ (0, _qwik_dev_core.inlinedQrl)(`
|
|
10
20
|
input::-webkit-outer-spin-button,
|
|
11
21
|
input::-webkit-inner-spin-button {
|
|
@@ -18,37 +28,37 @@ var NumberInput = /* @__PURE__ */ (0, _qwik_dev_core.componentQrl)(/* @__PURE__
|
|
|
18
28
|
`, "NumberInput_component_useStyles_9gV0k9qgkUU"));
|
|
19
29
|
return /* @__PURE__ */ (0, _qwik_dev_core._jsxSorted)("div", null, { class: { "flex touch-manipulation gap-1 text-lum-text": true } }, [
|
|
20
30
|
/* @__PURE__ */ (0, _qwik_dev_core._jsxSorted)("button", {
|
|
21
|
-
disabled: (0, _qwik_dev_core._fnSignal)(_hf0, [
|
|
22
|
-
"q-e:click": input ? /* @__PURE__ */ (0, _qwik_dev_core.inlinedQrl)(async (event, element) => {
|
|
23
|
-
const
|
|
31
|
+
disabled: (0, _qwik_dev_core._fnSignal)(_hf0, [_rawProps, props]),
|
|
32
|
+
"q-e:click": _rawProps.input ? /* @__PURE__ */ (0, _qwik_dev_core.inlinedQrl)(async (event, element) => {
|
|
33
|
+
const _rawProps = _qwik_dev_core._captures[0];
|
|
24
34
|
const siblingInput = element.nextElementSibling;
|
|
25
35
|
siblingInput.stepDown();
|
|
26
|
-
await onDecrement$?.(event, element, siblingInput);
|
|
27
|
-
}, "NumberInput_component_div_button_q_e_click_x56P4mcwT0M", [
|
|
36
|
+
await _rawProps.onDecrement$?.(event, element, siblingInput);
|
|
37
|
+
}, "NumberInput_component_div_button_q_e_click_x56P4mcwT0M", [_rawProps]) : _rawProps.onDecrement$
|
|
28
38
|
}, {
|
|
29
39
|
type: "button",
|
|
30
40
|
class: { "lum-btn p-2 rounded-r-sm": true },
|
|
31
41
|
"data-action": "decrement",
|
|
32
42
|
"aria-label": "Decrement"
|
|
33
43
|
}, /* @__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", {
|
|
44
|
+
_rawProps.input && /* @__PURE__ */ (0, _qwik_dev_core._jsxSplit)("input", {
|
|
35
45
|
...(0, _qwik_dev_core._getVarProps)(props),
|
|
36
46
|
...(0, _qwik_dev_core._getConstProps)(props),
|
|
37
|
-
value,
|
|
38
|
-
step,
|
|
47
|
+
value: (0, _qwik_dev_core._fnSignal)(_hf1, [_rawProps]),
|
|
48
|
+
step: (0, _qwik_dev_core._fnSignal)(_hf2, [_rawProps]),
|
|
39
49
|
class: {
|
|
40
50
|
"lum-input text-center rounded-sm lum-input-p-1": true,
|
|
41
|
-
...require_functions.getClassObject(
|
|
51
|
+
...require_functions.getClassObject(_rawProps.class)
|
|
42
52
|
}
|
|
43
53
|
}, { type: "number" }, null, 0, "kR_1"),
|
|
44
54
|
/* @__PURE__ */ (0, _qwik_dev_core._jsxSorted)("button", {
|
|
45
|
-
disabled: (0, _qwik_dev_core._fnSignal)(
|
|
46
|
-
"q-e:click": input ? /* @__PURE__ */ (0, _qwik_dev_core.inlinedQrl)(async (event, element) => {
|
|
47
|
-
const
|
|
55
|
+
disabled: (0, _qwik_dev_core._fnSignal)(_hf3, [_rawProps, props]),
|
|
56
|
+
"q-e:click": _rawProps.input ? /* @__PURE__ */ (0, _qwik_dev_core.inlinedQrl)(async (event, element) => {
|
|
57
|
+
const _rawProps = _qwik_dev_core._captures[0];
|
|
48
58
|
const siblingInput = element.previousElementSibling;
|
|
49
59
|
siblingInput.stepUp();
|
|
50
|
-
await onIncrement$?.(event, element, siblingInput);
|
|
51
|
-
}, "NumberInput_component_div_button_q_e_click_1_oHOVxz0RzY0", [
|
|
60
|
+
await _rawProps.onIncrement$?.(event, element, siblingInput);
|
|
61
|
+
}, "NumberInput_component_div_button_q_e_click_1_oHOVxz0RzY0", [_rawProps]) : _rawProps.onIncrement$
|
|
52
62
|
}, {
|
|
53
63
|
type: "button",
|
|
54
64
|
class: { "lum-btn p-2 rounded-l-sm": true },
|
|
@@ -1,11 +1,21 @@
|
|
|
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 { _captures, _fnSignal, _getConstProps, _getVarProps, _jsxSorted, _jsxSplit, componentQrl, inlinedQrl, useStylesQrl } from "@qwik.dev/core";
|
|
4
|
+
import { _captures, _fnSignal, _getConstProps, _getVarProps, _jsxSorted, _jsxSplit, _restProps, componentQrl, inlinedQrl, useStylesQrl } from "@qwik.dev/core";
|
|
5
5
|
//#region src/components/elements/NumberInput.tsx
|
|
6
|
-
var _hf0 = (p0, p1) =>
|
|
7
|
-
var _hf1 = (p0
|
|
8
|
-
var
|
|
6
|
+
var _hf0 = (p0, p1) => p1.min ? (p0.value ?? 0) <= p1.min : false;
|
|
7
|
+
var _hf1 = (p0) => p0.value ?? 0;
|
|
8
|
+
var _hf2 = (p0) => p0.step ?? 1;
|
|
9
|
+
var _hf3 = (p0, p1) => p1.max ? (p0.value ?? 0) >= p1.max : false;
|
|
10
|
+
var NumberInput = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((_rawProps) => {
|
|
11
|
+
const props = _restProps(_rawProps, [
|
|
12
|
+
"input",
|
|
13
|
+
"class",
|
|
14
|
+
"onDecrement$",
|
|
15
|
+
"onIncrement$",
|
|
16
|
+
"value",
|
|
17
|
+
"step"
|
|
18
|
+
]);
|
|
9
19
|
useStylesQrl(/* @__PURE__ */ inlinedQrl(`
|
|
10
20
|
input::-webkit-outer-spin-button,
|
|
11
21
|
input::-webkit-inner-spin-button {
|
|
@@ -18,37 +28,37 @@ var NumberInput = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(({ inp
|
|
|
18
28
|
`, "NumberInput_component_useStyles_9gV0k9qgkUU"));
|
|
19
29
|
return /* @__PURE__ */ _jsxSorted("div", null, { class: { "flex touch-manipulation gap-1 text-lum-text": true } }, [
|
|
20
30
|
/* @__PURE__ */ _jsxSorted("button", {
|
|
21
|
-
disabled: _fnSignal(_hf0, [
|
|
22
|
-
"q-e:click": input ? /* @__PURE__ */ inlinedQrl(async (event, element) => {
|
|
23
|
-
const
|
|
31
|
+
disabled: _fnSignal(_hf0, [_rawProps, props]),
|
|
32
|
+
"q-e:click": _rawProps.input ? /* @__PURE__ */ inlinedQrl(async (event, element) => {
|
|
33
|
+
const _rawProps = _captures[0];
|
|
24
34
|
const siblingInput = element.nextElementSibling;
|
|
25
35
|
siblingInput.stepDown();
|
|
26
|
-
await onDecrement$?.(event, element, siblingInput);
|
|
27
|
-
}, "NumberInput_component_div_button_q_e_click_x56P4mcwT0M", [
|
|
36
|
+
await _rawProps.onDecrement$?.(event, element, siblingInput);
|
|
37
|
+
}, "NumberInput_component_div_button_q_e_click_x56P4mcwT0M", [_rawProps]) : _rawProps.onDecrement$
|
|
28
38
|
}, {
|
|
29
39
|
type: "button",
|
|
30
40
|
class: { "lum-btn p-2 rounded-r-sm": true },
|
|
31
41
|
"data-action": "decrement",
|
|
32
42
|
"aria-label": "Decrement"
|
|
33
43
|
}, /* @__PURE__ */ _jsxSorted(Minus, null, { size: 20 }, null, 3, "kR_0"), 0, null),
|
|
34
|
-
input && /* @__PURE__ */ _jsxSplit("input", {
|
|
44
|
+
_rawProps.input && /* @__PURE__ */ _jsxSplit("input", {
|
|
35
45
|
..._getVarProps(props),
|
|
36
46
|
..._getConstProps(props),
|
|
37
|
-
value,
|
|
38
|
-
step,
|
|
47
|
+
value: _fnSignal(_hf1, [_rawProps]),
|
|
48
|
+
step: _fnSignal(_hf2, [_rawProps]),
|
|
39
49
|
class: {
|
|
40
50
|
"lum-input text-center rounded-sm lum-input-p-1": true,
|
|
41
|
-
...getClassObject(
|
|
51
|
+
...getClassObject(_rawProps.class)
|
|
42
52
|
}
|
|
43
53
|
}, { type: "number" }, null, 0, "kR_1"),
|
|
44
54
|
/* @__PURE__ */ _jsxSorted("button", {
|
|
45
|
-
disabled: _fnSignal(
|
|
46
|
-
"q-e:click": input ? /* @__PURE__ */ inlinedQrl(async (event, element) => {
|
|
47
|
-
const
|
|
55
|
+
disabled: _fnSignal(_hf3, [_rawProps, props]),
|
|
56
|
+
"q-e:click": _rawProps.input ? /* @__PURE__ */ inlinedQrl(async (event, element) => {
|
|
57
|
+
const _rawProps = _captures[0];
|
|
48
58
|
const siblingInput = element.previousElementSibling;
|
|
49
59
|
siblingInput.stepUp();
|
|
50
|
-
await onIncrement$?.(event, element, siblingInput);
|
|
51
|
-
}, "NumberInput_component_div_button_q_e_click_1_oHOVxz0RzY0", [
|
|
60
|
+
await _rawProps.onIncrement$?.(event, element, siblingInput);
|
|
61
|
+
}, "NumberInput_component_div_button_q_e_click_1_oHOVxz0RzY0", [_rawProps]) : _rawProps.onIncrement$
|
|
52
62
|
}, {
|
|
53
63
|
type: "button",
|
|
54
64
|
class: { "lum-btn p-2 rounded-l-sm": true },
|