@blofin/blofin-ui 0.7.62 → 0.7.64

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 (114) hide show
  1. package/README.md +41 -24
  2. package/dist/Badge.es.js +3 -3
  3. package/dist/Button.es.js +32 -32
  4. package/dist/Dialog.es.js +4 -4
  5. package/dist/Divider.es.js +3 -3
  6. package/dist/Drawer.es.js +30 -30
  7. package/dist/{ProTable-63e2c020.js → ProTable-087213e3.js} +731 -732
  8. package/dist/ProTable.es.js +4 -4
  9. package/dist/Slider.es.js +147 -139
  10. package/dist/Sort.es.js +2 -2
  11. package/dist/blofin.css +1 -1
  12. package/dist/clsx.m-9bb14413.js +34 -0
  13. package/dist/components/DatePickerRange/styles.d.ts +3 -0
  14. package/dist/components/Table/css.d.ts +1 -1
  15. package/dist/components/Typography/Typography.d.ts +2 -0
  16. package/dist/config/tailwind.js +3 -2
  17. package/dist/{index-bb110e35.js → index-0185476e.js} +8 -8
  18. package/dist/{index-652fb2a1.js → index-04dd998a.js} +8 -8
  19. package/dist/{index-85f017e3.js → index-05a511e6.js} +7 -7
  20. package/dist/{index-0c947f08.js → index-076a2bd0.js} +7 -7
  21. package/dist/{index-78b9c8f9.js → index-11780b34.js} +7 -7
  22. package/dist/{index-fb976a33.js → index-15d5944d.js} +7 -7
  23. package/dist/{index-3bcdcfa4.js → index-1b421bc7.js} +7 -7
  24. package/dist/{index-e7a49961.js → index-1dae4674.js} +7 -7
  25. package/dist/{index-c0289cb3.js → index-1e6117eb.js} +7 -7
  26. package/dist/{index-d94818cf.js → index-1f844b36.js} +7 -7
  27. package/dist/{index-c624667a.js → index-24b3d1e8.js} +7 -7
  28. package/dist/{index-c4cd7ca7.js → index-27d3d2f9.js} +7 -7
  29. package/dist/{index-27fd2203.js → index-281bb155.js} +7 -7
  30. package/dist/{index-c287f58d.js → index-28f6dead.js} +7 -7
  31. package/dist/{index-26e9b5ae.js → index-2d075993.js} +7 -7
  32. package/dist/{index-f40ff393.js → index-2d620e59.js} +9 -9
  33. package/dist/{index-752cda87.js → index-31f01665.js} +8 -8
  34. package/dist/{index-53e23440.js → index-32ad256e.js} +7 -7
  35. package/dist/{index-49e62b6e.js → index-33c04f82.js} +7 -7
  36. package/dist/{index-1e98bfaa.js → index-346f1a04.js} +7 -7
  37. package/dist/{index-57c290c9.js → index-386564a7.js} +8 -8
  38. package/dist/{index-8e71bc24.js → index-3b683486.js} +7 -7
  39. package/dist/{index-06600576.js → index-3ff6fd12.js} +1 -1
  40. package/dist/{index-f99d7119.js → index-48b17908.js} +7 -7
  41. package/dist/{index-5b3a8482.js → index-4b8d7817.js} +7 -7
  42. package/dist/{index-40626e62.js → index-50c18668.js} +59 -59
  43. package/dist/{index-5f08442c.js → index-51d7c74e.js} +7 -7
  44. package/dist/{index-6c7e84e3.js → index-52df1b5b.js} +7 -7
  45. package/dist/{index-b2bb21a1.js → index-56045a70.js} +7 -7
  46. package/dist/{index-54346b30.js → index-5914c1e4.js} +8 -8
  47. package/dist/{index-c7562a9b.js → index-5dedd2a8.js} +7 -7
  48. package/dist/{index-200f0cb0.js → index-5f2a1df5.js} +2 -2
  49. package/dist/{index-4a2c3474.js → index-67a37bd4.js} +3204 -3119
  50. package/dist/{index-da92e7f1.js → index-69f2e24f.js} +7 -7
  51. package/dist/{index-261244be.js → index-6b6afdd5.js} +7 -7
  52. package/dist/{index-01fa9075.js → index-73eb9fc2.js} +8 -8
  53. package/dist/{index-c06461e4.js → index-751626f1.js} +7 -7
  54. package/dist/{index-05675e79.js → index-7936042b.js} +7 -7
  55. package/dist/{index-313c7581.js → index-796f5ebe.js} +7 -7
  56. package/dist/{index-a03e2363.js → index-7ab9a888.js} +7 -7
  57. package/dist/{index-4486b59f.js → index-7beb8652.js} +9 -9
  58. package/dist/{index-06addca7.js → index-805e10ed.js} +7 -7
  59. package/dist/{index-6d6d57fd.js → index-811e143f.js} +7 -7
  60. package/dist/{index-20c30fd3.js → index-845cd4cd.js} +8 -8
  61. package/dist/{index-39afbe30.js → index-867edc6c.js} +1 -1
  62. package/dist/{index-7272669e.js → index-86cecf62.js} +1 -1
  63. package/dist/{index-afe5111a.js → index-898df220.js} +7 -7
  64. package/dist/{index-0ae42181.js → index-8cec9230.js} +7 -7
  65. package/dist/{index-87967611.js → index-8d1bc638.js} +8 -8
  66. package/dist/{index-da49a1d5.js → index-8d5ebb2d.js} +7 -7
  67. package/dist/{index-4b8f975d.js → index-8d78263b.js} +7 -7
  68. package/dist/{index-b14d2f55.js → index-8e6b848e.js} +7 -7
  69. package/dist/{index-712da957.js → index-8f823ab0.js} +7 -7
  70. package/dist/{index-2e2af4c2.js → index-90c408a3.js} +1 -1
  71. package/dist/{index-24571e1a.js → index-99b5de99.js} +8 -8
  72. package/dist/{index-89f7e024.js → index-9b957a6a.js} +7 -7
  73. package/dist/{index-1d30e6a1.js → index-a010d612.js} +7 -7
  74. package/dist/{index-74ca867d.js → index-a1b5cb20.js} +7 -7
  75. package/dist/{index-74f0d19e.js → index-a6e908eb.js} +8 -8
  76. package/dist/{index-8a256357.js → index-aa2d43f5.js} +7 -7
  77. package/dist/{index-168e5f6a.js → index-ae89c19a.js} +7 -7
  78. package/dist/{index-38f5f308.js → index-b4fbdb55.js} +7 -7
  79. package/dist/{index-b2b7a241.js → index-b5753746.js} +7 -7
  80. package/dist/{index-6f7c6176.js → index-c0889722.js} +7 -7
  81. package/dist/{index-9d571166.js → index-c1e2f830.js} +7 -7
  82. package/dist/{index-cdc5581e.js → index-c3939d53.js} +7 -7
  83. package/dist/{index-39c2cf33.js → index-c3f79b2d.js} +7 -7
  84. package/dist/{index-d61cba2c.js → index-c79abc89.js} +7 -7
  85. package/dist/{index-af160501.js → index-c882ff9c.js} +7 -7
  86. package/dist/{index-bcfdca26.js → index-c8ad25f5.js} +7 -7
  87. package/dist/{index-b4118dd1.js → index-cb451c77.js} +7 -7
  88. package/dist/{index-11ed8e1e.js → index-ce7277e3.js} +7 -7
  89. package/dist/{index-8802254a.js → index-d0e9c6bf.js} +7 -7
  90. package/dist/{index-fb380321.js → index-d987eec6.js} +7 -7
  91. package/dist/{index-7e4350db.js → index-dab2f593.js} +7 -7
  92. package/dist/{index-8d59f49c.js → index-db0b0fbe.js} +7 -7
  93. package/dist/{index-a52ef6bc.js → index-dbbaf433.js} +8 -8
  94. package/dist/{index-ed523ae5.js → index-dc984ba2.js} +8 -8
  95. package/dist/{index-99a3bf9b.js → index-de712b0a.js} +7 -7
  96. package/dist/{index-e696b020.js → index-dfcb2e30.js} +8 -8
  97. package/dist/{index-40459169.js → index-e194c32d.js} +7 -7
  98. package/dist/{index-fb8c76ea.js → index-e2f3d006.js} +7 -7
  99. package/dist/{index-13e3dd69.js → index-e411bb62.js} +7 -7
  100. package/dist/{index-06942aa2.js → index-e5674351.js} +8 -8
  101. package/dist/{index-95c68eda.js → index-ea7f539d.js} +38 -38
  102. package/dist/{index-73b5523a.js → index-eb599cd7.js} +7 -7
  103. package/dist/{index-4e3398b2.js → index-eb5d51f9.js} +7 -7
  104. package/dist/{index-dba23822.js → index-f5cf1c31.js} +8 -8
  105. package/dist/{index-ec1494d7.js → index-f707afcc.js} +7 -7
  106. package/dist/{index-c5fd9877.js → index-fb57fd8c.js} +7 -7
  107. package/dist/{index-02d586cc.js → index-fb591428.js} +7 -7
  108. package/dist/index.d.ts +2 -2
  109. package/dist/index.es.js +7 -7
  110. package/dist/provider/ThemeProvider.d.ts +2 -0
  111. package/dist/provider/useTheme.d.ts +1 -0
  112. package/dist/{utils-cacf528c.js → utils-096a71c5.js} +1 -1
  113. package/package.json +7 -1
  114. package/dist/clsx.m-b14a941b.js +0 -32
