@luminescent/ui-qwik 6.8.2 → 6.8.3-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.
Files changed (139) hide show
  1. package/lib/components/docs/Anchor.d.ts +4 -0
  2. package/lib/components/docs/Blobs.d.ts +4 -0
  3. package/lib/components/docs/ColorPicker.d.ts +4 -0
  4. package/lib/components/docs/Dropdown.d.ts +4 -0
  5. package/lib/components/docs/IconsLogos.d.ts +4 -0
  6. package/lib/components/docs/Nav.d.ts +4 -0
  7. package/lib/components/docs/NumberInput.d.ts +4 -0
  8. package/lib/components/docs/RangeInput.d.ts +4 -0
  9. package/lib/components/docs/SelectMenu.d.ts +4 -0
  10. package/lib/components/docs/Settings.d.ts +2 -0
  11. package/lib/components/docs/Sidebar.d.ts +4 -0
  12. package/lib/components/docs/Toggle.d.ts +4 -0
  13. package/lib/components/docs/lum-btn.d.ts +4 -0
  14. package/lib/components/docs/lum-card.d.ts +4 -0
  15. package/lib/components/docs/lum-classes.d.ts +4 -0
  16. package/lib/components/docs/lum-input.d.ts +4 -0
  17. package/{lib-types → lib}/components/elements/Anchor.d.ts +2 -2
  18. package/lib/components/elements/Anchor.qwik.cjs +26 -0
  19. package/lib/components/elements/Anchor.qwik.mjs +26 -0
  20. package/{lib-types → lib}/components/elements/Blobs.d.ts +1 -1
  21. package/lib/components/elements/Blobs.qwik.cjs +191 -0
  22. package/lib/components/elements/Blobs.qwik.mjs +191 -0
  23. package/{lib-types → lib}/components/elements/ColorPicker.d.ts +2 -2
  24. package/lib/components/elements/ColorPicker.qwik.cjs +314 -0
  25. package/lib/components/elements/ColorPicker.qwik.mjs +314 -0
  26. package/{lib-types → lib}/components/elements/Dropdown.d.ts +2 -2
  27. package/lib/components/elements/Dropdown.qwik.cjs +31 -0
  28. package/lib/components/elements/Dropdown.qwik.mjs +31 -0
  29. package/{lib-types → lib}/components/elements/Nav.d.ts +2 -2
  30. package/lib/components/elements/Nav.qwik.cjs +98 -0
  31. package/lib/components/elements/Nav.qwik.mjs +98 -0
  32. package/{lib-types → lib}/components/elements/NumberInput.d.ts +3 -3
  33. package/lib/components/elements/NumberInput.qwik.cjs +87 -0
  34. package/lib/components/elements/NumberInput.qwik.mjs +87 -0
  35. package/{lib-types → lib}/components/elements/RangeInput.d.ts +3 -3
  36. package/lib/components/elements/RangeInput.qwik.cjs +77 -0
  37. package/lib/components/elements/RangeInput.qwik.mjs +77 -0
  38. package/{lib-types → lib}/components/elements/SelectMenu.d.ts +3 -3
  39. package/lib/components/elements/SelectMenu.qwik.cjs +134 -0
  40. package/lib/components/elements/SelectMenu.qwik.mjs +134 -0
  41. package/{lib-types → lib}/components/elements/Sidebar.d.ts +2 -2
  42. package/lib/components/elements/Sidebar.qwik.cjs +37 -0
  43. package/lib/components/elements/Sidebar.qwik.mjs +37 -0
  44. package/{lib-types → lib}/components/elements/Toggle.d.ts +2 -2
  45. package/lib/components/elements/Toggle.qwik.cjs +39 -0
  46. package/lib/components/elements/Toggle.qwik.mjs +39 -0
  47. package/lib/components/functions.qwik.cjs +18 -0
  48. package/lib/components/functions.qwik.mjs +18 -0
  49. package/{lib-types → lib}/components/logos/Birdflop.d.ts +1 -1
  50. package/lib/components/logos/Birdflop.qwik.cjs +73 -0
  51. package/lib/components/logos/Birdflop.qwik.mjs +73 -0
  52. package/lib/components/logos/Discord.d.ts +2 -0
  53. package/lib/components/logos/Discord.qwik.cjs +18 -0
  54. package/lib/components/logos/Discord.qwik.mjs +18 -0
  55. package/lib/components/logos/Fabric.d.ts +2 -0
  56. package/lib/components/logos/Fabric.qwik.cjs +32 -0
  57. package/lib/components/logos/Fabric.qwik.mjs +32 -0
  58. package/lib/components/logos/Forge.d.ts +2 -0
  59. package/lib/components/logos/Forge.qwik.cjs +31 -0
  60. package/lib/components/logos/Forge.qwik.mjs +31 -0
  61. package/{lib-types → lib}/components/logos/IconProps.d.ts +1 -1
  62. package/lib/components/logos/Luminescent.d.ts +3 -0
  63. package/lib/components/logos/Luminescent.qwik.cjs +143 -0
  64. package/lib/components/logos/Luminescent.qwik.mjs +143 -0
  65. package/lib/components/logos/Paper.d.ts +2 -0
  66. package/lib/components/logos/Paper.qwik.cjs +40 -0
  67. package/lib/components/logos/Paper.qwik.mjs +40 -0
  68. package/{lib-types/components/logos/Waterfall.d.ts → lib/components/logos/Pterodactyl.d.ts} +1 -1
  69. package/lib/components/logos/Pterodactyl.qwik.cjs +35 -0
  70. package/lib/components/logos/Pterodactyl.qwik.mjs +35 -0
  71. package/lib/components/logos/Purpur.d.ts +2 -0
  72. package/lib/components/logos/Purpur.qwik.cjs +76 -0
  73. package/lib/components/logos/Purpur.qwik.mjs +76 -0
  74. package/{lib-types/components/logos/Purpur.d.ts → lib/components/logos/Velocity.d.ts} +1 -1
  75. package/lib/components/logos/Velocity.qwik.cjs +27 -0
  76. package/lib/components/logos/Velocity.qwik.mjs +27 -0
  77. package/{lib-types/components/logos/Discord.d.ts → lib/components/logos/Waterfall.d.ts} +1 -1
  78. package/lib/components/logos/Waterfall.qwik.cjs +21 -0
  79. package/lib/components/logos/Waterfall.qwik.mjs +21 -0
  80. package/lib/index.qwik.cjs +47 -1730
  81. package/lib/index.qwik.mjs +21 -1704
  82. package/lib/svg/ChevronDown.d.ts +2 -0
  83. package/lib/svg/ChevronDown.qwik.cjs +23 -0
  84. package/lib/svg/ChevronDown.qwik.mjs +23 -0
  85. package/lib/svg/Link.d.ts +2 -0
  86. package/lib/svg/Link.qwik.cjs +34 -0
  87. package/lib/svg/Link.qwik.mjs +34 -0
  88. package/lib/svg/Menu.d.ts +2 -0
  89. package/lib/svg/Menu.qwik.cjs +31 -0
  90. package/lib/svg/Menu.qwik.mjs +31 -0
  91. package/lib/svg/Minus.d.ts +2 -0
  92. package/lib/svg/Minus.qwik.cjs +23 -0
  93. package/lib/svg/Minus.qwik.mjs +23 -0
  94. package/lib/svg/Plus.d.ts +2 -0
  95. package/lib/svg/Plus.qwik.cjs +28 -0
  96. package/lib/svg/Plus.qwik.mjs +28 -0
  97. package/{lib-types/svg/Minus.d.ts → lib/svg/Shuffle.d.ts} +1 -1
  98. package/lib/svg/Shuffle.qwik.cjs +37 -0
  99. package/lib/svg/Shuffle.qwik.mjs +37 -0
  100. package/lib/utils/color.qwik.cjs +134 -0
  101. package/lib/utils/color.qwik.mjs +134 -0
  102. package/package.json +22 -25
  103. package/LICENSE +0 -661
  104. package/lib-types/components/docs/Anchor.d.ts +0 -4
  105. package/lib-types/components/docs/Blobs.d.ts +0 -4
  106. package/lib-types/components/docs/ColorPicker.d.ts +0 -4
  107. package/lib-types/components/docs/Dropdown.d.ts +0 -4
  108. package/lib-types/components/docs/IconsLogos.d.ts +0 -4
  109. package/lib-types/components/docs/Nav.d.ts +0 -4
  110. package/lib-types/components/docs/NumberInput.d.ts +0 -4
  111. package/lib-types/components/docs/RangeInput.d.ts +0 -4
  112. package/lib-types/components/docs/SelectMenu.d.ts +0 -4
  113. package/lib-types/components/docs/Settings.d.ts +0 -2
  114. package/lib-types/components/docs/Sidebar.d.ts +0 -4
  115. package/lib-types/components/docs/Toggle.d.ts +0 -4
  116. package/lib-types/components/docs/lum-btn.d.ts +0 -4
  117. package/lib-types/components/docs/lum-card.d.ts +0 -4
  118. package/lib-types/components/docs/lum-classes.d.ts +0 -4
  119. package/lib-types/components/docs/lum-input.d.ts +0 -4
  120. package/lib-types/components/logos/Fabric.d.ts +0 -2
  121. package/lib-types/components/logos/Forge.d.ts +0 -2
  122. package/lib-types/components/logos/Luminescent.d.ts +0 -3
  123. package/lib-types/components/logos/Paper.d.ts +0 -2
  124. package/lib-types/components/logos/Pterodactyl.d.ts +0 -2
  125. package/lib-types/components/logos/Velocity.d.ts +0 -2
  126. package/lib-types/entry.dev.d.ts +0 -2
  127. package/lib-types/entry.ssr.d.ts +0 -14
  128. package/lib-types/root.d.ts +0 -3
  129. package/lib-types/svg/ChevronDown.d.ts +0 -2
  130. package/lib-types/svg/Link.d.ts +0 -2
  131. package/lib-types/svg/Menu.d.ts +0 -2
  132. package/lib-types/svg/Plus.d.ts +0 -2
  133. package/lib-types/svg/Shuffle.d.ts +0 -2
  134. package/tailwind.config.js +0 -94
  135. /package/{lib-types → lib}/components/elements.d.ts +0 -0
  136. /package/{lib-types → lib}/components/functions.d.ts +0 -0
  137. /package/{lib-types → lib}/components/logos.d.ts +0 -0
  138. /package/{lib-types → lib}/index.d.ts +0 -0
  139. /package/{lib-types → lib}/utils/color.d.ts +0 -0
