@antscorp/antsomi-ui 1.3.5-beta.75 → 1.3.5-beta.76

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.
@@ -30,7 +30,7 @@ import { Button, Flex, Typography } from '../../atoms';
30
30
  import { THUMBNAIL_CARD_DEFAULT_HEIGHT, THUMBNAIL_CARD_DEFAULT_WIDTH } from './constants';
31
31
  export const ThumbnailCard = memo(props => {
32
32
  const [modal, contextHolder] = Modal.useModal();
33
- const { id, name, width = THUMBNAIL_CARD_DEFAULT_WIDTH, height = THUMBNAIL_CARD_DEFAULT_HEIGHT, thumbnail, removable = true, actionAvailable = true, removeModalProps, editBtnProps, previewBtnProps, onClickWrapper } = props, restOfProps = __rest(props, ["id", "name", "width", "height", "thumbnail", "removable", "actionAvailable", "removeModalProps", "editBtnProps", "previewBtnProps", "onClickWrapper"]);
33
+ const { id, name, width = THUMBNAIL_CARD_DEFAULT_WIDTH, height = THUMBNAIL_CARD_DEFAULT_HEIGHT, thumbnail, removable = true, actionAvailable = true, showSkeleton = true, removeModalProps, editBtnProps, previewBtnProps, onClickWrapper } = props, restOfProps = __rest(props, ["id", "name", "width", "height", "thumbnail", "removable", "actionAvailable", "showSkeleton", "removeModalProps", "editBtnProps", "previewBtnProps", "onClickWrapper"]);
34
34
  const _a = removeModalProps || {}, { onOk } = _a, restOfRemoveTemplateModalProps = __rest(_a, ["onOk"]);
35
35
  const _b = editBtnProps || {}, { text: editText = 'Edit thumbnail', onClick: onClickEdit } = _b, restOfEditBtnProps = __rest(_b, ["text", "onClick"]);
36
36
  const _c = previewBtnProps || {}, { text: previewText = 'Preview', onClick: onClickPreview } = _c, restOfPreviewBtnProps = __rest(_c, ["text", "onClick"]);
@@ -49,7 +49,7 @@ export const ThumbnailCard = memo(props => {
49
49
  onClickWrapper === null || onClickWrapper === void 0 ? void 0 : onClickWrapper(id);
50
50
  };
51
51
  return (React.createElement(Flex, Object.assign({ gap: 10, vertical: true }, restOfProps, { style: Object.assign({ width }, restOfProps.style) }),
52
- React.createElement(ThumbnailCardWrapper, { style: { height, cursor: actionAvailable ? 'default' : 'pointer' }, onClick: handleWrapperClick },
52
+ React.createElement(ThumbnailCardWrapper, { "$showSkeleton": showSkeleton, style: { height, cursor: actionAvailable ? 'default' : 'pointer' }, onClick: handleWrapperClick },
53
53
  React.createElement("div", { className: "screen" }, thumbnail && React.createElement("img", { src: thumbnail, alt: "" })),
54
54
  actionAvailable && (React.createElement(React.Fragment, null,
55
55
  React.createElement(Flex, { className: "center-action", align: "center", gap: 10, vertical: true },
@@ -1 +1,5 @@
1
- export declare const ThumbnailCardWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
1
+ type ThumbnailCardWrapperProps = {
2
+ $showSkeleton?: boolean;
3
+ };
4
+ export declare const ThumbnailCardWrapper: import("styled-components").StyledComponent<"div", any, ThumbnailCardWrapperProps, never>;
5
+ export {};
@@ -33,7 +33,8 @@ export const ThumbnailCardWrapper = styled.div `
33
33
  .screen {
34
34
  width: 100%;
35
35
  height: 100%;
36
- background: center / cover no-repeat url(${skeletonBackground});
36
+
37
+ ${p => p.$showSkeleton ? `background: center / cover no-repeat url(${skeletonBackground});` : ''}
37
38
 
38
39
  img {
39
40
  width: 100%;
@@ -15,6 +15,7 @@ export interface ThumbnailCardProps extends Omit<HTMLAttributes<HTMLDivElement>,
15
15
  height?: number;
16
16
  thumbnail?: string;
17
17
  removable?: boolean;
18
+ showSkeleton?: boolean;
18
19
  editBtnProps?: TThumbnailButton;
19
20
  previewBtnProps?: TThumbnailButton;
20
21
  actionAvailable?: boolean;
@@ -13,7 +13,8 @@ export const InformationWrapper = styled(Flex) `
13
13
  font-weight: 700;
14
14
  max-width: 100%;
15
15
  color: inherit;
16
- padding-right: 20px;
16
+ padding-right: 25px;
17
+ word-break: break-all;
17
18
  }
18
19
 
19
20
  .antsomi-radio-group {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.3.5-beta.75",
3
+ "version": "1.3.5-beta.76",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",
@@ -59,7 +59,7 @@
59
59
  "not op_mini all"
60
60
  ],
61
61
  "dependencies": {
62
- "@antscorp/icons": "0.27.6",
62
+ "@antscorp/icons": "0.27.10",
63
63
  "@antscorp/image-editor": "1.0.2",
64
64
  "@emotion/react": "^11.11.1",
65
65
  "@fortawesome/fontawesome-svg-core": "6.1.1",