@bifrostui/react 1.4.5-beta.3 → 1.4.5

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.
Files changed (118) hide show
  1. package/dist/ActionSheet/ActionSheet.css +2 -2
  2. package/dist/ActionSheet/ActionSheetItem.js +8 -3
  3. package/dist/Avatar/Avatar.js +8 -3
  4. package/dist/Avatar/AvatarGroup.js +6 -2
  5. package/dist/Badge/Badge.js +8 -3
  6. package/dist/Button/Button.css +78 -77
  7. package/dist/Button/Button.d.ts +1 -1
  8. package/dist/Button/Button.js +10 -4
  9. package/dist/Button/Button.types.d.ts +7 -8
  10. package/dist/Calendar/Calendar.js +14 -6
  11. package/dist/Card/Card.css +1 -1
  12. package/dist/Card/CardContent.css +2 -1
  13. package/dist/Card/CardFooter.css +4 -2
  14. package/dist/Card/CardHeader.css +5 -4
  15. package/dist/Checkbox/Checkbox.js +6 -2
  16. package/dist/Checkbox/CheckboxGroup.js +7 -4
  17. package/dist/CollapsePanel/CollapsePanelItem.js +46 -45
  18. package/dist/Countdown/Countdown.js +12 -5
  19. package/dist/Divider/Divider.js +5 -8
  20. package/dist/Drawer/Drawer.js +10 -4
  21. package/dist/Fade/Fade.js +56 -52
  22. package/dist/IconButton/IconButton.js +12 -5
  23. package/dist/Image/Image.js +119 -112
  24. package/dist/Input/Input.js +10 -4
  25. package/dist/List/List.js +8 -3
  26. package/dist/List/ListItem.js +44 -42
  27. package/dist/List/ListItemContent.js +4 -1
  28. package/dist/List/ListItemExtra.js +4 -9
  29. package/dist/List/ListItemFooter.js +4 -9
  30. package/dist/List/ListItemHeader.js +4 -9
  31. package/dist/Loading/Loading.js +4 -13
  32. package/dist/Modal/Modal.js +6 -0
  33. package/dist/Modal/Modal.miniapp.js +10 -4
  34. package/dist/NavBar/NavBar.js +1 -0
  35. package/dist/Popover/Popover.css +5 -5
  36. package/dist/Radio/Radio.css +1 -0
  37. package/dist/Radio/Radio.js +6 -2
  38. package/dist/Radio/RadioGroup.js +3 -0
  39. package/dist/Rating/Rating.js +18 -8
  40. package/dist/Select/Select.js +8 -4
  41. package/dist/Skeleton/Skeleton.js +9 -5
  42. package/dist/Slide/Slide.js +74 -69
  43. package/dist/Slider/Slider.js +14 -6
  44. package/dist/Steps/Step.js +82 -81
  45. package/dist/Steps/Steps.d.ts +1 -1
  46. package/dist/Steps/Steps.js +60 -57
  47. package/dist/Switch/Switch.js +78 -75
  48. package/dist/TabBar/TabBar.js +8 -3
  49. package/dist/Tabs/Tab.css +16 -10
  50. package/dist/Tabs/Tab.js +7 -15
  51. package/dist/Tabs/Tabs.css +22 -13
  52. package/dist/Tabs/Tabs.js +42 -26
  53. package/dist/Tabs/Tabs.types.d.ts +10 -0
  54. package/dist/Tag/Tag.css +1 -1
  55. package/dist/Tag/Tag.js +6 -2
  56. package/dist/TextArea/TextArea.js +12 -5
  57. package/dist/Tooltip/Tooltip.css +5 -5
  58. package/dist/Transition/TransitionCore.js +8 -3
  59. package/es/ActionSheet/ActionSheet.css +2 -2
  60. package/es/ActionSheet/ActionSheetItem.js +8 -3
  61. package/es/Avatar/Avatar.js +8 -3
  62. package/es/Avatar/AvatarGroup.js +6 -2
  63. package/es/Badge/Badge.js +8 -3
  64. package/es/Button/Button.css +78 -77
  65. package/es/Button/Button.d.ts +1 -1
  66. package/es/Button/Button.js +9 -3
  67. package/es/Button/Button.types.d.ts +7 -8
  68. package/es/Calendar/Calendar.js +14 -6
  69. package/es/Card/Card.css +1 -1
  70. package/es/Card/CardContent.css +2 -1
  71. package/es/Card/CardFooter.css +4 -2
  72. package/es/Card/CardHeader.css +5 -4
  73. package/es/Checkbox/Checkbox.js +6 -2
  74. package/es/Checkbox/CheckboxGroup.js +7 -4
  75. package/es/CollapsePanel/CollapsePanelItem.js +46 -45
  76. package/es/Countdown/Countdown.js +12 -5
  77. package/es/Divider/Divider.js +5 -8
  78. package/es/Drawer/Drawer.js +10 -4
  79. package/es/Fade/Fade.js +56 -52
  80. package/es/IconButton/IconButton.js +12 -5
  81. package/es/Image/Image.js +119 -112
  82. package/es/Input/Input.js +10 -4
  83. package/es/List/List.js +8 -3
  84. package/es/List/ListItem.js +44 -42
  85. package/es/List/ListItemContent.js +4 -1
  86. package/es/List/ListItemExtra.js +4 -9
  87. package/es/List/ListItemFooter.js +4 -9
  88. package/es/List/ListItemHeader.js +4 -9
  89. package/es/Loading/Loading.js +4 -13
  90. package/es/Modal/Modal.js +6 -0
  91. package/es/Modal/Modal.miniapp.d.ts +1 -1
  92. package/es/Modal/Modal.miniapp.js +10 -4
  93. package/es/NavBar/NavBar.js +1 -0
  94. package/es/Popover/Popover.css +5 -5
  95. package/es/Radio/Radio.css +1 -0
  96. package/es/Radio/Radio.js +6 -2
  97. package/es/Radio/RadioGroup.js +3 -0
  98. package/es/Rating/Rating.js +18 -8
  99. package/es/Select/Select.js +8 -4
  100. package/es/Skeleton/Skeleton.js +9 -5
  101. package/es/Slide/Slide.js +74 -69
  102. package/es/Slider/Slider.js +14 -6
  103. package/es/Steps/Step.js +82 -81
  104. package/es/Steps/Steps.d.ts +1 -1
  105. package/es/Steps/Steps.js +60 -57
  106. package/es/Switch/Switch.js +78 -75
  107. package/es/TabBar/TabBar.js +8 -3
  108. package/es/Tabs/Tab.css +16 -10
  109. package/es/Tabs/Tab.js +7 -15
  110. package/es/Tabs/Tabs.css +22 -13
  111. package/es/Tabs/Tabs.js +55 -28
  112. package/es/Tabs/Tabs.types.d.ts +10 -0
  113. package/es/Tag/Tag.css +1 -1
  114. package/es/Tag/Tag.js +6 -2
  115. package/es/TextArea/TextArea.js +12 -5
  116. package/es/Tooltip/Tooltip.css +5 -5
  117. package/es/Transition/TransitionCore.js +8 -3
  118. package/package.json +6 -6
