@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.
Files changed (98) hide show
  1. package/LICENSE +661 -0
  2. package/lib/assets/BBIagblG-bundle-graph.json +1 -0
  3. package/lib/assets/ChtqwOpy-bundle-graph.json +1 -0
  4. package/lib/components/elements/Anchor.d.ts +1 -4
  5. package/lib/components/elements/Anchor.qwik.cjs +21 -25
  6. package/lib/components/elements/Anchor.qwik.mjs +21 -25
  7. package/lib/components/elements/Blobs.d.ts +3 -4
  8. package/lib/components/elements/Blobs.qwik.cjs +181 -187
  9. package/lib/components/elements/Blobs.qwik.mjs +182 -189
  10. package/lib/components/elements/ColorPicker.d.ts +1 -4
  11. package/lib/components/elements/ColorPicker.qwik.cjs +285 -303
  12. package/lib/components/elements/ColorPicker.qwik.mjs +285 -303
  13. package/lib/components/elements/Dropdown.d.ts +1 -4
  14. package/lib/components/elements/Dropdown.qwik.cjs +20 -30
  15. package/lib/components/elements/Dropdown.qwik.mjs +20 -30
  16. package/lib/components/elements/Label.d.ts +6 -0
  17. package/lib/components/elements/Label.qwik.cjs +10 -0
  18. package/lib/components/elements/Label.qwik.mjs +10 -0
  19. package/lib/components/elements/Nav.d.ts +3 -6
  20. package/lib/components/elements/Nav.qwik.cjs +63 -97
  21. package/lib/components/elements/Nav.qwik.mjs +63 -97
  22. package/lib/components/elements/NumberInput.d.ts +4 -11
  23. package/lib/components/elements/NumberInput.qwik.cjs +52 -78
  24. package/lib/components/elements/NumberInput.qwik.mjs +51 -77
  25. package/lib/components/elements/RangeInput.d.ts +2 -9
  26. package/lib/components/elements/RangeInput.qwik.cjs +45 -76
  27. package/lib/components/elements/RangeInput.qwik.mjs +46 -77
  28. package/lib/components/elements/SelectMenu.d.ts +5 -8
  29. package/lib/components/elements/SelectMenu.qwik.cjs +90 -133
  30. package/lib/components/elements/SelectMenu.qwik.mjs +90 -133
  31. package/lib/components/elements/Sidebar.d.ts +1 -4
  32. package/lib/components/elements/Sidebar.qwik.cjs +19 -36
  33. package/lib/components/elements/Sidebar.qwik.mjs +20 -37
  34. package/lib/components/elements/Toggle.d.ts +1 -2
  35. package/lib/components/elements/Toggle.qwik.cjs +22 -38
  36. package/lib/components/elements/Toggle.qwik.mjs +23 -39
  37. package/lib/components/elements.d.ts +1 -0
  38. package/lib/components/functions.d.ts +2 -0
  39. package/lib/components/functions.qwik.cjs +19 -16
  40. package/lib/components/functions.qwik.mjs +19 -17
  41. package/lib/index.d.ts +0 -1
  42. package/lib/index.qwik.cjs +26 -48
  43. package/lib/index.qwik.mjs +6 -42
  44. package/lib/q-manifest.json +239 -0
  45. package/lib/svg/ChevronDown.d.ts +1 -1
  46. package/lib/svg/ChevronDown.qwik.cjs +18 -22
  47. package/lib/svg/ChevronDown.qwik.mjs +19 -23
  48. package/lib/svg/Link.d.ts +1 -1
  49. package/lib/svg/Link.qwik.cjs +27 -33
  50. package/lib/svg/Link.qwik.mjs +28 -34
  51. package/lib/svg/Menu.d.ts +1 -1
  52. package/lib/svg/Menu.qwik.cjs +22 -30
  53. package/lib/svg/Menu.qwik.mjs +23 -31
  54. package/lib/svg/Minus.d.ts +1 -1
  55. package/lib/svg/Minus.qwik.cjs +18 -22
  56. package/lib/svg/Minus.qwik.mjs +19 -23
  57. package/lib/svg/Plus.d.ts +1 -1
  58. package/lib/svg/Plus.qwik.cjs +18 -27
  59. package/lib/svg/Plus.qwik.mjs +19 -28
  60. package/lib/svg/Shuffle.d.ts +1 -1
  61. package/lib/svg/Shuffle.qwik.cjs +24 -36
  62. package/lib/svg/Shuffle.qwik.mjs +25 -37
  63. package/lib/utils/color.qwik.cjs +101 -115
  64. package/lib/utils/color.qwik.mjs +102 -122
  65. package/package.json +14 -14
  66. package/lib/components/logos/Birdflop.d.ts +0 -7
  67. package/lib/components/logos/Birdflop.qwik.cjs +0 -73
  68. package/lib/components/logos/Birdflop.qwik.mjs +0 -73
  69. package/lib/components/logos/Discord.d.ts +0 -2
  70. package/lib/components/logos/Discord.qwik.cjs +0 -18
  71. package/lib/components/logos/Discord.qwik.mjs +0 -18
  72. package/lib/components/logos/Fabric.d.ts +0 -2
  73. package/lib/components/logos/Fabric.qwik.cjs +0 -32
  74. package/lib/components/logos/Fabric.qwik.mjs +0 -32
  75. package/lib/components/logos/Forge.d.ts +0 -2
  76. package/lib/components/logos/Forge.qwik.cjs +0 -31
  77. package/lib/components/logos/Forge.qwik.mjs +0 -31
  78. package/lib/components/logos/Luminescent.d.ts +0 -3
  79. package/lib/components/logos/Luminescent.qwik.cjs +0 -143
  80. package/lib/components/logos/Luminescent.qwik.mjs +0 -143
  81. package/lib/components/logos/Paper.d.ts +0 -2
  82. package/lib/components/logos/Paper.qwik.cjs +0 -40
  83. package/lib/components/logos/Paper.qwik.mjs +0 -40
  84. package/lib/components/logos/Pterodactyl.d.ts +0 -2
  85. package/lib/components/logos/Pterodactyl.qwik.cjs +0 -35
  86. package/lib/components/logos/Pterodactyl.qwik.mjs +0 -35
  87. package/lib/components/logos/Purpur.d.ts +0 -2
  88. package/lib/components/logos/Purpur.qwik.cjs +0 -76
  89. package/lib/components/logos/Purpur.qwik.mjs +0 -76
  90. package/lib/components/logos/Velocity.d.ts +0 -2
  91. package/lib/components/logos/Velocity.qwik.cjs +0 -27
  92. package/lib/components/logos/Velocity.qwik.mjs +0 -27
  93. package/lib/components/logos/Waterfall.d.ts +0 -2
  94. package/lib/components/logos/Waterfall.qwik.cjs +0 -21
  95. package/lib/components/logos/Waterfall.qwik.mjs +0 -21
  96. package/lib/components/logos.d.ts +0 -10
  97. /package/lib/components/docs/{IconsLogos.d.ts → Label.d.ts} +0 -0
  98. /package/lib/{components/logos → svg}/IconProps.d.ts +0 -0
