@bifrostui/react 1.3.0 → 1.3.1-beta.0

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 +6 -3
  2. package/dist/ActionSheet/ActionSheetItem.css +10 -6
  3. package/dist/Alert/index.css +14 -8
  4. package/dist/Avatar/Avatar.css +13 -9
  5. package/dist/Avatar/AvatarGroup.css +15 -8
  6. package/dist/Backdrop/Backdrop.css +2 -1
  7. package/dist/Badge/Badge.css +27 -17
  8. package/dist/Breadcrumb/Breadcrumb.css +34 -0
  9. package/dist/Breadcrumb/Breadcrumb.d.ts +5 -0
  10. package/dist/Breadcrumb/Breadcrumb.js +128 -0
  11. package/dist/Breadcrumb/Breadcrumb.types.d.ts +49 -0
  12. package/dist/Breadcrumb/Breadcrumb.types.js +15 -0
  13. package/dist/Breadcrumb/BreadcrumbItem.d.ts +4 -0
  14. package/dist/Breadcrumb/BreadcrumbItem.js +78 -0
  15. package/dist/Breadcrumb/index.d.ts +4 -0
  16. package/dist/Breadcrumb/index.js +45 -0
  17. package/dist/Button/Button.css +26 -17
  18. package/dist/Calendar/Calendar.css +33 -18
  19. package/dist/Calendar/Calendar.d.ts +1 -1
  20. package/dist/Calendar/Calendar.js +38 -17
  21. package/dist/Calendar/Calendar.types.d.ts +21 -0
  22. package/dist/Card/CardFooter.css +2 -1
  23. package/dist/Card/CardHeader.css +3 -1
  24. package/dist/Checkbox/Checkbox.css +7 -5
  25. package/dist/CitySelector/CitySelector.css +29 -15
  26. package/dist/CitySelector/CitySelectorCore.js +25 -16
  27. package/dist/CitySelector/Selector/index.css +4 -4
  28. package/dist/Collapse/Collapse.css +6 -0
  29. package/dist/Collapse/Collapse.d.ts +5 -0
  30. package/dist/Collapse/Collapse.js +165 -0
  31. package/dist/Collapse/Collapse.types.d.ts +16 -0
  32. package/dist/Collapse/Collapse.types.js +15 -0
  33. package/dist/Collapse/index.d.ts +2 -0
  34. package/dist/Collapse/index.js +41 -0
  35. package/dist/CollapsePanel/CollapsePanel.css +32 -0
  36. package/dist/CollapsePanel/CollapsePanel.d.ts +5 -0
  37. package/dist/CollapsePanel/CollapsePanel.js +159 -0
  38. package/dist/CollapsePanel/CollapsePanel.types.d.ts +64 -0
  39. package/dist/CollapsePanel/CollapsePanel.types.js +15 -0
  40. package/dist/CollapsePanel/CollapsePanelItem.d.ts +4 -0
  41. package/dist/CollapsePanel/CollapsePanelItem.js +112 -0
  42. package/dist/CollapsePanel/index.d.ts +4 -0
  43. package/dist/CollapsePanel/index.js +45 -0
  44. package/dist/Countdown/Countdown.css +2 -1
  45. package/dist/Dialog/Dialog.d.ts +2 -2
  46. package/dist/Dialog/Dialog.js +20 -8
  47. package/dist/Dialog/Dialog.types.d.ts +12 -1
  48. package/dist/Dialog/FunctionalDialog.js +38 -2
  49. package/dist/Dialog/index.css +27 -18
  50. package/dist/Divider/Divider.css +6 -4
  51. package/dist/IconButton/IconButton.css +9 -7
  52. package/dist/Image/index.css +2 -1
  53. package/dist/Input/Input.css +10 -5
  54. package/dist/List/List.css +3 -0
  55. package/dist/List/ListItem.css +3 -3
  56. package/dist/List/ListItemContent.css +1 -1
  57. package/dist/Loading/Loading.css +4 -2
  58. package/dist/Modal/Modal.miniapp.d.ts +1 -1
  59. package/dist/NavBar/NavBar.css +9 -5
  60. package/dist/Picker/Picker.css +25 -29
  61. package/dist/Picker/Picker.js +31 -11
  62. package/dist/Picker/Picker.types.d.ts +4 -0
  63. package/dist/Picker/PickerPanel.css +8 -8
  64. package/dist/Picker/PickerPanel.js +14 -8
  65. package/dist/Picker/utils.d.ts +16 -0
  66. package/dist/Picker/utils.js +32 -2
  67. package/dist/Popover/Popover.css +97 -0
  68. package/dist/Popover/Popover.d.ts +5 -0
  69. package/dist/Popover/Popover.js +186 -0
  70. package/dist/Popover/Popover.types.d.ts +60 -0
  71. package/dist/Popover/Popover.types.js +15 -0
  72. package/dist/Popover/index.d.ts +2 -0
  73. package/dist/Popover/index.js +41 -0
  74. package/dist/Portal/Portal.types.d.ts +4 -0
  75. package/dist/Portal/PortalCore.js +8 -1
  76. package/dist/Progress/Progress.css +8 -6
  77. package/dist/Radio/Radio.css +2 -1
  78. package/dist/Rating/Rating.css +8 -4
  79. package/dist/Select/Select.css +21 -10
  80. package/dist/Select/Select.js +1 -1
  81. package/dist/Select/SelectOption.js +3 -0
  82. package/dist/Skeleton/Skeleton.css +3 -2
  83. package/dist/Slider/Slider.css +24 -13
  84. package/dist/Steps/Step.css +11 -11
  85. package/dist/Steps/Steps.css +14 -5
  86. package/dist/Swiper/Swiper.css +2 -1
  87. package/dist/Switch/Switch.css +31 -16
  88. package/dist/TabBar/TabBar.css +7 -3
  89. package/dist/TabBar/TabBarItem.css +0 -1
  90. package/dist/Tabs/Tab.css +2 -6
  91. package/dist/Tabs/Tabs.css +7 -4
  92. package/dist/Tag/Tag.css +7 -10
  93. package/dist/Tag/TagGroup.css +9 -1
  94. package/dist/TextArea/TextArea.css +14 -8
  95. package/dist/ThemeProvider/ThemeProvider.d.ts +4 -0
  96. package/dist/ThemeProvider/ThemeProvider.js +90 -0
  97. package/dist/ThemeProvider/ThemeProvider.types.d.ts +127 -0
  98. package/dist/ThemeProvider/ThemeProvider.types.js +27 -0
  99. package/dist/ThemeProvider/hooks/ThemeContext.d.ts +4 -0
  100. package/dist/ThemeProvider/hooks/ThemeContext.js +35 -0
  101. package/dist/ThemeProvider/hooks/createTheme.d.ts +2 -0
  102. package/dist/ThemeProvider/hooks/createTheme.js +55 -0
  103. package/dist/ThemeProvider/hooks/index.d.ts +4 -0
  104. package/dist/ThemeProvider/hooks/index.js +43 -0
  105. package/dist/ThemeProvider/hooks/useTheme.d.ts +1 -0
  106. package/dist/ThemeProvider/hooks/useTheme.js +39 -0
  107. package/dist/ThemeProvider/index.d.ts +4 -0
  108. package/dist/ThemeProvider/index.js +45 -0
  109. package/dist/ThemeProvider/utils/constants.d.ts +38 -0
  110. package/dist/ThemeProvider/utils/constants.js +65 -0
  111. package/dist/ThemeProvider/utils/index.d.ts +2 -0
  112. package/dist/ThemeProvider/utils/index.js +23 -0
  113. package/dist/ThemeProvider/utils/mountTokens.d.ts +26 -0
  114. package/dist/ThemeProvider/utils/mountTokens.js +123 -0
  115. package/dist/Toast/FunctionalToast.js +18 -0
  116. package/dist/Toast/Toast.css +15 -14
  117. package/dist/Toast/Toast.d.ts +2 -2
  118. package/dist/Toast/Toast.js +52 -48
  119. package/dist/Toast/Toast.types.d.ts +15 -1
  120. package/dist/Tooltip/Tooltip.css +91 -0
  121. package/dist/Tooltip/Tooltip.d.ts +5 -0
  122. package/dist/Tooltip/Tooltip.js +177 -0
  123. package/dist/Tooltip/Tooltip.types.d.ts +51 -0
  124. package/dist/Tooltip/Tooltip.types.js +15 -0
  125. package/dist/Tooltip/index.d.ts +2 -0
  126. package/dist/Tooltip/index.js +41 -0
  127. package/dist/index.d.ts +7 -0
  128. package/dist/index.js +15 -1
  129. package/dist/locales/base.d.ts +40 -0
  130. package/dist/locales/base.js +15 -0
  131. package/dist/locales/en-US.d.ts +3 -0
  132. package/dist/locales/en-US.js +69 -0
  133. package/dist/locales/hooks/useLocaleText.d.ts +3 -0
  134. package/dist/locales/hooks/useLocaleText.js +43 -0
  135. package/dist/locales/index.d.ts +5 -0
  136. package/dist/locales/index.js +49 -0
  137. package/dist/locales/zh-CN.d.ts +3 -0
  138. package/dist/locales/zh-CN.js +51 -0
  139. package/dist/locales/zh-TW.d.ts +3 -0
  140. package/dist/locales/zh-TW.js +51 -0
  141. package/es/ActionSheet/ActionSheet.css +6 -3
  142. package/es/ActionSheet/ActionSheetItem.css +10 -6
  143. package/es/Alert/index.css +14 -8
  144. package/es/Avatar/Avatar.css +13 -9
  145. package/es/Avatar/AvatarGroup.css +15 -8
  146. package/es/Backdrop/Backdrop.css +2 -1
  147. package/es/Badge/Badge.css +27 -17
  148. package/es/Breadcrumb/Breadcrumb.css +34 -0
  149. package/es/Breadcrumb/Breadcrumb.d.ts +5 -0
  150. package/es/Breadcrumb/Breadcrumb.js +101 -0
  151. package/es/Breadcrumb/Breadcrumb.types.d.ts +49 -0
  152. package/es/Breadcrumb/Breadcrumb.types.js +1 -0
  153. package/es/Breadcrumb/BreadcrumbItem.d.ts +4 -0
  154. package/es/Breadcrumb/BreadcrumbItem.js +51 -0
  155. package/es/Breadcrumb/index.d.ts +4 -0
  156. package/es/Breadcrumb/index.js +9 -0
  157. package/es/Button/Button.css +26 -17
  158. package/es/Calendar/Calendar.css +33 -18
  159. package/es/Calendar/Calendar.d.ts +1 -1
  160. package/es/Calendar/Calendar.js +38 -17
  161. package/es/Calendar/Calendar.types.d.ts +21 -0
  162. package/es/Card/CardFooter.css +2 -1
  163. package/es/Card/CardHeader.css +3 -1
  164. package/es/Checkbox/Checkbox.css +7 -5
  165. package/es/CitySelector/CitySelector.css +29 -15
  166. package/es/CitySelector/CitySelectorCore.js +25 -16
  167. package/es/CitySelector/Selector/index.css +4 -4
  168. package/es/Collapse/Collapse.css +6 -0
  169. package/es/Collapse/Collapse.d.ts +5 -0
  170. package/es/Collapse/Collapse.js +144 -0
  171. package/es/Collapse/Collapse.types.d.ts +16 -0
  172. package/es/Collapse/Collapse.types.js +1 -0
  173. package/es/Collapse/index.d.ts +2 -0
  174. package/es/Collapse/index.js +6 -0
  175. package/es/CollapsePanel/CollapsePanel.css +32 -0
  176. package/es/CollapsePanel/CollapsePanel.d.ts +5 -0
  177. package/es/CollapsePanel/CollapsePanel.js +132 -0
  178. package/es/CollapsePanel/CollapsePanel.types.d.ts +64 -0
  179. package/es/CollapsePanel/CollapsePanel.types.js +1 -0
  180. package/es/CollapsePanel/CollapsePanelItem.d.ts +4 -0
  181. package/es/CollapsePanel/CollapsePanelItem.js +85 -0
  182. package/es/CollapsePanel/index.d.ts +4 -0
  183. package/es/CollapsePanel/index.js +9 -0
  184. package/es/Countdown/Countdown.css +2 -1
  185. package/es/Dialog/Dialog.d.ts +2 -2
  186. package/es/Dialog/Dialog.js +20 -8
  187. package/es/Dialog/Dialog.types.d.ts +12 -1
  188. package/es/Dialog/FunctionalDialog.js +38 -2
  189. package/es/Dialog/index.css +27 -18
  190. package/es/Divider/Divider.css +6 -4
  191. package/es/IconButton/IconButton.css +9 -7
  192. package/es/Image/index.css +2 -1
  193. package/es/Input/Input.css +10 -5
  194. package/es/List/List.css +3 -0
  195. package/es/List/ListItem.css +3 -3
  196. package/es/List/ListItemContent.css +1 -1
  197. package/es/Loading/Loading.css +4 -2
  198. package/es/Modal/Modal.miniapp.d.ts +1 -1
  199. package/es/NavBar/NavBar.css +9 -5
  200. package/es/Picker/Picker.css +25 -29
  201. package/es/Picker/Picker.js +32 -12
  202. package/es/Picker/Picker.types.d.ts +4 -0
  203. package/es/Picker/PickerPanel.css +8 -8
  204. package/es/Picker/PickerPanel.js +14 -8
  205. package/es/Picker/utils.d.ts +16 -0
  206. package/es/Picker/utils.js +29 -1
  207. package/es/Popover/Popover.css +97 -0
  208. package/es/Popover/Popover.d.ts +5 -0
  209. package/es/Popover/Popover.js +159 -0
  210. package/es/Popover/Popover.types.d.ts +60 -0
  211. package/es/Popover/Popover.types.js +1 -0
  212. package/es/Popover/index.d.ts +2 -0
  213. package/es/Popover/index.js +6 -0
  214. package/es/Portal/Portal.types.d.ts +4 -0
  215. package/es/Portal/PortalCore.js +8 -1
  216. package/es/Progress/Progress.css +8 -6
  217. package/es/Radio/Radio.css +2 -1
  218. package/es/Rating/Rating.css +8 -4
  219. package/es/Select/Select.css +21 -10
  220. package/es/Select/Select.js +1 -1
  221. package/es/Select/SelectOption.js +3 -0
  222. package/es/Skeleton/Skeleton.css +3 -2
  223. package/es/Slider/Slider.css +24 -13
  224. package/es/Steps/Step.css +11 -11
  225. package/es/Steps/Steps.css +14 -5
  226. package/es/Swiper/Swiper.css +2 -1
  227. package/es/Switch/Switch.css +31 -16
  228. package/es/TabBar/TabBar.css +7 -3
  229. package/es/TabBar/TabBarItem.css +0 -1
  230. package/es/Tabs/Tab.css +2 -6
  231. package/es/Tabs/Tabs.css +7 -4
  232. package/es/Tag/Tag.css +7 -10
  233. package/es/Tag/TagGroup.css +9 -1
  234. package/es/TextArea/TextArea.css +14 -8
  235. package/es/ThemeProvider/ThemeProvider.d.ts +4 -0
  236. package/es/ThemeProvider/ThemeProvider.js +61 -0
  237. package/es/ThemeProvider/ThemeProvider.types.d.ts +127 -0
  238. package/es/ThemeProvider/ThemeProvider.types.js +1 -0
  239. package/es/ThemeProvider/hooks/ThemeContext.d.ts +4 -0
  240. package/es/ThemeProvider/hooks/ThemeContext.js +6 -0
  241. package/es/ThemeProvider/hooks/createTheme.d.ts +2 -0
  242. package/es/ThemeProvider/hooks/createTheme.js +38 -0
  243. package/es/ThemeProvider/hooks/index.d.ts +4 -0
  244. package/es/ThemeProvider/hooks/index.js +8 -0
  245. package/es/ThemeProvider/hooks/useTheme.d.ts +1 -0
  246. package/es/ThemeProvider/hooks/useTheme.js +10 -0
  247. package/es/ThemeProvider/index.d.ts +4 -0
  248. package/es/ThemeProvider/index.js +8 -0
  249. package/es/ThemeProvider/utils/constants.d.ts +38 -0
  250. package/es/ThemeProvider/utils/constants.js +40 -0
  251. package/es/ThemeProvider/utils/index.d.ts +2 -0
  252. package/es/ThemeProvider/utils/index.js +2 -0
  253. package/es/ThemeProvider/utils/mountTokens.d.ts +26 -0
  254. package/es/ThemeProvider/utils/mountTokens.js +88 -0
  255. package/es/Toast/FunctionalToast.js +18 -0
  256. package/es/Toast/Toast.css +15 -14
  257. package/es/Toast/Toast.d.ts +2 -2
  258. package/es/Toast/Toast.js +53 -49
  259. package/es/Toast/Toast.types.d.ts +15 -1
  260. package/es/Tooltip/Tooltip.css +91 -0
  261. package/es/Tooltip/Tooltip.d.ts +5 -0
  262. package/es/Tooltip/Tooltip.js +150 -0
  263. package/es/Tooltip/Tooltip.types.d.ts +51 -0
  264. package/es/Tooltip/Tooltip.types.js +1 -0
  265. package/es/Tooltip/index.d.ts +2 -0
  266. package/es/Tooltip/index.js +6 -0
  267. package/es/index.d.ts +7 -0
  268. package/es/index.js +7 -0
  269. package/es/locales/base.d.ts +40 -0
  270. package/es/locales/base.js +0 -0
  271. package/es/locales/en-US.d.ts +3 -0
  272. package/es/locales/en-US.js +50 -0
  273. package/es/locales/hooks/useLocaleText.d.ts +3 -0
  274. package/es/locales/hooks/useLocaleText.js +26 -0
  275. package/es/locales/index.d.ts +5 -0
  276. package/es/locales/index.js +11 -0
  277. package/es/locales/zh-CN.d.ts +3 -0
  278. package/es/locales/zh-CN.js +32 -0
  279. package/es/locales/zh-TW.d.ts +3 -0
  280. package/es/locales/zh-TW.js +32 -0
  281. package/package.json +5 -5