@@ -62,17 +62,12 @@ var import_ListItemFooter2 = require("./ListItemFooter.css");
62
62
  const prefixCls = "bui-list-item-footer";
63
63
  const ListItemFooter = /* @__PURE__ */ import_react.default.forwardRef(
64
64
  (props, ref) => {
65
- const _a = props, {
66
- children,
67
- className,
68
- component: Component = "div"
69
- } = _a, others = __objRest(_a, [
70
- "children",
71
- "className",
72
- "component"
73
- ]);
65
+ const _a = props, { children, className, component: Component } = _a, others = __objRest(_a, ["children", "className", "component"]);
74
66
  return /* @__PURE__ */ import_react.default.createElement(Component, __spreadValues({ className: (0, import_clsx.default)(prefixCls, className), ref }, others), children);
75
67
  }
76
68
  );
77
69
  ListItemFooter.displayName = "BuiListItemFooter";
70
+ ListItemFooter.defaultProps = {
71
+ component: "div"
72
+ };
78
73
  var ListItemFooter_default = ListItemFooter;
@@ -62,17 +62,12 @@ 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, {
66
- children,
67
- className,
68
- component: Component = "div"
69
- } = _a, others = __objRest(_a, [
70
- "children",
71
- "className",
72
- "component"
73
- ]);
65
+ const _a = props, { children, className, component: Component } = _a, others = __objRest(_a, ["children", "className", "component"]);
74
66
  return /* @__PURE__ */ import_react.default.createElement(Component, __spreadValues({ className: (0, import_clsx.default)(prefixCls, className), ref }, others), children);
