@bifrostui/react 1.3.1-beta.0 → 1.3.2

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 (281) hide show
  1. package/dist/ActionSheet/ActionSheet.css +3 -6
  2. package/dist/ActionSheet/ActionSheetItem.css +6 -10
  3. package/dist/Alert/index.css +8 -14
  4. package/dist/Avatar/Avatar.css +9 -13
  5. package/dist/Avatar/AvatarGroup.css +8 -15
  6. package/dist/Backdrop/Backdrop.css +1 -2
  7. package/dist/Badge/Badge.css +17 -27
  8. package/dist/Button/Button.css +17 -26
  9. package/dist/Calendar/Calendar.css +18 -33
  10. package/dist/Calendar/Calendar.d.ts +1 -1
  11. package/dist/Calendar/Calendar.js +17 -38
  12. package/dist/Calendar/Calendar.types.d.ts +0 -21
  13. package/dist/Card/CardFooter.css +1 -2
  14. package/dist/Card/CardHeader.css +1 -3
  15. package/dist/Checkbox/Checkbox.css +5 -7
  16. package/dist/CitySelector/CitySelector.css +15 -29
  17. package/dist/CitySelector/CitySelectorCore.js +16 -25
  18. package/dist/CitySelector/Selector/index.css +4 -4
  19. package/dist/Countdown/Countdown.css +1 -2
  20. package/dist/Dialog/Dialog.d.ts +2 -2
  21. package/dist/Dialog/Dialog.js +8 -20
  22. package/dist/Dialog/Dialog.types.d.ts +1 -12
  23. package/dist/Dialog/FunctionalDialog.js +2 -38
  24. package/dist/Dialog/index.css +18 -27
  25. package/dist/Divider/Divider.css +4 -6
  26. package/dist/IconButton/IconButton.css +7 -9
  27. package/dist/Image/index.css +1 -2
  28. package/dist/Input/Input.css +5 -10
  29. package/dist/List/List.css +0 -3
  30. package/dist/List/ListItem.css +3 -3
  31. package/dist/List/ListItemContent.css +1 -1
  32. package/dist/Loading/Loading.css +2 -4
  33. package/dist/Modal/Modal.miniapp.d.ts +1 -1
  34. package/dist/NavBar/NavBar.css +5 -9
  35. package/dist/Picker/Picker.css +29 -25
  36. package/dist/Picker/Picker.js +11 -31
  37. package/dist/Picker/Picker.types.d.ts +0 -4
  38. package/dist/Picker/PickerPanel.css +8 -8
  39. package/dist/Picker/PickerPanel.js +8 -14
  40. package/dist/Picker/utils.d.ts +0 -16
  41. package/dist/Picker/utils.js +2 -32
  42. package/dist/Portal/Portal.types.d.ts +0 -4
  43. package/dist/Portal/PortalCore.js +1 -8
  44. package/dist/Progress/Progress.css +6 -8
  45. package/dist/Radio/Radio.css +1 -2
  46. package/dist/Rating/Rating.css +4 -8
  47. package/dist/Select/Select.css +10 -21
  48. package/dist/Select/Select.js +1 -1
  49. package/dist/Select/SelectOption.js +0 -3
  50. package/dist/Skeleton/Skeleton.css +2 -3
  51. package/dist/Slider/Slider.css +13 -24
  52. package/dist/Steps/Step.css +11 -11
  53. package/dist/Steps/Steps.css +5 -14
  54. package/dist/Swiper/Swiper.css +1 -2
  55. package/dist/Switch/Switch.css +16 -31
  56. package/dist/TabBar/TabBar.css +3 -7
  57. package/dist/TabBar/TabBarItem.css +1 -0
  58. package/dist/Tabs/Tab.css +6 -2
  59. package/dist/Tabs/Tabs.css +4 -7
  60. package/dist/Tag/Tag.css +10 -7
  61. package/dist/Tag/TagGroup.css +1 -9
  62. package/dist/TextArea/TextArea.css +8 -14
  63. package/dist/Toast/FunctionalToast.js +0 -18
  64. package/dist/Toast/Toast.css +14 -15
  65. package/dist/Toast/Toast.d.ts +2 -2
  66. package/dist/Toast/Toast.js +48 -52
  67. package/dist/Toast/Toast.types.d.ts +1 -15
  68. package/dist/index.d.ts +0 -7
  69. package/dist/index.js +1 -15
  70. package/es/ActionSheet/ActionSheet.css +3 -6
  71. package/es/ActionSheet/ActionSheetItem.css +6 -10
  72. package/es/Alert/index.css +8 -14
  73. package/es/Avatar/Avatar.css +9 -13
  74. package/es/Avatar/AvatarGroup.css +8 -15
  75. package/es/Backdrop/Backdrop.css +1 -2
  76. package/es/Badge/Badge.css +17 -27
  77. package/es/Button/Button.css +17 -26
  78. package/es/Calendar/Calendar.css +18 -33
  79. package/es/Calendar/Calendar.d.ts +1 -1
  80. package/es/Calendar/Calendar.js +17 -38
  81. package/es/Calendar/Calendar.types.d.ts +0 -21
  82. package/es/Card/CardFooter.css +1 -2
  83. package/es/Card/CardHeader.css +1 -3
  84. package/es/Checkbox/Checkbox.css +5 -7
  85. package/es/CitySelector/CitySelector.css +15 -29
  86. package/es/CitySelector/CitySelectorCore.js +16 -25
  87. package/es/CitySelector/Selector/index.css +4 -4
  88. package/es/Countdown/Countdown.css +1 -2
  89. package/es/Dialog/Dialog.d.ts +2 -2
  90. package/es/Dialog/Dialog.js +8 -20
  91. package/es/Dialog/Dialog.types.d.ts +1 -12
  92. package/es/Dialog/FunctionalDialog.js +2 -38
  93. package/es/Dialog/index.css +18 -27
  94. package/es/Divider/Divider.css +4 -6
  95. package/es/IconButton/IconButton.css +7 -9
  96. package/es/Image/index.css +1 -2
  97. package/es/Input/Input.css +5 -10
  98. package/es/List/List.css +0 -3
  99. package/es/List/ListItem.css +3 -3
  100. package/es/List/ListItemContent.css +1 -1
  101. package/es/Loading/Loading.css +2 -4
  102. package/es/Modal/Modal.miniapp.d.ts +1 -1
  103. package/es/NavBar/NavBar.css +5 -9
  104. package/es/Picker/Picker.css +29 -25
  105. package/es/Picker/Picker.js +12 -32
  106. package/es/Picker/Picker.types.d.ts +0 -4
  107. package/es/Picker/PickerPanel.css +8 -8
  108. package/es/Picker/PickerPanel.js +8 -14
  109. package/es/Picker/utils.d.ts +0 -16
  110. package/es/Picker/utils.js +1 -29
  111. package/es/Portal/Portal.types.d.ts +0 -4
  112. package/es/Portal/PortalCore.js +1 -8
  113. package/es/Progress/Progress.css +6 -8
  114. package/es/Radio/Radio.css +1 -2
  115. package/es/Rating/Rating.css +4 -8
  116. package/es/Select/Select.css +10 -21
  117. package/es/Select/Select.js +1 -1
  118. package/es/Select/SelectOption.js +0 -3
  119. package/es/Skeleton/Skeleton.css +2 -3
  120. package/es/Slider/Slider.css +13 -24
  121. package/es/Steps/Step.css +11 -11
  122. package/es/Steps/Steps.css +5 -14
  123. package/es/Swiper/Swiper.css +1 -2
  124. package/es/Switch/Switch.css +16 -31
  125. package/es/TabBar/TabBar.css +3 -7
  126. package/es/TabBar/TabBarItem.css +1 -0
  127. package/es/Tabs/Tab.css +6 -2
  128. package/es/Tabs/Tabs.css +4 -7
  129. package/es/Tag/Tag.css +10 -7
  130. package/es/Tag/TagGroup.css +1 -9
  131. package/es/TextArea/TextArea.css +8 -14
  132. package/es/Toast/FunctionalToast.js +0 -18
  133. package/es/Toast/Toast.css +14 -15
  134. package/es/Toast/Toast.d.ts +2 -2
  135. package/es/Toast/Toast.js +49 -53
  136. package/es/Toast/Toast.types.d.ts +1 -15
  137. package/es/index.d.ts +0 -7
  138. package/es/index.js +0 -7
  139. package/package.json +5 -5
  140. package/dist/Breadcrumb/Breadcrumb.css +0 -34
  141. package/dist/Breadcrumb/Breadcrumb.d.ts +0 -5
  142. package/dist/Breadcrumb/Breadcrumb.js +0 -128
  143. package/dist/Breadcrumb/Breadcrumb.types.d.ts +0 -49
  144. package/dist/Breadcrumb/Breadcrumb.types.js +0 -15
  145. package/dist/Breadcrumb/BreadcrumbItem.d.ts +0 -4
  146. package/dist/Breadcrumb/BreadcrumbItem.js +0 -78
  147. package/dist/Breadcrumb/index.d.ts +0 -4
  148. package/dist/Breadcrumb/index.js +0 -45
  149. package/dist/Collapse/Collapse.css +0 -6
  150. package/dist/Collapse/Collapse.d.ts +0 -5
  151. package/dist/Collapse/Collapse.js +0 -165
  152. package/dist/Collapse/Collapse.types.d.ts +0 -16
  153. package/dist/Collapse/Collapse.types.js +0 -15
  154. package/dist/Collapse/index.d.ts +0 -2
  155. package/dist/Collapse/index.js +0 -41
  156. package/dist/CollapsePanel/CollapsePanel.css +0 -32
  157. package/dist/CollapsePanel/CollapsePanel.d.ts +0 -5
  158. package/dist/CollapsePanel/CollapsePanel.js +0 -159
  159. package/dist/CollapsePanel/CollapsePanel.types.d.ts +0 -64
  160. package/dist/CollapsePanel/CollapsePanel.types.js +0 -15
  161. package/dist/CollapsePanel/CollapsePanelItem.d.ts +0 -4
  162. package/dist/CollapsePanel/CollapsePanelItem.js +0 -112
  163. package/dist/CollapsePanel/index.d.ts +0 -4
  164. package/dist/CollapsePanel/index.js +0 -45
  165. package/dist/Popover/Popover.css +0 -97
  166. package/dist/Popover/Popover.d.ts +0 -5
  167. package/dist/Popover/Popover.js +0 -186
  168. package/dist/Popover/Popover.types.d.ts +0 -60
  169. package/dist/Popover/Popover.types.js +0 -15
  170. package/dist/Popover/index.d.ts +0 -2
  171. package/dist/Popover/index.js +0 -41
  172. package/dist/ThemeProvider/ThemeProvider.d.ts +0 -4
  173. package/dist/ThemeProvider/ThemeProvider.js +0 -90
  174. package/dist/ThemeProvider/ThemeProvider.types.d.ts +0 -127
  175. package/dist/ThemeProvider/ThemeProvider.types.js +0 -27
  176. package/dist/ThemeProvider/hooks/ThemeContext.d.ts +0 -4
  177. package/dist/ThemeProvider/hooks/ThemeContext.js +0 -35
  178. package/dist/ThemeProvider/hooks/createTheme.d.ts +0 -2
  179. package/dist/ThemeProvider/hooks/createTheme.js +0 -55
  180. package/dist/ThemeProvider/hooks/index.d.ts +0 -4
  181. package/dist/ThemeProvider/hooks/index.js +0 -43
  182. package/dist/ThemeProvider/hooks/useTheme.d.ts +0 -1
  183. package/dist/ThemeProvider/hooks/useTheme.js +0 -39
  184. package/dist/ThemeProvider/index.d.ts +0 -4
  185. package/dist/ThemeProvider/index.js +0 -45
  186. package/dist/ThemeProvider/utils/constants.d.ts +0 -38
  187. package/dist/ThemeProvider/utils/constants.js +0 -65
  188. package/dist/ThemeProvider/utils/index.d.ts +0 -2
  189. package/dist/ThemeProvider/utils/index.js +0 -23
  190. package/dist/ThemeProvider/utils/mountTokens.d.ts +0 -26
  191. package/dist/ThemeProvider/utils/mountTokens.js +0 -123
  192. package/dist/Tooltip/Tooltip.css +0 -91
  193. package/dist/Tooltip/Tooltip.d.ts +0 -5
  194. package/dist/Tooltip/Tooltip.js +0 -177
  195. package/dist/Tooltip/Tooltip.types.d.ts +0 -51
  196. package/dist/Tooltip/Tooltip.types.js +0 -15
  197. package/dist/Tooltip/index.d.ts +0 -2
  198. package/dist/Tooltip/index.js +0 -41
  199. package/dist/locales/base.d.ts +0 -40
  200. package/dist/locales/base.js +0 -15
  201. package/dist/locales/en-US.d.ts +0 -3
  202. package/dist/locales/en-US.js +0 -69
  203. package/dist/locales/hooks/useLocaleText.d.ts +0 -3
  204. package/dist/locales/hooks/useLocaleText.js +0 -43
  205. package/dist/locales/index.d.ts +0 -5
  206. package/dist/locales/index.js +0 -49
  207. package/dist/locales/zh-CN.d.ts +0 -3
  208. package/dist/locales/zh-CN.js +0 -51
  209. package/dist/locales/zh-TW.d.ts +0 -3
  210. package/dist/locales/zh-TW.js +0 -51
  211. package/es/Breadcrumb/Breadcrumb.css +0 -34
  212. package/es/Breadcrumb/Breadcrumb.d.ts +0 -5
  213. package/es/Breadcrumb/Breadcrumb.js +0 -101
  214. package/es/Breadcrumb/Breadcrumb.types.d.ts +0 -49
  215. package/es/Breadcrumb/Breadcrumb.types.js +0 -1
  216. package/es/Breadcrumb/BreadcrumbItem.d.ts +0 -4
  217. package/es/Breadcrumb/BreadcrumbItem.js +0 -51
  218. package/es/Breadcrumb/index.d.ts +0 -4
  219. package/es/Breadcrumb/index.js +0 -9
  220. package/es/Collapse/Collapse.css +0 -6
  221. package/es/Collapse/Collapse.d.ts +0 -5
  222. package/es/Collapse/Collapse.js +0 -144
  223. package/es/Collapse/Collapse.types.d.ts +0 -16
  224. package/es/Collapse/Collapse.types.js +0 -1
  225. package/es/Collapse/index.d.ts +0 -2
  226. package/es/Collapse/index.js +0 -6
  227. package/es/CollapsePanel/CollapsePanel.css +0 -32
  228. package/es/CollapsePanel/CollapsePanel.d.ts +0 -5
  229. package/es/CollapsePanel/CollapsePanel.js +0 -132
  230. package/es/CollapsePanel/CollapsePanel.types.d.ts +0 -64
  231. package/es/CollapsePanel/CollapsePanel.types.js +0 -1
  232. package/es/CollapsePanel/CollapsePanelItem.d.ts +0 -4
  233. package/es/CollapsePanel/CollapsePanelItem.js +0 -85
  234. package/es/CollapsePanel/index.d.ts +0 -4
  235. package/es/CollapsePanel/index.js +0 -9
  236. package/es/Popover/Popover.css +0 -97
  237. package/es/Popover/Popover.d.ts +0 -5
  238. package/es/Popover/Popover.js +0 -159
  239. package/es/Popover/Popover.types.d.ts +0 -60
  240. package/es/Popover/Popover.types.js +0 -1
  241. package/es/Popover/index.d.ts +0 -2
  242. package/es/Popover/index.js +0 -6
  243. package/es/ThemeProvider/ThemeProvider.d.ts +0 -4
  244. package/es/ThemeProvider/ThemeProvider.js +0 -61
  245. package/es/ThemeProvider/ThemeProvider.types.d.ts +0 -127
  246. package/es/ThemeProvider/ThemeProvider.types.js +0 -1
  247. package/es/ThemeProvider/hooks/ThemeContext.d.ts +0 -4
  248. package/es/ThemeProvider/hooks/ThemeContext.js +0 -6
  249. package/es/ThemeProvider/hooks/createTheme.d.ts +0 -2
  250. package/es/ThemeProvider/hooks/createTheme.js +0 -38
  251. package/es/ThemeProvider/hooks/index.d.ts +0 -4
  252. package/es/ThemeProvider/hooks/index.js +0 -8
  253. package/es/ThemeProvider/hooks/useTheme.d.ts +0 -1
  254. package/es/ThemeProvider/hooks/useTheme.js +0 -10
  255. package/es/ThemeProvider/index.d.ts +0 -4
  256. package/es/ThemeProvider/index.js +0 -8
  257. package/es/ThemeProvider/utils/constants.d.ts +0 -38
  258. package/es/ThemeProvider/utils/constants.js +0 -40
  259. package/es/ThemeProvider/utils/index.d.ts +0 -2
  260. package/es/ThemeProvider/utils/index.js +0 -2
  261. package/es/ThemeProvider/utils/mountTokens.d.ts +0 -26
  262. package/es/ThemeProvider/utils/mountTokens.js +0 -88
  263. package/es/Tooltip/Tooltip.css +0 -91
  264. package/es/Tooltip/Tooltip.d.ts +0 -5
  265. package/es/Tooltip/Tooltip.js +0 -150
  266. package/es/Tooltip/Tooltip.types.d.ts +0 -51
  267. package/es/Tooltip/Tooltip.types.js +0 -1
  268. package/es/Tooltip/index.d.ts +0 -2
  269. package/es/Tooltip/index.js +0 -6
  270. package/es/locales/base.d.ts +0 -40
  271. package/es/locales/base.js +0 -0
  272. package/es/locales/en-US.d.ts +0 -3
  273. package/es/locales/en-US.js +0 -50
  274. package/es/locales/hooks/useLocaleText.d.ts +0 -3
  275. package/es/locales/hooks/useLocaleText.js +0 -26
  276. package/es/locales/index.d.ts +0 -5
  277. package/es/locales/index.js +0 -11
  278. package/es/locales/zh-CN.d.ts +0 -3
  279. package/es/locales/zh-CN.js +0 -32
  280. package/es/locales/zh-TW.d.ts +0 -3
  281. package/es/locales/zh-TW.js +0 -32
