@react-fabric/core 1.0.0-beta.44 → 1.0.0-beta.45
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/css/components/_button.css +1 -1
- package/css/components/_menu.css +4 -4
- package/dist/cjs/components/tabpanel/Tab.js +1 -1
- package/dist/cjs/overlays/tooltip/Tooltip.js +2 -1
- package/dist/esm/components/tabpanel/Tab.js +1 -1
- package/dist/esm/overlays/tooltip/Tooltip.js +2 -1
- package/package.json +3 -3
- package/src/components/tabpanel/Tab.tsx +1 -1
- package/src/overlays/tooltip/Tooltip.tsx +3 -1
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
--text: color-mix(in lab, var(--color) 80%, var(--fabric-text));
|
|
135
135
|
--bg-hover: color-mix(in lab, var(--color) 18%, var(--fabric-bg));
|
|
136
136
|
--bg-click: color-mix(in lab, var(--color) 25%, var(--fabric-bg));
|
|
137
|
-
--bg-active: color-mix(in lab, var(--color)
|
|
137
|
+
--bg-active: color-mix(in lab, var(--color) 24%, var(--fabric-bg));
|
|
138
138
|
|
|
139
139
|
&[data-color="accent"] {
|
|
140
140
|
--color: var(--color-accent-500);
|
package/css/components/_menu.css
CHANGED
|
@@ -56,20 +56,20 @@
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
&[data-focus="true"] {
|
|
59
|
-
background-color: color(
|
|
59
|
+
background-color: color-mix(in lab, var(--color) 15%, var(--fabric-bg));
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
&:active {
|
|
63
|
-
background-color: color(
|
|
63
|
+
background-color: color-mix(in lab, var(--color) 35%, var(--fabric-bg));
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
&[data-open="true"] {
|
|
67
|
-
background-color: color(
|
|
67
|
+
background-color: color-mix(in lab, var(--color) 10%, var(--fabric-bg));
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
&.active {
|
|
71
71
|
pointer-events: none;
|
|
72
|
-
background-color: color(
|
|
72
|
+
background-color: color-mix(in lab, var(--color) 20%, var(--fabric-bg));
|
|
73
73
|
|
|
74
74
|
& > div {
|
|
75
75
|
box-shadow: 4px 0 0 var(--color) inset;
|
|
@@ -61,7 +61,7 @@ var Tab = function Tab(_ref) {
|
|
|
61
61
|
disabled: disabled,
|
|
62
62
|
"data-color": color,
|
|
63
63
|
"data-inner-clickable": true,
|
|
64
|
-
className: classNames("fabric-tabButton", className, active && "active pointer-events-none", active && activeClassName, disabled && "text-tint-500 pointer-events-none", tabFlex ? "flex-1" : "flex-initial max-w-36", minimal ? "min-w-6" : "min-w-18", "flex items-center justify-center px-1 rounded overflow-hidden"),
|
|
64
|
+
className: classNames("fabric-tabButton", className, active && "active pointer-events-none", active && activeClassName, disabled && "text-tint-500 pointer-events-none", tabFlex ? "flex-1" : "flex-initial max-w-36", minimal ? "min-w-6" : "min-w-18", "flex items-center justify-center px-1 rounded overflow-hidden cursor-pointer"),
|
|
65
65
|
onClick: function onClick() {
|
|
66
66
|
return !active && (_onClick === null || _onClick === void 0 ? void 0 : _onClick(id));
|
|
67
67
|
},
|
|
@@ -92,8 +92,9 @@ var Tooltip = function Tooltip(_ref) {
|
|
|
92
92
|
var copyEl = react.useMemo(function () {
|
|
93
93
|
if (copyContent) {
|
|
94
94
|
var copyText = utilities.isString(copyContent) ? copyContent : content;
|
|
95
|
-
var handler = function handler() {
|
|
95
|
+
var handler = function handler(e) {
|
|
96
96
|
setIsOpen(false);
|
|
97
|
+
e.stopPropagation();
|
|
97
98
|
void navigator.clipboard.writeText(copyText.toString());
|
|
98
99
|
};
|
|
99
100
|
return /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
@@ -61,7 +61,7 @@ var Tab = function Tab(_ref) {
|
|
|
61
61
|
disabled: disabled,
|
|
62
62
|
"data-color": color,
|
|
63
63
|
"data-inner-clickable": true,
|
|
64
|
-
className: classNames("fabric-tabButton", className, active && "active pointer-events-none", active && activeClassName, disabled && "text-tint-500 pointer-events-none", tabFlex ? "flex-1" : "flex-initial max-w-36", minimal ? "min-w-6" : "min-w-18", "flex items-center justify-center px-1 rounded overflow-hidden"),
|
|
64
|
+
className: classNames("fabric-tabButton", className, active && "active pointer-events-none", active && activeClassName, disabled && "text-tint-500 pointer-events-none", tabFlex ? "flex-1" : "flex-initial max-w-36", minimal ? "min-w-6" : "min-w-18", "flex items-center justify-center px-1 rounded overflow-hidden cursor-pointer"),
|
|
65
65
|
onClick: function onClick() {
|
|
66
66
|
return !active && (_onClick === null || _onClick === void 0 ? void 0 : _onClick(id));
|
|
67
67
|
},
|
|
@@ -92,8 +92,9 @@ var Tooltip = function Tooltip(_ref) {
|
|
|
92
92
|
var copyEl = useMemo(function () {
|
|
93
93
|
if (copyContent) {
|
|
94
94
|
var copyText = isString(copyContent) ? copyContent : content;
|
|
95
|
-
var handler = function handler() {
|
|
95
|
+
var handler = function handler(e) {
|
|
96
96
|
setIsOpen(false);
|
|
97
|
+
e.stopPropagation();
|
|
97
98
|
void navigator.clipboard.writeText(copyText.toString());
|
|
98
99
|
};
|
|
99
100
|
return /*#__PURE__*/jsx("span", {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-fabric/core",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.45",
|
|
4
4
|
"description": "RUF: Core package",
|
|
5
5
|
"author": "Adarsh Pastakia <adarshpastakia@outlook.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@floating-ui/react": "^0.26.24",
|
|
39
|
-
"@react-fabric/utilities": "^1.0.0-beta.
|
|
39
|
+
"@react-fabric/utilities": "^1.0.0-beta.45",
|
|
40
40
|
"@tailwindcss/postcss": "~4.0.14",
|
|
41
41
|
"boring-avatars": "^1.10.2",
|
|
42
42
|
"classnames": "^2.5.1",
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"node": ">=18.12.0",
|
|
55
55
|
"npm": ">=8.19.0"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "37d7cbcd99da40553f4ac775c3332d5281565936"
|
|
58
58
|
}
|
|
@@ -144,7 +144,7 @@ export const Tab = <Tag extends React.ElementType = "button">({
|
|
|
144
144
|
disabled && "text-tint-500 pointer-events-none",
|
|
145
145
|
tabFlex ? "flex-1" : "flex-initial max-w-36",
|
|
146
146
|
minimal ? "min-w-6" : "min-w-18",
|
|
147
|
-
"flex items-center justify-center px-1 rounded overflow-hidden",
|
|
147
|
+
"flex items-center justify-center px-1 rounded overflow-hidden cursor-pointer",
|
|
148
148
|
)}
|
|
149
149
|
onClick={() => !active && onClick?.(id)}
|
|
150
150
|
ref={ref as AnyObject}
|
|
@@ -45,6 +45,7 @@ import {
|
|
|
45
45
|
useMemo,
|
|
46
46
|
useRef,
|
|
47
47
|
useState,
|
|
48
|
+
type MouseEvent,
|
|
48
49
|
type ReactElement,
|
|
49
50
|
} from "react";
|
|
50
51
|
import { Icon } from "../../components/icon/Icon";
|
|
@@ -147,8 +148,9 @@ export const Tooltip = ({
|
|
|
147
148
|
const copyEl = useMemo(() => {
|
|
148
149
|
if (copyContent) {
|
|
149
150
|
const copyText: AnyObject = isString(copyContent) ? copyContent : content;
|
|
150
|
-
const handler = () => {
|
|
151
|
+
const handler = (e: MouseEvent) => {
|
|
151
152
|
setIsOpen(false);
|
|
153
|
+
e.stopPropagation();
|
|
152
154
|
void navigator.clipboard.writeText(copyText.toString());
|
|
153
155
|
};
|
|
154
156
|
return (
|