@nutui/nutui-react 1.4.0 → 1.4.1-beta.0
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/CHANGELOG.md +13 -0
- package/dist/esm/Icon/style/index.js +1 -2
- package/dist/esm/Input.js +3 -3
- package/dist/esm/MenuItem.js +1 -1
- package/dist/esm/Overlay.js +2 -2
- package/dist/esm/Popup.js +3 -2
- package/dist/esm/Range.js +1 -3
- package/dist/esm/Swiper.js +8 -4
- package/dist/esm/{overlay-ed3eb37d.js → overlay-41da5070.js} +1 -1
- package/dist/esm/types/src/packages/actionsheet/actionsheet.d.ts +1 -1
- package/dist/esm/types/src/packages/animate/type.d.ts +2 -2
- package/dist/esm/types/src/packages/animatingnumbers/animatingnumbers.d.ts +1 -1
- package/dist/esm/types/src/packages/avatar/avatar.d.ts +1 -1
- package/dist/esm/types/src/packages/badge/badge.d.ts +1 -1
- package/dist/esm/types/src/packages/button/button.d.ts +3 -3
- package/dist/esm/types/src/packages/calendar/calendar.d.ts +1 -1
- package/dist/esm/types/src/packages/calendaritem/calendaritem.d.ts +2 -2
- package/dist/esm/types/src/packages/cascader/types.d.ts +1 -1
- package/dist/esm/types/src/packages/col/col.d.ts +1 -1
- package/dist/esm/types/src/packages/dialog/Mask.d.ts +1 -1
- package/dist/esm/types/src/packages/dialog/config.d.ts +2 -2
- package/dist/esm/types/src/packages/dialog/dialog.d.ts +1 -1
- package/dist/esm/types/src/packages/divider/divider.d.ts +2 -2
- package/dist/esm/types/src/packages/ellipsis/ellipsis.d.ts +1 -1
- package/dist/esm/types/src/packages/fixednav/fixednav.d.ts +2 -2
- package/dist/esm/types/src/packages/form/types.d.ts +2 -2
- package/dist/esm/types/src/packages/formitem/formitem.d.ts +2 -2
- package/dist/esm/types/src/packages/formitem/types.d.ts +2 -2
- package/dist/esm/types/src/packages/grid/grid.d.ts +1 -1
- package/dist/esm/types/src/packages/griditem/griditem.d.ts +1 -1
- package/dist/esm/types/src/packages/image/image.d.ts +2 -2
- package/dist/esm/types/src/packages/input/input.d.ts +5 -5
- package/dist/esm/types/src/packages/popover/popover.d.ts +2 -2
- package/dist/esm/types/src/packages/popup/popup.d.ts +1 -1
- package/dist/esm/types/src/packages/progress/progress.d.ts +2 -2
- package/dist/esm/types/src/packages/pulltorefresh/pulltorefresh.d.ts +1 -1
- package/dist/esm/types/src/packages/radio/radio.d.ts +2 -2
- package/dist/esm/types/src/packages/radiogroup/radiogroup.d.ts +2 -2
- package/dist/esm/types/src/packages/range/range.d.ts +1 -2
- package/dist/esm/types/src/packages/row/row.d.ts +1 -1
- package/dist/esm/types/src/packages/sidenavbar/sidenavbar.d.ts +1 -1
- package/dist/esm/types/src/packages/sidenavbar/type.d.ts +3 -3
- package/dist/esm/types/src/packages/sidenavbaritem/sidenavbaritem.d.ts +1 -1
- package/dist/esm/types/src/packages/skeleton/skeleton.d.ts +1 -1
- package/dist/esm/types/src/packages/subsidenavbar/subsidenavbar.d.ts +1 -1
- package/dist/esm/types/src/packages/swipe/swipe.d.ts +2 -2
- package/dist/esm/types/src/packages/swiper/swiper.d.ts +2 -1
- package/dist/esm/types/src/packages/table/table.d.ts +1 -1
- package/dist/esm/types/src/packages/tabs/tabs.d.ts +1 -1
- package/dist/esm/types/src/packages/tag/tag.d.ts +1 -1
- package/dist/esm/types/src/packages/uploader/uploader.d.ts +2 -2
- package/dist/esm/types/src/packages/virtuallist/type.d.ts +1 -1
- package/dist/esm/types/src/packages/virtuallist/virtuallist.d.ts +1 -1
- package/dist/esm/types/src/utils/get-scroll-parent.d.ts +1 -1
- package/dist/esm/types/src/utils/render.d.ts +1 -1
- package/dist/esm/types/src/utils/useTouch.d.ts +1 -1
- package/dist/esm/types/src/utils/useWatch.d.ts +2 -2
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/id-ID.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/locales/zh-TW.js +1 -1
- package/dist/locales/zh-UG.js +1 -1
- package/dist/nutui.react.es.js +90 -78
- package/dist/nutui.react.umd.js +90 -78
- package/dist/packages/input/input.scss +15 -0
- package/dist/packages/searchbar/searchbar.scss +6 -13
- package/dist/packages/swiper/swiper.scss +0 -3
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/styles/themes/default.scss +1 -0
- package/dist/styles/variables.scss +8 -4
- package/dist/types/index.d.ts +56 -56
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
# v1.4.1
|
|
2
|
+
`2022-12-28`
|
|
3
|
+
|
|
4
|
+
* :sparkles: feat: Swiper 组件增加指示器的默认背景色配置 (#552) @xiaoyatong
|
|
5
|
+
* :sparkles: feat: docs 不展示demo问题修复 @oasis-cloud
|
|
6
|
+
* :bug: fix: input taro显示右侧按钮时focus失效问题修复;textare limitshow属性名字更正 (#557) @vickyYe
|
|
7
|
+
* :bug: fix: iconfont 在 dev 模式下加载多次 (#555) @oasis-cloud
|
|
8
|
+
* :bug: fix: Address 组件适配Taro (#554) @xiaoyatong
|
|
9
|
+
* :bug: fix: Searchbar 组件修复图标样式。 (#553) @xiaoyatong
|
|
10
|
+
* :bug: fix: react-router-dom 安装到 devDependencies 中 @oasis-cloud
|
|
11
|
+
* :bug: fix: Range 组件手动设置为0时,页面无法渲染的问题。 (#551) @xiaoyatong
|
|
12
|
+
|
|
13
|
+
|
|
1
14
|
# v1.4.0
|
|
2
15
|
`2022-12-21`
|
|
3
16
|
|
package/dist/esm/Input.js
CHANGED
|
@@ -165,7 +165,7 @@ var Input = forwardRef(function (props, ref) {
|
|
|
165
165
|
});
|
|
166
166
|
var inputClass = useCallback(function () {
|
|
167
167
|
var prefixCls = 'nut-input';
|
|
168
|
-
return [prefixCls, "".concat(center ? 'center' : ''), "".concat(disabled ? "".concat(prefixCls, "-disabled") : ''), "".concat(required ? "".concat(prefixCls, "-required") : ''), "".concat(error ? "".concat(prefixCls, "-error") : ''), "".concat(border ? "".concat(prefixCls, "-border") : '')].filter(Boolean).join(' ');
|
|
168
|
+
return [prefixCls, "".concat(center ? 'center' : ''), "".concat(disabled ? "".concat(prefixCls, "-disabled") : ''), "".concat(required ? "".concat(prefixCls, "-required") : ''), "".concat(error ? "".concat(prefixCls, "-error") : ''), "".concat(border ? "".concat(prefixCls, "-border") : ''), "".concat(slotButton || rightIcon ? "".concat(prefixCls, "-right-mark") : '')].filter(Boolean).join(' ');
|
|
169
169
|
}, [disabled, required, error, border]);
|
|
170
170
|
var updateValue = function updateValue(value) {
|
|
171
171
|
var _inputRef$current;
|
|
@@ -350,7 +350,7 @@ var Input = forwardRef(function (props, ref) {
|
|
|
350
350
|
onClick: function onClick(e) {
|
|
351
351
|
handleClear(e);
|
|
352
352
|
}
|
|
353
|
-
}) : null, rightIcon && rightIcon.length > 0 ? React__default.createElement("div", {
|
|
353
|
+
}) : null), rightIcon && rightIcon.length > 0 ? React__default.createElement("div", {
|
|
354
354
|
className: "nut-input-right-icon",
|
|
355
355
|
onClick: function onClick(e) {
|
|
356
356
|
handleClickRightIcon(e);
|
|
@@ -362,7 +362,7 @@ var Input = forwardRef(function (props, ref) {
|
|
|
362
362
|
size: rightIconSize
|
|
363
363
|
})) : null, slotButton ? React__default.createElement("div", {
|
|
364
364
|
className: "nut-input-button"
|
|
365
|
-
}, slotButton) : null
|
|
365
|
+
}, slotButton) : null, showWordLimit && maxlength ? React__default.createElement("div", {
|
|
366
366
|
className: "nut-input-word-limit"
|
|
367
367
|
}, React__default.createElement("span", {
|
|
368
368
|
className: "nut-input-word-num"
|
package/dist/esm/MenuItem.js
CHANGED
|
@@ -7,7 +7,7 @@ import classNames from 'classnames';
|
|
|
7
7
|
import { CSSTransition } from 'react-transition-group';
|
|
8
8
|
import { useConfig } from './ConfigProvider.js';
|
|
9
9
|
import Icon from './Icon.js';
|
|
10
|
-
import { O as Overlay } from './overlay-
|
|
10
|
+
import { O as Overlay } from './overlay-41da5070.js';
|
|
11
11
|
import { C as ComponentDefaults } from './typings-1c5f2628.js';
|
|
12
12
|
import './bem-893ad28d.js';
|
|
13
13
|
import '@bem-react/classname';
|
package/dist/esm/Overlay.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as Overlay } from './overlay-
|
|
2
|
-
export { O as default } from './overlay-
|
|
1
|
+
import { O as Overlay } from './overlay-41da5070.js';
|
|
2
|
+
export { O as default } from './overlay-41da5070.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'classnames';
|
|
5
5
|
import './bem-893ad28d.js';
|
package/dist/esm/Popup.js
CHANGED
|
@@ -6,7 +6,7 @@ import React__default, { useState, useEffect } from 'react';
|
|
|
6
6
|
import { createPortal } from 'react-dom';
|
|
7
7
|
import { CSSTransition } from 'react-transition-group';
|
|
8
8
|
import classNames from 'classnames';
|
|
9
|
-
import { d as defaultOverlayProps } from './overlay-
|
|
9
|
+
import { d as defaultOverlayProps } from './overlay-41da5070.js';
|
|
10
10
|
import Icon from './Icon.js';
|
|
11
11
|
import Overlay from './Overlay.js';
|
|
12
12
|
import { c as cn } from './bem-893ad28d.js';
|
|
@@ -32,7 +32,8 @@ var defaultProps = _objectSpread(_objectSpread({}, ComponentDefaults), {}, {
|
|
|
32
32
|
onClickOverlay: function onClickOverlay(e) {},
|
|
33
33
|
onClickCloseIcon: function onClickCloseIcon(e) {}
|
|
34
34
|
}, defaultOverlayProps);
|
|
35
|
-
|
|
35
|
+
// 默认1000,参看variables
|
|
36
|
+
var _zIndex = 1000;
|
|
36
37
|
var Popup = function Popup(props) {
|
|
37
38
|
var _classNames;
|
|
38
39
|
var children = props.children,
|
package/dist/esm/Range.js
CHANGED
|
@@ -36,7 +36,6 @@ var Range = function Range(props) {
|
|
|
36
36
|
button = _defaultProps$props.button,
|
|
37
37
|
vertical = _defaultProps$props.vertical,
|
|
38
38
|
marks = _defaultProps$props.marks,
|
|
39
|
-
change = _defaultProps$props.change,
|
|
40
39
|
dragStart = _defaultProps$props.dragStart,
|
|
41
40
|
dragEnd = _defaultProps$props.dragEnd,
|
|
42
41
|
onChange = _defaultProps$props.onChange,
|
|
@@ -71,7 +70,7 @@ var Range = function Range(props) {
|
|
|
71
70
|
marksList = _useState8[0],
|
|
72
71
|
SetMarksList = _useState8[1];
|
|
73
72
|
useEffect(function () {
|
|
74
|
-
if (modelValue) {
|
|
73
|
+
if (typeof modelValue === 'number') {
|
|
75
74
|
if (!range && (modelValue < min || modelValue > max)) {
|
|
76
75
|
SetInitValue(0);
|
|
77
76
|
Toast.text("".concat(modelValue, " ").concat(locale.range.rangeText));
|
|
@@ -224,7 +223,6 @@ var Range = function Range(props) {
|
|
|
224
223
|
SetInitValue(value);
|
|
225
224
|
}
|
|
226
225
|
if ((marks || end) && !isSameValue(value, startValue)) {
|
|
227
|
-
change && change(value);
|
|
228
226
|
onChange && onChange(value);
|
|
229
227
|
}
|
|
230
228
|
};
|
package/dist/esm/Swiper.js
CHANGED
|
@@ -19,6 +19,7 @@ var defaultProps = {
|
|
|
19
19
|
autoPlay: 0,
|
|
20
20
|
direction: 'horizontal',
|
|
21
21
|
paginationColor: '#fff',
|
|
22
|
+
paginationBgColor: '#ddd',
|
|
22
23
|
paginationVisible: false,
|
|
23
24
|
loop: true,
|
|
24
25
|
touchable: true,
|
|
@@ -317,10 +318,10 @@ var Swiper = React__default.forwardRef(function (props, ref) {
|
|
|
317
318
|
var val = isVertical ? rect.height - _size : rect.width - _size;
|
|
318
319
|
_offset = moveOffset + (active === childCount - 1 && !props.loop ? -val / 2 : val / 2);
|
|
319
320
|
}
|
|
320
|
-
target.style.transform = "translate3D".concat(!isVertical ? "(".concat(_offset, "px,0,0)") : "(0,".concat(_offset, "px,0)"));
|
|
321
321
|
target.style.transitionDuration = "".concat(_swiper.current.moving ? 0 : props.duration, "ms");
|
|
322
322
|
target.style[isVertical ? 'height' : 'width'] = "".concat(Number(size) * childCount, "px");
|
|
323
323
|
target.style[isVertical ? 'width' : 'height'] = "".concat(isVertical ? width : height, "px");
|
|
324
|
+
target.style.transform = "translate3D".concat(!isVertical ? "(".concat(_offset, "px,0,0)") : "(0,".concat(_offset, "px,0)"));
|
|
324
325
|
};
|
|
325
326
|
var onTouchStart = function onTouchStart(e) {
|
|
326
327
|
if (props.isPreventDefault) e.preventDefault();
|
|
@@ -468,12 +469,15 @@ var Swiper = React__default.forwardRef(function (props, ref) {
|
|
|
468
469
|
})), propSwiper.paginationVisible && !('pageContent' in propSwiper) ? React__default.createElement("div", {
|
|
469
470
|
className: classNames((_classNames2 = {}, _defineProperty(_classNames2, "".concat(b('pagination')), true), _defineProperty(_classNames2, "".concat(b('pagination-vertical')), isVertical), _classNames2))
|
|
470
471
|
}, React__default.Children.map(childs, function (item, index) {
|
|
471
|
-
var _classNames3;
|
|
472
472
|
return React__default.createElement("i", {
|
|
473
473
|
style: (active + childCount) % childCount === index ? {
|
|
474
474
|
backgroundColor: propSwiper.paginationColor
|
|
475
|
-
} :
|
|
476
|
-
|
|
475
|
+
} : {
|
|
476
|
+
backgroundColor: propSwiper.paginationBgColor
|
|
477
|
+
},
|
|
478
|
+
className: classNames({
|
|
479
|
+
active: (active + childCount) % childCount === index
|
|
480
|
+
}),
|
|
477
481
|
key: index
|
|
478
482
|
});
|
|
479
483
|
})) : React__default.createElement("div", null, pageContent)));
|
|
@@ -8,7 +8,7 @@ import React__default, { useState, useRef, useEffect } from 'react';
|
|
|
8
8
|
import classNames from 'classnames';
|
|
9
9
|
import { c as cn } from './bem-893ad28d.js';
|
|
10
10
|
var defaultOverlayProps = {
|
|
11
|
-
zIndex:
|
|
11
|
+
zIndex: 1000,
|
|
12
12
|
duration: 0.3,
|
|
13
13
|
overlayClass: '',
|
|
14
14
|
closeOnClickOverlay: true,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export type AnimateType = 'shake' | 'ripple' | 'breath' | 'float' | 'slide-right' | 'slide-left' | 'slide-top' | 'slide-bottom' | 'jump' | 'twinkle' | 'flicker';
|
|
2
|
+
export type AnimateAction = 'initial' | 'click';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
export interface AnimatingNumbersProps {
|
|
3
3
|
}
|
|
4
|
-
|
|
4
|
+
type AnimatingNumbersStates = {};
|
|
5
5
|
export declare class AnimatingNumbers extends Component<AnimatingNumbersProps, AnimatingNumbersStates> {
|
|
6
6
|
static defaultProps: AnimatingNumbersProps;
|
|
7
7
|
static displayName: string;
|
|
@@ -16,5 +16,5 @@ export interface AvatarProps extends BasicComponent {
|
|
|
16
16
|
onActiveAvatar: (e: MouseEvent) => void;
|
|
17
17
|
onError: (e: any) => void;
|
|
18
18
|
}
|
|
19
|
-
export
|
|
19
|
+
export type AvatarShape = 'round' | 'square';
|
|
20
20
|
export declare const Avatar: FunctionComponent<Partial<AvatarProps> & React.HTMLAttributes<HTMLDivElement>>;
|
|
@@ -11,5 +11,5 @@ export interface BadgeProps extends BasicComponent {
|
|
|
11
11
|
icons: any;
|
|
12
12
|
children?: ReactNode;
|
|
13
13
|
}
|
|
14
|
-
export
|
|
14
|
+
export type BadgeType = 'default' | 'primary' | 'success' | 'warning' | 'danger';
|
|
15
15
|
export declare const Badge: FunctionComponent<Partial<BadgeProps>>;
|
|
@@ -15,7 +15,7 @@ export interface ButtonProps extends BasicComponent {
|
|
|
15
15
|
children: any;
|
|
16
16
|
onClick: (e: MouseEvent) => void;
|
|
17
17
|
}
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export
|
|
18
|
+
export type ButtonType = 'default' | 'primary' | 'info' | 'success' | 'warning' | 'danger';
|
|
19
|
+
export type ButtonSize = 'large' | 'normal' | 'small';
|
|
20
|
+
export type ButtonShape = 'square' | 'round';
|
|
21
21
|
export declare const Button: FunctionComponent<Partial<ButtonProps>>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
type CalendarRef = {
|
|
3
3
|
scrollToDate: (date: string) => void;
|
|
4
4
|
};
|
|
5
|
-
|
|
5
|
+
type InputDate = string | string[];
|
|
6
6
|
interface Day {
|
|
7
7
|
day: string | number;
|
|
8
8
|
type: string;
|
|
@@ -19,7 +19,7 @@ export interface CascaderConfig {
|
|
|
19
19
|
text?: string;
|
|
20
20
|
children?: string;
|
|
21
21
|
}
|
|
22
|
-
export
|
|
22
|
+
export type CascaderValue = CascaderOption['value'][];
|
|
23
23
|
export interface convertConfig {
|
|
24
24
|
topId?: string | number | null;
|
|
25
25
|
idKey?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CSSProperties, ReactNode, ForwardRefExoticComponent, PropsWithChildren } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type DialogConfigType = {
|
|
3
3
|
prefixCls?: string;
|
|
4
4
|
simple?: boolean;
|
|
5
5
|
};
|
|
@@ -28,7 +28,7 @@ export interface BasicDialogProps {
|
|
|
28
28
|
onClickSelf?: () => void;
|
|
29
29
|
onConfirm?: (e?: MouseEvent) => Promise<() => void> | void;
|
|
30
30
|
}
|
|
31
|
-
export
|
|
31
|
+
export type DialogReturnProps = {
|
|
32
32
|
update: (newConfig: ConfirmProps) => void;
|
|
33
33
|
close: () => void;
|
|
34
34
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export type ContentPositionType = 'left' | 'center' | 'right';
|
|
3
|
+
export type DirectionType = 'horizontal' | 'vertical';
|
|
4
4
|
export interface DividerProps {
|
|
5
5
|
contentPosition: ContentPositionType;
|
|
6
6
|
dashed: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { FunctionComponent, MouseEvent } from 'react';
|
|
2
2
|
import { BasicComponent } from '@/utils/typings';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type Direction = 'right' | 'left';
|
|
4
|
+
type Position = {
|
|
5
5
|
top?: string;
|
|
6
6
|
bottom?: string;
|
|
7
7
|
};
|
|
@@ -49,8 +49,8 @@ export interface BaseFormField {
|
|
|
49
49
|
*/
|
|
50
50
|
disabled: boolean;
|
|
51
51
|
}
|
|
52
|
-
export
|
|
53
|
-
export
|
|
52
|
+
export type StoreValue = string | number;
|
|
53
|
+
export type NamePath = string | number;
|
|
54
54
|
export interface Callbacks<Values = any> {
|
|
55
55
|
onValuesChange?: (values: Values) => void;
|
|
56
56
|
onFinish?: (values: Values) => void;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { BaseFormField } from './types';
|
|
3
3
|
import { FormItemContext } from './formitemcontext';
|
|
4
4
|
import { BasicComponent } from '@/utils/typings';
|
|
5
|
-
|
|
5
|
+
type TextAlign = 'start' | 'end' | 'left' | 'right' | 'center' | 'justify' | 'match-parent';
|
|
6
6
|
export interface FormItemProps extends BasicComponent, BaseFormField {
|
|
7
7
|
labelWidth: string | number;
|
|
8
8
|
errorMessageAlign: TextAlign;
|
|
@@ -10,7 +10,7 @@ export interface FormItemProps extends BasicComponent, BaseFormField {
|
|
|
10
10
|
showErrorMessage: boolean;
|
|
11
11
|
}
|
|
12
12
|
declare const defaultProps: FormItemProps;
|
|
13
|
-
export
|
|
13
|
+
export type FieldProps = typeof defaultProps & Partial<BaseFormField>;
|
|
14
14
|
export declare class FormItem extends React.Component<FieldProps> {
|
|
15
15
|
static defaultProps: FormItemProps;
|
|
16
16
|
static contextType: any;
|
|
@@ -49,8 +49,8 @@ export interface BaseFormField {
|
|
|
49
49
|
*/
|
|
50
50
|
disabled: boolean;
|
|
51
51
|
}
|
|
52
|
-
export
|
|
53
|
-
export
|
|
52
|
+
export type StoreValue = string | number;
|
|
53
|
+
export type NamePath = string | number;
|
|
54
54
|
export interface Callbacks<Values = any> {
|
|
55
55
|
onValuesChange?: (values: Values) => void;
|
|
56
56
|
onFinish?: (values: Values) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { CSSProperties, FunctionComponent } from 'react';
|
|
2
2
|
import { GridItemProps } from '../griditem/griditem';
|
|
3
|
-
export
|
|
3
|
+
export type GridDirection = 'horizontal' | 'vertical';
|
|
4
4
|
export interface GridProps {
|
|
5
5
|
columnNum: string | number;
|
|
6
6
|
border: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { FunctionComponent, ReactNode } from 'react';
|
|
2
2
|
import { BasicComponent } from '@/utils/typings';
|
|
3
|
-
|
|
3
|
+
type GridDirection = 'horizontal' | 'vertical';
|
|
4
4
|
export interface GridItemProps extends BasicComponent {
|
|
5
5
|
text: string | ReactNode;
|
|
6
6
|
icon: string | ReactNode;
|
|
@@ -18,6 +18,6 @@ export interface ImageProps {
|
|
|
18
18
|
onLoad?: () => void;
|
|
19
19
|
onError?: () => void;
|
|
20
20
|
}
|
|
21
|
-
export
|
|
22
|
-
export
|
|
21
|
+
export type ImageFit = 'contain' | 'cover' | 'fill' | 'none' | 'scale-down' | string;
|
|
22
|
+
export type ImagePosition = 'center' | 'top' | 'right' | 'bottom' | 'left' | string;
|
|
23
23
|
export declare const Image: FunctionComponent<Partial<ImageProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onClick' | 'onLoad' | 'onError'>>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import React, { CSSProperties, FunctionComponent, HTMLInputTypeAttribute } from 'react';
|
|
2
2
|
import { BasicComponent } from '@/utils/typings';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
3
|
+
export type InputAlignType = 'left' | 'center' | 'right';
|
|
4
|
+
export type InputFormatTrigger = 'onChange' | 'onBlur';
|
|
5
|
+
export type InputType = HTMLInputTypeAttribute;
|
|
6
|
+
export type InputRule = {
|
|
7
7
|
pattern?: RegExp;
|
|
8
8
|
message?: string;
|
|
9
9
|
required?: boolean;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
11
|
+
export type ConfirmTextType = 'send' | 'search' | 'next' | 'go' | 'done';
|
|
12
12
|
export interface InputProps extends BasicComponent {
|
|
13
13
|
type: InputType;
|
|
14
14
|
name: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { CSSProperties, FunctionComponent } from 'react';
|
|
2
2
|
import { BasicComponent } from '@/utils/typings';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export type PopoverTheme = 'light' | 'dark';
|
|
4
|
+
export type PopoverLocation = 'bottom' | 'top' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end';
|
|
5
5
|
export interface List {
|
|
6
6
|
name: string;
|
|
7
7
|
icon?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { FunctionComponent, MouseEvent } from 'react';
|
|
2
2
|
import { OverlayProps } from '@/packages/overlay/overlay';
|
|
3
3
|
import { BasicComponent } from '@/utils/typings';
|
|
4
|
-
|
|
4
|
+
type Teleport = HTMLElement | (() => HTMLElement) | null;
|
|
5
5
|
export interface PopupProps extends OverlayProps, BasicComponent {
|
|
6
6
|
position: string;
|
|
7
7
|
transition: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { FunctionComponent, CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import { BasicComponent } from '@/utils/typings';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export type ProgressSize = 'small' | 'base' | 'large';
|
|
4
|
+
export type TextType = 'icon' | 'text';
|
|
5
5
|
export interface ProgressProps extends BasicComponent {
|
|
6
6
|
className: string;
|
|
7
7
|
style: CSSProperties;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { FunctionComponent, ReactNode } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type PullStatus = 'pulling' | 'canRelease' | 'refreshing' | 'complete';
|
|
3
3
|
export interface PullToRefreshProps {
|
|
4
4
|
className: string;
|
|
5
5
|
style: React.CSSProperties;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { FunctionComponent, MouseEventHandler } from 'react';
|
|
2
2
|
import RadioGroup from '@/packages/radiogroup';
|
|
3
3
|
import { BasicComponent } from '@/utils/typings';
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
type Shape = 'button' | 'round';
|
|
5
|
+
type Position = 'right' | 'left';
|
|
6
6
|
export interface RadioProps extends BasicComponent {
|
|
7
7
|
className: string;
|
|
8
8
|
style: React.CSSProperties;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { RadioGroupOptionType } from './type';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type Position = 'left' | 'right';
|
|
4
|
+
type Direction = 'horizontal' | 'vertical';
|
|
5
5
|
export interface RadioGroupProps {
|
|
6
6
|
value: string | number | boolean | null;
|
|
7
7
|
textPosition: Position;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { FunctionComponent, CSSProperties } from 'react';
|
|
2
|
-
|
|
2
|
+
type SliderValue = number | number[];
|
|
3
3
|
export interface RangeProps {
|
|
4
4
|
className: string;
|
|
5
5
|
style: CSSProperties;
|
|
@@ -20,7 +20,6 @@ export interface RangeProps {
|
|
|
20
20
|
button: React.ReactNode;
|
|
21
21
|
vertical: boolean;
|
|
22
22
|
marks: Record<string, unknown>;
|
|
23
|
-
change?: (value: number) => void;
|
|
24
23
|
dragStart?: () => void;
|
|
25
24
|
dragEnd?: () => void;
|
|
26
25
|
onChange?: (value: number) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
type NavBarProps = {
|
|
3
3
|
showhead?: boolean;
|
|
4
4
|
};
|
|
5
5
|
export interface SideNavBarProps extends React.HTMLAttributes<HTMLDivElement>, NavBarProps {
|
|
@@ -11,7 +11,7 @@ export interface SideNavBarProps extends React.HTMLAttributes<HTMLDivElement>, N
|
|
|
11
11
|
handleClose: () => void;
|
|
12
12
|
children?: React.ReactNode;
|
|
13
13
|
}
|
|
14
|
-
export
|
|
14
|
+
export type SideNavBarItemProps = {
|
|
15
15
|
title: string;
|
|
16
16
|
ikey: string | number;
|
|
17
17
|
click?: ({ title, ikey }: {
|
|
@@ -20,7 +20,7 @@ export declare type SideNavBarItemProps = {
|
|
|
20
20
|
}) => void;
|
|
21
21
|
children?: React.ReactNode;
|
|
22
22
|
};
|
|
23
|
-
export
|
|
23
|
+
export type SubNavBarProps = {
|
|
24
24
|
title: string;
|
|
25
25
|
ikey: string | number;
|
|
26
26
|
open?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export type SwipeSide = 'left' | 'right';
|
|
3
|
+
export type SwipePosition = SwipeSide | 'cell' | 'outside';
|
|
4
4
|
export interface SwipeInstance {
|
|
5
5
|
open: (side: SwipeSide) => void;
|
|
6
6
|
close: () => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type SwiperRef = {
|
|
3
3
|
to: (index: number) => void;
|
|
4
4
|
next: () => void;
|
|
5
5
|
prev: () => void;
|
|
@@ -12,6 +12,7 @@ export interface SwiperProps {
|
|
|
12
12
|
autoPlay: number | string;
|
|
13
13
|
direction: 'horizontal' | 'vertical';
|
|
14
14
|
paginationColor: string;
|
|
15
|
+
paginationBgColor: string;
|
|
15
16
|
paginationVisible: boolean;
|
|
16
17
|
loop: boolean;
|
|
17
18
|
touchable: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
2
|
import { BasicTableProps } from './types';
|
|
3
|
-
export
|
|
3
|
+
export type TableProps = BasicTableProps;
|
|
4
4
|
export declare const Table: FunctionComponent<Partial<TableProps> & React.HTMLAttributes<HTMLDivElement>>;
|
|
@@ -7,7 +7,7 @@ declare class Title {
|
|
|
7
7
|
index: number;
|
|
8
8
|
constructor();
|
|
9
9
|
}
|
|
10
|
-
export
|
|
10
|
+
export type TabsSize = 'large' | 'normal' | 'small';
|
|
11
11
|
export interface TabsProps extends BasicComponent {
|
|
12
12
|
className: string;
|
|
13
13
|
style: React.CSSProperties;
|
|
@@ -13,5 +13,5 @@ export interface TagProps extends BasicComponent {
|
|
|
13
13
|
onClose: (e?: any) => void;
|
|
14
14
|
children?: React.ReactNode;
|
|
15
15
|
}
|
|
16
|
-
export
|
|
16
|
+
export type TagType = 'default' | 'primary' | 'success' | 'warning' | 'danger';
|
|
17
17
|
export declare const Tag: FunctionComponent<Partial<TagProps>>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { UploadOptions } from './upload';
|
|
3
|
-
export
|
|
3
|
+
export type FileType<T> = {
|
|
4
4
|
[key: string]: T;
|
|
5
5
|
};
|
|
6
|
-
export
|
|
6
|
+
export type FileItemStatus = 'ready' | 'uploading' | 'success' | 'error' | 'removed';
|
|
7
7
|
import { BasicComponent } from '@/utils/typings';
|
|
8
8
|
export interface UploaderProps extends BasicComponent {
|
|
9
9
|
url: string;
|