@blofin/blofin-ui 0.7.58 → 0.7.59

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 (293) hide show
  1. package/dist/Badge.es.js +8 -10
  2. package/dist/Button.es.js +125 -127
  3. package/dist/Dialog.es.js +10 -180
  4. package/dist/Divider.es.js +10 -12
  5. package/dist/Drawer.es.js +51 -44
  6. package/dist/Form.d.ts +1 -0
  7. package/dist/Form.es.js +752 -0
  8. package/dist/ProTable-63e2c020.js +3444 -0
  9. package/dist/ProTable.es.js +6 -9
  10. package/dist/Slider.es.js +140 -141
  11. package/dist/Sort.es.js +10 -144
  12. package/dist/blofin.css +1 -1
  13. package/dist/{close-0df24351.js → close-c67ec245.js} +0 -1
  14. package/dist/clsx.m-b14a941b.js +32 -0
  15. package/dist/components/Alert/Alert.d.ts +3 -3
  16. package/dist/components/Alert/styles.d.ts +2 -2
  17. package/dist/components/Badge/Badge.d.ts +2 -2
  18. package/dist/components/Button/Button.d.ts +2 -2
  19. package/dist/components/Button/Loading/index.d.ts +2 -2
  20. package/dist/components/Button/index.d.ts +0 -2
  21. package/dist/components/Button/styles.d.ts +1 -1
  22. package/dist/components/Checkbox/styles.d.ts +1 -1
  23. package/dist/components/CssDropdown/CssDropdown.d.ts +3 -3
  24. package/dist/components/DatePickerRange/styles.d.ts +1 -0
  25. package/dist/components/DateTimePicker/ScrollableList.d.ts +1 -1
  26. package/dist/components/Dialog/Dialog.d.ts +2 -5
  27. package/dist/components/Dialog/index.d.ts +2 -4
  28. package/dist/components/Dialog/styles.d.ts +2 -2
  29. package/dist/components/Drawer/Drawer.d.ts +1 -1
  30. package/dist/components/Dropdown/Dropdown.d.ts +2 -2
  31. package/dist/components/Empty/index.d.ts +5 -2
  32. package/dist/components/Form/Control.d.ts +13 -0
  33. package/dist/components/Form/Form.d.ts +4 -0
  34. package/dist/components/Form/FormItem.d.ts +4 -0
  35. package/dist/components/Form/FormLabel.d.ts +4 -0
  36. package/dist/components/Form/context.d.ts +6 -0
  37. package/dist/components/Form/index.d.ts +8 -0
  38. package/dist/components/Form/interface.d.ts +48 -0
  39. package/dist/components/Form/store.d.ts +16 -0
  40. package/dist/components/Form/styles/item.d.ts +5 -0
  41. package/dist/components/Form/useForm.d.ts +3 -0
  42. package/dist/components/LabelTextField/LabelTextField.d.ts +6 -6
  43. package/dist/components/MonthPicker/index.d.ts +17 -2
  44. package/dist/components/MultiSelect/MultiSelect.d.ts +4 -4
  45. package/dist/components/Notification/Notification.d.ts +1 -1
  46. package/dist/components/Pagination/PageOptions.d.ts +1 -1
  47. package/dist/components/Pagination/Pagination.d.ts +2 -2
  48. package/dist/components/Picker/hooks/usePickerMethod.d.ts +1 -1
  49. package/dist/components/Picker/index.d.ts +10 -2
  50. package/dist/components/Popover/Popover.d.ts +1 -1
  51. package/dist/components/Popup/index.d.ts +15 -4
  52. package/dist/components/RadioButton/RadioButton.d.ts +4 -4
  53. package/dist/components/RadioButton/styles.d.ts +1 -1
  54. package/dist/components/Select/Select.d.ts +9 -6
  55. package/dist/components/Slider/Slider.d.ts +2 -2
  56. package/dist/components/Sort/SortButton.d.ts +5 -5
  57. package/dist/components/Sort/SortGroup.d.ts +4 -4
  58. package/dist/components/Sort/index.d.ts +6 -5
  59. package/dist/components/Sortable/SortItem.d.ts +4 -4
  60. package/dist/components/Sortable/index.d.ts +11 -3
  61. package/dist/components/Switch/Switch.d.ts +2 -2
  62. package/dist/components/Switch/styles.d.ts +3 -3
  63. package/dist/components/Tab/Tab.d.ts +2 -2
  64. package/dist/components/Tab/styles.d.ts +1 -1
  65. package/dist/components/Table/Pagination/index.d.ts +2 -2
  66. package/dist/components/Table/Table.d.ts +2 -2
  67. package/dist/components/Table/Tbody/index.d.ts +3 -3
  68. package/dist/components/Table/Thead/index.d.ts +3 -3
  69. package/dist/components/Table/context.d.ts +3 -3
  70. package/dist/components/Table/hooks/useStickyOffset.d.ts +3 -3
  71. package/dist/components/Table/index.d.ts +3 -3
  72. package/dist/components/Table/interface.d.ts +4 -4
  73. package/dist/components/TextField/TextField.d.ts +4 -4
  74. package/dist/components/TextField/index.d.ts +0 -2
  75. package/dist/components/TextSelect/TextSelect.d.ts +8 -8
  76. package/dist/components/Textarea/index.d.ts +15 -2
  77. package/dist/components/Toast/Toast.d.ts +13 -2
  78. package/dist/components/Toast/styles.d.ts +1 -1
  79. package/dist/components/Tooltip/Tooltip.d.ts +5 -4
  80. package/dist/components/Typography/Typography.d.ts +2 -2
  81. package/dist/components/Typography/styles.d.ts +1 -1
  82. package/dist/hooks/useLatest.d.ts +1 -1
  83. package/dist/hooks/useNotification.d.ts +7 -5
  84. package/dist/hooks/useToast.d.ts +1 -1
  85. package/dist/{index-4f94d7fa.js → index-001dd0f7.js} +39 -24
  86. package/dist/{index-29d37c73.js → index-003572ca.js} +67 -52
  87. package/dist/{index-57a163fd.js → index-0330bc93.js} +28 -13
  88. package/dist/{index-d81e15f3.js → index-05bf2879.js} +34 -19
  89. package/dist/{index-b54ef52a.js → index-0773f9b5.js} +31 -16
  90. package/dist/{index-6856be22.js → index-0c50dcda.js} +38 -23
  91. package/dist/{index-7cf9b111.js → index-0e6d56f6.js} +33 -18
  92. package/dist/{index-a89abb42.js → index-0eb53476.js} +19 -4
  93. package/dist/{index-0230b5a9.js → index-0f855a91.js} +4 -5
  94. package/dist/{index-cbc0d36b.js → index-10144af4.js} +30 -15
  95. package/dist/{index-06d0f2f7.js → index-11dc8e91.js} +28 -13
  96. package/dist/{index-c6371af1.js → index-14eba896.js} +25 -10
  97. package/dist/{index-c1381bca.js → index-18869ac6.js} +35 -20
  98. package/dist/{index-1b2a64df.js → index-189196e6.js} +46 -31
  99. package/dist/{index-898678dc.js → index-198ccc85.js} +45 -30
  100. package/dist/{index-e2b960e4.js → index-1b087231.js} +38 -23
  101. package/dist/{index-f40f45fb.js → index-204cbb23.js} +30 -15
  102. package/dist/{index-4df0c3e4.js → index-220ed10a.js} +31 -16
  103. package/dist/{index-67678963.js → index-28a6835c.js} +48 -33
  104. package/dist/{index-e98ef24f.js → index-2d400fe1.js} +32 -17
  105. package/dist/{index-e8fb69e0.js → index-2e0c8d16.js} +37 -22
  106. package/dist/{index-cc1cd309.js → index-2e784550.js} +28 -13
  107. package/dist/index-304d7874.js +64 -0
  108. package/dist/{index-12d32536.js → index-3375e2e3.js} +28 -13
  109. package/dist/{index-954d3973.js → index-36521981.js} +28 -13
  110. package/dist/{index-cfee583b.js → index-377dc190.js} +36 -21
  111. package/dist/{index-4f94900a.js → index-390505ce.js} +34 -19
  112. package/dist/index-40626e62.js +174 -0
  113. package/dist/{index-b0da3dfd.js → index-41bebee7.js} +39 -24
  114. package/dist/{index-5fb7b3bc.js → index-45cfa2f3.js} +27 -12
  115. package/dist/{index-80cc70e4.js → index-47408940.js} +41 -26
  116. package/dist/{index-141cec17.js → index-4b9249fc.js} +29 -14
  117. package/dist/index-543e2f77.js +65 -0
  118. package/dist/index-563cafee.js +64 -0
  119. package/dist/index-5956ed9f.js +11569 -0
  120. package/dist/{index-b103ed31.js → index-59c7d611.js} +27 -12
  121. package/dist/{index-d2f2742e.js → index-5bc791c5.js} +30 -15
  122. package/dist/{index-03513979.js → index-5f3da225.js} +26 -11
  123. package/dist/{index-8aa9b1be.js → index-603f0f2a.js} +39 -24
  124. package/dist/{index-4bc493f0.js → index-636a6216.js} +19 -4
  125. package/dist/{index-2334248a.js → index-640dc4ab.js} +24 -9
  126. package/dist/{index-73bfc020.js → index-64ba8d88.js} +47 -32
  127. package/dist/{index-2ae0474b.js → index-65986673.js} +39 -24
  128. package/dist/{index-6f728206.js → index-65df0a7b.js} +24 -9
  129. package/dist/{index-02f669c4.js → index-6e4d9a19.js} +1 -2
  130. package/dist/{index-360aaaac.js → index-7241c703.js} +46 -31
  131. package/dist/index-7272669e.js +36 -0
  132. package/dist/{index-9c73c442.js → index-73673cf3.js} +60 -45
  133. package/dist/{index-08a64465.js → index-74676234.js} +31 -16
  134. package/dist/{index-7edb6aec.js → index-770fe605.js} +34 -19
  135. package/dist/{index-5beeed26.js → index-772d6529.js} +38 -23
  136. package/dist/{index-6e969585.js → index-797b8f6c.js} +52 -37
  137. package/dist/{index-a6fa33ce.js → index-7c12aa98.js} +28 -13
  138. package/dist/{index-5e6ffc2f.js → index-7e7cdd81.js} +1 -2
  139. package/dist/{index-03169373.js → index-81072b24.js} +37 -22
  140. package/dist/{index-75190b99.js → index-8684e896.js} +22 -7
  141. package/dist/{index-7bb9ffdf.js → index-89f184f3.js} +2 -3
  142. package/dist/{index-40710f09.js → index-8a7c46ae.js} +41 -26
  143. package/dist/{index-117d018c.js → index-8cec0e82.js} +37 -22
  144. package/dist/{index-094d2a65.js → index-91062be2.js} +34 -19
  145. package/dist/{index-d3419554.js → index-9253a5ce.js} +30 -15
  146. package/dist/index-95c68eda.js +152 -0
  147. package/dist/{index-956b36a6.js → index-9eaebb69.js} +45 -30
  148. package/dist/{index-63a66f13.js → index-a4077786.js} +45 -30
  149. package/dist/{index-e9a1ff7f.js → index-ad2acfd2.js} +19 -4
  150. package/dist/{index-fdffd6e6.js → index-af60bed6.js} +29 -14
  151. package/dist/{index-fda88eb4.js → index-b5ff5e93.js} +45 -30
  152. package/dist/{index-11268759.js → index-bba889fc.js} +33 -18
  153. package/dist/{index-b7941b97.js → index-c002eb57.js} +23 -8
  154. package/dist/{index-4c6ad36c.js → index-c73b6cc3.js} +47 -32
  155. package/dist/{index-60fe7f16.js → index-c81a4a2a.js} +32 -17
  156. package/dist/{index-f7c4ae83.js → index-c8690f0a.js} +48 -33
  157. package/dist/{index-79e7317f.js → index-cdaffd70.js} +27 -12
  158. package/dist/{index-4d780cf4.js → index-cf872561.js} +37 -22
  159. package/dist/{index-cb1218d8.js → index-dafac81d.js} +25 -10
  160. package/dist/{index-19d177fe.js → index-db7c7495.js} +31 -16
  161. package/dist/{index-f1726c63.js → index-dbd4bd27.js} +29 -14
  162. package/dist/{index-ceae4147.js → index-dc23eb8b.js} +27 -12
  163. package/dist/{index-9e5efc0a.js → index-dc69cdd8.js} +45 -30
  164. package/dist/{index-c69f6dfc.js → index-e6091315.js} +36 -21
  165. package/dist/{index-06ef2e10.js → index-e869e999.js} +28 -13
  166. package/dist/{index-03d6aef0.js → index-f0c42ec9.js} +33 -18
  167. package/dist/{index-f64eddcc.js → index-f16b36a5.js} +31 -16
  168. package/dist/{index-e1a6a03d.js → index-f4d65525.js} +24 -9
  169. package/dist/index-f53123c7.js +64 -0
  170. package/dist/{index-770e5f53.js → index-f753119c.js} +27 -12
  171. package/dist/{index-8585c2f3.js → index-f83dab77.js} +38 -23
  172. package/dist/{index-6f963c6a.js → index-f852d9b6.js} +35 -20
  173. package/dist/{index-3ee2bafa.js → index-fa51b278.js} +30 -15
  174. package/dist/{index-e169373b.js → index-fc135912.js} +25 -10
  175. package/dist/{index-ef31f5f8.js → index-fcb1ec65.js} +1 -2
  176. package/dist/{index-d86842c8.js → index-ff943066.js} +34 -19
  177. package/dist/index.d.ts +48 -36
  178. package/dist/index.es.js +56 -223
  179. package/dist/isObjectLike-1b8bbac2.js +44 -0
  180. package/dist/jsx-runtime-82a9ddf6.js +646 -0
  181. package/dist/provider/NoticeProvider.d.ts +1 -1
  182. package/dist/provider/ThemeProvider.d.ts +3 -7
  183. package/dist/provider/useTheme.d.ts +1 -1
  184. package/dist/types/component.d.ts +1 -1
  185. package/dist/utils/helper.d.ts +1 -1
  186. package/dist/{utils-071abd68.js → utils-cacf528c.js} +1 -2
  187. package/package.json +3 -2
  188. package/dist/Calendar.d.ts +0 -1
  189. package/dist/Calendar.es.js +0 -210
  190. package/dist/Checkbox.d.ts +0 -1
  191. package/dist/Checkbox.es.js +0 -138
  192. package/dist/CssDropdown.d.ts +0 -1
  193. package/dist/CssDropdown.es.js +0 -38
  194. package/dist/DatePickerRange.d.ts +0 -1
  195. package/dist/DatePickerRange.es.js +0 -410
  196. package/dist/DateTimePicker.d.ts +0 -1
  197. package/dist/DateTimePicker.es.js +0 -519
  198. package/dist/Dropdown.d.ts +0 -1
  199. package/dist/Dropdown.es.js +0 -134
  200. package/dist/Empty.d.ts +0 -1
  201. package/dist/Empty.es.js +0 -11
  202. package/dist/LabelTextField.d.ts +0 -1
  203. package/dist/LabelTextField.es.js +0 -100
  204. package/dist/MonthPicker.d.ts +0 -1
  205. package/dist/MonthPicker.es.js +0 -16
  206. package/dist/MultiSelect.d.ts +0 -1
  207. package/dist/MultiSelect.es.js +0 -425
  208. package/dist/Notification.d.ts +0 -1
  209. package/dist/Notification.es.js +0 -12
  210. package/dist/Pagination.d.ts +0 -1
  211. package/dist/Pagination.es.js +0 -219
  212. package/dist/Picker.d.ts +0 -1
  213. package/dist/Picker.es.js +0 -224
  214. package/dist/Popover.d.ts +0 -1
  215. package/dist/Popover.es.js +0 -107
  216. package/dist/Popup.d.ts +0 -1
  217. package/dist/Popup.es.js +0 -62
  218. package/dist/ProTable-7a07d8b6.js +0 -565
  219. package/dist/RadioButton.d.ts +0 -1
  220. package/dist/RadioButton.es.js +0 -152
  221. package/dist/Select.d.ts +0 -1
  222. package/dist/Select.es.js +0 -316
  223. package/dist/Sortable.d.ts +0 -1
  224. package/dist/Sortable.es.js +0 -39
  225. package/dist/Switch.d.ts +0 -1
  226. package/dist/Switch.es.js +0 -64
  227. package/dist/Tab.d.ts +0 -1
  228. package/dist/Tab.es.js +0 -101
  229. package/dist/Table.d.ts +0 -1
  230. package/dist/Table.es.js +0 -359
  231. package/dist/TextField.d.ts +0 -1
  232. package/dist/TextField.es.js +0 -64
  233. package/dist/TextSelect.d.ts +0 -1
  234. package/dist/TextSelect.es.js +0 -17
  235. package/dist/Textarea.d.ts +0 -1
  236. package/dist/Textarea.es.js +0 -106
  237. package/dist/Toast.d.ts +0 -1
  238. package/dist/Toast.es.js +0 -12
  239. package/dist/Tooltip.d.ts +0 -1
  240. package/dist/Tooltip.es.js +0 -144
  241. package/dist/Typography.d.ts +0 -1
  242. package/dist/Typography.es.js +0 -74
  243. package/dist/_commonjsHelpers-1d52fb73.js +0 -9
  244. package/dist/arrow-down-011b02c7.js +0 -6
  245. package/dist/arrow-down-l-line-97e4fe24.js +0 -6
  246. package/dist/arrow-fill-70becd96.js +0 -6
  247. package/dist/arrow-right-l-line-87881b4d.js +0 -7
  248. package/dist/close-bg-6d2211ef.js +0 -6
  249. package/dist/clsx.m-e965ef18.js +0 -22
  250. package/dist/components/CssDropdown/index.d.ts +0 -2
  251. package/dist/components/DatePickerRange/index.d.ts +0 -4
  252. package/dist/components/DateTimePicker/index.d.ts +0 -4
  253. package/dist/components/Dropdown/index.d.ts +0 -2
  254. package/dist/components/Empty/Empty.d.ts +0 -5
  255. package/dist/components/MonthPicker/MonthPicker.d.ts +0 -17
  256. package/dist/components/MultiSelect/index.d.ts +0 -2
  257. package/dist/components/Notification/index.d.ts +0 -2
  258. package/dist/components/Pagination/index.d.ts +0 -3
  259. package/dist/components/Picker/Picker.d.ts +0 -10
  260. package/dist/components/Popover/index.d.ts +0 -5
  261. package/dist/components/Popup/Popup.d.ts +0 -15
  262. package/dist/components/Sortable/Sortable.d.ts +0 -11
  263. package/dist/components/Switch/index.d.ts +0 -2
  264. package/dist/components/Tab/index.d.ts +0 -4
  265. package/dist/components/TextSelect/index.d.ts +0 -2
  266. package/dist/components/Textarea/Textarea.d.ts +0 -15
  267. package/dist/components/Toast/index.d.ts +0 -2
  268. package/dist/components/Tooltip/index.d.ts +0 -2
  269. package/dist/components/Typography/index.d.ts +0 -4
  270. package/dist/enum-0398044b.js +0 -17
  271. package/dist/helper-221987f8.js +0 -7
  272. package/dist/index-293f8244.js +0 -49
  273. package/dist/index-40023d52.js +0 -5322
  274. package/dist/index-4528ba11.js +0 -49
  275. package/dist/index-596c785d.js +0 -50
  276. package/dist/index-67554651.js +0 -49
  277. package/dist/index-9349bf2d.js +0 -345
  278. package/dist/index-b7027a1d.js +0 -1295
  279. package/dist/index-c57db938.js +0 -37
  280. package/dist/index-eea69add.js +0 -71
  281. package/dist/index.esm-71578db5.js +0 -1198
  282. package/dist/index.module-1d7bbdf8.js +0 -7
  283. package/dist/index.module-86edc823.js +0 -15
  284. package/dist/index.module-b4239ff5.js +0 -9
  285. package/dist/index.module-fb41ba3b.js +0 -39
  286. package/dist/locales-776f0072.js +0 -440
  287. package/dist/search-b79a3be5.js +0 -6
  288. package/dist/sortable.esm-1c13d908.js +0 -2896
  289. package/dist/sortable.esm-8d31c120.js +0 -1275
  290. package/dist/styles-85a9fe64.js +0 -136
  291. package/dist/useAlign-916ed3be.js +0 -44
  292. package/dist/useDelayEvent-f577f6a3.js +0 -1082
  293. package/dist/useTheme-0688f238.js +0 -16
