Quellcode durchsuchen

fix: change motion type to boolean

代强 vor 3 Jahren
Ursprung
Commit
d865d8d03a

+ 1 - 1
packages/semi-foundation/cascader/foundation.ts

@@ -114,7 +114,7 @@ export interface BasicCascaderProps {
     dropdownStyle?: any;
     emptyContent?: any;
     filterLeafOnly?: boolean;
-    motion?: Motion;
+    motion?: boolean;
     filterTreeNode?: ((inputValue: string, treeNodeString: string) => boolean) | boolean;
     placeholder?: string;
     searchPlaceholder?: string;

+ 1 - 1
packages/semi-foundation/collapse/foundation.ts

@@ -13,7 +13,7 @@ export interface CollapseProps{
     style?: any;
     className?: string;
     keepDOM?: boolean;
-    motion?: Motion;
+    motion?: boolean;
     expandIconPosition?: 'left' | 'right'
 
 }

+ 1 - 1
packages/semi-foundation/datePicker/foundation.ts

@@ -134,7 +134,7 @@ export interface DatePickerFoundationProps extends ElementProps, RenderProps, Ev
     inputReadOnly?: boolean;
     inputStyle?: Record<string, any>;
     max?: number;
-    motion?: Motion;
+    motion?: boolean;
     multiple?: boolean;
     needConfirm?: boolean;
     onChangeWithDateFirst?: boolean;

+ 0 - 1
packages/semi-foundation/modal/modalFoundation.ts

@@ -1,5 +1,4 @@
 import BaseFoundation, { DefaultAdapter } from '../base/foundation';
-import { Motion } from '../utils/type';
 
 export type OKType = 'primary' | 'secondary' | 'tertiary' | 'warning' | 'danger';
 export type Size = 'small' | 'medium' | 'large' | 'full-width';

+ 1 - 2
packages/semi-foundation/notification/notificationFoundation.ts

@@ -1,7 +1,6 @@
 import BaseFoundation, { DefaultAdapter } from '../base/foundation';
 import { isNumber } from 'lodash';
 import { strings } from '../notification/constants';
-import { Motion } from '../utils/type';
 
 
 export type NoticePosition = 'top' | 'bottom' | 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
@@ -36,7 +35,7 @@ export interface NoticeState{
 }
 
 export interface NoticeInstance extends NoticeProps{
-    motion?: Motion
+    motion?: boolean
 }
 
 export interface NoticeAdapter extends DefaultAdapter<NoticeProps, NoticeState>{

+ 0 - 1
packages/semi-foundation/sideSheet/sideSheetFoundation.ts

@@ -1,7 +1,6 @@
 import BaseFoundation, { DefaultAdapter } from '../base/foundation';
 import { get, noop } from 'lodash';
 import KeyCode from '../utils/keyCode';
-import { Motion } from '../utils/type';
 
 
 export interface SideSheetProps {

+ 1 - 1
packages/semi-ui/modal/Modal.tsx

@@ -70,7 +70,7 @@ class Modal extends BaseComponent<ModalReactProps, ModalState> {
         header: PropTypes.node,
         footer: PropTypes.node,
         hasCancel: PropTypes.bool,
-        motion: PropTypes.oneOfType([PropTypes.bool, PropTypes.func, PropTypes.object]),
+        motion: PropTypes.bool,
         children: PropTypes.node,
         getPopupContainer: PropTypes.func,
         getContainerContext: PropTypes.func,

+ 2 - 2
packages/semi-ui/popover/index.tsx

@@ -23,7 +23,7 @@ export interface PopoverProps extends BaseProps {
     content?: TooltipProps['content'];
     visible?: boolean;
     autoAdjustOverflow?: boolean;
-    motion?: Motion;
+    motion?: boolean;
     position?: Position;
     mouseEnterDelay?: number;
     mouseLeaveDelay?: number;
@@ -63,7 +63,7 @@ class Popover extends React.PureComponent<PopoverProps, PopoverState> {
         content: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
         visible: PropTypes.bool,
         autoAdjustOverflow: PropTypes.bool,
-        motion: PropTypes.oneOfType([PropTypes.bool, PropTypes.object, PropTypes.func]),
+        motion: PropTypes.bool,
         position: PropTypes.oneOf(positionSet),
         // getPopupContainer: PropTypes.func,
         mouseEnterDelay: PropTypes.number,

+ 1 - 1
packages/semi-ui/select/index.tsx

@@ -236,7 +236,7 @@ class Select extends BaseComponent<SelectProps, SelectState> {
         triggerRender: PropTypes.func,
         stopPropagation: PropTypes.bool,
         // motion doesn't need to be exposed
-        motion: PropTypes.oneOfType([PropTypes.func, PropTypes.bool, PropTypes.object]),
+        motion: PropTypes.bool,
 
         onChangeWithObject: PropTypes.bool,
 

+ 1 - 1
packages/semi-ui/tabs/index.tsx

@@ -45,7 +45,7 @@ class Tabs extends BaseComponent<TabsProps, TabsState> {
         tabBarExtraContent: PropTypes.node,
         tabBarStyle: PropTypes.object,
         tabList: PropTypes.array,
-        tabPaneMotion: PropTypes.oneOfType([PropTypes.bool, PropTypes.object, PropTypes.func]),
+        tabPaneMotion: PropTypes.bool,
         tabPosition: PropTypes.oneOf(strings.POSITION_MAP),
         type: PropTypes.oneOf(strings.TYPE_MAP),
         onTabClose: PropTypes.func,

+ 1 - 1
packages/semi-ui/toast/index.tsx

@@ -36,7 +36,7 @@ export type {
 const createBaseToast = () => class ToastList extends BaseComponent<ToastListProps, ToastListState> {
     static ref: ToastList;
     static useToast: typeof useToast;
-    static defaultOpts: ToastReactProps & { motion: Motion } = {
+    static defaultOpts: ToastReactProps & { motion: boolean } = {
         motion: true,
         zIndex: 1010,
         content: '',

+ 2 - 2
packages/semi-ui/tooltip/index.tsx

@@ -43,7 +43,7 @@ export type RenderContent = (props: RenderContentProps) => React.ReactNode;
 
 export interface TooltipProps extends BaseProps {
     children?: React.ReactNode;
-    motion?: Motion;
+    motion?: boolean;
     autoAdjustOverflow?: boolean;
     position?: Position;
     getPopupContainer?: () => HTMLElement;
@@ -108,7 +108,7 @@ export default class Tooltip extends BaseComponent<TooltipProps, TooltipState> {
 
     static propTypes = {
         children: PropTypes.node,
-        motion: PropTypes.oneOfType([PropTypes.bool, PropTypes.object, PropTypes.func]),
+        motion: PropTypes.bool,
         autoAdjustOverflow: PropTypes.bool,
         position: PropTypes.oneOf(positionSet),
         getPopupContainer: PropTypes.func,