@bifrostui/react 1.4.5-beta.2 → 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 (102) 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.js +4 -10
  31. package/dist/NavBar/NavBar.js +0 -1
  32. package/dist/Radio/Radio.js +2 -6
  33. package/dist/Radio/RadioGroup.js +0 -3
  34. package/dist/Rating/Rating.js +8 -18
  35. package/dist/Select/Select.js +4 -8
  36. package/dist/Skeleton/Skeleton.js +5 -9
  37. package/dist/Slide/Slide.js +69 -74
  38. package/dist/Slider/Slider.js +6 -14
  39. package/dist/Steps/Step.js +81 -82
  40. package/dist/Steps/Steps.d.ts +1 -1
  41. package/dist/Steps/Steps.js +57 -60
  42. package/dist/Switch/Switch.js +75 -78
  43. package/dist/TabBar/TabBar.js +3 -8
  44. package/dist/Tabs/Tab.css +3 -2
  45. package/dist/Tabs/Tab.js +13 -4
  46. package/dist/Tabs/Tabs.css +3 -17
  47. package/dist/Tabs/Tabs.js +13 -28
  48. package/dist/Tag/Tag.js +2 -6
  49. package/dist/TextArea/TextArea.js +5 -12
  50. package/dist/Transition/TransitionCore.js +3 -8
  51. package/es/ActionSheet/ActionSheetItem.js +3 -8
  52. package/es/Avatar/Avatar.js +3 -8
  53. package/es/Avatar/AvatarGroup.js +2 -6
  54. package/es/Badge/Badge.js +3 -8
  55. package/es/Button/Button.css +0 -10
  56. package/es/Button/Button.js +3 -8
  57. package/es/Calendar/Calendar.js +6 -14
  58. package/es/Card/Card.css +0 -3
  59. package/es/Card/CardContent.css +1 -0
  60. package/es/Card/CardFooter.css +1 -0
  61. package/es/Card/CardHeader.css +1 -0
  62. package/es/Checkbox/Checkbox.js +2 -6
  63. package/es/Checkbox/CheckboxGroup.js +4 -7
  64. package/es/CollapsePanel/CollapsePanelItem.js +45 -46
  65. package/es/Countdown/Countdown.js +5 -12
  66. package/es/Divider/Divider.js +8 -5
  67. package/es/Drawer/Drawer.js +4 -10
  68. package/es/Fade/Fade.js +52 -56
  69. package/es/IconButton/IconButton.js +5 -12
  70. package/es/Image/Image.js +112 -119
  71. package/es/Input/Input.js +4 -10
  72. package/es/List/List.js +3 -8
  73. package/es/List/ListItem.js +42 -44
  74. package/es/List/ListItemContent.js +1 -4
  75. package/es/List/ListItemExtra.js +9 -4
  76. package/es/List/ListItemFooter.js +9 -4
  77. package/es/List/ListItemHeader.js +9 -4
  78. package/es/Loading/Loading.js +13 -4
  79. package/es/Modal/Modal.js +0 -6
  80. package/es/Modal/Modal.miniapp.d.ts +1 -1
  81. package/es/Modal/Modal.miniapp.js +4 -10
  82. package/es/NavBar/NavBar.js +0 -1
  83. package/es/Radio/Radio.js +2 -6
  84. package/es/Radio/RadioGroup.js +0 -3
  85. package/es/Rating/Rating.js +8 -18
  86. package/es/Select/Select.js +4 -8
  87. package/es/Skeleton/Skeleton.js +5 -9
  88. package/es/Slide/Slide.js +69 -74
  89. package/es/Slider/Slider.js +6 -14
  90. package/es/Steps/Step.js +81 -82
  91. package/es/Steps/Steps.d.ts +1 -1
  92. package/es/Steps/Steps.js +57 -60
  93. package/es/Switch/Switch.js +75 -78
  94. package/es/TabBar/TabBar.js +3 -8
  95. package/es/Tabs/Tab.css +3 -2
  96. package/es/Tabs/Tab.js +13 -4
  97. package/es/Tabs/Tabs.css +3 -17
  98. package/es/Tabs/Tabs.js +15 -41
  99. package/es/Tag/Tag.js +2 -6
  100. package/es/TextArea/TextArea.js +5 -12
  101. package/es/Transition/TransitionCore.js +3 -8
  102. 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,13 +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
