@veracity/vui 2.8.3-rc.5 → 2.8.3-rc.6
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../src/image/image.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAE1C,eAAO,MAAM,SAAS,+HAIrB,CAAA;AAED,gDAAgD;AAChD,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../src/image/image.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAE1C,eAAO,MAAM,SAAS,+HAIrB,CAAA;AAED,gDAAgD;AAChD,eAAO,MAAM,KAAK,mDAchB,CAAA;AAEF,eAAe,KAAK,CAAA"}
|
package/dist/cjs/image/image.js
CHANGED
|
@@ -25,8 +25,8 @@ exports.ImageBase = core_1.styled.imgBox `
|
|
|
25
25
|
`;
|
|
26
26
|
/** Displays an image. Includes base styling. */
|
|
27
27
|
exports.Image = (0, core_1.vui)((props, ref) => {
|
|
28
|
-
const _a = (0, core_1.omitThemingProps)(props), { className } = _a, rest = __rest(_a, ["className"]);
|
|
28
|
+
const _a = (0, core_1.omitThemingProps)(props), { className, title } = _a, rest = __rest(_a, ["className", "title"]);
|
|
29
29
|
const styles = (0, core_1.useStyleConfig)('Image', props);
|
|
30
|
-
return react_1.default.createElement(exports.ImageBase, Object.assign({ alt:
|
|
30
|
+
return (react_1.default.createElement(exports.ImageBase, Object.assign({ alt: title ? title : 'VUI image', className: (0, utils_1.cs)('vui-image', className), ref: ref, title: title }, styles, rest)));
|
|
31
31
|
});
|
|
32
32
|
exports.default = exports.Image;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../src/image/image.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAE1C,eAAO,MAAM,SAAS,+HAIrB,CAAA;AAED,gDAAgD;AAChD,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../src/image/image.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAE1C,eAAO,MAAM,SAAS,+HAIrB,CAAA;AAED,gDAAgD;AAChD,eAAO,MAAM,KAAK,mDAchB,CAAA;AAEF,eAAe,KAAK,CAAA"}
|
package/dist/esm/image/image.js
CHANGED
|
@@ -8,8 +8,8 @@ export const ImageBase = styled.imgBox `
|
|
|
8
8
|
`;
|
|
9
9
|
/** Displays an image. Includes base styling. */
|
|
10
10
|
export const Image = vui((props, ref) => {
|
|
11
|
-
const { className, ...rest } = omitThemingProps(props);
|
|
11
|
+
const { className, title, ...rest } = omitThemingProps(props);
|
|
12
12
|
const styles = useStyleConfig('Image', props);
|
|
13
|
-
return React.createElement(ImageBase, { alt:
|
|
13
|
+
return (React.createElement(ImageBase, { alt: title ? title : 'VUI image', className: cs('vui-image', className), ref: ref, title: title, ...styles, ...rest }));
|
|
14
14
|
});
|
|
15
15
|
export default Image;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veracity/vui",
|
|
3
|
-
"version": "2.8.3-rc.
|
|
3
|
+
"version": "2.8.3-rc.6",
|
|
4
4
|
"description": "Veracity UI is a React component library crafted for use within Veracity applications and pages. Based on Styled Components and @xstyled.",
|
|
5
5
|
"module": "./dist/esm/index.js",
|
|
6
6
|
"main": "./dist/cjs/index.js",
|
package/src/image/image.tsx
CHANGED
|
@@ -12,10 +12,19 @@ export const ImageBase = styled.imgBox`
|
|
|
12
12
|
|
|
13
13
|
/** Displays an image. Includes base styling. */
|
|
14
14
|
export const Image = vui<'img', ImageProps>((props, ref) => {
|
|
15
|
-
const { className, ...rest } = omitThemingProps(props)
|
|
15
|
+
const { className, title, ...rest } = omitThemingProps(props)
|
|
16
16
|
const styles = useStyleConfig('Image', props)
|
|
17
17
|
|
|
18
|
-
return
|
|
18
|
+
return (
|
|
19
|
+
<ImageBase
|
|
20
|
+
alt={title ? title : 'VUI image'}
|
|
21
|
+
className={cs('vui-image', className)}
|
|
22
|
+
ref={ref}
|
|
23
|
+
title={title}
|
|
24
|
+
{...styles}
|
|
25
|
+
{...rest}
|
|
26
|
+
/>
|
|
27
|
+
)
|
|
19
28
|
})
|
|
20
29
|
|
|
21
30
|
export default Image
|