@@ -0,0 +1,31 @@
1
+ import { jsxs, jsx } from "@qwik.dev/core/jsx-runtime";
2
+ import { component$, Slot } from "@qwik.dev/core";
3
+ import { ChevronDown } from "../../svg/ChevronDown.qwik.mjs";
4
+ const Dropdown = component$(({ class: Class, hover, opened, ...props }) => {
5
+ return /* @__PURE__ */ jsxs("button", {
6
+ type: "button",
7
+ class: {
8
+ "group lum-btn": true,
9
+ ...Class
10
+ },
11
+ ...props,
12
+ children: [
13
+ /* @__PURE__ */ jsx("span", {
14
+ class: "flex-1 text-left",
15
+ children: /* @__PURE__ */ jsx(Slot, {})
16
+ }),
17
+ /* @__PURE__ */ jsx(ChevronDown, {
18
+ size: 16,
19
+ class: {
20
+ "ease-out motion-safe:transition-transform": true,
21
+ "rotate-180 transform": opened,
22
+ "duration-300 group-hover:rotate-180 group-hover:transform group-hover:duration-75": hover,
23
+ "focus-within:rotate-180 focus-within:transform focus-within:duration-75": true
24
+ }
25
+ })
26
+ ]
27
+ });
28
+ });
29
+ export {
30
+ Dropdown
31
+ };
@@ -1,4 +1,4 @@
1
- import type { PropsOf } from '@builder.io/qwik';
1
+ import type { PropsOf } from '@qwik.dev/core';
2
2
  interface NavProps extends Omit<PropsOf<'nav'>, 'class'> {
3
3
  class?: {
4
4
  [key: string]: boolean;
@@ -10,5 +10,5 @@ interface NavProps extends Omit<PropsOf<'nav'>, 'class'> {
10
10
  nodismiss?: boolean;
11
11
  colorClass?: string;
12
12
  }
13
- export declare const Nav: import("@builder.io/qwik").Component<NavProps>;
13
+ export declare const Nav: import("@qwik.dev/core").Component<NavProps>;
14
14
  export {};
@@ -0,0 +1,98 @@
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 Menu = require("../../svg/Menu.qwik.cjs");
6
+ const Nav = core.component$(({ fixed, floating, noblur, nohamburger, nodismiss, colorClass = "lum-bg-lum-card-bg", ...props }) => {
7
+ const menu = core.useSignal(false);
8
+ core.useTask$(({ track }) => {
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")) {
15
+ return;
16
+ }
17
+ el = el.parentElement;
18
+ }
19
+ menu.value = false;
20
+ window.removeEventListener("click", onClick);
21
+ };
22
+ window.addEventListener("click", onClick);
23
+ }
24
+ });
25
+ return /* @__PURE__ */ jsxRuntime.jsxs("nav", {
26
+ ...props,
27
+ class: {
28
+ "top-0 left-0 z-50 flex w-full flex-col": true,
29
+ fixed,
30
+ absolute: !fixed,
31
+ ...props.class
32
+ },
33
+ children: [
34
+ !nohamburger && /* @__PURE__ */ jsxRuntime.jsx("div", {
35
+ class: {
36
+ "absolute top-full lum-card motion-safe:transition-all sm:hidden max-w-7xl gap-2 px-2 py-4": true,
37
+ "w-[calc(100%-(--spacing(8)))] mx-4": floating,
38
+ "w-[calc(100%-(--spacing(4)))] mx-2": !floating,
39
+ "mt-2": menu.value,
40
+ "pointer-events-none opacity-0 -mt-2 scale-95": !menu.value,
41
+ "backdrop-blur-lg": !noblur,
42
+ [colorClass]: true
43
+ },
44
+ children: /* @__PURE__ */ jsxRuntime.jsx(core.Slot, {
45
+ name: "mobile"
46
+ })
47
+ }),
48
+ /* @__PURE__ */ jsxRuntime.jsx("div", {
49
+ class: {
50
+ [colorClass]: !floating,
51
+ "border-x-0! border-t-0!": !floating,
52
+ "backdrop-blur-lg": !noblur && !floating,
53
+ "relative mx-2 mt-2": floating
54
+ },
55
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", {
56
+ class: {
57
+ "mx-auto flex w-full max-w-7xl justify-evenly px-2": true,
58
+ [colorClass]: floating,
59
+ "rounded-lum border": floating,
60
+ "backdrop-blur-lg": !noblur && floating
61
+ },
62
+ children: [
63
+ /* @__PURE__ */ jsxRuntime.jsx("div", {
64
+ class: "flex flex-1 items-center justify-start gap-2 py-2",
65
+ children: /* @__PURE__ */ jsxRuntime.jsx(core.Slot, {
66
+ name: "start"
67
+ })
68
+ }),
69
+ /* @__PURE__ */ jsxRuntime.jsx("div", {
70
+ class: "flex flex-1 items-center justify-center gap-2 py-2",
71
+ children: /* @__PURE__ */ jsxRuntime.jsx(core.Slot, {
72
+ name: "center"
73
+ })
74
+ }),
75
+ /* @__PURE__ */ jsxRuntime.jsxs("div", {
76
+ class: "flex flex-1 items-center justify-end gap-2 py-2",
77
+ children: [
78
+ /* @__PURE__ */ jsxRuntime.jsx(core.Slot, {
79
+ name: "end"
80
+ }),
81
+ !nohamburger && /* @__PURE__ */ jsxRuntime.jsx("button", {
82
+ name: "Navigation Menu",
83
+ title: "Navigation Menu",
84
+ class: "lum-btn lum-bg-transparent p-2 sm:hidden rounded-lum-2",
85
+ onClick$: () => menu.value = !menu.value,
86
+ children: /* @__PURE__ */ jsxRuntime.jsx(Menu.Menu, {
87
+ size: 24
88
+ })
89
+ })
90
+ ]
91
+ })
92
+ ]
93
+ })
94
+ })
95
+ ]
96
+ });
97
+ });
98
+ exports.Nav = Nav;
@@ -0,0 +1,98 @@
1
+ import { jsxs, jsx } from "@qwik.dev/core/jsx-runtime";
2
+ import { component$, useSignal, useTask$, Slot } from "@qwik.dev/core";
3
+ import { Menu } from "../../svg/Menu.qwik.mjs";
4
+ const Nav = component$(({ fixed, floating, noblur, nohamburger, nodismiss, colorClass = "lum-bg-lum-card-bg", ...props }) => {
5
+ const menu = useSignal(false);
6
+ useTask$(({ track }) => {
7
+ track(() => menu.value);
8
+ if (menu.value && !nodismiss) {
9
+ const onClick = (e) => {
10
+ let el = e.target;
11
+ while (el) {
12
+ if (el.classList && el.classList.contains("nav-ignore-dismiss")) {
13
+ return;
14
+ }
15
+ el = el.parentElement;
16
+ }
17
+ menu.value = false;
18
+ window.removeEventListener("click", onClick);
19
+ };
20
+ window.addEventListener("click", onClick);
21
+ }
22
+ });
23
+ return /* @__PURE__ */ jsxs("nav", {
24
+ ...props,
25
+ class: {
26
+ "top-0 left-0 z-50 flex w-full flex-col": true,
27
+ fixed,
28
+ absolute: !fixed,
29
+ ...props.class
30
+ },
31
+ children: [
32
+ !nohamburger && /* @__PURE__ */ jsx("div", {
33
+ class: {
34
+ "absolute top-full lum-card motion-safe:transition-all sm:hidden max-w-7xl gap-2 px-2 py-4": true,
35
+ "w-[calc(100%-(--spacing(8)))] mx-4": floating,
36
+ "w-[calc(100%-(--spacing(4)))] mx-2": !floating,
37
+ "mt-2": menu.value,
38
+ "pointer-events-none opacity-0 -mt-2 scale-95": !menu.value,
39
+ "backdrop-blur-lg": !noblur,
40
+ [colorClass]: true
41
+ },
42
+ children: /* @__PURE__ */ jsx(Slot, {
43
+ name: "mobile"
44
+ })
45
+ }),
46
+ /* @__PURE__ */ jsx("div", {
47
+ class: {
48
+ [colorClass]: !floating,
49
+ "border-x-0! border-t-0!": !floating,
50
+ "backdrop-blur-lg": !noblur && !floating,
51
+ "relative mx-2 mt-2": floating
52
+ },
53
+ children: /* @__PURE__ */ jsxs("div", {
54
+ class: {
55
+ "mx-auto flex w-full max-w-7xl justify-evenly px-2": true,
56
+ [colorClass]: floating,
57
+ "rounded-lum border": floating,
58
+ "backdrop-blur-lg": !noblur && floating
59
+ },
60
+ children: [
61
+ /* @__PURE__ */ jsx("div", {
62
+ class: "flex flex-1 items-center justify-start gap-2 py-2",
63
+ children: /* @__PURE__ */ jsx(Slot, {
64
+ name: "start"
65
+ })
66
+ }),
67
+ /* @__PURE__ */ jsx("div", {
68
+ class: "flex flex-1 items-center justify-center gap-2 py-2",
69
+ children: /* @__PURE__ */ jsx(Slot, {
70
+ name: "center"
71
+ })
72
+ }),
73
+ /* @__PURE__ */ jsxs("div", {
74
+ class: "flex flex-1 items-center justify-end gap-2 py-2",
75
+ children: [
76
+ /* @__PURE__ */ jsx(Slot, {
77
+ name: "end"
78
+ }),
79
+ !nohamburger && /* @__PURE__ */ jsx("button", {
80
+ name: "Navigation Menu",
81
+ title: "Navigation Menu",
82
+ class: "lum-btn lum-bg-transparent p-2 sm:hidden rounded-lum-2",
83
+ onClick$: () => menu.value = !menu.value,
84
+ children: /* @__PURE__ */ jsx(Menu, {
85
+ size: 24
86
+ })
87
+ })
88
+ ]
89
+ })
90
+ ]
91
+ })
92
+ })
93
+ ]
94
+ });
95
+ });
96
+ export {
97
+ Nav
98
+ };
@@ -1,4 +1,4 @@
1
- import type { PropsOf, QRL } from '@builder.io/qwik';
1
+ import type { PropsOf, QRL } from '@qwik.dev/core';
2
2
  interface NumberInputRawProps extends Omit<PropsOf<'input'> & {
3
3
  type: 'number';
4
4
  }, 'class' | 'type'> {
@@ -16,6 +16,6 @@ interface NumberInputRawProps extends Omit<PropsOf<'input'> & {
16
16
  interface NumberInputProps extends Omit<NumberInputRawProps, 'children'> {
17
17
  id: string;
18
18
  }
19
- export declare const NumberInput: import("@builder.io/qwik").Component<NumberInputProps>;
20
- export declare const NumberInputRaw: import("@builder.io/qwik").Component<NumberInputRawProps>;
19
+ export declare const NumberInput: import("@qwik.dev/core").Component<NumberInputProps>;
20
+ export declare const NumberInputRaw: import("@qwik.dev/core").Component<NumberInputRawProps>;
21
21
  export {};
@@ -0,0 +1,87 @@
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$(`
25
+ input::-webkit-outer-spin-button,
26
+ input::-webkit-inner-spin-button {
27
+ -webkit-appearance: none;
28
+ margin: 0;
29
+ }
30
+ input[type=number] {
31
+ -moz-appearance: textfield;
32
+ }
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
+ });
86
+ exports.NumberInput = NumberInput;
87
+ exports.NumberInputRaw = NumberInputRaw;
@@ -0,0 +1,87 @@
1
+ import { jsxs, jsx } from "@qwik.dev/core/jsx-runtime";
2
+ import { component$, Slot, useStyles$, $ } from "@qwik.dev/core";
3
+ import { Plus } from "../../svg/Plus.qwik.mjs";
4
+ 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$(`
23
+ input::-webkit-outer-spin-button,
24
+ input::-webkit-inner-spin-button {
25
+ -webkit-appearance: none;
26
+ margin: 0;
27
+ }
28
+ input[type=number] {
29
+ -moz-appearance: textfield;
30
+ }
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
+ };
@@ -1,4 +1,4 @@
1
- import type { PropsOf, QRL } from '@builder.io/qwik';
1
+ import type { PropsOf, QRL } from '@qwik.dev/core';
2
2
  interface RangeInputRawProps extends Omit<PropsOf<'input'> & {
3
3
  type: 'number';
4
4
  }, 'class' | 'type'> {
@@ -13,6 +13,6 @@ interface RangeInputRawProps extends Omit<PropsOf<'input'> & {
13
13
  interface RangeInputProps extends Omit<RangeInputRawProps, 'children'> {
14
14
  id: string;
15
15
  }
16
- export declare const RangeInput: import("@builder.io/qwik").Component<RangeInputProps>;
17
- export declare const RangeInputRaw: import("@builder.io/qwik").Component<RangeInputRawProps>;
16
+ export declare const RangeInput: import("@qwik.dev/core").Component<RangeInputProps>;
17
+ export declare const RangeInputRaw: import("@qwik.dev/core").Component<RangeInputRawProps>;
18
18
  export {};
@@ -0,0 +1,77 @@
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
+ });
76
+ exports.RangeInput = RangeInput;
77
+ exports.RangeInputRaw = RangeInputRaw;
@@ -0,0 +1,77 @@
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,4 +1,4 @@
1
- import type { JSXChildren, PropsOf } from '@builder.io/qwik';
1
+ import type { JSXChildren, PropsOf } from '@qwik.dev/core';
2
2
  interface SelectMenuProps extends Omit<PropsOf<'select'>, 'class' | 'size'> {
3
3
  class?: {
4
4
  [key: string]: boolean;
@@ -15,6 +15,6 @@ interface SelectMenuProps extends Omit<PropsOf<'select'>, 'class' | 'size'> {
15
15
  value: string | number;
16
16
  }[];
17
17
  }
18
- export declare const SelectMenu: import("@builder.io/qwik").Component<SelectMenuProps>;
19
- export declare const SelectMenuRaw: import("@builder.io/qwik").Component<SelectMenuProps>;
18
+ export declare const SelectMenu: import("@qwik.dev/core").Component<SelectMenuProps>;
19
+ export declare const SelectMenuRaw: import("@qwik.dev/core").Component<SelectMenuProps>;
20
20
  export {};