Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use relative paths instead #511

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/drawer/Drawer.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useEffect, useState } from 'react';
import { Popup } from 'tdesign-mobile-react';
import Popup from '../popup';
import { TdDrawerProps, DrawerCloseContext, DrawerItem } from './type';
import useConfig from '../_util/useConfig';

Expand Down
4 changes: 2 additions & 2 deletions src/grid/GridItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import cls from 'classnames';
import isString from 'lodash/isString';
import isObject from 'lodash/isObject';
import isFunction from 'lodash/isFunction';
import { Badge, Image } from 'tdesign-mobile-react';
import useConfig from '../_util/useConfig';
import parseTNode from '../_util/parseTNode';
import useDefaultProps from '../hooks/useDefaultProps';

import Badge from '../badge';
import Image from '../image';
import { TdGridItemProps, TdGridProps } from './type';
import { GridContext } from './GridContext';
import { gridItemDefaultProps } from './defaultProps';
Expand Down
4 changes: 2 additions & 2 deletions src/input/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React, { forwardRef, useEffect, useImperativeHandle, useRef, useState } f
import type { FocusEvent, TouchEvent, CompositionEvent, FormEvent } from 'react';
import classNames from 'classnames';
import { CloseCircleFilledIcon, BrowseOffIcon, BrowseIcon } from 'tdesign-icons-react';
import useDefault from 'tdesign-mobile-react/_util/useDefault';
import parseTNode from 'tdesign-mobile-react/_util/parseTNode';
import useDefault from '../_util/useDefault';
import parseTNode from '../_util/parseTNode';
import { inputDefaultProps } from './defaultProps';
import { getCharacterLength } from '../_common/js/utils/helper';
import useConfig from '../_util/useConfig';
Expand Down
2 changes: 1 addition & 1 deletion src/navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useCallback, useMemo } from 'react';
import type { CSSProperties } from 'react';
import { ChevronLeftIcon } from 'tdesign-icons-react';
import ClassNames from 'classnames';
import { usePrefixClass } from 'tdesign-mobile-react/hooks/useClass';
import { usePrefixClass } from '../hooks/useClass';
import { StyledProps } from '../common';
import { TdNavbarProps } from './type';
import { navbarDefaultProps } from './defaultProps';
Expand Down
8 changes: 4 additions & 4 deletions src/notice-bar/NoticeBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import React, { useEffect, useMemo, useRef, useState } from 'react';
import { InfoCircleFilledIcon, CheckCircleFilledIcon } from 'tdesign-icons-react';
import classNames from 'classnames';
import isObject from 'lodash/isObject';
import parseTNode from 'tdesign-mobile-react/_util/parseTNode';
import isArray from 'lodash/isArray';
import Swiper from 'tdesign-mobile-react/swiper';
import SwiperItem from 'tdesign-mobile-react/swiper/SwiperItem';
import { usePrefixClass } from 'tdesign-mobile-react/hooks/useClass';
import parseTNode from '../_util/parseTNode';
import Swiper from '../swiper';
import SwiperItem from '../swiper/SwiperItem';
import { usePrefixClass } from '../hooks/useClass';
import type { StyledProps } from '../common';
import type { TdNoticeBarProps, NoticeBarTrigger, NoticeBarMarquee } from './type';
import useDefault from '../_util/useDefault';
Expand Down
3 changes: 2 additions & 1 deletion src/picker/Picker.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import React, { FC, useMemo } from 'react';
import { Button, Popup } from 'tdesign-mobile-react';
import useConfig from '../_util/useConfig';
import useDefault from '../_util/useDefault';
import withNativeProps, { NativeProps } from '../_util/withNativeProps';
import PickerView, { getPickerViewDefaultValue } from './PickerView';
import { pickerDefaultProps } from './defaultProps';
import { TdPickerProps } from './type';
import Button from '../button';
import Popup from '../popup';

export interface PickerProps extends TdPickerProps, NativeProps {}

Expand Down
6 changes: 3 additions & 3 deletions src/popup/Popup.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { forwardRef, useMemo, useRef, useState } from 'react';
import React, { useMemo, useRef, useState } from 'react';
import classnames from 'classnames';
import { CloseIcon } from 'tdesign-icons-react';
import { CSSTransition } from 'react-transition-group';
Expand All @@ -20,7 +20,7 @@ enum PopupSourceEnum {
CLOSEBTN = 'close-btn',
}

const Popup = forwardRef<HTMLDivElement, PopupProps>((props) => {
const Popup: React.FC<PopupProps> = (props) => {
const {
children,
placement,
Expand Down Expand Up @@ -123,7 +123,7 @@ const Popup = forwardRef<HTMLDivElement, PopupProps>((props) => {
</>
);
return <Portal attach={attach}>{node}</Portal>;
});
};

Popup.displayName = 'Popup';

Expand Down
2 changes: 1 addition & 1 deletion src/pull-down-refresh/PullDownRefresh.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import uniqueId from 'lodash/uniqueId';
import { useDrag } from '@use-gesture/react';
import { useSpring, animated } from '@react-spring/web';
import isBoolean from 'lodash/isBoolean';
import { Loading } from 'tdesign-mobile-react';
import Loading from '../loading';
import useConfig from '../_util/useConfig';
import withNativeProps, { NativeProps } from '../_util/withNativeProps';
import getScrollParent from '../_util/getScrollParent';
Expand Down
2 changes: 1 addition & 1 deletion src/swipe-cell/SwipeCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import isArray from 'lodash/isArray';
import identity from 'lodash/identity';
import { useClickAway } from 'ahooks';
import { useDrag } from '@use-gesture/react';
import { Button } from 'tdesign-mobile-react';
import { useSpring, animated } from '@react-spring/web';
import Button from '../button';
import useConfig from '../_util/useConfig';
import nearest from '../_util/nearest';
import withNativeProps, { NativeProps } from '../_util/withNativeProps';
Expand Down
4 changes: 2 additions & 2 deletions src/tag/CheckTag.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import classNames from 'classnames';
import React, { forwardRef } from 'react';
import { Icon } from 'tdesign-icons-react';
import parseTNode from 'tdesign-mobile-react/_util/parseTNode';
import { StyledProps } from 'tdesign-mobile-react/common';
import parseTNode from '../_util/parseTNode';
import { StyledProps } from '../common';
import useConfig from '../_util/useConfig';
import useDefault from '../_util/useDefault';
import useDefaultProps from '../hooks/useDefaultProps';
Expand Down
6 changes: 3 additions & 3 deletions src/tag/Tag.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import classNames from 'classnames';
import React, { forwardRef } from 'react';
import { Icon } from 'tdesign-icons-react';
import parseTNode from 'tdesign-mobile-react/_util/parseTNode';
import { StyledProps } from 'tdesign-mobile-react/common';
import useDefaultProps from 'tdesign-mobile-react/hooks/useDefaultProps';
import parseTNode from '../_util/parseTNode';
import { StyledProps } from '../common';
import useDefaultProps from '../hooks/useDefaultProps';
import useConfig from '../_util/useConfig';
import { tagDefaultProps } from './defaultProps';
import { TdTagProps } from './type';
Expand Down
Loading