@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
@@ -0,0 +1,65 @@
1
+ /**
2
+ * 根据第一列数据判断选择器类型
3
+ */
4
+ export var pickerPanelType = function pickerPanelType() {
5
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
6
+ var firstColumn = options[0];
7
+
8
+ // 多列模式
9
+ if (Array.isArray(firstColumn)) {
10
+ return 'multiple';
11
+ }
12
+
13
+ // 级联模式
14
+ if (firstColumn !== null && firstColumn !== void 0 && firstColumn.children) {
15
+ return 'cascade';
16
+ }
17
+
18
+ // 单列模式
19
+ return 'single';
20
+ };
21
+
22
+ /**
23
+ * 格式化级联模式数据
24
+ */
25
+ export var formatCascade = function formatCascade(columns, values) {
26
+ var result = [];
27
+ var columnOptions = {
28
+ label: '',
29
+ value: '',
30
+ children: columns
31
+ };
32
+ var columnIndex = 0;
33
+ var _loop = function _loop() {
34
+ var options = columnOptions.children;
35
+ var value = values === null || values === void 0 ? void 0 : values[columnIndex];
36
+ var index = options.findIndex(function (item) {
37
+ return item.value === value;
38
+ });
39
+ if (index === -1) index = 0;
40
+ columnOptions = columnOptions.children[index];
41
+ columnIndex += 1;
42
+ result.push(options);
43
+ };
44
+ while ((_columnOptions = columnOptions) !== null && _columnOptions !== void 0 && _columnOptions.children) {
45
+ var _columnOptions;
46
+ _loop();
47
+ }
48
+ return result;
49
+ };
50
+
51
+ /**
52
+ * 统一options数据格式
53
+ */
54
+ export var formatOptions = function formatOptions(internalValue) {
55
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
56
+ var panelType = pickerPanelType(options);
57
+ switch (panelType) {
58
+ case 'multiple':
59
+ return options;
60
+ case 'cascade':
61
+ return formatCascade(options, internalValue);
62
+ default:
63
+ return options;
64
+ }
65
+ };
@@ -0,0 +1,24 @@
1
+ .bui-progress {
2
+ --fill-color: var(--bui-color-primary);
3
+ --trail-color: rgba(156, 156, 165, 0.2);
4
+ --stroke-width: 8px;
5
+ width: 100%;
6
+ font-family: var(--bui-font-family);
7
+
8
+ &-inner {
9
+ position: relative;
10
+ display: inline-block;
11
+ width: 100%;
12
+ overflow: hidden;
13
+ vertical-align: middle;
14
+ background-color: var(--trail-color);
15
+ border-radius: 100px;
16
+ }
17
+
18
+ &-bg {
19
+ position: relative;
20
+ border-radius: 100px;
21
+ background-color: var(--fill-color);
22
+ height: var(--stroke-width);
23
+ }
24
+ }
@@ -0,0 +1,81 @@
1
+ .bui-radio {
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);
5
+ @iconSize: 16px;
6
+ display: inline-flex;
7
+ align-items: center;
8
+ position: relative;
9
+ font-family: var(--bui-font-family);
10
+
11
+ &-disabled {
12
+ pointer-events: none;
13
+ opacity: 0.5;
14
+ }
15
+
16
+ &-label-left {
17
+ flex-direction: row-reverse;
18
+ }
19
+
20
+ &-label-top {
21
+ flex-direction: column-reverse;
22
+ }
23
+
24
+ &-label-bottom {
25
+ flex-direction: column;
26
+ }
27
+
28
+ &-input {
29
+ opacity: 0;
30
+ // 解决onClick触发两次的问题 & 微信文案点击选中
31
+ width: 100%;
32
+ height: 100%;
33
+ position: absolute;
34
+ top: 0;
35
+ left: 0;
36
+ cursor: pointer;
37
+ z-index: 1;
38
+ }
39
+
40
+ &-icon {
41
+ display: flex;
42
+ align-items: center;
43
+ justify-content: center;
44
+ flex-shrink: 0;
45
+ padding: 5px;
46
+ box-sizing: border-box;
47
+ }
48
+
49
+ &-label {
50
+ font-size: var(--label-font-size);
51
+ color: var(--label-color);
52
+ }
53
+
54
+ &-btn-icon {
55
+ position: relative;
56
+ display: flex;
57
+
58
+ .bui-svg-icon {
59
+ font-size: var(--icon-font-size);
60
+ }
61
+
62
+ &-outline {
63
+ transform: scale(1);
64
+ transition: fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
65
+ }
66
+
67
+ &-contained {
68
+ position: absolute;
69
+ left: 0;
70
+ transform: scale(0);
71
+ transition: transform 150ms cubic-bezier(0.4, 0, 1, 1) 0ms;
72
+ }
73
+
74
+ &-checked {
75
+ .bui-radio-btn-icon-contained {
76
+ transform: scale(1);
77
+ transition: transform 150ms cubic-bezier(0, 0, 0.2, 1) 0ms;
78
+ }
79
+ }
80
+ }
81
+ }
@@ -0,0 +1,64 @@
1
+ .bui-rating {
2
+ display: flex;
3
+ flex-wrap: wrap;
4
+ font-family: var(--bui-font-family);
5
+
6
+ &-disabled {
7
+ pointer-events: none;
8
+ opacity: 0.5;
9
+ }
10
+
11
+ &-container {
12
+ position: relative;
13
+ display: flex;
14
+
15
+ &:last-child {
16
+ margin-right: 0;
17
+ }
18
+
19
+ &-xsmall {
20
+ font-size: var(--bui-text-size-5);
21
+ }
22
+
23
+ &-small {
24
+ font-size: var(--bui-text-size-1);
25
+ margin-right: 0.5px;
26
+ }
27
+
28
+ &-medium {
29
+ font-size: var(--bui-title-size-3);
30
+ margin-right: 1px;
31
+ }
32
+
33
+ &-large {
34
+ font-size: 22px;
35
+ margin-right: 2px;
36
+ }
37
+ }
38
+
39
+ &-item {
40
+ display: flex;
41
+ align-items: center;
42
+ overflow: hidden;
43
+ cursor: pointer;
44
+ color: var(--bui-color-fg-disabled);
45
+
46
+ &-input {
47
+ display: none;
48
+ }
49
+
50
+ &-half {
51
+ position: absolute;
52
+ top: 0;
53
+ width: 50%;
54
+ }
55
+
56
+ &-readonly {
57
+ cursor: unset;
58
+ }
59
+
60
+ &-active {
61
+ color: var(--bui-color-warning);
62
+ }
63
+ }
64
+ }
@@ -3,16 +3,20 @@
3
3
  position: relative;
