tntd 2.8.0-beta.5 → 2.8.0-beta.7

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 (280) hide show
  1. package/es/check-card/index.js +2 -3
  2. package/es/check-card/index.js.map +1 -1
  3. package/es/color-picker/ColorPicker.js +4 -6
  4. package/es/color-picker/ColorPicker.js.map +1 -1
  5. package/es/index.js +2 -0
  6. package/es/index.js.map +1 -1
  7. package/es/locale/en_US.js +3 -0
  8. package/es/locale/en_US.js.map +1 -1
  9. package/es/locale/zh_CN.js +3 -0
  10. package/es/locale/zh_CN.js.map +1 -1
  11. package/es/page-container/index.js +13 -0
  12. package/es/page-container/index.js.map +1 -0
  13. package/es/page-container/index.less +38 -0
  14. package/es/page-loading/index.js +25 -0
  15. package/es/page-loading/index.js.map +1 -0
  16. package/es/page-loading/index.less +22 -0
  17. package/es/page-loading/loading.gif +0 -0
  18. package/es/table/table.js +1 -2
  19. package/es/table/table.js.map +1 -1
  20. package/es/table-container/index.less +1 -0
  21. package/es/tabs/tabs.js +4 -2
  22. package/es/tabs/tabs.js.map +1 -1
  23. package/es/tntd-cascader/AntdCascader/component/getIcons.js +7 -8
  24. package/es/tntd-cascader/AntdCascader/component/getIcons.js.map +1 -1
  25. package/es/tntd-cascader/AntdCascader/index.js +4 -5
  26. package/es/tntd-cascader/AntdCascader/index.js.map +1 -1
  27. package/es/tntd-rc-select/_util/getIcons.js +7 -8
  28. package/es/tntd-rc-select/_util/getIcons.js.map +1 -1
  29. package/lib/check-card/index.js +1 -2
  30. package/lib/check-card/index.js.map +1 -1
  31. package/lib/color-picker/ColorPicker.d.ts.map +1 -1
  32. package/lib/color-picker/ColorPicker.js +2 -4
  33. package/lib/color-picker/ColorPicker.js.map +1 -1
  34. package/lib/index.d.ts +2 -0
  35. package/lib/index.d.ts.map +1 -1
  36. package/lib/index.js +14 -0
  37. package/lib/index.js.map +1 -1
  38. package/lib/locale/default.d.ts +3 -0
  39. package/lib/locale/default.d.ts.map +1 -1
  40. package/lib/locale/en_US.d.ts +3 -0
  41. package/lib/locale/en_US.d.ts.map +1 -1
  42. package/lib/locale/en_US.js +3 -0
  43. package/lib/locale/en_US.js.map +1 -1
  44. package/lib/locale/zh_CN.d.ts +3 -0
  45. package/lib/locale/zh_CN.d.ts.map +1 -1
  46. package/lib/locale/zh_CN.js +3 -0
  47. package/lib/locale/zh_CN.js.map +1 -1
  48. package/lib/page-container/index.d.ts +4 -0
  49. package/lib/page-container/index.d.ts.map +1 -0
  50. package/lib/page-container/index.js +22 -0
  51. package/lib/page-container/index.js.map +1 -0
  52. package/lib/page-container/index.less +38 -0
  53. package/lib/{query-form/Field/Composition/Select.d.ts → page-loading/index.d.ts} +1 -1
  54. package/lib/page-loading/index.d.ts.map +1 -0
  55. package/lib/page-loading/index.js +30 -0
  56. package/lib/page-loading/index.js.map +1 -0
  57. package/lib/page-loading/index.less +22 -0
  58. package/lib/page-loading/loading.gif +0 -0
  59. package/lib/table/table.d.ts.map +1 -1
  60. package/lib/table/table.js +2 -3
  61. package/lib/table/table.js.map +1 -1
  62. package/lib/table-container/index.less +1 -0
  63. package/lib/tabs/tabs.d.ts.map +1 -1
  64. package/lib/tabs/tabs.js +3 -1
  65. package/lib/tabs/tabs.js.map +1 -1
  66. package/lib/tntd-cascader/AntdCascader/component/getIcons.js +2 -3
  67. package/lib/tntd-cascader/AntdCascader/component/getIcons.js.map +1 -1
  68. package/lib/tntd-cascader/AntdCascader/index.d.ts.map +1 -1
  69. package/lib/tntd-cascader/AntdCascader/index.js +1 -2
  70. package/lib/tntd-cascader/AntdCascader/index.js.map +1 -1
  71. package/lib/tntd-rc-select/_util/getIcons.js +2 -3
  72. package/lib/tntd-rc-select/_util/getIcons.js.map +1 -1
  73. package/package.json +2 -2
  74. package/es/alert/alert.js +0 -70
  75. package/es/alert/alert.js.map +0 -1
  76. package/es/alert/alert.less +0 -128
  77. package/es/button/button.less +0 -72
  78. package/es/checkbox/check.png +0 -0
  79. package/es/checkbox/checkbox.js +0 -48
  80. package/es/checkbox/checkbox.js.map +0 -1
  81. package/es/checkbox/checkbox.less +0 -69
  82. package/es/date-picker/DatePicker.js +0 -101
  83. package/es/date-picker/DatePicker.js.map +0 -1
  84. package/es/date-picker/index.less +0 -294
  85. package/es/drawer/index.less +0 -154
  86. package/es/form/form.less +0 -36
  87. package/es/grid/RowContext.js +0 -3
  88. package/es/grid/RowContext.js.map +0 -1
  89. package/es/grid/col.js +0 -103
  90. package/es/grid/col.js.map +0 -1
  91. package/es/grid/hooks/useBreakpoint.js +0 -18
  92. package/es/grid/hooks/useBreakpoint.js.map +0 -1
  93. package/es/grid/row.js +0 -154
  94. package/es/grid/row.js.map +0 -1
  95. package/es/grid/style/rtl.less +0 -69
  96. package/es/input-number/inputNumber.js +0 -29
  97. package/es/input-number/inputNumber.js.map +0 -1
  98. package/es/input-number/inputNumber.less +0 -12
  99. package/es/modal/index.less +0 -36
  100. package/es/notification/assets/index.js +0 -2
  101. package/es/notification/assets/index.js.map +0 -1
  102. package/es/notification/assets/svg-error-tip.js +0 -145
  103. package/es/notification/assets/svg-error-tip.js.map +0 -1
  104. package/es/notification/assets/svg-success-tip.js +0 -162
  105. package/es/notification/assets/svg-success-tip.js.map +0 -1
  106. package/es/notification/notification.js +0 -80
  107. package/es/notification/notification.js.map +0 -1
  108. package/es/notification/notification.less +0 -59
  109. package/es/popconfirm/index.less +0 -32
  110. package/es/popconfirm/popconfirm.js +0 -43
  111. package/es/popconfirm/popconfirm.js.map +0 -1
  112. package/es/popover/index.less +0 -57
  113. package/es/popover/popover.js +0 -34
  114. package/es/popover/popover.js.map +0 -1
  115. package/es/progress/progress.js +0 -132
  116. package/es/progress/progress.js.map +0 -1
  117. package/es/progress/progress.less +0 -82
  118. package/es/query-form/Field/Composition/FieldPopover.js +0 -284
  119. package/es/query-form/Field/Composition/FieldPopover.js.map +0 -1
  120. package/es/query-form/Field/Composition/FieldPopover.less +0 -35
  121. package/es/query-form/Field/Composition/Select.js +0 -108
  122. package/es/query-form/Field/Composition/Select.js.map +0 -1
  123. package/es/query-form/Field/Composition/index.js +0 -275
  124. package/es/query-form/Field/Composition/index.js.map +0 -1
  125. package/es/query-form/Field/Composition/index.less +0 -106
  126. package/es/query-form/Field/Composition/utils.js +0 -19
  127. package/es/query-form/Field/Composition/utils.js.map +0 -1
  128. package/es/radio/radio.js +0 -57
  129. package/es/radio/radio.js.map +0 -1
  130. package/es/radio/radio.less +0 -43
  131. package/es/steps/assets/background_left.svg +0 -12
  132. package/es/steps/assets/background_right.svg +0 -12
  133. package/es/steps/assets/horizontal_line.svg +0 -3
  134. package/es/steps/assets/vertical_line.svg +0 -3
  135. package/es/steps/stepStyle/icon.less +0 -51
  136. package/es/steps/stepStyle/progress-dot.less +0 -10
  137. package/es/steps/stepStyle/variables.less +0 -8
  138. package/es/steps/stepStyle/vertical.less +0 -41
  139. package/es/switch/index.less +0 -46
  140. package/es/tabs/tabs.less +0 -116
  141. package/es/tag/color.less +0 -43
  142. package/es/tag/tag.js +0 -171
  143. package/es/tag/tag.js.map +0 -1
  144. package/es/tag/tag.less +0 -193
  145. package/es/time-picker/TimePicker.js +0 -36
  146. package/es/time-picker/TimePicker.js.map +0 -1
  147. package/es/time-picker/index.less +0 -38
  148. package/es/tntd-action/Action.js +0 -66
  149. package/es/tntd-action/Action.js.map +0 -1
  150. package/es/tntd-action/index.less +0 -53
  151. package/es/tooltip/index.less +0 -29
  152. package/es/tooltip/tooltip.js +0 -33
  153. package/es/tooltip/tooltip.js.map +0 -1
  154. package/lib/alert/alert.d.ts +0 -12
  155. package/lib/alert/alert.d.ts.map +0 -1
  156. package/lib/alert/alert.js +0 -92
  157. package/lib/alert/alert.js.map +0 -1
  158. package/lib/alert/alert.less +0 -128
  159. package/lib/button/button.less +0 -72
  160. package/lib/checkbox/check.png +0 -0
  161. package/lib/checkbox/checkbox.d.ts +0 -16
  162. package/lib/checkbox/checkbox.d.ts.map +0 -1
  163. package/lib/checkbox/checkbox.js +0 -65
  164. package/lib/checkbox/checkbox.js.map +0 -1
  165. package/lib/checkbox/checkbox.less +0 -69
  166. package/lib/date-picker/DatePicker.d.ts +0 -21
  167. package/lib/date-picker/DatePicker.d.ts.map +0 -1
  168. package/lib/date-picker/DatePicker.js +0 -128
  169. package/lib/date-picker/DatePicker.js.map +0 -1
  170. package/lib/date-picker/index.less +0 -294
  171. package/lib/drawer/index.less +0 -154
  172. package/lib/form/form.less +0 -36
  173. package/lib/grid/RowContext.d.ts +0 -9
  174. package/lib/grid/RowContext.d.ts.map +0 -1
  175. package/lib/grid/RowContext.js +0 -9
  176. package/lib/grid/RowContext.js.map +0 -1
  177. package/lib/grid/col.d.ts +0 -29
  178. package/lib/grid/col.d.ts.map +0 -1
  179. package/lib/grid/col.js +0 -100
  180. package/lib/grid/col.js.map +0 -1
  181. package/lib/grid/hooks/useBreakpoint.d.ts +0 -4
  182. package/lib/grid/hooks/useBreakpoint.d.ts.map +0 -1
  183. package/lib/grid/hooks/useBreakpoint.js +0 -28
  184. package/lib/grid/hooks/useBreakpoint.js.map +0 -1
  185. package/lib/grid/row.d.ts +0 -21
  186. package/lib/grid/row.d.ts.map +0 -1
  187. package/lib/grid/row.js +0 -183
  188. package/lib/grid/row.js.map +0 -1
  189. package/lib/grid/style/rtl.less +0 -69
  190. package/lib/input-number/inputNumber.d.ts +0 -10
  191. package/lib/input-number/inputNumber.d.ts.map +0 -1
  192. package/lib/input-number/inputNumber.js +0 -48
  193. package/lib/input-number/inputNumber.js.map +0 -1
  194. package/lib/input-number/inputNumber.less +0 -12
  195. package/lib/modal/index.less +0 -36
  196. package/lib/notification/assets/index.d.ts +0 -3
  197. package/lib/notification/assets/index.d.ts.map +0 -1
  198. package/lib/notification/assets/index.js +0 -20
  199. package/lib/notification/assets/index.js.map +0 -1
  200. package/lib/notification/assets/svg-error-tip.d.ts +0 -4
  201. package/lib/notification/assets/svg-error-tip.d.ts.map +0 -1
  202. package/lib/notification/assets/svg-error-tip.js +0 -154
  203. package/lib/notification/assets/svg-error-tip.js.map +0 -1
  204. package/lib/notification/assets/svg-success-tip.d.ts +0 -4
  205. package/lib/notification/assets/svg-success-tip.d.ts.map +0 -1
  206. package/lib/notification/assets/svg-success-tip.js +0 -171
  207. package/lib/notification/assets/svg-success-tip.js.map +0 -1
  208. package/lib/notification/notification.d.ts +0 -9
  209. package/lib/notification/notification.d.ts.map +0 -1
  210. package/lib/notification/notification.js +0 -105
  211. package/lib/notification/notification.js.map +0 -1
  212. package/lib/notification/notification.less +0 -59
  213. package/lib/popconfirm/index.less +0 -32
  214. package/lib/popconfirm/popconfirm.d.ts +0 -8
  215. package/lib/popconfirm/popconfirm.d.ts.map +0 -1
  216. package/lib/popconfirm/popconfirm.js +0 -61
  217. package/lib/popconfirm/popconfirm.js.map +0 -1
  218. package/lib/popover/index.less +0 -57
  219. package/lib/popover/popover.d.ts +0 -14
  220. package/lib/popover/popover.d.ts.map +0 -1
  221. package/lib/popover/popover.js +0 -55
  222. package/lib/popover/popover.js.map +0 -1
  223. package/lib/progress/progress.d.ts +0 -12
  224. package/lib/progress/progress.d.ts.map +0 -1
  225. package/lib/progress/progress.js +0 -148
  226. package/lib/progress/progress.js.map +0 -1
  227. package/lib/progress/progress.less +0 -82
  228. package/lib/query-form/Field/Composition/FieldPopover.d.ts +0 -17
  229. package/lib/query-form/Field/Composition/FieldPopover.d.ts.map +0 -1
  230. package/lib/query-form/Field/Composition/FieldPopover.js +0 -319
  231. package/lib/query-form/Field/Composition/FieldPopover.js.map +0 -1
  232. package/lib/query-form/Field/Composition/FieldPopover.less +0 -35
  233. package/lib/query-form/Field/Composition/Select.d.ts.map +0 -1
  234. package/lib/query-form/Field/Composition/Select.js +0 -132
  235. package/lib/query-form/Field/Composition/Select.js.map +0 -1
  236. package/lib/query-form/Field/Composition/index.d.ts +0 -14
  237. package/lib/query-form/Field/Composition/index.d.ts.map +0 -1
  238. package/lib/query-form/Field/Composition/index.js +0 -330
  239. package/lib/query-form/Field/Composition/index.js.map +0 -1
  240. package/lib/query-form/Field/Composition/index.less +0 -106
  241. package/lib/query-form/Field/Composition/utils.d.ts +0 -6
  242. package/lib/query-form/Field/Composition/utils.d.ts.map +0 -1
  243. package/lib/query-form/Field/Composition/utils.js +0 -27
  244. package/lib/query-form/Field/Composition/utils.js.map +0 -1
  245. package/lib/radio/radio.d.ts +0 -17
  246. package/lib/radio/radio.d.ts.map +0 -1
  247. package/lib/radio/radio.js +0 -75
  248. package/lib/radio/radio.js.map +0 -1
  249. package/lib/radio/radio.less +0 -43
  250. package/lib/steps/assets/background_left.svg +0 -12
  251. package/lib/steps/assets/background_right.svg +0 -12
  252. package/lib/steps/assets/horizontal_line.svg +0 -3
  253. package/lib/steps/assets/vertical_line.svg +0 -3
  254. package/lib/steps/stepStyle/icon.less +0 -51
  255. package/lib/steps/stepStyle/progress-dot.less +0 -10
  256. package/lib/steps/stepStyle/variables.less +0 -8
  257. package/lib/steps/stepStyle/vertical.less +0 -41
  258. package/lib/switch/index.less +0 -46
  259. package/lib/tabs/tabs.less +0 -116
  260. package/lib/tag/color.less +0 -43
  261. package/lib/tag/tag.d.ts +0 -41
  262. package/lib/tag/tag.d.ts.map +0 -1
  263. package/lib/tag/tag.js +0 -183
  264. package/lib/tag/tag.js.map +0 -1
  265. package/lib/tag/tag.less +0 -193
  266. package/lib/time-picker/TimePicker.d.ts +0 -9
  267. package/lib/time-picker/TimePicker.d.ts.map +0 -1
  268. package/lib/time-picker/TimePicker.js +0 -55
  269. package/lib/time-picker/TimePicker.js.map +0 -1
  270. package/lib/time-picker/index.less +0 -38
  271. package/lib/tntd-action/Action.d.ts +0 -6
  272. package/lib/tntd-action/Action.d.ts.map +0 -1
  273. package/lib/tntd-action/Action.js +0 -86
  274. package/lib/tntd-action/Action.js.map +0 -1
  275. package/lib/tntd-action/index.less +0 -53
  276. package/lib/tooltip/index.less +0 -29
  277. package/lib/tooltip/tooltip.d.ts +0 -9
  278. package/lib/tooltip/tooltip.d.ts.map +0 -1
  279. package/lib/tooltip/tooltip.js +0 -53
  280. package/lib/tooltip/tooltip.js.map +0 -1
