@bifrostui/react 1.4.5-beta.3 → 1.4.6

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
@@ -1,7 +1,7 @@
1
1
  .bui-action-sheet {
2
2
  --extra-line-height: var(--bui-action-sheet-extra-line-height, 23px);
3
3
  --extra-padding: var(--bui-action-sheet-extra-padding, var(--bui-spacing-xl));
4
- --extra-margin: var(--bui-action-sheet-extra-margin, 0 var(--bui-spacing-xl));
4
+ --extra-magin: var(--bui-action-sheet-extra-magin, 0 var(--bui-spacing-xl));
5
5
  font-family: var(--bui-font-family);
6
6
  }
7
7
  .bui-action-sheet-content {
@@ -26,5 +26,5 @@
26
26
  background: var(--bui-color-bg-view);
27
27
  text-align: center;
28
28
  border-bottom: 1px solid var(--bui-color-border-default);
29
- margin: var(--extra-margin);
29
+ margin: var(--extra-magin);
30
30
  }
@@ -66,9 +66,9 @@ const ActionSheetItem = /* @__PURE__ */ import_react.default.forwardRef(
66
66
  const _a = props, {
67
67
  className,
68
68
  children,
69
- disabled = false,
70
- bold = false,
71
- color = "default",
69
+ disabled,
70
+ bold,
71
+ color,
72
72
  description,
73
73
  onClick,
74
74
  index
@@ -111,4 +111,9 @@ const ActionSheetItem = /* @__PURE__ */ import_react.default.forwardRef(
111
111
  }
112
112
  );
113
113
  ActionSheetItem.displayName = "BuiActionSheetItem";
114
+ ActionSheetItem.defaultProps = {
115
+ color: "default",
116
+ disabled: false,
117
+ bold: false
118
+ };
114
119
  var ActionSheetItem_default = ActionSheetItem;
@@ -73,10 +73,10 @@ const Avatar = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
73
73
  children,
74
74
  src,
75
75
  lazy,
76
- variant = "rounded",
77
- size = "medium",
76
+ variant,
77
+ size,
78
78
  alt,
79
- fit = "cover",
79
+ fit,
80
80
  placeholder,
81
81
  ImageProps
82
82
  } = _a, others = __objRest(_a, [
@@ -126,4 +126,9 @@ const Avatar = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
126
126
  );
127
127
  });
128
128
  Avatar.displayName = "BuiAvatar";
129
+ Avatar.defaultProps = {
130
+ variant: "rounded",
131
+ size: "medium",
132
+ fit: "cover"
133
+ };
129
134
  var Avatar_default = Avatar;
@@ -71,8 +71,8 @@ const AvatarGroup = /* @__PURE__ */ import_react.default.forwardRef(
71
71
  maxCount,
72
72
  variant,
73
73
  spacing,
74
- size = "medium",
75
- orientation = "right",
74
+ size,
75
+ orientation,
76
76
  children,
77
77
  onClick
78
78
  } = _a, others = __objRest(_a, [
@@ -120,4 +120,8 @@ const AvatarGroup = /* @__PURE__ */ import_react.default.forwardRef(
120
120
  }
121
121
  );
122
122
  AvatarGroup.displayName = "BuiAvatarGroup";
123
+ AvatarGroup.defaultProps = {
124
+ size: "medium",
125
+ orientation: "right"
126
+ };
123
127
  var AvatarGroup_default = AvatarGroup;
@@ -66,10 +66,10 @@ const Badge = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
66
66
  onClick,
67
67
  children,
68
68
  content,
69
- color = "primary",
69
+ color,
70
70
  maxCount,
71
- variant = "contained",
72
- type = "standard"
71
+ variant,
72
+ type
73
73
  } = _a, others = __objRest(_a, [
74
74
  "className",
75
75
  "onClick",
@@ -105,4 +105,9 @@ const Badge = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
105
105
  );
106
106
  });
107
107
  Badge.displayName = "BuiBadge";
108
+ Badge.defaultProps = {
109
+ color: "primary",
110
+ variant: "contained",
111
+ type: "standard"
112
+ };
108
113
  var Badge_default = Badge;
