@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
@@ -1,100 +0,0 @@
1
- "use client";
2
- import { jsxs as c, jsx as t } from "react/jsx-runtime";
3
- import * as z from "react";
4
- import { u as I } from "./useTheme-0688f238.js";
5
- import { c as n } from "./utils-071abd68.js";
6
- import { Typography as p } from "./Typography.es.js";
7
- import { L as T, I as A, A as b, a as j, b as w, c as h, d as L, H as V } from "./styles-85a9fe64.js";
8
- import "./clsx.m-e965ef18.js";
9
- import "./index-c57db938.js";
10
- const k = z.forwardRef((f, y) => {
11
- const {
12
- id: o,
13
- label: s,
14
- startAdornment: r,
15
- endAdornment: l,
16
- type: v,
17
- className: m,
18
- inputClassName: N,
19
- variant: g,
20
- theme: e,
21
- error: x,
22
- helperText: u,
23
- disabled: d,
24
- inputSize: i = "md",
25
- ...S
26
- } = f, { theme: a } = I();
27
- return /* @__PURE__ */ c("div", { children: [
28
- s && typeof s == "string" && /* @__PURE__ */ t("label", { children: /* @__PURE__ */ t(
29
- p,
30
- {
31
- variant: "body4",
32
- className: n(T({ theme: e || a, size: i })),
33
- children: s
34
- }
35
- ) }),
36
- s && typeof s != "string" && /* @__PURE__ */ t("div", { className: "bu-mb-1", children: s }),
37
- /* @__PURE__ */ t(
38
- "div",
39
- {
40
- className: n(
41
- A({
42
- variant: g,
43
- theme: e || a,
44
- error: x,
45
- disabled: d,
46
- noClassName: !m,
47
- size: i
48
- }),
49
- m
50
- ),
51
- children: /* @__PURE__ */ c("div", { className: "bu-flex bu-h-full bu-w-full bu-items-center bu-justify-center", children: [
52
- r && /* @__PURE__ */ t(
53
- "div",
54
- {
55
- className: typeof r == "string" ? b({ size: i, position: "start" }) : "",
56
- children: r
57
- }
58
- ),
59
- /* @__PURE__ */ t(
60
- "input",
61
- {
62
- id: o || (typeof s == "string" ? `bui-${s}` : void 0),
63
- disabled: d,
64
- type: v,
65
- ...S,
66
- ref: y,
67
- className: n(
68
- "bu-h-full bu-w-full bu-flex-1 bu-bg-transparent bu-outline-none focus:bu-outline-0 focus-visible:bu-outline-0",
69
- L({ inputSize: i }),
70
- N,
71
- !r && h({ inputSize: i }),
72
- !l && h({ inputSize: i }),
73
- w({ theme: e || a }),
74
- j({ theme: e || a })
75
- )
76
- }
77
- ),
78
- l && /* @__PURE__ */ t(
79
- "div",
80
- {
81
- className: typeof l == "string" ? b({ size: i, position: "end" }) : "",
82
- children: l
83
- }
84
- )
85
- ] })
86
- }
87
- ),
88
- u && /* @__PURE__ */ t("div", { className: "bu-mt-1", children: /* @__PURE__ */ t(
89
- p,
90
- {
91
- variant: "body4",
92
- className: n(V({ theme: e || a })),
93
- children: u
94
- }
95
- ) })
96
- ] });
97
- });
98
- export {
99
- k as LabelTextField
100
- };
@@ -1 +0,0 @@
1
- export * from './components/MonthPicker/index'
@@ -1,16 +0,0 @@
1
- "use client";
2
- import { M as h } from "./index-eea69add.js";
3
- import "react/jsx-runtime";
4
- import "react";
5
- import "./Button.es.js";
6
- import "./utils-071abd68.js";
7
- import "./clsx.m-e965ef18.js";
8
- import "./index-c57db938.js";
9
- import "./useTheme-0688f238.js";
10
- import "./index-b7027a1d.js";
11
- import "./Picker.es.js";
12
- import "./_commonjsHelpers-1d52fb73.js";
13
- import "./index.module-fb41ba3b.js";
14
- export {
15
- h as MonthPicker
16
- };
@@ -1 +0,0 @@
1
- export * from './components/MultiSelect/index'
@@ -1,425 +0,0 @@
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
- };
@@ -1 +0,0 @@
1
- export * from './components/Notification/index'
@@ -1,12 +0,0 @@
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
- };
@@ -1 +0,0 @@
1
- export * from './components/Pagination/index'