@luminescent/ui-qwik 6.8.3-qwikv2 → 6.9.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 (135) hide show
  1. package/LICENSE +661 -0
  2. package/lib/index.qwik.cjs +1747 -41
  3. package/lib/index.qwik.mjs +1748 -19
  4. package/lib-types/components/docs/Anchor.d.ts +4 -0
  5. package/lib-types/components/docs/Blobs.d.ts +4 -0
  6. package/lib-types/components/docs/ColorPicker.d.ts +4 -0
  7. package/lib-types/components/docs/Dropdown.d.ts +4 -0
  8. package/lib-types/components/docs/IconsLogos.d.ts +4 -0
  9. package/lib-types/components/docs/Nav.d.ts +4 -0
  10. package/lib-types/components/docs/NumberInput.d.ts +4 -0
  11. package/lib-types/components/docs/RangeInput.d.ts +4 -0
  12. package/lib-types/components/docs/SelectMenu.d.ts +4 -0
  13. package/lib-types/components/docs/Settings.d.ts +2 -0
  14. package/lib-types/components/docs/Sidebar.d.ts +4 -0
  15. package/lib-types/components/docs/Toggle.d.ts +4 -0
  16. package/lib-types/components/docs/lum-btn.d.ts +4 -0
  17. package/lib-types/components/docs/lum-card.d.ts +4 -0
  18. package/lib-types/components/docs/lum-classes.d.ts +4 -0
  19. package/lib-types/components/docs/lum-input.d.ts +4 -0
  20. package/{lib → lib-types}/components/elements/Anchor.d.ts +2 -2
  21. package/{lib → lib-types}/components/elements/Blobs.d.ts +1 -1
  22. package/{lib → lib-types}/components/elements/ColorPicker.d.ts +2 -2
  23. package/{lib → lib-types}/components/elements/Dropdown.d.ts +2 -2
  24. package/{lib → lib-types}/components/elements/Nav.d.ts +2 -2
  25. package/lib-types/components/elements/NumberInput.d.ts +21 -0
  26. package/{lib → lib-types}/components/elements/RangeInput.d.ts +3 -3
  27. package/{lib → lib-types}/components/elements/SelectMenu.d.ts +3 -3
  28. package/{lib → lib-types}/components/elements/Sidebar.d.ts +2 -2
  29. package/{lib → lib-types}/components/elements/Toggle.d.ts +2 -2
  30. package/lib-types/components/logos/Birdflop.d.ts +7 -0
  31. package/lib-types/components/logos/Discord.d.ts +2 -0
  32. package/lib-types/components/logos/Fabric.d.ts +2 -0
  33. package/lib-types/components/logos/Forge.d.ts +2 -0
  34. package/{lib → lib-types}/components/logos/IconProps.d.ts +1 -1
  35. package/lib-types/components/logos/Luminescent.d.ts +3 -0
  36. package/lib-types/components/logos/Paper.d.ts +2 -0
  37. package/lib-types/components/logos/Pterodactyl.d.ts +2 -0
  38. package/lib-types/components/logos/Purpur.d.ts +2 -0
  39. package/lib-types/components/logos/Velocity.d.ts +2 -0
  40. package/lib-types/components/logos/Waterfall.d.ts +2 -0
  41. package/{lib → lib-types}/components/logos.d.ts +3 -0
  42. package/lib-types/entry.dev.d.ts +2 -0
  43. package/lib-types/entry.ssr.d.ts +14 -0
  44. package/lib-types/root.d.ts +3 -0
  45. package/lib-types/svg/ChevronDown.d.ts +2 -0
  46. package/lib-types/svg/Link.d.ts +2 -0
  47. package/lib-types/svg/Menu.d.ts +2 -0
  48. package/{lib/svg/Shuffle.d.ts → lib-types/svg/Minus.d.ts} +1 -1
  49. package/lib-types/svg/Plus.d.ts +2 -0
  50. package/lib-types/svg/Shuffle.d.ts +2 -0
  51. package/package.json +35 -32
  52. package/tailwind.config.js +94 -0
  53. package/lib/components/docs/Anchor.d.ts +0 -4
  54. package/lib/components/docs/Blobs.d.ts +0 -4
  55. package/lib/components/docs/ColorPicker.d.ts +0 -4
  56. package/lib/components/docs/Dropdown.d.ts +0 -4
  57. package/lib/components/docs/IconsLogos.d.ts +0 -4
  58. package/lib/components/docs/Nav.d.ts +0 -4
  59. package/lib/components/docs/NumberInput.d.ts +0 -4
  60. package/lib/components/docs/RangeInput.d.ts +0 -4
  61. package/lib/components/docs/SelectMenu.d.ts +0 -4
  62. package/lib/components/docs/Settings.d.ts +0 -2
  63. package/lib/components/docs/Sidebar.d.ts +0 -4
  64. package/lib/components/docs/Toggle.d.ts +0 -4
  65. package/lib/components/docs/lum-btn.d.ts +0 -4
  66. package/lib/components/docs/lum-card.d.ts +0 -4
  67. package/lib/components/docs/lum-classes.d.ts +0 -4
  68. package/lib/components/docs/lum-input.d.ts +0 -4
  69. package/lib/components/elements/Anchor.qwik.cjs +0 -23
  70. package/lib/components/elements/Anchor.qwik.mjs +0 -23
  71. package/lib/components/elements/Blobs.qwik.cjs +0 -185
  72. package/lib/components/elements/Blobs.qwik.mjs +0 -184
  73. package/lib/components/elements/ColorPicker.qwik.cjs +0 -283
  74. package/lib/components/elements/ColorPicker.qwik.mjs +0 -283
  75. package/lib/components/elements/Dropdown.qwik.cjs +0 -28
  76. package/lib/components/elements/Dropdown.qwik.mjs +0 -28
  77. package/lib/components/elements/Nav.qwik.cjs +0 -80
  78. package/lib/components/elements/Nav.qwik.mjs +0 -80
  79. package/lib/components/elements/NumberInput.d.ts +0 -21
  80. package/lib/components/elements/NumberInput.qwik.cjs +0 -74
  81. package/lib/components/elements/NumberInput.qwik.mjs +0 -73
  82. package/lib/components/elements/RangeInput.qwik.cjs +0 -59
  83. package/lib/components/elements/RangeInput.qwik.mjs +0 -58
  84. package/lib/components/elements/SelectMenu.qwik.cjs +0 -109
  85. package/lib/components/elements/SelectMenu.qwik.mjs +0 -108
  86. package/lib/components/elements/Sidebar.qwik.cjs +0 -30
  87. package/lib/components/elements/Sidebar.qwik.mjs +0 -30
  88. package/lib/components/elements/Toggle.qwik.cjs +0 -31
  89. package/lib/components/elements/Toggle.qwik.mjs +0 -31
  90. package/lib/components/functions.qwik.cjs +0 -17
  91. package/lib/components/functions.qwik.mjs +0 -17
  92. package/lib/components/logos/Birdflop.d.ts +0 -10
  93. package/lib/components/logos/Birdflop.qwik.cjs +0 -66
  94. package/lib/components/logos/Birdflop.qwik.mjs +0 -67
  95. package/lib/components/logos/Fabric.d.ts +0 -5
  96. package/lib/components/logos/Fabric.qwik.cjs +0 -30
  97. package/lib/components/logos/Fabric.qwik.mjs +0 -31
  98. package/lib/components/logos/Forge.d.ts +0 -5
  99. package/lib/components/logos/Forge.qwik.cjs +0 -29
  100. package/lib/components/logos/Forge.qwik.mjs +0 -30
  101. package/lib/components/logos/Luminescent.d.ts +0 -9
  102. package/lib/components/logos/Luminescent.qwik.cjs +0 -123
  103. package/lib/components/logos/Luminescent.qwik.mjs +0 -122
  104. package/lib/components/logos/Paper.d.ts +0 -5
  105. package/lib/components/logos/Paper.qwik.cjs +0 -41
  106. package/lib/components/logos/Paper.qwik.mjs +0 -42
  107. package/lib/components/logos/Purpur.d.ts +0 -5
  108. package/lib/components/logos/Purpur.qwik.cjs +0 -75
  109. package/lib/components/logos/Purpur.qwik.mjs +0 -76
  110. package/lib/components/logos/Waterfall.d.ts +0 -5
  111. package/lib/components/logos/Waterfall.qwik.cjs +0 -20
  112. package/lib/components/logos/Waterfall.qwik.mjs +0 -21
  113. package/lib/svg/ChevronDown.d.ts +0 -2
  114. package/lib/svg/ChevronDown.qwik.cjs +0 -20
  115. package/lib/svg/ChevronDown.qwik.mjs +0 -21
  116. package/lib/svg/Link.d.ts +0 -2
  117. package/lib/svg/Link.qwik.cjs +0 -29
  118. package/lib/svg/Link.qwik.mjs +0 -30
  119. package/lib/svg/Menu.d.ts +0 -2
  120. package/lib/svg/Menu.qwik.cjs +0 -24
  121. package/lib/svg/Menu.qwik.mjs +0 -25
  122. package/lib/svg/Minus.d.ts +0 -2
  123. package/lib/svg/Minus.qwik.cjs +0 -20
  124. package/lib/svg/Minus.qwik.mjs +0 -21
  125. package/lib/svg/Plus.d.ts +0 -2
  126. package/lib/svg/Plus.qwik.cjs +0 -20
  127. package/lib/svg/Plus.qwik.mjs +0 -21
  128. package/lib/svg/Shuffle.qwik.cjs +0 -26
  129. package/lib/svg/Shuffle.qwik.mjs +0 -27
  130. package/lib/utils/color.qwik.cjs +0 -120
  131. package/lib/utils/color.qwik.mjs +0 -114
  132. /package/{lib → lib-types}/components/elements.d.ts +0 -0
  133. /package/{lib → lib-types}/components/functions.d.ts +0 -0
  134. /package/{lib → lib-types}/index.d.ts +0 -0
  135. /package/{lib → lib-types}/utils/color.d.ts +0 -0
