@lumx/react 3.8.1-alpha.0 → 3.8.2-alpha.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.
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
|
@@ -7671,11 +7671,13 @@ Icon.defaultProps = DEFAULT_PROPS$p;
|
|
|
7671
7671
|
/** Internal component used to render image captions */
|
|
7672
7672
|
const ImageCaption = props => {
|
|
7673
7673
|
const {
|
|
7674
|
-
|
|
7674
|
+
baseClassName,
|
|
7675
7675
|
theme,
|
|
7676
7676
|
as = 'figcaption',
|
|
7677
7677
|
title,
|
|
7678
|
+
titleProps,
|
|
7678
7679
|
description,
|
|
7680
|
+
descriptionProps,
|
|
7679
7681
|
tags,
|
|
7680
7682
|
captionStyle,
|
|
7681
7683
|
align,
|
|
@@ -7698,7 +7700,7 @@ const ImageCaption = props => {
|
|
|
7698
7700
|
};
|
|
7699
7701
|
return /*#__PURE__*/React.createElement(FlexBox, {
|
|
7700
7702
|
as: as,
|
|
7701
|
-
className:
|
|
7703
|
+
className: classnames(baseClassName && `${baseClassName}__wrapper`),
|
|
7702
7704
|
style: captionStyle,
|
|
7703
7705
|
orientation: "vertical",
|
|
7704
7706
|
vAlign: align,
|
|
@@ -7706,20 +7708,24 @@ const ImageCaption = props => {
|
|
|
7706
7708
|
gap: "regular"
|
|
7707
7709
|
}, (title || description) && /*#__PURE__*/React.createElement(Text, _extends({
|
|
7708
7710
|
as: "p",
|
|
7711
|
+
className: classnames(baseClassName && `${baseClassName}__caption`),
|
|
7709
7712
|
truncate: truncate
|
|
7710
|
-
}, baseColor), title && /*#__PURE__*/React.createElement(Text, _extends({
|
|
7713
|
+
}, baseColor), title && /*#__PURE__*/React.createElement(Text, _extends({}, titleProps, {
|
|
7711
7714
|
as: "span",
|
|
7715
|
+
className: classnames(titleProps === null || titleProps === void 0 ? void 0 : titleProps.className, baseClassName && `${baseClassName}__title`),
|
|
7712
7716
|
typography: "subtitle1"
|
|
7713
|
-
}, titleColor), title), ' ', description && /*#__PURE__*/React.createElement(Text, _extends({
|
|
7717
|
+
}, titleColor), title), ' ', description && /*#__PURE__*/React.createElement(Text, _extends({}, descriptionProps, {
|
|
7714
7718
|
as: "span",
|
|
7719
|
+
className: classnames(descriptionProps === null || descriptionProps === void 0 ? void 0 : descriptionProps.className, baseClassName && `${baseClassName}__description`),
|
|
7715
7720
|
typography: "body1"
|
|
7716
7721
|
}, descriptionContent))), tags && /*#__PURE__*/React.createElement(FlexBox, {
|
|
7722
|
+
className: classnames(baseClassName && `${baseClassName}__tags`),
|
|
7717
7723
|
orientation: "horizontal",
|
|
7718
7724
|
vAlign: align
|
|
7719
7725
|
}, tags));
|
|
7720
7726
|
};
|
|
7721
7727
|
|
|
7722
|
-
const _excluded$y = ["actions", "align", "alt", "captionPosition", "captionStyle", "className", "description", "fillHeight", "image", "size", "tags", "theme", "thumbnailProps", "title"];
|
|
7728
|
+
const _excluded$y = ["actions", "align", "alt", "captionPosition", "captionStyle", "className", "description", "descriptionProps", "fillHeight", "image", "size", "tags", "theme", "thumbnailProps", "title", "titleProps"];
|
|
7723
7729
|
|
|
7724
7730
|
/**
|
|
7725
7731
|
* Image block variants.
|
|
@@ -7772,13 +7778,15 @@ const ImageBlock = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7772
7778
|
captionStyle,
|
|
7773
7779
|
className,
|
|
7774
7780
|
description,
|
|
7781
|
+
descriptionProps,
|
|
7775
7782
|
fillHeight,
|
|
7776
7783
|
image,
|
|
7777
7784
|
size,
|
|
7778
7785
|
tags,
|
|
7779
7786
|
theme,
|
|
7780
7787
|
thumbnailProps,
|
|
7781
|
-
title
|
|
7788
|
+
title,
|
|
7789
|
+
titleProps
|
|
7782
7790
|
} = props,
|
|
7783
7791
|
forwardedProps = _objectWithoutProperties(props, _excluded$y);
|
|
7784
7792
|
return /*#__PURE__*/React.createElement("figure", _extends({
|
|
@@ -7801,10 +7809,12 @@ const ImageBlock = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7801
7809
|
alt: alt || title
|
|
7802
7810
|
})), /*#__PURE__*/React.createElement(ImageCaption, {
|
|
7803
7811
|
as: "figcaption",
|
|
7804
|
-
|
|
7812
|
+
baseClassName: CLASSNAME$u,
|
|
7805
7813
|
theme: theme,
|
|
7806
7814
|
title: title,
|
|
7815
|
+
titleProps: titleProps,
|
|
7807
7816
|
description: description,
|
|
7817
|
+
descriptionProps: descriptionProps,
|
|
7808
7818
|
tags: tags,
|
|
7809
7819
|
captionStyle: captionStyle,
|
|
7810
7820
|
align: align,
|