@bifrostui/react 1.4.5-beta.1 → 1.4.5-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/dist/ActionSheet/ActionSheetItem.js +3 -8
  2. package/dist/Avatar/Avatar.js +3 -8
  3. package/dist/Avatar/AvatarGroup.js +2 -6
  4. package/dist/Badge/Badge.js +3 -8
  5. package/dist/Button/Button.css +0 -10
  6. package/dist/Button/Button.js +3 -8
  7. package/dist/Calendar/Calendar.js +6 -14
  8. package/dist/Card/Card.css +0 -3
  9. package/dist/Card/CardContent.css +1 -0
  10. package/dist/Card/CardFooter.css +1 -0
  11. package/dist/Card/CardHeader.css +1 -0
  12. package/dist/Checkbox/Checkbox.js +2 -6
  13. package/dist/Checkbox/CheckboxGroup.js +4 -7
  14. package/dist/CollapsePanel/CollapsePanelItem.js +45 -46
  15. package/dist/Countdown/Countdown.js +5 -12
  16. package/dist/Divider/Divider.js +8 -5
  17. package/dist/Drawer/Drawer.js +4 -10
  18. package/dist/Fade/Fade.js +52 -56
  19. package/dist/IconButton/IconButton.js +5 -12
  20. package/dist/Image/Image.js +112 -119
  21. package/dist/Input/Input.js +4 -10
  22. package/dist/List/List.js +3 -8
  23. package/dist/List/ListItem.js +42 -44
  24. package/dist/List/ListItemContent.js +1 -4
  25. package/dist/List/ListItemExtra.js +9 -4
  26. package/dist/List/ListItemFooter.js +9 -4
  27. package/dist/List/ListItemHeader.js +9 -4
  28. package/dist/Loading/Loading.js +13 -4
  29. package/dist/Modal/Modal.js +0 -6
  30. package/dist/Modal/Modal.miniapp.d.ts +1 -1
  31. package/dist/Modal/Modal.miniapp.js +4 -10
  32. package/dist/NavBar/NavBar.js +0 -1
  33. package/dist/Radio/Radio.js +2 -6
  34. package/dist/Radio/RadioGroup.js +0 -3
  35. package/dist/Rating/Rating.js +8 -18
  36. package/dist/Select/Select.js +4 -8
  37. package/dist/Skeleton/Skeleton.js +5 -9
  38. package/dist/Slide/Slide.js +69 -74
  39. package/dist/Slider/Slider.js +6 -14
  40. package/dist/Steps/Step.js +81 -82
  41. package/dist/Steps/Steps.d.ts +1 -1
  42. package/dist/Steps/Steps.js +57 -60
  43. package/dist/Switch/Switch.js +75 -78
  44. package/dist/TabBar/TabBar.js +3 -8
  45. package/dist/Tabs/Tab.css +3 -6
  46. package/dist/Tabs/Tab.js +14 -6
  47. package/dist/Tabs/Tabs.css +3 -17
  48. package/dist/Tabs/Tabs.js +15 -31
  49. package/dist/Tabs/Tabs.types.d.ts +0 -4
  50. package/dist/Tag/Tag.js +2 -6
  51. package/dist/TextArea/TextArea.js +5 -12
  52. package/dist/Transition/TransitionCore.js +3 -8
  53. package/es/ActionSheet/ActionSheetItem.js +3 -8
  54. package/es/Avatar/Avatar.js +3 -8
  55. package/es/Avatar/AvatarGroup.js +2 -6
  56. package/es/Badge/Badge.js +3 -8
  57. package/es/Button/Button.css +0 -10
  58. package/es/Button/Button.js +3 -8
  59. package/es/Calendar/Calendar.js +6 -14
  60. package/es/Card/Card.css +0 -3
  61. package/es/Card/CardContent.css +1 -0
  62. package/es/Card/CardFooter.css +1 -0
  63. package/es/Card/CardHeader.css +1 -0
  64. package/es/Checkbox/Checkbox.js +2 -6
  65. package/es/Checkbox/CheckboxGroup.js +4 -7
  66. package/es/CollapsePanel/CollapsePanelItem.js +45 -46
  67. package/es/Countdown/Countdown.js +5 -12
  68. package/es/Divider/Divider.js +8 -5
  69. package/es/Drawer/Drawer.js +4 -10
  70. package/es/Fade/Fade.js +52 -56
  71. package/es/IconButton/IconButton.js +5 -12
  72. package/es/Image/Image.js +112 -119
  73. package/es/Input/Input.js +4 -10
  74. package/es/List/List.js +3 -8
  75. package/es/List/ListItem.js +42 -44
  76. package/es/List/ListItemContent.js +1 -4
  77. package/es/List/ListItemExtra.js +9 -4
  78. package/es/List/ListItemFooter.js +9 -4
  79. package/es/List/ListItemHeader.js +9 -4
  80. package/es/Loading/Loading.js +13 -4
  81. package/es/Modal/Modal.js +0 -6
  82. package/es/Modal/Modal.miniapp.d.ts +1 -1
  83. package/es/Modal/Modal.miniapp.js +4 -10
  84. package/es/NavBar/NavBar.js +0 -1
  85. package/es/Radio/Radio.js +2 -6
  86. package/es/Radio/RadioGroup.js +0 -3
  87. package/es/Rating/Rating.js +8 -18
  88. package/es/Select/Select.js +4 -8
  89. package/es/Skeleton/Skeleton.js +5 -9
  90. package/es/Slide/Slide.js +69 -74
  91. package/es/Slider/Slider.js +6 -14
  92. package/es/Steps/Step.js +81 -82
  93. package/es/Steps/Steps.d.ts +1 -1
  94. package/es/Steps/Steps.js +57 -60
  95. package/es/Switch/Switch.js +75 -78
  96. package/es/TabBar/TabBar.js +3 -8
  97. package/es/Tabs/Tab.css +3 -6
  98. package/es/Tabs/Tab.js +14 -6
  99. package/es/Tabs/Tabs.css +3 -17
  100. package/es/Tabs/Tabs.js +17 -44
  101. package/es/Tabs/Tabs.types.d.ts +0 -4
  102. package/es/Tag/Tag.js +2 -6
  103. package/es/TextArea/TextArea.js +5 -12
  104. package/es/Transition/TransitionCore.js +3 -8
  105. package/package.json +5 -5