@@ -1,27 +1,12 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const jsxRuntime = require("@qwik.dev/core/jsx-runtime");
4
- const core = require("@qwik.dev/core");
5
- const Plus = require("../../svg/Plus.qwik.cjs");
6
- const Minus = require("../../svg/Minus.qwik.cjs");
7
- const NumberInput = core.component$((props) => {
8
- return /* @__PURE__ */ jsxRuntime.jsxs("div", {
9
- class: "flex flex-col",
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
- return /* @__PURE__ */ jsxRuntime.jsxs("div", {
35
- class: {
36
- "flex touch-manipulation gap-1 text-lum-text": true
37
- },
38
- children: [
39
- /* @__PURE__ */ jsxRuntime.jsx("button", {
40
- type: "button",
41
- class: {
42
- "lum-btn p-2 rounded-r-sm": true
43
- },
44
- "data-action": "decrement",
45
- "aria-label": "Decrement",
46
- disabled: props.min ? value <= props.min : false,
47
- onClick$: input ? core.$(async (event, element) => {
48
- const siblingInput = element.nextElementSibling;
49
- siblingInput.stepDown();
50
- await onDecrement$(event, element, siblingInput);
51
- }) : onDecrement$,
52
- children: /* @__PURE__ */ jsxRuntime.jsx(Minus.Minus, {
53
- size: 20
54
- })
55
- }),
56
- input && /* @__PURE__ */ jsxRuntime.jsx("input", {
57
- ...props,
58
- type: "number",
59
- value,
60
- step,
61
- class: {
62
- "lum-input text-center rounded-sm lum-input-p-1": true,
63
- ...props.class
64
- }
65
- }),
66
- /* @__PURE__ */ jsxRuntime.jsx("button", {
67
- type: "button",
68
- class: {
69
- "lum-btn p-2 rounded-l-sm": true
70
- },
71
- "data-action": "increment",
72
- "aria-label": "Increment",
73
- disabled: props.max ? value >= props.max : false,
74
- onClick$: input ? core.$(async (event, element) => {
75
- const siblingInput = element.previousElementSibling;
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 { jsxs, jsx } from "@qwik.dev/core/jsx-runtime";
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
- const NumberInput = component$((props) => {
6
- return /* @__PURE__ */ jsxs("div", {
7
- class: "flex flex-col",
8
- children: [
9
- /* @__PURE__ */ jsx("label", {
10
- for: props.id,
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
- return /* @__PURE__ */ jsxs("div", {
33
- class: {
34
- "flex touch-manipulation gap-1 text-lum-text": true
35
- },
36
- children: [
37
- /* @__PURE__ */ jsx("button", {
38
- type: "button",
39
- class: {
40
- "lum-btn p-2 rounded-r-sm": true
41
- },
42
- "data-action": "decrement",
43
- "aria-label": "Decrement",
44
- disabled: props.min ? value <= props.min : false,
45
- onClick$: input ? $(async (event, element) => {
46
- const siblingInput = element.nextElementSibling;
47
- siblingInput.stepDown();
48
- await onDecrement$(event, element, siblingInput);
49
- }) : onDecrement$,
50
- children: /* @__PURE__ */ jsx(Minus, {
51
- size: 20
52
- })
53
- }),
54
- input && /* @__PURE__ */ jsx("input", {
55
- ...props,
56
- type: "number",
57
- value,
58
- step,
59
- class: {
60
- "lum-input text-center rounded-sm lum-input-p-1": true,
61
- ...props.class
62
- }
63
- }),
64
- /* @__PURE__ */ jsx("button", {
65
- type: "button",
66
- class: {
67
- "lum-btn p-2 rounded-l-sm": true
68
- },
69
- "data-action": "increment",
70
- "aria-label": "Increment",
71
- disabled: props.max ? value >= props.max : false,
72
- onClick$: input ? $(async (event, element) => {
73
- const siblingInput = element.previousElementSibling;
74
- siblingInput.stepUp();
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 RangeInputRawProps extends Omit<PropsOf<'input'> & {
2
+ interface RangeInputProps extends Omit<PropsOf<'input'> & {
3
3
  type: 'number';
4
- }, 'class' | 'type'> {
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
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const jsxRuntime = require("@qwik.dev/core/jsx-runtime");
4
- const core = require("@qwik.dev/core");
5
- const RangeInput = core.component$((props) => {
6
- return /* @__PURE__ */ jsxRuntime.jsxs("div", {
7
- class: "flex flex-col",
8
- children: [
9
- /* @__PURE__ */ jsxRuntime.jsx("label", {
10
- for: props.id,
11
- class: "pb-1 text-lum-text select-none",
12
- children: /* @__PURE__ */ jsxRuntime.jsx(core.Slot, {})
13
- }),
14
- /* @__PURE__ */ jsxRuntime.jsx(RangeInputRaw, {
15
- ...props,
16
- children: void 0
17
- })
18
- ]
19
- });
20
- });
21
- const RangeInputRaw = core.component$(({ value, min = 0, max = 10, onInput$, ...props }) => {
22
- const valueSignal = core.useSignal(value ?? min);
23
- const filledPercentage = core.useComputed$(() => (valueSignal.value - min) / (max - min) * 100);
24
- const tickCount = max - min - 1;
25
- return /* @__PURE__ */ jsxRuntime.jsxs("div", {
26
- class: {
27
- "group relative flex touch-manipulation gap-1 text-lum-text lum-input p-0": true
28
- },
29
- children: [
30
- /* @__PURE__ */ jsxRuntime.jsx("div", {
31
- class: "absolute w-full flex justify-evenly",
32
- children: tickCount > 0 && [
33
- ...Array(tickCount)
34
- ].map((_, i) => {
35
- return /* @__PURE__ */ jsxRuntime.jsx("div", {
36
- class: "border-l border-l-lum-border/20 h-1 my-0.5"
37
- }, i);
38
- })
39
- }),
40
- /* @__PURE__ */ jsxRuntime.jsx("div", {
41
- class: "h-2 lum-bg-lum-accent group-hover:lum-bg-lum-accent rounded-lum",
42
- style: {
43
- width: `${filledPercentage.value}%`
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 { jsxs, jsx } from "@qwik.dev/core/jsx-runtime";
2
- import { component$, Slot, useSignal, useComputed$ } from "@qwik.dev/core";
3
- const RangeInput = component$((props) => {
4
- return /* @__PURE__ */ jsxs("div", {
5
- class: "flex flex-col",
6
- children: [
7
- /* @__PURE__ */ jsx("label", {
8
- for: props.id,
9
- class: "pb-1 text-lum-text select-none",
10
- children: /* @__PURE__ */ jsx(Slot, {})
11
- }),
12
- /* @__PURE__ */ jsx(RangeInputRaw, {
13
- ...props,
14
- children: void 0
15
- })
16
- ]
17
- });
18
- });
19
- const RangeInputRaw = component$(({ value, min = 0, max = 10, onInput$, ...props }) => {
20
- const valueSignal = useSignal(value ?? min);
21
- const filledPercentage = useComputed$(() => (valueSignal.value - min) / (max - min) * 100);
22
- const tickCount = max - min - 1;
23
- return /* @__PURE__ */ jsxs("div", {
24
- class: {
25
- "group relative flex touch-manipulation gap-1 text-lum-text lum-input p-0": true
26
- },
27
- children: [
28
- /* @__PURE__ */ jsx("div", {
29
- class: "absolute w-full flex justify-evenly",
30
- children: tickCount > 0 && [
31
- ...Array(tickCount)
32
- ].map((_, i) => {
33
- return /* @__PURE__ */ jsx("div", {
34
- class: "border-l border-l-lum-border/20 h-1 my-0.5"
35
- }, i);
36
- })
37
- }),
38
- /* @__PURE__ */ jsx("div", {
39
- class: "h-2 lum-bg-lum-accent group-hover:lum-bg-lum-accent rounded-lum",
40
- style: {
41
- width: `${filledPercentage.value}%`
42
- }
43
- }),
44
- /* @__PURE__ */ jsxs("div", {
45
- class: "absolute -top-1 flex flex-col gap-4 items-center",
46
- style: {
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'>, 'class' | 'size'> {
3
- class?: {
4
- [key: string]: boolean;
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 {};