@@ -0,0 +1,45 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var Breadcrumb_exports = {};
30
+ __export(Breadcrumb_exports, {
31
+ Breadcrumb: () => import_Breadcrumb2.default,
32
+ BreadcrumbItem: () => import_BreadcrumbItem.default,
33
+ default: () => import_Breadcrumb.default
34
+ });
35
+ module.exports = __toCommonJS(Breadcrumb_exports);
36
+ var import_Breadcrumb = __toESM(require("./Breadcrumb"));
37
+ var import_Breadcrumb2 = __toESM(require("./Breadcrumb"));
38
+ var import_BreadcrumbItem = __toESM(require("./BreadcrumbItem"));
39
+ __reExport(Breadcrumb_exports, require("./Breadcrumb.types"), module.exports);
40
+ // Annotate the CommonJS export names for ESM import in node:
41
+ 0 && (module.exports = {
42
+ Breadcrumb,
43
+ BreadcrumbItem,
44
+ ...require("./Breadcrumb.types")
45
+ });
@@ -1,14 +1,23 @@
1
1
  .bui-btn {
2
+ --border-radius: var(--bui-button-border-radius, 100px);
2
3
  --bg-color: var(--bui-button-default-bg-color, var(--bui-color-neutral-5));
3
- --text-color: var(--bui-button-text-color, var(--bui-color-fg-muted));
4
4
  --border-color: var(--bui-button-border-color, var(--bui-color-neutral-4));
5
- --border-radius: var(--bui-button-border-radius, 100px);
6
- --font-weight: var(--bui-button-font-weight, var(--bui-font-weight-medium));
5
+ --height: var(--bui-button-height, 27px);
6
+ --icon-start-margin-right: var(--bui-button-icon-start-margin-right, var(--bui-spacing-xs));
7
+ --icon-start-margin-left: var(--bui-button-icon-start-margin-left, var(--bui-spacing-xs));
8
+ --disabled-opacity: var(--bui-button-disabled-opacity, 0.5);
9
+ --small-padding: var(--bui-button-small-padding, 0 11px);
10
+ --small-height: var(--bui-button-small-height, 24px);
11
+ --medium-padding: var(--bui-button-medium-padding, 0 14px);
12
+ --large-padding: var(--bui-button-large-padding, 0 14px);
13
+ --large-height: var(--bui-button-large-height, 33px);
14
+ --full-font-size: var(--bui-button-full-font-size, var(--bui-title-size-4));
15
+ --full-height: var(--bui-button-full-height, 42px);
7
16
  border: 1px solid transparent;
8
17
  outline: 0;
9
18
  background-color: transparent;
10
19
  cursor: pointer;
11
- color: var(--text-color);
20
+ color: var(--bui-color-fg-muted);
12
21
  box-sizing: border-box;
13
22
  position: relative;
14
23
  display: inline-flex;
@@ -17,9 +26,9 @@
17
26
  justify-content: center;
18
27
  white-space: nowrap;
19
28
  font-size: var(--bui-text-size-3);
20
- font-weight: var(--font-weight);
29
+ font-weight: var(--bui-font-weight-medium);
21
30
  border-radius: var(--border-radius);
22
- height: 27px;
31
+ height: var(--height);
23
32
  line-height: var(--bui-line-height);
24
33
  font-family: var(--bui-font-family);
25
34
  }
