@teamturing/react-kit 2.8.0 → 2.8.1

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.
@@ -1,4 +1,5 @@
1
1
  import { HTMLAttributes, PropsWithChildren } from 'react';
2
+ import { SxProp } from '../../utils/styled-system';
2
3
  type Props = {
3
4
  /**
4
5
  * children 컴포넌트 기준으로 Tooltip의 위치를 정의합니다.
@@ -8,7 +9,7 @@ type Props = {
8
9
  * Tooltip의 텍스트를 정의합니다.
9
10
  */
10
11
  text?: string;
11
- } & Pick<HTMLAttributes<HTMLSpanElement>, 'className'>;
12
- declare const Tooltip: ({ children, direction, text, className: propClassName }: PropsWithChildren<Props>) => import("react/jsx-runtime").JSX.Element;
12
+ } & SxProp & Pick<HTMLAttributes<HTMLSpanElement>, 'className'>;
13
+ declare const Tooltip: ({ children, direction, text, className: propClassName, sx, }: PropsWithChildren<Props>) => import("react/jsx-runtime").JSX.Element;
13
14
  export default Tooltip;
14
15
  export type { Props as TooptipProps };
package/dist/index.js CHANGED
@@ -18684,13 +18684,15 @@ const Tooltip = ({
18684
18684
  children,
18685
18685
  direction = 'top-center',
18686
18686
  text,
18687
- className: propClassName
18687
+ className: propClassName,
18688
+ sx
18688
18689
  }) => {
18689
18690
  const className = [propClassName, `tooltip-direction-${direction}`].join(' ');
18690
18691
  return /*#__PURE__*/jsxRuntimeExports.jsx(BaseTooltip, {
18691
18692
  role: 'tooltip',
18692
18693
  "aria-label": text,
18693
18694
  className: className,
18695
+ sx: sx,
18694
18696
  children: children
18695
18697
  });
18696
18698
  };
@@ -18929,6 +18931,8 @@ const BaseTooltip = styled__default.default.span`
18929
18931
  &.tooltip-direction-right::after {
18930
18932
  right: 100%;
18931
18933
  }
18934
+
18935
+ ${sx}
18932
18936
  `;
18933
18937
 
18934
18938
  const useMediaQuery = query => {
@@ -1,18 +1,21 @@
1
1
  import styled, { keyframes } from 'styled-components';
2
2
  import { forcePixelValue } from '../../utils/forcePixelValue.js';
3
+ import { sx } from '../../utils/styled-system/index.js';
3
4
  import { j as jsxRuntimeExports } from '../../node_modules/react/jsx-runtime.js';
4
5
 
5
6
  const Tooltip = ({
6
7
  children,
7
8
  direction = 'top-center',
8
9
  text,
9
- className: propClassName
10
+ className: propClassName,
11
+ sx
10
12
  }) => {
11
13
  const className = [propClassName, `tooltip-direction-${direction}`].join(' ');
12
14
  return /*#__PURE__*/jsxRuntimeExports.jsx(BaseTooltip, {
13
15
  role: 'tooltip',
14
16
  "aria-label": text,
15
17
  className: className,
18
+ sx: sx,
16
19
  children: children
17
20
  });
18
21
  };
@@ -251,6 +254,8 @@ const BaseTooltip = styled.span`
251
254
  &.tooltip-direction-right::after {
252
255
  right: 100%;
253
256
  }
257
+
258
+ ${sx}
254
259
  `;
255
260
 
256
261
  export { Tooltip as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamturing/react-kit",
3
- "version": "2.8.0",
3
+ "version": "2.8.1",
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",
@@ -57,5 +57,5 @@
57
57
  "react-is": "^18.2.0",
58
58
  "styled-system": "^5.1.5"
59
59
  },
60
- "gitHead": "cf95bbbf992b5d7f81dfab51bd80b5f90e4e3005"
60
+ "gitHead": "905ea6546094f215ab7392effb88e7c93cca6ab9"
61
61
  }