@teamturing/react-kit 2.39.2 → 2.40.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,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
 
@@ -39951,7 +39969,10 @@ exports.Tooltip = Tooltip$1;
39951
39969
  exports.UnstyledButton = UnstyledButton;
39952
39970
  exports.UnstyledTable = index$e;
39953
39971
  exports.View = View;
39972
+ exports.columnGap = columnGap;
39973
+ exports.gap = gap;
39954
39974
  exports.lineClamp = lineClamp;
39975
+ exports.rowGap = rowGap;
39955
39976
  exports.sx = sx;
39956
39977
  exports.textDecoration = textDecoration;
39957
39978
  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, };
@@ -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.40.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": "e607425d99045e7df51099a69229839c434175b8"
70
70
  }