@teamturing/react-kit 2.7.0 → 2.7.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,7 +1,7 @@
|
|
|
1
|
-
|
|
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<
|
|
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 {
|
|
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?:
|
|
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, '
|
|
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 = ({
|
|
@@ -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.
|
|
3
|
+
"version": "2.7.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": "
|
|
60
|
+
"gitHead": "862abe97e52c35bcb94b84a3cc5689bee8818afe"
|
|
61
61
|
}
|