@bifrostui/react 1.0.5 → 1.1.5

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 (233) hide show
  1. package/dist/ActionSheet/ActionSheet.less +31 -0
  2. package/dist/ActionSheet/ActionSheetItem.less +62 -0
  3. package/dist/Alert/index.less +112 -0
  4. package/dist/Avatar/Avatar.less +52 -0
  5. package/dist/Avatar/AvatarGroup.less +39 -0
  6. package/dist/Backdrop/{Backdrop.css → Backdrop.less} +4 -3
  7. package/dist/Badge/Badge.less +118 -0
  8. package/dist/Button/Button.less +244 -0
  9. package/dist/Calendar/Calendar.less +126 -0
  10. package/{es/Card/Card.css → dist/Card/Card.less} +1 -0
  11. package/dist/Card/CardHeader.less +53 -0
  12. package/dist/Checkbox/Checkbox.less +55 -0
  13. package/dist/CitySelector/CitySelector.d.ts +4 -0
  14. package/dist/CitySelector/CitySelector.js +36 -0
  15. package/dist/CitySelector/CitySelector.less +122 -0
  16. package/dist/CitySelector/CitySelector.miniapp.d.ts +5 -0
  17. package/dist/CitySelector/CitySelector.miniapp.js +79 -0
  18. package/dist/CitySelector/CitySelector.types.d.ts +47 -0
  19. package/dist/CitySelector/CitySelector.types.js +5 -0
  20. package/dist/CitySelector/CitySelectorCore.d.ts +5 -0
  21. package/dist/CitySelector/CitySelectorCore.js +183 -0
  22. package/dist/CitySelector/Selector/index.d.ts +9 -0
  23. package/dist/CitySelector/Selector/index.js +22 -0
  24. package/dist/CitySelector/Selector/index.less +13 -0
  25. package/dist/CitySelector/index.d.ts +2 -0
  26. package/dist/CitySelector/index.js +34 -0
  27. package/dist/CitySelector/miniapp.less +4 -0
  28. package/dist/Countdown/Countdown.less +39 -0
  29. package/dist/Divider/Divider.less +50 -0
  30. package/dist/Drawer/Drawer.less +40 -0
  31. package/dist/IconButton/IconButton.less +167 -0
  32. package/dist/Image/index.less +40 -0
  33. package/dist/Input/Input.less +72 -0
  34. package/dist/List/{List.css → List.less} +1 -0
  35. package/dist/List/{ListItem.css → ListItem.less} +17 -6
  36. package/dist/List/{ListItemContent.css → ListItemContent.less} +7 -2
  37. package/dist/List/{ListItemFooter.css → ListItemFooter.less} +4 -3
  38. package/dist/Loading/Loading.less +40 -0
  39. package/dist/Modal/{Modal.css → Modal.less} +8 -6
  40. package/dist/Modal/Modal.miniapp.d.ts +16 -0
  41. package/dist/Modal/Modal.miniapp.js +73 -0
  42. package/dist/NavBar/NavBar.less +67 -0
  43. package/dist/Picker/Picker.d.ts +5 -0
  44. package/dist/Picker/Picker.js +155 -0
  45. package/dist/Picker/Picker.less +62 -0
  46. package/dist/Picker/Picker.types.d.ts +98 -0
  47. package/dist/Picker/Picker.types.js +5 -0
  48. package/dist/Picker/PickerPanel.d.ts +5 -0
  49. package/dist/Picker/PickerPanel.js +210 -0
  50. package/dist/Picker/PickerPanel.less +67 -0
  51. package/dist/Picker/index.d.ts +2 -0
  52. package/dist/Picker/index.js +34 -0
  53. package/dist/Picker/utils.d.ts +13 -0
  54. package/dist/Picker/utils.js +66 -0
  55. package/dist/Progress/Progress.less +24 -0
  56. package/dist/Radio/Radio.less +81 -0
  57. package/dist/Rating/Rating.less +64 -0
  58. package/dist/ScrollView/{ScrollView.css → ScrollView.less} +4 -0
  59. package/dist/Select/Select.less +105 -0
  60. package/dist/Skeleton/Skeleton.less +72 -0
  61. package/dist/Slider/Slider.less +108 -0
  62. package/dist/Stack/demo/index.less +27 -0
  63. package/dist/Steps/Step.less +228 -0
  64. package/{es/Steps/Steps.css → dist/Steps/Steps.less} +5 -3
  65. package/dist/Swiper/Swiper.less +25 -0
  66. package/dist/Switch/Switch.less +177 -0
  67. package/dist/TabBar/TabBarItem.less +54 -0
  68. package/dist/Tabs/Tab.js +1 -1
  69. package/dist/Tabs/Tab.less +60 -0
  70. package/dist/Tabs/TabPanel.less +11 -0
  71. package/dist/Tabs/Tabs.less +77 -0
  72. package/dist/Tag/Tag.less +119 -0
  73. package/dist/Tag/TagGroup.less +52 -0
  74. package/dist/TextArea/{TextArea.css → TextArea.less} +27 -19
  75. package/dist/index.d.ts +2 -0
  76. package/dist/index.js +22 -0
  77. package/es/ActionSheet/ActionSheet.less +31 -0
  78. package/es/ActionSheet/ActionSheetItem.less +62 -0
  79. package/es/Alert/index.less +112 -0
  80. package/es/Avatar/Avatar.less +52 -0
  81. package/es/Avatar/AvatarGroup.less +39 -0
  82. package/es/Backdrop/{Backdrop.css → Backdrop.less} +4 -3
  83. package/es/Badge/Badge.less +118 -0
  84. package/es/Button/Button.less +244 -0
  85. package/es/Calendar/Calendar.less +126 -0
  86. package/{dist/Card/Card.css → es/Card/Card.less} +1 -0
  87. package/es/Card/CardHeader.less +53 -0
  88. package/es/Checkbox/Checkbox.less +55 -0
  89. package/es/CitySelector/CitySelector.d.ts +4 -0
  90. package/es/CitySelector/CitySelector.js +36 -0
  91. package/es/CitySelector/CitySelector.less +122 -0
  92. package/es/CitySelector/CitySelector.miniapp.d.ts +5 -0
  93. package/es/CitySelector/CitySelector.miniapp.js +77 -0
  94. package/es/CitySelector/CitySelector.types.d.ts +47 -0
  95. package/es/CitySelector/CitySelector.types.js +1 -0
  96. package/es/CitySelector/CitySelectorCore.d.ts +5 -0
  97. package/es/CitySelector/CitySelectorCore.js +194 -0
  98. package/es/CitySelector/Selector/index.d.ts +9 -0
  99. package/es/CitySelector/Selector/index.js +13 -0
  100. package/es/CitySelector/Selector/index.less +13 -0
  101. package/es/CitySelector/index.d.ts +2 -0
  102. package/es/CitySelector/index.js +2 -0
  103. package/es/CitySelector/miniapp.less +4 -0
  104. package/es/Countdown/Countdown.less +39 -0
  105. package/es/Divider/Divider.less +50 -0
  106. package/es/Drawer/Drawer.less +40 -0
  107. package/es/IconButton/IconButton.less +167 -0
  108. package/es/Image/index.less +40 -0
  109. package/es/Input/Input.less +72 -0
  110. package/es/List/{List.css → List.less} +1 -0
  111. package/es/List/{ListItem.css → ListItem.less} +17 -6
  112. package/es/List/{ListItemContent.css → ListItemContent.less} +7 -2
  113. package/es/List/{ListItemFooter.css → ListItemFooter.less} +4 -3
  114. package/es/Loading/Loading.less +40 -0
  115. package/es/Modal/{Modal.css → Modal.less} +8 -6
  116. package/es/Modal/Modal.miniapp.d.ts +16 -0
  117. package/es/Modal/Modal.miniapp.js +78 -0
  118. package/es/NavBar/NavBar.less +67 -0
  119. package/es/Picker/Picker.d.ts +5 -0
  120. package/es/Picker/Picker.js +171 -0
  121. package/es/Picker/Picker.less +62 -0
  122. package/es/Picker/Picker.types.d.ts +98 -0
  123. package/es/Picker/Picker.types.js +1 -0
  124. package/es/Picker/PickerPanel.d.ts +5 -0
  125. package/es/Picker/PickerPanel.js +234 -0
  126. package/es/Picker/PickerPanel.less +67 -0
  127. package/es/Picker/index.d.ts +2 -0
  128. package/es/Picker/index.js +2 -0
  129. package/es/Picker/utils.d.ts +13 -0
  130. package/es/Picker/utils.js +65 -0
  131. package/es/Progress/Progress.less +24 -0
  132. package/es/Radio/Radio.less +81 -0
  133. package/es/Rating/Rating.less +64 -0
  134. package/es/ScrollView/{ScrollView.css → ScrollView.less} +4 -0
  135. package/es/Select/Select.less +105 -0
  136. package/es/Skeleton/Skeleton.less +72 -0
  137. package/es/Slider/Slider.less +108 -0
  138. package/es/Stack/demo/index.less +27 -0
  139. package/es/Steps/Step.less +228 -0
  140. package/{dist/Steps/Steps.css → es/Steps/Steps.less} +5 -3
  141. package/es/Swiper/Swiper.less +25 -0
  142. package/es/Switch/Switch.less +177 -0
  143. package/es/TabBar/TabBarItem.less +54 -0
  144. package/es/Tabs/Tab.js +1 -1
  145. package/es/Tabs/Tab.less +60 -0
  146. package/es/Tabs/TabPanel.less +11 -0
  147. package/es/Tabs/Tabs.less +77 -0
  148. package/es/Tag/Tag.less +119 -0
  149. package/es/Tag/TagGroup.less +52 -0
  150. package/es/TextArea/{TextArea.css → TextArea.less} +27 -19
  151. package/es/index.d.ts +2 -0
  152. package/es/index.js +3 -1
  153. package/package.json +6 -6
  154. package/dist/ActionSheet/ActionSheet.css +0 -27
  155. package/dist/ActionSheet/ActionSheetItem.css +0 -51
  156. package/dist/Alert/index.css +0 -89
  157. package/dist/Avatar/Avatar.css +0 -43
  158. package/dist/Avatar/AvatarGroup.css +0 -31
  159. package/dist/Badge/Badge.css +0 -95
  160. package/dist/Button/Button.css +0 -200
  161. package/dist/Calendar/Calendar.css +0 -105
  162. package/dist/Card/CardHeader.css +0 -45
  163. package/dist/Checkbox/Checkbox.css +0 -45
  164. package/dist/Countdown/Countdown.css +0 -28
  165. package/dist/Divider/Divider.css +0 -41
  166. package/dist/Drawer/Drawer.css +0 -35
  167. package/dist/IconButton/IconButton.css +0 -130
  168. package/dist/Image/index.css +0 -35
  169. package/dist/Input/Input.css +0 -59
  170. package/dist/Loading/Loading.css +0 -31
  171. package/dist/NavBar/NavBar.css +0 -57
  172. package/dist/Progress/Progress.css +0 -22
  173. package/dist/Radio/Radio.css +0 -65
  174. package/dist/Rating/Rating.css +0 -52
  175. package/dist/Select/Select.css +0 -89
  176. package/dist/Skeleton/Skeleton.css +0 -54
  177. package/dist/Slider/Slider.css +0 -95
  178. package/dist/Stack/demo/index.css +0 -23
  179. package/dist/Steps/Step.css +0 -174
  180. package/dist/Swiper/Swiper.css +0 -20
  181. package/dist/Switch/Switch.css +0 -127
  182. package/dist/TabBar/TabBarItem.css +0 -38
  183. package/dist/Tabs/Tab.css +0 -52
  184. package/dist/Tabs/TabPanel.css +0 -9
  185. package/dist/Tabs/Tabs.css +0 -56
  186. package/dist/Tag/Tag.css +0 -97
  187. package/dist/Tag/TagGroup.css +0 -43
  188. package/es/ActionSheet/ActionSheet.css +0 -27
  189. package/es/ActionSheet/ActionSheetItem.css +0 -51
  190. package/es/Alert/index.css +0 -89
  191. package/es/Avatar/Avatar.css +0 -43
  192. package/es/Avatar/AvatarGroup.css +0 -31
  193. package/es/Badge/Badge.css +0 -95
  194. package/es/Button/Button.css +0 -200
  195. package/es/Calendar/Calendar.css +0 -105
  196. package/es/Card/CardHeader.css +0 -45
  197. package/es/Checkbox/Checkbox.css +0 -45
  198. package/es/Countdown/Countdown.css +0 -28
  199. package/es/Divider/Divider.css +0 -41
  200. package/es/Drawer/Drawer.css +0 -35
  201. package/es/IconButton/IconButton.css +0 -130
  202. package/es/Image/index.css +0 -35
  203. package/es/Input/Input.css +0 -59
  204. package/es/Loading/Loading.css +0 -31
  205. package/es/NavBar/NavBar.css +0 -57
  206. package/es/Progress/Progress.css +0 -22
  207. package/es/Radio/Radio.css +0 -65
  208. package/es/Rating/Rating.css +0 -52
  209. package/es/Select/Select.css +0 -89
  210. package/es/Skeleton/Skeleton.css +0 -54
  211. package/es/Slider/Slider.css +0 -95
  212. package/es/Stack/demo/index.css +0 -23
  213. package/es/Steps/Step.css +0 -174
  214. package/es/Swiper/Swiper.css +0 -20
  215. package/es/Switch/Switch.css +0 -127
  216. package/es/TabBar/TabBarItem.css +0 -38
  217. package/es/Tabs/Tab.css +0 -52
  218. package/es/Tabs/TabPanel.css +0 -9
  219. package/es/Tabs/Tabs.css +0 -56
  220. package/es/Tag/Tag.css +0 -97
  221. package/es/Tag/TagGroup.css +0 -43
  222. /package/dist/Card/{CardContent.css → CardContent.less} +0 -0
  223. /package/dist/Card/{CardFooter.css → CardFooter.less} +0 -0
  224. /package/dist/List/{ListItemExtra.css → ListItemExtra.less} +0 -0
  225. /package/dist/List/{ListItemHeader.css → ListItemHeader.less} +0 -0
  226. /package/dist/Stack/{Stack.css → Stack.less} +0 -0
  227. /package/dist/TabBar/{TabBar.css → TabBar.less} +0 -0
  228. /package/es/Card/{CardContent.css → CardContent.less} +0 -0
  229. /package/es/Card/{CardFooter.css → CardFooter.less} +0 -0
  230. /package/es/List/{ListItemExtra.css → ListItemExtra.less} +0 -0
  231. /package/es/List/{ListItemHeader.css → ListItemHeader.less} +0 -0
  232. /package/es/Stack/{Stack.css → Stack.less} +0 -0
  233. /package/es/TabBar/{TabBar.css → TabBar.less} +0 -0
