@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/dist/Popover/Popover.js
CHANGED
|
@@ -51,26 +51,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
51
51
|
mod
|
|
52
52
|
));
|
|
53
53
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
54
|
-
var __async = (__this, __arguments, generator) => {
|
|
55
|
-
return new Promise((resolve, reject) => {
|
|
56
|
-
var fulfilled = (value) => {
|
|
57
|
-
try {
|
|
58
|
-
step(generator.next(value));
|
|
59
|
-
} catch (e) {
|
|
60
|
-
reject(e);
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
var rejected = (value) => {
|
|
64
|
-
try {
|
|
65
|
-
step(generator.throw(value));
|
|
66
|
-
} catch (e) {
|
|
67
|
-
reject(e);
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
71
|
-
step((generator = generator.apply(__this, __arguments)).next());
|
|
72
|
-
});
|
|
73
|
-
};
|
|
74
54
|
var Popover_exports = {};
|
|
75
55
|
__export(Popover_exports, {
|
|
76
56
|
default: () => Popover_default
|
|
@@ -93,9 +73,9 @@ const Popover = /* @__PURE__ */ import_react.default.forwardRef((props, ref) =>
|
|
|
93
73
|
offsetSpacing = 0,
|
|
94
74
|
placement = "top",
|
|
95
75
|
trigger = "click",
|
|
76
|
+
onOpenChange,
|
|
96
77
|
open,
|
|
97
|
-
hideArrow
|
|
98
|
-
onOpenChange
|
|
78
|
+
hideArrow
|
|
99
79
|
} = _a, others = __objRest(_a, [
|
|
100
80
|
"className",
|
|
101
81
|
"style",
|
|
@@ -106,9 +86,9 @@ const Popover = /* @__PURE__ */ import_react.default.forwardRef((props, ref) =>
|
|
|
106
86
|
"offsetSpacing",
|
|
107
87
|
"placement",
|
|
108
88
|
"trigger",
|
|
89
|
+
"onOpenChange",
|
|
109
90
|
"open",
|
|
110
|
-
"hideArrow"
|
|
111
|
-
"onOpenChange"
|
|
91
|
+
"hideArrow"
|
|
112
92
|
]);
|
|
113
93
|
const controlByUser = typeof open !== "undefined";
|
|
114
94
|
const { direction, location = "center" } = (0, import_utils.parsePlacement)(placement);
|
|
@@ -116,18 +96,11 @@ const Popover = /* @__PURE__ */ import_react.default.forwardRef((props, ref) =>
|
|
|
116
96
|
const [openStatus, setOpenStatus] = (0, import_react.useState)(defaultOpen);
|
|
117
97
|
const [arrowDirection, setArrowDirection] = (0, import_react.useState)(direction);
|
|
118
98
|
const [arrowLocation, setArrowLocation] = (0, import_react.useState)(location);
|
|
119
|
-
const [
|
|
120
|
-
const
|
|
121
|
-
const nodeRef = (0, import_utils.useForkRef)(ref, tipRef);
|
|
122
|
-
const clearRef = (status) => {
|
|
123
|
-
if (status === false) {
|
|
124
|
-
tipRef.current = null;
|
|
125
|
-
}
|
|
126
|
-
};
|
|
99
|
+
const [tooltyles, setTooltyles] = (0, import_react.useState)({});
|
|
100
|
+
const ttId = (0, import_utils.useUniqueId)();
|
|
127
101
|
const changeOpenStatus = (event, status) => {
|
|
128
102
|
if (controlByUser)
|
|
129
103
|
return;
|
|
130
|
-
clearRef(status);
|
|
131
104
|
setOpenStatus(status);
|
|
132
105
|
onOpenChange == null ? void 0 : onOpenChange(event, { open: status });
|
|
133
106
|
};
|
|
@@ -146,33 +119,23 @@ const Popover = /* @__PURE__ */ import_react.default.forwardRef((props, ref) =>
|
|
|
146
119
|
if (!controlByUser)
|
|
147
120
|
return;
|
|
148
121
|
setOpenStatus(open);
|
|
149
|
-
clearRef(open);
|
|
150
122
|
}, [open]);
|
|
151
|
-
(0, import_react.useEffect)(() => {
|
|
152
|
-
if (!openStatus) {
|
|
153
|
-
setToolStyles({
|
|
154
|
-
visibility: "hidden"
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
}, [openStatus]);
|
|
158
123
|
const clickEventHandler = (event) => {
|
|
159
124
|
if (trigger === "hover" || (trigger == null ? void 0 : trigger.length) === 1 && (trigger == null ? void 0 : trigger[0]) === "hover")
|
|
160
125
|
return;
|
|
161
126
|
hidePopover(event);
|
|
162
127
|
};
|
|
163
|
-
const onRootElementMouted = (0, import_utils.throttle)(() =>
|
|
164
|
-
if (!tipRef.current)
|
|
165
|
-
return;
|
|
128
|
+
const onRootElementMouted = (0, import_utils.throttle)(() => {
|
|
166
129
|
const {
|
|
167
130
|
direction: newParsedDirection,
|
|
168
131
|
location: newParsedLocation = "center"
|
|
169
132
|
} = (0, import_utils.parsePlacement)(placement);
|
|
170
|
-
const result =
|
|
133
|
+
const result = (0, import_utils.getStylesAndLocation)({
|
|
171
134
|
childrenRef,
|
|
172
135
|
arrowDirection: newParsedDirection,
|
|
173
136
|
arrowLocation: newParsedLocation,
|
|
174
137
|
offsetSpacing,
|
|
175
|
-
|
|
138
|
+
selector: `[data-id="tt_${ttId}"]`
|
|
176
139
|
});
|
|
177
140
|
if (!result)
|
|
178
141
|
return;
|
|
@@ -183,32 +146,26 @@ const Popover = /* @__PURE__ */ import_react.default.forwardRef((props, ref) =>
|
|
|
183
146
|
if (newArrowLocation !== arrowLocation) {
|
|
184
147
|
setArrowLocation(newArrowLocation);
|
|
185
148
|
}
|
|
186
|
-
|
|
187
|
-
}
|
|
149
|
+
setTooltyles(styles);
|
|
150
|
+
}, 100);
|
|
151
|
+
const bindEvent = () => {
|
|
152
|
+
if (!controlByUser) {
|
|
153
|
+
document.addEventListener("click", clickEventHandler);
|
|
154
|
+
}
|
|
155
|
+
window.addEventListener("resize", onRootElementMouted);
|
|
156
|
+
};
|
|
157
|
+
const unbindEvent = () => {
|
|
158
|
+
if (!controlByUser) {
|
|
159
|
+
document.removeEventListener("click", clickEventHandler);
|
|
160
|
+
}
|
|
161
|
+
window.removeEventListener("resize", onRootElementMouted);
|
|
162
|
+
};
|
|
188
163
|
(0, import_react.useEffect)(() => {
|
|
189
|
-
const bindEvent = () => {
|
|
190
|
-
if (!tipRef.current)
|
|
191
|
-
return;
|
|
192
|
-
if (!controlByUser) {
|
|
193
|
-
document.addEventListener("click", clickEventHandler);
|
|
194
|
-
}
|
|
195
|
-
if (!import_utils.isMini) {
|
|
196
|
-
window.addEventListener("resize", onRootElementMouted);
|
|
197
|
-
}
|
|
198
|
-
};
|
|
199
|
-
const unbindEvent = () => {
|
|
200
|
-
if (!controlByUser) {
|
|
201
|
-
document.removeEventListener("click", clickEventHandler);
|
|
202
|
-
}
|
|
203
|
-
if (!import_utils.isMini) {
|
|
204
|
-
window.removeEventListener("resize", onRootElementMouted);
|
|
205
|
-
}
|
|
206
|
-
};
|
|
207
164
|
bindEvent();
|
|
208
165
|
return () => {
|
|
209
166
|
unbindEvent();
|
|
210
167
|
};
|
|
211
|
-
}, [
|
|
168
|
+
}, []);
|
|
212
169
|
if (!title && !content)
|
|
213
170
|
return null;
|
|
214
171
|
let triggerEventOption;
|
|
@@ -223,14 +180,14 @@ const Popover = /* @__PURE__ */ import_react.default.forwardRef((props, ref) =>
|
|
|
223
180
|
const childrenOptions = __spreadValues({
|
|
224
181
|
ref: childrenRef
|
|
225
182
|
}, triggerEventOption);
|
|
226
|
-
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, open || openStatus ? /* @__PURE__ */ import_react.default.createElement(import_Portal.default, { onRootElementMouted }, /* @__PURE__ */ import_react.default.createElement(
|
|
183
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, open || openStatus ? /* @__PURE__ */ import_react.default.createElement(import_Portal.default, { onRootElementMouted, ref }, /* @__PURE__ */ import_react.default.createElement(
|
|
227
184
|
"div",
|
|
228
185
|
__spreadValues({
|
|
229
186
|
className: (0, import_clsx.default)(prefixCls, className, `popover-${arrowDirection}`, {
|
|
230
187
|
"bui-popover-arrow-hide": hideArrow
|
|
231
188
|
}),
|
|
232
|
-
|
|
233
|
-
|
|
189
|
+
"data-id": `tt_${ttId}`,
|
|
190
|
+
style: __spreadValues(__spreadValues({}, style), tooltyles)
|
|
234
191
|
}, others),
|
|
235
192
|
!hideArrow ? /* @__PURE__ */ import_react.default.createElement(
|
|
236
193
|
"div",
|
|
@@ -53,9 +53,7 @@ var import_react = __toESM(require("react"));
|
|
|
53
53
|
var import_PortalCore = __toESM(require("./PortalCore"));
|
|
54
54
|
const Portal = (0, import_react.forwardRef)((props, ref) => {
|
|
55
55
|
const { disablePortal } = props;
|
|
56
|
-
const
|
|
57
|
-
(0, import_react.useEffect)(() => {
|
|
58
|
-
let root;
|
|
56
|
+
const rootWrapperElement = (0, import_react.useMemo)(() => {
|
|
59
57
|
if (!disablePortal) {
|
|
60
58
|
const currentPages = import_taro.default.getCurrentPages() || [];
|
|
61
59
|
const currentPage = currentPages[currentPages.length - 1];
|
|
@@ -67,12 +65,11 @@ const Portal = (0, import_react.forwardRef)((props, ref) => {
|
|
|
67
65
|
const view = document.createElement("view");
|
|
68
66
|
view.id = portalId;
|
|
69
67
|
rootElement == null ? void 0 : rootElement.appendChild(view);
|
|
70
|
-
|
|
71
|
-
} else {
|
|
72
|
-
root = portalWrapperElement;
|
|
68
|
+
return view;
|
|
73
69
|
}
|
|
70
|
+
return portalWrapperElement;
|
|
74
71
|
}
|
|
75
|
-
|
|
72
|
+
return void 0;
|
|
76
73
|
}, []);
|
|
77
74
|
return /* @__PURE__ */ import_react.default.createElement(import_PortalCore.default, __spreadProps(__spreadValues({}, props), { ref, rootElement: rootWrapperElement }));
|
|
78
75
|
});
|
package/dist/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/dist/Radio/Radio.js
CHANGED
|
@@ -69,7 +69,7 @@ const prefixCls = "bui-radio";
|
|
|
69
69
|
const Radio = (0, import_react.forwardRef)((props, ref) => {
|
|
70
70
|
const _a = props, {
|
|
71
71
|
className,
|
|
72
|
-
defaultChecked,
|
|
72
|
+
defaultChecked = false,
|
|
73
73
|
checked,
|
|
74
74
|
inputProps,
|
|
75
75
|
inputRef,
|
|
@@ -78,7 +78,7 @@ const Radio = (0, import_react.forwardRef)((props, ref) => {
|
|
|
78
78
|
disabled,
|
|
79
79
|
icon,
|
|
80
80
|
checkedIcon,
|
|
81
|
-
labelPlacement,
|
|
81
|
+
labelPlacement = "right",
|
|
82
82
|
onChange,
|
|
83
83
|
children
|
|
84
84
|
} = _a, others = __objRest(_a, [
|
|
@@ -177,8 +177,4 @@ const Radio = (0, import_react.forwardRef)((props, ref) => {
|
|
|
177
177
|
);
|
|
178
178
|
});
|
|
179
179
|
Radio.displayName = "BuiRadio";
|
|
180
|
-
Radio.defaultProps = {
|
|
181
|
-
defaultChecked: false,
|
|
182
|
-
labelPlacement: "right"
|
|
183
|
-
};
|
|
184
180
|
var Radio_default = Radio;
|
package/dist/Radio/RadioGroup.js
CHANGED
package/dist/Rating/Rating.js
CHANGED
|
@@ -69,18 +69,18 @@ const classes = {
|
|
|
69
69
|
const Rating = (0, import_react.forwardRef)((props, ref) => {
|
|
70
70
|
const _a = props, {
|
|
71
71
|
className,
|
|
72
|
-
size,
|
|
72
|
+
size = "medium",
|
|
73
73
|
defaultValue,
|
|
74
|
-
allowHalf,
|
|
75
|
-
icon,
|
|
76
|
-
checkedIcon,
|
|
77
|
-
count,
|
|
78
|
-
readOnly,
|
|
79
|
-
disabled,
|
|
74
|
+
allowHalf = false,
|
|
75
|
+
icon = /* @__PURE__ */ import_react.default.createElement(import_icons.StarFilledIcon, { htmlColor: "#ced1d6" }),
|
|
76
|
+
checkedIcon = /* @__PURE__ */ import_react.default.createElement(import_icons.StarFilledIcon, { color: "warning" }),
|
|
77
|
+
count = 5,
|
|
78
|
+
readOnly = false,
|
|
79
|
+
disabled = false,
|
|
80
80
|
value,
|
|
81
81
|
onChange,
|
|
82
82
|
name,
|
|
83
|
-
disableClear
|
|
83
|
+
disableClear = false
|
|
84
84
|
} = _a, others = __objRest(_a, [
|
|
85
85
|
"className",
|
|
86
86
|
"size",
|
|
@@ -164,14 +164,4 @@ const Rating = (0, import_react.forwardRef)((props, ref) => {
|
|
|
164
164
|
);
|
|
165
165
|
});
|
|
166
166
|
Rating.displayName = "BuiRating";
|
|
167
|
-
Rating.defaultProps = {
|
|
168
|
-
size: "medium",
|
|
169
|
-
count: 5,
|
|
170
|
-
icon: /* @__PURE__ */ import_react.default.createElement(import_icons.StarFilledIcon, { htmlColor: "#ced1d6" }),
|
|
171
|
-
checkedIcon: /* @__PURE__ */ import_react.default.createElement(import_icons.StarFilledIcon, { color: "warning" }),
|
|
172
|
-
readOnly: false,
|
|
173
|
-
disabled: false,
|
|
174
|
-
allowHalf: false,
|
|
175
|
-
disableClear: false
|
|
176
|
-
};
|
|
177
167
|
var Rating_default = Rating;
|
|
@@ -34,14 +34,12 @@ var import_utils = require("@bifrostui/utils");
|
|
|
34
34
|
var import_clsx = __toESM(require("clsx"));
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_ScrollView = require("./ScrollView.css");
|
|
37
|
-
function easeOutScroll(from, to, callback
|
|
38
|
-
if (dur <= 0) {
|
|
39
|
-
dur = 500;
|
|
40
|
-
}
|
|
37
|
+
function easeOutScroll(from, to, callback) {
|
|
41
38
|
if (from === to || typeof from !== "number") {
|
|
42
39
|
return;
|
|
43
40
|
}
|
|
44
41
|
const change = to - from;
|
|
42
|
+
const dur = 500;
|
|
45
43
|
const sTime = +/* @__PURE__ */ new Date();
|
|
46
44
|
function linear(t, b, c, d) {
|
|
47
45
|
return c * t / d + b;
|
|
@@ -76,8 +74,7 @@ const ScrollView = (0, import_react.forwardRef)(
|
|
|
76
74
|
scrollIntoView,
|
|
77
75
|
onTouchMove: propsOnTouchMove,
|
|
78
76
|
scrollIntoViewAlignment,
|
|
79
|
-
children
|
|
80
|
-
scrollAnimationDuration = 500
|
|
77
|
+
children
|
|
81
78
|
} = props;
|
|
82
79
|
const container = (0, import_react.useRef)(null);
|
|
83
80
|
const handleRef = (0, import_utils.useForkRef)(ref, container);
|
|
@@ -87,15 +84,10 @@ const ScrollView = (0, import_react.forwardRef)(
|
|
|
87
84
|
if (top === void 0)
|
|
88
85
|
return;
|
|
89
86
|
if (isAnimation) {
|
|
90
|
-
easeOutScroll(
|
|
91
|
-
container.current
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
if (container.current)
|
|
95
|
-
container.current.scrollTop = pos;
|
|
96
|
-
},
|
|
97
|
-
scrollAnimationDuration
|
|
98
|
-
);
|
|
87
|
+
easeOutScroll(container.current.scrollTop, top, (pos) => {
|
|
88
|
+
if (container.current)
|
|
89
|
+
container.current.scrollTop = pos;
|
|
90
|
+
});
|
|
99
91
|
} else if (container.current)
|
|
100
92
|
container.current.scrollTop = top;
|
|
101
93
|
}, []);
|
|
@@ -103,15 +95,10 @@ const ScrollView = (0, import_react.forwardRef)(
|
|
|
103
95
|
if (left === void 0)
|
|
104
96
|
return;
|
|
105
97
|
if (isAnimation) {
|
|
106
|
-
easeOutScroll(
|
|
107
|
-
container.current
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
if (container.current)
|
|
111
|
-
container.current.scrollLeft = pos;
|
|
112
|
-
},
|
|
113
|
-
scrollAnimationDuration
|
|
114
|
-
);
|
|
98
|
+
easeOutScroll(container.current.scrollLeft, left, (pos) => {
|
|
99
|
+
if (container.current)
|
|
100
|
+
container.current.scrollLeft = pos;
|
|
101
|
+
});
|
|
115
102
|
} else if (container.current)
|
|
116
103
|
container.current.scrollLeft = left;
|
|
117
104
|
}, []);
|
|
@@ -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/dist/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/dist/Select/Select.js
CHANGED
|
@@ -54,26 +54,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
54
54
|
mod
|
|
55
55
|
));
|
|
56
56
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
57
|
-
var __async = (__this, __arguments, generator) => {
|
|
58
|
-
return new Promise((resolve, reject) => {
|
|
59
|
-
var fulfilled = (value) => {
|
|
60
|
-
try {
|
|
61
|
-
step(generator.next(value));
|
|
62
|
-
} catch (e) {
|
|
63
|
-
reject(e);
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
var rejected = (value) => {
|
|
67
|
-
try {
|
|
68
|
-
step(generator.throw(value));
|
|
69
|
-
} catch (e) {
|
|
70
|
-
reject(e);
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
74
|
-
step((generator = generator.apply(__this, __arguments)).next());
|
|
75
|
-
});
|
|
76
|
-
};
|
|
77
57
|
var Select_exports = {};
|
|
78
58
|
__export(Select_exports, {
|
|
79
59
|
default: () => Select_default
|
|
@@ -100,12 +80,14 @@ const Select = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
|
|
|
100
80
|
inputProps,
|
|
101
81
|
BackdropProps,
|
|
102
82
|
value,
|
|
103
|
-
defaultValue,
|
|
83
|
+
defaultValue = "",
|
|
104
84
|
disabled,
|
|
105
85
|
placeholder,
|
|
106
86
|
icon,
|
|
107
87
|
open,
|
|
108
|
-
scrollContainer
|
|
88
|
+
scrollContainer = () => {
|
|
89
|
+
return import_utils.isMini ? null : document.body;
|
|
90
|
+
},
|
|
109
91
|
onChange,
|
|
110
92
|
onClose,
|
|
111
93
|
onOpen,
|
|
@@ -141,36 +123,38 @@ const Select = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
|
|
|
141
123
|
const isOpen = open !== void 0 ? open : internalOpen;
|
|
142
124
|
const locatorRef = (0, import_react.useRef)(null);
|
|
143
125
|
const rootRef = (0, import_utils.useForkRef)(ref, locatorRef);
|
|
144
|
-
const
|
|
145
|
-
const
|
|
146
|
-
const updateOptionStyle = (
|
|
126
|
+
const ttId = (0, import_utils.useUniqueId)();
|
|
127
|
+
const dataId = `${prefixCls}-tt-${ttId}`;
|
|
128
|
+
const updateOptionStyle = (0, import_utils.throttle)(() => {
|
|
147
129
|
const curScrollRoot = scrollContainer();
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
});
|
|
164
|
-
const changeOpen = (newOpen) =>
|
|
130
|
+
if (!import_utils.isMini && curScrollRoot) {
|
|
131
|
+
const result = (0, import_utils.getStylesAndLocation)({
|
|
132
|
+
scrollRoot: curScrollRoot,
|
|
133
|
+
childrenRef: locatorRef,
|
|
134
|
+
arrowDirection: defaultPlacement,
|
|
135
|
+
arrowLocation: "none",
|
|
136
|
+
selector: `[data-id="${dataId}"]`,
|
|
137
|
+
offsetSpacing: 0
|
|
138
|
+
});
|
|
139
|
+
if (!result)
|
|
140
|
+
return;
|
|
141
|
+
const { styles, childrenStyle, newArrowDirection } = result;
|
|
142
|
+
setPlacement(newArrowDirection);
|
|
143
|
+
setOptionStyle(__spreadProps(__spreadValues({}, styles), { width: childrenStyle.width }));
|
|
144
|
+
}
|
|
145
|
+
}, 100);
|
|
146
|
+
const changeOpen = (newOpen) => {
|
|
165
147
|
if (newOpen) {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
148
|
+
updateOptionStyle();
|
|
149
|
+
setTimeout(() => {
|
|
150
|
+
setInternalOpen(newOpen);
|
|
151
|
+
onOpen == null ? void 0 : onOpen();
|
|
152
|
+
}, 100);
|
|
169
153
|
} else {
|
|
170
154
|
onClose == null ? void 0 : onClose();
|
|
171
155
|
setInternalOpen(newOpen);
|
|
172
156
|
}
|
|
173
|
-
}
|
|
157
|
+
};
|
|
174
158
|
const handleSelectClick = (e) => {
|
|
175
159
|
if (disabled)
|
|
176
160
|
return;
|
|
@@ -195,11 +179,10 @@ const Select = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
|
|
|
195
179
|
[selectValue, onChange, setRenderValue]
|
|
196
180
|
);
|
|
197
181
|
(0, import_react.useEffect)(() => {
|
|
198
|
-
const resizeCb = (0, import_utils.throttle)(updateOptionStyle, 100);
|
|
199
182
|
if (!import_utils.isMini) {
|
|
200
|
-
window.addEventListener("resize",
|
|
183
|
+
window.addEventListener("resize", updateOptionStyle);
|
|
201
184
|
return () => {
|
|
202
|
-
window.removeEventListener("resize",
|
|
185
|
+
window.removeEventListener("resize", updateOptionStyle);
|
|
203
186
|
};
|
|
204
187
|
}
|
|
205
188
|
}, []);
|
|
@@ -217,8 +200,8 @@ const Select = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
|
|
|
217
200
|
{
|
|
218
201
|
in: isOpen,
|
|
219
202
|
timeout: {
|
|
220
|
-
enter:
|
|
221
|
-
exit:
|
|
203
|
+
enter: 150,
|
|
204
|
+
exit: 150
|
|
222
205
|
}
|
|
223
206
|
},
|
|
224
207
|
/* @__PURE__ */ import_react.default.createElement(
|
|
@@ -232,7 +215,7 @@ const Select = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
|
|
|
232
215
|
[`${prefixCls}-option-container-hide`]: !isOpen
|
|
233
216
|
}
|
|
234
217
|
),
|
|
235
|
-
|
|
218
|
+
"data-id": dataId,
|
|
236
219
|
style: optionStyle
|
|
237
220
|
},
|
|
238
221
|
/* @__PURE__ */ import_react.default.createElement(
|
|
@@ -241,18 +224,11 @@ const Select = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
|
|
|
241
224
|
in: isOpen,
|
|
242
225
|
direction: placement === "bottom" ? "down" : "up",
|
|
243
226
|
timeout: {
|
|
244
|
-
enter:
|
|
245
|
-
exit:
|
|
227
|
+
enter: 150,
|
|
228
|
+
exit: 150
|
|
246
229
|
}
|
|
247
230
|
},
|
|
248
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
249
|
-
"div",
|
|
250
|
-
{
|
|
251
|
-
className: (0, import_clsx.default)(`${prefixCls}-option-main`),
|
|
252
|
-
ref: optionMainRef
|
|
253
|
-
},
|
|
254
|
-
children
|
|
255
|
-
)
|
|
231
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_clsx.default)(`${prefixCls}-option-main`) }, children)
|
|
256
232
|
)
|
|
257
233
|
)
|
|
258
234
|
);
|
|
@@ -280,8 +256,9 @@ const Select = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
|
|
|
280
256
|
[inputProps == null ? void 0 : inputProps.className]: inputProps == null ? void 0 : inputProps.className
|
|
281
257
|
})
|
|
282
258
|
})
|
|
283
|
-
), icon || defaultIcon)
|
|
284
|
-
|
|
259
|
+
), icon || defaultIcon),
|
|
260
|
+
import_utils.isMini && renderOptions()
|
|
261
|
+
), !import_utils.isMini && /* @__PURE__ */ import_react.default.createElement(import_Portal.default, { onRootElementMouted: updateOptionStyle }, renderOptions()), /* @__PURE__ */ import_react.default.createElement(
|
|
285
262
|
import_Backdrop.default,
|
|
286
263
|
__spreadProps(__spreadValues({
|
|
287
264
|
open: isOpen,
|
|
@@ -296,8 +273,4 @@ const Select = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
|
|
|
296
273
|
));
|
|
297
274
|
});
|
|
298
275
|
Select.displayName = "BuiSelect";
|
|
299
|
-
Select.defaultProps = {
|
|
300
|
-
defaultValue: "",
|
|
301
|
-
scrollContainer: () => null
|
|
302
|
-
};
|
|
303
276
|
var Select_default = Select;
|
|
@@ -61,16 +61,16 @@ var import_react = __toESM(require("react"));
|
|
|
61
61
|
var import_Skeleton = require("./Skeleton.css");
|
|
62
62
|
const prefixCls = "bui-skeleton";
|
|
63
63
|
const Skeleton = /* @__PURE__ */ import_react.default.forwardRef(
|
|
64
|
-
(
|
|
65
|
-
|
|
64
|
+
(_a, ref) => {
|
|
65
|
+
var _b = _a, {
|
|
66
66
|
className,
|
|
67
67
|
style,
|
|
68
|
-
animation,
|
|
68
|
+
animation = "wave",
|
|
69
69
|
width,
|
|
70
70
|
height,
|
|
71
|
-
variant,
|
|
71
|
+
variant = "text",
|
|
72
72
|
children
|
|
73
|
-
} =
|
|
73
|
+
} = _b, others = __objRest(_b, [
|
|
74
74
|
"className",
|
|
75
75
|
"style",
|
|
76
76
|
"animation",
|
|
@@ -99,8 +99,4 @@ const Skeleton = /* @__PURE__ */ import_react.default.forwardRef(
|
|
|
99
99
|
}
|
|
100
100
|
);
|
|
101
101
|
Skeleton.displayName = "BuiSkeleton";
|
|
102
|
-
Skeleton.defaultProps = {
|
|
103
|
-
animation: "wave",
|
|
104
|
-
variant: "text"
|
|
105
|
-
};
|
|
106
102
|
var Skeleton_default = Skeleton;
|