pb-sxp-ui 1.1.1 → 1.1.2

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/dist/pb-ui.js CHANGED
@@ -13632,23 +13632,23 @@ Made in Italy` })));
13632
13632
  * @Author: binruan@chatlabs.com
13633
13633
  * @Date: 2024-01-15 19:03:09
13634
13634
  * @LastEditors: binruan@chatlabs.com
13635
- * @LastEditTime: 2024-03-13 10:53:56
13635
+ * @LastEditTime: 2024-07-11 18:19:29
13636
13636
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\FingerSwipeTip\index.tsx
13637
13637
  *
13638
13638
  */
13639
- const FingerSwipeTip = ({ imageUrl, style }) => {
13639
+ const FingerSwipeTip = ({ imageUrl, style, duration = 2000 }) => {
13640
13640
  const [show, setShow] = React.useState(true);
13641
13641
  useEditor();
13642
13642
  React.useEffect(() => {
13643
13643
  setTimeout(() => {
13644
13644
  setShow(false);
13645
- }, 2000);
13645
+ }, duration);
13646
13646
  }, []);
13647
13647
  const FINGER_SWIPE_ICON = useIconLink('/pb_static/finger-swipe-tip.29dc3a48a3c746c906ea..png');
13648
13648
  const animationCls = React.useMemo(() => {
13649
13649
  return show ? 'pb-fadeIn' : 'pb-fadeOut';
13650
13650
  }, [show]);
13651
- return (React.createElement("div", { hidden: !show, className: `pb-finger-wrap ${animationCls}`, style: style },
13651
+ return (React.createElement("div", { hidden: !show, className: `pb-finger-wrap ${animationCls}`, style: Object.assign(Object.assign({}, style), { animationDuration: `${duration / 1000}s` }) },
13652
13652
  React.createElement("img", { src: imageUrl || FINGER_SWIPE_ICON, alt: 'finger swiper' })));
13653
13653
  };
13654
13654
 
@@ -14375,7 +14375,7 @@ Made in Italy` })));
14375
14375
  React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex, style: {
14376
14376
  top: minusHeight
14377
14377
  } }),
14378
- isShowFingerTip ? (React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50 - ((_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipOffset) !== null && _a !== void 0 ? _a : 0)}%` } })) : null,
14378
+ isShowFingerTip ? (React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50 - ((_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipOffset) !== null && _a !== void 0 ? _a : 0)}%` }, duration: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swiperTipAniDur })) : null,
14379
14379
  React.createElement(Swiper, { style: {
14380
14380
  marginTop: tagHeight
14381
14381
  }, ref: swiperRef, onSlideChange: () => {
@@ -14938,3 +14938,4 @@ Made in Italy` })));
14938
14938
  Object.defineProperty(exports, '__esModule', { value: true });
14939
14939
 
14940
14940
  }));
14941
+ //# sourceMappingURL=pb-ui.js.map