75
67
  }
76
68
  );
77
69
  ListItemHeader.displayName = "BuiListItemHeader";
70
+ ListItemHeader.defaultProps = {
71
+ component: "div"
72
+ };
78
73
  var ListItemHeader_default = ListItemHeader;
@@ -62,19 +62,7 @@ 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, {
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
- ]);
65
+ const _a = props, { className, icon, IconProps, children, direction } = _a, otherProps = __objRest(_a, ["className", "icon", "IconProps", "children", "direction"]);
78
66
  const renderIcon = () => {
79
67
  return icon != null ? icon : /* @__PURE__ */ import_react.default.createElement(
80
68
  import_icons.LoadingThreeQuartersOutlinedIcon,
@@ -94,4 +82,7 @@ const Loading = /* @__PURE__ */ import_react.default.forwardRef((props, ref) =>
94
82
  );
95
83
  });
96
84
  Loading.displayName = "BuiLoading";
85
+ Loading.defaultProps = {
86
+ direction: "vertical"
87
+ };
97
88
  var Loading_default = Loading;
@@ -136,4 +136,10 @@ 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
+ };
139
145
  var Modal_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 = false,
74
+ open,
75
75
  BackdropProps,
76
76
  children,
77
77
  container,
78
- disablePortal = false,
79
- disableScrollLock = false,
80
- hideBackdrop = false,
78
+ disablePortal,
79
+ disableScrollLock,
80
+ hideBackdrop,
81
81
  onClose,
82
82
  keepMounted
83
83
  } = _a, others = __objRest(_a, [
@@ -133,4 +133,10 @@ 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
+ };
136
142
  var Modal_miniapp_default = Modal;
@@ -133,4 +133,5 @@ 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 = {};
136
137
  var NavBar_default = NavBar;
@@ -1,6 +1,6 @@
1
1
  .bui-popover {
2
2
  --arrow-size: var(--bui-popover-arrow-size, 8PX);
3
- --location-position: var(--bui-popover-location-position, 8PX);
3
+ --localtion-position: var(--bui-popover-localtion-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(--location-position);
19
+ left: var(--localtion-position);
20
20
  }
21
21
  .bui-popover .bui-popover-arrow.location-right {
22
- right: var(--location-position);
22
+ right: var(--localtion-position);
23
23
  }
24
24
  .bui-popover .bui-popover-arrow.location-top {
25
- top: var(--location-position);
25
+ top: var(--localtion-position);
26
26
  }
27
27
  .bui-popover .bui-popover-arrow.location-bottom {
28
- bottom: var(--location-position);
28
+ bottom: var(--localtion-position);
29
29
  }
30
30
  .bui-popover.popover-top .location-center,
31
31
  .bui-popover.popover-bottom .location-center {
@@ -1,6 +1,7 @@
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));
4
5
  --icon-padding: var(--bui-radio-icon-padding, 5px);
5
6
  display: inline-flex;
6
7
  align-items: center;
@@ -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 = false,
72
+ defaultChecked,
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 = "right",
81
+ labelPlacement,
82
82
  onChange,
83
83
  children
84
84
  } = _a, others = __objRest(_a, [
@@ -177,4 +177,8 @@ 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
+ };
180
184
  var Radio_default = Radio;
@@ -100,4 +100,7 @@ const RadioGroup = (0, import_react.forwardRef)((props, ref) => {
100
100
  );
101
101
  });