@@ -64,83 +64,80 @@ var import_clsx = __toESM(require("clsx"));
64
64
  var import_react = __toESM(require("react"));
65
65
  var import_Switch2 = require("./Switch.css");
66
66
  const prefixCls = "bui-switch";
67
- const Switch = (0, import_react.forwardRef)((props, ref) => {
68
- const _a = props, {
69
- className,
70
- checked,
71
- defaultChecked,
72
- inputProps,
73
- inputRef,
74
- name,
75
- checkedChildren,
76
- unCheckedChildren,
77
- disabled,
78
- size,
79
- color,
80
- onChange
81
- } = _a, others = __objRest(_a, [
82
- "className",
83
- "checked",
84
- "defaultChecked",
85
- "inputProps",
86
- "inputRef",
87
- "name",
88
- "checkedChildren",
89
- "unCheckedChildren",
90
- "disabled",
91
- "size",
92
- "color",
93
- "onChange"
94
- ]);
95
- const [switchChecked, triggerChange] = (0, import_utils.useValue)({
96
- value: checked,
97
- defaultValue: !!defaultChecked
98
- });
99
- const changeAction = (e, isChecked) => {
100
- triggerChange(e, isChecked);
101
- onChange == null ? void 0 : onChange(e, { checked: isChecked });
102
- };
103
- const handleChange = (e) => {
104
- var _a2;
105
- const isChecked = !switchChecked;
106
- changeAction(e, isChecked);
107
- (_a2 = inputProps == null ? void 0 : inputProps.onChange) == null ? void 0 : _a2.call(inputProps, e);
108
- };
109
- return /* @__PURE__ */ import_react.default.createElement(
110
- "div",
111
- __spreadValues({
112
- ref,
113
- className: (0, import_clsx.default)(
114
- `${prefixCls}`,
115
- `${prefixCls}-${size}`,
116
- `${prefixCls}-${color}`,
117
- {
118
- [`${prefixCls}-checked`]: switchChecked,
119
- [`${prefixCls}-disabled`]: disabled
120
- },
121
- className
122
- )
123
- }, others),
124
- /* @__PURE__ */ import_react.default.createElement(
125
- "input",
126
- __spreadProps(__spreadValues({
127
- ref: inputRef,
128
- type: "checkbox",
129
- name,
130
- checked: switchChecked,
131
- disabled
132
- }, inputProps), {
133
- onChange: handleChange,
134
- className: (0, import_clsx.default)(`${prefixCls}-input`, inputProps == null ? void 0 : inputProps.className)
135
- })
136
- ),
137
- (checkedChildren || unCheckedChildren) && /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefixCls}-inner` }, switchChecked ? checkedChildren : unCheckedChildren)
138
- );
139
- });
67
+ const Switch = (0, import_react.forwardRef)(
68
+ (_a, ref) => {
69
+ var _b = _a, {
70
+ className,
71
+ checked,
72
+ defaultChecked,
73
+ inputProps,
74
+ inputRef,
75
+ name,
76
+ checkedChildren,
77
+ unCheckedChildren,
78
+ disabled = false,
79
+ size = "medium",
80
+ color = "primary",
81
+ onChange
82
+ } = _b, others = __objRest(_b, [
83
+ "className",
84
+ "checked",
85
+ "defaultChecked",
86
+ "inputProps",
87
+ "inputRef",
88
+ "name",
89
+ "checkedChildren",
90
+ "unCheckedChildren",
91
+ "disabled",
92
+ "size",
93
+ "color",
94
+ "onChange"
95
+ ]);
96
+ const [switchChecked, triggerChange] = (0, import_utils.useValue)({
97
+ value: checked,
98
+ defaultValue: !!defaultChecked
99
+ });
100
+ const changeAction = (e, isChecked) => {
101
+ triggerChange(e, isChecked);
102
+ onChange == null ? void 0 : onChange(e, { checked: isChecked });
103
+ };
104
+ const handleChange = (e) => {
105
+ var _a2;
106
+ const isChecked = !switchChecked;
107
+ changeAction(e, isChecked);
108
+ (_a2 = inputProps == null ? void 0 : inputProps.onChange) == null ? void 0 : _a2.call(inputProps, e);
109
+ };
110
+ return /* @__PURE__ */ import_react.default.createElement(
111
+ "div",
112
+ __spreadValues({
113
+ ref,
114
+ className: (0, import_clsx.default)(
115
+ `${prefixCls}`,
116
+ `${prefixCls}-${size}`,
117
+ `${prefixCls}-${color}`,
118
+ {
119
+ [`${prefixCls}-checked`]: switchChecked,
120
+ [`${prefixCls}-disabled`]: disabled
121
+ },
122
+ className
123
+ )
124
+ }, others),
125
+ /* @__PURE__ */ import_react.default.createElement(
126
+ "input",
127
+ __spreadProps(__spreadValues({
128
+ ref: inputRef,
129
+ type: "checkbox",
130
+ name,
131
+ checked: switchChecked,
132
+ disabled
133
+ }, inputProps), {
134
+ onChange: handleChange,
135
+ className: (0, import_clsx.default)(`${prefixCls}-input`, inputProps == null ? void 0 : inputProps.className)
136
+ })
137
+ ),
138
+ (checkedChildren || unCheckedChildren) && /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefixCls}-inner` }, switchChecked ? checkedChildren : unCheckedChildren)
139
+ );
140
+ }
141
+ );
140
142
  Switch.displayName = "BuiSwitch";
