@blofin/blofin-ui 1.0.0-beta.12 → 1.0.0-beta.13
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/dist/Calendar.es.js +8 -7
- package/dist/Checkbox.es.js +95 -84
- package/dist/DatePickerRange.es.js +24 -22
- package/dist/DateTimePicker.es.js +77 -76
- package/dist/Drawer.es.js +35 -44
- package/dist/MonthPicker.es.js +3 -2
- package/dist/Picker.es.js +126 -155
- package/dist/ProTable-f1ff8606.js +565 -0
- package/dist/ProTable.es.js +4 -3
- package/dist/Switch.es.js +15 -18
- package/dist/Tooltip.es.js +56 -64
- package/dist/arrow-right-l-line-87881b4d.js +7 -0
- package/dist/blofin.css +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts +9 -5
- package/dist/components/Checkbox/styles.d.ts +3 -15
- package/dist/enum-0398044b.js +17 -0
- package/dist/index.es.js +98 -91
- package/dist/{index.esm-0aa3bd72.js → index.esm-da18270d.js} +377 -381
- package/dist/index.module-1d7bbdf8.js +7 -0
- package/dist/index.module-86edc823.js +15 -0
- package/dist/index.module-b4239ff5.js +9 -0
- package/dist/index.module-fb41ba3b.js +39 -0
- package/dist/sortable.esm-1c13d908.js +2896 -0
- package/package.json +1 -1
- package/dist/ProTable-21ed1fbe.js +0 -3446
package/dist/Calendar.es.js
CHANGED
|
@@ -3,7 +3,8 @@ import { j as a } from "./jsx-runtime-ba6e4aac.js";
|
|
|
3
3
|
import * as w from "react";
|
|
4
4
|
import { Typography as _ } from "./Typography.es.js";
|
|
5
5
|
import { S as $ } from "./arrow-down-l-line-97e4fe24.js";
|
|
6
|
-
import {
|
|
6
|
+
import { a as j, S as D } from "./arrow-right-l-line-87881b4d.js";
|
|
7
|
+
import { D as C, u as N } from "./index.esm-da18270d.js";
|
|
7
8
|
import { c as t } from "./index-c57db938.js";
|
|
8
9
|
import { u as M } from "./useTheme-81e2a73e.js";
|
|
9
10
|
import { i as L } from "./index-b7027a1d.js";
|
|
@@ -100,7 +101,7 @@ const i = t("", {
|
|
|
100
101
|
dark: "hover:!bu-bg-dark-primary-14 hover:!bu-text-dark-primary"
|
|
101
102
|
}
|
|
102
103
|
}
|
|
103
|
-
}),
|
|
104
|
+
}), Z = ({
|
|
104
105
|
className: h = "",
|
|
105
106
|
classNames: c,
|
|
106
107
|
showOutsideDays: g = !0,
|
|
@@ -116,7 +117,7 @@ const i = t("", {
|
|
|
116
117
|
}) => {
|
|
117
118
|
const { theme: e } = M();
|
|
118
119
|
function v(r) {
|
|
119
|
-
const { goToMonth: u, nextMonth: o, previousMonth: n } =
|
|
120
|
+
const { goToMonth: u, nextMonth: o, previousMonth: n } = N(), f = () => {
|
|
120
121
|
r.displayIndex === 0 ? (m(!d), x(r.displayMonth)) : (p(!s), y(r.displayMonth));
|
|
121
122
|
};
|
|
122
123
|
return w.useEffect(() => {
|
|
@@ -140,14 +141,14 @@ const i = t("", {
|
|
|
140
141
|
),
|
|
141
142
|
r.displayIndex === 1 && /* @__PURE__ */ a.jsxs("div", { className: "bu-flex bu-gap-6", children: [
|
|
142
143
|
/* @__PURE__ */ a.jsx(
|
|
143
|
-
|
|
144
|
+
j,
|
|
144
145
|
{
|
|
145
146
|
className: `bu-h-6 bu-w-6 bu-cursor-pointer ${i({ theme: e })}`,
|
|
146
147
|
onClick: () => n && u(n)
|
|
147
148
|
}
|
|
148
149
|
),
|
|
149
150
|
/* @__PURE__ */ a.jsx(
|
|
150
|
-
|
|
151
|
+
D,
|
|
151
152
|
{
|
|
152
153
|
className: `bu-h-6 bu-w-6 bu-cursor-pointer ${i({ theme: e })}`,
|
|
153
154
|
onClick: () => o && u(o)
|
|
@@ -157,7 +158,7 @@ const i = t("", {
|
|
|
157
158
|
] });
|
|
158
159
|
}
|
|
159
160
|
return /* @__PURE__ */ a.jsx(
|
|
160
|
-
|
|
161
|
+
C,
|
|
161
162
|
{
|
|
162
163
|
showOutsideDays: g,
|
|
163
164
|
className: `pb-4 ${h}`,
|
|
@@ -205,5 +206,5 @@ const i = t("", {
|
|
|
205
206
|
);
|
|
206
207
|
};
|
|
207
208
|
export {
|
|
208
|
-
|
|
209
|
+
Z as Calendar
|
|
209
210
|
};
|
package/dist/Checkbox.es.js
CHANGED
|
@@ -1,127 +1,138 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { j as
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { c as
|
|
6
|
-
import
|
|
2
|
+
import { j as e } from "./jsx-runtime-ba6e4aac.js";
|
|
3
|
+
import { forwardRef as b } from "react";
|
|
4
|
+
import { u as k } from "./useTheme-81e2a73e.js";
|
|
5
|
+
import { c as L } from "./utils-071abd68.js";
|
|
6
|
+
import "./Button.es.js";
|
|
7
|
+
import "./index.esm-da18270d.js";
|
|
8
|
+
import "./index.module-fb41ba3b.js";
|
|
9
|
+
import "./Popup.es.js";
|
|
10
|
+
import "./index.module-1d7bbdf8.js";
|
|
11
|
+
import "./Dialog.es.js";
|
|
12
|
+
import "react-dom";
|
|
13
|
+
import "./enum-0398044b.js";
|
|
14
|
+
import "./Popover.es.js";
|
|
15
|
+
import "./index.module-86edc823.js";
|
|
16
|
+
import "./LabelTextField.es.js";
|
|
17
|
+
import "./index-a55c4737.js";
|
|
18
|
+
import "./RadioButton.es.js";
|
|
19
|
+
import "./Select.es.js";
|
|
20
|
+
import "./Slider.es.js";
|
|
21
|
+
import "./Sort.es.js";
|
|
22
|
+
import "./index.module-b4239ff5.js";
|
|
23
|
+
import "./Tab.es.js";
|
|
24
|
+
import "./Table.es.js";
|
|
25
|
+
import "./TextField.es.js";
|
|
26
|
+
import "./Textarea.es.js";
|
|
27
|
+
import "./sortable.esm-8d31c120.js";
|
|
28
|
+
import "./MultiSelect.es.js";
|
|
29
|
+
import "./index-ffb39a28.js";
|
|
30
|
+
import "./sortable.esm-1c13d908.js";
|
|
31
|
+
import { c as m } from "./index-c57db938.js";
|
|
7
32
|
import "./clsx.m-e965ef18.js";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
33
|
+
import "./index-b7027a1d.js";
|
|
34
|
+
import "./_commonjsHelpers-1d52fb73.js";
|
|
35
|
+
import "./close-0df24351.js";
|
|
36
|
+
import "./useDelayEvent-f577f6a3.js";
|
|
37
|
+
import "./Typography.es.js";
|
|
38
|
+
import "./styles-85a9fe64.js";
|
|
39
|
+
import "./useAlign-916ed3be.js";
|
|
40
|
+
import "./arrow-down-011b02c7.js";
|
|
41
|
+
import "./search-b79a3be5.js";
|
|
42
|
+
import "./arrow-fill-70becd96.js";
|
|
43
|
+
import "./helper-221987f8.js";
|
|
44
|
+
import "./close-bg-6d2211ef.js";
|
|
45
|
+
import "./Empty.es.js";
|
|
46
|
+
import "./arrow-down-l-line-97e4fe24.js";
|
|
47
|
+
const V = "_container_g0kof_1", H = "_checkmark_g0kof_22", j = "_unchecked_g0kof_28", d = {
|
|
48
|
+
container: V,
|
|
49
|
+
checkmark: H,
|
|
50
|
+
unchecked: j
|
|
51
|
+
}, R = m("bu-select-none bu-text-sm", {
|
|
12
52
|
variants: {
|
|
13
53
|
theme: {
|
|
14
54
|
light: ["bu-text-light-label"],
|
|
15
55
|
dark: ["bu-text-dark-label"]
|
|
16
56
|
}
|
|
17
57
|
}
|
|
18
|
-
}),
|
|
19
|
-
variants: {
|
|
20
|
-
theme: {
|
|
21
|
-
light: ["bu-border-light-primary bu-bg-light-primary after:bu-border-light-background"],
|
|
22
|
-
dark: ["bu-border-light-background bu-bg-light-background after:bu-border-dark-background"]
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}), S = t(
|
|
26
|
-
"bu-h-[10px] bu-w-[10px] after:bu-border-l-0 after:bu-border-t-0",
|
|
27
|
-
{
|
|
28
|
-
variants: {
|
|
29
|
-
size: {
|
|
30
|
-
small: [
|
|
31
|
-
"bu-h-[10px] bu-w-[10px] bu-rounded-[2px] after:bu-h-[6px] after:bu-w-[4px] after:bu-border-b-[1.8px] after:bu-border-r-[1.8px]"
|
|
32
|
-
],
|
|
33
|
-
medium: [
|
|
34
|
-
"bu-h-[18px] bu-w-[18px] bu-rounded-[3px] after:bu-h-[10px] after:bu-w-[8px] after:bu-border-b-[2px] after:bu-border-r-[2px]"
|
|
35
|
-
]
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
), _ = t(
|
|
40
|
-
"bu-flex bu-h-[10px] bu-w-[10px] bu-items-center bu-justify-center bu-border",
|
|
41
|
-
{
|
|
42
|
-
variants: {
|
|
43
|
-
theme: {
|
|
44
|
-
light: [
|
|
45
|
-
"bu-border-light-label-40 after:bu-border-light-background hover:bu-border-light-primary"
|
|
46
|
-
],
|
|
47
|
-
dark: [
|
|
48
|
-
"bu-border-dark-label-40 after:bu-border-dark-background hover:bu-border-light-background"
|
|
49
|
-
]
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
), M = t("bu-select-none bu-text-sm", {
|
|
58
|
+
}), M = m("bu-select-none bu-text-sm", {
|
|
54
59
|
variants: {
|
|
55
60
|
theme: {
|
|
56
61
|
light: ["bu-text-light-label"],
|
|
57
62
|
dark: ["bu-text-dark-label"]
|
|
58
63
|
}
|
|
59
64
|
}
|
|
60
|
-
}),
|
|
65
|
+
}), C = m("bu-select-none bu-text-sm", {
|
|
61
66
|
variants: {
|
|
62
67
|
theme: {
|
|
63
68
|
light: ["bu-text-light-label-40"],
|
|
64
69
|
dark: ["bu-text-dark-label-40"]
|
|
65
70
|
}
|
|
66
71
|
}
|
|
67
|
-
}),
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
light: ["bu-border-light-label-40 after:bu-border-light-label-40"],
|
|
73
|
-
dark: ["bu-border-dark-label-40 after:bu-border-dark-label-40"]
|
|
74
|
-
}
|
|
72
|
+
}), Z = m("bu-flex bu-items-center bu-justify-center", {
|
|
73
|
+
variants: {
|
|
74
|
+
size: {
|
|
75
|
+
small: ["bu-h-[10px] bu-w-[10px]"],
|
|
76
|
+
medium: ["bu-h-[18px] bu-w-[18px]"]
|
|
75
77
|
}
|
|
76
78
|
}
|
|
77
|
-
),
|
|
79
|
+
}), b1 = b((u, g) => {
|
|
78
80
|
const {
|
|
79
|
-
label:
|
|
80
|
-
theme:
|
|
81
|
-
id:
|
|
81
|
+
label: p,
|
|
82
|
+
theme: h,
|
|
83
|
+
id: c,
|
|
82
84
|
checked: l,
|
|
83
|
-
onChange:
|
|
84
|
-
disabled:
|
|
85
|
-
size:
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
85
|
+
onChange: x,
|
|
86
|
+
disabled: i,
|
|
87
|
+
size: a = "small",
|
|
88
|
+
customSize: t,
|
|
89
|
+
...w
|
|
90
|
+
} = u, { theme: s } = k(), f = (o) => {
|
|
91
|
+
x && !i && x(o);
|
|
92
|
+
}, v = () => {
|
|
93
|
+
const o = h || s, r = (t == null ? void 0 : t.width) || (a === "medium" ? 18 : 10), n = (t == null ? void 0 : t.height) || (a === "medium" ? 18 : 10);
|
|
94
|
+
if (o === "light" && l && !i)
|
|
95
|
+
return /* @__PURE__ */ e.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: r, height: n, viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ e.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M1.86667 0C0.835735 0 0 0.835735 0 1.86667V10.1333C0 11.1643 0.835735 12 1.86667 12H10.1333C11.1643 12 12 11.1643 12 10.1333V1.86667C12 0.835735 11.1643 0 10.1333 0H1.86667ZM5.33459 8.66642L10.0487 3.95239L9.10586 3.0096L5.33459 6.78084L3.449 4.89518L2.50619 5.83805L5.33459 8.66642Z", fill: "#FF8800" }) });
|
|
96
|
+
if (o === "light" && i)
|
|
97
|
+
return l ? /* @__PURE__ */ e.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: r, height: n, viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ e.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M1.86667 0C0.835735 0 0 0.835735 0 1.86667V10.1333C0 11.1643 0.835735 12 1.86667 12H10.1333C11.1643 12 12 11.1643 12 10.1333V1.86667C12 0.835735 11.1643 0 10.1333 0H1.86667ZM5.33459 8.66642L10.0487 3.95239L9.10586 3.0096L5.33459 6.78084L3.449 4.89518L2.50619 5.83805L5.33459 8.66642Z", fill: "#0A0A0A", fillOpacity: "0.2" }) }) : /* @__PURE__ */ e.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: r, height: n, viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ e.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M10.1333 1.33333H1.86667C1.57211 1.33333 1.33333 1.57211 1.33333 1.86667V10.1333C1.33333 10.4279 1.57211 10.6667 1.86667 10.6667H10.1333C10.4279 10.6667 10.6667 10.4279 10.6667 10.1333V1.86667C10.6667 1.57211 10.4279 1.33333 10.1333 1.33333ZM1.86667 0C0.835735 0 0 0.835735 0 1.86667V10.1333C0 11.1643 0.835735 12 1.86667 12H10.1333C11.1643 12 12 11.1643 12 10.1333V1.86667C12 0.835735 11.1643 0 10.1333 0H1.86667Z", fill: "#0A0A0A", fillOpacity: "0.4" }) });
|
|
98
|
+
if (o === "light" && !l && !i)
|
|
99
|
+
return /* @__PURE__ */ e.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: r, height: n, viewBox: "0 0 12 12", fill: "none", className: d.unchecked, children: /* @__PURE__ */ e.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M10.1333 1.33333H1.86667C1.57211 1.33333 1.33333 1.57211 1.33333 1.86667V10.1333C1.33333 10.4279 1.57211 10.6667 1.86667 10.6667H10.1333C10.4279 10.6667 10.6667 10.4279 10.6667 10.1333V1.86667C10.6667 1.57211 10.4279 1.33333 10.1333 1.33333ZM1.86667 0C0.835735 0 0 0.835735 0 1.86667V10.1333C0 11.1643 0.835735 12 1.86667 12H10.1333C11.1643 12 12 11.1643 12 10.1333V1.86667C12 0.835735 11.1643 0 10.1333 0H1.86667Z", fill: "#0A0A0A", fillOpacity: "0.4" }) });
|
|
100
|
+
if (o === "dark" && l && !i)
|
|
101
|
+
return /* @__PURE__ */ e.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: r, height: n, viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ e.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M1.86667 0C0.835735 0 0 0.835735 0 1.86667V10.1333C0 11.1643 0.835735 12 1.86667 12H10.1333C11.1643 12 12 11.1643 12 10.1333V1.86667C12 0.835735 11.1643 0 10.1333 0H1.86667ZM5.33459 8.66642L10.0487 3.95239L9.10586 3.0096L5.33459 6.78084L3.449 4.89518L2.50619 5.83805L5.33459 8.66642Z", fill: "#FCFDFF" }) });
|
|
102
|
+
if (o === "dark" && i)
|
|
103
|
+
return l ? /* @__PURE__ */ e.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: r, height: n, viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ e.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M1.86667 0C0.835735 0 0 0.835735 0 1.86667V10.1333C0 11.1643 0.835735 12 1.86667 12H10.1333C11.1643 12 12 11.1643 12 10.1333V1.86667C12 0.835735 11.1643 0 10.1333 0H1.86667ZM5.33459 8.66642L10.0487 3.95239L9.10586 3.0096L5.33459 6.78084L3.449 4.89518L2.50619 5.83805L5.33459 8.66642Z", fill: "#EBECF5", fillOpacity: "0.2" }) }) : /* @__PURE__ */ e.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: r, height: n, viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ e.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M10.1333 1.33333H1.86667C1.57211 1.33333 1.33333 1.57211 1.33333 1.86667V10.1333C1.33333 10.4279 1.57211 10.6667 1.86667 10.6667H10.1333C10.4279 10.6667 10.6667 10.4279 10.6667 10.1333V1.86667C10.6667 1.57211 10.4279 1.33333 10.1333 1.33333ZM1.86667 0C0.835735 0 0 0.835735 0 1.86667V10.1333C0 11.1643 0.835735 12 1.86667 12H10.1333C11.1643 12 12 11.1643 12 10.1333V1.86667C12 0.835735 11.1643 0 10.1333 0H1.86667Z", fill: "#EBECF5", fillOpacity: "0.4" }) });
|
|
104
|
+
if (o === "dark" && !l && !i)
|
|
105
|
+
return /* @__PURE__ */ e.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: r, height: n, viewBox: "0 0 12 12", fill: "none", className: d.unchecked, children: /* @__PURE__ */ e.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M10.1333 1.33333H1.86667C1.57211 1.33333 1.33333 1.57211 1.33333 1.86667V10.1333C1.33333 10.4279 1.57211 10.6667 1.86667 10.6667H10.1333C10.4279 10.6667 10.6667 10.4279 10.6667 10.1333V1.86667C10.6667 1.57211 10.4279 1.33333 10.1333 1.33333ZM1.86667 0C0.835735 0 0 0.835735 0 1.86667V10.1333C0 11.1643 0.835735 12 1.86667 12H10.1333C11.1643 12 12 11.1643 12 10.1333V1.86667C12 0.835735 11.1643 0 10.1333 0H1.86667Z", fill: "#EBECF5", fillOpacity: "0.4" }) });
|
|
89
106
|
};
|
|
90
|
-
return /* @__PURE__ */
|
|
91
|
-
/* @__PURE__ */
|
|
107
|
+
return /* @__PURE__ */ e.jsxs("label", { htmlFor: c || `bui-checkbox-${p}`, className: d.container, children: [
|
|
108
|
+
/* @__PURE__ */ e.jsx(
|
|
92
109
|
"input",
|
|
93
110
|
{
|
|
94
111
|
type: "checkbox",
|
|
95
|
-
id:
|
|
96
|
-
ref:
|
|
97
|
-
...
|
|
112
|
+
id: c || `bui-checkbox-${p}`,
|
|
113
|
+
ref: g,
|
|
114
|
+
...w,
|
|
98
115
|
checked: l,
|
|
99
|
-
onChange:
|
|
116
|
+
onChange: f
|
|
100
117
|
}
|
|
101
118
|
),
|
|
102
|
-
/* @__PURE__ */
|
|
119
|
+
/* @__PURE__ */ e.jsx(
|
|
103
120
|
"span",
|
|
104
121
|
{
|
|
105
|
-
className:
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
l ? b ? d({ theme: e || r }) : w({
|
|
109
|
-
theme: e || r
|
|
110
|
-
}) : b ? d({ theme: e || r }) : _({
|
|
111
|
-
theme: e || r
|
|
112
|
-
})
|
|
113
|
-
)
|
|
122
|
+
className: L(d.checkmark, !t && Z({ size: a })),
|
|
123
|
+
style: t ? { width: `${t.width}px`, height: `${t.height}px` } : void 0,
|
|
124
|
+
children: v()
|
|
114
125
|
}
|
|
115
126
|
),
|
|
116
|
-
/* @__PURE__ */
|
|
127
|
+
/* @__PURE__ */ e.jsx(
|
|
117
128
|
"span",
|
|
118
129
|
{
|
|
119
|
-
className: l ?
|
|
120
|
-
children:
|
|
130
|
+
className: l ? i ? C({ theme: h || s }) : R({ theme: h || s }) : i ? C({ theme: h || s }) : M({ theme: h || s }),
|
|
131
|
+
children: p
|
|
121
132
|
}
|
|
122
133
|
)
|
|
123
134
|
] });
|
|
124
135
|
});
|
|
125
136
|
export {
|
|
126
|
-
|
|
137
|
+
b1 as Checkbox
|
|
127
138
|
};
|
|
@@ -11,12 +11,14 @@ import { u as me, S as ae, l as $e } from "./locales-776f0072.js";
|
|
|
11
11
|
import { Popup as Ce } from "./Popup.es.js";
|
|
12
12
|
import { c as Z } from "./index-c57db938.js";
|
|
13
13
|
import { u as Ye } from "./useTheme-81e2a73e.js";
|
|
14
|
-
import {
|
|
14
|
+
import { a as le } from "./index.esm-da18270d.js";
|
|
15
15
|
import "./arrow-down-l-line-97e4fe24.js";
|
|
16
|
+
import "./arrow-right-l-line-87881b4d.js";
|
|
16
17
|
import "./utils-071abd68.js";
|
|
17
18
|
import "./clsx.m-e965ef18.js";
|
|
18
19
|
import "./Picker.es.js";
|
|
19
20
|
import "./_commonjsHelpers-1d52fb73.js";
|
|
21
|
+
import "./index.module-fb41ba3b.js";
|
|
20
22
|
const ue = (v) => /* @__PURE__ */ o.createElement("svg", { t: 1714113967079, className: "icon", viewBox: "0 0 1024 1024", xmlns: "http://www.w3.org/2000/svg", "p-id": 4332, xmlnsXlink: "http://www.w3.org/1999/xlink", width: 200, height: 200, ...v }, /* @__PURE__ */ o.createElement("path", { d: "M213.333333 469.333333v85.333334h597.333334v-85.333334H213.333333z", fill: "currentColor", "p-id": 4333 })), _e = (v) => /* @__PURE__ */ o.createElement("svg", { width: 16, height: 17, viewBox: "0 0 16 17", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...v }, /* @__PURE__ */ o.createElement("path", { d: "M11.334 2.55843H14.0007C14.3689 2.55843 14.6673 2.85691 14.6673 3.2251V13.8918C14.6673 14.26 14.3689 14.5584 14.0007 14.5584H2.00065C1.63246 14.5584 1.33398 14.26 1.33398 13.8918V3.2251C1.33398 2.85691 1.63246 2.55843 2.00065 2.55843H4.66732V1.2251H6.00065V2.55843H10.0007V1.2251H11.334V2.55843ZM2.66732 6.55843V13.2251H13.334V6.55843H2.66732ZM4.00065 9.2251H7.33398V11.8918H4.00065V9.2251Z", fill: "#0A0A0A", fillOpacity: 0.4 })), H = Z("", {
|
|
21
23
|
variants: {
|
|
22
24
|
theme: {
|
|
@@ -38,7 +40,7 @@ const ue = (v) => /* @__PURE__ */ o.createElement("svg", { t: 1714113967079, cla
|
|
|
38
40
|
dark: "bu-bg-dark-background bu-border-dark-line-secondary"
|
|
39
41
|
}
|
|
40
42
|
}
|
|
41
|
-
}),
|
|
43
|
+
}), et = ({
|
|
42
44
|
mode: v = "simple",
|
|
43
45
|
className: he = "",
|
|
44
46
|
dateClassName: ge = "",
|
|
@@ -51,12 +53,12 @@ const ue = (v) => /* @__PURE__ */ o.createElement("svg", { t: 1714113967079, cla
|
|
|
51
53
|
includesToday: C = !0,
|
|
52
54
|
startTime: b,
|
|
53
55
|
isUtcTime: X = !1,
|
|
54
|
-
lang:
|
|
56
|
+
lang: p = "en",
|
|
55
57
|
selectText: Y = "Selected",
|
|
56
58
|
confirmText: _ = "Confirm",
|
|
57
59
|
cancelText: q = "Cancel",
|
|
58
|
-
toText:
|
|
59
|
-
distance:
|
|
60
|
+
toText: pe = "-",
|
|
61
|
+
distance: xe = 5,
|
|
60
62
|
auto: fe = !0,
|
|
61
63
|
startPlaceholder: de = "Start Date",
|
|
62
64
|
endPlaceholder: we = "End Date",
|
|
@@ -71,18 +73,18 @@ const ue = (v) => /* @__PURE__ */ o.createElement("svg", { t: 1714113967079, cla
|
|
|
71
73
|
};
|
|
72
74
|
o.useEffect(() => {
|
|
73
75
|
(async () => {
|
|
74
|
-
const s = await $e(
|
|
76
|
+
const s = await $e(p);
|
|
75
77
|
ye(s);
|
|
76
78
|
})();
|
|
77
|
-
}, [
|
|
79
|
+
}, [p]);
|
|
78
80
|
const te = o.useMemo(() => {
|
|
79
81
|
const t = u(h ? (/* @__PURE__ */ new Date()).getTime() : new Date(2100, 10).getTime());
|
|
80
82
|
t.setHours(0, 0, 0, 0);
|
|
81
|
-
const s = h ? new Date(t.getTime() - h) : u(new Date(1970, 0).getTime()), i = s.getFullYear(),
|
|
83
|
+
const s = h ? new Date(t.getTime() - h) : u(new Date(1970, 0).getTime()), i = s.getFullYear(), x = s.getMonth() + 1, se = t.getFullYear(), ke = t.getMonth() + 1, B = {};
|
|
82
84
|
for (let w = i; w <= se; w++) {
|
|
83
85
|
B[w] = [];
|
|
84
86
|
let oe = 1, ne = 12;
|
|
85
|
-
w === i && (oe =
|
|
87
|
+
w === i && (oe = x), w === se && (ne = ke);
|
|
86
88
|
for (let P = oe; P <= ne; P++)
|
|
87
89
|
B[w].push(P);
|
|
88
90
|
}
|
|
@@ -93,12 +95,12 @@ const ue = (v) => /* @__PURE__ */ o.createElement("svg", { t: 1714113967079, cla
|
|
|
93
95
|
s.setHours(0, 0, 0, 0);
|
|
94
96
|
const i = le(s, -t + (C ? 1 : 0));
|
|
95
97
|
b && i.getTime() < b.getTime() && i.setTime(b.getTime());
|
|
96
|
-
const
|
|
98
|
+
const x = u(
|
|
97
99
|
C ? (/* @__PURE__ */ new Date()).getTime() : le((/* @__PURE__ */ new Date()).getTime(), -1).getTime()
|
|
98
100
|
);
|
|
99
|
-
D.current = !0, f({ from: i, to:
|
|
101
|
+
D.current = !0, f({ from: i, to: x }), F({
|
|
100
102
|
start_time: i.getTime(),
|
|
101
|
-
end_time:
|
|
103
|
+
end_time: x.getTime()
|
|
102
104
|
}), d(u(i.getTime())), setTimeout(() => {
|
|
103
105
|
d(void 0);
|
|
104
106
|
}, 200);
|
|
@@ -154,13 +156,13 @@ const ue = (v) => /* @__PURE__ */ o.createElement("svg", { t: 1714113967079, cla
|
|
|
154
156
|
const { start_time: t, end_time: s } = n;
|
|
155
157
|
if (t === void 0 || s === void 0)
|
|
156
158
|
return;
|
|
157
|
-
const i = new Date(t),
|
|
158
|
-
b && i.getTime() < b.getTime() && i.setTime(b.getTime()), i &&
|
|
159
|
+
const i = new Date(t), x = new Date(s);
|
|
160
|
+
b && i.getTime() < b.getTime() && i.setTime(b.getTime()), i && x && f({ from: i, to: x });
|
|
159
161
|
}, [n, b]), /* @__PURE__ */ r.jsx("div", { className: `bu-date-picker-range ${he}`, children: /* @__PURE__ */ r.jsx(
|
|
160
162
|
Ce,
|
|
161
163
|
{
|
|
162
164
|
ref: ee,
|
|
163
|
-
distance:
|
|
165
|
+
distance: xe,
|
|
164
166
|
cancel: re,
|
|
165
167
|
auto: fe,
|
|
166
168
|
disabled: E,
|
|
@@ -178,7 +180,7 @@ const ue = (v) => /* @__PURE__ */ o.createElement("svg", { t: 1714113967079, cla
|
|
|
178
180
|
variant: "body3",
|
|
179
181
|
weight: "regular",
|
|
180
182
|
className: `bu-leading-[20px] ${k}`,
|
|
181
|
-
children: a(e.from, "yyyy/MM/dd", void 0,
|
|
183
|
+
children: a(e.from, "yyyy/MM/dd", void 0, p)
|
|
182
184
|
}
|
|
183
185
|
),
|
|
184
186
|
/* @__PURE__ */ r.jsx(
|
|
@@ -187,14 +189,14 @@ const ue = (v) => /* @__PURE__ */ o.createElement("svg", { t: 1714113967079, cla
|
|
|
187
189
|
className: `bu-h-4 bu-w-4 ${H({ theme: m })}`
|
|
188
190
|
}
|
|
189
191
|
),
|
|
190
|
-
/* @__PURE__ */ r.jsx(g, { variant: "body3", weight: "regular", className: "bu-leading-[20px]", children: a(e.to, "yyyy/MM/dd", void 0,
|
|
192
|
+
/* @__PURE__ */ r.jsx(g, { variant: "body3", weight: "regular", className: "bu-leading-[20px]", children: a(e.to, "yyyy/MM/dd", void 0, p) })
|
|
191
193
|
] }) : /* @__PURE__ */ r.jsx(
|
|
192
194
|
g,
|
|
193
195
|
{
|
|
194
196
|
variant: "body3",
|
|
195
197
|
weight: "regular",
|
|
196
198
|
className: `bu-leading-[20px] ${k}`,
|
|
197
|
-
children: a(e.from, "yyyy/MM/dd", void 0,
|
|
199
|
+
children: a(e.from, "yyyy/MM/dd", void 0, p)
|
|
198
200
|
}
|
|
199
201
|
) : /* @__PURE__ */ r.jsx("span", {}) : /* @__PURE__ */ r.jsxs("div", { className: "bu-flex bu-items-center bu-gap-[10px]", children: [
|
|
200
202
|
/* @__PURE__ */ r.jsxs("div", { className: "bu-flex bu-flex-1 bu-items-center bu-justify-evenly bu-gap-[10px]", children: [
|
|
@@ -209,7 +211,7 @@ const ue = (v) => /* @__PURE__ */ o.createElement("svg", { t: 1714113967079, cla
|
|
|
209
211
|
weight: "regular",
|
|
210
212
|
className: `bu-leading-[20px] ${!(e != null && e.from) || E ? N({ theme: m }) : ""}`,
|
|
211
213
|
children: [
|
|
212
|
-
e != null && e.from ? a(e.from, "yyyy/MM/dd", void 0,
|
|
214
|
+
e != null && e.from ? a(e.from, "yyyy/MM/dd", void 0, p) : de,
|
|
213
215
|
(e == null ? void 0 : e.from) && /* @__PURE__ */ r.jsxs("span", { className: N({ theme: m }), children: [
|
|
214
216
|
" ",
|
|
215
217
|
G
|
|
@@ -231,7 +233,7 @@ const ue = (v) => /* @__PURE__ */ o.createElement("svg", { t: 1714113967079, cla
|
|
|
231
233
|
weight: "regular",
|
|
232
234
|
className: `bu-leading-[20px] ${!(e != null && e.to) || E ? N({ theme: m }) : ""}`,
|
|
233
235
|
children: [
|
|
234
|
-
e != null && e.to ? a(e.to, "yyyy/MM/dd", void 0,
|
|
236
|
+
e != null && e.to ? a(e.to, "yyyy/MM/dd", void 0, p) : we,
|
|
235
237
|
(e == null ? void 0 : e.to) && /* @__PURE__ */ r.jsxs("span", { className: N({ theme: m }), children: [
|
|
236
238
|
" ",
|
|
237
239
|
G
|
|
@@ -383,7 +385,7 @@ const ue = (v) => /* @__PURE__ */ o.createElement("svg", { t: 1714113967079, cla
|
|
|
383
385
|
": ",
|
|
384
386
|
a(e.from, "yyyy/MM/dd"),
|
|
385
387
|
" ",
|
|
386
|
-
|
|
388
|
+
pe,
|
|
387
389
|
" ",
|
|
388
390
|
a(e.to, "yyyy/MM/dd")
|
|
389
391
|
] }) : /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
@@ -404,5 +406,5 @@ const ue = (v) => /* @__PURE__ */ o.createElement("svg", { t: 1714113967079, cla
|
|
|
404
406
|
) });
|
|
405
407
|
};
|
|
406
408
|
export {
|
|
407
|
-
|
|
409
|
+
et as DatePickerRange
|
|
408
410
|
};
|