@blofin/blofin-ui 0.6.87

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 (238) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +97 -0
  3. package/dist/Badge.d.ts +1 -0
  4. package/dist/Badge.es.js +56 -0
  5. package/dist/Button.d.ts +1 -0
  6. package/dist/Button.es.js +377 -0
  7. package/dist/Dialog.d.ts +1 -0
  8. package/dist/Dialog.es.js +159 -0
  9. package/dist/Divider.d.ts +1 -0
  10. package/dist/Divider.es.js +25 -0
  11. package/dist/Drawer.d.ts +1 -0
  12. package/dist/Drawer.es.js +90 -0
  13. package/dist/Form.d.ts +1 -0
  14. package/dist/Form.es.js +752 -0
  15. package/dist/Slider.d.ts +1 -0
  16. package/dist/Slider.es.js +242 -0
  17. package/dist/blofin.css +1 -0
  18. package/dist/close-c67ec245.js +5 -0
  19. package/dist/components/Alert/Alert.d.ts +12 -0
  20. package/dist/components/Alert/index.d.ts +2 -0
  21. package/dist/components/Alert/styles.d.ts +7 -0
  22. package/dist/components/Badge/Badge.d.ts +21 -0
  23. package/dist/components/Badge/index.d.ts +2 -0
  24. package/dist/components/Badge/styles.d.ts +7 -0
  25. package/dist/components/Button/Button.d.ts +35 -0
  26. package/dist/components/Button/Loading/index.d.ts +8 -0
  27. package/dist/components/Button/index.d.ts +2 -0
  28. package/dist/components/Button/styles.d.ts +13 -0
  29. package/dist/components/Button/types.d.ts +5 -0
  30. package/dist/components/Calendar/Calendar.d.ts +12 -0
  31. package/dist/components/Calendar/index.d.ts +2 -0
  32. package/dist/components/Calendar/styles.d.ts +39 -0
  33. package/dist/components/Checkbox/Checkbox.d.ts +8 -0
  34. package/dist/components/Checkbox/index.d.ts +2 -0
  35. package/dist/components/Checkbox/styles.d.ts +22 -0
  36. package/dist/components/CssDropdown/CssDropdown.d.ts +18 -0
  37. package/dist/components/CssDropdown/styles.d.ts +7 -0
  38. package/dist/components/DatePickerRange/DatePickerRange.d.ts +32 -0
  39. package/dist/components/DatePickerRange/styles.d.ts +6 -0
  40. package/dist/components/DateTimePicker/Calendar.d.ts +10 -0
  41. package/dist/components/DateTimePicker/DateTimePicker.d.ts +18 -0
  42. package/dist/components/DateTimePicker/ScrollableList.d.ts +12 -0
  43. package/dist/components/DateTimePicker/hooks/useDateTimePicker.d.ts +35 -0
  44. package/dist/components/DateTimePicker/styles.d.ts +48 -0
  45. package/dist/components/Dialog/Dialog.d.ts +30 -0
  46. package/dist/components/Dialog/index.d.ts +2 -0
  47. package/dist/components/Dialog/styles.d.ts +13 -0
  48. package/dist/components/Divider/Divider.d.ts +8 -0
  49. package/dist/components/Divider/index.d.ts +2 -0
  50. package/dist/components/Divider/styles.d.ts +7 -0
  51. package/dist/components/Drawer/Drawer.d.ts +13 -0
  52. package/dist/components/Drawer/index.d.ts +2 -0
  53. package/dist/components/Drawer/styles.d.ts +6 -0
  54. package/dist/components/Dropdown/Dropdown.d.ts +14 -0
  55. package/dist/components/Dropdown/style.d.ts +9 -0
  56. package/dist/components/Empty/index.d.ts +5 -0
  57. package/dist/components/Form/Control.d.ts +13 -0
  58. package/dist/components/Form/Form.d.ts +3 -0
  59. package/dist/components/Form/FormItem.d.ts +4 -0
  60. package/dist/components/Form/FormLabel.d.ts +4 -0
  61. package/dist/components/Form/context.d.ts +5 -0
  62. package/dist/components/Form/index.d.ts +8 -0
  63. package/dist/components/Form/interface.d.ts +48 -0
  64. package/dist/components/Form/store.d.ts +16 -0
  65. package/dist/components/Form/styles/item.d.ts +5 -0
  66. package/dist/components/Form/useForm.d.ts +3 -0
  67. package/dist/components/LabelTextField/LabelTextField.d.ts +17 -0
  68. package/dist/components/LabelTextField/index.d.ts +2 -0
  69. package/dist/components/LabelTextField/styles.d.ts +34 -0
  70. package/dist/components/MonthPicker/index.d.ts +17 -0
  71. package/dist/components/Notification/Notification.d.ts +2 -0
  72. package/dist/components/Notification/style.d.ts +15 -0
  73. package/dist/components/Pagination/PageOptions.d.ts +12 -0
  74. package/dist/components/Pagination/Pagination.d.ts +34 -0
  75. package/dist/components/Pagination/styles.d.ts +6 -0
  76. package/dist/components/Picker/hooks/usePickerMethod.d.ts +9 -0
  77. package/dist/components/Picker/index.d.ts +10 -0
  78. package/dist/components/Picker/styles.d.ts +4 -0
  79. package/dist/components/Popover/Popover.d.ts +17 -0
  80. package/dist/components/Popup/index.d.ts +15 -0
  81. package/dist/components/Popup/styles.d.ts +3 -0
  82. package/dist/components/RadioButton/RadioButton.d.ts +10 -0
  83. package/dist/components/RadioButton/index.d.ts +2 -0
  84. package/dist/components/RadioButton/styles.d.ts +12 -0
  85. package/dist/components/Select/Select.d.ts +38 -0
  86. package/dist/components/Select/index.d.ts +2 -0
  87. package/dist/components/Select/styles.d.ts +24 -0
  88. package/dist/components/Slider/Slider.d.ts +20 -0
  89. package/dist/components/Slider/index.d.ts +2 -0
  90. package/dist/components/Slider/styles.d.ts +31 -0
  91. package/dist/components/Sort/SortButton.d.ts +14 -0
  92. package/dist/components/Sort/SortGroup.d.ts +8 -0
  93. package/dist/components/Sort/reducer.d.ts +36 -0
  94. package/dist/components/Sortable/SortItem.d.ts +6 -0
  95. package/dist/components/Sortable/index.d.ts +10 -0
  96. package/dist/components/Switch/Switch.d.ts +9 -0
  97. package/dist/components/Switch/styles.d.ts +12 -0
  98. package/dist/components/Tab/Tab.d.ts +21 -0
  99. package/dist/components/Tab/styles.d.ts +20 -0
  100. package/dist/components/Table/Pagination/index.d.ts +8 -0
  101. package/dist/components/Table/Table.d.ts +5 -0
  102. package/dist/components/Table/Tbody/index.d.ts +14 -0
  103. package/dist/components/Table/Thead/index.d.ts +17 -0
  104. package/dist/components/Table/context.d.ts +17 -0
  105. package/dist/components/Table/css.d.ts +12 -0
  106. package/dist/components/Table/hooks/useStickyClassName.d.ts +3 -0
  107. package/dist/components/Table/hooks/useStickyOffset.d.ts +15 -0
  108. package/dist/components/Table/index.d.ts +3 -0
  109. package/dist/components/Table/interface.d.ts +48 -0
  110. package/dist/components/TextField/TextField.d.ts +15 -0
  111. package/dist/components/TextField/index.d.ts +2 -0
  112. package/dist/components/TextSelect/TextSelect.d.ts +50 -0
  113. package/dist/components/TextSelect/styles.d.ts +27 -0
  114. package/dist/components/Textarea/index.d.ts +15 -0
  115. package/dist/components/Textarea/style.d.ts +13 -0
  116. package/dist/components/Toast/Toast.d.ts +2 -0
  117. package/dist/components/Toast/styles.d.ts +13 -0
  118. package/dist/components/Tooltip/Tooltip.d.ts +22 -0
  119. package/dist/components/Tooltip/enum.d.ts +21 -0
  120. package/dist/components/Tooltip/styles.d.ts +10 -0
  121. package/dist/components/Tooltip/type.d.ts +1 -0
  122. package/dist/components/Typography/Typography.d.ts +35 -0
  123. package/dist/components/Typography/styles.d.ts +10 -0
  124. package/dist/config/tailwind.js +9 -0
  125. package/dist/config/theme.js +318 -0
  126. package/dist/hooks/useAlign.d.ts +20 -0
  127. package/dist/hooks/useClient.d.ts +4 -0
  128. package/dist/hooks/useDelayEvent.d.ts +2 -0
  129. package/dist/hooks/useLatest.d.ts +1 -0
  130. package/dist/hooks/useNotification.d.ts +10 -0
  131. package/dist/hooks/useOutsideClick.d.ts +2 -0
  132. package/dist/hooks/useToast.d.ts +9 -0
  133. package/dist/index-0055aace.js +338 -0
  134. package/dist/index-0171eaca.js +436 -0
  135. package/dist/index-03ecf4ec.js +400 -0
  136. package/dist/index-04d10294.js +298 -0
  137. package/dist/index-0a1520d4.js +287 -0
  138. package/dist/index-0f855a91.js +14 -0
  139. package/dist/index-114820db.js +354 -0
  140. package/dist/index-1388dfff.js +336 -0
  141. package/dist/index-15b50a21.js +298 -0
  142. package/dist/index-17308ac1.js +298 -0
  143. package/dist/index-17afe366.js +298 -0
  144. package/dist/index-1d78221c.js +339 -0
  145. package/dist/index-1dc85776.js +437 -0
  146. package/dist/index-20e881af.js +354 -0
  147. package/dist/index-20f2adc4.js +398 -0
  148. package/dist/index-21539629.js +478 -0
  149. package/dist/index-21f85e78.js +377 -0
  150. package/dist/index-236e0579.js +71 -0
  151. package/dist/index-250f50e2.js +502 -0
  152. package/dist/index-356291b2.js +450 -0
  153. package/dist/index-38216e9e.js +340 -0
  154. package/dist/index-3c058c26.js +606 -0
  155. package/dist/index-3c3ba437.js +341 -0
  156. package/dist/index-3cd72a27.js +61 -0
  157. package/dist/index-3dcefa10.js +328 -0
  158. package/dist/index-3f70b1d4.js +331 -0
  159. package/dist/index-40ad0dd1.js +287 -0
  160. package/dist/index-42fb4fd5.js +334 -0
  161. package/dist/index-45696efa.js +438 -0
  162. package/dist/index-4b6824f2.js +61 -0
  163. package/dist/index-4b7924c1.js +354 -0
  164. package/dist/index-4c8ef561.js +337 -0
  165. package/dist/index-4ced47cd.js +359 -0
  166. package/dist/index-4eb29fd9.js +313 -0
  167. package/dist/index-4f2d4e0d.js +342 -0
  168. package/dist/index-51847d07.js +363 -0
  169. package/dist/index-51c1e00d.js +9 -0
  170. package/dist/index-51cf15b2.js +11054 -0
  171. package/dist/index-5357c173.js +336 -0
  172. package/dist/index-572ed179.js +353 -0
  173. package/dist/index-580c6bf2.js +362 -0
  174. package/dist/index-6817d9c1.js +363 -0
  175. package/dist/index-682656f7.js +62 -0
  176. package/dist/index-6834d6cf.js +330 -0
  177. package/dist/index-6a5829bd.js +387 -0
  178. package/dist/index-739cb389.js +332 -0
  179. package/dist/index-7601ed24.js +332 -0
  180. package/dist/index-76c2d21a.js +362 -0
  181. package/dist/index-7871c2fa.js +397 -0
  182. package/dist/index-7a871a23.js +362 -0
  183. package/dist/index-7aae1d07.js +298 -0
  184. package/dist/index-80121226.js +443 -0
  185. package/dist/index-872a50e8.js +353 -0
  186. package/dist/index-88fdaa89.js +437 -0
  187. package/dist/index-8a4c6daa.js +302 -0
  188. package/dist/index-8fb7d88b.js +360 -0
  189. package/dist/index-9412ffa1.js +346 -0
  190. package/dist/index-95d62350.js +427 -0
  191. package/dist/index-96a8d125.js +65 -0
  192. package/dist/index-9d0a665d.js +298 -0
  193. package/dist/index-a8c0dd3b.js +500 -0
  194. package/dist/index-aa90be0a.js +146 -0
  195. package/dist/index-aac5376e.js +331 -0
  196. package/dist/index-ac48594f.js +364 -0
  197. package/dist/index-acc7a626.js +146 -0
  198. package/dist/index-af6965cc.js +332 -0
  199. package/dist/index-b523f554.js +61 -0
  200. package/dist/index-b5aa671f.js +463 -0
  201. package/dist/index-b7612310.js +333 -0
  202. package/dist/index-babf632c.js +332 -0
  203. package/dist/index-baf0849c.js +346 -0
  204. package/dist/index-bb65c72e.js +514 -0
  205. package/dist/index-bb84ad8c.js +514 -0
  206. package/dist/index-c1e6e7ba.js +340 -0
  207. package/dist/index-cb4b8e2c.js +341 -0
  208. package/dist/index-d9848a76.js +545 -0
  209. package/dist/index-dc4bbb59.js +332 -0
  210. package/dist/index-dfc0fb0e.js +364 -0
  211. package/dist/index-e27e30cc.js +345 -0
  212. package/dist/index-e8380fcb.js +335 -0
  213. package/dist/index-ea4a8872.js +311 -0
  214. package/dist/index-eb696d64.js +436 -0
  215. package/dist/index-ebd469fd.js +297 -0
  216. package/dist/index-ed48cf75.js +383 -0
  217. package/dist/index-f3092738.js +308 -0
  218. package/dist/index-f41bdf2a.js +238 -0
  219. package/dist/index-f5c25d06.js +458 -0
  220. package/dist/index-f7e0a67b.js +511 -0
  221. package/dist/index-fafae16f.js +337 -0
  222. package/dist/index-ffe656da.js +332 -0
  223. package/dist/index.d.ts +43 -0
  224. package/dist/index.es.js +51 -0
  225. package/dist/isObjectLike-1b8bbac2.js +44 -0
  226. package/dist/jsx-runtime-944c88e2.js +631 -0
  227. package/dist/provider/NoticeProvider.d.ts +41 -0
  228. package/dist/provider/ThemeProvider.d.ts +7 -0
  229. package/dist/provider/useTheme.d.ts +4 -0
  230. package/dist/types/component.d.ts +16 -0
  231. package/dist/types/svg.d.ts +4 -0
  232. package/dist/utils/format.d.ts +7 -0
  233. package/dist/utils/helper.d.ts +7 -0
  234. package/dist/utils/locales.d.ts +1 -0
  235. package/dist/utils/utils.d.ts +2 -0
  236. package/dist/utils-7e50508b.js +2304 -0
  237. package/dist/vite.svg +1 -0
  238. package/package.json +117 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Blofin
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,97 @@
1
+ <p align="center">
2
+ <a href="https://blofin.com/" rel="noopener" target="_blank"><img width="150" src="/src/assets/logo.svg" alt="Blofin logo"></a>
3
+ </p>
4
+
5
+ <h1 align="center">Blofin UI</h1>
6
+
7
+ ![cover](./src/assets/cover.png)
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)
12
+
13
+ **UI library for crypto exchanges.**
14
+
15
+ Introducing our exquisite and sophisticated UI library tailored specifically for discerning crypto exchanges.
16
+
17
+ Immerse yourself in a world of luxury and elegance as our meticulously crafted design elements seamlessly integrate with the cutting-edge technology of the cryptocurrency industry.
18
+
19
+ Elevate your user experience to new heights with our high-end interface components, meticulously curated to ensure a seamless and visually stunning trading environment.
20
+
21
+ With our UI library, you can confidently offer your users a truly elevated and refined trading experience, solidifying your position as a premier destination for secure and stylish cryptocurrency transactions.
22
+
23
+ ## Installation
24
+
25
+ **NPM**
26
+
27
+ ```bash
28
+ npm install blofin-ui
29
+ ```
30
+
31
+ **Yarn**
32
+
33
+ ```bash
34
+ yarn add blofin-ui
35
+ ```
36
+
37
+ ## Usage
38
+
39
+ ```jsx
40
+ import "src/styles/globals.css";
41
+ import { BlofinUiProvider } from "blofin-ui";
42
+ import { Button } from "blofin-ui";
43
+
44
+ <BlofinUiProvider value={{ theme: "light" }}>
45
+ <Component {...pageProps}></Component>
46
+ </BlofinUiProvider>;
47
+ ```
48
+
49
+ ```css
50
+ /** global.css */
51
+ @import "blofin-ui/blofin.css";
52
+ @import "./tailwind.css";
53
+
54
+ /** tailwind.css */
55
+ @tailwind base;
56
+ @tailwind components;
57
+ @tailwind utilities;
58
+ ```
59
+
60
+ ## Components
61
+
62
+ - [x] Button
63
+ - [x] Checkbox
64
+ - [x] Input
65
+ - [x] Select
66
+ - [x] Textarea
67
+ - [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
+ - [x] Typography
82
+ - [x] Avatar
83
+ - [x] Icon
84
+ - [x] Menu
85
+
86
+ ## Stack we use
87
+
88
+ ![react](https://img.shields.io/badge/React-20232A?style=for-the-badge&logo=react&logoColor=61DAFB)
89
+ ![tailwindcss](https://img.shields.io/badge/Tailwind_CSS-38B2AC?style=for-the-badge&logo=tailwind-css&logoColor=white)
90
+
91
+ ![figma](https://img.shields.io/badge/Figma-F24E1E?style=for-the-badge&logo=figma&logoColor=white)
92
+ ![github](https://img.shields.io/badge/GitHub-100000?style=for-the-badge&logo=github&logoColor=white)
93
+
94
+ ## License
95
+
96
+ This project is licensed under the terms of the
97
+ [MIT license](/LICENSE).
@@ -0,0 +1 @@
1
+ export * from './components/Badge/index'
@@ -0,0 +1,56 @@
1
+ import { j as s } from "./jsx-runtime-944c88e2.js";
2
+ import { a as d, u as i } from "./index-96a8d125.js";
3
+ import { c as u } from "./utils-7e50508b.js";
4
+ import "react";
5
+ const c = (e) => {
6
+ const a = {
7
+ dark: {
8
+ primary: "bu-bg-dark-badge-primary-bg bu-text-dark-primary",
9
+ secondary: "bu-bg-dark-badge-secondary-bg bu-text-dark-secondary",
10
+ danger: "bu-bg-dark-badge-danger-bg bu-text-dark-danger",
11
+ success: "bu-bg-dark-badge-success-bg bu-text-dark-success",
12
+ warning: "bu-bg-dark-badge-warning-bg bu-text-dark-warning",
13
+ info: "bu-bg-dark-badge-info-bg bu-text-dark-label-60"
14
+ },
15
+ light: {
16
+ primary: "bu-bg-light-badge-primary-bg bu-text-light-primary",
17
+ secondary: "bu-bg-light-badge-secondary-bg bu-text-light-secondary",
18
+ danger: "bu-bg-light-badge-danger-bg bu-text-light-danger",
19
+ success: "bu-bg-light-badge-success-bg bu-text-light-success",
20
+ warning: "bu-bg-light-badge-warning-bg bu-text-light-warning",
21
+ info: "bu-bg-light-badge-info-bg bu-text-light-label-60"
22
+ }
23
+ }, { theme: r } = e;
24
+ return d("bu-rounded bu-px-[8px] bu-py-[2px] bu-text-[12px]", {
25
+ variants: {
26
+ color: {
27
+ primary: a[r].primary,
28
+ secondary: a[r].secondary,
29
+ danger: a[r].danger,
30
+ success: a[r].success,
31
+ warning: a[r].warning,
32
+ info: a[r].info
33
+ }
34
+ },
35
+ defaultVariants: {
36
+ color: "primary"
37
+ }
38
+ })(e);
39
+ }, p = ({
40
+ color: e = "primary",
41
+ decoration: a = !0,
42
+ label: r,
43
+ theme: g,
44
+ startIcon: b,
45
+ endIcon: t
46
+ }) => {
47
+ const { theme: n } = i();
48
+ return /* @__PURE__ */ s.jsxs("span", { className: `${u(c({ theme: g || n, color: e }))}`, children: [
49
+ b || (a ? "• " : null),
50
+ r,
51
+ t
52
+ ] });
53
+ };
54
+ export {
55
+ p as Badge
56
+ };
@@ -0,0 +1 @@
1
+ export * from './components/Button/index'
@@ -0,0 +1,377 @@
1
+ import { j as l } from "./jsx-runtime-944c88e2.js";
2
+ import { c as g } from "./utils-7e50508b.js";
3
+ import { a as e, u as v } from "./index-96a8d125.js";
4
+ import * as m from "react";
5
+ const D = e("bu-text-light-second", {
6
+ variants: {
7
+ theme: {
8
+ light: ["bu-bg-light-primary", "hover:bu-bg-light-hover-primary"],
9
+ dark: ["bu-bg-dark-primary", "hover:bu-bg-dark-hover-primary"]
10
+ }
11
+ }
12
+ }), N = e("", {
13
+ variants: {
14
+ theme: {
15
+ light: [
16
+ "bu-bg-light-fill-secondary",
17
+ "bu-text-light-label-40",
18
+ "hover:bu-bg-light-fill-secondary"
19
+ ],
20
+ dark: [
21
+ "bu-bg-dark-fill-secondary",
22
+ "bu-text-dark-label-40",
23
+ "hover:bu-bg-dark-fill-secondary"
24
+ ]
25
+ }
26
+ }
27
+ }), E = e("", {
28
+ variants: {
29
+ theme: {
30
+ light: [
31
+ "bu-bg-light-primary-14",
32
+ "hover:bu-bg-light-hover-primary-10",
33
+ "bu-text-light-primary"
34
+ ],
35
+ dark: ["bu-bg-dark-primary-14", "hover:bu-bg-dark-hover-primary-10", "bu-text-dark-primary"]
36
+ }
37
+ }
38
+ }), B = e("", {
39
+ variants: {
40
+ theme: {
41
+ light: [
42
+ "bu-bg-light-fill-secondary",
43
+ "bu-text-light-label-40",
44
+ "hover:bu-bg-light-fill-secondary"
45
+ ],
46
+ dark: [
47
+ "bu-bg-dark-fill-secondary",
48
+ "bu-text-dark-label-40",
49
+ "hover:bu-bg-dark-fill-secondary"
50
+ ]
51
+ }
52
+ }
53
+ }), L = e("", {
54
+ variants: {
55
+ theme: {
56
+ light: [
57
+ "bu-bg-light-fill-secondary",
58
+ "hover:bu-bg-light-hover-fill-secondary hover:bu-text-light-primary",
59
+ "bu-text-light-label"
60
+ ],
61
+ dark: [
62
+ "bu-bg-dark-fill-secondary",
63
+ "hover:bu-bg-dark-hover-fill-secondary hover:bu-text-dark-primary",
64
+ "bu-text-dark-label"
65
+ ]
66
+ }
67
+ }
68
+ }), R = e("", {
69
+ variants: {
70
+ theme: {
71
+ light: [
72
+ "bu-bg-light-fill-secondary",
73
+ "bu-text-light-label-40",
74
+ "hover:bu-bg-light-fill-secondary"
75
+ ],
76
+ dark: [
77
+ "bu-bg-dark-fill-secondary",
78
+ "bu-text-dark-label-40",
79
+ "hover:bu-bg-dark-fill-secondary"
80
+ ]
81
+ }
82
+ }
83
+ }), F = e("", {
84
+ variants: {
85
+ theme: {
86
+ light: ["bu-text-light-label", "hover:bu-text-light-primary"],
87
+ dark: ["bu-text-dark-label", "hover:bu-text-dark-primary"]
88
+ }
89
+ }
90
+ }), W = e("", {
91
+ variants: {
92
+ theme: {
93
+ light: ["bu-text-light-label-40", "hover:bu-text-light-label-40"],
94
+ dark: ["bu-text-dark-label-40", "hover:bu-text-dark-label-40"]
95
+ }
96
+ }
97
+ }), M = e("", {
98
+ variants: {
99
+ theme: {
100
+ light: ["bu-text-light-label-40", "hover:bu-text-light-primary"],
101
+ dark: ["bu-text-dark-label-40", "hover:bu-text-dark-primary"]
102
+ }
103
+ }
104
+ }), P = e("", {
105
+ variants: {
106
+ theme: {
107
+ light: ["bu-text-light-label-40", "hover:bu-text-light-label-40"],
108
+ dark: ["bu-text-dark-label-40", "hover:bu-text-dark-label-40"]
109
+ }
110
+ }
111
+ }), T = e("", {
112
+ variants: {
113
+ theme: {
114
+ light: [
115
+ "bu-text-light-second",
116
+ "hover:bu-text-light-second",
117
+ "bu-border",
118
+ "bu-border-solid",
119
+ "bu-border-light-primary",
120
+ "hover:bu-bg-light-primary-10"
121
+ ],
122
+ dark: [
123
+ "bu-text-dark-label",
124
+ "hover:bu-text-dark-label",
125
+ "bu-border",
126
+ "bu-border-solid",
127
+ "bu-border-dark-primary",
128
+ "hover:bu-bg-dark-primary-10"
129
+ ]
130
+ }
131
+ }
132
+ }), V = e("", {
133
+ variants: {
134
+ theme: {
135
+ light: [
136
+ "bu-text-light-second",
137
+ "hover:bu-text-light-second",
138
+ "bu-border",
139
+ "bu-border-solid",
140
+ "bu-border-light-line-secondary",
141
+ "hover:bu-bg-light-fill-primary"
142
+ ],
143
+ dark: [
144
+ "bu-text-dark-label",
145
+ "hover:bu-text-dark-label",
146
+ "bu-border",
147
+ "bu-border-solid",
148
+ "bu-border-dark-line-secondary",
149
+ "hover:bu-bg-dark-fill-primary"
150
+ ]
151
+ }
152
+ }
153
+ }), x = e("", {
154
+ variants: {
155
+ theme: {
156
+ light: [
157
+ "bu-text-light-label-40",
158
+ "hover:bu-text-light-label-40",
159
+ "bu-border",
160
+ "bu-border-solid",
161
+ "bu-border-light-fill-secondary",
162
+ "hover:bu-bg-transparent"
163
+ ],
164
+ dark: [
165
+ "bu-text-dark-label-40",
166
+ "hover:bu-text-dark-label-40",
167
+ "bu-border",
168
+ "bu-border-solid",
169
+ "bu-border-dark-fill-secondary",
170
+ "hover:bu-bg-transparent"
171
+ ]
172
+ }
173
+ }
174
+ }), Z = e("bu-text-white", {
175
+ variants: {
176
+ theme: {
177
+ light: ["bu-bg-light-green", "hover:bu-bg-light-hover-green"],
178
+ dark: ["bu-bg-dark-green", "hover:bu-bg-dark-hover-green"]
179
+ }
180
+ }
181
+ }), q = e("bu-text-white", {
182
+ variants: {
183
+ theme: {
184
+ light: ["bu-bg-light-label-20", "hover:bu-bg-light-label-20"],
185
+ dark: ["bu-bg-dark-label-20", "hover:bu-bg-dark-label-20"]
186
+ }
187
+ }
188
+ }), z = e("bu-text-white", {
189
+ variants: {
190
+ theme: {
191
+ light: ["bu-bg-light-red", "hover:bu-bg-light-hover-red"],
192
+ dark: ["bu-bg-dark-red", "hover:bu-bg-dark-hover-red"]
193
+ }
194
+ }
195
+ }), A = e("bu-text-white", {
196
+ variants: {
197
+ theme: {
198
+ light: ["bu-bg-light-label-20", "hover:bu-bg-light-label-20"],
199
+ dark: ["bu-bg-dark-label-20", "hover:bu-bg-dark-label-20"]
200
+ }
201
+ }
202
+ }), p = e("bu-border bu-border-solid bu-font-medium", {
203
+ variants: {
204
+ theme: {
205
+ light: [
206
+ "bu-border-light-text bu-bg-transparent bu-text-light-text",
207
+ "hover:bu-bg-light-text hover:bu-text-light-primary"
208
+ ],
209
+ dark: [
210
+ "bu-border-dark-text bu-bg-transparent bu-text-dark-text",
211
+ "hover:bu-bg-dark-text hover:bu-text-dark-primary"
212
+ ]
213
+ }
214
+ }
215
+ }), c = {
216
+ primary: {
217
+ variant: D,
218
+ disabled: N
219
+ },
220
+ secondary: {
221
+ variant: E,
222
+ disabled: B
223
+ },
224
+ tertiary: {
225
+ variant: L,
226
+ disabled: R
227
+ },
228
+ text: {
229
+ variant: F,
230
+ disabled: W
231
+ },
232
+ ghost: {
233
+ variant: T,
234
+ disabled: x
235
+ },
236
+ ghost2: {
237
+ variant: V,
238
+ disabled: x
239
+ },
240
+ info: {
241
+ variant: M,
242
+ disabled: P
243
+ },
244
+ buy: {
245
+ variant: Z,
246
+ disabled: q
247
+ },
248
+ sell: {
249
+ variant: z,
250
+ disabled: A
251
+ },
252
+ function: {
253
+ variant: p,
254
+ disabled: p
255
+ //this not have disabled
256
+ }
257
+ }, G = (t) => {
258
+ const { theme: a, variant: o, disabled: u, shape: b } = t, r = u ? "" : c[o].variant({ theme: a });
259
+ return e("bu-box-border bu-inline-flex bu-items-center bu-justify-center", {
260
+ variants: {
261
+ variant: {
262
+ primary: r,
263
+ secondary: r,
264
+ tertiary: r,
265
+ text: r,
266
+ ghost: r,
267
+ ghost2: r,
268
+ info: r,
269
+ buy: r,
270
+ sell: r,
271
+ function: r
272
+ },
273
+ size: {
274
+ small: `${b === "circle" ? "bu-h-[28px] bu-min-w-[30px]" : "bu-h-[28px] bu-min-w-[80px] bu-rounded-[6px]"} bu-px-[12px] bu-text-[12px] bu-leading-[18px]`,
275
+ "m-small": `${b === "circle" ? "bu-h-[32px] bu-min-w-[30px]" : "bu-h-[32px] bu-min-w-[80px] bu-rounded-[6px]"} bu-px-[12px] bu-text-[12px] bu-leading-[18px]`,
276
+ medium: `${b === "circle" ? "bu-h-[40px] bu-min-w-[40px]" : "bu-h-[40px] bu-min-w-[100px] bu-rounded-[8px]"} bu-px-[16px] bu-text-[14px] bu-leading-[20px]`,
277
+ large: `${b === "circle" ? "bu-h-[48px] bu-min-w-[48px]" : "bu-h-[48px] bu-min-w-[140px] bu-rounded-[8px]"} bu-px-[24px] bu-text-[16px] bu-leading-[24px]`,
278
+ max: `${b === "circle" ? "bu-h-[56px] bu-min-w-[56px]" : "bu-h-[56px] bu-min-w-[180px] bu-rounded-[8px]"} bu-px-[24px] bu-text-[18px] bu-leading-[26px]`
279
+ },
280
+ shape: {
281
+ normal: "",
282
+ circle: "bu-rounded-[50%] bu-px-[0px] bu-py-[0px]"
283
+ },
284
+ disabled: {
285
+ true: c[o].disabled({ theme: a })
286
+ }
287
+ }
288
+ })(t);
289
+ }, H = e("bu-animate-spin", {
290
+ variants: {
291
+ size: {
292
+ small: "bu-h-[14px] bu-w-[14px]",
293
+ "m-small": "bu-h-[16px] bu-w-[16px]",
294
+ medium: "bu-h-[20px] bu-w-[20px]",
295
+ large: "bu-h-[24px] bu-w-[24px]",
296
+ max: "bu-h-[28px] bu-w-[28px]"
297
+ }
298
+ }
299
+ }), i = {
300
+ "loader-medium": "_loader-medium_amaox_2",
301
+ "animloader-medium": "_animloader-medium_amaox_1",
302
+ "loader-light": "_loader-light_amaox_12",
303
+ "loader-dark": "_loader-dark_amaox_16",
304
+ "loader-large": "_loader-large_amaox_34",
305
+ "animloader-large": "_animloader-large_amaox_1",
306
+ "loader-small": "_loader-small_amaox_58",
307
+ "animloader-small": "_animloader-small_amaox_1",
308
+ "loader-m-small": "_loader-m-small_amaox_82",
309
+ "animloader-m-small": "_animloader-m-small_amaox_1"
310
+ }, J = ({ size: t, theme: a }) => {
311
+ const o = {
312
+ small: i["loader-small"],
313
+ medium: i["loader-medium"],
314
+ large: i["loader-large"],
315
+ max: i["loader-large"],
316
+ "m-small": i["loader-m-small"]
317
+ }, u = {
318
+ light: i["loader-light"],
319
+ dark: i["loader-dark"]
320
+ };
321
+ return /* @__PURE__ */ l.jsx("span", { className: `${o[t]} ${u[a]}` });
322
+ }, K = (t) => /* @__PURE__ */ m.createElement("svg", { width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ m.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 = ({
323
+ size: t = "large",
324
+ disabled: a = !1,
325
+ variant: o = "primary",
326
+ children: u,
327
+ startIcon: b,
328
+ endIcon: r,
329
+ icon: k,
330
+ onClick: s,
331
+ shape: f = "normal",
332
+ className: _ = "",
333
+ theme: h,
334
+ loading: d,
335
+ loadingType: w = "default",
336
+ ...S
337
+ }) => {
338
+ const j = (C) => {
339
+ d || s && s(C);
340
+ }, { theme: n } = v(), $ = {
341
+ variant: d ? "tertiary" : o,
342
+ size: t,
343
+ theme: h || n,
344
+ shape: f,
345
+ disabled: d ? !0 : a
346
+ };
347
+ return /* @__PURE__ */ l.jsx(
348
+ "button",
349
+ {
350
+ type: "button",
351
+ onClick: j,
352
+ className: `${g(G($))} ${_}`,
353
+ disabled: a,
354
+ ...S,
355
+ children: d ? w === "refresh" ? /* @__PURE__ */ l.jsx(K, { className: g(H({ size: t })) }) : /* @__PURE__ */ l.jsx(J, { size: t, theme: n }) : /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
356
+ b && /* @__PURE__ */ l.jsx("span", { className: "bu-mr-[9px]", children: b }),
357
+ u,
358
+ r && /* @__PURE__ */ l.jsx("span", { className: "bu-ml-[9px] bu-flex bu-items-center", children: r }),
359
+ k
360
+ ] })
361
+ }
362
+ );
363
+ }, O = (t) => {
364
+ const { theme: a } = v();
365
+ return /* @__PURE__ */ l.jsx(
366
+ y,
367
+ {
368
+ ...t,
369
+ variant: "ghost",
370
+ 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`
371
+ }
372
+ );
373
+ };
374
+ y.WhiteButton = O;
375
+ export {
376
+ y as Button
377
+ };
@@ -0,0 +1 @@
1
+ export * from './components/Dialog/index'