@teamturing/react-kit 2.46.3 → 2.46.4
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.
|
@@ -6,6 +6,11 @@ type Props = {
|
|
|
6
6
|
*/
|
|
7
7
|
icon: ComponentType<SVGProps<SVGSVGElement>>;
|
|
8
8
|
} & Pick<ViewProps, 'size' | 'color' | 'sx'> & Pick<HTMLAttributes<HTMLDivElement>, 'className'>;
|
|
9
|
-
declare const StyledIcon:
|
|
9
|
+
declare const StyledIcon: import("react").ForwardRefExoticComponent<{
|
|
10
|
+
/**
|
|
11
|
+
* @teamturing/icons와 함께 사용
|
|
12
|
+
*/
|
|
13
|
+
icon: ComponentType<SVGProps<SVGSVGElement>>;
|
|
14
|
+
} & Pick<ViewProps, "color" | "size" | "sx"> & Pick<HTMLAttributes<HTMLDivElement>, "className"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
10
15
|
export default StyledIcon;
|
|
11
16
|
export type { Props as StyledIconProps };
|
|
@@ -8,7 +8,11 @@ type Props = {
|
|
|
8
8
|
* Tooltip의 텍스트를 정의합니다.
|
|
9
9
|
*/
|
|
10
10
|
text?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Tooltip의 활성화 여부를 정의합니다.
|
|
13
|
+
*/
|
|
14
|
+
disabled?: boolean;
|
|
11
15
|
} & PropsWithChildren;
|
|
12
|
-
declare const Tooltip: ({ children, direction, text }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
declare const Tooltip: ({ children, direction, text, disabled }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
13
17
|
export default Tooltip;
|
|
14
18
|
export type { Props as TooltipProps };
|
package/dist/index.js
CHANGED
|
@@ -7031,11 +7031,12 @@ var Grid$1 = Object.assign(Grid, {
|
|
|
7031
7031
|
Unit
|
|
7032
7032
|
});
|
|
7033
7033
|
|
|
7034
|
-
const StyledIcon = ({
|
|
7034
|
+
const StyledIcon = /*#__PURE__*/React.forwardRef(({
|
|
7035
7035
|
icon: Icon,
|
|
7036
7036
|
sx,
|
|
7037
7037
|
...props
|
|
7038
|
-
}) => /*#__PURE__*/jsxRuntimeExports.jsx(View, {
|
|
7038
|
+
}, ref) => /*#__PURE__*/jsxRuntimeExports.jsx(View, {
|
|
7039
|
+
ref: ref,
|
|
7039
7040
|
...props,
|
|
7040
7041
|
color: props.color,
|
|
7041
7042
|
sx: {
|
|
@@ -7047,7 +7048,7 @@ const StyledIcon = ({
|
|
|
7047
7048
|
...sx
|
|
7048
7049
|
},
|
|
7049
7050
|
children: /*#__PURE__*/jsxRuntimeExports.jsx(Icon, {})
|
|
7050
|
-
});
|
|
7051
|
+
}));
|
|
7051
7052
|
|
|
7052
7053
|
const Text = styled__default.default.span({
|
|
7053
7054
|
'display': 'block',
|
|
@@ -34251,6 +34252,9 @@ const StyledBaseTooltipContent = styled__default.default.div`
|
|
|
34251
34252
|
border-radius: ${({
|
|
34252
34253
|
theme
|
|
34253
34254
|
}) => forcePixelValue(theme.radii.xs)};
|
|
34255
|
+
box-shadow: ${({
|
|
34256
|
+
theme
|
|
34257
|
+
}) => theme.shadows['shadow/overlay']};
|
|
34254
34258
|
padding: ${({
|
|
34255
34259
|
theme
|
|
34256
34260
|
}) => `${forcePixelValue(theme.space[2])} ${forcePixelValue(theme.space[3])}`};
|
|
@@ -34293,7 +34297,8 @@ const StyledBaseTooltipContent = styled__default.default.div`
|
|
|
34293
34297
|
const Tooltip = ({
|
|
34294
34298
|
children,
|
|
34295
34299
|
direction = 'top-center',
|
|
34296
|
-
text
|
|
34300
|
+
text,
|
|
34301
|
+
disabled = false
|
|
34297
34302
|
}) => {
|
|
34298
34303
|
const directionToPlacement = {
|
|
34299
34304
|
'top-center': 'top',
|
|
@@ -34310,10 +34315,10 @@ const Tooltip = ({
|
|
|
34310
34315
|
children: [/*#__PURE__*/jsxRuntimeExports.jsx(BaseTooltipTrigger, {
|
|
34311
34316
|
className: 'tooltip__tooltip_trigger',
|
|
34312
34317
|
children: children
|
|
34313
|
-
}), /*#__PURE__*/jsxRuntimeExports.jsx(BaseTooltipContent, {
|
|
34318
|
+
}), !disabled ? /*#__PURE__*/jsxRuntimeExports.jsx(BaseTooltipContent, {
|
|
34314
34319
|
className: 'tooltip__tooltip_content',
|
|
34315
34320
|
children: text
|
|
34316
|
-
})]
|
|
34321
|
+
}) : null]
|
|
34317
34322
|
});
|
|
34318
34323
|
};
|
|
34319
34324
|
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
import { forwardRef } from 'react';
|
|
1
2
|
import View from '../View/index.js';
|
|
2
3
|
import { j as jsxRuntimeExports } from '../../node_modules/react/jsx-runtime.js';
|
|
3
4
|
|
|
4
|
-
const StyledIcon = ({
|
|
5
|
+
const StyledIcon = /*#__PURE__*/forwardRef(({
|
|
5
6
|
icon: Icon,
|
|
6
7
|
sx,
|
|
7
8
|
...props
|
|
8
|
-
}) => /*#__PURE__*/jsxRuntimeExports.jsx(View, {
|
|
9
|
+
}, ref) => /*#__PURE__*/jsxRuntimeExports.jsx(View, {
|
|
10
|
+
ref: ref,
|
|
9
11
|
...props,
|
|
10
12
|
color: props.color,
|
|
11
13
|
sx: {
|
|
@@ -17,6 +19,6 @@ const StyledIcon = ({
|
|
|
17
19
|
...sx
|
|
18
20
|
},
|
|
19
21
|
children: /*#__PURE__*/jsxRuntimeExports.jsx(Icon, {})
|
|
20
|
-
});
|
|
22
|
+
}));
|
|
21
23
|
|
|
22
24
|
export { StyledIcon as default };
|
|
@@ -83,6 +83,9 @@ const StyledBaseTooltipContent = styled.div`
|
|
|
83
83
|
border-radius: ${({
|
|
84
84
|
theme
|
|
85
85
|
}) => forcePixelValue(theme.radii.xs)};
|
|
86
|
+
box-shadow: ${({
|
|
87
|
+
theme
|
|
88
|
+
}) => theme.shadows['shadow/overlay']};
|
|
86
89
|
padding: ${({
|
|
87
90
|
theme
|
|
88
91
|
}) => `${forcePixelValue(theme.space[2])} ${forcePixelValue(theme.space[3])}`};
|
|
@@ -4,7 +4,8 @@ import { j as jsxRuntimeExports } from '../../node_modules/react/jsx-runtime.js'
|
|
|
4
4
|
const Tooltip = ({
|
|
5
5
|
children,
|
|
6
6
|
direction = 'top-center',
|
|
7
|
-
text
|
|
7
|
+
text,
|
|
8
|
+
disabled = false
|
|
8
9
|
}) => {
|
|
9
10
|
const directionToPlacement = {
|
|
10
11
|
'top-center': 'top',
|
|
@@ -21,10 +22,10 @@ const Tooltip = ({
|
|
|
21
22
|
children: [/*#__PURE__*/jsxRuntimeExports.jsx(BaseTooltipTrigger, {
|
|
22
23
|
className: 'tooltip__tooltip_trigger',
|
|
23
24
|
children: children
|
|
24
|
-
}), /*#__PURE__*/jsxRuntimeExports.jsx(BaseTooltipContent, {
|
|
25
|
+
}), !disabled ? /*#__PURE__*/jsxRuntimeExports.jsx(BaseTooltipContent, {
|
|
25
26
|
className: 'tooltip__tooltip_content',
|
|
26
27
|
children: text
|
|
27
|
-
})]
|
|
28
|
+
}) : null]
|
|
28
29
|
});
|
|
29
30
|
};
|
|
30
31
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teamturing/react-kit",
|
|
3
|
-
"version": "2.46.
|
|
3
|
+
"version": "2.46.4",
|
|
4
4
|
"description": "React components, hooks for create teamturing web application",
|
|
5
5
|
"author": "Sungchang Park <psch300@gmail.com> (https://github.com/psch300)",
|
|
6
6
|
"homepage": "https://github.com/weareteamturing/bombe#readme",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"react-textarea-autosize": "^8.5.3",
|
|
67
67
|
"styled-system": "^5.1.5"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "d63cec8ae7cb12f73b8cbe99a5da02f448f58ae2"
|
|
70
70
|
}
|