@@ -1,86 +0,0 @@
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
- exports["default"] = WarpAction;
8
- var _react = _interopRequireWildcard(require("react"));
9
- var _reactDom = _interopRequireDefault(require("react-dom"));
10
- var _configProvider = require("antd/lib/config-provider");
11
- var _LocaleReceiver = _interopRequireDefault(require("antd/lib/locale-provider/LocaleReceiver"));
12
- var _classnames = _interopRequireDefault(require("classnames"));
13
- var _button = require("../button");
14
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
- 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); }
16
- 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; }
17
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
18
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
19
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
20
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
21
- function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
22
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
23
- var __rest = void 0 && (void 0).__rest || function (s, e) {
24
- var t = {};
25
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
26
- if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
27
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
28
- }
29
- return t;
30
- };
31
- var defaultGetContainer = function defaultGetContainer() {
32
- return document.body;
33
- };
34
- function WarpAction(_a) {
35
- var _a$getContainer = _a.getContainer,
36
- getContainer = _a$getContainer === void 0 ? defaultGetContainer : _a$getContainer,
37
- other = __rest(_a, ["getContainer"]);
38
- return _react["default"].createElement(_configProvider.ConfigConsumer, null, function (_ref) {
39
- var getPrefixCls = _ref.getPrefixCls,
40
- getContextPopupContainer = _ref.getPopupContainer;
41
- var _getContainer = getContainer === undefined ? getContextPopupContainer : getContainer;
42
- return _react["default"].createElement(_LocaleReceiver["default"], {
43
- componentName: "TntdAction"
44
- }, function (locale) {
45
- return _react["default"].createElement(Action, Object.assign({}, other, {
46
- locale: locale,
47
- getContainer: _getContainer
48
- }));
49
- });
50
- });
51
- }
52
- function Action(_ref2) {
53
- var title = _ref2.title,
54
- data = _ref2.data,
55
- locale = _ref2.locale,
56
- className = _ref2.className,
57
- getContainer = _ref2.getContainer;
58
- var _useState = (0, _react.useState)(false),
59
- _useState2 = _slicedToArray(_useState, 2),
60
- visible = _useState2[0],
61
- setVisible = _useState2[1];
62
- var ref = (0, _react.useRef)();
63
- (0, _react.useEffect)(function () {
64
- ref.current = getContainer();
65
- }, [getContainer]);
66
- (0, _react.useEffect)(function () {
67
- setVisible(data.length > 0);
68
- }, [data]);
69
- if (ref.current && visible) {
70
- return _reactDom["default"].createPortal(_react["default"].createElement("div", {
71
- className: (0, _classnames["default"])('tnt-action', className)
72
- }, _react["default"].createElement("div", {
73
- className: "fr"
74
- }, data), _react["default"].createElement(_button.Button, {
75
- shape: "circle",
76
- icon: "close",
77
- type: "tertiary",
78
- onClick: function onClick() {
79
- return setVisible(false);
80
- }
81
- }), _react["default"].createElement("span", {
82
- className: "tnt-action-text"
83
- }, title)), ref.current);
84
- }
85
- return null;
86
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"Action.js","sourceRoot":"","sources":["../../src/tntd-action/Action.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA0D;AAC1D,0DAAgC;AAChC,6DAAwD;AACxD,4FAAmE;AACnE,4DAAmC;AACnC,sCAAkC;AAElC,MAAM,mBAAmB,GAAG,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAA;AAE/C,SAAwB,UAAU,CAAC,EAAgD;QAAhD,EAAE,YAAY,GAAG,mBAAmB,OAAY,EAAP,KAAK,cAA9C,gBAAgD,CAAF;IAC/E,OAAO,CACL,8BAAC,gCAAc,QACZ,CAAC,EAAE,YAAY,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,EAAE,EAAE;QACjE,MAAM,aAAa,GAAG,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,YAAY,CAAA;QAE1F,OAAO,CACL,8BAAC,wBAAc,IAAC,aAAa,EAAC,YAAY,IACvC,CAAC,MAAM,EAAE,EAAE;YACV,OAAO,8BAAC,MAAM,oBAAK,KAAK,IAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,aAAa,IAAI,CAAA;QAC3E,CAAC,CACc,CAClB,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC;AAhBD,6BAgBC;AAED,SAAS,MAAM,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE;IAC9D,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAA;IAC7C,MAAM,GAAG,GAAG,IAAA,cAAM,GAAE,CAAA;IAEpB,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,GAAG,CAAC,OAAO,GAAG,YAAY,EAAE,CAAA;IAC9B,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAA;IAElB,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,UAAU,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;IAC7B,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAA;IAEV,IAAI,GAAG,CAAC,OAAO,IAAI,OAAO,EAAE;QAC1B,OAAO,mBAAQ,CAAC,YAAY,CAC1B,uCAAK,SAAS,EAAE,IAAA,oBAAU,EAAC,YAAY,EAAE,SAAS,CAAC;YACjD,uCAAK,SAAS,EAAC,IAAI,IAAE,IAAI,CAAO;YAChC,8BAAC,eAAM,IAAC,KAAK,EAAC,QAAQ,EAAC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,UAAU,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,GAAI;YACxF,wCAAM,SAAS,EAAC,iBAAiB,IAAE,KAAK,CAAQ,CAC5C,EACN,GAAG,CAAC,OAAO,CACZ,CAAA;KACF;IACD,OAAO,IAAI,CAAA;AACb,CAAC","sourcesContent":["import React, { useState, useEffect, useRef } from 'react'\nimport ReactDOM from 'react-dom'\nimport { ConfigConsumer } from 'antd/lib/config-provider'\nimport LocaleReceiver from 'antd/lib/locale-provider/LocaleReceiver'\nimport classNames from 'classnames'\nimport { Button } from '../button'\n\nconst defaultGetContainer = () => document.body\n\nexport default function WarpAction({ getContainer = defaultGetContainer, ...other }) {\n return (\n <ConfigConsumer>\n {({ getPrefixCls, getPopupContainer: getContextPopupContainer }) => {\n const _getContainer = getContainer === undefined ? getContextPopupContainer : getContainer\n\n return (\n <LocaleReceiver componentName=\"TntdAction\">\n {(locale) => {\n return <Action {...other} locale={locale} getContainer={_getContainer} />\n }}\n </LocaleReceiver>\n )\n }}\n </ConfigConsumer>\n )\n}\n\nfunction Action({ title, data, locale, className, getContainer }) {\n const [visible, setVisible] = useState(false)\n const ref = useRef()\n\n useEffect(() => {\n ref.current = getContainer()\n }, [getContainer])\n\n useEffect(() => {\n setVisible(data.length > 0)\n }, [data])\n\n if (ref.current && visible) {\n return ReactDOM.createPortal(\n <div className={classNames('tnt-action', className)}>\n <div className=\"fr\">{data}</div>\n <Button shape=\"circle\" icon=\"close\" type=\"tertiary\" onClick={() => setVisible(false)} />\n <span className=\"tnt-action-text\">{title}</span>\n </div>,\n ref.current\n )\n }\n return null\n}\n"]}
@@ -1,53 +0,0 @@
1
- .tnt-action {
2
- position: fixed;
3
- bottom: 100px;
4
- width: @tnt-action-width;
5
- left: calc(50vw - @tnt-action-width / 2);
6
- padding: 10px 16px;
7
- background-color: @text-color;
8
- border-radius: @border-radius-base;
9
- z-index: 200;
10
- &-text {
11
- color: @white;
12
- margin-left: 20px;
13
- font-size: 14px;
14
- .num {
15
- display: inline-block;
16
- width: 16px;
17
- height: 16px;
18
- background: #454f64;
19
- border-radius: 8px;
20
- font-size: 10px;
21
- margin-right: 4px;
22
- vertical-align: text-bottom;
23
- text-align: center;
24
- }
25
- }
26
- > .tnt-btn-tertiary {
27
- opacity: 0.5;
28
- background: #454f64;
29
- color: @white;
30
- border-width: 0;
31
- width: @tnt-action-close-width;
32
- height: @tnt-action-close-width;
33
- min-width: @tnt-action-close-width;
34
- line-height: @tnt-action-close-width;
35
- margin-top: 4px;
36
- font-size: 14px;
37
- &:hover {
38
- opacity: 0.8;
39
- }
40
- }
41
- .fr {
42
- float: right;
43
- .ant-btn {
44
- margin-left: 10px;
45
- background: rgba(69, 79, 100, 0.5);
46
- color: @white;
47
- border-width: 0;
48
- &:hover {
49
- background: rgba(69, 79, 100, 0.8);
50
- }
51
- }
52
- }
53
- }
@@ -1,29 +0,0 @@
1
- @tooltip-prefix-cls: ~'@{ant-prefix}-tooltip';
2
-
3
- // Base class
4
- .tnt-tooltip.@{tooltip-prefix-cls} {
5
-
6
- &-light {
7
- .@{tooltip-prefix-cls}-inner {
8
- background-color: @tooltip-bg-light;
9
- color: @tooltip-color-light;
10
- }
11
-
12
- .@{tooltip-prefix-cls}-arrow {
13
- &::before {
14
- background-color: @tooltip-bg-light;
15
- }
16
- }
17
- }
18
-
19
- // Arrows
20
- &-arrow {
21
- border-radius: 1px;
22
- }
23
- }
24
-
25
- .@{tooltip-prefix-cls}-arrow-hidden {
26
- .@{tooltip-prefix-cls}-arrow {
27
- display: none;
28
- }
29
- }
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import type { TooltipProps } from 'antd/lib/tooltip';
3
- export * from 'antd/lib/tooltip';
4
- declare const Tooltip: React.FC<TooltipProps & {
5
- theme?: string;
6
- hiddenArrow?: boolean;
7
- }>;
8
- export default Tooltip;
9
- //# sourceMappingURL=tooltip.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../src/tooltip/tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAKnD,cAAc,iBAAiB,CAAA;AAK/B,QAAA,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,OAAO,CAAA;CAAE,CAuB/E,CAAA;AAED,eAAe,OAAO,CAAA"}
@@ -1,53 +0,0 @@
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 _tooltip = _interopRequireWildcard(require("antd/lib/tooltip"));
12
- Object.keys(_tooltip).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] === _tooltip[key]) return;
16
- Object.defineProperty(exports, key, {
17
- enumerable: true,
18
- get: function get() {
19
- return _tooltip[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 Tooltip = function Tooltip(props) {
39
- var overlayClassName = props.overlayClassName,
40
- _props$theme = props.theme,
41
- theme = _props$theme === void 0 ? '' : _props$theme,
42
- _props$hiddenArrow = props.hiddenArrow,
43
- hiddenArrow = _props$hiddenArrow === void 0 ? false : _props$hiddenArrow,
44
- restProps = __rest(props, ["overlayClassName", "theme", "hiddenArrow"]);
45
- return _react["default"].createElement(_configProvider.ConfigConsumer, null, function (_ref) {
46
- var getPrefixCls = _ref.getPrefixCls;
47
- var prefixCls = getPrefixCls('tooltip');
48
- return _react["default"].createElement(_tooltip["default"], Object.assign({
49
- overlayClassName: (0, _classnames["default"])(prefixCls, 'tnt-tooltip', themeMap(prefixCls, theme), hiddenArrow ? prefixCls + '-arrow-hidden' : '', overlayClassName)
50
- }, restProps));
51
- });
52
- };
53
- var _default = exports["default"] = Tooltip;
@@ -1 +0,0 @@
1
- {"version":3,"file":"tooltip.js","sourceRoot":"","sources":["../../src/tooltip/tooltip.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAyB;AAEzB,6DAAwD;AACxD,8DAAyC;AACzC,4DAAmC;AAEnC,kDAA+B;AAC/B,MAAM,QAAQ,GAAG,CAAC,SAAiB,EAAE,UAAkB,EAAE,EAAE;IACzD,OAAO,GAAG,SAAS,IAAI,UAAU,EAAE,CAAA;AACrC,CAAC,CAAA;AAED,MAAM,OAAO,GAAuE,CAAC,KAAK,EAAE,EAAE;IAC5F,MAAM,EAAE,gBAAgB,EAAE,KAAK,GAAG,EAAE,EAAE,WAAW,GAAG,KAAK,KAAmB,KAAK,EAAnB,SAAS,UAAK,KAAK,EAA3E,4CAAmE,CAAQ,CAAA;IAEjF,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 { TooltipProps } from 'antd/lib/tooltip'\nimport { ConfigConsumer } from 'antd/lib/config-provider'\nimport AntdTooltip from 'antd/lib/tooltip'\nimport classNames from 'classnames'\n\nexport * from 'antd/lib/tooltip'\nconst themeMap = (prefixCls: string, themeColor: string) => {\n return `${prefixCls}-${themeColor}`\n}\n\nconst Tooltip: React.FC<TooltipProps & { theme?: string; hiddenArrow?: boolean }> = (props) => {\n const { overlayClassName, theme = '', hiddenArrow = false, ...restProps } = props\n\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n const prefixCls = getPrefixCls('tooltip')\n\n return (\n <AntdTooltip\n overlayClassName={classNames(\n prefixCls,\n 'tnt-tooltip',\n themeMap(prefixCls, theme),\n hiddenArrow ? prefixCls + '-arrow-hidden' : '',\n overlayClassName\n )}\n {...restProps}\n />\n )\n }}\n </ConfigConsumer>\n )\n}\n\nexport default Tooltip\n"]}