@refinn/core-ui 0.1.23 → 0.1.25
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 +4 -3
- package/dist/index.js +4 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1709,6 +1709,7 @@ var Tooltip = (0, import_react14.forwardRef)(
|
|
|
1709
1709
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
1710
1710
|
};
|
|
1711
1711
|
}, []);
|
|
1712
|
+
const visibilityClass = isVisible || isHovered ? "opacity-100" : "opacity-0 pointer-events-none";
|
|
1712
1713
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1713
1714
|
"div",
|
|
1714
1715
|
__spreadProps(__spreadValues({
|
|
@@ -1736,7 +1737,7 @@ var Tooltip = (0, import_react14.forwardRef)(
|
|
|
1736
1737
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1737
1738
|
"div",
|
|
1738
1739
|
{
|
|
1739
|
-
className: `min-w-100 max-w-300 whitespace-nowrap rounded bg-gray-900 text-white ${size === "lg" ? "text-body-regular py-12 px-16" : size === "md" ? "text-body-small px-12 pt-10 pb-8" : "text-body-small px-8 pt-6 pb-4"} ${position === "right" && `absolute left-full top-1/2 z-20 ml-8 -translate-y-1/2 ${
|
|
1740
|
+
className: `min-w-100 max-w-300 whitespace-nowrap rounded bg-gray-900 text-white ${size === "lg" ? "text-body-regular py-12 px-16" : size === "md" ? "text-body-small px-12 pt-10 pb-8" : "text-body-small px-8 pt-6 pb-4"} ${position === "right" && `absolute left-full top-1/2 z-20 ml-8 -translate-y-1/2 ${visibilityClass}` || position === "top" && `absolute bottom-full left-1/2 z-20 mb-8 -translate-x-1/2 ${visibilityClass}` || position === "left" && `absolute right-full top-1/2 z-20 mr-8 -translate-y-1/2 ${visibilityClass}` || position === "bottom" && `absolute left-1/2 top-full z-20 mt-8 -translate-x-1/2 ${visibilityClass}`}`,
|
|
1740
1741
|
children: [
|
|
1741
1742
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1742
1743
|
"span",
|
|
@@ -2666,11 +2667,11 @@ var SegmentControl = (0, import_react21.forwardRef)(
|
|
|
2666
2667
|
setSelected == null ? void 0 : setSelected(item.value);
|
|
2667
2668
|
onChange == null ? void 0 : onChange(item.value);
|
|
2668
2669
|
},
|
|
2669
|
-
className: "group flex-1 min-w-0 rounded-full
|
|
2670
|
+
className: "group flex-1 min-w-0 rounded-full outline-none cursor-pointer",
|
|
2670
2671
|
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2671
2672
|
"span",
|
|
2672
2673
|
{
|
|
2673
|
-
className: `flex w-full items-center justify-center rounded-full text-center transition-colors ${itemSizeClasses[size]} ${isSelected ? "bg-segmented-control-background-active text-segmented-control-text-inverse shadow-small group-focus-visible:bg-segmented-control-background-active-focus group-focus-visible:text-segmented-control-text-primary" : "text-segmented-control-text-primary hover:bg-segmented-control-background-hover"}`,
|
|
2674
|
+
className: `flex w-full items-center justify-center rounded-full text-center transition-colors group-focus-visible:outline-2 group-focus-visible:outline-offset-2 group-focus-visible:outline-segmented-control-border-focus ${itemSizeClasses[size]} ${isSelected ? "bg-segmented-control-background-active text-segmented-control-text-inverse shadow-small group-focus-visible:bg-segmented-control-background-active-focus group-focus-visible:text-segmented-control-text-primary" : "text-segmented-control-text-primary hover:bg-segmented-control-background-hover"}`,
|
|
2674
2675
|
children: item.label
|
|
2675
2676
|
}
|
|
2676
2677
|
)
|
package/dist/index.js
CHANGED
|
@@ -1700,6 +1700,7 @@ var Tooltip = forwardRef14(
|
|
|
1700
1700
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
1701
1701
|
};
|
|
1702
1702
|
}, []);
|
|
1703
|
+
const visibilityClass = isVisible || isHovered ? "opacity-100" : "opacity-0 pointer-events-none";
|
|
1703
1704
|
return /* @__PURE__ */ jsxs12(
|
|
1704
1705
|
"div",
|
|
1705
1706
|
__spreadProps(__spreadValues({
|
|
@@ -1727,7 +1728,7 @@ var Tooltip = forwardRef14(
|
|
|
1727
1728
|
/* @__PURE__ */ jsxs12(
|
|
1728
1729
|
"div",
|
|
1729
1730
|
{
|
|
1730
|
-
className: `min-w-100 max-w-300 whitespace-nowrap rounded bg-gray-900 text-white ${size === "lg" ? "text-body-regular py-12 px-16" : size === "md" ? "text-body-small px-12 pt-10 pb-8" : "text-body-small px-8 pt-6 pb-4"} ${position === "right" && `absolute left-full top-1/2 z-20 ml-8 -translate-y-1/2 ${
|
|
1731
|
+
className: `min-w-100 max-w-300 whitespace-nowrap rounded bg-gray-900 text-white ${size === "lg" ? "text-body-regular py-12 px-16" : size === "md" ? "text-body-small px-12 pt-10 pb-8" : "text-body-small px-8 pt-6 pb-4"} ${position === "right" && `absolute left-full top-1/2 z-20 ml-8 -translate-y-1/2 ${visibilityClass}` || position === "top" && `absolute bottom-full left-1/2 z-20 mb-8 -translate-x-1/2 ${visibilityClass}` || position === "left" && `absolute right-full top-1/2 z-20 mr-8 -translate-y-1/2 ${visibilityClass}` || position === "bottom" && `absolute left-1/2 top-full z-20 mt-8 -translate-x-1/2 ${visibilityClass}`}`,
|
|
1731
1732
|
children: [
|
|
1732
1733
|
/* @__PURE__ */ jsx14(
|
|
1733
1734
|
"span",
|
|
@@ -2666,11 +2667,11 @@ var SegmentControl = forwardRef21(
|
|
|
2666
2667
|
setSelected == null ? void 0 : setSelected(item.value);
|
|
2667
2668
|
onChange == null ? void 0 : onChange(item.value);
|
|
2668
2669
|
},
|
|
2669
|
-
className: "group flex-1 min-w-0 rounded-full
|
|
2670
|
+
className: "group flex-1 min-w-0 rounded-full outline-none cursor-pointer",
|
|
2670
2671
|
children: /* @__PURE__ */ jsx21(
|
|
2671
2672
|
"span",
|
|
2672
2673
|
{
|
|
2673
|
-
className: `flex w-full items-center justify-center rounded-full text-center transition-colors ${itemSizeClasses[size]} ${isSelected ? "bg-segmented-control-background-active text-segmented-control-text-inverse shadow-small group-focus-visible:bg-segmented-control-background-active-focus group-focus-visible:text-segmented-control-text-primary" : "text-segmented-control-text-primary hover:bg-segmented-control-background-hover"}`,
|
|
2674
|
+
className: `flex w-full items-center justify-center rounded-full text-center transition-colors group-focus-visible:outline-2 group-focus-visible:outline-offset-2 group-focus-visible:outline-segmented-control-border-focus ${itemSizeClasses[size]} ${isSelected ? "bg-segmented-control-background-active text-segmented-control-text-inverse shadow-small group-focus-visible:bg-segmented-control-background-active-focus group-focus-visible:text-segmented-control-text-primary" : "text-segmented-control-text-primary hover:bg-segmented-control-background-hover"}`,
|
|
2674
2675
|
children: item.label
|
|
2675
2676
|
}
|
|
2676
2677
|
)
|