@@ -1,80 +0,0 @@
1
- const require_Menu = require("../../svg/Menu.qwik.cjs");
2
- let _qwik_dev_core_jsx_runtime = require("@qwik.dev/core/jsx-runtime");
3
- let _qwik_dev_core = require("@qwik.dev/core");
4
- //#region src/components/elements/Nav.tsx
5
- var Nav = (0, _qwik_dev_core.component$)(({ fixed, floating, noblur, nohamburger, nodismiss, colorClass = "lum-bg-lum-card-bg", ...props }) => {
6
- const menu = (0, _qwik_dev_core.useSignal)(false);
7
- (0, _qwik_dev_core.useTask$)(({ track }) => {
8
- track(() => menu.value);
9
- if (menu.value && !nodismiss) {
10
- const onClick = (e) => {
11
- let el = e.target;
12
- while (el) {
13
- if (el.classList && el.classList.contains("nav-ignore-dismiss")) return;
14
- el = el.parentElement;
15
- }
16
- menu.value = false;
17
- window.removeEventListener("click", onClick);
18
- };
19
- window.addEventListener("click", onClick);
20
- }
21
- });
22
- return /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsxs)("nav", {
23
- ...props,
24
- class: {
25
- "top-0 left-0 z-50 flex w-full flex-col": true,
26
- fixed,
27
- absolute: !fixed,
28
- ...props.class
29
- },
30
- children: [!nohamburger && /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsx)("div", {
31
- class: {
32
- "absolute top-full lum-card motion-safe:transition-all sm:hidden max-w-7xl gap-2 px-2 py-4": true,
33
- "w-[calc(100%-(--spacing(8)))] mx-4": floating,
34
- "w-[calc(100%-(--spacing(4)))] mx-2": !floating,
35
- "mt-2": menu.value,
36
- "pointer-events-none opacity-0 -mt-2 scale-95": !menu.value,
37
- "backdrop-blur-lg": !noblur,
38
- [colorClass]: true
39
- },
40
- children: /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsx)(_qwik_dev_core.Slot, { name: "mobile" })
41
- }), /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsx)("div", {
42
- class: {
43
- [colorClass]: !floating,
44
- "border-x-0! border-t-0!": !floating,
45
- "backdrop-blur-lg": !noblur && !floating,
46
- "relative mx-2 mt-2": floating
47
- },
48
- children: /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsxs)("div", {
49
- class: {
50
- "mx-auto flex w-full max-w-7xl justify-evenly px-2": true,
51
- [colorClass]: floating,
52
- "rounded-lum border": floating,
53
- "backdrop-blur-lg": !noblur && floating
54
- },
55
- children: [
56
- /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsx)("div", {
57
- class: "flex flex-1 items-center justify-start gap-2 py-2",
58
- children: /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsx)(_qwik_dev_core.Slot, { name: "start" })
59
- }),
60
- /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsx)("div", {
61
- class: "flex flex-1 items-center justify-center gap-2 py-2",
62
- children: /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsx)(_qwik_dev_core.Slot, { name: "center" })
63
- }),
64
- /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsxs)("div", {
65
- class: "flex flex-1 items-center justify-end gap-2 py-2",
66
- children: [/* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsx)(_qwik_dev_core.Slot, { name: "end" }), !nohamburger && /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsx)("button", {
67
- name: "Navigation Menu",
68
- title: "Navigation Menu",
69
- class: "lum-btn lum-bg-transparent p-2 sm:hidden rounded-lum-2",
70
- onClick$: () => menu.value = !menu.value,
71
- children: /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsx)(require_Menu.Menu, { size: 24 })
72
- })]
73
- })
74
- ]
75
- })
76
- })]
77
- });
78
- });
79
- //#endregion
80
- exports.Nav = Nav;
@@ -1,80 +0,0 @@
1
- import { Menu } from "../../svg/Menu.qwik.mjs";
2
- import { jsx, jsxs } from "@qwik.dev/core/jsx-runtime";
3
- import { Slot, component$, useSignal, useTask$ } from "@qwik.dev/core";
4
- //#region src/components/elements/Nav.tsx
5
- var Nav = component$(({ fixed, floating, noblur, nohamburger, nodismiss, colorClass = "lum-bg-lum-card-bg", ...props }) => {
6
- const menu = useSignal(false);
7
- useTask$(({ track }) => {
8
- track(() => menu.value);
9
- if (menu.value && !nodismiss) {
10
- const onClick = (e) => {
11
- let el = e.target;
12
- while (el) {
13
- if (el.classList && el.classList.contains("nav-ignore-dismiss")) return;
14
- el = el.parentElement;
15
- }
16
- menu.value = false;
17
- window.removeEventListener("click", onClick);
18
- };
19
- window.addEventListener("click", onClick);
20
- }
21
- });
22
- return /* @__PURE__ */ jsxs("nav", {
23
- ...props,
24
- class: {
25
- "top-0 left-0 z-50 flex w-full flex-col": true,
26
- fixed,
27
- absolute: !fixed,
28
- ...props.class
29
- },
30
- children: [!nohamburger && /* @__PURE__ */ jsx("div", {
31
- class: {
32
- "absolute top-full lum-card motion-safe:transition-all sm:hidden max-w-7xl gap-2 px-2 py-4": true,
33
- "w-[calc(100%-(--spacing(8)))] mx-4": floating,
34
- "w-[calc(100%-(--spacing(4)))] mx-2": !floating,
35
- "mt-2": menu.value,
36
- "pointer-events-none opacity-0 -mt-2 scale-95": !menu.value,
37
- "backdrop-blur-lg": !noblur,
38
- [colorClass]: true
39
- },
40
- children: /* @__PURE__ */ jsx(Slot, { name: "mobile" })
41
- }), /* @__PURE__ */ jsx("div", {
42
- class: {
43
- [colorClass]: !floating,
44
- "border-x-0! border-t-0!": !floating,
45
- "backdrop-blur-lg": !noblur && !floating,
46
- "relative mx-2 mt-2": floating
47
- },
48
- children: /* @__PURE__ */ jsxs("div", {
49
- class: {
50
- "mx-auto flex w-full max-w-7xl justify-evenly px-2": true,
51
- [colorClass]: floating,
52
- "rounded-lum border": floating,
53
- "backdrop-blur-lg": !noblur && floating
54
- },
55
- children: [
56
- /* @__PURE__ */ jsx("div", {
57
- class: "flex flex-1 items-center justify-start gap-2 py-2",
58
- children: /* @__PURE__ */ jsx(Slot, { name: "start" })
59
- }),
60
- /* @__PURE__ */ jsx("div", {
61
- class: "flex flex-1 items-center justify-center gap-2 py-2",
62
- children: /* @__PURE__ */ jsx(Slot, { name: "center" })
63
- }),
64
- /* @__PURE__ */ jsxs("div", {
65
- class: "flex flex-1 items-center justify-end gap-2 py-2",
66
- children: [/* @__PURE__ */ jsx(Slot, { name: "end" }), !nohamburger && /* @__PURE__ */ jsx("button", {
67
- name: "Navigation Menu",
68
- title: "Navigation Menu",
69
- class: "lum-btn lum-bg-transparent p-2 sm:hidden rounded-lum-2",
70
- onClick$: () => menu.value = !menu.value,
71
- children: /* @__PURE__ */ jsx(Menu, { size: 24 })
72
- })]
73
- })
74
- ]
75
- })
76
- })]
77
- });
78
- });
79
- //#endregion
80
- export { Nav };
@@ -1,21 +0,0 @@
1
- import type { PropsOf, QRL } from '@qwik.dev/core';
2
- interface NumberInputRawProps extends Omit<PropsOf<'input'> & {
3
- type: 'number';
4
- }, 'class' | 'type'> {
5
- onDecrement$: QRL<(event: PointerEvent, element: HTMLButtonElement, inputElement?: HTMLInputElement) => void>;
6
- onIncrement$: QRL<(event: PointerEvent, element: HTMLButtonElement, inputElement?: HTMLInputElement) => void>;
7
- input?: boolean;
8
- class?: {
9
- [key: string]: boolean;
10
- };
11
- value?: number;
12
- min?: number;
13
- max?: number;
14
- step?: number;
15
- }
16
- interface NumberInputProps extends Omit<NumberInputRawProps, 'children'> {
17
- id: string;
18
- }
19
- export declare const NumberInput: import("@qwik.dev/core").Component<NumberInputProps>;
20
- export declare const NumberInputRaw: import("@qwik.dev/core").Component<NumberInputRawProps>;
21
- export {};
@@ -1,74 +0,0 @@
1
- const require_Plus = require("../../svg/Plus.qwik.cjs");
2
- const require_Minus = require("../../svg/Minus.qwik.cjs");
3
- let _qwik_dev_core_jsx_runtime = require("@qwik.dev/core/jsx-runtime");
4
- let _qwik_dev_core = require("@qwik.dev/core");
5
- //#region src/components/elements/NumberInput.tsx
6
- var NumberInput = (0, _qwik_dev_core.component$)((props) => {
7
- return /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsxs)("div", {
8
- class: "flex flex-col",
9
- children: [/* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsx)("label", {
10
- for: props.id,
11
- class: "pb-1 text-lum-text select-none",
12
- children: /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsx)(_qwik_dev_core.Slot, {})
13
- }), /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsx)(NumberInputRaw, {
14
- ...props,
15
- children: void 0
16
- })]
17
- });
18
- });
19
- var NumberInputRaw = (0, _qwik_dev_core.component$)(({ input, onDecrement$, onIncrement$, value = 0, step = 1, ...props }) => {
20
- (0, _qwik_dev_core.useStyles$)(`
21
- input::-webkit-outer-spin-button,
22
- input::-webkit-inner-spin-button {
23
- -webkit-appearance: none;
24
- margin: 0;
25
- }
26
- input[type=number] {
27
- -moz-appearance: textfield;
28
- }
29
- `);
30
- return /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsxs)("div", {
31
- class: { "flex touch-manipulation gap-1 text-lum-text": true },
32
- children: [
33
- /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsx)("button", {
34
- type: "button",
35
- class: { "lum-btn p-2 rounded-r-sm": true },
36
- "data-action": "decrement",
37
- "aria-label": "Decrement",
38
- disabled: props.min ? value <= props.min : false,
39
- onClick$: input ? (0, _qwik_dev_core.$)(async (event, element) => {
40
- const siblingInput = element.nextElementSibling;
41
- siblingInput.stepDown();
42
- await onDecrement$(event, element, siblingInput);
43
- }) : onDecrement$,
44
- children: /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsx)(require_Minus.Minus, { size: 20 })
45
- }),
46
- input && /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsx)("input", {
47
- ...props,
48
- type: "number",
49
- value,
50
- step,
51
- class: {
52
- "lum-input text-center rounded-sm lum-input-p-1": true,
53
- ...props.class
54
- }
55
- }),
56
- /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsx)("button", {
57
- type: "button",
58
- class: { "lum-btn p-2 rounded-l-sm": true },
59
- "data-action": "increment",
60
- "aria-label": "Increment",
61
- disabled: props.max ? value >= props.max : false,
62
- onClick$: input ? (0, _qwik_dev_core.$)(async (event, element) => {
63
- const siblingInput = element.previousElementSibling;
64
- siblingInput.stepUp();
65
- await onIncrement$(event, element, siblingInput);
66
- }) : onIncrement$,
67
- children: /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsx)(require_Plus.Plus, { size: 20 })
68
- })
69
- ]
70
- });
71
- });
72
- //#endregion
73
- exports.NumberInput = NumberInput;
74
- exports.NumberInputRaw = NumberInputRaw;
@@ -1,73 +0,0 @@
1
- import { Plus } from "../../svg/Plus.qwik.mjs";
2
- import { Minus } from "../../svg/Minus.qwik.mjs";
3
- import { jsx, jsxs } from "@qwik.dev/core/jsx-runtime";
4
- import { $, Slot, component$, useStyles$ } from "@qwik.dev/core";
5
- //#region src/components/elements/NumberInput.tsx
6
- var NumberInput = component$((props) => {
7
- return /* @__PURE__ */ jsxs("div", {
8
- class: "flex flex-col",
9
- children: [/* @__PURE__ */ jsx("label", {
10
- for: props.id,
11
- class: "pb-1 text-lum-text select-none",
12
- children: /* @__PURE__ */ jsx(Slot, {})
13
- }), /* @__PURE__ */ jsx(NumberInputRaw, {
14
- ...props,
15
- children: void 0
16
- })]
17
- });
18
- });
19
- var NumberInputRaw = component$(({ input, onDecrement$, onIncrement$, value = 0, step = 1, ...props }) => {
20
- useStyles$(`
21
- input::-webkit-outer-spin-button,
22
- input::-webkit-inner-spin-button {
23
- -webkit-appearance: none;
24
- margin: 0;
25
- }
26
- input[type=number] {
27
- -moz-appearance: textfield;
28
- }
29
- `);
30
- return /* @__PURE__ */ jsxs("div", {
31
- class: { "flex touch-manipulation gap-1 text-lum-text": true },
32
- children: [
33
- /* @__PURE__ */ jsx("button", {
34
- type: "button",
35
- class: { "lum-btn p-2 rounded-r-sm": true },
36
- "data-action": "decrement",
37
- "aria-label": "Decrement",
38
- disabled: props.min ? value <= props.min : false,
39
- onClick$: input ? $(async (event, element) => {
40
- const siblingInput = element.nextElementSibling;
41
- siblingInput.stepDown();
42
- await onDecrement$(event, element, siblingInput);
43
- }) : onDecrement$,
44
- children: /* @__PURE__ */ jsx(Minus, { size: 20 })
45
- }),
46
- input && /* @__PURE__ */ jsx("input", {
47
- ...props,
48
- type: "number",
49
- value,
50
- step,
51
- class: {
52
- "lum-input text-center rounded-sm lum-input-p-1": true,
53
- ...props.class
54
- }
55
- }),
56
- /* @__PURE__ */ jsx("button", {
57
- type: "button",
58
- class: { "lum-btn p-2 rounded-l-sm": true },
59
- "data-action": "increment",
60
- "aria-label": "Increment",
61
- disabled: props.max ? value >= props.max : false,
62
- onClick$: input ? $(async (event, element) => {
63
- const siblingInput = element.previousElementSibling;
64
- siblingInput.stepUp();
65
- await onIncrement$(event, element, siblingInput);
66
- }) : onIncrement$,
67
- children: /* @__PURE__ */ jsx(Plus, { size: 20 })
68
- })
69
- ]
70
- });
71
- });
72
- //#endregion
73
- export { NumberInput, NumberInputRaw };
@@ -1,59 +0,0 @@
1
- let _qwik_dev_core_jsx_runtime = require("@qwik.dev/core/jsx-runtime");
2
- let _qwik_dev_core = require("@qwik.dev/core");
3
- //#region src/components/elements/RangeInput.tsx
4
- var RangeInput = (0, _qwik_dev_core.component$)((props) => {
5
- return /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsxs)("div", {
6
- class: "flex flex-col",
7
- children: [/* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsx)("label", {
8
- for: props.id,
9
- class: "pb-1 text-lum-text select-none",
10
- children: /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsx)(_qwik_dev_core.Slot, {})
11
- }), /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsx)(RangeInputRaw, {
12
- ...props,
13
- children: void 0
14
- })]
15
- });
16
- });
17
- var RangeInputRaw = (0, _qwik_dev_core.component$)(({ value, min = 0, max = 10, onInput$, ...props }) => {
18
- const valueSignal = (0, _qwik_dev_core.useSignal)(value ?? min);
19
- const filledPercentage = (0, _qwik_dev_core.useComputed$)(() => (valueSignal.value - min) / (max - min) * 100);
20
- const tickCount = max - min - 1;
21
- return /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsxs)("div", {
22
- class: { "group relative flex touch-manipulation gap-1 text-lum-text lum-input p-0": true },
23
- children: [
24
- /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsx)("div", {
25
- class: "absolute w-full flex justify-evenly",
26
- children: tickCount > 0 && [...Array(tickCount)].map((_, i) => {
27
- return /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsx)("div", { class: "border-l border-l-lum-border/20 h-1 my-0.5" }, i);
28
- })
29
- }),
30
- /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsx)("div", {
31
- class: "h-2 lum-bg-lum-accent group-hover:lum-bg-lum-accent rounded-lum",
32
- style: { width: `${filledPercentage.value}%` }
33
- }),
34
- /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsxs)("div", {
35
- class: "absolute -top-1 flex flex-col gap-4 items-center",
36
- style: { left: `calc(${filledPercentage.value}% - 0.5rem)` },
37
- children: [/* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsx)("div", { class: "w-4 h-4 lum-bg-lum-accent group-hover:lum-bg-lum-accent rounded-full" }), /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsx)("div", {
38
- 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",
39
- children: valueSignal.value
40
- })]
41
- }),
42
- /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsx)("input", {
43
- ...props,
44
- min,
45
- max,
46
- type: "range",
47
- value: valueSignal.value,
48
- class: "absolute top-0 h-2 w-full opacity-0 cursor-pointer",
49
- onInput$: async (event, element) => {
50
- valueSignal.value = parseFloat(element.value);
51
- if (onInput$) await onInput$(event, element);
52
- }
53
- })
54
- ]
55
- });
56
- });
57
- //#endregion
58
- exports.RangeInput = RangeInput;
59
- exports.RangeInputRaw = RangeInputRaw;
@@ -1,58 +0,0 @@
1
- import { jsx, jsxs } from "@qwik.dev/core/jsx-runtime";
2
- import { Slot, component$, useComputed$, useSignal } from "@qwik.dev/core";
3
- //#region src/components/elements/RangeInput.tsx
4
- var RangeInput = component$((props) => {
5
- return /* @__PURE__ */ jsxs("div", {
6
- class: "flex flex-col",
7
- children: [/* @__PURE__ */ jsx("label", {
8
- for: props.id,
9
- class: "pb-1 text-lum-text select-none",
10
- children: /* @__PURE__ */ jsx(Slot, {})
11
- }), /* @__PURE__ */ jsx(RangeInputRaw, {
12
- ...props,
13
- children: void 0
14
- })]
15
- });
16
- });
17
- var RangeInputRaw = component$(({ value, min = 0, max = 10, onInput$, ...props }) => {
18
- const valueSignal = useSignal(value ?? min);
19
- const filledPercentage = useComputed$(() => (valueSignal.value - min) / (max - min) * 100);
20
- const tickCount = max - min - 1;
21
- return /* @__PURE__ */ jsxs("div", {
22
- class: { "group relative flex touch-manipulation gap-1 text-lum-text lum-input p-0": true },
23
- children: [
24
- /* @__PURE__ */ jsx("div", {
25
- class: "absolute w-full flex justify-evenly",
26
- children: tickCount > 0 && [...Array(tickCount)].map((_, i) => {
27
- return /* @__PURE__ */ jsx("div", { class: "border-l border-l-lum-border/20 h-1 my-0.5" }, i);
28
- })
29
- }),
30
- /* @__PURE__ */ jsx("div", {
31
- class: "h-2 lum-bg-lum-accent group-hover:lum-bg-lum-accent rounded-lum",
32
- style: { width: `${filledPercentage.value}%` }
33
- }),
34
- /* @__PURE__ */ jsxs("div", {
35
- class: "absolute -top-1 flex flex-col gap-4 items-center",
36
- style: { left: `calc(${filledPercentage.value}% - 0.5rem)` },
37
- children: [/* @__PURE__ */ jsx("div", { class: "w-4 h-4 lum-bg-lum-accent group-hover:lum-bg-lum-accent rounded-full" }), /* @__PURE__ */ jsx("div", {
38
- 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",
39
- children: valueSignal.value
40
- })]
41
- }),
42
- /* @__PURE__ */ jsx("input", {
43
- ...props,
44
- min,
45
- max,
46
- type: "range",
47
- value: valueSignal.value,
48
- class: "absolute top-0 h-2 w-full opacity-0 cursor-pointer",
49
- onInput$: async (event, element) => {
50
- valueSignal.value = parseFloat(element.value);
51
- if (onInput$) await onInput$(event, element);
52
- }
53
- })
54
- ]
55
- });
56
- });
57
- //#endregion
58
- export { RangeInput, RangeInputRaw };
@@ -1,109 +0,0 @@
1
- const require_Dropdown = require("./Dropdown.qwik.cjs");
2
- let _qwik_dev_core_jsx_runtime = require("@qwik.dev/core/jsx-runtime");
3
- let _qwik_dev_core = require("@qwik.dev/core");
4
- //#region src/components/elements/SelectMenu.tsx
5
- var SelectMenu = (0, _qwik_dev_core.component$)((props) => {
6
- return /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsxs)("div", {
7
- class: "flex flex-col",
8
- children: [/* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsx)("label", {
9
- for: props.id ? `${props.id}-dropdown` : void 0,
10
- class: "pb-1 text-lum-text select-none",
11
- children: /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsx)(_qwik_dev_core.Slot, {})
12
- }), /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsxs)(SelectMenuRaw, {
13
- ...props,
14
- children: [/* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsx)("div", {
15
- "q:slot": "dropdown",
16
- children: (props.customDropdown || !props.values?.length) && /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsx)(_qwik_dev_core.Slot, { name: "dropdown" })
17
- }), /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsx)("div", {
18
- "q:slot": "extra-buttons",
19
- children: /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsx)(_qwik_dev_core.Slot, { name: "extra-buttons" })
20
- })]
21
- })]
22
- });
23
- });
24
- var SelectMenuRaw = (0, _qwik_dev_core.component$)(({ values, class: Class, panelClass = "lum-bg-lum-input-bg", btnClass = "lum-bg-transparent", noblur, nocloseonclick, customDropdown, hover, align, ...props }) => {
25
- const store = (0, _qwik_dev_core.useStore)({
26
- opened: false,
27
- value: props.value
28
- });
29
- const selectRef = (0, _qwik_dev_core.useSignal)();
30
- const selected = values?.find((v) => v.value === store.value);
31
- return /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsxs)("div", {
32
- class: {
33
- "relative touch-manipulation": true,
34
- group: hover
35
- },
36
- children: [
37
- values && /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsx)("select", {
38
- ...props,
39
- ref: selectRef,
40
- class: "hidden",
41
- children: values.map((value, i) => {
42
- return /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsx)("option", {
43
- value: value.value,
44
- children: `${value.value}`
45
- }, i);
46
- })
47
- }),
48
- /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsxs)(require_Dropdown.Dropdown, {
49
- id: props.id ? `${props.id}-dropdown` : void 0,
50
- opened: store.opened,
51
- class: {
52
- "w-full": true,
53
- ...Class
54
- },
55
- onClick$: (e, el) => {
56
- if (hover) return;
57
- store.opened = !store.opened;
58
- if (nocloseonclick) return;
59
- const listener = (e) => {
60
- if (!store.opened) return document.removeEventListener("click", listener);
61
- if (e.composedPath().includes(el)) return;
62
- store.opened = false;
63
- document.removeEventListener("click", listener);
64
- };
65
- document.addEventListener("click", listener);
66
- },
67
- children: [customDropdown && /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsx)(_qwik_dev_core.Slot, { name: "dropdown" }), !customDropdown && (selected?.name ?? values?.[0]?.name ?? /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsx)(_qwik_dev_core.Slot, { name: "dropdown" }))]
68
- }),
69
- hover && /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsx)("div", { class: "h-2 absolute w-full" }),
70
- /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsxs)("div", {
71
- class: {
72
- "absolute z-1000 mt-2": true,
73
- "backdrop-blur-lg": !noblur,
74
- "lum-scroll flex max-h-72 flex-col gap-1 overflow-auto rounded-lum border p-1 select-none motion-safe:transition-all ease-out": true,
75
- "left-0": align === "left",
76
- "right-0": align === "right",
77
- "left-1/2 -translate-x-1/2": align === "center",
78
- "pointer-events-none scale-95 opacity-0": !store.opened,
79
- "duration-300 group-hover:pointer-events-auto group-hover:scale-100 group-hover:opacity-100 group-hover:duration-75": hover,
80
- "focus-within:pointer-events-auto focus-within:scale-100 focus-within:opacity-100 focus-within:duration-75": true,
81
- [panelClass]: true
82
- },
83
- children: [values?.map(({ name, value }, i) => {
84
- return /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsx)("button", {
85
- type: "button",
86
- class: {
87
- "lum-btn rounded-lum-1": true,
88
- [btnClass]: true
89
- },
90
- onClick$: (e, el) => {
91
- el.blur();
92
- store.opened = false;
93
- const select = selectRef.value;
94
- if (select) {
95
- select.value = value.toString();
96
- select.dispatchEvent(new Event("change"));
97
- }
98
- store.value = value.toString();
99
- },
100
- children: name
101
- }, i);
102
- }), /* @__PURE__ */ (0, _qwik_dev_core_jsx_runtime.jsx)(_qwik_dev_core.Slot, { name: "extra-buttons" })]
103
- })
104
- ]
105
- });
106
- });
107
- //#endregion
108
- exports.SelectMenu = SelectMenu;
109
- exports.SelectMenuRaw = SelectMenuRaw;
@@ -1,108 +0,0 @@
1
- import { Dropdown } from "./Dropdown.qwik.mjs";
2
- import { jsx, jsxs } from "@qwik.dev/core/jsx-runtime";
3
- import { Slot, component$, useSignal, useStore } from "@qwik.dev/core";
4
- //#region src/components/elements/SelectMenu.tsx
5
- var SelectMenu = component$((props) => {
6
- return /* @__PURE__ */ jsxs("div", {
7
- class: "flex flex-col",
8
- children: [/* @__PURE__ */ jsx("label", {
9
- for: props.id ? `${props.id}-dropdown` : void 0,
10
- class: "pb-1 text-lum-text select-none",
11
- children: /* @__PURE__ */ jsx(Slot, {})
12
- }), /* @__PURE__ */ jsxs(SelectMenuRaw, {
13
- ...props,
14
- children: [/* @__PURE__ */ jsx("div", {
15
- "q:slot": "dropdown",
16
- children: (props.customDropdown || !props.values?.length) && /* @__PURE__ */ jsx(Slot, { name: "dropdown" })
17
- }), /* @__PURE__ */ jsx("div", {
18
- "q:slot": "extra-buttons",
19
- children: /* @__PURE__ */ jsx(Slot, { name: "extra-buttons" })
20
- })]
21
- })]
22
- });
23
- });
24
- var SelectMenuRaw = component$(({ values, class: Class, panelClass = "lum-bg-lum-input-bg", btnClass = "lum-bg-transparent", noblur, nocloseonclick, customDropdown, hover, align, ...props }) => {
25
- const store = useStore({
26
- opened: false,
27
- value: props.value
28
- });
29
- const selectRef = useSignal();
30
- const selected = values?.find((v) => v.value === store.value);
31
- return /* @__PURE__ */ jsxs("div", {
32
- class: {
33
- "relative touch-manipulation": true,
34
- group: hover
35
- },
36
- children: [
37
- values && /* @__PURE__ */ jsx("select", {
38
- ...props,
39
- ref: selectRef,
40
- class: "hidden",
41
- children: values.map((value, i) => {
42
- return /* @__PURE__ */ jsx("option", {
43
- value: value.value,
44
- children: `${value.value}`
45
- }, i);
46
- })
47
- }),
48
- /* @__PURE__ */ jsxs(Dropdown, {
49
- id: props.id ? `${props.id}-dropdown` : void 0,
50
- opened: store.opened,
51
- class: {
52
- "w-full": true,
53
- ...Class
54
- },
55
- onClick$: (e, el) => {
56
- if (hover) return;
57
- store.opened = !store.opened;
58
- if (nocloseonclick) return;
59
- const listener = (e) => {
60
- if (!store.opened) return document.removeEventListener("click", listener);
61
- if (e.composedPath().includes(el)) return;
62
- store.opened = false;
63
- document.removeEventListener("click", listener);
64
- };
65
- document.addEventListener("click", listener);
66
- },
67
- children: [customDropdown && /* @__PURE__ */ jsx(Slot, { name: "dropdown" }), !customDropdown && (selected?.name ?? values?.[0]?.name ?? /* @__PURE__ */ jsx(Slot, { name: "dropdown" }))]
68
- }),
69
- hover && /* @__PURE__ */ jsx("div", { class: "h-2 absolute w-full" }),
70
- /* @__PURE__ */ jsxs("div", {
71
- class: {
72
- "absolute z-1000 mt-2": true,
73
- "backdrop-blur-lg": !noblur,
74
- "lum-scroll flex max-h-72 flex-col gap-1 overflow-auto rounded-lum border p-1 select-none motion-safe:transition-all ease-out": true,
75
- "left-0": align === "left",
76
- "right-0": align === "right",
77
- "left-1/2 -translate-x-1/2": align === "center",
78
- "pointer-events-none scale-95 opacity-0": !store.opened,
79
- "duration-300 group-hover:pointer-events-auto group-hover:scale-100 group-hover:opacity-100 group-hover:duration-75": hover,
80
- "focus-within:pointer-events-auto focus-within:scale-100 focus-within:opacity-100 focus-within:duration-75": true,
81
- [panelClass]: true
82
- },
83
- children: [values?.map(({ name, value }, i) => {
84
- return /* @__PURE__ */ jsx("button", {
85
- type: "button",
86
- class: {
87
- "lum-btn rounded-lum-1": true,
88
- [btnClass]: true
89
- },
90
- onClick$: (e, el) => {
91
- el.blur();
92
- store.opened = false;
93
- const select = selectRef.value;
94
- if (select) {
95
- select.value = value.toString();
96
- select.dispatchEvent(new Event("change"));
97
- }
98
- store.value = value.toString();
99
- },
100
- children: name
101
- }, i);
102
- }), /* @__PURE__ */ jsx(Slot, { name: "extra-buttons" })]
103
- })
104
- ]
105
- });
106
- });
107
- //#endregion
108
- export { SelectMenu, SelectMenuRaw };