@@ -0,0 +1,4 @@
1
+ import { FC } from "react";
2
+ import { FormItemLabelProps } from "./interface";
3
+ declare const FormItemLabel: FC<FormItemLabelProps>;
4
+ export default FormItemLabel;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { FormContextProps, FormItemContextProps } from './interface';
3
+ declare const FormContext: import("react").Context<FormContextProps>;
4
+ export declare const FormItemContext: import("react").Context<FormItemContextProps>;
5
+ declare const FormProviderContext: import("react").Context<{}>;
6
+ export { FormProviderContext, FormContext };
@@ -0,0 +1,8 @@
1
+ import Form from "./Form";
2
+ import { Item } from "./FormItem";
3
+ type RefForm = typeof Form;
4
+ export interface FormComponent extends RefForm {
5
+ Item: typeof Item;
6
+ }
7
+ declare const FormComp: FormComponent;
8
+ export { FormComp as Form };
@@ -0,0 +1,48 @@
1
+ import React from 'react';
2
+ import Store from './store';
3
+ export interface FormProps<FormData = any> {
4
+ /**
5
+ *是否可用
6
+ */
7
+ disabled?: boolean;
8
+ /**
9
+ *布局
10
+ */
11
+ layout?: 'horizontal' | 'vertical' | 'inline';
12
+ /**
13
+ *标签的文本对齐方式
14
+ */
15
+ labelAlign?: 'left' | 'right';
16
+ /**
17
+ * 设置表单初始值
18
+ */
19
+ initialValues?: Partial<FormData>;
20
+ /**
21
+ * 数据验证成功后回调事件
22
+ */
23
+ onSubmit?: (values: FormData) => void;
24
+ form?: FormInstance<FormData>;
25
+ children?: React.ReactNode;
26
+ }
27
+ export type FormInstance<FormData = any> = Pick<Store<FormData>, 'submit' | 'setInitialValues' | 'setCallBacks' | 'getFieldValue' | 'setFieldValue' | 'getFieldsValues' | 'registerWatcher'>;
28
+ export type innerCallbackType = 'onSubmit';
29
+ export type FormContextProps<FormData = any> = Pick<FormProps<FormData>, 'labelAlign' | 'layout'> & {
30
+ store?: FormInstance<FormData>;
31
+ };
32
+ export type FormItemContextProps<FormData = any> = Pick<FormProps<FormData>, 'labelAlign' | 'layout'> & {
33
+ updateFormItem?: (field: string) => void;
34
+ };
35
+ export interface FormItemProps<FormData = any> {
36
+ label?: string;
37
+ labelAlign?: 'left' | 'right';
38
+ store?: FormInstance<FormData>;
39
+ children?: JSX.Element;
40
+ field?: string;
41
+ }
42
+ export interface FormItemLabelProps {
43
+ label?: string;
44
+ }
45
+ export interface ControlProps {
46
+ children?: React.ReactNode;
47
+ cloneNode?: () => React.ReactNode;
48
+ }
@@ -0,0 +1,16 @@
1
+ import { FormProps, innerCallbackType } from "./interface";
2
+ declare class Store<FormData = any> {
3
+ private initialValues;
4
+ private callbacks;
5
+ private registerWatchers;
6
+ setInitialValues: (values: Partial<FormData> | undefined) => void;
7
+ setCallBacks: (values: Pick<FormProps<FormData>, innerCallbackType>) => void;
8
+ getFieldValue: (field: string) => void;
9
+ getFieldsValues: (fields?: string[]) => {};
10
+ setFieldValue: (value: string, field: string) => void;
11
+ registerWatcher: (item: () => void) => void;
12
+ private notifyWatchers;
13
+ getCallBacks: () => Pick<FormProps<FormData>, "onSubmit">;
14
+ submit: () => void;
15
+ }
16
+ export default Store;
@@ -0,0 +1,5 @@
1
+ declare const ItemClassName: {
2
+ vertical: string;
3
+ error: string;
4
+ };
5
+ export default ItemClassName;
@@ -0,0 +1,3 @@
1
+ import { FormInstance } from './interface';
2
+ export declare function getFormInstance<FormData = any>(): FormInstance<FormData>;
3
+ export default function useForm<FormData = any>(form?: FormInstance<FormData>): [FormInstance<FormData>];
@@ -1,17 +1,17 @@
1
- import * as React from "react";
2
- import { BUITheme } from "../../types/component";
1
+ import { ReactNode } from "react";
2
+ import { BUITheme } from "../..";
3
3
  import { InputVariant } from "./styles";