+ font-weight: 600;
20
21
  }
21
22
  .bui-tab-miniapp-active {
23
+ --bui-tabs-color: var(--bui-color-fg-default);
22
24
  line-height: 1.5;
23
25
  font-weight: var(--bui-font-weight-medium);
24
- --bui-tabs-color: var(--bui-color-fg-default);
25
26
  position: relative;
26
27
  }
27
28
  .bui-tab-miniapp-active-line {
package/dist/Tabs/Tab.js CHANGED
@@ -65,11 +65,20 @@ 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
83
  const { value, triggerChange } = tabsContext;
75
84
  return /* @__PURE__ */ import_react.default.createElement(
@@ -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,28 +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
- tabs: []
69
- };
70
67
  const Tabs = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
71
- const _a = __spreadValues(__spreadValues({}, defaultProps), props), { children, className, value, tabs, onChange } = _a, others = __objRest(_a, ["children", "className", "value", "tabs", "onChange"]);
72
- 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"]);
73
69
  const tabsRef = (0, import_react.useRef)(null);
74
70
  const activeLineRef = (0, import_react.useRef)(null);
75
- const [lineData, setLineData] = (0, import_react.useState)({
71
+ const [indicatorData, setIndicatorData] = (0, import_react.useState)({
76
72
  x: 0,
77
- transitionInUse: false,
78
73
  hasActiveTab: false
79
74
  });
80
75
  const [maskData, setMaskData] = (0, import_react.useState)({
81
76
  leftMaskOpacity: 0,
82
77
  rightMaskOpacity: 0
83
78
  });
84
- const animate = ({ transitionInUse }) => {
79
+ const animate = (0, import_utils.useEventCallback)(() => {
85
80
  const container = tabsRef.current;
86
81
  if (!container)
87
82
  return;
88
- const activeIndex = !!tabs.length && tabs.findIndex((item) => item.index === active);
83
+ const activeIndex = !!tabs.length && tabs.findIndex((item) => item.index === value);
89
84
  const activeLine = activeLineRef.current;
90
85
  if (!activeLine)
91
86
  return;
@@ -116,9 +111,8 @@ const Tabs = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
116
111
  activeLineWidth = activeLine.offsetWidth;
117
112
  x = activeTabLeft + (activeTabWidth - activeLineWidth) / 2;
118
113
  }
119
- setLineData({
114
+ setIndicatorData({
120
115
  x,
121
- transitionInUse,
122
116
  hasActiveTab: !!activeTab
123
117
  });
124
118
  const maxScrollDistance = containerScrollWidth - containerWidth;
@@ -132,7 +126,7 @@ const Tabs = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
132
126
  if (tabsRef.current) {
133
127
  tabsRef.current.scrollLeft = nextScrollLeft;
134
128
  }
135
- };
129
+ });
136
130
  const updateMask = (0, import_react.useMemo)(
137
131
  () => (0, import_utils.throttle)(
138
132
  () => {
@@ -156,25 +150,19 @@ const Tabs = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
156
150
  []
157
151
  );
158
152
  (0, import_react.useEffect)(() => {
159
- setActive(value);
153
+ animate();
160
154
  }, [value]);
161
- (0, import_react.useLayoutEffect)(() => {
162
- animate({ transitionInUse: false });
163
- }, []);
164
155
  (0, import_react.useEffect)(() => {
165
156
  const handleResize = (0, import_utils.debounce)(() => {
166
- animate({ transitionInUse: true });
157
+ animate();
167
158
  updateMask();
168
159
  }, 100);
169
160
  window.addEventListener("resize", handleResize);
170
161
  return () => {
171
162
  window.removeEventListener("resize", handleResize);
172
163
  };
173
- }, [active]);
174
- (0, import_utils.useDidMountEffect)(() => {
175
- animate({ transitionInUse: true });
176
- }, [active, tabs, children]);
177
- (0, import_react.useLayoutEffect)(() => {
164
+ }, []);
165
+ (0, import_react.useEffect)(() => {
178
166
  updateMask();
179
167
  }, []);
180
168
  const handleClick = (e, item) => {
@@ -184,9 +172,6 @@ const Tabs = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
184
172
  if (index === void 0 || index === null) {
185
173
  return;
186
174
  }
187
- if (active !== value) {
188
- setActive(index);
189
- }
190
175
  if (index !== value) {
191
176
  onChange == null ? void 0 : onChange(e, { index });
192
177
  }
@@ -215,11 +200,11 @@ const Tabs = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
215
200
  {
216
201
  ref: activeLineRef,
217
202
  className: (0, import_clsx.default)(`${prefixCls}-indicator`, {
218
- "bui-indicator-invisible": import_utils.isMini || !lineData.hasActiveTab
203
+ "bui-indicator-invisible": import_utils.isMini || !indicatorData.hasActiveTab
219
204
  }),
220
205
  style: {
221
- transition: lineData.transitionInUse ? "transform 0.3s ease-in-out" : void 0,
222
- transform: `translate3d(${lineData.x}px, 0px, 0px)`
206
+ transition: "transform 0.3s ease-in-out",
207
+ transform: `translate3d(${indicatorData.x}px, 0px, 0px)`
223
208
  }
224
209
  }
225
210
  ), /* @__PURE__ */ import_react.default.createElement(import_TabsContext.TabsContextProvider, { value: providerValue }, !!tabs.length && tabs.map((item) => {
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
@@ -52,15 +52,15 @@ const Calendar = /* @__PURE__ */ React.forwardRef(
52
52
  className,
53
53
  defaultValue,
54
54
  value,
55
- minDate,
56
- maxDate,
57
- mode,
58
- hideDaysOutsideCurrentMonth,
59
- headerBarFormat,
55
+ minDate = dayjs(dayjs().format("YYYYMMDD")).add(0, "month").toDate(),
56
+ maxDate = dayjs(dayjs().format("YYYYMMDD")).add(11, "month").toDate(),
57
+ mode = "single",
58
+ hideDaysOutsideCurrentMonth = false,
59
+ headerBarFormat = "YYYY/MM",
60
60
  headerBarLeftIcon,
61
61
  headerBarRightIcon,
62
62
  disabledDate,
63
- highlightDate,
63
+ highlightDate = "today",
64
64
  dateRender,
65
65
  weekRender,
66
66
  onMonthChange,
@@ -301,14 +301,6 @@ const Calendar = /* @__PURE__ */ React.forwardRef(
301
301
  }
302
302
  );
303
303
  Calendar.displayName = "BuiCalendar";
304
- Calendar.defaultProps = {
305
- hideDaysOutsideCurrentMonth: false,
306
- headerBarFormat: "YYYY/MM",
307
- mode: "single",
308
- minDate: dayjs(dayjs().format("YYYYMMDD")).add(0, "month").toDate(),
309
- maxDate: dayjs(dayjs().format("YYYYMMDD")).add(11, "month").toDate(),
310
- highlightDate: "today"
311
- };
312
304
  var Calendar_default = Calendar;
313
305
  export {
314
306
  Calendar_default as default
package/es/Card/Card.css CHANGED
@@ -1,11 +1,8 @@
1
1
  .bui-card {
2
- --bui-card-font-family: var(--bui-font-family);
3
- --bui-card-font-size: var(--bui-text-size-1);
4
2
  background-color: var(--bui-color-bg-view);
5
3
  border-radius: var(--bui-shape-radius-card);
6
4
  overflow: hidden;
7
5
  font-family: var(--bui-card-font-family);
8
- font-size: var(--bui-card-font-size);
9
6
  }
10
7
  .bui-card-header + .bui-card-content {
11
8
  padding-top: 0;
@@ -1,4 +1,5 @@
1
1
  .bui-card-content {
2
2
  padding: var(--bui-spacing-lg);
3
3
  color: var(--bui-color-fg-muted);
4
+ font-size: var(--bui-card-font-size);
4
5
  }
@@ -3,4 +3,5 @@
3
3
  display: flex;
4
4
  align-items: center;
5
5
  padding: var(--bui-spacing-md) var(--bui-spacing-lg);
6
+ font-size: var(--bui-card-font-size);
6
7
  }