@@ -1,6 +1,27 @@
1
1
  .bui-btn {
2
+ --border-radius: var(--bui-button-border-radius, 100px);
3
+ --text-color: var(--bui-button-text-color, var(--bui-color-fg-muted));
4
+ --bg-color: var(--bui-button-default-bg-color, var(--bui-color-neutral-5));
5
+ --border-color: var(--bui-button-border-color, var(--bui-color-neutral-4));
6
+ --height: var(--bui-button-height, 27px);
7
+ --icon-start-margin-right: var(--bui-button-icon-start-margin-right, var(--bui-spacing-xs));
8
+ --icon-start-margin-left: var(--bui-button-icon-start-margin-left, var(--bui-spacing-xs));
9
+ --default-border: var(--bui-button-default-border, 1px solid transparent);
10
+ --light-border: var(--bui-button-light-border, 1px solid transparent);
11
+ --outlined-default-border: var(--bui-button-outlined-default-border, 1px solid var(--bui-color-neutral-4));
12
+ --disabled-opacity: var(--bui-button-disabled-opacity, 0.5);
13
+ --small-padding: var(--bui-button-small-padding, 0 11px);
14
+ --small-height: var(--bui-button-small-height, 24px);
15
+ --medium-padding: var(--bui-button-medium-padding, 0 14px);
16
+ --large-padding: var(--bui-button-large-padding, 0 14px);
17
+ --large-height: var(--bui-button-large-height, 33px);
18
+ --full-font-size: var(--bui-button-full-font-size, var(--bui-title-size-4));
19
+ --full-height: var(--bui-button-full-height, 42px);
20
+ border: var(--default-border);
2
21
  outline: 0;
22
+ background-color: transparent;
3
23
  cursor: pointer;
24
+ color: var(--text-color);
4
25
  box-sizing: border-box;
5
26
  position: relative;
6
27
  display: inline-flex;
@@ -8,17 +29,12 @@
8
29
  align-items: center;
9
30
  justify-content: center;
10
31
  white-space: nowrap;
11
- color: var(--bui-btn-color);
12
- background: var(--bui-btn-bg);
13
- font-size: var(--bui-btn-font-size);
14
- font-weight: var(--bui-btn-font-weight);
15
- border: var(--bui-btn-border);
16
- border-radius: var(--bui-btn-border-radius);
17
- height: var(--bui-btn-height);
18
- padding: var(--bui-btn-padding);
32
+ font-size: var(--bui-text-size-3);
33
+ font-weight: var(--bui-font-weight-medium);
34
+ border-radius: var(--border-radius);
35
+ height: var(--height);
19
36
  line-height: var(--bui-line-height);
20
- font-family: var(--bui-btn-font-family);
21
- opacity: var(--bui-btn-opacity);
37
+ font-family: var(--bui-font-family);
22
38
  }
