tntd 2.8.0-beta.3 → 2.8.0-beta.5

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 (281) hide show
  1. package/es/alert/alert.js +70 -0
  2. package/es/alert/alert.js.map +1 -0
  3. package/es/alert/alert.less +128 -0
  4. package/es/breadcrumb/style/index.less +2 -1
  5. package/es/button/button.less +72 -0
  6. package/es/cascader/style/index.less +2 -2
  7. package/es/checkbox/check.png +0 -0
  8. package/es/checkbox/checkbox.js +48 -0
  9. package/es/checkbox/checkbox.js.map +1 -0
  10. package/es/checkbox/checkbox.less +69 -0
  11. package/es/collapse/style/index.less +2 -1
  12. package/es/color-picker/index.less +4 -1
  13. package/es/date-picker/DatePicker.js +101 -0
  14. package/es/date-picker/DatePicker.js.map +1 -0
  15. package/es/date-picker/index.less +294 -0
  16. package/es/date-picker/style/Picker.less +2 -1
  17. package/es/drawer/index.less +154 -0
  18. package/es/drawer/style/drawer.less +4 -2
  19. package/es/dropdown/style/index.less +2 -1
  20. package/es/form/form.less +36 -0
  21. package/es/grid/RowContext.js +3 -0
  22. package/es/grid/RowContext.js.map +1 -0
  23. package/es/grid/col.js +103 -0
  24. package/es/grid/col.js.map +1 -0
  25. package/es/grid/hooks/useBreakpoint.js +18 -0
  26. package/es/grid/hooks/useBreakpoint.js.map +1 -0
  27. package/es/grid/row.js +154 -0
  28. package/es/grid/row.js.map +1 -0
  29. package/es/grid/style/rtl.less +69 -0
  30. package/es/icon/index.js +2 -1
  31. package/es/icon/index.js.map +1 -1
  32. package/es/icon/style/index.js +2 -1
  33. package/es/icon/style/index.js.map +1 -1
  34. package/es/icon/style/style.less +6 -0
  35. package/es/index.js +2 -0
  36. package/es/index.js.map +1 -1
  37. package/es/input/style/mixin.less +1 -1
  38. package/es/input-number/inputNumber.js +29 -0
  39. package/es/input-number/inputNumber.js.map +1 -0
  40. package/es/input-number/inputNumber.less +12 -0
  41. package/es/modal/index.less +36 -0
  42. package/es/modal/style/confirm.less +1 -1
  43. package/es/modal/style/modal.less +5 -1
  44. package/es/notification/assets/index.js +2 -0
  45. package/es/notification/assets/index.js.map +1 -0
  46. package/es/notification/assets/svg-error-tip.js +145 -0
  47. package/es/notification/assets/svg-error-tip.js.map +1 -0
  48. package/es/notification/assets/svg-success-tip.js +162 -0
  49. package/es/notification/assets/svg-success-tip.js.map +1 -0
  50. package/es/notification/notification.js +80 -0
  51. package/es/notification/notification.js.map +1 -0
  52. package/es/notification/notification.less +59 -0
  53. package/es/notification/style/index.less +4 -2
  54. package/es/popconfirm/index.less +32 -0
  55. package/es/popconfirm/popconfirm.js +43 -0
  56. package/es/popconfirm/popconfirm.js.map +1 -0
  57. package/es/popover/index.less +57 -0
  58. package/es/popover/popover.js +34 -0
  59. package/es/popover/popover.js.map +1 -0
  60. package/es/popover/style/index.less +2 -1
  61. package/es/progress/progress.js +132 -0
  62. package/es/progress/progress.js.map +1 -0
  63. package/es/progress/progress.less +82 -0
  64. package/es/query-form/Field/Composition/FieldPopover.js +284 -0
  65. package/es/query-form/Field/Composition/FieldPopover.js.map +1 -0
  66. package/es/query-form/Field/Composition/FieldPopover.less +35 -0
  67. package/es/query-form/Field/Composition/Select.js +108 -0
  68. package/es/query-form/Field/Composition/Select.js.map +1 -0
  69. package/es/query-form/Field/Composition/index.js +275 -0
  70. package/es/query-form/Field/Composition/index.js.map +1 -0
  71. package/es/query-form/Field/Composition/index.less +106 -0
  72. package/es/query-form/Field/Composition/utils.js +19 -0
  73. package/es/query-form/Field/Composition/utils.js.map +1 -0
  74. package/es/radio/radio.js +57 -0
  75. package/es/radio/radio.js.map +1 -0
  76. package/es/radio/radio.less +43 -0
  77. package/es/select/style/index.less +2 -1
  78. package/es/steps/assets/background_left.svg +12 -0
  79. package/es/steps/assets/background_right.svg +12 -0
  80. package/es/steps/assets/horizontal_line.svg +3 -0
  81. package/es/steps/assets/vertical_line.svg +3 -0
  82. package/es/steps/stepStyle/icon.less +51 -0
  83. package/es/steps/stepStyle/progress-dot.less +10 -0
  84. package/es/steps/stepStyle/variables.less +8 -0
  85. package/es/steps/stepStyle/vertical.less +41 -0
  86. package/es/style/mixins/iconfont.less +3 -2
  87. package/es/style/themes/default.less +3 -2
  88. package/es/switch/index.less +46 -0
  89. package/es/table-container/index.js +12 -0
  90. package/es/table-container/index.js.map +1 -0
  91. package/es/table-container/index.less +12 -0
  92. package/es/tabs/tabs.less +116 -0
  93. package/es/tabs-container/index.js +12 -0
  94. package/es/tabs-container/index.js.map +1 -0
  95. package/es/tabs-container/index.less +51 -0
  96. package/es/tag/color.less +43 -0
  97. package/es/tag/tag.js +171 -0
  98. package/es/tag/tag.js.map +1 -0
  99. package/es/tag/tag.less +193 -0
  100. package/es/time-picker/TimePicker.js +36 -0
  101. package/es/time-picker/TimePicker.js.map +1 -0
  102. package/es/time-picker/index.less +38 -0
  103. package/es/time-picker/style/index.less +2 -1
  104. package/es/timeline/style/index.less +1 -1
  105. package/es/tntd-action/Action.js +66 -0
  106. package/es/tntd-action/Action.js.map +1 -0
  107. package/es/tntd-action/index.less +53 -0
  108. package/es/tooltip/index.less +29 -0
  109. package/es/tooltip/tooltip.js +33 -0
  110. package/es/tooltip/tooltip.js.map +1 -0
  111. package/lib/alert/alert.d.ts +12 -0
  112. package/lib/alert/alert.d.ts.map +1 -0
  113. package/lib/alert/alert.js +92 -0
  114. package/lib/alert/alert.js.map +1 -0
  115. package/lib/alert/alert.less +128 -0
  116. package/lib/breadcrumb/style/index.less +2 -1
  117. package/lib/button/button.less +72 -0
  118. package/lib/cascader/style/index.less +2 -2
  119. package/lib/checkbox/check.png +0 -0
  120. package/lib/checkbox/checkbox.d.ts +16 -0
  121. package/lib/checkbox/checkbox.d.ts.map +1 -0
  122. package/lib/checkbox/checkbox.js +65 -0
  123. package/lib/checkbox/checkbox.js.map +1 -0
  124. package/lib/checkbox/checkbox.less +69 -0
  125. package/lib/collapse/style/index.less +2 -1
  126. package/lib/color-picker/index.less +4 -1
  127. package/lib/date-picker/DatePicker.d.ts +21 -0
  128. package/lib/date-picker/DatePicker.d.ts.map +1 -0
  129. package/lib/date-picker/DatePicker.js +128 -0
  130. package/lib/date-picker/DatePicker.js.map +1 -0
  131. package/lib/date-picker/index.less +294 -0
  132. package/lib/date-picker/style/Picker.less +2 -1
  133. package/lib/drawer/index.less +154 -0
  134. package/lib/drawer/style/drawer.less +4 -2
  135. package/lib/dropdown/style/index.less +2 -1
  136. package/lib/form/form.less +36 -0
  137. package/lib/grid/RowContext.d.ts +9 -0
  138. package/lib/grid/RowContext.d.ts.map +1 -0
  139. package/lib/grid/RowContext.js +9 -0
  140. package/lib/grid/RowContext.js.map +1 -0
  141. package/lib/grid/col.d.ts +29 -0
  142. package/lib/grid/col.d.ts.map +1 -0
  143. package/lib/grid/col.js +100 -0
  144. package/lib/grid/col.js.map +1 -0
  145. package/lib/grid/hooks/useBreakpoint.d.ts +4 -0
  146. package/lib/grid/hooks/useBreakpoint.d.ts.map +1 -0
  147. package/lib/grid/hooks/useBreakpoint.js +28 -0
  148. package/lib/grid/hooks/useBreakpoint.js.map +1 -0
  149. package/lib/grid/row.d.ts +21 -0
  150. package/lib/grid/row.d.ts.map +1 -0
  151. package/lib/grid/row.js +183 -0
  152. package/lib/grid/row.js.map +1 -0
  153. package/lib/grid/style/rtl.less +69 -0
  154. package/lib/icon/index.d.ts +1 -0
  155. package/lib/icon/index.d.ts.map +1 -1
  156. package/lib/icon/index.js +2 -1
  157. package/lib/icon/index.js.map +1 -1
  158. package/lib/icon/style/index.d.ts +1 -0
  159. package/lib/icon/style/index.d.ts.map +1 -1
  160. package/lib/icon/style/index.js +2 -1
  161. package/lib/icon/style/index.js.map +1 -1
  162. package/lib/icon/style/style.less +6 -0
  163. package/lib/index.d.ts +2 -0
  164. package/lib/index.d.ts.map +1 -1
  165. package/lib/index.js +14 -0
  166. package/lib/index.js.map +1 -1
  167. package/lib/input/style/mixin.less +1 -1
  168. package/lib/input-number/inputNumber.d.ts +10 -0
  169. package/lib/input-number/inputNumber.d.ts.map +1 -0
  170. package/lib/input-number/inputNumber.js +48 -0
  171. package/lib/input-number/inputNumber.js.map +1 -0
  172. package/lib/input-number/inputNumber.less +12 -0
  173. package/lib/modal/index.less +36 -0
  174. package/lib/modal/style/confirm.less +1 -1
  175. package/lib/modal/style/modal.less +5 -1
  176. package/lib/notification/assets/index.d.ts +3 -0
  177. package/lib/notification/assets/index.d.ts.map +1 -0
  178. package/lib/notification/assets/index.js +20 -0
  179. package/lib/notification/assets/index.js.map +1 -0
  180. package/lib/notification/assets/svg-error-tip.d.ts +4 -0
  181. package/lib/notification/assets/svg-error-tip.d.ts.map +1 -0
  182. package/lib/notification/assets/svg-error-tip.js +154 -0
  183. package/lib/notification/assets/svg-error-tip.js.map +1 -0
  184. package/lib/notification/assets/svg-success-tip.d.ts +4 -0
  185. package/lib/notification/assets/svg-success-tip.d.ts.map +1 -0
  186. package/lib/notification/assets/svg-success-tip.js +171 -0
  187. package/lib/notification/assets/svg-success-tip.js.map +1 -0
  188. package/lib/notification/notification.d.ts +9 -0
  189. package/lib/notification/notification.d.ts.map +1 -0
  190. package/lib/notification/notification.js +105 -0
  191. package/lib/notification/notification.js.map +1 -0
  192. package/lib/notification/notification.less +59 -0
  193. package/lib/notification/style/index.less +4 -2
  194. package/lib/popconfirm/index.less +32 -0
  195. package/lib/popconfirm/popconfirm.d.ts +8 -0
  196. package/lib/popconfirm/popconfirm.d.ts.map +1 -0
  197. package/lib/popconfirm/popconfirm.js +61 -0
  198. package/lib/popconfirm/popconfirm.js.map +1 -0
  199. package/lib/popover/index.less +57 -0
  200. package/lib/popover/popover.d.ts +14 -0
  201. package/lib/popover/popover.d.ts.map +1 -0
  202. package/lib/popover/popover.js +55 -0
  203. package/lib/popover/popover.js.map +1 -0
  204. package/lib/popover/style/index.less +2 -1
  205. package/lib/progress/progress.d.ts +12 -0
  206. package/lib/progress/progress.d.ts.map +1 -0
  207. package/lib/progress/progress.js +148 -0
  208. package/lib/progress/progress.js.map +1 -0
  209. package/lib/progress/progress.less +82 -0
  210. package/lib/query-form/Field/Composition/FieldPopover.d.ts +17 -0
  211. package/lib/query-form/Field/Composition/FieldPopover.d.ts.map +1 -0
  212. package/lib/query-form/Field/Composition/FieldPopover.js +319 -0
  213. package/lib/query-form/Field/Composition/FieldPopover.js.map +1 -0
  214. package/lib/query-form/Field/Composition/FieldPopover.less +35 -0
  215. package/lib/query-form/Field/Composition/Select.d.ts +4 -0
  216. package/lib/query-form/Field/Composition/Select.d.ts.map +1 -0
  217. package/lib/query-form/Field/Composition/Select.js +132 -0
  218. package/lib/query-form/Field/Composition/Select.js.map +1 -0
  219. package/lib/query-form/Field/Composition/index.d.ts +14 -0
  220. package/lib/query-form/Field/Composition/index.d.ts.map +1 -0
  221. package/lib/query-form/Field/Composition/index.js +330 -0
  222. package/lib/query-form/Field/Composition/index.js.map +1 -0
  223. package/lib/query-form/Field/Composition/index.less +106 -0
  224. package/lib/query-form/Field/Composition/utils.d.ts +6 -0
  225. package/lib/query-form/Field/Composition/utils.d.ts.map +1 -0
  226. package/lib/query-form/Field/Composition/utils.js +27 -0
  227. package/lib/query-form/Field/Composition/utils.js.map +1 -0
  228. package/lib/radio/radio.d.ts +17 -0
  229. package/lib/radio/radio.d.ts.map +1 -0
  230. package/lib/radio/radio.js +75 -0
  231. package/lib/radio/radio.js.map +1 -0
  232. package/lib/radio/radio.less +43 -0
  233. package/lib/select/style/index.less +2 -1
  234. package/lib/steps/assets/background_left.svg +12 -0
  235. package/lib/steps/assets/background_right.svg +12 -0
  236. package/lib/steps/assets/horizontal_line.svg +3 -0
  237. package/lib/steps/assets/vertical_line.svg +3 -0
  238. package/lib/steps/stepStyle/icon.less +51 -0
  239. package/lib/steps/stepStyle/progress-dot.less +10 -0
  240. package/lib/steps/stepStyle/variables.less +8 -0
  241. package/lib/steps/stepStyle/vertical.less +41 -0
  242. package/lib/style/mixins/iconfont.less +3 -2
  243. package/lib/style/themes/default.less +3 -2
  244. package/lib/switch/index.less +46 -0
  245. package/lib/table-container/index.d.ts +3 -0
  246. package/lib/table-container/index.d.ts.map +1 -0
  247. package/lib/table-container/index.js +21 -0
  248. package/lib/table-container/index.js.map +1 -0
  249. package/lib/table-container/index.less +12 -0
  250. package/lib/tabs/tabs.less +116 -0
  251. package/lib/tabs-container/index.d.ts +3 -0
  252. package/lib/tabs-container/index.d.ts.map +1 -0
  253. package/lib/tabs-container/index.js +21 -0
  254. package/lib/tabs-container/index.js.map +1 -0
  255. package/lib/tabs-container/index.less +51 -0
  256. package/lib/tag/color.less +43 -0
  257. package/lib/tag/tag.d.ts +41 -0
  258. package/lib/tag/tag.d.ts.map +1 -0
  259. package/lib/tag/tag.js +183 -0
  260. package/lib/tag/tag.js.map +1 -0
  261. package/lib/tag/tag.less +193 -0
  262. package/lib/time-picker/TimePicker.d.ts +9 -0
  263. package/lib/time-picker/TimePicker.d.ts.map +1 -0
  264. package/lib/time-picker/TimePicker.js +55 -0
  265. package/lib/time-picker/TimePicker.js.map +1 -0
  266. package/lib/time-picker/index.less +38 -0
  267. package/lib/time-picker/style/index.less +2 -1
  268. package/lib/timeline/style/index.less +1 -1
  269. package/lib/tntd-action/Action.d.ts +6 -0
  270. package/lib/tntd-action/Action.d.ts.map +1 -0
  271. package/lib/tntd-action/Action.js +86 -0
  272. package/lib/tntd-action/Action.js.map +1 -0
  273. package/lib/tntd-action/index.less +53 -0
  274. package/lib/tooltip/index.less +29 -0
  275. package/lib/tooltip/tooltip.d.ts +9 -0
  276. package/lib/tooltip/tooltip.d.ts.map +1 -0
  277. package/lib/tooltip/tooltip.js +53 -0
  278. package/lib/tooltip/tooltip.js.map +1 -0
  279. package/package.json +3 -3
  280. package/themes/default/variables.less +2 -0
  281. package/themes/default/variablesVar.less +2 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"popconfirm.js","sourceRoot":"","sources":["../../src/popconfirm/popconfirm.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAyB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ps } from 'antd/lib/popconfirm'\nimport type { NativeButtonProps } from 'antd/lib/button/button'\nimport { ConfigConsumer } from 'antd/lib/config-provider'\nimport AntdPopconfirm from 'antd/lib/popconfirm'\nimport classNames from 'classnames'\n\nexport * from 'antd/lib/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,14 @@
1
+ import React from 'react';
2
+ import type { PopoverProps } from 'antd/lib/popover';
3
+ export * from 'antd/lib/popover';
4
+ interface CurProps extends PopoverProps {
5
+ theme?: string;
6
+ titleDivider?: boolean;
7
+ }
8
+ declare const Popover: React.FC<CurProps & {
9
+ theme?: string;
10
+ titleDivider?: boolean;
11
+ hiddenArrow?: boolean;
12
+ }>;
13
+ export default Popover;
14
+ //# sourceMappingURL=popover.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+
3
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ var _exportNames = {};
8
+ exports["default"] = void 0;
9
+ var _react = _interopRequireDefault(require("react"));
10
+ var _configProvider = require("antd/lib/config-provider");
11
+ var _popover = _interopRequireWildcard(require("antd/lib/popover"));
12
+ Object.keys(_popover).forEach(function (key) {
13
+ if (key === "default" || key === "__esModule") return;
14
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
15
+ if (key in exports && exports[key] === _popover[key]) return;
16
+ Object.defineProperty(exports, key, {
17
+ enumerable: true,
18
+ get: function get() {
19
+ return _popover[key];
20
+ }
21
+ });
22
+ });
23
+ var _classnames = _interopRequireDefault(require("classnames"));
24
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
25
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
26
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
27
+ var __rest = void 0 && (void 0).__rest || function (s, e) {
28
+ var t = {};
29
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
30
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
31
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
32
+ }
33
+ return t;
34
+ };
35
+ var themeMap = function themeMap(prefixCls, themeColor) {
36
+ return "".concat(prefixCls, "-").concat(themeColor);
37
+ };
38
+ var Popover = function Popover(props) {
39
+ var overlayClassName = props.overlayClassName,
40
+ _props$theme = props.theme,
41
+ theme = _props$theme === void 0 ? '' : _props$theme,
42
+ _props$titleDivider = props.titleDivider,
43
+ titleDivider = _props$titleDivider === void 0 ? false : _props$titleDivider,
44
+ _props$hiddenArrow = props.hiddenArrow,
45
+ hiddenArrow = _props$hiddenArrow === void 0 ? false : _props$hiddenArrow,
46
+ restProps = __rest(props, ["overlayClassName", "theme", "titleDivider", "hiddenArrow"]);
47
+ return _react["default"].createElement(_configProvider.ConfigConsumer, null, function (_ref) {
48
+ var getPrefixCls = _ref.getPrefixCls;
49
+ var prefixCls = getPrefixCls('popover');
50
+ return _react["default"].createElement(_popover["default"], Object.assign({
51
+ overlayClassName: (0, _classnames["default"])(prefixCls, 'tnt-popover', themeMap(prefixCls, theme), hiddenArrow ? prefixCls + '-arrow-hidden' : '', overlayClassName)
52
+ }, restProps));
53
+ });
54
+ };
55
+ var _default = exports["default"] = Popover;
@@ -0,0 +1 @@
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"]}
@@ -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,12 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,148 @@
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(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
28
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
29
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
30
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
31
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
32
+ var iconMap = {
33
+ line: {
34
+ success: 'check-circle',
35
+ exception: 'close-circle'
36
+ },
37
+ circle: {
38
+ success: 'check',
39
+ exception: 'close'
40
+ }
41
+ };
42
+ var ifPercentBottom = function ifPercentBottom(type, percentPosition) {
43
+ return type === 'line' && percentPosition === 'bottom';
44
+ };
45
+ var percentTransform = function percentTransform(percent) {
46
+ return percent >= 100 ? 100 : percent <= 0 ? 0 : percent;
47
+ };
48
+ var themeStrokeColor = function themeStrokeColor(status, strokeColor, percent) {
49
+ return status !== 'success' && status !== 'exception' && !strokeColor && percent !== 100 ? 'var(--blue-5)' : '';
50
+ };
51
+ var Progress = function Progress(props) {
52
+ var className = props.className,
53
+ _props$type = props.type,
54
+ type = _props$type === void 0 ? 'line' : _props$type,
55
+ _props$percentPositio = props.percentPosition,
56
+ percentPosition = _props$percentPositio === void 0 ? 'right' : _props$percentPositio,
57
+ _props$percent = props.percent,
58
+ percent = _props$percent === void 0 ? 0 : _props$percent,
59
+ format = props.format,
60
+ size = props.size,
61
+ label = props.label,
62
+ _props$width = props.width,
63
+ width = _props$width === void 0 ? 132 : _props$width,
64
+ status = props.status,
65
+ halfCircle = props.halfCircle,
66
+ _props$gapDegree = props.gapDegree,
67
+ gapDegree = _props$gapDegree === void 0 ? props.halfCircle ? 135 : props.gapDegree : _props$gapDegree,
68
+ strokeColor = props.strokeColor,
69
+ _props$strokeWidth = props.strokeWidth,
70
+ strokeWidth = _props$strokeWidth === void 0 ? 7 : _props$strokeWidth;
71
+ var _percent = percentTransform(percent);
72
+ var _strokeColor = themeStrokeColor(status, strokeColor, _percent);
73
+ return _react["default"].createElement(_configProvider.ConfigConsumer, null, function (_ref) {
74
+ var getPrefixCls = _ref.getPrefixCls;
75
+ var prefixCls = getPrefixCls('progress');
76
+ var CusLabelOrPercent = function CusLabelOrPercent(props) {
77
+ var type = props.type,
78
+ theme = props.theme;
79
+ 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'));
80
+ var showIcon = function showIcon(status) {
81
+ return _react["default"].createElement(_icon["default"], {
82
+ type: "".concat(iconMap[type][status]),
83
+ theme: theme,
84
+ className: (0, _classnames["default"])(_defineProperty({}, "".concat(labelPercentClassName, " ").concat(labelPercentClassName, "-").concat(status || 'success'), type === 'line'))
85
+ });
86
+ };
87
+ var showPercent = _react["default"].createElement("div", {
88
+ className: labelPercentClassName
89
+ }, format ? format === null || format === void 0 ? void 0 : format(_percent) : _percent + '%');
90
+ var displayContent;
91
+ if (status === 'success' || status === 'exception') {
92
+ displayContent = showIcon(status);
93
+ } else if (status === 'normal' || status === 'active') {
94
+ displayContent = showPercent;
95
+ } else {
96
+ // 如果状态为空
97
+ displayContent = _percent === 100 ? showIcon('success') : showPercent;
98
+ }
99
+ return displayContent;
100
+ };
101
+ var CusCircleAndDashboardFormat = function CusCircleAndDashboardFormat(props) {
102
+ var widthNum = props.widthNum;
103
+ return _react["default"].createElement("div", {
104
+ className: "".concat(prefixCls, "-cus-format")
105
+ }, !!label && _react["default"].createElement(_ellipsis["default"], {
106
+ className: "".concat(prefixCls, "-cus-format-label"),
107
+ title: label,
108
+ widthLimit: widthNum <= 64 ? widthNum : 'calc(100% - 50px)',
109
+ placement: widthNum <= 64 ? 'bottom' : 'top'
110
+ }), _react["default"].createElement(CusLabelOrPercent, {
111
+ type: "circle",
112
+ theme: "outlined"
113
+ }));
114
+ };
115
+ //line
116
+ var LineProgress = function LineProgress() {
117
+ return _react["default"].createElement(_progress["default"], Object.assign({
118
+ strokeColor: _strokeColor
119
+ }, props, {
120
+ className: (0, _classnames["default"])('tnt-progress', className, _defineProperty({}, "".concat(prefixCls, "-percent-bottom"), percentPosition === 'bottom'))
121
+ }));
122
+ };
123
+ //circle,dashboard (额外新增label和半圆选项)
124
+ var CircleAndDashboardProgress = function CircleAndDashboardProgress() {
125
+ var widthNum = Number(String(width).split('px').shift());
126
+ return _react["default"].createElement(_progress["default"], Object.assign({
127
+ gapDegree: gapDegree,
128
+ strokeColor: _strokeColor,
129
+ strokeWidth: strokeWidth
130
+ }, props, {
131
+ type: halfCircle ? 'dashboard' : type,
132
+ 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)),
133
+ format: function format() {
134
+ return _react["default"].createElement(CusCircleAndDashboardFormat, {
135
+ widthNum: widthNum
136
+ });
137
+ }
138
+ }));
139
+ };
140
+ var progressMap = {
141
+ line: _react["default"].createElement(LineProgress, null),
142
+ circle: _react["default"].createElement(CircleAndDashboardProgress, null),
143
+ dashboard: _react["default"].createElement(CircleAndDashboardProgress, null)
144
+ };
145
+ return progressMap[type];
146
+ });
147
+ };
148
+ var _default = exports["default"] = Progress;
@@ -0,0 +1 @@
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,C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AAC,GAAG,SAAS,oBAAoB,CAAC,EAAE,UAAU,IAAI,QAAQ,GAAG,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"]}
@@ -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
+
@@ -0,0 +1,17 @@
1
+ declare function _default({ visible, setVisible, searchText, children, value, onChange, options, locale, searchTarget, setSearchTarget, clsPrefix, ...props }: {
2
+ [x: string]: any;
3
+ visible: any;
4
+ setVisible: any;
5
+ searchText: any;
6
+ children: any;
7
+ value: any;
8
+ onChange: any;
9
+ options: any;
10
+ locale: any;
11
+ searchTarget: any;
12
+ setSearchTarget: any;
13
+ clsPrefix: any;
14
+ }): React.JSX.Element;
15
+ export default _default;
16
+ import React from "react";
17
+ //# sourceMappingURL=FieldPopover.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FieldPopover.d.ts","sourceRoot":"","sources":["../../../../src/query-form/Field/Composition/FieldPopover.js"],"names":[],"mappings":"AAWe;;;;;;;;;;;;;sBAiRd"}