@douyinfe/semi-ui 2.20.0-beta.1 → 2.20.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/dist/css/semi.css +11 -0
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +88 -127
- 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/cjs/anchor/index.d.ts +1 -1
- package/lib/cjs/backtop/index.js +4 -1
- package/lib/cjs/breadcrumb/index.d.ts +1 -1
- package/lib/cjs/breadcrumb/item.d.ts +1 -1
- package/lib/cjs/button/buttonGroup.js +3 -1
- package/lib/cjs/button/index.d.ts +4 -4
- package/lib/cjs/calendar/index.d.ts +1 -1
- package/lib/cjs/calendar/interface.d.ts +3 -3
- package/lib/cjs/card/index.d.ts +2 -2
- package/lib/cjs/cascader/index.d.ts +2 -2
- package/lib/cjs/checkbox/index.d.ts +3 -2
- package/lib/cjs/collapse/index.d.ts +2 -2
- package/lib/cjs/datePicker/index.d.ts +7 -7
- package/lib/cjs/descriptions/index.d.ts +1 -1
- package/lib/cjs/dropdown/dropdownItem.d.ts +3 -2
- package/lib/cjs/dropdown/index.d.ts +4 -4
- package/lib/cjs/form/arrayField.d.ts +1 -1
- package/lib/cjs/form/group.js +47 -6
- package/lib/cjs/form/index.d.ts +6 -6
- package/lib/cjs/grid/index.d.ts +2 -2
- package/lib/cjs/icons/index.d.ts +1 -1
- package/lib/cjs/input/index.d.ts +2 -2
- package/lib/cjs/layout/index.d.ts +1 -1
- package/lib/cjs/list/index.d.ts +1 -1
- package/lib/cjs/modal/Modal.d.ts +1 -1
- package/lib/cjs/modal/index.d.ts +2 -2
- package/lib/cjs/navigation/index.d.ts +7 -7
- package/lib/cjs/notification/index.d.ts +2 -2
- package/lib/cjs/overflowList/index.d.ts +1 -1
- package/lib/cjs/pagination/index.d.ts +1 -1
- package/lib/cjs/popover/index.d.ts +2 -1
- package/lib/cjs/radio/index.d.ts +3 -3
- package/lib/cjs/radio/radio.d.ts +1 -1
- package/lib/cjs/rating/index.d.ts +1 -1
- package/lib/cjs/scrollList/index.d.ts +1 -1
- package/lib/cjs/select/index.d.ts +3 -3
- package/lib/cjs/sideSheet/index.d.ts +3 -3
- package/lib/cjs/skeleton/index.d.ts +1 -1
- package/lib/cjs/slider/index.d.ts +1 -1
- package/lib/cjs/steps/index.d.ts +7 -7
- package/lib/cjs/table/Table.js +1 -1
- package/lib/cjs/timePicker/index.d.ts +5 -5
- package/lib/cjs/timeline/index.d.ts +1 -1
- package/lib/cjs/toast/index.d.ts +2 -2
- package/lib/cjs/tooltip/index.d.ts +2 -2
- package/lib/cjs/tree/index.d.ts +1 -1
- package/lib/cjs/tree/index.js +13 -1
- package/lib/cjs/typography/index.d.ts +5 -5
- package/lib/cjs/upload/index.d.ts +4 -2
- package/lib/es/anchor/index.d.ts +1 -1
- package/lib/es/backtop/index.js +4 -1
- package/lib/es/breadcrumb/index.d.ts +1 -1
- package/lib/es/breadcrumb/item.d.ts +1 -1
- package/lib/es/button/buttonGroup.js +3 -1
- package/lib/es/button/index.d.ts +4 -4
- package/lib/es/calendar/index.d.ts +1 -1
- package/lib/es/calendar/interface.d.ts +3 -3
- package/lib/es/card/index.d.ts +2 -2
- package/lib/es/cascader/index.d.ts +2 -2
- package/lib/es/checkbox/index.d.ts +3 -2
- package/lib/es/collapse/index.d.ts +2 -2
- package/lib/es/datePicker/index.d.ts +7 -7
- package/lib/es/descriptions/index.d.ts +1 -1
- package/lib/es/dropdown/dropdownItem.d.ts +3 -2
- package/lib/es/dropdown/index.d.ts +4 -4
- package/lib/es/form/arrayField.d.ts +1 -1
- package/lib/es/form/group.js +43 -6
- package/lib/es/form/index.d.ts +6 -6
- package/lib/es/grid/index.d.ts +2 -2
- package/lib/es/icons/index.d.ts +1 -1
- package/lib/es/input/index.d.ts +2 -2
- package/lib/es/layout/index.d.ts +1 -1
- package/lib/es/list/index.d.ts +1 -1
- package/lib/es/modal/Modal.d.ts +1 -1
- package/lib/es/modal/index.d.ts +2 -2
- package/lib/es/navigation/index.d.ts +7 -7
- package/lib/es/notification/index.d.ts +2 -2
- package/lib/es/overflowList/index.d.ts +1 -1
- package/lib/es/pagination/index.d.ts +1 -1
- package/lib/es/popover/index.d.ts +2 -1
- package/lib/es/radio/index.d.ts +3 -3
- package/lib/es/radio/radio.d.ts +1 -1
- package/lib/es/rating/index.d.ts +1 -1
- package/lib/es/scrollList/index.d.ts +1 -1
- package/lib/es/select/index.d.ts +3 -3
- package/lib/es/sideSheet/index.d.ts +3 -3
- package/lib/es/skeleton/index.d.ts +1 -1
- package/lib/es/slider/index.d.ts +1 -1
- package/lib/es/steps/index.d.ts +7 -7
- package/lib/es/table/Table.js +1 -1
- package/lib/es/timePicker/index.d.ts +5 -5
- package/lib/es/timeline/index.d.ts +1 -1
- package/lib/es/toast/index.d.ts +2 -2
- package/lib/es/tooltip/index.d.ts +2 -2
- package/lib/es/tree/index.d.ts +1 -1
- package/lib/es/tree/index.js +13 -1
- package/lib/es/typography/index.d.ts +5 -5
- package/lib/es/upload/index.d.ts +4 -2
- package/package.json +7 -7
|
@@ -7,7 +7,7 @@ import Link from './link';
|
|
|
7
7
|
import '@douyinfe/semi-foundation/lib/cjs/anchor/anchor.css';
|
|
8
8
|
import { ArrayElement } from '../_base/base';
|
|
9
9
|
import { ContextValue } from '../configProvider/context';
|
|
10
|
-
export { LinkProps } from './link';
|
|
10
|
+
export type { LinkProps } from './link';
|
|
11
11
|
export interface AnchorProps {
|
|
12
12
|
autoCollapse?: boolean;
|
|
13
13
|
className?: string;
|
package/lib/cjs/backtop/index.js
CHANGED
|
@@ -109,7 +109,10 @@ class BackTop extends _baseComponent.default {
|
|
|
109
109
|
} = this.state;
|
|
110
110
|
const preCls = (0, _classnames.default)(prefixCls, className);
|
|
111
111
|
const backtopBtn = children ? children : this.renderDefault();
|
|
112
|
-
const content = visible ?
|
|
112
|
+
const content = visible ?
|
|
113
|
+
/*#__PURE__*/
|
|
114
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
115
|
+
_react.default.createElement("div", Object.assign({}, others, {
|
|
113
116
|
className: preCls,
|
|
114
117
|
style: style,
|
|
115
118
|
onClick: e => this.handleClick(e),
|
|
@@ -7,7 +7,7 @@ import BaseComponent, { BaseProps } from '../_base/baseComponent';
|
|
|
7
7
|
import BreadcrumbItem, { RouteProps, BreadcrumbItemInfo } from './item';
|
|
8
8
|
import { BreadContextType } from './bread-context';
|
|
9
9
|
import { TooltipProps } from '../tooltip';
|
|
10
|
-
export { RouteProps, BreadcrumbItemProps, BreadcrumbItemInfo } from './item';
|
|
10
|
+
export type { RouteProps, BreadcrumbItemProps, BreadcrumbItemInfo } from './item';
|
|
11
11
|
export interface showToolTipProps {
|
|
12
12
|
width?: string | number;
|
|
13
13
|
ellipsisPos?: 'end' | 'middle';
|
|
@@ -4,7 +4,7 @@ import { BreadcrumbItemAdapter, BreadcrumbItemInfo, Route } from '@douyinfe/semi
|
|
|
4
4
|
import BaseComponent, { BaseProps } from '../_base/baseComponent';
|
|
5
5
|
import { noop } from '@douyinfe/semi-foundation/lib/cjs/utils/function';
|
|
6
6
|
import { BreadContextType } from './bread-context';
|
|
7
|
-
export { BreadcrumbItemInfo };
|
|
7
|
+
export type { BreadcrumbItemInfo };
|
|
8
8
|
export interface RouteProps extends Route {
|
|
9
9
|
icon?: React.ReactNode;
|
|
10
10
|
}
|
|
@@ -83,9 +83,10 @@ class ButtonGroup extends _baseComponent.default {
|
|
|
83
83
|
size,
|
|
84
84
|
type,
|
|
85
85
|
className,
|
|
86
|
+
style,
|
|
86
87
|
'aria-label': ariaLabel
|
|
87
88
|
} = _a,
|
|
88
|
-
rest = __rest(_a, ["children", "disabled", "size", "type", "className", 'aria-label']);
|
|
89
|
+
rest = __rest(_a, ["children", "disabled", "size", "type", "className", "style", 'aria-label']);
|
|
89
90
|
|
|
90
91
|
let inner;
|
|
91
92
|
let innerWithLine = [];
|
|
@@ -104,6 +105,7 @@ class ButtonGroup extends _baseComponent.default {
|
|
|
104
105
|
|
|
105
106
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
106
107
|
className: cls,
|
|
108
|
+
style: style,
|
|
107
109
|
role: "group",
|
|
108
110
|
"aria-label": ariaLabel
|
|
109
111
|
}, innerWithLine);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IconButtonProps } from '../iconButton';
|
|
3
|
-
export { ButtonProps as BaseButtonProps, HtmlType, Size, Theme, Type } from './Button';
|
|
4
|
-
export { HorizontalPaddingType } from '../iconButton';
|
|
5
|
-
export { ButtonGroupProps } from './buttonGroup';
|
|
6
|
-
export { SplitButtonGroupProps } from './splitButtonGroup';
|
|
3
|
+
export type { ButtonProps as BaseButtonProps, HtmlType, Size, Theme, Type } from './Button';
|
|
4
|
+
export type { HorizontalPaddingType } from '../iconButton';
|
|
5
|
+
export type { ButtonGroupProps } from './buttonGroup';
|
|
6
|
+
export type { SplitButtonGroupProps } from './splitButtonGroup';
|
|
7
7
|
export interface ButtonProps extends IconButtonProps {
|
|
8
8
|
}
|
|
9
9
|
declare class Button extends React.PureComponent<ButtonProps> {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { EventObject, weeekStartsOnEnum } from '@douyinfe/semi-foundation/lib/cjs/calendar/foundation';
|
|
3
2
|
import { strings } from '@douyinfe/semi-foundation/lib/cjs/calendar/constants';
|
|
4
|
-
import { ArrayElement } from '../_base/base';
|
|
5
|
-
import { BaseProps } from '../_base/baseComponent';
|
|
3
|
+
import type { ArrayElement } from '../_base/base';
|
|
4
|
+
import type { BaseProps } from '../_base/baseComponent';
|
|
5
|
+
import type { EventObject, weeekStartsOnEnum } from '@douyinfe/semi-foundation/lib/cjs/calendar/foundation';
|
|
6
6
|
export interface CalendarProps extends BaseProps {
|
|
7
7
|
displayValue?: Date;
|
|
8
8
|
range?: Date[];
|
package/lib/cjs/card/index.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import '@douyinfe/semi-foundation/lib/cjs/card/card.css';
|
|
4
4
|
import Meta from './meta';
|
|
5
5
|
export declare type Shadows = 'hover' | 'always';
|
|
6
|
-
export { MetaProps } from './meta';
|
|
7
|
-
export { CardGroupProps } from './cardGroup';
|
|
6
|
+
export type { MetaProps } from './meta';
|
|
7
|
+
export type { CardGroupProps } from './cardGroup';
|
|
8
8
|
export interface CardProps {
|
|
9
9
|
/** Operation group at the bottom of the card content area */
|
|
10
10
|
actions?: ReactNode[];
|
|
@@ -9,8 +9,8 @@ import { PopoverProps } from '../popover/index';
|
|
|
9
9
|
import { CascaderData, Entities, Entity, Data } from './item';
|
|
10
10
|
import { Motion } from '../_base/base';
|
|
11
11
|
import { Position } from '../tooltip/index';
|
|
12
|
-
export { CascaderType, ShowNextType } from '@douyinfe/semi-foundation/lib/cjs/cascader/foundation';
|
|
13
|
-
export { CascaderData, Entity, Data, CascaderItemProps } from './item';
|
|
12
|
+
export type { CascaderType, ShowNextType } from '@douyinfe/semi-foundation/lib/cjs/cascader/foundation';
|
|
13
|
+
export type { CascaderData, Entity, Data, CascaderItemProps } from './item';
|
|
14
14
|
export interface ScrollPanelProps extends BasicScrollPanelProps {
|
|
15
15
|
activeNode: CascaderData;
|
|
16
16
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import Checkbox, { CheckboxProps, CheckboxEvent } from './checkbox';
|
|
2
2
|
import Group, { CheckboxGroupProps, CheckboxType, CheckboxDirection } from './checkboxGroup';
|
|
3
|
-
export { CheckboxInnerProps } from './checkboxInner';
|
|
3
|
+
export type { CheckboxInnerProps } from './checkboxInner';
|
|
4
4
|
declare class CheckboxWithGroup extends Checkbox {
|
|
5
5
|
static Group: typeof Group;
|
|
6
6
|
}
|
|
7
|
-
export { CheckboxWithGroup, Checkbox,
|
|
7
|
+
export { CheckboxWithGroup, Checkbox, };
|
|
8
|
+
export type { CheckboxProps, CheckboxGroupProps, CheckboxEvent, CheckboxType, CheckboxDirection };
|
|
8
9
|
export default CheckboxWithGroup;
|
|
@@ -5,7 +5,7 @@ import BaseComponent from '../_base/baseComponent';
|
|
|
5
5
|
import CollapsePanel from './item';
|
|
6
6
|
import '@douyinfe/semi-foundation/lib/cjs/collapse/collapse.css';
|
|
7
7
|
import { noop } from '@douyinfe/semi-foundation/lib/cjs/utils/function';
|
|
8
|
-
export { CollapsePanelProps } from './item';
|
|
8
|
+
export type { CollapsePanelProps } from './item';
|
|
9
9
|
export interface CollapseReactProps extends CollapseProps {
|
|
10
10
|
expandIcon?: React.ReactNode;
|
|
11
11
|
collapseIcon?: React.ReactNode;
|
|
@@ -13,7 +13,7 @@ export interface CollapseReactProps extends CollapseProps {
|
|
|
13
13
|
style?: CSSProperties;
|
|
14
14
|
onChange?: (activeKey: CollapseProps['activeKey'], e: React.MouseEvent) => void;
|
|
15
15
|
}
|
|
16
|
-
export { CollapseState };
|
|
16
|
+
export type { CollapseState };
|
|
17
17
|
declare class Collapse extends BaseComponent<CollapseReactProps, CollapseState> {
|
|
18
18
|
static Panel: typeof CollapsePanel;
|
|
19
19
|
static propTypes: {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import DatePicker, { DatePickerProps } from './datePicker';
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
3
|
+
export type { BaseValueType, DayStatusType, DisabledDateOptions, DisabledDateType, DisabledTimeType, InputSize, Position, PresetType, PresetsType, TriggerRenderProps, ValidateStatus, ValueType, } from '@douyinfe/semi-foundation/lib/cjs/datePicker/foundation';
|
|
4
|
+
export type { DateInputProps } from './dateInput';
|
|
5
|
+
export type { DatePickerProps } from './datePicker';
|
|
6
|
+
export type { MonthProps } from './month';
|
|
7
|
+
export type { MonthsGridProps } from './monthsGrid';
|
|
8
|
+
export type { QuickControlProps } from './quickControl';
|
|
9
|
+
export type { YearAndMonthProps } from './yearAndMonth';
|
|
9
10
|
declare const _default: React.ForwardRefExoticComponent<DatePickerProps & React.RefAttributes<DatePicker>>;
|
|
10
11
|
export default _default;
|
|
11
|
-
export { BaseValueType, DayStatusType, DisabledDateOptions, DisabledDateType, DisabledTimeType, InputSize, Position, PresetType, PresetsType, TriggerRenderProps, ValidateStatus, ValueType, } from '@douyinfe/semi-foundation/lib/cjs/datePicker/foundation';
|
|
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import '@douyinfe/semi-foundation/lib/cjs/descriptions/descriptions.css';
|
|
4
4
|
import { DescriptionsAlign, DescriptionsContextValue } from './descriptions-context';
|
|
5
5
|
import Item from './item';
|
|
6
|
-
export { DescriptionsItemProps } from './item';
|
|
6
|
+
export type { DescriptionsItemProps } from './item';
|
|
7
7
|
export declare type DescriptionsSize = 'small' | 'medium' | 'large';
|
|
8
8
|
export interface Data {
|
|
9
9
|
key?: React.ReactNode;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import BaseComponent from '../_base/baseComponent';
|
|
4
|
+
import type { BaseProps } from '../_base/baseComponent';
|
|
5
|
+
import type { DropdownContextType } from './context';
|
|
5
6
|
export declare type Type = 'primary' | 'secondary' | 'tertiary' | 'warning' | 'danger';
|
|
6
7
|
export interface DropdownItemProps extends BaseProps {
|
|
7
8
|
disabled?: boolean;
|
|
@@ -9,10 +9,10 @@ import DropdownTitle, { DropdownTitleProps } from './dropdownTitle';
|
|
|
9
9
|
import { DropdownContextType } from './context';
|
|
10
10
|
import '@douyinfe/semi-foundation/lib/cjs/dropdown/dropdown.css';
|
|
11
11
|
import { Motion } from '../_base/base';
|
|
12
|
-
export { DropdownDividerProps } from './dropdownDivider';
|
|
13
|
-
export { DropdownItemProps, Type } from './dropdownItem';
|
|
14
|
-
export { DropdownMenuProps } from './dropdownMenu';
|
|
15
|
-
export { DropdownTitleProps } from './dropdownTitle';
|
|
12
|
+
export type { DropdownDividerProps } from './dropdownDivider';
|
|
13
|
+
export type { DropdownItemProps, Type } from './dropdownItem';
|
|
14
|
+
export type { DropdownMenuProps } from './dropdownMenu';
|
|
15
|
+
export type { DropdownTitleProps } from './dropdownTitle';
|
|
16
16
|
export interface DropDownMenuItemItem extends DropdownItemProps {
|
|
17
17
|
node: 'item';
|
|
18
18
|
name?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
-
import { FormUpdaterContextType } from '@douyinfe/semi-foundation/lib/cjs/form/interface';
|
|
2
|
+
import type { FormUpdaterContextType } from '@douyinfe/semi-foundation/lib/cjs/form/interface';
|
|
3
3
|
export interface ArrayFieldProps {
|
|
4
4
|
initValue?: any[];
|
|
5
5
|
field?: string;
|
package/lib/cjs/form/group.js
CHANGED
|
@@ -27,6 +27,8 @@ var _index = require("./hooks/index");
|
|
|
27
27
|
|
|
28
28
|
var _inputGroup = _interopRequireDefault(require("../input/inputGroup"));
|
|
29
29
|
|
|
30
|
+
var _index2 = require("../grid/index");
|
|
31
|
+
|
|
30
32
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
31
33
|
|
|
32
34
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -95,7 +97,7 @@ class FormInputGroup extends _react.Component {
|
|
|
95
97
|
rest = __rest(_a, ["children", "label"]);
|
|
96
98
|
|
|
97
99
|
const updater = this.context;
|
|
98
|
-
const formProps = updater.getFormProps(['labelPosition', 'labelWidth', 'labelAlign', 'showValidateIcon']);
|
|
100
|
+
const formProps = updater.getFormProps(['labelPosition', 'labelWidth', 'labelAlign', 'showValidateIcon', 'wrapperCol', 'labelCol']);
|
|
99
101
|
const labelPosition = this.props.labelPosition || formProps.labelPosition;
|
|
100
102
|
const groupFieldSet = [];
|
|
101
103
|
|
|
@@ -115,14 +117,53 @@ class FormInputGroup extends _react.Component {
|
|
|
115
117
|
const groupCls = (0, _classnames.default)({
|
|
116
118
|
["".concat(prefix, "-field-group")]: true
|
|
117
119
|
});
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
120
|
+
const labelCol = formProps.labelCol;
|
|
121
|
+
const wrapperCol = formProps.wrapperCol;
|
|
122
|
+
const labelAlign = formProps.labelAlign;
|
|
123
|
+
const appendCol = labelCol && wrapperCol;
|
|
124
|
+
const labelColCls = labelCol ? "".concat(prefix, "-col-").concat(labelAlign) : '';
|
|
125
|
+
const labelContent = this.renderLabel(label, formProps);
|
|
126
|
+
|
|
127
|
+
const inputGroupContent = /*#__PURE__*/_react.default.createElement(_inputGroup.default, Object.assign({}, rest), inner);
|
|
128
|
+
|
|
129
|
+
const groupErrorContent = /*#__PURE__*/_react.default.createElement(GroupError, {
|
|
122
130
|
fieldSet: groupFieldSet,
|
|
123
131
|
showValidateIcon: formProps.showValidateIcon,
|
|
124
132
|
isInInputGroup: true
|
|
125
|
-
})
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
let content;
|
|
136
|
+
|
|
137
|
+
switch (true) {
|
|
138
|
+
case !appendCol:
|
|
139
|
+
content = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, labelContent, /*#__PURE__*/_react.default.createElement("div", null, inputGroupContent, groupErrorContent));
|
|
140
|
+
break;
|
|
141
|
+
|
|
142
|
+
case appendCol && labelPosition === 'top':
|
|
143
|
+
// When labelPosition is top, you need to add an overflow hidden div to the label, otherwise it will be arranged horizontally
|
|
144
|
+
content = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
145
|
+
style: {
|
|
146
|
+
overflow: 'hidden'
|
|
147
|
+
}
|
|
148
|
+
}, /*#__PURE__*/_react.default.createElement(_index2.Col, Object.assign({}, labelCol, {
|
|
149
|
+
className: labelColCls
|
|
150
|
+
}), labelContent)), /*#__PURE__*/_react.default.createElement(_index2.Col, Object.assign({}, wrapperCol), inputGroupContent, groupErrorContent));
|
|
151
|
+
break;
|
|
152
|
+
|
|
153
|
+
case appendCol && labelPosition !== 'top':
|
|
154
|
+
content = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_index2.Col, Object.assign({}, labelCol, {
|
|
155
|
+
className: labelColCls
|
|
156
|
+
}), labelContent), /*#__PURE__*/_react.default.createElement(_index2.Col, Object.assign({}, wrapperCol), inputGroupContent, groupErrorContent));
|
|
157
|
+
break;
|
|
158
|
+
|
|
159
|
+
default:
|
|
160
|
+
break;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
164
|
+
"x-label-pos": labelPosition,
|
|
165
|
+
className: groupCls
|
|
166
|
+
}, content);
|
|
126
167
|
}
|
|
127
168
|
|
|
128
169
|
}
|
package/lib/cjs/form/index.d.ts
CHANGED
|
@@ -13,9 +13,9 @@ import withFormState from './hoc/withFormState';
|
|
|
13
13
|
import withFormApi from './hoc/withFormApi';
|
|
14
14
|
export { Form, ArrayField, withField, useFormApi, useFormState, useFieldApi, useFieldState, withFormState, withFormApi };
|
|
15
15
|
export * from './interface';
|
|
16
|
-
export { ArrayFieldProps } from './arrayField';
|
|
17
|
-
export { ReactFieldError, ErrorMessageProps } from './errorMessage';
|
|
18
|
-
export { InputGroupProps } from './group';
|
|
19
|
-
export { LabelProps } from './label';
|
|
20
|
-
export { SectionProps } from './section';
|
|
21
|
-
export { SlotProps } from './slot';
|
|
16
|
+
export type { ArrayFieldProps } from './arrayField';
|
|
17
|
+
export type { ReactFieldError, ErrorMessageProps } from './errorMessage';
|
|
18
|
+
export type { InputGroupProps } from './group';
|
|
19
|
+
export type { LabelProps } from './label';
|
|
20
|
+
export type { SectionProps } from './section';
|
|
21
|
+
export type { SlotProps } from './slot';
|
package/lib/cjs/grid/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Row from './row';
|
|
2
2
|
import Col from './col';
|
|
3
3
|
export { Row, Col };
|
|
4
|
-
export { ColSize, ColProps } from './col';
|
|
5
|
-
export { Breakpoint, Gutter, RowProps } from './row';
|
|
4
|
+
export type { ColSize, ColProps } from './col';
|
|
5
|
+
export type { Breakpoint, Gutter, RowProps } from './row';
|
package/lib/cjs/icons/index.d.ts
CHANGED
package/lib/cjs/input/index.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import InputFoundation from '@douyinfe/semi-foundation/lib/cjs/input/foundation';
|
|
4
4
|
import BaseComponent from '../_base/baseComponent';
|
|
5
5
|
import '@douyinfe/semi-foundation/lib/cjs/input/input.css';
|
|
6
|
-
export { InputGroupProps } from './inputGroup';
|
|
7
|
-
export { TextAreaProps } from './textarea';
|
|
6
|
+
export type { InputGroupProps } from './inputGroup';
|
|
7
|
+
export type { TextAreaProps } from './textarea';
|
|
8
8
|
export declare type InputSize = 'small' | 'large' | 'default';
|
|
9
9
|
export declare type InputMode = 'password';
|
|
10
10
|
export declare type ValidateStatus = "default" | "error" | "warning" | "success";
|
|
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import '@douyinfe/semi-foundation/lib/cjs/layout/layout.css';
|
|
4
4
|
import { ContextType } from './layout-context';
|
|
5
5
|
import Sider from './Sider';
|
|
6
|
-
export { ResponsiveMap, SiderProps } from './Sider';
|
|
6
|
+
export type { ResponsiveMap, SiderProps } from './Sider';
|
|
7
7
|
export interface BasicProps {
|
|
8
8
|
prefixCls?: string;
|
|
9
9
|
style?: CSSProperties;
|
package/lib/cjs/list/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import '@douyinfe/semi-foundation/lib/cjs/list/list.css';
|
|
|
4
4
|
import ListItem from './item';
|
|
5
5
|
import { Grid } from './list-context';
|
|
6
6
|
import BaseComponent from '../_base/baseComponent';
|
|
7
|
-
export { ListItemProps } from './item';
|
|
7
|
+
export type { ListItemProps } from './item';
|
|
8
8
|
export interface ListProps<T> {
|
|
9
9
|
style?: React.CSSProperties;
|
|
10
10
|
className?: string;
|
package/lib/cjs/modal/Modal.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { ButtonProps } from '../button/Button';
|
|
|
8
8
|
export declare const destroyFns: any[];
|
|
9
9
|
export declare type ConfirmType = 'leftTop' | 'leftBottom' | 'rightTop' | 'rightBottom';
|
|
10
10
|
export declare type Directions = 'ltr' | 'rtl';
|
|
11
|
+
export type { ModalState };
|
|
11
12
|
export interface ModalReactProps extends ModalProps {
|
|
12
13
|
cancelButtonProps?: ButtonProps;
|
|
13
14
|
children?: React.ReactNode;
|
|
@@ -24,7 +25,6 @@ export interface ModalReactProps extends ModalProps {
|
|
|
24
25
|
onCancel?: (e: React.MouseEvent) => void | Promise<any>;
|
|
25
26
|
onOk?: (e: React.MouseEvent) => void | Promise<any>;
|
|
26
27
|
}
|
|
27
|
-
export { ModalState };
|
|
28
28
|
declare class Modal extends BaseComponent<ModalReactProps, ModalState> {
|
|
29
29
|
static propTypes: {
|
|
30
30
|
mask: PropTypes.Requireable<boolean>;
|
package/lib/cjs/modal/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import '@douyinfe/semi-foundation/lib/cjs/modal/modal.css';
|
|
|
2
2
|
import { ModalState } from '@douyinfe/semi-foundation/lib/cjs/modal/modalFoundation';
|
|
3
3
|
import Modal from './Modal';
|
|
4
4
|
import { ModalReactProps } from './Modal';
|
|
5
|
-
export { ConfirmProps } from './confirm';
|
|
5
|
+
export type { ConfirmProps } from './confirm';
|
|
6
6
|
export declare type Directions = 'ltr' | 'rtl';
|
|
7
|
-
export { ModalReactProps, ModalState };
|
|
7
|
+
export type { ModalReactProps, ModalState };
|
|
8
8
|
export default Modal;
|
|
@@ -8,13 +8,13 @@ import Footer, { NavFooterProps } from './Footer';
|
|
|
8
8
|
import Header, { NavHeaderProps } from './Header';
|
|
9
9
|
import '@douyinfe/semi-foundation/lib/cjs/navigation/navigation.css';
|
|
10
10
|
import { Motion } from '../_base/base';
|
|
11
|
-
export { CollapseButtonProps } from './CollapseButton';
|
|
12
|
-
export { NavFooterProps } from './Footer';
|
|
13
|
-
export { NavHeaderProps } from './Header';
|
|
14
|
-
export { NavItemProps } from './Item';
|
|
15
|
-
export { OpenIconTransitionProps } from './OpenIconTransition';
|
|
16
|
-
export { ToggleIcon, SubNavProps } from './SubNav';
|
|
17
|
-
export { SubNavTransitionProps } from './SubNavTransition';
|
|
11
|
+
export type { CollapseButtonProps } from './CollapseButton';
|
|
12
|
+
export type { NavFooterProps } from './Footer';
|
|
13
|
+
export type { NavHeaderProps } from './Header';
|
|
14
|
+
export type { NavItemProps } from './Item';
|
|
15
|
+
export type { OpenIconTransitionProps } from './OpenIconTransition';
|
|
16
|
+
export type { ToggleIcon, SubNavProps } from './SubNav';
|
|
17
|
+
export type { SubNavTransitionProps } from './SubNavTransition';
|
|
18
18
|
export declare type Mode = 'vertical' | 'horizontal';
|
|
19
19
|
export interface OnSelectedData {
|
|
20
20
|
itemKey: React.ReactText;
|
|
@@ -6,11 +6,11 @@ import BaseComponent from '../_base/baseComponent';
|
|
|
6
6
|
import '@douyinfe/semi-foundation/lib/cjs/notification/notification.css';
|
|
7
7
|
import useNotification from './useNotification';
|
|
8
8
|
import { NoticeInstance, NoticePosition, NoticeProps, NoticeState } from '@douyinfe/semi-foundation/lib/cjs/notification/notificationFoundation';
|
|
9
|
-
export { NoticeTransitionProps } from './NoticeTransition';
|
|
9
|
+
export type { NoticeTransitionProps } from './NoticeTransition';
|
|
10
10
|
export interface NoticeReactProps extends NoticeProps {
|
|
11
11
|
style?: CSSProperties;
|
|
12
12
|
}
|
|
13
|
-
export { NoticeState, NotificationListProps, NotificationListState, ConfigProps };
|
|
13
|
+
export type { NoticeState, NotificationListProps, NotificationListState, ConfigProps };
|
|
14
14
|
export declare type NoticesInPosition = {
|
|
15
15
|
top: NoticeInstance[];
|
|
16
16
|
topLeft: NoticeInstance[];
|
|
@@ -9,7 +9,7 @@ declare const OverflowDirection: {
|
|
|
9
9
|
GROW: number;
|
|
10
10
|
SHRINK: number;
|
|
11
11
|
};
|
|
12
|
-
export { ReactIntersectionObserverProps } from './intersectionObserver';
|
|
12
|
+
export type { ReactIntersectionObserverProps } from './intersectionObserver';
|
|
13
13
|
export declare type OverflowItem = Record<string, any>;
|
|
14
14
|
export interface OverflowListProps {
|
|
15
15
|
className?: string;
|
|
@@ -42,7 +42,7 @@ export interface PaginationState {
|
|
|
42
42
|
}
|
|
43
43
|
export declare type PaginationLocale = Locale['Pagination'];
|
|
44
44
|
export declare type PopoverPosition = Position;
|
|
45
|
-
export { PageList };
|
|
45
|
+
export type { PageList };
|
|
46
46
|
export default class Pagination extends BaseComponent<PaginationProps, PaginationState> {
|
|
47
47
|
static contextType: React.Context<ContextValue>;
|
|
48
48
|
static propTypes: {
|
|
@@ -5,7 +5,8 @@ import { ArrowBounding, Position, TooltipProps, Trigger, RenderContentProps } fr
|
|
|
5
5
|
import '@douyinfe/semi-foundation/lib/cjs/popover/popover.css';
|
|
6
6
|
import { BaseProps } from '../_base/baseComponent';
|
|
7
7
|
import { Motion } from '../_base/base';
|
|
8
|
-
|
|
8
|
+
import type { ArrowProps } from './Arrow';
|
|
9
|
+
export type { ArrowProps };
|
|
9
10
|
declare interface ArrowStyle {
|
|
10
11
|
borderColor?: string;
|
|
11
12
|
backgroundColor?: string;
|
package/lib/cjs/radio/index.d.ts
CHANGED
|
@@ -5,6 +5,6 @@ declare class RadioWithGroup extends Radio {
|
|
|
5
5
|
}
|
|
6
6
|
export default RadioWithGroup;
|
|
7
7
|
export { RadioWithGroup, Radio };
|
|
8
|
-
export { RadioInnerMode, RadioInnerProps } from './radioInner';
|
|
9
|
-
export { RadioGroupProps, OptionItem } from './radioGroup';
|
|
10
|
-
export { RadioDisplayMode, RadioType, RadioProps, RadioChangeEvent } from './radio';
|
|
8
|
+
export type { RadioInnerMode, RadioInnerProps } from './radioInner';
|
|
9
|
+
export type { RadioGroupProps, OptionItem } from './radioGroup';
|
|
10
|
+
export type { RadioDisplayMode, RadioType, RadioProps, RadioChangeEvent } from './radio';
|
package/lib/cjs/radio/radio.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ export interface RadioState {
|
|
|
41
41
|
focusVisible?: boolean;
|
|
42
42
|
checked?: boolean;
|
|
43
43
|
}
|
|
44
|
-
export { RadioChangeEvent };
|
|
44
|
+
export type { RadioChangeEvent };
|
|
45
45
|
declare class Radio extends BaseComponent<RadioProps, RadioState> {
|
|
46
46
|
static contextType: React.Context<RadioContextValue>;
|
|
47
47
|
static propTypes: {
|
|
@@ -5,7 +5,7 @@ import { noop } from '@douyinfe/semi-foundation/lib/cjs/utils/function';
|
|
|
5
5
|
import Item from './item';
|
|
6
6
|
import RatingFoundation, { RatingAdapter } from '@douyinfe/semi-foundation/lib/cjs/rating/foundation';
|
|
7
7
|
import '@douyinfe/semi-foundation/lib/cjs/rating/rating.css';
|
|
8
|
-
export { RatingItemProps } from './item';
|
|
8
|
+
export type { RatingItemProps } from './item';
|
|
9
9
|
export interface RatingProps {
|
|
10
10
|
'aria-describedby'?: string;
|
|
11
11
|
'aria-errormessage'?: string;
|
|
@@ -3,7 +3,7 @@ import BaseComponent, { BaseProps } from '../_base/baseComponent';
|
|
|
3
3
|
import propTypes from 'prop-types';
|
|
4
4
|
import ScrollItem from './scrollItem';
|
|
5
5
|
import '@douyinfe/semi-foundation/lib/cjs/scrollList/scrollList.css';
|
|
6
|
-
export { ScrollItemProps } from './scrollItem';
|
|
6
|
+
export type { ScrollItemProps } from './scrollItem';
|
|
7
7
|
export interface ScrollListProps extends BaseProps {
|
|
8
8
|
header?: React.ReactNode;
|
|
9
9
|
footer?: React.ReactNode;
|
|
@@ -9,9 +9,9 @@ import OptionGroup from './optionGroup';
|
|
|
9
9
|
import { Subtract } from 'utility-types';
|
|
10
10
|
import '@douyinfe/semi-foundation/lib/cjs/select/select.css';
|
|
11
11
|
import { Position, TooltipProps } from '../tooltip';
|
|
12
|
-
export { OptionProps } from './option';
|
|
13
|
-
export { OptionGroupProps } from './optionGroup';
|
|
14
|
-
export { VirtualRowProps } from './virtualRow';
|
|
12
|
+
export type { OptionProps } from './option';
|
|
13
|
+
export type { OptionGroupProps } from './optionGroup';
|
|
14
|
+
export type { VirtualRowProps } from './virtualRow';
|
|
15
15
|
declare type ExcludeInputType = {
|
|
16
16
|
value?: InputProps['value'];
|
|
17
17
|
onFocus?: InputProps['onFocus'];
|
|
@@ -4,8 +4,8 @@ import PropTypes from 'prop-types';
|
|
|
4
4
|
import { ContextValue } from '../configProvider/context';
|
|
5
5
|
import { SideSheetAdapter, SideSheetProps, SideSheetState } from '@douyinfe/semi-foundation/lib/cjs/sideSheet/sideSheetFoundation';
|
|
6
6
|
import '@douyinfe/semi-foundation/lib/cjs/sideSheet/sideSheet.css';
|
|
7
|
-
export { SideSheetContentProps } from './SideSheetContent';
|
|
8
|
-
export { SideSheetTransitionProps } from './SideSheetTransition';
|
|
7
|
+
export type { SideSheetContentProps } from './SideSheetContent';
|
|
8
|
+
export type { SideSheetTransitionProps } from './SideSheetTransition';
|
|
9
9
|
export interface SideSheetReactProps extends SideSheetProps {
|
|
10
10
|
bodyStyle?: CSSProperties;
|
|
11
11
|
headerStyle?: CSSProperties;
|
|
@@ -16,7 +16,7 @@ export interface SideSheetReactProps extends SideSheetProps {
|
|
|
16
16
|
children?: React.ReactNode;
|
|
17
17
|
onCancel?: (e: React.MouseEvent | React.KeyboardEvent) => void;
|
|
18
18
|
}
|
|
19
|
-
export { SideSheetState };
|
|
19
|
+
export type { SideSheetState };
|
|
20
20
|
export default class SideSheet extends BaseComponent<SideSheetReactProps, SideSheetState> {
|
|
21
21
|
static contextType: React.Context<ContextValue>;
|
|
22
22
|
static propTypes: {
|
|
@@ -2,7 +2,7 @@ import React, { PureComponent, ReactNode, CSSProperties } from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import '@douyinfe/semi-foundation/lib/cjs/skeleton/skeleton.css';
|
|
4
4
|
import { Paragraph } from './item';
|
|
5
|
-
export { ParagraphProps, AvatarProps, GenericProps } from './item';
|
|
5
|
+
export type { ParagraphProps, AvatarProps, GenericProps } from './item';
|
|
6
6
|
export interface SkeletonProps {
|
|
7
7
|
active?: boolean;
|
|
8
8
|
children?: ReactNode;
|
|
@@ -6,7 +6,7 @@ export interface SliderProps extends BasicSliceProps {
|
|
|
6
6
|
style?: CSSProperties;
|
|
7
7
|
railStyle?: CSSProperties;
|
|
8
8
|
}
|
|
9
|
-
export { SliderState };
|
|
9
|
+
export type { SliderState };
|
|
10
10
|
export default class Slider extends BaseComponent<SliderProps, SliderState> {
|
|
11
11
|
static propTypes: any;
|
|
12
12
|
static defaultProps: Partial<SliderProps>;
|
package/lib/cjs/steps/index.d.ts
CHANGED
|
@@ -4,13 +4,13 @@ import '@douyinfe/semi-foundation/lib/cjs/steps/steps.css';
|
|
|
4
4
|
import { FillStepsProps } from './fillSteps';
|
|
5
5
|
import { BasicStepsProps } from './basicSteps';
|
|
6
6
|
import { NavStepsProps } from './navSteps';
|
|
7
|
-
export { Status, Size, BasicStepProps } from './basicStep';
|
|
8
|
-
export { Direction, BasicStepsProps } from './basicSteps';
|
|
9
|
-
export { FillStepProps } from './fillStep';
|
|
10
|
-
export { FillStepsProps } from './fillSteps';
|
|
11
|
-
export { NavStepProps } from './navStep';
|
|
12
|
-
export { NavStepsProps } from './navSteps';
|
|
13
|
-
export { StepProps } from './step';
|
|
7
|
+
export type { Status, Size, BasicStepProps } from './basicStep';
|
|
8
|
+
export type { Direction, BasicStepsProps } from './basicSteps';
|
|
9
|
+
export type { FillStepProps } from './fillStep';
|
|
10
|
+
export type { FillStepsProps } from './fillSteps';
|
|
11
|
+
export type { NavStepProps } from './navStep';
|
|
12
|
+
export type { NavStepsProps } from './navSteps';
|
|
13
|
+
export type { StepProps } from './step';
|
|
14
14
|
export interface FillStepsAllProps extends FillStepsProps {
|
|
15
15
|
type?: 'fill';
|
|
16
16
|
}
|
package/lib/cjs/table/Table.js
CHANGED
|
@@ -900,7 +900,6 @@ class Table extends _baseComponent.default {
|
|
|
900
900
|
this.store = new _Store.default({
|
|
901
901
|
hoveredRowKey: null
|
|
902
902
|
});
|
|
903
|
-
this.setScrollPosition('left');
|
|
904
903
|
this.debouncedWindowResize = (0, _debounce2.default)(this.handleWindowResize, 150);
|
|
905
904
|
this.cachedFilteredSortedDataSource = [];
|
|
906
905
|
this.cachedFilteredSortedRowKeys = [];
|
|
@@ -1204,6 +1203,7 @@ class Table extends _baseComponent.default {
|
|
|
1204
1203
|
|
|
1205
1204
|
componentDidMount() {
|
|
1206
1205
|
super.componentDidMount();
|
|
1206
|
+
this.setScrollPosition('left');
|
|
1207
1207
|
|
|
1208
1208
|
if (this.adapter.isAnyColumnFixed() || this.props.showHeader && this.adapter.useFixedHeader()) {
|
|
1209
1209
|
this.handleWindowResize();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TimePickerProps as BasePickerProps, BaseValueType } from './TimePicker';
|
|
3
|
-
import { ValidateStatus } from '../_base/baseComponent';
|
|
4
|
-
import { ScrollItemProps } from '../scrollList/scrollItem';
|
|
5
|
-
export { TimeInputProps } from './TimeInput';
|
|
6
|
-
export { TimePickerProps } from './TimePicker';
|
|
7
|
-
export { BaseValueType, ScrollItemProps, ValidateStatus };
|
|
3
|
+
import type { ValidateStatus } from '../_base/baseComponent';
|
|
4
|
+
import type { ScrollItemProps } from '../scrollList/scrollItem';
|
|
5
|
+
export type { TimeInputProps } from './TimeInput';
|
|
6
|
+
export type { TimePickerProps } from './TimePicker';
|
|
7
|
+
export type { BaseValueType, ScrollItemProps, ValidateStatus };
|
|
8
8
|
export declare type LocalePickerProps = BasePickerProps;
|
|
9
9
|
export default class LocaleTimePicker extends React.PureComponent<LocalePickerProps> {
|
|
10
10
|
static propTypes: {
|