@bifrostui/react 1.3.1-beta.1 → 1.3.3
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 +3 -6
- package/dist/ActionSheet/ActionSheetItem.css +6 -10
- package/dist/Alert/index.css +8 -14
- package/dist/Avatar/Avatar.css +9 -13
- package/dist/Avatar/AvatarGroup.css +8 -15
- package/dist/Backdrop/Backdrop.css +1 -2
- package/dist/Badge/Badge.css +17 -27
- package/dist/Button/Button.css +17 -26
- package/dist/Calendar/Calendar.css +18 -33
- package/dist/Calendar/Calendar.d.ts +1 -1
- package/dist/Calendar/Calendar.js +17 -38
- package/dist/Calendar/Calendar.types.d.ts +0 -21
- package/dist/Card/CardFooter.css +1 -2
- package/dist/Card/CardHeader.css +1 -3
- package/dist/Checkbox/Checkbox.css +5 -7
- package/dist/CitySelector/CitySelector.css +15 -29
- package/dist/CitySelector/CitySelectorCore.js +16 -25
- package/dist/CitySelector/Selector/index.css +4 -4
- package/dist/Countdown/Countdown.css +1 -2
- package/dist/Dialog/Dialog.d.ts +2 -2
- package/dist/Dialog/Dialog.js +8 -20
- package/dist/Dialog/Dialog.types.d.ts +1 -12
- package/dist/Dialog/FunctionalDialog.js +2 -38
- package/dist/Dialog/index.css +18 -27
- package/dist/Divider/Divider.css +4 -6
- package/dist/IconButton/IconButton.css +7 -9
- package/dist/Image/index.css +1 -2
- package/dist/Input/Input.css +5 -10
- package/dist/List/List.css +0 -3
- package/dist/List/ListItem.css +3 -3
- package/dist/List/ListItemContent.css +1 -1
- package/dist/Loading/Loading.css +2 -4
- package/dist/Modal/Modal.miniapp.d.ts +1 -1
- package/dist/NavBar/NavBar.css +5 -9
- package/dist/Picker/Picker.css +29 -25
- package/dist/Picker/Picker.js +11 -31
- package/dist/Picker/Picker.types.d.ts +0 -4
- package/dist/Picker/PickerPanel.css +8 -8
- package/dist/Picker/PickerPanel.js +8 -14
- package/dist/Picker/utils.d.ts +0 -16
- package/dist/Picker/utils.js +2 -32
- package/dist/Portal/Portal.types.d.ts +0 -4
- package/dist/Portal/PortalCore.js +1 -8
- package/dist/Progress/Progress.css +6 -8
- package/dist/Radio/Radio.css +1 -2
- package/dist/Rating/Rating.css +4 -8
- package/dist/Select/Select.css +10 -21
- package/dist/Select/Select.js +1 -1
- package/dist/Select/SelectOption.js +0 -3
- package/dist/Skeleton/Skeleton.css +2 -3
- package/dist/Slider/Slider.css +13 -24
- package/dist/Steps/Step.css +11 -11
- package/dist/Steps/Steps.css +5 -14
- package/dist/Swiper/Swiper.css +1 -2
- package/dist/Switch/Switch.css +16 -31
- package/dist/TabBar/TabBar.css +3 -7
- package/dist/TabBar/TabBarItem.css +1 -0
- package/dist/Tabs/Tab.css +6 -2
- package/dist/Tabs/Tabs.css +4 -7
- package/dist/Tag/Tag.css +10 -7
- package/dist/Tag/TagGroup.css +1 -9
- package/dist/TextArea/TextArea.css +8 -14
- package/dist/Toast/FunctionalToast.js +0 -18
- package/dist/Toast/Toast.css +14 -15
- package/dist/Toast/Toast.d.ts +2 -2
- package/dist/Toast/Toast.js +48 -52
- package/dist/Toast/Toast.types.d.ts +1 -15
- package/dist/index.d.ts +0 -7
- package/dist/index.js +1 -15
- package/es/ActionSheet/ActionSheet.css +3 -6
- package/es/ActionSheet/ActionSheetItem.css +6 -10
- package/es/Alert/index.css +8 -14
- package/es/Avatar/Avatar.css +9 -13
- package/es/Avatar/AvatarGroup.css +8 -15
- package/es/Backdrop/Backdrop.css +1 -2
- package/es/Badge/Badge.css +17 -27
- package/es/Button/Button.css +17 -26
- package/es/Calendar/Calendar.css +18 -33
- package/es/Calendar/Calendar.d.ts +1 -1
- package/es/Calendar/Calendar.js +17 -38
- package/es/Calendar/Calendar.types.d.ts +0 -21
- package/es/Card/CardFooter.css +1 -2
- package/es/Card/CardHeader.css +1 -3
- package/es/Checkbox/Checkbox.css +5 -7
- package/es/CitySelector/CitySelector.css +15 -29
- package/es/CitySelector/CitySelectorCore.js +16 -25
- package/es/CitySelector/Selector/index.css +4 -4
- package/es/Countdown/Countdown.css +1 -2
- package/es/Dialog/Dialog.d.ts +2 -2
- package/es/Dialog/Dialog.js +8 -20
- package/es/Dialog/Dialog.types.d.ts +1 -12
- package/es/Dialog/FunctionalDialog.js +2 -38
- package/es/Dialog/index.css +18 -27
- package/es/Divider/Divider.css +4 -6
- package/es/IconButton/IconButton.css +7 -9
- package/es/Image/index.css +1 -2
- package/es/Input/Input.css +5 -10
- package/es/List/List.css +0 -3
- package/es/List/ListItem.css +3 -3
- package/es/List/ListItemContent.css +1 -1
- package/es/Loading/Loading.css +2 -4
- package/es/Modal/Modal.miniapp.d.ts +1 -1
- package/es/NavBar/NavBar.css +5 -9
- package/es/Picker/Picker.css +29 -25
- package/es/Picker/Picker.js +12 -32
- package/es/Picker/Picker.types.d.ts +0 -4
- package/es/Picker/PickerPanel.css +8 -8
- package/es/Picker/PickerPanel.js +8 -14
- package/es/Picker/utils.d.ts +0 -16
- package/es/Picker/utils.js +1 -29
- package/es/Portal/Portal.types.d.ts +0 -4
- package/es/Portal/PortalCore.js +1 -8
- package/es/Progress/Progress.css +6 -8
- package/es/Radio/Radio.css +1 -2
- package/es/Rating/Rating.css +4 -8
- package/es/Select/Select.css +10 -21
- package/es/Select/Select.js +1 -1
- package/es/Select/SelectOption.js +0 -3
- package/es/Skeleton/Skeleton.css +2 -3
- package/es/Slider/Slider.css +13 -24
- package/es/Steps/Step.css +11 -11
- package/es/Steps/Steps.css +5 -14
- package/es/Swiper/Swiper.css +1 -2
- package/es/Switch/Switch.css +16 -31
- package/es/TabBar/TabBar.css +3 -7
- package/es/TabBar/TabBarItem.css +1 -0
- package/es/Tabs/Tab.css +6 -2
- package/es/Tabs/Tabs.css +4 -7
- package/es/Tag/Tag.css +10 -7
- package/es/Tag/TagGroup.css +1 -9
- package/es/TextArea/TextArea.css +8 -14
- package/es/Toast/FunctionalToast.js +0 -18
- package/es/Toast/Toast.css +14 -15
- package/es/Toast/Toast.d.ts +2 -2
- package/es/Toast/Toast.js +49 -53
- package/es/Toast/Toast.types.d.ts +1 -15
- package/es/index.d.ts +0 -7
- package/es/index.js +0 -7
- package/package.json +5 -5
- package/dist/Breadcrumb/Breadcrumb.css +0 -34
- package/dist/Breadcrumb/Breadcrumb.d.ts +0 -5
- package/dist/Breadcrumb/Breadcrumb.js +0 -128
- package/dist/Breadcrumb/Breadcrumb.types.d.ts +0 -49
- package/dist/Breadcrumb/Breadcrumb.types.js +0 -15
- package/dist/Breadcrumb/BreadcrumbItem.d.ts +0 -4
- package/dist/Breadcrumb/BreadcrumbItem.js +0 -78
- package/dist/Breadcrumb/index.d.ts +0 -4
- package/dist/Breadcrumb/index.js +0 -45
- package/dist/Collapse/Collapse.css +0 -6
- package/dist/Collapse/Collapse.d.ts +0 -5
- package/dist/Collapse/Collapse.js +0 -165
- package/dist/Collapse/Collapse.types.d.ts +0 -16
- package/dist/Collapse/Collapse.types.js +0 -15
- package/dist/Collapse/index.d.ts +0 -2
- package/dist/Collapse/index.js +0 -41
- package/dist/CollapsePanel/CollapsePanel.css +0 -32
- package/dist/CollapsePanel/CollapsePanel.d.ts +0 -5
- package/dist/CollapsePanel/CollapsePanel.js +0 -159
- package/dist/CollapsePanel/CollapsePanel.types.d.ts +0 -64
- package/dist/CollapsePanel/CollapsePanel.types.js +0 -15
- package/dist/CollapsePanel/CollapsePanelItem.d.ts +0 -4
- package/dist/CollapsePanel/CollapsePanelItem.js +0 -112
- package/dist/CollapsePanel/index.d.ts +0 -4
- package/dist/CollapsePanel/index.js +0 -45
- package/dist/Popover/Popover.css +0 -97
- package/dist/Popover/Popover.d.ts +0 -5
- package/dist/Popover/Popover.js +0 -186
- package/dist/Popover/Popover.types.d.ts +0 -59
- package/dist/Popover/Popover.types.js +0 -15
- package/dist/Popover/index.d.ts +0 -2
- package/dist/Popover/index.js +0 -41
- package/dist/ThemeProvider/ThemeProvider.d.ts +0 -4
- package/dist/ThemeProvider/ThemeProvider.js +0 -91
- package/dist/ThemeProvider/ThemeProvider.types.d.ts +0 -127
- package/dist/ThemeProvider/ThemeProvider.types.js +0 -27
- package/dist/ThemeProvider/hooks/ThemeContext.d.ts +0 -4
- package/dist/ThemeProvider/hooks/ThemeContext.js +0 -35
- package/dist/ThemeProvider/hooks/createTheme.d.ts +0 -2
- package/dist/ThemeProvider/hooks/createTheme.js +0 -55
- package/dist/ThemeProvider/hooks/index.d.ts +0 -4
- package/dist/ThemeProvider/hooks/index.js +0 -43
- package/dist/ThemeProvider/hooks/useTheme.d.ts +0 -1
- package/dist/ThemeProvider/hooks/useTheme.js +0 -39
- package/dist/ThemeProvider/index.d.ts +0 -4
- package/dist/ThemeProvider/index.js +0 -45
- package/dist/ThemeProvider/utils/constants.d.ts +0 -38
- package/dist/ThemeProvider/utils/constants.js +0 -65
- package/dist/ThemeProvider/utils/index.d.ts +0 -2
- package/dist/ThemeProvider/utils/index.js +0 -23
- package/dist/ThemeProvider/utils/mountTokens.d.ts +0 -26
- package/dist/ThemeProvider/utils/mountTokens.js +0 -123
- package/dist/Tooltip/Tooltip.css +0 -91
- package/dist/Tooltip/Tooltip.d.ts +0 -5
- package/dist/Tooltip/Tooltip.js +0 -175
- package/dist/Tooltip/Tooltip.types.d.ts +0 -50
- package/dist/Tooltip/Tooltip.types.js +0 -15
- package/dist/Tooltip/index.d.ts +0 -2
- package/dist/Tooltip/index.js +0 -41
- package/dist/locales/base.d.ts +0 -40
- package/dist/locales/base.js +0 -15
- package/dist/locales/en-US.d.ts +0 -3
- package/dist/locales/en-US.js +0 -69
- package/dist/locales/hooks/useLocaleText.d.ts +0 -3
- package/dist/locales/hooks/useLocaleText.js +0 -43
- package/dist/locales/index.d.ts +0 -5
- package/dist/locales/index.js +0 -49
- package/dist/locales/zh-CN.d.ts +0 -3
- package/dist/locales/zh-CN.js +0 -51
- package/dist/locales/zh-TW.d.ts +0 -3
- package/dist/locales/zh-TW.js +0 -51
- package/es/Breadcrumb/Breadcrumb.css +0 -34
- package/es/Breadcrumb/Breadcrumb.d.ts +0 -5
- package/es/Breadcrumb/Breadcrumb.js +0 -101
- package/es/Breadcrumb/Breadcrumb.types.d.ts +0 -49
- package/es/Breadcrumb/Breadcrumb.types.js +0 -1
- package/es/Breadcrumb/BreadcrumbItem.d.ts +0 -4
- package/es/Breadcrumb/BreadcrumbItem.js +0 -51
- package/es/Breadcrumb/index.d.ts +0 -4
- package/es/Breadcrumb/index.js +0 -9
- package/es/Collapse/Collapse.css +0 -6
- package/es/Collapse/Collapse.d.ts +0 -5
- package/es/Collapse/Collapse.js +0 -144
- package/es/Collapse/Collapse.types.d.ts +0 -16
- package/es/Collapse/Collapse.types.js +0 -1
- package/es/Collapse/index.d.ts +0 -2
- package/es/Collapse/index.js +0 -6
- package/es/CollapsePanel/CollapsePanel.css +0 -32
- package/es/CollapsePanel/CollapsePanel.d.ts +0 -5
- package/es/CollapsePanel/CollapsePanel.js +0 -132
- package/es/CollapsePanel/CollapsePanel.types.d.ts +0 -64
- package/es/CollapsePanel/CollapsePanel.types.js +0 -1
- package/es/CollapsePanel/CollapsePanelItem.d.ts +0 -4
- package/es/CollapsePanel/CollapsePanelItem.js +0 -85
- package/es/CollapsePanel/index.d.ts +0 -4
- package/es/CollapsePanel/index.js +0 -9
- package/es/Popover/Popover.css +0 -97
- package/es/Popover/Popover.d.ts +0 -5
- package/es/Popover/Popover.js +0 -163
- package/es/Popover/Popover.types.d.ts +0 -59
- package/es/Popover/Popover.types.js +0 -1
- package/es/Popover/index.d.ts +0 -2
- package/es/Popover/index.js +0 -6
- package/es/ThemeProvider/ThemeProvider.d.ts +0 -4
- package/es/ThemeProvider/ThemeProvider.js +0 -62
- package/es/ThemeProvider/ThemeProvider.types.d.ts +0 -127
- package/es/ThemeProvider/ThemeProvider.types.js +0 -1
- package/es/ThemeProvider/hooks/ThemeContext.d.ts +0 -4
- package/es/ThemeProvider/hooks/ThemeContext.js +0 -6
- package/es/ThemeProvider/hooks/createTheme.d.ts +0 -2
- package/es/ThemeProvider/hooks/createTheme.js +0 -38
- package/es/ThemeProvider/hooks/index.d.ts +0 -4
- package/es/ThemeProvider/hooks/index.js +0 -8
- package/es/ThemeProvider/hooks/useTheme.d.ts +0 -1
- package/es/ThemeProvider/hooks/useTheme.js +0 -10
- package/es/ThemeProvider/index.d.ts +0 -4
- package/es/ThemeProvider/index.js +0 -8
- package/es/ThemeProvider/utils/constants.d.ts +0 -38
- package/es/ThemeProvider/utils/constants.js +0 -40
- package/es/ThemeProvider/utils/index.d.ts +0 -2
- package/es/ThemeProvider/utils/index.js +0 -2
- package/es/ThemeProvider/utils/mountTokens.d.ts +0 -26
- package/es/ThemeProvider/utils/mountTokens.js +0 -88
- package/es/Tooltip/Tooltip.css +0 -91
- package/es/Tooltip/Tooltip.d.ts +0 -5
- package/es/Tooltip/Tooltip.js +0 -152
- package/es/Tooltip/Tooltip.types.d.ts +0 -50
- package/es/Tooltip/Tooltip.types.js +0 -1
- package/es/Tooltip/index.d.ts +0 -2
- package/es/Tooltip/index.js +0 -6
- package/es/locales/base.d.ts +0 -40
- package/es/locales/base.js +0 -0
- package/es/locales/en-US.d.ts +0 -3
- package/es/locales/en-US.js +0 -50
- package/es/locales/hooks/useLocaleText.d.ts +0 -3
- package/es/locales/hooks/useLocaleText.js +0 -26
- package/es/locales/index.d.ts +0 -5
- package/es/locales/index.js +0 -11
- package/es/locales/zh-CN.d.ts +0 -3
- package/es/locales/zh-CN.js +0 -32
- package/es/locales/zh-TW.d.ts +0 -3
- package/es/locales/zh-TW.js +0 -32
package/es/Tooltip/Tooltip.js
DELETED
|
@@ -1,152 +0,0 @@
|
|
|
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 } 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 positionArr = placement.split(/([A-Z])/);
|
|
67
|
-
const direction = positionArr[0];
|
|
68
|
-
let location;
|
|
69
|
-
if (positionArr.length > 1) {
|
|
70
|
-
positionArr.splice(0, 1);
|
|
71
|
-
location = positionArr.join("").toLowerCase();
|
|
72
|
-
} else {
|
|
73
|
-
location = "center";
|
|
74
|
-
}
|
|
75
|
-
const childrenRef = useRef();
|
|
76
|
-
const [openStatus, setOpenStatus] = useState(defaultOpen);
|
|
77
|
-
const [arrowDirection, setArrowDirection] = useState(direction);
|
|
78
|
-
const [arrowLocation, setArrowLocation] = useState(location);
|
|
79
|
-
const [tooltyles, setTooltyles] = useState({});
|
|
80
|
-
const ttId = useUniqueId();
|
|
81
|
-
const onRootElementMouted = () => {
|
|
82
|
-
const result = getStylesAndLocation({
|
|
83
|
-
childrenRef,
|
|
84
|
-
arrowDirection,
|
|
85
|
-
arrowLocation,
|
|
86
|
-
selector: `[data-id="tt_${ttId}"]`
|
|
87
|
-
});
|
|
88
|
-
if (!result)
|
|
89
|
-
return;
|
|
90
|
-
const { styles, newArrowDirection, newArrowLocation } = result;
|
|
91
|
-
if (newArrowDirection !== arrowDirection) {
|
|
92
|
-
setArrowDirection(newArrowDirection);
|
|
93
|
-
}
|
|
94
|
-
if (newArrowLocation !== arrowLocation) {
|
|
95
|
-
setArrowLocation(newArrowLocation);
|
|
96
|
-
}
|
|
97
|
-
setTooltyles(styles);
|
|
98
|
-
};
|
|
99
|
-
const changeOpenStatus = (event, status) => {
|
|
100
|
-
if (open)
|
|
101
|
-
return;
|
|
102
|
-
setOpenStatus(status);
|
|
103
|
-
onOpenChange == null ? void 0 : onOpenChange(event, { open: status });
|
|
104
|
-
};
|
|
105
|
-
const triggerClick = (event) => {
|
|
106
|
-
const targetStatus = !openStatus;
|
|
107
|
-
changeOpenStatus(event, targetStatus);
|
|
108
|
-
};
|
|
109
|
-
const hideTooltip = (event) => {
|
|
110
|
-
changeOpenStatus(event, false);
|
|
111
|
-
};
|
|
112
|
-
const showTooltip = (event) => {
|
|
113
|
-
changeOpenStatus(event, true);
|
|
114
|
-
};
|
|
115
|
-
const triggerEventOption = triggerEventTransform({
|
|
116
|
-
trigger,
|
|
117
|
-
click: triggerClick,
|
|
118
|
-
show: showTooltip,
|
|
119
|
-
hide: hideTooltip
|
|
120
|
-
});
|
|
121
|
-
const childrenOptions = __spreadValues({
|
|
122
|
-
ref: childrenRef
|
|
123
|
-
}, triggerEventOption);
|
|
124
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, (open || openStatus) && title ? /* @__PURE__ */ React.createElement(
|
|
125
|
-
Portal,
|
|
126
|
-
__spreadProps(__spreadValues({
|
|
127
|
-
onRootElementMouted
|
|
128
|
-
}, PortalProps), {
|
|
129
|
-
ref
|
|
130
|
-
}),
|
|
131
|
-
/* @__PURE__ */ React.createElement(
|
|
132
|
-
"div",
|
|
133
|
-
__spreadValues({
|
|
134
|
-
className: clsx(prefixCls, className, `tooltip-${arrowDirection}`),
|
|
135
|
-
style: __spreadValues(__spreadValues({}, style), tooltyles),
|
|
136
|
-
"data-id": `tt_${ttId}`
|
|
137
|
-
}, others),
|
|
138
|
-
/* @__PURE__ */ React.createElement(
|
|
139
|
-
"div",
|
|
140
|
-
{
|
|
141
|
-
className: clsx("bui-tooltip-arrow", `location-${arrowLocation}`)
|
|
142
|
-
}
|
|
143
|
-
),
|
|
144
|
-
/* @__PURE__ */ React.createElement("div", { className: "bui-tooltip-content" }, title)
|
|
145
|
-
)
|
|
146
|
-
) : null, React.isValidElement(children) ? React.cloneElement(children, childrenOptions) : children);
|
|
147
|
-
});
|
|
148
|
-
Tooltip.displayName = "BuiTooltip";
|
|
149
|
-
var Tooltip_default = Tooltip;
|
|
150
|
-
export {
|
|
151
|
-
Tooltip_default as default
|
|
152
|
-
};
|
|
@@ -1,50 +0,0 @@
|
|
|
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
|
-
* @default false
|
|
19
|
-
*/
|
|
20
|
-
open?: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* 气泡框位置
|
|
23
|
-
* @default 'top'
|
|
24
|
-
*/
|
|
25
|
-
placement?: 'top' | 'left' | 'right' | 'bottom' | 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight' | 'leftTop' | 'leftBottom' | 'rightTop' | 'rightBottom';
|
|
26
|
-
/**
|
|
27
|
-
* 触发行为
|
|
28
|
-
* - click: 点击触发
|
|
29
|
-
* - hover: hover触发
|
|
30
|
-
* - 或者是他们的数组
|
|
31
|
-
* @default 'click'
|
|
32
|
-
*/
|
|
33
|
-
trigger?: triggerType | triggerType[];
|
|
34
|
-
/**
|
|
35
|
-
* Portal组件的属性
|
|
36
|
-
*/
|
|
37
|
-
PortalProps?: PortalCoreProps;
|
|
38
|
-
/**
|
|
39
|
-
* 点击事件回调方法
|
|
40
|
-
* - event 触发事件
|
|
41
|
-
* - data.open 浮层显隐状态
|
|
42
|
-
* @returns
|
|
43
|
-
*/
|
|
44
|
-
onOpenChange?: (event: React.SyntheticEvent, data: {
|
|
45
|
-
open: boolean;
|
|
46
|
-
}) => void;
|
|
47
|
-
};
|
|
48
|
-
defaultComponent: D;
|
|
49
|
-
}, D>;
|
|
50
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/es/Tooltip/index.d.ts
DELETED
package/es/Tooltip/index.js
DELETED
package/es/locales/base.d.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
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
|
-
}
|
package/es/locales/base.js
DELETED
|
File without changes
|
package/es/locales/en-US.d.ts
DELETED
package/es/locales/en-US.js
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
const enUS = {
|
|
2
|
-
dialog: {
|
|
3
|
-
cancel: "Cancel",
|
|
4
|
-
confirm: "Confirm",
|
|
5
|
-
placeholder: "Placeholder"
|
|
6
|
-
},
|
|
7
|
-
picker: {
|
|
8
|
-
cancel: "Cancel",
|
|
9
|
-
confirm: "Confirm"
|
|
10
|
-
},
|
|
11
|
-
calendar: {
|
|
12
|
-
Monday: "Mon",
|
|
13
|
-
Tuesday: "Tue",
|
|
14
|
-
Wednesday: "Wed",
|
|
15
|
-
Thursday: "Thu",
|
|
16
|
-
Friday: "Fri",
|
|
17
|
-
Saturday: "Sat",
|
|
18
|
-
Sunday: "Sun"
|
|
19
|
-
},
|
|
20
|
-
input: {
|
|
21
|
-
placeholder: "Placeholder"
|
|
22
|
-
},
|
|
23
|
-
textarea: {
|
|
24
|
-
placeholder: "Placeholder"
|
|
25
|
-
},
|
|
26
|
-
selector: {
|
|
27
|
-
select: "Please select"
|
|
28
|
-
},
|
|
29
|
-
citySelector: {
|
|
30
|
-
selectedCityGroupName: "Selected City",
|
|
31
|
-
currentCityGroupName: "Current City",
|
|
32
|
-
hotCitiesGroupName: "Hot Cities",
|
|
33
|
-
gpsType: {
|
|
34
|
-
title: "Current",
|
|
35
|
-
code: "GPS"
|
|
36
|
-
},
|
|
37
|
-
currentType: {
|
|
38
|
-
title: "Selected",
|
|
39
|
-
code: "CRRT"
|
|
40
|
-
},
|
|
41
|
-
hotCityType: {
|
|
42
|
-
title: "Hot",
|
|
43
|
-
code: "HOT"
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
var en_US_default = enUS;
|
|
48
|
-
export {
|
|
49
|
-
en_US_default as default
|
|
50
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
-
var __spreadValues = (a, b) => {
|
|
7
|
-
for (var prop in b || (b = {}))
|
|
8
|
-
if (__hasOwnProp.call(b, prop))
|
|
9
|
-
__defNormalProp(a, prop, b[prop]);
|
|
10
|
-
if (__getOwnPropSymbols)
|
|
11
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
-
if (__propIsEnum.call(b, prop))
|
|
13
|
-
__defNormalProp(a, prop, b[prop]);
|
|
14
|
-
}
|
|
15
|
-
return a;
|
|
16
|
-
};
|
|
17
|
-
import { CN } from "../index";
|
|
18
|
-
import { useTheme } from "../../ThemeProvider";
|
|
19
|
-
function useLocaleText(componentName, theme) {
|
|
20
|
-
const { locale } = useTheme(theme);
|
|
21
|
-
return __spreadValues(__spreadValues({}, CN[componentName]), (locale == null ? void 0 : locale[componentName]) || {});
|
|
22
|
-
}
|
|
23
|
-
var useLocaleText_default = useLocaleText;
|
|
24
|
-
export {
|
|
25
|
-
useLocaleText_default as default
|
|
26
|
-
};
|
package/es/locales/index.d.ts
DELETED
package/es/locales/index.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { default as default2 } from "./en-US";
|
|
2
|
-
import { default as default3 } from "./zh-CN";
|
|
3
|
-
import { default as default4 } from "./zh-TW";
|
|
4
|
-
import { default as default5 } from "./hooks/useLocaleText";
|
|
5
|
-
export * from "./base";
|
|
6
|
-
export {
|
|
7
|
-
default3 as CN,
|
|
8
|
-
default2 as EN,
|
|
9
|
-
default4 as TW,
|
|
10
|
-
default5 as useLocaleText
|
|
11
|
-
};
|
package/es/locales/zh-CN.d.ts
DELETED
package/es/locales/zh-CN.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
const zhCN = {
|
|
2
|
-
dialog: {
|
|
3
|
-
cancel: "\u53D6\u6D88",
|
|
4
|
-
confirm: "\u786E\u5B9A",
|
|
5
|
-
placeholder: "\u8BF7\u8F93\u5165\u5185\u5BB9"
|
|
6
|
-
},
|
|
7
|
-
picker: {
|
|
8
|
-
cancel: "\u53D6\u6D88",
|
|
9
|
-
confirm: "\u786E\u8BA4"
|
|
10
|
-
},
|
|
11
|
-
calendar: {
|
|
12
|
-
Monday: "\u4E00",
|
|
13
|
-
Tuesday: "\u4E8C",
|
|
14
|
-
Wednesday: "\u4E09",
|
|
15
|
-
Thursday: "\u56DB",
|
|
16
|
-
Friday: "\u4E94",
|
|
17
|
-
Saturday: "\u516D",
|
|
18
|
-
Sunday: "\u65E5"
|
|
19
|
-
},
|
|
20
|
-
citySelector: {
|
|
21
|
-
selectedCityGroupName: "\u5F53\u524D\u57CE\u5E02",
|
|
22
|
-
currentCityGroupName: "\u5B9A\u4F4D\u57CE\u5E02",
|
|
23
|
-
hotCitiesGroupName: "\u70ED\u95E8\u57CE\u5E02",
|
|
24
|
-
located: "\u5B9A\u4F4D",
|
|
25
|
-
current: "\u5F53\u524D",
|
|
26
|
-
hot: "\u70ED\u95E8"
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
var zh_CN_default = zhCN;
|
|
30
|
-
export {
|
|
31
|
-
zh_CN_default as default
|
|
32
|
-
};
|
package/es/locales/zh-TW.d.ts
DELETED
package/es/locales/zh-TW.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
const zhTW = {
|
|
2
|
-
dialog: {
|
|
3
|
-
cancel: "\u53D6\u6D88",
|
|
4
|
-
confirm: "\u78BA\u8A8D",
|
|
5
|
-
placeholder: "\u8ACB\u8F38\u5165\u5167\u5BB9"
|
|
6
|
-
},
|
|
7
|
-
picker: {
|
|
8
|
-
cancel: "\u53D6\u6D88",
|
|
9
|
-
confirm: "\u78BA\u8A8D"
|
|
10
|
-
},
|
|
11
|
-
calendar: {
|
|
12
|
-
Monday: "\u4E00",
|
|
13
|
-
Tuesday: "\u4E8C",
|
|
14
|
-
Wednesday: "\u4E09",
|
|
15
|
-
Thursday: "\u56DB",
|
|
16
|
-
Friday: "\u4E94",
|
|
17
|
-
Saturday: "\u516D",
|
|
18
|
-
Sunday: "\u65E5"
|
|
19
|
-
},
|
|
20
|
-
citySelector: {
|
|
21
|
-
selectedCityGroupName: "\u76EE\u524D\u57CE\u5E02",
|
|
22
|
-
currentCityGroupName: "\u5B9A\u4F4D\u57CE\u5E02",
|
|
23
|
-
hotCitiesGroupName: "\u71B1\u9580\u57CE\u5E02",
|
|
24
|
-
located: "\u5B9A\u4F4D",
|
|
25
|
-
current: "\u76EE\u524D",
|
|
26
|
-
hot: "\u71B1\u9580"
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
var zh_TW_default = zhTW;
|
|
30
|
-
export {
|
|
31
|
-
zh_TW_default as default
|
|
32
|
-
};
|