@blofin/blofin-ui 1.0.0-beta.14 → 1.0.0-beta.16

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 (56) hide show
  1. package/dist/Badge.es.js +4 -4
  2. package/dist/Button.es.js +93 -93
  3. package/dist/Calendar.es.js +74 -74
  4. package/dist/Checkbox.es.js +44 -43
  5. package/dist/CssDropdown.es.js +15 -15
  6. package/dist/DatePickerRange.es.js +226 -226
  7. package/dist/DateTimePicker.es.js +237 -237
  8. package/dist/Dialog.es.js +102 -102
  9. package/dist/Divider.es.js +5 -5
  10. package/dist/Drawer.es.js +111 -56
  11. package/dist/Dropdown.es.js +43 -43
  12. package/dist/Empty.es.js +5 -6
  13. package/dist/LabelTextField.es.js +50 -50
  14. package/dist/MonthPicker.es.js +3 -3
  15. package/dist/MultiSelect.es.js +113 -113
  16. package/dist/Notification.es.js +5 -4
  17. package/dist/Pagination.es.js +98 -98
  18. package/dist/Picker.es.js +72 -72
  19. package/dist/Popover.es.js +43 -43
  20. package/dist/Popup.es.js +27 -27
  21. package/dist/{ProTable-f1ff8606.js → ProTable-7a07d8b6.js} +209 -209
  22. package/dist/ProTable.es.js +4 -4
  23. package/dist/RadioButton.es.js +27 -27
  24. package/dist/Select.es.js +144 -144
  25. package/dist/Slider.es.js +108 -108
  26. package/dist/Sort.es.js +61 -60
  27. package/dist/Sortable.es.js +21 -21
  28. package/dist/Switch.es.js +11 -11
  29. package/dist/Tab.es.js +34 -34
  30. package/dist/Table.es.js +126 -126
  31. package/dist/TextField.es.js +18 -18
  32. package/dist/TextSelect.es.js +3 -3
  33. package/dist/Textarea.es.js +40 -40
  34. package/dist/Toast.es.js +5 -4
  35. package/dist/Tooltip.es.js +46 -46
  36. package/dist/Typography.es.js +9 -9
  37. package/dist/blofin.css +1 -1
  38. package/dist/components/Drawer/animations.d.ts +19 -0
  39. package/dist/components/Drawer/useDrawerCallbacks.d.ts +12 -0
  40. package/dist/components/Sort/index.d.ts +2 -1
  41. package/dist/index-54c64fd8.js +469 -0
  42. package/dist/index-9349bf2d.js +345 -0
  43. package/dist/index-eea69add.js +71 -0
  44. package/dist/index.d.ts +1 -0
  45. package/dist/index.es.js +107 -105
  46. package/dist/index.esm-71578db5.js +1198 -0
  47. package/dist/index.module-4db476ff.js +13 -0
  48. package/dist/proxy-50241ce1.js +4863 -0
  49. package/dist/{useTheme-81e2a73e.js → useTheme-0688f238.js} +4 -4
  50. package/package.json +2 -4
  51. package/dist/index-5a1ea470.js +0 -71
  52. package/dist/index-a55c4737.js +0 -345
  53. package/dist/index-ffb39a28.js +0 -5322
  54. package/dist/index.esm-da18270d.js +0 -1198
  55. package/dist/index.module-86edc823.js +0 -15
  56. package/dist/jsx-runtime-ba6e4aac.js +0 -288
package/dist/Badge.es.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { j as s } from "./jsx-runtime-ba6e4aac.js";
3
- import { u as i } from "./useTheme-81e2a73e.js";
2
+ import { jsxs as i } from "react/jsx-runtime";
3
+ import { u as s } from "./useTheme-0688f238.js";
4
4
  import { c as d } from "./utils-071abd68.js";
5
5
  import { c as u } from "./index-c57db938.js";
6
6
  import "react";