23
39
  @keyframes spin {
24
40
  from {
@@ -52,61 +68,57 @@
52
68
  display: inline-flex;
53
69
  align-self: center;
54
70
  flex-shrink: 0;
55
- margin-right: var(--bui-spacing-xs);
71
+ margin-right: var(--icon-start-margin-right);
56
72
  }
57
73
  .bui-btn-icon-end {
58
74
  display: inline-flex;
59
75
  align-self: center;
60
76
  flex-shrink: 0;
61
- margin-left: var(--bui-spacing-xs);
77
+ margin-left: var(--icon-start-margin-left);
62
78
  }
63
79
  .bui-btn-disabled {
64
80
  pointer-events: none;
65
- --bui-btn-opacity: 0.5;
81
+ opacity: var(--disabled-opacity);
66
82
  }
67
83
  .bui-btn-small {
68
- --bui-btn-height: 24px;
69
- --bui-btn-font-size: var(--bui-text-size-4);
70
- --bui-btn-padding: 0 11px;
84
+ font-size: var(--bui-text-size-4);
85
+ padding: var(--small-padding);
86
+ height: var(--small-height);
87
+ }
88
+ .bui-btn-medium {
89
+ padding: var(--medium-padding);
90
+ height: var(--height);
71
91
  }
72
92
  .bui-btn-large {
73
- --bui-btn-height: 33px;
74
- --bui-btn-font-size: var(--bui-text-size-2);
93
+ font-size: var(--bui-text-size-2);
94
+ padding: var(--large-padding);
95
+ height: var(--large-height);
75
96
  }
76
97
  .bui-btn-full {
77
- --bui-btn-height: 42px;
78
- --bui-btn-font-size: var(--bui-title-size-4);
98
+ font-size: var(--full-font-size);
79
99
  width: 100%;
80
- }
81
- .bui-btn-text {
82
- --bui-btn-bg: none;
100
+ height: var(--full-height);
83
101
  }
84
102
  .bui-btn-text.bui-btn-primary {
85
- --bui-btn-color: var(--bui-color-primary);
103
+ color: var(--bui-color-primary);
86
104
  }
87
105
  .bui-btn-text.bui-btn-success {
88
- --bui-btn-color: var(--bui-color-success);
106
+ color: var(--bui-color-success);
89
107
  }
90
108
  .bui-btn-text.bui-btn-info {
91
- --bui-btn-color: var(--bui-color-info);
109
+ color: var(--bui-color-info);
92
110
  }
93
111
  .bui-btn-text.bui-btn-warning {
94
- --bui-btn-color: var(--bui-color-warning);
112
+ color: var(--bui-color-warning);
95
113
  }
96
114
  .bui-btn-text.bui-btn-danger {
97
- --bui-btn-color: var(--bui-color-danger);
98
- }
99
- .bui-btn-text.bui-btn-light {
100
- --bui-btn-color: var(--bui-color-bg-view);
101
- }
102
- .bui-btn-text.bui-btn-dark {
103
- --bui-btn-color: var(--bui-color-fg-default);
115
+ color: var(--bui-color-danger);
104
116
  }
105
117
  .bui-btn-text.bui-btn-vip {
106
- --bui-btn-color: var(--bui-color-vip);
118
+ color: var(--bui-color-vip);
107
119
  }
108
120
  .bui-btn-contained {
109
- --bui-btn-bg: var(--bui-color-neutral-5);
121
+ background-color: var(--bg-color);
110
122
  }
111
123
  .bui-btn-contained.bui-btn-primary {
112
124
  color: var(--bui-color-white);
@@ -148,25 +160,16 @@
148
160
  var(--bui-color-danger-start) 0%,
149
161
  var(--bui-color-danger-end) 100%);
150
162
  }
151
- .bui-btn-contained.bui-btn-light {
152
- --bui-btn-color: var(--bui-color-fg-default);
153
- --bui-btn-bg: var(--bui-color-bg-view);
154
- }
155
- .bui-btn-contained.bui-btn-dark {
156
- --bui-btn-color: var(--bui-color-bg-view);
157
- --bui-btn-bg: var(--bui-color-fg-default);
158
- }
159
163
  .bui-btn-contained.bui-btn-vip {
160
- --bui-btn-color: #582331;
161
- --bui-btn-bg:
164
+ color: #582331;
165
+ background-image:
162
166
  linear-gradient(
163
167
  90deg,
164
168
  var(--bui-color-vip-start) 3%,
165
169
  var(--bui-color-vip-end) 100%);
166
170
  }
167
171
  .bui-btn-outlined {
168
- --bui-btn-bg: transparent;
169
- --bui-btn-border: 1px solid var(--bui-color-neutral-4);
172
+ border: var(--outlined-default-border);
170
173
  }
171
174
  .bui-btn-outlined.bui-btn-primary {
172
175
  color: var(--bui-color-primary);
@@ -188,49 +191,47 @@
188
191
  color: var(--bui-color-danger);
189
192
  border-color: var(--bui-color-danger);
190
193
  }