package/README.md CHANGED
@@ -6,9 +6,9 @@
6
6
 
7
7
  ![cover](./src/assets/cover.png)
8
8
 
9
- ![NPM](https://img.shields.io/npm/l/blofin-ui)
10
- ![npm](https://img.shields.io/npm/v/blofin-ui)
11
- ![npm](https://img.shields.io/npm/dt/blofin-ui)
9
+ ![NPM](https://img.shields.io/npm/l/@blofin/blofin-ui)
10
+ ![npm](https://img.shields.io/npm/v/@blofin/blofin-ui)
11
+ ![npm](https://img.shields.io/npm/dt/@blofin/blofin-ui)
12
12
 
13
13
  **UI library for crypto exchanges.**
14
14
 
@@ -25,21 +25,21 @@ With our UI library, you can confidently offer your users a truly elevated and r
25
25
  **NPM**
26
26
 
27
27
  ```bash
28
- npm install blofin-ui
28
+ npm install @blofin/blofin-ui
29
29
  ```
30
30
 
31
31
  **Yarn**
32
32
 
33
33
  ```bash
34
- yarn add blofin-ui
34
+ yarn add @blofin/blofin-ui
35
35
  ```
36
36
 
37
37
  ## Usage
38
38
 
39
39
  ```jsx
40
40
  import "src/styles/globals.css";
41
- import { BlofinUiProvider } from "blofin-ui";
42
- import { Button } from "blofin-ui";
41
+ import { BlofinUiProvider } from "@blofin/blofin-ui";
42
+ import { Button } from "@blofin/blofin-ui";
43
43
 
44
44
  <BlofinUiProvider value={{ theme: "light" }}>
45
45
  <Component {...pageProps}></Component>
@@ -48,7 +48,7 @@ import { Button } from "blofin-ui";
48
48
 
49
49
  ```css
50
50
  /** global.css */
51
- @import "blofin-ui/blofin.css";
51
+ @import "@blofin/blofin-ui/blofin.css";
52
52
  @import "./tailwind.css";
53
53
 
54
54
  /** tailwind.css */
@@ -59,29 +59,46 @@ import { Button } from "blofin-ui";
59
59
 
60
60
  ## Components
61
61
 
62
+ - [x] Alert
63
+ - [x] Badge
62
64
  - [x] Button
65
+ - [x] Calendar
63
66
  - [x] Checkbox
67
+ - [x] CssDropdown
68
+ - [x] DatePickerRange
69
+ - [x] DateTimePicker
70
+ - [x] Dialog
71
+ - [x] Divider
72
+ - [x] Drawer
73
+ - [x] Dropdown
74
+ - [x] Empty
75
+ - [x] Form
76
+ - [x] Icon
64
77
  - [x] Input
78
+ - [x] LabelTextField
79
+ - [x] MonthPicker
80
+ - [x] MultiSelect
81
+ - [x] Notification
82
+ - [x] Pagination
83
+ - [x] Picker
84
+ - [x] Popover
85
+ - [x] Popup
86
+ - [x] ProTable
87
+ - [x] RadioButton
88
+ - [x] SVG
65
89
  - [x] Select
90
+ - [x] Slider
91
+ - [x] Sort
92
+ - [x] Sortable
93
+ - [x] Switch
94
+ - [x] Tab
95
+ - [x] Table
96
+ - [x] TextField
97
+ - [x] TextSelect
66
98
  - [x] Textarea
99
+ - [x] Toast
67
100
  - [x] Tooltip
68
- - [x] Modal
69
- - [x] Dropdown
70
- - [x] Tabs
71
- - [x] Table
72
- - [x] Pagination
73
- - [x] Loader
74
- - [x] Alert
75
- - [x] Badge
76
- - [x] Card
77
- - [x] Divider
78
- - [x] Silder
79
- - [x] List
80
- - [x] Tag
81
101
  - [x] Typography
82
- - [x] Avatar
83
- - [x] Icon
84
- - [x] Menu
85
102
 
86
103
  ## Stack we use
87
104
 
package/dist/Badge.es.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { j as s } from "./jsx-runtime-82a9ddf6.js";
2
- import { u as i } from "./clsx.m-b14a941b.js";
3
- import { c as d } from "./utils-cacf528c.js";
4
- import { c as u } from "./index-7272669e.js";
2
+ import { u as i } from "./clsx.m-9bb14413.js";
3
+ import { c as d } from "./utils-096a71c5.js";
4
+ import { c as u } from "./index-86cecf62.js";
5
5
  import "react";
6
6
  const c = (e) => {
7
7
  const r = {
package/dist/Button.es.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { j as t } from "./jsx-runtime-82a9ddf6.js";
2
- import { c as k } from "./utils-cacf528c.js";
3
- import { c as e } from "./index-7272669e.js";
4
- import { u as x, c as g } from "./clsx.m-b14a941b.js";
2
+ import { c as k } from "./utils-096a71c5.js";
3
+ import { c as e } from "./index-86cecf62.js";
4
+ import { u as x, c as g } from "./clsx.m-9bb14413.js";
5
5
  import * as d from "react";
6
6
  const N = e("bu-text-light-second", {
7
7
  variants: {
@@ -305,21 +305,21 @@ const N = e("bu-text-light-second", {
305
305
  //this not have disabled
306
306
  }
307
307
  }, K = (r) => {
308
- const { theme: l, variant: b, disabled: o, shape: i, checked: s } = r, a = o ? "" : f[b].variant({ theme: l, checked: s });
308
+ const { theme: a, variant: b, disabled: o, shape: i, checked: s } = r, l = o ? "" : f[b].variant({ theme: a, checked: s });
309
309
  return e("bu-box-border bu-inline-flex bu-items-center bu-justify-center bu-font-medium", {
310
310
  variants: {
311
311
  variant: {
312
- primary: a,
313
- secondary: a,
314
- tertiary: a,
315
- text: a,
316
- ghost: a,
317
- ghost2: a,
318
- ghost3: a,
319
- info: a,
320
- buy: a,
321
- sell: a,
322
- function: a
312
+ primary: l,
313
+ secondary: l,
314
+ tertiary: l,
315
+ text: l,
316
+ ghost: l,
317
+ ghost2: l,
318
+ ghost3: l,
319
+ info: l,
320
+ buy: l,
321
+ sell: l,
322
+ function: l
323
323
  },
324
324
  size: {
325
325
  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]`,
@@ -333,7 +333,7 @@ const N = e("bu-text-light-second", {
333
333
  circle: "bu-rounded-[50%] bu-px-[0px] bu-py-[0px]"
334
334
  },
335
335
  disabled: {
336
- true: f[b].disabled({ theme: l })
336
+ true: f[b].disabled({ theme: a })
337
337
  }
338
338
  }
339
339
  })(r);
@@ -358,7 +358,7 @@ const N = e("bu-text-light-second", {
358
358
  "animloader-small": "_animloader-small_16dgj_1",
359
359
  "loader-m-small": "_loader-m-small_16dgj_82",
360
360
  "animloader-m-small": "_animloader-m-small_16dgj_1"
361
- }, Q = ({ size: r, theme: l }) => {
361
+ }, Q = ({ size: r, theme: a }) => {
362
362
  const b = {
363
363
  small: u["loader-small"],
364
364
  medium: u["loader-medium"],
@@ -369,15 +369,15 @@ const N = e("bu-text-light-second", {
369
369
  light: u["loader-light"],
370
370
  dark: u["loader-dark"]
371
371
  };
372
- return /* @__PURE__ */ t.jsx("span", { className: `${b[r]} ${o[l]}` });
372
+ return /* @__PURE__ */ t.jsx("span", { className: `${b[r]} ${o[a]}` });
373
373
  }, U = (r) => /* @__PURE__ */ d.createElement("svg", { width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...r }, /* @__PURE__ */ d.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 = (r) => /* @__PURE__ */ d.createElement("svg", { width: 12, height: 12, viewBox: "0 0 12 12", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", ...r }, /* @__PURE__ */ d.createElement("path", { d: "M12 6C12 2.68629 9.31371 0 6 0H0V6C0 9.31371 2.68629 12 6 12H12V6Z", fill: "currentColor" }), /* @__PURE__ */ d.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 = (r) => /* @__PURE__ */ d.createElement("svg", { width: 12, height: 12, viewBox: "0 0 12 12", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", ...r }, /* @__PURE__ */ d.createElement("path", { d: "M12 6C12 2.68629 9.31371 0 6 0H0V6C0 9.31371 2.68629 12 6 12H12V6Z", fill: "currentColor" }), /* @__PURE__ */ d.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
374
  size: r = "large",
375
- disabled: l = !1,
375
+ disabled: a = !1,
376
376
  variant: b = "primary",
377
377
  children: o,
378
378
  startIcon: i,
379
379
  endIcon: s,
380
- icon: a,
380
+ icon: l,
381
381
  onClick: c,
382
382
  shape: w = "normal",
383
383
  className: _ = "",
@@ -394,7 +394,7 @@ const N = e("bu-text-light-second", {
394
394
  size: r,
395
395
  theme: p || D,
396
396
  shape: w,
397
- disabled: h ? !0 : l,
397
+ disabled: h ? !0 : a,
398
398
  checked: S
399
399
  };
400
400
  return /* @__PURE__ */ t.jsx(
@@ -403,30 +403,30 @@ const N = e("bu-text-light-second", {
403
403
  type: "button",
404
404
  onClick: L,
405
405
  className: `${k(K(v))} ${_}`,
406
- disabled: l,
406
+ disabled: a,
407
407
  ...C,
408
408
  children: h ? j === "refresh" ? /* @__PURE__ */ t.jsx(U, { className: k(O({ size: r })) }) : /* @__PURE__ */ t.jsx(Q, { size: r, theme: v.theme }) : /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
409
- i && /* @__PURE__ */ t.jsx("span", { className: "bu-mr-[9px]", children: i }),
409
+ i && /* @__PURE__ */ t.jsx("span", { className: "ltr:bu-mr-[9px] rtl:bu-ml-[9px]", children: i }),
410
410
  o,
411
- s && /* @__PURE__ */ t.jsx("span", { className: "bu-ml-[9px] bu-flex bu-items-center", children: s }),
412
- a
411
+ s && /* @__PURE__ */ t.jsx("span", { className: "ltr:bu-ml-[9px] rtl:bu-mr-[9px] bu-flex bu-items-center", children: s }),
412
+ l
413
413
  ] })
414
414
  }
415
415
  );
416
416
  }, I = (r) => {
417
- const { theme: l } = x(), { checked: b } = r;
417
+ const { theme: a } = x(), { checked: b } = r;
418
418
  return /* @__PURE__ */ t.jsxs("div", { className: "bu-relative", children: [
419
419
  /* @__PURE__ */ t.jsx(n, { ...r, variant: "ghost3" }),
420
420
  /* @__PURE__ */ t.jsx(
421
421
  "div",
422
422
  {
423
423
  className: g(
424
- "bu-absolute bu-right-0 bu-top-0",
425
- l === "light" ? "bu-text-light-label" : "bu-text-dark-label",
426
- "bu-rounded-bl-[8px] bu-rounded-br-none bu-rounded-tl-none bu-rounded-tr-[8px]",
424
+ "bu-absolute bu-top-0 ltr:bu-right-0 rtl:bu-left-0",
425
+ a === "light" ? "bu-text-light-label" : "bu-text-dark-label",
426
+ "ltr:bu-rounded-tr-[8px] ltr:bu-rounded-bl-[8px] ltr:bu-rounded-tl-none ltr:bu-rounded-br-none rtl:bu-rounded-tl-[8px] rtl:bu-rounded-br-[8px] rtl:bu-rounded-tr-none rtl:bu-rounded-bl-none",
427
427
  "bu-flex bu-items-center bu-justify-center"
428
428
  ),
429
- children: l === "light" ? /* @__PURE__ */ t.jsx(
429
+ children: a === "light" ? /* @__PURE__ */ t.jsx(
430
430
  X,
431
431
  {
432
432
  className: g(b ? "" : "bu-text-light-line-secondary")
@@ -441,13 +441,13 @@ const N = e("bu-text-light-second", {
441
441
  )
442
442
  ] });
443
443
  }, ee = (r) => {
444
- const { theme: l } = x();
444
+ const { theme: a } = x();
445
445
  return /* @__PURE__ */ t.jsx(
446
446
  n,
447
447
  {
448
448
  ...r,
449
449
  variant: "ghost",
450
- 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`
450
+ 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`
451
451
  }
452
452
  );
453
453
  };
package/dist/Dialog.es.js CHANGED
@@ -1,12 +1,12 @@
1
- import { D as g } from "./index-40626e62.js";
1
+ import { D as g } from "./index-50c18668.js";
2
2
  import "./jsx-runtime-82a9ddf6.js";
3
3
  import "react";
4
4
  import "react-dom";
5
5
  import "./close-c67ec245.js";
6
6
  import "./Button.es.js";
7
- import "./utils-cacf528c.js";
8
- import "./clsx.m-b14a941b.js";
9
- import "./index-7272669e.js";
7
+ import "./utils-096a71c5.js";
8
+ import "./clsx.m-9bb14413.js";
9
+ import "./index-86cecf62.js";
10
10
  export {
11
11
  g as Dialog
12
12
  };
@@ -1,7 +1,7 @@
1
1
  import { j as t } from "./jsx-runtime-82a9ddf6.js";
2
- import { u as s } from "./clsx.m-b14a941b.js";
3
- import { c as i } from "./utils-cacf528c.js";
4
- import { c as a } from "./index-7272669e.js";
2
+ import { u as s } from "./clsx.m-9bb14413.js";
3
+ import { c as i } from "./utils-096a71c5.js";
4
+ import { c as a } from "./index-86cecf62.js";
5
5
  import "react";
6
6
  const b = a("", {
7
7
  variants: {
package/dist/Drawer.es.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { j as e } from "./jsx-runtime-82a9ddf6.js";
2
2
  import w from "react-dom";
3
3
  import { S as x } from "./close-c67ec245.js";
4
- import { u as g } from "./clsx.m-b14a941b.js";
5
- import { c as l } from "./index-7272669e.js";
4
+ import { u as g } from "./clsx.m-9bb14413.js";
5
+ import { c as i } from "./index-86cecf62.js";
6
6
  import "react";
7
- const k = "_drawerOverlay_1e2c8_2", v = "_drawerContent_1e2c8_14", y = "_left_1e2c8_19", C = "_right_1e2c8_23", j = "_drawerHeader_1e2c8_27", N = "_title_1e2c8_42", O = "_mock_1e2c8_47", $ = "_content_1e2c8_51", t = {
7
+ const k = "_drawerOverlay_1e2c8_2", v = "_drawerContent_1e2c8_14", y = "_left_1e2c8_19", C = "_right_1e2c8_23", j = "_drawerHeader_1e2c8_27", N = "_title_1e2c8_42", $ = "_mock_1e2c8_47", O = "_content_1e2c8_51", t = {
8
8
  drawerOverlay: k,
9
9
  drawerContent: v,
10
10
  left: y,
@@ -12,9 +12,9 @@ const k = "_drawerOverlay_1e2c8_2", v = "_drawerContent_1e2c8_14", y = "_left_1e
12
12
  drawerHeader: j,
13
13
  "drawer-close-button": "_drawer-close-button_1e2c8_34",
14
14
  title: N,
15
- mock: O,
16
- content: $
17
- }, H = l(
15
+ mock: $,
16
+ content: O
17
+ }, T = i(
18
18
  "bu-absolute bu-flex bu-flex-col bu-pb-[32px] bu-pt-[24px]",
19
19
  {
20
20
  variants: {
@@ -24,7 +24,7 @@ const k = "_drawerOverlay_1e2c8_2", v = "_drawerContent_1e2c8_14", y = "_left_1e
24
24
  }
25
25
  }
26
26
  }
27
- ), S = l(
27
+ ), H = i(
28
28
  "bu-absolute bu-right-[20px] bu-h-[24px] bu-w-[24px] bu-cursor-pointer",
29
29
  {
30
30
  variants: {
@@ -34,26 +34,26 @@ const k = "_drawerOverlay_1e2c8_2", v = "_drawerContent_1e2c8_14", y = "_left_1e
34
34
  }
35
35
  }
36
36
  }
37
- ), I = (i) => {
37
+ ), M = (d) => {
38
38
  const {
39
- title: d,
40
- content: m,
41
- cancel: o,
42
- theme: n,
43
- hideIcon: u = !1,
39
+ title: m,
40
+ content: u,
41
+ cancel: n,
42
+ theme: o,
43
+ hideIcon: h = !1,
44
44
  open: r,
45
- placement: _ = "right",
46
- drawerContentClass: h = "bu-w-[300px]"
47
- } = i, { theme: b } = g(), s = () => n || b;
45
+ placement: s = "right",
46
+ drawerContentClass: _ = "bu-w-[300px]"
47
+ } = d, { theme: b } = g(), c = () => o || b;
48
48
  if (!r)
49
49
  return null;
50
- const c = () => {
51
- o && o();
50
+ const l = () => {
51
+ n && n();
52
52
  }, p = (a) => {
53
- a.target === a.currentTarget && (a.stopPropagation(), c());
53
+ a.target === a.currentTarget && (a.stopPropagation(), l());
54
54
  }, f = {
55
55
  transition: r ? "transform .3s ease-in-out" : "transform .3s ease-in-out, opacity 0.3s ease",
56
- transform: r ? "translateX(0)" : "translateX(100%)",
56
+ transform: r ? "translateX(0)" : `translateX(${s === "left" ? "-100%" : "100%"})`,
57
57
  opacity: r ? 1 : 0
58
58
  };
59
59
  return r ? w.createPortal(
@@ -61,25 +61,25 @@ const k = "_drawerOverlay_1e2c8_2", v = "_drawerContent_1e2c8_14", y = "_left_1e
61
61
  "div",
62
62
  {
63
63
  className: `${t.drawerContent}
64
- ${H({
65
- theme: s()
64
+ ${T({
65
+ theme: c()
66
66
  })}
67
- ${t[_]} ${h}`,
67
+ ${t[s]} ${_}`,
68
68
  style: f,
69
69
  children: [
70
70
  /* @__PURE__ */ e.jsxs("div", { className: t.drawerHeader, children: [
71
- /* @__PURE__ */ e.jsx("div", { className: t.title, children: d }),
72
- !u && /* @__PURE__ */ e.jsx(
71
+ /* @__PURE__ */ e.jsx("div", { className: t.title, children: m }),
72
+ !h && /* @__PURE__ */ e.jsx(
73
73
  x,
74
74
  {
75
- className: `${S({
76
- theme: s()
75
+ className: `${H({
76
+ theme: c()
77
77
  })}`,
78
- onClick: c
78
+ onClick: l
79
79
  }
80
80
  )
81
81
  ] }),
82
- /* @__PURE__ */ e.jsx("div", { className: t.content, children: m })
82
+ /* @__PURE__ */ e.jsx("div", { className: t.content, children: u })
83
83
  ]
84
84
  }
85
85
  ) }),
@@ -87,5 +87,5 @@ const k = "_drawerOverlay_1e2c8_2", v = "_drawerContent_1e2c8_14", y = "_left_1e
87
87
  ) : null;
88
88
  };
89
89
  export {
90
- I as Drawer
90
+ M as Drawer
91
91
  };