@douyinfe/semi-ui 2.57.1-alpha.0 → 2.58.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 +85 -9
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +82 -21
- 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/_base/base.css +2 -2
- package/lib/cjs/button/Button.d.ts +1 -1
- package/lib/cjs/button/Button.js +1 -0
- package/lib/cjs/datePicker/monthsGrid.d.ts +1 -1
- package/lib/cjs/form/baseForm.d.ts +2 -2
- package/lib/cjs/form/field.d.ts +2 -2
- package/lib/cjs/locale/interface.d.ts +3 -0
- package/lib/cjs/locale/source/ar.js +3 -0
- package/lib/cjs/locale/source/de.js +3 -0
- package/lib/cjs/locale/source/en_GB.js +3 -0
- package/lib/cjs/locale/source/en_US.js +3 -0
- package/lib/cjs/locale/source/es.js +3 -0
- package/lib/cjs/locale/source/fr.js +3 -0
- package/lib/cjs/locale/source/id_ID.js +3 -0
- package/lib/cjs/locale/source/it.js +3 -0
- package/lib/cjs/locale/source/ja_JP.js +3 -0
- package/lib/cjs/locale/source/ko_KR.js +3 -0
- package/lib/cjs/locale/source/ms_MY.js +3 -0
- package/lib/cjs/locale/source/nl_NL.js +3 -0
- package/lib/cjs/locale/source/pl_PL.js +3 -0
- package/lib/cjs/locale/source/pt_BR.js +3 -0
- package/lib/cjs/locale/source/ro.js +3 -0
- package/lib/cjs/locale/source/ru_RU.js +3 -0
- package/lib/cjs/locale/source/sv_SE.js +3 -0
- package/lib/cjs/locale/source/th_TH.js +3 -0
- package/lib/cjs/locale/source/tr_TR.js +3 -0
- package/lib/cjs/locale/source/vi_VN.js +3 -0
- package/lib/cjs/locale/source/zh_CN.js +3 -0
- package/lib/cjs/locale/source/zh_TW.js +3 -0
- package/lib/cjs/modal/confirm.d.ts +9 -9
- package/lib/cjs/navigation/Item.js +1 -1
- package/lib/cjs/slider/index.js +9 -6
- package/lib/cjs/table/Body/BaseRow.d.ts +0 -2
- package/lib/cjs/table/Body/BaseRow.js +4 -9
- package/lib/cjs/table/ColGroup.d.ts +2 -2
- package/lib/cjs/table/interface.d.ts +16 -15
- package/lib/cjs/tabs/TabBar.d.ts +4 -0
- package/lib/cjs/tabs/TabBar.js +55 -3
- package/lib/cjs/tabs/TabItem.js +3 -1
- package/lib/cjs/tabs/index.d.ts +1 -0
- package/lib/cjs/tabs/index.js +7 -4
- package/lib/cjs/tabs/interface.d.ts +7 -0
- package/lib/cjs/typography/title.d.ts +1 -1
- package/lib/es/_base/base.css +2 -2
- package/lib/es/button/Button.d.ts +1 -1
- package/lib/es/button/Button.js +1 -0
- package/lib/es/datePicker/monthsGrid.d.ts +1 -1
- package/lib/es/form/baseForm.d.ts +2 -2
- package/lib/es/form/field.d.ts +2 -2
- package/lib/es/locale/interface.d.ts +3 -0
- package/lib/es/locale/source/ar.js +3 -0
- package/lib/es/locale/source/de.js +3 -0
- package/lib/es/locale/source/en_GB.js +3 -0
- package/lib/es/locale/source/en_US.js +3 -0
- package/lib/es/locale/source/es.js +3 -0
- package/lib/es/locale/source/fr.js +3 -0
- package/lib/es/locale/source/id_ID.js +3 -0
- package/lib/es/locale/source/it.js +3 -0
- package/lib/es/locale/source/ja_JP.js +3 -0
- package/lib/es/locale/source/ko_KR.js +3 -0
- package/lib/es/locale/source/ms_MY.js +3 -0
- package/lib/es/locale/source/nl_NL.js +3 -0
- package/lib/es/locale/source/pl_PL.js +3 -0
- package/lib/es/locale/source/pt_BR.js +3 -0
- package/lib/es/locale/source/ro.js +3 -0
- package/lib/es/locale/source/ru_RU.js +3 -0
- package/lib/es/locale/source/sv_SE.js +3 -0
- package/lib/es/locale/source/th_TH.js +3 -0
- package/lib/es/locale/source/tr_TR.js +3 -0
- package/lib/es/locale/source/vi_VN.js +3 -0
- package/lib/es/locale/source/zh_CN.js +3 -0
- package/lib/es/locale/source/zh_TW.js +3 -0
- package/lib/es/modal/confirm.d.ts +9 -9
- package/lib/es/navigation/Item.js +1 -1
- package/lib/es/slider/index.js +9 -6
- package/lib/es/table/Body/BaseRow.d.ts +0 -2
- package/lib/es/table/Body/BaseRow.js +4 -7
- package/lib/es/table/ColGroup.d.ts +2 -2
- package/lib/es/table/interface.d.ts +16 -15
- package/lib/es/tabs/TabBar.d.ts +4 -0
- package/lib/es/tabs/TabBar.js +56 -4
- package/lib/es/tabs/TabItem.js +3 -1
- package/lib/es/tabs/index.d.ts +1 -0
- package/lib/es/tabs/index.js +7 -4
- package/lib/es/tabs/interface.d.ts +7 -0
- package/lib/es/typography/title.d.ts +1 -1
- package/package.json +8 -8
package/lib/cjs/tabs/TabBar.js
CHANGED
|
@@ -17,6 +17,7 @@ var _button = _interopRequireDefault(require("../button"));
|
|
|
17
17
|
var _semiIcons = require("@douyinfe/semi-icons");
|
|
18
18
|
var _uuid = require("@douyinfe/semi-foundation/lib/cjs/utils/uuid");
|
|
19
19
|
var _TabItem = _interopRequireDefault(require("./TabItem"));
|
|
20
|
+
var _localeConsumer = _interopRequireDefault(require("../locale/localeConsumer"));
|
|
20
21
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
22
|
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
22
23
|
var t = {};
|
|
@@ -163,6 +164,55 @@ class TabBar extends _react.default.Component {
|
|
|
163
164
|
visibleItemRenderer: this.renderTabItem
|
|
164
165
|
});
|
|
165
166
|
};
|
|
167
|
+
this.renderWithMoreTrigger = () => {
|
|
168
|
+
const {
|
|
169
|
+
list,
|
|
170
|
+
more
|
|
171
|
+
} = this.props;
|
|
172
|
+
let tabElements = [];
|
|
173
|
+
let moreTrigger = /*#__PURE__*/_react.default.createElement("div", {
|
|
174
|
+
className: (0, _classnames.default)({
|
|
175
|
+
[`${_constants.cssClasses.TABS_BAR}-more-trigger`]: true,
|
|
176
|
+
[`${_constants.cssClasses.TABS_BAR}-more-trigger-${this.props.type}`]: true
|
|
177
|
+
})
|
|
178
|
+
}, /*#__PURE__*/_react.default.createElement(_localeConsumer.default, {
|
|
179
|
+
componentName: "Tabs"
|
|
180
|
+
}, (locale, localeCode) => /*#__PURE__*/_react.default.createElement("div", {
|
|
181
|
+
className: `${_constants.cssClasses.TABS_BAR}-more-trigger-content`
|
|
182
|
+
}, /*#__PURE__*/_react.default.createElement("div", null, locale.more), /*#__PURE__*/_react.default.createElement(_semiIcons.IconChevronDown, {
|
|
183
|
+
className: `${_constants.cssClasses.TABS_BAR}-more-trigger-content-icon`
|
|
184
|
+
}))));
|
|
185
|
+
let keepCount;
|
|
186
|
+
if (typeof more === "number") {
|
|
187
|
+
keepCount = list.length - Math.min(more, list.length);
|
|
188
|
+
tabElements = list.slice(0, keepCount).map(panel => this.renderTabItem(panel));
|
|
189
|
+
} else if (typeof more === 'object') {
|
|
190
|
+
keepCount = list.length - Math.min(more.count, list.length);
|
|
191
|
+
tabElements = list.slice(0, keepCount).map(panel => this.renderTabItem(panel));
|
|
192
|
+
if (more.render) {
|
|
193
|
+
moreTrigger = more.render();
|
|
194
|
+
}
|
|
195
|
+
} else if (more !== undefined) {
|
|
196
|
+
throw new Error("[Semi Tabs]: invalid tab props format: more");
|
|
197
|
+
}
|
|
198
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, tabElements, this.renderMoreDropdown(list.slice(keepCount), more === null || more === void 0 ? void 0 : more['dropdownProps'], moreTrigger));
|
|
199
|
+
};
|
|
200
|
+
this.renderMoreDropdown = (panels, dropDownProps, trigger) => {
|
|
201
|
+
return /*#__PURE__*/_react.default.createElement(_dropdown.default, Object.assign({
|
|
202
|
+
trigger: 'hover',
|
|
203
|
+
showTick: true,
|
|
204
|
+
position: 'bottomLeft',
|
|
205
|
+
className: `${_constants.cssClasses.TABS_BAR}-more-dropdown-${this.props.type}`,
|
|
206
|
+
clickToHide: true,
|
|
207
|
+
menu: panels.map(panel => ({
|
|
208
|
+
node: 'item',
|
|
209
|
+
name: panel.tab,
|
|
210
|
+
icon: panel.icon,
|
|
211
|
+
onClick: e => this.props.onTabClick(panel.itemKey, e),
|
|
212
|
+
active: this.props.activeKey === panel.itemKey
|
|
213
|
+
}))
|
|
214
|
+
}, dropDownProps), trigger);
|
|
215
|
+
};
|
|
166
216
|
this._isActive = key => key === this.props.activeKey;
|
|
167
217
|
this._getItemKey = key => `${key}-bar`;
|
|
168
218
|
this.state = {
|
|
@@ -212,9 +262,10 @@ class TabBar extends _react.default.Component {
|
|
|
212
262
|
className,
|
|
213
263
|
list,
|
|
214
264
|
tabPosition,
|
|
265
|
+
more,
|
|
215
266
|
collapsible
|
|
216
267
|
} = _a,
|
|
217
|
-
restProps = __rest(_a, ["type", "style", "className", "list", "tabPosition", "collapsible"]);
|
|
268
|
+
restProps = __rest(_a, ["type", "style", "className", "list", "tabPosition", "more", "collapsible"]);
|
|
218
269
|
const classNames = (0, _classnames.default)(className, {
|
|
219
270
|
[_constants.cssClasses.TABS_BAR]: true,
|
|
220
271
|
[_constants.cssClasses.TABS_BAR_LINE]: type === 'line',
|
|
@@ -224,7 +275,7 @@ class TabBar extends _react.default.Component {
|
|
|
224
275
|
[`${_constants.cssClasses.TABS_BAR}-collapse`]: collapsible
|
|
225
276
|
});
|
|
226
277
|
const extra = this.renderExtra();
|
|
227
|
-
const contents = collapsible ? this.renderCollapsedTab() : this.renderTabComponents(list);
|
|
278
|
+
const contents = collapsible ? this.renderCollapsedTab() : more ? this.renderWithMoreTrigger() : this.renderTabComponents(list);
|
|
228
279
|
return /*#__PURE__*/_react.default.createElement("div", Object.assign({
|
|
229
280
|
role: "tablist",
|
|
230
281
|
"aria-orientation": tabPosition === "left" ? "vertical" : "horizontal",
|
|
@@ -247,7 +298,8 @@ TabBar.propTypes = {
|
|
|
247
298
|
tabPosition: _propTypes.default.oneOf(_constants.strings.POSITION_MAP),
|
|
248
299
|
type: _propTypes.default.oneOf(_constants.strings.TYPE_MAP),
|
|
249
300
|
closable: _propTypes.default.bool,
|
|
250
|
-
deleteTabItem: _propTypes.default.func
|
|
301
|
+
deleteTabItem: _propTypes.default.func,
|
|
302
|
+
more: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.object])
|
|
251
303
|
};
|
|
252
304
|
var _default = TabBar;
|
|
253
305
|
exports.default = _default;
|
package/lib/cjs/tabs/TabItem.js
CHANGED
|
@@ -43,7 +43,9 @@ const TabItem = (props, ref) => {
|
|
|
43
43
|
onClick: e => deleteTabItem(itemKey, e)
|
|
44
44
|
}) : null;
|
|
45
45
|
}, [type, closable, deleteTabItem, itemKey]);
|
|
46
|
-
const renderIcon = (0, _react.useCallback)(icon => /*#__PURE__*/_react.default.createElement("span",
|
|
46
|
+
const renderIcon = (0, _react.useCallback)(icon => /*#__PURE__*/_react.default.createElement("span", {
|
|
47
|
+
className: `${_constants.cssClasses.TABS_BAR}-icon`
|
|
48
|
+
}, icon), []);
|
|
47
49
|
const handleKeyDownInItem = (0, _react.useCallback)(event => {
|
|
48
50
|
handleKeyDown && handleKeyDown(event, itemKey, closable);
|
|
49
51
|
}, [handleKeyDown, itemKey, closable]);
|
package/lib/cjs/tabs/index.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ declare class Tabs extends BaseComponent<TabsProps, TabsState> {
|
|
|
37
37
|
type: PropTypes.Requireable<string>;
|
|
38
38
|
onTabClose: PropTypes.Requireable<(...args: any[]) => any>;
|
|
39
39
|
preventScroll: PropTypes.Requireable<boolean>;
|
|
40
|
+
more: PropTypes.Requireable<NonNullable<number | object>>;
|
|
40
41
|
};
|
|
41
42
|
static __SemiComponentName__: string;
|
|
42
43
|
static defaultProps: TabsProps;
|
package/lib/cjs/tabs/index.js
CHANGED
|
@@ -243,9 +243,10 @@ class Tabs extends _baseComponent.default {
|
|
|
243
243
|
tabBarStyle,
|
|
244
244
|
tabPaneMotion,
|
|
245
245
|
tabPosition,
|
|
246
|
-
type
|
|
246
|
+
type,
|
|
247
|
+
more
|
|
247
248
|
} = _a,
|
|
248
|
-
restProps = __rest(_a, ["children", "className", "collapsible", "contentStyle", "keepDOM", "lazyRender", "renderTabBar", "size", "style", "tabBarClassName", "tabBarExtraContent", "tabBarStyle", "tabPaneMotion", "tabPosition", "type"]);
|
|
249
|
+
restProps = __rest(_a, ["children", "className", "collapsible", "contentStyle", "keepDOM", "lazyRender", "renderTabBar", "size", "style", "tabBarClassName", "tabBarExtraContent", "tabBarStyle", "tabPaneMotion", "tabPosition", "type", "more"]);
|
|
249
250
|
const {
|
|
250
251
|
panes,
|
|
251
252
|
activeKey
|
|
@@ -270,7 +271,8 @@ class Tabs extends _baseComponent.default {
|
|
|
270
271
|
tabPosition,
|
|
271
272
|
type,
|
|
272
273
|
deleteTabItem: this.deleteTabItem,
|
|
273
|
-
handleKeyDown: this.foundation.handleKeyDown
|
|
274
|
+
handleKeyDown: this.foundation.handleKeyDown,
|
|
275
|
+
more
|
|
274
276
|
};
|
|
275
277
|
const tabBar = renderTabBar ? renderTabBar(tabBarProps, _TabBar.default) : /*#__PURE__*/_react.default.createElement(_TabBar.default, Object.assign({}, tabBarProps));
|
|
276
278
|
const content = keepDOM ? children : this.getActiveItem();
|
|
@@ -317,7 +319,8 @@ Tabs.propTypes = {
|
|
|
317
319
|
tabPosition: _propTypes.default.oneOf(_constants.strings.POSITION_MAP),
|
|
318
320
|
type: _propTypes.default.oneOf(_constants.strings.TYPE_MAP),
|
|
319
321
|
onTabClose: _propTypes.default.func,
|
|
320
|
-
preventScroll: _propTypes.default.bool
|
|
322
|
+
preventScroll: _propTypes.default.bool,
|
|
323
|
+
more: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.object])
|
|
321
324
|
};
|
|
322
325
|
Tabs.__SemiComponentName__ = "Tabs";
|
|
323
326
|
Tabs.defaultProps = (0, _utils.getDefaultPropsFromGlobalConfig)(Tabs.__SemiComponentName__, {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { CSSProperties, MouseEvent, ReactNode } from 'react';
|
|
2
2
|
import { Motion } from '../_base/base';
|
|
3
3
|
import TabBar from './TabBar';
|
|
4
|
+
import { DropdownProps } from "../dropdown";
|
|
4
5
|
export type TabType = 'line' | 'card' | 'button';
|
|
5
6
|
export type TabSize = 'small' | 'medium' | 'large';
|
|
6
7
|
export type TabPosition = 'top' | 'left';
|
|
@@ -34,6 +35,11 @@ export interface TabsProps {
|
|
|
34
35
|
type?: TabType;
|
|
35
36
|
onTabClose?: (tabKey: string) => void;
|
|
36
37
|
preventScroll?: boolean;
|
|
38
|
+
more?: number | {
|
|
39
|
+
count: number;
|
|
40
|
+
render?: () => ReactNode;
|
|
41
|
+
dropdownProps?: DropdownProps;
|
|
42
|
+
};
|
|
37
43
|
}
|
|
38
44
|
export interface TabBarProps {
|
|
39
45
|
activeKey?: string;
|
|
@@ -51,6 +57,7 @@ export interface TabBarProps {
|
|
|
51
57
|
closable?: boolean;
|
|
52
58
|
deleteTabItem?: (tabKey: string, event: MouseEvent<Element>) => void;
|
|
53
59
|
handleKeyDown?: (event: React.KeyboardEvent, itemKey: string, closable: boolean) => void;
|
|
60
|
+
more?: TabsProps['more'];
|
|
54
61
|
}
|
|
55
62
|
export interface TabPaneProps {
|
|
56
63
|
className?: string;
|
|
@@ -60,7 +60,7 @@ export default class Title extends PureComponent<TitleProps> {
|
|
|
60
60
|
underline: PropTypes.Requireable<boolean>;
|
|
61
61
|
strong: PropTypes.Requireable<boolean>;
|
|
62
62
|
type: PropTypes.Requireable<"warning" | "success" | "primary" | "secondary" | "danger" | "tertiary" | "quaternary">;
|
|
63
|
-
heading: PropTypes.Requireable<
|
|
63
|
+
heading: PropTypes.Requireable<1 | 2 | 3 | 4 | 5 | 6>;
|
|
64
64
|
style: PropTypes.Requireable<object>;
|
|
65
65
|
className: PropTypes.Requireable<string>;
|
|
66
66
|
component: PropTypes.Requireable<string>;
|
package/lib/es/_base/base.css
CHANGED
|
@@ -203,7 +203,7 @@ body, body .semi-always-light, :host, :host .semi-always-light {
|
|
|
203
203
|
--semi-yellow-9: 83,72,0;
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
-
body[theme-mode=dark], body .semi-always-dark, :host
|
|
206
|
+
body[theme-mode=dark], body .semi-always-dark, :host([theme-mode=dark]), :host .semi-always-dark {
|
|
207
207
|
--semi-red-0: 108,9,11;
|
|
208
208
|
--semi-red-1: 144,17,16;
|
|
209
209
|
--semi-red-2: 180,32,25;
|
|
@@ -478,7 +478,7 @@ body, body[theme-mode=dark] .semi-always-light, :host, :host .semi-always-light
|
|
|
478
478
|
--semi-color-data-19: rgba(188, 198, 255, 1);
|
|
479
479
|
}
|
|
480
480
|
|
|
481
|
-
body[theme-mode=dark], body .semi-always-dark, :host
|
|
481
|
+
body[theme-mode=dark], body .semi-always-dark, :host([theme-mode=dark]), :host .semi-always-dark {
|
|
482
482
|
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
483
483
|
-webkit-font-smoothing: antialiased;
|
|
484
484
|
--semi-color-white: rgba(228, 231, 245, 1);
|
|
@@ -4,7 +4,7 @@ import '@douyinfe/semi-foundation/lib/es/button/button.css';
|
|
|
4
4
|
import { noop } from '@douyinfe/semi-foundation/lib/es/utils/function';
|
|
5
5
|
export type HtmlType = 'button' | 'reset' | 'submit';
|
|
6
6
|
export type Size = 'default' | 'small' | 'large';
|
|
7
|
-
export type Theme = 'solid' | 'borderless' | 'light';
|
|
7
|
+
export type Theme = 'solid' | 'borderless' | 'light' | 'outline';
|
|
8
8
|
export type Type = 'primary' | 'secondary' | 'tertiary' | 'warning' | 'danger';
|
|
9
9
|
export interface ButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'type'> {
|
|
10
10
|
id?: string;
|
package/lib/es/button/Button.js
CHANGED
|
@@ -51,6 +51,7 @@ export default class Button extends PureComponent {
|
|
|
51
51
|
[`${prefixCls}-block`]: block,
|
|
52
52
|
[`${prefixCls}-circle`]: circle,
|
|
53
53
|
[`${prefixCls}-borderless`]: theme === 'borderless',
|
|
54
|
+
[`${prefixCls}-outline`]: theme === "outline",
|
|
54
55
|
[`${prefixCls}-${type}-disabled`]: disabled && type
|
|
55
56
|
}, className),
|
|
56
57
|
type: htmlType,
|
|
@@ -86,7 +86,7 @@ export default class MonthsGrid extends BaseComponent<MonthsGridProps, MonthsGri
|
|
|
86
86
|
renderMonth(month: Date, panelType: PanelType): JSX.Element;
|
|
87
87
|
handleWeeksRowNumChange: (weeksRowNum: number, panelType: PanelType) => void;
|
|
88
88
|
reselect: () => void;
|
|
89
|
-
getYAMOpenType: () => "
|
|
89
|
+
getYAMOpenType: () => "both" | "none" | "left" | "right";
|
|
90
90
|
renderTimePicker(panelType: PanelType, panelDetail: MonthInfo): JSX.Element;
|
|
91
91
|
renderYearAndMonth(panelType: PanelType, panelDetail: MonthInfo): JSX.Element;
|
|
92
92
|
renderSwitch(panelType: PanelType): JSX.Element;
|
|
@@ -86,7 +86,7 @@ declare class Form<Values extends Record<string, any> = any> extends BaseCompone
|
|
|
86
86
|
onDropdownVisibleChange?: (visible: boolean) => void;
|
|
87
87
|
zIndex?: number;
|
|
88
88
|
position?: "left" | "right" | "top" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver";
|
|
89
|
-
onSearch?: (value: string, event: React.
|
|
89
|
+
onSearch?: (value: string, event: React.KeyboardEvent<Element> | React.MouseEvent<Element, MouseEvent>) => void;
|
|
90
90
|
dropdownClassName?: string;
|
|
91
91
|
dropdownStyle?: React.CSSProperties;
|
|
92
92
|
dropdownMargin?: number | {
|
|
@@ -140,7 +140,7 @@ declare class Form<Values extends Record<string, any> = any> extends BaseCompone
|
|
|
140
140
|
preventScroll?: boolean;
|
|
141
141
|
showRestTagsPopover?: boolean;
|
|
142
142
|
restTagsPopoverProps?: import("../popover").PopoverProps;
|
|
143
|
-
} & Pick<import("../tooltip").TooltipProps, "
|
|
143
|
+
} & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "motion" | "getPopupContainer" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & React.RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
|
|
144
144
|
static Checkbox: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox").CheckboxProps & import("./interface").RCIncludeType>;
|
|
145
145
|
static CheckboxGroup: React.ComponentType<import("utility-types").Subtract<import("../checkbox").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & React.RefAttributes<any>>;
|
|
146
146
|
static Radio: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../radio").RadioProps & import("./interface").RCIncludeType>;
|
package/lib/es/form/field.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ declare const FormSelect: import("react").ComponentType<import("utility-types").
|
|
|
32
32
|
onDropdownVisibleChange?: (visible: boolean) => void;
|
|
33
33
|
zIndex?: number;
|
|
34
34
|
position?: "left" | "right" | "top" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver";
|
|
35
|
-
onSearch?: (value: string, event: import("react").
|
|
35
|
+
onSearch?: (value: string, event: import("react").KeyboardEvent<Element> | import("react").MouseEvent<Element, MouseEvent>) => void;
|
|
36
36
|
dropdownClassName?: string;
|
|
37
37
|
dropdownStyle?: import("react").CSSProperties;
|
|
38
38
|
dropdownMargin?: number | {
|
|
@@ -86,7 +86,7 @@ declare const FormSelect: import("react").ComponentType<import("utility-types").
|
|
|
86
86
|
preventScroll?: boolean;
|
|
87
87
|
showRestTagsPopover?: boolean;
|
|
88
88
|
restTagsPopoverProps?: import("../popover").PopoverProps;
|
|
89
|
-
} & Pick<import("../tooltip").TooltipProps, "
|
|
89
|
+
} & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "motion" | "getPopupContainer" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & import("react").RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
|
|
90
90
|
declare const FormCheckboxGroup: import("react").ComponentType<import("utility-types").Subtract<import("../checkbox/checkboxGroup").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & import("react").RefAttributes<any>>;
|
|
91
91
|
declare const FormCheckbox: import("react").ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox/checkbox").CheckboxProps & import("./interface").RCIncludeType>;
|
|
92
92
|
declare const FormRadioGroup: import("react").ComponentType<import("utility-types").Subtract<import("../radio/radioGroup").RadioGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & import("react").RefAttributes<any>>;
|
|
@@ -146,19 +146,19 @@ export declare function withWarning(props: ModalReactProps): {
|
|
|
146
146
|
type: "warning";
|
|
147
147
|
};
|
|
148
148
|
export declare function withError(props: ModalReactProps): {
|
|
149
|
+
title?: React.ReactNode;
|
|
149
150
|
children?: React.ReactNode;
|
|
151
|
+
size?: import("@douyinfe/semi-foundation/lib/es/modal/modalFoundation").Size;
|
|
150
152
|
style?: React.CSSProperties;
|
|
151
153
|
className?: string;
|
|
154
|
+
motion?: boolean;
|
|
152
155
|
getPopupContainer?: () => HTMLElement;
|
|
153
156
|
footer?: React.ReactNode;
|
|
154
157
|
header?: React.ReactNode;
|
|
155
|
-
title?: React.ReactNode;
|
|
156
158
|
direction?: any;
|
|
157
159
|
mask?: boolean;
|
|
158
160
|
visible?: boolean;
|
|
159
161
|
zIndex?: number;
|
|
160
|
-
size?: import("@douyinfe/semi-foundation/lib/es/modal/modalFoundation").Size;
|
|
161
|
-
motion?: boolean;
|
|
162
162
|
width?: string | number;
|
|
163
163
|
height?: string | number;
|
|
164
164
|
content?: React.ReactNode;
|
|
@@ -209,10 +209,13 @@ export declare function withError(props: ModalReactProps): {
|
|
|
209
209
|
onMouseEnter?: React.MouseEventHandler<HTMLButtonElement>;
|
|
210
210
|
onMouseLeave?: React.MouseEventHandler<HTMLButtonElement>;
|
|
211
211
|
'aria-label'?: string;
|
|
212
|
+
title?: string;
|
|
213
|
+
name?: string;
|
|
212
214
|
value?: string | number | readonly string[];
|
|
215
|
+
onAnimationStart?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
216
|
+
onAnimationEnd?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
213
217
|
form?: string;
|
|
214
218
|
slot?: string;
|
|
215
|
-
title?: string;
|
|
216
219
|
prefix?: string;
|
|
217
220
|
dangerouslySetInnerHTML?: {
|
|
218
221
|
__html: string | TrustedHTML;
|
|
@@ -367,9 +370,7 @@ export declare function withError(props: ModalReactProps): {
|
|
|
367
370
|
onScrollCapture?: React.UIEventHandler<HTMLButtonElement>;
|
|
368
371
|
onWheel?: React.WheelEventHandler<HTMLButtonElement>;
|
|
369
372
|
onWheelCapture?: React.WheelEventHandler<HTMLButtonElement>;
|
|
370
|
-
onAnimationStart?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
371
373
|
onAnimationStartCapture?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
372
|
-
onAnimationEnd?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
373
374
|
onAnimationEndCapture?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
374
375
|
onAnimationIteration?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
375
376
|
onAnimationIterationCapture?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
@@ -383,7 +384,6 @@ export declare function withError(props: ModalReactProps): {
|
|
|
383
384
|
suppressHydrationWarning?: boolean;
|
|
384
385
|
accessKey?: string;
|
|
385
386
|
autoFocus?: boolean;
|
|
386
|
-
name?: string;
|
|
387
387
|
contextMenu?: string;
|
|
388
388
|
dir?: string;
|
|
389
389
|
draggable?: boolean | "true" | "false";
|
|
@@ -391,7 +391,7 @@ export declare function withError(props: ModalReactProps): {
|
|
|
391
391
|
translate?: "no" | "yes";
|
|
392
392
|
role?: React.AriaRole;
|
|
393
393
|
contentEditable?: "inherit" | (boolean | "true" | "false");
|
|
394
|
-
inputMode?: "search" | "
|
|
394
|
+
inputMode?: "search" | "none" | "text" | "email" | "tel" | "url" | "numeric" | "decimal";
|
|
395
395
|
nonce?: string;
|
|
396
396
|
tabIndex?: number;
|
|
397
397
|
content?: string;
|
|
@@ -425,7 +425,7 @@ export declare function withError(props: ModalReactProps): {
|
|
|
425
425
|
is?: string;
|
|
426
426
|
'aria-activedescendant'?: string;
|
|
427
427
|
'aria-atomic'?: boolean | "true" | "false";
|
|
428
|
-
'aria-autocomplete'?: "
|
|
428
|
+
'aria-autocomplete'?: "both" | "none" | "list" | "inline";
|
|
429
429
|
'aria-busy'?: boolean | "true" | "false";
|
|
430
430
|
'aria-checked'?: boolean | "true" | "false" | "mixed";
|
|
431
431
|
'aria-colcount'?: number;
|
|
@@ -210,7 +210,7 @@ export default class NavItem extends BaseComponent {
|
|
|
210
210
|
onMouseEnter: onMouseEnter,
|
|
211
211
|
onMouseLeave: onMouseLeave,
|
|
212
212
|
onKeyPress: this.handleKeyPress
|
|
213
|
-
}), itemChildren);
|
|
213
|
+
}, this.getDataAttr(this.props)), itemChildren);
|
|
214
214
|
}
|
|
215
215
|
// Display Tooltip when disabled and SubNav
|
|
216
216
|
if (isCollapsed && !isInSubNav && !isSubNav || isCollapsed && isSubNav && disabled) {
|