@bifrostui/react 1.3.1-beta.1 → 1.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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
@@ -16,12 +16,6 @@ export interface ICalendarYearChangeData {
16
16
  /** 切换后的年份 */
17
17
  year: number;
18
18
  }
19
- export interface ICustomIconProps {
20
- /** 是否为可选范围内的最小月份 */
21
- isMinMonth?: boolean;
22
- /** 是否为可选范围内的最大月份 */
23
- isMaxMonth?: boolean;
24
- }
25
19
  export type ICalendarMode = 'single' | 'range';
26
20
  export type ICalendarValue = Date | Date[] | null;
27
21
  export type CalendarProps<D extends React.ElementType = 'div', P = {}> = OverrideProps<{
@@ -53,21 +47,6 @@ export type CalendarProps<D extends React.ElementType = 'div', P = {}> = Overrid
53
47
  * 是否隐藏当前月之外的日期,默认为false
54
48
  */
55
49
  hideDaysOutsideCurrentMonth?: boolean;
56
- /**
57
- * 头部操作栏日期显示格式
58
- * @default YYYY/MM
59
- */
60
- headerBarFormat?: string;
61
- /**
62
- * 头部操作栏左边图标
63
- * @defaultReturn <CaretLeftIcon />
64
- */
65
- headerBarLeftIcon?: (options: ICustomIconProps) => React.ReactNode;
66
- /**
67
- * 头部操作栏右边图标
68
- * @defaultReturn <CaretRightIcon />
69
- */
70
- headerBarRightIcon?: (options: ICustomIconProps) => React.ReactNode;
71
50
  /**
72
51
  * 不可选择的日期
73
52
  */
@@ -1,9 +1,8 @@
1
1
  .bui-card-footer {
2
- --padding: var(--bui-card-footer-padding, var(--bui-spacing-md) var(--bui-spacing-lg));
3
2
  color: var(--bui-color-fg-muted);
4
3
  font-size: var(--bui-text-size-1);
5
4
  display: flex;
6
5
  align-items: center;
7
- padding: var(--padding);
6
+ padding: var(--bui-spacing-md) var(--bui-spacing-lg);
8
7
  font-family: var(--bui-font-family);
9
8
  }
@@ -1,13 +1,11 @@
1
1
  .bui-card-header {
2
- --padding: var(--bui-card-header-padding, var(--bui-spacing-md) var(--bui-spacing-lg));
3
- --end-icon-margin-left: var(--bui-card-header-end-icon-margin-left, 2px);
4
2
  display: flex;
5
3
  align-items: center;
6
4
  flex-direction: row;
7
5
  position: relative;
8
6
  padding: var(--bui-spacing-md) var(--bui-spacing-lg);
9
7
  font-size: var(--bui-title-size-4);
10
- font-weight: var(--bui-font-weight-medium);
8
+ font-weight: 500;
11
9
  color: var(--bui-color-fg-default);
12
10
  font-family: var(--bui-font-family);
13
11
  }
@@ -1,9 +1,7 @@
1
1
  .bui-checkbox {
2
- --label-color: var(--bui-checkbox-label-color, --bui-color-fg-default);
3
- --label-font-size: var(--bui-checkbox-label-font-size, var(--bui-text-size-1));
4
- --icon-font-size: var(--bui-checkbox-icon-font-size, var(--bui-title-size-2));
5
- --disabled-opacity: var(--bui-checkbox-disabled-opacity, 0.5);
6
- --icon-padding: var(--bui-checkbox-icon-padding, 5px);
2
+ --label-color: var(--bui-color-fg-default);
3
+ --label-font-size: var(--bui-text-size-1);
4
+ --icon-font-size: var(--bui-title-size-2);
7
5
  display: inline-flex;
8
6
  align-items: center;
9
7
  position: relative;
@@ -11,7 +9,7 @@
11
9
  }
12
10
  .bui-checkbox.bui-checkbox-disabled {
13
11
  pointer-events: none;
14
- opacity: var(--disabled-opacity);
12
+ opacity: 0.5;
15
13
  }
16
14
  .bui-checkbox-label-left {
17
15
  flex-direction: row-reverse;
@@ -37,7 +35,7 @@
37
35
  align-items: center;
38
36
  justify-content: center;
39
37
  flex-shrink: 0;
40
- padding: var(--icon-padding);
38
+ padding: 5px;
41
39
  box-sizing: border-box;
42
40
  font-size: var(--icon-font-size);
43
41
  }
@@ -1,29 +1,14 @@
1
1
  .bui-city-selector {
2
- --select-item-width: var(--bui-city-selector-item-width, 111px);
3
- --select-item-height: var(--bui-city-selector-item-height, 36px);
4
- --select-item-border-radius: var(--bui-city-selector-item-border-radius, 20px);
5
- --select-item-margin: var(--bui-city-selector-item-margin, 4.5px 0 4.5px 9px);
6
- --title-height: var(--bui-city-selector-title-height, 45px);
7
- --title-line-height: var(--bui-city-selector-title-line-height, 45px);
8
- --btn-close-size: var(--bui-city-selector-btn-close-size, 45px);
9
- --btn-close-font-size: var(--bui-city-selector-btn-close-font-size, 20px);
10
- --container-with-title-height: var(--bui-city-selector-container-with-title-height, calc(100% - var(--title-height)));
11
- --city-container-min-height: var(--bui-city-selector-city-container-min-height, 500px);
12
- --select-city-buttons-padding: var(--bui-city-selector-select-city-buttons-padding, 7.5px 0 0 3px);
13
- --select-city-title-line-height: var(--bui-city-selector-select-city-title-line-height, 15px);
14
- --list-item-height: var(--bui-city-selector-list-item-height, 45px);
15
- --city-index-has-title-top: var(--bui-city-selector-city-index-has-title-top, calc(50% + var(--title-height) / 2));
16
- --index-item-height: var(--bui-city-selector-index-item-height, 20px);
17
2
  font-family: var(--bui-font-family);
18
3
  height: 100%;
19
4
  position: relative;
20
5
  }
21
6
  .bui-city-selector-title {
22
7
  width: 100%;
23
- height: var(--title-height);
8
+ height: 45px;
24
9
  color: var(--bui-color-fg-default);
25
10
  font-size: var(--bui-title-size-3);
26
- line-height: var(--title-line-height);
11
+ line-height: 45px;
27
12
  text-align: center;
28
13
  position: sticky;
29
14
  top: 0;
@@ -35,20 +20,20 @@
35
20
  position: absolute;
36
21
  top: 0;
37
22
  right: 0;
38
- width: var(--btn-close-size);
39
- height: var(--btn-close-size);
23
+ width: 45px;
24
+ height: 45px;
40
25
  color: var(--bui-color-fg-muted);
41
26
  text-align: center;
42
- font-size: var(--btn-close-font-size);
27
+ font-size: 20px;
43
28
  }
44
29
  .bui-city-selector-scroll-view-container {
45
30
  height: 100%;
46
31
  }
47
32
  .bui-city-selector-scroll-view-container.container-has-title {
48
- height: var(--container-with-title-height);
33
+ height: calc(100% - 45px);
49
34
  }
50
35
  .bui-city-selector-all-city {
51
- min-height: var(--city-container-min-height);
36
+ min-height: 500px;
52
37
  font-size: var(--bui-text-size-2);
53
38
  width: 100%;
54
39
  background: var(--bui-color-bg-view);
@@ -57,21 +42,22 @@
57
42
  .bui-city-selector-all-city .select-city-buttons {
58
43
  display: flex;
59
44
  flex-flow: wrap;
60
- padding: var(--select-city-buttons-padding);
45
+ padding-left: 3px;
46
+ padding-top: 7.5px;
61
47
  }
62
48
  .bui-city-selector-all-city .select-city-title {
63
49
  font-size: var(--bui-title-size-4);
64
- line-height: var(--select-city-title-line-height);
65
- font-weight: var(--bui-font-weight-bold);
50
+ line-height: 15px;
51
+ font-weight: 600;
66
52
  padding-left: var(--bui-spacing-lg);
67
- padding-top: var(--bui-spacing-md);
53
+ padding-top: 9px;
68
54
  }
69
55
  .bui-city-selector-list {
70
56
  padding-left: var(--bui-spacing-lg);
71
57
  list-style-type: none;
72
58
  }
73
59
  .bui-city-selector-list-item {
74
- height: var(--list-item-height);
60
+ height: 45px;
75
61
  font-size: var(--bui-title-size-4);
76
62
  display: flex;
77
63
  align-items: center;
@@ -95,7 +81,7 @@
95
81
  transform: translate(0, -50%);
96
82
  }
97
83
  .bui-city-selector-index-container.city-index-has-title {
98
- top: var(--city-index-has-title-top);
84
+ top: calc(50% + 22.5px);
99
85
  }
100
86
  .bui-city-selector-index-container ul {
101
87
  margin: 0;
@@ -106,7 +92,7 @@
106
92
  }
107
93
  .bui-city-selector-index-container li {
108
94
  list-style: none;
109
- height: var(--index-item-height);
95
+ height: 20px;
110
96
  text-align: center;
111
97
  font-size: var(--bui-text-size-3);
112
98
  color: var(--bui-color-info, --bui-color-info);
@@ -59,31 +59,34 @@ module.exports = __toCommonJS(CitySelectorCore_exports);
59
59
  var import_react = __toESM(require("react"));
60
60
  var import_clsx = __toESM(require("clsx"));
61
61
  var import_utils = require("@bifrostui/utils");
62
- var import_locales = require("../locales");
63
62
  var import_ScrollView = __toESM(require("../ScrollView"));
64
63
  var import_Selector = __toESM(require("./Selector"));
65
64
  var import_CitySelector2 = require("./CitySelector.css");
66
65
  const DEVIATION_HEIGHT = "6vmin";
66
+ const GPS_TYPE = {
67
+ title: "\u5B9A\u4F4D",
68
+ code: "GPS"
69
+ };
70
+ const CURRENT_TYPE = {
71
+ title: "\u5F53\u524D",
72
+ code: "CRRT"
73
+ };
74
+ const HOT_CITY_TYPE = {
75
+ title: "\u70ED\u95E8",
76
+ code: "HOT"
77
+ };
67
78
  const prefixCls = "bui-city-selector";
68
79
  const CitySelector = /* @__PURE__ */ import_react.default.forwardRef(
69
80
  (props, ref) => {
70
- const {
71
- selectedCityGroupName: selectedCityGroupLocaleName,
72
- currentCityGroupName: currentCityGroupLocaleName,
73
- hotCitiesGroupName: hotCitiesGroupLocaleName,
74
- located,
75
- current,
76
- hot
77
- } = (0, import_locales.useLocaleText)("citySelector");
78
81
  const _a = props, {
79
82
  className,
80
83
  title: pageTitle,
81
84
  selectedCity,
82
- selectedCityGroupName = selectedCityGroupLocaleName,
85
+ selectedCityGroupName = "\u5F53\u524D\u57CE\u5E02",
83
86
  currentCity,
84
- currentCityGroupName = currentCityGroupLocaleName,
87
+ currentCityGroupName = "\u5B9A\u4F4D\u57CE\u5E02",
85
88
  hotCities,
86
- hotCitiesGroupName = hotCitiesGroupLocaleName,
89
+ hotCitiesGroupName = "\u70ED\u95E8\u57CE\u5E02",
87
90
  cities,
88
91
  disableIndex,
89
92
  touchHandler,
@@ -106,18 +109,6 @@ const CitySelector = /* @__PURE__ */ import_react.default.forwardRef(
106
109
  "onSelect",
107
110
  "onClose"
108
111
  ]);
109
- const GPS_TYPE = {
110
- title: located,
111
- code: "GPS"
112
- };
113
- const CURRENT_TYPE = {
114
- title: current,
115
- code: "CRRT"
116
- };
117
- const HOT_CITY_TYPE = {
118
- title: hot,
119
- code: "HOT"
120
- };
121
112
  const cityRef = (0, import_react.useRef)(null);
122
113
  const nodeRef = (0, import_utils.useForkRef)(ref, cityRef);
123
114
  (0, import_utils.useTouchEmulator)(cityRef.current);
@@ -176,7 +167,7 @@ const CitySelector = /* @__PURE__ */ import_react.default.forwardRef(
176
167
  };
177
168
  const renderTitile = (title, titleCode) => {
178
169
  const parseTitle = (titleCode || title).toUpperCase();
179
- return /* @__PURE__ */ import_react.default.createElement("div", { className: "select-city-title", id: disableIndex ? "" : parseTitle }, title == null ? void 0 : title.toUpperCase());
170
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "select-city-title", id: disableIndex ? "" : parseTitle }, title.toUpperCase());
180
171
  };
181
172
  const renderCity = (citys, title, titleCode) => {
182
173
  return /* @__PURE__ */ import_react.default.createElement("div", null, renderTitile(title, titleCode), /* @__PURE__ */ import_react.default.createElement("div", { className: "select-city-buttons" }, citys.map((city, index) => {
@@ -1,11 +1,11 @@
1
1
  .bui-city-selector-item {
2
- width: var(--select-item-width);
3
- height: var(--select-item-height);
2
+ width: 111px;
3
+ height: 36px;
4
4
  display: inline-flex;
5
5
  justify-content: center;
6
6
  align-items: center;
7
- border-radius: var(--select-item-border-radius);
8
- margin: var(--select-item-margin);
7
+ border-radius: 20px;
8
+ margin: 4.5px 0 4.5px 9px;
9
9
  background-color: var(--bui-color-bg-default);
10
10
  font-size: var(--bui-text-size-2);
11
11
  }
@@ -2,7 +2,6 @@
2
2
  --font-size: var(--bui-countdown-font-size, var(--bui-text-size-1));
3
3
  --color: var(--bui-countdown-color, var(--bui-color-fg-default));
4
4
  --font-weight: var(--bui-countdown-font-weight, var(--bui-font-weight-normal));
5
- --slice-unit-margin: var(--bui-countdown-slice-unit-margin, 0 2px);
6
5
  display: flex;
7
6
  flex-direction: row;
8
7
  align-items: center;
@@ -35,5 +34,5 @@
35
34
  sans-serif;
36
35
  }
37
36
  .bui-countdown-slice-unit {
38
- margin: var(--slice-unit-margin);
37
+ margin: 0 2px;
39
38
  }
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { DialogProps, DialogRef } from './Dialog.types';
2
+ import { DialogProps } from './Dialog.types';
3
3
  import './index.less';
4
- declare const Dialog: React.ForwardRefExoticComponent<Omit<DialogProps, "ref"> & React.RefAttributes<DialogRef>>;
4
+ declare const Dialog: React.ForwardRefExoticComponent<Omit<DialogProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
5
  export default Dialog;
@@ -59,13 +59,11 @@ __export(Dialog_exports, {
59
59
  default: () => Dialog_default
60
60
  });
61
61
  module.exports = __toCommonJS(Dialog_exports);
62
- var import_clsx = __toESM(require("clsx"));
63
62
  var import_react = __toESM(require("react"));
63
+ var import_clsx = __toESM(require("clsx"));
64
64
  var import_Input = require("../Input");
65
65
  var import_Button = require("../Button");
66
- var import_locales = require("../locales");
67
66
  var import_Modal = __toESM(require("../Modal"));
68
- var import_ThemeProvider = require("../ThemeProvider");
69
67
  var import_index = require("./index.css");
70
68
  const prefixCls = "bui-dialog";
71
69
  const Dialog = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
@@ -80,8 +78,7 @@ const Dialog = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
80
78
  cancelText,
81
79
  placeholder,
82
80
  InputProps,
83
- className,
84
- theme
81
+ className
85
82
  } = _a, others = __objRest(_a, [
86
83
  "open",
87
84
  "onOk",
@@ -93,19 +90,9 @@ const Dialog = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
93
90
  "cancelText",
94
91
  "placeholder",
95
92
  "InputProps",
96
- "className",
97
- "theme"
93
+ "className"
98
94
  ]);
99
95
  const InputRef = (0, import_react.useRef)(null);
100
- const themeConfig = (0, import_ThemeProvider.useTheme)(theme);
101
- const {
102
- cancel,
103
- confirm,
104
- placeholder: placeholderLocaleName
105
- } = (0, import_locales.useLocaleText)("dialog", themeConfig);
106
- (0, import_react.useImperativeHandle)(ref, () => {
107
- return { theme: themeConfig };
108
- });
109
96
  const footerNode = /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-body-footer` }, /* @__PURE__ */ import_react.default.createElement(
110
97
  import_Button.Button,
111
98
  {
@@ -113,7 +100,7 @@ const Dialog = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
113
100
  onClick: onClose,
114
101
  className: `${prefixCls}-body-button`
115
102
  },
116
- cancelText || cancel
103
+ cancelText || "\u53D6\u6D88"
117
104
  ), /* @__PURE__ */ import_react.default.createElement(
118
105
  import_Button.Button,
119
106
  {
@@ -125,14 +112,14 @@ const Dialog = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
125
112
  },
126
113
  className: `${prefixCls}-body-button`
127
114
  },
128
- confirmText || confirm
115
+ confirmText || "\u786E\u5B9A"
129
116
  ));
130
117
  const inputNode = type === "prompt" && /* @__PURE__ */ import_react.default.createElement(
131
118
  import_Input.Input,
132
119
  __spreadProps(__spreadValues({}, InputProps), {
133
120
  inputRef: InputRef,
134
121
  className: `${prefixCls}-body-input`,
135
- placeholder: `${placeholder || placeholderLocaleName}`
122
+ placeholder: `${placeholder || "\u8BF7\u5728\u6B64\u5904\u8F93\u5165"}`
136
123
  })
137
124
  );
138
125
  if (!open)
@@ -143,7 +130,8 @@ const Dialog = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
143
130
  open: true,
144
131
  className: (0, import_clsx.default)(prefixCls, className),
145
132
  disablePortal: true,
146
- onClose
133
+ onClose,
134
+ ref
147
135
  }),
148
136
  /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-body` }, header && /* @__PURE__ */ import_react.default.createElement("h1", { className: `${prefixCls}-body-title` }, header), message && /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-body-desc` }, message), inputNode, footerNode)
149
137
  );
@@ -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
- }
@@ -94,7 +94,7 @@ const DialogGenerator = (options) => {
94
94
  const rootElement = (0, import_utils.getRootElement)();
95
95
  rootElement.appendChild(rootWrapper);
96
96
  const DialogComponent = () => {
97
- const _a = options, { onConfirm, onCancel, ref } = _a, others = __objRest(_a, ["onConfirm", "onCancel", "ref"]);
97
+ const _a = options, { onConfirm, onCancel } = _a, others = __objRest(_a, ["onConfirm", "onCancel"]);
98
98
  const [visible, setVisible] = (0, import_react.useState)(false);
99
99
  const close = (0, import_react.useCallback)(() => {
100
100
  setVisible(false);
@@ -124,9 +124,7 @@ const DialogGenerator = (options) => {
124
124
  });
125
125
  return /* @__PURE__ */ import_react.default.createElement(
126
126
  import_Dialog.default,
127
- __spreadProps(__spreadValues({
128
- ref
129
- }, others), {
127
+ __spreadProps(__spreadValues({}, others), {
130
128
  open: visible,
131
129
  onOk: (val) => dispatch(true, val),
132
130
  onClose: () => dispatch(false)
@@ -165,40 +163,6 @@ const prompt = (options) => {
165
163
  type: "prompt"
166
164
  }, formatProps(options)));
167
165
  };
168
- const useDialog = () => {
169
- const holderRef = import_react.default.useRef(null);
170
- const wrapAPI = (props) => {
171
- const options = __spreadValues({ theme: holderRef.current.theme }, formatProps(props));
172
- const _a = options, { onConfirm, onCancel } = _a, rest = __objRest(_a, ["onConfirm", "onCancel"]);
173
- return new Promise((resolve) => {
174
- DialogGenerator(__spreadProps(__spreadValues({}, rest), {
175
- onConfirm: (val) => __async(void 0, null, function* () {
176
- yield onConfirm == null ? void 0 : onConfirm(val);
177
- if (rest.type === "prompt")
178
- resolve(val);
179
- else
180
- resolve(true);
181
- }),
182
- onCancel: () => __async(void 0, null, function* () {
183
- yield onCancel == null ? void 0 : onCancel();
184
- resolve(false);
185
- })
186
- }));
187
- });
188
- };
189
- wrapAPI.confirm = (options) => Dialog(__spreadProps(__spreadValues({
190
- type: "confirm"
191
- }, formatProps(options)), {
192
- theme: holderRef.current.theme
193
- }));
194
- wrapAPI.prompt = (options) => Dialog(__spreadProps(__spreadValues({
195
- type: "prompt"
196
- }, formatProps(options)), {
197
- theme: holderRef.current.theme
198
- }));
199
- return [wrapAPI, /* @__PURE__ */ import_react.default.createElement(import_Dialog.default, { key: "dialog-holder", ref: holderRef })];
200
- };
201
166
  Dialog.confirm = confirm;
202
167
  Dialog.prompt = prompt;
203
- Dialog.useDialog = useDialog;
204
168
  var FunctionalDialog_default = Dialog;
@@ -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
  }