@blofin/blofin-ui 0.7.57 → 0.7.58

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 (292) hide show
  1. package/dist/Badge.es.js +23 -20
  2. package/dist/Button.es.js +126 -123
  3. package/dist/Calendar.d.ts +1 -0
  4. package/dist/Calendar.es.js +210 -0
  5. package/dist/Checkbox.d.ts +1 -0
  6. package/dist/Checkbox.es.js +138 -0
  7. package/dist/CssDropdown.d.ts +1 -0
  8. package/dist/CssDropdown.es.js +38 -0
  9. package/dist/DatePickerRange.d.ts +1 -0
  10. package/dist/DatePickerRange.es.js +410 -0
  11. package/dist/DateTimePicker.d.ts +1 -0
  12. package/dist/DateTimePicker.es.js +519 -0
  13. package/dist/Dialog.es.js +180 -9
  14. package/dist/Divider.es.js +11 -8
  15. package/dist/Drawer.es.js +43 -49
  16. package/dist/Dropdown.d.ts +1 -0
  17. package/dist/Dropdown.es.js +134 -0
  18. package/dist/Empty.d.ts +1 -0
  19. package/dist/Empty.es.js +11 -0
  20. package/dist/LabelTextField.d.ts +1 -0
  21. package/dist/LabelTextField.es.js +100 -0
  22. package/dist/MonthPicker.d.ts +1 -0
  23. package/dist/MonthPicker.es.js +16 -0
  24. package/dist/MultiSelect.d.ts +1 -0
  25. package/dist/MultiSelect.es.js +425 -0
  26. package/dist/Notification.d.ts +1 -0
  27. package/dist/Notification.es.js +12 -0
  28. package/dist/Pagination.d.ts +1 -0
  29. package/dist/Pagination.es.js +219 -0
  30. package/dist/Picker.d.ts +1 -0
  31. package/dist/Picker.es.js +224 -0
  32. package/dist/Popover.d.ts +1 -0
  33. package/dist/Popover.es.js +107 -0
  34. package/dist/Popup.d.ts +1 -0
  35. package/dist/Popup.es.js +62 -0
  36. package/dist/ProTable-7a07d8b6.js +565 -0
  37. package/dist/ProTable.es.js +9 -5
  38. package/dist/RadioButton.d.ts +1 -0
  39. package/dist/RadioButton.es.js +152 -0
  40. package/dist/Select.d.ts +1 -0
  41. package/dist/Select.es.js +316 -0
  42. package/dist/Slider.es.js +141 -139
  43. package/dist/Sort.d.ts +1 -0
  44. package/dist/Sort.es.js +146 -0
  45. package/dist/Sortable.d.ts +1 -0
  46. package/dist/Sortable.es.js +39 -0
  47. package/dist/Switch.d.ts +1 -0
  48. package/dist/Switch.es.js +64 -0
  49. package/dist/Tab.d.ts +1 -0
  50. package/dist/Tab.es.js +101 -0
  51. package/dist/Table.d.ts +1 -0
  52. package/dist/Table.es.js +359 -0
  53. package/dist/TextField.d.ts +1 -0
  54. package/dist/TextField.es.js +64 -0
  55. package/dist/TextSelect.d.ts +1 -0
  56. package/dist/TextSelect.es.js +17 -0
  57. package/dist/Textarea.d.ts +1 -0
  58. package/dist/Textarea.es.js +106 -0
  59. package/dist/Toast.d.ts +1 -0
  60. package/dist/Toast.es.js +12 -0
  61. package/dist/Tooltip.d.ts +1 -0
  62. package/dist/Tooltip.es.js +144 -0
  63. package/dist/Typography.d.ts +1 -0
  64. package/dist/Typography.es.js +74 -0
  65. package/dist/_commonjsHelpers-1d52fb73.js +9 -0
  66. package/dist/arrow-down-011b02c7.js +6 -0
  67. package/dist/arrow-down-l-line-97e4fe24.js +6 -0
  68. package/dist/arrow-fill-70becd96.js +6 -0
  69. package/dist/arrow-right-l-line-87881b4d.js +7 -0
  70. package/dist/blofin.css +1 -1
  71. package/dist/{close-c67ec245.js → close-0df24351.js} +1 -0
  72. package/dist/close-bg-6d2211ef.js +6 -0
  73. package/dist/clsx.m-e965ef18.js +22 -0
  74. package/dist/components/Alert/Alert.d.ts +3 -3
  75. package/dist/components/Alert/styles.d.ts +2 -2
  76. package/dist/components/Badge/Badge.d.ts +2 -2
  77. package/dist/components/Button/Button.d.ts +2 -2
  78. package/dist/components/Button/Loading/index.d.ts +2 -2
  79. package/dist/components/Button/index.d.ts +2 -0
  80. package/dist/components/Button/styles.d.ts +1 -1
  81. package/dist/components/Checkbox/styles.d.ts +1 -1
  82. package/dist/components/CssDropdown/CssDropdown.d.ts +3 -3
  83. package/dist/components/CssDropdown/index.d.ts +2 -0
  84. package/dist/components/DatePickerRange/index.d.ts +4 -0
  85. package/dist/components/DatePickerRange/styles.d.ts +0 -1
  86. package/dist/components/DateTimePicker/ScrollableList.d.ts +1 -1
  87. package/dist/components/DateTimePicker/index.d.ts +4 -0
  88. package/dist/components/Dialog/Dialog.d.ts +5 -2
  89. package/dist/components/Dialog/index.d.ts +4 -2
  90. package/dist/components/Dialog/styles.d.ts +2 -2
  91. package/dist/components/Drawer/Drawer.d.ts +1 -1
  92. package/dist/components/Dropdown/Dropdown.d.ts +2 -2
  93. package/dist/components/Dropdown/index.d.ts +2 -0
  94. package/dist/components/Empty/Empty.d.ts +5 -0
  95. package/dist/components/Empty/index.d.ts +2 -5
  96. package/dist/components/LabelTextField/LabelTextField.d.ts +6 -6
  97. package/dist/components/MonthPicker/MonthPicker.d.ts +17 -0
  98. package/dist/components/MonthPicker/index.d.ts +2 -17
  99. package/dist/components/MultiSelect/MultiSelect.d.ts +4 -4
  100. package/dist/components/MultiSelect/index.d.ts +2 -0
  101. package/dist/components/Notification/Notification.d.ts +1 -1
  102. package/dist/components/Notification/index.d.ts +2 -0
  103. package/dist/components/Pagination/PageOptions.d.ts +1 -1
  104. package/dist/components/Pagination/Pagination.d.ts +2 -2
  105. package/dist/components/Pagination/index.d.ts +3 -0
  106. package/dist/components/Picker/Picker.d.ts +10 -0
  107. package/dist/components/Picker/hooks/usePickerMethod.d.ts +1 -1
  108. package/dist/components/Picker/index.d.ts +2 -10
  109. package/dist/components/Popover/Popover.d.ts +1 -1
  110. package/dist/components/Popover/index.d.ts +5 -0
  111. package/dist/components/Popup/Popup.d.ts +15 -0
  112. package/dist/components/Popup/index.d.ts +4 -15
  113. package/dist/components/RadioButton/RadioButton.d.ts +4 -4
  114. package/dist/components/RadioButton/styles.d.ts +1 -1
  115. package/dist/components/Select/Select.d.ts +6 -9
  116. package/dist/components/Slider/Slider.d.ts +2 -2
  117. package/dist/components/Sort/SortButton.d.ts +5 -5
  118. package/dist/components/Sort/SortGroup.d.ts +4 -4
  119. package/dist/components/Sort/index.d.ts +5 -0
  120. package/dist/components/Sortable/SortItem.d.ts +4 -4
  121. package/dist/components/Sortable/Sortable.d.ts +11 -0
  122. package/dist/components/Sortable/index.d.ts +3 -11
  123. package/dist/components/Switch/Switch.d.ts +2 -2
  124. package/dist/components/Switch/index.d.ts +2 -0
  125. package/dist/components/Switch/styles.d.ts +3 -3
  126. package/dist/components/Tab/Tab.d.ts +2 -2
  127. package/dist/components/Tab/index.d.ts +4 -0
  128. package/dist/components/Tab/styles.d.ts +1 -1
  129. package/dist/components/Table/Pagination/index.d.ts +2 -2
  130. package/dist/components/Table/Table.d.ts +2 -2
  131. package/dist/components/Table/Tbody/index.d.ts +3 -3
  132. package/dist/components/Table/Thead/index.d.ts +3 -3
  133. package/dist/components/Table/context.d.ts +3 -3
  134. package/dist/components/Table/hooks/useStickyOffset.d.ts +2 -2
  135. package/dist/components/Table/index.d.ts +3 -3
  136. package/dist/components/Table/interface.d.ts +4 -4
  137. package/dist/components/TextField/TextField.d.ts +4 -4
  138. package/dist/components/TextField/index.d.ts +2 -0
  139. package/dist/components/TextSelect/TextSelect.d.ts +8 -8
  140. package/dist/components/TextSelect/index.d.ts +2 -0
  141. package/dist/components/Textarea/Textarea.d.ts +15 -0
  142. package/dist/components/Textarea/index.d.ts +2 -15
  143. package/dist/components/Toast/Toast.d.ts +2 -13
  144. package/dist/components/Toast/index.d.ts +2 -0
  145. package/dist/components/Toast/styles.d.ts +1 -1
  146. package/dist/components/Tooltip/Tooltip.d.ts +4 -5
  147. package/dist/components/Tooltip/index.d.ts +2 -0
  148. package/dist/components/Typography/Typography.d.ts +2 -2
  149. package/dist/components/Typography/index.d.ts +4 -0
  150. package/dist/components/Typography/styles.d.ts +1 -1
  151. package/dist/enum-0398044b.js +17 -0
  152. package/dist/helper-221987f8.js +7 -0
  153. package/dist/hooks/useLatest.d.ts +1 -1
  154. package/dist/hooks/useNotification.d.ts +5 -7
  155. package/dist/hooks/useToast.d.ts +1 -1
  156. package/dist/{index-0f855a91.js → index-0230b5a9.js} +5 -4
  157. package/dist/{index-c17e103a.js → index-02f669c4.js} +2 -1
  158. package/dist/{index-6fc4d1f4.js → index-03169373.js} +12 -25
  159. package/dist/{index-4ccb3e9c.js → index-03513979.js} +11 -24
  160. package/dist/{index-d5de8c20.js → index-03d6aef0.js} +13 -26
  161. package/dist/{index-a132ac63.js → index-06d0f2f7.js} +13 -26
  162. package/dist/{index-64f4d194.js → index-06ef2e10.js} +11 -24
  163. package/dist/{index-55a7fad3.js → index-08a64465.js} +11 -24
  164. package/dist/{index-659243c0.js → index-094d2a65.js} +19 -32
  165. package/dist/{index-e3570fb6.js → index-11268759.js} +18 -31
  166. package/dist/{index-0ab7162c.js → index-117d018c.js} +22 -35
  167. package/dist/{index-2e69928d.js → index-12d32536.js} +13 -26
  168. package/dist/{index-3c7614e3.js → index-141cec17.js} +14 -27
  169. package/dist/{index-207ff1e4.js → index-19d177fe.js} +16 -29
  170. package/dist/{index-cd93af19.js → index-1b2a64df.js} +26 -39
  171. package/dist/{index-b42b7f2a.js → index-2334248a.js} +9 -22
  172. package/dist/index-293f8244.js +49 -0
  173. package/dist/{index-d907bed0.js → index-29d37c73.js} +52 -65
  174. package/dist/{index-0228f85e.js → index-2ae0474b.js} +24 -37
  175. package/dist/{index-7f2a6d68.js → index-360aaaac.js} +28 -41
  176. package/dist/{index-789ea179.js → index-3ee2bafa.js} +15 -28
  177. package/dist/index-40023d52.js +5322 -0
  178. package/dist/{index-15cca5fd.js → index-40710f09.js} +17 -30
  179. package/dist/index-4528ba11.js +49 -0
  180. package/dist/{index-2ee3d9fd.js → index-4bc493f0.js} +4 -17
  181. package/dist/{index-2acdfe81.js → index-4c6ad36c.js} +32 -45
  182. package/dist/{index-f27785e7.js → index-4d780cf4.js} +22 -35
  183. package/dist/{index-87b93a08.js → index-4df0c3e4.js} +16 -29
  184. package/dist/{index-122d1ca2.js → index-4f94900a.js} +19 -32
  185. package/dist/{index-693a21bb.js → index-4f94d7fa.js} +22 -35
  186. package/dist/{index-1810cc68.js → index-57a163fd.js} +11 -24
  187. package/dist/index-596c785d.js +50 -0
  188. package/dist/{index-94ca2048.js → index-5beeed26.js} +23 -36
  189. package/dist/{index-54cbdaa4.js → index-5e6ffc2f.js} +2 -1
  190. package/dist/{index-9c669079.js → index-5fb7b3bc.js} +12 -25
  191. package/dist/{index-d914889d.js → index-60fe7f16.js} +13 -26
  192. package/dist/{index-7dfec241.js → index-63a66f13.js} +30 -43
  193. package/dist/index-67554651.js +49 -0
  194. package/dist/{index-b69e64e6.js → index-67678963.js} +22 -35
  195. package/dist/{index-523acf7a.js → index-6856be22.js} +21 -34
  196. package/dist/{index-0be486a6.js → index-6e969585.js} +27 -40
  197. package/dist/{index-cb3b96c6.js → index-6f728206.js} +9 -22
  198. package/dist/{index-2add17c1.js → index-6f963c6a.js} +20 -33
  199. package/dist/{index-a5251ade.js → index-73bfc020.js} +31 -44
  200. package/dist/{index-721120f3.js → index-75190b99.js} +7 -20
  201. package/dist/{index-70099dad.js → index-770e5f53.js} +12 -25
  202. package/dist/{index-f0b0c5fc.js → index-79e7317f.js} +12 -25
  203. package/dist/{index-312ee80f.js → index-7bb9ffdf.js} +3 -2
  204. package/dist/{index-013c5769.js → index-7cf9b111.js} +18 -31
  205. package/dist/{index-8d34dc76.js → index-7edb6aec.js} +19 -32
  206. package/dist/{index-0fa20e69.js → index-80cc70e4.js} +26 -39
  207. package/dist/{index-24112094.js → index-8585c2f3.js} +23 -36
  208. package/dist/{index-c1206eaf.js → index-898678dc.js} +21 -34
  209. package/dist/{index-fd4e070b.js → index-8aa9b1be.js} +24 -37
  210. package/dist/index-9349bf2d.js +345 -0
  211. package/dist/{index-dc3cd1ef.js → index-954d3973.js} +13 -26
  212. package/dist/{index-f5df4eec.js → index-956b36a6.js} +37 -50
  213. package/dist/{index-31004470.js → index-9c73c442.js} +45 -58
  214. package/dist/{index-887b08f6.js → index-9e5efc0a.js} +29 -42
  215. package/dist/{index-584c1de8.js → index-a6fa33ce.js} +13 -26
  216. package/dist/{index-2c3346b8.js → index-a89abb42.js} +4 -17
  217. package/dist/{index-0333ccf9.js → index-b0da3dfd.js} +14 -27
  218. package/dist/{index-fcb10f63.js → index-b103ed31.js} +12 -25
  219. package/dist/{index-9c3f8d80.js → index-b54ef52a.js} +16 -29
  220. package/dist/index-b7027a1d.js +1295 -0
  221. package/dist/{index-81a64a31.js → index-b7941b97.js} +8 -21
  222. package/dist/{index-b8e94395.js → index-c1381bca.js} +20 -33
  223. package/dist/index-c57db938.js +37 -0
  224. package/dist/{index-051b64c8.js → index-c6371af1.js} +10 -23
  225. package/dist/{index-a9c0f025.js → index-c69f6dfc.js} +19 -32
  226. package/dist/{index-e1f19bc5.js → index-cb1218d8.js} +10 -23
  227. package/dist/{index-c1b82aa9.js → index-cbc0d36b.js} +13 -26
  228. package/dist/{index-3b42042f.js → index-cc1cd309.js} +13 -26
  229. package/dist/{index-abb9f006.js → index-ceae4147.js} +12 -25
  230. package/dist/{index-b4116538.js → index-cfee583b.js} +21 -34
  231. package/dist/{index-7b28ddea.js → index-d2f2742e.js} +10 -23
  232. package/dist/{index-00d6276c.js → index-d3419554.js} +15 -28
  233. package/dist/{index-30f61bdc.js → index-d81e15f3.js} +19 -32
  234. package/dist/{index-40958da3.js → index-d86842c8.js} +17 -30
  235. package/dist/{index-46e4bfa3.js → index-e169373b.js} +10 -23
  236. package/dist/{index-aa5e48ef.js → index-e1a6a03d.js} +9 -22
  237. package/dist/{index-a45e1710.js → index-e2b960e4.js} +23 -36
  238. package/dist/{index-5648e9fa.js → index-e8fb69e0.js} +21 -34
  239. package/dist/{index-3b632a87.js → index-e98ef24f.js} +14 -27
  240. package/dist/{index-c6a5236d.js → index-e9a1ff7f.js} +4 -17
  241. package/dist/index-eea69add.js +71 -0
  242. package/dist/{index-9864c94e.js → index-ef31f5f8.js} +2 -1
  243. package/dist/{index-2e09190f.js → index-f1726c63.js} +11 -24
  244. package/dist/{index-d15a69b6.js → index-f40f45fb.js} +13 -26
  245. package/dist/{index-88d32101.js → index-f64eddcc.js} +16 -29
  246. package/dist/{index-44ed585d.js → index-f7c4ae83.js} +22 -35
  247. package/dist/{index-44b988bb.js → index-fda88eb4.js} +23 -36
  248. package/dist/{index-c58b598e.js → index-fdffd6e6.js} +14 -27
  249. package/dist/index.d.ts +36 -48
  250. package/dist/index.es.js +223 -53
  251. package/dist/index.esm-71578db5.js +1198 -0
  252. package/dist/index.module-1d7bbdf8.js +7 -0
  253. package/dist/index.module-86edc823.js +15 -0
  254. package/dist/index.module-b4239ff5.js +9 -0
  255. package/dist/index.module-fb41ba3b.js +39 -0
  256. package/dist/locales-776f0072.js +440 -0
  257. package/dist/provider/NoticeProvider.d.ts +1 -1
  258. package/dist/provider/ThemeProvider.d.ts +7 -3
  259. package/dist/provider/useTheme.d.ts +1 -1
  260. package/dist/search-b79a3be5.js +6 -0
  261. package/dist/sortable.esm-1c13d908.js +2896 -0
  262. package/dist/sortable.esm-8d31c120.js +1275 -0
  263. package/dist/styles-85a9fe64.js +136 -0
  264. package/dist/types/component.d.ts +1 -1
  265. package/dist/useAlign-916ed3be.js +44 -0
  266. package/dist/useDelayEvent-f577f6a3.js +1082 -0
  267. package/dist/useTheme-0688f238.js +16 -0
  268. package/dist/utils/helper.d.ts +1 -1
  269. package/dist/{utils-19b44377.js → utils-071abd68.js} +2 -1
  270. package/package.json +1 -1
  271. package/dist/Form.d.ts +0 -1
  272. package/dist/Form.es.js +0 -752
  273. package/dist/ProTable-079d6c86.js +0 -3443
  274. package/dist/components/Form/Control.d.ts +0 -13
  275. package/dist/components/Form/Form.d.ts +0 -4
  276. package/dist/components/Form/FormItem.d.ts +0 -4
  277. package/dist/components/Form/FormLabel.d.ts +0 -4
  278. package/dist/components/Form/context.d.ts +0 -6
  279. package/dist/components/Form/index.d.ts +0 -8
  280. package/dist/components/Form/interface.d.ts +0 -48
  281. package/dist/components/Form/store.d.ts +0 -16
  282. package/dist/components/Form/styles/item.d.ts +0 -5
  283. package/dist/components/Form/useForm.d.ts +0 -3
  284. package/dist/index-0b47cbae.js +0 -173
  285. package/dist/index-14c3a4d7.js +0 -62
  286. package/dist/index-6ffbeca8.js +0 -65
  287. package/dist/index-7be8731d.js +0 -62
  288. package/dist/index-b5974e22.js +0 -62
  289. package/dist/index-e102400f.js +0 -11706
  290. package/dist/index-fb1f3ef1.js +0 -63
  291. package/dist/isObjectLike-1b8bbac2.js +0 -44
  292. package/dist/jsx-runtime-82a9ddf6.js +0 -646