141
- Switch.defaultProps = {
142
- disabled: false,
143
- size: "medium",
144
- color: "primary"
145
- };
146
143
  var Switch_default = Switch;
@@ -63,9 +63,9 @@ var import_TabBar = require("./TabBar.css");
63
63
  const prefixCls = "bui-tab-bar";
64
64
  const TabBar = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
65
65
  const _a = props || {}, {
66
- current,
67
- activeColor,
68
- color,
66
+ current = 0,
67
+ activeColor = "primary",
68
+ color = "default",
69
69
  children,
70
70
  className,
71
71
  onChange
@@ -97,9 +97,4 @@ const TabBar = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
97
97
  );
98
98
  });
99
99
  TabBar.displayName = "BuiTabBar";
100
- TabBar.defaultProps = {
101
- activeColor: "primary",
102
- color: "default",
103
- current: 0
104
- };
105
100
  var TabBar_default = TabBar;
package/dist/Tabs/Tab.css CHANGED
@@ -15,17 +15,14 @@
15
15
  font-family: var(--bui-tabs-font-family);
16
16
  }
17
17
  .bui-tab-active {
18
- line-height: var(--bui-line-height);
18
+ --bui-tabs-font-family: var(--bui-font-family-accent, inherit);
19
19
  --bui-tabs-color: var(--bui-color-fg-default);
20
- }
21
- .bui-tab-center {
22
- flex: 1 0 0;
23
- margin: 0 auto;
20
+ font-weight: 600;
24
21
  }
