@bifrostui/react 2.0.0-beta.2 → 2.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ActionSheet/ActionSheet.css +16 -6
- package/dist/ActionSheet/ActionSheetItem.css +11 -17
- package/dist/ActionSheet/ActionSheetItem.js +1 -1
- package/dist/ActionSheet/ActionSheetItem.types.d.ts +2 -2
- package/dist/ActionSheet/index.css +89 -0
- package/dist/Alert/Alert.types.d.ts +3 -3
- package/dist/Alert/index.css +18 -14
- package/dist/Avatar/Avatar.css +16 -12
- package/dist/Avatar/AvatarGroup.css +19 -15
- package/dist/Avatar/index.css +93 -0
- package/dist/Backdrop/Backdrop.d.ts +1 -1
- package/dist/Backdrop/Backdrop.js +1 -1
- package/dist/Backdrop/{Backdrop.css → index.css} +6 -2
- package/dist/Badge/Badge.d.ts +1 -1
- package/dist/Badge/Badge.js +1 -1
- package/dist/Badge/Badge.types.d.ts +1 -1
- package/dist/Badge/{Badge.css → index.css} +47 -27
- package/dist/Breadcrumb/Breadcrumb.d.ts +1 -1
- package/dist/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/Breadcrumb/index.css +38 -0
- package/dist/Button/Button.d.ts +1 -1
- package/dist/Button/Button.js +3 -2
- package/{es/Button/Button.css → dist/Button/index.css} +69 -38
- package/dist/Calendar/Calendar.d.ts +1 -1
- package/dist/Calendar/Calendar.js +3 -3
- package/dist/Calendar/{Calendar.css → index.css} +35 -31
- package/dist/Card/Card.css +10 -1
- package/dist/Card/CardContent.css +1 -1
- package/dist/Card/CardFooter.css +2 -2
- package/dist/Card/CardHeader.css +4 -3
- package/dist/Card/CardHeader.js +2 -2
- package/dist/Card/index.css +77 -0
- package/dist/Checkbox/Checkbox.d.ts +1 -1
- package/dist/Checkbox/Checkbox.js +2 -2
- package/dist/Checkbox/CheckboxGroup.d.ts +1 -1
- package/dist/Checkbox/CheckboxGroup.js +1 -1
- package/dist/Checkbox/{Checkbox.css → index.css} +14 -10
- package/dist/CitySelector/CitySelector.miniapp.d.ts +0 -1
- package/dist/CitySelector/CitySelector.miniapp.js +0 -1
- package/dist/CitySelector/CitySelectorCore.d.ts +1 -1
- package/dist/CitySelector/CitySelectorCore.js +1 -1
- package/dist/CitySelector/Selector/index.css +4 -4
- package/{es/CitySelector/CitySelector.css → dist/CitySelector/index.css} +31 -27
- package/dist/Collapse/Collapse.d.ts +1 -1
- package/dist/Collapse/Collapse.js +1 -1
- package/dist/CollapsePanel/CollapsePanel.d.ts +1 -1
- package/dist/CollapsePanel/CollapsePanel.js +1 -1
- package/dist/CollapsePanel/{CollapsePanel.css → index.css} +10 -6
- package/dist/Countdown/Countdown.d.ts +1 -1
- package/dist/Countdown/Countdown.js +1 -1
- package/{es/Countdown/Countdown.css → dist/Countdown/index.css} +12 -8
- package/dist/Dialog/index.css +26 -23
- package/dist/Divider/Divider.d.ts +1 -1
- package/dist/Divider/Divider.js +1 -1
- package/{es/Divider/Divider.css → dist/Divider/index.css} +14 -10
- package/dist/Drawer/Drawer.d.ts +1 -1
- package/dist/Drawer/Drawer.js +1 -1
- package/dist/IconButton/IconButton.d.ts +1 -1
- package/dist/IconButton/IconButton.js +3 -3
- package/dist/IconButton/IconButton.types.d.ts +4 -3
- package/{es/IconButton/IconButton.css → dist/IconButton/index.css} +79 -29
- package/dist/Image/index.css +6 -2
- package/dist/Input/Input.d.ts +1 -1
- package/dist/Input/Input.js +2 -2
- package/dist/Input/{Input.css → index.css} +22 -18
- package/dist/ItemSelector/ItemSelector.miniapp.d.ts +0 -1
- package/dist/ItemSelector/ItemSelector.miniapp.js +0 -1
- package/dist/ItemSelector/ItemSelectorCore.d.ts +1 -1
- package/dist/ItemSelector/ItemSelectorCore.js +1 -1
- package/dist/List/List.css +7 -3
- package/dist/List/ListItem.css +3 -3
- package/dist/List/index.css +80 -0
- package/dist/Loading/Loading.d.ts +1 -1
- package/dist/Loading/Loading.js +1 -1
- package/{es/Loading/Loading.css → dist/Loading/index.css} +10 -6
- package/dist/Modal/Modal.d.ts +1 -1
- package/dist/Modal/Modal.js +1 -1
- package/dist/Modal/Modal.miniapp.d.ts +2 -2
- package/dist/Modal/Modal.miniapp.js +1 -1
- package/dist/NavBar/NavBar.d.ts +1 -1
- package/dist/NavBar/NavBar.js +1 -1
- package/dist/NavBar/index.css +65 -0
- package/dist/Picker/Picker.css +21 -16
- package/dist/Picker/Picker.js +1 -1
- package/dist/Picker/Picker.types.d.ts +2 -2
- package/dist/Picker/PickerPanel.css +8 -8
- package/dist/Picker/PickerPanel.js +33 -22
- package/dist/Picker/index.css +116 -0
- package/dist/Popover/Popover.d.ts +1 -1
- package/dist/Popover/Popover.js +1 -1
- package/{es/Popover/Popover.css → dist/Popover/index.css} +32 -28
- package/dist/Progress/Progress.d.ts +1 -1
- package/dist/Progress/Progress.js +1 -1
- package/dist/Progress/index.css +28 -0
- package/dist/Radio/Radio.d.ts +1 -1
- package/dist/Radio/Radio.js +1 -1
- package/dist/Radio/RadioButtonIcon.js +6 -1
- package/dist/Radio/RadioGroup.d.ts +1 -1
- package/dist/Radio/RadioGroup.js +1 -1
- package/dist/Radio/{Radio.css → index.css} +10 -6
- package/dist/Rating/Rating.d.ts +1 -1
- package/dist/Rating/Rating.js +2 -2
- package/dist/Rating/{Rating.css → index.css} +20 -7
- package/dist/ScrollView/ScrollView.d.ts +1 -1
- package/dist/ScrollView/ScrollView.js +1 -1
- package/dist/Select/Select.d.ts +1 -1
- package/dist/Select/Select.js +2 -8
- package/dist/Select/SelectOption.d.ts +1 -1
- package/dist/Select/SelectOption.js +1 -1
- package/{es/Select/Select.css → dist/Select/index.css} +26 -19
- package/dist/Skeleton/Skeleton.d.ts +1 -1
- package/dist/Skeleton/Skeleton.js +1 -1
- package/{es/Skeleton/Skeleton.css → dist/Skeleton/index.css} +7 -3
- package/dist/Slider/Slider.d.ts +1 -1
- package/dist/Slider/Slider.js +2 -2
- package/dist/Slider/index.css +111 -0
- package/dist/Stack/Stack.d.ts +1 -1
- package/dist/Stack/Stack.js +1 -1
- package/dist/Steps/Step.css +14 -14
- package/dist/Steps/Step.js +1 -1
- package/dist/Steps/Steps.css +18 -14
- package/dist/Steps/index.css +199 -0
- package/dist/Swiper/Swiper.d.ts +1 -1
- package/dist/Swiper/Swiper.js +1 -1
- package/dist/Swiper/{Swiper.css → index.css} +6 -2
- package/dist/Switch/Switch.d.ts +1 -1
- package/dist/Switch/Switch.js +1 -1
- package/dist/Switch/Switch.types.d.ts +1 -1
- package/dist/Switch/{Switch.css → index.css} +46 -35
- package/dist/TabBar/TabBar.css +12 -8
- package/dist/TabBar/TabBar.js +1 -1
- package/dist/TabBar/TabBarContext.d.ts +3 -3
- package/dist/TabBar/TabBarItem.css +6 -0
- package/dist/TabBar/TabBarItem.js +3 -3
- package/dist/TabBar/index.css +59 -0
- package/dist/TabBar/index.types.d.ts +3 -3
- package/dist/Tabs/Tab.css +9 -9
- package/dist/Tabs/Tabs.css +24 -4
- package/dist/Tabs/Tabs.js +1 -1
- package/dist/Tabs/index.css +135 -0
- package/dist/Tag/Tag.css +48 -22
- package/dist/Tag/Tag.js +2 -2
- package/dist/Tag/Tag.types.d.ts +4 -4
- package/dist/Tag/TagGroup.css +13 -9
- package/dist/Tag/index.css +182 -0
- package/dist/TextArea/TextArea.d.ts +1 -1
- package/dist/TextArea/TextArea.js +1 -1
- package/dist/TextArea/index.css +57 -0
- package/dist/ThemeProvider/ThemeProvider.js +1 -4
- package/dist/ThemeProvider/ThemeProvider.types.d.ts +5 -10
- package/dist/ThemeProvider/utils/constants.d.ts +1 -1
- package/dist/ThemeProvider/utils/constants.js +4 -1
- package/dist/ThemeProvider/utils/mountTokens.d.ts +4 -4
- package/dist/Toast/Toast.d.ts +1 -1
- package/dist/Toast/Toast.js +5 -5
- package/dist/Toast/index.css +58 -0
- package/dist/Tooltip/Tooltip.d.ts +1 -1
- package/dist/Tooltip/Tooltip.js +1 -1
- package/dist/Tooltip/index.css +95 -0
- package/es/ActionSheet/ActionSheet.css +16 -6
- package/es/ActionSheet/ActionSheetItem.css +11 -17
- package/es/ActionSheet/ActionSheetItem.js +1 -1
- package/es/ActionSheet/ActionSheetItem.types.d.ts +2 -2
- package/es/ActionSheet/index.css +89 -0
- package/es/Alert/Alert.types.d.ts +3 -3
- package/es/Alert/index.css +18 -14
- package/es/Avatar/Avatar.css +16 -12
- package/es/Avatar/AvatarGroup.css +19 -15
- package/es/Avatar/index.css +93 -0
- package/es/Backdrop/Backdrop.d.ts +1 -1
- package/es/Backdrop/Backdrop.js +1 -1
- package/es/Backdrop/{Backdrop.css → index.css} +6 -2
- package/es/Badge/Badge.d.ts +1 -1
- package/es/Badge/Badge.js +1 -1
- package/es/Badge/Badge.types.d.ts +1 -1
- package/es/Badge/{Badge.css → index.css} +47 -27
- package/es/Breadcrumb/Breadcrumb.d.ts +1 -1
- package/es/Breadcrumb/Breadcrumb.js +1 -1
- package/es/Breadcrumb/index.css +38 -0
- package/es/Button/Button.d.ts +1 -1
- package/es/Button/Button.js +3 -2
- package/{dist/Button/Button.css → es/Button/index.css} +69 -38
- package/es/Calendar/Calendar.d.ts +1 -1
- package/es/Calendar/Calendar.js +3 -3
- package/es/Calendar/{Calendar.css → index.css} +35 -31
- package/es/Card/Card.css +10 -1
- package/es/Card/CardContent.css +1 -1
- package/es/Card/CardFooter.css +2 -2
- package/es/Card/CardHeader.css +4 -3
- package/es/Card/CardHeader.js +2 -2
- package/es/Card/index.css +77 -0
- package/es/Checkbox/Checkbox.d.ts +1 -1
- package/es/Checkbox/Checkbox.js +2 -2
- package/es/Checkbox/CheckboxGroup.d.ts +1 -1
- package/es/Checkbox/CheckboxGroup.js +1 -1
- package/es/Checkbox/{Checkbox.css → index.css} +14 -10
- package/es/CitySelector/CitySelector.miniapp.d.ts +0 -1
- package/es/CitySelector/CitySelector.miniapp.js +0 -1
- package/es/CitySelector/CitySelectorCore.d.ts +1 -1
- package/es/CitySelector/CitySelectorCore.js +1 -1
- package/es/CitySelector/Selector/index.css +4 -4
- package/{dist/CitySelector/CitySelector.css → es/CitySelector/index.css} +31 -27
- package/es/Collapse/Collapse.d.ts +1 -1
- package/es/Collapse/Collapse.js +1 -1
- package/es/CollapsePanel/CollapsePanel.d.ts +1 -1
- package/es/CollapsePanel/CollapsePanel.js +1 -1
- package/es/CollapsePanel/{CollapsePanel.css → index.css} +10 -6
- package/es/Countdown/Countdown.d.ts +1 -1
- package/es/Countdown/Countdown.js +1 -1
- package/{dist/Countdown/Countdown.css → es/Countdown/index.css} +12 -8
- package/es/Dialog/index.css +26 -23
- package/es/Divider/Divider.d.ts +1 -1
- package/es/Divider/Divider.js +1 -1
- package/{dist/Divider/Divider.css → es/Divider/index.css} +14 -10
- package/es/Drawer/Drawer.d.ts +1 -1
- package/es/Drawer/Drawer.js +1 -1
- package/es/IconButton/IconButton.d.ts +1 -1
- package/es/IconButton/IconButton.js +3 -3
- package/es/IconButton/IconButton.types.d.ts +4 -3
- package/{dist/IconButton/IconButton.css → es/IconButton/index.css} +79 -29
- package/es/Image/index.css +6 -2
- package/es/Input/Input.d.ts +1 -1
- package/es/Input/Input.js +2 -2
- package/es/Input/{Input.css → index.css} +22 -18
- package/es/ItemSelector/ItemSelector.miniapp.d.ts +0 -1
- package/es/ItemSelector/ItemSelector.miniapp.js +0 -1
- package/es/ItemSelector/ItemSelectorCore.d.ts +1 -1
- package/es/ItemSelector/ItemSelectorCore.js +1 -1
- package/es/List/List.css +7 -3
- package/es/List/ListItem.css +3 -3
- package/es/List/index.css +80 -0
- package/es/Loading/Loading.d.ts +1 -1
- package/es/Loading/Loading.js +1 -1
- package/{dist/Loading/Loading.css → es/Loading/index.css} +10 -6
- package/es/Modal/Modal.d.ts +1 -1
- package/es/Modal/Modal.js +1 -1
- package/es/Modal/Modal.miniapp.d.ts +2 -2
- package/es/Modal/Modal.miniapp.js +1 -1
- package/es/NavBar/NavBar.d.ts +1 -1
- package/es/NavBar/NavBar.js +1 -1
- package/es/NavBar/index.css +65 -0
- package/es/Picker/Picker.css +21 -16
- package/es/Picker/Picker.js +1 -1
- package/es/Picker/Picker.types.d.ts +2 -2
- package/es/Picker/PickerPanel.css +8 -8
- package/es/Picker/PickerPanel.js +46 -24
- package/es/Picker/index.css +116 -0
- package/es/Popover/Popover.d.ts +1 -1
- package/es/Popover/Popover.js +1 -1
- package/{dist/Popover/Popover.css → es/Popover/index.css} +32 -28
- package/es/Progress/Progress.d.ts +1 -1
- package/es/Progress/Progress.js +1 -1
- package/es/Progress/index.css +28 -0
- package/es/Radio/Radio.d.ts +1 -1
- package/es/Radio/Radio.js +1 -1
- package/es/Radio/RadioButtonIcon.js +6 -1
- package/es/Radio/RadioGroup.d.ts +1 -1
- package/es/Radio/RadioGroup.js +1 -1
- package/es/Radio/{Radio.css → index.css} +10 -6
- package/es/Rating/Rating.d.ts +1 -1
- package/es/Rating/Rating.js +2 -2
- package/es/Rating/{Rating.css → index.css} +20 -7
- package/es/ScrollView/ScrollView.d.ts +1 -1
- package/es/ScrollView/ScrollView.js +1 -1
- package/es/Select/Select.d.ts +1 -1
- package/es/Select/Select.js +2 -8
- package/es/Select/SelectOption.d.ts +1 -1
- package/es/Select/SelectOption.js +1 -1
- package/{dist/Select/Select.css → es/Select/index.css} +26 -19
- package/es/Skeleton/Skeleton.d.ts +1 -1
- package/es/Skeleton/Skeleton.js +1 -1
- package/{dist/Skeleton/Skeleton.css → es/Skeleton/index.css} +7 -3
- package/es/Slider/Slider.d.ts +1 -1
- package/es/Slider/Slider.js +2 -2
- package/es/Slider/index.css +111 -0
- package/es/Stack/Stack.d.ts +1 -1
- package/es/Stack/Stack.js +1 -1
- package/es/Steps/Step.css +14 -14
- package/es/Steps/Step.js +1 -1
- package/es/Steps/Steps.css +18 -14
- package/es/Steps/index.css +199 -0
- package/es/Swiper/Swiper.d.ts +1 -1
- package/es/Swiper/Swiper.js +1 -1
- package/es/Swiper/{Swiper.css → index.css} +6 -2
- package/es/Switch/Switch.d.ts +1 -1
- package/es/Switch/Switch.js +1 -1
- package/es/Switch/Switch.types.d.ts +1 -1
- package/es/Switch/{Switch.css → index.css} +46 -35
- package/es/TabBar/TabBar.css +12 -8
- package/es/TabBar/TabBar.js +1 -1
- package/es/TabBar/TabBarContext.d.ts +3 -3
- package/es/TabBar/TabBarItem.css +6 -0
- package/es/TabBar/TabBarItem.js +2 -2
- package/es/TabBar/index.css +59 -0
- package/es/TabBar/index.types.d.ts +3 -3
- package/es/Tabs/Tab.css +9 -9
- package/es/Tabs/Tabs.css +24 -4
- package/es/Tabs/Tabs.js +1 -1
- package/es/Tabs/index.css +135 -0
- package/es/Tag/Tag.css +48 -22
- package/es/Tag/Tag.js +2 -2
- package/es/Tag/Tag.types.d.ts +4 -4
- package/es/Tag/TagGroup.css +13 -9
- package/es/Tag/index.css +182 -0
- package/es/TextArea/TextArea.d.ts +1 -1
- package/es/TextArea/TextArea.js +1 -1
- package/es/TextArea/index.css +57 -0
- package/es/ThemeProvider/ThemeProvider.js +1 -4
- package/es/ThemeProvider/ThemeProvider.types.d.ts +5 -10
- package/es/ThemeProvider/utils/constants.d.ts +1 -1
- package/es/ThemeProvider/utils/constants.js +4 -1
- package/es/ThemeProvider/utils/mountTokens.d.ts +4 -4
- package/es/Toast/Toast.d.ts +1 -1
- package/es/Toast/Toast.js +5 -5
- package/es/Toast/index.css +58 -0
- package/es/Tooltip/Tooltip.d.ts +1 -1
- package/es/Tooltip/Tooltip.js +1 -1
- package/es/Tooltip/index.css +95 -0
- package/package.json +13 -5
- package/dist/Breadcrumb/Breadcrumb.css +0 -34
- package/dist/CitySelector/miniapp.css +0 -4
- package/dist/ItemSelector/miniapp.css +0 -4
- package/dist/NavBar/NavBar.css +0 -61
- package/dist/Progress/Progress.css +0 -24
- package/dist/Slider/Slider.css +0 -106
- package/dist/TextArea/TextArea.css +0 -53
- package/dist/Toast/Toast.css +0 -54
- package/dist/Tooltip/Tooltip.css +0 -91
- package/es/Breadcrumb/Breadcrumb.css +0 -34
- package/es/CitySelector/miniapp.css +0 -4
- package/es/ItemSelector/miniapp.css +0 -4
- package/es/NavBar/NavBar.css +0 -61
- package/es/Progress/Progress.css +0 -24
- package/es/Slider/Slider.css +0 -106
- package/es/TextArea/TextArea.css +0 -53
- package/es/Toast/Toast.css +0 -54
- package/es/Tooltip/Tooltip.css +0 -91
- /package/dist/Collapse/{Collapse.css → index.css} +0 -0
- /package/dist/Drawer/{Drawer.css → index.css} +0 -0
- /package/dist/ItemSelector/{ItemSelector.css → index.css} +0 -0
- /package/dist/Modal/{Modal.css → index.css} +0 -0
- /package/dist/ScrollView/{ScrollView.css → index.css} +0 -0
- /package/dist/Stack/{Stack.css → index.css} +0 -0
- /package/es/Collapse/{Collapse.css → index.css} +0 -0
- /package/es/Drawer/{Drawer.css → index.css} +0 -0
- /package/es/ItemSelector/{ItemSelector.css → index.css} +0 -0
- /package/es/Modal/{Modal.css → index.css} +0 -0
- /package/es/ScrollView/{ScrollView.css → index.css} +0 -0
- /package/es/Stack/{Stack.css → index.css} +0 -0
package/es/Popover/Popover.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import './Popover.less';
|
|
3
2
|
import { PopoverProps } from './Popover.types';
|
|
3
|
+
import './index.less';
|
|
4
4
|
declare const Popover: React.ForwardRefExoticComponent<Omit<PopoverProps<"div", {}>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export default Popover;
|
package/es/Popover/Popover.js
CHANGED
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
throttle
|
|
37
37
|
} from "@bifrostui/utils";
|
|
38
38
|
import Portal from "../Portal";
|
|
39
|
-
import "./
|
|
39
|
+
import "./index.css";
|
|
40
40
|
const prefixCls = "bui-popover";
|
|
41
41
|
const Popover = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
42
42
|
const _a = props, {
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
+
:root,
|
|
2
|
+
page,
|
|
3
|
+
xhs-page {
|
|
4
|
+
--bui-popover-arrow-size: 8PX;
|
|
5
|
+
--bui-popover-location-position: 8PX;
|
|
6
|
+
--bui-popover-max-width: 350px;
|
|
7
|
+
--bui-popover-content-min-width: 30px;
|
|
8
|
+
--bui-popover-content-padding: 6px 8px;
|
|
9
|
+
}
|
|
1
10
|
.bui-popover {
|
|
2
|
-
|
|
3
|
-
--location-position: var(--bui-popover-location-position, 8PX);
|
|
4
|
-
--max-width: var(--bui-popover-max-width, 350px);
|
|
5
|
-
--content-min-width: var(--bui-popover-content-min-width, 30px);
|
|
6
|
-
--content-padding: var(--bui-popover-content-padding, 6px 8px);
|
|
7
|
-
max-width: var(--max-width);
|
|
11
|
+
max-width: var(--bui-popover-max-width);
|
|
8
12
|
font-size: var(--bui-text-size-1);
|
|
9
13
|
position: absolute;
|
|
10
14
|
visibility: hidden;
|
|
@@ -16,16 +20,16 @@
|
|
|
16
20
|
position: absolute;
|
|
17
21
|
}
|
|
18
22
|
.bui-popover .bui-popover-arrow.location-left {
|
|
19
|
-
left: var(--location-position);
|
|
23
|
+
left: var(--bui-popover-location-position);
|
|
20
24
|
}
|
|
21
25
|
.bui-popover .bui-popover-arrow.location-right {
|
|
22
|
-
right: var(--location-position);
|
|
26
|
+
right: var(--bui-popover-location-position);
|
|
23
27
|
}
|
|
24
28
|
.bui-popover .bui-popover-arrow.location-top {
|
|
25
|
-
top: var(--location-position);
|
|
29
|
+
top: var(--bui-popover-location-position);
|
|
26
30
|
}
|
|
27
31
|
.bui-popover .bui-popover-arrow.location-bottom {
|
|
28
|
-
bottom: var(--location-position);
|
|
32
|
+
bottom: var(--bui-popover-location-position);
|
|
29
33
|
}
|
|
30
34
|
.bui-popover.popover-top .location-center,
|
|
31
35
|
.bui-popover.popover-bottom .location-center {
|
|
@@ -38,48 +42,48 @@
|
|
|
38
42
|
transform: translateY(-50%);
|
|
39
43
|
}
|
|
40
44
|
.bui-popover.popover-top {
|
|
41
|
-
padding-bottom: var(--arrow-size);
|
|
45
|
+
padding-bottom: var(--bui-popover-arrow-size);
|
|
42
46
|
}
|
|
43
47
|
.bui-popover.popover-top .bui-popover-arrow {
|
|
44
|
-
border-left: var(--arrow-size) solid transparent;
|
|
45
|
-
border-right: var(--arrow-size) solid transparent;
|
|
46
|
-
border-top: var(--arrow-size) solid var(--bui-color-bg-view);
|
|
48
|
+
border-left: var(--bui-popover-arrow-size) solid transparent;
|
|
49
|
+
border-right: var(--bui-popover-arrow-size) solid transparent;
|
|
50
|
+
border-top: var(--bui-popover-arrow-size) solid var(--bui-color-bg-view);
|
|
47
51
|
bottom: 0;
|
|
48
52
|
}
|
|
49
53
|
.bui-popover.popover-bottom {
|
|
50
|
-
padding-top: var(--arrow-size);
|
|
54
|
+
padding-top: var(--bui-popover-arrow-size);
|
|
51
55
|
}
|
|
52
56
|
.bui-popover.popover-bottom .bui-popover-arrow {
|
|
53
|
-
border-left: var(--arrow-size) solid transparent;
|
|
54
|
-
border-right: var(--arrow-size) solid transparent;
|
|
55
|
-
border-bottom: var(--arrow-size) solid var(--bui-color-bg-view);
|
|
57
|
+
border-left: var(--bui-popover-arrow-size) solid transparent;
|
|
58
|
+
border-right: var(--bui-popover-arrow-size) solid transparent;
|
|
59
|
+
border-bottom: var(--bui-popover-arrow-size) solid var(--bui-color-bg-view);
|
|
56
60
|
top: 0;
|
|
57
61
|
}
|
|
58
62
|
.bui-popover.popover-left {
|
|
59
|
-
padding-right: var(--arrow-size);
|
|
63
|
+
padding-right: var(--bui-popover-arrow-size);
|
|
60
64
|
}
|
|
61
65
|
.bui-popover.popover-left .bui-popover-arrow {
|
|
62
|
-
border-top: var(--arrow-size) solid transparent;
|
|
63
|
-
border-bottom: var(--arrow-size) solid transparent;
|
|
64
|
-
border-left: var(--arrow-size) solid var(--bui-color-bg-view);
|
|
66
|
+
border-top: var(--bui-popover-arrow-size) solid transparent;
|
|
67
|
+
border-bottom: var(--bui-popover-arrow-size) solid transparent;
|
|
68
|
+
border-left: var(--bui-popover-arrow-size) solid var(--bui-color-bg-view);
|
|
65
69
|
right: 0;
|
|
66
70
|
}
|
|
67
71
|
.bui-popover.popover-right {
|
|
68
|
-
padding-left: var(--arrow-size);
|
|
72
|
+
padding-left: var(--bui-popover-arrow-size);
|
|
69
73
|
}
|
|
70
74
|
.bui-popover.popover-right .bui-popover-arrow {
|
|
71
|
-
border-top: var(--arrow-size) solid transparent;
|
|
72
|
-
border-bottom: var(--arrow-size) solid transparent;
|
|
73
|
-
border-right: var(--arrow-size) solid var(--bui-color-bg-view);
|
|
75
|
+
border-top: var(--bui-popover-arrow-size) solid transparent;
|
|
76
|
+
border-bottom: var(--bui-popover-arrow-size) solid transparent;
|
|
77
|
+
border-right: var(--bui-popover-arrow-size) solid var(--bui-color-bg-view);
|
|
74
78
|
left: 0;
|
|
75
79
|
}
|
|
76
80
|
.bui-popover .bui-popover-title {
|
|
77
81
|
font-weight: var(--bui-font-weight-bold);
|
|
78
82
|
}
|
|
79
83
|
.bui-popover .bui-popover-content {
|
|
80
|
-
min-width: var(--content-min-width);
|
|
84
|
+
min-width: var(--bui-popover-content-min-width);
|
|
81
85
|
color: var(--bui-color-fg-muted);
|
|
82
|
-
padding: var(--content-padding);
|
|
86
|
+
padding: var(--bui-popover-content-padding);
|
|
83
87
|
text-align: left;
|
|
84
88
|
text-decoration: none;
|
|
85
89
|
word-wrap: break-word;
|
package/es/Progress/Progress.js
CHANGED
|
@@ -28,7 +28,7 @@ var __objRest = (source, exclude) => {
|
|
|
28
28
|
};
|
|
29
29
|
import clsx from "clsx";
|
|
30
30
|
import React from "react";
|
|
31
|
-
import "./
|
|
31
|
+
import "./index.css";
|
|
32
32
|
const prefixCls = "bui-progress";
|
|
33
33
|
function validProgress(progress) {
|
|
34
34
|
if (!progress || progress < 0) {
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
:root,
|
|
2
|
+
page,
|
|
3
|
+
xhs-page {
|
|
4
|
+
--bui-progress-fill-color: var(--bui-color-primary);
|
|
5
|
+
--bui-progress-trail-color: rgba(156, 156, 165, 0.2);
|
|
6
|
+
--bui-progress-stroke-width: 8px;
|
|
7
|
+
--bui-progress-width: 100%;
|
|
8
|
+
--bui-progress-border-radius: 100px;
|
|
9
|
+
}
|
|
10
|
+
.bui-progress {
|
|
11
|
+
width: var(--bui-progress-width);
|
|
12
|
+
font-family: var(--bui-font-family);
|
|
13
|
+
}
|
|
14
|
+
.bui-progress-inner {
|
|
15
|
+
position: relative;
|
|
16
|
+
display: inline-block;
|
|
17
|
+
width: var(--bui-progress-width);
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
vertical-align: middle;
|
|
20
|
+
background-color: var(--bui-progress-trail-color);
|
|
21
|
+
border-radius: var(--bui-progress-border-radius);
|
|
22
|
+
}
|
|
23
|
+
.bui-progress-bg {
|
|
24
|
+
position: relative;
|
|
25
|
+
border-radius: var(--bui-progress-border-radius);
|
|
26
|
+
background-color: var(--bui-progress-fill-color);
|
|
27
|
+
height: var(--bui-progress-stroke-width);
|
|
28
|
+
}
|
package/es/Radio/Radio.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { RadioProps } from './Radio.types';
|
|
3
|
-
import './
|
|
3
|
+
import './index.less';
|
|
4
4
|
declare const Radio: React.ForwardRefExoticComponent<Omit<RadioProps<"div", {}>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export default Radio;
|
package/es/Radio/Radio.js
CHANGED
|
@@ -34,7 +34,7 @@ import clsx from "clsx";
|
|
|
34
34
|
import React, { forwardRef, useContext } from "react";
|
|
35
35
|
import RadioButtonIcon from "./RadioButtonIcon";
|
|
36
36
|
import RadioContext from "./RadioContext";
|
|
37
|
-
import "./
|
|
37
|
+
import "./index.css";
|
|
38
38
|
const prefixCls = "bui-radio";
|
|
39
39
|
const Radio = forwardRef((props, ref) => {
|
|
40
40
|
const _a = props, {
|
|
@@ -6,7 +6,12 @@ import clsx from "clsx";
|
|
|
6
6
|
import React from "react";
|
|
7
7
|
const prefixCls = "bui-radio-btn-icon";
|
|
8
8
|
function RadioButtonIcon(props) {
|
|
9
|
-
const {
|
|
9
|
+
const {
|
|
10
|
+
checked,
|
|
11
|
+
size = "medium",
|
|
12
|
+
color,
|
|
13
|
+
htmlColor = "var(--bui-color-fg-subtle)"
|
|
14
|
+
} = props;
|
|
10
15
|
return /* @__PURE__ */ React.createElement(
|
|
11
16
|
"span",
|
|
12
17
|
{
|
package/es/Radio/RadioGroup.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import './Radio.less';
|
|
3
2
|
import { RadioGroupProps } from './Radio.types';
|
|
3
|
+
import './index.less';
|
|
4
4
|
declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroupProps<"div", {}>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export default RadioGroup;
|
package/es/Radio/RadioGroup.js
CHANGED
|
@@ -29,8 +29,8 @@ var __objRest = (source, exclude) => {
|
|
|
29
29
|
import { useValue } from "@bifrostui/utils";
|
|
30
30
|
import clsx from "clsx";
|
|
31
31
|
import React, { forwardRef } from "react";
|
|
32
|
-
import "./Radio.css";
|
|
33
32
|
import { RadioContextProvider } from "./RadioContext";
|
|
33
|
+
import "./index.css";
|
|
34
34
|
const prefixCls = "bui-radio-group";
|
|
35
35
|
const RadioGroup = forwardRef((props, ref) => {
|
|
36
36
|
const _a = props, {
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
:root,
|
|
2
|
+
page,
|
|
3
|
+
xhs-page {
|
|
4
|
+
--bui-radio-label-color: var(--bui-color-fg-default);
|
|
5
|
+
--bui-radio-label-font-size: var(--bui-text-size-1);
|
|
6
|
+
--bui-radio-icon-padding: 5px;
|
|
7
|
+
}
|
|
1
8
|
.bui-radio {
|
|
2
|
-
--label-color: var(--bui-radio-label-color, var(--bui-color-fg-default));
|
|
3
|
-
--label-font-size: var(--bui-radio-label-font-size, var(--bui-text-size-1));
|
|
4
|
-
--icon-padding: var(--bui-radio-icon-padding, 5px);
|
|
5
9
|
display: inline-flex;
|
|
6
10
|
align-items: center;
|
|
7
11
|
position: relative;
|
|
@@ -35,12 +39,12 @@
|
|
|
35
39
|
align-items: center;
|
|
36
40
|
justify-content: center;
|
|
37
41
|
flex-shrink: 0;
|
|
38
|
-
padding: var(--icon-padding);
|
|
42
|
+
padding: var(--bui-radio-icon-padding);
|
|
39
43
|
box-sizing: border-box;
|
|
40
44
|
}
|
|
41
45
|
.bui-radio-label {
|
|
42
|
-
font-size: var(--label-font-size);
|
|
43
|
-
color: var(--label-color);
|
|
46
|
+
font-size: var(--bui-radio-label-font-size);
|
|
47
|
+
color: var(--bui-radio-label-color);
|
|
44
48
|
}
|
|
45
49
|
.bui-radio-btn-icon {
|
|
46
50
|
position: relative;
|
package/es/Rating/Rating.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { RatingProps } from './Rating.types';
|
|
3
|
-
import './
|
|
3
|
+
import './index.less';
|
|
4
4
|
declare const Rating: React.ForwardRefExoticComponent<Omit<RatingProps<"div", {}>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export default Rating;
|
package/es/Rating/Rating.js
CHANGED
|
@@ -30,7 +30,7 @@ import { StarFilledIcon } from "@bifrostui/icons";
|
|
|
30
30
|
import { useValue } from "@bifrostui/utils";
|
|
31
31
|
import clsx from "clsx";
|
|
32
32
|
import React, { forwardRef } from "react";
|
|
33
|
-
import "./
|
|
33
|
+
import "./index.css";
|
|
34
34
|
const classes = {
|
|
35
35
|
root: "bui-rating",
|
|
36
36
|
item: "bui-rating-item",
|
|
@@ -42,7 +42,7 @@ const Rating = forwardRef((props, ref) => {
|
|
|
42
42
|
size = "medium",
|
|
43
43
|
defaultValue,
|
|
44
44
|
allowHalf = false,
|
|
45
|
-
icon = /* @__PURE__ */ React.createElement(StarFilledIcon, {
|
|
45
|
+
icon = /* @__PURE__ */ React.createElement(StarFilledIcon, { color: "disabled" }),
|
|
46
46
|
checkedIcon = /* @__PURE__ */ React.createElement(StarFilledIcon, { color: "warning" }),
|
|
47
47
|
count = 5,
|
|
48
48
|
readOnly = false,
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
:root,
|
|
2
|
+
page,
|
|
3
|
+
xhs-page {
|
|
4
|
+
--bui-rating-xsmall-font-size: var(--bui-text-size-5);
|
|
5
|
+
--bui-rating-xsmall-margin-right: 0;
|
|
6
|
+
--bui-rating-small-margin-right: 0.5px;
|
|
7
|
+
--bui-rating-small-font-size: var(--bui-text-size-1);
|
|
8
|
+
--bui-rating-margin-right: 1px;
|
|
9
|
+
--bui-rating-font-size: var(--bui-title-size-3);
|
|
10
|
+
--bui-rating-large-margin-right: 2px;
|
|
11
|
+
--bui-rating-large-font-size: 22px;
|
|
12
|
+
}
|
|
1
13
|
.bui-rating {
|
|
2
14
|
--small-margin-right: var(--bui-rating-small-margin-right, 0.5px);
|
|
3
15
|
--medium-margin-right: var(--bui-rating-medium-margin-right, 1px);
|
|
@@ -19,19 +31,20 @@
|
|
|
19
31
|
margin-right: 0;
|
|
20
32
|
}
|
|
21
33
|
.bui-rating-container-xsmall {
|
|
22
|
-
font-size: var(--bui-
|
|
34
|
+
font-size: var(--bui-rating-xsmall-font-size);
|
|
35
|
+
margin-right: var(--bui-rating-xsmall-margin-right);
|
|
23
36
|
}
|
|
24
37
|
.bui-rating-container-small {
|
|
25
|
-
font-size: var(--bui-
|
|
26
|
-
margin-right: var(--small-margin-right);
|
|
38
|
+
font-size: var(--bui-rating-small-font-size);
|
|
39
|
+
margin-right: var(--bui-rating-small-margin-right);
|
|
27
40
|
}
|
|
28
41
|
.bui-rating-container-medium {
|
|
29
|
-
font-size: var(--bui-
|
|
30
|
-
margin-right: var(--
|
|
42
|
+
font-size: var(--bui-rating-font-size);
|
|
43
|
+
margin-right: var(--bui-rating-margin-right);
|
|
31
44
|
}
|
|
32
45
|
.bui-rating-container-large {
|
|
33
|
-
font-size: var(--large-font-size);
|
|
34
|
-
margin-right: var(--large-margin-right);
|
|
46
|
+
font-size: var(--bui-rating-large-font-size);
|
|
47
|
+
margin-right: var(--bui-rating-large-margin-right);
|
|
35
48
|
}
|
|
36
49
|
.bui-rating-item {
|
|
37
50
|
display: flex;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import './
|
|
2
|
+
import './index.less';
|
|
3
3
|
import { ScrollViewProps } from './ScrollView.types';
|
|
4
4
|
declare const ScrollView: React.ForwardRefExoticComponent<Omit<ScrollViewProps<"div", {}>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export default ScrollView;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useForkRef } from "@bifrostui/utils";
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import React, { forwardRef, useCallback, useEffect, useRef } from "react";
|
|
4
|
-
import "./
|
|
4
|
+
import "./index.css";
|
|
5
5
|
function easeOutScroll(from, to, callback) {
|
|
6
6
|
if (from === to || typeof from !== "number") {
|
|
7
7
|
return;
|
package/es/Select/Select.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SelectProps } from './Select.types';
|
|
3
|
-
import './
|
|
3
|
+
import './index.less';
|
|
4
4
|
declare const Select: React.ForwardRefExoticComponent<Omit<SelectProps<"div", {}>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export default Select;
|
package/es/Select/Select.js
CHANGED
|
@@ -45,7 +45,7 @@ import Slide from "../Slide";
|
|
|
45
45
|
import BuiSelectContext from "./selectContext";
|
|
46
46
|
import Backdrop from "../Backdrop";
|
|
47
47
|
import Portal from "../Portal";
|
|
48
|
-
import "./
|
|
48
|
+
import "./index.css";
|
|
49
49
|
const prefixCls = "bui-select";
|
|
50
50
|
const defaultPlacement = "bottom";
|
|
51
51
|
const Select = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
@@ -163,13 +163,7 @@ const Select = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
163
163
|
};
|
|
164
164
|
}
|
|
165
165
|
}, []);
|
|
166
|
-
const defaultIcon = isOpen ? /* @__PURE__ */ React.createElement(CaretUpIcon, { className: `${prefixCls}-selector-icon`,
|
|
167
|
-
CaretDownIcon,
|
|
168
|
-
{
|
|
169
|
-
className: `${prefixCls}-selector-icon`,
|
|
170
|
-
htmlColor: "#9c9ca5"
|
|
171
|
-
}
|
|
172
|
-
);
|
|
166
|
+
const defaultIcon = isOpen ? /* @__PURE__ */ React.createElement(CaretUpIcon, { className: `${prefixCls}-selector-icon`, color: "neutral" }) : /* @__PURE__ */ React.createElement(CaretDownIcon, { className: `${prefixCls}-selector-icon`, color: "neutral" });
|
|
173
167
|
const renderOptions = () => {
|
|
174
168
|
var _a2;
|
|
175
169
|
return /* @__PURE__ */ React.createElement(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SelectOptionProps } from './Select.types';
|
|
3
|
-
import './
|
|
3
|
+
import './index.less';
|
|
4
4
|
declare const SelectOption: React.ForwardRefExoticComponent<Omit<SelectOptionProps<"div", {}>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export default SelectOption;
|
|
@@ -32,7 +32,7 @@ var __objRest = (source, exclude) => {
|
|
|
32
32
|
import clsx from "clsx";
|
|
33
33
|
import React, { useContext, useEffect } from "react";
|
|
34
34
|
import BuiSelectContext from "./selectContext";
|
|
35
|
-
import "./
|
|
35
|
+
import "./index.css";
|
|
36
36
|
const prefixCls = "bui-select-option";
|
|
37
37
|
const SelectOption = /* @__PURE__ */ React.forwardRef(
|
|
38
38
|
(props, ref) => {
|
|
@@ -1,13 +1,23 @@
|
|
|
1
|
+
:root,
|
|
2
|
+
page,
|
|
3
|
+
xhs-page {
|
|
4
|
+
--bui-select-height: 32px;
|
|
5
|
+
--bui-select-min-width: 100px;
|
|
6
|
+
--bui-select-font-size: var(--bui-text-size-1);
|
|
7
|
+
--bui-select-selector-container-padding: 0 14px;
|
|
8
|
+
--bui-select-option-main-padding: 3px 0;
|
|
9
|
+
--bui-select-option-padding: 0 14px;
|
|
10
|
+
--bui-select-option-border-radius: 5px;
|
|
11
|
+
--bui-select-option-margin: 0 3px;
|
|
12
|
+
--bui-select-option-height: 32px;
|
|
13
|
+
--bui-select-option-active-bg-color: #fff2f0;
|
|
14
|
+
}
|
|
1
15
|
.bui-select {
|
|
2
|
-
--height: var(--bui-select-height, 27px);
|
|
3
|
-
--mini-width: var(--bui-select-min-width, 100px);
|
|
4
|
-
--font-size: var(--bui-select-font-size, var(--bui-title-size-3));
|
|
5
|
-
--padding: var(--bui-select-selector-container, 0 14px);
|
|
6
16
|
position: relative;
|
|
7
17
|
cursor: pointer;
|
|
8
|
-
height: var(--height);
|
|
9
|
-
min-width: var(--
|
|
10
|
-
font-size: var(--font-size);
|
|
18
|
+
height: var(--bui-select-height);
|
|
19
|
+
min-width: var(--bui-select-min-width);
|
|
20
|
+
font-size: var(--bui-select-font-size);
|
|
11
21
|
border-radius: 5px;
|
|
12
22
|
background-color: var(--bui-color-bg-view);
|
|
13
23
|
font-family: var(--bui-font-family);
|
|
@@ -19,7 +29,7 @@
|
|
|
19
29
|
.bui-select-selector-container {
|
|
20
30
|
display: flex;
|
|
21
31
|
align-items: center;
|
|
22
|
-
padding: var(--padding);
|
|
32
|
+
padding: var(--bui-select-selector-container-padding);
|
|
23
33
|
height: 100%;
|
|
24
34
|
}
|
|
25
35
|
.bui-select-input {
|
|
@@ -37,7 +47,7 @@
|
|
|
37
47
|
justify-content: space-between;
|
|
38
48
|
align-items: center;
|
|
39
49
|
flex: 1;
|
|
40
|
-
height: var(--height);
|
|
50
|
+
height: var(--bui-select-height);
|
|
41
51
|
background-color: transparent;
|
|
42
52
|
outline: none;
|
|
43
53
|
border: 0;
|
|
@@ -69,29 +79,26 @@
|
|
|
69
79
|
}
|
|
70
80
|
.bui-select-option-main {
|
|
71
81
|
border-radius: 3px;
|
|
72
|
-
padding: var(--bui-select-option-
|
|
82
|
+
padding: var(--bui-select-option-main-padding);
|
|
73
83
|
box-shadow: 0 0 0 2px var(--bui-color-bg-default);
|
|
74
84
|
overflow: hidden;
|
|
75
85
|
}
|
|
76
86
|
.bui-select-option {
|
|
77
|
-
--option-padding: var(--bui-select-option-padding, 0 14px);
|
|
78
|
-
--option-margin: var(--bui-select-option-margin, 0 3px);
|
|
79
|
-
--option-height: var(--bui-select-option-height, 27px);
|
|
80
87
|
display: flex;
|
|
81
88
|
align-items: center;
|
|
82
|
-
height: var(--option-height);
|
|
83
|
-
padding: var(--option-padding);
|
|
84
|
-
border-radius:
|
|
85
|
-
margin: var(--option-margin);
|
|
89
|
+
height: var(--bui-select-option-height);
|
|
90
|
+
padding: var(--bui-select-option-padding);
|
|
91
|
+
border-radius: var(--bui-select-option-border-radius);
|
|
92
|
+
margin: var(--bui-select-option-margin);
|
|
86
93
|
}
|
|
87
94
|
.bui-select-option:hover {
|
|
88
|
-
background-color: var(
|
|
95
|
+
background-color: var(--bui-select-option-active-bg-color);
|
|
89
96
|
color: var(--bui-color-primary);
|
|
90
97
|
}
|
|
91
98
|
.bui-select-option-active {
|
|
92
99
|
font-weight: var(--bui-font-weight-medium);
|
|
93
100
|
color: var(--bui-color-primary);
|
|
94
|
-
background-color: var(
|
|
101
|
+
background-color: var(--bui-select-option-active-bg-color);
|
|
95
102
|
}
|
|
96
103
|
.bui-select-option-hide {
|
|
97
104
|
opacity: 0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import './Skeleton.less';
|
|
3
2
|
import { SkeletonProps } from './Skeleton.types';
|
|
3
|
+
import './index.less';
|
|
4
4
|
declare const Skeleton: React.ForwardRefExoticComponent<Omit<SkeletonProps<"div", {}>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
5
5
|
export default Skeleton;
|
package/es/Skeleton/Skeleton.js
CHANGED
|
@@ -28,7 +28,7 @@ var __objRest = (source, exclude) => {
|
|
|
28
28
|
};
|
|
29
29
|
import clsx from "clsx";
|
|
30
30
|
import React from "react";
|
|
31
|
-
import "./
|
|
31
|
+
import "./index.css";
|
|
32
32
|
const prefixCls = "bui-skeleton";
|
|
33
33
|
const Skeleton = /* @__PURE__ */ React.forwardRef(
|
|
34
34
|
(_a, ref) => {
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
:root,
|
|
2
|
+
page,
|
|
3
|
+
xhs-page {
|
|
4
|
+
--bui-skeleton-height: 1.2em;
|
|
5
|
+
}
|
|
1
6
|
.bui-skeleton {
|
|
2
|
-
--height: var(--bui-skeleton-height, 1.2em);
|
|
3
7
|
display: block;
|
|
4
8
|
}
|
|
5
9
|
.bui-skeleton-animation-wave {
|
|
@@ -26,10 +30,10 @@
|
|
|
26
30
|
content: "\a0";
|
|
27
31
|
}
|
|
28
32
|
.bui-skeleton-rectangular {
|
|
29
|
-
height: var(--height);
|
|
33
|
+
height: var(--bui-skeleton-height);
|
|
30
34
|
}
|
|
31
35
|
.bui-skeleton-rounded {
|
|
32
|
-
height: var(--height);
|
|
36
|
+
height: var(--bui-skeleton-height);
|
|
33
37
|
border-radius: var(--bui-shape-radius-label);
|
|
34
38
|
}
|
|
35
39
|
.bui-skeleton-circular {
|
package/es/Slider/Slider.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import './Slider.less';
|
|
3
2
|
import { SliderProps } from './Slider.types';
|
|
3
|
+
import './index.less';
|
|
4
4
|
declare const Slider: React.ForwardRefExoticComponent<Omit<SliderProps<"div", {}>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export default Slider;
|
package/es/Slider/Slider.js
CHANGED
|
@@ -62,8 +62,8 @@ import React, {
|
|
|
62
62
|
useRef,
|
|
63
63
|
useState
|
|
64
64
|
} from "react";
|
|
65
|
-
import "./Slider.css";
|
|
66
65
|
import { formatValue, isSameValue, sortValue } from "./utils";
|
|
66
|
+
import "./index.css";
|
|
67
67
|
const classes = {
|
|
68
68
|
root: "bui-slider",
|
|
69
69
|
button: "bui-slider-button",
|
|
@@ -116,7 +116,7 @@ const Slider = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
116
116
|
const touchStartLeft = useRef();
|
|
117
117
|
const buttonIndex = useRef(0);
|
|
118
118
|
const beforeMoveValue = useRef([0, 0]);
|
|
119
|
-
const defaultIcon = /* @__PURE__ */ React.createElement(GripperBarVerticalIcon, { htmlColor: "
|
|
119
|
+
const defaultIcon = /* @__PURE__ */ React.createElement(GripperBarVerticalIcon, { htmlColor: "var(--bui-color-fg-default)" });
|
|
120
120
|
const initialRange = useRef(
|
|
121
121
|
value !== void 0 && Array.isArray(value) || defaultValue !== void 0 && Array.isArray(defaultValue)
|
|
122
122
|
);
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
:root,
|
|
2
|
+
page,
|
|
3
|
+
xhs-page {
|
|
4
|
+
--bui-slider-line-color: var(--bui-color-primary);
|
|
5
|
+
--bui-slider-line-bg-color: var(--bui-color-border-default);
|
|
6
|
+
--bui-slider-width: 100%;
|
|
7
|
+
--bui-slider-height: 2px;
|
|
8
|
+
--bui-slider-padding: 19px 0;
|
|
9
|
+
--bui-slider-button-width: 26px;
|
|
10
|
+
--bui-slider-button-height: 26px;
|
|
11
|
+
--bui-slider-button-font-size: var(--bui-title-size-3);
|
|
12
|
+
--bui-slider-button-box-shadow: #ddd 0 0 10px;
|
|
13
|
+
--bui-slider-button-border-radius: 50%;
|
|
14
|
+
--bui-slider-tooltip-width: 46px;
|
|
15
|
+
--bui-slider-tooltip-height: 24px;
|
|
16
|
+
--bui-slider-tooltip-line-height: 24px;
|
|
17
|
+
--bui-slider-tooltip-border-radius: 24px;
|
|
18
|
+
--bui-slider-tooltip-font-size: var(--bui-text-size-3);
|
|
19
|
+
--bui-slider-tooltip-color: var(--bui-color-white);
|
|
20
|
+
--bui-slider-tooltip-bg-color: var(--bui-slider-line-color);
|
|
21
|
+
}
|
|
22
|
+
.bui-slider {
|
|
23
|
+
position: relative;
|
|
24
|
+
width: var(--bui-slider-width);
|
|
25
|
+
height: var(--bui-slider-height);
|
|
26
|
+
padding: var(--bui-slider-padding);
|
|
27
|
+
box-sizing: border-box;
|
|
28
|
+
font-family: var(--bui-font-family);
|
|
29
|
+
}
|
|
30
|
+
.bui-slider-disabled {
|
|
31
|
+
pointer-events: none;
|
|
32
|
+
opacity: 0.5;
|
|
33
|
+
}
|
|
34
|
+
.bui-slider-line {
|
|
35
|
+
position: absolute;
|
|
36
|
+
top: 50%;
|
|
37
|
+
left: 0;
|
|
38
|
+
height: var(--bui-slider-height);
|
|
39
|
+
transform: translateY(-50%);
|
|
40
|
+
background-color: var(--bui-slider-line-color);
|
|
41
|
+
}
|
|
42
|
+
.bui-slider-rail {
|
|
43
|
+
position: absolute;
|
|
44
|
+
top: 50%;
|
|
45
|
+
left: 0;
|
|
46
|
+
width: 100%;
|
|
47
|
+
height: var(--bui-slider-height);
|
|
48
|
+
transform: translateY(-50%);
|
|
49
|
+
background-color: var(--bui-slider-line-bg-color);
|
|
50
|
+
}
|
|
51
|
+
.bui-slider-button {
|
|
52
|
+
display: flex;
|
|
53
|
+
position: absolute;
|
|
54
|
+
justify-content: center;
|
|
55
|
+
align-items: center;
|
|
56
|
+
width: var(--bui-slider-button-width);
|
|
57
|
+
height: var(--bui-slider-button-height);
|
|
58
|
+
background-color: var(--bui-color-white);
|
|
59
|
+
box-shadow: var(--bui-slider-button-box-shadow);
|
|
60
|
+
border-radius: var(--bui-slider-button-border-radius);
|
|
61
|
+
transform: translate(-50%, -50%);
|
|
62
|
+
font-size: var(--bui-slider-button-font-size);
|
|
63
|
+
cursor: grab;
|
|
64
|
+
}
|
|
65
|
+
.bui-slider-button::after {
|
|
66
|
+
position: absolute;
|
|
67
|
+
content: "";
|
|
68
|
+
top: -10px;
|
|
69
|
+
bottom: -10px;
|
|
70
|
+
left: -10px;
|
|
71
|
+
right: -10px;
|
|
72
|
+
}
|
|
73
|
+
.bui-slider-button-0 {
|
|
74
|
+
left: 0%;
|
|
75
|
+
top: 50%;
|
|
76
|
+
z-index: var(--bui-z-index-affix);
|
|
77
|
+
}
|
|
78
|
+
.bui-slider-button-1 {
|
|
79
|
+
left: 0%;
|
|
80
|
+
top: 50%;
|
|
81
|
+
z-index: var(--bui-z-index-affix);
|
|
82
|
+
}
|
|
83
|
+
.bui-slider-tooltip {
|
|
84
|
+
position: absolute;
|
|
85
|
+
top: -14px;
|
|
86
|
+
width: var(--bui-slider-tooltip-width);
|
|
87
|
+
height: var(--bui-slider-tooltip-height);
|
|
88
|
+
line-height: var(--bui-slider-tooltip-line-height);
|
|
89
|
+
font-size: var(--bui-slider-tooltip-font-size);
|
|
90
|
+
border-radius: var(--bui-slider-tooltip-border-radius);
|
|
91
|
+
color: var(--bui-slider-tooltip-color);
|
|
92
|
+
text-align: center;
|
|
93
|
+
background-color: var(--bui-slider-tooltip-bg-color);
|
|
94
|
+
transform: translate(-50%, -50%);
|
|
95
|
+
z-index: var(--bui-z-index-affix);
|
|
96
|
+
}
|
|
97
|
+
.bui-slider-tooltip::after {
|
|
98
|
+
position: absolute;
|
|
99
|
+
bottom: -10px;
|
|
100
|
+
left: 0;
|
|
101
|
+
right: 0;
|
|
102
|
+
margin: 0 auto;
|
|
103
|
+
content: "";
|
|
104
|
+
width: 0;
|
|
105
|
+
height: 0;
|
|
106
|
+
border: 6px solid transparent;
|
|
107
|
+
border-top: 6px solid var(--bui-slider-tooltip-bg-color);
|
|
108
|
+
}
|
|
109
|
+
.bui-slider-tooltip-hidden {
|
|
110
|
+
display: none;
|
|
111
|
+
}
|