yootd 0.0.1

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 (334) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +43 -0
  3. package/dist/Preview/assets/phonebg.png +0 -0
  4. package/dist/Preview/components/icons/AdaptIcon.d.ts +3 -0
  5. package/dist/Preview/components/icons/AdaptIcon.js +60 -0
  6. package/dist/Preview/components/icons/MagnifyIcon.d.ts +3 -0
  7. package/dist/Preview/components/icons/MagnifyIcon.js +40 -0
  8. package/dist/Preview/components/icons/ResetIcon.d.ts +3 -0
  9. package/dist/Preview/components/icons/ResetIcon.js +66 -0
  10. package/dist/Preview/components/icons/ShrinkIcon.d.ts +3 -0
  11. package/dist/Preview/components/icons/ShrinkIcon.js +40 -0
  12. package/dist/Preview/components/preview/phone.d.ts +7 -0
  13. package/dist/Preview/components/preview/phone.js +10 -0
  14. package/dist/Preview/components/preview/phone.scss +8 -0
  15. package/dist/Preview/components/preview/web.d.ts +6 -0
  16. package/dist/Preview/components/preview/web.js +10 -0
  17. package/dist/Preview/components/reactflow/Controls.d.ts +5 -0
  18. package/dist/Preview/components/reactflow/Controls.js +69 -0
  19. package/dist/Preview/components/reactflow/TopPreview.d.ts +5 -0
  20. package/dist/Preview/components/reactflow/TopPreview.js +28 -0
  21. package/dist/Preview/index.d.ts +5 -0
  22. package/dist/Preview/index.js +94 -0
  23. package/dist/Preview/index.scss +35 -0
  24. package/dist/Preview/types/type.d.ts +21 -0
  25. package/dist/affix/index.d.ts +3 -0
  26. package/dist/affix/index.js +2 -0
  27. package/dist/alert/index.d.ts +5 -0
  28. package/dist/alert/index.js +2 -0
  29. package/dist/anchor/index.d.ts +10 -0
  30. package/dist/anchor/index.js +18 -0
  31. package/dist/anchor/index.scss +23 -0
  32. package/dist/app/index.d.ts +5 -0
  33. package/dist/app/index.js +2 -0
  34. package/dist/approval-process/components/Avatar.d.ts +3 -0
  35. package/dist/approval-process/components/Avatar.js +100 -0
  36. package/dist/approval-process/components/BackOut.d.ts +3 -0
  37. package/dist/approval-process/components/BackOut.js +35 -0
  38. package/dist/approval-process/components/Failed.d.ts +3 -0
  39. package/dist/approval-process/components/Failed.js +37 -0
  40. package/dist/approval-process/components/Pending.d.ts +3 -0
  41. package/dist/approval-process/components/Pending.js +51 -0
  42. package/dist/approval-process/components/StartIcon.d.ts +3 -0
  43. package/dist/approval-process/components/StartIcon.js +35 -0
  44. package/dist/approval-process/components/Success.d.ts +3 -0
  45. package/dist/approval-process/components/Success.js +35 -0
  46. package/dist/approval-process/index.d.ts +7 -0
  47. package/dist/approval-process/index.js +96 -0
  48. package/dist/approval-process/index.scss +95 -0
  49. package/dist/areas/index.d.ts +4 -0
  50. package/dist/areas/index.js +317 -0
  51. package/dist/areas/index.scss +21 -0
  52. package/dist/areas/types/types.d.ts +39 -0
  53. package/dist/aside/components/AddBtnIcon.d.ts +3 -0
  54. package/dist/aside/components/AddBtnIcon.js +27 -0
  55. package/dist/aside/components/DelBtnIcon.d.ts +3 -0
  56. package/dist/aside/components/DelBtnIcon.js +33 -0
  57. package/dist/aside/components/DragBtnIcon.d.ts +3 -0
  58. package/dist/aside/components/DragBtnIcon.js +26 -0
  59. package/dist/aside/components/EditBtnIcon.d.ts +3 -0
  60. package/dist/aside/components/EditBtnIcon.js +33 -0
  61. package/dist/aside/components/SortableItem.d.ts +5 -0
  62. package/dist/aside/components/SortableItem.js +125 -0
  63. package/dist/aside/components/SortableItem.scss +93 -0
  64. package/dist/aside/index.d.ts +4 -0
  65. package/dist/aside/index.js +186 -0
  66. package/dist/aside/index.scss +25 -0
  67. package/dist/aside/types/types.d.ts +44 -0
  68. package/dist/auto-complete/index.d.ts +4 -0
  69. package/dist/auto-complete/index.js +2 -0
  70. package/dist/avatar/index.d.ts +3 -0
  71. package/dist/avatar/index.js +2 -0
  72. package/dist/badge/index.d.ts +11 -0
  73. package/dist/badge/index.js +21 -0
  74. package/dist/badge/index.scss +5 -0
  75. package/dist/breadcrumb/index.d.ts +9 -0
  76. package/dist/breadcrumb/index.js +10 -0
  77. package/dist/business-tree/components/dept.d.ts +4 -0
  78. package/dist/business-tree/components/dept.js +35 -0
  79. package/dist/business-tree/components/space.d.ts +4 -0
  80. package/dist/business-tree/components/space.js +48 -0
  81. package/dist/business-tree/index.d.ts +3 -0
  82. package/dist/business-tree/index.js +16 -0
  83. package/dist/button/index.d.ts +13 -0
  84. package/dist/button/index.js +54 -0
  85. package/dist/button/index.scss +31 -0
  86. package/dist/calendar/index.d.ts +3 -0
  87. package/dist/calendar/index.js +2 -0
  88. package/dist/card/index.d.ts +3 -0
  89. package/dist/card/index.js +2 -0
  90. package/dist/carousel/index.d.ts +3 -0
  91. package/dist/carousel/index.js +2 -0
  92. package/dist/cascader/index.d.ts +11 -0
  93. package/dist/cascader/index.js +23 -0
  94. package/dist/cascader/index.scss +5 -0
  95. package/dist/checkbox/index.d.ts +10 -0
  96. package/dist/checkbox/index.js +13 -0
  97. package/dist/collapse/index.d.ts +3 -0
  98. package/dist/collapse/index.js +2 -0
  99. package/dist/color-picker/index.d.ts +6 -0
  100. package/dist/color-picker/index.js +2 -0
  101. package/dist/config-provider/context.d.ts +8 -0
  102. package/dist/config-provider/context.js +2 -0
  103. package/dist/config-provider/index.d.ts +24 -0
  104. package/dist/config-provider/index.js +34 -0
  105. package/dist/date-interval/index.d.ts +16 -0
  106. package/dist/date-interval/index.js +82 -0
  107. package/dist/date-picker/index.d.ts +3 -0
  108. package/dist/date-picker/index.js +2 -0
  109. package/dist/date-range/index.d.ts +16 -0
  110. package/dist/date-range/index.js +83 -0
  111. package/dist/description/index.d.ts +3 -0
  112. package/dist/description/index.js +2 -0
  113. package/dist/dictionary/index.d.ts +6 -0
  114. package/dist/dictionary/index.js +45 -0
  115. package/dist/dictionary/types/types.d.ts +14 -0
  116. package/dist/divider/index.d.ts +4 -0
  117. package/dist/divider/index.js +5 -0
  118. package/dist/drawer/index.d.ts +3 -0
  119. package/dist/drawer/index.js +2 -0
  120. package/dist/drawer-modal/components/CloseOutlined.d.ts +7 -0
  121. package/dist/drawer-modal/components/CloseOutlined.js +23 -0
  122. package/dist/drawer-modal/index.d.ts +6 -0
  123. package/dist/drawer-modal/index.js +37 -0
  124. package/dist/drawer-modal/index.scss +39 -0
  125. package/dist/drawer-modal/types/types.d.ts +3 -0
  126. package/dist/dropdown/assets/arrow-down.svg +6 -0
  127. package/dist/dropdown/index.d.ts +9 -0
  128. package/dist/dropdown/index.js +7 -0
  129. package/dist/empty/assets/404.png +0 -0
  130. package/dist/empty/assets/empty-content.png +0 -0
  131. package/dist/empty/assets/empty-data.png +0 -0
  132. package/dist/empty/assets/image-error.png +0 -0
  133. package/dist/empty/assets/net-error.png +0 -0
  134. package/dist/empty/assets/no-collect.png +0 -0
  135. package/dist/empty/assets/no-news.png +0 -0
  136. package/dist/empty/assets/no-notice.png +0 -0
  137. package/dist/empty/assets/no-schedule.png +0 -0
  138. package/dist/empty/assets/no-search-data.png +0 -0
  139. package/dist/empty/assets/submit-fail.png +0 -0
  140. package/dist/empty/assets/submit-success.png +0 -0
  141. package/dist/empty/index.d.ts +12 -0
  142. package/dist/empty/index.js +131 -0
  143. package/dist/empty/index.scss +15 -0
  144. package/dist/flex/index.d.ts +4 -0
  145. package/dist/flex/index.js +5 -0
  146. package/dist/float-button/index.d.ts +9 -0
  147. package/dist/float-button/index.js +10 -0
  148. package/dist/form/index.d.ts +3 -0
  149. package/dist/form/index.js +2 -0
  150. package/dist/grid/index.d.ts +6 -0
  151. package/dist/grid/index.js +8 -0
  152. package/dist/group-title/index.d.ts +7 -0
  153. package/dist/group-title/index.js +21 -0
  154. package/dist/group-title/index.scss +31 -0
  155. package/dist/hooks/useAssets.d.ts +1 -0
  156. package/dist/hooks/useAssets.js +11 -0
  157. package/dist/hooks/useBem.d.ts +15 -0
  158. package/dist/hooks/useBem.js +80 -0
  159. package/dist/hooks/useRequest.d.ts +1 -0
  160. package/dist/hooks/useRequest.js +11 -0
  161. package/dist/image/assets/default.png +0 -0
  162. package/dist/image/assets/error.png +0 -0
  163. package/dist/image/assets/eye.png +0 -0
  164. package/dist/image/index.d.ts +10 -0
  165. package/dist/image/index.js +95 -0
  166. package/dist/image/index.scss +27 -0
  167. package/dist/index.d.ts +156 -0
  168. package/dist/index.js +85 -0
  169. package/dist/input/index.d.ts +10 -0
  170. package/dist/input/index.js +24 -0
  171. package/dist/input/index.scss +5 -0
  172. package/dist/input-number/index.d.ts +3 -0
  173. package/dist/input-number/index.js +2 -0
  174. package/dist/layout/index.d.ts +6 -0
  175. package/dist/layout/index.js +2 -0
  176. package/dist/list/index.d.ts +3 -0
  177. package/dist/list/index.js +2 -0
  178. package/dist/mentions/index.d.ts +3 -0
  179. package/dist/mentions/index.js +2 -0
  180. package/dist/menu/index.d.ts +9 -0
  181. package/dist/menu/index.js +12 -0
  182. package/dist/message/index.d.ts +3 -0
  183. package/dist/message/index.js +2 -0
  184. package/dist/modal/components/header-icon.d.ts +3 -0
  185. package/dist/modal/components/header-icon.js +46 -0
  186. package/dist/modal/index.d.ts +10 -0
  187. package/dist/modal/index.js +41 -0
  188. package/dist/modal/index.scss +65 -0
  189. package/dist/notification/index.d.ts +3 -0
  190. package/dist/notification/index.js +2 -0
  191. package/dist/pagination/index.d.ts +5 -0
  192. package/dist/pagination/index.js +22 -0
  193. package/dist/pagination/index.scss +47 -0
  194. package/dist/pop-confirm/index.d.ts +3 -0
  195. package/dist/pop-confirm/index.js +2 -0
  196. package/dist/popover/index.d.ts +5 -0
  197. package/dist/popover/index.js +2 -0
  198. package/dist/progress/index.d.ts +3 -0
  199. package/dist/progress/index.js +2 -0
  200. package/dist/qrcode/index.d.ts +3 -0
  201. package/dist/qrcode/index.js +2 -0
  202. package/dist/radio/index.d.ts +4 -0
  203. package/dist/radio/index.js +3 -0
  204. package/dist/rate/index.d.ts +3 -0
  205. package/dist/rate/index.js +2 -0
  206. package/dist/result/index.d.ts +2 -0
  207. package/dist/result/index.js +2 -0
  208. package/dist/school/index.d.ts +4 -0
  209. package/dist/school/index.js +304 -0
  210. package/dist/school/index.scss +21 -0
  211. package/dist/school/types/types.d.ts +84 -0
  212. package/dist/segmented/index.d.ts +3 -0
  213. package/dist/segmented/index.js +2 -0
  214. package/dist/select/index.d.ts +3 -0
  215. package/dist/select/index.js +2 -0
  216. package/dist/skeleton/index.d.ts +9 -0
  217. package/dist/skeleton/index.js +2 -0
  218. package/dist/slider/index.d.ts +3 -0
  219. package/dist/slider/index.js +2 -0
  220. package/dist/space/index.d.ts +6 -0
  221. package/dist/space/index.js +2 -0
  222. package/dist/spin/index.d.ts +2 -0
  223. package/dist/spin/index.js +2 -0
  224. package/dist/splitter/index.d.ts +6 -0
  225. package/dist/splitter/index.js +2 -0
  226. package/dist/state/index.d.ts +8 -0
  227. package/dist/state/index.js +28 -0
  228. package/dist/state/index.scss +89 -0
  229. package/dist/statistic/index.d.ts +2 -0
  230. package/dist/statistic/index.js +2 -0
  231. package/dist/steps/index.d.ts +10 -0
  232. package/dist/steps/index.js +18 -0
  233. package/dist/steps/index.scss +32 -0
  234. package/dist/switch/index.d.ts +3 -0
  235. package/dist/switch/index.js +2 -0
  236. package/dist/table/components/icons/DownOutlined.d.ts +3 -0
  237. package/dist/table/components/icons/DownOutlined.js +28 -0
  238. package/dist/table/components/icons/DragHandler.d.ts +3 -0
  239. package/dist/table/components/icons/DragHandler.js +24 -0
  240. package/dist/table/components/icons/SettingFilled.d.ts +3 -0
  241. package/dist/table/components/icons/SettingFilled.js +22 -0
  242. package/dist/table/components/icons/UpOutlined.d.ts +3 -0
  243. package/dist/table/components/icons/UpOutlined.js +28 -0
  244. package/dist/table/components/primary-header-row/index.d.ts +3 -0
  245. package/dist/table/components/primary-header-row/index.js +130 -0
  246. package/dist/table/components/primary-header-row/index.scss +58 -0
  247. package/dist/table/components/primary-tbody-row/index.d.ts +3 -0
  248. package/dist/table/components/primary-tbody-row/index.js +40 -0
  249. package/dist/table/components/primary-tbody-row/index.scss +5 -0
  250. package/dist/table/index.d.ts +41 -0
  251. package/dist/table/index.js +146 -0
  252. package/dist/table/index.module.scss +9 -0
  253. package/dist/table/index.scss +33 -0
  254. package/dist/tabs/index.d.ts +12 -0
  255. package/dist/tabs/index.js +108 -0
  256. package/dist/tabs/index.scss +50 -0
  257. package/dist/tag/index.d.ts +2 -0
  258. package/dist/tag/index.js +2 -0
  259. package/dist/teacher/index.d.ts +3 -0
  260. package/dist/teacher/index.js +59 -0
  261. package/dist/teacher/types/types.d.ts +31 -0
  262. package/dist/time-picker/index.d.ts +3 -0
  263. package/dist/time-picker/index.js +2 -0
  264. package/dist/timeline/index.d.ts +5 -0
  265. package/dist/timeline/index.js +2 -0
  266. package/dist/tooltip/index.d.ts +5 -0
  267. package/dist/tooltip/index.js +2 -0
  268. package/dist/tour/index.d.ts +5 -0
  269. package/dist/tour/index.js +2 -0
  270. package/dist/transfer/index.d.ts +3 -0
  271. package/dist/transfer/index.js +2 -0
  272. package/dist/tree/components/BedIcon.d.ts +3 -0
  273. package/dist/tree/components/BedIcon.js +29 -0
  274. package/dist/tree/components/CampusIcon.d.ts +3 -0
  275. package/dist/tree/components/CampusIcon.js +30 -0
  276. package/dist/tree/components/DeptIcon.d.ts +3 -0
  277. package/dist/tree/components/DeptIcon.js +32 -0
  278. package/dist/tree/components/FloorIcon.d.ts +3 -0
  279. package/dist/tree/components/FloorIcon.js +32 -0
  280. package/dist/tree/components/RoomIcon.d.ts +3 -0
  281. package/dist/tree/components/RoomIcon.js +32 -0
  282. package/dist/tree/components/SchoolIcon.d.ts +3 -0
  283. package/dist/tree/components/SchoolIcon.js +70 -0
  284. package/dist/tree/components/TierlIcon.d.ts +3 -0
  285. package/dist/tree/components/TierlIcon.js +39 -0
  286. package/dist/tree/index.d.ts +27 -0
  287. package/dist/tree/index.js +207 -0
  288. package/dist/tree/index.scss +25 -0
  289. package/dist/tree-select/index.d.ts +3 -0
  290. package/dist/tree-select/index.js +2 -0
  291. package/dist/typography/index.d.ts +3 -0
  292. package/dist/typography/index.js +2 -0
  293. package/dist/upload/assets/again.png +0 -0
  294. package/dist/upload/assets/delete.png +0 -0
  295. package/dist/upload/assets/success.png +0 -0
  296. package/dist/upload/components/AgainIcon.d.ts +3 -0
  297. package/dist/upload/components/AgainIcon.js +29 -0
  298. package/dist/upload/components/DeleteIcon.d.ts +3 -0
  299. package/dist/upload/components/DeleteIcon.js +28 -0
  300. package/dist/upload/components/DeleteImage.d.ts +3 -0
  301. package/dist/upload/components/DeleteImage.js +47 -0
  302. package/dist/upload/components/SuccessIcon.d.ts +3 -0
  303. package/dist/upload/components/SuccessIcon.js +28 -0
  304. package/dist/upload/components/UpLoadIconAdd.d.ts +3 -0
  305. package/dist/upload/components/UpLoadIconAdd.js +28 -0
  306. package/dist/upload/components/UploadIcon.d.ts +3 -0
  307. package/dist/upload/components/UploadIcon.js +36 -0
  308. package/dist/upload/components/fileUpload.d.ts +13 -0
  309. package/dist/upload/components/fileUpload.js +258 -0
  310. package/dist/upload/components/imageUpload.d.ts +13 -0
  311. package/dist/upload/components/imageUpload.js +243 -0
  312. package/dist/upload/index.d.ts +20 -0
  313. package/dist/upload/index.js +16 -0
  314. package/dist/upload/index.scss +115 -0
  315. package/dist/user-dropdown/index.d.ts +3 -0
  316. package/dist/user-dropdown/index.js +101 -0
  317. package/dist/user-dropdown/types/types.d.ts +44 -0
  318. package/dist/utils/types.d.ts +7 -0
  319. package/dist/utils/types.js +1 -0
  320. package/dist/utils/utils.d.ts +2 -0
  321. package/dist/utils/utils.js +12 -0
  322. package/dist/watermark/index.d.ts +3 -0
  323. package/dist/watermark/index.js +2 -0
  324. package/dist/year-options/index.d.ts +11 -0
  325. package/dist/year-options/index.js +32 -0
  326. package/dist/year-term/index.d.ts +4 -0
  327. package/dist/year-term/index.js +169 -0
  328. package/dist/year-term/index.scss +21 -0
  329. package/dist/year-term/types/types.d.ts +28 -0
  330. package/dist/zones/index.d.ts +3 -0
  331. package/dist/zones/index.js +186 -0
  332. package/dist/zones/index.module.scss +23 -0
  333. package/dist/zones/types/types.d.ts +26 -0
  334. package/package.json +97 -0
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { TreeProps } from "..";
3
+ export declare const BusinessTree: FC<TreeProps>;
@@ -0,0 +1,16 @@
1
+ var _excluded = ["type"];
2
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
+ 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; }
4
+ 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; }
5
+ import React from 'react';
6
+ import Departments from "./components/dept";
7
+ import Space from "./components/space";
8
+ export var BusinessTree = function BusinessTree(_ref) {
9
+ var type = _ref.type,
10
+ props = _objectWithoutProperties(_ref, _excluded);
11
+ return /*#__PURE__*/React.createElement(React.Fragment, null, type === 'dept' ? /*#__PURE__*/React.createElement(Departments, _extends({
12
+ type: type
13
+ }, props)) : null, type === 'space' ? /*#__PURE__*/React.createElement(Space, _extends({
14
+ type: type
15
+ }, props)) : null);
16
+ };
@@ -0,0 +1,13 @@
1
+ import type { ButtonProps as AntButtonProps } from 'antd';
2
+ import { Button as AntButton } from 'antd';
3
+ import React from 'react';
4
+ import './index.scss';
5
+ type AntButtonType = typeof AntButton;
6
+ type ButtonType = typeof ButtonComponent & Pick<AntButtonType, 'Group'>;
7
+ export type ButtonProps = Omit<AntButtonProps, 'type'> & {
8
+ type?: 'default' | 'primary' | 'petit' | 'dashed' | 'link' | 'text' | 'week';
9
+ variant?: 'filled' | 'outlined';
10
+ };
11
+ export declare const ButtonComponent: React.FC<ButtonProps>;
12
+ export declare const Button: ButtonType;
13
+ export {};
@@ -0,0 +1,54 @@
1
+ var _excluded = ["variant", "className", "type"];
2
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
+ 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; }
4
+ 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; }
5
+ import { Button as AntButton } from 'antd';
6
+ import React from 'react';
7
+ import { useBem } from "../hooks/useBem";
8
+ import "./index.scss";
9
+
10
+ // 从对象AntButtonProps中删除type属性
11
+
12
+ export var ButtonComponent = function ButtonComponent(_ref) {
13
+ var variant = _ref.variant,
14
+ className = _ref.className,
15
+ type = _ref.type,
16
+ rest = _objectWithoutProperties(_ref, _excluded);
17
+ var mb = useBem('button');
18
+ var size = rest.size;
19
+ var _className = '';
20
+ var antButtonType = 'default';
21
+ if (type === 'petit' || type === 'week') {
22
+ antButtonType = 'default';
23
+ } else {
24
+ antButtonType = type;
25
+ }
26
+ switch (size) {
27
+ case 'small':
28
+ _className = "".concat(mb.m('small'));
29
+ break;
30
+ case 'large':
31
+ _className = "".concat(mb.m('large'));
32
+ break;
33
+ case 'middle':
34
+ _className = "".concat(mb.m('middle'));
35
+ default:
36
+ break;
37
+ }
38
+ switch (type) {
39
+ case 'link':
40
+ _className += " ".concat(mb.e('link'));
41
+ break;
42
+ default:
43
+ _className += '';
44
+ break;
45
+ }
46
+ return /*#__PURE__*/React.createElement(AntButton, _extends({
47
+ variant: variant,
48
+ size: size,
49
+ type: antButtonType,
50
+ className: "".concat(className !== null && className !== void 0 ? className : '', " ").concat(_className)
51
+ }, rest));
52
+ };
53
+ export var Button = ButtonComponent;
54
+ Button.Group = AntButton.Group;
@@ -0,0 +1,31 @@
1
+ .yot-button {
2
+ &--small {
3
+ height: 26px;
4
+ padding-left: 16px;
5
+ padding-right: 16px;
6
+ border-radius: 4px;
7
+ font-size: 14px;
8
+ }
9
+
10
+ &--middle {
11
+ height: 32px;
12
+ padding-left: 16px;
13
+ padding-right: 16px;
14
+ border-radius: 4px;
15
+ font-size: 14px;
16
+ }
17
+
18
+ &--large {
19
+ height: 40px;
20
+ padding-left: 32px;
21
+ padding-right: 32px;
22
+ border-radius: 8px;
23
+ font-size: 16px;
24
+ }
25
+
26
+ &__link{
27
+ padding: 0 !important;
28
+ border: 0 !important;
29
+ }
30
+
31
+ }
@@ -0,0 +1,3 @@
1
+ import { Calendar as AntCalender } from 'antd';
2
+ export type { CalendarProps, CalendarType } from 'antd/es/calendar';
3
+ export declare const Calendar: typeof AntCalender;
@@ -0,0 +1,2 @@
1
+ import { Calendar as AntCalender } from 'antd';
2
+ export var Calendar = AntCalender;
@@ -0,0 +1,3 @@
1
+ import { Card as AntCard } from 'antd';
2
+ export type { CardProps, CardTabListType, CardGridProps, CardMetaProps, CardInterface } from 'antd/es/card';
3
+ export declare const Card: typeof AntCard;
@@ -0,0 +1,2 @@
1
+ import { Card as AntCard } from 'antd';
2
+ export var Card = AntCard;
@@ -0,0 +1,3 @@
1
+ import { Carousel as AntCarousel } from 'antd';
2
+ export type { CarouselEffect, CarouselProps, CarouselRef, DotPosition, } from 'antd/es/carousel';
3
+ export declare const Carousel: typeof AntCarousel;
@@ -0,0 +1,2 @@
1
+ import { Carousel as AntCarousel } from 'antd';
2
+ export var Carousel = AntCarousel;
@@ -0,0 +1,11 @@
1
+ import type { CascaderProps as AntCascaderProps } from 'antd';
2
+ import { Cascader as AntCascader } from 'antd';
3
+ import { CascaderRef, DefaultOptionType } from 'antd/es/cascader';
4
+ import React from 'react';
5
+ import './index.scss';
6
+ export type CascaderProps<OptionType extends DefaultOptionType = DefaultOptionType, ValueField extends keyof OptionType = keyof OptionType, Multiple extends boolean = boolean> = AntCascaderProps<OptionType, ValueField, Multiple>;
7
+ type AntCascaderType = typeof AntCascader;
8
+ export type CascaderType = typeof CascaderComponent & Pick<AntCascaderType, 'Panel' | 'SHOW_CHILD' | 'SHOW_PARENT'>;
9
+ declare const CascaderComponent: React.ForwardRefExoticComponent<CascaderProps<any, string | number | symbol, boolean> & React.RefAttributes<CascaderRef>>;
10
+ export declare const Cascader: CascaderType;
11
+ export {};
@@ -0,0 +1,23 @@
1
+ var _excluded = ["popupClassName"];
2
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
+ 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; }
4
+ 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; }
5
+ import { Cascader as AntCascader } from 'antd';
6
+ import React, { forwardRef } from 'react';
7
+ import { useBem } from "../hooks/useBem";
8
+ import "./index.scss";
9
+ var CascaderComponent = /*#__PURE__*/forwardRef(function (_ref, ref) {
10
+ var popupClassName = _ref.popupClassName,
11
+ rest = _objectWithoutProperties(_ref, _excluded);
12
+ var mb = useBem('cascader');
13
+ return /*#__PURE__*/React.createElement(AntCascader, _extends({
14
+ ref: ref
15
+ }, rest, {
16
+ popupClassName: "".concat(mb, " ").concat(popupClassName !== null && popupClassName !== void 0 ? popupClassName : '')
17
+ }));
18
+ });
19
+ export var Cascader = CascaderComponent;
20
+ Cascader.displayName = 'Cascader';
21
+ Cascader.Panel = AntCascader.Panel;
22
+ Cascader.SHOW_CHILD = AntCascader.SHOW_CHILD;
23
+ Cascader.SHOW_PARENT = AntCascader.SHOW_PARENT;
@@ -0,0 +1,5 @@
1
+ .yot-cascader {
2
+ .ant-cascader-menu-item[aria-checked='true'] {
3
+ background-color: var(--ant-color-primary-bg);
4
+ }
5
+ }
@@ -0,0 +1,10 @@
1
+ import type { CheckboxProps as AntCheckboxProps } from 'antd';
2
+ import { Checkbox as AntCheckBox } from 'antd';
3
+ import { CheckboxRef } from 'antd/es/checkbox';
4
+ import React from 'react';
5
+ export type CheckboxProps = AntCheckboxProps;
6
+ type AntCheckBoxType = typeof AntCheckBox;
7
+ type CheckboxType = typeof AntCheckBox & Pick<AntCheckBoxType, 'Group'>;
8
+ export declare const CheckboxComponent: React.ForwardRefExoticComponent<AntCheckboxProps & React.RefAttributes<CheckboxRef>>;
9
+ export declare const Checkbox: CheckboxType;
10
+ export {};
@@ -0,0 +1,13 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+ function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure " + obj); }
3
+ import { Checkbox as AntCheckBox } from 'antd';
4
+ import React, { forwardRef } from 'react';
5
+ export var CheckboxComponent = /*#__PURE__*/forwardRef(function (_ref, ref) {
6
+ var rest = Object.assign({}, (_objectDestructuringEmpty(_ref), _ref));
7
+ return /*#__PURE__*/React.createElement(AntCheckBox, _extends({
8
+ ref: ref
9
+ }, rest));
10
+ });
11
+ export var Checkbox = CheckboxComponent;
12
+ Checkbox.displayName = 'Checkbox';
13
+ Checkbox.Group = AntCheckBox.Group;
@@ -0,0 +1,3 @@
1
+ import { Collapse as AntCollapse } from 'antd';
2
+ export type { CollapsePanelProps, CollapseProps } from 'antd/es/collapse';
3
+ export declare const Collapse: typeof AntCollapse;
@@ -0,0 +1,2 @@
1
+ import { Collapse as AntCollapse } from 'antd';
2
+ export var Collapse = AntCollapse;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import type { ColorPickerProps as AntColorPickerProps } from 'antd';
3
+ export type ColorPickerProps = AntColorPickerProps;
4
+ export declare const ColorPicker: import("react").FC<AntColorPickerProps> & {
5
+ _InternalPanelDoNotUseOrYouWillBeFired: (props: import("antd/es/_util/type").AnyObject) => import("react").JSX.Element;
6
+ };
@@ -0,0 +1,2 @@
1
+ import { ColorPicker as AntColorPicker } from 'antd';
2
+ export var ColorPicker = AntColorPicker;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { AxiosInstance } from 'axios';
3
+ export interface IGlobalConfig {
4
+ request?: AxiosInstance;
5
+ baseURL?: string;
6
+ assetsURL?: string;
7
+ }
8
+ export declare const ConfigContext: import("react").Context<IGlobalConfig>;
@@ -0,0 +1,2 @@
1
+ import { createContext } from 'react';
2
+ export var ConfigContext = /*#__PURE__*/createContext({});
@@ -0,0 +1,24 @@
1
+ import type { ConfigProviderProps as AntConfigProviderProps } from 'antd';
2
+ import { ConfigProvider as AntConfigProvider } from 'antd';
3
+ import { AxiosInstance } from 'axios';
4
+ import { FC } from 'react';
5
+ import 'dayjs/locale/zh-cn';
6
+ export type ConfigProviderProps = AntConfigProviderProps & {
7
+ request?: AxiosInstance;
8
+ baseURL?: string;
9
+ assetsURL?: string;
10
+ theme?: AntConfigProviderProps['theme'] & {
11
+ yotToken: {
12
+ colorModalPrimary: string;
13
+ colorModalSecondary: string;
14
+ colorModalTertiary: string;
15
+ colorModalQuaternary: string;
16
+ colorModalQuinary: string;
17
+ colorGroupPrimary: string;
18
+ colorGroupSecondary: string;
19
+ };
20
+ };
21
+ };
22
+ type ConfigProviderType = typeof AntConfigProvider;
23
+ export declare const ConfigProvider: FC<ConfigProviderProps> & Pick<ConfigProviderType, 'ConfigContext' | 'SizeContext' | 'config' | 'useConfig'>;
24
+ export {};
@@ -0,0 +1,34 @@
1
+ var _excluded = ["request", "baseURL", "assetsURL"];
2
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
+ 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; }
4
+ 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; }
5
+ import { ConfigProvider as AntConfigProvider } from 'antd';
6
+ import zhCN from 'antd/locale/zh_CN';
7
+ import React from 'react';
8
+ import { ConfigContext } from "./context";
9
+ import 'dayjs/locale/zh-cn';
10
+ export var ConfigProvider = function ConfigProvider(_ref) {
11
+ var _props$theme;
12
+ var request = _ref.request,
13
+ baseURL = _ref.baseURL,
14
+ assetsURL = _ref.assetsURL,
15
+ props = _objectWithoutProperties(_ref, _excluded);
16
+ if (((_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : _props$theme.yotToken) != null) {
17
+ // 生成 css 变量
18
+ var cssVar = ":root {\n --yot-modal-color-primary: ".concat(props.theme.yotToken.colorModalPrimary, ";\n --yot-modal-color-secondary: ").concat(props.theme.yotToken.colorModalSecondary, ";\n --yot-modal-color-tertiary: ").concat(props.theme.yotToken.colorModalTertiary, ";\n --yot-modal-color-quaternary: ").concat(props.theme.yotToken.colorModalQuaternary, ";\n --yot-modal-color-quinary: ").concat(props.theme.yotToken.colorModalQuinary, ";\n --yot-group-color-primary: ").concat(props.theme.yotToken.colorGroupPrimary, ";\n --yot-group-color-secondary: ").concat(props.theme.yotToken.colorGroupSecondary, ";\n }");
19
+ document.head.appendChild(document.createElement('style')).innerHTML = cssVar;
20
+ }
21
+ return /*#__PURE__*/React.createElement(ConfigContext.Provider, {
22
+ value: {
23
+ request: request,
24
+ baseURL: baseURL,
25
+ assetsURL: assetsURL
26
+ }
27
+ }, /*#__PURE__*/React.createElement(AntConfigProvider, _extends({}, props, {
28
+ locale: zhCN
29
+ })));
30
+ };
31
+ ConfigProvider.ConfigContext = AntConfigProvider.ConfigContext;
32
+ ConfigProvider.SizeContext = AntConfigProvider.SizeContext;
33
+ ConfigProvider.config = AntConfigProvider.config;
34
+ ConfigProvider.useConfig = AntConfigProvider.useConfig;
@@ -0,0 +1,16 @@
1
+ import { Dayjs } from 'dayjs';
2
+ import React, { FC } from 'react';
3
+ type PickerType = 'date' | 'week' | 'month' | 'quarter' | 'year';
4
+ type DateIntervalProps = {
5
+ value?: {
6
+ pickerType: PickerType;
7
+ pickerValue?: Dayjs;
8
+ };
9
+ onChange?: ({ pickerType, pickerValue, }: {
10
+ pickerType: PickerType;
11
+ pickerValue?: Dayjs;
12
+ }) => void;
13
+ style?: React.CSSProperties[];
14
+ };
15
+ export declare const DateInterval: FC<DateIntervalProps>;
16
+ export {};
@@ -0,0 +1,82 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ 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."); }
3
+ 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); }
4
+ 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; }
5
+ 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; } }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ import { DatePicker, Select, Space } from 'antd';
8
+ import React, { useEffect, useState } from 'react';
9
+ export var DateInterval = function DateInterval(_ref) {
10
+ var _style$, _style$2, _style$3;
11
+ var onChange = _ref.onChange,
12
+ _ref$value = _ref.value,
13
+ value = _ref$value === void 0 ? {
14
+ pickerType: 'date'
15
+ } : _ref$value,
16
+ style = _ref.style;
17
+ // Select下拉框所选值
18
+ var _useState = useState('date'),
19
+ _useState2 = _slicedToArray(_useState, 2),
20
+ type = _useState2[0],
21
+ setType = _useState2[1];
22
+ // DatePicker所选择的值
23
+ var _useState3 = useState(),
24
+ _useState4 = _slicedToArray(_useState3, 2),
25
+ date = _useState4[0],
26
+ setDate = _useState4[1];
27
+ // Select下拉框的onChange事件
28
+ var selectOnChange = function selectOnChange(e) {
29
+ setType(e);
30
+ onChange === null || onChange === void 0 || onChange({
31
+ pickerType: e,
32
+ pickerValue: date
33
+ });
34
+ };
35
+ // DatePicker组件的onChange事件
36
+ var datePickerOnChange = function datePickerOnChange(e) {
37
+ setDate(e);
38
+ onChange === null || onChange === void 0 || onChange({
39
+ pickerType: type,
40
+ pickerValue: e
41
+ });
42
+ };
43
+ // 给type设置初始值
44
+ useEffect(function () {
45
+ var _value$pickerType;
46
+ setType((_value$pickerType = value === null || value === void 0 ? void 0 : value.pickerType) !== null && _value$pickerType !== void 0 ? _value$pickerType : 'date');
47
+ }, [value]);
48
+ // 给时间选择框设置初始值
49
+ useEffect(function () {
50
+ setDate(value === null || value === void 0 ? void 0 : value.pickerValue);
51
+ }, [value]);
52
+ return /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Select, {
53
+ value: type,
54
+ options: [{
55
+ label: '日期',
56
+ value: 'date'
57
+ }, {
58
+ label: '周',
59
+ value: 'week'
60
+ }, {
61
+ label: '月份',
62
+ value: 'month'
63
+ }, {
64
+ label: '季度',
65
+ value: 'quarter'
66
+ }, {
67
+ label: '年份',
68
+ value: 'year'
69
+ }],
70
+ onChange: selectOnChange,
71
+ style: (_style$ = style === null || style === void 0 ? void 0 : style[0]) !== null && _style$ !== void 0 ? _style$ : {}
72
+ }), type === 'date' ? /*#__PURE__*/React.createElement(DatePicker, {
73
+ value: date,
74
+ onChange: datePickerOnChange,
75
+ style: (_style$2 = style === null || style === void 0 ? void 0 : style[1]) !== null && _style$2 !== void 0 ? _style$2 : {}
76
+ }) : /*#__PURE__*/React.createElement(DatePicker, {
77
+ value: date,
78
+ picker: type,
79
+ onChange: datePickerOnChange,
80
+ style: (_style$3 = style === null || style === void 0 ? void 0 : style[1]) !== null && _style$3 !== void 0 ? _style$3 : {}
81
+ }));
82
+ };
@@ -0,0 +1,3 @@
1
+ import type { DatePickerProps as AntDatePickerProps } from 'antd';
2
+ export type DatePickerProps = AntDatePickerProps;
3
+ export declare const DatePicker: import("antd/es/date-picker").DatePickerType;
@@ -0,0 +1,2 @@
1
+ import { DatePicker as AntDatePicker } from 'antd';
2
+ export var DatePicker = AntDatePicker;
@@ -0,0 +1,16 @@
1
+ import { Dayjs } from 'dayjs';
2
+ import React, { FC } from 'react';
3
+ type PickerType = 'date' | 'week' | 'month' | 'quarter' | 'year';
4
+ type DateRangeProps = {
5
+ value?: {
6
+ pickerType: PickerType;
7
+ pickerValue?: [Dayjs, Dayjs];
8
+ };
9
+ onChange?: ({ pickerType, pickerValue, }: {
10
+ pickerType: PickerType;
11
+ pickerValue?: [Dayjs, Dayjs];
12
+ }) => void;
13
+ style?: React.CSSProperties[];
14
+ };
15
+ export declare const DateRange: FC<DateRangeProps>;
16
+ export {};
@@ -0,0 +1,83 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ 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."); }
3
+ 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); }
4
+ 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; }
5
+ 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; } }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ import { DatePicker, Select, Space } from 'antd';
8
+ import React, { useEffect, useState } from 'react';
9
+ var RangePicker = DatePicker.RangePicker;
10
+ export var DateRange = function DateRange(_ref) {
11
+ var _style$, _style$2, _style$3;
12
+ var style = _ref.style,
13
+ onChange = _ref.onChange,
14
+ _ref$value = _ref.value,
15
+ value = _ref$value === void 0 ? {
16
+ pickerType: 'date'
17
+ } : _ref$value;
18
+ // Select下拉框所选值
19
+ var _useState = useState('date'),
20
+ _useState2 = _slicedToArray(_useState, 2),
21
+ type = _useState2[0],
22
+ setType = _useState2[1];
23
+ // 时间选择框所选的时间
24
+ var _useState3 = useState(),
25
+ _useState4 = _slicedToArray(_useState3, 2),
26
+ date = _useState4[0],
27
+ setDate = _useState4[1];
28
+ // 时间选择框的onChange事件
29
+ var handleRangeChange = function handleRangeChange(e) {
30
+ setDate(e);
31
+ onChange === null || onChange === void 0 || onChange({
32
+ pickerType: type,
33
+ pickerValue: e
34
+ });
35
+ };
36
+ // Select下拉框的onChange事件
37
+ var handleSelectChange = function handleSelectChange(e) {
38
+ setType(e);
39
+ onChange === null || onChange === void 0 || onChange({
40
+ pickerType: e,
41
+ pickerValue: date
42
+ });
43
+ };
44
+ // 给type设置初始值
45
+ useEffect(function () {
46
+ var _value$pickerType;
47
+ setType((_value$pickerType = value === null || value === void 0 ? void 0 : value.pickerType) !== null && _value$pickerType !== void 0 ? _value$pickerType : 'date');
48
+ }, [value]);
49
+ // 给date设置初始值
50
+ useEffect(function () {
51
+ setDate(value === null || value === void 0 ? void 0 : value.pickerValue);
52
+ }, [value]);
53
+ return /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Select, {
54
+ value: type,
55
+ options: [{
56
+ label: '日期',
57
+ value: 'date'
58
+ }, {
59
+ label: '周',
60
+ value: 'week'
61
+ }, {
62
+ label: '月份',
63
+ value: 'month'
64
+ }, {
65
+ label: '季度',
66
+ value: 'quarter'
67
+ }, {
68
+ label: '年份',
69
+ value: 'year'
70
+ }],
71
+ style: (_style$ = style === null || style === void 0 ? void 0 : style[0]) !== null && _style$ !== void 0 ? _style$ : {},
72
+ onChange: handleSelectChange
73
+ }), type === 'date' ? /*#__PURE__*/React.createElement(RangePicker, {
74
+ onChange: handleRangeChange,
75
+ value: date,
76
+ style: (_style$2 = style === null || style === void 0 ? void 0 : style[1]) !== null && _style$2 !== void 0 ? _style$2 : {}
77
+ }) : /*#__PURE__*/React.createElement(RangePicker, {
78
+ picker: type,
79
+ value: date,
80
+ onChange: handleRangeChange,
81
+ style: (_style$3 = style === null || style === void 0 ? void 0 : style[1]) !== null && _style$3 !== void 0 ? _style$3 : {}
82
+ }));
83
+ };
@@ -0,0 +1,3 @@
1
+ import { Descriptions as AntDescriptions } from 'antd';
2
+ export type { DescriptionsContext, DescriptionsContextProps, DescriptionsItemType, DescriptionsProps, InternalDescriptionsItemType, } from 'antd/es/descriptions';
3
+ export declare const Descriptions: typeof AntDescriptions;
@@ -0,0 +1,2 @@
1
+ import { Descriptions as AntDescriptions } from 'antd';
2
+ export var Descriptions = AntDescriptions;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { SelectProps } from "..";
3
+ export declare const Dictionary: React.FC<{
4
+ dictType: string;
5
+ showSearch?: boolean;
6
+ } & SelectProps>;
@@ -0,0 +1,45 @@
1
+ var _excluded = ["dictType", "showSearch", "style"];
2
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
+ 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; }
4
+ 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; }
5
+ import { useQuery } from '@tanstack/react-query';
6
+ import React, { useMemo } from 'react';
7
+ import { Select } from "./..";
8
+ import { useRequest } from "../hooks/useRequest";
9
+ export var Dictionary = function Dictionary(_ref) {
10
+ var dictType = _ref.dictType,
11
+ _ref$showSearch = _ref.showSearch,
12
+ showSearch = _ref$showSearch === void 0 ? false : _ref$showSearch,
13
+ _ref$style = _ref.style,
14
+ style = _ref$style === void 0 ? {
15
+ width: 210,
16
+ height: 32
17
+ } : _ref$style,
18
+ rest = _objectWithoutProperties(_ref, _excluded);
19
+ var request = useRequest();
20
+ // 查询字典数据
21
+ var _useQuery = useQuery({
22
+ queryKey: ['dictionaryData'],
23
+ queryFn: function queryFn() {
24
+ return request("/v1/dicts/".concat(dictType));
25
+ }
26
+ }),
27
+ dictionaryData = _useQuery.data;
28
+ console.log('dictionaryData', dictionaryData);
29
+ // 将字典数据处理成下拉框数据
30
+ var dictionaryOptions = useMemo(function () {
31
+ var _dictionaryData$conte;
32
+ return dictionaryData === null || dictionaryData === void 0 || (_dictionaryData$conte = dictionaryData.content) === null || _dictionaryData$conte === void 0 ? void 0 : _dictionaryData$conte.map(function (item) {
33
+ return {
34
+ label: item.dictTitle,
35
+ value: item.dictValue
36
+ };
37
+ });
38
+ }, [dictionaryData]);
39
+ return /*#__PURE__*/React.createElement(Select, _extends({
40
+ options: dictionaryOptions,
41
+ style: style,
42
+ showSearch: showSearch,
43
+ optionFilterProp: "label"
44
+ }, rest));
45
+ };
@@ -0,0 +1,14 @@
1
+ export interface PageData<T> {
2
+ content: T[];
3
+ page: {
4
+ number: number;
5
+ size: number;
6
+ totalElements: number;
7
+ totalPages: number;
8
+ };
9
+ }
10
+ export interface dictionaryItem {
11
+ dictValue: string; // 字典项编码
12
+ dictTitle: string; // 字典项名称
13
+ dictTitle2?: string; // 字典项描述
14
+ }
@@ -0,0 +1,4 @@
1
+ import type { DividerProps as AntDividerProps } from 'antd';
2
+ import { FC } from 'react';
3
+ export type DividerProps = AntDividerProps;
4
+ export declare const Divider: FC<DividerProps>;
@@ -0,0 +1,5 @@
1
+ import { Divider as AntDivider } from 'antd';
2
+ import React from 'react';
3
+ export var Divider = function Divider(props) {
4
+ return /*#__PURE__*/React.createElement(AntDivider, props);
5
+ };
@@ -0,0 +1,3 @@
1
+ import { Drawer as AntDrawer } from 'antd';
2
+ export type { DrawerProps, PushState } from 'antd/es/drawer';
3
+ export declare const Drawer: typeof AntDrawer;
@@ -0,0 +1,2 @@
1
+ import { Drawer as AntDrawer } from 'antd';
2
+ export var Drawer = AntDrawer;