@teamturing/react-kit 2.39.2 → 2.41.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.
@@ -12,7 +12,7 @@ type Props = {
12
12
  /**
13
13
  * 색을 정의합니다.
14
14
  */
15
- variant?: 'primary' | 'plain';
15
+ variant?: 'primary' | 'plain' | 'plain-neutral';
16
16
  /**
17
17
  * 활성화 상태를 정의합니다.
18
18
  * `true`일 경우, 활성화된 상태를 그립니다.
@@ -33,7 +33,7 @@ declare const _default: import("react").ForwardRefExoticComponent<{
33
33
  /**
34
34
  * 색을 정의합니다.
35
35
  */
36
- variant?: "primary" | "plain" | undefined;
36
+ variant?: "primary" | "plain" | "plain-neutral" | undefined;
37
37
  /**
38
38
  * 활성화 상태를 정의합니다.
39
39
  * `true`일 경우, 활성화된 상태를 그립니다.
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
- import { ColorKey, RadiiKey, SurfaceElevationKey } from '@teamturing/token-studio';
2
+ import { ColorKey, RadiiKey, SpaceKey, SurfaceElevationKey } from '@teamturing/token-studio';
3
3
  import { LayoutProps, ColorProps, FlexboxProps, BackgroundProps, BorderProps, PositionProps, ShadowProps, BorderRadiusProps, Theme, BorderColorProps } from 'styled-system';
4
- import { SxProp } from '../../utils/styled-system';
5
- type Props = {} & SxProp & LayoutProps & ColorProps<Theme, ColorKey | SurfaceElevationKey> & FlexboxProps & BackgroundProps & BorderProps & BorderColorProps<Theme, ColorKey | SurfaceElevationKey> & PositionProps & ShadowProps<Theme> & BorderRadiusProps<Theme, RadiiKey>;
4
+ import { ColumnGapProps, GapProps, RowGapProps, SxProp } from '../../utils/styled-system';
5
+ type Props = {} & SxProp & LayoutProps & ColorProps<Theme, ColorKey | SurfaceElevationKey> & FlexboxProps & BackgroundProps & BorderProps & BorderColorProps<Theme, ColorKey | SurfaceElevationKey> & PositionProps & ShadowProps<Theme> & BorderRadiusProps<Theme, RadiiKey> & GapProps<Theme, SpaceKey> & ColumnGapProps<Theme, SpaceKey> & RowGapProps<Theme, SpaceKey>;
6
6
  declare const View: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Props>>;
7
7
  export default View;
8
8
  export type { Props as ViewProps };
package/dist/index.js CHANGED
@@ -1062,6 +1062,24 @@ const lineClamp = system({
1062
1062
  scale: 'WebkitLineClamp'
1063
1063
  }
1064
1064
  });
1065
+ const gap = system({
1066
+ gap: {
1067
+ property: 'gap',
1068
+ scale: 'space'
1069
+ }
1070
+ });
1071
+ const columnGap = system({
1072
+ columnGap: {
1073
+ property: 'columnGap',
1074
+ scale: 'space'
1075
+ }
1076
+ });
1077
+ const rowGap = system({
1078
+ rowGap: {
1079
+ property: 'rowGap',
1080
+ scale: 'space'
1081
+ }
1082
+ });
1065
1083
 
1066
1084
  const UnstyledTableBody = styled__default.default.tbody`
1067
1085
  ${sx}
@@ -5432,7 +5450,7 @@ if (process.env.NODE_ENV === 'production') {
5432
5450
  var reactIsExports = reactIs.exports;
5433
5451
 
5434
5452
  const View = styled__default.default.div`
5435
- ${compose(layout$1, color$2, flexbox, background, border, position, shadow$1)}
5453
+ ${compose(layout$1, color$2, flexbox, background, border, position, shadow$1, gap, columnGap, rowGap)}
5436
5454
  ${sx}
5437
5455
  `;
5438
5456
 
@@ -37405,7 +37423,7 @@ const BaseIconToggleButton = styled__default.default(UnstyledButton)(({
37405
37423
  }) => variant({
37406
37424
  prop: 'variant',
37407
37425
  variants: {
37408
- primary: {
37426
+ 'primary': {
37409
37427
  ...(selected ? {
37410
37428
  backgroundColor: theme.colors['bg/selected/violet'],
37411
37429
  color: theme.colors['icon/inverse']
@@ -37418,7 +37436,7 @@ const BaseIconToggleButton = styled__default.default(UnstyledButton)(({
37418
37436
  color: theme.colors['icon/disabled']
37419
37437
  } : {})
37420
37438
  },
37421
- plain: {
37439
+ 'plain': {
37422
37440
  backgroundColor: theme.colors['bg/neutral/subtler'],
37423
37441
  ...(selected ? {
37424
37442
  color: theme.colors['icon/selected/violet']
@@ -37429,6 +37447,18 @@ const BaseIconToggleButton = styled__default.default(UnstyledButton)(({
37429
37447
  backgroundColor: theme.colors['bg/disabled/subtlest'],
37430
37448
  color: theme.colors['icon/disabled/subtler']
37431
37449
  } : {})
37450
+ },
37451
+ 'plain-neutral': {
37452
+ backgroundColor: theme.colors['bg/neutral/subtler'],
37453
+ ...(selected ? {
37454
+ color: theme.colors['icon/neutral/bold']
37455
+ } : {
37456
+ color: theme.colors['icon/neutral']
37457
+ }),
37458
+ ...($disabled ? {
37459
+ backgroundColor: theme.colors['bg/disabled/subtlest'],
37460
+ color: theme.colors['icon/disabled/subtler']
37461
+ } : {})
37432
37462
  }
37433
37463
  }
37434
37464
  }), sx);
@@ -39951,7 +39981,10 @@ exports.Tooltip = Tooltip$1;
39951
39981
  exports.UnstyledButton = UnstyledButton;
39952
39982
  exports.UnstyledTable = index$e;
39953
39983
  exports.View = View;
39984
+ exports.columnGap = columnGap;
39985
+ exports.gap = gap;
39954
39986
  exports.lineClamp = lineClamp;
39987
+ exports.rowGap = rowGap;
39955
39988
  exports.sx = sx;
39956
39989
  exports.textDecoration = textDecoration;
39957
39990
  exports.theme = theme;
@@ -1,6 +1,6 @@
1
1
  import { SystemStyleObject } from '@styled-system/css';
2
2
  import * as CSS from 'csstype';
3
- import { RequiredTheme, ResponsiveValue, Theme } from 'styled-system';
3
+ import { RequiredTheme, ResponsiveValue, Theme, ThemeValue } from 'styled-system';
4
4
  type CSSCustomProperties = {
5
5
  [key: `--${string}`]: string | number;
6
6
  };
@@ -31,5 +31,17 @@ type LineClampProps<ThemeType extends Theme = RequiredTheme> = {
31
31
  lineClamp?: ResponsiveValue<CSS.Property.LineClamp, ThemeType> | undefined;
32
32
  };
33
33
  declare const lineClamp: import("styled-system").styleFn;
34
- export { sx, textDecoration, whiteSpace, wordBreak, lineClamp };
35
- export type { BetterSystemStyleObject, AsProp, TextDecorationProps, WhiteSpaceProps, WordBreakProps, LineClampProps };
34
+ type GapProps<ThemeType extends Theme = RequiredTheme, TVal = ThemeValue<'space', ThemeType>> = {
35
+ gap?: ResponsiveValue<TVal, ThemeType> | undefined;
36
+ };
37
+ declare const gap: import("styled-system").styleFn;
38
+ type ColumnGapProps<ThemeType extends Theme = RequiredTheme, TVal = ThemeValue<'space', ThemeType>> = {
39
+ columnGap?: ResponsiveValue<TVal, ThemeType> | undefined;
40
+ };
41
+ declare const columnGap: import("styled-system").styleFn;
42
+ type RowGapProps<ThemeType extends Theme = RequiredTheme, TVal = ThemeValue<'space', ThemeType>> = {
43
+ rowGap?: ResponsiveValue<TVal, ThemeType> | undefined;
44
+ };
45
+ declare const rowGap: import("styled-system").styleFn;
46
+ export { sx, textDecoration, whiteSpace, wordBreak, lineClamp, gap, columnGap, rowGap };
47
+ export type { BetterSystemStyleObject, AsProp, TextDecorationProps, WhiteSpaceProps, WordBreakProps, LineClampProps, GapProps, ColumnGapProps, RowGapProps, };
@@ -76,7 +76,7 @@ const BaseIconToggleButton = styled(UnstyledButton)(({
76
76
  }) => variant({
77
77
  prop: 'variant',
78
78
  variants: {
79
- primary: {
79
+ 'primary': {
80
80
  ...(selected ? {
81
81
  backgroundColor: theme.colors['bg/selected/violet'],
82
82
  color: theme.colors['icon/inverse']
@@ -89,7 +89,7 @@ const BaseIconToggleButton = styled(UnstyledButton)(({
89
89
  color: theme.colors['icon/disabled']
90
90
  } : {})
91
91
  },
92
- plain: {
92
+ 'plain': {
93
93
  backgroundColor: theme.colors['bg/neutral/subtler'],
94
94
  ...(selected ? {
95
95
  color: theme.colors['icon/selected/violet']
@@ -100,6 +100,18 @@ const BaseIconToggleButton = styled(UnstyledButton)(({
100
100
  backgroundColor: theme.colors['bg/disabled/subtlest'],
101
101
  color: theme.colors['icon/disabled/subtler']
102
102
  } : {})
103
+ },
104
+ 'plain-neutral': {
105
+ backgroundColor: theme.colors['bg/neutral/subtler'],
106
+ ...(selected ? {
107
+ color: theme.colors['icon/neutral/bold']
108
+ } : {
109
+ color: theme.colors['icon/neutral']
110
+ }),
111
+ ...($disabled ? {
112
+ backgroundColor: theme.colors['bg/disabled/subtlest'],
113
+ color: theme.colors['icon/disabled/subtler']
114
+ } : {})
103
115
  }
104
116
  }
105
117
  }), sx);
@@ -1,6 +1,6 @@
1
1
  import styled from 'styled-components';
2
2
  import '../../node_modules/styled-system/dist/index.esm.js';
3
- import { sx } from '../../utils/styled-system/index.js';
3
+ import { sx, gap, columnGap, rowGap } from '../../utils/styled-system/index.js';
4
4
  import { compose } from '../../node_modules/@styled-system/core/dist/index.esm.js';
5
5
  import { layout } from '../../node_modules/@styled-system/layout/dist/index.esm.js';
6
6
  import { color } from '../../node_modules/@styled-system/color/dist/index.esm.js';
@@ -11,7 +11,7 @@ import { position } from '../../node_modules/@styled-system/position/dist/index.
11
11
  import { shadow } from '../../node_modules/@styled-system/shadow/dist/index.esm.js';
12
12
 
13
13
  const View = styled.div`
14
- ${compose(layout, color, flexbox, background, border, position, shadow)}
14
+ ${compose(layout, color, flexbox, background, border, position, shadow, gap, columnGap, rowGap)}
15
15
  ${sx}
16
16
  `;
17
17
 
package/esm/index.js CHANGED
@@ -59,5 +59,5 @@ export { default as useSafeLayoutEffect } from './hook/useSafeLayoutEffect.js';
59
59
  export { default as useTabState } from './hook/useTabState.js';
60
60
  export { default as useToggleState } from './hook/useToggleState.js';
61
61
  export { default as theme } from './theme/index.js';
62
- export { lineClamp, sx, textDecoration, whiteSpace, wordBreak } from './utils/styled-system/index.js';
62
+ export { columnGap, gap, lineClamp, rowGap, sx, textDecoration, whiteSpace, wordBreak } from './utils/styled-system/index.js';
63
63
  export { AnimatePresence } from './node_modules/framer-motion/dist/es/components/AnimatePresence/index.js';
@@ -29,5 +29,23 @@ const lineClamp = system({
29
29
  scale: 'WebkitLineClamp'
30
30
  }
31
31
  });
32
+ const gap = system({
33
+ gap: {
34
+ property: 'gap',
35
+ scale: 'space'
36
+ }
37
+ });
38
+ const columnGap = system({
39
+ columnGap: {
40
+ property: 'columnGap',
41
+ scale: 'space'
42
+ }
43
+ });
44
+ const rowGap = system({
45
+ rowGap: {
46
+ property: 'rowGap',
47
+ scale: 'space'
48
+ }
49
+ });
32
50
 
33
- export { lineClamp, sx, textDecoration, whiteSpace, wordBreak };
51
+ export { columnGap, gap, lineClamp, rowGap, sx, textDecoration, whiteSpace, wordBreak };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamturing/react-kit",
3
- "version": "2.39.2",
3
+ "version": "2.41.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": "da1c0d7aaf792147c844b59991aae3fe4b384fb6"
69
+ "gitHead": "ac4bfda6cfb14d28ea9924b4585cfd1c50ed3c5d"
70
70
  }