@antscorp/antsomi-ui 1.3.5-beta.125 → 1.3.5-beta.126

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.
@@ -23,6 +23,7 @@ import { Button, Flex } from '../../../../atoms';
23
23
  import { ThumbnailCard } from '../../../../molecules';
24
24
  // Constants
25
25
  import { THUMBNAIL_HEIGHT_DEFAULT, THUMBNAIL_WIDTH_DEFAULT } from '../../constants';
26
+ import classNames from 'classnames';
26
27
  /** Max width of list thumbnail's wrapper, it is used to show swiper if the width is greater than 990 */
27
28
  const WRAPPER_WIDTH = 990;
28
29
  const GAP_X = 10;
@@ -30,7 +31,7 @@ const ICON_SIZE = 24;
30
31
  export const ThumbnailSlider = memo(props => {
31
32
  const { thumbnails, width = THUMBNAIL_WIDTH_DEFAULT, height = THUMBNAIL_HEIGHT_DEFAULT, onClickThumbnail } = props, restOfThumbnailProps = __rest(props, ["thumbnails", "width", "height", "onClickThumbnail"]);
32
33
  // States
33
- const [isSlideBeginning, setSlideBeginning] = useState(false);
34
+ const [isSlideBeginning, setSlideBeginning] = useState(true);
34
35
  const [isSlideEnd, setSlideEnd] = useState(false);
35
36
  // Refs
36
37
  const navigationPrevRef = useRef(null);
@@ -72,8 +73,8 @@ export const ThumbnailSlider = memo(props => {
72
73
  setSlideBeginning(isBeginning);
73
74
  setSlideEnd(isEnd);
74
75
  } }, thumbnails.map((thumbnail, index) => (React.createElement(SwiperSlideWrapper, { key: `slide-${thumbnail.id}` }, renderThumbnail({ thumbnail, index }))))),
75
- React.createElement(Button, { ref: navigationPrevRef, className: "custom-button-prev", disabled: isSlideBeginning },
76
+ React.createElement(Button, { ref: navigationPrevRef, className: classNames({ 'custom-button-prev': true, hidden: isSlideBeginning }) },
76
77
  React.createElement(Icon, { type: "icon-ants-expand-more" })),
77
- React.createElement(Button, { ref: navigationNextRef, className: "custom-button-next", disabled: isSlideEnd },
78
+ React.createElement(Button, { ref: navigationNextRef, className: classNames({ 'custom-button-next': true, hidden: isSlideEnd }) },
78
79
  React.createElement(Icon, { type: "icon-ants-expand-more" })))) : (React.createElement(Flex, { gap: GAP_X, style: { width: 'fit-content' } }, thumbnails === null || thumbnails === void 0 ? void 0 : thumbnails.map((thumbnail, index) => (React.createElement(React.Fragment, { key: thumbnail.id }, renderThumbnail({ thumbnail, index })))))))) : null;
79
80
  });
@@ -58,6 +58,10 @@ export const ThumbnailSliderWrapper = styled.div `
58
58
  transform: rotate(-90deg);
59
59
  }
60
60
 
61
+ .hidden {
62
+ display: none !important;
63
+ }
64
+
61
65
  i {
62
66
  font-size: 20px;
63
67
  color: ${(_a = THEME === null || THEME === void 0 ? void 0 : THEME.token) === null || _a === void 0 ? void 0 : _a.bw8};
@@ -79,9 +79,8 @@ export const CustomLabelStyled = styled.div `
79
79
  height: fit-content;
80
80
  }
81
81
  `;
82
- // TODO: tách class dùng chung
83
82
  export const CustomRootLabel = styled.div `
84
- font-size: 11px;
83
+ font-size: 11px !important;
85
84
  font-weight: 400;
86
85
  color: ${(_b = THEME === null || THEME === void 0 ? void 0 : THEME.token) === null || _b === void 0 ? void 0 : _b.bw8};
87
86
  height: 100%;
@@ -91,7 +90,7 @@ export const CustomRootLabel = styled.div `
91
90
  `;
92
91
  export const TextWrapper = styled(Text) `
93
92
  max-width: 100%;
94
- color: inherit;
93
+ color: inherit !important;
95
94
  height: fit-content;
96
- font-size: inherit;
95
+ font-size: inherit !important;
97
96
  `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.3.5-beta.125",
3
+ "version": "1.3.5-beta.126",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",