@lolmath/ui 2.6.0 → 2.7.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 +63 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +60 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -47,7 +47,9 @@ __export(src_exports, {
|
|
|
47
47
|
TabPanel: () => TabPanel,
|
|
48
48
|
Tabs: () => Tabs,
|
|
49
49
|
TextArea: () => TextArea,
|
|
50
|
-
TextField: () => TextField
|
|
50
|
+
TextField: () => TextField,
|
|
51
|
+
Tooltip: () => Tooltip,
|
|
52
|
+
TooltipTrigger: () => import_react_aria_components16.TooltipTrigger
|
|
51
53
|
});
|
|
52
54
|
module.exports = __toCommonJS(src_exports);
|
|
53
55
|
|
|
@@ -1020,6 +1022,63 @@ function TextArea({
|
|
|
1020
1022
|
}
|
|
1021
1023
|
);
|
|
1022
1024
|
}
|
|
1025
|
+
|
|
1026
|
+
// src/components/tooltip.tsx
|
|
1027
|
+
var import_react_aria_components15 = require("react-aria-components");
|
|
1028
|
+
var import_tailwind_merge17 = require("tailwind-merge");
|
|
1029
|
+
var import_react_aria_components16 = require("react-aria-components");
|
|
1030
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1031
|
+
function Tooltip({ children, ...props }) {
|
|
1032
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1033
|
+
import_react_aria_components15.Tooltip,
|
|
1034
|
+
{
|
|
1035
|
+
...props,
|
|
1036
|
+
className: (values) => (0, import_tailwind_merge17.twMerge)(
|
|
1037
|
+
`p-0.5 drop-shadow-lg bg-black`,
|
|
1038
|
+
borderClassName,
|
|
1039
|
+
"w-[280px]",
|
|
1040
|
+
values.isEntering && "animate-in fade-in data-[placement=bottom]:slide-in-from-top-1 data-[placement=top]:slide-in-from-bottom-1 ease-out duration-200 fill-mode-forwards",
|
|
1041
|
+
values.isExiting && "animate-out fade-out data-[placement=bottom]:slide-out-to-top-1 data-[placement=top]:slide-out-to-bottom-1 ease-in duration-150 fill-mode-forwards",
|
|
1042
|
+
values.placement === "bottom" && "mt-2",
|
|
1043
|
+
values.placement === "top" && "mb-2",
|
|
1044
|
+
resolveClassname(props.className, values)
|
|
1045
|
+
),
|
|
1046
|
+
children: (values) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
1047
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_aria_components15.OverlayArrow, { className: "transform translate-y-1", children: (values2) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
1048
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1049
|
+
"svg",
|
|
1050
|
+
{
|
|
1051
|
+
viewBox: "0 0 12 12",
|
|
1052
|
+
className: (0, import_tailwind_merge17.twMerge)(
|
|
1053
|
+
"block fill-lol-gold-600 w-5 h-5 absolute",
|
|
1054
|
+
values2.placement === "top" && "-translate-y-[1px] -left-0.5 ",
|
|
1055
|
+
values2.placement === "bottom" && "-translate-y-[3px] rotate-180 -left-0.5 fill-lol-gold-400",
|
|
1056
|
+
values2.placement === "left" && "-translate-x-px -rotate-90 -top-0.5 fill-lol-gold-500",
|
|
1057
|
+
values2.placement === "right" && "-translate-x-[3px] rotate-90 -top-0.5 fill-lol-gold-500"
|
|
1058
|
+
),
|
|
1059
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M0 0,L6 6,L12 0" })
|
|
1060
|
+
}
|
|
1061
|
+
),
|
|
1062
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1063
|
+
"svg",
|
|
1064
|
+
{
|
|
1065
|
+
viewBox: "0 0 12 12",
|
|
1066
|
+
className: (0, import_tailwind_merge17.twMerge)(
|
|
1067
|
+
"block fill-lol-gray-900 w-4 h-4",
|
|
1068
|
+
values2.placement === "top" && "-translate-y-0.5",
|
|
1069
|
+
values2.placement === "bottom" && "translate-y-0.5 rotate-180",
|
|
1070
|
+
values2.placement === "left" && "-translate-x-0.5 -rotate-90",
|
|
1071
|
+
values2.placement === "right" && "translate-x-0.5 rotate-90"
|
|
1072
|
+
),
|
|
1073
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M0 0,L6 6,L12 0" })
|
|
1074
|
+
}
|
|
1075
|
+
)
|
|
1076
|
+
] }) }),
|
|
1077
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "bg-lol-gray-900", children: typeof children === "function" ? children(values) : children })
|
|
1078
|
+
] })
|
|
1079
|
+
}
|
|
1080
|
+
);
|
|
1081
|
+
}
|
|
1023
1082
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1024
1083
|
0 && (module.exports = {
|
|
1025
1084
|
Accordion,
|
|
@@ -1049,6 +1108,8 @@ function TextArea({
|
|
|
1049
1108
|
TabPanel,
|
|
1050
1109
|
Tabs,
|
|
1051
1110
|
TextArea,
|
|
1052
|
-
TextField
|
|
1111
|
+
TextField,
|
|
1112
|
+
Tooltip,
|
|
1113
|
+
TooltipTrigger
|
|
1053
1114
|
});
|
|
1054
1115
|
//# sourceMappingURL=index.cjs.map
|