tntd 2.8.0-beta.3 → 2.8.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/alert/alert.js +70 -0
- package/es/alert/alert.js.map +1 -0
- package/es/alert/alert.less +128 -0
- package/es/breadcrumb/style/index.less +2 -1
- package/es/button/button.less +72 -0
- package/es/cascader/style/index.less +2 -2
- package/es/checkbox/check.png +0 -0
- package/es/checkbox/checkbox.js +48 -0
- package/es/checkbox/checkbox.js.map +1 -0
- package/es/checkbox/checkbox.less +69 -0
- package/es/collapse/style/index.less +2 -1
- package/es/color-picker/index.less +4 -1
- package/es/date-picker/DatePicker.js +101 -0
- package/es/date-picker/DatePicker.js.map +1 -0
- package/es/date-picker/index.less +294 -0
- package/es/date-picker/style/Picker.less +2 -1
- package/es/drawer/index.less +154 -0
- package/es/drawer/style/drawer.less +4 -2
- package/es/dropdown/style/index.less +2 -1
- package/es/form/form.less +36 -0
- package/es/grid/RowContext.js +3 -0
- package/es/grid/RowContext.js.map +1 -0
- package/es/grid/col.js +103 -0
- package/es/grid/col.js.map +1 -0
- package/es/grid/hooks/useBreakpoint.js +18 -0
- package/es/grid/hooks/useBreakpoint.js.map +1 -0
- package/es/grid/row.js +154 -0
- package/es/grid/row.js.map +1 -0
- package/es/grid/style/rtl.less +69 -0
- package/es/icon/index.js +2 -1
- package/es/icon/index.js.map +1 -1
- package/es/icon/style/index.js +2 -1
- package/es/icon/style/index.js.map +1 -1
- package/es/icon/style/style.less +6 -0
- package/es/input/style/mixin.less +1 -1
- package/es/input-number/inputNumber.js +29 -0
- package/es/input-number/inputNumber.js.map +1 -0
- package/es/input-number/inputNumber.less +12 -0
- package/es/modal/index.less +36 -0
- package/es/modal/style/confirm.less +1 -1
- package/es/modal/style/modal.less +5 -1
- package/es/notification/assets/index.js +2 -0
- package/es/notification/assets/index.js.map +1 -0
- package/es/notification/assets/svg-error-tip.js +145 -0
- package/es/notification/assets/svg-error-tip.js.map +1 -0
- package/es/notification/assets/svg-success-tip.js +162 -0
- package/es/notification/assets/svg-success-tip.js.map +1 -0
- package/es/notification/notification.js +80 -0
- package/es/notification/notification.js.map +1 -0
- package/es/notification/notification.less +59 -0
- package/es/notification/style/index.less +4 -2
- package/es/popconfirm/index.less +32 -0
- package/es/popconfirm/popconfirm.js +43 -0
- package/es/popconfirm/popconfirm.js.map +1 -0
- package/es/popover/index.less +57 -0
- package/es/popover/popover.js +34 -0
- package/es/popover/popover.js.map +1 -0
- package/es/popover/style/index.less +2 -1
- package/es/progress/progress.js +132 -0
- package/es/progress/progress.js.map +1 -0
- package/es/progress/progress.less +82 -0
- package/es/query-form/Field/Composition/FieldPopover.js +284 -0
- package/es/query-form/Field/Composition/FieldPopover.js.map +1 -0
- package/es/query-form/Field/Composition/FieldPopover.less +35 -0
- package/es/query-form/Field/Composition/Select.js +108 -0
- package/es/query-form/Field/Composition/Select.js.map +1 -0
- package/es/query-form/Field/Composition/index.js +275 -0
- package/es/query-form/Field/Composition/index.js.map +1 -0
- package/es/query-form/Field/Composition/index.less +106 -0
- package/es/query-form/Field/Composition/utils.js +19 -0
- package/es/query-form/Field/Composition/utils.js.map +1 -0
- package/es/radio/radio.js +57 -0
- package/es/radio/radio.js.map +1 -0
- package/es/radio/radio.less +43 -0
- package/es/select/style/index.less +2 -1
- package/es/steps/assets/background_left.svg +12 -0
- package/es/steps/assets/background_right.svg +12 -0
- package/es/steps/assets/horizontal_line.svg +3 -0
- package/es/steps/assets/vertical_line.svg +3 -0
- package/es/steps/stepStyle/icon.less +51 -0
- package/es/steps/stepStyle/progress-dot.less +10 -0
- package/es/steps/stepStyle/variables.less +8 -0
- package/es/steps/stepStyle/vertical.less +41 -0
- package/es/style/mixins/iconfont.less +3 -2
- package/es/style/themes/default.less +3 -2
- package/es/switch/index.less +46 -0
- package/es/tabs/tabs.less +114 -0
- package/es/tag/color.less +43 -0
- package/es/tag/tag.js +171 -0
- package/es/tag/tag.js.map +1 -0
- package/es/tag/tag.less +193 -0
- package/es/time-picker/TimePicker.js +36 -0
- package/es/time-picker/TimePicker.js.map +1 -0
- package/es/time-picker/index.less +38 -0
- package/es/time-picker/style/index.less +2 -1
- package/es/timeline/style/index.less +1 -1
- package/es/tntd-action/Action.js +66 -0
- package/es/tntd-action/Action.js.map +1 -0
- package/es/tntd-action/index.less +53 -0
- package/es/tooltip/index.less +29 -0
- package/es/tooltip/tooltip.js +33 -0
- package/es/tooltip/tooltip.js.map +1 -0
- package/lib/alert/alert.d.ts +12 -0
- package/lib/alert/alert.d.ts.map +1 -0
- package/lib/alert/alert.js +92 -0
- package/lib/alert/alert.js.map +1 -0
- package/lib/alert/alert.less +128 -0
- package/lib/breadcrumb/style/index.less +2 -1
- package/lib/button/button.less +72 -0
- package/lib/cascader/style/index.less +2 -2
- package/lib/checkbox/check.png +0 -0
- package/lib/checkbox/checkbox.d.ts +16 -0
- package/lib/checkbox/checkbox.d.ts.map +1 -0
- package/lib/checkbox/checkbox.js +65 -0
- package/lib/checkbox/checkbox.js.map +1 -0
- package/lib/checkbox/checkbox.less +69 -0
- package/lib/collapse/style/index.less +2 -1
- package/lib/color-picker/index.less +4 -1
- package/lib/date-picker/DatePicker.d.ts +21 -0
- package/lib/date-picker/DatePicker.d.ts.map +1 -0
- package/lib/date-picker/DatePicker.js +128 -0
- package/lib/date-picker/DatePicker.js.map +1 -0
- package/lib/date-picker/index.less +294 -0
- package/lib/date-picker/style/Picker.less +2 -1
- package/lib/drawer/index.less +154 -0
- package/lib/drawer/style/drawer.less +4 -2
- package/lib/dropdown/style/index.less +2 -1
- package/lib/form/form.less +36 -0
- package/lib/grid/RowContext.d.ts +9 -0
- package/lib/grid/RowContext.d.ts.map +1 -0
- package/lib/grid/RowContext.js +9 -0
- package/lib/grid/RowContext.js.map +1 -0
- package/lib/grid/col.d.ts +29 -0
- package/lib/grid/col.d.ts.map +1 -0
- package/lib/grid/col.js +100 -0
- package/lib/grid/col.js.map +1 -0
- package/lib/grid/hooks/useBreakpoint.d.ts +4 -0
- package/lib/grid/hooks/useBreakpoint.d.ts.map +1 -0
- package/lib/grid/hooks/useBreakpoint.js +28 -0
- package/lib/grid/hooks/useBreakpoint.js.map +1 -0
- package/lib/grid/row.d.ts +21 -0
- package/lib/grid/row.d.ts.map +1 -0
- package/lib/grid/row.js +183 -0
- package/lib/grid/row.js.map +1 -0
- package/lib/grid/style/rtl.less +69 -0
- package/lib/icon/index.d.ts +1 -0
- package/lib/icon/index.d.ts.map +1 -1
- package/lib/icon/index.js +2 -1
- package/lib/icon/index.js.map +1 -1
- package/lib/icon/style/index.d.ts +1 -0
- package/lib/icon/style/index.d.ts.map +1 -1
- package/lib/icon/style/index.js +2 -1
- package/lib/icon/style/index.js.map +1 -1
- package/lib/icon/style/style.less +6 -0
- package/lib/input/style/mixin.less +1 -1
- package/lib/input-number/inputNumber.d.ts +10 -0
- package/lib/input-number/inputNumber.d.ts.map +1 -0
- package/lib/input-number/inputNumber.js +48 -0
- package/lib/input-number/inputNumber.js.map +1 -0
- package/lib/input-number/inputNumber.less +12 -0
- package/lib/modal/index.less +36 -0
- package/lib/modal/style/confirm.less +1 -1
- package/lib/modal/style/modal.less +5 -1
- package/lib/notification/assets/index.d.ts +3 -0
- package/lib/notification/assets/index.d.ts.map +1 -0
- package/lib/notification/assets/index.js +20 -0
- package/lib/notification/assets/index.js.map +1 -0
- package/lib/notification/assets/svg-error-tip.d.ts +4 -0
- package/lib/notification/assets/svg-error-tip.d.ts.map +1 -0
- package/lib/notification/assets/svg-error-tip.js +154 -0
- package/lib/notification/assets/svg-error-tip.js.map +1 -0
- package/lib/notification/assets/svg-success-tip.d.ts +4 -0
- package/lib/notification/assets/svg-success-tip.d.ts.map +1 -0
- package/lib/notification/assets/svg-success-tip.js +171 -0
- package/lib/notification/assets/svg-success-tip.js.map +1 -0
- package/lib/notification/notification.d.ts +9 -0
- package/lib/notification/notification.d.ts.map +1 -0
- package/lib/notification/notification.js +105 -0
- package/lib/notification/notification.js.map +1 -0
- package/lib/notification/notification.less +59 -0
- package/lib/notification/style/index.less +4 -2
- package/lib/popconfirm/index.less +32 -0
- package/lib/popconfirm/popconfirm.d.ts +8 -0
- package/lib/popconfirm/popconfirm.d.ts.map +1 -0
- package/lib/popconfirm/popconfirm.js +61 -0
- package/lib/popconfirm/popconfirm.js.map +1 -0
- package/lib/popover/index.less +57 -0
- package/lib/popover/popover.d.ts +14 -0
- package/lib/popover/popover.d.ts.map +1 -0
- package/lib/popover/popover.js +55 -0
- package/lib/popover/popover.js.map +1 -0
- package/lib/popover/style/index.less +2 -1
- package/lib/progress/progress.d.ts +12 -0
- package/lib/progress/progress.d.ts.map +1 -0
- package/lib/progress/progress.js +148 -0
- package/lib/progress/progress.js.map +1 -0
- package/lib/progress/progress.less +82 -0
- package/lib/query-form/Field/Composition/FieldPopover.d.ts +17 -0
- package/lib/query-form/Field/Composition/FieldPopover.d.ts.map +1 -0
- package/lib/query-form/Field/Composition/FieldPopover.js +319 -0
- package/lib/query-form/Field/Composition/FieldPopover.js.map +1 -0
- package/lib/query-form/Field/Composition/FieldPopover.less +35 -0
- package/lib/query-form/Field/Composition/Select.d.ts +4 -0
- package/lib/query-form/Field/Composition/Select.d.ts.map +1 -0
- package/lib/query-form/Field/Composition/Select.js +132 -0
- package/lib/query-form/Field/Composition/Select.js.map +1 -0
- package/lib/query-form/Field/Composition/index.d.ts +14 -0
- package/lib/query-form/Field/Composition/index.d.ts.map +1 -0
- package/lib/query-form/Field/Composition/index.js +330 -0
- package/lib/query-form/Field/Composition/index.js.map +1 -0
- package/lib/query-form/Field/Composition/index.less +106 -0
- package/lib/query-form/Field/Composition/utils.d.ts +6 -0
- package/lib/query-form/Field/Composition/utils.d.ts.map +1 -0
- package/lib/query-form/Field/Composition/utils.js +27 -0
- package/lib/query-form/Field/Composition/utils.js.map +1 -0
- package/lib/radio/radio.d.ts +17 -0
- package/lib/radio/radio.d.ts.map +1 -0
- package/lib/radio/radio.js +75 -0
- package/lib/radio/radio.js.map +1 -0
- package/lib/radio/radio.less +43 -0
- package/lib/select/style/index.less +2 -1
- package/lib/steps/assets/background_left.svg +12 -0
- package/lib/steps/assets/background_right.svg +12 -0
- package/lib/steps/assets/horizontal_line.svg +3 -0
- package/lib/steps/assets/vertical_line.svg +3 -0
- package/lib/steps/stepStyle/icon.less +51 -0
- package/lib/steps/stepStyle/progress-dot.less +10 -0
- package/lib/steps/stepStyle/variables.less +8 -0
- package/lib/steps/stepStyle/vertical.less +41 -0
- package/lib/style/mixins/iconfont.less +3 -2
- package/lib/style/themes/default.less +3 -2
- package/lib/switch/index.less +46 -0
- package/lib/tabs/tabs.less +114 -0
- package/lib/tag/color.less +43 -0
- package/lib/tag/tag.d.ts +41 -0
- package/lib/tag/tag.d.ts.map +1 -0
- package/lib/tag/tag.js +183 -0
- package/lib/tag/tag.js.map +1 -0
- package/lib/tag/tag.less +193 -0
- package/lib/time-picker/TimePicker.d.ts +9 -0
- package/lib/time-picker/TimePicker.d.ts.map +1 -0
- package/lib/time-picker/TimePicker.js +55 -0
- package/lib/time-picker/TimePicker.js.map +1 -0
- package/lib/time-picker/index.less +38 -0
- package/lib/time-picker/style/index.less +2 -1
- package/lib/timeline/style/index.less +1 -1
- package/lib/tntd-action/Action.d.ts +6 -0
- package/lib/tntd-action/Action.d.ts.map +1 -0
- package/lib/tntd-action/Action.js +86 -0
- package/lib/tntd-action/Action.js.map +1 -0
- package/lib/tntd-action/index.less +53 -0
- package/lib/tooltip/index.less +29 -0
- package/lib/tooltip/tooltip.d.ts +9 -0
- package/lib/tooltip/tooltip.d.ts.map +1 -0
- package/lib/tooltip/tooltip.js +53 -0
- package/lib/tooltip/tooltip.js.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Notification from 'antd/es/notification';
|
|
3
|
+
import Icon from '../icon';
|
|
4
|
+
import classNames from 'classnames';
|
|
5
|
+
export * from 'antd/es/notification';
|
|
6
|
+
import { SvgErrorTip, SvgSuccessTip } from './assets';
|
|
7
|
+
const prefixCls = 'ant-notification-notice';
|
|
8
|
+
const tntPrefixCls = 'tnt-notification-notice';
|
|
9
|
+
const api = Object.assign(Object.assign({}, Notification), {
|
|
10
|
+
successInfo: args => {
|
|
11
|
+
return Notification.open(Object.assign(Object.assign({}, args), {
|
|
12
|
+
icon: React.createElement(Icon, {
|
|
13
|
+
className: "img-icon",
|
|
14
|
+
component: () => React.createElement(SvgSuccessTip, {
|
|
15
|
+
fill: "currentColor",
|
|
16
|
+
width: 46,
|
|
17
|
+
height: 46
|
|
18
|
+
})
|
|
19
|
+
}),
|
|
20
|
+
type: 'success',
|
|
21
|
+
className: classNames(args.className, tntPrefixCls)
|
|
22
|
+
}));
|
|
23
|
+
},
|
|
24
|
+
errorInfo: args => {
|
|
25
|
+
return Notification.open(Object.assign(Object.assign({}, args), {
|
|
26
|
+
icon: React.createElement(Icon, {
|
|
27
|
+
className: "img-icon",
|
|
28
|
+
component: () => React.createElement(SvgErrorTip, {
|
|
29
|
+
fill: "currentColor",
|
|
30
|
+
width: 46,
|
|
31
|
+
height: 46
|
|
32
|
+
})
|
|
33
|
+
}),
|
|
34
|
+
type: 'success',
|
|
35
|
+
className: classNames(args.className, tntPrefixCls)
|
|
36
|
+
}));
|
|
37
|
+
},
|
|
38
|
+
success: args => {
|
|
39
|
+
return Notification.success(Object.assign(Object.assign({}, args), {
|
|
40
|
+
icon: !args.icon && React.createElement(Icon, {
|
|
41
|
+
theme: "filled",
|
|
42
|
+
className: `${prefixCls}-icon ${prefixCls}-icon-success ${tntPrefixCls}-icon`,
|
|
43
|
+
type: "check-circle-o"
|
|
44
|
+
}),
|
|
45
|
+
className: classNames(args.className, tntPrefixCls)
|
|
46
|
+
}));
|
|
47
|
+
},
|
|
48
|
+
error: args => {
|
|
49
|
+
return Notification.error(Object.assign(Object.assign({}, args), {
|
|
50
|
+
icon: !args.icon && React.createElement(Icon, {
|
|
51
|
+
theme: "filled",
|
|
52
|
+
className: `${prefixCls}-icon ${prefixCls}-icon-error ${tntPrefixCls}-icon`,
|
|
53
|
+
type: "close-circle-o"
|
|
54
|
+
}),
|
|
55
|
+
className: classNames(args.className, tntPrefixCls)
|
|
56
|
+
}));
|
|
57
|
+
},
|
|
58
|
+
info: args => {
|
|
59
|
+
return Notification.info(Object.assign(Object.assign({}, args), {
|
|
60
|
+
icon: !args.icon && React.createElement(Icon, {
|
|
61
|
+
theme: "filled",
|
|
62
|
+
className: `${prefixCls}-icon ${prefixCls}-icon-info ${tntPrefixCls}-icon`,
|
|
63
|
+
type: "info-circle-o"
|
|
64
|
+
}),
|
|
65
|
+
className: classNames(args.className, tntPrefixCls)
|
|
66
|
+
}));
|
|
67
|
+
},
|
|
68
|
+
warning: args => {
|
|
69
|
+
return Notification.warning(Object.assign(Object.assign({}, args), {
|
|
70
|
+
icon: !args.icon && React.createElement(Icon, {
|
|
71
|
+
theme: "filled",
|
|
72
|
+
className: `${prefixCls}-icon ${prefixCls}-icon-warning ${tntPrefixCls}-icon`,
|
|
73
|
+
type: "exclamation-circle-o"
|
|
74
|
+
}),
|
|
75
|
+
className: classNames(args.className, tntPrefixCls)
|
|
76
|
+
}));
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
api.warn = api.warning;
|
|
80
|
+
export default api;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification.js","sourceRoot":"","sources":["../../src/notification/notification.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,YAAY,MAAM,sBAAsB,CAAA;AAC/C,OAAO,IAAI,MAAM,SAAS,CAAA;AAC1B,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,cAAc,sBAAsB,CAAA;AAEpC,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAOrD,MAAM,SAAS,GAAG,yBAAyB,CAAA;AAC3C,MAAM,YAAY,GAAG,yBAAyB,CAAA;AAE9C,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O,YAAY,CAAC,KAAK,iCACpB,IAAI,KACP,IAAI,EAAE,CAAC,IAAI,CAAC,IAAI,IAAI,CAClB,oBAAC,IAAI,IACH,KAAK,EAAC,QAAQ,EACd,SAAS,EAAE,GAAG,SAAS,SAAS,SAAS,eAAe,YAAY,OAAO,EAC3E,IAAI,EAAC,gBAAgB,GACrB,CACH,EACD,SAAS,EAAE,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,IACnD,CAAA;IACJ,CAAC,EACD,IAAI,EAAE,CAAC,IAAe,EAAE,EAAE;QACxB,OAAO,YAAY,CAAC,IAAI,iCACnB,IAAI,KACP,IAAI,EAAE,CAAC,IAAI,CAAC,IAAI,IAAI,CAClB,oBAAC,IAAI,IACH,KAAK,EAAC,QAAQ,EACd,SAAS,EAAE,GAAG,SAAS,SAAS,SAAS,cAAc,YAAY,OAAO,EAC1E,IAAI,EAAC,eAAe,GACpB,CACH,EACD,SAAS,EAAE,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,IACnD,CAAA;IACJ,CAAC,EACD,OAAO,EAAE,CAAC,IAAe,EAAE,EAAE;QAC3B,OAAO,YAAY,CAAC,OAAO,iCACtB,IAAI,KACP,IAAI,EAAE,CAAC,IAAI,CAAC,IAAI,IAAI,CAClB,oBAAC,IAAI,IACH,KAAK,EAAC,QAAQ,EACd,SAAS,EAAE,GAAG,SAAS,SAAS,SAAS,iBAAiB,YAAY,OAAO,EAC7E,IAAI,EAAC,sBAAsB,GAC3B,CACH,EACD,SAAS,EAAE,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,IACnD,CAAA;IACJ,CAAC,GACF,CAAA;AAED,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,OAAO,CAAA;AAEtB,eAAe,GAAG,CAAA","sourcesContent":["import React from 'react'\nimport type { NotificationApi as AntdNotificationApi, ArgsProps } from 'antd/es/notification'\nimport Notification from 'antd/es/notification'\nimport Icon from '../icon'\nimport classNames from 'classnames'\nexport * from 'antd/es/notification'\n\nimport { SvgErrorTip, SvgSuccessTip } from './assets'\n\ninterface NotificationApi extends AntdNotificationApi {\n successInfo(args: ArgsProps): void\n errorInfo(args: ArgsProps): void\n}\n\nconst prefixCls = 'ant-notification-notice'\nconst tntPrefixCls = 'tnt-notification-notice'\n\nconst api: NotificationApi = {\n ...Notification,\n successInfo: (args: ArgsProps) => {\n return Notification.open({\n ...args,\n icon: (\n <Icon\n className=\"img-icon\"\n component={() => <SvgSuccessTip fill=\"currentColor\" width={46} height={46} />}\n />\n ),\n type: 'success',\n className: classNames(args.className, tntPrefixCls),\n })\n },\n errorInfo: (args: ArgsProps) => {\n return Notification.open({\n ...args,\n icon: (\n <Icon\n className=\"img-icon\"\n component={() => <SvgErrorTip fill=\"currentColor\" width={46} height={46} />}\n />\n ),\n type: 'success',\n className: classNames(args.className, tntPrefixCls),\n })\n },\n success: (args: ArgsProps) => {\n return Notification.success({\n ...args,\n icon: !args.icon && (\n <Icon\n theme=\"filled\"\n className={`${prefixCls}-icon ${prefixCls}-icon-success ${tntPrefixCls}-icon`}\n type=\"check-circle-o\"\n />\n ),\n className: classNames(args.className, tntPrefixCls),\n })\n },\n error: (args: ArgsProps) => {\n return Notification.error({\n ...args,\n icon: !args.icon && (\n <Icon\n theme=\"filled\"\n className={`${prefixCls}-icon ${prefixCls}-icon-error ${tntPrefixCls}-icon`}\n type=\"close-circle-o\"\n />\n ),\n className: classNames(args.className, tntPrefixCls),\n })\n },\n info: (args: ArgsProps) => {\n return Notification.info({\n ...args,\n icon: !args.icon && (\n <Icon\n theme=\"filled\"\n className={`${prefixCls}-icon ${prefixCls}-icon-info ${tntPrefixCls}-icon`}\n type=\"info-circle-o\"\n />\n ),\n className: classNames(args.className, tntPrefixCls),\n })\n },\n warning: (args: ArgsProps) => {\n return Notification.warning({\n ...args,\n icon: !args.icon && (\n <Icon\n theme=\"filled\"\n className={`${prefixCls}-icon ${prefixCls}-icon-warning ${tntPrefixCls}-icon`}\n type=\"exclamation-circle-o\"\n />\n ),\n className: classNames(args.className, tntPrefixCls),\n })\n },\n}\n\napi.warn = api.warning\n\nexport default api\n"]}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
@notification-padding-horizontal-sm: 20px;
|
|
2
|
+
@notification-prefix-cls: ~'@{ant-prefix}-notification';
|
|
3
|
+
@tnt-notification-prefix-cls: ~'tnt-notification';
|
|
4
|
+
@notification-padding-vertical: 16px;
|
|
5
|
+
@tnt-notification-padding: @notification-padding-vertical @notification-padding-horizontal-sm;
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
.@{notification-prefix-cls}-notice-message {
|
|
9
|
+
font-weight: 500;
|
|
10
|
+
}
|
|
11
|
+
.@{notification-prefix-cls}-notice-description {
|
|
12
|
+
color: @text-color-secondary;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
.@{notification-prefix-cls}-notice-with-icon:has(.@{tnt-notification-prefix-cls}-notice-icon) {
|
|
17
|
+
.@{notification-prefix-cls}-notice-icon {
|
|
18
|
+
left: 10px;
|
|
19
|
+
top: 9px;
|
|
20
|
+
margin: 0;
|
|
21
|
+
padding: 0;
|
|
22
|
+
font-size: @font-size-xl;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.@{notification-prefix-cls}-notice-message {
|
|
26
|
+
margin-left: 28px;
|
|
27
|
+
}
|
|
28
|
+
.@{notification-prefix-cls}-notice-description {
|
|
29
|
+
margin-left: 28px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.@{notification-prefix-cls}-notice:has(.img-icon) {
|
|
35
|
+
.@{notification-prefix-cls}-notice-icon {
|
|
36
|
+
left: 20px;
|
|
37
|
+
margin: 0;
|
|
38
|
+
}
|
|
39
|
+
.@{notification-prefix-cls}-notice-message {
|
|
40
|
+
margin-left: 64px;
|
|
41
|
+
}
|
|
42
|
+
.@{notification-prefix-cls}-notice-description {
|
|
43
|
+
margin-left: 64px;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.@{notification-prefix-cls} {
|
|
48
|
+
&-notice{
|
|
49
|
+
padding: @notification-padding !important;
|
|
50
|
+
border-radius: @border-radius-lg !important;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&-close-icon {
|
|
54
|
+
// font-size: @font-size-base;
|
|
55
|
+
font-size: @font-size-lg;
|
|
56
|
+
cursor: pointer;
|
|
57
|
+
color: tint(@text-color, 50%);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
&-close-icon {
|
|
32
|
-
font-size:
|
|
32
|
+
font-size: 20px;
|
|
33
33
|
cursor: pointer;
|
|
34
34
|
}
|
|
35
35
|
|
|
@@ -53,7 +53,9 @@
|
|
|
53
53
|
// https://github.com/ant-design/ant-design/issues/5846#issuecomment-296244140
|
|
54
54
|
&-single-line-auto-margin {
|
|
55
55
|
display: block;
|
|
56
|
-
width: calc(
|
|
56
|
+
width: calc(
|
|
57
|
+
@notification-width - @notification-padding-horizontal * 2 - 24px - 48px - 100%
|
|
58
|
+
);
|
|
57
59
|
max-width: 4px;
|
|
58
60
|
background-color: transparent;
|
|
59
61
|
pointer-events: none;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
@popover-prefix-cls: ~'@{ant-prefix}-popover';
|
|
2
|
+
|
|
3
|
+
.@{popover-prefix-cls} {
|
|
4
|
+
&-inner-content {
|
|
5
|
+
padding: @padding-base;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
&-message {
|
|
9
|
+
padding: 0 0 @padding-xs;
|
|
10
|
+
|
|
11
|
+
&>.anticon {
|
|
12
|
+
font-size: @font-size-lg;
|
|
13
|
+
top: 7px;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&-message-title {
|
|
18
|
+
padding-top: @padding-xxs;
|
|
19
|
+
padding-bottom: @padding-xxs;
|
|
20
|
+
line-height: @line-height-base;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&-buttons {
|
|
24
|
+
margin-bottom: 0;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.@{popover-prefix-cls}-arrow-hidden {
|
|
29
|
+
.@{popover-prefix-cls}-arrow {
|
|
30
|
+
display: none;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
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;
|
|
@@ -0,0 +1 @@
|
|
|
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"]}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
@popover-prefix-cls: ~'@{ant-prefix}-popover';
|
|
2
|
+
|
|
3
|
+
// Base class
|
|
4
|
+
.tnt-popover.@{popover-prefix-cls} {
|
|
5
|
+
|
|
6
|
+
&-dark,
|
|
7
|
+
&-light {
|
|
8
|
+
.@{popover-prefix-cls}-title {
|
|
9
|
+
border-bottom: 0px !important;
|
|
10
|
+
padding: 10px 12px 4px !important;
|
|
11
|
+
border-bottom: 0px !important;
|
|
12
|
+
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.@{popover-prefix-cls}-inner {
|
|
16
|
+
&-content {
|
|
17
|
+
padding: 0px 12px 12px 12px;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&-dark {
|
|
23
|
+
.@{popover-prefix-cls}-title {
|
|
24
|
+
color: @popover-color-dark;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.@{popover-prefix-cls}-inner {
|
|
28
|
+
background-color: @popover-bg-dark;
|
|
29
|
+
|
|
30
|
+
&-content {
|
|
31
|
+
color: @popover-color-dark;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.@{popover-prefix-cls}-arrow {
|
|
36
|
+
border-color: @popover-arrow-color-dark !important;
|
|
37
|
+
|
|
38
|
+
&::before {
|
|
39
|
+
background-color: @popover-bg-dark;
|
|
40
|
+
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
// Arrows
|
|
47
|
+
&-arrow {
|
|
48
|
+
border-radius: 1px;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
.@{popover-prefix-cls}-arrow-hidden {
|
|
54
|
+
.@{popover-prefix-cls}-arrow {
|
|
55
|
+
display: none;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
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;
|
|
@@ -0,0 +1 @@
|
|
|
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"]}
|
|
@@ -90,7 +90,8 @@
|
|
|
90
90
|
position: absolute;
|
|
91
91
|
top: 8px; // 4px for padding-top, 4px for vertical middle;
|
|
92
92
|
color: @warning-color;
|
|
93
|
-
font-size: @font-size-base;
|
|
93
|
+
// font-size: @font-size-base;
|
|
94
|
+
font-size: 16px;
|
|
94
95
|
}
|
|
95
96
|
&-title {
|
|
96
97
|
padding-left: calc(@font-size-base + 8px);
|
|
@@ -0,0 +1,132 @@
|
|
|
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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress.js","sourceRoot":"","sources":["../../src/progress/progress.tsx"],"names":[],"mappings":"AA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ACc,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"]}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
@import '../style/themes/index.less';
|
|
2
|
+
@import '../style/mixins/index';
|
|
3
|
+
@progress-prefix-cls: ~'@{ant-prefix}-progress';
|
|
4
|
+
.tnt-progress.@{progress-prefix-cls} {
|
|
5
|
+
.ant-progress-text{
|
|
6
|
+
// font-family: PingFang SC;
|
|
7
|
+
font-weight: 500;
|
|
8
|
+
}
|
|
9
|
+
.ant-progress-cus-format-label{
|
|
10
|
+
.ant-progress-cus-format-label{
|
|
11
|
+
padding-bottom: 4px;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
&-percent-bottom{
|
|
15
|
+
.ant-progress-outer{
|
|
16
|
+
padding-right: 0;
|
|
17
|
+
}
|
|
18
|
+
.ant-progress-text{
|
|
19
|
+
width: 100%;
|
|
20
|
+
display: block;
|
|
21
|
+
text-align: right;
|
|
22
|
+
margin-left: 0;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
&-circle-progress{
|
|
26
|
+
.@{progress-prefix-cls}-cus-format{
|
|
27
|
+
height: 100%;
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
justify-content: center;
|
|
31
|
+
align-items: center;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
&-small-circle{
|
|
35
|
+
.ant-progress-text{
|
|
36
|
+
height: 100%;
|
|
37
|
+
}
|
|
38
|
+
.ant-progress-inner{
|
|
39
|
+
overflow:visible;
|
|
40
|
+
}
|
|
41
|
+
.tntd-ellipsis{
|
|
42
|
+
position: absolute;
|
|
43
|
+
bottom: -1.8em;
|
|
44
|
+
font-size: 0.75em;
|
|
45
|
+
// margin-bottom: 2px;
|
|
46
|
+
// color: #8B919E;
|
|
47
|
+
color:tint(@text-color, 50%);
|
|
48
|
+
font-family: Inter;
|
|
49
|
+
font-weight: 500;
|
|
50
|
+
text-align: center;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
&-large-circle{
|
|
54
|
+
.ant-progress-text{
|
|
55
|
+
height: 100%;
|
|
56
|
+
}
|
|
57
|
+
.tntd-ellipsis{
|
|
58
|
+
font-size: 0.55em;
|
|
59
|
+
// margin-bottom: 2px;
|
|
60
|
+
color:tint(@text-color, 50%);
|
|
61
|
+
font-family: Inter;
|
|
62
|
+
font-weight: 500;
|
|
63
|
+
text-align: center;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
&-small-half-circle{
|
|
67
|
+
.ant-progress-text{
|
|
68
|
+
height: 40%;
|
|
69
|
+
}
|
|
70
|
+
.tntd-ellipsis{
|
|
71
|
+
bottom: -1.5em;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
&-large-half-circle{
|
|
75
|
+
.ant-progress-inner{
|
|
76
|
+
.ant-progress-text{
|
|
77
|
+
top: 42%
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|