@@ -8,7 +8,8 @@
8
8
  left: 0;
9
9
  top: 0;
10
10
  background-color: rgba(0, 0, 0, 0.68);
11
- }
12
- .bui-backdrop-invisible {
13
- background-color: transparent;
11
+
12
+ &-invisible {
13
+ background-color: transparent;
14
+ }
14
15
  }
@@ -0,0 +1,118 @@
1
+ .bui-badge-position(@offset) {
2
+ top: @offset;
3
+ right: @offset;
4
+ transform: scale(1) translate(50%, -50%);
5
+ }
6
+ .bui-badge-bubble-radius() {
7
+ border-radius: 6px 6px 6px 0;
8
+ }
9
+
10
+ .bui-badge {
11
+ display: inline-block;
12
+ font-family: var(--bui-font-family);
13
+
14
+ &-position {
15
+ position: relative;
16
+
17
+ .bui-badge-contained,
18
+ .bui-badge-outlined {
19
+ position: absolute;
20
+ .bui-badge-position(14%);
21
+ }
22
+
23
+ .bui-badge-dot {
24
+ .bui-badge-position(14%);
25
+ }
26
+
27
+ .bui-badge-bubble {
28
+ .bui-badge-position(14%);
29
+ }
30
+ }
31
+
32
+ &-contained,
33
+ &-outlined {
34
+ display: flex;
35
+ box-sizing: border-box;
36
+ align-items: center;
37
+ justify-content: center;
38
+ min-width: 15px;
39
+ height: 15px;
40
+ line-height: 15px;
41
+ padding: 0 3px;
42
+ font-size: var(--bui-text-size-4);
43
+ border-radius: 8px;
44
+ color: var(--bui-color-bg-view);
45
+ white-space: nowrap;
46
+ z-index: 1;
47
+ }
48
+
49
+ &-outlined {
50
+ padding: 0 2px;
51
+ }
52
+
53
+ &-primary {
54
+ background-color: var(--bui-color-primary);
55
+ }
56
+
57
+ &-success {
58
+ background-color: var(--bui-color-success);
59
+ }
60
+
61
+ &-info {
62
+ background-color: var(--bui-color-info);
63
+ }
64
+
65
+ &-warning {
66
+ background-color: var(--bui-color-warning);
67
+ }
68
+
69
+ &-danger {
70
+ background-color: var(--bui-color-danger);
71
+ }
72
+
73
+ &-dot {
74
+ width: 9px;
75
+ min-width: 0;
76
+ height: 9px;
77
+ padding: 0;
78
+ border-radius: 100%;
79
+ }
80
+
81
+ &-bubble {
82
+ .bui-badge-bubble-radius();
83
+ padding: 0 5px;
84
+ }
85
+
86
+ &-outlined {
87
+ background: var(--bui-color-bg-view);
88
+ }
89
+
90
+ &-outlined&-primary {
91
+ border: 1px solid var(--bui-color-primary);
92
+ color: var(--bui-color-primary);
93
+ }
94
+
95
+ &-outlined&-success {
96
+ border: 1px solid var(--bui-color-success);
97
+ color: var(--bui-color-success);
98
+ }
99
+
100
+ &-outlined&-info {
101
+ border: 1px solid var(--bui-color-info);
102
+ color: var(--bui-color-info);
103
+ }
104
+
105
+ &-outlined&-warning {
106
+ border: 1px solid var(--bui-color-warning);
107
+ color: var(--bui-color-warning);
108
+ }
109
+
110
+ &-outlined&-danger {
111
+ border: 1px solid var(--bui-color-danger);
112
+ color: var(--bui-color-danger);
113
+ }
114
+
115
+ &-outlined&-bubble {
116
+ .bui-badge-bubble-radius();
117
+ }
118
+ }
@@ -0,0 +1,244 @@
1
+ @import '~@bifrostui/styles/mixins/index.less';
2
+
3
+ .btn-icon() {
4
+ display: inline-flex;
5
+ align-self: center;
6
+ flex-shrink: 0;
7
+ }
8
+
9
+ .btn-outline(@color) {
10
+ color: var(~'--bui-color-@{color}');
11
+ border-color: var(~'--bui-color-@{color}');
12
+ }
13
+
14
+ .btn-contained(@color) {
15
+ color: var(--bui-color-white);
16
+ .linear-gradient(var(~'--bui-color-@{color}-start'), var(~'--bui-color-@{color}-end'));
17
+ }
18
+
19
+ .btn-light(@color) {
20
+ background-image: none;
21
+ border: 1px solid transparent;
22
+ color: var(~'--bui-color-@{color}');
23
+ background-color: var(~'--bui-color-@{color}-light');
24
+ }
25
+
26
+ .btn-text(@color) {
27
+ color: var(~'--bui-color-@{color}');
28
+ }
29
+
30
+ .bui-btn {
31
+ --bg-color: var(--bui-button-default-bg-color, var(--bui-color-neutral-5));
32
+ --text-color: var(--bui-button-text-color, var(--bui-color-fg-muted));
33
+ --border-color: var(--bui-button-border-color, var(--bui-color-neutral-4));
34
+ --border-radius: var(--bui-button-border-radius, 100px);
35
+ --font-weight: var(--bui-button-font-weight, var(--bui-font-weight-medium));
36
+ border: 1px solid transparent;
37
+ outline: 0;
38
+ background-color: transparent;
39
+ cursor: pointer;
40
+ color: var(--text-color);
41
+ box-sizing: border-box;
42
+ position: relative;
43
+ display: inline-flex;
44
+ margin: 0;
45
+ align-items: center;
46
+ justify-content: center;
47
+ white-space: nowrap;
48
+ font-size: var(--bui-text-size-3);
49
+ font-weight: var(--font-weight);
50
+ border-radius: var(--border-radius);
51
+ height: 27px;
52
+ line-height: var(--bui-line-height);
53
+ font-family: var(--bui-font-family);
54
+
55
+ @keyframes spin {
56
+ from {
57
+ transform: rotate(0deg);
58
+ }
59
+
60
+ to {
61
+ transform: rotate(360deg);
62
+ }
63
+ }
64
+
65
+ &::after {
66
+ border: 0;
67
+ }
68
+
69
+ &::before {
70
+ position: absolute;
71
+ top: 50%;
72
+ left: 50%;
73
+ width: 100%;
74
+ height: 100%;
75
+ background-color: var(--bui-color-black);
76
+ border: inherit;
77
+ border-color: var(--bui-color-black);
78
+ border-radius: inherit;
79
+ transform: translate(-50%, -50%);
80
+ opacity: 0;
81
+ content: ' ';
82
+ }
83
+
84
+ &:active::before {
85
+ opacity: 0.04;
86
+ }
87
+
88
+ &-icon-start {
89
+ .btn-icon();
90
+ margin-right: var(--bui-spacing-xs);
91
+ }
92
+
93
+ &-icon-end {
94
+ .btn-icon();
95
+ margin-left: var(--bui-spacing-xs);
96
+ }
97
+
98
+ &-disabled {
99
+ pointer-events: none;
100
+ opacity: 0.5;
101
+ }
102
+
103
+ &-small {
104
+ font-size: var(--bui-text-size-4);
105
+ padding: 0 11px;
106
+ height: 24px;
107
+ }
108
+
109
+ &-medium {
110
+ padding: 0 14px;
111
+ height: 27px;
112
+ }
113
+
114
+ &-large {
115
+ font-size: var(--bui-text-size-2);
116
+ padding: 0 14px;
117
+ height: 33px;
118
+ }
119
+
120
+ &-full {
121
+ font-size: var(--bui-title-size-4);
122
+ width: 100%;
123
+ height: 42px;
124
+ }
125
+
126
+ &-text {
127
+ &.bui-btn-primary {
128
+ .btn-text(primary);
129
+ }
130
+
131
+ &.bui-btn-success {
132
+ .btn-text(success);
133
+ }
134
+
135
+ &.bui-btn-info {
136
+ .btn-text(info);
137
+ }
138
+
139
+ &.bui-btn-warning {
140
+ .btn-text(warning);
141
+ }
142
+
143
+ &.bui-btn-danger {
144
+ .btn-text(danger);
145
+ }
146
+
147
+ &.bui-btn-vip {
148
+ .btn-text(vip);
149
+ }
150
+ }
151
+
152
+ &-contained {
153
+ background-color: var(--bg-color);
154
+
155
+ &.bui-btn-primary {
156
+ .btn-contained(primary);
157
+ }
158
+
159
+ &.bui-btn-success {
160
+ .btn-contained(success);
161
+ }
162
+
163
+ &.bui-btn-info {
164
+ .btn-contained(info);
165
+ }
166
+
167
+ &.bui-btn-warning {
168
+ .btn-contained(warning);
169
+ }
170
+
171
+ &.bui-btn-danger {
172
+ .btn-contained(danger);
173
+ }
174
+
175
+ &.bui-btn-vip {
176
+ color: #582331;
177
+ background-image: linear-gradient(
178
+ 90deg,
179
+ var(--bui-color-vip-start) 3%,
180
+ var(--bui-color-vip-end) 100%
181
+ );
182
+ }
183
+ }
184
+
185
+ &-outlined {
186
+ border: solid 1px var(--border-color);
187
+
188
+ &.bui-btn-primary {
189
+ .btn-outline(primary);
190
+ }
191
+
192
+ &.bui-btn-success {
193
+ .btn-outline(success);
194
+ }
195
+
196
+ &.bui-btn-info {
197
+ .btn-outline(info);
198
+ }
199
+
200
+ &.bui-btn-warning {
201
+ .btn-outline(warning);
202
+ }
203
+
204
+ &.bui-btn-danger {
205
+ .btn-outline(danger);
206
+ }
207
+
208
+ &.bui-btn-vip {
209
+ .btn-outline(vip);
210
+ }
211
+ }
212
+
213
+ &-light {
214
+ background-image: none;
215
+ background-color: var(--bui-color-gray-light);
216
+ border: 1px solid transparent;
217
+
218
+ &.bui-btn-warning {
219
+ .btn-light(warning);
220
+ }
221
+
222
+ &.bui-btn-primary {
223
+ .btn-light(primary);
224
+ }
225
+
226
+ &.bui-btn-info {
227
+ .btn-light(info);
228
+ }
229
+
230
+ &.bui-btn-success {
231
+ .btn-light(success);
232
+ }
233
+
234
+ &.bui-btn-danger {
235
+ .btn-light(danger);
236
+ }
237
+
238
+ &.bui-btn-vip {
239
+ color: var(--bui-color-vip);
240
+ position: relative;
241
+ background-color: fade(#ff866e, 30%);
242
+ }
243
+ }
244
+ }
@@ -0,0 +1,126 @@
1
+ @import '~@bifrostui/styles/mixins/index.less';
2
+
3
+ .bui-calendar {
4
+ overflow: hidden;
5
+ display: flex;
6
+ flex-direction: column;
7
+ background-color: var(--bui-color-bg-view);
8
+ position: relative;
9
+ width: 100%;
10
+ box-sizing: border-box;
11
+ padding: 6px 12px 7px;
12
+ font-family: var(--bui-font-family);
13
+
14
+ &-week {
15
+ height: 30px;
16
+ font-size: var(--bui-text-size-2);
17
+ font-weight: var(--bui-font-weight-medium);
18
+ color: var(--bui-color-fg-default);
19
+ display: flex;
20
+ align-items: center;
21
+ justify-content: space-between;
22
+
23
+ &-item {
24
+ width: 14.28%;
25
+ display: flex;
26
+ align-items: center;
27
+ justify-content: center;
28
+ }
29
+
30
+ &-item:nth-child(1),
31
+ &-item:nth-child(7) {
32
+ color: var(--bui-color-primary);
33
+ }
34
+ }
35
+
36
+ &-handler {
37
+ height: 28px;
38
+ display: flex;
39
+ align-items: center;
40
+ justify-content: center;
41
+ margin-bottom: 7px;
42
+
43
+ &-text {
44
+ width: 80px;
45
+ font-size: var(--bui-title-size-3);
46
+ font-weight: var(--bui-font-weight-medium);
47
+ text-align: center;
48
+ }
49
+
50
+ &-btn {
51
+ font-size: 16px;
52
+ height: 100%;
53
+ width: 46px;
54
+ cursor: pointer;
55
+ display: flex;
56
+ align-items: center;
57
+ justify-content: center;
58
+
59
+ &-icon {
60
+ font-size: 28px;
61
+ }
62
+ }
63
+ }
64
+
65
+ &-month {
66
+ display: flex;
67
+ flex-wrap: wrap;
68
+ margin-bottom: var(--bui-spacing-sm);
69
+ }
70
+
71
+ &-day-box {
72
+ width: 14.28%;
73
+ height: 30px;
74
+ margin-bottom: 7px;
75
+ }
76
+
77
+ &-highlight-day {
78
+ .bui-calendar-day {
79
+ color: var(--bui-color-primary);
80
+ }
81
+ }
82
+
83
+ &-day {
84
+ width: 100%;
85
+ height: 100%;
86
+ display: flex;
87
+ align-items: center;
88
+ justify-content: center;
89
+ border-radius: 6px;
90
+ font-size: var(--bui-title-size-4);
91
+ font-weight: var(--bui-font-weight-medium);
92
+ color: var(--bui-color-fg-default);
93
+ cursor: pointer;
94
+
95
+ &.bui-calendar-disabled {
96
+ color: #9c9ca5;
97
+ }
98
+ }
99
+
100
+ &-today {
101
+ color: var(--bui-color-primary);
102
+ }
103
+
104
+ &-middle {
105
+ color: #000;
106
+ border-radius: 0;
107
+ background-color: #ffeaf1;
108
+ }
109
+
110
+ &-start {
111
+ color: #000;
112
+ background-color: #ffc7da;
113
+ }
114
+
115
+ &-range {
116
+ border-top-right-radius: 0;
117
+ border-bottom-right-radius: 0;
118
+ }
119
+
120
+ &-end {
121
+ color: #000;
122
+ background-color: #ffc7da;
123
+ border-top-left-radius: 0;
124
+ border-bottom-left-radius: 0;
125
+ }
126
+ }
@@ -4,6 +4,7 @@
4
4
  overflow: hidden;
5
5
  font-family: var(--bui-font-family);
6
6
  }
