@luminescent/ui-qwik 6.8.3-2 → 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 (140) hide show
  1. package/LICENSE +661 -0
  2. package/lib/index.qwik.cjs +1746 -47
  3. package/lib/index.qwik.mjs +1720 -21
  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 → lib-types}/components/logos/Birdflop.d.ts +1 -1
  31. package/{lib/components/logos/Waterfall.d.ts → lib-types/components/logos/Discord.d.ts} +1 -1
  32. package/{lib/components/logos/Velocity.d.ts → lib-types/components/logos/Fabric.d.ts} +1 -1
  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/components/logos/Pterodactyl.d.ts → lib-types/components/logos/Waterfall.d.ts} +1 -1
  41. package/lib-types/entry.dev.d.ts +2 -0
  42. package/lib-types/entry.ssr.d.ts +14 -0
  43. package/lib-types/root.d.ts +3 -0
  44. package/lib-types/svg/ChevronDown.d.ts +2 -0
  45. package/lib-types/svg/Link.d.ts +2 -0
  46. package/lib-types/svg/Menu.d.ts +2 -0
  47. package/{lib/svg/Shuffle.d.ts → lib-types/svg/Minus.d.ts} +1 -1
  48. package/lib-types/svg/Plus.d.ts +2 -0
  49. package/lib-types/svg/Shuffle.d.ts +2 -0
  50. package/package.json +25 -22
  51. package/tailwind.config.js +94 -0
  52. package/lib/components/docs/Anchor.d.ts +0 -4
  53. package/lib/components/docs/Blobs.d.ts +0 -4
  54. package/lib/components/docs/ColorPicker.d.ts +0 -4
  55. package/lib/components/docs/Dropdown.d.ts +0 -4
  56. package/lib/components/docs/IconsLogos.d.ts +0 -4
  57. package/lib/components/docs/Nav.d.ts +0 -4
  58. package/lib/components/docs/NumberInput.d.ts +0 -4
  59. package/lib/components/docs/RangeInput.d.ts +0 -4
  60. package/lib/components/docs/SelectMenu.d.ts +0 -4
  61. package/lib/components/docs/Settings.d.ts +0 -2
  62. package/lib/components/docs/Sidebar.d.ts +0 -4
  63. package/lib/components/docs/Toggle.d.ts +0 -4
  64. package/lib/components/docs/lum-btn.d.ts +0 -4
  65. package/lib/components/docs/lum-card.d.ts +0 -4
  66. package/lib/components/docs/lum-classes.d.ts +0 -4
  67. package/lib/components/docs/lum-input.d.ts +0 -4
  68. package/lib/components/elements/Anchor.qwik.cjs +0 -26
  69. package/lib/components/elements/Anchor.qwik.mjs +0 -26
  70. package/lib/components/elements/Blobs.qwik.cjs +0 -191
  71. package/lib/components/elements/Blobs.qwik.mjs +0 -191
  72. package/lib/components/elements/ColorPicker.qwik.cjs +0 -314
  73. package/lib/components/elements/ColorPicker.qwik.mjs +0 -314
  74. package/lib/components/elements/Dropdown.qwik.cjs +0 -31
  75. package/lib/components/elements/Dropdown.qwik.mjs +0 -31
  76. package/lib/components/elements/Nav.qwik.cjs +0 -98
  77. package/lib/components/elements/Nav.qwik.mjs +0 -98
  78. package/lib/components/elements/NumberInput.d.ts +0 -21
  79. package/lib/components/elements/NumberInput.qwik.cjs +0 -87
  80. package/lib/components/elements/NumberInput.qwik.mjs +0 -87
  81. package/lib/components/elements/RangeInput.qwik.cjs +0 -77
  82. package/lib/components/elements/RangeInput.qwik.mjs +0 -77
  83. package/lib/components/elements/SelectMenu.qwik.cjs +0 -134
  84. package/lib/components/elements/SelectMenu.qwik.mjs +0 -134
  85. package/lib/components/elements/Sidebar.qwik.cjs +0 -37
  86. package/lib/components/elements/Sidebar.qwik.mjs +0 -37
  87. package/lib/components/elements/Toggle.qwik.cjs +0 -39
  88. package/lib/components/elements/Toggle.qwik.mjs +0 -39
  89. package/lib/components/functions.qwik.cjs +0 -18
  90. package/lib/components/functions.qwik.mjs +0 -18
  91. package/lib/components/logos/Birdflop.qwik.cjs +0 -73
  92. package/lib/components/logos/Birdflop.qwik.mjs +0 -73
  93. package/lib/components/logos/Discord.d.ts +0 -2
  94. package/lib/components/logos/Discord.qwik.cjs +0 -18
  95. package/lib/components/logos/Discord.qwik.mjs +0 -18
  96. package/lib/components/logos/Fabric.d.ts +0 -2
  97. package/lib/components/logos/Fabric.qwik.cjs +0 -32
  98. package/lib/components/logos/Fabric.qwik.mjs +0 -32
  99. package/lib/components/logos/Forge.d.ts +0 -2
  100. package/lib/components/logos/Forge.qwik.cjs +0 -31
  101. package/lib/components/logos/Forge.qwik.mjs +0 -31
  102. package/lib/components/logos/Luminescent.d.ts +0 -3
  103. package/lib/components/logos/Luminescent.qwik.cjs +0 -143
  104. package/lib/components/logos/Luminescent.qwik.mjs +0 -143
  105. package/lib/components/logos/Paper.d.ts +0 -2
  106. package/lib/components/logos/Paper.qwik.cjs +0 -40
  107. package/lib/components/logos/Paper.qwik.mjs +0 -40
  108. package/lib/components/logos/Pterodactyl.qwik.cjs +0 -35
  109. package/lib/components/logos/Pterodactyl.qwik.mjs +0 -35
  110. package/lib/components/logos/Purpur.d.ts +0 -2
  111. package/lib/components/logos/Purpur.qwik.cjs +0 -76
  112. package/lib/components/logos/Purpur.qwik.mjs +0 -76
  113. package/lib/components/logos/Velocity.qwik.cjs +0 -27
  114. package/lib/components/logos/Velocity.qwik.mjs +0 -27
  115. package/lib/components/logos/Waterfall.qwik.cjs +0 -21
  116. package/lib/components/logos/Waterfall.qwik.mjs +0 -21
  117. package/lib/svg/ChevronDown.d.ts +0 -2
  118. package/lib/svg/ChevronDown.qwik.cjs +0 -23
  119. package/lib/svg/ChevronDown.qwik.mjs +0 -23
  120. package/lib/svg/Link.d.ts +0 -2
  121. package/lib/svg/Link.qwik.cjs +0 -34
  122. package/lib/svg/Link.qwik.mjs +0 -34
  123. package/lib/svg/Menu.d.ts +0 -2
  124. package/lib/svg/Menu.qwik.cjs +0 -31
  125. package/lib/svg/Menu.qwik.mjs +0 -31
  126. package/lib/svg/Minus.d.ts +0 -2
  127. package/lib/svg/Minus.qwik.cjs +0 -23
  128. package/lib/svg/Minus.qwik.mjs +0 -23
  129. package/lib/svg/Plus.d.ts +0 -2
  130. package/lib/svg/Plus.qwik.cjs +0 -28
  131. package/lib/svg/Plus.qwik.mjs +0 -28
  132. package/lib/svg/Shuffle.qwik.cjs +0 -37
  133. package/lib/svg/Shuffle.qwik.mjs +0 -37
  134. package/lib/utils/color.qwik.cjs +0 -134
  135. package/lib/utils/color.qwik.mjs +0 -134
  136. /package/{lib → lib-types}/components/elements.d.ts +0 -0
  137. /package/{lib → lib-types}/components/functions.d.ts +0 -0
  138. /package/{lib → lib-types}/components/logos.d.ts +0 -0
  139. /package/{lib → lib-types}/index.d.ts +0 -0
  140. /package/{lib → lib-types}/utils/color.d.ts +0 -0
