tntd 2.8.48 → 2.8.49

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.
Files changed (177) hide show
  1. package/es/modal/modal.js +2 -2
  2. package/es/modal/modal.js.map +1 -1
  3. package/es/modal/style/modal.less +13 -1
  4. package/lib/modal/modal.js +2 -2
  5. package/lib/modal/modal.js.map +1 -1
  6. package/lib/modal/style/modal.less +13 -1
  7. package/package.json +1 -1
  8. package/es/alert/alert.js +0 -147
  9. package/es/alert/alert.js.map +0 -1
  10. package/es/alert/alert.less +0 -128
  11. package/es/cascader/cascader.js +0 -84
  12. package/es/cascader/cascader.js.map +0 -1
  13. package/es/cascader/cascader.less +0 -16
  14. package/es/checkbox/check.png +0 -0
  15. package/es/checkbox/checkbox.js +0 -100
  16. package/es/checkbox/checkbox.js.map +0 -1
  17. package/es/checkbox/checkbox.less +0 -69
  18. package/es/date-picker/DatePicker.js +0 -163
  19. package/es/date-picker/DatePicker.js.map +0 -1
  20. package/es/date-picker/index.less +0 -294
  21. package/es/input-number/inputNumber.js +0 -89
  22. package/es/input-number/inputNumber.js.map +0 -1
  23. package/es/input-number/inputNumber.less +0 -12
  24. package/es/modal/index.less +0 -52
  25. package/es/popconfirm/index.less +0 -32
  26. package/es/popconfirm/popconfirm.js +0 -96
  27. package/es/popconfirm/popconfirm.js.map +0 -1
  28. package/es/popover/index.less +0 -57
  29. package/es/popover/popover.js +0 -90
  30. package/es/popover/popover.js.map +0 -1
  31. package/es/progress/progress.js +0 -179
  32. package/es/progress/progress.js.map +0 -1
  33. package/es/progress/progress.less +0 -82
  34. package/es/query-form/Field/Composition/FieldPopover.js +0 -466
  35. package/es/query-form/Field/Composition/FieldPopover.js.map +0 -1
  36. package/es/query-form/Field/Composition/FieldPopover.less +0 -41
  37. package/es/query-form/Field/Composition/Select.js +0 -260
  38. package/es/query-form/Field/Composition/Select.js.map +0 -1
  39. package/es/query-form/Field/Composition/SelectInput.js +0 -112
  40. package/es/query-form/Field/Composition/SelectInput.js.map +0 -1
  41. package/es/query-form/Field/Composition/ValueTag.js +0 -241
  42. package/es/query-form/Field/Composition/ValueTag.js.map +0 -1
  43. package/es/query-form/Field/Composition/index.js +0 -448
  44. package/es/query-form/Field/Composition/index.js.map +0 -1
  45. package/es/query-form/Field/Composition/index.less +0 -167
  46. package/es/query-form/Field/Composition/utils.js +0 -173
  47. package/es/query-form/Field/Composition/utils.js.map +0 -1
  48. package/es/query-form-backup/Field/Composition/FieldPopover.less +0 -35
  49. package/es/query-form-backup/Field/Composition/index.less +0 -114
  50. package/es/query-form-backup/index.less +0 -90
  51. package/es/query-form-v2/index.less +0 -133
  52. package/es/radio/radio.js +0 -110
  53. package/es/radio/radio.js.map +0 -1
  54. package/es/radio/radio.less +0 -43
  55. package/es/spin/spin.js +0 -79
  56. package/es/spin/spin.js.map +0 -1
  57. package/es/spin/spin.less +0 -9
  58. package/es/steps/assets/background_left.svg +0 -12
  59. package/es/steps/assets/background_right.svg +0 -12
  60. package/es/steps/assets/horizontal_line.svg +0 -3
  61. package/es/steps/assets/vertical_line.svg +0 -3
  62. package/es/steps/stepStyle/icon.less +0 -51
  63. package/es/steps/stepStyle/progress-dot.less +0 -10
  64. package/es/steps/stepStyle/variables.less +0 -8
  65. package/es/steps/stepStyle/vertical.less +0 -41
  66. package/es/switch/index.less +0 -45
  67. package/es/tabs/tabs.less +0 -125
  68. package/es/time-picker/TimePicker.js +0 -90
  69. package/es/time-picker/TimePicker.js.map +0 -1
  70. package/es/time-picker/index.less +0 -38
  71. package/es/tntd-action/Action.js +0 -218
  72. package/es/tntd-action/Action.js.map +0 -1
  73. package/es/tntd-action/index.less +0 -61
  74. package/es/tntd-select/index.less +0 -7
  75. package/lib/alert/alert.d.ts +0 -12
  76. package/lib/alert/alert.d.ts.map +0 -1
  77. package/lib/alert/alert.js +0 -147
  78. package/lib/alert/alert.js.map +0 -1
  79. package/lib/alert/alert.less +0 -128
  80. package/lib/cascader/cascader.d.ts +0 -10
  81. package/lib/cascader/cascader.d.ts.map +0 -1
  82. package/lib/cascader/cascader.js +0 -84
  83. package/lib/cascader/cascader.js.map +0 -1
  84. package/lib/cascader/cascader.less +0 -16
  85. package/lib/checkbox/check.png +0 -0
  86. package/lib/checkbox/checkbox.d.ts +0 -16
  87. package/lib/checkbox/checkbox.d.ts.map +0 -1
  88. package/lib/checkbox/checkbox.js +0 -100
  89. package/lib/checkbox/checkbox.js.map +0 -1
  90. package/lib/checkbox/checkbox.less +0 -69
  91. package/lib/date-picker/DatePicker.d.ts +0 -21
  92. package/lib/date-picker/DatePicker.d.ts.map +0 -1
  93. package/lib/date-picker/DatePicker.js +0 -163
  94. package/lib/date-picker/DatePicker.js.map +0 -1
  95. package/lib/date-picker/index.less +0 -294
  96. package/lib/input-number/inputNumber.d.ts +0 -10
  97. package/lib/input-number/inputNumber.d.ts.map +0 -1
  98. package/lib/input-number/inputNumber.js +0 -89
  99. package/lib/input-number/inputNumber.js.map +0 -1
  100. package/lib/input-number/inputNumber.less +0 -12
  101. package/lib/modal/index.less +0 -52
  102. package/lib/popconfirm/index.less +0 -32
  103. package/lib/popconfirm/popconfirm.d.ts +0 -8
  104. package/lib/popconfirm/popconfirm.d.ts.map +0 -1
  105. package/lib/popconfirm/popconfirm.js +0 -96
  106. package/lib/popconfirm/popconfirm.js.map +0 -1
  107. package/lib/popover/index.less +0 -57
  108. package/lib/popover/popover.d.ts +0 -14
  109. package/lib/popover/popover.d.ts.map +0 -1
  110. package/lib/popover/popover.js +0 -90
  111. package/lib/popover/popover.js.map +0 -1
  112. package/lib/progress/progress.d.ts +0 -12
  113. package/lib/progress/progress.d.ts.map +0 -1
  114. package/lib/progress/progress.js +0 -179
  115. package/lib/progress/progress.js.map +0 -1
  116. package/lib/progress/progress.less +0 -82
  117. package/lib/query-form/Field/Composition/FieldPopover.d.ts +0 -19
  118. package/lib/query-form/Field/Composition/FieldPopover.d.ts.map +0 -1
  119. package/lib/query-form/Field/Composition/FieldPopover.js +0 -466
  120. package/lib/query-form/Field/Composition/FieldPopover.js.map +0 -1
  121. package/lib/query-form/Field/Composition/FieldPopover.less +0 -41
  122. package/lib/query-form/Field/Composition/Select.d.ts +0 -4
  123. package/lib/query-form/Field/Composition/Select.d.ts.map +0 -1
  124. package/lib/query-form/Field/Composition/Select.js +0 -260
  125. package/lib/query-form/Field/Composition/Select.js.map +0 -1
  126. package/lib/query-form/Field/Composition/SelectInput.d.ts +0 -3
  127. package/lib/query-form/Field/Composition/SelectInput.d.ts.map +0 -1
  128. package/lib/query-form/Field/Composition/SelectInput.js +0 -112
  129. package/lib/query-form/Field/Composition/SelectInput.js.map +0 -1
  130. package/lib/query-form/Field/Composition/ValueTag.d.ts +0 -13
  131. package/lib/query-form/Field/Composition/ValueTag.d.ts.map +0 -1
  132. package/lib/query-form/Field/Composition/ValueTag.js +0 -241
  133. package/lib/query-form/Field/Composition/ValueTag.js.map +0 -1
  134. package/lib/query-form/Field/Composition/index.d.ts +0 -15
  135. package/lib/query-form/Field/Composition/index.d.ts.map +0 -1
  136. package/lib/query-form/Field/Composition/index.js +0 -448
  137. package/lib/query-form/Field/Composition/index.js.map +0 -1
  138. package/lib/query-form/Field/Composition/index.less +0 -167
  139. package/lib/query-form/Field/Composition/utils.d.ts +0 -21
  140. package/lib/query-form/Field/Composition/utils.d.ts.map +0 -1
  141. package/lib/query-form/Field/Composition/utils.js +0 -173
  142. package/lib/query-form/Field/Composition/utils.js.map +0 -1
  143. package/lib/query-form-backup/Field/Composition/FieldPopover.less +0 -35
  144. package/lib/query-form-backup/Field/Composition/index.less +0 -114
  145. package/lib/query-form-backup/index.less +0 -90
  146. package/lib/query-form-v2/index.less +0 -133
  147. package/lib/radio/radio.d.ts +0 -17
  148. package/lib/radio/radio.d.ts.map +0 -1
  149. package/lib/radio/radio.js +0 -110
  150. package/lib/radio/radio.js.map +0 -1
  151. package/lib/radio/radio.less +0 -43
  152. package/lib/spin/spin.d.ts +0 -9
  153. package/lib/spin/spin.d.ts.map +0 -1
  154. package/lib/spin/spin.js +0 -79
  155. package/lib/spin/spin.js.map +0 -1
  156. package/lib/spin/spin.less +0 -9
  157. package/lib/steps/assets/background_left.svg +0 -12
  158. package/lib/steps/assets/background_right.svg +0 -12
  159. package/lib/steps/assets/horizontal_line.svg +0 -3
  160. package/lib/steps/assets/vertical_line.svg +0 -3
  161. package/lib/steps/stepStyle/icon.less +0 -51
  162. package/lib/steps/stepStyle/progress-dot.less +0 -10
  163. package/lib/steps/stepStyle/variables.less +0 -8
  164. package/lib/steps/stepStyle/vertical.less +0 -41
  165. package/lib/switch/index.less +0 -45
  166. package/lib/tabs/tabs.less +0 -125
  167. package/lib/time-picker/TimePicker.d.ts +0 -9
  168. package/lib/time-picker/TimePicker.d.ts.map +0 -1
  169. package/lib/time-picker/TimePicker.js +0 -90
  170. package/lib/time-picker/TimePicker.js.map +0 -1
  171. package/lib/time-picker/index.less +0 -38
  172. package/lib/tntd-action/Action.d.ts +0 -6
  173. package/lib/tntd-action/Action.d.ts.map +0 -1
  174. package/lib/tntd-action/Action.js +0 -218
  175. package/lib/tntd-action/Action.js.map +0 -1
  176. package/lib/tntd-action/index.less +0 -61
  177. package/lib/tntd-select/index.less +0 -7