4
4
  export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
5
- label?: React.ReactNode;
5
+ label?: ReactNode;
6
6
  variant: InputVariant;
7
7
  theme?: BUITheme;
8
- startAdornment?: React.ReactNode;
9
- endAdornment?: React.ReactNode;
8
+ startAdornment?: ReactNode;
9
+ endAdornment?: ReactNode;
10
10
  error?: boolean;
11
11
  helperText?: string;
12
12
  disabled?: boolean;
13
13
  inputClassName?: string;
14
14
  inputSize?: "md" | "lg";
15
15
  }
16
- declare const LabelTextField: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
16
+ declare const LabelTextField: import("react").ForwardRefExoticComponent<InputProps & import("react").RefAttributes<HTMLInputElement>>;
17
17
  export default LabelTextField;
@@ -1,2 +1,17 @@
1
- import { MonthPicker } from "./MonthPicker";
2
- export { MonthPicker };
1
+ import { FC } from "react";
2
+ import { Locale } from "date-fns";
3
+ type MonthPickerProps = {
4
+ data: {
5
+ [key: number]: number[];
6
+ };
7
+ currentYear: number;
8
+ currentMonth: number;
9
+ setMonth: (value: Date) => void;
10
+ locale: Locale;
11
+ confirmText: string;
12
+ cancelText: string;
13
+ cancel: () => void;
14
+ confirm: () => void;
15
+ };
16
+ declare const MonthPicker: FC<MonthPickerProps>;
17
+ export default MonthPicker;
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import { ReactNode } from "react";
2
2
  import { InputSize } from "../TextField/TextField";
