@teamturing/react-kit 2.30.1 → 2.31.0

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 } from 'react';
2
+ import { ResponsiveValue } from 'styled-system';
2
3
  import { SxProp } from '../../utils/styled-system';
3
4
  type Props = {
4
5
  /**
@@ -9,6 +10,7 @@ type Props = {
9
10
  * Tooltip의 텍스트를 정의합니다.
10
11
  */
11
12
  text?: string;
13
+ disabled?: ResponsiveValue<boolean>;
12
14
  } & SxProp & Pick<HTMLAttributes<HTMLSpanElement>, 'className'>;
13
15
  declare const _default: import("react").ForwardRefExoticComponent<{
14
16
  /**
@@ -19,6 +21,7 @@ declare const _default: import("react").ForwardRefExoticComponent<{
19
21
  * Tooltip의 텍스트를 정의합니다.
20
22
  */
21
23
  text?: string | undefined;
24
+ disabled?: ResponsiveValue<boolean> | undefined;
22
25
  } & SxProp & Pick<HTMLAttributes<HTMLSpanElement>, "className"> & {
23
26
  children?: import("react").ReactNode;
24
27
  } & import("react").RefAttributes<HTMLSpanElement>>;
package/dist/index.js CHANGED
@@ -16416,6 +16416,7 @@ const Tooltip = ({
16416
16416
  children,
16417
16417
  direction = 'top-center',
16418
16418
  text,
16419
+ disabled,
16419
16420
  className: propClassName,
16420
16421
  sx
16421
16422
  }, ref) => {
@@ -16424,6 +16425,7 @@ const Tooltip = ({
16424
16425
  ref: ref,
16425
16426
  role: 'tooltip',
16426
16427
  "aria-label": text,
16428
+ disabled: disabled,
16427
16429
  className: className,
16428
16430
  sx: sx,
16429
16431
  children: children
@@ -16666,6 +16668,25 @@ const BaseTooltip = styled__default.default.span`
16666
16668
  }
16667
16669
 
16668
16670
  ${sx}
16671
+ ${variant({
16672
+ prop: 'disabled',
16673
+ variants: {
16674
+ true: {
16675
+ '&:hover , &:active, &:focus': {
16676
+ '&::before, &::after': {
16677
+ display: 'none'
16678
+ }
16679
+ }
16680
+ },
16681
+ false: {
16682
+ '&:hover , &:active, &:focus': {
16683
+ '&::before, &::after': {
16684
+ display: 'table-cell'
16685
+ }
16686
+ }
16687
+ }
16688
+ }
16689
+ })}
16669
16690
  `;
16670
16691
  var Tooltip$1 = /*#__PURE__*/React.forwardRef(Tooltip);
16671
16692
 
@@ -1,13 +1,16 @@
1
1
  import { forcePixelValue } from '../../packages/utils/esm/forcePixelValue.js';
2
2
  import { forwardRef } from 'react';
3
3
  import styled, { keyframes } from 'styled-components';
4
+ import '../../node_modules/styled-system/dist/index.esm.js';
4
5
  import { sx } from '../../utils/styled-system/index.js';
5
6
  import { j as jsxRuntimeExports } from '../../node_modules/react/jsx-runtime.js';
7
+ import { variant } from '../../node_modules/@styled-system/variant/dist/index.esm.js';
6
8
 
7
9
  const Tooltip = ({
8
10
  children,
9
11
  direction = 'top-center',
10
12
  text,
13
+ disabled,
11
14
  className: propClassName,
12
15
  sx
13
16
  }, ref) => {
@@ -16,6 +19,7 @@ const Tooltip = ({
16
19
  ref: ref,
17
20
  role: 'tooltip',
18
21
  "aria-label": text,
22
+ disabled: disabled,
19
23
  className: className,
20
24
  sx: sx,
21
25
  children: children
@@ -258,6 +262,25 @@ const BaseTooltip = styled.span`
258
262
  }
259
263
 
260
264
  ${sx}
265
+ ${variant({
266
+ prop: 'disabled',
267
+ variants: {
268
+ true: {
269
+ '&:hover , &:active, &:focus': {
270
+ '&::before, &::after': {
271
+ display: 'none'
272
+ }
273
+ }
274
+ },
275
+ false: {
276
+ '&:hover , &:active, &:focus': {
277
+ '&::before, &::after': {
278
+ display: 'table-cell'
279
+ }
280
+ }
281
+ }
282
+ }
283
+ })}
261
284
  `;
262
285
  var Tooltip$1 = /*#__PURE__*/forwardRef(Tooltip);
263
286
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamturing/react-kit",
3
- "version": "2.30.1",
3
+ "version": "2.31.0",
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": "5d0c4cb13d0269bbfff3c6b947c48eba8281f618"
69
+ "gitHead": "5dd44dec2d1ba8ca58b723d2455131cfaf0eafdd"
70
70
  }