@@ -1 +0,0 @@
1
- {"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../src/popover/popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAKnD,cAAc,iBAAiB,CAAA;AAI/B,UAAU,QAAS,SAAQ,YAAY;IACrC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB;AAED,QAAA,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CACrB,QAAQ,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAAC,WAAW,CAAC,EAAE,OAAO,CAAA;CAAE,CA8B7E,CAAA;AAED,eAAe,OAAO,CAAA"}
@@ -1,90 +0,0 @@
1
- "use strict";
2
-
3
- function _typeof(o) {
4
- "@babel/helpers - typeof";
5
-
6
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
7
- return typeof o;
8
- } : function (o) {
9
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
10
- }, _typeof(o);
11
- }
12
- Object.defineProperty(exports, "__esModule", {
13
- value: true
14
- });
15
- var _exportNames = {};
16
- exports["default"] = void 0;
17
- var _react = _interopRequireDefault(require("react"));
18
- var _configProvider = require("antd/lib/config-provider");
19
- var _popover = _interopRequireWildcard(require("antd/lib/popover"));
20
- Object.keys(_popover).forEach(function (key) {
21
- if (key === "default" || key === "__esModule") return;
22
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
23
- if (key in exports && exports[key] === _popover[key]) return;
24
- Object.defineProperty(exports, key, {
25
- enumerable: true,
26
- get: function get() {
27
- return _popover[key];
28
- }
29
- });
30
- });
31
- var _classnames = _interopRequireDefault(require("classnames"));
32
- function _getRequireWildcardCache(e) {
33
- if ("function" != typeof WeakMap) return null;
34
- var r = new WeakMap(),
35
- t = new WeakMap();
36
- return (_getRequireWildcardCache = function _getRequireWildcardCache(e) {
37
- return e ? t : r;
38
- })(e);
39
- }
40
- function _interopRequireWildcard(e, r) {
41
- if (!r && e && e.__esModule) return e;
42
- if (null === e || "object" != _typeof(e) && "function" != typeof e) return {
43
- "default": e
44
- };
45
- var t = _getRequireWildcardCache(r);
46
- if (t && t.has(e)) return t.get(e);
47
- var n = {
48
- __proto__: null
49
- },
50
- a = Object.defineProperty && Object.getOwnPropertyDescriptor;
51
- for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) {
52
- var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
53
- i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
54
- }
55
- return n["default"] = e, t && t.set(e, n), n;
56
- }
57
- function _interopRequireDefault(e) {
58
- return e && e.__esModule ? e : {
59
- "default": e
60
- };
61
- }
62
- var __rest = void 0 && (void 0).__rest || function (s, e) {
63
- var t = {};
64
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
65
- if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
66
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
67
- }
68
- return t;
69
- };
70
- var themeMap = function themeMap(prefixCls, themeColor) {
71
- return "".concat(prefixCls, "-").concat(themeColor);
72
- };
73
- var Popover = function Popover(props) {
74
- var overlayClassName = props.overlayClassName,
75
- _props$theme = props.theme,
76
- theme = _props$theme === void 0 ? '' : _props$theme,
77
- _props$titleDivider = props.titleDivider,
78
- titleDivider = _props$titleDivider === void 0 ? false : _props$titleDivider,
79
- _props$hiddenArrow = props.hiddenArrow,
80
- hiddenArrow = _props$hiddenArrow === void 0 ? false : _props$hiddenArrow,
81
- restProps = __rest(props, ["overlayClassName", "theme", "titleDivider", "hiddenArrow"]);
82
- return _react["default"].createElement(_configProvider.ConfigConsumer, null, function (_ref) {
83
- var getPrefixCls = _ref.getPrefixCls;
84
- var prefixCls = getPrefixCls('popover');
85
- return _react["default"].createElement(_popover["default"], Object.assign({
86
- overlayClassName: (0, _classnames["default"])(prefixCls, 'tnt-popover', themeMap(prefixCls, theme), hiddenArrow ? prefixCls + '-arrow-hidden' : '', overlayClassName)
87
- }, restProps));
88
- });
89
- };
90
- var _default = exports["default"] = Popover;
@@ -1 +0,0 @@
1
- {"version":3,"file":"popover.js","sourceRoot":"","sources":["../../src/popover/popover.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAyB;AAEzB,6DAAwD;AACxD,8DAAyC;AACzC,4DAAmC;AAEnC,kDAA+B;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,8BAAC,gCAAc,QACZ,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;QACpB,MAAM,SAAS,GAAG,YAAY,CAAC,SAAS,CAAC,CAAA;QAEzC,OAAO,CACL,8BAAC,iBAAW,kBACV,gBAAgB,EAAE,IAAA,oBAAU,EAC1B,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,kBAAe,OAAO,CAAA","sourcesContent":["import React from 'react'\nimport type { PopoverProps } from 'antd/lib/popover'\nimport { ConfigConsumer } from 'antd/lib/config-provider'\nimport AntdPopover from 'antd/lib/popover'\nimport classNames from 'classnames'\n\nexport * from 'antd/lib/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"]}
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import type { ProgressProps } from 'antd/lib/progress';
3
- import './progress.less';
4
- export * from 'antd/lib/tooltip';
5
- interface ExtendsProgress {
6
- percentPosition?: 'bottom' | 'right';
7
- label?: React.ReactNode;
8
- halfCircle?: boolean;
9
- }
10
- declare const Progress: React.FC<ProgressProps & ExtendsProgress>;
11
- export default Progress;
12
- //# sourceMappingURL=progress.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../src/progress/progress.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAOrD,OAAO,iBAAiB,CAAA;AACxB,cAAc,iBAAiB,CAAA;AAE/B,UAAU,eAAe;IACvB,eAAe,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAA;IACpC,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACvB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAwBD,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,GAAG,eAAe,CAoHvD,CAAA;AAED,eAAe,QAAQ,CAAA"}
@@ -1,179 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var _exportNames = {};
7
- exports["default"] = void 0;
8
- var _react = _interopRequireDefault(require("react"));
9
- var _configProvider = require("antd/lib/config-provider");
10
- var _progress = _interopRequireDefault(require("antd/lib/progress"));
11
- var _classnames = _interopRequireDefault(require("classnames"));
12
- var _ellipsis = _interopRequireDefault(require("../ellipsis"));
13
- var _icon = _interopRequireDefault(require("../icon"));
14
- require("./progress.less");
15
- var _tooltip = require("antd/lib/tooltip");
16
- Object.keys(_tooltip).forEach(function (key) {
17
- if (key === "default" || key === "__esModule") return;
18
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
19
- if (key in exports && exports[key] === _tooltip[key]) return;
20
- Object.defineProperty(exports, key, {
21
- enumerable: true,
22
- get: function get() {
23
- return _tooltip[key];
24
- }
25
- });
26
- });
27
- function _interopRequireDefault(e) {
28
- return e && e.__esModule ? e : {
29
- "default": e
30
- };
31
- }
32
- function _typeof(o) {
33
- "@babel/helpers - typeof";
34
-
35
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
36
- return typeof o;
37
- } : function (o) {
38
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
39
- }, _typeof(o);
40
- }
41
- function _defineProperty(e, r, t) {
42
- return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
43
- value: t,
44
- enumerable: !0,
45
- configurable: !0,
46
- writable: !0
47
- }) : e[r] = t, e;
48
- }
49
- function _toPropertyKey(t) {
50
- var i = _toPrimitive(t, "string");
51
- return "symbol" == _typeof(i) ? i : i + "";
52
- }
53
- function _toPrimitive(t, r) {
54
- if ("object" != _typeof(t) || !t) return t;
55
- var e = t[Symbol.toPrimitive];
56
- if (void 0 !== e) {
57
- var i = e.call(t, r || "default");
58
- if ("object" != _typeof(i)) return i;
59
- throw new TypeError("@@toPrimitive must return a primitive value.");
60
- }
61
- return ("string" === r ? String : Number)(t);
62
- }
63
- var iconMap = {
64
- line: {
65
- success: 'check-circle',
66
- exception: 'close-circle'
67
- },
68
- circle: {
69
- success: 'check',
70
- exception: 'close'
71
- }
72
- };
73
- var ifPercentBottom = function ifPercentBottom(type, percentPosition) {
74
- return type === 'line' && percentPosition === 'bottom';
75
- };
76
- var percentTransform = function percentTransform(percent) {
77
- return percent >= 100 ? 100 : percent <= 0 ? 0 : percent;
78
- };
79
- var themeStrokeColor = function themeStrokeColor(status, strokeColor, percent) {
80
- return status !== 'success' && status !== 'exception' && !strokeColor && percent !== 100 ? 'var(--blue-5)' : '';
81
- };
82
- var Progress = function Progress(props) {
83
- var className = props.className,
84
- _props$type = props.type,
85
- type = _props$type === void 0 ? 'line' : _props$type,
86
- _props$percentPositio = props.percentPosition,
87
- percentPosition = _props$percentPositio === void 0 ? 'right' : _props$percentPositio,
88
- _props$percent = props.percent,
89
- percent = _props$percent === void 0 ? 0 : _props$percent,
90
- format = props.format,
91
- size = props.size,
92
- label = props.label,
93
- _props$width = props.width,
94
- width = _props$width === void 0 ? 132 : _props$width,
95
- status = props.status,
96
- halfCircle = props.halfCircle,
97
- _props$gapDegree = props.gapDegree,
98
- gapDegree = _props$gapDegree === void 0 ? props.halfCircle ? 135 : props.gapDegree : _props$gapDegree,
99
- strokeColor = props.strokeColor,
100
- _props$strokeWidth = props.strokeWidth,
101
- strokeWidth = _props$strokeWidth === void 0 ? 7 : _props$strokeWidth;
102
- var _percent = percentTransform(percent);
103
- var _strokeColor = themeStrokeColor(status, strokeColor, _percent);
104
- return _react["default"].createElement(_configProvider.ConfigConsumer, null, function (_ref) {
105
- var getPrefixCls = _ref.getPrefixCls;
106
- var prefixCls = getPrefixCls('progress');
107
- var CusLabelOrPercent = function CusLabelOrPercent(props) {
108
- var type = props.type,
109
- theme = props.theme;
110
- var labelPercentClassName = (0, _classnames["default"])("".concat(prefixCls, "-percent-bottom"), _defineProperty(_defineProperty({}, "".concat(prefixCls, "-percent-bottom-").concat(size), size === 'small'), "".concat(prefixCls, "-percent-bottom-").concat(type), type === 'line'));
111
- var showIcon = function showIcon(status) {
112
- return _react["default"].createElement(_icon["default"], {
113
- type: "".concat(iconMap[type][status]),
114
- theme: theme,
115
- className: (0, _classnames["default"])(_defineProperty({}, "".concat(labelPercentClassName, " ").concat(labelPercentClassName, "-").concat(status || 'success'), type === 'line'))
116
- });
117
- };
118
- var showPercent = _react["default"].createElement("div", {
119
- className: labelPercentClassName
120
- }, format ? format === null || format === void 0 ? void 0 : format(_percent) : _percent + '%');
121
- var displayContent;
122
- if (status === 'success' || status === 'exception') {
123
- displayContent = showIcon(status);
124
- } else if (status === 'normal' || status === 'active') {
125
- displayContent = showPercent;
126
- } else {
127
- // 如果状态为空
128
- displayContent = _percent === 100 ? showIcon('success') : showPercent;
129
- }
130
- return displayContent;
131
- };
132
- var CusCircleAndDashboardFormat = function CusCircleAndDashboardFormat(props) {
133
- var widthNum = props.widthNum;
134
- return _react["default"].createElement("div", {
135
- className: "".concat(prefixCls, "-cus-format")
136
- }, !!label && _react["default"].createElement(_ellipsis["default"], {
137
- className: "".concat(prefixCls, "-cus-format-label"),
138
- title: label,
139
- widthLimit: widthNum <= 64 ? widthNum : 'calc(100% - 50px)',
140
- placement: widthNum <= 64 ? 'bottom' : 'top'
141
- }), _react["default"].createElement(CusLabelOrPercent, {
142
- type: "circle",
143
- theme: "outlined"
144
- }));
145
- };
146
- //line
147
- var LineProgress = function LineProgress() {
148
- return _react["default"].createElement(_progress["default"], Object.assign({
149
- strokeColor: _strokeColor
150
- }, props, {
151
- className: (0, _classnames["default"])('tnt-progress', className, _defineProperty({}, "".concat(prefixCls, "-percent-bottom"), percentPosition === 'bottom'))
152
- }));
153
- };
154
- //circle,dashboard (额外新增label和半圆选项)
155
- var CircleAndDashboardProgress = function CircleAndDashboardProgress() {
156
- var widthNum = Number(String(width).split('px').shift());
157
- return _react["default"].createElement(_progress["default"], Object.assign({
158
- gapDegree: gapDegree,
159
- strokeColor: _strokeColor,
160
- strokeWidth: strokeWidth
161
- }, props, {
162
- type: halfCircle ? 'dashboard' : type,
163
- className: (0, _classnames["default"])('tnt-progress', "".concat(prefixCls, "-circle-progress"), className, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-small-circle"), widthNum <= 64 && label), "".concat(prefixCls, "-large-circle"), widthNum > 64 && label), "".concat(prefixCls, "-small-half-circle"), halfCircle && widthNum <= 64 && label), "".concat(prefixCls, "-large-half-circle"), halfCircle && widthNum > 64 && label)),
164
- format: function format() {
165
- return _react["default"].createElement(CusCircleAndDashboardFormat, {
166
- widthNum: widthNum
167
- });
168
- }
169
- }));
170
- };
171
- var progressMap = {
172
- line: _react["default"].createElement(LineProgress, null),
173
- circle: _react["default"].createElement(CircleAndDashboardProgress, null),
174
- dashboard: _react["default"].createElement(CircleAndDashboardProgress, null)
175
- };
176
- return progressMap[type];
177
- });
178
- };
179
- var _default = exports["default"] = Progress;
@@ -1 +0,0 @@
1
- {"version":3,"file":"progress.js","sourceRoot":"","sources":["../../src/progress/progress.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,kDAAyB;AAGzB,6DAAwD;AACxD,gEAA2C;AAC3C,4DAAmC;AACnC,2DAAkC;AAClC,mDAA0B;AAC1B,2BAAwB;AACxB,kDAA+B;AAO/B,MAAM,OAAO,GAAG;IACd,IAAI,EAAE;QACJ,OAAO,EAAE,cAAc;QACvB,SAAS,EAAE,cAAc;KAC1B;IACD,MAAM,EAAE;QACN,OAAO,EAAE,OAAO;QAChB,SAAS,EAAE,OAAO;KACnB;CACF,CAAA;AACD,MAAM,eAAe,GAAG,CAAC,IAAY,EAAE,eAAuB,EAAE,EAAE;IAChE,OAAO,IAAI,KAAK,MAAM,IAAI,eAAe,KAAK,QAAQ,CAAA;AACxD,CAAC,CAAA;AACD,MAAM,gBAAgB,GAAG,CAAC,OAAe,EAAE,EAAE;IAC3C,OAAO,OAAO,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAA;AAC1D,CAAC,CAAA;AAED,MAAM,gBAAgB,GAAG,CAAC,MAAe,EAAE,WAA6B,EAAE,OAAgB,EAAE,EAAE;IAC5F,O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AAG,EAAE,IAAI,KAAK;iBACzE,CAAC,EACF,MAAM,EAAE,GAAG,EAAE,CAAC,8BAAC,2BAA2B,IAAC,QAAQ,EAAE,QAAQ,GAAI,IACjE,CACH,CAAA;QACH,CAAC,CAAA;QAED,MAAM,WAAW,GAAG;YAClB,IAAI,EAAE,8BAAC,YAAY,OAAG;YACtB,MAAM,EAAE,8BAAC,0BAA0B,OAAG;YACtC,SAAS,EAAE,8BAAC,0BAA0B,OAAG;SAC1C,CAAA;QACD,OAAO,WAAW,CAAC,IAAI,CAAC,CAAA;IAC1B,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CAAA;AAED,kBAAe,QAAQ,CAAA","sourcesContent":["import React from 'react'\nimport type { ProgressProps } from 'antd/lib/progress'\nimport type { ThemeType } from 'antd/lib/icon'\nimport { ConfigConsumer } from 'antd/lib/config-provider'\nimport AntdProgress from 'antd/lib/progress'\nimport classNames from 'classnames'\nimport Ellipsis from '../ellipsis'\nimport Icon from '../icon'\nimport './progress.less'\nexport * from 'antd/lib/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"]}
@@ -1,82 +0,0 @@
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
-
@@ -1,19 +0,0 @@
1
- declare var _default: React.ForwardRefExoticComponent<Pick<{
2
- [x: string]: any;
3
- visible: any;
4
- setVisible: any;
5
- searchText: any;
6
- children: any;
7
- value: any;
8
- regex: any;
9
- fieldItems: any;
10
- propItem: any;
11
- setFieldItem: any;
12
- onChange: any;
13
- form: any;
14
- locale: any;
15
- clsPrefix: any;
16
- }, string | number> & React.RefAttributes<any>>;
17
- export default _default;
18
- import React from "react";
19
- //# sourceMappingURL=FieldPopover.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FieldPopover.d.ts","sourceRoot":"","sources":["../../../../src/query-form/Field/Composition/FieldPopover.js"],"names":[],"mappings":""}