@bifrostui/react 1.4.8-beta.0 → 2.0.0-beta.1
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 +2 -2
- package/dist/ActionSheet/ActionSheetItem.js +3 -8
- package/dist/Avatar/Avatar.js +3 -8
- package/dist/Avatar/AvatarGroup.js +2 -6
- package/dist/Badge/Badge.js +3 -8
- package/dist/Button/Button.css +77 -78
- package/dist/Button/Button.d.ts +1 -1
- package/dist/Button/Button.js +4 -10
- package/dist/Button/Button.types.d.ts +8 -7
- package/dist/Calendar/Calendar.js +7 -19
- package/dist/Calendar/Calendar.types.d.ts +0 -5
- package/dist/Card/Card.css +1 -1
- package/dist/Card/CardContent.css +1 -2
- package/dist/Card/CardFooter.css +2 -4
- package/dist/Card/CardHeader.css +4 -5
- package/dist/Checkbox/Checkbox.js +2 -6
- package/dist/Checkbox/CheckboxGroup.js +4 -7
- package/dist/Collapse/Collapse.css +1 -0
- package/dist/Collapse/Collapse.d.ts +1 -1
- package/dist/Collapse/Collapse.js +8 -11
- package/dist/CollapsePanel/CollapsePanel.css +2 -4
- package/dist/CollapsePanel/CollapsePanelItem.js +45 -46
- package/dist/Countdown/Countdown.js +5 -12
- package/dist/Dialog/FunctionalDialog.js +1 -1
- package/dist/Divider/Divider.js +8 -5
- package/dist/Drawer/Drawer.js +4 -10
- package/dist/Fade/Fade.js +52 -56
- package/dist/IconButton/IconButton.js +5 -12
- package/dist/Image/Image.js +112 -119
- package/dist/Input/Input.js +4 -10
- package/dist/List/List.js +3 -8
- package/dist/List/ListItem.js +42 -44
- package/dist/List/ListItemContent.js +1 -4
- package/dist/List/ListItemExtra.js +9 -4
- package/dist/List/ListItemFooter.js +9 -4
- package/dist/List/ListItemHeader.js +9 -4
- package/dist/Loading/Loading.js +13 -4
- package/dist/Modal/Modal.js +0 -6
- package/dist/Modal/Modal.miniapp.js +4 -10
- package/dist/NavBar/NavBar.js +0 -1
- package/dist/Picker/Picker.css +0 -5
- package/dist/Picker/Picker.js +5 -27
- package/dist/Picker/Picker.types.d.ts +2 -15
- package/dist/Picker/PickerPanel.css +0 -4
- package/dist/Picker/PickerPanel.js +6 -7
- package/dist/Popover/Popover.css +5 -5
- package/dist/Popover/Popover.js +27 -70
- package/dist/Portal/Portal.miniapp.js +4 -7
- package/dist/Radio/Radio.css +0 -1
- package/dist/Radio/Radio.js +2 -6
- package/dist/Radio/RadioGroup.js +0 -3
- package/dist/Rating/Rating.js +8 -18
- package/dist/ScrollView/ScrollView.js +11 -24
- package/dist/ScrollView/ScrollView.types.d.ts +1 -0
- package/dist/Select/Select.css +4 -1
- package/dist/Select/Select.js +41 -68
- package/dist/Skeleton/Skeleton.js +5 -9
- package/dist/Slide/Slide.js +69 -74
- package/dist/Slider/Slider.js +11 -27
- package/dist/Steps/Step.js +81 -82
- package/dist/Steps/Steps.d.ts +1 -1
- package/dist/Steps/Steps.js +57 -60
- package/dist/Switch/Switch.js +75 -78
- package/dist/TabBar/TabBar.js +3 -8
- package/dist/Tabs/Tab.css +10 -16
- package/dist/Tabs/Tab.js +2 -3
- package/dist/Tabs/Tabs.css +13 -22
- package/dist/Tabs/Tabs.js +39 -70
- package/dist/Tabs/Tabs.types.d.ts +0 -10
- package/dist/Tabs/utils/bound.d.ts +1 -0
- package/dist/{DesktopPicker/utils/calcAfterMounted.js → Tabs/utils/bound.js} +14 -7
- package/dist/Tag/Tag.css +1 -1
- package/dist/Tag/Tag.js +2 -6
- package/dist/TextArea/TextArea.js +5 -12
- package/dist/Toast/FunctionalToast.js +1 -1
- package/dist/Toast/Toast.css +1 -0
- package/dist/Tooltip/Tooltip.css +5 -5
- package/dist/Tooltip/Tooltip.js +27 -70
- package/dist/Transition/TransitionCore.js +3 -8
- package/dist/index.d.ts +0 -6
- package/dist/index.js +1 -13
- package/dist/locales/base.d.ts +0 -11
- package/dist/locales/en-US.js +0 -24
- package/dist/locales/zh-CN.js +0 -24
- package/dist/locales/zh-TW.js +0 -24
- package/es/ActionSheet/ActionSheet.css +2 -2
- package/es/ActionSheet/ActionSheetItem.js +3 -8
- package/es/Avatar/Avatar.js +3 -8
- package/es/Avatar/AvatarGroup.js +2 -6
- package/es/Badge/Badge.js +3 -8
- package/es/Button/Button.css +77 -78
- package/es/Button/Button.d.ts +1 -1
- package/es/Button/Button.js +3 -9
- package/es/Button/Button.types.d.ts +8 -7
- package/es/Calendar/Calendar.js +7 -19
- package/es/Calendar/Calendar.types.d.ts +0 -5
- package/es/Card/Card.css +1 -1
- package/es/Card/CardContent.css +1 -2
- package/es/Card/CardFooter.css +2 -4
- package/es/Card/CardHeader.css +4 -5
- package/es/Checkbox/Checkbox.js +2 -6
- package/es/Checkbox/CheckboxGroup.js +4 -7
- package/es/Collapse/Collapse.css +1 -0
- package/es/Collapse/Collapse.d.ts +1 -1
- package/es/Collapse/Collapse.js +8 -11
- package/es/CollapsePanel/CollapsePanel.css +2 -4
- package/es/CollapsePanel/CollapsePanelItem.js +45 -46
- package/es/Countdown/Countdown.js +5 -12
- package/es/Dialog/FunctionalDialog.js +2 -2
- package/es/Divider/Divider.js +8 -5
- package/es/Drawer/Drawer.js +4 -10
- package/es/Fade/Fade.js +52 -56
- package/es/IconButton/IconButton.js +5 -12
- package/es/Image/Image.js +112 -119
- package/es/Input/Input.js +4 -10
- package/es/List/List.js +3 -8
- package/es/List/ListItem.js +42 -44
- package/es/List/ListItemContent.js +1 -4
- package/es/List/ListItemExtra.js +9 -4
- package/es/List/ListItemFooter.js +9 -4
- package/es/List/ListItemHeader.js +9 -4
- package/es/Loading/Loading.js +13 -4
- package/es/Modal/Modal.js +0 -6
- package/es/Modal/Modal.miniapp.d.ts +1 -1
- package/es/Modal/Modal.miniapp.js +4 -10
- package/es/NavBar/NavBar.js +0 -1
- package/es/Picker/Picker.css +0 -5
- package/es/Picker/Picker.js +5 -27
- package/es/Picker/Picker.types.d.ts +2 -15
- package/es/Picker/PickerPanel.css +0 -4
- package/es/Picker/PickerPanel.js +6 -7
- package/es/Popover/Popover.css +5 -5
- package/es/Popover/Popover.js +29 -73
- package/es/Portal/Portal.miniapp.js +5 -8
- package/es/Radio/Radio.css +0 -1
- package/es/Radio/Radio.js +2 -6
- package/es/Radio/RadioGroup.js +0 -3
- package/es/Rating/Rating.js +8 -18
- package/es/ScrollView/ScrollView.js +11 -24
- package/es/ScrollView/ScrollView.types.d.ts +1 -0
- package/es/Select/Select.css +4 -1
- package/es/Select/Select.js +42 -68
- package/es/Skeleton/Skeleton.js +5 -9
- package/es/Slide/Slide.js +69 -74
- package/es/Slider/Slider.js +12 -30
- package/es/Steps/Step.js +81 -82
- package/es/Steps/Steps.d.ts +1 -1
- package/es/Steps/Steps.js +57 -60
- package/es/Switch/Switch.js +75 -78
- package/es/TabBar/TabBar.js +3 -8
- package/es/Tabs/Tab.css +10 -16
- package/es/Tabs/Tab.js +2 -3
- package/es/Tabs/Tabs.css +13 -22
- package/es/Tabs/Tabs.js +41 -83
- package/es/Tabs/Tabs.types.d.ts +0 -10
- package/es/Tabs/utils/bound.d.ts +1 -0
- package/es/Tabs/utils/bound.js +13 -0
- package/es/Tag/Tag.css +1 -1
- package/es/Tag/Tag.js +2 -6
- package/es/TextArea/TextArea.js +5 -12
- package/es/Toast/FunctionalToast.js +2 -2
- package/es/Toast/Toast.css +1 -0
- package/es/Tooltip/Tooltip.css +5 -5
- package/es/Tooltip/Tooltip.js +29 -73
- package/es/Transition/TransitionCore.js +3 -8
- package/es/index.d.ts +0 -6
- package/es/index.js +0 -6
- package/es/locales/base.d.ts +0 -11
- package/es/locales/en-US.js +0 -24
- package/es/locales/zh-CN.js +0 -24
- package/es/locales/zh-TW.js +0 -24
- package/package.json +6 -6
- package/dist/Collapse/Collapse.miniapp.d.ts +0 -5
- package/dist/Collapse/Collapse.miniapp.js +0 -177
- package/dist/DatePicker/DatePicker.d.ts +0 -4
- package/dist/DatePicker/DatePicker.js +0 -335
- package/dist/DatePicker/DatePicker.types.d.ts +0 -36
- package/dist/DatePicker/DatePicker.types.js +0 -15
- package/dist/DatePicker/constants.d.ts +0 -9
- package/dist/DatePicker/constants.js +0 -37
- package/dist/DatePicker/index.d.ts +0 -3
- package/dist/DatePicker/index.js +0 -44
- package/dist/DesktopDatePicker/DesktopDatePicker.d.ts +0 -5
- package/dist/DesktopDatePicker/DesktopDatePicker.js +0 -280
- package/dist/DesktopDatePicker/DesktopDatePicker.types.d.ts +0 -163
- package/dist/DesktopDatePicker/DesktopDatePicker.types.js +0 -15
- package/dist/DesktopDatePicker/deskTopPickerContainer.css +0 -100
- package/dist/DesktopDatePicker/index.css +0 -61
- package/dist/DesktopDatePicker/index.d.ts +0 -2
- package/dist/DesktopDatePicker/index.js +0 -41
- package/dist/DesktopDatePicker/useGetDatePickerContent.d.ts +0 -6
- package/dist/DesktopDatePicker/useGetDatePickerContent.js +0 -343
- package/dist/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +0 -5
- package/dist/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -322
- package/dist/DesktopDateTimePicker/DesktopDateTimePicker.types.d.ts +0 -163
- package/dist/DesktopDateTimePicker/DesktopDateTimePicker.types.js +0 -15
- package/dist/DesktopDateTimePicker/index.css +0 -66
- package/dist/DesktopDateTimePicker/index.d.ts +0 -2
- package/dist/DesktopDateTimePicker/index.js +0 -41
- package/dist/DesktopPicker/DesktopPicker.d.ts +0 -5
- package/dist/DesktopPicker/DesktopPicker.js +0 -238
- package/dist/DesktopPicker/DesktopPicker.types.d.ts +0 -57
- package/dist/DesktopPicker/DesktopPicker.types.js +0 -15
- package/dist/DesktopPicker/index.css +0 -37
- package/dist/DesktopPicker/index.d.ts +0 -2
- package/dist/DesktopPicker/index.js +0 -41
- package/dist/DesktopPicker/utils/calcAfterMounted.d.ts +0 -2
- package/dist/DesktopPicker/utils/calcAfterMounted.miniapp.d.ts +0 -2
- package/dist/DesktopPicker/utils/calcAfterMounted.miniapp.js +0 -38
- package/dist/DesktopTimePicker/DesktopTimePicker.d.ts +0 -5
- package/dist/DesktopTimePicker/DesktopTimePicker.js +0 -288
- package/dist/DesktopTimePicker/DesktopTimePicker.types.d.ts +0 -182
- package/dist/DesktopTimePicker/DesktopTimePicker.types.js +0 -15
- package/dist/DesktopTimePicker/DesktopTimePickerList.d.ts +0 -4
- package/dist/DesktopTimePicker/DesktopTimePickerList.js +0 -111
- package/dist/DesktopTimePicker/index.css +0 -170
- package/dist/DesktopTimePicker/index.d.ts +0 -2
- package/dist/DesktopTimePicker/index.js +0 -41
- package/dist/DesktopTimePicker/useGetTimePickerContent.d.ts +0 -6
- package/dist/DesktopTimePicker/useGetTimePickerContent.js +0 -249
- package/dist/DesktopTimePicker/utils/scrollUtil.d.ts +0 -2
- package/dist/DesktopTimePicker/utils/scrollUtil.js +0 -27
- package/dist/DesktopTimePicker/utils/scrollUtil.miniapp.d.ts +0 -2
- package/dist/DesktopTimePicker/utils/scrollUtil.miniapp.js +0 -51
- package/dist/DesktopTimePicker/utils/utils.d.ts +0 -28
- package/dist/DesktopTimePicker/utils/utils.js +0 -408
- package/dist/SwipeAction/SwipeAction.css +0 -79
- package/dist/SwipeAction/SwipeAction.d.ts +0 -5
- package/dist/SwipeAction/SwipeAction.js +0 -349
- package/dist/SwipeAction/SwipeAction.types.d.ts +0 -75
- package/dist/SwipeAction/SwipeAction.types.js +0 -15
- package/dist/SwipeAction/SwipeActionContext.d.ts +0 -4
- package/dist/SwipeAction/SwipeActionContext.js +0 -30
- package/dist/SwipeAction/SwipeActionItem.css +0 -31
- package/dist/SwipeAction/SwipeActionItem.d.ts +0 -5
- package/dist/SwipeAction/SwipeActionItem.js +0 -105
- package/dist/SwipeAction/constants.d.ts +0 -9
- package/dist/SwipeAction/constants.js +0 -39
- package/dist/SwipeAction/index.d.ts +0 -5
- package/dist/SwipeAction/index.js +0 -50
- package/dist/Tabs/utils/scroll.d.ts +0 -2
- package/dist/Tabs/utils/scroll.js +0 -55
- package/es/Collapse/Collapse.miniapp.d.ts +0 -5
- package/es/Collapse/Collapse.miniapp.js +0 -157
- package/es/DatePicker/DatePicker.d.ts +0 -4
- package/es/DatePicker/DatePicker.js +0 -308
- package/es/DatePicker/DatePicker.types.d.ts +0 -36
- package/es/DatePicker/DatePicker.types.js +0 -1
- package/es/DatePicker/constants.d.ts +0 -9
- package/es/DatePicker/constants.js +0 -14
- package/es/DatePicker/index.d.ts +0 -3
- package/es/DatePicker/index.js +0 -8
- package/es/DesktopDatePicker/DesktopDatePicker.d.ts +0 -5
- package/es/DesktopDatePicker/DesktopDatePicker.js +0 -253
- package/es/DesktopDatePicker/DesktopDatePicker.types.d.ts +0 -163
- package/es/DesktopDatePicker/DesktopDatePicker.types.js +0 -1
- package/es/DesktopDatePicker/deskTopPickerContainer.css +0 -100
- package/es/DesktopDatePicker/index.css +0 -61
- package/es/DesktopDatePicker/index.d.ts +0 -2
- package/es/DesktopDatePicker/index.js +0 -6
- package/es/DesktopDatePicker/useGetDatePickerContent.d.ts +0 -6
- package/es/DesktopDatePicker/useGetDatePickerContent.js +0 -316
- package/es/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +0 -5
- package/es/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -295
- package/es/DesktopDateTimePicker/DesktopDateTimePicker.types.d.ts +0 -163
- package/es/DesktopDateTimePicker/DesktopDateTimePicker.types.js +0 -1
- package/es/DesktopDateTimePicker/index.css +0 -66
- package/es/DesktopDateTimePicker/index.d.ts +0 -2
- package/es/DesktopDateTimePicker/index.js +0 -9
- package/es/DesktopPicker/DesktopPicker.d.ts +0 -5
- package/es/DesktopPicker/DesktopPicker.js +0 -221
- package/es/DesktopPicker/DesktopPicker.types.d.ts +0 -57
- package/es/DesktopPicker/DesktopPicker.types.js +0 -1
- package/es/DesktopPicker/index.css +0 -37
- package/es/DesktopPicker/index.d.ts +0 -2
- package/es/DesktopPicker/index.js +0 -6
- package/es/DesktopPicker/utils/calcAfterMounted.d.ts +0 -2
- package/es/DesktopPicker/utils/calcAfterMounted.js +0 -6
- package/es/DesktopPicker/utils/calcAfterMounted.miniapp.d.ts +0 -2
- package/es/DesktopPicker/utils/calcAfterMounted.miniapp.js +0 -9
- package/es/DesktopTimePicker/DesktopTimePicker.d.ts +0 -5
- package/es/DesktopTimePicker/DesktopTimePicker.js +0 -261
- package/es/DesktopTimePicker/DesktopTimePicker.types.d.ts +0 -182
- package/es/DesktopTimePicker/DesktopTimePicker.types.js +0 -1
- package/es/DesktopTimePicker/DesktopTimePickerList.d.ts +0 -4
- package/es/DesktopTimePicker/DesktopTimePickerList.js +0 -84
- package/es/DesktopTimePicker/index.css +0 -170
- package/es/DesktopTimePicker/index.d.ts +0 -2
- package/es/DesktopTimePicker/index.js +0 -6
- package/es/DesktopTimePicker/useGetTimePickerContent.d.ts +0 -6
- package/es/DesktopTimePicker/useGetTimePickerContent.js +0 -226
- package/es/DesktopTimePicker/utils/scrollUtil.d.ts +0 -2
- package/es/DesktopTimePicker/utils/scrollUtil.js +0 -8
- package/es/DesktopTimePicker/utils/scrollUtil.miniapp.d.ts +0 -2
- package/es/DesktopTimePicker/utils/scrollUtil.miniapp.js +0 -22
- package/es/DesktopTimePicker/utils/utils.d.ts +0 -28
- package/es/DesktopTimePicker/utils/utils.js +0 -365
- package/es/SwipeAction/SwipeAction.css +0 -79
- package/es/SwipeAction/SwipeAction.d.ts +0 -5
- package/es/SwipeAction/SwipeAction.js +0 -334
- package/es/SwipeAction/SwipeAction.types.d.ts +0 -75
- package/es/SwipeAction/SwipeAction.types.js +0 -1
- package/es/SwipeAction/SwipeActionContext.d.ts +0 -4
- package/es/SwipeAction/SwipeActionContext.js +0 -11
- package/es/SwipeAction/SwipeActionItem.css +0 -31
- package/es/SwipeAction/SwipeActionItem.d.ts +0 -5
- package/es/SwipeAction/SwipeActionItem.js +0 -78
- package/es/SwipeAction/constants.d.ts +0 -9
- package/es/SwipeAction/constants.js +0 -15
- package/es/SwipeAction/index.d.ts +0 -5
- package/es/SwipeAction/index.js +0 -12
- package/es/Tabs/utils/scroll.d.ts +0 -2
- package/es/Tabs/utils/scroll.js +0 -36
package/es/Popover/Popover.js
CHANGED
|
@@ -26,35 +26,14 @@ var __objRest = (source, exclude) => {
|
|
|
26
26
|
}
|
|
27
27
|
return target;
|
|
28
28
|
};
|
|
29
|
-
var __async = (__this, __arguments, generator) => {
|
|
30
|
-
return new Promise((resolve, reject) => {
|
|
31
|
-
var fulfilled = (value) => {
|
|
32
|
-
try {
|
|
33
|
-
step(generator.next(value));
|
|
34
|
-
} catch (e) {
|
|
35
|
-
reject(e);
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
var rejected = (value) => {
|
|
39
|
-
try {
|
|
40
|
-
step(generator.throw(value));
|
|
41
|
-
} catch (e) {
|
|
42
|
-
reject(e);
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
46
|
-
step((generator = generator.apply(__this, __arguments)).next());
|
|
47
|
-
});
|
|
48
|
-
};
|
|
49
29
|
import clsx from "clsx";
|
|
50
30
|
import React, { useState, useRef, useEffect } from "react";
|
|
51
31
|
import {
|
|
52
32
|
getStylesAndLocation,
|
|
53
33
|
triggerEventTransform,
|
|
54
34
|
parsePlacement,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
isMini
|
|
35
|
+
useUniqueId,
|
|
36
|
+
throttle
|
|
58
37
|
} from "@bifrostui/utils";
|
|
59
38
|
import Portal from "../Portal";
|
|
60
39
|
import "./Popover.css";
|
|
@@ -70,9 +49,9 @@ const Popover = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
70
49
|
offsetSpacing = 0,
|
|
71
50
|
placement = "top",
|
|
72
51
|
trigger = "click",
|
|
52
|
+
onOpenChange,
|
|
73
53
|
open,
|
|
74
|
-
hideArrow
|
|
75
|
-
onOpenChange
|
|
54
|
+
hideArrow
|
|
76
55
|
} = _a, others = __objRest(_a, [
|
|
77
56
|
"className",
|
|
78
57
|
"style",
|
|
@@ -83,9 +62,9 @@ const Popover = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
83
62
|
"offsetSpacing",
|
|
84
63
|
"placement",
|
|
85
64
|
"trigger",
|
|
65
|
+
"onOpenChange",
|
|
86
66
|
"open",
|
|
87
|
-
"hideArrow"
|
|
88
|
-
"onOpenChange"
|
|
67
|
+
"hideArrow"
|
|
89
68
|
]);
|
|
90
69
|
const controlByUser = typeof open !== "undefined";
|
|
91
70
|
const { direction, location = "center" } = parsePlacement(placement);
|
|
@@ -93,18 +72,11 @@ const Popover = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
93
72
|
const [openStatus, setOpenStatus] = useState(defaultOpen);
|
|
94
73
|
const [arrowDirection, setArrowDirection] = useState(direction);
|
|
95
74
|
const [arrowLocation, setArrowLocation] = useState(location);
|
|
96
|
-
const [
|
|
97
|
-
const
|
|
98
|
-
const nodeRef = useForkRef(ref, tipRef);
|
|
99
|
-
const clearRef = (status) => {
|
|
100
|
-
if (status === false) {
|
|
101
|
-
tipRef.current = null;
|
|
102
|
-
}
|
|
103
|
-
};
|
|
75
|
+
const [tooltyles, setTooltyles] = useState({});
|
|
76
|
+
const ttId = useUniqueId();
|
|
104
77
|
const changeOpenStatus = (event, status) => {
|
|
105
78
|
if (controlByUser)
|
|
106
79
|
return;
|
|
107
|
-
clearRef(status);
|
|
108
80
|
setOpenStatus(status);
|
|
109
81
|
onOpenChange == null ? void 0 : onOpenChange(event, { open: status });
|
|
110
82
|
};
|
|
@@ -123,33 +95,23 @@ const Popover = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
123
95
|
if (!controlByUser)
|
|
124
96
|
return;
|
|
125
97
|
setOpenStatus(open);
|
|
126
|
-
clearRef(open);
|
|
127
98
|
}, [open]);
|
|
128
|
-
useEffect(() => {
|
|
129
|
-
if (!openStatus) {
|
|
130
|
-
setToolStyles({
|
|
131
|
-
visibility: "hidden"
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
}, [openStatus]);
|
|
135
99
|
const clickEventHandler = (event) => {
|
|
136
100
|
if (trigger === "hover" || (trigger == null ? void 0 : trigger.length) === 1 && (trigger == null ? void 0 : trigger[0]) === "hover")
|
|
137
101
|
return;
|
|
138
102
|
hidePopover(event);
|
|
139
103
|
};
|
|
140
|
-
const onRootElementMouted = throttle(() =>
|
|
141
|
-
if (!tipRef.current)
|
|
142
|
-
return;
|
|
104
|
+
const onRootElementMouted = throttle(() => {
|
|
143
105
|
const {
|
|
144
106
|
direction: newParsedDirection,
|
|
145
107
|
location: newParsedLocation = "center"
|
|
146
108
|
} = parsePlacement(placement);
|
|
147
|
-
const result =
|
|
109
|
+
const result = getStylesAndLocation({
|
|
148
110
|
childrenRef,
|
|
149
111
|
arrowDirection: newParsedDirection,
|
|
150
112
|
arrowLocation: newParsedLocation,
|
|
151
113
|
offsetSpacing,
|
|
152
|
-
|
|
114
|
+
selector: `[data-id="tt_${ttId}"]`
|
|
153
115
|
});
|
|
154
116
|
if (!result)
|
|
155
117
|
return;
|
|
@@ -160,32 +122,26 @@ const Popover = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
160
122
|
if (newArrowLocation !== arrowLocation) {
|
|
161
123
|
setArrowLocation(newArrowLocation);
|
|
162
124
|
}
|
|
163
|
-
|
|
164
|
-
}
|
|
125
|
+
setTooltyles(styles);
|
|
126
|
+
}, 100);
|
|
127
|
+
const bindEvent = () => {
|
|
128
|
+
if (!controlByUser) {
|
|
129
|
+
document.addEventListener("click", clickEventHandler);
|
|
130
|
+
}
|
|
131
|
+
window.addEventListener("resize", onRootElementMouted);
|
|
132
|
+
};
|
|
133
|
+
const unbindEvent = () => {
|
|
134
|
+
if (!controlByUser) {
|
|
135
|
+
document.removeEventListener("click", clickEventHandler);
|
|
136
|
+
}
|
|
137
|
+
window.removeEventListener("resize", onRootElementMouted);
|
|
138
|
+
};
|
|
165
139
|
useEffect(() => {
|
|
166
|
-
const bindEvent = () => {
|
|
167
|
-
if (!tipRef.current)
|
|
168
|
-
return;
|
|
169
|
-
if (!controlByUser) {
|
|
170
|
-
document.addEventListener("click", clickEventHandler);
|
|
171
|
-
}
|
|
172
|
-
if (!isMini) {
|
|
173
|
-
window.addEventListener("resize", onRootElementMouted);
|
|
174
|
-
}
|
|
175
|
-
};
|
|
176
|
-
const unbindEvent = () => {
|
|
177
|
-
if (!controlByUser) {
|
|
178
|
-
document.removeEventListener("click", clickEventHandler);
|
|
179
|
-
}
|
|
180
|
-
if (!isMini) {
|
|
181
|
-
window.removeEventListener("resize", onRootElementMouted);
|
|
182
|
-
}
|
|
183
|
-
};
|
|
184
140
|
bindEvent();
|
|
185
141
|
return () => {
|
|
186
142
|
unbindEvent();
|
|
187
143
|
};
|
|
188
|
-
}, [
|
|
144
|
+
}, []);
|
|
189
145
|
if (!title && !content)
|
|
190
146
|
return null;
|
|
191
147
|
let triggerEventOption;
|
|
@@ -200,14 +156,14 @@ const Popover = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
200
156
|
const childrenOptions = __spreadValues({
|
|
201
157
|
ref: childrenRef
|
|
202
158
|
}, triggerEventOption);
|
|
203
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, open || openStatus ? /* @__PURE__ */ React.createElement(Portal, { onRootElementMouted }, /* @__PURE__ */ React.createElement(
|
|
159
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, open || openStatus ? /* @__PURE__ */ React.createElement(Portal, { onRootElementMouted, ref }, /* @__PURE__ */ React.createElement(
|
|
204
160
|
"div",
|
|
205
161
|
__spreadValues({
|
|
206
162
|
className: clsx(prefixCls, className, `popover-${arrowDirection}`, {
|
|
207
163
|
"bui-popover-arrow-hide": hideArrow
|
|
208
164
|
}),
|
|
209
|
-
|
|
210
|
-
|
|
165
|
+
"data-id": `tt_${ttId}`,
|
|
166
|
+
style: __spreadValues(__spreadValues({}, style), tooltyles)
|
|
211
167
|
}, others),
|
|
212
168
|
!hideArrow ? /* @__PURE__ */ React.createElement(
|
|
213
169
|
"div",
|
|
@@ -18,13 +18,11 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import Taro from "@tarojs/taro";
|
|
21
|
-
import React, { forwardRef,
|
|
21
|
+
import React, { forwardRef, useMemo } from "react";
|
|
22
22
|
import PortalCore from "./PortalCore";
|
|
23
23
|
const Portal = forwardRef((props, ref) => {
|
|
24
24
|
const { disablePortal } = props;
|
|
25
|
-
const
|
|
26
|
-
useEffect(() => {
|
|
27
|
-
let root;
|
|
25
|
+
const rootWrapperElement = useMemo(() => {
|
|
28
26
|
if (!disablePortal) {
|
|
29
27
|
const currentPages = Taro.getCurrentPages() || [];
|
|
30
28
|
const currentPage = currentPages[currentPages.length - 1];
|
|
@@ -36,12 +34,11 @@ const Portal = forwardRef((props, ref) => {
|
|
|
36
34
|
const view = document.createElement("view");
|
|
37
35
|
view.id = portalId;
|
|
38
36
|
rootElement == null ? void 0 : rootElement.appendChild(view);
|
|
39
|
-
|
|
40
|
-
} else {
|
|
41
|
-
root = portalWrapperElement;
|
|
37
|
+
return view;
|
|
42
38
|
}
|
|
39
|
+
return portalWrapperElement;
|
|
43
40
|
}
|
|
44
|
-
|
|
41
|
+
return void 0;
|
|
45
42
|
}, []);
|
|
46
43
|
return /* @__PURE__ */ React.createElement(PortalCore, __spreadProps(__spreadValues({}, props), { ref, rootElement: rootWrapperElement }));
|
|
47
44
|
});
|
package/es/Radio/Radio.css
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
.bui-radio {
|
|
2
2
|
--label-color: var(--bui-radio-label-color, var(--bui-color-fg-default));
|
|
3
3
|
--label-font-size: var(--bui-radio-label-font-size, var(--bui-text-size-1));
|
|
4
|
-
--icon-font-size: var(--bui-radio-icon-font-size, var(--bui-title-size-2));
|
|
5
4
|
--icon-padding: var(--bui-radio-icon-padding, 5px);
|
|
6
5
|
display: inline-flex;
|
|
7
6
|
align-items: center;
|
package/es/Radio/Radio.js
CHANGED
|
@@ -39,7 +39,7 @@ const prefixCls = "bui-radio";
|
|
|
39
39
|
const Radio = forwardRef((props, ref) => {
|
|
40
40
|
const _a = props, {
|
|
41
41
|
className,
|
|
42
|
-
defaultChecked,
|
|
42
|
+
defaultChecked = false,
|
|
43
43
|
checked,
|
|
44
44
|
inputProps,
|
|
45
45
|
inputRef,
|
|
@@ -48,7 +48,7 @@ const Radio = forwardRef((props, ref) => {
|
|
|
48
48
|
disabled,
|
|
49
49
|
icon,
|
|
50
50
|
checkedIcon,
|
|
51
|
-
labelPlacement,
|
|
51
|
+
labelPlacement = "right",
|
|
52
52
|
onChange,
|
|
53
53
|
children
|
|
54
54
|
} = _a, others = __objRest(_a, [
|
|
@@ -147,10 +147,6 @@ const Radio = forwardRef((props, ref) => {
|
|
|
147
147
|
);
|
|
148
148
|
});
|
|
149
149
|
Radio.displayName = "BuiRadio";
|
|
150
|
-
Radio.defaultProps = {
|
|
151
|
-
defaultChecked: false,
|
|
152
|
-
labelPlacement: "right"
|
|
153
|
-
};
|
|
154
150
|
var Radio_default = Radio;
|
|
155
151
|
export {
|
|
156
152
|
Radio_default as default
|
package/es/Radio/RadioGroup.js
CHANGED
package/es/Rating/Rating.js
CHANGED
|
@@ -39,18 +39,18 @@ const classes = {
|
|
|
39
39
|
const Rating = forwardRef((props, ref) => {
|
|
40
40
|
const _a = props, {
|
|
41
41
|
className,
|
|
42
|
-
size,
|
|
42
|
+
size = "medium",
|
|
43
43
|
defaultValue,
|
|
44
|
-
allowHalf,
|
|
45
|
-
icon,
|
|
46
|
-
checkedIcon,
|
|
47
|
-
count,
|
|
48
|
-
readOnly,
|
|
49
|
-
disabled,
|
|
44
|
+
allowHalf = false,
|
|
45
|
+
icon = /* @__PURE__ */ React.createElement(StarFilledIcon, { htmlColor: "#ced1d6" }),
|
|
46
|
+
checkedIcon = /* @__PURE__ */ React.createElement(StarFilledIcon, { color: "warning" }),
|
|
47
|
+
count = 5,
|
|
48
|
+
readOnly = false,
|
|
49
|
+
disabled = false,
|
|
50
50
|
value,
|
|
51
51
|
onChange,
|
|
52
52
|
name,
|
|
53
|
-
disableClear
|
|
53
|
+
disableClear = false
|
|
54
54
|
} = _a, others = __objRest(_a, [
|
|
55
55
|
"className",
|
|
56
56
|
"size",
|
|
@@ -134,16 +134,6 @@ const Rating = forwardRef((props, ref) => {
|
|
|
134
134
|
);
|
|
135
135
|
});
|
|
136
136
|
Rating.displayName = "BuiRating";
|
|
137
|
-
Rating.defaultProps = {
|
|
138
|
-
size: "medium",
|
|
139
|
-
count: 5,
|
|
140
|
-
icon: /* @__PURE__ */ React.createElement(StarFilledIcon, { htmlColor: "#ced1d6" }),
|
|
141
|
-
checkedIcon: /* @__PURE__ */ React.createElement(StarFilledIcon, { color: "warning" }),
|
|
142
|
-
readOnly: false,
|
|
143
|
-
disabled: false,
|
|
144
|
-
allowHalf: false,
|
|
145
|
-
disableClear: false
|
|
146
|
-
};
|
|
147
137
|
var Rating_default = Rating;
|
|
148
138
|
export {
|
|
149
139
|
Rating_default as default
|
|
@@ -2,14 +2,12 @@ import { useForkRef } from "@bifrostui/utils";
|
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import React, { forwardRef, useCallback, useEffect, useRef } from "react";
|
|
4
4
|
import "./ScrollView.css";
|
|
5
|
-
function easeOutScroll(from, to, callback
|
|
6
|
-
if (dur <= 0) {
|
|
7
|
-
dur = 500;
|
|
8
|
-
}
|
|
5
|
+
function easeOutScroll(from, to, callback) {
|
|
9
6
|
if (from === to || typeof from !== "number") {
|
|
10
7
|
return;
|
|
11
8
|
}
|
|
12
9
|
const change = to - from;
|
|
10
|
+
const dur = 500;
|
|
13
11
|
const sTime = +/* @__PURE__ */ new Date();
|
|
14
12
|
function linear(t, b, c, d) {
|
|
15
13
|
return c * t / d + b;
|
|
@@ -44,8 +42,7 @@ const ScrollView = forwardRef(
|
|
|
44
42
|
scrollIntoView,
|
|
45
43
|
onTouchMove: propsOnTouchMove,
|
|
46
44
|
scrollIntoViewAlignment,
|
|
47
|
-
children
|
|
48
|
-
scrollAnimationDuration = 500
|
|
45
|
+
children
|
|
49
46
|
} = props;
|
|
50
47
|
const container = useRef(null);
|
|
51
48
|
const handleRef = useForkRef(ref, container);
|
|
@@ -55,15 +52,10 @@ const ScrollView = forwardRef(
|
|
|
55
52
|
if (top === void 0)
|
|
56
53
|
return;
|
|
57
54
|
if (isAnimation) {
|
|
58
|
-
easeOutScroll(
|
|
59
|
-
container.current
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
if (container.current)
|
|
63
|
-
container.current.scrollTop = pos;
|
|
64
|
-
},
|
|
65
|
-
scrollAnimationDuration
|
|
66
|
-
);
|
|
55
|
+
easeOutScroll(container.current.scrollTop, top, (pos) => {
|
|
56
|
+
if (container.current)
|
|
57
|
+
container.current.scrollTop = pos;
|
|
58
|
+
});
|
|
67
59
|
} else if (container.current)
|
|
68
60
|
container.current.scrollTop = top;
|
|
69
61
|
}, []);
|
|
@@ -71,15 +63,10 @@ const ScrollView = forwardRef(
|
|
|
71
63
|
if (left === void 0)
|
|
72
64
|
return;
|
|
73
65
|
if (isAnimation) {
|
|
74
|
-
easeOutScroll(
|
|
75
|
-
container.current
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
if (container.current)
|
|
79
|
-
container.current.scrollLeft = pos;
|
|
80
|
-
},
|
|
81
|
-
scrollAnimationDuration
|
|
82
|
-
);
|
|
66
|
+
easeOutScroll(container.current.scrollLeft, left, (pos) => {
|
|
67
|
+
if (container.current)
|
|
68
|
+
container.current.scrollLeft = pos;
|
|
69
|
+
});
|
|
83
70
|
} else if (container.current)
|
|
84
71
|
container.current.scrollLeft = left;
|
|
85
72
|
}, []);
|
|
@@ -138,6 +138,7 @@ export type ScrollViewProps<D extends React.ElementType = 'div', P = {}> = Overr
|
|
|
138
138
|
*/
|
|
139
139
|
fastDeceleration?: boolean;
|
|
140
140
|
/** 当 scroll-with-animation设置为 true 时,可以设置 scroll-animation-duration 来控制动画的执行时间,单位 ms。
|
|
141
|
+
* 仅小程序可用
|
|
141
142
|
*/
|
|
142
143
|
scrollAnimationDuration?: number;
|
|
143
144
|
/** 纵向滚动时,当滚动到顶部或底部时,强制禁止触发页面滚动,仍然只触发 scroll-view 自身的滚动。
|
package/es/Select/Select.css
CHANGED
|
@@ -48,9 +48,13 @@
|
|
|
48
48
|
.bui-select-option-container {
|
|
49
49
|
position: absolute;
|
|
50
50
|
box-sizing: border-box;
|
|
51
|
+
top: 100%;
|
|
52
|
+
left: 0;
|
|
53
|
+
width: 100%;
|
|
51
54
|
font-size: var(--bui-select-font-size, var(--bui-title-size-3));
|
|
52
55
|
z-index: var(--bui-z-index-tooltip);
|
|
53
56
|
border-radius: 3px;
|
|
57
|
+
background-color: var(--bui-color-bg-view);
|
|
54
58
|
padding: 2px;
|
|
55
59
|
overflow: hidden;
|
|
56
60
|
}
|
|
@@ -67,7 +71,6 @@
|
|
|
67
71
|
border-radius: 3px;
|
|
68
72
|
padding: var(--bui-select-option-container-padding, 3px 0);
|
|
69
73
|
box-shadow: 0 0 0 2px var(--bui-color-bg-default);
|
|
70
|
-
background-color: var(--bui-color-bg-view);
|
|
71
74
|
overflow: hidden;
|
|
72
75
|
}
|
|
73
76
|
.bui-select-option {
|
package/es/Select/Select.js
CHANGED
|
@@ -29,32 +29,13 @@ var __objRest = (source, exclude) => {
|
|
|
29
29
|
}
|
|
30
30
|
return target;
|
|
31
31
|
};
|
|
32
|
-
var __async = (__this, __arguments, generator) => {
|
|
33
|
-
return new Promise((resolve, reject) => {
|
|
34
|
-
var fulfilled = (value) => {
|
|
35
|
-
try {
|
|
36
|
-
step(generator.next(value));
|
|
37
|
-
} catch (e) {
|
|
38
|
-
reject(e);
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
var rejected = (value) => {
|
|
42
|
-
try {
|
|
43
|
-
step(generator.throw(value));
|
|
44
|
-
} catch (e) {
|
|
45
|
-
reject(e);
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
49
|
-
step((generator = generator.apply(__this, __arguments)).next());
|
|
50
|
-
});
|
|
51
|
-
};
|
|
52
32
|
import { CaretDownIcon, CaretUpIcon } from "@bifrostui/icons";
|
|
53
33
|
import {
|
|
54
34
|
getStylesAndLocation,
|
|
55
35
|
isMini,
|
|
56
36
|
throttle,
|
|
57
37
|
useForkRef,
|
|
38
|
+
useUniqueId,
|
|
58
39
|
useValue
|
|
59
40
|
} from "@bifrostui/utils";
|
|
60
41
|
import clsx from "clsx";
|
|
@@ -76,12 +57,14 @@ const Select = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
76
57
|
inputProps,
|
|
77
58
|
BackdropProps,
|
|
78
59
|
value,
|
|
79
|
-
defaultValue,
|
|
60
|
+
defaultValue = "",
|
|
80
61
|
disabled,
|
|
81
62
|
placeholder,
|
|
82
63
|
icon,
|
|
83
64
|
open,
|
|
84
|
-
scrollContainer
|
|
65
|
+
scrollContainer = () => {
|
|
66
|
+
return isMini ? null : document.body;
|
|
67
|
+
},
|
|
85
68
|
onChange,
|
|
86
69
|
onClose,
|
|
87
70
|
onOpen,
|
|
@@ -117,36 +100,38 @@ const Select = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
117
100
|
const isOpen = open !== void 0 ? open : internalOpen;
|
|
118
101
|
const locatorRef = useRef(null);
|
|
119
102
|
const rootRef = useForkRef(ref, locatorRef);
|
|
120
|
-
const
|
|
121
|
-
const
|
|
122
|
-
const updateOptionStyle = () =>
|
|
103
|
+
const ttId = useUniqueId();
|
|
104
|
+
const dataId = `${prefixCls}-tt-${ttId}`;
|
|
105
|
+
const updateOptionStyle = throttle(() => {
|
|
123
106
|
const curScrollRoot = scrollContainer();
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
});
|
|
140
|
-
const changeOpen = (newOpen) =>
|
|
107
|
+
if (!isMini && curScrollRoot) {
|
|
108
|
+
const result = getStylesAndLocation({
|
|
109
|
+
scrollRoot: curScrollRoot,
|
|
110
|
+
childrenRef: locatorRef,
|
|
111
|
+
arrowDirection: defaultPlacement,
|
|
112
|
+
arrowLocation: "none",
|
|
113
|
+
selector: `[data-id="${dataId}"]`,
|
|
114
|
+
offsetSpacing: 0
|
|
115
|
+
});
|
|
116
|
+
if (!result)
|
|
117
|
+
return;
|
|
118
|
+
const { styles, childrenStyle, newArrowDirection } = result;
|
|
119
|
+
setPlacement(newArrowDirection);
|
|
120
|
+
setOptionStyle(__spreadProps(__spreadValues({}, styles), { width: childrenStyle.width }));
|
|
121
|
+
}
|
|
122
|
+
}, 100);
|
|
123
|
+
const changeOpen = (newOpen) => {
|
|
141
124
|
if (newOpen) {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
125
|
+
updateOptionStyle();
|
|
126
|
+
setTimeout(() => {
|
|
127
|
+
setInternalOpen(newOpen);
|
|
128
|
+
onOpen == null ? void 0 : onOpen();
|
|
129
|
+
}, 100);
|
|
145
130
|
} else {
|
|
146
131
|
onClose == null ? void 0 : onClose();
|
|
147
132
|
setInternalOpen(newOpen);
|
|
148
133
|
}
|
|
149
|
-
}
|
|
134
|
+
};
|
|
150
135
|
const handleSelectClick = (e) => {
|
|
151
136
|
if (disabled)
|
|
152
137
|
return;
|
|
@@ -171,11 +156,10 @@ const Select = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
171
156
|
[selectValue, onChange, setRenderValue]
|
|
172
157
|
);
|
|
173
158
|
useEffect(() => {
|
|
174
|
-
const resizeCb = throttle(updateOptionStyle, 100);
|
|
175
159
|
if (!isMini) {
|
|
176
|
-
window.addEventListener("resize",
|
|
160
|
+
window.addEventListener("resize", updateOptionStyle);
|
|
177
161
|
return () => {
|
|
178
|
-
window.removeEventListener("resize",
|
|
162
|
+
window.removeEventListener("resize", updateOptionStyle);
|
|
179
163
|
};
|
|
180
164
|
}
|
|
181
165
|
}, []);
|
|
@@ -193,8 +177,8 @@ const Select = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
193
177
|
{
|
|
194
178
|
in: isOpen,
|
|
195
179
|
timeout: {
|
|
196
|
-
enter:
|
|
197
|
-
exit:
|
|
180
|
+
enter: 150,
|
|
181
|
+
exit: 150
|
|
198
182
|
}
|
|
199
183
|
},
|
|
200
184
|
/* @__PURE__ */ React.createElement(
|
|
@@ -208,7 +192,7 @@ const Select = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
208
192
|
[`${prefixCls}-option-container-hide`]: !isOpen
|
|
209
193
|
}
|
|
210
194
|
),
|
|
211
|
-
|
|
195
|
+
"data-id": dataId,
|
|
212
196
|
style: optionStyle
|
|
213
197
|
},
|
|
214
198
|
/* @__PURE__ */ React.createElement(
|
|
@@ -217,18 +201,11 @@ const Select = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
217
201
|
in: isOpen,
|
|
218
202
|
direction: placement === "bottom" ? "down" : "up",
|
|
219
203
|
timeout: {
|
|
220
|
-
enter:
|
|
221
|
-
exit:
|
|
204
|
+
enter: 150,
|
|
205
|
+
exit: 150
|
|
222
206
|
}
|
|
223
207
|
},
|
|
224
|
-
/* @__PURE__ */ React.createElement(
|
|
225
|
-
"div",
|
|
226
|
-
{
|
|
227
|
-
className: clsx(`${prefixCls}-option-main`),
|
|
228
|
-
ref: optionMainRef
|
|
229
|
-
},
|
|
230
|
-
children
|
|
231
|
-
)
|
|
208
|
+
/* @__PURE__ */ React.createElement("div", { className: clsx(`${prefixCls}-option-main`) }, children)
|
|
232
209
|
)
|
|
233
210
|
)
|
|
234
211
|
);
|
|
@@ -256,8 +233,9 @@ const Select = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
256
233
|
[inputProps == null ? void 0 : inputProps.className]: inputProps == null ? void 0 : inputProps.className
|
|
257
234
|
})
|
|
258
235
|
})
|
|
259
|
-
), icon || defaultIcon)
|
|
260
|
-
|
|
236
|
+
), icon || defaultIcon),
|
|
237
|
+
isMini && renderOptions()
|
|
238
|
+
), !isMini && /* @__PURE__ */ React.createElement(Portal, { onRootElementMouted: updateOptionStyle }, renderOptions()), /* @__PURE__ */ React.createElement(
|
|
261
239
|
Backdrop,
|
|
262
240
|
__spreadProps(__spreadValues({
|
|
263
241
|
open: isOpen,
|
|
@@ -272,10 +250,6 @@ const Select = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
272
250
|
));
|
|
273
251
|
});
|
|
274
252
|
Select.displayName = "BuiSelect";
|
|
275
|
-
Select.defaultProps = {
|
|
276
|
-
defaultValue: "",
|
|
277
|
-
scrollContainer: () => null
|
|
278
|
-
};
|
|
279
253
|
var Select_default = Select;
|
|
280
254
|
export {
|
|
281
255
|
Select_default as default
|
package/es/Skeleton/Skeleton.js
CHANGED
|
@@ -31,16 +31,16 @@ import React from "react";
|
|
|
31
31
|
import "./Skeleton.css";
|
|
32
32
|
const prefixCls = "bui-skeleton";
|
|
33
33
|
const Skeleton = /* @__PURE__ */ React.forwardRef(
|
|
34
|
-
(
|
|
35
|
-
|
|
34
|
+
(_a, ref) => {
|
|
35
|
+
var _b = _a, {
|
|
36
36
|
className,
|
|
37
37
|
style,
|
|
38
|
-
animation,
|
|
38
|
+
animation = "wave",
|
|
39
39
|
width,
|
|
40
40
|
height,
|
|
41
|
-
variant,
|
|
41
|
+
variant = "text",
|
|
42
42
|
children
|
|
43
|
-
} =
|
|
43
|
+
} = _b, others = __objRest(_b, [
|
|
44
44
|
"className",
|
|
45
45
|
"style",
|
|
46
46
|
"animation",
|
|
@@ -69,10 +69,6 @@ const Skeleton = /* @__PURE__ */ React.forwardRef(
|
|
|
69
69
|
}
|
|
70
70
|
);
|
|
71
71
|
Skeleton.displayName = "BuiSkeleton";
|
|
72
|
-
Skeleton.defaultProps = {
|
|
73
|
-
animation: "wave",
|
|
74
|
-
variant: "text"
|
|
75
|
-
};
|
|
76
72
|
var Skeleton_default = Skeleton;
|
|
77
73
|
export {
|
|
78
74
|
Skeleton_default as default
|