@aloudata/aloudata-design 0.1.0-beta.2

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 (332) hide show
  1. package/README.md +82 -0
  2. package/es/Button/demo/Icon/index.d.ts +3 -0
  3. package/es/Button/demo/Icon/index.js +67 -0
  4. package/es/Button/demo/Icon/index.less +6 -0
  5. package/es/Button/demo/basic/index.d.ts +4 -0
  6. package/es/Button/demo/basic/index.js +57 -0
  7. package/es/Button/demo/basic/index.less +7 -0
  8. package/es/Button/demo/disable/index.d.ts +3 -0
  9. package/es/Button/demo/disable/index.js +23 -0
  10. package/es/Button/demo/disable/index.less +0 -0
  11. package/es/Button/demo/href/index.d.ts +2 -0
  12. package/es/Button/demo/href/index.js +17 -0
  13. package/es/Button/demo/loading/index.d.ts +3 -0
  14. package/es/Button/demo/loading/index.js +37 -0
  15. package/es/Button/demo/loading/index.less +6 -0
  16. package/es/Button/index.d.ts +50 -0
  17. package/es/Button/index.js +108 -0
  18. package/es/Button/style/index.d.ts +2 -0
  19. package/es/Button/style/index.js +2 -0
  20. package/es/Button/style/index.less +255 -0
  21. package/es/Dropdown/Button.d.ts +69 -0
  22. package/es/Dropdown/Button.js +39 -0
  23. package/es/Dropdown/demo/basic/index.d.ts +4 -0
  24. package/es/Dropdown/demo/basic/index.js +18 -0
  25. package/es/Dropdown/demo/button/index.d.ts +3 -0
  26. package/es/Dropdown/demo/button/index.js +159 -0
  27. package/es/Dropdown/demo/button/index.less +9 -0
  28. package/es/Dropdown/demo/placement/index.d.ts +2 -0
  29. package/es/Dropdown/demo/placement/index.js +40 -0
  30. package/es/Dropdown/demo/subMenu/index.d.ts +2 -0
  31. package/es/Dropdown/demo/subMenu/index.js +42 -0
  32. package/es/Dropdown/demo/trigger/index.d.ts +2 -0
  33. package/es/Dropdown/demo/trigger/index.js +17 -0
  34. package/es/Dropdown/index.d.ts +59 -0
  35. package/es/Dropdown/index.js +33 -0
  36. package/es/Dropdown/style/index.d.ts +2 -0
  37. package/es/Dropdown/style/index.js +2 -0
  38. package/es/Dropdown/style/index.less +40 -0
  39. package/es/Icon/iconfont/demo.css +539 -0
  40. package/es/Icon/iconfont/demo_index.html +628 -0
  41. package/es/Icon/iconfont/iconfont.css +93 -0
  42. package/es/Icon/iconfont/iconfont.js +46 -0
  43. package/es/Icon/iconfont/iconfont.json +142 -0
  44. package/es/Icon/iconfont/iconfont.ttf +0 -0
  45. package/es/Icon/iconfont/iconfont.woff +0 -0
  46. package/es/Icon/iconfont/iconfont.woff2 +0 -0
  47. package/es/Icon/index.d.ts +11 -0
  48. package/es/Icon/index.js +42 -0
  49. package/es/Icon/index.less +32 -0
  50. package/es/Input/components/Group/index.d.ts +15 -0
  51. package/es/Input/components/Group/index.js +12 -0
  52. package/es/Input/components/Password/index.d.ts +10 -0
  53. package/es/Input/components/Password/index.js +20 -0
  54. package/es/Input/components/TextArea/index.d.ts +52 -0
  55. package/es/Input/components/TextArea/index.js +14 -0
  56. package/es/Input/demo/allowClear/index.d.ts +3 -0
  57. package/es/Input/demo/allowClear/index.js +11 -0
  58. package/es/Input/demo/allowClear/index.less +0 -0
  59. package/es/Input/demo/basic/index.d.ts +4 -0
  60. package/es/Input/demo/basic/index.js +65 -0
  61. package/es/Input/demo/basic/index.less +6 -0
  62. package/es/Input/demo/gourp/index.d.ts +2 -0
  63. package/es/Input/demo/gourp/index.js +67 -0
  64. package/es/Input/demo/password/index.d.ts +3 -0
  65. package/es/Input/demo/password/index.js +21 -0
  66. package/es/Input/demo/password/index.less +0 -0
  67. package/es/Input/demo/prefix/index.d.ts +3 -0
  68. package/es/Input/demo/prefix/index.js +17 -0
  69. package/es/Input/demo/prefix/index.less +0 -0
  70. package/es/Input/demo/showCount/index.d.ts +3 -0
  71. package/es/Input/demo/showCount/index.js +17 -0
  72. package/es/Input/demo/showCount/index.less +0 -0
  73. package/es/Input/demo/textArea/autoSize.d.ts +2 -0
  74. package/es/Input/demo/textArea/autoSize.js +50 -0
  75. package/es/Input/index.d.ts +65 -0
  76. package/es/Input/index.js +46 -0
  77. package/es/Input/style/index.d.ts +2 -0
  78. package/es/Input/style/index.js +2 -0
  79. package/es/Input/style/index.less +62 -0
  80. package/es/Menu/Divider.d.ts +5 -0
  81. package/es/Menu/Divider.js +15 -0
  82. package/es/Menu/MenuItem.d.ts +17 -0
  83. package/es/Menu/MenuItem.js +15 -0
  84. package/es/Menu/SubMenu.d.ts +26 -0
  85. package/es/Menu/SubMenu.js +29 -0
  86. package/es/Menu/index.d.ts +20 -0
  87. package/es/Menu/index.js +31 -0
  88. package/es/Menu/style/index.d.ts +2 -0
  89. package/es/Menu/style/index.js +2 -0
  90. package/es/Menu/style/index.less +33 -0
  91. package/es/Select/BaseSelect.d.ts +5 -0
  92. package/es/Select/BaseSelect.js +400 -0
  93. package/es/Select/OptionsList/OptGroup.d.ts +7 -0
  94. package/es/Select/OptionsList/OptGroup.js +6 -0
  95. package/es/Select/OptionsList/OptionItem.d.ts +35 -0
  96. package/es/Select/OptionsList/OptionItem.js +157 -0
  97. package/es/Select/OptionsList/Options.d.ts +7 -0
  98. package/es/Select/OptionsList/Options.js +6 -0
  99. package/es/Select/OptionsList/index.d.ts +4 -0
  100. package/es/Select/OptionsList/index.js +187 -0
  101. package/es/Select/Selector/index.d.ts +4 -0
  102. package/es/Select/Selector/index.js +249 -0
  103. package/es/Select/VirtualList.d.ts +5 -0
  104. package/es/Select/VirtualList.js +29 -0
  105. package/es/Select/demo/disabled/index.d.ts +2 -0
  106. package/es/Select/demo/disabled/index.js +50 -0
  107. package/es/Select/demo/multiple/index.d.ts +2 -0
  108. package/es/Select/demo/multiple/index.js +140 -0
  109. package/es/Select/demo/options/index.d.ts +2 -0
  110. package/es/Select/demo/options/index.js +55 -0
  111. package/es/Select/demo/single/index.d.ts +2 -0
  112. package/es/Select/demo/single/index.js +86 -0
  113. package/es/Select/hooks/useCacheOption.d.ts +9 -0
  114. package/es/Select/hooks/useCacheOption.js +107 -0
  115. package/es/Select/index.d.ts +12 -0
  116. package/es/Select/index.js +9 -0
  117. package/es/Select/interface.d.ts +221 -0
  118. package/es/Select/interface.js +1 -0
  119. package/es/Select/style/index.d.ts +2 -0
  120. package/es/Select/style/index.js +2 -0
  121. package/es/Select/style/index.less +539 -0
  122. package/es/Select/utils.d.ts +21 -0
  123. package/es/Select/utils.js +193 -0
  124. package/es/Tabs/TabPane.d.ts +21 -0
  125. package/es/Tabs/TabPane.js +12 -0
  126. package/es/Tabs/demo/adaptHeight/index.d.ts +3 -0
  127. package/es/Tabs/demo/adaptHeight/index.js +19 -0
  128. package/es/Tabs/demo/adaptHeight/index.less +3 -0
  129. package/es/Tabs/demo/basic/index.d.ts +4 -0
  130. package/es/Tabs/demo/basic/index.js +44 -0
  131. package/es/Tabs/demo/basic/index.less +5 -0
  132. package/es/Tabs/demo/horizontalScroll/index.d.ts +3 -0
  133. package/es/Tabs/demo/horizontalScroll/index.js +30 -0
  134. package/es/Tabs/demo/horizontalScroll/index.less +3 -0
  135. package/es/Tabs/index.d.ts +41 -0
  136. package/es/Tabs/index.js +42 -0
  137. package/es/Tabs/style/index.d.ts +2 -0
  138. package/es/Tabs/style/index.js +2 -0
  139. package/es/Tabs/style/index.less +61 -0
  140. package/es/Tooltip/demo/basic/index.d.ts +2 -0
  141. package/es/Tooltip/demo/basic/index.js +7 -0
  142. package/es/Tooltip/demo/overflow/index.d.ts +2 -0
  143. package/es/Tooltip/demo/overflow/index.js +7 -0
  144. package/es/Tooltip/demo/placement/index.d.ts +6 -0
  145. package/es/Tooltip/demo/placement/index.js +70 -0
  146. package/es/Tooltip/demo/placement/index.less +7 -0
  147. package/es/Tooltip/demo/trigger/index.d.ts +3 -0
  148. package/es/Tooltip/demo/trigger/index.js +20 -0
  149. package/es/Tooltip/demo/trigger/index.less +5 -0
  150. package/es/Tooltip/index.d.ts +63 -0
  151. package/es/Tooltip/index.js +31 -0
  152. package/es/Tooltip/style/index.d.ts +2 -0
  153. package/es/Tooltip/style/index.js +2 -0
  154. package/es/Tooltip/style/index.less +14 -0
  155. package/es/_utils/hooks/useControlledState.d.ts +2 -0
  156. package/es/_utils/hooks/useControlledState.js +54 -0
  157. package/es/_utils/hooks/usePrefixCls.d.ts +2 -0
  158. package/es/_utils/hooks/usePrefixCls.js +14 -0
  159. package/es/index.d.ts +8 -0
  160. package/es/index.js +8 -0
  161. package/es/style/index.d.ts +2 -0
  162. package/es/style/index.js +2 -0
  163. package/es/style/index.less +3 -0
  164. package/es/style/mixins/index.less +0 -0
  165. package/es/style/themes/default/index.less +36 -0
  166. package/es/style/themes/default/themeColor.less +259 -0
  167. package/lib/Button/demo/Icon/index.d.ts +3 -0
  168. package/lib/Button/demo/Icon/index.js +82 -0
  169. package/lib/Button/demo/Icon/index.less +6 -0
  170. package/lib/Button/demo/basic/index.d.ts +4 -0
  171. package/lib/Button/demo/basic/index.js +73 -0
  172. package/lib/Button/demo/basic/index.less +7 -0
  173. package/lib/Button/demo/disable/index.d.ts +3 -0
  174. package/lib/Button/demo/disable/index.js +37 -0
  175. package/lib/Button/demo/disable/index.less +0 -0
  176. package/lib/Button/demo/href/index.d.ts +2 -0
  177. package/lib/Button/demo/href/index.js +30 -0
  178. package/lib/Button/demo/loading/index.d.ts +3 -0
  179. package/lib/Button/demo/loading/index.js +51 -0
  180. package/lib/Button/demo/loading/index.less +6 -0
  181. package/lib/Button/index.d.ts +50 -0
  182. package/lib/Button/index.js +124 -0
  183. package/lib/Button/style/index.d.ts +2 -0
  184. package/lib/Button/style/index.js +5 -0
  185. package/lib/Button/style/index.less +255 -0
  186. package/lib/Dropdown/Button.d.ts +69 -0
  187. package/lib/Dropdown/Button.js +52 -0
  188. package/lib/Dropdown/demo/basic/index.d.ts +4 -0
  189. package/lib/Dropdown/demo/basic/index.js +35 -0
  190. package/lib/Dropdown/demo/button/index.d.ts +3 -0
  191. package/lib/Dropdown/demo/button/index.js +182 -0
  192. package/lib/Dropdown/demo/button/index.less +9 -0
  193. package/lib/Dropdown/demo/placement/index.d.ts +2 -0
  194. package/lib/Dropdown/demo/placement/index.js +56 -0
  195. package/lib/Dropdown/demo/subMenu/index.d.ts +2 -0
  196. package/lib/Dropdown/demo/subMenu/index.js +59 -0
  197. package/lib/Dropdown/demo/trigger/index.d.ts +2 -0
  198. package/lib/Dropdown/demo/trigger/index.js +32 -0
  199. package/lib/Dropdown/index.d.ts +59 -0
  200. package/lib/Dropdown/index.js +47 -0
  201. package/lib/Dropdown/style/index.d.ts +2 -0
  202. package/lib/Dropdown/style/index.js +5 -0
  203. package/lib/Dropdown/style/index.less +40 -0
  204. package/lib/Icon/iconfont/demo.css +539 -0
  205. package/lib/Icon/iconfont/demo_index.html +628 -0
  206. package/lib/Icon/iconfont/iconfont.css +93 -0
  207. package/lib/Icon/iconfont/iconfont.js +48 -0
  208. package/lib/Icon/iconfont/iconfont.json +142 -0
  209. package/lib/Icon/iconfont/iconfont.ttf +0 -0
  210. package/lib/Icon/iconfont/iconfont.woff +0 -0
  211. package/lib/Icon/iconfont/iconfont.woff2 +0 -0
  212. package/lib/Icon/index.d.ts +11 -0
  213. package/lib/Icon/index.js +54 -0
  214. package/lib/Icon/index.less +32 -0
  215. package/lib/Input/components/Group/index.d.ts +15 -0
  216. package/lib/Input/components/Group/index.js +24 -0
  217. package/lib/Input/components/Password/index.d.ts +10 -0
  218. package/lib/Input/components/Password/index.js +33 -0
  219. package/lib/Input/components/TextArea/index.d.ts +52 -0
  220. package/lib/Input/components/TextArea/index.js +26 -0
  221. package/lib/Input/demo/allowClear/index.d.ts +3 -0
  222. package/lib/Input/demo/allowClear/index.js +25 -0
  223. package/lib/Input/demo/allowClear/index.less +0 -0
  224. package/lib/Input/demo/basic/index.d.ts +4 -0
  225. package/lib/Input/demo/basic/index.js +80 -0
  226. package/lib/Input/demo/basic/index.less +6 -0
  227. package/lib/Input/demo/gourp/index.d.ts +2 -0
  228. package/lib/Input/demo/gourp/index.js +81 -0
  229. package/lib/Input/demo/password/index.d.ts +3 -0
  230. package/lib/Input/demo/password/index.js +35 -0
  231. package/lib/Input/demo/password/index.less +0 -0
  232. package/lib/Input/demo/prefix/index.d.ts +3 -0
  233. package/lib/Input/demo/prefix/index.js +32 -0
  234. package/lib/Input/demo/prefix/index.less +0 -0
  235. package/lib/Input/demo/showCount/index.d.ts +3 -0
  236. package/lib/Input/demo/showCount/index.js +31 -0
  237. package/lib/Input/demo/showCount/index.less +0 -0
  238. package/lib/Input/demo/textArea/autoSize.d.ts +2 -0
  239. package/lib/Input/demo/textArea/autoSize.js +63 -0
  240. package/lib/Input/index.d.ts +65 -0
  241. package/lib/Input/index.js +63 -0
  242. package/lib/Input/style/index.d.ts +2 -0
  243. package/lib/Input/style/index.js +5 -0
  244. package/lib/Input/style/index.less +62 -0
  245. package/lib/Menu/Divider.d.ts +5 -0
  246. package/lib/Menu/Divider.js +28 -0
  247. package/lib/Menu/MenuItem.d.ts +17 -0
  248. package/lib/Menu/MenuItem.js +28 -0
  249. package/lib/Menu/SubMenu.d.ts +26 -0
  250. package/lib/Menu/SubMenu.js +44 -0
  251. package/lib/Menu/index.d.ts +20 -0
  252. package/lib/Menu/index.js +49 -0
  253. package/lib/Menu/style/index.d.ts +2 -0
  254. package/lib/Menu/style/index.js +5 -0
  255. package/lib/Menu/style/index.less +33 -0
  256. package/lib/Select/BaseSelect.d.ts +5 -0
  257. package/lib/Select/BaseSelect.js +433 -0
  258. package/lib/Select/OptionsList/OptGroup.d.ts +7 -0
  259. package/lib/Select/OptionsList/OptGroup.js +14 -0
  260. package/lib/Select/OptionsList/OptionItem.d.ts +35 -0
  261. package/lib/Select/OptionsList/OptionItem.js +185 -0
  262. package/lib/Select/OptionsList/Options.d.ts +7 -0
  263. package/lib/Select/OptionsList/Options.js +14 -0
  264. package/lib/Select/OptionsList/index.d.ts +4 -0
  265. package/lib/Select/OptionsList/index.js +207 -0
  266. package/lib/Select/Selector/index.d.ts +4 -0
  267. package/lib/Select/Selector/index.js +273 -0
  268. package/lib/Select/VirtualList.d.ts +5 -0
  269. package/lib/Select/VirtualList.js +42 -0
  270. package/lib/Select/demo/disabled/index.d.ts +2 -0
  271. package/lib/Select/demo/disabled/index.js +64 -0
  272. package/lib/Select/demo/multiple/index.d.ts +2 -0
  273. package/lib/Select/demo/multiple/index.js +154 -0
  274. package/lib/Select/demo/options/index.d.ts +2 -0
  275. package/lib/Select/demo/options/index.js +69 -0
  276. package/lib/Select/demo/single/index.d.ts +2 -0
  277. package/lib/Select/demo/single/index.js +99 -0
  278. package/lib/Select/hooks/useCacheOption.d.ts +9 -0
  279. package/lib/Select/hooks/useCacheOption.js +113 -0
  280. package/lib/Select/index.d.ts +12 -0
  281. package/lib/Select/index.js +34 -0
  282. package/lib/Select/interface.d.ts +221 -0
  283. package/lib/Select/interface.js +5 -0
  284. package/lib/Select/style/index.d.ts +2 -0
  285. package/lib/Select/style/index.js +5 -0
  286. package/lib/Select/style/index.less +539 -0
  287. package/lib/Select/utils.d.ts +21 -0
  288. package/lib/Select/utils.js +233 -0
  289. package/lib/Tabs/TabPane.d.ts +21 -0
  290. package/lib/Tabs/TabPane.js +24 -0
  291. package/lib/Tabs/demo/adaptHeight/index.d.ts +3 -0
  292. package/lib/Tabs/demo/adaptHeight/index.js +34 -0
  293. package/lib/Tabs/demo/adaptHeight/index.less +3 -0
  294. package/lib/Tabs/demo/basic/index.d.ts +4 -0
  295. package/lib/Tabs/demo/basic/index.js +67 -0
  296. package/lib/Tabs/demo/basic/index.less +5 -0
  297. package/lib/Tabs/demo/horizontalScroll/index.d.ts +3 -0
  298. package/lib/Tabs/demo/horizontalScroll/index.js +45 -0
  299. package/lib/Tabs/demo/horizontalScroll/index.less +3 -0
  300. package/lib/Tabs/index.d.ts +41 -0
  301. package/lib/Tabs/index.js +58 -0
  302. package/lib/Tabs/style/index.d.ts +2 -0
  303. package/lib/Tabs/style/index.js +5 -0
  304. package/lib/Tabs/style/index.less +61 -0
  305. package/lib/Tooltip/demo/basic/index.d.ts +2 -0
  306. package/lib/Tooltip/demo/basic/index.js +20 -0
  307. package/lib/Tooltip/demo/overflow/index.d.ts +2 -0
  308. package/lib/Tooltip/demo/overflow/index.js +20 -0
  309. package/lib/Tooltip/demo/placement/index.d.ts +6 -0
  310. package/lib/Tooltip/demo/placement/index.js +86 -0
  311. package/lib/Tooltip/demo/placement/index.less +7 -0
  312. package/lib/Tooltip/demo/trigger/index.d.ts +3 -0
  313. package/lib/Tooltip/demo/trigger/index.js +34 -0
  314. package/lib/Tooltip/demo/trigger/index.less +5 -0
  315. package/lib/Tooltip/index.d.ts +63 -0
  316. package/lib/Tooltip/index.js +44 -0
  317. package/lib/Tooltip/style/index.d.ts +2 -0
  318. package/lib/Tooltip/style/index.js +5 -0
  319. package/lib/Tooltip/style/index.less +14 -0
  320. package/lib/_utils/hooks/useControlledState.d.ts +2 -0
  321. package/lib/_utils/hooks/useControlledState.js +63 -0
  322. package/lib/_utils/hooks/usePrefixCls.d.ts +2 -0
  323. package/lib/_utils/hooks/usePrefixCls.js +27 -0
  324. package/lib/index.d.ts +8 -0
  325. package/lib/index.js +63 -0
  326. package/lib/style/index.d.ts +2 -0
  327. package/lib/style/index.js +5 -0
  328. package/lib/style/index.less +3 -0
  329. package/lib/style/mixins/index.less +0 -0
  330. package/lib/style/themes/default/index.less +36 -0
  331. package/lib/style/themes/default/themeColor.less +259 -0
  332. package/package.json +87 -0
