@bifrostui/react 1.3.2 → 1.4.0-beta.0
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/ActionSheet/ActionSheet.css +6 -3
- package/dist/ActionSheet/ActionSheetItem.css +10 -6
- package/dist/Alert/index.css +14 -8
- package/dist/Avatar/Avatar.css +13 -9
- package/dist/Avatar/AvatarGroup.css +15 -8
- package/dist/Backdrop/Backdrop.css +2 -1
- package/dist/Badge/Badge.css +27 -17
- package/dist/Breadcrumb/Breadcrumb.css +34 -0
- package/dist/Breadcrumb/Breadcrumb.d.ts +5 -0
- package/dist/Breadcrumb/Breadcrumb.js +128 -0
- package/dist/Breadcrumb/Breadcrumb.types.d.ts +49 -0
- package/dist/Breadcrumb/Breadcrumb.types.js +15 -0
- package/dist/Breadcrumb/BreadcrumbItem.d.ts +4 -0
- package/dist/Breadcrumb/BreadcrumbItem.js +78 -0
- package/dist/Breadcrumb/index.d.ts +4 -0
- package/dist/Breadcrumb/index.js +45 -0
- package/dist/Button/Button.css +37 -25
- package/dist/Calendar/Calendar.css +33 -18
- package/dist/Calendar/Calendar.d.ts +1 -1
- package/dist/Calendar/Calendar.js +38 -17
- package/dist/Calendar/Calendar.types.d.ts +21 -0
- package/dist/Card/CardFooter.css +2 -1
- package/dist/Card/CardHeader.css +3 -1
- package/dist/Checkbox/Checkbox.css +7 -5
- package/dist/CitySelector/CitySelector.css +29 -15
- package/dist/CitySelector/CitySelectorCore.js +25 -16
- package/dist/CitySelector/Selector/index.css +4 -4
- package/dist/Collapse/Collapse.css +6 -0
- package/dist/Collapse/Collapse.d.ts +5 -0
- package/dist/Collapse/Collapse.js +165 -0
- package/dist/Collapse/Collapse.types.d.ts +16 -0
- package/dist/Collapse/Collapse.types.js +15 -0
- package/dist/Collapse/index.d.ts +2 -0
- package/dist/Collapse/index.js +41 -0
- package/dist/CollapsePanel/CollapsePanel.css +32 -0
- package/dist/CollapsePanel/CollapsePanel.d.ts +5 -0
- package/dist/CollapsePanel/CollapsePanel.js +159 -0
- package/dist/CollapsePanel/CollapsePanel.types.d.ts +64 -0
- package/dist/CollapsePanel/CollapsePanel.types.js +15 -0
- package/dist/CollapsePanel/CollapsePanelItem.d.ts +4 -0
- package/dist/CollapsePanel/CollapsePanelItem.js +112 -0
- package/dist/CollapsePanel/index.d.ts +4 -0
- package/dist/CollapsePanel/index.js +45 -0
- package/dist/Countdown/Countdown.css +2 -1
- package/dist/Dialog/Dialog.d.ts +2 -2
- package/dist/Dialog/Dialog.js +20 -8
- package/dist/Dialog/Dialog.types.d.ts +12 -1
- package/dist/Dialog/FunctionalDialog.js +38 -2
- package/dist/Dialog/index.css +27 -18
- package/dist/Divider/Divider.css +6 -4
- package/dist/IconButton/IconButton.css +9 -7
- package/dist/Image/index.css +2 -1
- package/dist/Input/Input.css +14 -7
- package/dist/List/List.css +3 -0
- package/dist/List/ListItem.css +3 -3
- package/dist/List/ListItemContent.css +1 -1
- package/dist/Loading/Loading.css +4 -2
- package/dist/NavBar/NavBar.css +9 -5
- package/dist/Picker/Picker.css +25 -29
- package/dist/Picker/Picker.js +31 -11
- package/dist/Picker/Picker.types.d.ts +4 -0
- package/dist/Picker/PickerPanel.css +8 -8
- package/dist/Picker/PickerPanel.js +14 -8
- package/dist/Picker/utils.d.ts +16 -0
- package/dist/Picker/utils.js +32 -2
- package/dist/Popover/Popover.css +97 -0
- package/dist/Popover/Popover.d.ts +5 -0
- package/dist/Popover/Popover.js +195 -0
- package/dist/Popover/Popover.types.d.ts +58 -0
- package/dist/Popover/Popover.types.js +15 -0
- package/dist/Popover/index.d.ts +2 -0
- package/dist/Popover/index.js +41 -0
- package/dist/Portal/Portal.types.d.ts +4 -0
- package/dist/Portal/PortalCore.js +8 -1
- package/dist/Progress/Progress.css +9 -7
- package/dist/Radio/Radio.css +5 -4
- package/dist/Rating/Rating.css +8 -4
- package/dist/Select/Select.css +21 -10
- package/dist/Select/Select.js +1 -1
- package/dist/Select/SelectOption.js +3 -0
- package/dist/Skeleton/Skeleton.css +5 -5
- package/dist/Slider/Slider.css +29 -18
- package/dist/Steps/Step.css +13 -13
- package/dist/Steps/Steps.css +14 -7
- package/dist/Swiper/Swiper.css +2 -1
- package/dist/Switch/Switch.css +31 -16
- package/dist/TabBar/TabBar.css +7 -3
- package/dist/TabBar/TabBarItem.css +0 -1
- package/dist/Tabs/Tab.css +6 -10
- package/dist/Tabs/Tabs.css +10 -9
- package/dist/Tag/Tag.css +7 -10
- package/dist/Tag/TagGroup.css +9 -1
- package/dist/TextArea/TextArea.css +23 -13
- package/dist/ThemeProvider/ThemeProvider.d.ts +4 -0
- package/dist/ThemeProvider/ThemeProvider.js +91 -0
- package/dist/ThemeProvider/ThemeProvider.types.d.ts +127 -0
- package/dist/ThemeProvider/ThemeProvider.types.js +27 -0
- package/dist/ThemeProvider/hooks/ThemeContext.d.ts +4 -0
- package/dist/ThemeProvider/hooks/ThemeContext.js +35 -0
- package/dist/ThemeProvider/hooks/createTheme.d.ts +2 -0
- package/dist/ThemeProvider/hooks/createTheme.js +55 -0
- package/dist/ThemeProvider/hooks/index.d.ts +4 -0
- package/dist/ThemeProvider/hooks/index.js +43 -0
- package/dist/ThemeProvider/hooks/useTheme.d.ts +1 -0
- package/dist/ThemeProvider/hooks/useTheme.js +39 -0
- package/dist/ThemeProvider/index.d.ts +4 -0
- package/dist/ThemeProvider/index.js +45 -0
- package/dist/ThemeProvider/utils/constants.d.ts +38 -0
- package/dist/ThemeProvider/utils/constants.js +65 -0
- package/dist/ThemeProvider/utils/index.d.ts +2 -0
- package/dist/ThemeProvider/utils/index.js +23 -0
- package/dist/ThemeProvider/utils/mountTokens.d.ts +26 -0
- package/dist/ThemeProvider/utils/mountTokens.js +123 -0
- package/dist/Toast/FunctionalToast.js +18 -0
- package/dist/Toast/Toast.css +18 -20
- package/dist/Toast/Toast.d.ts +2 -2
- package/dist/Toast/Toast.js +52 -48
- package/dist/Toast/Toast.types.d.ts +15 -1
- package/dist/Tooltip/Tooltip.css +91 -0
- package/dist/Tooltip/Tooltip.d.ts +5 -0
- package/dist/Tooltip/Tooltip.js +184 -0
- package/dist/Tooltip/Tooltip.types.d.ts +49 -0
- package/dist/Tooltip/Tooltip.types.js +15 -0
- package/dist/Tooltip/index.d.ts +2 -0
- package/dist/Tooltip/index.js +41 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +15 -1
- package/dist/locales/base.d.ts +40 -0
- package/dist/locales/base.js +15 -0
- package/dist/locales/en-US.d.ts +3 -0
- package/dist/locales/en-US.js +69 -0
- package/dist/locales/hooks/useLocaleText.d.ts +3 -0
- package/dist/locales/hooks/useLocaleText.js +43 -0
- package/dist/locales/index.d.ts +5 -0
- package/dist/locales/index.js +49 -0
- package/dist/locales/zh-CN.d.ts +3 -0
- package/dist/locales/zh-CN.js +51 -0
- package/dist/locales/zh-TW.d.ts +3 -0
- package/dist/locales/zh-TW.js +51 -0
- package/es/ActionSheet/ActionSheet.css +6 -3
- package/es/ActionSheet/ActionSheetItem.css +10 -6
- package/es/Alert/index.css +14 -8
- package/es/Avatar/Avatar.css +13 -9
- package/es/Avatar/AvatarGroup.css +15 -8
- package/es/Backdrop/Backdrop.css +2 -1
- package/es/Badge/Badge.css +27 -17
- package/es/Breadcrumb/Breadcrumb.css +34 -0
- package/es/Breadcrumb/Breadcrumb.d.ts +5 -0
- package/es/Breadcrumb/Breadcrumb.js +101 -0
- package/es/Breadcrumb/Breadcrumb.types.d.ts +49 -0
- package/es/Breadcrumb/Breadcrumb.types.js +1 -0
- package/es/Breadcrumb/BreadcrumbItem.d.ts +4 -0
- package/es/Breadcrumb/BreadcrumbItem.js +51 -0
- package/es/Breadcrumb/index.d.ts +4 -0
- package/es/Breadcrumb/index.js +9 -0
- package/es/Button/Button.css +37 -25
- package/es/Calendar/Calendar.css +33 -18
- package/es/Calendar/Calendar.d.ts +1 -1
- package/es/Calendar/Calendar.js +38 -17
- package/es/Calendar/Calendar.types.d.ts +21 -0
- package/es/Card/CardFooter.css +2 -1
- package/es/Card/CardHeader.css +3 -1
- package/es/Checkbox/Checkbox.css +7 -5
- package/es/CitySelector/CitySelector.css +29 -15
- package/es/CitySelector/CitySelectorCore.js +25 -16
- package/es/CitySelector/Selector/index.css +4 -4
- package/es/Collapse/Collapse.css +6 -0
- package/es/Collapse/Collapse.d.ts +5 -0
- package/es/Collapse/Collapse.js +144 -0
- package/es/Collapse/Collapse.types.d.ts +16 -0
- package/es/Collapse/Collapse.types.js +1 -0
- package/es/Collapse/index.d.ts +2 -0
- package/es/Collapse/index.js +6 -0
- package/es/CollapsePanel/CollapsePanel.css +32 -0
- package/es/CollapsePanel/CollapsePanel.d.ts +5 -0
- package/es/CollapsePanel/CollapsePanel.js +132 -0
- package/es/CollapsePanel/CollapsePanel.types.d.ts +64 -0
- package/es/CollapsePanel/CollapsePanel.types.js +1 -0
- package/es/CollapsePanel/CollapsePanelItem.d.ts +4 -0
- package/es/CollapsePanel/CollapsePanelItem.js +85 -0
- package/es/CollapsePanel/index.d.ts +4 -0
- package/es/CollapsePanel/index.js +9 -0
- package/es/Countdown/Countdown.css +2 -1
- package/es/Dialog/Dialog.d.ts +2 -2
- package/es/Dialog/Dialog.js +20 -8
- package/es/Dialog/Dialog.types.d.ts +12 -1
- package/es/Dialog/FunctionalDialog.js +38 -2
- package/es/Dialog/index.css +27 -18
- package/es/Divider/Divider.css +6 -4
- package/es/IconButton/IconButton.css +9 -7
- package/es/Image/index.css +2 -1
- package/es/Input/Input.css +14 -7
- package/es/List/List.css +3 -0
- package/es/List/ListItem.css +3 -3
- package/es/List/ListItemContent.css +1 -1
- package/es/Loading/Loading.css +4 -2
- package/es/Modal/Modal.miniapp.d.ts +1 -1
- package/es/NavBar/NavBar.css +9 -5
- package/es/Picker/Picker.css +25 -29
- package/es/Picker/Picker.js +32 -12
- package/es/Picker/Picker.types.d.ts +4 -0
- package/es/Picker/PickerPanel.css +8 -8
- package/es/Picker/PickerPanel.js +14 -8
- package/es/Picker/utils.d.ts +16 -0
- package/es/Picker/utils.js +29 -1
- package/es/Popover/Popover.css +97 -0
- package/es/Popover/Popover.d.ts +5 -0
- package/es/Popover/Popover.js +172 -0
- package/es/Popover/Popover.types.d.ts +58 -0
- package/es/Popover/Popover.types.js +1 -0
- package/es/Popover/index.d.ts +2 -0
- package/es/Popover/index.js +6 -0
- package/es/Portal/Portal.types.d.ts +4 -0
- package/es/Portal/PortalCore.js +8 -1
- package/es/Progress/Progress.css +9 -7
- package/es/Radio/Radio.css +5 -4
- package/es/Rating/Rating.css +8 -4
- package/es/Select/Select.css +21 -10
- package/es/Select/Select.js +1 -1
- package/es/Select/SelectOption.js +3 -0
- package/es/Skeleton/Skeleton.css +5 -5
- package/es/Slider/Slider.css +29 -18
- package/es/Steps/Step.css +13 -13
- package/es/Steps/Steps.css +14 -7
- package/es/Swiper/Swiper.css +2 -1
- package/es/Switch/Switch.css +31 -16
- package/es/TabBar/TabBar.css +7 -3
- package/es/TabBar/TabBarItem.css +0 -1
- package/es/Tabs/Tab.css +6 -10
- package/es/Tabs/Tabs.css +10 -9
- package/es/Tag/Tag.css +7 -10
- package/es/Tag/TagGroup.css +9 -1
- package/es/TextArea/TextArea.css +23 -13
- package/es/ThemeProvider/ThemeProvider.d.ts +4 -0
- package/es/ThemeProvider/ThemeProvider.js +62 -0
- package/es/ThemeProvider/ThemeProvider.types.d.ts +127 -0
- package/es/ThemeProvider/ThemeProvider.types.js +1 -0
- package/es/ThemeProvider/hooks/ThemeContext.d.ts +4 -0
- package/es/ThemeProvider/hooks/ThemeContext.js +6 -0
- package/es/ThemeProvider/hooks/createTheme.d.ts +2 -0
- package/es/ThemeProvider/hooks/createTheme.js +38 -0
- package/es/ThemeProvider/hooks/index.d.ts +4 -0
- package/es/ThemeProvider/hooks/index.js +8 -0
- package/es/ThemeProvider/hooks/useTheme.d.ts +1 -0
- package/es/ThemeProvider/hooks/useTheme.js +10 -0
- package/es/ThemeProvider/index.d.ts +4 -0
- package/es/ThemeProvider/index.js +8 -0
- package/es/ThemeProvider/utils/constants.d.ts +38 -0
- package/es/ThemeProvider/utils/constants.js +40 -0
- package/es/ThemeProvider/utils/index.d.ts +2 -0
- package/es/ThemeProvider/utils/index.js +2 -0
- package/es/ThemeProvider/utils/mountTokens.d.ts +26 -0
- package/es/ThemeProvider/utils/mountTokens.js +88 -0
- package/es/Toast/FunctionalToast.js +18 -0
- package/es/Toast/Toast.css +18 -20
- package/es/Toast/Toast.d.ts +2 -2
- package/es/Toast/Toast.js +53 -49
- package/es/Toast/Toast.types.d.ts +15 -1
- package/es/Tooltip/Tooltip.css +91 -0
- package/es/Tooltip/Tooltip.d.ts +5 -0
- package/es/Tooltip/Tooltip.js +161 -0
- package/es/Tooltip/Tooltip.types.d.ts +49 -0
- package/es/Tooltip/Tooltip.types.js +1 -0
- package/es/Tooltip/index.d.ts +2 -0
- package/es/Tooltip/index.js +6 -0
- package/es/index.d.ts +7 -0
- package/es/index.js +7 -0
- package/es/locales/base.d.ts +40 -0
- package/es/locales/base.js +0 -0
- package/es/locales/en-US.d.ts +3 -0
- package/es/locales/en-US.js +50 -0
- package/es/locales/hooks/useLocaleText.d.ts +3 -0
- package/es/locales/hooks/useLocaleText.js +26 -0
- package/es/locales/index.d.ts +5 -0
- package/es/locales/index.js +11 -0
- package/es/locales/zh-CN.d.ts +3 -0
- package/es/locales/zh-CN.js +32 -0
- package/es/locales/zh-TW.d.ts +3 -0
- package/es/locales/zh-TW.js +32 -0
- package/package.json +5 -5
|
@@ -125,6 +125,24 @@ functionalToast.clear = () => {
|
|
|
125
125
|
destroyAll();
|
|
126
126
|
});
|
|
127
127
|
};
|
|
128
|
+
const useToast = () => {
|
|
129
|
+
const holderRef = React.useRef(null);
|
|
130
|
+
["warning", "loading", "success", "fail"].forEach((methodName) => {
|
|
131
|
+
functionalToast[methodName] = (options) => functionalToast(__spreadProps(__spreadValues({
|
|
132
|
+
type: methodName
|
|
133
|
+
}, formatProps(options)), {
|
|
134
|
+
theme: holderRef.current.theme
|
|
135
|
+
}));
|
|
136
|
+
});
|
|
137
|
+
functionalToast.clear = () => {
|
|
138
|
+
setTimeout(() => {
|
|
139
|
+
destroyAll();
|
|
140
|
+
});
|
|
141
|
+
};
|
|
142
|
+
const wrapAPI = functionalToast;
|
|
143
|
+
return [wrapAPI, /* @__PURE__ */ React.createElement(ToastView, { key: "toast-holder", ref: holderRef })];
|
|
144
|
+
};
|
|
145
|
+
functionalToast.useToast = useToast;
|
|
128
146
|
const Toast = functionalToast;
|
|
129
147
|
var FunctionalToast_default = Toast;
|
|
130
148
|
export {
|
package/es/Toast/Toast.css
CHANGED
|
@@ -1,30 +1,28 @@
|
|
|
1
1
|
.bui-toast {
|
|
2
|
-
--min-width: 86px;
|
|
3
|
-
--max-width: 80
|
|
4
|
-
--
|
|
5
|
-
--
|
|
6
|
-
--
|
|
7
|
-
--
|
|
8
|
-
--
|
|
9
|
-
--
|
|
10
|
-
--
|
|
11
|
-
--
|
|
12
|
-
--border-radius: var(--bui-shape-radius-default);
|
|
13
|
-
--text-align: center;
|
|
2
|
+
--min-width: var(--bui-toast-min-width, 86px);
|
|
3
|
+
--max-width: var(--bui-toast-max-width, 80%);
|
|
4
|
+
--flex-direction: var(--bui-toast-flex-direction, column);
|
|
5
|
+
--padding: var(--bui-toast-padding, var(--bui-spacing-xl));
|
|
6
|
+
--position-top: var(--bui-toast-position-top, 15%);
|
|
7
|
+
--position-bottom: var(--bui-toast-position-bottom, 85%);
|
|
8
|
+
--background-color: var(--bui-toast-bg-color, rgba(0, 0, 0, 0.8));
|
|
9
|
+
--border-radius: var(--bui-toast-border-radius, --bui-shape-radius-default);
|
|
10
|
+
--icon-margin: var(--bui-toast-icon-margin-bottom, 8px);
|
|
11
|
+
--icon-font-size: var(--bui-toast-icon-font-size, 30px);
|
|
14
12
|
position: fixed;
|
|
15
13
|
left: 50%;
|
|
16
|
-
z-index: var(--z-index);
|
|
14
|
+
z-index: var(--bui-z-index-toast);
|
|
17
15
|
width: fit-content;
|
|
18
16
|
min-width: var(--min-width);
|
|
19
17
|
max-width: var(--max-width);
|
|
20
18
|
padding: var(--padding);
|
|
21
|
-
font-size: var(--
|
|
22
|
-
color: var(--color);
|
|
19
|
+
font-size: var(--bui-text-size-1);
|
|
20
|
+
color: var(--bui-color-white);
|
|
23
21
|
border-radius: var(--border-radius);
|
|
24
|
-
word-break:
|
|
22
|
+
word-break: break-all;
|
|
25
23
|
white-space: pre-wrap;
|
|
26
24
|
background-color: var(--background-color);
|
|
27
|
-
text-align:
|
|
25
|
+
text-align: center;
|
|
28
26
|
font-family: var(--bui-font-family);
|
|
29
27
|
}
|
|
30
28
|
.bui-toast.bui-toast-allow-click {
|
|
@@ -46,10 +44,10 @@
|
|
|
46
44
|
}
|
|
47
45
|
.bui-toast-icon {
|
|
48
46
|
display: flex;
|
|
49
|
-
flex-direction:
|
|
47
|
+
flex-direction: var(--flex-direction);
|
|
50
48
|
align-items: center;
|
|
51
49
|
}
|
|
52
50
|
.bui-toast-icon .bui-svg-icon {
|
|
53
|
-
margin
|
|
54
|
-
font-size:
|
|
51
|
+
margin: 0 0 var(--icon-margin);
|
|
52
|
+
font-size: var(--icon-font-size);
|
|
55
53
|
}
|
package/es/Toast/Toast.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ToastProps } from './Toast.types';
|
|
2
|
+
import { ToastProps, ToastRef } from './Toast.types';
|
|
3
3
|
import './Toast.less';
|
|
4
|
-
declare const ToastComponent: React.ForwardRefExoticComponent<ToastProps & React.RefAttributes<
|
|
4
|
+
declare const ToastComponent: React.ForwardRefExoticComponent<ToastProps & React.RefAttributes<ToastRef>>;
|
|
5
5
|
export default ToastComponent;
|
package/es/Toast/Toast.js
CHANGED
|
@@ -30,7 +30,7 @@ var __objRest = (source, exclude) => {
|
|
|
30
30
|
return target;
|
|
31
31
|
};
|
|
32
32
|
import clsx from "clsx";
|
|
33
|
-
import React from "react";
|
|
33
|
+
import React, { useImperativeHandle } from "react";
|
|
34
34
|
import {
|
|
35
35
|
ErrorCircleFilledBoldIcon,
|
|
36
36
|
AccessTimeCircleFilledBoldIcon,
|
|
@@ -38,56 +38,60 @@ import {
|
|
|
38
38
|
SuccessCircleFilledBoldIcon
|
|
39
39
|
} from "@bifrostui/icons";
|
|
40
40
|
import Fade from "../Fade";
|
|
41
|
+
import { useTheme } from "../ThemeProvider";
|
|
41
42
|
import "./Toast.css";
|
|
42
43
|
const prefixCls = "bui-toast";
|
|
43
|
-
const ToastComponent = /* @__PURE__ */ React.forwardRef(
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
44
|
+
const ToastComponent = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
45
|
+
const _a = props, {
|
|
46
|
+
className,
|
|
47
|
+
style,
|
|
48
|
+
open,
|
|
49
|
+
type,
|
|
50
|
+
icon,
|
|
51
|
+
message,
|
|
52
|
+
position = "center",
|
|
53
|
+
disableClick = false,
|
|
54
|
+
theme
|
|
55
|
+
} = _a, others = __objRest(_a, [
|
|
56
|
+
"className",
|
|
57
|
+
"style",
|
|
58
|
+
"open",
|
|
59
|
+
"type",
|
|
60
|
+
"icon",
|
|
61
|
+
"message",
|
|
62
|
+
"position",
|
|
63
|
+
"disableClick",
|
|
64
|
+
"theme"
|
|
65
|
+
]);
|
|
66
|
+
const themeConfig = useTheme(theme);
|
|
67
|
+
useImperativeHandle(ref, () => {
|
|
68
|
+
return { theme: themeConfig };
|
|
69
|
+
}, []);
|
|
70
|
+
const iconMap = {
|
|
71
|
+
fail: /* @__PURE__ */ React.createElement(ErrorCircleFilledBoldIcon, { htmlColor: "#ffffff" }),
|
|
72
|
+
loading: /* @__PURE__ */ React.createElement(AccessTimeCircleFilledBoldIcon, { htmlColor: "#ffffff" }),
|
|
73
|
+
warning: /* @__PURE__ */ React.createElement(AlertCircleFilledBoldIcon, { htmlColor: "#ffffff" }),
|
|
74
|
+
success: /* @__PURE__ */ React.createElement(SuccessCircleFilledBoldIcon, { htmlColor: "#ffffff" })
|
|
75
|
+
};
|
|
76
|
+
const iconDom = iconMap[type] || icon;
|
|
77
|
+
return /* @__PURE__ */ React.createElement(Fade, __spreadProps(__spreadValues({}, others), { in: open, appear: false, unmountOnExit: true }), /* @__PURE__ */ React.createElement(
|
|
78
|
+
"div",
|
|
79
|
+
{
|
|
80
|
+
className: clsx(
|
|
81
|
+
prefixCls,
|
|
82
|
+
`${prefixCls}-${position}`,
|
|
83
|
+
{
|
|
84
|
+
[`${prefixCls}-icon`]: !!iconDom,
|
|
85
|
+
[`${prefixCls}-allow-click`]: !disableClick
|
|
86
|
+
},
|
|
87
|
+
className
|
|
88
|
+
),
|
|
89
|
+
style
|
|
90
|
+
},
|
|
91
|
+
iconDom,
|
|
92
|
+
message
|
|
93
|
+
));
|
|
94
|
+
});
|
|
91
95
|
ToastComponent.displayName = "BuiToast";
|
|
92
96
|
var Toast_default = ToastComponent;
|
|
93
97
|
export {
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FadeProps } from '../Fade/Fade.types';
|
|
3
|
+
import { ThemeProps } from '../ThemeProvider/ThemeProvider.types';
|
|
4
|
+
export type ToastRef = {
|
|
5
|
+
theme?: ThemeProps;
|
|
6
|
+
};
|
|
3
7
|
/**
|
|
4
8
|
* 提示类型
|
|
5
9
|
*/
|
|
@@ -36,6 +40,10 @@ export interface ToastProps extends FadeProps {
|
|
|
36
40
|
* 自定义图标
|
|
37
41
|
*/
|
|
38
42
|
icon?: React.ReactNode;
|
|
43
|
+
/**
|
|
44
|
+
* theme 主题定制
|
|
45
|
+
*/
|
|
46
|
+
theme?: ThemeProps;
|
|
39
47
|
/**
|
|
40
48
|
* 展示Toast时,页面内容是否可以点击
|
|
41
49
|
* @default false
|
|
@@ -62,7 +70,7 @@ export type ToastReturnType = {
|
|
|
62
70
|
/**
|
|
63
71
|
* Toast Instance
|
|
64
72
|
*/
|
|
65
|
-
export interface
|
|
73
|
+
export interface ToastFunction {
|
|
66
74
|
(options: ToastOptions): ToastReturnType;
|
|
67
75
|
/**
|
|
68
76
|
* 警告提示
|
|
@@ -85,3 +93,9 @@ export interface ToastInstance {
|
|
|
85
93
|
*/
|
|
86
94
|
clear: () => void;
|
|
87
95
|
}
|
|
96
|
+
export interface ToastInstance extends ToastFunction {
|
|
97
|
+
/**
|
|
98
|
+
* 获取toast静态方法 & contextHolder
|
|
99
|
+
*/
|
|
100
|
+
useToast: () => [ToastFunction, React.JSX.Element];
|
|
101
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
.bui-tooltip {
|
|
2
|
+
--arrow-size: var(--bui-tooltip-arrow-size, 8PX);
|
|
3
|
+
--localtion-position: var(--bui-tooltip-localtion-position, 8PX);
|
|
4
|
+
--max-width: var(--bui-tooltip-max-width, 350px);
|
|
5
|
+
--content-min-width: var(--bui-tooltip-content-min-width, 30px);
|
|
6
|
+
--content-min-height: var(--bui-tooltip-content-min-height, 32px);
|
|
7
|
+
--content-padding: var(--bui-tooltip-content-padding, 6px 8px);
|
|
8
|
+
max-width: var(--max-width);
|
|
9
|
+
font-size: var(--bui-text-size-1);
|
|
10
|
+
position: absolute;
|
|
11
|
+
visibility: hidden;
|
|
12
|
+
z-index: var(--bui-z-index-tooltip);
|
|
13
|
+
}
|
|
14
|
+
.bui-tooltip .bui-tooltip-arrow {
|
|
15
|
+
width: 0;
|
|
16
|
+
height: 0;
|
|
17
|
+
position: absolute;
|
|
18
|
+
}
|
|
19
|
+
.bui-tooltip .bui-tooltip-arrow.location-left {
|
|
20
|
+
left: var(--localtion-position);
|
|
21
|
+
}
|
|
22
|
+
.bui-tooltip .bui-tooltip-arrow.location-right {
|
|
23
|
+
right: var(--localtion-position);
|
|
24
|
+
}
|
|
25
|
+
.bui-tooltip .bui-tooltip-arrow.location-top {
|
|
26
|
+
top: var(--localtion-position);
|
|
27
|
+
}
|
|
28
|
+
.bui-tooltip .bui-tooltip-arrow.location-bottom {
|
|
29
|
+
bottom: var(--localtion-position);
|
|
30
|
+
}
|
|
31
|
+
.bui-tooltip.tooltip-top .location-center,
|
|
32
|
+
.bui-tooltip.tooltip-bottom .location-center {
|
|
33
|
+
left: 50%;
|
|
34
|
+
transform: translateX(-50%);
|
|
35
|
+
}
|
|
36
|
+
.bui-tooltip.tooltip-left .location-center,
|
|
37
|
+
.bui-tooltip.tooltip-right .location-center {
|
|
38
|
+
top: 50%;
|
|
39
|
+
transform: translateY(-50%);
|
|
40
|
+
}
|
|
41
|
+
.bui-tooltip.tooltip-top {
|
|
42
|
+
padding-bottom: var(--arrow-size);
|
|
43
|
+
}
|
|
44
|
+
.bui-tooltip.tooltip-top .bui-tooltip-arrow {
|
|
45
|
+
border-left: var(--arrow-size) solid transparent;
|
|
46
|
+
border-right: var(--arrow-size) solid transparent;
|
|
47
|
+
border-top: var(--arrow-size) solid var(--bui-color-bg-alpha-dark-7);
|
|
48
|
+
bottom: 0;
|
|
49
|
+
}
|
|
50
|
+
.bui-tooltip.tooltip-bottom {
|
|
51
|
+
padding-top: var(--arrow-size);
|
|
52
|
+
}
|
|
53
|
+
.bui-tooltip.tooltip-bottom .bui-tooltip-arrow {
|
|
54
|
+
border-left: var(--arrow-size) solid transparent;
|
|
55
|
+
border-right: var(--arrow-size) solid transparent;
|
|
56
|
+
border-bottom: var(--arrow-size) solid var(--bui-color-bg-alpha-dark-7);
|
|
57
|
+
top: 0;
|
|
58
|
+
}
|
|
59
|
+
.bui-tooltip.tooltip-left {
|
|
60
|
+
padding-right: var(--arrow-size);
|
|
61
|
+
}
|
|
62
|
+
.bui-tooltip.tooltip-left .bui-tooltip-arrow {
|
|
63
|
+
border-top: var(--arrow-size) solid transparent;
|
|
64
|
+
border-bottom: var(--arrow-size) solid transparent;
|
|
65
|
+
border-left: var(--arrow-size) solid var(--bui-color-bg-alpha-dark-7);
|
|
66
|
+
right: 0;
|
|
67
|
+
}
|
|
68
|
+
.bui-tooltip.tooltip-right {
|
|
69
|
+
padding-left: var(--arrow-size);
|
|
70
|
+
}
|
|
71
|
+
.bui-tooltip.tooltip-right .bui-tooltip-arrow {
|
|
72
|
+
border-top: var(--arrow-size) solid transparent;
|
|
73
|
+
border-bottom: var(--arrow-size) solid transparent;
|
|
74
|
+
border-right: var(--arrow-size) solid var(--bui-color-bg-alpha-dark-7);
|
|
75
|
+
left: 0;
|
|
76
|
+
}
|
|
77
|
+
.bui-tooltip .bui-tooltip-content {
|
|
78
|
+
min-width: var(--content-min-width);
|
|
79
|
+
min-height: var(--content-min-height);
|
|
80
|
+
padding: var(--content-padding);
|
|
81
|
+
color: var(--bui-color-white);
|
|
82
|
+
text-align: left;
|
|
83
|
+
text-decoration: none;
|
|
84
|
+
word-wrap: break-word;
|
|
85
|
+
background-color: var(--bui-color-bg-alpha-dark-7);
|
|
86
|
+
border-radius: var(--bui-shape-radius-poster);
|
|
87
|
+
box-shadow:
|
|
88
|
+
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
89
|
+
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
90
|
+
0 9px 28px 8px rgba(0, 0, 0, 0.05);
|
|
91
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __objRest = (source, exclude) => {
|
|
21
|
+
var target = {};
|
|
22
|
+
for (var prop in source)
|
|
23
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
+
target[prop] = source[prop];
|
|
25
|
+
if (source != null && __getOwnPropSymbols)
|
|
26
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
};
|
|
32
|
+
import clsx from "clsx";
|
|
33
|
+
import React, { useState, useRef, useEffect } from "react";
|
|
34
|
+
import {
|
|
35
|
+
getStylesAndLocation,
|
|
36
|
+
triggerEventTransform,
|
|
37
|
+
useUniqueId
|
|
38
|
+
} from "@bifrostui/utils";
|
|
39
|
+
import Portal from "../Portal";
|
|
40
|
+
import "./Tooltip.css";
|
|
41
|
+
const prefixCls = "bui-tooltip";
|
|
42
|
+
const Tooltip = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
43
|
+
const _a = props, {
|
|
44
|
+
className,
|
|
45
|
+
style,
|
|
46
|
+
children,
|
|
47
|
+
title,
|
|
48
|
+
defaultOpen,
|
|
49
|
+
placement = "top",
|
|
50
|
+
trigger,
|
|
51
|
+
onOpenChange,
|
|
52
|
+
open,
|
|
53
|
+
PortalProps
|
|
54
|
+
} = _a, others = __objRest(_a, [
|
|
55
|
+
"className",
|
|
56
|
+
"style",
|
|
57
|
+
"children",
|
|
58
|
+
"title",
|
|
59
|
+
"defaultOpen",
|
|
60
|
+
"placement",
|
|
61
|
+
"trigger",
|
|
62
|
+
"onOpenChange",
|
|
63
|
+
"open",
|
|
64
|
+
"PortalProps"
|
|
65
|
+
]);
|
|
66
|
+
const controlByUser = typeof open !== "undefined";
|
|
67
|
+
const positionArr = placement.split(/([A-Z])/);
|
|
68
|
+
const direction = positionArr[0];
|
|
69
|
+
let location;
|
|
70
|
+
if (positionArr.length > 1) {
|
|
71
|
+
positionArr.splice(0, 1);
|
|
72
|
+
location = positionArr.join("").toLowerCase();
|
|
73
|
+
} else {
|
|
74
|
+
location = "center";
|
|
75
|
+
}
|
|
76
|
+
const childrenRef = useRef();
|
|
77
|
+
const [openStatus, setOpenStatus] = useState(defaultOpen);
|
|
78
|
+
const [arrowDirection, setArrowDirection] = useState(direction);
|
|
79
|
+
const [arrowLocation, setArrowLocation] = useState(location);
|
|
80
|
+
const [tooltyles, setTooltyles] = useState({});
|
|
81
|
+
const ttId = useUniqueId();
|
|
82
|
+
useEffect(() => {
|
|
83
|
+
if (!controlByUser)
|
|
84
|
+
return;
|
|
85
|
+
setOpenStatus(open);
|
|
86
|
+
}, [open]);
|
|
87
|
+
const onRootElementMouted = () => {
|
|
88
|
+
const result = getStylesAndLocation({
|
|
89
|
+
childrenRef,
|
|
90
|
+
arrowDirection,
|
|
91
|
+
arrowLocation,
|
|
92
|
+
selector: `[data-id="tt_${ttId}"]`
|
|
93
|
+
});
|
|
94
|
+
if (!result)
|
|
95
|
+
return;
|
|
96
|
+
const { styles, newArrowDirection, newArrowLocation } = result;
|
|
97
|
+
if (newArrowDirection !== arrowDirection) {
|
|
98
|
+
setArrowDirection(newArrowDirection);
|
|
99
|
+
}
|
|
100
|
+
if (newArrowLocation !== arrowLocation) {
|
|
101
|
+
setArrowLocation(newArrowLocation);
|
|
102
|
+
}
|
|
103
|
+
setTooltyles(styles);
|
|
104
|
+
};
|
|
105
|
+
const changeOpenStatus = (event, status) => {
|
|
106
|
+
if (controlByUser)
|
|
107
|
+
return;
|
|
108
|
+
setOpenStatus(status);
|
|
109
|
+
onOpenChange == null ? void 0 : onOpenChange(event, { open: status });
|
|
110
|
+
};
|
|
111
|
+
const triggerClick = (event) => {
|
|
112
|
+
const targetStatus = !openStatus;
|
|
113
|
+
changeOpenStatus(event, targetStatus);
|
|
114
|
+
};
|
|
115
|
+
const hideTooltip = (event) => {
|
|
116
|
+
changeOpenStatus(event, false);
|
|
117
|
+
};
|
|
118
|
+
const showTooltip = (event) => {
|
|
119
|
+
changeOpenStatus(event, true);
|
|
120
|
+
};
|
|
121
|
+
let triggerEventOption;
|
|
122
|
+
if (!controlByUser) {
|
|
123
|
+
triggerEventOption = triggerEventTransform({
|
|
124
|
+
trigger,
|
|
125
|
+
click: triggerClick,
|
|
126
|
+
show: showTooltip,
|
|
127
|
+
hide: hideTooltip
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
const childrenOptions = __spreadValues({
|
|
131
|
+
ref: childrenRef
|
|
132
|
+
}, triggerEventOption);
|
|
133
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, (open || openStatus) && title ? /* @__PURE__ */ React.createElement(
|
|
134
|
+
Portal,
|
|
135
|
+
__spreadProps(__spreadValues({
|
|
136
|
+
onRootElementMouted
|
|
137
|
+
}, PortalProps), {
|
|
138
|
+
ref
|
|
139
|
+
}),
|
|
140
|
+
/* @__PURE__ */ React.createElement(
|
|
141
|
+
"div",
|
|
142
|
+
__spreadValues({
|
|
143
|
+
className: clsx(prefixCls, className, `tooltip-${arrowDirection}`),
|
|
144
|
+
style: __spreadValues(__spreadValues({}, style), tooltyles),
|
|
145
|
+
"data-id": `tt_${ttId}`
|
|
146
|
+
}, others),
|
|
147
|
+
/* @__PURE__ */ React.createElement(
|
|
148
|
+
"div",
|
|
149
|
+
{
|
|
150
|
+
className: clsx("bui-tooltip-arrow", `location-${arrowLocation}`)
|
|
151
|
+
}
|
|
152
|
+
),
|
|
153
|
+
/* @__PURE__ */ React.createElement("div", { className: "bui-tooltip-content" }, title)
|
|
154
|
+
)
|
|
155
|
+
) : null, React.isValidElement(children) ? React.cloneElement(children, childrenOptions) : children);
|
|
156
|
+
});
|
|
157
|
+
Tooltip.displayName = "BuiTooltip";
|
|
158
|
+
var Tooltip_default = Tooltip;
|
|
159
|
+
export {
|
|
160
|
+
Tooltip_default as default
|
|
161
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { OverrideProps } from '@bifrostui/types';
|
|
3
|
+
import { PortalCoreProps } from '../Portal/Portal.types';
|
|
4
|
+
type triggerType = 'click' | 'hover';
|
|
5
|
+
export type TooltipProps<D extends React.ElementType = 'div', P = {}> = OverrideProps<{
|
|
6
|
+
props: P & {
|
|
7
|
+
/**
|
|
8
|
+
* 气泡浮层显示内容
|
|
9
|
+
*/
|
|
10
|
+
title?: string;
|
|
11
|
+
/**
|
|
12
|
+
* 默认是否显隐
|
|
13
|
+
* @default false
|
|
14
|
+
*/
|
|
15
|
+
defaultOpen?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* 用于手动控制气泡浮层显隐
|
|
18
|
+
*/
|
|
19
|
+
open?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* 气泡框位置
|
|
22
|
+
* @default 'top'
|
|
23
|
+
*/
|
|
24
|
+
placement?: 'top' | 'left' | 'right' | 'bottom' | 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight' | 'leftTop' | 'leftBottom' | 'rightTop' | 'rightBottom';
|
|
25
|
+
/**
|
|
26
|
+
* 触发行为
|
|
27
|
+
* - click: 点击触发
|
|
28
|
+
* - hover: hover触发
|
|
29
|
+
* - 或者是他们的数组
|
|
30
|
+
* @default 'click'
|
|
31
|
+
*/
|
|
32
|
+
trigger?: triggerType | triggerType[];
|
|
33
|
+
/**
|
|
34
|
+
* Portal组件的属性
|
|
35
|
+
*/
|
|
36
|
+
PortalProps?: PortalCoreProps;
|
|
37
|
+
/**
|
|
38
|
+
* 点击事件回调方法
|
|
39
|
+
* - event 触发事件
|
|
40
|
+
* - data.open 浮层显隐状态
|
|
41
|
+
* @returns
|
|
42
|
+
*/
|
|
43
|
+
onOpenChange?: (event: React.SyntheticEvent, data: {
|
|
44
|
+
open: boolean;
|
|
45
|
+
}) => void;
|
|
46
|
+
};
|
|
47
|
+
defaultComponent: D;
|
|
48
|
+
}, D>;
|
|
49
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/es/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from './Button';
|
|
|
7
7
|
export * from './Calendar';
|
|
8
8
|
export * from './Card';
|
|
9
9
|
export * from './Checkbox';
|
|
10
|
+
export * from './Collapse';
|
|
10
11
|
export * from './Divider';
|
|
11
12
|
export * from './Drawer';
|
|
12
13
|
export * from './Fade';
|
|
@@ -15,6 +16,7 @@ export * from './Image';
|
|
|
15
16
|
export * from './Input';
|
|
16
17
|
export * from './List';
|
|
17
18
|
export * from './Modal';
|
|
19
|
+
export * from './Popover';
|
|
18
20
|
export * from './Portal';
|
|
19
21
|
export * from './Progress';
|
|
20
22
|
export * from './Radio';
|
|
@@ -32,11 +34,16 @@ export * from './Tabs';
|
|
|
32
34
|
export * from './Tag';
|
|
33
35
|
export * from './TextArea';
|
|
34
36
|
export * from './Transition';
|
|
37
|
+
export * from './Tooltip';
|
|
35
38
|
export * from './NavBar';
|
|
36
39
|
export * from './Loading';
|
|
37
40
|
export * from './TabBar';
|
|
38
41
|
export * from './Countdown';
|
|
39
42
|
export * from './CitySelector';
|
|
40
43
|
export * from './Picker';
|
|
44
|
+
export * from './CollapsePanel';
|
|
45
|
+
export * from './Breadcrumb';
|
|
41
46
|
export * from './Toast';
|
|
42
47
|
export * from './Dialog';
|
|
48
|
+
export * from './ThemeProvider';
|
|
49
|
+
export * from './locales';
|
package/es/index.js
CHANGED
|
@@ -7,6 +7,7 @@ export * from "./Button";
|
|
|
7
7
|
export * from "./Calendar";
|
|
8
8
|
export * from "./Card";
|
|
9
9
|
export * from "./Checkbox";
|
|
10
|
+
export * from "./Collapse";
|
|
10
11
|
export * from "./Divider";
|
|
11
12
|
export * from "./Drawer";
|
|
12
13
|
export * from "./Fade";
|
|
@@ -15,6 +16,7 @@ export * from "./Image";
|
|
|
15
16
|
export * from "./Input";
|
|
16
17
|
export * from "./List";
|
|
17
18
|
export * from "./Modal";
|
|
19
|
+
export * from "./Popover";
|
|
18
20
|
export * from "./Portal";
|
|
19
21
|
export * from "./Progress";
|
|
20
22
|
export * from "./Radio";
|
|
@@ -32,11 +34,16 @@ export * from "./Tabs";
|
|
|
32
34
|
export * from "./Tag";
|
|
33
35
|
export * from "./TextArea";
|
|
34
36
|
export * from "./Transition";
|
|
37
|
+
export * from "./Tooltip";
|
|
35
38
|
export * from "./NavBar";
|
|
36
39
|
export * from "./Loading";
|
|
37
40
|
export * from "./TabBar";
|
|
38
41
|
export * from "./Countdown";
|
|
39
42
|
export * from "./CitySelector";
|
|
40
43
|
export * from "./Picker";
|
|
44
|
+
export * from "./CollapsePanel";
|
|
45
|
+
export * from "./Breadcrumb";
|
|
41
46
|
export * from "./Toast";
|
|
42
47
|
export * from "./Dialog";
|
|
48
|
+
export * from "./ThemeProvider";
|
|
49
|
+
export * from "./locales";
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export interface BaseLang {
|
|
2
|
+
dialog?: {
|
|
3
|
+
cancel?: string;
|
|
4
|
+
confirm?: string;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
};
|
|
7
|
+
picker?: {
|
|
8
|
+
cancel?: string;
|
|
9
|
+
confirm?: string;
|
|
10
|
+
};
|
|
11
|
+
calendar?: {
|
|
12
|
+
Monday?: string;
|
|
13
|
+
Tuesday?: string;
|
|
14
|
+
Wednesday?: string;
|
|
15
|
+
Thursday?: string;
|
|
16
|
+
Friday?: string;
|
|
17
|
+
Saturday?: string;
|
|
18
|
+
Sunday?: string;
|
|
19
|
+
};
|
|
20
|
+
input?: {
|
|
21
|
+
placeholder?: string;
|
|
22
|
+
};
|
|
23
|
+
textarea?: {
|
|
24
|
+
placeholder?: string;
|
|
25
|
+
};
|
|
26
|
+
selector?: {
|
|
27
|
+
select?: string;
|
|
28
|
+
};
|
|
29
|
+
citySelector?: {
|
|
30
|
+
selectedCityGroupName?: string;
|
|
31
|
+
currentCityGroupName?: string;
|
|
32
|
+
hotCitiesGroupName?: string;
|
|
33
|
+
located?: string;
|
|
34
|
+
current?: string;
|
|
35
|
+
hot?: string;
|
|
36
|
+
gpsType?: Record<string, string>;
|
|
37
|
+
currentType?: Record<string, string>;
|
|
38
|
+
hotCityType?: Record<string, string>;
|
|
39
|
+
};
|
|
40
|
+
}
|