@luminescent/ui-qwik 3.0.4 → 4.0.0-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -484,8 +484,7 @@ const ColorPicker = qwik.component$(({ id, value = "#000000", colors = [
484
484
  });
485
485
  return /* @__PURE__ */ jsxRuntime.jsxs("div", {
486
486
  class: {
487
- "lum-bg-gray-900 flex touch-none gap-4 rounded-lg p-4 motion-safe:transition-all": true,
488
- flex: true,
487
+ "lum-card touch-none p-4 motion-safe:transition-all": true,
489
488
  "flex-col": !horizontal,
490
489
  ...props.class
491
490
  },
@@ -509,11 +508,11 @@ const ColorPicker = qwik.component$(({ id, value = "#000000", colors = [
509
508
  "preventdefault:touchstart": true,
510
509
  children: [
511
510
  /* @__PURE__ */ jsxRuntime.jsx("div", {
512
- class: "h-[150px] w-[125px] rounded-[0.3rem] border border-gray-700 bg-gradient-to-b from-transparent to-black"
511
+ class: "h-[150px] w-[125px] rounded-md border border-gray-700 bg-gradient-to-b from-transparent to-black"
513
512
  }),
514
513
  /* @__PURE__ */ jsxRuntime.jsx("div", {
515
514
  class: {
516
- "absolute -top-2 -left-2 h-4 w-4 rounded-full border bg-white": true,
515
+ "absolute -top-2 -left-2 h-4 w-4 rounded-md border bg-white": true,
517
516
  "border-white": getBrightness(hexNumberToRgb(hexStringToNumber(store.value))) < 0.5,
518
517
  "border-black": getBrightness(hexNumberToRgb(hexStringToNumber(store.value))) > 0.5
519
518
  },
@@ -534,7 +533,7 @@ const ColorPicker = qwik.component$(({ id, value = "#000000", colors = [
534
533
  "preventdefault:mousedown": true,
535
534
  "preventdefault:touchstart": true,
536
535
  children: /* @__PURE__ */ jsxRuntime.jsx("div", {
537
- class: "absolute -bottom-2 -left-[5px] h-4 w-4 rounded-full border border-white bg-[#ff0000]",
536
+ class: "absolute -bottom-2 -left-[5px] h-4 w-4 rounded-md border border-white bg-[#ff0000]",
538
537
  style: {
539
538
  transform: `translateY(${-store.hue.position}px)`,
540
539
  background: store.hue.color
@@ -557,11 +556,11 @@ const ColorPicker = qwik.component$(({ id, value = "#000000", colors = [
557
556
  children: [
558
557
  preview != "full" && /* @__PURE__ */ jsxRuntime.jsx("div", {
559
558
  class: {
560
- "border border-gray-700": true,
561
- "aspect-square h-full rounded-md": preview == "left" || preview == "right",
559
+ "border border-gray-700 rounded-sm": true,
560
+ "aspect-square h-full": preview == "left" || preview == "right",
562
561
  "h-3 w-full": preview == "top" || preview == "bottom",
563
- "rounded-t-md": preview == "top",
564
- "rounded-b-md": preview == "bottom"
562
+ "rounded-b-none": preview == "top",
563
+ "rounded-t-none": preview == "bottom"
565
564
  },
566
565
  style: {
567
566
  backgroundColor: `${store.value}`
@@ -569,7 +568,7 @@ const ColorPicker = qwik.component$(({ id, value = "#000000", colors = [
569
568
  }),
570
569
  /* @__PURE__ */ jsxRuntime.jsx("input", {
571
570
  class: {
572
- "lum-input w-full p-1 text-xs": true,
571
+ "lum-input w-full p-1 text-xs rounded-sm": true,
573
572
  "rounded-t-none border-t-0": preview == "top",
574
573
  "rounded-b-none border-b-0": preview == "bottom"
575
574
  },
@@ -588,7 +587,7 @@ const ColorPicker = qwik.component$(({ id, value = "#000000", colors = [
588
587
  return /* @__PURE__ */ jsxRuntime.jsx("button", {
589
588
  type: "button",
590
589
  class: {
591
- "lum-btn h-[1.6rem] w-[1.6rem] border-2 border-white/30 p-0 hover:border-white": true
590
+ "lum-btn rounded-sm h-[1.6rem] w-[1.6rem] border-2 border-white/30 p-0 hover:border-white": true
592
591
  },
593
592
  style: {
594
593
  background: color,
@@ -601,7 +600,7 @@ const ColorPicker = qwik.component$(({ id, value = "#000000", colors = [
601
600
  }),
602
601
  /* @__PURE__ */ jsxRuntime.jsx("button", {
603
602
  type: "button",
604
- class: "lum-btn h-[1.6rem] w-[1.6rem] p-0.5",
603
+ class: "lum-btn rounded-sm h-[1.6rem] w-[1.6rem] p-0.5",
605
604
  onClick$: async () => {
606
605
  const color = `#${Math.floor(Math.random() * 16777215).toString(16)}`;
607
606
  await setColor(color);
@@ -742,14 +741,14 @@ const SelectMenuRaw = qwik.component$(({ id, values, class: Class, customDropdow
742
741
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", {
743
742
  id: `lui-${id}-opts`,
744
743
  class: {
745
- "lum-bg-gray-800 lum-scroll flex max-h-72 flex-col gap-1 overflow-auto rounded-md border p-1 backdrop-blur-xl select-none motion-safe:transition-all": true
744
+ "lum-bg-gray-800 lum-scroll flex max-h-72 flex-col gap-1 overflow-auto rounded-lum border p-1 backdrop-blur-xl select-none motion-safe:transition-all": true
746
745
  },
747
746
  children: [
748
747
  values?.map(({ name, value }, i) => {
749
748
  return /* @__PURE__ */ jsxRuntime.jsx("button", {
750
749
  type: "button",
751
750
  class: {
752
- "lum-btn lum-bg-transparent": true
751
+ "lum-btn lum-bg-transparent rounded-lum-1": true
753
752
  },
754
753
  onClick$: () => {
755
754
  store.opened = false;
@@ -815,12 +814,12 @@ const Nav = qwik.component$(({ fixed, floating, nohamburger, colorClass = "lum-b
815
814
  "mt-2": menu.value,
816
815
  "pointer-events-none opacity-0": !menu.value,
817
816
  "before:backdrop-blur-lg": !colorClass.includes("transparent"),
818
- 'before:absolute before:-z-10 before:h-full before:w-full before:rounded-lg before:drop-shadow-xl before:content-[""]': true
817
+ 'before:absolute before:-z-10 before:h-full before:w-full before:rounded-lum before:drop-shadow-xl before:content-[""]': true
819
818
  },
820
819
  children: /* @__PURE__ */ jsxRuntime.jsx("div", {
821
820
  class: {
822
821
  [colorClass]: true,
823
- "flex w-full max-w-7xl flex-col gap-2 rounded-lg border px-2 py-4 motion-safe:transition-all": true
822
+ "flex w-full max-w-7xl flex-col gap-2 rounded-lum border px-2 py-4 motion-safe:transition-all": true
824
823
  },
825
824
  children: /* @__PURE__ */ jsxRuntime.jsx(qwik.Slot, {
826
825
  name: "mobile"
@@ -839,9 +838,9 @@ const Nav = qwik.component$(({ fixed, floating, nohamburger, colorClass = "lum-b
839
838
  class: {
840
839
  "mx-auto flex w-full max-w-7xl justify-evenly px-2": true,
841
840
  [colorClass]: floating,
842
- "rounded-lg border": floating,
841
+ "rounded-lum border": floating,
843
842
  "before:backdrop-blur-lg": !colorClass.includes("transparent") && floating,
844
- 'before:absolute before:-z-10 before:h-full before:w-full before:max-w-7xl before:rounded-lg before:drop-shadow-xl before:content-[""]': floating
843
+ 'before:absolute before:-z-10 before:h-full before:w-full before:max-w-7xl before:rounded-lum before:drop-shadow-xl before:content-[""]': floating
845
844
  },
846
845
  children: [
847
846
  /* @__PURE__ */ jsxRuntime.jsx("div", {
@@ -1215,7 +1214,7 @@ const Toggle = qwik.component$(({ checkbox, round, center, label, onColor = "blu
1215
1214
  class: {
1216
1215
  "peer h-7 border duration-300 ease-out hover:shadow-lg hover:duration-75 motion-safe:transition": true,
1217
1216
  "after:absolute after:top-[4px] after:left-[4px] after:h-5 after:w-5 after:border after:duration-300 after:ease-out after:content-[''] after:hover:duration-75 after:motion-safe:transition-all": true,
1218
- "rounded-md after:rounded-[0.2rem]": !round,
1217
+ "rounded-lum after:rounded-lum-1": !round,
1219
1218
  "rounded-full after:rounded-full": round,
1220
1219
  "w-12 peer-checked:after:translate-x-full": !checkbox,
1221
1220
  "w-7 after:opacity-0 peer-checked:after:opacity-100": checkbox,
@@ -1235,6 +1234,16 @@ const Toggle = qwik.component$(({ checkbox, round, center, label, onColor = "blu
1235
1234
  ]
1236
1235
  });
1237
1236
  });
1237
+ const Hoverable = {
1238
+ onMouseMove$: (e, el) => {
1239
+ const mousex = e.clientX - el.getBoundingClientRect().left;
1240
+ const mousey = e.clientY - el.getBoundingClientRect().top;
1241
+ el.style.transform = `perspective(500px) rotateX(${(mousey / el.clientHeight - 0.5) * 10}deg) rotateY(${(mousex / el.clientWidth - 0.5) * 10}deg)`;
1242
+ },
1243
+ onMouseLeave$: (e, el) => {
1244
+ el.style.transform = "rotateX(0deg) rotateY(0deg)";
1245
+ }
1246
+ };
1238
1247
  const LogoBirdflop = qwik.component$(({ confused, fillGradient, size, ...props }) => {
1239
1248
  const gradientId = fillGradient?.join("-").replace("#", "");
1240
1249
  return /* @__PURE__ */ jsxRuntime.jsxs("svg", {
@@ -1684,6 +1693,7 @@ exports.Anchor = Anchor;
1684
1693
  exports.Blobs = Blobs;
1685
1694
  exports.ColorPicker = ColorPicker;
1686
1695
  exports.Dropdown = Dropdown;
1696
+ exports.Hoverable = Hoverable;
1687
1697
  exports.LogoBirdflop = LogoBirdflop;
1688
1698
  exports.LogoDiscord = LogoDiscord;
1689
1699
  exports.LogoFabric = LogoFabric;
@@ -482,8 +482,7 @@ const ColorPicker = component$(({ id, value = "#000000", colors = [
482
482
  });
483
483
  return /* @__PURE__ */ jsxs("div", {
484
484
  class: {
485
- "lum-bg-gray-900 flex touch-none gap-4 rounded-lg p-4 motion-safe:transition-all": true,
486
- flex: true,
485
+ "lum-card touch-none p-4 motion-safe:transition-all": true,
487
486
  "flex-col": !horizontal,
488
487
  ...props.class
489
488
  },
@@ -507,11 +506,11 @@ const ColorPicker = component$(({ id, value = "#000000", colors = [
507
506
  "preventdefault:touchstart": true,
508
507
  children: [
509
508
  /* @__PURE__ */ jsx("div", {
510
- class: "h-[150px] w-[125px] rounded-[0.3rem] border border-gray-700 bg-gradient-to-b from-transparent to-black"
509
+ class: "h-[150px] w-[125px] rounded-md border border-gray-700 bg-gradient-to-b from-transparent to-black"
511
510
  }),
512
511
  /* @__PURE__ */ jsx("div", {
513
512
  class: {
514
- "absolute -top-2 -left-2 h-4 w-4 rounded-full border bg-white": true,
513
+ "absolute -top-2 -left-2 h-4 w-4 rounded-md border bg-white": true,
515
514
  "border-white": getBrightness(hexNumberToRgb(hexStringToNumber(store.value))) < 0.5,
516
515
  "border-black": getBrightness(hexNumberToRgb(hexStringToNumber(store.value))) > 0.5
517
516
  },
@@ -532,7 +531,7 @@ const ColorPicker = component$(({ id, value = "#000000", colors = [
532
531
  "preventdefault:mousedown": true,
533
532
  "preventdefault:touchstart": true,
534
533
  children: /* @__PURE__ */ jsx("div", {
535
- class: "absolute -bottom-2 -left-[5px] h-4 w-4 rounded-full border border-white bg-[#ff0000]",
534
+ class: "absolute -bottom-2 -left-[5px] h-4 w-4 rounded-md border border-white bg-[#ff0000]",
536
535
  style: {
537
536
  transform: `translateY(${-store.hue.position}px)`,
538
537
  background: store.hue.color
@@ -555,11 +554,11 @@ const ColorPicker = component$(({ id, value = "#000000", colors = [
555
554
  children: [
556
555
  preview != "full" && /* @__PURE__ */ jsx("div", {
557
556
  class: {
558
- "border border-gray-700": true,
559
- "aspect-square h-full rounded-md": preview == "left" || preview == "right",
557
+ "border border-gray-700 rounded-sm": true,
558
+ "aspect-square h-full": preview == "left" || preview == "right",
560
559
  "h-3 w-full": preview == "top" || preview == "bottom",
561
- "rounded-t-md": preview == "top",
562
- "rounded-b-md": preview == "bottom"
560
+ "rounded-b-none": preview == "top",
561
+ "rounded-t-none": preview == "bottom"
563
562
  },
564
563
  style: {
565
564
  backgroundColor: `${store.value}`
@@ -567,7 +566,7 @@ const ColorPicker = component$(({ id, value = "#000000", colors = [
567
566
  }),
568
567
  /* @__PURE__ */ jsx("input", {
569
568
  class: {
570
- "lum-input w-full p-1 text-xs": true,
569
+ "lum-input w-full p-1 text-xs rounded-sm": true,
571
570
  "rounded-t-none border-t-0": preview == "top",
572
571
  "rounded-b-none border-b-0": preview == "bottom"
573
572
  },
@@ -586,7 +585,7 @@ const ColorPicker = component$(({ id, value = "#000000", colors = [
586
585
  return /* @__PURE__ */ jsx("button", {
587
586
  type: "button",
588
587
  class: {
589
- "lum-btn h-[1.6rem] w-[1.6rem] border-2 border-white/30 p-0 hover:border-white": true
588
+ "lum-btn rounded-sm h-[1.6rem] w-[1.6rem] border-2 border-white/30 p-0 hover:border-white": true
590
589
  },
591
590
  style: {
592
591
  background: color,
@@ -599,7 +598,7 @@ const ColorPicker = component$(({ id, value = "#000000", colors = [
599
598
  }),
600
599
  /* @__PURE__ */ jsx("button", {
601
600
  type: "button",
602
- class: "lum-btn h-[1.6rem] w-[1.6rem] p-0.5",
601
+ class: "lum-btn rounded-sm h-[1.6rem] w-[1.6rem] p-0.5",
603
602
  onClick$: async () => {
604
603
  const color = `#${Math.floor(Math.random() * 16777215).toString(16)}`;
605
604
  await setColor(color);
@@ -740,14 +739,14 @@ const SelectMenuRaw = component$(({ id, values, class: Class, customDropdown, ho
740
739
  children: /* @__PURE__ */ jsxs("div", {
741
740
  id: `lui-${id}-opts`,
742
741
  class: {
743
- "lum-bg-gray-800 lum-scroll flex max-h-72 flex-col gap-1 overflow-auto rounded-md border p-1 backdrop-blur-xl select-none motion-safe:transition-all": true
742
+ "lum-bg-gray-800 lum-scroll flex max-h-72 flex-col gap-1 overflow-auto rounded-lum border p-1 backdrop-blur-xl select-none motion-safe:transition-all": true
744
743
  },
745
744
  children: [
746
745
  values?.map(({ name, value }, i) => {
747
746
  return /* @__PURE__ */ jsx("button", {
748
747
  type: "button",
749
748
  class: {
750
- "lum-btn lum-bg-transparent": true
749
+ "lum-btn lum-bg-transparent rounded-lum-1": true
751
750
  },
752
751
  onClick$: () => {
753
752
  store.opened = false;
@@ -813,12 +812,12 @@ const Nav = component$(({ fixed, floating, nohamburger, colorClass = "lum-bg-gra
813
812
  "mt-2": menu.value,
814
813
  "pointer-events-none opacity-0": !menu.value,
815
814
  "before:backdrop-blur-lg": !colorClass.includes("transparent"),
816
- 'before:absolute before:-z-10 before:h-full before:w-full before:rounded-lg before:drop-shadow-xl before:content-[""]': true
815
+ 'before:absolute before:-z-10 before:h-full before:w-full before:rounded-lum before:drop-shadow-xl before:content-[""]': true
817
816
  },
818
817
  children: /* @__PURE__ */ jsx("div", {
819
818
  class: {
820
819
  [colorClass]: true,
821
- "flex w-full max-w-7xl flex-col gap-2 rounded-lg border px-2 py-4 motion-safe:transition-all": true
820
+ "flex w-full max-w-7xl flex-col gap-2 rounded-lum border px-2 py-4 motion-safe:transition-all": true
822
821
  },
823
822
  children: /* @__PURE__ */ jsx(Slot, {
824
823
  name: "mobile"
@@ -837,9 +836,9 @@ const Nav = component$(({ fixed, floating, nohamburger, colorClass = "lum-bg-gra
837
836
  class: {
838
837
  "mx-auto flex w-full max-w-7xl justify-evenly px-2": true,
839
838
  [colorClass]: floating,
840
- "rounded-lg border": floating,
839
+ "rounded-lum border": floating,
841
840
  "before:backdrop-blur-lg": !colorClass.includes("transparent") && floating,
842
- 'before:absolute before:-z-10 before:h-full before:w-full before:max-w-7xl before:rounded-lg before:drop-shadow-xl before:content-[""]': floating
841
+ 'before:absolute before:-z-10 before:h-full before:w-full before:max-w-7xl before:rounded-lum before:drop-shadow-xl before:content-[""]': floating
843
842
  },
844
843
  children: [
845
844
  /* @__PURE__ */ jsx("div", {
@@ -1213,7 +1212,7 @@ const Toggle = component$(({ checkbox, round, center, label, onColor = "blue", o
1213
1212
  class: {
1214
1213
  "peer h-7 border duration-300 ease-out hover:shadow-lg hover:duration-75 motion-safe:transition": true,
1215
1214
  "after:absolute after:top-[4px] after:left-[4px] after:h-5 after:w-5 after:border after:duration-300 after:ease-out after:content-[''] after:hover:duration-75 after:motion-safe:transition-all": true,
1216
- "rounded-md after:rounded-[0.2rem]": !round,
1215
+ "rounded-lum after:rounded-lum-1": !round,
1217
1216
  "rounded-full after:rounded-full": round,
1218
1217
  "w-12 peer-checked:after:translate-x-full": !checkbox,
1219
1218
  "w-7 after:opacity-0 peer-checked:after:opacity-100": checkbox,
@@ -1233,6 +1232,16 @@ const Toggle = component$(({ checkbox, round, center, label, onColor = "blue", o
1233
1232
  ]
1234
1233
  });
1235
1234
  });
1235
+ const Hoverable = {
1236
+ onMouseMove$: (e, el) => {
1237
+ const mousex = e.clientX - el.getBoundingClientRect().left;
1238
+ const mousey = e.clientY - el.getBoundingClientRect().top;
1239
+ el.style.transform = `perspective(500px) rotateX(${(mousey / el.clientHeight - 0.5) * 10}deg) rotateY(${(mousex / el.clientWidth - 0.5) * 10}deg)`;
1240
+ },
1241
+ onMouseLeave$: (e, el) => {
1242
+ el.style.transform = "rotateX(0deg) rotateY(0deg)";
1243
+ }
1244
+ };
1236
1245
  const LogoBirdflop = component$(({ confused, fillGradient, size, ...props }) => {
1237
1246
  const gradientId = fillGradient?.join("-").replace("#", "");
1238
1247
  return /* @__PURE__ */ jsxs("svg", {
@@ -1683,6 +1692,7 @@ export {
1683
1692
  Blobs,
1684
1693
  ColorPicker,
1685
1694
  Dropdown,
1695
+ Hoverable,
1686
1696
  LogoBirdflop,
1687
1697
  LogoDiscord,
1688
1698
  LogoFabric,
@@ -0,0 +1,4 @@
1
+ export declare const Hoverable: {
2
+ readonly onMouseMove$: (e: MouseEvent, el: HTMLElement) => void;
3
+ readonly onMouseLeave$: (e: MouseEvent, el: HTMLElement) => void;
4
+ };
@@ -1,2 +1,3 @@
1
1
  export * from './components/elements';
2
+ export * from './components/functions';
2
3
  export * from './components/logos';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luminescent/ui-qwik",
3
- "version": "3.0.4",
3
+ "version": "4.0.0-0",
4
4
  "description": "Luminescent UI library",
5
5
  "main": "./lib/index.qwik.mjs",
6
6
  "qwik": "./lib/index.qwik.mjs",
@@ -52,7 +52,7 @@
52
52
  "vite-tsconfig-paths": "^5.1.4"
53
53
  },
54
54
  "peerDependencies": {
55
- "@luminescent/ui": "3.0.4"
55
+ "@luminescent/ui": "4.0.0-0"
56
56
  },
57
57
  "scripts": {
58
58
  "build": "qwik build",