@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.
- package/LICENSE +21 -0
- package/README.md +97 -0
- package/dist/Badge.d.ts +1 -0
- package/dist/Badge.es.js +56 -0
- package/dist/Button.d.ts +1 -0
- package/dist/Button.es.js +377 -0
- package/dist/Dialog.d.ts +1 -0
- package/dist/Dialog.es.js +159 -0
- package/dist/Divider.d.ts +1 -0
- package/dist/Divider.es.js +25 -0
- package/dist/Drawer.d.ts +1 -0
- package/dist/Drawer.es.js +90 -0
- package/dist/Form.d.ts +1 -0
- package/dist/Form.es.js +752 -0
- package/dist/Slider.d.ts +1 -0
- package/dist/Slider.es.js +242 -0
- package/dist/blofin.css +1 -0
- package/dist/close-c67ec245.js +5 -0
- package/dist/components/Alert/Alert.d.ts +12 -0
- package/dist/components/Alert/index.d.ts +2 -0
- package/dist/components/Alert/styles.d.ts +7 -0
- package/dist/components/Badge/Badge.d.ts +21 -0
- package/dist/components/Badge/index.d.ts +2 -0
- package/dist/components/Badge/styles.d.ts +7 -0
- package/dist/components/Button/Button.d.ts +35 -0
- package/dist/components/Button/Loading/index.d.ts +8 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/Button/styles.d.ts +13 -0
- package/dist/components/Button/types.d.ts +5 -0
- package/dist/components/Calendar/Calendar.d.ts +12 -0
- package/dist/components/Calendar/index.d.ts +2 -0
- package/dist/components/Calendar/styles.d.ts +39 -0
- package/dist/components/Checkbox/Checkbox.d.ts +8 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/Checkbox/styles.d.ts +22 -0
- package/dist/components/CssDropdown/CssDropdown.d.ts +18 -0
- package/dist/components/CssDropdown/styles.d.ts +7 -0
- package/dist/components/DatePickerRange/DatePickerRange.d.ts +32 -0
- package/dist/components/DatePickerRange/styles.d.ts +6 -0
- package/dist/components/DateTimePicker/Calendar.d.ts +10 -0
- package/dist/components/DateTimePicker/DateTimePicker.d.ts +18 -0
- package/dist/components/DateTimePicker/ScrollableList.d.ts +12 -0
- package/dist/components/DateTimePicker/hooks/useDateTimePicker.d.ts +35 -0
- package/dist/components/DateTimePicker/styles.d.ts +48 -0
- package/dist/components/Dialog/Dialog.d.ts +30 -0
- package/dist/components/Dialog/index.d.ts +2 -0
- package/dist/components/Dialog/styles.d.ts +13 -0
- package/dist/components/Divider/Divider.d.ts +8 -0
- package/dist/components/Divider/index.d.ts +2 -0
- package/dist/components/Divider/styles.d.ts +7 -0
- package/dist/components/Drawer/Drawer.d.ts +13 -0
- package/dist/components/Drawer/index.d.ts +2 -0
- package/dist/components/Drawer/styles.d.ts +6 -0
- package/dist/components/Dropdown/Dropdown.d.ts +14 -0
- package/dist/components/Dropdown/style.d.ts +9 -0
- package/dist/components/Empty/index.d.ts +5 -0
- package/dist/components/Form/Control.d.ts +13 -0
- package/dist/components/Form/Form.d.ts +3 -0
- package/dist/components/Form/FormItem.d.ts +4 -0
- package/dist/components/Form/FormLabel.d.ts +4 -0
- package/dist/components/Form/context.d.ts +5 -0
- package/dist/components/Form/index.d.ts +8 -0
- package/dist/components/Form/interface.d.ts +48 -0
- package/dist/components/Form/store.d.ts +16 -0
- package/dist/components/Form/styles/item.d.ts +5 -0
- package/dist/components/Form/useForm.d.ts +3 -0
- package/dist/components/LabelTextField/LabelTextField.d.ts +17 -0
- package/dist/components/LabelTextField/index.d.ts +2 -0
- package/dist/components/LabelTextField/styles.d.ts +34 -0
- package/dist/components/MonthPicker/index.d.ts +17 -0
- package/dist/components/Notification/Notification.d.ts +2 -0
- package/dist/components/Notification/style.d.ts +15 -0
- package/dist/components/Pagination/PageOptions.d.ts +12 -0
- package/dist/components/Pagination/Pagination.d.ts +34 -0
- package/dist/components/Pagination/styles.d.ts +6 -0
- package/dist/components/Picker/hooks/usePickerMethod.d.ts +9 -0
- package/dist/components/Picker/index.d.ts +10 -0
- package/dist/components/Picker/styles.d.ts +4 -0
- package/dist/components/Popover/Popover.d.ts +17 -0
- package/dist/components/Popup/index.d.ts +15 -0
- package/dist/components/Popup/styles.d.ts +3 -0
- package/dist/components/RadioButton/RadioButton.d.ts +10 -0
- package/dist/components/RadioButton/index.d.ts +2 -0
- package/dist/components/RadioButton/styles.d.ts +12 -0
- package/dist/components/Select/Select.d.ts +38 -0
- package/dist/components/Select/index.d.ts +2 -0
- package/dist/components/Select/styles.d.ts +24 -0
- package/dist/components/Slider/Slider.d.ts +20 -0
- package/dist/components/Slider/index.d.ts +2 -0
- package/dist/components/Slider/styles.d.ts +31 -0
- package/dist/components/Sort/SortButton.d.ts +14 -0
- package/dist/components/Sort/SortGroup.d.ts +8 -0
- package/dist/components/Sort/reducer.d.ts +36 -0
- package/dist/components/Sortable/SortItem.d.ts +6 -0
- package/dist/components/Sortable/index.d.ts +10 -0
- package/dist/components/Switch/Switch.d.ts +9 -0
- package/dist/components/Switch/styles.d.ts +12 -0
- package/dist/components/Tab/Tab.d.ts +21 -0
- package/dist/components/Tab/styles.d.ts +20 -0
- package/dist/components/Table/Pagination/index.d.ts +8 -0
- package/dist/components/Table/Table.d.ts +5 -0
- package/dist/components/Table/Tbody/index.d.ts +14 -0
- package/dist/components/Table/Thead/index.d.ts +17 -0
- package/dist/components/Table/context.d.ts +17 -0
- package/dist/components/Table/css.d.ts +12 -0
- package/dist/components/Table/hooks/useStickyClassName.d.ts +3 -0
- package/dist/components/Table/hooks/useStickyOffset.d.ts +15 -0
- package/dist/components/Table/index.d.ts +3 -0
- package/dist/components/Table/interface.d.ts +48 -0
- package/dist/components/TextField/TextField.d.ts +15 -0
- package/dist/components/TextField/index.d.ts +2 -0
- package/dist/components/TextSelect/TextSelect.d.ts +50 -0
- package/dist/components/TextSelect/styles.d.ts +27 -0
- package/dist/components/Textarea/index.d.ts +15 -0
- package/dist/components/Textarea/style.d.ts +13 -0
- package/dist/components/Toast/Toast.d.ts +2 -0
- package/dist/components/Toast/styles.d.ts +13 -0
- package/dist/components/Tooltip/Tooltip.d.ts +22 -0
- package/dist/components/Tooltip/enum.d.ts +21 -0
- package/dist/components/Tooltip/styles.d.ts +10 -0
- package/dist/components/Tooltip/type.d.ts +1 -0
- package/dist/components/Typography/Typography.d.ts +35 -0
- package/dist/components/Typography/styles.d.ts +10 -0
- package/dist/config/tailwind.js +9 -0
- package/dist/config/theme.js +318 -0
- package/dist/hooks/useAlign.d.ts +20 -0
- package/dist/hooks/useClient.d.ts +4 -0
- package/dist/hooks/useDelayEvent.d.ts +2 -0
- package/dist/hooks/useLatest.d.ts +1 -0
- package/dist/hooks/useNotification.d.ts +10 -0
- package/dist/hooks/useOutsideClick.d.ts +2 -0
- package/dist/hooks/useToast.d.ts +9 -0
- package/dist/index-0055aace.js +338 -0
- package/dist/index-0171eaca.js +436 -0
- package/dist/index-03ecf4ec.js +400 -0
- package/dist/index-04d10294.js +298 -0
- package/dist/index-0a1520d4.js +287 -0
- package/dist/index-0f855a91.js +14 -0
- package/dist/index-114820db.js +354 -0
- package/dist/index-1388dfff.js +336 -0
- package/dist/index-15b50a21.js +298 -0
- package/dist/index-17308ac1.js +298 -0
- package/dist/index-17afe366.js +298 -0
- package/dist/index-1d78221c.js +339 -0
- package/dist/index-1dc85776.js +437 -0
- package/dist/index-20e881af.js +354 -0
- package/dist/index-20f2adc4.js +398 -0
- package/dist/index-21539629.js +478 -0
- package/dist/index-21f85e78.js +377 -0
- package/dist/index-236e0579.js +71 -0
- package/dist/index-250f50e2.js +502 -0
- package/dist/index-356291b2.js +450 -0
- package/dist/index-38216e9e.js +340 -0
- package/dist/index-3c058c26.js +606 -0
- package/dist/index-3c3ba437.js +341 -0
- package/dist/index-3cd72a27.js +61 -0
- package/dist/index-3dcefa10.js +328 -0
- package/dist/index-3f70b1d4.js +331 -0
- package/dist/index-40ad0dd1.js +287 -0
- package/dist/index-42fb4fd5.js +334 -0
- package/dist/index-45696efa.js +438 -0
- package/dist/index-4b6824f2.js +61 -0
- package/dist/index-4b7924c1.js +354 -0
- package/dist/index-4c8ef561.js +337 -0
- package/dist/index-4ced47cd.js +359 -0
- package/dist/index-4eb29fd9.js +313 -0
- package/dist/index-4f2d4e0d.js +342 -0
- package/dist/index-51847d07.js +363 -0
- package/dist/index-51c1e00d.js +9 -0
- package/dist/index-51cf15b2.js +11054 -0
- package/dist/index-5357c173.js +336 -0
- package/dist/index-572ed179.js +353 -0
- package/dist/index-580c6bf2.js +362 -0
- package/dist/index-6817d9c1.js +363 -0
- package/dist/index-682656f7.js +62 -0
- package/dist/index-6834d6cf.js +330 -0
- package/dist/index-6a5829bd.js +387 -0
- package/dist/index-739cb389.js +332 -0
- package/dist/index-7601ed24.js +332 -0
- package/dist/index-76c2d21a.js +362 -0
- package/dist/index-7871c2fa.js +397 -0
- package/dist/index-7a871a23.js +362 -0
- package/dist/index-7aae1d07.js +298 -0
- package/dist/index-80121226.js +443 -0
- package/dist/index-872a50e8.js +353 -0
- package/dist/index-88fdaa89.js +437 -0
- package/dist/index-8a4c6daa.js +302 -0
- package/dist/index-8fb7d88b.js +360 -0
- package/dist/index-9412ffa1.js +346 -0
- package/dist/index-95d62350.js +427 -0
- package/dist/index-96a8d125.js +65 -0
- package/dist/index-9d0a665d.js +298 -0
- package/dist/index-a8c0dd3b.js +500 -0
- package/dist/index-aa90be0a.js +146 -0
- package/dist/index-aac5376e.js +331 -0
- package/dist/index-ac48594f.js +364 -0
- package/dist/index-acc7a626.js +146 -0
- package/dist/index-af6965cc.js +332 -0
- package/dist/index-b523f554.js +61 -0
- package/dist/index-b5aa671f.js +463 -0
- package/dist/index-b7612310.js +333 -0
- package/dist/index-babf632c.js +332 -0
- package/dist/index-baf0849c.js +346 -0
- package/dist/index-bb65c72e.js +514 -0
- package/dist/index-bb84ad8c.js +514 -0
- package/dist/index-c1e6e7ba.js +340 -0
- package/dist/index-cb4b8e2c.js +341 -0
- package/dist/index-d9848a76.js +545 -0
- package/dist/index-dc4bbb59.js +332 -0
- package/dist/index-dfc0fb0e.js +364 -0
- package/dist/index-e27e30cc.js +345 -0
- package/dist/index-e8380fcb.js +335 -0
- package/dist/index-ea4a8872.js +311 -0
- package/dist/index-eb696d64.js +436 -0
- package/dist/index-ebd469fd.js +297 -0
- package/dist/index-ed48cf75.js +383 -0
- package/dist/index-f3092738.js +308 -0
- package/dist/index-f41bdf2a.js +238 -0
- package/dist/index-f5c25d06.js +458 -0
- package/dist/index-f7e0a67b.js +511 -0
- package/dist/index-fafae16f.js +337 -0
- package/dist/index-ffe656da.js +332 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.es.js +51 -0
- package/dist/isObjectLike-1b8bbac2.js +44 -0
- package/dist/jsx-runtime-944c88e2.js +631 -0
- package/dist/provider/NoticeProvider.d.ts +41 -0
- package/dist/provider/ThemeProvider.d.ts +7 -0
- package/dist/provider/useTheme.d.ts +4 -0
- package/dist/types/component.d.ts +16 -0
- package/dist/types/svg.d.ts +4 -0
- package/dist/utils/format.d.ts +7 -0
- package/dist/utils/helper.d.ts +7 -0
- package/dist/utils/locales.d.ts +1 -0
- package/dist/utils/utils.d.ts +2 -0
- package/dist/utils-7e50508b.js +2304 -0
- package/dist/vite.svg +1 -0
- 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
|
+

|
|
8
|
+
|
|
9
|
+

|
|
10
|
+

|
|
11
|
+

|
|
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
|
+

|
|
89
|
+

|
|
90
|
+
|
|
91
|
+

|
|
92
|
+

|
|
93
|
+
|
|
94
|
+
## License
|
|
95
|
+
|
|
96
|
+
This project is licensed under the terms of the
|
|
97
|
+
[MIT license](/LICENSE).
|
package/dist/Badge.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/Badge/index'
|
package/dist/Badge.es.js
ADDED
|
@@ -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
|
+
};
|
package/dist/Button.d.ts
ADDED
|
@@ -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
|
+
};
|
package/dist/Dialog.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/Dialog/index'
|