@teamturing/react-kit 2.7.0 → 2.7.2

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,7 +1,7 @@
1
- /// <reference types="react" />
1
+ import { ImgHTMLAttributes } from 'react';
2
2
  import { LayoutProps } from 'styled-system';
3
3
  import { SxProp } from '../../utils/styled-system';
4
- type Props = {} & SxProp & LayoutProps;
5
- declare const Image: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, Props>>;
4
+ type Props = {} & Pick<ImgHTMLAttributes<HTMLImageElement>, 'src' | 'alt' | 'width' | 'height' | 'loading'> & SxProp & LayoutProps;
5
+ declare const Image: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, Props>>;
6
6
  export default Image;
7
7
  export type { Props as ImageProps };
@@ -17,7 +17,7 @@ declare const _default: (({ section: { views, responsiveLayout } }: Props) => im
17
17
  TextView: ({ view: { text, textProps } }: {
18
18
  view: import("../types").TextView;
19
19
  }) => import("react/jsx-runtime").JSX.Element;
20
- ImageView: ({ view: { ...props } }: {
20
+ ImageView: ({ view: { imageProps, ...props } }: {
21
21
  view: import("../types").ImageView;
22
22
  }) => import("react/jsx-runtime").JSX.Element;
23
23
  IconView: ({ view: { icon, iconProps } }: {
@@ -2,5 +2,5 @@ import { ImageView as ImageViewType } from '../../types';
2
2
  type Props = {
3
3
  view: ImageViewType;
4
4
  };
5
- declare const ImageView: ({ view: { ...props } }: Props) => import("react/jsx-runtime").JSX.Element;
5
+ declare const ImageView: ({ view: { imageProps, ...props } }: Props) => import("react/jsx-runtime").JSX.Element;
6
6
  export default ImageView;
@@ -1,17 +1,22 @@
1
1
  import icons from '@teamturing/icons';
2
- import { ImgHTMLAttributes } from 'react';
3
- import { ChipProps, StackProps, TextProps, SpaceProps, GridProps, GridUnitProps, StyledIconProps } from '../..';
2
+ import { ChipProps, StackProps, TextProps, SpaceProps, GridProps, GridUnitProps, StyledIconProps, ImageProps } from '../..';
4
3
  /**
5
4
  * View Related Model
6
5
  */
7
6
  export type TextView = {
8
7
  text: string;
9
- textProps?: Omit<TextProps, 'sx'>;
8
+ textProps?: TextProps;
9
+ };
10
+ export type ImageView = {
11
+ src: ImageProps['src'];
12
+ alt: ImageProps['alt'];
13
+ width: ImageProps['width'];
14
+ height: ImageProps['height'];
15
+ imageProps: Omit<ImageProps, 'src' | 'alt' | 'width' | 'height'>;
10
16
  };
11
- export type ImageView = Pick<ImgHTMLAttributes<HTMLImageElement>, 'src' | 'alt' | 'width' | 'height' | 'loading'>;
12
17
  export type IconView = {
13
18
  icon: keyof typeof icons;
14
- iconProps: Omit<StyledIconProps, 'sx' | 'icon'>;
19
+ iconProps: Omit<StyledIconProps, 'icon'>;
15
20
  };
16
21
  export type ChipGroupView = {
17
22
  chips: Array<{
package/dist/index.js CHANGED
@@ -17501,12 +17501,14 @@ const SingleColumnLayout = ({
17501
17501
 
17502
17502
  const ImageView = ({
17503
17503
  view: {
17504
+ imageProps,
17504
17505
  ...props
17505
17506
  }
17506
17507
  }) => /*#__PURE__*/jsxRuntimeExports.jsx(Image, {
17507
17508
  loading: 'lazy',
17508
17509
  display: 'block',
17509
- ...props
17510
+ ...props,
17511
+ ...imageProps
17510
17512
  });
17511
17513
 
17512
17514
  const TextView = ({
@@ -17584,7 +17586,7 @@ const GridView = ({
17584
17586
  const ViewComponent = getViewComponent(viewContainer);
17585
17587
  return /*#__PURE__*/jsxRuntimeExports.jsx(ViewComponent, {
17586
17588
  view: viewContainer.view
17587
- });
17589
+ }, viewContainer.id);
17588
17590
  })
17589
17591
  }, unitKey);
17590
17592
  })
@@ -23,7 +23,7 @@ const GridView = ({
23
23
  const ViewComponent = getViewComponent(viewContainer);
24
24
  return /*#__PURE__*/jsxRuntimeExports.jsx(ViewComponent, {
25
25
  view: viewContainer.view
26
- });
26
+ }, viewContainer.id);
27
27
  })
28
28
  }, unitKey);
29
29
  })
@@ -3,12 +3,14 @@ import { j as jsxRuntimeExports } from '../../../node_modules/react/jsx-runtime.
3
3
 
4
4
  const ImageView = ({
5
5
  view: {
6
+ imageProps,
6
7
  ...props
7
8
  }
8
9
  }) => /*#__PURE__*/jsxRuntimeExports.jsx(Image, {
9
10
  loading: 'lazy',
10
11
  display: 'block',
11
- ...props
12
+ ...props,
13
+ ...imageProps
12
14
  });
13
15
 
14
16
  export { ImageView as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamturing/react-kit",
3
- "version": "2.7.0",
3
+ "version": "2.7.2",
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": "7ce067bce7703eec35df48def80cc4a7e7fa2fb0"
60
+ "gitHead": "3444bbf74612c11a443c618b18862927ecc6bc71"
61
61
  }