@lumx/react 3.8.0 → 3.8.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.
package/index.d.ts
CHANGED
|
@@ -1323,13 +1323,18 @@ interface ThumbnailProps extends GenericProps, HasTheme {
|
|
|
1323
1323
|
*/
|
|
1324
1324
|
declare const Thumbnail: Comp<ThumbnailProps>;
|
|
1325
1325
|
|
|
1326
|
+
type ForwardedTextProps = Omit<TextProps, 'as' | 'typography' | 'color' | 'colorVariant'>;
|
|
1326
1327
|
type ImageCaptionMetadata = {
|
|
1327
1328
|
/** Image title to display in the caption. */
|
|
1328
1329
|
title?: string;
|
|
1330
|
+
/** Props to pass to the title. */
|
|
1331
|
+
titleProps?: ForwardedTextProps;
|
|
1329
1332
|
/** Image description. Can be either a string, or sanitized html. */
|
|
1330
1333
|
description?: string | {
|
|
1331
1334
|
__html: string;
|
|
1332
1335
|
};
|
|
1336
|
+
/** Props to pass to the title. */
|
|
1337
|
+
descriptionProps?: ForwardedTextProps;
|
|
1333
1338
|
/** Tag content. */
|
|
1334
1339
|
tags?: ReactNode;
|
|
1335
1340
|
/** Caption custom CSS style. */
|
package/index.js
CHANGED
|
@@ -7658,11 +7658,13 @@ Icon.defaultProps = DEFAULT_PROPS$p;
|
|
|
7658
7658
|
/** Internal component used to render image captions */
|
|
7659
7659
|
const ImageCaption = props => {
|
|
7660
7660
|
const {
|
|
7661
|
-
|
|
7661
|
+
baseClassName,
|
|
7662
7662
|
theme,
|
|
7663
7663
|
as = 'figcaption',
|
|
7664
7664
|
title,
|
|
7665
|
+
titleProps,
|
|
7665
7666
|
description,
|
|
7667
|
+
descriptionProps,
|
|
7666
7668
|
tags,
|
|
7667
7669
|
captionStyle,
|
|
7668
7670
|
align,
|
|
@@ -7685,7 +7687,7 @@ const ImageCaption = props => {
|
|
|
7685
7687
|
};
|
|
7686
7688
|
return /*#__PURE__*/React.createElement(FlexBox, {
|
|
7687
7689
|
as: as,
|
|
7688
|
-
className:
|
|
7690
|
+
className: classnames(baseClassName && `${baseClassName}__wrapper`),
|
|
7689
7691
|
style: captionStyle,
|
|
7690
7692
|
orientation: "vertical",
|
|
7691
7693
|
vAlign: align,
|
|
@@ -7693,20 +7695,24 @@ const ImageCaption = props => {
|
|
|
7693
7695
|
gap: "regular"
|
|
7694
7696
|
}, (title || description) && /*#__PURE__*/React.createElement(Text, _extends({
|
|
7695
7697
|
as: "p",
|
|
7698
|
+
className: classnames(baseClassName && `${baseClassName}__caption`),
|
|
7696
7699
|
truncate: truncate
|
|
7697
|
-
}, baseColor), title && /*#__PURE__*/React.createElement(Text, _extends({
|
|
7700
|
+
}, baseColor), title && /*#__PURE__*/React.createElement(Text, _extends({}, titleProps, {
|
|
7698
7701
|
as: "span",
|
|
7702
|
+
className: classnames(titleProps === null || titleProps === void 0 ? void 0 : titleProps.className, baseClassName && `${baseClassName}__title`),
|
|
7699
7703
|
typography: "subtitle1"
|
|
7700
|
-
}, titleColor), title), ' ', description && /*#__PURE__*/React.createElement(Text, _extends({
|
|
7704
|
+
}, titleColor), title), ' ', description && /*#__PURE__*/React.createElement(Text, _extends({}, descriptionProps, {
|
|
7701
7705
|
as: "span",
|
|
7706
|
+
className: classnames(descriptionProps === null || descriptionProps === void 0 ? void 0 : descriptionProps.className, baseClassName && `${baseClassName}__description`),
|
|
7702
7707
|
typography: "body1"
|
|
7703
7708
|
}, descriptionContent))), tags && /*#__PURE__*/React.createElement(FlexBox, {
|
|
7709
|
+
className: classnames(baseClassName && `${baseClassName}__tags`),
|
|
7704
7710
|
orientation: "horizontal",
|
|
7705
7711
|
vAlign: align
|
|
7706
7712
|
}, tags));
|
|
7707
7713
|
};
|
|
7708
7714
|
|
|
7709
|
-
const _excluded$y = ["actions", "align", "alt", "captionPosition", "captionStyle", "className", "description", "fillHeight", "image", "size", "tags", "theme", "thumbnailProps", "title"];
|
|
7715
|
+
const _excluded$y = ["actions", "align", "alt", "captionPosition", "captionStyle", "className", "description", "descriptionProps", "fillHeight", "image", "size", "tags", "theme", "thumbnailProps", "title", "titleProps"];
|
|
7710
7716
|
|
|
7711
7717
|
/**
|
|
7712
7718
|
* Image block variants.
|
|
@@ -7759,13 +7765,15 @@ const ImageBlock = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7759
7765
|
captionStyle,
|
|
7760
7766
|
className,
|
|
7761
7767
|
description,
|
|
7768
|
+
descriptionProps,
|
|
7762
7769
|
fillHeight,
|
|
7763
7770
|
image,
|
|
7764
7771
|
size,
|
|
7765
7772
|
tags,
|
|
7766
7773
|
theme,
|
|
7767
7774
|
thumbnailProps,
|
|
7768
|
-
title
|
|
7775
|
+
title,
|
|
7776
|
+
titleProps
|
|
7769
7777
|
} = props,
|
|
7770
7778
|
forwardedProps = _objectWithoutProperties(props, _excluded$y);
|
|
7771
7779
|
return /*#__PURE__*/React.createElement("figure", _extends({
|
|
@@ -7788,10 +7796,12 @@ const ImageBlock = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7788
7796
|
alt: alt || title
|
|
7789
7797
|
})), /*#__PURE__*/React.createElement(ImageCaption, {
|
|
7790
7798
|
as: "figcaption",
|
|
7791
|
-
|
|
7799
|
+
baseClassName: CLASSNAME$u,
|
|
7792
7800
|
theme: theme,
|
|
7793
7801
|
title: title,
|
|
7802
|
+
titleProps: titleProps,
|
|
7794
7803
|
description: description,
|
|
7804
|
+
descriptionProps: descriptionProps,
|
|
7795
7805
|
tags: tags,
|
|
7796
7806
|
captionStyle: captionStyle,
|
|
7797
7807
|
align: align,
|