191
- .bui-btn-outlined.bui-btn-light {
192
- --bui-btn-color: var(--bui-color-bg-view);
193
- --bui-btn-border: solid 1px var(--bui-color-bg-view);
194
- }
195
- .bui-btn-outlined.bui-btn-dark {
196
- --bui-btn-color: var(--bui-color-fg-default);
197
- --bui-btn-border: solid 1px var(--bui-color-fg-default);
198
- }
199
194
  .bui-btn-outlined.bui-btn-vip {
200
195
  color: var(--bui-color-vip);
201
196
  border-color: var(--bui-color-vip);
202
197
  }
203
- .bui-btn-subtle {
204
- --bui-btn-bg: var(--bui-color-gray-light);
198
+ .bui-btn-light {
199
+ background-image: none;
200
+ background-color: var(--bui-color-gray-light);
201
+ border: var(--light-border);
205
202
  }
206
- .bui-btn-subtle.bui-btn-warning {
203
+ .bui-btn-light.bui-btn-warning {
204
+ background-image: none;
205
+ border: var(--light-border);
207
206
  color: var(--bui-color-warning);
208
- background: var(--bui-color-warning-light);
207
+ background-color: var(--bui-color-warning-light);
209
208
  }
210
- .bui-btn-subtle.bui-btn-primary {
209
+ .bui-btn-light.bui-btn-primary {
210
+ background-image: none;
211
+ border: var(--light-border);
211
212
  color: var(--bui-color-primary);
212
- background: var(--bui-color-primary-light);
213
+ background-color: var(--bui-color-primary-light);
213
214
  }
214
- .bui-btn-subtle.bui-btn-info {
215
+ .bui-btn-light.bui-btn-info {
216
+ background-image: none;
217
+ border: var(--light-border);
215
218
  color: var(--bui-color-info);
216
- background: var(--bui-color-info-light);
219
+ background-color: var(--bui-color-info-light);
217
220
  }
218
- .bui-btn-subtle.bui-btn-success {
221
+ .bui-btn-light.bui-btn-success {
222
+ background-image: none;
223
+ border: var(--light-border);
219
224
  color: var(--bui-color-success);
220
- background: var(--bui-color-success-light);
225
+ background-color: var(--bui-color-success-light);
221
226
  }
222
- .bui-btn-subtle.bui-btn-danger {
227
+ .bui-btn-light.bui-btn-danger {
228
+ background-image: none;
229
+ border: var(--light-border);
223
230
  color: var(--bui-color-danger);
224
- background: var(--bui-color-danger-light);
225
- }
226
- .bui-btn-subtle.bui-btn-light {
227
- --bui-btn-color: var(--bui-color-bg-view);
231
+ background-color: var(--bui-color-danger-light);
228
232
  }
229
- .bui-btn-subtle.bui-btn-dark {
230
- --bui-btn-color: var(--bui-color-fg-default);
231
- }
232
- .bui-btn-subtle.bui-btn-vip {
233
+ .bui-btn-light.bui-btn-vip {
234
+ color: var(--bui-color-vip);
233
235
  position: relative;
234
- --bui-btn-color: var(--bui-color-vip);
235
- --bui-btn-bg: rgba(255, 134, 110, 0.3);
236
+ background-color: rgba(255, 134, 110, 0.3);
236
237
  }
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { ButtonProps } from './Button.types';
3
2
  import './Button.less';
3
+ import { ButtonProps } from './Button.types';
4
4
  declare const Button: React.ForwardRefExoticComponent<Omit<ButtonProps<"button", {}>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
5
5
  export default Button;
@@ -58,7 +58,7 @@ __export(Button_exports, {
58
58
  module.exports = __toCommonJS(Button_exports);
59
59
  var import_clsx = __toESM(require("clsx"));
60
60
  var import_react = __toESM(require("react"));
61
- var import_Button2 = require("./Button.css");
61
+ var import_Button = require("./Button.css");
62
62
  const prefixCls = "bui-btn";
63
63
  const ButtonIcon = ({ children, iconPosition }) => {
64
64
  return /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefixCls}-icon-${iconPosition}` }, children);
@@ -70,10 +70,10 @@ const Button = /* @__PURE__ */ import_react.default.forwardRef(
70
70
  children,
71
71
  startIcon,
72
72
  endIcon,
73
- size = "medium",
74
- variant = "outlined",
73
+ size,
74
+ variant,
75
75
  color,
76
- disabled = false
76
+ disabled
77
77
  } = _a, others = __objRest(_a, [
78
78
  "className",
79
79
  "children",
@@ -107,4 +107,10 @@ const Button = /* @__PURE__ */ import_react.default.forwardRef(
107
107
  }
108
108
  );
109
109
  Button.displayName = "BuiButton";
110
+ Button.defaultProps = {
111
+ size: "medium",
112
+ variant: "outlined",
113
+ color: "default",
114
+ disabled: false
115
+ };
110
116
  var Button_default = Button;
@@ -16,20 +16,19 @@ export type ButtonProps<D extends React.ElementType = 'button', P = {}> = Overri
16
16
  * @default 'medium'
17
17
  */
18
18
  size?: 'small' | 'medium' | 'large' | 'full';
19
- /**
20
- * 按钮颜色
21
- * @default 'neutral'
19
+ /** 按钮颜色
20
+ * @default 'default'
22
21
  */
23
- color?: ThemeColor | 'vip';
22
+ color?: ThemeColor | 'default' | 'vip';
24
23
  /**
25
24
  * 按钮类型
26
25
  * - text: 文字按钮
27
- * - outlined: 线框按钮
28
- * - contained: 填充按钮
29
- * - subtle: 柔和按钮
26
+ * - outlined: 描边按钮
27
+ * - contained: 实心填充按钮
28
+ * - light: 浅亮填充按钮
30
29
  * @default 'outlined'
31
30
  */
32
- variant?: 'outlined' | 'text' | 'contained' | 'subtle';
31
+ variant?: 'outlined' | 'text' | 'contained' | 'light';
33
32
  /**
34
33
  * 在子元素前放在的内容
35
34
  */
@@ -82,15 +82,15 @@ const Calendar = /* @__PURE__ */ import_react.default.forwardRef(
82
82
  className,
83
83
  defaultValue,
84
84
  value,
85
- minDate = (0, import_dayjs.default)((0, import_dayjs.default)().format("YYYYMMDD")).add(0, "month").toDate(),
86
- maxDate = (0, import_dayjs.default)((0, import_dayjs.default)().format("YYYYMMDD")).add(11, "month").toDate(),
87
- mode = "single",
88
- hideDaysOutsideCurrentMonth = false,
89
- headerBarFormat = "YYYY/MM",
85
+ minDate,
86
+ maxDate,
87
+ mode,
88
+ hideDaysOutsideCurrentMonth,
89
+ headerBarFormat,
90
90
  headerBarLeftIcon,
91
91
  headerBarRightIcon,
92
92
  disabledDate,
93
- highlightDate = "today",
93
+ highlightDate,
94
94
  dateRender,
95
95
  weekRender,
96
96
  onMonthChange,
@@ -331,4 +331,12 @@ const Calendar = /* @__PURE__ */ import_react.default.forwardRef(
331
331
  }
332
332
  );
333
333
  Calendar.displayName = "BuiCalendar";
334
+ Calendar.defaultProps = {
335
+ hideDaysOutsideCurrentMonth: false,
336
+ headerBarFormat: "YYYY/MM",
337
+ mode: "single",
338
+ minDate: (0, import_dayjs.default)((0, import_dayjs.default)().format("YYYYMMDD")).add(0, "month").toDate(),
339
+ maxDate: (0, import_dayjs.default)((0, import_dayjs.default)().format("YYYYMMDD")).add(11, "month").toDate(),
340
+ highlightDate: "today"
341
+ };
334
342
  var Calendar_default = Calendar;
@@ -2,7 +2,7 @@
2
2
  background-color: var(--bui-color-bg-view);
3
3
  border-radius: var(--bui-shape-radius-card);
4
4
  overflow: hidden;
5
- font-family: var(--bui-card-font-family);
5
+ font-family: var(--bui-font-family);
6
6
  }
7
7
  .bui-card-header + .bui-card-content {
8
8
  padding-top: 0;
@@ -1,5 +1,6 @@
1
1
  .bui-card-content {
2
+ font-size: var(--bui-text-size-2);
2
3
  padding: var(--bui-spacing-lg);
3
4
  color: var(--bui-color-fg-muted);
4
- font-size: var(--bui-card-font-size);
5
+ font-family: var(--bui-font-family);
5
6
  }
@@ -1,7 +1,9 @@
1
1
  .bui-card-footer {
2
+ --padding: var(--bui-card-footer-padding, var(--bui-spacing-md) var(--bui-spacing-lg));
2
3
  color: var(--bui-color-fg-muted);
4
+ font-size: var(--bui-text-size-1);
3
5
  display: flex;
4
6
  align-items: center;
5
- padding: var(--bui-spacing-md) var(--bui-spacing-lg);
6
- font-size: var(--bui-card-font-size);
7
+ padding: var(--padding);
8
+ font-family: var(--bui-font-family);
7
9
  }
@@ -1,13 +1,15 @@
1
1
  .bui-card-header {
2
- --bui-card-font-size: var(--bui-title-size-4);
2
+ --padding: var(--bui-card-header-padding, var(--bui-spacing-md) var(--bui-spacing-lg));
3
+ --end-icon-margin-left: var(--bui-card-header-end-icon-margin-left, 2px);
3
4
  display: flex;
4
5
  align-items: center;
5
6
  flex-direction: row;
6
7
  position: relative;
7
8
  padding: var(--bui-spacing-md) var(--bui-spacing-lg);
8
- font-weight: var(--bui-font-weight-bold);
9
- font-family: var(--bui-card-font-family);
9
+ font-size: var(--bui-title-size-4);
10
+ font-weight: var(--bui-font-weight-medium);
10
11
  color: var(--bui-color-fg-default);
12
+ font-family: var(--bui-font-family);
11
13
  }
12
14
  .bui-card-header-title {
13
15
  white-space: nowrap;
@@ -15,7 +17,6 @@
15
17
  text-overflow: ellipsis;
16
18
  max-width: 100%;
17
19
  flex-shrink: 0;
18
- font-family: var(--bui-font-family-accent, inherit);
19
20
  }
20
21
  .bui-card-header-subtitle {
21
22
  font-size: var(--bui-text-size-3);
@@ -70,7 +70,7 @@ const Checkbox = (0, import_react.forwardRef)((props, ref) => {
70
70
  var _b, _c;
71
71
  const _a = props, {
72
72
  className,
73
- defaultChecked = false,
73
+ defaultChecked,
74
74
  checked,
75
75
  inputProps,
76
76
  inputRef,
@@ -79,7 +79,7 @@ const Checkbox = (0, import_react.forwardRef)((props, ref) => {
79
79
  disabled,
80
80
  icon,
81
81
  checkedIcon,
82
- labelPlacement = "right",
82
+ labelPlacement,
83
83
  onChange,
84
84
  children
85
85
  } = _a, others = __objRest(_a, [
@@ -161,4 +161,8 @@ const Checkbox = (0, import_react.forwardRef)((props, ref) => {
161
161
  );
162
162
  });
163
163
  Checkbox.displayName = "BuiCheckbox";
164
+ Checkbox.defaultProps = {
165
+ defaultChecked: false,
166
+ labelPlacement: "right"
167
+ };
164
168
  var Checkbox_default = Checkbox;
@@ -63,15 +63,15 @@ var import_CheckboxContext = require("./CheckboxContext");
63
63
  var import_Checkbox2 = require("./Checkbox.css");
64
64
  const prefixCls = "bui-checkbox-group";
65
65
  const CheckboxGroup = (0, import_react.forwardRef)(
66
- (_a, ref) => {
67
- var _b = _a, {
66
+ (props, ref) => {
67
+ const _a = props, {
68
68
  className,
69
69
  children,
70
70
  defaultValue,
71
71
  value,
72
- disabled = false,
72
+ disabled,
73
73
  onChange
74
- } = _b, others = __objRest(_b, [
74
+ } = _a, others = __objRest(_a, [
75
75
  "className",
76
76
  "children",
77
77
  "defaultValue",
@@ -108,4 +108,7 @@ const CheckboxGroup = (0, import_react.forwardRef)(
108
108
  }
109
109
  );
110
110
  CheckboxGroup.displayName = "CheckboxGroup";
111
+ CheckboxGroup.defaultProps = {
112
+ disabled: false
113
+ };
111
114
  var CheckboxGroup_default = CheckboxGroup;
@@ -60,52 +60,53 @@ var import_react = __toESM(require("react"));
60
60
  var import_clsx = __toESM(require("clsx"));
61
61
  var import_Collapse = require("../Collapse");
62
62
  const prefixCls = "bui-collapse-panel-item";
63
- const CollapsePanelItem = /* @__PURE__ */ import_react.default.forwardRef(
64
- (_a, ref) => {
65
- var _b = _a, {
66
- className,
63
+ const CollapsePanelItem = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
64
+ const _a = props, {
65
+ className,
66
+ style,
67
+ label,
68
+ children,
69
+ icon,
70
+ active,
71
+ onClick
72
+ } = _a, others = __objRest(_a, [
73
+ "className",
74
+ "style",
75
+ "label",
76
+ "children",
77
+ "icon",
78
+ "active",
79
+ "onClick"
80
+ ]);
81
+ const isControlledIcon = typeof icon === "function";
82
+ const getIcon = () => {
83
+ return typeof icon === "function" ? icon(active) : icon;
84
+ };
85
+ return /* @__PURE__ */ import_react.default.createElement(
86
+ "div",
87
+ __spreadValues({
88
+ className: (0, import_clsx.default)(prefixCls, active && `${prefixCls}-active`, className),
67
89
  style,
68
- label,
69
- children,
70
- icon,
71
- active = false,
72
- onClick
73
- } = _b, others = __objRest(_b, [
74
- "className",
75
- "style",
76
- "label",
77
- "children",
78
- "icon",
79
- "active",
80
- "onClick"
81
- ]);
82
- const isControlledIcon = typeof icon === "function";
83
- const getIcon = () => {
84
- return typeof icon === "function" ? icon(active) : icon;
85
- };
86
- return /* @__PURE__ */ import_react.default.createElement(
90
+ ref
91
+ }, others),
92
+ /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-header`, onClick }, /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-header-label` }, label), /* @__PURE__ */ import_react.default.createElement(
87
93
  "div",
88
- __spreadValues({
89
- className: (0, import_clsx.default)(prefixCls, active && `${prefixCls}-active`, className),
90
- style,
91
- ref
92
- }, others),
93
- /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-header`, onClick }, /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-header-label` }, label), /* @__PURE__ */ import_react.default.createElement(
94
- "div",
95
- {
96
- className: (0, import_clsx.default)(
97
- `${prefixCls}-header-icon`,
98
- `${prefixCls}-header-icon-arrow`,
99
- {
100
- [`${prefixCls}-header-icon-arrow-active`]: !isControlledIcon && active
101
- }
102
- )
103
- },
104
- getIcon()
105
- )),
106
- /* @__PURE__ */ import_react.default.createElement(import_Collapse.Collapse, { in: active, direction: "vertical", timeout: 300 }, /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-content` }, children))
107
- );
108
- }
109
- );
94
+ {
95
+ className: (0, import_clsx.default)(
96
+ `${prefixCls}-header-icon`,
97
+ `${prefixCls}-header-icon-arrow`,
98
+ {
99
+ [`${prefixCls}-header-icon-arrow-active`]: !isControlledIcon && active
100
+ }
101
+ )
102
+ },
103
+ getIcon()
104
+ )),
105
+ /* @__PURE__ */ import_react.default.createElement(import_Collapse.Collapse, { in: active, direction: "vertical", timeout: 300 }, /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-content` }, children))
106
+ );
107
+ });
110
108
  CollapsePanelItem.displayName = "BuiCollapsePanelItem";
109
+ CollapsePanelItem.defaultProps = {
110
+ active: false
111
+ };
111
112
  var CollapsePanelItem_default = CollapsePanelItem;