4
4
  font-family: var(--bui-font-family);
5
5
  }
6
+
6
7
  .bui-scroll::-webkit-scrollbar {
7
8
  display: none;
8
9
  }
10
+
9
11
  .bui-scroll-view {
10
12
  overflow: hidden;
11
13
  }
14
+
12
15
  .bui-scroll-view-scroll-x {
13
16
  overflow-x: scroll;
14
17
  overflow-y: hidden;
15
18
  }
19
+
16
20
  .bui-scroll-view-scroll-y {
17
21
  overflow-x: hidden;
18
22
  overflow-y: scroll;
@@ -0,0 +1,105 @@
1
+ @class-prefix-select: ~'bui-select';
2
+ @transition-duration: 0.3s;
3
+
4
+ .@{class-prefix-select} {
5
+ position: relative;
6
+ cursor: pointer;
7
+ height: 27px;
8
+ min-width: 100px;
9
+ font-size: var(--bui-title-size-3);
10
+ border-radius: 5px;
11
+ background-color: var(--bui-color-bg-view);
12
+ font-family: var(--bui-font-family);
13
+
14
+ &:active,
15
+ &-active {
16
+ box-shadow: 0 0 0 2px var(--bui-color-bg-default);
17
+ }
18
+
19
+ &-selector-container {
20
+ display: flex;
21
+ align-items: center;
22
+ padding: 0 14px;
23
+ height: 100%;
24
+ }
25
+
26
+ &-input {
27
+ width: 0;
28
+ height: 0;
29
+ border: 0;
30
+ opacity: 0;
31
+ }
32
+
33
+ &-placeholder {
34
+ color: var(--bui-color-fg-disabled);
35
+ }
36
+
37
+ &-selector {
38
+ display: flex;
39
+ justify-content: space-between;
40
+ align-items: center;
41
+ flex: 1;
42
+ height: 27px;
43
+ background-color: transparent;
44
+ outline: none;
45
+ border: 0;
46
+
47
+ &-icon {
48
+ font-size: var(--bui-title-size-3);
49
+ }
50
+ }
51
+
52
+ &-option-container {
53
+ position: absolute;
54
+ box-sizing: border-box;
55
+ top: 100%;
56
+ left: 0;
57
+ width: 100%;
58
+ z-index: var(--bui-z-index-dropdown);
59
+ margin-top: 6px;
60
+ background-color: var(--bui-color-bg-view);
61
+ padding: 2px;
62
+ overflow: hidden;
63
+ }
64
+
65
+ &-option-main {
66
+ border-radius: 3px;
67
+ padding: 3px 0;
68
+ box-shadow: 0 0 0 2px var(--bui-color-bg-default);
69
+ overflow: hidden;
70
+ }
71
+
72
+ &-option {
73
+ display: flex;
74
+ align-items: center;
75
+ height: 27px;
76
+ padding: 0 14px;
77
+ border-radius: 5px;
78
+ margin: 0 3px;
79
+ }
80
+
81
+ &-option:hover {
82
+ background-color: var(---bui-select-options-active-bg, #fff2f0);
83
+ color: var(--bui-color-primary);
84
+ }
85
+
86
+ &-option-active {
87
+ font-weight: 500;
88
+ color: var(--bui-color-primary);
89
+ background-color: var(---bui-select-options-active-bg, #fff2f0);
90
+ }
91
+
92
+ &-option-hide {
93
+ opacity: 0;
94
+ transform: translateY(-5px);
95
+ }
96
+ }
97
+
98
+ .bui-select.bui-select-disabled,
99
+ .bui-select-option-disabled {
100
+ pointer-events: none;
101
+ box-shadow: none;
102
+ background-color: var(--bui-color-bg-view);
103
+ color: var(--bui-color-fg-subtle);
104
+ border: none;
105
+ }
@@ -0,0 +1,72 @@
1
+ .bui-skeleton {
2
+ --border-radius: var(--bui-shape-radius-label);
3
+ display: block;
4
+
5
+ &-animation-wave {
6
+ background: linear-gradient(
7
+ 90deg,
8
+ rgba(190, 190, 190, 0.2) 25%,
9
+ rgba(129, 129, 129, 0.24) 37%,
10
+ rgba(190, 190, 190, 0.2) 63%
11
+ );
12
+ background-size: 400% 100%;
13
+ animation: bui-skeleton-wave 1.4s ease infinite;
14
+ }
15
+
16
+ &-animation-pulse {
17
+ background: rgba(190, 190, 190, 0.35);
18
+ animation: bui-skeleton-pulse 1.4s ease infinite;
19
+ }
20
+
21
+ &-text {
22
+ height: auto;
23
+ transform-origin: 0 55%;
24
+ transform: scale(1, 0.6);
25
+ border-radius: var(--border-radius);
26
+
27
+ &::before {
28
+ content: '\00a0';
29
+ }
30
+ }
31
+
32
+ &-rectangular {
33
+ height: 1.2em;
34
+ }
35
+
36
+ &-rounded {
37
+ height: 1.2em;
38
+ border-radius: var(--border-radius);
39
+ }
40
+
41
+ &-circular {
42
+ border-radius: 50%;
43
+ }
44
+
45
+ &-with-children {
46
+ max-width: fit-content;
47
+ }
48
+ }
49
+
50
+ @keyframes bui-skeleton-wave {
51
+ 0% {
52
+ background-position: 100% 50%;
53
+ }
54
+
55
+ 100% {
56
+ background-position: 0 50%;
57
+ }
58
+ }
59
+
60
+ @keyframes bui-skeleton-pulse {
61
+ 0% {
62
+ opacity: 1;
63
+ }
64
+
65
+ 50% {
66
+ opacity: 0.58;
67
+ }
68
+
69
+ 100% {
70
+ opacity: 1;
71
+ }
72
+ }
@@ -0,0 +1,108 @@
1
+ @import '~@bifrostui/styles/mixins/index.less';
2
+
3
+ .bui-slider {
4
+ --line-color: var(--bui-color-primary);
5
+ --line-bg-color: var(--bui-color-border-default);
6
+ --tooltip-font-size: var(--bui-text-size-3);
7
+ --tooltip-color: var(--bui-color-white);
8
+ --tooltip-bg-color: var(--line-color);
9
+ position: relative;
10
+ width: 100%;
11
+ height: 2px;
12
+ padding: 19px 0;
13
+ box-sizing: border-box;
14
+ font-family: var(--bui-font-family);
15
+
16
+ &-disabled {
17
+ pointer-events: none;
18
+ opacity: 0.5;
19
+ }
20
+
21
+ &-line {
22
+ position: absolute;
23
+ top: 50%;
24
+ left: 0;
25
+ height: 2px;
26
+ transform: translateY(-50%);
27
+ background-color: var(--line-color);
28
+ }
29
+
30
+ &-rail {
31
+ position: absolute;
32
+ top: 50%;
33
+ left: 0;
34
+ width: 100%;
35
+ height: 2px;
36
+ transform: translateY(-50%);
37
+ background-color: var(--line-bg-color);
38
+ }
39
+
40
+ &-button {
41
+ display: flex;
42
+ position: absolute;
43
+ justify-content: center;
44
+ align-items: center;
45
+ width: 26px;
46
+ height: 26px;
47
+ background-color: #fff;
48
+ box-shadow: #ddd 0 0 10px;
49
+ border-radius: 50%;
50
+ transform: translate(-50%, -50%);
51
+ font-size: var(--bui-title-size-3);
52
+ cursor: grab;
53
+
54
+ // 增加点击热区大小
55
+ &::after {
56
+ position: absolute;
57
+ content: '';
58
+ top: -10px;
59
+ bottom: -10px;
60
+ left: -10px;
61
+ right: -10px;
62
+ }
63
+
64
+ &-0 {
65
+ left: 0%;
66
+ top: 50%;
67
+ z-index: var(--bui-z-index-affix);
68
+ }
69
+
70
+ &-1 {
71
+ left: 0%;
72
+ top: 50%;
73
+ z-index: var(--bui-z-index-affix);
74
+ }
75
+ }
76
+
77
+ &-tooltip {
78
+ position: absolute;
79
+ top: -14px;
80
+ width: 46px;
81
+ height: 24px;
82
+ line-height: 24px;
83
+ font-size: var(--tooltip-font-size);
84
+ border-radius: 24px;
85
+ color: var(--tooltip-color);
86
+ text-align: center;
87
+ background-color: var(--tooltip-bg-color);
88
+ transform: translate(-50%, -50%);
89
+ z-index: var(--bui-z-index-popover);
90
+
91
+ &::after {
92
+ position: absolute;
93
+ bottom: -10px;
94
+ left: 0;
95
+ right: 0;
96
+ margin: 0 auto;
97
+ content: '';
98
+ width: 0;
99
+ height: 0;
100
+ border: 6px solid transparent;
101
+ border-top: 6px solid var(--tooltip-bg-color);
102
+ }
103
+
104
+ &-hidden {
105
+ display: none;
106
+ }
107
+ }
108
+ }
@@ -0,0 +1,27 @@
1
+ .bui-stack-demo-options {
2
+ display: flex;
3
+ column-gap: 30px;
4
+
5
+ &-title {
6
+ font-weight: 500;
7
+ }
8
+ }
9
+
10
+ @media all and (max-width: 570px) {
11
+ .bui-stack-demo-options {
12
+ display: flex;
13
+ flex-direction: column;
14
+ row-gap: 15px;
15
+
16
+ &-title {
17
+ width: 100%;
18
+ font-size: 16px;
19
+ }
20
+
21
+ .bui-radio-group {
22
+ display: flex;
23
+ flex-wrap: wrap;
24
+ align-items: center;
25
+ }
26
+ }
27
+ }