@douyinfe/semi-ui 2.0.9-alpha.3 → 2.0.9-alpha.4
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/umd/semi-ui.js +8 -8
- package/dist/umd/semi-ui.js.map +1 -1
- package/dist/umd/semi-ui.min.js +1 -1
- package/dist/umd/semi-ui.min.js.map +1 -1
- package/lib/es/datePicker/dateInput.d.ts +1 -1
- package/lib/es/datePicker/datePicker.d.ts +1 -1
- package/lib/es/datePicker/monthsGrid.d.ts +1 -1
- package/lib/es/radio/radio.d.ts +1 -1
- package/lib/es/radio/radioGroup.d.ts +1 -1
- package/lib/es/scrollList/scrollItem.d.ts +4 -3
- package/lib/es/scrollList/scrollItem.js +8 -8
- package/lib/es/table/Table.d.ts +1 -1
- package/lib/es/tabs/TabBar.d.ts +1 -1
- package/package.json +2 -2
|
@@ -24,7 +24,7 @@ export default class DateInput extends BaseComponent<DateInputProps, {}> {
|
|
|
24
24
|
onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
25
25
|
value: PropTypes.Requireable<any[]>;
|
|
26
26
|
disabled: PropTypes.Requireable<boolean>;
|
|
27
|
-
type: PropTypes.Requireable<"
|
|
27
|
+
type: PropTypes.Requireable<"dateTime" | "date" | "month" | "dateRange" | "year" | "dateTimeRange">;
|
|
28
28
|
multiple: PropTypes.Requireable<boolean>;
|
|
29
29
|
showClear: PropTypes.Requireable<boolean>;
|
|
30
30
|
format: PropTypes.Requireable<string>;
|
|
@@ -29,7 +29,7 @@ export declare type DatePickerState = DatePickerFoundationState;
|
|
|
29
29
|
export default class DatePicker extends BaseComponent<DatePickerProps, DatePickerState> {
|
|
30
30
|
static contextType: React.Context<import("../configProvider/context").ContextValue>;
|
|
31
31
|
static propTypes: {
|
|
32
|
-
type: PropTypes.Requireable<"
|
|
32
|
+
type: PropTypes.Requireable<"dateTime" | "date" | "month" | "dateRange" | "year" | "dateTimeRange">;
|
|
33
33
|
size: PropTypes.Requireable<"default" | "small" | "large">;
|
|
34
34
|
density: PropTypes.Requireable<"default" | "compact">;
|
|
35
35
|
defaultValue: PropTypes.Requireable<string | number | object>;
|
|
@@ -17,7 +17,7 @@ export interface MonthsGridProps extends MonthsGridFoundationProps, BaseProps {
|
|
|
17
17
|
export declare type MonthsGridState = MonthsGridFoundationState;
|
|
18
18
|
export default class MonthsGrid extends BaseComponent<MonthsGridProps, MonthsGridState> {
|
|
19
19
|
static propTypes: {
|
|
20
|
-
type: PropTypes.Requireable<"
|
|
20
|
+
type: PropTypes.Requireable<"dateTime" | "date" | "month" | "dateRange" | "year" | "dateTimeRange">;
|
|
21
21
|
defaultValue: PropTypes.Requireable<string | number | object>;
|
|
22
22
|
defaultPickerValue: PropTypes.Requireable<string | number | object>;
|
|
23
23
|
multiple: PropTypes.Requireable<boolean>;
|
package/lib/es/radio/radio.d.ts
CHANGED
|
@@ -65,7 +65,7 @@ declare class Radio extends BaseComponent<RadioProps, RadioState> {
|
|
|
65
65
|
prefixCls?: string;
|
|
66
66
|
name?: string;
|
|
67
67
|
onChange?: (e: RadioChangeEvent) => void;
|
|
68
|
-
buttonSize?: "small" | "
|
|
68
|
+
buttonSize?: "small" | "middle" | "large";
|
|
69
69
|
isCardRadio?: boolean;
|
|
70
70
|
isPureCardRadio?: boolean;
|
|
71
71
|
};
|
|
@@ -40,7 +40,7 @@ declare class RadioGroup extends BaseComponent<RadioGroupProps, RadioGroupState>
|
|
|
40
40
|
disabled: PropTypes.Requireable<boolean>;
|
|
41
41
|
name: PropTypes.Requireable<string>;
|
|
42
42
|
options: PropTypes.Requireable<any[]>;
|
|
43
|
-
buttonSize: PropTypes.Requireable<"small" | "
|
|
43
|
+
buttonSize: PropTypes.Requireable<"small" | "middle" | "large">;
|
|
44
44
|
type: PropTypes.Requireable<"default" | "button" | "card" | "pureCard">;
|
|
45
45
|
value: PropTypes.Requireable<any>;
|
|
46
46
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/// <reference types="lodash" />
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import BaseComponent from '../_base/baseComponent';
|
|
4
3
|
import PropTypes from 'prop-types';
|
|
5
4
|
import { Item, ScrollItemAdapter } from '@douyinfe/semi-foundation/lib/es/scrollList/itemFoundation';
|
|
6
5
|
import { Motion } from '../_base/base';
|
|
6
|
+
declare type DebounceSelectFn = (e: React.UIEvent, newSelectedNode: HTMLElement) => void;
|
|
7
7
|
export interface ScrollItemProps<T extends Item> {
|
|
8
8
|
mode?: string;
|
|
9
9
|
cycled?: boolean;
|
|
@@ -48,8 +48,8 @@ export default class ScrollItem<T extends Item> extends BaseComponent<ScrollItem
|
|
|
48
48
|
selector: unknown;
|
|
49
49
|
scrollAnimation: any;
|
|
50
50
|
scrolling: boolean;
|
|
51
|
-
throttledAdjustList:
|
|
52
|
-
debouncedSelect:
|
|
51
|
+
throttledAdjustList: DebounceSelectFn;
|
|
52
|
+
debouncedSelect: DebounceSelectFn;
|
|
53
53
|
constructor(props?: {});
|
|
54
54
|
get adapter(): ScrollItemAdapter<ScrollItemProps<T>, ScrollItemState, T>;
|
|
55
55
|
componentDidMount(): void;
|
|
@@ -102,3 +102,4 @@ export default class ScrollItem<T extends Item> extends BaseComponent<ScrollItem
|
|
|
102
102
|
renderInfiniteList: () => JSX.Element;
|
|
103
103
|
render(): JSX.Element;
|
|
104
104
|
}
|
|
105
|
+
export {};
|
|
@@ -21,14 +21,6 @@ export default class ScrollItem extends BaseComponent {
|
|
|
21
21
|
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
22
22
|
super(props);
|
|
23
23
|
_this = this;
|
|
24
|
-
this.throttledAdjustList = throttle((e, nearestNode) => {
|
|
25
|
-
this.foundation.adjustInfiniteList(this.list, this.wrapper, nearestNode);
|
|
26
|
-
}, msPerFrame);
|
|
27
|
-
this.debouncedSelect = debounce((e, nearestNode) => {
|
|
28
|
-
this._cacheSelectedNode(nearestNode);
|
|
29
|
-
|
|
30
|
-
this.foundation.selectNode(nearestNode, this.list);
|
|
31
|
-
}, msPerFrame * 5);
|
|
32
24
|
|
|
33
25
|
this._cacheNode = (name, node) => name && node && Object.prototype.hasOwnProperty.call(this, name) && (this[name] = node);
|
|
34
26
|
|
|
@@ -394,6 +386,14 @@ export default class ScrollItem extends BaseComponent {
|
|
|
394
386
|
this.scrollAnimation = null; // cache if select action comes from outside
|
|
395
387
|
|
|
396
388
|
this.foundation = new ItemFoundation(this.adapter);
|
|
389
|
+
this.throttledAdjustList = throttle((e, nearestNode) => {
|
|
390
|
+
this.foundation.adjustInfiniteList(this.list, this.wrapper, nearestNode);
|
|
391
|
+
}, msPerFrame);
|
|
392
|
+
this.debouncedSelect = debounce((e, nearestNode) => {
|
|
393
|
+
this._cacheSelectedNode(nearestNode);
|
|
394
|
+
|
|
395
|
+
this.foundation.selectNode(nearestNode, this.list);
|
|
396
|
+
}, msPerFrame * 5);
|
|
397
397
|
}
|
|
398
398
|
|
|
399
399
|
get adapter() {
|
package/lib/es/table/Table.d.ts
CHANGED
|
@@ -277,7 +277,7 @@ declare class Table<RecordType extends Record<string, any>> extends BaseComponen
|
|
|
277
277
|
* Combine pagination and table paging processing functions
|
|
278
278
|
*/
|
|
279
279
|
mergePagination: (pagination: TablePaginationProps) => {
|
|
280
|
-
position?: "
|
|
280
|
+
position?: "top" | "bottom" | "both";
|
|
281
281
|
formatPageText?: import("./interface").FormatPageText;
|
|
282
282
|
style?: React.CSSProperties;
|
|
283
283
|
className?: string;
|
package/lib/es/tabs/TabBar.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ declare class TabBar extends React.Component<TabBarProps, TabBarState> {
|
|
|
32
32
|
renderTabComponents: (list: Array<PlainTab>) => Array<ReactNode>;
|
|
33
33
|
handleArrowClick: (items: Array<OverflowItem>, pos: 'start' | 'end') => void;
|
|
34
34
|
renderCollapse: (items: Array<OverflowItem>, icon: ReactNode, pos: 'start' | 'end') => ReactNode;
|
|
35
|
-
renderOverflow: (items: [
|
|
35
|
+
renderOverflow: (items: any[]) => Array<ReactNode>;
|
|
36
36
|
renderCollapsedTab: () => ReactNode;
|
|
37
37
|
render(): ReactNode;
|
|
38
38
|
private _isActive;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-ui",
|
|
3
|
-
"version": "2.0.9-alpha.
|
|
3
|
+
"version": "2.0.9-alpha.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/es/index.js",
|
|
6
6
|
"module": "lib/es/index.js",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
],
|
|
66
66
|
"author": "",
|
|
67
67
|
"license": "MIT",
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "aea759b0e8ce303ec7bcab52ea8950da257f611a",
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@babel/plugin-proposal-decorators": "^7.15.8",
|
|
71
71
|
"@babel/plugin-transform-runtime": "^7.15.8",
|