3
3
  import { BUITheme } from "../../types/component";
4
4
  export type TypesVariant = "filled" | "outlined";
@@ -28,7 +28,7 @@ export interface MultiSelectProps {
28
28
  searchClassName?: string;
29
29
  searchChange?: (value: string) => void;
30
30
  options: Option[];
31
- optionsFormat?: (option: optionsFormatParams) => React.ReactNode;
31
+ optionsFormat?: (option: optionsFormatParams) => ReactNode;
32
32
  multiLimit?: number;
33
33
  values?: string[];
34
34
  onChange?: (value: string[]) => void;
@@ -38,5 +38,5 @@ export interface MultiSelectRefProps {
38
38
  close: () => void;
39
39
  clear: () => void;
40
40
  }
41
- declare const MultiSelect: React.ForwardRefExoticComponent<MultiSelectProps & React.RefAttributes<MultiSelectRefProps>>;
42
- export { MultiSelect };
41
+ declare const MultiSelect: import("react").ForwardRefExoticComponent<MultiSelectProps & import("react").RefAttributes<MultiSelectRefProps>>;
42
+ export default MultiSelect;
@@ -1,2 +1,2 @@
1
- import * as React from "react";
1
+ import React from "react";
2
2
  export declare const Notification: () => React.ReactPortal;
@@ -9,4 +9,4 @@ export interface PageOptionProps {
9
9
  countPerPage?: string;
10
10
  }
11
11
  declare function PageOption(props: PageOptionProps): import("react/jsx-runtime").JSX.Element | null;
12
- export { PageOption };
12
+ export default PageOption;
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import { CSSProperties } from "react";
2
2
  import { BUITheme } from "../../types/component";
3
3
  export interface PaginationProps {
4
4
  /**
@@ -22,7 +22,7 @@ export interface PaginationProps {
22
22
  */
23
23
  className?: string;
24
24
  theme?: BUITheme;
25
- activeStyle?: React.CSSProperties;
25
+ activeStyle?: CSSProperties;
26
26
  total?: number;
27
27
  sizeOptions?: number[];
28
28
  sizeCanChange?: boolean;
@@ -1,7 +1,7 @@
1
1
  import { EffectCallback } from 'react';
2
2
  export declare const useMount: (callback: EffectCallback) => void;
3
3
  declare const usePickerMethod: (list: any, selectedValue: any) => {
4
- pickerColumnsEl: import("react").RefObject<HTMLDivElement | null>;
4
+ pickerColumnsEl: import("react").RefObject<HTMLDivElement>;
5
5
  selected: any;
6
6
  setSelected: import("react").Dispatch<any>;
7
7
  selectIndex: (index: number) => void;
@@ -1,2 +1,10 @@
1
- import { Picker } from "./Picker";
2
- export { Picker };
1
+ type PickerProps = {
2
+ list: {
3
+ label: string;
4
+ value: number;
5
+ }[];
6
+ selectedValue: number;
7
+ setValue: (value: number) => void;
8
+ };
9
+ declare const Picker: ({ list, selectedValue, setValue }: PickerProps) => import("react/jsx-runtime").JSX.Element;
10
+ export default Picker;
@@ -1,5 +1,5 @@
1
1
  import { Placement } from "@popperjs/core";
2
- import * as React from "react";
2
+ import React from "react";
3
3
  export interface PopoverProps {
4
4
  label: string | React.ReactNode;
5
5
  content: React.ReactNode;
@@ -1,4 +1,15 @@
1
- import { Popup } from "./Popup";
2
- import type { PopupRef } from "./Popup";
3
- export { Popup };
4
- export type { PopupRef };
1
+ import { ReactNode } from "react";
2
+ interface PopupProps {
3
+ title: ReactNode;
4
+ content: ReactNode;
5
+ cancel?: () => void;
6
+ distance?: number;
7
+ disabled?: boolean;
8
+ auto?: boolean;
9
+ }
10
+ export interface PopupRef {
11
+ open: () => void;
12
+ close: () => void;
13
+ }
14
+ declare const Popup: import("react").ForwardRefExoticComponent<PopupProps & import("react").RefAttributes<PopupRef>>;
15
+ export default Popup;
@@ -1,10 +1,10 @@
1
- import * as React from "react";
2
- import { BUITheme } from "../../types/component";
1
+ import { ReactNode } from "react";
2
+ import { BUITheme } from "../..";
3
3
  export interface RadioButtonProps extends React.InputHTMLAttributes<HTMLInputElement> {
4
- label?: React.ReactNode;
4
+ label?: ReactNode;
5
5
  theme?: BUITheme;
6
6
  selected?: string;
7
7
  arrow?: "circle" | "check";
8
8
  }
9
- declare const RadioButton: React.ForwardRefExoticComponent<RadioButtonProps & React.RefAttributes<HTMLInputElement>>;
9
+ declare const RadioButton: import("react").ForwardRefExoticComponent<RadioButtonProps & import("react").RefAttributes<HTMLInputElement>>;
10
10
  export default RadioButton;
@@ -1,4 +1,4 @@
1
- import { BUITheme } from "../../types/component";
1
+ import { BUITheme } from "../..";
2
2
  declare const RadioButtonLabelVariants: ({ theme, checked, disabled }: {
3
3
  theme: BUITheme;
4
4
  checked: boolean;
@@ -1,8 +1,10 @@
1
- import * as React from "react";
2
- import { BUITheme } from "../../types/component";
1
+ import { ReactNode } from "react";
2
+ import { BUITheme } from "../..";
3
3
  export type SelectItem = {
4
4
  label: string;
5
5
  value: string;
6
+ disabled?: boolean;
7
+ className?: string;
6
8
  };
7
9
  export interface SelectProps extends React.InputHTMLAttributes<HTMLInputElement> {
8
10
  selectItems: SelectItem[];
@@ -14,7 +16,7 @@ export interface SelectProps extends React.InputHTMLAttributes<HTMLInputElement>
14
16
  arrowClassName?: string;
15
17
  menuWrapperClassName?: string;
16
18
  scrollable?: boolean;
17
- wrapper?: (children: React.ReactNode) => React.ReactNode;
19
+ wrapper?: (children: ReactNode) => ReactNode;
18
20
  activeColor?: boolean;
19
21
  offsetParent?: number;
20
22
  trigger?: "click" | "hover";
@@ -22,17 +24,18 @@ export interface SelectProps extends React.InputHTMLAttributes<HTMLInputElement>
22
24
  labelId?: string;
23
25
  search?: boolean;
24
26
  searchClear?: boolean;
25
- searchEmpty?: React.ReactNode;
26
- customSelectItems?: (item: SelectItem) => React.ReactNode;
27
+ searchEmpty?: ReactNode;
28
+ customSelectItems?: (item: SelectItem) => ReactNode;
27
29
  searchChange?: (value: string) => void;
28
30
  rowKey?: string;
29
31
  labelField?: string;
30
32
  styles?: object;
31
33
  inputDisabled?: boolean;
32
34
  hoverClassName?: string;
35
+ className?: string;
33
36
  x?: number;
34
37
  y?: number;
35
38
  container?: Element;
36
39
  }
37
- declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLInputElement>>;
40
+ declare const Select: import("react").ForwardRefExoticComponent<SelectProps & import("react").RefAttributes<HTMLInputElement>>;
38
41
  export default Select;
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ /// <reference types="react" />
2
2
  import { BUITheme } from "../../types/component";
3
3
  export interface SliderProps {
4
4
  /**
@@ -55,4 +55,4 @@ export interface SliderProps {
55
55
  disabled?: boolean;
56
56
  showTooltip?: boolean;
57
57
  }
58
- export declare const Slider: React.ForwardRefExoticComponent<SliderProps & React.RefAttributes<HTMLInputElement>>;
58
+ export declare const Slider: import("react").ForwardRefExoticComponent<SliderProps & import("react").RefAttributes<HTMLInputElement>>;
@@ -1,16 +1,16 @@
1
- import * as React from "react";
1
+ import { CSSProperties, FC } from "react";
2
2
  import { SortsData } from "./reducer";
3
3
  import { BUITheme } from "../../types/component";
4
4
  export type TextAlign = "flex-start" | "flex-end" | "center";
5
5
  export interface SortButtonProps {
6
- children: React.ReactElement;
6
+ children: JSX.Element;
7
7
  onSortChange: (data: SortsData[] | SortsData) => void;
8
8
  sortKey: string;
9
9
  hideSort?: boolean;
10
10
  textAlign?: TextAlign;
11
11
  width?: string;
12
- iconStyle?: React.CSSProperties;
12
+ iconStyle?: CSSProperties;
13
13
  theme?: BUITheme;
14
14
  }
15
- declare const SortButton: React.FC<SortButtonProps>;
16
- export { SortButton };
15
+ declare const SortButton: FC<SortButtonProps>;
16
+ export default SortButton;
@@ -1,9 +1,9 @@
1
- import * as React from "react";
1
+ /// <reference types="react" />
2
2
  interface SortGroupProps {
3
- children: React.ReactElement;
3
+ children: JSX.Element;
4
4
  type?: "single" | "multiple";
5
5
  }
6
- declare const SortGroup: React.ForwardRefExoticComponent<SortGroupProps & React.RefAttributes<{
6
+ declare const SortGroup: import("react").ForwardRefExoticComponent<SortGroupProps & import("react").RefAttributes<{
7
7
  restSort: (callBack: () => void) => void;
8
8
  }>>;
9
- export { SortGroup };
9
+ export default SortGroup;
@@ -1,5 +1,6 @@
1
- import { SortButton } from "./SortButton";
2
- import { SortGroup } from "./SortGroup";
3
- import type { TextAlign } from "./SortButton";
4
- export { SortButton, SortGroup };
5
- export type { TextAlign };
1
+ import SortButton from "./SortButton";
2
+ import SortGroup from "./SortGroup";
3
+ import { Context as SortContext, reducer, State, SortEnum } from "./reducer";
4
+ import type { SortsData, SortState, SortType } from "./reducer";
5
+ export { SortButton, SortGroup, SortContext, reducer, State, SortEnum };
6
+ export type { SortsData, SortState, SortType };
@@ -1,6 +1,6 @@
1
- import * as React from "react";
1
+ import { FC, ReactNode } from "react";
2
2
  interface SortItemProps {
3
- children: React.ReactNode;
3
+ children: ReactNode;
4
4
  }
5
- declare const SortItem: React.FC<SortItemProps>;
6
- export { SortItem };
5
+ declare const SortItem: FC<SortItemProps>;
6
+ export default SortItem;
@@ -1,3 +1,11 @@
1
- import { Sortable } from "./Sortable";
2
- import { SortItem } from "./SortItem";
3
- export { Sortable, SortItem };
1
+ import { FC } from "react";
2
+ interface SortableProps {
3
+ direction: "horizontal" | "vertical";
4
+ children: React.ReactNode;
5
+ moveEnd: (prev: number, next: number) => void;
6
+ ghostClass?: string;
7
+ dragClass?: string;
8
+ customHandle?: string;
9
+ }
10
+ declare const Sortable: FC<SortableProps>;
11
+ export default Sortable;
@@ -1,9 +1,9 @@
1
- import * as React from "react";
1
+ import { FC } from "react";
2
2
  interface SwitchProps {
3
3
  check: boolean;
4
4
  onChange: () => void;
5
5
  size?: "tiny" | "small" | "medium";
6
6
  className?: string;
7
7
  }
8
- export declare const Switch: React.FC<SwitchProps>;
8
+ export declare const Switch: FC<SwitchProps>;
9
9
  export {};
@@ -1,11 +1,11 @@
1
1
  export declare const switchSize: (props?: ({
2
- size?: "small" | "medium" | "tiny" | null | undefined;
2
+ size?: "medium" | "small" | "tiny" | null | undefined;
3
3
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
4
4
  export declare const thumbSize: (props?: ({
5
- size?: "small" | "medium" | "tiny" | null | undefined;
5
+ size?: "medium" | "small" | "tiny" | null | undefined;
6
6
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
7
  export declare const moveSize: (props?: ({
8
- size?: "small" | "medium" | "tiny" | null | undefined;
8
+ size?: "medium" | "small" | "tiny" | null | undefined;
9
9
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
10
10
  export declare const bgStyle: (props?: ({
11
11
  theme?: "light" | "dark" | null | undefined;
@@ -1,5 +1,5 @@
1
- import * as React from "react";
2
- import { BUIComponentSize } from "../../types/component";
1
+ import React from "react";
2
+ import { BUIComponentSize } from "../..";
3
3
  import { Base } from "../../types/component";
4
4
  interface TabProps extends Base {
5
5
  items: {
@@ -1,5 +1,5 @@
1
1
  declare const itemStyles: (props?: ({
2
- size?: "small" | "medium" | "large" | "max" | null | undefined;
2
+ size?: "large" | "medium" | "small" | "max" | null | undefined;
3
3
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
4
4
  declare const itemActStyles: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
5
5
  declare const smallActStyles: (props?: ({
@@ -1,6 +1,6 @@
1
- import * as React from "react";
1
+ import { FC } from "react";
2
2
  import { Direction } from "../interface";
3
- declare const Pagination: React.FC<{
3
+ declare const Pagination: FC<{
4
4
  isLastPage: boolean;
5
5
  isFirstPage: boolean;
6
6
  onChange: (direction: Direction) => void;
@@ -1,6 +1,6 @@
1
- import * as React from "react";
1
+ /// <reference types="react" />
2
2
  import { TableProps } from "./interface";
3
3
  export declare const defaultWidth = "150";
4
4
  export declare const PageSize = 50;
5
- declare const Table: React.ForwardRefExoticComponent<TableProps<any> & React.RefAttributes<HTMLDivElement>>;
5
+ declare const Table: import("react").ForwardRefExoticComponent<TableProps<any> & import("react").RefAttributes<HTMLDivElement>>;
6
6
  export default Table;
@@ -1,6 +1,6 @@
1
- import * as React from "react";
1
+ /// <reference types="react" />
2
2
  import { TableColumnProps } from "../interface";
3
- import { BUITheme } from "../../../types/component";
3
+ import { BUITheme } from "../../..";
4
4
  interface TbodyProps {
5
5
  data: Record<string, string>[];
6
6
  columns: TableColumnProps[];
@@ -11,5 +11,5 @@ interface TbodyProps {
11
11
  tbodyClass?: string;
12
12
  rowIdPrefix?: string;
13
13
  }
14
- declare const Tbody: React.ForwardRefExoticComponent<TbodyProps & React.RefAttributes<HTMLTableRowElement | null>>;
14
+ declare const Tbody: import("react").ForwardRefExoticComponent<TbodyProps & import("react").RefAttributes<HTMLTableRowElement | null>>;
15
15
  export default Tbody;
@@ -1,6 +1,6 @@
1
- import * as React from "react";
1
+ /// <reference types="react" />
2
2
  import { SortProps, TableColumnProps } from "../interface";
3
- import { BUITheme } from "../../../types/component";
3
+ import { BUITheme } from "../../..";
4
4
  import { SortType } from "../../Sort/reducer";
5
5
  interface TheadProps {
6
6
  data: Record<string, string>[];
@@ -14,5 +14,5 @@ interface TheadProps {
14
14
  type?: SortType;
15
15
  methodRef?: any;
16
16
  }
17
- declare const Thead: React.ForwardRefExoticComponent<TheadProps & React.RefAttributes<HTMLTableRowElement | null>>;
17
+ declare const Thead: import("react").ForwardRefExoticComponent<TheadProps & import("react").RefAttributes<HTMLTableRowElement | null>>;
18
18
  export default Thead;
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import { Dispatch } from 'react';
2
2
  type StateType = {
3
3
  isScroll: boolean;
4
4
  };
@@ -9,9 +9,9 @@ type ActionType = {
9
9
  declare const State: {
10
10
  isScroll: boolean;
11
11
  };
12
- declare const Context: React.Context<{
12
+ declare const Context: import("react").Context<{
13
13
  state: StateType;
14
- dispatch: React.Dispatch<ActionType>;
14
+ dispatch: Dispatch<ActionType>;
15
15
  }>;
16
16
  declare const reducer: (state: StateType, action: ActionType) => StateType;
17
17
  export { Context, reducer, State };
@@ -7,10 +7,10 @@ declare const useStickyOffset: (columns: TableColumnProps[]) => {
7
7
  fixed?: "left" | "right" | undefined;
8
8
  width?: string | undefined;
9
9
  align?: "center" | "flex-start" | "flex-end" | undefined;
10
- render?: ((record: any, index: number) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>) | undefined;
11
- renderHeader?: ((record: any[]) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>) | undefined;
10
+ render?: ((record: any, index: number) => JSX.Element) | undefined;
11
+ renderHeader?: ((record: any[]) => JSX.Element) | undefined;
12
12
  filter?: boolean | undefined;
13
- type?: import("../../Sort/reducer").SortType | undefined;
13
+ type?: import("../../Sort").SortType | undefined;
14
14
  onCell?: ((record: any, index: number) => number) | undefined;
15
15
  }[];
16
16
  export default useStickyOffset;
@@ -1,3 +1,3 @@
1
- import Table from "./Table";
2
- export type { TableColumnProps } from "./interface";
3
- export { Table };
1
+ import Table from './Table';
2
+ export type { TableColumnProps } from './interface';
3
+ export default Table;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { BUITheme } from "../../types/component";
2
+ import { BUITheme } from "../..";
3
3
  import { SortType, SortsData } from "../Sort/reducer";
4
4
  interface TableColumnProps<T = any> {
5
5
  key?: string;
@@ -7,8 +7,8 @@ interface TableColumnProps<T = any> {
7
7
  fixed?: "right" | "left";
8
8
  width?: string;
9
9
  align?: "center" | "flex-start" | "flex-end";
10
- render?: (record: T, index: number) => React.ReactElement;
11
- renderHeader?: (record: T[]) => React.ReactElement;
10
+ render?: (record: T, index: number) => JSX.Element;
11
+ renderHeader?: (record: T[]) => JSX.Element;
12
12
  filter?: boolean;
13
13
  type?: SortType;
14
14
  onCell?: (record: T, index: number) => number;
@@ -29,7 +29,7 @@ interface TableProps<T = any> {
29
29
  changePagination?: (direction: Direction) => void;
30
30
  hidePagination?: boolean;
31
31
  paginationPosition?: "flex-start" | "center" | "flex-end";
32
- renderEmpty?: React.ReactElement;
32
+ renderEmpty?: JSX.Element;
33
33
  theadClass?: string;
34
34
  tdClass?: string;
35
35
  scroll?: boolean;
@@ -1,16 +1,16 @@
1
- import * as React from "react";
1
+ import { ReactNode } from "react";
2
2
  import { BUITheme } from "../../types/component";
3
3
  import { InputVariant } from "../LabelTextField/styles";
4
4
  export type InputSize = "sm" | "md" | "lg";
5
5
  export interface InputBaseProps extends React.InputHTMLAttributes<HTMLInputElement> {
6
6
  variant: InputVariant;
7
7
  theme?: BUITheme;
8
- startAdornment?: React.ReactNode;
9
- endAdornment?: React.ReactNode;
8
+ startAdornment?: ReactNode;
9
+ endAdornment?: ReactNode;
10
10
  disabled?: boolean;
11
11
  error?: boolean;
12
12
  inputClassName?: string;
13
13
  inputSize?: InputSize;
14
14
  }
15
- declare const TextField: React.ForwardRefExoticComponent<InputBaseProps & React.RefAttributes<HTMLInputElement>>;
15
+ declare const TextField: import("react").ForwardRefExoticComponent<InputBaseProps & import("react").RefAttributes<HTMLInputElement>>;
16
16
  export default TextField;
@@ -1,4 +1,2 @@
1
1
  import TextField from "./TextField";
2
- import type { InputBaseProps } from "./TextField";
3
2
  export { TextField };
4
- export type { InputBaseProps };