@@ -1,98 +0,0 @@
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;
@@ -1,98 +0,0 @@
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,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,87 +0,0 @@
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;
@@ -1,87 +0,0 @@
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,77 +0,0 @@
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;
@@ -1,77 +0,0 @@
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,134 +0,0 @@
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 Dropdown = require("./Dropdown.qwik.cjs");
6
- const SelectMenu = core.component$((props) => {
7
- return /* @__PURE__ */ jsxRuntime.jsxs("div", {
8
- class: "flex flex-col",
9
- children: [
10
- /* @__PURE__ */ jsxRuntime.jsx("label", {
11
- for: props.id ? `${props.id}-dropdown` : void 0,
12
- class: "pb-1 text-lum-text select-none",
13
- children: /* @__PURE__ */ jsxRuntime.jsx(core.Slot, {})
14
- }),
15
- /* @__PURE__ */ jsxRuntime.jsxs(SelectMenuRaw, {
16
- ...props,
17
- children: [
18
- /* @__PURE__ */ jsxRuntime.jsx("div", {
19
- "q:slot": "dropdown",
20
- children: (props.customDropdown || !props.values?.length) && /* @__PURE__ */ jsxRuntime.jsx(core.Slot, {
21
- name: "dropdown"
22
- })
23
- }),
24
- /* @__PURE__ */ jsxRuntime.jsx("div", {
25
- "q:slot": "extra-buttons",
26
- children: /* @__PURE__ */ jsxRuntime.jsx(core.Slot, {
27
- name: "extra-buttons"
28
- })
29
- })
30
- ]
31
- })
32
- ]
33
- });
34
- });
35
- const SelectMenuRaw = core.component$(({ values, class: Class, panelClass = "lum-bg-lum-input-bg", btnClass = "lum-bg-transparent", noblur, nocloseonclick, customDropdown, hover, align, ...props }) => {
36
- const store = core.useStore({
37
- opened: false,
38
- value: props.value
39
- });
40
- const selectRef = core.useSignal();
41
- const selected = values?.find((v) => v.value === store.value);
42
- return /* @__PURE__ */ jsxRuntime.jsxs("div", {
43
- class: {
44
- "relative touch-manipulation": true,
45
- group: hover
46
- },
47
- children: [
48
- values && /* @__PURE__ */ jsxRuntime.jsx("select", {
49
- ...props,
50
- ref: selectRef,
51
- class: "hidden",
52
- children: values.map((value, i) => {
53
- return /* @__PURE__ */ jsxRuntime.jsx("option", {
54
- value: value.value,
55
- children: `${value.value}`
56
- }, i);
57
- })
58
- }),
59
- /* @__PURE__ */ jsxRuntime.jsxs(Dropdown.Dropdown, {
60
- id: props.id ? `${props.id}-dropdown` : void 0,
61
- opened: store.opened,
62
- class: {
63
- "w-full": true,
64
- ...Class
65
- },
66
- onClick$: (e, el) => {
67
- if (hover) return;
68
- store.opened = !store.opened;
69
- if (nocloseonclick) return;
70
- const listener = (e2) => {
71
- if (!store.opened) return document.removeEventListener("click", listener);
72
- const path = e2.composedPath();
73
- if (path.includes(el)) return;
74
- store.opened = false;
75
- document.removeEventListener("click", listener);
76
- };
77
- document.addEventListener("click", listener);
78
- },
79
- children: [
80
- customDropdown && /* @__PURE__ */ jsxRuntime.jsx(core.Slot, {
81
- name: "dropdown"
82
- }),
83
- !customDropdown && (selected?.name ?? values?.[0]?.name ?? /* @__PURE__ */ jsxRuntime.jsx(core.Slot, {
84
- name: "dropdown"
85
- }))
86
- ]
87
- }),
88
- hover && /* @__PURE__ */ jsxRuntime.jsx("div", {
89
- class: "h-2 absolute w-full"
90
- }),
91
- /* @__PURE__ */ jsxRuntime.jsxs("div", {
92
- class: {
93
- "absolute z-1000 mt-2": true,
94
- "backdrop-blur-lg": !noblur,
95
- "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,
96
- "left-0": align === "left",
97
- "right-0": align === "right",
98
- "left-1/2 -translate-x-1/2": align === "center",
99
- "pointer-events-none scale-95 opacity-0": !store.opened,
100
- "duration-300 group-hover:pointer-events-auto group-hover:scale-100 group-hover:opacity-100 group-hover:duration-75": hover,
101
- "focus-within:pointer-events-auto focus-within:scale-100 focus-within:opacity-100 focus-within:duration-75": true,
102
- [panelClass]: true
103
- },
104
- children: [
105
- values?.map(({ name, value }, i) => {
106
- return /* @__PURE__ */ jsxRuntime.jsx("button", {
107
- type: "button",
108
- class: {
109
- "lum-btn rounded-lum-1": true,
110
- [btnClass]: true
111
- },
112
- onClick$: (e, el) => {
113
- el.blur();
114
- store.opened = false;
115
- const select = selectRef.value;
116
- if (select) {
117
- select.value = value.toString();
118
- select.dispatchEvent(new Event("change"));
119
- }
120
- store.value = value.toString();
121
- },
122
- children: name
123
- }, i);
124
- }),
125
- /* @__PURE__ */ jsxRuntime.jsx(core.Slot, {
126
- name: "extra-buttons"
127
- })
128
- ]
129
- })
130
- ]
131
- });
132
- });
133
- exports.SelectMenu = SelectMenu;
134
- exports.SelectMenuRaw = SelectMenuRaw;