7
+
7
8
  .bui-card-header + .bui-card-content {
8
9
  padding-top: 0;
9
10
  }
@@ -0,0 +1,53 @@
1
+ .bui-card-flex() {
2
+ display: flex;
3
+ align-items: center;
4
+ flex-direction: row;
5
+ }
6
+
7
+ .bui-card-header {
8
+ .bui-card-flex();
9
+ position: relative;
10
+ padding: var(--bui-spacing-md) var(--bui-spacing-lg);
11
+ font-size: var(--bui-title-size-4);
12
+ font-weight: 500;
13
+ color: var(--bui-color-fg-default);
14
+ font-family: var(--bui-font-family);
15
+
16
+ &-title {
17
+ white-space: nowrap;
18
+ overflow: hidden;
19
+ text-overflow: ellipsis;
20
+ max-width: 100%;
21
+ flex-shrink: 0;
22
+ }
23
+
24
+ &-subtitle {
25
+ font-size: var(--bui-text-size-3);
26
+ font-weight: normal;
27
+ white-space: nowrap;
28
+ overflow: hidden;
29
+ text-overflow: ellipsis;
30
+ color: var(--bui-color-fg-subtle);
31
+ padding: 0 var(--bui-spacing-xs);
32
+ }
33
+
34
+ &-extra {
35
+ white-space: nowrap;
36
+ }
37
+
38
+ &-end-icon {
39
+ .bui-card-flex();
40
+ }
41
+
42
+ &-extra,
43
+ &-end-icon {
44
+ font-size: var(--bui-text-size-3);
45
+ font-weight: normal;
46
+ color: var(--bui-color-fg-subtle);
47
+ margin-left: auto;
48
+ }
49
+
50
+ &-extra + &-end-icon {
51
+ margin-left: 2px;
52
+ }
53
+ }
@@ -0,0 +1,55 @@
1
+ @import '~@bifrostui/styles/mixins/index.less';
2
+
3
+ .bui-checkbox {
4
+ --label-color: var(--bui-color-fg-default);
5
+ --label-font-size: var(--bui-text-size-1);
6
+ --icon-font-size: var(--bui-title-size-2);
7
+ display: inline-flex;
8
+ align-items: center;
9
+ position: relative;
10
+ font-family: var(--bui-font-family);
11
+
12
+ &.bui-checkbox-disabled {
13
+ pointer-events: none;
14
+ opacity: 0.5;
15
+ }
16
+
17
+ &-label-left {
18
+ flex-direction: row-reverse;
19
+ }
20
+
21
+ &-label-top {
22
+ flex-direction: column-reverse;
23
+ }
24
+
25
+ &-label-bottom {
26
+ flex-direction: column;
27
+ }
28
+
29
+ &-input {
30
+ opacity: 0;
31
+ // 解决onClick触发两次的问题 & 微信文案点击选中
32
+ width: 100%;
33
+ height: 100%;
34
+ position: absolute;
35
+ top: 0;
36
+ left: 0;
37
+ cursor: pointer;
38
+ z-index: 1;
39
+ }
40
+
41
+ &-icon {
42
+ display: flex;
43
+ align-items: center;
44
+ justify-content: center;
45
+ flex-shrink: 0;
46
+ padding: 5px;
47
+ box-sizing: border-box;
48
+ font-size: var(--icon-font-size);
49
+ }
50
+
51
+ &-label {
52
+ font-size: var(--label-font-size);
53
+ color: var(--label-color);
54
+ }
55
+ }
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { CitySelectorProps } from './CitySelector.types';
3
+ declare const CitySelector: React.ForwardRefExoticComponent<Omit<CitySelectorProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
+ export default CitySelector;
@@ -0,0 +1,36 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
3
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
5
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
6
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
7
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
8
+ import React, { useEffect, useState } from 'react';
9
+ import CitySelectorCore from "./CitySelectorCore";
10
+ var CitySelector = /*#__PURE__*/React.forwardRef(function (props, ref) {
11
+ var cities = props.cities;
12
+ var _useState = useState(''),
13
+ _useState2 = _slicedToArray(_useState, 2),
14
+ height = _useState2[0],
15
+ setHeight = _useState2[1];
16
+ var touchHandler = function touchHandler(e, scrollToCode) {
17
+ var _t$dataset;
18
+ var t = document.elementFromPoint(e.changedTouches[0].clientX, e.changedTouches[0].clientY);
19
+ var code = t === null || t === void 0 || (_t$dataset = t.dataset) === null || _t$dataset === void 0 ? void 0 : _t$dataset.code;
20
+ scrollToCode(code);
21
+ };
22
+ useEffect(function () {
23
+ var _document$querySelect;
24
+ if (!(cities !== null && cities !== void 0 && cities.length) || height) return;
25
+ var screenHeight = window.innerHeight || document.documentElement.clientHeight;
26
+ var domHeight = (_document$querySelect = document.querySelector('.bui-city-selector-scroll-view-container')) === null || _document$querySelect === void 0 ? void 0 : _document$querySelect.getBoundingClientRect().height;
27
+ setHeight("".concat(domHeight / screenHeight * 100, "vh"));
28
+ }, [cities]);
29
+ return /*#__PURE__*/React.createElement(CitySelectorCore, _extends({}, props, {
30
+ ref: ref,
31
+ touchHandler: touchHandler,
32
+ height: height
33
+ }));
34
+ });
35
+ CitySelector.displayName = 'BuiCitySelector';
36
+ export default CitySelector;