@@ -0,0 +1,425 @@
1
+ "use client";
2
+ import { jsx as t, jsxs as $ } from "react/jsx-runtime";
3
+ import * as r from "react";
4
+ import { createPortal as Q } from "react-dom";
5
+ import { u as X } from "./useTheme-0688f238.js";
6
+ import { c as V } from "./utils-071abd68.js";
7
+ import { c as a } from "./index-c57db938.js";
8
+ import { S as Z } from "./arrow-down-l-line-97e4fe24.js";
9
+ import { S as Y } from "./close-bg-6d2211ef.js";
10
+ import { S as ee } from "./close-0df24351.js";
11
+ import { u as te } from "./useAlign-916ed3be.js";
12
+ import { TextField as re } from "./TextField.es.js";
13
+ import { S as se } from "./search-b79a3be5.js";
14
+ import "./clsx.m-e965ef18.js";
15
+ import "./styles-85a9fe64.js";
16
+ const ae = "_menus_1u4o4_1", K = {
17
+ menus: ae,
18
+ "options-wrapper": "_options-wrapper_1u4o4_5"
19
+ }, oe = a("", {
20
+ variants: {
21
+ theme: {
22
+ light: "bu-border-transparent bu-bg-light-fill-secondary focus-within:!bu-border-light-primary hover:bu-border-[1px] hover:bu-border-light-primary",
23
+ dark: "bu-border-transparent bu-bg-dark-fill-secondary focus-within:!bu-border-dark-primary hover:bu-border-[1px] hover:bu-border-dark-primary"
24
+ }
25
+ }
26
+ }), le = a("", {
27
+ variants: {
28
+ theme: {
29
+ light: [
30
+ "bu-border-light-line-secondary focus-within:bu-border-light-primary focus-within:!bu-bg-transparent hover:bu-border-light-primary"
31
+ ],
32
+ dark: [
33
+ "bu-border-dark-line-secondary focus-within:bu-border-light-primary focus-within:!bu-bg-transparent hover:bu-border-dark-primary"
34
+ ]
35
+ }
36
+ }
37
+ }), ne = a("", {
38
+ variants: {
39
+ theme: {
40
+ light: "bu-border-light-primary",
41
+ dark: "bu-border-dark-primary"
42
+ }
43
+ }
44
+ }), ie = ({
45
+ theme: l,
46
+ size: h,
47
+ variant: i
48
+ }) => a("bu-flex bu-items-center bu-justify-between bu-rounded-[8px] bu-border-[1px]", {
49
+ variants: {
50
+ variant: {
51
+ filled: oe({ theme: l }),
52
+ outlined: le({ theme: l })
53
+ },
54
+ theme: {
55
+ light: [],
56
+ dark: []
57
+ },
58
+ size: {
59
+ sm: ["bu-min-h-[32px]", "bu-px-[8px]"],
60
+ md: ["bu-min-h-[40px]", "bu-px-[8px]"],
61
+ lg: ["bu-min-h-[48px]", "bu-px-[12px]"]
62
+ }
63
+ },
64
+ defaultVariants: {
65
+ theme: "light",
66
+ size: "md"
67
+ }
68
+ })({ theme: l, size: h, variant: i }), ue = a(
69
+ "bu-flex bu-flex-[1] bu-flex-wrap bu-items-center bu-justify-start bu-gap-[4px]",
70
+ {
71
+ variants: {
72
+ size: {
73
+ sm: "bu-py-[3px]",
74
+ md: "bu-py-[7px]",
75
+ lg: "bu-py-[9px]"
76
+ }
77
+ },
78
+ defaultVariants: {
79
+ size: "md"
80
+ }
81
+ }
82
+ ), ce = a("bu-flex bu-items-center bu-justify-center", {
83
+ variants: {
84
+ size: {
85
+ sm: "bu-h-[16px] bu-w-[16px]",
86
+ md: "bu-h-[20px] bu-w-[20px]",
87
+ lg: "bu-h-[20px] bu-w-[20px]"
88
+ }
89
+ },
90
+ defaultVariants: {
91
+ size: "md"
92
+ }
93
+ }), be = a("bu-border-[1px] bu-border-solid", {
94
+ variants: {
95
+ theme: {
96
+ light: "bu-border-light-line-secondary bu-bg-light-background",
97
+ dark: "bu-border-dark-line-primary bu-bg-dark-background"
98
+ }
99
+ }
100
+ }), de = a("bu-select-none", {
101
+ variants: {
102
+ theme: {
103
+ light: "bu-text-light-label-40",
104
+ dark: "bu-text-dark-label-40"
105
+ },
106
+ size: {
107
+ sm: "bu-text-[12px] bu-leading-[18px]",
108
+ md: "bu-text-[14px] bu-leading-[20px]",
109
+ lg: "bu-text-[16px] bu-leading-[24px]"
110
+ }
111
+ }
112
+ }), pe = a("bu-sticky bu-top-0 bu-mb-[8px] bu-px-[8px] bu-pt-[8px]", {
113
+ variants: {
114
+ theme: {
115
+ light: "bu-bg-light-background",
116
+ dark: "bu-bg-dark-background"
117
+ }
118
+ }
119
+ }), he = a("bu-mx-[8px]", {
120
+ variants: {
121
+ theme: {
122
+ light: "bu-text-light-label-40",
123
+ dark: "bu-text-dark-label-40"
124
+ }
125
+ }
126
+ }), me = a("bu-mx-[8px] bu-cursor-pointer", {
127
+ variants: {
128
+ theme: {
129
+ light: "bu-text-light-label-40",
130
+ dark: "bu-text-dark-label-40"
131
+ }
132
+ }
133
+ }), fe = a("!bu-cursor-not-allowed", {
134
+ variants: {
135
+ theme: {
136
+ light: "bu-text-light-label-40",
137
+ dark: "bu-text-dark-label-40"
138
+ }
139
+ }
140
+ }), ge = a("", {
141
+ variants: {
142
+ theme: {
143
+ light: "bu-text-light-primary",
144
+ dark: "bu-text-dark-primary"
145
+ }
146
+ }
147
+ }), U = ({
148
+ theme: l,
149
+ disabled: h,
150
+ isSelected: i
151
+ }) => a(
152
+ "bu-flex bu-cursor-pointer bu-items-center bu-justify-start bu-p-[8px] bu-text-[12px] bu-leading-[18px]",
153
+ {
154
+ variants: {
155
+ theme: {
156
+ light: "bu-text-light-label hover:bu-bg-light-fill-secondary",
157
+ dark: "bu-text-dark-label hover:bu-bg-dark-fill-secondary"
158
+ },
159
+ disabled: {
160
+ true: fe({ theme: l }),
161
+ false: ""
162
+ },
163
+ isSelected: {
164
+ true: ge({ theme: l }),
165
+ false: ""
166
+ }
167
+ },
168
+ defaultVariants: {
169
+ theme: "light"
170
+ }
171
+ }
172
+ )({ theme: l, disabled: h, isSelected: i }), xe = r.forwardRef((l, h) => {
173
+ const {
174
+ parent: i,
175
+ theme: m,
176
+ size: _,
177
+ scrollContainer: b,
178
+ auto: M,
179
+ offsetPixels: R = -2,
180
+ menusClassName: H,
181
+ search: x = !0,
182
+ searchClassName: S,
183
+ searchChange: v,
184
+ options: C,
185
+ optionsFormat: N,
186
+ currentSelected: s,
187
+ setCurrentSelected: d,
188
+ setIsShowOptions: y,
189
+ setIsHover: u,
190
+ multiLimit: E
191
+ } = l, { theme: n } = X(), c = m || n, [p, O] = r.useState(C), L = r.useRef(null), [T, z] = r.useState(0), { offset: o, resize: f } = te(i), { offsetX: k, offsetY: P } = o, [A, B] = r.useState(!1), { height: q, width: G } = i ? i.getBoundingClientRect() : { width: 0, height: 0 }, [W, J] = r.useState(""), F = (e) => {
192
+ if (J(e), v && typeof v == "function")
193
+ v(e);
194
+ else {
195
+ if (!e) {
196
+ O(C);
197
+ return;
198
+ }
199
+ const g = C.filter((I) => I.label.toLowerCase().includes(e.toLowerCase())).sort((I, j) => I.label.toLowerCase() === e.toLowerCase() ? -1 : j.label.toLowerCase() === e.toLowerCase() ? 1 : I.label.toLowerCase().startsWith(e.toLowerCase()) ? -1 : j.label.toLowerCase().startsWith(e.toLowerCase()) ? 1 : I.label.localeCompare(j.label));
200
+ O(g);
201
+ }
202
+ }, D = (e) => {
203
+ if (!e.disabled && d && s) {
204
+ if (E && s.length >= E)
205
+ return;
206
+ !!s.includes(e.value) || d([...s, e.value]), u && u(!1), y(!1);
207
+ }
208
+ };
209
+ return r.useEffect(() => (b && b.addEventListener("scroll", f), () => {
210
+ b && b.removeEventListener("scroll", f);
211
+ }), [b]), r.useEffect(() => {
212
+ M && setTimeout(() => {
213
+ if (L.current) {
214
+ const e = window.innerHeight || document.documentElement.clientHeight, { bottom: w, height: g } = L.current.getBoundingClientRect();
215
+ z(g), w > e ? B(!0) : B(!1);
216
+ }
217
+ }, 0);
218
+ }, [M]), k !== 0 && P !== 0 ? Q(
219
+ /* @__PURE__ */ t(
220
+ "div",
221
+ {
222
+ className: `${K.menus} ${H} ${be({ theme: n })}`,
223
+ style: {
224
+ top: A ? P - T - 4 : P + q + 4 + "px",
225
+ left: k + "px"
226
+ },
227
+ onClick: (e) => e.stopPropagation(),
228
+ onMouseDown: (e) => e.stopPropagation(),
229
+ onMouseUp: (e) => e.stopPropagation(),
230
+ onMouseMove: (e) => e.stopPropagation(),
231
+ onMouseLeave: (e) => e.stopPropagation(),
232
+ onMouseEnter: (e) => e.stopPropagation(),
233
+ onTouchStart: (e) => e.stopPropagation(),
234
+ onTouchEnd: (e) => e.stopPropagation(),
235
+ onTouchMove: (e) => e.stopPropagation(),
236
+ onTouchCancel: (e) => e.stopPropagation(),
237
+ onContextMenu: (e) => e.stopPropagation(),
238
+ ref: L,
239
+ children: /* @__PURE__ */ $(
240
+ "div",
241
+ {
242
+ ref: h,
243
+ style: { width: G + R + "px" },
244
+ className: "bu-flex bu-h-full bu-flex-col bu-gap-[8px]",
245
+ children: [
246
+ x && /* @__PURE__ */ t("div", { className: `${pe({ theme: n })} ${S}`, children: /* @__PURE__ */ t(
247
+ re,
248
+ {
249
+ value: W,
250
+ variant: "outlined",
251
+ startAdornment: /* @__PURE__ */ t(se, { className: he({ theme: n }) }),
252
+ endAdornment: W ? /* @__PURE__ */ t(
253
+ Y,
254
+ {
255
+ className: me({ theme: n }),
256
+ onClick: () => F("")
257
+ }
258
+ ) : null,
259
+ onChange: (e) => F(e.target.value)
260
+ }
261
+ ) }),
262
+ /* @__PURE__ */ t("ul", { className: K["options-wrapper"], children: p.map((e, w) => {
263
+ const g = s == null ? void 0 : s.includes(e.value);
264
+ return N ? /* @__PURE__ */ t(
265
+ "li",
266
+ {
267
+ className: V(
268
+ U({
269
+ theme: c,
270
+ disabled: !!e.disabled,
271
+ isSelected: !!g
272
+ })
273
+ ),
274
+ onClick: () => {
275
+ D(e);
276
+ },
277
+ children: N({ ...e, isSelected: g })
278
+ },
279
+ `${w}-${e.value}`
280
+ ) : /* @__PURE__ */ $(
281
+ "li",
282
+ {
283
+ className: V(
284
+ U({
285
+ theme: c,
286
+ disabled: !!e.disabled,
287
+ isSelected: !!g
288
+ })
289
+ ),
290
+ onClick: () => {
291
+ D(e);
292
+ },
293
+ children: [
294
+ e.icon && /* @__PURE__ */ t(
295
+ "img",
296
+ {
297
+ src: e.icon,
298
+ alt: e.label,
299
+ className: "bu-mr-[4px] bu-h-[20px] bu-w-[20px]"
300
+ }
301
+ ),
302
+ /* @__PURE__ */ t("div", { children: e.label })
303
+ ]
304
+ },
305
+ `${w}-${e.value}`
306
+ );
307
+ }) })
308
+ ]
309
+ }
310
+ )
311
+ }
312
+ ),
313
+ document.body
314
+ ) : null;
315
+ }), $e = r.forwardRef((l, h) => {
316
+ r.useImperativeHandle(h, () => ({
317
+ close: O,
318
+ clear: L
319
+ }));
320
+ const {
321
+ id: i,
322
+ size: m = "md",
323
+ className: _,
324
+ theme: b,
325
+ variant: M = "outlined",
326
+ clearIcon: R = !0,
327
+ placeholder: H = "placeholder",
328
+ values: x,
329
+ onChange: S,
330
+ labelShowKey: v,
331
+ options: C
332
+ } = l, { theme: N } = X(), s = r.useRef(null), d = b || N, [y, u] = r.useState(!1), [E, n] = r.useState(!1), [c, p] = r.useState([]), O = () => {
333
+ u(!1), n(!1), p([]), s.current && s.current.blur();
334
+ }, L = () => {
335
+ p([]), u(!1);
336
+ }, T = () => {
337
+ u(!y);
338
+ }, z = (o) => {
339
+ o.stopPropagation(), p([]), u(!1);
340
+ };
341
+ return r.useEffect(() => {
342
+ const o = (f) => {
343
+ s.current && !s.current.contains(f.target) && u(!1);
344
+ };
345
+ return document.addEventListener("mousedown", o), () => {
346
+ document.removeEventListener("mousedown", o);
347
+ };
348
+ }, []), r.useEffect(() => {
349
+ x && Array.isArray(x) && p(x);
350
+ }, [x]), r.useEffect(() => {
351
+ S && typeof S == "function" && S(c);
352
+ }, [c]), /* @__PURE__ */ $(
353
+ "div",
354
+ {
355
+ ref: s,
356
+ className: V(
357
+ ie({ theme: d, size: m, variant: M }),
358
+ y ? ne({ theme: N }) : null,
359
+ _
360
+ ),
361
+ id: i,
362
+ onMouseEnter: () => n(!0),
363
+ onMouseLeave: () => n(!1),
364
+ onClick: T,
365
+ children: [
366
+ /* @__PURE__ */ t("div", { className: ue({ size: m }), children: c.length > 0 ? c.map((o) => {
367
+ const f = C.find((k) => k.value === o);
368
+ return /* @__PURE__ */ $(
369
+ "div",
370
+ {
371
+ className: `bu-flex bu-items-center bu-gap-[2px] bu-rounded-[4px] bu-px-[4px] bu-py-[2px] ${d === "dark" ? "bu-bg-dark-hover-fill-primary" : "bu-bg-light-hover-fill-primary"}`,
372
+ children: [
373
+ /* @__PURE__ */ t(
374
+ "div",
375
+ {
376
+ className: `bu-text-[16px] bu-leading-[24px] ${d === "dark" ? "bu-text-dark-label" : "bu-text-light-label"}`,
377
+ children: f && v ? f[v] : o
378
+ }
379
+ ),
380
+ /* @__PURE__ */ t(
381
+ ee,
382
+ {
383
+ onClick: (k) => {
384
+ k.stopPropagation(), p((P) => P.filter((A) => A !== o));
385
+ },
386
+ className: `bu-h-[20px] bu-w-[20px] bu-cursor-pointer ${d === "dark" ? "bu-text-dark-label-40" : "bu-text-light-label-40"}`
387
+ }
388
+ )
389
+ ]
390
+ },
391
+ o
392
+ );
393
+ }) : /* @__PURE__ */ t("div", { className: de({ theme: d, size: m }), children: H }) }),
394
+ /* @__PURE__ */ t("div", { className: ce({ size: m }), children: R && E && c.length > 0 ? /* @__PURE__ */ t(
395
+ Y,
396
+ {
397
+ className: "bu-h-full bu-w-full bu-cursor-pointer",
398
+ onClick: (o) => {
399
+ z(o);
400
+ }
401
+ }
402
+ ) : /* @__PURE__ */ t(
403
+ Z,
404
+ {
405
+ className: `bu-h-full bu-w-full bu-transition-all ${y ? "bu-rotate-180" : ""}`
406
+ }
407
+ ) }),
408
+ y && /* @__PURE__ */ t(
409
+ xe,
410
+ {
411
+ ...l,
412
+ parent: s.current,
413
+ currentSelected: c,
414
+ setCurrentSelected: p,
415
+ setIsShowOptions: u,
416
+ setIsHover: n
417
+ }
418
+ )
419
+ ]
420
+ }
421
+ );
422
+ });
423
+ export {
424
+ $e as MultiSelect
425
+ };
@@ -0,0 +1 @@
1
+ export * from './components/Notification/index'
@@ -0,0 +1,12 @@
1
+ "use client";
2
+ import { b as f } from "./index-40023d52.js";
3
+ import "react/jsx-runtime";
4
+ import "react";
5
+ import "react-dom";
6
+ import "./index-c57db938.js";
7
+ import "./clsx.m-e965ef18.js";
8
+ import "./useTheme-0688f238.js";
9
+ import "./close-0df24351.js";
10
+ export {
11
+ f as Notification
12
+ };
@@ -0,0 +1 @@
1
+ export * from './components/Pagination/index'
@@ -0,0 +1,219 @@
1
+ "use client";
2
+ import { jsx as a, jsxs as g } from "react/jsx-runtime";
3
+ import * as p from "react";
4
+ import { c as O } from "./clsx.m-e965ef18.js";
5
+ import { u as A } from "./useTheme-0688f238.js";
6
+ import { T as D, S as N } from "./index-9349bf2d.js";
7
+ import { c as L } from "./index-c57db938.js";
8
+ import "react-dom";
9
+ import "./TextField.es.js";
10
+ import "./utils-071abd68.js";
11
+ import "./styles-85a9fe64.js";
12
+ import "./useAlign-916ed3be.js";
13
+ import "./arrow-down-011b02c7.js";
14
+ import "./search-b79a3be5.js";
15
+ const E = L(
16
+ "bu-min-w-[24px] bu-cursor-pointer bu-rounded-[4px] bu-px-[4px] bu-py-[2px] bu-text-center bu-text-md bu-leading-[20px] bu-transition-colors",
17
+ {
18
+ variants: {
19
+ theme: {
20
+ dark: "bu-text-dark-label data-[current='true']:bu-bg-dark-primary data-[current='true']:bu-text-light-second",
21
+ light: "bu-text-light-label data-[current='true']:bu-bg-light-primary data-[current='true']:bu-text-dark-second"
22
+ }
23
+ }
24
+ }
25
+ ), T = L(
26
+ "bu-h-[24px] bu-cursor-pointer data-[disabled='true']:bu-cursor-not-allowed",
27
+ {
28
+ variants: {
29
+ theme: {
30
+ dark: "bu-text-dark-label data-[disabled='true']:bu-text-dark-label-40",
31
+ light: "bu-text-light-label data-[disabled='true']:bu-text-light-label-40"
32
+ }
33
+ }
34
+ }
35
+ ), W = () => {
36
+ }, q = [10, 20, 30, 40, 50];
37
+ function B(t) {
38
+ const e = p.useRef(null), { theme: d } = A(), {
39
+ sizeCanChange: m = !1,
40
+ onPageSizeChange: n = W,
41
+ sizeOptions: l = q,
42
+ pageSize: i = 10,
43
+ disabled: h,
44
+ theme: u = d,
45
+ countPerPage: b
46
+ } = t;
47
+ return m ? /* @__PURE__ */ a("div", { className: "bu-h-[34px] bu-w-[97px]", children: /* @__PURE__ */ a(
48
+ D,
49
+ {
50
+ ref: e,
51
+ options: l.map((s) => ({
52
+ value: String(s),
53
+ label: String(s)
54
+ })),
55
+ defaultValue: l.indexOf(i) !== -1 ? String(i) : String(l[0]),
56
+ onChange: (s) => {
57
+ n(Number(s) || 10);
58
+ },
59
+ className: "bu-max-h-[150px] bu-overflow-y-scroll",
60
+ base: "div",
61
+ inputDisabled: h,
62
+ selectItemClassName: `!bu-px-[8px] !bu-leading-[18px] ${u === "light" ? "!bu-bg-light-background hover:!bu-bg-light-hover-fill-primary" : "!bu-bg-dark-background hover:!bu-bg-dark-hover-fill-primary"}`,
63
+ valueClassName: "!bu-h-[34px]",
64
+ inputClassName: "!bu-h-[34px]",
65
+ customSelectItems: (s) => {
66
+ const v = l.indexOf(i) !== -1 ? String(i) : String(l[0]);
67
+ return /* @__PURE__ */ g(
68
+ "div",
69
+ {
70
+ className: v === s.value ? u === "light" ? "!bu-text-light-primary" : "!bu-text-dark-primary" : "",
71
+ children: [
72
+ s.label,
73
+ " / ",
74
+ b
75
+ ]
76
+ }
77
+ );
78
+ },
79
+ customLabel: (s) => /* @__PURE__ */ g(
80
+ "div",
81
+ {
82
+ className: `${u === "light" ? "!bu-text-light-label" : "!bu-text-dark-label"}`,
83
+ children: [
84
+ s.label,
85
+ " / ",
86
+ b
87
+ ]
88
+ }
89
+ ),
90
+ auto: !1
91
+ }
92
+ ) }) : null;
93
+ }
94
+ const R = 10;
95
+ function x(t = R, e) {
96
+ return Math.ceil(e / t);
97
+ }
98
+ function G(t) {
99
+ return t && t.length ? t[0] : R;
100
+ }
101
+ function te({
102
+ totalPages: t,
103
+ currentPage: e,
104
+ onChange: d,
105
+ className: m,
106
+ theme: n,
107
+ activeStyle: l,
108
+ total: i,
109
+ sizeOptions: h,
110
+ sizeCanChange: u,
111
+ onPageChange: b,
112
+ pageSizeChangeResetCurrent: s = !0,
113
+ countPerPage: v = "Page",
114
+ pageSize: y
115
+ }) {
116
+ const [c, $] = p.useState(
117
+ y || G(h)
118
+ ), [_, V] = p.useState(
119
+ () => j(
120
+ e,
121
+ u ? x(c, i) : t
122
+ )
123
+ ), w = p.useRef(!0), { theme: S } = A(), F = e === 1, I = p.useMemo(() => {
124
+ const r = u ? x(c, i) : t;
125
+ return e === r;
126
+ }, [e, t, u, c, i]), k = (r) => () => {
127
+ const o = (f) => {
128
+ u ? b && b(f, c) : d && d(f);
129
+ };
130
+ if (r === "prev")
131
+ return e > 1 && o(e - 1);
132
+ if (r === "next") {
133
+ const f = u ? x(c, i) : t;
134
+ return e < f && o(e + 1);
135
+ }
136
+ r !== e && o(r);
137
+ }, M = (r) => {
138
+ const o = x(r, i);
139
+ $(r), b && b(
140
+ s ? 1 : e > o ? o : e,
141
+ r
142
+ );
143
+ };
144
+ return p.useEffect(() => {
145
+ w.current ? w.current = !1 : V(
146
+ j(
147
+ e,
148
+ u ? x(c, i) : t
149
+ )
150
+ );
151
+ }, [t, e, u, c, i]), !u && (!e || !t || t < e) ? null : (u && !b && console.error(
152
+ "Warning: you have provide current prop for pagination but without onPageSizeChange handler , this will cause no-change when you change page. "
153
+ ), /* @__PURE__ */ g("div", { className: `bu-flex bu-items-center bu-justify-center bu-gap-[16px] ${m}`, children: [
154
+ /* @__PURE__ */ g(
155
+ "ul",
156
+ {
157
+ className: O(
158
+ "bu-flex bu-items-center bu-justify-center bu-gap-[16px] bu-text-dark-label md:bu-gap-[24px]"
159
+ ),
160
+ children: [
161
+ /* @__PURE__ */ a(
162
+ "li",
163
+ {
164
+ className: T({ theme: n || S }),
165
+ "data-disabled": F,
166
+ onClick: k("prev"),
167
+ children: /* @__PURE__ */ a(N, { className: "bu-h-[24px] bu-w-[24px] bu-rotate-90" })
168
+ }
169
+ ),
170
+ _.map((r, o) => /* @__PURE__ */ a(
171
+ "li",
172
+ {
173
+ ...e === r ? { "data-current": !0, style: l } : { "data-current": !1 },
174
+ className: E({ theme: n || S }),
175
+ children: typeof r == "string" ? /* @__PURE__ */ a("span", { children: r }) : /* @__PURE__ */ a("button", { onClick: k(r), children: r })
176
+ },
177
+ `${r}-${o}`
178
+ )),
179
+ /* @__PURE__ */ a(
180
+ "li",
181
+ {
182
+ className: T({ theme: n || S }),
183
+ "data-disabled": I,
184
+ onClick: k("next"),
185
+ children: /* @__PURE__ */ a(N, { className: "bu-h-[24px] bu-w-[24px] -bu-rotate-90" })
186
+ }
187
+ )
188
+ ]
189
+ }
190
+ ),
191
+ /* @__PURE__ */ a(
192
+ B,
193
+ {
194
+ theme: n,
195
+ sizeCanChange: u,
196
+ sizeOptions: h,
197
+ onPageSizeChange: M,
198
+ pageSize: c,
199
+ countPerPage: v
200
+ }
201
+ )
202
+ ] }));
203
+ }
204
+ function j(t, e) {
205
+ if (e <= 4)
206
+ return Array.from({ length: e }, (l, i) => i + 1);
207
+ if (t === 1)
208
+ return [1, 2, 3, "...", e];
209
+ if (t === e)
210
+ return [1, "...", e - 2, e - 1, e];
211
+ const d = Array.from({ length: 3 }, (l, i) => t + i - 1).filter(
212
+ (l) => l > 1 && l < e
213
+ ), m = t - 2 > 1 ? [1, "..."] : [1], n = t + 2 >= e ? [e] : ["...", e];
214
+ return [...m, ...d, ...n];
215
+ }
216
+ export {
217
+ B as PageOption,
218
+ te as Pagination
219
+ };
@@ -0,0 +1 @@
1
+ export * from './components/Picker/index'