@bifrostui/react 1.4.7 → 2.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ActionSheet/ActionSheet.css +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 +6 -14
- 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/CollapsePanel/CollapsePanelItem.js +45 -46
- package/dist/Countdown/Countdown.js +5 -12
- 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.d.ts +1 -1
- package/dist/Modal/Modal.miniapp.js +4 -10
- package/dist/NavBar/NavBar.js +0 -1
- package/dist/Popover/Popover.css +5 -5
- 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/Select/Select.js +4 -8
- package/dist/Skeleton/Skeleton.js +5 -9
- package/dist/Slide/Slide.js +69 -74
- package/dist/Slider/Slider.js +6 -14
- 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 +15 -7
- package/dist/Tabs/Tabs.css +13 -22
- package/dist/Tabs/Tabs.js +26 -42
- package/dist/Tabs/Tabs.types.d.ts +0 -10
- package/dist/Tag/Tag.css +1 -1
- package/dist/Tag/Tag.js +2 -6
- package/dist/TextArea/TextArea.js +5 -12
- package/dist/Tooltip/Tooltip.css +5 -5
- package/dist/Transition/TransitionCore.js +3 -8
- 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 +6 -14
- 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/CollapsePanel/CollapsePanelItem.js +45 -46
- package/es/Countdown/Countdown.js +5 -12
- 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.js +4 -10
- package/es/NavBar/NavBar.js +0 -1
- package/es/Popover/Popover.css +5 -5
- 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/Select/Select.js +4 -8
- package/es/Skeleton/Skeleton.js +5 -9
- package/es/Slide/Slide.js +69 -74
- package/es/Slider/Slider.js +6 -14
- 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 +15 -7
- package/es/Tabs/Tabs.css +13 -22
- package/es/Tabs/Tabs.js +28 -55
- package/es/Tabs/Tabs.types.d.ts +0 -10
- package/es/Tag/Tag.css +1 -1
- package/es/Tag/Tag.js +2 -6
- package/es/TextArea/TextArea.js +5 -12
- package/es/Tooltip/Tooltip.css +5 -5
- package/es/Transition/TransitionCore.js +3 -8
- package/package.json +6 -6
|
@@ -62,12 +62,17 @@ var import_ListItemHeader2 = require("./ListItemHeader.css");
|
|
|
62
62
|
const prefixCls = "bui-list-item-header";
|
|
63
63
|
const ListItemHeader = /* @__PURE__ */ import_react.default.forwardRef(
|
|
64
64
|
(props, ref) => {
|
|
65
|
-
const _a = props, {
|
|
65
|
+
const _a = props, {
|
|
66
|
+
children,
|
|
67
|
+
className,
|
|
68
|
+
component: Component = "div"
|
|
69
|
+
} = _a, others = __objRest(_a, [
|
|
70
|
+
"children",
|
|
71
|
+
"className",
|
|
72
|
+
"component"
|
|
73
|
+
]);
|
|
66
74
|
return /* @__PURE__ */ import_react.default.createElement(Component, __spreadValues({ className: (0, import_clsx.default)(prefixCls, className), ref }, others), children);
|
|
67
75
|
}
|
|
68
76
|
);
|
|
69
77
|
ListItemHeader.displayName = "BuiListItemHeader";
|
|
70
|
-
ListItemHeader.defaultProps = {
|
|
71
|
-
component: "div"
|
|
72
|
-
};
|
|
73
78
|
var ListItemHeader_default = ListItemHeader;
|
package/dist/Loading/Loading.js
CHANGED
|
@@ -62,7 +62,19 @@ var import_icons = require("@bifrostui/icons");
|
|
|
62
62
|
var import_Loading2 = require("./Loading.css");
|
|
63
63
|
const prefixCls = "bui-loading";
|
|
64
64
|
const Loading = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
|
|
65
|
-
const _a = props, {
|
|
65
|
+
const _a = props, {
|
|
66
|
+
className,
|
|
67
|
+
icon,
|
|
68
|
+
IconProps,
|
|
69
|
+
children,
|
|
70
|
+
direction = "vertical"
|
|
71
|
+
} = _a, otherProps = __objRest(_a, [
|
|
72
|
+
"className",
|
|
73
|
+
"icon",
|
|
74
|
+
"IconProps",
|
|
75
|
+
"children",
|
|
76
|
+
"direction"
|
|
77
|
+
]);
|
|
66
78
|
const renderIcon = () => {
|
|
67
79
|
return icon != null ? icon : /* @__PURE__ */ import_react.default.createElement(
|
|
68
80
|
import_icons.LoadingThreeQuartersOutlinedIcon,
|
|
@@ -82,7 +94,4 @@ const Loading = /* @__PURE__ */ import_react.default.forwardRef((props, ref) =>
|
|
|
82
94
|
);
|
|
83
95
|
});
|
|
84
96
|
Loading.displayName = "BuiLoading";
|
|
85
|
-
Loading.defaultProps = {
|
|
86
|
-
direction: "vertical"
|
|
87
|
-
};
|
|
88
97
|
var Loading_default = Loading;
|
package/dist/Modal/Modal.js
CHANGED
|
@@ -136,10 +136,4 @@ const Modal = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
|
|
|
136
136
|
) : null, (open || keepMounted) && children));
|
|
137
137
|
});
|
|
138
138
|
Modal.displayName = "BuiModal";
|
|
139
|
-
Modal.defaultProps = {
|
|
140
|
-
open: false,
|
|
141
|
-
disablePortal: false,
|
|
142
|
-
disableScrollLock: false,
|
|
143
|
-
hideBackdrop: false
|
|
144
|
-
};
|
|
145
139
|
var Modal_default = Modal;
|
|
@@ -12,5 +12,5 @@ declare const Modal: React.ForwardRefExoticComponent<Omit<ViewProps & {
|
|
|
12
12
|
keepMounted?: boolean;
|
|
13
13
|
} & import("@bifrostui/types").ICommonProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
14
14
|
ref?: React.Ref<HTMLDivElement>;
|
|
15
|
-
}, "
|
|
15
|
+
}, keyof import("@bifrostui/types").ICommonProps | "open" | "container" | "disablePortal" | "hideBackdrop" | "BackdropProps" | "onClose" | "disableScrollLock" | "keepMounted">, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
16
16
|
export default Modal;
|
|
@@ -71,13 +71,13 @@ const Modal = /* @__PURE__ */ import_react.default.forwardRef(
|
|
|
71
71
|
(props, ref) => {
|
|
72
72
|
const _a = props, {
|
|
73
73
|
className,
|
|
74
|
-
open,
|
|
74
|
+
open = false,
|
|
75
75
|
BackdropProps,
|
|
76
76
|
children,
|
|
77
77
|
container,
|
|
78
|
-
disablePortal,
|
|
79
|
-
disableScrollLock,
|
|
80
|
-
hideBackdrop,
|
|
78
|
+
disablePortal = false,
|
|
79
|
+
disableScrollLock = false,
|
|
80
|
+
hideBackdrop = false,
|
|
81
81
|
onClose,
|
|
82
82
|
keepMounted
|
|
83
83
|
} = _a, others = __objRest(_a, [
|
|
@@ -133,10 +133,4 @@ const Modal = /* @__PURE__ */ import_react.default.forwardRef(
|
|
|
133
133
|
}
|
|
134
134
|
);
|
|
135
135
|
Modal.displayName = "BuiModal";
|
|
136
|
-
Modal.defaultProps = {
|
|
137
|
-
open: false,
|
|
138
|
-
disablePortal: false,
|
|
139
|
-
disableScrollLock: false,
|
|
140
|
-
hideBackdrop: false
|
|
141
|
-
};
|
|
142
136
|
var Modal_miniapp_default = Modal;
|
package/dist/NavBar/NavBar.js
CHANGED
|
@@ -133,5 +133,4 @@ const NavBar = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
|
|
|
133
133
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, renderNavBar(), renderPlaceholder());
|
|
134
134
|
});
|
|
135
135
|
NavBar.displayName = "BuiNavBar";
|
|
136
|
-
NavBar.defaultProps = {};
|
|
137
136
|
var NavBar_default = NavBar;
|
package/dist/Popover/Popover.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.bui-popover {
|
|
2
2
|
--arrow-size: var(--bui-popover-arrow-size, 8PX);
|
|
3
|
-
--
|
|
3
|
+
--location-position: var(--bui-popover-location-position, 8PX);
|
|
4
4
|
--max-width: var(--bui-popover-max-width, 350px);
|
|
5
5
|
--content-min-width: var(--bui-popover-content-min-width, 30px);
|
|
6
6
|
--content-padding: var(--bui-popover-content-padding, 6px 8px);
|
|
@@ -16,16 +16,16 @@
|
|
|
16
16
|
position: absolute;
|
|
17
17
|
}
|
|
18
18
|
.bui-popover .bui-popover-arrow.location-left {
|
|
19
|
-
left: var(--
|
|
19
|
+
left: var(--location-position);
|
|
20
20
|
}
|
|
21
21
|
.bui-popover .bui-popover-arrow.location-right {
|
|
22
|
-
right: var(--
|
|
22
|
+
right: var(--location-position);
|
|
23
23
|
}
|
|
24
24
|
.bui-popover .bui-popover-arrow.location-top {
|
|
25
|
-
top: var(--
|
|
25
|
+
top: var(--location-position);
|
|
26
26
|
}
|
|
27
27
|
.bui-popover .bui-popover-arrow.location-bottom {
|
|
28
|
-
bottom: var(--
|
|
28
|
+
bottom: var(--location-position);
|
|
29
29
|
}
|
|
30
30
|
.bui-popover.popover-top .location-center,
|
|
31
31
|
.bui-popover.popover-bottom .location-center {
|
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;
|
package/dist/Select/Select.js
CHANGED
|
@@ -80,12 +80,14 @@ const Select = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
|
|
|
80
80
|
inputProps,
|
|
81
81
|
BackdropProps,
|
|
82
82
|
value,
|
|
83
|
-
defaultValue,
|
|
83
|
+
defaultValue = "",
|
|
84
84
|
disabled,
|
|
85
85
|
placeholder,
|
|
86
86
|
icon,
|
|
87
87
|
open,
|
|
88
|
-
scrollContainer
|
|
88
|
+
scrollContainer = () => {
|
|
89
|
+
return import_utils.isMini ? null : document.body;
|
|
90
|
+
},
|
|
89
91
|
onChange,
|
|
90
92
|
onClose,
|
|
91
93
|
onOpen,
|
|
@@ -271,10 +273,4 @@ const Select = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
|
|
|
271
273
|
));
|
|
272
274
|
});
|
|
273
275
|
Select.displayName = "BuiSelect";
|
|
274
|
-
Select.defaultProps = {
|
|
275
|
-
defaultValue: "",
|
|
276
|
-
scrollContainer: () => {
|
|
277
|
-
return import_utils.isMini ? null : document.body;
|
|
278
|
-
}
|
|
279
|
-
};
|
|
280
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;
|
package/dist/Slide/Slide.js
CHANGED
|
@@ -70,80 +70,75 @@ const defaultTimeout = {
|
|
|
70
70
|
enter: import_utils.duration.enteringScreen,
|
|
71
71
|
exit: import_utils.duration.leavingScreen
|
|
72
72
|
};
|
|
73
|
-
const Slide = /* @__PURE__ */ import_react.default.forwardRef(
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
children,
|
|
78
|
-
style,
|
|
79
|
-
easing: easingProp,
|
|
80
|
-
timeout,
|
|
81
|
-
direction,
|
|
82
|
-
delay
|
|
83
|
-
} = _a, others = __objRest(_a, [
|
|
84
|
-
"appear",
|
|
85
|
-
"in",
|
|
86
|
-
"children",
|
|
87
|
-
"style",
|
|
88
|
-
"easing",
|
|
89
|
-
"timeout",
|
|
90
|
-
"direction",
|
|
91
|
-
"delay"
|
|
92
|
-
]);
|
|
93
|
-
const transitions = (0, import_utils.createTransitions)();
|
|
94
|
-
const nodeRef = (0, import_utils.useForkRef)(ref, children == null ? void 0 : children.ref);
|
|
95
|
-
const getTranslateValue = (_direction) => {
|
|
96
|
-
if (_direction === "left") {
|
|
97
|
-
return "translateX(100%)";
|
|
98
|
-
}
|
|
99
|
-
if (_direction === "right") {
|
|
100
|
-
return "translateX(-100%)";
|
|
101
|
-
}
|
|
102
|
-
if (_direction === "up") {
|
|
103
|
-
return "translateY(100%)";
|
|
104
|
-
}
|
|
105
|
-
return "translateY(-100%)";
|
|
106
|
-
};
|
|
107
|
-
if (!children)
|
|
108
|
-
return null;
|
|
109
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
110
|
-
import_Transition.default,
|
|
111
|
-
__spreadProps(__spreadValues({}, others), {
|
|
112
|
-
appear,
|
|
73
|
+
const Slide = /* @__PURE__ */ import_react.default.forwardRef(
|
|
74
|
+
(_a, ref) => {
|
|
75
|
+
var _b = _a, {
|
|
76
|
+
appear = true,
|
|
113
77
|
in: inProp,
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
78
|
+
children,
|
|
79
|
+
style,
|
|
80
|
+
easing: easingProp = defaultEasing,
|
|
81
|
+
timeout = defaultTimeout,
|
|
82
|
+
direction = "down",
|
|
83
|
+
delay = 0
|
|
84
|
+
} = _b, others = __objRest(_b, [
|
|
85
|
+
"appear",
|
|
86
|
+
"in",
|
|
87
|
+
"children",
|
|
88
|
+
"style",
|
|
89
|
+
"easing",
|
|
90
|
+
"timeout",
|
|
91
|
+
"direction",
|
|
92
|
+
"delay"
|
|
93
|
+
]);
|
|
94
|
+
const transitions = (0, import_utils.createTransitions)();
|
|
95
|
+
const nodeRef = (0, import_utils.useForkRef)(ref, children == null ? void 0 : children.ref);
|
|
96
|
+
const getTranslateValue = (_direction) => {
|
|
97
|
+
if (_direction === "left") {
|
|
98
|
+
return "translateX(100%)";
|
|
99
|
+
}
|
|
100
|
+
if (_direction === "right") {
|
|
101
|
+
return "translateX(-100%)";
|
|
102
|
+
}
|
|
103
|
+
if (_direction === "up") {
|
|
104
|
+
return "translateY(100%)";
|
|
105
|
+
}
|
|
106
|
+
return "translateY(-100%)";
|
|
107
|
+
};
|
|
108
|
+
if (!children)
|
|
109
|
+
return null;
|
|
110
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
111
|
+
import_Transition.default,
|
|
112
|
+
__spreadProps(__spreadValues({}, others), {
|
|
113
|
+
appear,
|
|
114
|
+
in: inProp,
|
|
115
|
+
timeout,
|
|
116
|
+
delay,
|
|
117
|
+
ref: nodeRef
|
|
118
|
+
}),
|
|
119
|
+
(state, childProps) => {
|
|
120
|
+
const transition = transitions.create(
|
|
121
|
+
"transform",
|
|
122
|
+
(0, import_utils.getTransitionProps)(
|
|
123
|
+
{ timeout, style, easing: easingProp, delay },
|
|
124
|
+
{
|
|
125
|
+
mode: state
|
|
126
|
+
}
|
|
127
|
+
)
|
|
128
|
+
);
|
|
129
|
+
const transform = state === "entering" || state === "entered" ? "none" : getTranslateValue(direction);
|
|
130
|
+
return import_react.default.cloneElement(children, __spreadValues({
|
|
131
|
+
style: __spreadValues(__spreadValues({
|
|
132
|
+
visibility: state === "exited" ? "hidden" : "visible",
|
|
133
|
+
transition,
|
|
134
|
+
WebkitTransition: transition,
|
|
135
|
+
transform,
|
|
136
|
+
WebkitTransform: transform
|
|
137
|
+
}, style), children.props.style)
|
|
138
|
+
}, childProps));
|
|
139
|
+
}
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
);
|
|
141
143
|
Slide.displayName = "BuiSlide";
|
|
142
|
-
Slide.defaultProps = {
|
|
143
|
-
appear: true,
|
|
144
|
-
easing: defaultEasing,
|
|
145
|
-
timeout: defaultTimeout,
|
|
146
|
-
direction: "down",
|
|
147
|
-
delay: 0
|
|
148
|
-
};
|
|
149
144
|
var Slide_default = Slide;
|
package/dist/Slider/Slider.js
CHANGED
|
@@ -97,15 +97,15 @@ const Slider = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
|
|
|
97
97
|
className,
|
|
98
98
|
defaultValue,
|
|
99
99
|
value: valueProp,
|
|
100
|
-
min,
|
|
101
|
-
max,
|
|
102
|
-
step,
|
|
103
|
-
tipVisible,
|
|
104
|
-
tooltipRender,
|
|
100
|
+
min = 0,
|
|
101
|
+
max = 100,
|
|
102
|
+
step = 1,
|
|
103
|
+
tipVisible = false,
|
|
104
|
+
tooltipRender = (value2) => value2,
|
|
105
105
|
disabled,
|
|
106
106
|
startIcon,
|
|
107
107
|
endIcon,
|
|
108
|
-
disableSwap,
|
|
108
|
+
disableSwap = false,
|
|
109
109
|
onChange
|
|
110
110
|
} = _a, others = __objRest(_a, [
|
|
111
111
|
"className",
|
|
@@ -314,12 +314,4 @@ const Slider = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
|
|
|
314
314
|
);
|
|
315
315
|
});
|
|
316
316
|
Slider.displayName = "BuiSlider";
|
|
317
|
-
Slider.defaultProps = {
|
|
318
|
-
min: 0,
|
|
319
|
-
max: 100,
|
|
320
|
-
step: 1,
|
|
321
|
-
disableSwap: false,
|
|
322
|
-
tipVisible: false,
|
|
323
|
-
tooltipRender: (value) => value
|
|
324
|
-
};
|
|
325
317
|
var Slider_default = Slider;
|
package/dist/Steps/Step.js
CHANGED
|
@@ -68,97 +68,96 @@ const classes = {
|
|
|
68
68
|
title: "bui-step-title",
|
|
69
69
|
subtitle: "bui-step-subtitle"
|
|
70
70
|
};
|
|
71
|
-
const Step = (0, import_react.forwardRef)(
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
const renderIcon = () => {
|
|
101
|
-
const icons = {
|
|
102
|
-
active: /* @__PURE__ */ import_react.default.createElement("div", { className: `${classes.icon}-active` }),
|
|
103
|
-
wait: /* @__PURE__ */ import_react.default.createElement(import_icons.CircleOutlinedIcon, { htmlColor: "#ced1d6" }),
|
|
104
|
-
finish: /* @__PURE__ */ import_react.default.createElement(import_icons.SuccessCircleFilledIcon, { color: "primary" }),
|
|
105
|
-
error: /* @__PURE__ */ import_react.default.createElement(import_icons.ErrorCircleFilledIcon, { color: "primary" })
|
|
71
|
+
const Step = (0, import_react.forwardRef)(
|
|
72
|
+
(_a, ref) => {
|
|
73
|
+
var _b = _a, {
|
|
74
|
+
className,
|
|
75
|
+
description,
|
|
76
|
+
icon,
|
|
77
|
+
title,
|
|
78
|
+
subtitle,
|
|
79
|
+
status,
|
|
80
|
+
disabled = false,
|
|
81
|
+
onClick
|
|
82
|
+
} = _b, others = __objRest(_b, [
|
|
83
|
+
"className",
|
|
84
|
+
"description",
|
|
85
|
+
"icon",
|
|
86
|
+
"title",
|
|
87
|
+
"subtitle",
|
|
88
|
+
"status",
|
|
89
|
+
"disabled",
|
|
90
|
+
"onClick"
|
|
91
|
+
]);
|
|
92
|
+
const stepsContext = (0, import_react.useContext)(import_StepsContext.default);
|
|
93
|
+
const { direction, labelPlacement, current, onChange } = stepsContext;
|
|
94
|
+
const isTitleVertical = labelPlacement === "vertical";
|
|
95
|
+
const handleClick = (e) => {
|
|
96
|
+
if (disabled)
|
|
97
|
+
return;
|
|
98
|
+
onClick == null ? void 0 : onClick(e, { current });
|
|
99
|
+
onChange == null ? void 0 : onChange(e, { current });
|
|
106
100
|
};
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
ref,
|
|
120
|
-
onClick: handleClick
|
|
121
|
-
}, others),
|
|
122
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
123
|
-
"div",
|
|
124
|
-
{
|
|
125
|
-
className: (0, import_clsx.default)(classes.line, {
|
|
126
|
-
[`${classes.line}-${status}`]: status
|
|
127
|
-
})
|
|
128
|
-
}
|
|
129
|
-
),
|
|
130
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: classes.icon }, renderIcon()),
|
|
131
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: `${classes.root}-content` }, /* @__PURE__ */ import_react.default.createElement(
|
|
101
|
+
const renderIcon = () => {
|
|
102
|
+
const icons = {
|
|
103
|
+
active: /* @__PURE__ */ import_react.default.createElement("div", { className: `${classes.icon}-active` }),
|
|
104
|
+
wait: /* @__PURE__ */ import_react.default.createElement(import_icons.CircleOutlinedIcon, { htmlColor: "#ced1d6" }),
|
|
105
|
+
finish: /* @__PURE__ */ import_react.default.createElement(import_icons.SuccessCircleFilledIcon, { color: "primary" }),
|
|
106
|
+
error: /* @__PURE__ */ import_react.default.createElement(import_icons.ErrorCircleFilledIcon, { color: "primary" })
|
|
107
|
+
};
|
|
108
|
+
if (icon)
|
|
109
|
+
return icon;
|
|
110
|
+
return icons[status];
|
|
111
|
+
};
|
|
112
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
132
113
|
"div",
|
|
133
|
-
{
|
|
134
|
-
className: (0, import_clsx.default)(
|
|
135
|
-
[`${classes.
|
|
136
|
-
[`${classes.
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
114
|
+
__spreadValues({
|
|
115
|
+
className: (0, import_clsx.default)(classes.root, className, {
|
|
116
|
+
[`${classes.root}-${direction}`]: direction,
|
|
117
|
+
[`${classes.root}-label-${labelPlacement}`]: labelPlacement,
|
|
118
|
+
[`${classes.root}-disabled`]: disabled
|
|
119
|
+
}),
|
|
120
|
+
ref,
|
|
121
|
+
onClick: handleClick
|
|
122
|
+
}, others),
|
|
123
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
140
124
|
"div",
|
|
141
125
|
{
|
|
142
|
-
className: (0, import_clsx.default)(classes.
|
|
143
|
-
[`${classes.
|
|
126
|
+
className: (0, import_clsx.default)(classes.line, {
|
|
127
|
+
[`${classes.line}-${status}`]: status
|
|
144
128
|
})
|
|
145
|
-
}
|
|
146
|
-
title
|
|
129
|
+
}
|
|
147
130
|
),
|
|
148
|
-
|
|
131
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: classes.icon }, renderIcon()),
|
|
132
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: `${classes.root}-content` }, /* @__PURE__ */ import_react.default.createElement(
|
|
149
133
|
"div",
|
|
150
134
|
{
|
|
151
|
-
className: (0, import_clsx.default)(classes.
|
|
152
|
-
[`${classes.
|
|
135
|
+
className: (0, import_clsx.default)(`${classes.title}-wrapper`, {
|
|
136
|
+
[`${classes.title}-wrapper-vertical`]: isTitleVertical,
|
|
137
|
+
[`${classes.title}-wrapper-line-${status}`]: status
|
|
153
138
|
})
|
|
154
139
|
},
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
}
|
|
140
|
+
!!title && /* @__PURE__ */ import_react.default.createElement(
|
|
141
|
+
"div",
|
|
142
|
+
{
|
|
143
|
+
className: (0, import_clsx.default)(classes.title, `${classes.title}-${status}`, {
|
|
144
|
+
[`${classes.title}-${labelPlacement}`]: labelPlacement
|
|
145
|
+
})
|
|
146
|
+
},
|
|
147
|
+
title
|
|
148
|
+
),
|
|
149
|
+
!!subtitle && /* @__PURE__ */ import_react.default.createElement(
|
|
150
|
+
"div",
|
|
151
|
+
{
|
|
152
|
+
className: (0, import_clsx.default)(classes.subtitle, {
|
|
153
|
+
[`${classes.subtitle}-${labelPlacement}`]: labelPlacement
|
|
154
|
+
})
|
|
155
|
+
},
|
|
156
|
+
subtitle
|
|
157
|
+
)
|
|
158
|
+
), !!description && /* @__PURE__ */ import_react.default.createElement("div", { className: `${classes.root}-desc` }, description))
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
);
|
|
160
162
|
Step.displayName = "Step";
|
|
161
|
-
Step.defaultProps = {
|
|
162
|
-
disabled: false
|
|
163
|
-
};
|
|
164
163
|
var Step_default = Step;
|
package/dist/Steps/Steps.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import './Steps.less';
|
|
3
2
|
import { StepsProps } from './Steps.types';
|
|
3
|
+
import './Steps.less';
|
|
4
4
|
declare const Steps: React.ForwardRefExoticComponent<Omit<StepsProps<"div", {}>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export default Steps;
|