25
22
  .bui-tab-miniapp-active {
23
+ --bui-tabs-color: var(--bui-color-fg-default);
26
24
  line-height: 1.5;
27
25
  font-weight: var(--bui-font-weight-medium);
28
- --bui-tabs-color: var(--bui-color-fg-default);
29
26
  position: relative;
30
27
  }
31
28
  .bui-tab-miniapp-active-line {
package/dist/Tabs/Tab.js CHANGED
@@ -65,20 +65,28 @@ var import_react = __toESM(require("react"));
65
65
  var import_TabsContext = __toESM(require("./TabsContext"));
66
66
  var import_Tab2 = require("./Tab.css");
67
67
  const prefixCls = "bui-tab";
68
- const defaultProps = {
69
- disabled: false
70
- };
71
68
  const Tab = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
72
- const _a = __spreadValues(__spreadValues({}, defaultProps), props), { className, children, index, disabled, onClick } = _a, others = __objRest(_a, ["className", "children", "index", "disabled", "onClick"]);
69
+ const _a = props, {
70
+ className,
71
+ children,
72
+ index,
73
+ disabled = false,
74
+ onClick
75
+ } = _a, others = __objRest(_a, [
76
+ "className",
77
+ "children",
78
+ "index",
79
+ "disabled",
80
+ "onClick"
81
+ ]);
73
82
  const tabsContext = import_react.default.useContext(import_TabsContext.default);
74
- const { value, align, triggerChange } = tabsContext;
83
+ const { value, triggerChange } = tabsContext;
75
84
  return /* @__PURE__ */ import_react.default.createElement(
76
85
  "div",
77
86
  __spreadProps(__spreadValues({
78
87
  ref,
79
88
  className: (0, import_clsx.default)(
80
89
  prefixCls,
81
- align !== "start" && `${prefixCls}-${align}`,
82
90
  {
83
91
  [`${prefixCls}-active`]: !import_utils.isMini && index === value,
84
92
  [`${prefixCls}-miniapp-active`]: import_utils.isMini && index === value,
@@ -1,20 +1,7 @@
1
1
  .bui-tabs {
2
- --bui-tabs-font-family: var(--bui-font-family);
3
- --bui-tabs-font-size: var(--bui-text-size-1);
4
- --bui-tabs-height: 39px;
5
- --bui-tabs-color: var(--bui-color-fg-subtle);
6
- --bui-tabs-font-weight: var(--bui-font-weight-medium);
7
- --bui-tabs-indicator-bg: var(--bui-color-primary);
8
- --bui-tabs-indicator-height: 3px;
9
- --bui-tabs-indicator-width: 18px;
10
- --bui-tabs-indicator-border-radius: 3px;
11
- --bui-tabs-indicator-bottom: 0;
12
- --bui-tabs-indicator-box-shadow: none;
13
- --bui-tabs-mask-width: 12px;
14
- --bui-tabs-mask-height: 100%;
15
- --bui-tab-padding: var(--bui-spacing-lg) var(--bui-spacing-lg) 10px;
16
2
  position: relative;
17
3
  font-family: var(--bui-tabs-font-family);
4
+ font-weight: var(--bui-tabs-font-weight);
18
5
  }
19
6
  .bui-tabs-tabs {
20
7
  height: var(--bui-tabs-height);
@@ -24,7 +11,6 @@
24
11
  align-items: center;
25
12
  position: relative;
26
13
  overflow-x: scroll;
27
- font-weight: var(--bui-tabs-font-weight);
28
14
  scrollbar-width: none;
29
15
  }
30
16
  .bui-tabs-tabs::-webkit-scrollbar {
@@ -48,8 +34,8 @@
48
34
  top: 0;
49
35
  bottom: 0;
50
36
  z-index: 1;
51
- width: var(--bui-tabs-mask-width);
52
- height: var(--bui-tabs-mask-height);
37
+ width: 12px;
38
+ height: 100%;
53
39
  pointer-events: none;
54
40
  }
55
41
  .bui-tabs-mask-left {
package/dist/Tabs/Tabs.js CHANGED
@@ -64,29 +64,23 @@ var import_TabsContext = require("./TabsContext");
64
64
  var import_bound = __toESM(require("./utils/bound"));
65
65
  var import_Tabs2 = require("./Tabs.css");
66
66
  const prefixCls = "bui-tabs";
67
- const defaultProps = {
68
- align: "center",
69
- tabs: []
70
- };
71
67
  const Tabs = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
72
- const _a = __spreadValues(__spreadValues({}, defaultProps), props), { children, className, value, tabs, align, onChange } = _a, others = __objRest(_a, ["children", "className", "value", "tabs", "align", "onChange"]);
73
- const [active, setActive] = (0, import_react.useState)("");
68
+ const _a = props, { children, className, value, tabs = [], onChange } = _a, others = __objRest(_a, ["children", "className", "value", "tabs", "onChange"]);
74
69
  const tabsRef = (0, import_react.useRef)(null);
75
70
  const activeLineRef = (0, import_react.useRef)(null);
76
- const [lineData, setLineData] = (0, import_react.useState)({
71
+ const [indicatorData, setIndicatorData] = (0, import_react.useState)({
77
72
  x: 0,
78
- transitionInUse: false,
79
73
  hasActiveTab: false
80
74
  });
81
75
  const [maskData, setMaskData] = (0, import_react.useState)({
82
76
  leftMaskOpacity: 0,
83
77
  rightMaskOpacity: 0
84
78
  });
85
- const animate = ({ transitionInUse }) => {
79
+ const animate = (0, import_utils.useEventCallback)(() => {
86
80
  const container = tabsRef.current;
87
81
  if (!container)
88
82
  return;
89
- const activeIndex = !!tabs.length && tabs.findIndex((item) => item.index === active);
83
+ const activeIndex = !!tabs.length && tabs.findIndex((item) => item.index === value);
90
84
  const activeLine = activeLineRef.current;
91
85
  if (!activeLine)
92
86
  return;
@@ -117,9 +111,8 @@ const Tabs = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
117
111
  activeLineWidth = activeLine.offsetWidth;
118
112
  x = activeTabLeft + (activeTabWidth - activeLineWidth) / 2;
119
113
  }
120
- setLineData({
114
+ setIndicatorData({
121
115
  x,
122
- transitionInUse,
123
116
  hasActiveTab: !!activeTab
124
117
  });
125
118
  const maxScrollDistance = containerScrollWidth - containerWidth;
@@ -133,7 +126,7 @@ const Tabs = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
133
126
  if (tabsRef.current) {
134
127
  tabsRef.current.scrollLeft = nextScrollLeft;
135
128
  }
136
- };
129
+ });
137
130
  const updateMask = (0, import_react.useMemo)(
138
131
  () => (0, import_utils.throttle)(
139
132
  () => {
@@ -157,25 +150,19 @@ const Tabs = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
157
150
  []
158
151
  );
159
152
  (0, import_react.useEffect)(() => {
160
- setActive(value);
153
+ animate();
161
154
  }, [value]);
162
- (0, import_react.useLayoutEffect)(() => {
163
- animate({ transitionInUse: false });
164
- }, []);
165
155
  (0, import_react.useEffect)(() => {
166
156
  const handleResize = (0, import_utils.debounce)(() => {
167
- animate({ transitionInUse: true });
157
+ animate();
168
158
  updateMask();
169
159
  }, 100);
170
160
  window.addEventListener("resize", handleResize);
171
161
  return () => {
172
162
  window.removeEventListener("resize", handleResize);
173
163
  };
174
- }, [active]);
175
- (0, import_utils.useDidMountEffect)(() => {
176
- animate({ transitionInUse: true });
177
- }, [active, tabs, children]);
178
- (0, import_react.useLayoutEffect)(() => {
164
+ }, []);
165
+ (0, import_react.useEffect)(() => {
179
166
  updateMask();
180
167
  }, []);
181
168
  const handleClick = (e, item) => {
@@ -185,16 +172,13 @@ const Tabs = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
185
172
  if (index === void 0 || index === null) {
186
173
  return;
187
174
  }
188
- if (active !== value) {
189
- setActive(index);
190
- }
191
175
  if (index !== value) {
192
176
  onChange == null ? void 0 : onChange(e, { index });
193
177
  }
194
178
  };
195
179
  const providerValue = (0, import_react.useMemo)(() => {
196
- return { value, align, triggerChange: handleClick };
197
- }, [value, align, children, handleClick]);
180
+ return { value, triggerChange: handleClick };
181
+ }, [value, children, handleClick]);
198
182
  return /* @__PURE__ */ import_react.default.createElement("div", __spreadValues({ ref, className: (0, import_clsx.default)(prefixCls, className) }, others), /* @__PURE__ */ import_react.default.createElement(
199
183
  "div",
200
184
  {
@@ -216,11 +200,11 @@ const Tabs = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
216
200
  {
217
201
  ref: activeLineRef,
218
202
  className: (0, import_clsx.default)(`${prefixCls}-indicator`, {
219
- "bui-indicator-invisible": import_utils.isMini || !lineData.hasActiveTab
203
+ "bui-indicator-invisible": import_utils.isMini || !indicatorData.hasActiveTab
220
204
  }),
221
205
  style: {
222
- transition: lineData.transitionInUse ? "transform 0.3s ease-in-out" : void 0,
223
- transform: `translate3d(${lineData.x}px, 0px, 0px)`
206
+ transition: "transform 0.3s ease-in-out",
207
+ transform: `translate3d(${indicatorData.x}px, 0px, 0px)`
224
208
  }
225
209
  }
226
210
  ), /* @__PURE__ */ import_react.default.createElement(import_TabsContext.TabsContextProvider, { value: providerValue }, !!tabs.length && tabs.map((item) => {
@@ -26,10 +26,6 @@ export type TabsProps<D extends React.ElementType = 'div', P = {}> = OverridePro
26
26
  * 切换面板的数据
27
27
  */
28
28
  tabs?: ITabItem[];
29
- /**
30
- * 对齐方式,默认为center
31
- */
32
- align?: ITabAlign;
33
29
  /**
34
30
  * 切换面板的回调
35
31
  */
package/dist/Tag/Tag.js CHANGED
@@ -77,9 +77,9 @@ const Tag = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
77
77
  const _a = props, {
78
78
  className,
79
79
  style,
80
- color,
80
+ color = "default",
81
81
  htmlColor,
82
- variant,
82
+ variant = "outlined",
83
83
  onClick,
84
84
  children
85
85
  } = _a, others = __objRest(_a, [
@@ -128,8 +128,4 @@ const Tag = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
128
128
  );
129
129
  });
130
130
  Tag.displayName = "BuiTag";
131
- Tag.defaultProps = {
132
- variant: "outlined",
133
- color: "default"
134
- };
135
131
  var Tag_default = Tag;
@@ -70,17 +70,17 @@ const TextArea = /* @__PURE__ */ import_react.default.forwardRef(
70
70
  const _a = props, {
71
71
  className,
72
72
  value,
73
- defaultValue,
73
+ defaultValue = "",
74
74
  textareaProps,
75
75
  textareaRef,
76
76
  name,
77
77
  placeholder,
78
78
  disabled,
79
- rows,
79
+ rows = DEFAULT_ROWS,
80
80
  maxLength,
81
- autoSize,
82
- autoFocus,
83
- showCount,
81
+ autoSize = false,
82
+ autoFocus = false,
83
+ showCount = false,
84
84
  onChange
85
85
  } = _a, others = __objRest(_a, [
86
86
  "className",
@@ -205,11 +205,4 @@ const TextArea = /* @__PURE__ */ import_react.default.forwardRef(
205
205
  }
206
206
  );
207
207
  TextArea.displayName = "BuiTextArea";
208
- TextArea.defaultProps = {
209
- defaultValue: "",
210
- rows: DEFAULT_ROWS,
211
- autoSize: false,
212
- autoFocus: false,
213
- showCount: false
214
- };
215
208
  var TextArea_default = TextArea;
@@ -89,8 +89,8 @@ const TransitionCore = (0, import_react.forwardRef)(
89
89
  children,
90
90
  mountOnEnter,
91
91
  unmountOnExit,
92
- enter,
93
- exit,
92
+ enter = true,
93
+ exit = true,
94
94
  timeout: _timeout,
95
95
  delay: _delay,
96
96
  onEnter,
@@ -99,7 +99,7 @@ const TransitionCore = (0, import_react.forwardRef)(
99
99
  onExit,
100
100
  onExiting,
101
101
  onExited,
102
- nextTick
102
+ nextTick = setTimeout
103
103
  } = _a, childProps = __objRest(_a, [
104
104
  "appear",
105
105
  "in",
@@ -254,9 +254,4 @@ const TransitionCore = (0, import_react.forwardRef)(
254
254
  }
255
255
  );
256
256
  TransitionCore.displayName = "BuiTransitionCore";
257
- TransitionCore.defaultProps = {
258
- enter: true,
259
- exit: true,
260
- nextTick: setTimeout
261
- };
262
257
  var TransitionCore_default = TransitionCore;
@@ -36,9 +36,9 @@ const ActionSheetItem = /* @__PURE__ */ React.forwardRef(
36
36
  const _a = props, {
37
37
  className,
38
38
  children,
39
- disabled,
40
- bold,
41
- color,
39
+ disabled = false,
40
+ bold = false,
41
+ color = "default",
42
42
  description,
43
43
  onClick,
44
44
  index
@@ -81,11 +81,6 @@ const ActionSheetItem = /* @__PURE__ */ React.forwardRef(
81
81
  }
82
82
  );
83
83
  ActionSheetItem.displayName = "BuiActionSheetItem";
84
- ActionSheetItem.defaultProps = {
85
- color: "default",
86
- disabled: false,
87
- bold: false
88
- };
89
84
  var ActionSheetItem_default = ActionSheetItem;
90
85
  export {
91
86
  ActionSheetItem_default as default
@@ -43,10 +43,10 @@ const Avatar = /* @__PURE__ */ React.forwardRef((props, ref) => {
43
43
  children,
44
44
  src,
45
45
  lazy,
46
- variant,
47
- size,
46
+ variant = "rounded",
47
+ size = "medium",
48
48
  alt,
49
- fit,
49
+ fit = "cover",
50
50
  placeholder,
51
51
  ImageProps
52
52
  } = _a, others = __objRest(_a, [
@@ -96,11 +96,6 @@ const Avatar = /* @__PURE__ */ React.forwardRef((props, ref) => {
96
96
  );
97
97
  });
98
98
  Avatar.displayName = "BuiAvatar";
99
- Avatar.defaultProps = {
100
- variant: "rounded",
101
- size: "medium",
102
- fit: "cover"
103
- };
104
99
  var Avatar_default = Avatar;
105
100
  export {
106
101
  Avatar_default as default
@@ -41,8 +41,8 @@ const AvatarGroup = /* @__PURE__ */ React.forwardRef(
41
41
  maxCount,
42
42
  variant,
43
43
  spacing,
44
- size,
45
- orientation,
44
+ size = "medium",
45
+ orientation = "right",
46
46
  children,
47
47
  onClick
48
48
  } = _a, others = __objRest(_a, [
@@ -90,10 +90,6 @@ const AvatarGroup = /* @__PURE__ */ React.forwardRef(
90
90
  }
91
91
  );
92
92
  AvatarGroup.displayName = "BuiAvatarGroup";
93
- AvatarGroup.defaultProps = {
94
- size: "medium",
95
- orientation: "right"
96
- };
97
93
  var AvatarGroup_default = AvatarGroup;
98
94
  export {
99
95
  AvatarGroup_default as default
package/es/Badge/Badge.js CHANGED
@@ -36,10 +36,10 @@ const Badge = /* @__PURE__ */ React.forwardRef((props, ref) => {
36
36
  onClick,
37
37
  children,
38
38
  content,
39
- color,
39
+ color = "primary",
40
40
  maxCount,
41
- variant,
42
- type
41
+ variant = "contained",
42
+ type = "standard"
43
43
  } = _a, others = __objRest(_a, [
44
44
  "className",
45
45
  "onClick",
@@ -75,11 +75,6 @@ const Badge = /* @__PURE__ */ React.forwardRef((props, ref) => {
75
75
  );
76
76
  });
77
77
  Badge.displayName = "BuiBadge";
78
- Badge.defaultProps = {
79
- color: "primary",
80
- variant: "contained",
81
- type: "standard"
82
- };
83
78
  var Badge_default = Badge;
84
79
  export {
85
80
  Badge_default as default
@@ -1,14 +1,4 @@
1
1
  .bui-btn {
2
- --bui-btn-font-size: var(--bui-text-size-3);
3
- --bui-btn-font-weight: var(--bui-font-weight-medium);
4
- --bui-btn-border-radius: 120px;
5
- --bui-btn-height: 27px;
6
- --bui-btn-color: var(--bui-color-fg-muted);
7
- --bui-btn-bg: var(--bui-color-bg-view);
8
- --bui-btn-opacity: 1;
9
- --bui-btn-padding: 0 14px;
10
- --bui-btn-border: 0;
11
- --bui-btn-font-family: var(--bui-font-family);
12
2
  outline: 0;
13
3
  cursor: pointer;
14
4
  box-sizing: border-box;
@@ -40,10 +40,10 @@ const Button = /* @__PURE__ */ React.forwardRef(
40
40
  children,
41
41
  startIcon,
42
42
  endIcon,
43
- size,
44
- variant,
43
+ size = "medium",
44
+ variant = "outlined",
45
45
  color,
46
- disabled
46
+ disabled = false
47
47
  } = _a, others = __objRest(_a, [
48
48
  "className",
49
49
  "children",
@@ -77,11 +77,6 @@ const Button = /* @__PURE__ */ React.forwardRef(
77
77
  }
78
78
  );
79
79
  Button.displayName = "BuiButton";
80
- Button.defaultProps = {
81
- size: "medium",
82
- variant: "outlined",
83
- disabled: false
84
- };
85
80
  var Button_default = Button;
86
81
  export {
87
82
  Button_default as default