@bifrostui/react 1.3.1-beta.1 → 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 -59
  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 -91
  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 -175
  195. package/dist/Tooltip/Tooltip.types.d.ts +0 -50
  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 -163
  239. package/es/Popover/Popover.types.d.ts +0 -59
  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 -62
  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 -152
  266. package/es/Tooltip/Tooltip.types.d.ts +0 -50
  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
@@ -33,31 +33,25 @@ import "./PickerPanel.css";
33
33
  const prefixCls = "bui-picker-panel";
34
34
  const PickerPanel = /* @__PURE__ */ React.forwardRef(
35
35
  (props, ref) => {
36
- var _b;
37
36
  const _a = props, {
38
37
  options = [],
39
38
  defaultValue,
40
39
  onSelect,
41
- columnIndex,
42
- pickerStyle
40
+ columnIndex
43
41
  } = _a, others = __objRest(_a, [
44
42
  "options",
45
43
  "defaultValue",
46
44
  "onSelect",
47
- "columnIndex",
48
- "pickerStyle"
45
+ "columnIndex"
49
46
  ]);
50
47
  const touch = useTouch();
51
48
  let timer;
52
49
  const INERTIA_TIME = 200;
53
50
  const INERTIA_DISTANCE = 15;
54
51
  const DEFAULT_DURATION = 200;
52
+ const LINE_SPACING = 36;
55
53
  const ROTATION = 20;
56
54
  const TOUCH_END = "end";
57
- const DEFAULT_LINE_SPACING = 36;
58
- 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];
59
- const LINE_SPACING = parseInt(LINE_SPACING_STR, 10);
60
- const INDICATOR_OFFSET = LINE_SPACING * 108 / DEFAULT_LINE_SPACING;
61
55
  const [startY, setStartY] = useState(0);
62
56
  const [currIndex, setCurrIndex] = useState(1);
63
57
  const [startTime, setStartTime] = useState(0);
@@ -173,17 +167,17 @@ const PickerPanel = /* @__PURE__ */ React.forwardRef(
173
167
  }, 0);
174
168
  };
175
169
  useEffect(() => {
176
- var _a2, _b2, _c;
170
+ var _a2, _b, _c;
177
171
  (_a2 = PickerPanelRef.current) == null ? void 0 : _a2.addEventListener("touchstart", panelTouchStart);
178
- (_b2 = PickerPanelRef.current) == null ? void 0 : _b2.addEventListener("touchmove", panelTouchMove);
172
+ (_b = PickerPanelRef.current) == null ? void 0 : _b.addEventListener("touchmove", panelTouchMove);
179
173
  (_c = PickerPanelRef.current) == null ? void 0 : _c.addEventListener("touchend", panelTouchEnd);
180
174
  return () => {
181
- var _a3, _b3, _c2;
175
+ var _a3, _b2, _c2;
182
176
  (_a3 = PickerPanelRef.current) == null ? void 0 : _a3.removeEventListener(
183
177
  "touchstart",
184
178
  panelTouchStart
185
179
  );
186
- (_b3 = PickerPanelRef.current) == null ? void 0 : _b3.removeEventListener(
180
+ (_b2 = PickerPanelRef.current) == null ? void 0 : _b2.removeEventListener(
187
181
  "touchmove",
188
182
  panelTouchMove
189
183
  );
@@ -229,7 +223,7 @@ const PickerPanel = /* @__PURE__ */ React.forwardRef(
229
223
  }),
230
224
  key: `${item == null ? void 0 : item.value}-${i}`,
231
225
  style: {
232
- transform: `rotate3d(1, 0, 0, ${-ROTATION * (i + 1)}deg) translate3d(0px, 0px, ${INDICATOR_OFFSET}px)`
226
+ transform: `rotate3d(1, 0, 0, ${-ROTATION * (i + 1)}deg) translate3d(0px, 0px, 104px)`
233
227
  }
234
228
  },
235
229
  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
- };
@@ -39,36 +39,8 @@ const formatOptions = (internalValue, options = []) => {
39
39
  return options;
40
40
  }
41
41
  };
