@teamturing/react-kit 2.46.2 → 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: ({ icon: Icon, sx, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
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',
@@ -34146,7 +34147,8 @@ function useTooltip({
34146
34147
  const hover = useHover$1(context, {
34147
34148
  move: false,
34148
34149
  restMs: 300,
34149
- enabled: controlledOpen == null
34150
+ enabled: controlledOpen == null,
34151
+ mouseOnly: true
34150
34152
  });
34151
34153
  const focus = useFocus(context, {
34152
34154
  enabled: controlledOpen == null
@@ -34250,6 +34252,9 @@ const StyledBaseTooltipContent = styled__default.default.div`
34250
34252
  border-radius: ${({
34251
34253
  theme
34252
34254
  }) => forcePixelValue(theme.radii.xs)};
34255
+ box-shadow: ${({
34256
+ theme
34257
+ }) => theme.shadows['shadow/overlay']};
34253
34258
  padding: ${({
34254
34259
  theme
34255
34260
  }) => `${forcePixelValue(theme.space[2])} ${forcePixelValue(theme.space[3])}`};
@@ -34292,7 +34297,8 @@ const StyledBaseTooltipContent = styled__default.default.div`
34292
34297
  const Tooltip = ({
34293
34298
  children,
34294
34299
  direction = 'top-center',
34295
- text
34300
+ text,
34301
+ disabled = false
34296
34302
  }) => {
34297
34303
  const directionToPlacement = {
34298
34304
  'top-center': 'top',
@@ -34309,10 +34315,10 @@ const Tooltip = ({
34309
34315
  children: [/*#__PURE__*/jsxRuntimeExports.jsx(BaseTooltipTrigger, {
34310
34316
  className: 'tooltip__tooltip_trigger',
34311
34317
  children: children
34312
- }), /*#__PURE__*/jsxRuntimeExports.jsx(BaseTooltipContent, {
34318
+ }), !disabled ? /*#__PURE__*/jsxRuntimeExports.jsx(BaseTooltipContent, {
34313
34319
  className: 'tooltip__tooltip_content',
34314
34320
  children: text
34315
- })]
34321
+ }) : null]
34316
34322
  });
34317
34323
  };
34318
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
 
@@ -34,7 +34,8 @@ function useTooltip({
34
34
  const hover = useHover(context, {
35
35
  move: false,
36
36
  restMs: 300,
37
- enabled: controlledOpen == null
37
+ enabled: controlledOpen == null,
38
+ mouseOnly: true
38
39
  });
39
40
  const focus = useFocus(context, {
40
41
  enabled: controlledOpen == null
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamturing/react-kit",
3
- "version": "2.46.2",
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": "356cb9e393d0969affa112f95ba5508c40d7390a"
69
+ "gitHead": "d63cec8ae7cb12f73b8cbe99a5da02f448f58ae2"
70
70
  }