@@ -0,0 +1,193 @@
1
+ var _excluded = ["value", "children"],
2
+ _excluded2 = ["options"];
3
+
4
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
5
+
6
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
7
+
8
+ 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); }
9
+
10
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
11
+
12
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
13
+
14
+ 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; }
15
+
16
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
17
+
18
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
19
+
20
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
21
+
22
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
23
+
24
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
25
+
26
+ import React from 'react';
27
+ import { concat, uniqueId } from 'lodash';
28
+ var ZERO_INDEX = 0;
29
+ var ungroupedOptionKeyPrefix = 'select_isungrouped_option_';
30
+ var ungroupedOptionKey = uniqueId(ungroupedOptionKeyPrefix);
31
+ var ungroupedOptionLabel = '未分组';
32
+ export var customOptionKeyPrefix = 'select_custom_option_';
33
+ export var customOptionKey = uniqueId(customOptionKeyPrefix); // ReactNode To Options
34
+
35
+ export function convertNodeToOption(node, group) {
36
+ var _node$props = node.props,
37
+ value = _node$props.value,
38
+ children = _node$props.children,
39
+ restProps = _objectWithoutProperties(_node$props, _excluded);
40
+
41
+ var groupValue = group.groupValue,
42
+ groupLabel = group.groupLabel;
43
+
44
+ if (groupLabel && groupLabel) {
45
+ return _objectSpread({
46
+ value: value,
47
+ label: children !== undefined ? children : value,
48
+ groupValue: groupValue,
49
+ groupLabel: groupLabel
50
+ }, restProps);
51
+ }
52
+
53
+ return _objectSpread({
54
+ value: value,
55
+ label: children !== undefined ? children : value
56
+ }, restProps);
57
+ }
58
+ export var getFlattenOptions = function getFlattenOptions(data, hasGroup) {
59
+ var groupMap = new Map();
60
+
61
+ if (!hasGroup) {
62
+ return data;
63
+ }
64
+
65
+ data === null || data === void 0 ? void 0 : data.map(function (cur) {
66
+ var gValue = groupMap.get(cur.groupValue);
67
+
68
+ if (gValue) {
69
+ var options = gValue.options,
70
+ rest = _objectWithoutProperties(gValue, _excluded2);
71
+
72
+ return groupMap.set(cur.groupValue, _objectSpread({
73
+ options: [].concat(_toConsumableArray(options), [cur])
74
+ }, rest));
75
+ }
76
+
77
+ return groupMap.set(cur.groupValue, {
78
+ label: cur.groupLabel,
79
+ value: cur.groupValue,
80
+ isSelectOptGroup: true,
81
+ options: [cur]
82
+ });
83
+ });
84
+ var flattenOption = [];
85
+ groupMap.forEach(function (value) {
86
+ flattenOption.push(value); // @ts-ignore
87
+
88
+ flattenOption.push.apply(flattenOption, _toConsumableArray(value.options));
89
+ });
90
+ return flattenOption;
91
+ };
92
+ export function convertChildrenToData(nodes) {
93
+ var group = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
94
+ var nodeOptions = [];
95
+ React.Children.forEach(nodes, function (node) {
96
+ if (! /*#__PURE__*/React.isValidElement(node)) {
97
+ return;
98
+ }
99
+
100
+ var isSelectOptGroup = node.type.isSelectOptGroup,
101
+ _node$props2 = node.props,
102
+ children = _node$props2.children,
103
+ label = _node$props2.label,
104
+ value = _node$props2.value; // 联合类型
105
+
106
+ if (!isSelectOptGroup) {
107
+ // option
108
+ nodeOptions.push(convertNodeToOption(node, group));
109
+ } else {
110
+ // Group
111
+ nodeOptions = concat(nodeOptions, convertChildrenToData(children, {
112
+ groupLabel: label,
113
+ groupValue: value
114
+ }));
115
+ }
116
+ });
117
+ return nodeOptions;
118
+ } // optionsMap flattenOptions
119
+
120
+ export function handleOptions(mergedOptions, setCacheOptions, updateGroup) {
121
+ var isGroup = !!mergedOptions.find(function (v) {
122
+ return Object.prototype.hasOwnProperty.call(v, 'groupValue');
123
+ });
124
+ var flattenOptions = [];
125
+ mergedOptions.forEach(function (option) {
126
+ var optionGroupLabel = option.groupLabel,
127
+ optionGroupValue = option.groupValue;
128
+
129
+ if (isGroup && !optionGroupValue && !optionGroupLabel) {
130
+ var ungroupedOption = _objectSpread(_objectSpread({}, option), {}, {
131
+ groupLabel: ungroupedOptionLabel,
132
+ groupValue: ungroupedOptionKey
133
+ });
134
+
135
+ flattenOptions.push(ungroupedOption);
136
+ } else {
137
+ flattenOptions.push(option);
138
+ }
139
+ });
140
+ updateGroup(isGroup);
141
+ setCacheOptions(flattenOptions);
142
+ return {
143
+ flattenOptions: flattenOptions,
144
+ isGroup: isGroup
145
+ };
146
+ } // provide search matching hightlight;
147
+
148
+ export var defaultLabelRenderer = function defaultLabelRenderer(input, prefix) {
149
+ return function (option, isGroup) {
150
+ var title = option.title,
151
+ label = option.label;
152
+
153
+ if (isGroup || typeof label !== 'string') {
154
+ return title || label;
155
+ }
156
+
157
+ var index = label.indexOf(input);
158
+ return /*#__PURE__*/React.createElement("div", {
159
+ style: {
160
+ display: 'inline-block',
161
+ lineHeight: '40px'
162
+ }
163
+ }, label.slice(ZERO_INDEX, index), /*#__PURE__*/React.createElement("span", {
164
+ className: "".concat(prefix, "-search-highlight")
165
+ }, label.slice(index, index + input.length)), label.slice(index + input.length));
166
+ };
167
+ };
168
+ export var defaultOptionLabelRenderer = function defaultOptionLabelRenderer(value, option) {
169
+ return (option === null || option === void 0 ? void 0 : option.title) || (option === null || option === void 0 ? void 0 : option.label) || value;
170
+ };
171
+ export var defaultSearchPredicate = function defaultSearchPredicate(input) {
172
+ return function (o) {
173
+ return typeof o.label === 'string' ? o.label.includes(input) : true;
174
+ };
175
+ };
176
+ export var defaultMatchPredicate = function defaultMatchPredicate(input) {
177
+ return function (o) {
178
+ return o.label === input;
179
+ };
180
+ };
181
+ export var CustomOption = function CustomOption(value) {
182
+ var withGroup = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
183
+ var id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : customOptionKeyPrefix;
184
+ return withGroup ? {
185
+ value: value,
186
+ label: value.toString(),
187
+ groupValue: id,
188
+ groupLabel: '自由输入'
189
+ } : {
190
+ value: value,
191
+ label: value.toString()
192
+ };
193
+ };
@@ -0,0 +1,21 @@
1
+ import { ReactNode } from 'react';
2
+ export interface ITabPaneProps {
3
+ /**
4
+ * @description 被隐藏时是否渲染 DOM 结构
5
+ * @default false
6
+ */
7
+ forceRender?: boolean;
8
+ /**
9
+ * @description 对应 activeKey
10
+ * @default -
11
+ */
12
+ key?: string;
13
+ /**
14
+ * @description 选项卡头显示的内容
15
+ * @default -
16
+ */
17
+ tab: ReactNode;
18
+ className?: string;
19
+ children?: ReactNode;
20
+ }
21
+ export default function TabPane(props: ITabPaneProps): JSX.Element;
@@ -0,0 +1,12 @@
1
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2
+
3
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
+
5
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
+
7
+ import React from 'react';
8
+ import AntdTabs from 'antd/lib/tabs';
9
+ var AntdTabPane = AntdTabs.TabPane;
10
+ export default function TabPane(props) {
11
+ return /*#__PURE__*/React.createElement(AntdTabPane, _objectSpread({}, props));
12
+ }
@@ -0,0 +1,3 @@
1
+ import './index.less';
2
+ declare const _default: () => JSX.Element;
3
+ export default _default;
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ import { Tabs } from '@aloudata/aloudata-design';
4
+ var TabPane = Tabs.TabPane;
5
+ export default (function () {
6
+ return /*#__PURE__*/React.createElement("div", {
7
+ className: "demo-adapt-height"
8
+ }, /*#__PURE__*/React.createElement(Tabs, {
9
+ adaptHeight: true
10
+ }, /*#__PURE__*/React.createElement(TabPane, {
11
+ tab: "Tab 1",
12
+ key: "1",
13
+ className: "demo-tabpane"
14
+ }, "Content of Tab Pane 1"), /*#__PURE__*/React.createElement(TabPane, {
15
+ tab: "Tab 2",
16
+ key: "2",
17
+ className: "demo-tabpane"
18
+ }, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "Content of Tab Pane 2"), /*#__PURE__*/React.createElement("div", null, "Content of Tab Pane 2"), /*#__PURE__*/React.createElement("div", null, "Content of Tab Pane 2"), /*#__PURE__*/React.createElement("div", null, "Content of Tab Pane 2"), /*#__PURE__*/React.createElement("div", null, "Content of Tab Pane 2"), /*#__PURE__*/React.createElement("div", null, "Content of Tab Pane 2"), /*#__PURE__*/React.createElement("div", null, "Content of Tab Pane 2"), /*#__PURE__*/React.createElement("div", null, "Content of Tab Pane 2"), /*#__PURE__*/React.createElement("div", null, "Content of Tab Pane 2"), /*#__PURE__*/React.createElement("div", null, "Content of Tab Pane 2"), /*#__PURE__*/React.createElement("div", null, "Content of Tab Pane 2")))));
19
+ });
@@ -0,0 +1,3 @@
1
+ .demo-adapt-height {
2
+ height: 200px;
3
+ }
@@ -0,0 +1,4 @@
1
+ import 'antd/lib//switch/style/index.less';
2
+ import './index.less';
3
+ declare const _default: () => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,44 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+
3
+ 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."); }
4
+
5
+ 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); }
6
+
7
+ 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; }
8
+
9
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
10
+
11
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
12
+
13
+ import React, { useState } from 'react';
14
+ import Switch from 'antd/lib/switch';
15
+ import 'antd/lib//switch/style/index.less';
16
+ import './index.less';
17
+ import { Tabs } from '@aloudata/aloudata-design';
18
+ var TabPane = Tabs.TabPane;
19
+ export default (function () {
20
+ var _useState = useState('default'),
21
+ _useState2 = _slicedToArray(_useState, 2),
22
+ size = _useState2[0],
23
+ setSize = _useState2[1];
24
+
25
+ return /*#__PURE__*/React.createElement("div", {
26
+ className: "demo-basic"
27
+ }, /*#__PURE__*/React.createElement("div", null, "large size: ", /*#__PURE__*/React.createElement(Switch, {
28
+ checked: size === 'large',
29
+ onChange: function onChange(checked) {
30
+ return setSize(checked ? 'large' : 'default');
31
+ }
32
+ })), /*#__PURE__*/React.createElement("div", {
33
+ className: "tabs-container"
34
+ }, /*#__PURE__*/React.createElement(Tabs, {
35
+ size: size,
36
+ destroyInactiveTabPane: true
37
+ }, /*#__PURE__*/React.createElement(TabPane, {
38
+ tab: "Tab 1",
39
+ key: "1"
40
+ }, "Content of Tab Pane 1"), /*#__PURE__*/React.createElement(TabPane, {
41
+ tab: "Tab 2",
42
+ key: "2"
43
+ }, "Content of Tab Pane 2"))));
44
+ });
@@ -0,0 +1,5 @@
1
+ .demo-basic {
2
+ .tabs-container {
3
+ height: 100px;
4
+ }
5
+ }
@@ -0,0 +1,3 @@
1
+ import './index.less';
2
+ declare const _default: () => JSX.Element;
3
+ export default _default;
@@ -0,0 +1,30 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ import { Tabs } from '@aloudata/aloudata-design';
4
+ var TabPane = Tabs.TabPane;
5
+ export default (function () {
6
+ return /*#__PURE__*/React.createElement("div", {
7
+ className: "demo-horizontal-scroll"
8
+ }, /*#__PURE__*/React.createElement(Tabs, null, /*#__PURE__*/React.createElement(TabPane, {
9
+ tab: "Tab 1",
10
+ key: "1"
11
+ }, "Content of Tab Pane 1"), /*#__PURE__*/React.createElement(TabPane, {
12
+ tab: "Tab 2",
13
+ key: "2"
14
+ }, "Content of Tab Pane 2"), /*#__PURE__*/React.createElement(TabPane, {
15
+ tab: "Tab 3",
16
+ key: "3"
17
+ }, "Content of Tab Pane 3"), /*#__PURE__*/React.createElement(TabPane, {
18
+ tab: "Tab 4",
19
+ key: "4"
20
+ }, "Content of Tab Pane 4"), /*#__PURE__*/React.createElement(TabPane, {
21
+ tab: "Tab 5",
22
+ key: "5"
23
+ }, "Content of Tab Pane 5"), /*#__PURE__*/React.createElement(TabPane, {
24
+ tab: "Tab 6",
25
+ key: "6"
26
+ }, "Content of Tab Pane 6"), /*#__PURE__*/React.createElement(TabPane, {
27
+ tab: "Tab 7",
28
+ key: "7"
29
+ }, "Content of Tab Pane 7")));
30
+ });
@@ -0,0 +1,3 @@
1
+ .demo-horizontal-scroll {
2
+ width: 200px;
3
+ }
@@ -0,0 +1,41 @@
1
+ import React from 'react';
2
+ import './style';
3
+ export interface ITabsProps {
4
+ /**
5
+ * @description 大小
6
+ * @default default
7
+ */
8
+ size?: 'large' | 'default';
9
+ /**
10
+ * @description 当前激活 tab 面板的 key
11
+ * @default -
12
+ */
13
+ activeKey?: string;
14
+ /**
15
+ * @description 初始化选中面板的 key,如果没有设置 activeKey
16
+ * @default 第一个面板的 key
17
+ */
18
+ defaultActiveKey?: string;
19
+ /**
20
+ * @description 切换面板的回调
21
+ * @default -
22
+ */
23
+ onChange?: (activeKey: string) => void;
24
+ /**
25
+ * @description 被隐藏时是否销毁 DOM 结构
26
+ * @default false
27
+ */
28
+ destroyInactiveTabPane?: boolean;
29
+ /**
30
+ * @description 撑满容器的高度
31
+ * @default false
32
+ */
33
+ adaptHeight?: boolean;
34
+ className?: string;
35
+ children?: React.ReactNode;
36
+ }
37
+ declare function Tabs(props: ITabsProps): JSX.Element;
38
+ declare namespace Tabs {
39
+ var TabPane: typeof import("./TabPane").default;
40
+ }
41
+ export default Tabs;
@@ -0,0 +1,42 @@
1
+ var _excluded = ["size", "className", "adaptHeight"];
2
+
3
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4
+
5
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
+
7
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8
+
9
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
10
+
11
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
12
+
13
+ import React from 'react';
14
+ import AntdTabs from 'antd/lib/tabs';
15
+ import Icon from '../Icon';
16
+ import TabPane from './TabPane';
17
+ import classNames from 'classnames';
18
+ import './style';
19
+ export default function Tabs(props) {
20
+ var size = props.size,
21
+ className = props.className,
22
+ adaptHeight = props.adaptHeight,
23
+ otherProps = _objectWithoutProperties(props, _excluded);
24
+
25
+ var tabsProps = _objectSpread({}, otherProps);
26
+
27
+ if (size === 'large') {
28
+ tabsProps.size = size;
29
+ }
30
+
31
+ return /*#__PURE__*/React.createElement(AntdTabs, _objectSpread({
32
+ moreIcon: /*#__PURE__*/React.createElement(Icon, {
33
+ type: "more_vert",
34
+ size: 18
35
+ }),
36
+ tabBarGutter: 24,
37
+ className: classNames('ald-tabs', className, {
38
+ 'ald-adapt-height': adaptHeight
39
+ })
40
+ }, tabsProps));
41
+ }
42
+ Tabs.TabPane = TabPane;
@@ -0,0 +1,2 @@
1
+ import '../../style';
2
+ import './index.less';
@@ -0,0 +1,2 @@
1
+ import '../../style';
2
+ import './index.less';
@@ -0,0 +1,61 @@
1
+ @import '../../style/index.less';
2
+
3
+ .ald-tabs {
4
+ &.ant-tabs {
5
+ color: @NL30;
6
+ }
7
+
8
+ .ant-tabs-tab {
9
+ font-size: 14px;
10
+ line-height: 20px;
11
+
12
+ &:hover {
13
+ color: inherit;
14
+ }
15
+
16
+ &.ant-tabs-tab-active {
17
+ font-weight: 500;
18
+ }
19
+ }
20
+
21
+ .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn {
22
+ text-shadow: none;
23
+ }
24
+
25
+ /* large size */
26
+ &.ant-tabs-large {
27
+ .ant-tabs-tab {
28
+ font-size: 16px;
29
+ line-height: 24px;
30
+ }
31
+ }
32
+
33
+ .ant-tabs-nav-more {
34
+ margin: 0 !important;
35
+ }
36
+
37
+ /* body自适应高度 */
38
+ &.ald-adapt-height {
39
+ height: 100%;
40
+
41
+ .ant-tabs-content {
42
+ height: 100%;
43
+ }
44
+
45
+ .ant-tabs-tabpane {
46
+ height: 100%;
47
+ overflow-y: auto;
48
+ }
49
+ }
50
+
51
+ &.ant-tabs-top > .ant-tabs-nav,
52
+ &.ant-tabs-bottom > .ant-tabs-nav,
53
+ &.ant-tabs-top > div > .ant-tabs-nav,
54
+ &.ant-tabs-bottom > div > .ant-tabs-nav {
55
+ margin: 0 0 24px;
56
+
57
+ &::before {
58
+ border-color: @NL90;
59
+ }
60
+ }
61
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: () => JSX.Element;
2
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { Tooltip } from '@aloudata/aloudata-design';
3
+ export default (function () {
4
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Tooltip, {
5
+ title: "Tooltip"
6
+ }, /*#__PURE__*/React.createElement("span", null, "Tooltip will show on mouse enter")));
7
+ });
@@ -0,0 +1,2 @@
1
+ declare const _default: () => JSX.Element;
2
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { Tooltip } from '@aloudata/aloudata-design';
3
+ export default (function () {
4
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Tooltip, {
5
+ title: "longMsglongMsglongMsglongMsglongMsglongMsglongMsglongMsglongMsglongMsglongMsglongMsglongMsglongMsglongMsglongMsglongMsglongMsglongMsglongMsglongMsg"
6
+ }, /*#__PURE__*/React.createElement("span", null, "Tooltip will show on mouse enter")));
7
+ });
@@ -0,0 +1,6 @@
1
+ /**
2
+ * title: 调整位置
3
+ */
4
+ import './index.less';
5
+ declare const _default: () => JSX.Element;
6
+ export default _default;
@@ -0,0 +1,70 @@
1
+ /**
2
+ * title: 调整位置
3
+ */
4
+ import React from 'react';
5
+ import { Tooltip, Button } from '@aloudata/aloudata-design';
6
+ import './index.less';
7
+ var text = /*#__PURE__*/React.createElement("span", null, "prompt text");
8
+ var buttonWidth = 70;
9
+ export default (function () {
10
+ return /*#__PURE__*/React.createElement("div", {
11
+ className: "demo-placement"
12
+ }, /*#__PURE__*/React.createElement("div", {
13
+ style: {
14
+ marginLeft: buttonWidth,
15
+ whiteSpace: 'nowrap'
16
+ }
17
+ }, /*#__PURE__*/React.createElement(Tooltip, {
18
+ placement: "topLeft",
19
+ title: text
20
+ }, /*#__PURE__*/React.createElement(Button, null, "TL")), /*#__PURE__*/React.createElement(Tooltip, {
21
+ placement: "top",
22
+ title: text
23
+ }, /*#__PURE__*/React.createElement(Button, null, "Top")), /*#__PURE__*/React.createElement(Tooltip, {
24
+ placement: "topRight",
25
+ title: text
26
+ }, /*#__PURE__*/React.createElement(Button, null, "TR"))), /*#__PURE__*/React.createElement("div", {
27
+ style: {
28
+ width: buttonWidth,
29
+ float: 'left'
30
+ }
31
+ }, /*#__PURE__*/React.createElement(Tooltip, {
32
+ placement: "leftTop",
33
+ title: text
34
+ }, /*#__PURE__*/React.createElement(Button, null, "LT")), /*#__PURE__*/React.createElement(Tooltip, {
35
+ placement: "left",
36
+ title: text
37
+ }, /*#__PURE__*/React.createElement(Button, null, "Left")), /*#__PURE__*/React.createElement(Tooltip, {
38
+ placement: "leftBottom",
39
+ title: text
40
+ }, /*#__PURE__*/React.createElement(Button, null, "LB"))), /*#__PURE__*/React.createElement("div", {
41
+ style: {
42
+ width: buttonWidth,
43
+ marginLeft: buttonWidth * 4 + 24
44
+ }
45
+ }, /*#__PURE__*/React.createElement(Tooltip, {
46
+ placement: "rightTop",
47
+ title: text
48
+ }, /*#__PURE__*/React.createElement(Button, null, "RT")), /*#__PURE__*/React.createElement(Tooltip, {
49
+ placement: "right",
50
+ title: text
51
+ }, /*#__PURE__*/React.createElement(Button, null, "Right")), /*#__PURE__*/React.createElement(Tooltip, {
52
+ placement: "rightBottom",
53
+ title: text
54
+ }, /*#__PURE__*/React.createElement(Button, null, "RB"))), /*#__PURE__*/React.createElement("div", {
55
+ style: {
56
+ marginLeft: buttonWidth,
57
+ clear: 'both',
58
+ whiteSpace: 'nowrap'
59
+ }
60
+ }, /*#__PURE__*/React.createElement(Tooltip, {
61
+ placement: "bottomLeft",
62
+ title: text
63
+ }, /*#__PURE__*/React.createElement(Button, null, "BL")), /*#__PURE__*/React.createElement(Tooltip, {
64
+ placement: "bottom",
65
+ title: text
66
+ }, /*#__PURE__*/React.createElement(Button, null, "Bottom")), /*#__PURE__*/React.createElement(Tooltip, {
67
+ placement: "bottomRight",
68
+ title: text
69
+ }, /*#__PURE__*/React.createElement(Button, null, "BR"))));
70
+ });
@@ -0,0 +1,7 @@
1
+ .demo-placement {
2
+ .ant-btn {
3
+ width: 70px;
4
+ margin-right: 8px;
5
+ margin-bottom: 8px;
6
+ }
7
+ }
@@ -0,0 +1,3 @@
1
+ import './index.less';
2
+ declare const _default: () => JSX.Element;
3
+ export default _default;
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import { Tooltip, Button } from '@aloudata/aloudata-design';
3
+ import './index.less';
4
+ export default (function () {
5
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
6
+ className: "demo-trigger"
7
+ }, /*#__PURE__*/React.createElement(Tooltip, {
8
+ title: "Tooltip",
9
+ trigger: "hover"
10
+ }, /*#__PURE__*/React.createElement(Button, null, "hover")), /*#__PURE__*/React.createElement(Tooltip, {
11
+ title: "Tooltip",
12
+ trigger: "click"
13
+ }, /*#__PURE__*/React.createElement(Button, null, "click")), /*#__PURE__*/React.createElement(Tooltip, {
14
+ title: "Tooltip",
15
+ trigger: "contextMenu"
16
+ }, /*#__PURE__*/React.createElement(Button, null, "contextMenu")), /*#__PURE__*/React.createElement(Tooltip, {
17
+ title: "Tooltip",
18
+ trigger: "focus"
19
+ }, /*#__PURE__*/React.createElement(Button, null, "focus"))));
20
+ });
@@ -0,0 +1,5 @@
1
+ .demo-trigger {
2
+ .ant-btn {
3
+ margin-right: 8px;
4
+ }
5
+ }