@@ -47,8 +47,8 @@ const c = (e) => {
47
47
  startIcon: b,
48
48
  endIcon: t
49
49
  }) => {
50
- const { theme: n } = i();
51
- return /* @__PURE__ */ s.jsxs("span", { className: `${d(c({ theme: g || n, color: e }))}`, children: [
50
+ const { theme: n } = s();
51
+ return /* @__PURE__ */ i("span", { className: `${d(c({ theme: g || n, color: e }))}`, children: [
52
52
  b || (r ? "• " : null),
53
53
  a,
54
54
  t
package/dist/Button.es.js CHANGED
@@ -1,18 +1,18 @@
1
1
  "use client";
2
- import { j as r } from "./jsx-runtime-ba6e4aac.js";
2
+ import { jsx as l, jsxs as w, Fragment as E } from "react/jsx-runtime";
3
3
  import { c as k } from "./utils-071abd68.js";
4
4
  import { c as e } from "./index-c57db938.js";
5
- import { u as x } from "./useTheme-81e2a73e.js";
5
+ import { u as x } from "./useTheme-0688f238.js";
6
6
  import * as o from "react";
7
7
  import { c as g } from "./clsx.m-e965ef18.js";
8
- const N = e("bu-text-light-second", {
8
+ const B = e("bu-text-light-second", {
9
9
  variants: {
10
10
  theme: {
11
11
  light: ["bu-bg-light-primary", "hover:bu-bg-light-hover-primary"],
12
12
  dark: ["bu-bg-dark-primary", "hover:bu-bg-dark-hover-primary"]
13
13
  }
14
14
  }
15
- }), $ = e("", {
15
+ }), V = e("", {
16
16
  variants: {
17
17
  theme: {
18
18
  light: [
@@ -27,7 +27,7 @@ const N = e("bu-text-light-second", {
27
27
  ]
28
28
  }
29
29
  }
30
- }), B = e("", {
30
+ }), M = e("", {
31
31
  variants: {
32
32
  theme: {
33
33
  light: [
@@ -38,7 +38,7 @@ const N = e("bu-text-light-second", {
38
38
  dark: ["bu-bg-dark-primary-14", "hover:bu-bg-dark-hover-primary-10", "bu-text-dark-primary"]
39
39
  }
40
40
  }
41
- }), V = e("", {
41
+ }), Z = e("", {
42
42
  variants: {
43
43
  theme: {
44
44
  light: [
@@ -53,7 +53,7 @@ const N = e("bu-text-light-second", {
53
53
  ]
54
54
  }
55
55
  }
56
- }), M = e("", {
56
+ }), j = e("", {
57
57
  variants: {
58
58
  theme: {
59
59
  light: [
@@ -68,7 +68,7 @@ const N = e("bu-text-light-second", {
68
68
  ]
69
69
  }
70
70
  }
71
- }), Z = e("", {
71
+ }), H = e("", {
72
72
  variants: {
73
73
  theme: {
74
74
  light: [
@@ -83,21 +83,21 @@ const N = e("bu-text-light-second", {
83
83
  ]
84
84
  }
85
85
  }
86
- }), H = e("", {
86
+ }), F = e("", {
87
87
  variants: {
88
88
  theme: {
89
89
  light: ["bu-text-light-label", "hover:bu-text-light-primary"],
90
90
  dark: ["bu-text-dark-label", "hover:bu-text-dark-primary"]
91
91
  }
92
92
  }
93
- }), R = e("", {
93
+ }), P = e("", {
94
94
  variants: {
95
95
  theme: {
96
96
  light: ["bu-text-light-label-40", "hover:bu-text-light-label-40"],
97
97
  dark: ["bu-text-dark-label-40", "hover:bu-text-dark-label-40"]
98
98
  }
99
99
  }
100
- }), F = e("", {
100
+ }), R = e("", {
101
101
  variants: {
102
102
  theme: {
103
103
  light: ["bu-text-light-label-40", "hover:bu-text-light-primary"],
@@ -111,7 +111,7 @@ const N = e("bu-text-light-second", {
111
111
  dark: ["bu-text-dark-label-40", "hover:bu-text-dark-label-40"]
112
112
  }
113
113
  }
114
- }), P = e("", {
114
+ }), T = e("", {
115
115
  variants: {
116
116
  theme: {
117
117
  light: [
@@ -132,7 +132,7 @@ const N = e("bu-text-light-second", {
132
132
  ]
133
133
  }
134
134
  }
135
- }), T = e("", {
135
+ }), q = e("", {
136
136
  variants: {
137
137
  theme: {
138
138
  light: [
@@ -153,7 +153,7 @@ const N = e("bu-text-light-second", {
153
153
  ]
154
154
  }
155
155
  }
156
- }), q = e("", {
156
+ }), z = e("", {
157
157
  variants: {
158
158
  theme: {
159
159
  light: [
@@ -219,28 +219,28 @@ const N = e("bu-text-light-second", {
219
219
  ]
220
220
  }
221
221
  }
222
- }), z = e("bu-text-white", {
222
+ }), A = e("bu-text-white", {
223
223
  variants: {
224
224
  theme: {
225
225
  light: ["bu-bg-light-green", "hover:bu-bg-light-hover-green"],
226
226
  dark: ["bu-bg-dark-green", "hover:bu-bg-dark-hover-green"]
227
227
  }
228
228
  }
229
- }), A = e("bu-text-white", {
229
+ }), G = e("bu-text-white", {
230
230
  variants: {
231
231
  theme: {
232
232
  light: ["bu-bg-light-label-20", "hover:bu-bg-light-label-20"],
233
233
  dark: ["bu-bg-dark-label-20", "hover:bu-bg-dark-label-20"]
234
234
  }
235
235
  }
236
- }), G = e("bu-text-white", {
236
+ }), J = e("bu-text-white", {
237
237
  variants: {
238
238
  theme: {
239
239
  light: ["bu-bg-light-red", "hover:bu-bg-light-hover-red"],
240
240
  dark: ["bu-bg-dark-red", "hover:bu-bg-dark-hover-red"]
241
241
  }
242
242
  }
243
- }), J = e("bu-text-white", {
243
+ }), K = e("bu-text-white", {
244
244
  variants: {
245
245
  theme: {
246
246
  light: ["bu-bg-light-label-20", "hover:bu-bg-light-label-20"],
@@ -262,66 +262,66 @@ const N = e("bu-text-light-second", {
262
262
  }
263
263
  }), f = {
264
264
  primary: {
265
- variant: N,
266
- disabled: $
267
- },
268
- secondary: {
269
265
  variant: B,
270
266
  disabled: V
271
267
  },
272
- tertiary: {
268
+ secondary: {
273
269
  variant: M,
274
270
  disabled: Z
275
271
  },
272
+ tertiary: {
273
+ variant: j,
274
+ disabled: H
275
+ },
276
276
  text: {
277
- variant: H,
278
- disabled: R
277
+ variant: F,
278
+ disabled: P
279
279
  },
280
280
  ghost: {
281
- variant: P,
281
+ variant: T,
282
282
  disabled: m
283
283
  },
284
284
  ghost2: {
285
- variant: T,
285
+ variant: q,
286
286
  disabled: m
287
287
  },
288
288
  ghost3: {
289
- variant: q,
289
+ variant: z,
290
290
  disabled: m
291
291
  },
292
292
  info: {
293
- variant: F,
293
+ variant: R,
294
294
  disabled: W
295
295
  },
296
296
  buy: {
297
- variant: z,
298
- disabled: A
297
+ variant: A,
298
+ disabled: G
299
299
  },
300
300
  sell: {
301
- variant: G,
302
- disabled: J
301
+ variant: J,
302
+ disabled: K
303
303
  },
304
304
  function: {
305
305
  variant: y,
306
306
  disabled: y
307
307
  //this not have disabled
308
308
  }
309
- }, K = (t) => {
310
- const { theme: l, variant: b, disabled: u, shape: i, checked: s } = t, a = u ? "" : f[b].variant({ theme: l, checked: s });
309
+ }, O = (t) => {
310
+ const { theme: a, variant: b, disabled: u, shape: i, checked: s } = t, r = u ? "" : f[b].variant({ theme: a, checked: s });
311
311
  return e("bu-box-border bu-inline-flex bu-items-center bu-justify-center bu-font-medium", {
312
312
  variants: {
313
313
  variant: {
314
- primary: a,
315
- secondary: a,
316
- tertiary: a,
317
- text: a,
318
- ghost: a,
319
- ghost2: a,
320
- ghost3: a,
321
- info: a,
322
- buy: a,
323
- sell: a,
324
- function: a
314
+ primary: r,
315
+ secondary: r,
316
+ tertiary: r,
317
+ text: r,
318
+ ghost: r,
319
+ ghost2: r,
320
+ ghost3: r,
321
+ info: r,
322
+ buy: r,
323
+ sell: r,
324
+ function: r
325
325
  },
326
326
  size: {
327
327
  small: `${i === "circle" ? "bu-h-[28px] bu-min-w-[30px]" : "bu-h-[28px] bu-min-w-[80px] bu-rounded-[var(--btn-rounded-small)]"} bu-px-[12px] bu-text-[12px] bu-leading-[18px]`,
@@ -335,11 +335,11 @@ const N = e("bu-text-light-second", {
335
335
  circle: "bu-rounded-[50%] bu-px-[0px] bu-py-[0px]"
336
336
  },
337
337
  disabled: {
338
- true: f[b].disabled({ theme: l })
338
+ true: f[b].disabled({ theme: a })
339
339
  }
340
340
  }
341
341
  })(t);
342
- }, O = e("bu-animate-spin", {
342
+ }, Q = e("bu-animate-spin", {
343
343
  variants: {
344
344
  size: {
345
345
  small: "bu-h-[14px] bu-w-[14px]",
@@ -360,7 +360,7 @@ const N = e("bu-text-light-second", {
360
360
  "animloader-small": "_animloader-small_amaox_1",
361
361
  "loader-m-small": "_loader-m-small_amaox_82",
362
362
  "animloader-m-small": "_animloader-m-small_amaox_1"
363
- }, Q = ({ size: t, theme: l }) => {
363
+ }, U = ({ size: t, theme: a }) => {
364
364
  const b = {
365
365
  small: d["loader-small"],
366
366
  medium: d["loader-medium"],
@@ -371,70 +371,70 @@ const N = e("bu-text-light-second", {
371
371
  light: d["loader-light"],
372
372
  dark: d["loader-dark"]
373
373
  };
374
- return /* @__PURE__ */ r.jsx("span", { className: `${b[t]} ${u[l]}` });
375
- }, U = (t) => /* @__PURE__ */ o.createElement("svg", { width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ o.createElement("path", { d: "M18.5374 19.5674C16.7844 21.0831 14.4993 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C15.9519 2 19.3684 4.29238 20.9922 7.61993L19.2011 8.51103C17.905 5.84083 15.1675 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C14.1502 20 16.1022 19.1517 17.5398 17.7716L18.5374 19.5674Z", fill: "#DEDFE0" })), X = (t) => /* @__PURE__ */ o.createElement("svg", { width: 12, height: 12, viewBox: "0 0 12 12", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ o.createElement("path", { d: "M12 6C12 2.68629 9.31371 0 6 0H0V6C0 9.31371 2.68629 12 6 12H12V6Z", fill: "currentColor" }), /* @__PURE__ */ o.createElement("path", { d: "M5.1663 7.32125L8.99647 3.49109L9.58571 4.08034L5.1663 8.49975L2.51465 5.84812L3.10391 5.25887L5.1663 7.32125Z", fill: "white" })), Y = (t) => /* @__PURE__ */ o.createElement("svg", { width: 12, height: 12, viewBox: "0 0 12 12", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ o.createElement("path", { d: "M12 6C12 2.68629 9.31371 0 6 0H0V6C0 9.31371 2.68629 12 6 12H12V6Z", fill: "currentColor" }), /* @__PURE__ */ o.createElement("path", { d: "M5.1663 7.32125L8.99647 3.49109L9.58571 4.08034L5.1663 8.49975L2.51465 5.84812L3.10391 5.25887L5.1663 7.32125Z", fill: "black" })), n = ({
374
+ return /* @__PURE__ */ l("span", { className: `${b[t]} ${u[a]}` });
375
+ }, X = (t) => /* @__PURE__ */ o.createElement("svg", { width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ o.createElement("path", { d: "M18.5374 19.5674C16.7844 21.0831 14.4993 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C15.9519 2 19.3684 4.29238 20.9922 7.61993L19.2011 8.51103C17.905 5.84083 15.1675 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C14.1502 20 16.1022 19.1517 17.5398 17.7716L18.5374 19.5674Z", fill: "#DEDFE0" })), Y = (t) => /* @__PURE__ */ o.createElement("svg", { width: 12, height: 12, viewBox: "0 0 12 12", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ o.createElement("path", { d: "M12 6C12 2.68629 9.31371 0 6 0H0V6C0 9.31371 2.68629 12 6 12H12V6Z", fill: "currentColor" }), /* @__PURE__ */ o.createElement("path", { d: "M5.1663 7.32125L8.99647 3.49109L9.58571 4.08034L5.1663 8.49975L2.51465 5.84812L3.10391 5.25887L5.1663 7.32125Z", fill: "white" })), I = (t) => /* @__PURE__ */ o.createElement("svg", { width: 12, height: 12, viewBox: "0 0 12 12", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ o.createElement("path", { d: "M12 6C12 2.68629 9.31371 0 6 0H0V6C0 9.31371 2.68629 12 6 12H12V6Z", fill: "currentColor" }), /* @__PURE__ */ o.createElement("path", { d: "M5.1663 7.32125L8.99647 3.49109L9.58571 4.08034L5.1663 8.49975L2.51465 5.84812L3.10391 5.25887L5.1663 7.32125Z", fill: "black" })), n = ({
376
376
  size: t = "large",
377
- disabled: l = !1,
377
+ disabled: a = !1,
378
378
  variant: b = "primary",
379
379
  children: u,
380
380
  startIcon: i,
381
381
  endIcon: s,
382
- icon: a,
382
+ icon: r,
383
383
  onClick: c,
384
- shape: w = "normal",
385
- className: _ = "",
384
+ shape: _ = "normal",
385
+ className: S = "",
386
386
  theme: v,
387
387
  loading: h,
388
- loadingType: S = "default",
389
- checked: C = !0,
390
- ...L
388
+ loadingType: C = "default",
389
+ checked: L = !0,
390
+ ...D
391
391
  }) => {
392
- const j = (E) => {
393
- h || c && c(E);
394
- }, { theme: p } = x(), D = {
395
- variant: h ? "tertiary" : b,
396
- size: t,
397
- theme: v || p,
398
- shape: w,
399
- disabled: h ? !0 : l,
400
- checked: C
401
- };
402
- return /* @__PURE__ */ r.jsx(
392
+ const N = ($) => {
393
+ h || c && c($);
394
+ }, { theme: p } = x();
395
+ return /* @__PURE__ */ l(
403
396
  "button",
404
397
  {
405
398
  type: "button",
406
- onClick: j,
407
- className: `${k(K(D))} ${_}`,
408
- disabled: l,
409
- ...L,
410
- children: h ? S === "refresh" ? /* @__PURE__ */ r.jsx(U, { className: k(O({ size: t })) }) : /* @__PURE__ */ r.jsx(Q, { size: t, theme: p }) : /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
411
- i && /* @__PURE__ */ r.jsx("span", { className: "bu-mr-[9px]", children: i }),
399
+ onClick: N,
400
+ className: `${k(O({
401
+ variant: h ? "tertiary" : b,
402
+ size: t,
403
+ theme: v || p,
404
+ shape: _,
405
+ disabled: h ? !0 : a,
406
+ checked: L
407
+ }))} ${S}`,
408
+ disabled: a,
409
+ ...D,
410
+ children: h ? C === "refresh" ? /* @__PURE__ */ l(X, { className: k(Q({ size: t })) }) : /* @__PURE__ */ l(U, { size: t, theme: p }) : /* @__PURE__ */ w(E, { children: [
411
+ i && /* @__PURE__ */ l("span", { className: "bu-mr-[9px]", children: i }),
412
412
  u,
413
- s && /* @__PURE__ */ r.jsx("span", { className: "bu-ml-[9px] bu-flex bu-items-center", children: s }),
414
- a
413
+ s && /* @__PURE__ */ l("span", { className: "bu-ml-[9px] bu-flex bu-items-center", children: s }),
414
+ r
415
415
  ] })
416
416
  }
417
417
  );
418
- }, I = (t) => {
419
- const { theme: l } = x(), { checked: b } = t;
420
- return /* @__PURE__ */ r.jsxs("div", { className: "bu-relative", children: [
421
- /* @__PURE__ */ r.jsx(n, { ...t, variant: "ghost3" }),
422
- /* @__PURE__ */ r.jsx(
418
+ }, ee = (t) => {
419
+ const { theme: a } = x(), { checked: b } = t;
420
+ return /* @__PURE__ */ w("div", { className: "bu-relative", children: [
421
+ /* @__PURE__ */ l(n, { ...t, variant: "ghost3" }),
422
+ /* @__PURE__ */ l(
423
423
  "div",
424
424
  {
425
425
  className: g(
426
426
  "bu-absolute bu-right-0 bu-top-0",
427
- l === "light" ? "bu-text-light-label" : "bu-text-dark-label",
427
+ a === "light" ? "bu-text-light-label" : "bu-text-dark-label",
428
428
  "bu-rounded-bl-[8px] bu-rounded-br-none bu-rounded-tl-none bu-rounded-tr-[8px]",
429
429
  "bu-flex bu-items-center bu-justify-center"
430
430
  ),
431
- children: l === "light" ? /* @__PURE__ */ r.jsx(
432
- X,
431
+ children: a === "light" ? /* @__PURE__ */ l(
432
+ Y,
433
433
  {
434
434
  className: g(b ? "" : "bu-text-light-line-secondary")
435
435
  }
436
- ) : /* @__PURE__ */ r.jsx(
437
- Y,
436
+ ) : /* @__PURE__ */ l(
437
+ I,
438
438
  {
439
439
  className: g(b ? "" : "bu-text-dark-line-secondary")
440
440
  }
@@ -442,19 +442,19 @@ const N = e("bu-text-light-second", {
442
442
  }
443
443
  )
444
444
  ] });
445
- }, ee = (t) => {
446
- const { theme: l } = x();
447
- return /* @__PURE__ */ r.jsx(
445
+ }, te = (t) => {
446
+ const { theme: a } = x();
447
+ return /* @__PURE__ */ l(
448
448
  n,
449
449
  {
450
450
  ...t,
451
451
  variant: "ghost",
452
- className: `bu-border-light-background bu-text-light-background ${l === "light" ? "hover:!bu-text-light-primary" : "hover:!bu-text-dark-primary"} bu-font-medium hover:!bu-bg-light-background`
452
+ className: `bu-border-light-background bu-text-light-background ${a === "light" ? "hover:!bu-text-light-primary" : "hover:!bu-text-dark-primary"} bu-font-medium hover:!bu-bg-light-background`
453
453
  }
454
454
  );
455
455
  };
456
- n.WhiteButton = ee;
457
- n.CheckButton = I;
456
+ n.WhiteButton = te;
457
+ n.CheckButton = ee;
458
458
  export {
459
459
  n as Button
460
460
  };