@@ -1,15 +1,11 @@
1
1
  import React, { ReactNode } from 'react';
2
2
  import { ModalProps } from '../Modal/Modal.types';
3
3
  import { InputProps } from '../Input/Input.types';
4
- import { ThemeProps } from '../ThemeProvider/ThemeProvider.types';
5
4
  /**
6
5
  * 对话框类型
7
6
  */
8
7
  export type DialogType = 'confirm' | 'prompt';
9
8
  export type Dispatch = (action: boolean, val?: string) => void;
10
- export type DialogRef = {
11
- theme?: ThemeProps;
12
- };
13
9
  export interface DialogProps extends ModalProps {
14
10
  /**
15
11
  * 对话框类型
@@ -40,10 +36,6 @@ export interface DialogProps extends ModalProps {
40
36
  * 取消文本内容
41
37
  */
42
38
  cancelText?: ReactNode;
43
- /**
44
- * theme 主题定制
45
- */
46
- theme?: ThemeProps;
47
39
  /**
48
40
  * 确认回调
49
41
  */
@@ -90,7 +82,7 @@ export type DialogPromise = Promise<boolean | string>;
90
82
  /**
91
83
  * Dialog Instance
92
84
  */
93
- export interface DialogFunction {
85
+ export interface DialogInstance {
94
86
  /**
95
87
  * 直接调用显示确认框 Dialog
96
88
  */
@@ -104,6 +96,3 @@ export interface DialogFunction {
104
96
  */
105
97
  prompt?: (options: PromptOptions, val?: string) => DialogPromise;
106
98
  }
107
- export interface DialogInstance extends DialogFunction {
108
- useDialog: () => [DialogFunction, React.JSX.Element];
109
- }
@@ -64,7 +64,7 @@ const DialogGenerator = (options) => {
64
64
  const rootElement = getRootElement();
65
65
  rootElement.appendChild(rootWrapper);
66
66
  const DialogComponent = () => {
67
- const _a = options, { onConfirm, onCancel, ref } = _a, others = __objRest(_a, ["onConfirm", "onCancel", "ref"]);
67
+ const _a = options, { onConfirm, onCancel } = _a, others = __objRest(_a, ["onConfirm", "onCancel"]);
68
68
  const [visible, setVisible] = useState(false);
69
69
  const close = useCallback(() => {
70
70
  setVisible(false);
@@ -94,9 +94,7 @@ const DialogGenerator = (options) => {
94
94
  });
95
95
  return /* @__PURE__ */ React.createElement(
96
96
  Popup,
97
- __spreadProps(__spreadValues({
98
- ref
99
- }, others), {
97
+ __spreadProps(__spreadValues({}, others), {
100
98
  open: visible,
101
99
  onOk: (val) => dispatch(true, val),
102
100
  onClose: () => dispatch(false)
@@ -135,42 +133,8 @@ const prompt = (options) => {
135
133
  type: "prompt"
136
134
  }, formatProps(options)));
137
135
  };
138
- const useDialog = () => {
139
- const holderRef = React.useRef(null);
140
- const wrapAPI = (props) => {
141
- const options = __spreadValues({ theme: holderRef.current.theme }, formatProps(props));
142
- const _a = options, { onConfirm, onCancel } = _a, rest = __objRest(_a, ["onConfirm", "onCancel"]);
143
- return new Promise((resolve) => {
144
- DialogGenerator(__spreadProps(__spreadValues({}, rest), {
145
- onConfirm: (val) => __async(void 0, null, function* () {
146
- yield onConfirm == null ? void 0 : onConfirm(val);
147
- if (rest.type === "prompt")
148
- resolve(val);
149
- else
150
- resolve(true);
151
- }),
152
- onCancel: () => __async(void 0, null, function* () {
153
- yield onCancel == null ? void 0 : onCancel();
154
- resolve(false);
155
- })
156
- }));
157
- });
158
- };
159
- wrapAPI.confirm = (options) => Dialog(__spreadProps(__spreadValues({
160
- type: "confirm"
161
- }, formatProps(options)), {
162
- theme: holderRef.current.theme
163
- }));
164
- wrapAPI.prompt = (options) => Dialog(__spreadProps(__spreadValues({
165
- type: "prompt"
166
- }, formatProps(options)), {
167
- theme: holderRef.current.theme
168
- }));
169
- return [wrapAPI, /* @__PURE__ */ React.createElement(Popup, { key: "dialog-holder", ref: holderRef })];
170
- };
171
136
  Dialog.confirm = confirm;
172
137
  Dialog.prompt = prompt;
173
- Dialog.useDialog = useDialog;
174
138
  var FunctionalDialog_default = Dialog;
175
139
  export {
176
140
  FunctionalDialog_default as default
@@ -1,15 +1,8 @@
1
1
  .bui-dialog {
2
- --max-width: var(--bui-dialog-max-width, 300px);
3
- --border-radius: var(--bui-dialog-border-radius, var(--bui-shape-radius-drawer));
4
- --title-padding: var(--bui-dialog-title-padding, 0 40px 9px);
5
- --desc-padding: var(--bui-dialog-desc-padding, 0 24px);
6
- --footer-margin-top: var(--bui-dialog-footer-margin-top, 15px);
7
- --button-height: var(--bui-dialog-button-height, 53px);
8
- --button-line-height: var(--bui-dialog-button-line-height, 25px);
9
- --button-padding: var(--bui-dialog-button-padding, 12px 0 13px);
10
- --button-font-size: var(--bui-dialog-button-font-size, 17px);
11
- --button-border-left: var(--bui-dialog-button-border-left, 1px solid rgba(0, 0, 0, 0.05));
12
- --button-active-background-color: var(--bui-dialog-button-active-background-color, rgba(54, 57, 64, 0.05));
2
+ --max-width: 300px;
3
+ --border-radius: var(--bui-shape-radius-drawer);
4
+ --header-font-size: var(--bui-title-size-2);
5
+ --message-font-size: var(--bui-title-size-4);
13
6
  display: flex;
14
7
  align-items: center;
15
8
  justify-content: center;
@@ -24,26 +17,26 @@
24
17
  line-height: 21px;
25
18
  }
26
19
  .bui-dialog-body-title {
27
- padding: var(--title-padding);
28
- font-size: var(--bui-title-size-2);
20
+ padding: 0 40px 9px;
21
+ font-size: var(--header-font-size);
29
22
  text-align: center;
30
23
  color: var(--bui-color-fg-default);
31
- font-weight: var(--bui-font-weight-medium);
24
+ font-weight: 500;
32
25
  }
33
26
  .bui-dialog-body-title + .bui-dialog-body-footer {
34
- margin-top: var(--bui-spacing-sm);
27
+ margin-top: 6px;
35
28
  }
36
29
  .bui-dialog-body-desc {
37
- padding: var(--desc-padding);
30
+ padding: 0 24px;
38
31
  color: var(--bui-color-fg-muted);
39
- font-size: var(--bui-title-size-4);
32
+ font-size: var(--message-font-size);
40
33
  text-align: center;
41
34
  }
42
35
  .bui-dialog-body-desc:first-child {
43
36
  padding-top: 0;
44
37
  }
45
38
  .bui-dialog-body-footer {
46
- margin-top: var(--footer-margin-top);
39
+ margin-top: 15px;
47
40
  border-top: 1px solid rgba(0, 0, 0, 0.05);
48
41
  display: -webkit-box;
49
42
  display: flex;
@@ -56,20 +49,18 @@
56
49
  flex: 1;
57
50
  display: block;
58
51
  width: 100%;
59
- height: var(--button-height);
60
- line-height: var(--button-line-height);
61
- padding: var(--button-padding);
62
- font-size: var(--button-font-size);
52
+ height: 53px;
53
+ line-height: 25px;
54
+ padding: 12px 0 13px;
55
+ font-size: 17px;
56
+ background: 0 0;
63
57
  border: 0;
64
58
  outline: 0;
65
- border-left: var(--button-border-left);
59
+ border-left: 1px solid rgba(0, 0, 0, 0.05);
66
60
  border-radius: 0;
67
61
  text-align: center;
68
62
  box-sizing: border-box;
69
63
  }
70
- .bui-dialog-body-button:first-child {
71
- border: none;
72
- }
73
64
  .bui-dialog-body-button:active {
74
- background-color: var(--button-active-background-color);
65
+ background-color: rgba(54, 57, 64, 0.05);
75
66
  }
@@ -1,20 +1,18 @@
1
1
  .bui-divider {
2
2
  --height: var(--bui-divider-height, 100%);
3
3
  --width: var(--bui-divider-width, 100%);
4
- --border-width: var(--bui-divider-border-width, 1px);
5
- --line-width: var(--bui-divider-line-width, 40px);
6
4
  border-color: var(--bui-color-border-default);
7
5
  font-family: var(--bui-font-family);
8
6
  }
9
7
  .bui-divider-vertical {
10
8
  height: var(--height);
11
9
  display: inline-block;
12
- border-right-width: var(--border-width);
10
+ border-right-width: 1px;
13
11
  border-right-style: solid;
14
12
  }
15
13
  .bui-divider-horizontal {
16
14
  width: var(--width);
17
- border-bottom-width: var(--border-width);
15
+ border-bottom-width: 1px;
18
16
  border-bottom-style: solid;
19
17
  }
20
18
  .bui-divider-vertical-dashed {
@@ -31,8 +29,8 @@
31
29
  justify-content: center;
32
30
  }
33
31
  .bui-divider-line {
34
- width: var(--line-width);
35
- border-bottom-width: var(--border-width);
32
+ width: 40px;
33
+ border-bottom-width: 1px;
36
34
  border-bottom-style: solid;
37
35
  border-color: var(--bui-color-border-default);
38
36
  }
@@ -1,10 +1,8 @@
1
1
  .bui-icon-btn {
2
- --bg-color: var(--bui-icon-btn-bg-color, var(--bui-color-neutral-5));
3
- --color: var(--bui-icon-btn-color, var(--bui-color-fg-muted));
4
- --icon-size: var(--bui-icon-btn-font-size, 17px);
5
- --user-area: var(--bui-icon-btn-padding, 5px);
6
- --large-font-size: var(--bui-icon-btn-large-font-size, 23px);
7
- --disabled-opacity: var(--bui-icon-btn-disabled-opacity, 0.5);
2
+ --bg-color: var(--bui-color-neutral-5);
3
+ --color: var(--bui-color-fg-muted);
4
+ --icon-size: 17px;
5
+ --user-area: 5px;
8
6
  position: relative;
9
7
  display: inline-flex;
10
8
  height: auto;
@@ -49,10 +47,10 @@
49
47
  }
50
48
  .bui-icon-btn-medium.bui-icon-btn-outlined,
51
49
  .bui-icon-btn-medium.bui-icon-btn-contained {
52
- padding: var(--user-area);
50
+ padding: 5px;
53
51
  }
54
52
  .bui-icon-btn-large {
55
- font-size: var(--large-font-size);
53
+ font-size: 23px;
56
54
  padding: var(--bui-spacing-sm);
57
55
  }
58
56
  .bui-icon-btn-large.bui-icon-btn-outlined,
@@ -61,7 +59,7 @@
61
59
  }
62
60
  .bui-icon-btn-disabled {
63
61
  pointer-events: none;
64
- opacity: var(--disabled-opacity);
62
+ opacity: 0.5;
65
63
  }
66
64
  .bui-icon-btn-circular {
67
65
  border-radius: 100%;
@@ -1,5 +1,4 @@
1
1
  .bui-image {
2
- --default-background-color: var(--bui-image-default-background-color, rgba(127, 127, 127, 0.2));
3
2
  width: auto;
4
3
  height: auto;
5
4
  display: inline-block;
@@ -32,5 +31,5 @@
32
31
  .bui-image-default-icon-item {
33
32
  width: 100%;
34
33
  height: 100%;
35
- background-color: var(--default-background-color);
34
+ background-color: rgba(127, 127, 127, 0.2);
36
35
  }
@@ -1,14 +1,9 @@
1
1
  .bui-input {
2
- --height: var(--bui-input-height, 32px);
3
- --padding: var(--bui-input-padding, 4px 10px);
4
- --icon-start-margin-right: var(--bui-input-icon-start-margin-right, 3px);
5
- --icon-end-margin-left: var(--bui-input-icon-end-margin-left, 3px);
6
- --disabled-background-color: var(--bui-input-disabled-background-color, rgba(0, 0, 0, 0.04));
7
2
  position: relative;
8
3
  display: flex;
9
4
  align-items: center;
10
- height: var(--height);
11
- padding: var(--padding);
5
+ height: 32px;
6
+ padding: 4px 10px;
12
7
  box-sizing: border-box;
13
8
  border-radius: var(--bui-shape-radius-default);
14
9
  border: 1px solid var(--bui-color-border-default);
@@ -21,10 +16,10 @@
21
16
  font-size: var(--bui-title-size-3);
22
17
  }
23
18
  .bui-input-icon-start {
24
- margin-right: var(--icon-start-margin-right);
19
+ margin-right: 3px;
25
20
  }
26
21
  .bui-input-icon-end {
27
- margin-left: var(--icon-end-margin-left);
22
+ margin-left: 3px;
28
23
  }
29
24
  .bui-input-input {
30
25
  flex: 1;
@@ -43,7 +38,7 @@
43
38
  }
44
39
  .bui-input-disabled {
45
40
  pointer-events: none;
46
- background-color: var(--disabled-background-color);
41
+ background-color: rgba(0, 0, 0, 0.04);
47
42
  }
48
43
  .bui-input-disabled .bui-input-input {
49
44
  color: var(--bui-color-fg-disabled);
package/es/List/List.css CHANGED
@@ -1,7 +1,4 @@
1
1
  .bui-list {
2
- --small-item-padding: var(--bui-list-small-item-padding, 5px 12px);
3
- --medium-item-padding: var(--bui-list-medium-item-padding, 18px 12px);
4
- --large-item-padding: var(--bui-list-large-item-padding, 20px 12px);
5
2
  background: var(--bui-color-bg-view);
6
3
  font-size: var(--bui-title-size-3);
7
4
  font-family: var(--bui-font-family);
@@ -10,13 +10,13 @@
10
10
  color: var(--bui-color-fg-subtle);
11
11
  }
12
12
  .bui-list-small .bui-list-item {
13
- padding: var(--small-item-padding);
13
+ padding: 5px 12px;
14
14
  }
15
15
  .bui-list-medium .bui-list-item {
16
- padding: var(--medium-item-padding);
16
+ padding: 18px 12px;
17
17
  }
18
18
  .bui-list-large .bui-list-item {
19
- padding: var(--large-item-padding);
19
+ padding: 20px 12px;
20
20
  }
21
21
  .bui-list-item-divider:not(:last-child) {
22
22
  border-bottom: 1px solid var(--bui-color-border-default);
@@ -13,6 +13,6 @@
13
13
  flex: 1 1 auto;
14
14
  }
15
15
  .bui-list-item-content-secondary {
16
- font-size: var(--bui-text-size-2);
16
+ font-size: 13px;
17
17
  color: var(--bui-color-fg-muted);
18
18
  }
@@ -1,6 +1,4 @@
1
1
  .bui-loading {
2
- --icon-font-size: var(--bui-loading-icon-font-size, 30px);
3
- --text-padding: var(--bui-loading-text-padding, 10px);
4
2
  --animation-duration: var(--bui-loading-animation-duration, 1.6s);
5
3
  width: fit-content;
6
4
  display: flex;
@@ -10,11 +8,11 @@
10
8
  font-family: var(--bui-font-family);
11
9
  }
12
10
  .bui-loading-icon {
13
- font-size: var(--icon-font-size);
11
+ font-size: 30px;
14
12
  animation: loading var(--animation-duration) linear infinite;
15
13
  }
16
14
  .bui-loading-text {
17
- padding: var(--text-padding);
15
+ padding: 10px;
18
16
  font-size: var(--bui-title-size-3);
19
17
  }
20
18
  .bui-loading-vertical {
@@ -12,5 +12,5 @@ declare const Modal: React.ForwardRefExoticComponent<Omit<ViewProps & {
12
12
  keepMounted?: boolean;
13
13
  } & import("@bifrostui/types").ICommonProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
14
14
  ref?: React.Ref<HTMLDivElement>;
15
- }, keyof import("@bifrostui/types").ICommonProps | "container" | "open" | "disablePortal" | "onClose" | "hideBackdrop" | "BackdropProps" | "disableScrollLock" | "keepMounted">, "ref"> & React.RefAttributes<HTMLDivElement>>;
15
+ }, "open" | keyof import("@bifrostui/types").ICommonProps | "onClose" | "container" | "disablePortal" | "hideBackdrop" | "BackdropProps" | "disableScrollLock" | "keepMounted">, "ref"> & React.RefAttributes<HTMLDivElement>>;
16
16
  export default Modal;
@@ -1,18 +1,14 @@
1
1
  .bui-navbar {
2
- --width: var(--bui-navbar-width, 100%);
3
2
  --height: var(--bui-navbar-height, 45px);
4
- --padding: var(--bui-navbar-padding, 0 8px);
5
3
  --icon-size: var(--bui-navbar-icon-size, 24px);
6
- --icon-font-size: var(--bui-navbar-icon-font-size, var(--bui-title-size-3));
7
4
  --background-color: var(--bui-navbar-background-color, var(--bui-color-white));
8
5
  --border-bottom: var(--bui-navbar-border-bottom, none);
9
6
  --z-index: var(--bui-navbar-z-index, auto);
10
- --title-max-width: var(--bui-navbar-title-max-width, 60%);
11
7
  position: relative;
12
- width: var(--width);
8
+ width: 100%;
13
9
  height: var(--height);
14
10
  box-sizing: border-box;
15
- padding: var(--padding);
11
+ padding: 0 8px;
16
12
  display: flex;
17
13
  justify-content: center;
18
14
  align-items: center;
@@ -29,8 +25,8 @@
29
25
  width: 100%;
30
26
  }
31
27
  .bui-navbar-title {
32
- max-width: var(--title-max-width);
33
- padding: var(--padding);
28
+ max-width: 60%;
29
+ padding: 0 8px;
34
30
  font-size: var(--bui-title-size-2);
35
31
  width: auto;
36
32
  overflow: hidden;
@@ -42,7 +38,7 @@
42
38
  flex: 1;
43
39
  display: flex;
44
40
  align-items: center;
45
- font-size: var(--icon-font-size);
41
+ font-size: var(--bui-title-size-3);
46
42
  }
47
43
  .bui-navbar-left {
48
44
  justify-content: flex-start;
@@ -1,49 +1,53 @@
1
1
  .bui-picker {
2
- --header-height: var(--bui-picker-header-height, 50px);
3
- --header-padding: var(--bui-picker-header-padding, 0 var(--bui-spacing-lg));
4
- --cancel-height: var(--bui-picker-cancel-height, 100%);
5
- --cancel-line-height: var(--bui-picker-cancel-line-height, 50px);
6
- --confirm-height: var(--bui-picker-confirm-height, 100%);
7
- --confirm-line-height: var(--bui-picker-confirm-line-height, 50px);
8
- --panel-container-height: var(--bui-picker-panel-height, 260px);
9
- --indicator-top: var(--bui-picker-indicator-top, 108px);
10
- --option-height: var(--bui-picker-option-height, 36px);
2
+ --cancel-color: var(--bui-color-fg-default);
3
+ --cancel-font-size: var(--bui-title-size-4, 15px);
4
+ --confirm-color: var(--bui-color-primary);
5
+ --confirm-font-size: var(--bui-title-size-4, 15px);
6
+ --title-color: var(--bui-color-fg-default);
7
+ --title-font-size: var(--bui-title-size-3, 16px);
8
+ --title-font-weight: var(--bui-font-weight-medium, 500);
9
+ --panel-container-height: 260px;
10
+ --indicator-top: 108px;
11
+ --indicator-height: 36px;
12
+ --indicator-border-color: var(--bui-color-border-default);
13
+ --option-color: var(--bui-color-fg-default);
14
+ --option-font-size: var(--bui-title-size-4);
15
+ --option-height: 36px;
11
16
  font-family: var(--bui-font-family);
12
17
  }
13
18
  .bui-picker .bui-drawer-content {
14
19
  border-radius: var(--bui-shape-radius-drawer) var(--bui-shape-radius-drawer) 0 0;
15
20
  }
16
21
  .bui-picker-header {
17
- height: var(--header-height);
22
+ height: 50px;
18
23
  display: flex;
19
24
  align-items: center;
20
25
  justify-content: space-between;
21
- padding: var(--header-padding);
26
+ padding: 0 var(--bui-spacing-lg);
22
27
  }
23
28
  .bui-picker-cancel {
24
- cursor: pointer;
25
- height: var(--cancel-height);
26
- font-size: var(--bui-title-size-4);
29
+ width: 40px;
30
+ height: 100%;
31
+ font-size: var(--cancel-font-size);
27
32
  text-align: center;
28
- line-height: var(--cancel-line-height);
29
- color: var(--bui-color-fg-default);
33
+ line-height: 50px;
34
+ color: var(--cancel-color);
30
35
  }
31
36
  .bui-picker-title {
32
- font-size: var(--bui-title-size-3);
33
- color: var(--bui-color-fg-default);
34
- font-weight: var(--bui-font-weight-medium);
37
+ font-size: var(--title-font-size);
38
+ color: var(--title-color);
39
+ font-weight: var(--title-font-weight);
35
40
  }
36
41
  .bui-picker-confirm {
37
- cursor: pointer;
38
- height: var(--confirm-height);
39
- font-size: var(--bui-title-size-4);
42
+ width: 40px;
43
+ height: 100%;
44
+ font-size: var(--confirm-font-size);
40
45
  text-align: center;
41
- line-height: var(--confirm-line-height);
42
- color: var(--bui-color-primary);
46
+ line-height: 50px;
47
+ color: var(--confirm-color);
43
48
  }
44
49
  .bui-picker-container {
45
50
  width: 100%;
46
51
  height: var(--panel-container-height);
47
52
  display: flex;
48
- overflow: hidden;
49
53
  }
@@ -33,8 +33,7 @@ import clsx from "clsx";
33
33
  import React, { useEffect, useRef, useState, useCallback } from "react";
34
34
  import Drawer from "../Drawer";
35
35
  import PickerPanel from "./PickerPanel";
36
- import { useLocaleText } from "../locales";
37
- import { formatOptions, pickerPanelType, safeData } from "./utils";
36
+ import { formatOptions, pickerPanelType } from "./utils";
38
37
  import "./Picker.css";
39
38
  const prefixCls = "bui-picker";
40
39
  const Picker = /* @__PURE__ */ React.forwardRef((props, ref) => {
@@ -65,7 +64,6 @@ const Picker = /* @__PURE__ */ React.forwardRef((props, ref) => {
65
64
  const rollerRefs = useRef([]);
66
65
  const [columns, setColumns] = useState([]);
67
66
  const [internalValue, setInternalValue] = useState([]);
68
- const { cancel: cancelText, confirm: confirmText } = useLocaleText("picker");
69
67
  useEffect(() => {
70
68
  if (!open)
71
69
  return;
@@ -87,18 +85,13 @@ const Picker = /* @__PURE__ */ React.forwardRef((props, ref) => {
87
85
  }
88
86
  }, [value, options]);
89
87
  const confirm = (e) => {
90
- const isMoving = rollerRefs.current.some((roller) => roller == null ? void 0 : roller.isMoving);
91
- if (isMoving)
92
- return;
93
- const { safeValue } = safeData({
94
- value: internalValue,
95
- formatted: columns,
96
- options
97
- });
98
88
  const payload = {
99
- value: safeValue,
89
+ value: internalValue,
100
90
  options: columns
101
91
  };
92
+ const isMoving = rollerRefs.current.some((roller) => roller == null ? void 0 : roller.isMoving);
93
+ if (isMoving)
94
+ return;
102
95
  onConfirm == null ? void 0 : onConfirm(e, payload);
103
96
  onClose == null ? void 0 : onClose(e, __spreadValues({
104
97
  from: "confirm"
@@ -106,18 +99,11 @@ const Picker = /* @__PURE__ */ React.forwardRef((props, ref) => {
106
99
  };
107
100
  const cancel = (e) => {
108
101
  onCancel == null ? void 0 : onCancel(e);
109
- const { safeValue } = safeData({
102
+ onClose == null ? void 0 : onClose(e, {
103
+ from: "cancel",
110
104
  value: internalValue,
111
- formatted: columns,
112
- options
113
- });
114
- const payload = {
115
- value: safeValue,
116
105
  options: columns
117
- };
118
- onClose == null ? void 0 : onClose(e, __spreadValues({
119
- from: "cancel"
120
- }, payload));
106
+ });
121
107
  };
122
108
  const updateItem = (e, columnOption, columnIndex) => {
123
109
  var _a2, _b, _c;
@@ -150,7 +136,7 @@ const Picker = /* @__PURE__ */ React.forwardRef((props, ref) => {
150
136
  currentOption: columnOption
151
137
  });
152
138
  } else {
153
- const result = [...internalValue];
139
+ const result = internalValue;
154
140
  result[columnIndex] = columnOption.value;
155
141
  setInternalValue(result);
156
142
  onOptionChange == null ? void 0 : onOptionChange(e, {
@@ -165,13 +151,8 @@ const Picker = /* @__PURE__ */ React.forwardRef((props, ref) => {
165
151
  updateItem(e, columnOption, columnIndex);
166
152
  };
167
153
  const handleClose = (e, data) => {
168
- const { safeValue } = safeData({
169
- value: internalValue,
170
- formatted: columns,
171
- options
172
- });
173
154
  onClose == null ? void 0 : onClose(e, __spreadValues({
174
- value: safeValue,
155
+ value: internalValue,
175
156
  options: columns
176
157
  }, data));
177
158
  };
@@ -195,7 +176,7 @@ const Picker = /* @__PURE__ */ React.forwardRef((props, ref) => {
195
176
  __spreadProps(__spreadValues({}, contentProps), {
196
177
  className: clsx(`${prefixCls}-content`, contentProps == null ? void 0 : contentProps.className)
197
178
  }),
198
- /* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-header` }, /* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-cancel`, onClick: cancel }, cancelText), title && /* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-title` }, title), /* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-confirm`, onClick: confirm }, confirmText)),
179
+ /* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-header` }, /* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-cancel`, onClick: cancel }, "\u53D6\u6D88"), title && /* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-title` }, title), /* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-confirm`, onClick: confirm }, "\u786E\u8BA4")),
199
180
  /* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-container` }, columns.map((column, index) => /* @__PURE__ */ React.createElement(
200
181
  PickerPanel,
201
182
  {
@@ -204,8 +185,7 @@ const Picker = /* @__PURE__ */ React.forwardRef((props, ref) => {
204
185
  options: column,
205
186
  columnIndex: index,
206
187
  defaultValue: internalValue == null ? void 0 : internalValue[index],
207
- onSelect: handleSelect,
208
- pickerStyle: others == null ? void 0 : others.style
188
+ onSelect: handleSelect
209
189
  }
210
190
  )))
211
191
  )
@@ -86,10 +86,6 @@ export type PickerPanelProps<D extends React.ElementType = 'div', P = {}> = Over
86
86
  * 列索引
87
87
  */
88
88
  columnIndex?: number;
89
- /**
90
- * Piker组件的样式,PickerPanel的主题定制与css变量传入的Tokens有关,需要透传计算
91
- */
92
- pickerStyle?: React.CSSProperties;
93
89
  /**
94
90
  * 选择选项时的回调
95
91
  */
@@ -21,12 +21,12 @@
21
21
  background-image:
22
22
  linear-gradient(
23
23
  180deg,
24
- var(--bui-color-bg-alpha-light-9),
25
- var(--bui-color-bg-alpha-light-3)),
24
+ var(--bui-color-bg-view-opacity-9),
25
+ var(--bui-color-bg-view-opacity-4)),
26
26
  linear-gradient(
27
27
  0deg,
28
- var(--bui-color-bg-alpha-light-9),
29
- var(--bui-color-bg-alpha-light-3));
28
+ var(--bui-color-bg-view-opacity-9),
29
+ var(--bui-color-bg-view-opacity-4));
30
30
  background-position: top, bottom;
31
31
  background-size: 100% var(--indicator-top);
32
32
  background-repeat: no-repeat;
@@ -35,10 +35,10 @@
35
35
  .bui-picker-panel-indicator {
36
36
  position: absolute;
37
37
  top: var(--indicator-top);
38
- height: var(--option-height);
38
+ height: var(--indicator-height);
39
39
  width: 100%;
40
- border-top: 1px solid var(--bui-color-border-default);
41
- border-bottom: 1px solid var(--bui-color-border-default);
40
+ border-top: 1px solid var(--indicator-border-color);
41
+ border-bottom: 1px solid var(--indicator-border-color);
42
42
  }
43
43
  .bui-picker-panel-option {
44
44
  position: absolute;
@@ -47,7 +47,7 @@
47
47
  text-align: center;
48
48
  height: var(--option-height);
49
49
  line-height: var(--option-height);
50
- color: var(--bui-color-fg-default);
50
+ color: var(--option-color);
51
51
  font-size: var(--option-font-size);
52
52
  backface-visibility: hidden;
53
53
  width: auto;