102
102
  RadioGroup.displayName = "BuiRadioGroup";
103
+ RadioGroup.defaultProps = {
104
+ disabled: false
105
+ };
103
106
  var RadioGroup_default = RadioGroup;
@@ -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 = "medium",
72
+ size,
73
73
  defaultValue,
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,
74
+ allowHalf,
75
+ icon,
76
+ checkedIcon,
77
+ count,
78
+ readOnly,
79
+ disabled,
80
80
  value,
81
81
  onChange,
82
82
  name,
83
- disableClear = false
83
+ disableClear
84
84
  } = _a, others = __objRest(_a, [
85
85
  "className",
86
86
  "size",
@@ -164,4 +164,14 @@ 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
+ };
167
177
  var Rating_default = Rating;
@@ -80,14 +80,12 @@ 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 = () => {
89
- return import_utils.isMini ? null : document.body;
90
- },
88
+ scrollContainer,
91
89
  onChange,
92
90
  onClose,
93
91
  onOpen,
@@ -273,4 +271,10 @@ const Select = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
273
271
  ));
274
272
  });
275
273
  Select.displayName = "BuiSelect";
274
+ Select.defaultProps = {
275
+ defaultValue: "",
276
+ scrollContainer: () => {
277
+ return import_utils.isMini ? null : document.body;
278
+ }
279
+ };
276
280
  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