@@ -55,36 +64,36 @@
55
64
  display: inline-flex;
56
65
  align-self: center;
57
66
  flex-shrink: 0;
58
- margin-right: var(--bui-spacing-xs);
67
+ margin-right: var(--icon-start-margin-right);
59
68
  }
60
69
  .bui-btn-icon-end {
61
70
  display: inline-flex;
62
71
  align-self: center;
63
72
  flex-shrink: 0;
64
- margin-left: var(--bui-spacing-xs);
73
+ margin-left: var(--icon-start-margin-left);
65
74
  }
66
75
  .bui-btn-disabled {
67
76
  pointer-events: none;
68
- opacity: 0.5;
77
+ opacity: var(--disabled-opacity);
69
78
  }
70
79
  .bui-btn-small {
71
80
  font-size: var(--bui-text-size-4);
72
- padding: 0 11px;
73
- height: 24px;
81
+ padding: var(--small-padding);
82
+ height: var(--small-height);
74
83
  }
75
84
  .bui-btn-medium {
76
- padding: 0 14px;
77
- height: 27px;
85
+ padding: var(--medium-padding);
86
+ height: var(--height);
78
87
  }
79
88
  .bui-btn-large {
80
89
  font-size: var(--bui-text-size-2);
81
- padding: 0 14px;
82
- height: 33px;
90
+ padding: var(--large-padding);
91
+ height: var(--large-height);
83
92
  }
