@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,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);
@@ -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
- }, "open" | "container" | "disablePortal" | keyof import("@bifrostui/types").ICommonProps | "hideBackdrop" | "BackdropProps" | "onClose" | "disableScrollLock" | "keepMounted">, "ref"> & React.RefAttributes<HTMLDivElement>>;
15
+ }, "open" | keyof import("@bifrostui/types").ICommonProps | "container" | "disablePortal" | "hideBackdrop" | "BackdropProps" | "onClose" | "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
  }
@@ -63,7 +63,6 @@ var import_clsx = __toESM(require("clsx"));
63
63
  var import_react = __toESM(require("react"));
64
64
  var import_Drawer = __toESM(require("../Drawer"));
65
65
  var import_PickerPanel = __toESM(require("./PickerPanel"));
66
- var import_locales = require("../locales");
67
66
  var import_utils = require("./utils");
68
67
  var import_Picker2 = require("./Picker.css");
69
68
  const prefixCls = "bui-picker";
@@ -95,7 +94,6 @@ const Picker = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
95
94
  const rollerRefs = (0, import_react.useRef)([]);
96
95
  const [columns, setColumns] = (0, import_react.useState)([]);
97
96
  const [internalValue, setInternalValue] = (0, import_react.useState)([]);
98
- const { cancel: cancelText, confirm: confirmText } = (0, import_locales.useLocaleText)("picker");
99
97
  (0, import_react.useEffect)(() => {
100
98
  if (!open)
101
99
  return;
@@ -117,18 +115,13 @@ const Picker = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
117
115
  }
118
116
  }, [value, options]);