42
- const existSameLengthValue = (value, formatted) => {
43
- const result = formatted.every(
44
- (item, idx) => item.some((i) => (value == null ? void 0 : value[idx]) === (i == null ? void 0 : i.value))
45
- );
46
- return result;
47
- };
48
- const safeData = ({ value, formatted, options }) => {
49
- let safeValue = [];
50
- let safeFormatted = [];
51
- const existValidChildren = existSameLengthValue(value, formatted);
52
- if (existValidChildren) {
53
- safeValue = value;
54
- safeFormatted = formatted;
55
- } else {
56
- formatted.forEach((item, index) => {
57
- var _a, _b;
58
- const childIndex = item.findIndex((i) => i.value === value[index]);
59
- 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);
60
- });
61
- safeFormatted = formatOptions(safeValue, options);
62
- }
63
- return {
64
- safeValue,
65
- safeFormatted
66
- };
67
- };
68
42
  export {
69
- existSameLengthValue,
70
43
  formatCascade,
71
44
  formatOptions,
72
- pickerPanelType,
73
- safeData
45
+ pickerPanelType
74
46
  };
@@ -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'>;
@@ -6,13 +6,7 @@ function getContainer(container) {
6
6
  }
7
7
  const PortalCore = /* @__PURE__ */ React.forwardRef(
8
8
  function Portal(props, ref) {
9
- const {
10
- children,
11
- container,
12
- disablePortal = false,
13
- rootElement,
14
- onRootElementMouted
15
- } = props;
9
+ const { children, container, disablePortal = false, rootElement } = props;
16
10
  const [mountNode, setMountNode] = React.useState(null);
17
11
  const handleRef = useForkRef(
18
12
  // @ts-expect-error will upstream fix
@@ -27,7 +21,6 @@ const PortalCore = /* @__PURE__ */ React.forwardRef(
27
21
  useLayoutEffect(() => {
28
22
  if (mountNode && !disablePortal) {
29
23
  setRef(ref, mountNode);
30
- onRootElementMouted == null ? void 0 : onRootElementMouted(mountNode);
31
24
  return () => {
32
25
  setRef(ref, null);
33
26
  };
@@ -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;
@@ -1,19 +1,9 @@
1
1
  .bui-select {
2
- --height: var(--bui-select-height, 27px);
3
- --mini-width: var(--bui-select-min-width, 100px);
4
- --font-size: var(--bui-select-font-size, var(--bui-title-size-3));
5
- --padding: var(--bui-select-selector-container, 0 14px);
6
- --option-container-padding: var(--bui-select-option-container-padding, 3px 0);
7
- --option-margin-top: var(--bui-select-option-margin-top, 6px);
8
- --option-padding: var(--bui-select-option-padding, 0 14px);
9
- --option-margin: var(--bui-select-option-margin, 0 3px);
10
- --option-height: var(--bui-select-option-height, 27px);
11
- --option-active-font-weight: var(--bui-select-option-active-font-weight, 500);
12
2
  position: relative;
13
3
  cursor: pointer;
14
- height: var(--height);
15
- min-width: var(--mini-width);
16
- font-size: var(--font-size);
4
+ height: 27px;
5
+ min-width: 100px;
6
+ font-size: var(--bui-title-size-3);
17
7
  border-radius: 5px;
18
8
  background-color: var(--bui-color-bg-view);
19
9
  font-family: var(--bui-font-family);
@@ -25,7 +15,7 @@
25
15
  .bui-select-selector-container {
26
16
  display: flex;
27
17
  align-items: center;
28
- padding: var(--padding);
18
+ padding: 0 14px;
29
19
  height: 100%;
30
20
  }
31
21
  .bui-select-input {
@@ -42,7 +32,7 @@
42
32
  justify-content: space-between;
43
33
  align-items: center;
44
34
  flex: 1;
45
- height: var(--bui-select-height);
35
+ height: 27px;
46
36
  background-color: transparent;
47
37
  outline: none;
48
38
  border: 0;
@@ -57,25 +47,24 @@
57
47
  left: 0;
58
48
  width: 100%;
59
49
  z-index: var(--bui-z-index-dropdown);
60
- margin-top: var(--option-container-margin-top);
61
- border-radius: 3px;
50
+ margin-top: 6px;
62
51
  background-color: var(--bui-color-bg-view);
63
52
  padding: 2px;
64
53
  overflow: hidden;
65
54
  }
66
55
  .bui-select-option-main {
67
56
  border-radius: 3px;
68
- padding: var(--option-container-padding);
57
+ padding: 3px 0;
69
58
  box-shadow: 0 0 0 2px var(--bui-color-bg-default);
70
59
  overflow: hidden;
71
60
  }
72
61
  .bui-select-option {
73
62
  display: flex;
74
63
  align-items: center;
75
- height: var(--option-height);
76
- padding: var(--option-padding);
64
+ height: 27px;
65
+ padding: 0 14px;
77
66
  border-radius: 5px;
78
- margin: var(--option-margin);
67
+ margin: 0 3px;
79
68
  }
80
69
  .bui-select-option:hover {
81
70
  background-color: var(---bui-select-options-active-bg, #fff2f0);
@@ -112,7 +112,7 @@ const Select = /* @__PURE__ */ React.forwardRef((props, ref) => {
112
112
  };
113
113
  const selectContext = useMemo(
114
114
  () => ({ selectValue, setRenderValue, handleOptionClick }),
115
- [selectValue, onChange, setRenderValue]
115
+ [selectValue]
116
116
  );
117
117
  useEffect(() => {
118
118
  if (open !== void 0)
@@ -42,9 +42,6 @@ const SelectOption = /* @__PURE__ */ React.forwardRef(
42
42
  if (value === selectValue) {
43
43
  setRenderValue(label);
44
44
  }
45
- return () => {
46
- setRenderValue("");
47
- };
48
45
  }, [selectValue, label, value]);
49
46
  return /* @__PURE__ */ React.createElement(
50
47
  "div",
@@ -1,6 +1,5 @@
1
1
  .bui-skeleton {
2
2
  --border-radius: var(--bui-shape-radius-label);
3
- --height: var(--bui-skeleton-height, 1.2em);
4
3
  display: block;
5
4
  }
6
5
  .bui-skeleton-animation-wave {
@@ -27,10 +26,10 @@
27
26
  content: "\a0";
28
27
  }
29
28
  .bui-skeleton-rectangular {
30
- height: var(--height);
29
+ height: 1.2em;
31
30
  }
32
31
  .bui-skeleton-rounded {
33
- height: var(--height);
32
+ height: 1.2em;
34
33
  border-radius: var(--border-radius);
35
34
  }
36
35
  .bui-skeleton-circular {
@@ -4,21 +4,10 @@
4
4
  --tooltip-font-size: var(--bui-text-size-3);
5
5
  --tooltip-color: var(--bui-color-white);
6
6
  --tooltip-bg-color: var(--line-color);
7
- --width: var(--bui-slider-width, 100%);
8
- --height: var(--bui-slider-height, 2px);
9
- --padding: var(--bui-slider-padding, 19px 0);
10
- --button-width: var(--bui-slider-button-width, 26px);
11
- --button-height: var(--bui-slider-button-height, 26px);
12
- --button-font-size: var(--bui-slider-button-font-size, var(--bui-title-size-3));
13
- --button-border-radius: var(--bui--slider-button-border-radius, 50%);
14
- --tooltip-width: var(--bui-slider-tooltip-width, 46px);
15
- --tooltip-height: var(--bui-slider-tooltip-height, 24px);
16
- --tooltip-line-height: var(--bui-slider-tooltip-line-height, 24px);
17
- --tooltip-border-radius: var(--bui-slider-tooltip-border-radius, 24px);
18
7
  position: relative;
19
- width: var(--width);
20
- height: var(--height);
21
- padding: var(--padding);
8
+ width: 100%;
9
+ height: 2px;
10
+ padding: 19px 0;
22
11
  box-sizing: border-box;
23
12
  font-family: var(--bui-font-family);
24
13
  }
@@ -30,7 +19,7 @@
30
19
  position: absolute;
31
20
  top: 50%;
32
21
  left: 0;
33
- height: var(--height);
22
+ height: 2px;
34
23
  transform: translateY(-50%);
35
24
  background-color: var(--line-color);
36
25
  }
@@ -39,7 +28,7 @@
39
28
  top: 50%;
40
29
  left: 0;
41
30
  width: 100%;
42
- height: var(---height);
31
+ height: 2px;
43
32
  transform: translateY(-50%);
44
33
  background-color: var(--line-bg-color);
45
34
  }
@@ -48,11 +37,11 @@
48
37
  position: absolute;
49
38
  justify-content: center;
50
39
  align-items: center;
51
- width: var(--button-width);
52
- height: var(--button-height);
53
- background-color: var(--bui-color-white);
40
+ width: 26px;
41
+ height: 26px;
42
+ background-color: #fff;
54
43
  box-shadow: #ddd 0 0 10px;
55
- border-radius: var(--button-border-radius);
44
+ border-radius: 50%;
56
45
  transform: translate(-50%, -50%);
57
46
  font-size: var(--bui-title-size-3);
58
47
  cursor: grab;
@@ -78,11 +67,11 @@
78
67
  .bui-slider-tooltip {
79
68
  position: absolute;
80
69
  top: -14px;
81
- width: var(--tooltip-width);
82
- height: var(--tooltip-height);
83
- line-height: var(--tooltip-line-height);
70
+ width: 46px;
71
+ height: 24px;
72
+ line-height: 24px;
84
73
  font-size: var(--tooltip-font-size);
85
- border-radius: var(--tooltip-border-radius);
74
+ border-radius: 24px;
86
75
  color: var(--tooltip-color);
87
76
  text-align: center;
88
77
  background-color: var(--tooltip-bg-color);
package/es/Steps/Step.css CHANGED
@@ -5,7 +5,7 @@
5
5
  font-family: var(--bui-font-family);
6
6
  }
7
7
  .bui-step-label-horizontal {
8
- line-height: var(--step-label-horizontal-line-height);
8
+ line-height: 1.8;
9
9
  }
10
10
  .bui-step:last-child .bui-step-line::after {
11
11
  display: none;
@@ -13,8 +13,8 @@
13
13
  .bui-step-line {
14
14
  position: absolute;
15
15
  top: 0;
16
- width: var(--step-line-width);
17
- height: var(--step-line-height);
16
+ width: 1px;
17
+ height: 100%;
18
18
  box-sizing: border-box;
19
19
  left: 13px;
20
20
  padding: var(--step-line-padding);
@@ -22,8 +22,8 @@
22
22
  .bui-step-line::after {
23
23
  display: inline-block;
24
24
  content: "";
25
- width: var(--step-line-width);
26
- border-left-width: var(--step-line-width);
25
+ width: 1px;
26
+ border-left-width: 1px;
27
27
  border-left-style: dotted;
28
28
  height: calc(100% + 11px);
29
29
  }
@@ -41,14 +41,14 @@
41
41
  }
42
42
  .bui-step-icon {
43
43
  flex-shrink: 0;
44
- width: var(--step-icon-width);
44
+ width: 28px;
45
45
  text-align: center;
46
46
  margin: var(--step-icon-margin);
47
- font-size: var(--step-icon-font-size);
47
+ font-size: var(--bui-title-size-4);
48
48
  }
49
49
  .bui-step-icon-active {
50
- width: var(--step-icon-active-width);
51
- height: var(--step-icon-active-height);
50
+ width: 12px;
51
+ height: 12px;
52
52
  position: relative;
53
53
  background-color: var(--bui-color-primary);
54
54
  border-radius: 50%;
@@ -56,7 +56,7 @@
56
56
  display: inline-block;
57
57
  }
58
58
  .bui-step-content {
59
- padding: var(--step-content-padding);
59
+ padding: 3px 0;
60
60
  box-sizing: border-box;
61
61
  flex: 1 0 0;
62
62
  overflow: hidden;
@@ -128,7 +128,7 @@
128
128
  }
129
129
  .bui-step-horizontal .bui-step-line {
130
130
  display: none;
131
- padding: var(--step-horizontal-line-padding);
131
+ padding: 28px 0 6px;
132
132
  }
133
133
  .bui-step-horizontal .bui-step-icon {
134
134
  margin-right: 0;
@@ -1,21 +1,12 @@
1
1
  .bui-steps {
2
- --font-size: var(--bui-steps-font-size, var(--bui-title-size-3));
3
2
  --title-font-size: var(--bui-title-size-4);
4
3
  --title-font-weight: var(--bui-font-weight-medium);
5
- --subtitle-font-size: var(--bui-step-subtitle-font-size, var(--bui-text-size-2));
6
- --step-line-padding: var(--bui-step-line-padding, 20px 0 3px 0);
7
- --step-line-width: var(--bui-step-line-width, 1px);
8
- --step-line-height: var(--bui-step-line-height, 100%);
9
- --step-label-horizontal-line-height: var(--bui-step-label-horizontal-line-height, 1.8);
10
- --step-icon-width: var(--bui-step-icon-width, 28px);
11
- --step-icon-active-width: var(--bui-step-icon-active-width, 12px);
12
- --step-icon-active-height: var(--bui-step-icon-active-height, 12px);
13
- --step-icon-font-size: var(--bui-step-icon-font-size, var(--bui-title-size-4));
14
- --step-icon-margin: var(--bui-step-icon-margin, var(--bui-spacing-xs) var(--bui-spacing-xs) 0 0);
15
- --step-content-padding: var(--bui-step-content-padding, 3px 0);
16
- --step-horizontal-line-padding: var(--bui-step-horizontal-line-padding, 28px 0 6px);
4
+ --subtitle-font-size: var(--bui-text-size-2);
5
+ --description-font-size: var(--bui-text-size-3);
6
+ --step-icon-margin: var(--bui-spacing-xs) var(--bui-spacing-xs) 0 0;
7
+ --step-line-padding: 20px 0 3px 0;
17
8
  display: flex;
18
- font-size: var(--font-size);
9
+ font-size: var(--bui-title-size-3);
19
10
  font-family: var(--bui-font-family);
20
11
  }
21
12
  .bui-steps-vertical {
@@ -1,9 +1,8 @@
1
1
  .bui-swiper {
2
- --height: var(--bui-swiper-height, 150px);
3
2
  font-family: var(--bui-font-family);
4
3
  }
5
4
  .bui-swiper .swiper-container-wrapper {
6
- height: var(--height);
5
+ height: 150px;
7
6
  }
8
7
  .bui-swiper .swiper-container {
9
8
  height: 100%;
@@ -1,26 +1,11 @@
1
1
  .bui-switch {
2
- --bg-color: var(--bui-switch-bg-color, #ccc);
3
- --padding: var(--bui-switch-padding, 0);
4
- --border-radius: var(--bui-switch-border-radius, 15px);
5
- --small-width: var(--bui-switch-small-width, 24px);
6
- --small-height: var(--bui-switch-small-height, 16px);
7
- --small-font-size: var(--bui-switch-small-font-size, 9px);
8
- --controller-small-width: var(--bui-switch-controller-small-width, 12px);
9
- --controller-small-height: var(--bui-switch-controller-small-height, 12px);
10
- --medium-width: var(--bui-switch-medium-width, 44px);
11
- --medium-height: var(--bui-switch-medium-height, 22px);
12
- --controller-medium-width: var(--bui-switch-controller-medium-width, 18px);
13
- --controller-medium-height: var(--bui-switch-controller-medium-height, 18px);
14
- --large-width: var(--bui-switch-large-width, 51px);
15
- --large-height: var(--bui-switch-large-height, 30px);
16
- --controller-large-width: var(--bui-switch-controller-large-width, 24px);
17
- --controller-large-height: var(--bui-switch-controller-large-height, 24px);
2
+ --bg-color: #ccc;
18
3
  position: relative;
19
4
  display: inline-block;
20
5
  box-sizing: border-box;
21
- padding: var(--padding);
6
+ padding: 0;
22
7
  vertical-align: middle;
23
- border-radius: var(--border-radius);
8
+ border-radius: 15px;
24
9
  background-color: var(--bg-color);
25
10
  transition: all 0.3s cubic-bezier(0.35, 0, 0.25, 1);
26
11
  font-family: var(--bui-font-family);
@@ -42,16 +27,16 @@
42
27
  outline: none;
43
28
  }
44
29
  .bui-switch-small {
45
- width: var(--small-width);
46
- height: var(--small-height);
30
+ width: 24px;
31
+ height: 16px;
47
32
  }
48
33
  .bui-switch-small .bui-switch-inner {
49
34
  left: calc(100% - 10px);
50
- font-size: var(--font-size-smal);
35
+ font-size: 9px;
51
36
  }
52
37
  .bui-switch-small::after {
53
- width: var(--controller-small-width);
54
- height: var(--controller-small-height);
38
+ width: 12px;
39
+ height: 12px;
55
40
  left: 2px;
56
41
  top: 2px;
57
42
  }
@@ -62,12 +47,12 @@
62
47
  left: 2px;
63
48
  }
64
49
  .bui-switch-medium {
65
- width: var(--medium-width);
66
- height: var(--medium-height);
50
+ width: 44px;
51
+ height: 22px;
67
52
  }
68
53
  .bui-switch-medium::after {
69
- width: var(--controller-medium-width);
70
- height: var(--controller-medium-height);
54
+ width: 18px;
55
+ height: 18px;
71
56
  }
72
57
  .bui-switch-medium.bui-switch-checked::after {
73
58
  left: calc(100% - 20px);
@@ -76,15 +61,15 @@
76
61
  left: var(--bui-spacing-sm);
77
62
  }
78
63
  .bui-switch-large {
79
- width: var(--large-width);
80
- height: var(--large-height);
64
+ width: 51px;
65
+ height: 30px;
81
66
  }
82
67
  .bui-switch-large .bui-switch-inner {
83
68
  left: calc(100% - 22px);
84
69
  }
85
70
  .bui-switch-large::after {
86
- width: var(--controller-large-width);
87
- height: var(--controller-large-height);
71
+ width: 24px;
72
+ height: 24px;
88
73
  left: 3px;
89
74
  top: 3px;
90
75
  }
@@ -1,12 +1,8 @@
1
1
  .bui-tab-bar {
2
- --width: var(--bui-tab-bar-width, 100%);
3
- --height: var(--bui-tab-bar-height, 50px);
4
- --padding: var(--bui-tab-bar-padding, 6px 0);
5
- --bui-tab-bar-color: var(--bui-tab-bar-default-color, var(--bui-color-fg-default));
6
2
  display: flex;
7
- width: var(--width);
8
- height: var(--height);
9
- padding: var(--padding);
3
+ width: 100%;
4
+ height: 50px;
5
+ padding: 6px 0;
10
6
  background: var(--bui-color-white);
11
7
  font-family: var(--bui-font-family);
12
8
  }
@@ -1,4 +1,5 @@
1
1
  .bui-tab-bar-item {
2
+ --bui-tab-bar-color: var(--bui-tab-bar-default-color, var(--bui-color-fg-default));
2
3
  display: flex;
3
4
  align-items: center;
4
5
  justify-content: center;
package/es/Tabs/Tab.css CHANGED
@@ -4,16 +4,20 @@
4
4
  justify-content: center;
5
5
  white-space: nowrap;
6
6
  width: min-content;
7
- height: var(--tab-height);
7
+ height: 100%;
8
8
  box-sizing: border-box;
9
9
  position: relative;
10
10
  cursor: pointer;
11
11
  font-size: var(--font-size);
12
12
  line-height: var(--bui-line-height);
13
13
  color: var(--color);
14
- padding: var(--tab-padding);
14
+ padding: var(--bui-spacing-lg) var(--bui-spacing-lg) 10px;
15
15
  font-family: var(--bui-font-family);
16
16
  }
17
+ .bui-tab-center {
18
+ flex: 1 0 auto;
19
+ margin: 0 auto;
20
+ }
17
21
  .bui-tab-active {
18
22
  font-size: var(--font-size);
19
23
  line-height: var(--bui-line-height);