@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
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { BUITheme } from "../../types/component";
|
|
3
|
+
interface CssDropdownProps {
|
|
4
|
+
/**
|
|
5
|
+
* CssDropdown label
|
|
6
|
+
*/
|
|
7
|
+
label: ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* CssDropdown content
|
|
10
|
+
*/
|
|
11
|
+
content: ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* CssDropdown theme
|
|
14
|
+
*/
|
|
15
|
+
theme?: BUITheme;
|
|
16
|
+
}
|
|
17
|
+
export declare const CssDropdown: ({ label, content, theme: mode }: CssDropdownProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare const labelStyles: (props?: ({
|
|
2
|
+
theme?: "light" | "dark" | null | undefined;
|
|
3
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
4
|
+
declare const menuStyles: (props?: ({
|
|
5
|
+
theme?: "light" | "dark" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
export { labelStyles, menuStyles };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Matcher } from "react-day-picker";
|
|
3
|
+
export type DateValue = {
|
|
4
|
+
start_time?: number;
|
|
5
|
+
end_time?: number;
|
|
6
|
+
};
|
|
7
|
+
export type QuickSelection = {
|
|
8
|
+
label: string;
|
|
9
|
+
value: number;
|
|
10
|
+
};
|
|
11
|
+
export type DatePickerRangeProps = {
|
|
12
|
+
className?: string;
|
|
13
|
+
dateClassName?: string;
|
|
14
|
+
defaultValue: DateValue;
|
|
15
|
+
setValues: (values: DateValue) => void;
|
|
16
|
+
disabledDays?: Matcher | Matcher[];
|
|
17
|
+
quickSelection?: QuickSelection[];
|
|
18
|
+
limitDays?: number;
|
|
19
|
+
disabledSameDay?: boolean;
|
|
20
|
+
includesToday?: boolean;
|
|
21
|
+
startTime?: Date;
|
|
22
|
+
isUtcTime?: boolean;
|
|
23
|
+
lang: string;
|
|
24
|
+
selectText: string;
|
|
25
|
+
confirmText: string;
|
|
26
|
+
cancelText: string;
|
|
27
|
+
toText: string;
|
|
28
|
+
distance?: number;
|
|
29
|
+
auto?: boolean;
|
|
30
|
+
};
|
|
31
|
+
declare const DatePickerRange: React.FC<DatePickerRangeProps>;
|
|
32
|
+
export default DatePickerRange;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const ArrowLine: (props?: ({
|
|
2
|
+
theme?: "light" | "dark" | null | undefined;
|
|
3
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
4
|
+
export declare const DatePickerBg: (props?: ({
|
|
5
|
+
theme?: "light" | "dark" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { DayPicker } from "react-day-picker";
|
|
3
|
+
export type CalendarProps = React.ComponentProps<typeof DayPicker> & {
|
|
4
|
+
startMonthShow: boolean;
|
|
5
|
+
setStartMonthShow: React.Dispatch<React.SetStateAction<boolean>>;
|
|
6
|
+
setStartMonth: React.Dispatch<React.SetStateAction<Date | undefined>>;
|
|
7
|
+
date?: number;
|
|
8
|
+
};
|
|
9
|
+
declare const Calendar: React.FC<CalendarProps>;
|
|
10
|
+
export default Calendar;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Matcher } from "react-day-picker";
|
|
3
|
+
export type DateTimePickerProps = {
|
|
4
|
+
className?: string;
|
|
5
|
+
defaultValue?: number;
|
|
6
|
+
setValues: (values: number | undefined) => void;
|
|
7
|
+
disabledDays?: Matcher | Matcher[];
|
|
8
|
+
limitDays?: number;
|
|
9
|
+
isUtcTime?: boolean;
|
|
10
|
+
lang: string;
|
|
11
|
+
confirmText: string;
|
|
12
|
+
cancelText: string;
|
|
13
|
+
submitText: string;
|
|
14
|
+
minuteInterval?: number;
|
|
15
|
+
hidePast?: boolean;
|
|
16
|
+
};
|
|
17
|
+
declare const DateTimePicker: React.FC<DateTimePickerProps>;
|
|
18
|
+
export default DateTimePicker;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { BUITheme } from "../../types/component";
|
|
3
|
+
interface ScrollableListProps {
|
|
4
|
+
theme: BUITheme;
|
|
5
|
+
items: string[];
|
|
6
|
+
selectedItem: number;
|
|
7
|
+
onSelect: (item: number) => void;
|
|
8
|
+
disablePast?: boolean;
|
|
9
|
+
current?: number;
|
|
10
|
+
}
|
|
11
|
+
declare const ScrollableList: React.FC<ScrollableListProps>;
|
|
12
|
+
export default ScrollableList;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const useDateTimePicker: ({ defaultValue, limitDays, isUtcTime, lang, minuteInterval, hidePast }: {
|
|
3
|
+
defaultValue?: number | undefined;
|
|
4
|
+
limitDays?: number | undefined;
|
|
5
|
+
isUtcTime?: boolean | undefined;
|
|
6
|
+
lang: string;
|
|
7
|
+
minuteInterval: number;
|
|
8
|
+
hidePast: boolean;
|
|
9
|
+
}) => {
|
|
10
|
+
date: Date | undefined;
|
|
11
|
+
setDate: React.Dispatch<React.SetStateAction<Date | undefined>>;
|
|
12
|
+
startMonthShow: boolean;
|
|
13
|
+
setStartMonthShow: React.Dispatch<React.SetStateAction<boolean>>;
|
|
14
|
+
startMonth: Date | undefined;
|
|
15
|
+
setStartMonth: React.Dispatch<React.SetStateAction<Date | undefined>>;
|
|
16
|
+
month: Date | undefined;
|
|
17
|
+
setMonth: React.Dispatch<React.SetStateAction<Date | undefined>>;
|
|
18
|
+
monthHeight: number;
|
|
19
|
+
currentHour: number;
|
|
20
|
+
setCurrentHour: React.Dispatch<React.SetStateAction<number>>;
|
|
21
|
+
currentMinute: number;
|
|
22
|
+
setCurrentMinute: React.Dispatch<React.SetStateAction<number>>;
|
|
23
|
+
locale: null;
|
|
24
|
+
modifiers: {
|
|
25
|
+
today: Date;
|
|
26
|
+
};
|
|
27
|
+
calculateMonths: {
|
|
28
|
+
[key: number]: number[];
|
|
29
|
+
};
|
|
30
|
+
hours: string[];
|
|
31
|
+
minutes: string[];
|
|
32
|
+
disabledHour: boolean | undefined;
|
|
33
|
+
disabledMinute: boolean | undefined;
|
|
34
|
+
};
|
|
35
|
+
export default useDateTimePicker;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export declare const ArrowLine: (props?: ({
|
|
2
|
+
theme?: "light" | "dark" | null | undefined;
|
|
3
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
4
|
+
export declare const DisabledTextColor: (props?: ({
|
|
5
|
+
theme?: "light" | "dark" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
export declare const DatePickerBg: (props?: ({
|
|
8
|
+
theme?: "light" | "dark" | null | undefined;
|
|
9
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
|
+
export declare const CaptionStart: (props?: ({
|
|
11
|
+
theme?: "light" | "dark" | null | undefined;
|
|
12
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
13
|
+
export declare const NavButton: (props?: ({
|
|
14
|
+
theme?: "light" | "dark" | null | undefined;
|
|
15
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
16
|
+
export declare const HeadCell: (props?: ({
|
|
17
|
+
theme?: "light" | "dark" | null | undefined;
|
|
18
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
19
|
+
export declare const Cell: (props?: ({
|
|
20
|
+
theme?: "light" | "dark" | null | undefined;
|
|
21
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
22
|
+
export declare const Day: (props?: ({
|
|
23
|
+
theme?: "light" | "dark" | null | undefined;
|
|
24
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
25
|
+
export declare const DayRangeStart: (props?: ({
|
|
26
|
+
theme?: "light" | "dark" | null | undefined;
|
|
27
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
28
|
+
export declare const DayRangeEnd: (props?: ({
|
|
29
|
+
theme?: "light" | "dark" | null | undefined;
|
|
30
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
31
|
+
export declare const DayToday: (props?: ({
|
|
32
|
+
theme?: "light" | "dark" | null | undefined;
|
|
33
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
34
|
+
export declare const DaySelected: (props?: ({
|
|
35
|
+
theme?: "light" | "dark" | null | undefined;
|
|
36
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
37
|
+
export declare const DayOutside: (props?: ({
|
|
38
|
+
theme?: "light" | "dark" | null | undefined;
|
|
39
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
40
|
+
export declare const DayDisabled: (props?: ({
|
|
41
|
+
theme?: "light" | "dark" | null | undefined;
|
|
42
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
43
|
+
export declare const DayRangeMiddle: (props?: ({
|
|
44
|
+
theme?: "light" | "dark" | null | undefined;
|
|
45
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
46
|
+
export declare const TimeSelect: (props?: ({
|
|
47
|
+
theme?: "light" | "dark" | null | undefined;
|
|
48
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React, { FC } from "react";
|
|
2
|
+
import { BUIComponentSize, BUITheme } from "../../types/component";
|
|
3
|
+
import { ButtonSize } from "../Button/types";
|
|
4
|
+
export interface DialogProps {
|
|
5
|
+
title: null | string | React.ReactNode;
|
|
6
|
+
size: BUIComponentSize;
|
|
7
|
+
content: string | React.ReactNode;
|
|
8
|
+
maskClosable?: boolean;
|
|
9
|
+
cancelText?: string;
|
|
10
|
+
confirmText?: string;
|
|
11
|
+
footer?: null | React.ReactNode;
|
|
12
|
+
cancel?: () => void;
|
|
13
|
+
confirm?: () => void;
|
|
14
|
+
open: boolean;
|
|
15
|
+
theme?: BUITheme;
|
|
16
|
+
footerLayout?: "right" | "left" | "center";
|
|
17
|
+
footerSize?: ButtonSize;
|
|
18
|
+
hideCancel?: boolean;
|
|
19
|
+
hideConfirm?: boolean;
|
|
20
|
+
hideIcon?: boolean;
|
|
21
|
+
className?: string;
|
|
22
|
+
contentClassName?: string;
|
|
23
|
+
loading?: boolean;
|
|
24
|
+
containerRef?: React.RefObject<HTMLDivElement>;
|
|
25
|
+
}
|
|
26
|
+
interface DialogComponent extends FC<DialogProps> {
|
|
27
|
+
show: (options: Omit<DialogProps, "open">) => () => void;
|
|
28
|
+
}
|
|
29
|
+
declare const Dialog: DialogComponent;
|
|
30
|
+
export { Dialog };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const dialogVariants: (props?: ({
|
|
2
|
+
size?: "large" | "medium" | "small" | null | undefined;
|
|
3
|
+
theme?: "light" | "dark" | null | undefined;
|
|
4
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5
|
+
export declare const textStyles: (props?: ({
|
|
6
|
+
theme?: "light" | "dark" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
export declare const iconStyles: (props?: ({
|
|
9
|
+
theme?: "light" | "dark" | null | undefined;
|
|
10
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
|
+
export declare const footerStyles: (props?: ({
|
|
12
|
+
footerLayout?: "center" | "left" | "right" | null | undefined;
|
|
13
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BUITheme } from "../../types/component";
|
|
2
|
+
type DividerDirection = "vertical" | "horizontal";
|
|
3
|
+
export interface DividerProps {
|
|
4
|
+
direction: DividerDirection;
|
|
5
|
+
theme?: BUITheme;
|
|
6
|
+
}
|
|
7
|
+
export declare const Divider: ({ direction, theme: mode }: DividerProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare const DividerVariants: (props?: ({
|
|
2
|
+
theme?: "light" | "dark" | null | undefined;
|
|
3
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
4
|
+
declare const VerticalDividerVariants: (props?: ({
|
|
5
|
+
theme?: "light" | "dark" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
export { DividerVariants, VerticalDividerVariants };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { BUITheme } from "../../types/component";
|
|
3
|
+
export interface DrawerProps {
|
|
4
|
+
title: null | string | React.ReactNode;
|
|
5
|
+
content: string | React.ReactNode;
|
|
6
|
+
drawerContentClass: string;
|
|
7
|
+
cancel?: () => void;
|
|
8
|
+
open: boolean;
|
|
9
|
+
theme?: BUITheme;
|
|
10
|
+
hideIcon?: Boolean;
|
|
11
|
+
placement?: "left" | "right";
|
|
12
|
+
}
|
|
13
|
+
export declare const Drawer: React.FC<DrawerProps>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const drawerVariants: (props?: ({
|
|
2
|
+
theme?: "light" | "dark" | null | undefined;
|
|
3
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
4
|
+
export declare const iconStyles: (props?: ({
|
|
5
|
+
theme?: "light" | "dark" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
interface Menus {
|
|
3
|
+
key: string;
|
|
4
|
+
label: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
interface DropdownProps {
|
|
7
|
+
menus: Menus[];
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
hideIcon?: boolean;
|
|
10
|
+
variant?: "fill" | "line";
|
|
11
|
+
bodyScrollDisabled?: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare const Dropdown: FC<DropdownProps>;
|
|
14
|
+
export { Dropdown };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare const menuItemStyles: (props?: ({
|
|
2
|
+
theme?: "light" | "dark" | null | undefined;
|
|
3
|
+
intent?: "line" | "fill" | null | undefined;
|
|
4
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5
|
+
declare const labelStyles: (props?: ({
|
|
6
|
+
intent?: "line" | "fill" | null | undefined;
|
|
7
|
+
theme?: "light" | "dark" | null | undefined;
|
|
8
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
|
+
export { menuItemStyles, labelStyles };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ControlProps, FormItemProps } from "./interface";
|
|
3
|
+
declare class Control extends React.Component<ControlProps & FormItemProps> {
|
|
4
|
+
static contextType: React.Context<import("./interface").FormContextProps>;
|
|
5
|
+
context: any;
|
|
6
|
+
constructor(props: ControlProps & FormItemProps);
|
|
7
|
+
updateItem: () => void;
|
|
8
|
+
onChange: (value: string) => void;
|
|
9
|
+
cloneNode: () => React.FunctionComponentElement<any> | undefined;
|
|
10
|
+
componentDidMount(): void;
|
|
11
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
}
|
|
13
|
+
export default Control;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { FormContextProps, FormItemContextProps } from './interface';
|
|
2
|
+
declare const FormContext: import("react").Context<FormContextProps>;
|
|
3
|
+
export declare const FormItemContext: import("react").Context<FormItemContextProps>;
|
|
4
|
+
declare const FormProviderContext: import("react").Context<{}>;
|
|
5
|
+
export { FormProviderContext, FormContext };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Store from './store';
|
|
3
|
+
export interface FormProps<FormData = any> {
|
|
4
|
+
/**
|
|
5
|
+
*是否可用
|
|
6
|
+
*/
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
*布局
|
|
10
|
+
*/
|
|
11
|
+
layout?: 'horizontal' | 'vertical' | 'inline';
|
|
12
|
+
/**
|
|
13
|
+
*标签的文本对齐方式
|
|
14
|
+
*/
|
|
15
|
+
labelAlign?: 'left' | 'right';
|
|
16
|
+
/**
|
|
17
|
+
* 设置表单初始值
|
|
18
|
+
*/
|
|
19
|
+
initialValues?: Partial<FormData>;
|
|
20
|
+
/**
|
|
21
|
+
* 数据验证成功后回调事件
|
|
22
|
+
*/
|
|
23
|
+
onSubmit?: (values: FormData) => void;
|
|
24
|
+
form?: FormInstance<FormData>;
|
|
25
|
+
children?: React.ReactNode;
|
|
26
|
+
}
|
|
27
|
+
export type FormInstance<FormData = any> = Pick<Store<FormData>, 'submit' | 'setInitialValues' | 'setCallBacks' | 'getFieldValue' | 'setFieldValue' | 'getFieldsValues' | 'registerWatcher'>;
|
|
28
|
+
export type innerCallbackType = 'onSubmit';
|
|
29
|
+
export type FormContextProps<FormData = any> = Pick<FormProps<FormData>, 'labelAlign' | 'layout'> & {
|
|
30
|
+
store?: FormInstance<FormData>;
|
|
31
|
+
};
|
|
32
|
+
export type FormItemContextProps<FormData = any> = Pick<FormProps<FormData>, 'labelAlign' | 'layout'> & {
|
|
33
|
+
updateFormItem?: (field: string) => void;
|
|
34
|
+
};
|
|
35
|
+
export interface FormItemProps<FormData = any> {
|
|
36
|
+
label?: string;
|
|
37
|
+
labelAlign?: 'left' | 'right';
|
|
38
|
+
store?: FormInstance<FormData>;
|
|
39
|
+
children?: JSX.Element;
|
|
40
|
+
field?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface FormItemLabelProps {
|
|
43
|
+
label?: string;
|
|
44
|
+
}
|
|
45
|
+
export interface ControlProps {
|
|
46
|
+
children?: React.ReactNode;
|
|
47
|
+
cloneNode?: () => React.ReactNode;
|
|
48
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FormProps, innerCallbackType } from "./interface";
|
|
2
|
+
declare class Store<FormData = any> {
|
|
3
|
+
private initialValues;
|
|
4
|
+
private callbacks;
|
|
5
|
+
private registerWatchers;
|
|
6
|
+
setInitialValues: (values: Partial<FormData> | undefined) => void;
|
|
7
|
+
setCallBacks: (values: Pick<FormProps<FormData>, innerCallbackType>) => void;
|
|
8
|
+
getFieldValue: (field: string) => void;
|
|
9
|
+
getFieldsValues: (fields?: string[]) => {};
|
|
10
|
+
setFieldValue: (value: string, field: string) => void;
|
|
11
|
+
registerWatcher: (item: () => void) => void;
|
|
12
|
+
private notifyWatchers;
|
|
13
|
+
getCallBacks: () => Pick<FormProps<FormData>, "onSubmit">;
|
|
14
|
+
submit: () => void;
|
|
15
|
+
}
|
|
16
|
+
export default Store;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { BUITheme } from "../..";
|
|
3
|
+
import { InputVariant } from "./styles";
|
|
4
|
+
export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
5
|
+
label?: ReactNode;
|
|
6
|
+
variant: InputVariant;
|
|
7
|
+
theme?: BUITheme;
|
|
8
|
+
startAdornment?: ReactNode;
|
|
9
|
+
endAdornment?: ReactNode;
|
|
10
|
+
error?: boolean;
|
|
11
|
+
helperText?: string;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
inputClassName?: string;
|
|
14
|
+
inputSize?: "md" | "lg";
|
|
15
|
+
}
|
|
16
|
+
declare const LabelTextField: import("react").ForwardRefExoticComponent<InputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
17
|
+
export default LabelTextField;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { BUITheme } from "../../types/component";
|
|
2
|
+
export type InputVariant = "filled" | "outlined";
|
|
3
|
+
declare const LabelVariants: (props?: ({
|
|
4
|
+
theme?: "light" | "dark" | null | undefined;
|
|
5
|
+
size?: "md" | "lg" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
declare const AdornmentStyles: (props: {
|
|
8
|
+
size: "md" | "lg";
|
|
9
|
+
position: "start" | "end";
|
|
10
|
+
}) => string;
|
|
11
|
+
declare const InputBgVariants: ({ variant, theme, error, disabled, noClassName, size }: {
|
|
12
|
+
variant: InputVariant;
|
|
13
|
+
theme: BUITheme;
|
|
14
|
+
error?: boolean | undefined;
|
|
15
|
+
disabled?: boolean | undefined;
|
|
16
|
+
noClassName?: boolean | undefined;
|
|
17
|
+
size: "md" | "lg";
|
|
18
|
+
}) => string;
|
|
19
|
+
declare const HelperTextVariants: (props?: ({
|
|
20
|
+
theme?: "light" | "dark" | null | undefined;
|
|
21
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
22
|
+
declare const InputSizeTextStyle: (props?: ({
|
|
23
|
+
inputSize?: "md" | "lg" | null | undefined;
|
|
24
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
25
|
+
declare const InputSizeStyle: (props?: ({
|
|
26
|
+
inputSize?: "md" | "lg" | null | undefined;
|
|
27
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
28
|
+
declare const InputPlaceholderStyle: (props?: ({
|
|
29
|
+
theme?: "light" | "dark" | null | undefined;
|
|
30
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
31
|
+
declare const InputFocusedStyle: (props?: ({
|
|
32
|
+
theme?: "light" | "dark" | null | undefined;
|
|
33
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
34
|
+
export { HelperTextVariants, InputBgVariants, LabelVariants, AdornmentStyles, InputSizeTextStyle, InputSizeStyle, InputPlaceholderStyle, InputFocusedStyle };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { Locale } from "date-fns";
|
|
3
|
+
type MonthPickerProps = {
|
|
4
|
+
data: {
|
|
5
|
+
[key: number]: number[];
|
|
6
|
+
};
|
|
7
|
+
currentYear: number;
|
|
8
|
+
currentMonth: number;
|
|
9
|
+
setMonth: (value: Date) => void;
|
|
10
|
+
locale: Locale;
|
|
11
|
+
confirmText: string;
|
|
12
|
+
cancelText: string;
|
|
13
|
+
cancel: () => void;
|
|
14
|
+
confirm: () => void;
|
|
15
|
+
};
|
|
16
|
+
declare const MonthPicker: FC<MonthPickerProps>;
|
|
17
|
+
export default MonthPicker;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BUIComponentType, BUITheme } from "../../types/component";
|
|
2
|
+
declare const bgStyles: (props?: ({
|
|
3
|
+
theme?: "light" | "dark" | null | undefined;
|
|
4
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5
|
+
declare const textStyles: (props?: ({
|
|
6
|
+
theme?: "light" | "dark" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
declare const textbg: (props?: ({
|
|
9
|
+
theme?: "light" | "dark" | null | undefined;
|
|
10
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
|
+
declare const iconstyles: (type: BUIComponentType, theme: BUITheme) => string;
|
|
12
|
+
declare const closeIconStyles: (props?: ({
|
|
13
|
+
theme?: "light" | "dark" | null | undefined;
|
|
14
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
15
|
+
export { iconstyles, bgStyles, textStyles, closeIconStyles, textbg };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BUITheme } from "../../types/component";
|
|
2
|
+
export interface PageOptionProps {
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
sizeCanChange?: boolean;
|
|
5
|
+
sizeOptions?: number[];
|
|
6
|
+
onPageSizeChange?: (value: number) => void;
|
|
7
|
+
pageSize?: number;
|
|
8
|
+
theme?: BUITheme;
|
|
9
|
+
countPerPage?: string;
|
|
10
|
+
}
|
|
11
|
+
declare function PageOption(props: PageOptionProps): import("react/jsx-runtime").JSX.Element | null;
|
|
12
|
+
export default PageOption;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { CSSProperties } from "react";
|
|
2
|
+
import { BUITheme } from "../../types/component";
|
|
3
|
+
export interface PaginationProps {
|
|
4
|
+
/**
|
|
5
|
+
* Current page number
|
|
6
|
+
*/
|
|
7
|
+
currentPage: number;
|
|
8
|
+
/**
|
|
9
|
+
* Total page number
|
|
10
|
+
*/
|
|
11
|
+
totalPages?: number;
|
|
12
|
+
/**
|
|
13
|
+
* Current data items is smaller than pageSize to hide pagination
|
|
14
|
+
*/
|
|
15
|
+
hideOnSinglePage?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Called when the page number is changed
|
|
18
|
+
*/
|
|
19
|
+
onChange?: (pageNum: number) => void;
|
|
20
|
+
/**
|
|
21
|
+
* Called when the page number is changed
|
|
22
|
+
*/
|
|
23
|
+
className?: string;
|
|
24
|
+
theme?: BUITheme;
|
|
25
|
+
activeStyle?: CSSProperties;
|
|
26
|
+
total?: number;
|
|
27
|
+
sizeOptions?: number[];
|
|
28
|
+
sizeCanChange?: boolean;
|
|
29
|
+
onPageChange?: (currentPage: number, pageSize: number) => void;
|
|
30
|
+
pageSizeChangeResetCurrent?: boolean;
|
|
31
|
+
countPerPage?: string;
|
|
32
|
+
pageSize?: number;
|
|
33
|
+
}
|
|
34
|
+
export declare function Pagination({ totalPages, currentPage, onChange, className, theme, activeStyle, total, sizeOptions, sizeCanChange, onPageChange, pageSizeChangeResetCurrent, countPerPage, pageSize: propPageSize }: PaginationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const paginationVariants: (props?: ({
|
|
2
|
+
theme?: "light" | "dark" | null | undefined;
|
|
3
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
4
|
+
export declare const arrowVariants: (props?: ({
|
|
5
|
+
theme?: "light" | "dark" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EffectCallback } from 'react';
|
|
2
|
+
export declare const useMount: (callback: EffectCallback) => void;
|
|
3
|
+
declare const usePickerMethod: (list: any, selectedValue: any) => {
|
|
4
|
+
pickerColumnsEl: import("react").RefObject<HTMLDivElement>;
|
|
5
|
+
selected: any;
|
|
6
|
+
setSelected: import("react").Dispatch<any>;
|
|
7
|
+
selectIndex: (index: number) => void;
|
|
8
|
+
};
|
|
9
|
+
export default usePickerMethod;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type PickerProps = {
|
|
2
|
+
list: {
|
|
3
|
+
label: string;
|
|
4
|
+
value: number;
|
|
5
|
+
}[];
|
|
6
|
+
selectedValue: number;
|
|
7
|
+
setValue: (value: number) => void;
|
|
8
|
+
};
|
|
9
|
+
declare const Picker: ({ list, selectedValue, setValue }: PickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default Picker;
|