tntd 2.8.19 → 2.8.20
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/es/tntd-virtual-tree/index.js +3 -2
- package/es/tntd-virtual-tree/index.js.map +1 -1
- package/es/tntd-virtual-tree-select/index.js +4 -2
- package/es/tntd-virtual-tree-select/index.js.map +1 -1
- package/lib/tntd-virtual-tree/index.d.ts +2 -1
- package/lib/tntd-virtual-tree/index.d.ts.map +1 -1
- package/lib/tntd-virtual-tree/index.js +5 -3
- package/lib/tntd-virtual-tree/index.js.map +1 -1
- package/lib/tntd-virtual-tree-select/index.d.ts +2 -1
- package/lib/tntd-virtual-tree-select/index.d.ts.map +1 -1
- package/lib/tntd-virtual-tree-select/index.js +6 -3
- package/lib/tntd-virtual-tree-select/index.js.map +1 -1
- package/package.json +1 -1
- package/es/alert/alert.js +0 -71
- package/es/alert/alert.js.map +0 -1
- package/es/cascader/cascader.js +0 -30
- package/es/cascader/cascader.js.map +0 -1
- package/es/checkbox/checkbox.js +0 -48
- package/es/checkbox/checkbox.js.map +0 -1
- package/es/date-picker/DatePicker.js +0 -101
- package/es/date-picker/DatePicker.js.map +0 -1
- package/es/input-number/inputNumber.js +0 -34
- package/es/input-number/inputNumber.js.map +0 -1
- package/es/popconfirm/popconfirm.js +0 -43
- package/es/popconfirm/popconfirm.js.map +0 -1
- package/es/popover/popover.js +0 -34
- package/es/popover/popover.js.map +0 -1
- package/es/progress/progress.js +0 -132
- package/es/progress/progress.js.map +0 -1
- package/es/radio/radio.js +0 -57
- package/es/radio/radio.js.map +0 -1
- package/es/spin/spin.js +0 -36
- package/es/spin/spin.js.map +0 -1
- package/es/time-picker/TimePicker.js +0 -36
- package/es/time-picker/TimePicker.js.map +0 -1
- package/es/tntd-action/Action.js +0 -117
- package/es/tntd-action/Action.js.map +0 -1
- package/lib/alert/alert.d.ts +0 -12
- package/lib/alert/alert.d.ts.map +0 -1
- package/lib/alert/alert.js +0 -93
- package/lib/alert/alert.js.map +0 -1
- package/lib/cascader/cascader.d.ts +0 -10
- package/lib/cascader/cascader.d.ts.map +0 -1
- package/lib/cascader/cascader.js +0 -49
- package/lib/cascader/cascader.js.map +0 -1
- package/lib/checkbox/checkbox.d.ts +0 -16
- package/lib/checkbox/checkbox.d.ts.map +0 -1
- package/lib/checkbox/checkbox.js +0 -65
- package/lib/checkbox/checkbox.js.map +0 -1
- package/lib/date-picker/DatePicker.d.ts +0 -21
- package/lib/date-picker/DatePicker.d.ts.map +0 -1
- package/lib/date-picker/DatePicker.js +0 -128
- package/lib/date-picker/DatePicker.js.map +0 -1
- package/lib/input-number/inputNumber.d.ts +0 -10
- package/lib/input-number/inputNumber.d.ts.map +0 -1
- package/lib/input-number/inputNumber.js +0 -54
- package/lib/input-number/inputNumber.js.map +0 -1
- package/lib/popconfirm/popconfirm.d.ts +0 -8
- package/lib/popconfirm/popconfirm.d.ts.map +0 -1
- package/lib/popconfirm/popconfirm.js +0 -61
- package/lib/popconfirm/popconfirm.js.map +0 -1
- package/lib/popover/popover.d.ts +0 -14
- package/lib/popover/popover.d.ts.map +0 -1
- package/lib/popover/popover.js +0 -55
- package/lib/popover/popover.js.map +0 -1
- package/lib/progress/progress.d.ts +0 -12
- package/lib/progress/progress.d.ts.map +0 -1
- package/lib/progress/progress.js +0 -148
- package/lib/progress/progress.js.map +0 -1
- package/lib/radio/radio.d.ts +0 -17
- package/lib/radio/radio.d.ts.map +0 -1
- package/lib/radio/radio.js +0 -75
- package/lib/radio/radio.js.map +0 -1
- package/lib/spin/spin.d.ts +0 -9
- package/lib/spin/spin.d.ts.map +0 -1
- package/lib/spin/spin.js +0 -44
- package/lib/spin/spin.js.map +0 -1
- package/lib/time-picker/TimePicker.d.ts +0 -9
- package/lib/time-picker/TimePicker.d.ts.map +0 -1
- package/lib/time-picker/TimePicker.js +0 -55
- package/lib/time-picker/TimePicker.js.map +0 -1
- package/lib/tntd-action/Action.d.ts +0 -6
- package/lib/tntd-action/Action.d.ts.map +0 -1
- package/lib/tntd-action/Action.js +0 -141
- package/lib/tntd-action/Action.js.map +0 -1
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
var __rest = this && this.__rest || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
4
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
5
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
6
|
-
}
|
|
7
|
-
return t;
|
|
8
|
-
};
|
|
9
|
-
import React from 'react';
|
|
10
|
-
import Icon from '../icon';
|
|
11
|
-
import { ConfigConsumer } from 'antd/es/config-provider';
|
|
12
|
-
import AntdDatePicker from 'antd/es/date-picker';
|
|
13
|
-
import classNames from 'classnames';
|
|
14
|
-
export * from 'antd/es/date-picker';
|
|
15
|
-
export * from 'antd/es/date-picker/interface';
|
|
16
|
-
const {
|
|
17
|
-
MonthPicker,
|
|
18
|
-
WeekPicker,
|
|
19
|
-
RangePicker
|
|
20
|
-
} = AntdDatePicker;
|
|
21
|
-
export const TntDatePicker = props => {
|
|
22
|
-
//theme样式类型 outline | fill 默认 outline
|
|
23
|
-
const {
|
|
24
|
-
theme = 'outline',
|
|
25
|
-
className,
|
|
26
|
-
suffixIcon
|
|
27
|
-
} = props,
|
|
28
|
-
restProps = __rest(props, ["theme", "className", "suffixIcon"]);
|
|
29
|
-
const defaultIcon = React.createElement(Icon, {
|
|
30
|
-
type: "calendar-3"
|
|
31
|
-
});
|
|
32
|
-
return React.createElement(ConfigConsumer, null, ({
|
|
33
|
-
getPrefixCls
|
|
34
|
-
}) => {
|
|
35
|
-
const prefixCls = getPrefixCls('date-picker');
|
|
36
|
-
return React.createElement(AntdDatePicker, Object.assign({
|
|
37
|
-
suffixIcon: suffixIcon || defaultIcon,
|
|
38
|
-
className: classNames(className, `${prefixCls}-${theme}`)
|
|
39
|
-
}, restProps));
|
|
40
|
-
});
|
|
41
|
-
};
|
|
42
|
-
export const TntMonthPicker = props => {
|
|
43
|
-
const {
|
|
44
|
-
theme = 'outline',
|
|
45
|
-
className,
|
|
46
|
-
suffixIcon
|
|
47
|
-
} = props,
|
|
48
|
-
restProps = __rest(props, ["theme", "className", "suffixIcon"]);
|
|
49
|
-
const defaultIcon = React.createElement(Icon, {
|
|
50
|
-
type: "calendar-3"
|
|
51
|
-
});
|
|
52
|
-
return React.createElement(ConfigConsumer, null, ({
|
|
53
|
-
getPrefixCls
|
|
54
|
-
}) => {
|
|
55
|
-
const prefixCls = getPrefixCls('date-picker');
|
|
56
|
-
return React.createElement(MonthPicker, Object.assign({
|
|
57
|
-
suffixIcon: suffixIcon || defaultIcon,
|
|
58
|
-
className: classNames(className, `${prefixCls}-${theme}`)
|
|
59
|
-
}, restProps));
|
|
60
|
-
});
|
|
61
|
-
};
|
|
62
|
-
export const TntWeekPicker = props => {
|
|
63
|
-
const {
|
|
64
|
-
theme = 'outline',
|
|
65
|
-
className,
|
|
66
|
-
suffixIcon
|
|
67
|
-
} = props,
|
|
68
|
-
restProps = __rest(props, ["theme", "className", "suffixIcon"]);
|
|
69
|
-
const defaultIcon = React.createElement(Icon, {
|
|
70
|
-
type: "calendar-3"
|
|
71
|
-
});
|
|
72
|
-
return React.createElement(ConfigConsumer, null, ({
|
|
73
|
-
getPrefixCls
|
|
74
|
-
}) => {
|
|
75
|
-
const prefixCls = getPrefixCls('date-picker');
|
|
76
|
-
return React.createElement(WeekPicker, Object.assign({
|
|
77
|
-
suffixIcon: suffixIcon || defaultIcon,
|
|
78
|
-
className: classNames(className, `${prefixCls}-${theme}`)
|
|
79
|
-
}, restProps));
|
|
80
|
-
});
|
|
81
|
-
};
|
|
82
|
-
export const TntRangePicker = props => {
|
|
83
|
-
const {
|
|
84
|
-
theme = 'outline',
|
|
85
|
-
className,
|
|
86
|
-
suffixIcon
|
|
87
|
-
} = props,
|
|
88
|
-
restProps = __rest(props, ["theme", "className", "suffixIcon"]);
|
|
89
|
-
const defaultIcon = React.createElement(Icon, {
|
|
90
|
-
type: "calendar-3"
|
|
91
|
-
});
|
|
92
|
-
return React.createElement(ConfigConsumer, null, ({
|
|
93
|
-
getPrefixCls
|
|
94
|
-
}) => {
|
|
95
|
-
const prefixCls = getPrefixCls('date-picker');
|
|
96
|
-
return React.createElement(RangePicker, Object.assign({
|
|
97
|
-
suffixIcon: suffixIcon || defaultIcon,
|
|
98
|
-
className: classNames(className, `${prefixCls}-${theme}`)
|
|
99
|
-
}, restProps));
|
|
100
|
-
});
|
|
101
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker.js","sourceRoot":"","sources":["../../src/date-picker/DatePicker.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AACvC,OAAO,IAAI,MAAM,SAAS,CAAA;AAO1B,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,cAAc,MAAM,qBAAqB,CAAA;AAChD,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,+BAA+B,CAAA;AAC7C,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,cAAc,CAAA;AAE/D,MAAM,CAAC,MAAM,aAAa,GAEtB,CAAC,KAAK,EAAE,EAAE;IACZ,sCAAsC;IACtC,MAAM,EAAE,KAAK,GAAG,SAAS,EAAE,SAAS,EAAE,UAAU,KAAmB,KAAK,EAAnB,SAAS,UAAK,KAAK,EAAlE,oCAA0D,CAAQ,CAAA;IACxE,MAAM,WAAW,GAAG,oBAAC,IAAI,IAAC,IAAI,EAAC,YAAY,GAAG,CAAA;IAE9C,OAAO,CACL,oBAAC,cAAc,QACZ,CAAC,EAAE,YAAY,EAAE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MAAM,SAAS,GAAG,YAAY,CAAC,aAAa,CAAC,CAAA;QAC7C,OAAO,CACL,oBAAC,UAAU,kBACT,UAAU,EAAE,UAAU,IAAI,WAAW,EACrC,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,GAAG,SAAS,IAAI,KAAK,EAAE,CAAC,IACrD,SAAS,EACb,CACH,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,cAAc,GAEvB,CAAC,KAAK,EAAE,EAAE;IACZ,MAAM,EAAE,KAAK,GAAG,SAAS,EAAE,SAAS,EAAE,UAAU,KAAmB,KAAK,EAAnB,SAAS,UAAK,KAAK,EAAlE,oCAA0D,CAAQ,CAAA;IACxE,MAAM,WAAW,GAAG,oBAAC,IAAI,IAAC,IAAI,EAAC,YAAY,GAAG,CAAA;IAE9C,OAAO,CACL,oBAAC,cAAc,QACZ,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;QACpB,MAAM,SAAS,GAAG,YAAY,CAAC,aAAa,CAAC,CAAA;QAC7C,OAAO,CACL,oBAAC,WAAW,kBACV,UAAU,EAAE,UAAU,IAAI,WAAW,EACrC,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,GAAG,SAAS,IAAI,KAAK,EAAE,CAAC,IACrD,SAAS,EACb,CACH,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CAAA","sourcesContent":["import React, { useState } from 'react'\nimport Icon from '../icon'\nimport type {\n DatePickerProps as AntdDatePickerProps,\n MonthPickerProps as AntMonthPickerProps,\n RangePickerProps as AntRangePickerProps,\n WeekPickerProps as AntWeekPickerProps,\n} from 'antd/es/date-picker/interface'\nimport { ConfigConsumer } from 'antd/es/config-provider'\nimport AntdDatePicker from 'antd/es/date-picker'\nimport classNames from 'classnames'\nexport * from 'antd/es/date-picker'\nexport * from 'antd/es/date-picker/interface'\nconst { MonthPicker, WeekPicker, RangePicker } = AntdDatePicker\n\nexport const TntDatePicker: React.FC<\n AntdDatePickerProps & { theme?: string; readonly?: boolean }\n> = (props) => {\n //theme样式类型 outline | fill 默认 outline\n const { theme = 'outline', className, suffixIcon, ...restProps } = props\n const defaultIcon = <Icon type=\"calendar-3\" />\n\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n const prefixCls = getPrefixCls('date-picker')\n return (\n <AntdDatePicker\n suffixIcon={suffixIcon || defaultIcon}\n className={classNames(className, `${prefixCls}-${theme}`)}\n {...restProps}\n />\n )\n }}\n </ConfigConsumer>\n )\n}\n\nexport const TntMonthPicker: React.FC<\n AntMonthPickerProps & { theme?: string; readonly?: boolean }\n> = (props) => {\n const { theme = 'outline', className, suffixIcon, ...restProps } = props\n const defaultIcon = <Icon type=\"calendar-3\" />\n\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n const prefixCls = getPrefixCls('date-picker')\n return (\n <MonthPicker\n suffixIcon={suffixIcon || defaultIcon}\n className={classNames(className, `${prefixCls}-${theme}`)}\n {...restProps}\n />\n )\n }}\n </ConfigConsumer>\n )\n}\n\nexport const TntWeekPicker: React.FC<\n AntWeekPickerProps & { theme?: string; readonly?: boolean }\n> = (props) => {\n const { theme = 'outline', className, suffixIcon, ...restProps } = props\n const defaultIcon = <Icon type=\"calendar-3\" />\n\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n const prefixCls = getPrefixCls('date-picker')\n return (\n <WeekPicker\n suffixIcon={suffixIcon || defaultIcon}\n className={classNames(className, `${prefixCls}-${theme}`)}\n {...restProps}\n />\n )\n }}\n </ConfigConsumer>\n )\n}\n\nexport const TntRangePicker: React.FC<\n AntRangePickerProps & { theme?: string; readonly?: boolean }\n> = (props) => {\n const { theme = 'outline', className, suffixIcon, ...restProps } = props\n const defaultIcon = <Icon type=\"calendar-3\" />\n\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n const prefixCls = getPrefixCls('date-picker')\n return (\n <RangePicker\n suffixIcon={suffixIcon || defaultIcon}\n className={classNames(className, `${prefixCls}-${theme}`)}\n {...restProps}\n />\n )\n }}\n </ConfigConsumer>\n )\n}\n"]}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
var __rest = this && this.__rest || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
4
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
5
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
6
|
-
}
|
|
7
|
-
return t;
|
|
8
|
-
};
|
|
9
|
-
import React, { forwardRef } from 'react';
|
|
10
|
-
import { ConfigConsumer } from '../config-provider';
|
|
11
|
-
import { default as AntdInputNumber } from 'antd/es/input-number';
|
|
12
|
-
import { connectReadonlyComponent } from '../connect';
|
|
13
|
-
import PreviewText from '../preview-text';
|
|
14
|
-
import classNames from 'classnames';
|
|
15
|
-
import { getLanguage, getText } from '../prev-locale';
|
|
16
|
-
export * from 'antd/es/input-number';
|
|
17
|
-
const defaultPlaceholder = getText('enter', getLanguage());
|
|
18
|
-
const tntPrefixCls = 'tnt-input-number';
|
|
19
|
-
const TntInputNumber = forwardRef((_a, ref) => {
|
|
20
|
-
var {
|
|
21
|
-
className,
|
|
22
|
-
placeholder = defaultPlaceholder
|
|
23
|
-
} = _a,
|
|
24
|
-
props = __rest(_a, ["className", "placeholder"]);
|
|
25
|
-
return React.createElement(ConfigConsumer, null, () => {
|
|
26
|
-
return React.createElement(AntdInputNumber, Object.assign({
|
|
27
|
-
placeholder: placeholder
|
|
28
|
-
}, props, {
|
|
29
|
-
ref: ref,
|
|
30
|
-
className: classNames(className, tntPrefixCls)
|
|
31
|
-
}));
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
export default connectReadonlyComponent(TntInputNumber, PreviewText.Input);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inputNumber.js","sourceRoot":"","sources":["../../src/input-number/inputNumber.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAEjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAA;AACrD,OAAO,WAAW,MAAM,iBAAiB,CAAA;AACzC,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AACrD,cAAc,sBAAsB,CAAA;AAEpC,MAAM,kBAAkB,GAAG,OAAO,CAAC,OAAO,EAAE,WAAW,EAAE,CAAC,CAAA;AAM1D,MAAM,YAAY,GAAG,kBAAkB,CAAA;AAEvC,MAAM,cAAc,GAAG,UAAU,CAC/B,CAAC,EAAyD,EAAE,GAAG,EAAE,EAAE;QAAlE,EAAE,SAAS,EAAE,WAAW,GAAG,kBAAkB,OAAY,EAAP,KAAK,cAAvD,4BAAyD,CAAF;IACtD,OAAO,CACL,oBAAC,cAAc,QACZ,GAAG,EAAE;QACJ,OAAO,CACL,oBAAC,eAAe,kBACd,WAAW,EAAE,WAAW,IACpB,KAAK,IACT,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,YAAY,CAAC,IAC9C,CACH,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,wBAAwB,CAAC,cAAc,EAAE,WAAW,CAAC,KAAK,CAAC,CAAA","sourcesContent":["import React, { forwardRef } from 'react'\nimport { ConfigConsumer } from '../config-provider'\nimport { default as AntdInputNumber } from 'antd/es/input-number'\nimport type { InputNumberProps as AntdInputNumberProps } from 'antd/es/input-number'\nimport { connectReadonlyComponent } from '../connect'\nimport PreviewText from '../preview-text'\nimport classNames from 'classnames'\nimport { getLanguage, getText } from '../prev-locale'\nexport * from 'antd/es/input-number'\n\nconst defaultPlaceholder = getText('enter', getLanguage())\n\nexport type InputNumberProps = AntdInputNumberProps & {\n readonly?: boolean\n}\n\nconst tntPrefixCls = 'tnt-input-number'\n\nconst TntInputNumber = forwardRef<AntdInputNumber, AntdInputNumberProps>(\n ({ className, placeholder = defaultPlaceholder, ...props }, ref) => {\n return (\n <ConfigConsumer>\n {() => {\n return (\n <AntdInputNumber\n placeholder={placeholder}\n {...props}\n ref={ref}\n className={classNames(className, tntPrefixCls)}\n />\n )\n }}\n </ConfigConsumer>\n )\n }\n)\n\nexport default connectReadonlyComponent(TntInputNumber, PreviewText.Input)\n"]}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
var __rest = this && this.__rest || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
4
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
5
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
6
|
-
}
|
|
7
|
-
return t;
|
|
8
|
-
};
|
|
9
|
-
import React from 'react';
|
|
10
|
-
import { ConfigConsumer } from 'antd/es/config-provider';
|
|
11
|
-
import AntdPopconfirm from 'antd/es/popconfirm';
|
|
12
|
-
import classNames from 'classnames';
|
|
13
|
-
export * from 'antd/es/popconfirm';
|
|
14
|
-
const Popconfirm = _a => {
|
|
15
|
-
var {
|
|
16
|
-
cancelButtonProps,
|
|
17
|
-
okButtonProps,
|
|
18
|
-
hiddenArrow
|
|
19
|
-
} = _a,
|
|
20
|
-
props = __rest(_a, ["cancelButtonProps", "okButtonProps", "hiddenArrow"]);
|
|
21
|
-
return React.createElement(ConfigConsumer, null, ({
|
|
22
|
-
getPrefixCls
|
|
23
|
-
}) => {
|
|
24
|
-
const prefixCls = getPrefixCls('popover');
|
|
25
|
-
return React.createElement(AntdPopconfirm, Object.assign({
|
|
26
|
-
cancelButtonProps: Object.assign({
|
|
27
|
-
type: 'tertiary',
|
|
28
|
-
className: classNames('tnt-btn', {
|
|
29
|
-
'tnt-btn-tertiary': (cancelButtonProps === null || cancelButtonProps === void 0 ? void 0 : cancelButtonProps.type) === 'tertiary' || !(cancelButtonProps === null || cancelButtonProps === void 0 ? void 0 : cancelButtonProps.type),
|
|
30
|
-
'tnt-btn-mini': (cancelButtonProps === null || cancelButtonProps === void 0 ? void 0 : cancelButtonProps.size) === 'mini'
|
|
31
|
-
})
|
|
32
|
-
}, cancelButtonProps),
|
|
33
|
-
okButtonProps: Object.assign({
|
|
34
|
-
className: classNames('tnt-btn', {
|
|
35
|
-
'tnt-btn-tertiary': (okButtonProps === null || okButtonProps === void 0 ? void 0 : okButtonProps.type) === 'tertiary',
|
|
36
|
-
'tnt-btn-mini': (okButtonProps === null || okButtonProps === void 0 ? void 0 : okButtonProps.size) === 'mini'
|
|
37
|
-
})
|
|
38
|
-
}, okButtonProps),
|
|
39
|
-
overlayClassName: classNames(hiddenArrow ? prefixCls + '-arrow-hidden' : '')
|
|
40
|
-
}, props));
|
|
41
|
-
});
|
|
42
|
-
};
|
|
43
|
-
export default Popconfirm;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"popconfirm.js","sourceRoot":"","sources":["../../src/popconfirm/popconfirm.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,cAAc,MAAM,oBAAoB,CAAA;AAC/C,OAAO,UAAU,MAAM,YAAY,CAAA;AAEnC,cAAc,oBAAoB,CAAA;AAElC,MAAM,UAAU,GAA0D,CAAC,EAK1E,EAAE,EAAE;QALsE,EACzE,iBAAiB,EACjB,aAAa,EACb,WAAW,OAEZ,EADI,KAAK,cAJiE,qDAK1E,CADS;IAER,OAAO,CACL,oBAAC,cAAc,QACZ,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;QACpB,MAAM,SAAS,GAAG,YAAY,CAAC,SAAS,CAAC,CAAA;QACzC,OAAO,CACL,oBAAC,cAAc,kBACb,iBAAiB,EACf,gBACE,IAAI,EAAE,UAAU,EAChB,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE;oBAC/B,kBAAkB,EAChB,CAAC,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,IAAe,MAAK,UAAU,IAAI,CAAC,CAAA,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,IAAI,CAAA;oBAChF,cAAc,EAAE,CAAC,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,IAAe,MAAK,MAAM;iBAC/D,CAAC,IACC,iBAAiB,CACA,EAExB,aAAa,kBACX,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE;oBAC/B,kBAAkB,EAAE,CAAC,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,IAAe,MAAK,UAAU;oBAClE,cAAc,EAAE,CAAC,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,IAAe,MAAK,MAAM;iBAC3D,CAAC,IACC,aAAa,GAElB,gBAAgB,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,GAAG,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,IACxE,KAAK,EACT,CACH,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CAAA;AAED,eAAe,UAAU,CAAA","sourcesContent":["import React from 'react'\nimport type { PopconfirmProps } from 'antd/es/popconfirm'\nimport type { NativeButtonProps } from 'antd/es/button/button'\nimport { ConfigConsumer } from 'antd/es/config-provider'\nimport AntdPopconfirm from 'antd/es/popconfirm'\nimport classNames from 'classnames'\n\nexport * from 'antd/es/popconfirm'\n\nconst Popconfirm: React.FC<PopconfirmProps & { hiddenArrow?: boolean }> = ({\n cancelButtonProps,\n okButtonProps,\n hiddenArrow,\n ...props\n}) => {\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n const prefixCls = getPrefixCls('popover')\n return (\n <AntdPopconfirm\n cancelButtonProps={\n {\n type: 'tertiary',\n className: classNames('tnt-btn', {\n 'tnt-btn-tertiary':\n (cancelButtonProps?.type as string) === 'tertiary' || !cancelButtonProps?.type,\n 'tnt-btn-mini': (cancelButtonProps?.size as string) === 'mini',\n }),\n ...cancelButtonProps,\n } as NativeButtonProps\n }\n okButtonProps={{\n className: classNames('tnt-btn', {\n 'tnt-btn-tertiary': (okButtonProps?.type as string) === 'tertiary',\n 'tnt-btn-mini': (okButtonProps?.size as string) === 'mini',\n }),\n ...okButtonProps,\n }}\n overlayClassName={classNames(hiddenArrow ? prefixCls + '-arrow-hidden' : '')}\n {...props}\n />\n )\n }}\n </ConfigConsumer>\n )\n}\n\nexport default Popconfirm\n"]}
|
package/es/popover/popover.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
var __rest = this && this.__rest || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
4
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
5
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
6
|
-
}
|
|
7
|
-
return t;
|
|
8
|
-
};
|
|
9
|
-
import React from 'react';
|
|
10
|
-
import { ConfigConsumer } from 'antd/es/config-provider';
|
|
11
|
-
import AntdPopover from 'antd/es/popover';
|
|
12
|
-
import classNames from 'classnames';
|
|
13
|
-
export * from 'antd/es/popover';
|
|
14
|
-
const themeMap = (prefixCls, themeColor) => {
|
|
15
|
-
return `${prefixCls}-${themeColor}`;
|
|
16
|
-
};
|
|
17
|
-
const Popover = props => {
|
|
18
|
-
const {
|
|
19
|
-
overlayClassName,
|
|
20
|
-
theme = '',
|
|
21
|
-
titleDivider = false,
|
|
22
|
-
hiddenArrow = false
|
|
23
|
-
} = props,
|
|
24
|
-
restProps = __rest(props, ["overlayClassName", "theme", "titleDivider", "hiddenArrow"]);
|
|
25
|
-
return React.createElement(ConfigConsumer, null, ({
|
|
26
|
-
getPrefixCls
|
|
27
|
-
}) => {
|
|
28
|
-
const prefixCls = getPrefixCls('popover');
|
|
29
|
-
return React.createElement(AntdPopover, Object.assign({
|
|
30
|
-
overlayClassName: classNames(prefixCls, 'tnt-popover', themeMap(prefixCls, theme), hiddenArrow ? prefixCls + '-arrow-hidden' : '', overlayClassName)
|
|
31
|
-
}, restProps));
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
export default Popover;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"popover.js","sourceRoot":"","sources":["../../src/popover/popover.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,WAAW,MAAM,iBAAiB,CAAA;AACzC,OAAO,UAAU,MAAM,YAAY,CAAA;AAEnC,cAAc,iBAAiB,CAAA;AAC/B,MAAM,QAAQ,GAAG,CAAC,SAAiB,EAAE,UAAmB,EAAE,EAAE;IAC1D,OAAO,GAAG,SAAS,IAAI,UAAU,EAAE,CAAA;AACrC,CAAC,CAAA;AAMD,MAAM,OAAO,GAET,CAAC,KAAK,EAAE,EAAE;IACZ,MAAM,EACJ,gBAAgB,EAChB,KAAK,GAAG,EAAE,EACV,YAAY,GAAG,KAAK,EACpB,WAAW,GAAG,KAAK,KAEjB,KAAK,EADJ,SAAS,UACV,KAAK,EANH,4DAML,CAAQ,CAAA;IAET,OAAO,CACL,oBAAC,cAAc,QACZ,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;QACpB,MAAM,SAAS,GAAG,YAAY,CAAC,SAAS,CAAC,CAAA;QAEzC,OAAO,CACL,oBAAC,WAAW,kBACV,gBAAgB,EAAE,UAAU,CAC1B,SAAS,EACT,aAAa,EACb,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAC,EAC1B,WAAW,CAAC,CAAC,CAAC,SAAS,GAAG,eAAe,CAAC,CAAC,CAAC,EAAE,EAC9C,gBAAgB,CACjB,IACG,SAAS,EACb,CACH,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CAAA;AAED,eAAe,OAAO,CAAA","sourcesContent":["import React from 'react'\nimport type { PopoverProps } from 'antd/es/popover'\nimport { ConfigConsumer } from 'antd/es/config-provider'\nimport AntdPopover from 'antd/es/popover'\nimport classNames from 'classnames'\n\nexport * from 'antd/es/popover'\nconst themeMap = (prefixCls: string, themeColor?: string) => {\n return `${prefixCls}-${themeColor}`\n}\ninterface CurProps extends PopoverProps {\n theme?: string\n titleDivider?: boolean\n}\n\nconst Popover: React.FC<\n CurProps & { theme?: string; titleDivider?: boolean; hiddenArrow?: boolean }\n> = (props) => {\n const {\n overlayClassName,\n theme = '',\n titleDivider = false,\n hiddenArrow = false,\n ...restProps\n } = props\n\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n const prefixCls = getPrefixCls('popover')\n\n return (\n <AntdPopover\n overlayClassName={classNames(\n prefixCls,\n 'tnt-popover',\n themeMap(prefixCls, theme),\n hiddenArrow ? prefixCls + '-arrow-hidden' : '',\n overlayClassName\n )}\n {...restProps}\n />\n )\n }}\n </ConfigConsumer>\n )\n}\n\nexport default Popover\n"]}
|
package/es/progress/progress.js
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ConfigConsumer } from 'antd/es/config-provider';
|
|
3
|
-
import AntdProgress from 'antd/es/progress';
|
|
4
|
-
import classNames from 'classnames';
|
|
5
|
-
import Ellipsis from '../ellipsis';
|
|
6
|
-
import Icon from '../icon';
|
|
7
|
-
import './progress.less';
|
|
8
|
-
export * from 'antd/es/tooltip';
|
|
9
|
-
const iconMap = {
|
|
10
|
-
line: {
|
|
11
|
-
success: 'check-circle',
|
|
12
|
-
exception: 'close-circle'
|
|
13
|
-
},
|
|
14
|
-
circle: {
|
|
15
|
-
success: 'check',
|
|
16
|
-
exception: 'close'
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
const ifPercentBottom = (type, percentPosition) => {
|
|
20
|
-
return type === 'line' && percentPosition === 'bottom';
|
|
21
|
-
};
|
|
22
|
-
const percentTransform = percent => {
|
|
23
|
-
return percent >= 100 ? 100 : percent <= 0 ? 0 : percent;
|
|
24
|
-
};
|
|
25
|
-
const themeStrokeColor = (status, strokeColor, percent) => {
|
|
26
|
-
return status !== 'success' && status !== 'exception' && !strokeColor && percent !== 100 ? 'var(--blue-5)' : '';
|
|
27
|
-
};
|
|
28
|
-
const Progress = props => {
|
|
29
|
-
const {
|
|
30
|
-
className,
|
|
31
|
-
type = 'line',
|
|
32
|
-
percentPosition = 'right',
|
|
33
|
-
percent = 0,
|
|
34
|
-
format,
|
|
35
|
-
size,
|
|
36
|
-
label,
|
|
37
|
-
width = 132,
|
|
38
|
-
status,
|
|
39
|
-
halfCircle,
|
|
40
|
-
gapDegree = props.halfCircle ? 135 : props.gapDegree,
|
|
41
|
-
strokeColor,
|
|
42
|
-
strokeWidth = 7
|
|
43
|
-
} = props;
|
|
44
|
-
const _percent = percentTransform(percent);
|
|
45
|
-
const _strokeColor = themeStrokeColor(status, strokeColor, _percent);
|
|
46
|
-
return React.createElement(ConfigConsumer, null, ({
|
|
47
|
-
getPrefixCls
|
|
48
|
-
}) => {
|
|
49
|
-
const prefixCls = getPrefixCls('progress');
|
|
50
|
-
const CusLabelOrPercent = props => {
|
|
51
|
-
const {
|
|
52
|
-
type,
|
|
53
|
-
theme
|
|
54
|
-
} = props;
|
|
55
|
-
const labelPercentClassName = classNames(`${prefixCls}-percent-bottom`, {
|
|
56
|
-
[`${prefixCls}-percent-bottom-${size}`]: size === 'small',
|
|
57
|
-
[`${prefixCls}-percent-bottom-${type}`]: type === 'line'
|
|
58
|
-
});
|
|
59
|
-
const showIcon = status => React.createElement(Icon, {
|
|
60
|
-
type: `${iconMap[type][status]}`,
|
|
61
|
-
theme: theme,
|
|
62
|
-
className: classNames({
|
|
63
|
-
[`${labelPercentClassName} ${labelPercentClassName}-${status || 'success'}`]: type === 'line'
|
|
64
|
-
})
|
|
65
|
-
});
|
|
66
|
-
const showPercent = React.createElement("div", {
|
|
67
|
-
className: labelPercentClassName
|
|
68
|
-
}, format ? format === null || format === void 0 ? void 0 : format(_percent) : _percent + '%');
|
|
69
|
-
let displayContent;
|
|
70
|
-
if (status === 'success' || status === 'exception') {
|
|
71
|
-
displayContent = showIcon(status);
|
|
72
|
-
} else if (status === 'normal' || status === 'active') {
|
|
73
|
-
displayContent = showPercent;
|
|
74
|
-
} else {
|
|
75
|
-
// 如果状态为空
|
|
76
|
-
displayContent = _percent === 100 ? showIcon('success') : showPercent;
|
|
77
|
-
}
|
|
78
|
-
return displayContent;
|
|
79
|
-
};
|
|
80
|
-
const CusCircleAndDashboardFormat = props => {
|
|
81
|
-
const {
|
|
82
|
-
widthNum
|
|
83
|
-
} = props;
|
|
84
|
-
return React.createElement("div", {
|
|
85
|
-
className: `${prefixCls}-cus-format`
|
|
86
|
-
}, !!label && React.createElement(Ellipsis, {
|
|
87
|
-
className: `${prefixCls}-cus-format-label`,
|
|
88
|
-
title: label,
|
|
89
|
-
widthLimit: widthNum <= 64 ? widthNum : 'calc(100% - 50px)',
|
|
90
|
-
placement: widthNum <= 64 ? 'bottom' : 'top'
|
|
91
|
-
}), React.createElement(CusLabelOrPercent, {
|
|
92
|
-
type: "circle",
|
|
93
|
-
theme: "outlined"
|
|
94
|
-
}));
|
|
95
|
-
};
|
|
96
|
-
//line
|
|
97
|
-
const LineProgress = () => React.createElement(AntdProgress, Object.assign({
|
|
98
|
-
strokeColor: _strokeColor
|
|
99
|
-
}, props, {
|
|
100
|
-
className: classNames('tnt-progress', className, {
|
|
101
|
-
[`${prefixCls}-percent-bottom`]: percentPosition === 'bottom'
|
|
102
|
-
})
|
|
103
|
-
}));
|
|
104
|
-
//circle,dashboard (额外新增label和半圆选项)
|
|
105
|
-
const CircleAndDashboardProgress = () => {
|
|
106
|
-
const widthNum = Number(String(width).split('px').shift());
|
|
107
|
-
return React.createElement(AntdProgress, Object.assign({
|
|
108
|
-
gapDegree: gapDegree,
|
|
109
|
-
strokeColor: _strokeColor,
|
|
110
|
-
strokeWidth: strokeWidth
|
|
111
|
-
}, props, {
|
|
112
|
-
type: halfCircle ? 'dashboard' : type,
|
|
113
|
-
className: classNames('tnt-progress', `${prefixCls}-circle-progress`, className, {
|
|
114
|
-
[`${prefixCls}-small-circle`]: widthNum <= 64 && label,
|
|
115
|
-
[`${prefixCls}-large-circle`]: widthNum > 64 && label,
|
|
116
|
-
[`${prefixCls}-small-half-circle`]: halfCircle && widthNum <= 64 && label,
|
|
117
|
-
[`${prefixCls}-large-half-circle`]: halfCircle && widthNum > 64 && label
|
|
118
|
-
}),
|
|
119
|
-
format: () => React.createElement(CusCircleAndDashboardFormat, {
|
|
120
|
-
widthNum: widthNum
|
|
121
|
-
})
|
|
122
|
-
}));
|
|
123
|
-
};
|
|
124
|
-
const progressMap = {
|
|
125
|
-
line: React.createElement(LineProgress, null),
|
|
126
|
-
circle: React.createElement(CircleAndDashboardProgress, null),
|
|
127
|
-
dashboard: React.createElement(CircleAndDashboardProgress, null)
|
|
128
|
-
};
|
|
129
|
-
return progressMap[type];
|
|
130
|
-
});
|
|
131
|
-
};
|
|
132
|
-
export default Progress;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"progress.js","sourceRoot":"","sources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AC,IAAI,CAAC,CAAA;IAC1B,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CAAA;AAED,eAAe,QAAQ,CAAA","sourcesContent":["import React from 'react'\nimport type { ProgressProps } from 'antd/es/progress'\nimport type { ThemeType } from 'antd/es/icon'\nimport { ConfigConsumer } from 'antd/es/config-provider'\nimport AntdProgress from 'antd/es/progress'\nimport classNames from 'classnames'\nimport Ellipsis from '../ellipsis'\nimport Icon from '../icon'\nimport './progress.less'\nexport * from 'antd/es/tooltip'\n\ninterface ExtendsProgress {\n percentPosition?: 'bottom' | 'right'\n label?: React.ReactNode\n halfCircle?: boolean\n}\nconst iconMap = {\n line: {\n success: 'check-circle',\n exception: 'close-circle',\n },\n circle: {\n success: 'check',\n exception: 'close',\n },\n}\nconst ifPercentBottom = (type: string, percentPosition: string) => {\n return type === 'line' && percentPosition === 'bottom'\n}\nconst percentTransform = (percent: number) => {\n return percent >= 100 ? 100 : percent <= 0 ? 0 : percent\n}\n\nconst themeStrokeColor = (status?: string, strokeColor?: string | object, percent?: number) => {\n return status !== 'success' && status !== 'exception' && !strokeColor && percent !== 100\n ? 'var(--blue-5)'\n : ''\n}\n\nconst Progress: React.FC<ProgressProps & ExtendsProgress> = (props) => {\n const {\n className,\n type = 'line',\n percentPosition = 'right',\n percent = 0,\n format,\n size,\n label,\n width = 132,\n status,\n halfCircle,\n gapDegree = props.halfCircle ? 135 : props.gapDegree,\n strokeColor,\n strokeWidth = 7,\n } = props\n const _percent = percentTransform(percent)\n const _strokeColor = themeStrokeColor(status, strokeColor, _percent)\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n const prefixCls = getPrefixCls('progress')\n\n const CusLabelOrPercent = (props: { type: 'line' | 'circle'; theme?: ThemeType }) => {\n const { type, theme } = props\n const labelPercentClassName = classNames(`${prefixCls}-percent-bottom`, {\n [`${prefixCls}-percent-bottom-${size}`]: size === 'small',\n [`${prefixCls}-percent-bottom-${type}`]: type === 'line',\n })\n\n const showIcon = (status: 'success' | 'exception') => (\n <Icon\n type={`${iconMap[type][status]}`}\n theme={theme}\n className={classNames({\n [`${labelPercentClassName} ${labelPercentClassName}-${status || 'success'}`]:\n type === 'line',\n })}\n />\n )\n const showPercent = (\n <div className={labelPercentClassName}>\n {format ? format?.(_percent) : _percent + '%'}\n </div>\n )\n\n let displayContent\n if (status === 'success' || status === 'exception') {\n displayContent = showIcon(status)\n } else if (status === 'normal' || status === 'active') {\n displayContent = showPercent\n } else {\n // 如果状态为空\n displayContent = _percent === 100 ? showIcon('success') : showPercent\n }\n return displayContent\n }\n\n const CusCircleAndDashboardFormat = (props: { widthNum: number }) => {\n const { widthNum } = props\n return (\n <div className={`${prefixCls}-cus-format`}>\n {!!label && (\n <Ellipsis\n className={`${prefixCls}-cus-format-label`}\n title={label}\n widthLimit={widthNum <= 64 ? widthNum : 'calc(100% - 50px)'}\n placement={widthNum <= 64 ? 'bottom' : 'top'}\n />\n )}\n <CusLabelOrPercent type=\"circle\" theme=\"outlined\" />\n </div>\n )\n }\n\n //line\n const LineProgress: React.FC = () => (\n <AntdProgress\n strokeColor={_strokeColor}\n {...props}\n className={classNames('tnt-progress', className, {\n [`${prefixCls}-percent-bottom`]: percentPosition === 'bottom',\n })}\n />\n )\n\n //circle,dashboard (额外新增label和半圆选项)\n const CircleAndDashboardProgress: React.FC = () => {\n const widthNum = Number(String(width).split('px').shift())\n return (\n <AntdProgress\n gapDegree={gapDegree}\n strokeColor={_strokeColor}\n strokeWidth={strokeWidth}\n {...props}\n type={halfCircle ? 'dashboard' : type}\n className={classNames('tnt-progress', `${prefixCls}-circle-progress`, className, {\n [`${prefixCls}-small-circle`]: widthNum <= 64 && label,\n [`${prefixCls}-large-circle`]: widthNum > 64 && label,\n [`${prefixCls}-small-half-circle`]: halfCircle && widthNum <= 64 && label,\n [`${prefixCls}-large-half-circle`]: halfCircle && widthNum > 64 && label,\n })}\n format={() => <CusCircleAndDashboardFormat widthNum={widthNum} />}\n />\n )\n }\n\n const progressMap = {\n line: <LineProgress />,\n circle: <CircleAndDashboardProgress />,\n dashboard: <CircleAndDashboardProgress />,\n }\n return progressMap[type]\n }}\n </ConfigConsumer>\n )\n}\n\nexport default Progress\n"]}
|
package/es/radio/radio.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
var __rest = this && this.__rest || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
4
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
5
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
6
|
-
}
|
|
7
|
-
return t;
|
|
8
|
-
};
|
|
9
|
-
/*
|
|
10
|
-
* @Author: 周泽飞 zefei.zhou@tongdun.net
|
|
11
|
-
* @Date: 2024-03-14 16:55:05
|
|
12
|
-
* @LastEditors: 周泽飞 zefei.zhou@tongdun.net
|
|
13
|
-
* @LastEditTime: 2024-03-14 17:00:03
|
|
14
|
-
* @FilePath: /tntd/packages/tntd/src/radio/radio.tsx
|
|
15
|
-
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
16
|
-
*/
|
|
17
|
-
import { ConfigConsumer } from 'antd/es/config-provider';
|
|
18
|
-
import AntdRadio from 'antd/es/radio';
|
|
19
|
-
import classNames from 'classnames';
|
|
20
|
-
import React, { forwardRef } from 'react';
|
|
21
|
-
import { connectReadonlyComponent } from '../connect';
|
|
22
|
-
import { PreviewText } from '../preview-text';
|
|
23
|
-
export * from 'antd/es/radio';
|
|
24
|
-
const tntPrefixCls = 'tnt-radio';
|
|
25
|
-
const Radio = forwardRef((_a, ref) => {
|
|
26
|
-
var {
|
|
27
|
-
className,
|
|
28
|
-
children,
|
|
29
|
-
desc
|
|
30
|
-
} = _a,
|
|
31
|
-
rest = __rest(_a, ["className", "children", "desc"]);
|
|
32
|
-
return React.createElement(ConfigConsumer, null, () => {
|
|
33
|
-
return React.createElement(AntdRadio, Object.assign({}, rest, {
|
|
34
|
-
ref: ref,
|
|
35
|
-
className: classNames(className, tntPrefixCls)
|
|
36
|
-
}), children ? React.createElement("span", {
|
|
37
|
-
className: `${tntPrefixCls}-children`
|
|
38
|
-
}, React.createElement("span", null, children), !!desc && React.createElement("span", {
|
|
39
|
-
className: `${tntPrefixCls}-desc`
|
|
40
|
-
}, desc)) : undefined);
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
const RadioGroup = forwardRef((_a, ref) => {
|
|
44
|
-
var {
|
|
45
|
-
className
|
|
46
|
-
} = _a,
|
|
47
|
-
rest = __rest(_a, ["className"]);
|
|
48
|
-
return React.createElement(ConfigConsumer, null, () => {
|
|
49
|
-
return React.createElement(AntdRadio.Group, Object.assign({}, rest, {
|
|
50
|
-
ref: ref,
|
|
51
|
-
className: classNames(className, `${tntPrefixCls}-group`)
|
|
52
|
-
}));
|
|
53
|
-
});
|
|
54
|
-
});
|
|
55
|
-
Radio.Group = connectReadonlyComponent(RadioGroup, PreviewText.Select);
|
|
56
|
-
Radio.Button = AntdRadio.Button;
|
|
57
|
-
export default Radio;
|
package/es/radio/radio.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"radio.js","sourceRoot":"","sources":["../../src/radio/radio.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAKxD,OAAO,SAAS,MAAM,eAAe,CAAA;AAErC,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAA;A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M,GAAG,SAAS,CAAC,MAAM,CAAA;AAE/B,eAAe,KAAK,CAAA","sourcesContent":["/*\n * @Author: 周泽飞 zefei.zhou@tongdun.net\n * @Date: 2024-03-14 16:55:05\n * @LastEditors: 周泽飞 zefei.zhou@tongdun.net\n * @LastEditTime: 2024-03-14 17:00:03\n * @FilePath: /tntd/packages/tntd/src/radio/radio.tsx\n * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE\n */\nimport { ConfigConsumer } from 'antd/es/config-provider'\nimport type {\n RadioGroupProps as AntdRadioGroupProps,\n RadioProps as AntdRadioProps,\n} from 'antd/es/radio'\nimport AntdRadio from 'antd/es/radio'\nimport type AntdRadioGroup from 'antd/es/radio/group'\nimport classNames from 'classnames'\nimport React, { forwardRef } from 'react'\nimport { connectReadonlyComponent } from '../connect'\nimport { PreviewText } from '../preview-text'\n\nexport * from 'antd/es/radio'\n\nexport type RadioProps = AntdRadioProps & {\n desc?: string | React.ReactNode\n}\nexport type RadioGroupProps = AntdRadioGroupProps & {\n readonly?: boolean\n}\n\ninterface RadioComponent\n extends React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<AntdRadio>> {\n Group: React.FC<RadioGroupProps>\n Button: typeof AntdRadio.Button\n}\n\nconst tntPrefixCls = 'tnt-radio'\n\nconst Radio = forwardRef<AntdRadio, RadioProps>(({ className, children, desc, ...rest }, ref) => {\n return (\n <ConfigConsumer>\n {() => {\n return (\n <AntdRadio {...rest} ref={ref} className={classNames(className, tntPrefixCls)}>\n {children ? (\n <span className={`${tntPrefixCls}-children`}>\n <span>{children}</span>\n {!!desc && <span className={`${tntPrefixCls}-desc`}>{desc}</span>}\n </span>\n ) : undefined}\n </AntdRadio>\n )\n }}\n </ConfigConsumer>\n )\n}) as RadioComponent\n\nconst RadioGroup = forwardRef<AntdRadioGroup, RadioGroupProps>(({ className, ...rest }, ref) => {\n return (\n <ConfigConsumer>\n {() => {\n return (\n <AntdRadio.Group\n {...rest}\n ref={ref}\n className={classNames(className, `${tntPrefixCls}-group`)}\n />\n )\n }}\n </ConfigConsumer>\n )\n})\n\nRadio.Group = connectReadonlyComponent(RadioGroup, PreviewText.Select)\nRadio.Button = AntdRadio.Button\n\nexport default Radio\n"]}
|
package/es/spin/spin.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: 周泽飞 zefei.zhou@tongdun.net
|
|
3
|
-
* @Date: 2024-07-19 18:49:24
|
|
4
|
-
* @LastEditors: 周泽飞 zefei.zhou@tongdun.net
|
|
5
|
-
* @LastEditTime: 2024-07-19 18:54:42
|
|
6
|
-
* @FilePath: /tntd/packages/tntd/src/spin/spin.tsx
|
|
7
|
-
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
8
|
-
*/
|
|
9
|
-
var __rest = this && this.__rest || function (s, e) {
|
|
10
|
-
var t = {};
|
|
11
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
12
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
13
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
14
|
-
}
|
|
15
|
-
return t;
|
|
16
|
-
};
|
|
17
|
-
import React, { forwardRef } from 'react';
|
|
18
|
-
import { ConfigConsumer } from 'antd/es/config-provider';
|
|
19
|
-
import { default as AntdSpin } from 'antd/es/spin';
|
|
20
|
-
import classNames from 'classnames';
|
|
21
|
-
import './spin.less';
|
|
22
|
-
export const Spin = forwardRef((props, ref) => {
|
|
23
|
-
const {
|
|
24
|
-
className,
|
|
25
|
-
wrapperClassName
|
|
26
|
-
} = props,
|
|
27
|
-
restProps = __rest(props, ["className", "wrapperClassName"]);
|
|
28
|
-
return React.createElement(ConfigConsumer, null, () => {
|
|
29
|
-
return React.createElement(AntdSpin, Object.assign({
|
|
30
|
-
wrapperClassName: classNames('tnt-spin-nested', wrapperClassName || ''),
|
|
31
|
-
className: classNames('tnt-spin', className || '')
|
|
32
|
-
}, restProps, {
|
|
33
|
-
ref: ref
|
|
34
|
-
}));
|
|
35
|
-
});
|
|
36
|
-
});
|
package/es/spin/spin.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"spin.js","sourceRoot":"","sources":["../../src/spin/spin.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;;;;;;;;;;;;AAEH,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,UAAU,MAAM,YAAY,CAAA;AAEnC,OAAO,aAAa,CAAA;AAKpB,MAAM,CAAC,MAAM,IAAI,GAAG,UAAU,CAA0B,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACrE,MAAM,EAAE,SAAS,EAAE,gBAAgB,KAAmB,KAAK,EAAnB,SAAS,UAAK,KAAK,EAArD,iCAA6C,CAAQ,CAAA;IAC3D,OAAO,CACL,oBAAC,cAAc,QACZ,GAAG,EAAE;QACJ,OAAO,CACL,oBAAC,QAAQ,kBACP,gBAAgB,EAAE,UAAU,CAAC,iBAAiB,EAAE,gBAAgB,IAAI,EAAE,CAAC,EACvE,SAAS,EAAE,UAAU,CAAC,UAAU,EAAE,SAAS,IAAI,EAAE,CAAC,IAC9C,SAAS,IACb,GAAG,EAAE,GAAG,IACR,CACH,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CAAkB,CAAA","sourcesContent":["/*\n * @Author: 周泽飞 zefei.zhou@tongdun.net\n * @Date: 2024-07-19 18:49:24\n * @LastEditors: 周泽飞 zefei.zhou@tongdun.net\n * @LastEditTime: 2024-07-19 18:54:42\n * @FilePath: /tntd/packages/tntd/src/spin/spin.tsx\n * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE\n */\n\nimport React, { forwardRef } from 'react'\nimport type { SpinProps as AntdSpinProps } from 'antd/es/spin'\nimport { ConfigConsumer } from 'antd/es/config-provider'\nimport { default as AntdSpin } from 'antd/es/spin'\nimport classNames from 'classnames'\n\nimport './spin.less'\n\ninterface SpinComponent\n extends React.ForwardRefExoticComponent<AntdSpinProps & React.RefAttributes<AntdSpin>> {}\n\nexport const Spin = forwardRef<AntdSpin, AntdSpinProps>((props, ref) => {\n const { className, wrapperClassName, ...restProps } = props\n return (\n <ConfigConsumer>\n {() => {\n return (\n <AntdSpin\n wrapperClassName={classNames('tnt-spin-nested', wrapperClassName || '')}\n className={classNames('tnt-spin', className || '')}\n {...restProps}\n ref={ref}\n />\n )\n }}\n </ConfigConsumer>\n )\n}) as SpinComponent\n"]}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
var __rest = this && this.__rest || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
4
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
5
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
6
|
-
}
|
|
7
|
-
return t;
|
|
8
|
-
};
|
|
9
|
-
import React from 'react';
|
|
10
|
-
import Icon from '../icon';
|
|
11
|
-
import { ConfigConsumer } from 'antd/es/config-provider';
|
|
12
|
-
import AntTimePicker from 'antd/es/time-picker';
|
|
13
|
-
import classNames from 'classnames';
|
|
14
|
-
export * from 'antd/es/time-picker';
|
|
15
|
-
const TimePicker = props => {
|
|
16
|
-
//theme样式类型 outline | fill 默认 outline
|
|
17
|
-
const {
|
|
18
|
-
theme = 'outline',
|
|
19
|
-
className,
|
|
20
|
-
suffixIcon
|
|
21
|
-
} = props,
|
|
22
|
-
restProps = __rest(props, ["theme", "className", "suffixIcon"]);
|
|
23
|
-
const defaultIcon = React.createElement(Icon, {
|
|
24
|
-
type: "clock-circle"
|
|
25
|
-
});
|
|
26
|
-
return React.createElement(ConfigConsumer, null, ({
|
|
27
|
-
getPrefixCls
|
|
28
|
-
}) => {
|
|
29
|
-
const prefixCls = getPrefixCls('time-picker');
|
|
30
|
-
return React.createElement(AntTimePicker, Object.assign({
|
|
31
|
-
suffixIcon: suffixIcon || defaultIcon,
|
|
32
|
-
className: classNames(className, `${prefixCls}-${theme}`)
|
|
33
|
-
}, restProps));
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
export default TimePicker;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TimePicker.js","sourceRoot":"","sources":["../../src/time-picker/TimePicker.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AACvC,OAAO,IAAI,MAAM,SAAS,CAAA;AAE1B,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,aAAa,MAAM,qBAAqB,CAAA;AAC/C,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,MAAM,UAAU,GAA2E,CACzF,KAAK,EACL,EAAE;IACF,sCAAsC;IACtC,MAAM,EAAE,KAAK,GAAG,SAAS,EAAE,SAAS,EAAE,UAAU,KAAmB,KAAK,EAAnB,SAAS,UAAK,KAAK,EAAlE,oCAA0D,CAAQ,CAAA;IACxE,MAAM,WAAW,GAAG,oBAAC,IAAI,IAAC,IAAI,EAAC,cAAc,GAAG,CAAA;IAEhD,OAAO,CACL,oBAAC,cAAc,QACZ,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;QACpB,MAAM,SAAS,GAAG,YAAY,CAAC,aAAa,CAAC,CAAA;QAC7C,OAAO,CACL,oBAAC,aAAa,kBACZ,UAAU,EAAE,UAAU,IAAI,WAAW,EACrC,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,GAAG,SAAS,IAAI,KAAK,EAAE,CAAC,IACrD,SAAS,EACb,CACH,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CAAA;AAED,eAAe,UAAU,CAAA","sourcesContent":["import React, { useState } from 'react'\nimport Icon from '../icon'\nimport type { TimePickerProps as AntdTimePickerProps } from 'antd/es/time-picker'\nimport { ConfigConsumer } from 'antd/es/config-provider'\nimport AntTimePicker from 'antd/es/time-picker'\nimport classNames from 'classnames'\nexport * from 'antd/es/time-picker'\nconst TimePicker: React.FC<AntdTimePickerProps & { theme?: string; readonly?: boolean }> = (\n props\n) => {\n //theme样式类型 outline | fill 默认 outline\n const { theme = 'outline', className, suffixIcon, ...restProps } = props\n const defaultIcon = <Icon type=\"clock-circle\" />\n\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n const prefixCls = getPrefixCls('time-picker')\n return (\n <AntTimePicker\n suffixIcon={suffixIcon || defaultIcon}\n className={classNames(className, `${prefixCls}-${theme}`)}\n {...restProps}\n />\n )\n }}\n </ConfigConsumer>\n )\n}\n\nexport default TimePicker\n"]}
|