119
117
  const confirm = (e) => {
120
- const isMoving = rollerRefs.current.some((roller) => roller == null ? void 0 : roller.isMoving);
121
- if (isMoving)
122
- return;
123
- const { safeValue } = (0, import_utils.safeData)({
124
- value: internalValue,
125
- formatted: columns,
126
- options
127
- });
128
118
  const payload = {
129
- value: safeValue,
119
+ value: internalValue,
130
120
  options: columns
131
121
  };
122
+ const isMoving = rollerRefs.current.some((roller) => roller == null ? void 0 : roller.isMoving);
123
+ if (isMoving)
124
+ return;
132
125
  onConfirm == null ? void 0 : onConfirm(e, payload);
133
126
  onClose == null ? void 0 : onClose(e, __spreadValues({
134
127
  from: "confirm"
@@ -136,18 +129,11 @@ const Picker = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
136
129
  };
137
130
  const cancel = (e) => {
138
131
  onCancel == null ? void 0 : onCancel(e);
139
- const { safeValue } = (0, import_utils.safeData)({
132
+ onClose == null ? void 0 : onClose(e, {
133
+ from: "cancel",
140
134
  value: internalValue,
141
- formatted: columns,
142
- options
143
- });
144
- const payload = {
145
- value: safeValue,
146
135
  options: columns
147
- };
148
- onClose == null ? void 0 : onClose(e, __spreadValues({
149
- from: "cancel"
150
- }, payload));
136
+ });
151
137
  };
152
138
  const updateItem = (e, columnOption, columnIndex) => {
153
139
  var _a2, _b, _c;
@@ -180,7 +166,7 @@ const Picker = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
180
166
  currentOption: columnOption
181
167
  });
182
168
  } else {
183
- const result = [...internalValue];
169
+ const result = internalValue;
184
170
  result[columnIndex] = columnOption.value;
185
171
  setInternalValue(result);
186
172
  onOptionChange == null ? void 0 : onOptionChange(e, {
@@ -195,13 +181,8 @@ const Picker = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
195
181
  updateItem(e, columnOption, columnIndex);
196
182
  };
197
183
  const handleClose = (e, data) => {
198
- const { safeValue } = (0, import_utils.safeData)({
199
- value: internalValue,
200
- formatted: columns,
201
- options
202
- });
203
184
  onClose == null ? void 0 : onClose(e, __spreadValues({
204
- value: safeValue,
185
+ value: internalValue,
205
186
  options: columns
206
187
  }, data));
207
188
  };
@@ -225,7 +206,7 @@ const Picker = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
225
206
  __spreadProps(__spreadValues({}, contentProps), {
226
207
  className: (0, import_clsx.default)(`${prefixCls}-content`, contentProps == null ? void 0 : contentProps.className)
227
208
  }),
228
- /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-header` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-cancel`, onClick: cancel }, cancelText), title && /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-title` }, title), /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-confirm`, onClick: confirm }, confirmText)),
209
+ /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-header` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-cancel`, onClick: cancel }, "\u53D6\u6D88"), title && /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-title` }, title), /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-confirm`, onClick: confirm }, "\u786E\u8BA4")),
229
210
  /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-container` }, columns.map((column, index) => /* @__PURE__ */ import_react.default.createElement(
230
211
  import_PickerPanel.default,
231
212
  {
@@ -234,8 +215,7 @@ const Picker = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
234
215
  options: column,
235
216
  columnIndex: index,
236
217
  defaultValue: internalValue == null ? void 0 : internalValue[index],
237
- onSelect: handleSelect,
238
- pickerStyle: others == null ? void 0 : others.style
218
+ onSelect: handleSelect
239
219
  }
240
220
  )))
241
221
  )
@@ -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;
@@ -63,31 +63,25 @@ var import_PickerPanel = require("./PickerPanel.css");
63
63
  const prefixCls = "bui-picker-panel";
64
64
  const PickerPanel = /* @__PURE__ */ import_react.default.forwardRef(
65
65
  (props, ref) => {
66
- var _b;
67
66
  const _a = props, {
68
67
  options = [],
69
68
  defaultValue,
70
69
  onSelect,
71
- columnIndex,
72
- pickerStyle
70
+ columnIndex
73
71
  } = _a, others = __objRest(_a, [
74
72
  "options",
75
73
  "defaultValue",
76
74
  "onSelect",
77
- "columnIndex",
78
- "pickerStyle"
75
+ "columnIndex"
79
76
  ]);
80
77
  const touch = (0, import_utils.useTouch)();
81
78
  let timer;
82
79
  const INERTIA_TIME = 200;
83
80
  const INERTIA_DISTANCE = 15;
84
81
  const DEFAULT_DURATION = 200;
82
+ const LINE_SPACING = 36;
85
83
  const ROTATION = 20;
86
84
  const TOUCH_END = "end";
87
- const DEFAULT_LINE_SPACING = 36;
88
- const LINE_SPACING_STR = (_b = ((pickerStyle == null ? void 0 : pickerStyle["--option-height"]) ? `${pickerStyle == null ? void 0 : pickerStyle["--option-height"]}` : `${DEFAULT_LINE_SPACING}`).match(/\d+/)) == null ? void 0 : _b[0];
89
- const LINE_SPACING = parseInt(LINE_SPACING_STR, 10);
90
- const INDICATOR_OFFSET = LINE_SPACING * 108 / DEFAULT_LINE_SPACING;
91
85
  const [startY, setStartY] = (0, import_react.useState)(0);
92
86
  const [currIndex, setCurrIndex] = (0, import_react.useState)(1);
93
87
  const [startTime, setStartTime] = (0, import_react.useState)(0);
@@ -203,17 +197,17 @@ const PickerPanel = /* @__PURE__ */ import_react.default.forwardRef(
203
197
  }, 0);
204
198
  };
205
199
  (0, import_react.useEffect)(() => {
206
- var _a2, _b2, _c;
200
+ var _a2, _b, _c;
207
201
  (_a2 = PickerPanelRef.current) == null ? void 0 : _a2.addEventListener("touchstart", panelTouchStart);
208
- (_b2 = PickerPanelRef.current) == null ? void 0 : _b2.addEventListener("touchmove", panelTouchMove);
202
+ (_b = PickerPanelRef.current) == null ? void 0 : _b.addEventListener("touchmove", panelTouchMove);
209
203
  (_c = PickerPanelRef.current) == null ? void 0 : _c.addEventListener("touchend", panelTouchEnd);
210
204
  return () => {
211
- var _a3, _b3, _c2;
205
+ var _a3, _b2, _c2;
212
206
  (_a3 = PickerPanelRef.current) == null ? void 0 : _a3.removeEventListener(
213
207
  "touchstart",
214
208
  panelTouchStart
215
209
  );
216
- (_b3 = PickerPanelRef.current) == null ? void 0 : _b3.removeEventListener(
210
+ (_b2 = PickerPanelRef.current) == null ? void 0 : _b2.removeEventListener(
217
211
  "touchmove",
218
212
  panelTouchMove
219
213
  );
@@ -259,7 +253,7 @@ const PickerPanel = /* @__PURE__ */ import_react.default.forwardRef(
259
253
  }),
260
254
  key: `${item == null ? void 0 : item.value}-${i}`,
261
255
  style: {
262
- transform: `rotate3d(1, 0, 0, ${-ROTATION * (i + 1)}deg) translate3d(0px, 0px, ${INDICATOR_OFFSET}px)`
256
+ transform: `rotate3d(1, 0, 0, ${-ROTATION * (i + 1)}deg) translate3d(0px, 0px, 104px)`
263
257
  }
264
258
  },
265
259
  item == null ? void 0 : item.label
@@ -11,19 +11,3 @@ export declare const formatCascade: (columns: ICascadePickerOptionItem[], values
11
11
  * 统一options数据格式
12
12
  */
13
13
  export declare const formatOptions: (internalValue: any, options?: any[]) => any[];
14
- /**
15
- * 在格式化后的数据源中是否存在等长子项的value
16
- */
17
- export declare const existSameLengthValue: (value: any, formatted: any) => any;
18
- /**
19
- * 关闭选择器时,纠正value和格式化数据
20
- * 取决于formatted后的options有几列,若value为格式化后数据源(formatted)的等长子集,则取value,否则执行纠正逻辑
21
- */
22
- export declare const safeData: ({ value, formatted, options }: {
23
- value: any;
24
- formatted: any;
25
- options: any;
26
- }) => {
27
- safeValue: any[];
28
- safeFormatted: any[];
29
- };
@@ -17,11 +17,9 @@ var __copyProps = (to, from, except, desc) => {
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
  var utils_exports = {};
19
19
  __export(utils_exports, {
20
- existSameLengthValue: () => existSameLengthValue,
21
20
  formatCascade: () => formatCascade,
22
21
  formatOptions: () => formatOptions,
23
- pickerPanelType: () => pickerPanelType,
24
- safeData: () => safeData
22
+ pickerPanelType: () => pickerPanelType
25
23
  });
26
24
  module.exports = __toCommonJS(utils_exports);
27
25
  const pickerPanelType = (options = []) => {
@@ -65,37 +63,9 @@ const formatOptions = (internalValue, options = []) => {
65
63
  return options;
66
64
  }
67
65
  };
68
- const existSameLengthValue = (value, formatted) => {
69
- const result = formatted.every(
70
- (item, idx) => item.some((i) => (value == null ? void 0 : value[idx]) === (i == null ? void 0 : i.value))
71
- );
72
- return result;
73
- };
74
- const safeData = ({ value, formatted, options }) => {
75
- let safeValue = [];
76
- let safeFormatted = [];
77
- const existValidChildren = existSameLengthValue(value, formatted);
78
- if (existValidChildren) {
79
- safeValue = value;
80
- safeFormatted = formatted;
81
- } else {
82
- formatted.forEach((item, index) => {
83
- var _a, _b;
84
- const childIndex = item.findIndex((i) => i.value === value[index]);
85
- safeValue[index] = ((_a = item == null ? void 0 : item[childIndex]) == null ? void 0 : _a.value) || ((_b = item == null ? void 0 : item[0]) == null ? void 0 : _b.value);
86
- });
87
- safeFormatted = formatOptions(safeValue, options);
88
- }
89
- return {
90
- safeValue,
91
- safeFormatted
92
- };
93
- };
94
66
  // Annotate the CommonJS export names for ESM import in node:
95
67
  0 && (module.exports = {
96
- existSameLengthValue,
97
68
  formatCascade,
98
69
  formatOptions,
99
- pickerPanelType,
100
- safeData
70
+ pickerPanelType
101
71
  });
@@ -18,9 +18,5 @@ export interface PortalCoreProps {
18
18
  * 页面跟节点
19
19
  */
20
20
  rootElement?: Element;
21
- /**
22
- * 挂载成功的回调方法
23
- */
24
- onRootElementMouted?: (e: Element) => void;
25
21
  }
26
22
  export type PortalProps = Omit<PortalCoreProps, 'rootElement'>;
@@ -38,13 +38,7 @@ function getContainer(container) {
38
38
  }
39
39
  const PortalCore = /* @__PURE__ */ import_react.default.forwardRef(
40
40
  function Portal(props, ref) {
41
- const {
42
- children,
43
- container,
44
- disablePortal = false,
45
- rootElement,
46
- onRootElementMouted
47
- } = props;
41
+ const { children, container, disablePortal = false, rootElement } = props;
48
42
  const [mountNode, setMountNode] = import_react.default.useState(null);
49
43
  const handleRef = (0, import_utils.useForkRef)(
50
44
  // @ts-expect-error will upstream fix
@@ -59,7 +53,6 @@ const PortalCore = /* @__PURE__ */ import_react.default.forwardRef(
59
53
  (0, import_react.useLayoutEffect)(() => {
60
54
  if (mountNode && !disablePortal) {
61
55
  (0, import_utils.setRef)(ref, mountNode);
62
- onRootElementMouted == null ? void 0 : onRootElementMouted(mountNode);
63
56
  return () => {
64
57
  (0, import_utils.setRef)(ref, null);
65
58
  };
@@ -1,24 +1,22 @@
1
1
  .bui-progress {
2
2
  --fill-color: var(--bui-color-primary);
3
- --trail-color: var(--bui-progress-trail-color, rgba(156, 156, 165, 0.2));
4
- --stroke-width: var(--bui-progress-stroke-width, 8px);
5
- --width: var(--bui-progress-width, 100%);
6
- --border-radius: var(--bui-progress-border-radius, 100px);
7
- width: var(--width);
3
+ --trail-color: rgba(156, 156, 165, 0.2);
4
+ --stroke-width: 8px;
5
+ width: 100%;
8
6
  font-family: var(--bui-font-family);
9
7
  }
10
8
  .bui-progress-inner {
11
9
  position: relative;
12
10
  display: inline-block;
13
- width: var(--width);
11
+ width: 100%;
14
12
  overflow: hidden;
15
13
  vertical-align: middle;
16
14
  background-color: var(--trail-color);
17
- border-radius: var(--border-radius);
15
+ border-radius: 100px;
18
16
  }
19
17
  .bui-progress-bg {
20
18
  position: relative;
21
- border-radius: var(--border-radius);
19
+ border-radius: 100px;
22
20
  background-color: var(--fill-color);
23
21
  height: var(--stroke-width);
24
22
  }
@@ -2,7 +2,6 @@
2
2
  --label-color: var(--bui-color-fg-default);
3
3
  --label-font-size: var(--bui-text-size-1);
4
4
  --icon-font-size: var(--bui-title-size-2);
5
- --icon-padding: var(--bui-radio-icon-padding, 5px);
6
5
  display: inline-flex;
7
6
  align-items: center;
8
7
  position: relative;
@@ -36,7 +35,7 @@
36
35
  align-items: center;
37
36
  justify-content: center;
38
37
  flex-shrink: 0;
39
- padding: var(--icon-padding);
38
+ padding: 5px;
40
39
  box-sizing: border-box;
41
40
  }
42
41
  .bui-radio-label {
@@ -1,8 +1,4 @@
1
1
  .bui-rating {
2
- --small-margin-right: var(--bui-rating-small-margin-right, 0.5px);
3
- --medium-margin-right: var(--bui-rating-medium-margin-right, 1px);
4
- --large-margin-right: var(--bui-rating-large-margin-right, 2px);
5
- --large-font-size: var(--bui-rating-large-font-size, 22px);
6
2
  display: flex;
7
3
  flex-wrap: wrap;
8
4
  font-family: var(--bui-font-family);
@@ -23,15 +19,15 @@
23
19
  }
24
20
  .bui-rating-container-small {
25
21
  font-size: var(--bui-text-size-1);
26
- margin-right: var(--small-margin-right);
22
+ margin-right: 0.5px;
27
23
  }
28
24
  .bui-rating-container-medium {
29
25
  font-size: var(--bui-title-size-3);
30
- margin-right: var(--small-medium-right);
26
+ margin-right: 1px;
31
27
  }
32
28
  .bui-rating-container-large {
33
- font-size: var(--large-font-size);
34
- margin-right: var(--large-margin-right);
29
+ font-size: 22px;
30
+ margin-right: 2px;
35
31
  }
36
32
  .bui-rating-item {
37
33
  display: flex;