- (_a, ref) => {
65
- var _b = _a, {
64
+ (props, ref) => {
65
+ const _a = props, {
66
66
  className,
67
67
  style,
68
- animation = "wave",
68
+ animation,
69
69
  width,
70
70
  height,
71
- variant = "text",
71
+ variant,
72
72
  children
73
- } = _b, others = __objRest(_b, [
73
+ } = _a, others = __objRest(_a, [
74
74
  "className",
75
75
  "style",
76
76
  "animation",
@@ -99,4 +99,8 @@ 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
+ };
102
106
  var Skeleton_default = Skeleton;
@@ -70,75 +70,80 @@ 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
- (_a, ref) => {
75
- var _b = _a, {
76
- appear = true,
73
+ const Slide = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
74
+ const _a = props, {
75
+ appear,
76
+ in: inProp,
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,
77
113
  in: inProp,
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
- );
114
+ timeout,
115
+ delay,
116
+ ref: nodeRef
117
+ }),
118
+ (state, childProps) => {
119
+ const transition = transitions.create(
120
+ "transform",
121
+ (0, import_utils.getTransitionProps)(
122
+ { timeout, style, easing: easingProp, delay },
123
+ {
124
+ mode: state
125
+ }
126
+ )
127
+ );
128
+ const transform = state === "entering" || state === "entered" ? "none" : getTranslateValue(direction);
129
+ return import_react.default.cloneElement(children, __spreadValues({
130
+ style: __spreadValues(__spreadValues({
131
+ visibility: state === "exited" ? "hidden" : "visible",
132
+ transition,
133
+ WebkitTransition: transition,
134
+ transform,
135
+ WebkitTransform: transform
136
+ }, style), children.props.style)
137
+ }, childProps));
138
+ }
139
+ );
140
+ });
143
141
  Slide.displayName = "BuiSlide";
142
+ Slide.defaultProps = {
143
+ appear: true,
144
+ easing: defaultEasing,
145
+ timeout: defaultTimeout,
146
+ direction: "down",
147
+ delay: 0
148
+ };
144
149
  var Slide_default = Slide;
@@ -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 = 0,
101
- max = 100,
102
- step = 1,
103
- tipVisible = false,
104
- tooltipRender = (value2) => value2,
100
+ min,
101
+ max,
102
+ step,
103
+ tipVisible,
104
+ tooltipRender,
105
105
  disabled,
106
106
  startIcon,
107
107
  endIcon,
108
- disableSwap = false,
108
+ disableSwap,
109
109
  onChange
110
110
  } = _a, others = __objRest(_a, [
111
111
  "className",
@@ -314,4 +314,12 @@ 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
+ };
317
325
  var Slider_default = Slider;
@@ -68,96 +68,97 @@ const classes = {
68
68
  title: "bui-step-title",
69
69
  subtitle: "bui-step-subtitle"
70
70
  };
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 });
71
+ const Step = (0, import_react.forwardRef)((props, ref) => {
72
+ const _a = props, {
73
+ className,
74
+ description,
75
+ icon,
76
+ title,
77
+ subtitle,
78
+ status,
79
+ disabled,
80
+ onClick
81
+ } = _a, others = __objRest(_a, [
82
+ "className",
83
+ "description",
84
+ "icon",
85
+ "title",
86
+ "subtitle",
87
+ "status",
88
+ "disabled",
89
+ "onClick"
90
+ ]);
91
+ const stepsContext = (0, import_react.useContext)(import_StepsContext.default);
92
+ const { direction, labelPlacement, current, onChange } = stepsContext;
93
+ const isTitleVertical = labelPlacement === "vertical";
94
+ const handleClick = (e) => {
95
+ if (disabled)
96
+ return;
97
+ onClick == null ? void 0 : onClick(e, { current });
98
+ onChange == null ? void 0 : onChange(e, { current });
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" })
100
106
  };
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(
107
+ if (icon)
108
+ return icon;
109
+ return icons[status];
110
+ };
111
+ return /* @__PURE__ */ import_react.default.createElement(
112
+ "div",
113
+ __spreadValues({
114
+ className: (0, import_clsx.default)(classes.root, className, {
115
+ [`${classes.root}-${direction}`]: direction,
116
+ [`${classes.root}-label-${labelPlacement}`]: labelPlacement,
117
+ [`${classes.root}-disabled`]: disabled
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(
113
132
  "div",
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(
133
+ {
134
+ className: (0, import_clsx.default)(`${classes.title}-wrapper`, {
135
+ [`${classes.title}-wrapper-vertical`]: isTitleVertical,
136
+ [`${classes.title}-wrapper-line-${status}`]: status
137
+ })
138
+ },
139
+ !!title && /* @__PURE__ */ import_react.default.createElement(
124
140
  "div",
125
141
  {
126
- className: (0, import_clsx.default)(classes.line, {
127
- [`${classes.line}-${status}`]: status
142
+ className: (0, import_clsx.default)(classes.title, `${classes.title}-${status}`, {
143
+ [`${classes.title}-${labelPlacement}`]: labelPlacement
128
144
  })
129
- }
145
+ },
146
+ title
130
147
  ),
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(
148
+ !!subtitle && /* @__PURE__ */ import_react.default.createElement(
133
149
  "div",
134
150
  {
135
- className: (0, import_clsx.default)(`${classes.title}-wrapper`, {
136
- [`${classes.title}-wrapper-vertical`]: isTitleVertical,
137
- [`${classes.title}-wrapper-line-${status}`]: status
151
+ className: (0, import_clsx.default)(classes.subtitle, {
152
+ [`${classes.subtitle}-${labelPlacement}`]: labelPlacement
138
153
  })
139
154
  },
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
- );
155
+ subtitle
156
+ )
157
+ ), !!description && /* @__PURE__ */ import_react.default.createElement("div", { className: `${classes.root}-desc` }, description))
158
+ );
159
+ });
162
160
  Step.displayName = "Step";
161
+ Step.defaultProps = {
162
+ disabled: false
163
+ };
163
164
  var Step_default = Step;