84
93
  .bui-btn-full {
85
- font-size: var(--bui-title-size-4);
94
+ font-size: var(--full-font-size);
86
95
  width: 100%;
87
- height: 42px;
96
+ height: var(--full-height);
88
97
  }
89
98
  .bui-btn-text.bui-btn-primary {
90
99
  color: var(--bui-color-primary);
@@ -1,4 +1,19 @@
1
1
  .bui-calendar {
2
+ --padding: var(--bui-calendar-padding, 6px 12px 7px);
3
+ --week-height: var(--bui-calendar-week-height, 30px);
4
+ --handler-height: var(--bui-calendar-handler-height, 28px);
5
+ --handler-margin-bottom: var(--bui-calendar-handler-margin-bottom, 7px);
6
+ --handler-text-width: var(--bui-calendar-handler-text-width, 80px);
7
+ --handler-btn-width: var(--bui-calendar-handler-btn-width, 46px);
8
+ --handler-btn-height: var(--bui-calendar-handler-btn-height, 100%);
9
+ --handler-btn-icon-font-size: var(--bui-calendar-handler-btn-icon-font-size, 28px);
10
+ --day-box-height: var(--bui-calendar-day-box-height, 30px);
11
+ --day-box-margin-bottom: var(--bui-calendar-day-box-margin-bottom, 7px);
12
+ --day-disabled-color: var(--bui-calendar-day-disabled-color, #9c9ca5);
13
+ --middle-color: var(--bui-calendar-middle-color, #000);
14
+ --middle-background-color: var(--bui-calendar-middle-background-color, #ffeaf1);
15
+ --range-both-ends-color: var(--bui-calendar-range-both-ends-color, #000);
16
+ --range-both-ends-background-color: var(--bui-calendar-range-both-ends-background-color, #ffc7da);
2
17
  overflow: hidden;
3
18
  display: flex;
4
19
  flex-direction: column;
@@ -6,11 +21,11 @@
6
21
  position: relative;
7
22
  width: 100%;
8
23
  box-sizing: border-box;
9
- padding: 6px 12px 7px;
24
+ padding: var(--padding);
10
25
  font-family: var(--bui-font-family);
11
26
  }
12
27
  .bui-calendar-week {
13
- height: 30px;
28
+ height: var(--week-height);
14
29
  font-size: var(--bui-text-size-2);
15
30
  font-weight: var(--bui-font-weight-medium);
16
31
  color: var(--bui-color-fg-default);
@@ -29,29 +44,29 @@
29
44
  color: var(--bui-color-primary);
30
45
  }
31
46
  .bui-calendar-handler {
32
- height: 28px;
47
+ height: var(--handler-height);
33
48
  display: flex;
34
49
  align-items: center;
35
50
  justify-content: center;
36
- margin-bottom: 7px;
51
+ margin-bottom: var(--handler-margin-bottom);
37
52
  }
38
53
  .bui-calendar-handler-text {
39
- width: 80px;
54
+ width: var(--handler-text-width);
40
55
  font-size: var(--bui-title-size-3);
41
56
  font-weight: var(--bui-font-weight-medium);
42
57
  text-align: center;
43
58
  }
44
59
  .bui-calendar-handler-btn {
45
60
  font-size: 16px;
46
- height: 100%;
47
- width: 46px;
61
+ height: var(--handler-btn-height);
62
+ width: var(--handler-btn-width);
48
63
  cursor: pointer;
49
64
  display: flex;
50
65
  align-items: center;
51
66
  justify-content: center;
52
67
  }
53
68
  .bui-calendar-handler-btn-icon {
54
- font-size: 28px;
69
+ font-size: var(--handler-btn-icon-font-size);
55
70
  }
56
71
  .bui-calendar-month {
57
72
  display: flex;
@@ -60,8 +75,8 @@
60
75
  }
61
76
  .bui-calendar-day-box {
62
77
  width: 14.28%;
63
- height: 30px;
64
- margin-bottom: 7px;
78
+ height: var(--day-box-height);
79
+ margin-bottom: var(--day-box-margin-bottom);
65
80
  }
66
81
  .bui-calendar-highlight-day .bui-calendar-day {
67
82
  color: var(--bui-color-primary);
@@ -72,34 +87,34 @@
72
87
  display: flex;
73
88
  align-items: center;
74
89
  justify-content: center;
75
- border-radius: 6px;
90
+ border-radius: var(--bui-shape-radius-default);
76
91
  font-size: var(--bui-title-size-4);
77
92
  font-weight: var(--bui-font-weight-medium);
78
93
  color: var(--bui-color-fg-default);
79
94
  cursor: pointer;
80
95
  }
81
96
  .bui-calendar-day.bui-calendar-disabled {
82
- color: #9c9ca5;
97
+ color: var(--day-disabled-color);
83
98
  }
84
99
  .bui-calendar-today {
85
100
  color: var(--bui-color-primary);
86
101
  }
87
102
  .bui-calendar-middle {
88
- color: #000;
103
+ color: var(--middle-color);
89
104
  border-radius: 0;
90
- background-color: #ffeaf1;
105
+ background-color: var(--middle-background-color);
91
106
  }
92
107
  .bui-calendar-start {
93
- color: #000;
94
- background-color: #ffc7da;
108
+ color: var(--range-both-ends-color);
109
+ background-color: var(--range-both-ends-background-color);
95
110
  }
96
111
  .bui-calendar-range {
97
112
  border-top-right-radius: 0;
98
113
  border-bottom-right-radius: 0;
99
114
  }
100
115
  .bui-calendar-end {
101
- color: #000;
102
- background-color: #ffc7da;
116
+ color: var(--range-both-ends-color);
117
+ background-color: var(--range-both-ends-background-color);
103
118
  border-top-left-radius: 0;
104
119
  border-bottom-left-radius: 0;
105
120
  }
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import './Calendar.less';
3
2
  import { CalendarProps } from './Calendar.types';
3
+ import './Calendar.less';
4
4
  declare const Calendar: React.ForwardRefExoticComponent<Omit<CalendarProps<"div", {}>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
5
  export default Calendar;
@@ -65,11 +65,11 @@ var import_clsx = __toESM(require("clsx"));
65
65
  var import_dayjs = __toESM(require("dayjs"));
66
66
  var import_isoWeek = __toESM(require("dayjs/plugin/isoWeek"));
67
67
  var import_react = __toESM(require("react"));
68
- var import_Calendar = require("./Calendar.css");
69
68
  var import_utils2 = require("./utils");
69
+ var import_locales = require("../locales");
70
+ var import_Calendar2 = require("./Calendar.css");
70
71
  const Picker = (0, import_react.lazy)(() => import("../Picker"));
71
72
  import_dayjs.default.extend(import_isoWeek.default);
72
- const SUNDAY_WEEK_DATA = ["\u65E5", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D"];
73
73
  const classes = {
74
74
  root: "bui-calendar",
75
75
  handler: "bui-calendar-handler",
@@ -87,6 +87,9 @@ const Calendar = /* @__PURE__ */ import_react.default.forwardRef(
87
87
  maxDate,
88
88
  mode,
89
89
  hideDaysOutsideCurrentMonth,
90
+ headerBarFormat,
91
+ headerBarLeftIcon,
92
+ headerBarRightIcon,
90
93
  disabledDate,
91
94
  enableSelectYear,
92
95
  highlightDate,
@@ -103,6 +106,9 @@ const Calendar = /* @__PURE__ */ import_react.default.forwardRef(
103
106
  "maxDate",
104
107
  "mode",
105
108
  "hideDaysOutsideCurrentMonth",
109
+ "headerBarFormat",
110
+ "headerBarLeftIcon",
111
+ "headerBarRightIcon",
106
112
  "disabledDate",
107
113
  "enableSelectYear",
108
114
  "highlightDate",
@@ -112,6 +118,16 @@ const Calendar = /* @__PURE__ */ import_react.default.forwardRef(
112
118
  "onYearChange",
113
119
  "onChange"
114
120
  ]);
121
+ const { Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday } = (0, import_locales.useLocaleText)("calendar");
122
+ const SUNDAY_WEEK_DATA = [
123
+ Sunday,
124
+ Monday,
125
+ Tuesday,
126
+ Wednesday,
127
+ Thursday,
128
+ Friday,
129
+ Saturday
130
+ ];
115
131
  const isRangeMode = mode === "range";
116
132
  const formattedValue = (0, import_utils2.formatDate)(mode, value, minDate, maxDate);
117
133
  const formattedDefaultValue = (0, import_utils2.formatDate)(
@@ -138,6 +154,22 @@ const Calendar = /* @__PURE__ */ import_react.default.forwardRef(
138
154
  }, [calendarValue]);
139
155
  const isMinMonth = (0, import_dayjs.default)(minDate).isSame(renderMonth, "month");
140
156
  const isMaxMonth = (0, import_dayjs.default)(maxDate).isSame(renderMonth, "month");
157
+ const headerBarIcon = {
158
+ left: headerBarLeftIcon ? headerBarLeftIcon({ isMinMonth }) : /* @__PURE__ */ import_react.default.createElement(
159
+ import_icons.CaretLeftIcon,
160
+ {
161
+ className: `${classes.handler}-btn-icon`,
162
+ htmlColor: isMinMonth && "#cccccc"
163
+ }
164
+ ),
165
+ right: headerBarRightIcon ? headerBarRightIcon({ isMaxMonth }) : /* @__PURE__ */ import_react.default.createElement(
166
+ import_icons.CaretRightIcon,
167
+ {
168
+ className: `${classes.handler}-btn-icon`,
169
+ htmlColor: isMaxMonth && "#cccccc"
170
+ }
171
+ )
172
+ };
141
173
  (0, import_utils.useDidMountEffect)(() => {
142
174
  const initMonth = formattedValue === void 0 ? formattedDefaultValue == null ? void 0 : formattedDefaultValue[0] : formattedValue == null ? void 0 : formattedValue[0];
143
175
  setRenderMonth((0, import_dayjs.default)(initMonth || minDate).toDate());
@@ -274,7 +306,7 @@ const Calendar = /* @__PURE__ */ import_react.default.forwardRef(
274
306
  setRenderMonth(month);
275
307
  onMonthChange == null ? void 0 : onMonthChange(e, {
276
308
  type: "prev",
277
- month: (0, import_dayjs.default)(month).format("YYYY/MM")
309
+ month: (0, import_dayjs.default)(month).format(headerBarFormat)
278
310
  });
279
311
  }
280
312
  };
@@ -284,7 +316,7 @@ const Calendar = /* @__PURE__ */ import_react.default.forwardRef(
284
316
  setRenderMonth(month);
285
317
  onMonthChange == null ? void 0 : onMonthChange(e, {
286
318
  type: "next",
287
- month: (0, import_dayjs.default)(month).format("YYYY/MM")
319
+ month: (0, import_dayjs.default)(month).format(headerBarFormat)
288
320
  });
289
321
  }
290
322
  };
@@ -326,19 +358,7 @@ const Calendar = /* @__PURE__ */ import_react.default.forwardRef(
326
358
  }, others), {
327
359
  "data-mode": mode
328
360
  }), data),
329
- /* @__PURE__ */ import_react.default.createElement("div", { className: classes.handler }, /* @__PURE__ */ import_react.default.createElement("div", { onClick: onClickPrev, className: `${classes.handler}-btn` }, /* @__PURE__ */ import_react.default.createElement(
330
- import_icons.CaretLeftIcon,
331
- {
332
- className: `${classes.handler}-btn-icon`,
333
- htmlColor: isMinMonth && "#cccccc"
334
- }
335
- )), /* @__PURE__ */ import_react.default.createElement("div", { className: `${classes.handler}-text`, onClick: onClickDate }, (0, import_dayjs.default)(renderMonth).format("YYYY/MM")), /* @__PURE__ */ import_react.default.createElement("div", { onClick: onClickNext, className: `${classes.handler}-btn` }, /* @__PURE__ */ import_react.default.createElement(
336
- import_icons.CaretRightIcon,
337
- {
338
- className: `${classes.handler}-btn-icon`,
339
- htmlColor: isMaxMonth && "#cccccc"
340
- }
341
- ))),
361
+ /* @__PURE__ */ import_react.default.createElement("div", { className: classes.handler }, /* @__PURE__ */ import_react.default.createElement("div", { onClick: onClickPrev, className: `${classes.handler}-btn` }, headerBarIcon.left), /* @__PURE__ */ import_react.default.createElement("div", { className: `${classes.handler}-text`, onClick: onClickDate }, (0, import_dayjs.default)(renderMonth).format(headerBarFormat)), /* @__PURE__ */ import_react.default.createElement("div", { onClick: onClickNext, className: `${classes.handler}-btn` }, headerBarIcon.right)),
342
362
  /* @__PURE__ */ import_react.default.createElement("div", { className: classes.week }, SUNDAY_WEEK_DATA == null ? void 0 : SUNDAY_WEEK_DATA.map((w) => {
343
363
  return weekRender ? weekRender(w) : /* @__PURE__ */ import_react.default.createElement("div", { key: w, className: `${classes.week}-item` }, w);
344
364
  })),
@@ -358,6 +378,7 @@ const Calendar = /* @__PURE__ */ import_react.default.forwardRef(
358
378
  Calendar.displayName = "BuiCalendar";
359
379
  Calendar.defaultProps = {
360
380
  hideDaysOutsideCurrentMonth: false,
381
+ headerBarFormat: "YYYY/MM",
361
382
  enableSelectYear: false,
362
383
  mode: "single",
363
384
  minDate: (0, import_dayjs.default)((0, import_dayjs.default)().format("YYYYMMDD")).add(0, "month").toDate(),
@@ -16,6 +16,12 @@ export interface ICalendarYearChangeData {
16
16
  /** 切换后的年份 */
17
17
  year: number;
18
18
  }
19
+ export interface ICustomIconProps {
20
+ /** 是否为可选范围内的最小月份 */
21
+ isMinMonth?: boolean;
22
+ /** 是否为可选范围内的最大月份 */
23
+ isMaxMonth?: boolean;
24
+ }
19
25
  export type ICalendarMode = 'single' | 'range';
20
26
  export type ICalendarValue = Date | Date[] | null;
21
27
  export type CalendarProps<D extends React.ElementType = 'div', P = {}> = OverrideProps<{
@@ -47,6 +53,21 @@ export type CalendarProps<D extends React.ElementType = 'div', P = {}> = Overrid
47
53
  * 是否隐藏当前月之外的日期,默认为false
48
54
  */
49
55
  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;
50
71
  /**
51
72
  * 不可选择的日期
52
73
  */
@@ -1,8 +1,9 @@
1
1
  .bui-card-footer {
2
+ --padding: var(--bui-card-footer-padding, var(--bui-spacing-md) var(--bui-spacing-lg));
2
3
  color: var(--bui-color-fg-muted);
3
4
  font-size: var(--bui-text-size-1);
4
5
  display: flex;
5
6
  align-items: center;
6
- padding: var(--bui-spacing-md) var(--bui-spacing-lg);
7
+ padding: var(--padding);
7
8
  font-family: var(--bui-font-family);
8
9
  }
@@ -1,11 +1,13 @@
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);
2
4
  display: flex;
3
5
  align-items: center;
4
6
  flex-direction: row;
5
7
  position: relative;
6
8
  padding: var(--bui-spacing-md) var(--bui-spacing-lg);
7
9
  font-size: var(--bui-title-size-4);
8
- font-weight: 500;
10
+ font-weight: var(--bui-font-weight-medium);
9
11
  color: var(--bui-color-fg-default);
10
12
  font-family: var(--bui-font-family);
11
13
  }
@@ -1,7 +1,9 @@
1
1
  .bui-checkbox {
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);
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);
5
7
  display: inline-flex;
6
8
  align-items: center;
7
9
  position: relative;
@@ -9,7 +11,7 @@
9
11
  }
10
12
  .bui-checkbox.bui-checkbox-disabled {
11
13
  pointer-events: none;
12
- opacity: 0.5;
14
+ opacity: var(--disabled-opacity);
13
15
  }
14
16
  .bui-checkbox-label-left {
15
17
  flex-direction: row-reverse;
@@ -35,7 +37,7 @@
35
37
  align-items: center;
36
38
  justify-content: center;
37
39
  flex-shrink: 0;
38
- padding: 5px;
40
+ padding: var(--icon-padding);
39
41
  box-sizing: border-box;
40
42
  font-size: var(--icon-font-size);
41
43
  }
@@ -1,14 +1,29 @@
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);
2
17
  font-family: var(--bui-font-family);
3
18
  height: 100%;
4
19
  position: relative;
5
20
  }
6
21
  .bui-city-selector-title {
7
22
  width: 100%;
8
- height: 45px;
23
+ height: var(--title-height);
9
24
  color: var(--bui-color-fg-default);
10
25
  font-size: var(--bui-title-size-3);
11
- line-height: 45px;
26
+ line-height: var(--title-line-height);
12
27
  text-align: center;
13
28
  position: sticky;
14
29
  top: 0;
@@ -20,20 +35,20 @@
20
35
  position: absolute;
21
36
  top: 0;
22
37
  right: 0;
23
- width: 45px;
24
- height: 45px;
38
+ width: var(--btn-close-size);
39
+ height: var(--btn-close-size);
25
40
  color: var(--bui-color-fg-muted);
26
41
  text-align: center;
27
- font-size: 20px;
42
+ font-size: var(--btn-close-font-size);
28
43
  }
29
44
  .bui-city-selector-scroll-view-container {
30
45
  height: 100%;
31
46
  }
32
47
  .bui-city-selector-scroll-view-container.container-has-title {
33
- height: calc(100% - 45px);
48
+ height: var(--container-with-title-height);
34
49
  }
35
50
  .bui-city-selector-all-city {
36
- min-height: 500px;
51
+ min-height: var(--city-container-min-height);
37
52
  font-size: var(--bui-text-size-2);
38
53
  width: 100%;
39
54
  background: var(--bui-color-bg-view);
@@ -42,22 +57,21 @@
42
57
  .bui-city-selector-all-city .select-city-buttons {
43
58
  display: flex;
44
59
  flex-flow: wrap;
45
- padding-left: 3px;
46
- padding-top: 7.5px;
60
+ padding: var(--select-city-buttons-padding);
47
61
  }
48
62
  .bui-city-selector-all-city .select-city-title {
49
63
  font-size: var(--bui-title-size-4);
50
- line-height: 15px;
51
- font-weight: 600;
64
+ line-height: var(--select-city-title-line-height);
65
+ font-weight: var(--bui-font-weight-bold);
52
66
  padding-left: var(--bui-spacing-lg);
53
- padding-top: 9px;
67
+ padding-top: var(--bui-spacing-md);
54
68
  }
55
69
  .bui-city-selector-list {
56
70
  padding-left: var(--bui-spacing-lg);
57
71
  list-style-type: none;
58
72
  }
59
73
  .bui-city-selector-list-item {
60
- height: 45px;
74
+ height: var(--list-item-height);
61
75
  font-size: var(--bui-title-size-4);
62
76
  display: flex;
63
77
  align-items: center;
@@ -81,7 +95,7 @@
81
95
  transform: translate(0, -50%);
82
96
  }
83
97
  .bui-city-selector-index-container.city-index-has-title {
84
- top: calc(50% + 22.5px);
98
+ top: var(--city-index-has-title-top);
85
99
  }
86
100
  .bui-city-selector-index-container ul {
87
101
  margin: 0;
@@ -92,7 +106,7 @@
92
106
  }
93
107
  .bui-city-selector-index-container li {
94
108
  list-style: none;
95
- height: 20px;
109
+ height: var(--index-item-height);
96
110
  text-align: center;
97
111
  font-size: var(--bui-text-size-3);
98
112
  color: var(--bui-color-info, --bui-color-info);
@@ -59,34 +59,31 @@ 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");
62
63
  var import_ScrollView = __toESM(require("../ScrollView"));
63
64
  var import_Selector = __toESM(require("./Selector"));
64
65
  var import_CitySelector2 = require("./CitySelector.css");
65
66
  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
- };
78
67
  const prefixCls = "bui-city-selector";
79
68
  const CitySelector = /* @__PURE__ */ import_react.default.forwardRef(
80
69
  (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");
81
78
  const _a = props, {
82
79
  className,
83
80
  title: pageTitle,
84
81
  selectedCity,
85
- selectedCityGroupName = "\u5F53\u524D\u57CE\u5E02",
82
+ selectedCityGroupName = selectedCityGroupLocaleName,
86
83
  currentCity,
87
- currentCityGroupName = "\u5B9A\u4F4D\u57CE\u5E02",
84
+ currentCityGroupName = currentCityGroupLocaleName,
88
85
  hotCities,
89
- hotCitiesGroupName = "\u70ED\u95E8\u57CE\u5E02",
86
+ hotCitiesGroupName = hotCitiesGroupLocaleName,
90
87
  cities,
91
88
  disableIndex,
92
89
  touchHandler,
@@ -109,6 +106,18 @@ const CitySelector = /* @__PURE__ */ import_react.default.forwardRef(
109
106
  "onSelect",
110
107
  "onClose"
111
108
  ]);
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
+ };
112
121
  const cityRef = (0, import_react.useRef)(null);
113
122
  const nodeRef = (0, import_utils.useForkRef)(ref, cityRef);
114
123
  (0, import_utils.useTouchEmulator)(cityRef.current);
@@ -167,7 +176,7 @@ const CitySelector = /* @__PURE__ */ import_react.default.forwardRef(
167
176
  };
168
177
  const renderTitile = (title, titleCode) => {
169
178
  const parseTitle = (titleCode || title).toUpperCase();
170
- return /* @__PURE__ */ import_react.default.createElement("div", { className: "select-city-title", id: disableIndex ? "" : parseTitle }, title.toUpperCase());
179
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "select-city-title", id: disableIndex ? "" : parseTitle }, title == null ? void 0 : title.toUpperCase());
171
180
  };
172
181
  const renderCity = (citys, title, titleCode) => {
173
182
  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: 111px;
3
- height: 36px;
2
+ width: var(--select-item-width);
3
+ height: var(--select-item-height);
4
4
  display: inline-flex;
5
5
  justify-content: center;
6
6
  align-items: center;
7
- border-radius: 20px;
8
- margin: 4.5px 0 4.5px 9px;
7
+ border-radius: var(--select-item-border-radius);
8
+ margin: var(--select-item-margin);
9
9
  background-color: var(--bui-color-bg-default);
10
10
  font-size: var(--bui-text-size-2);
11
11
  }