@lolmath/ui 2.1.0 → 2.2.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.
- package/dist/index.cjs +84 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -2
- package/dist/index.d.ts +14 -2
- package/dist/index.js +86 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -25,8 +25,12 @@ __export(src_exports, {
|
|
|
25
25
|
AccordionItem: () => AccordionItem,
|
|
26
26
|
AccordionTrigger: () => AccordionTrigger,
|
|
27
27
|
Button: () => Button,
|
|
28
|
+
DialogButtons: () => DialogButtons,
|
|
29
|
+
DialogTrigger: () => DialogTrigger,
|
|
30
|
+
Heading: () => Heading,
|
|
28
31
|
Item: () => Item,
|
|
29
32
|
Label: () => Label3,
|
|
33
|
+
Modal: () => Modal,
|
|
30
34
|
NumberField: () => NumberField,
|
|
31
35
|
ProgressBar: () => ProgressBar,
|
|
32
36
|
Radio: () => Radio,
|
|
@@ -49,7 +53,7 @@ var import_tailwind_merge = require("tailwind-merge");
|
|
|
49
53
|
// src/utilities/border.tsx
|
|
50
54
|
var borderClassName = "from-[#785b28] via-[#c89c3c] to-[#c8aa6e] bg-gradient-to-t";
|
|
51
55
|
var borderHoverClassName = "from-[#c89c3c] via-[#dcc188] to-[#f0e6d8]";
|
|
52
|
-
var borderPressedClassName = "from-
|
|
56
|
+
var borderPressedClassName = "from-lol-gold-600 via-lol-gold-600 to-lol-gold-700";
|
|
53
57
|
var borderDisabledClassName = "from-[#5c5b57] via-[#5c5b57] to-[#5c5b57]";
|
|
54
58
|
|
|
55
59
|
// src/components/button.tsx
|
|
@@ -743,6 +747,81 @@ function Spinner({ className }) {
|
|
|
743
747
|
}
|
|
744
748
|
);
|
|
745
749
|
}
|
|
750
|
+
|
|
751
|
+
// src/components/modal.tsx
|
|
752
|
+
var import_react_aria_components11 = require("react-aria-components");
|
|
753
|
+
var import_tailwind_merge13 = require("tailwind-merge");
|
|
754
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
755
|
+
function Modal({
|
|
756
|
+
modalOverlayClassName,
|
|
757
|
+
dialogProps = {},
|
|
758
|
+
children,
|
|
759
|
+
className,
|
|
760
|
+
...modalProps
|
|
761
|
+
}) {
|
|
762
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
763
|
+
import_react_aria_components11.ModalOverlay,
|
|
764
|
+
{
|
|
765
|
+
...modalProps,
|
|
766
|
+
className: (values) => {
|
|
767
|
+
return (0, import_tailwind_merge13.twMerge)(
|
|
768
|
+
"fixed inset-0 z-10 overflow-y-auto bg-black bg-opacity-25 flex min-h-full items-center justify-center text-center backdrop-blur flex-col px-4",
|
|
769
|
+
resolveClassname(modalOverlayClassName, values)
|
|
770
|
+
);
|
|
771
|
+
},
|
|
772
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
773
|
+
import_react_aria_components11.Modal,
|
|
774
|
+
{
|
|
775
|
+
...modalProps,
|
|
776
|
+
className: (values) => (0, import_tailwind_merge13.twMerge)("w-full max-w-md", resolveClassname(className, values)),
|
|
777
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
778
|
+
import_react_aria_components11.Dialog,
|
|
779
|
+
{
|
|
780
|
+
role: "alertdialog",
|
|
781
|
+
...dialogProps,
|
|
782
|
+
className: (0, import_tailwind_merge13.twMerge)(
|
|
783
|
+
"outline-none relative max-h-screen py-4",
|
|
784
|
+
dialogProps.className
|
|
785
|
+
),
|
|
786
|
+
children: (dialogRenderProps) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
|
|
787
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "relative h-1", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "border-lol-gold-700 border bg-black absolute border-b-0 rounded-full h-full left-5 right-5" }) }),
|
|
788
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
789
|
+
"div",
|
|
790
|
+
{
|
|
791
|
+
className: (0, import_tailwind_merge13.twMerge)(
|
|
792
|
+
"text-left align-middle shadow-xl p-0.5 bg-gradient-to-t",
|
|
793
|
+
borderPressedClassName
|
|
794
|
+
),
|
|
795
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "bg-black", children: typeof children === "function" ? children(dialogRenderProps) : children })
|
|
796
|
+
}
|
|
797
|
+
),
|
|
798
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "relative h-1", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "border-lol-gold-600 border bg-black absolute border-t-0 rounded-full h-full left-5 right-5" }) })
|
|
799
|
+
] })
|
|
800
|
+
}
|
|
801
|
+
)
|
|
802
|
+
}
|
|
803
|
+
)
|
|
804
|
+
}
|
|
805
|
+
);
|
|
806
|
+
}
|
|
807
|
+
function Heading(props) {
|
|
808
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
809
|
+
import_react_aria_components11.Heading,
|
|
810
|
+
{
|
|
811
|
+
...props,
|
|
812
|
+
className: (0, import_tailwind_merge13.twMerge)(
|
|
813
|
+
"text-lol-gold-100 uppercase font-beaufort font-bold text-lg",
|
|
814
|
+
props.className
|
|
815
|
+
)
|
|
816
|
+
}
|
|
817
|
+
);
|
|
818
|
+
}
|
|
819
|
+
function DialogButtons({ children }) {
|
|
820
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "flex justify-center translate-y-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "flex gap-1 bg-black px-1", children }) });
|
|
821
|
+
}
|
|
822
|
+
function DialogTrigger(props) {
|
|
823
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_aria_components11.DialogTrigger, { ...props });
|
|
824
|
+
}
|
|
746
825
|
// Annotate the CommonJS export names for ESM import in node:
|
|
747
826
|
0 && (module.exports = {
|
|
748
827
|
Accordion,
|
|
@@ -750,8 +829,12 @@ function Spinner({ className }) {
|
|
|
750
829
|
AccordionItem,
|
|
751
830
|
AccordionTrigger,
|
|
752
831
|
Button,
|
|
832
|
+
DialogButtons,
|
|
833
|
+
DialogTrigger,
|
|
834
|
+
Heading,
|
|
753
835
|
Item,
|
|
754
836
|
Label,
|
|
837
|
+
Modal,
|
|
755
838
|
NumberField,
|
|
756
839
|
ProgressBar,
|
|
757
840
|
Radio,
|