@bifrostui/react 1.3.2 → 1.4.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ActionSheet/ActionSheet.css +6 -3
- package/dist/ActionSheet/ActionSheetItem.css +10 -6
- package/dist/Alert/index.css +14 -8
- package/dist/Avatar/Avatar.css +13 -9
- package/dist/Avatar/AvatarGroup.css +15 -8
- package/dist/Backdrop/Backdrop.css +2 -1
- package/dist/Badge/Badge.css +27 -17
- package/dist/Breadcrumb/Breadcrumb.css +34 -0
- package/dist/Breadcrumb/Breadcrumb.d.ts +5 -0
- package/dist/Breadcrumb/Breadcrumb.js +128 -0
- package/dist/Breadcrumb/Breadcrumb.types.d.ts +49 -0
- package/dist/Breadcrumb/Breadcrumb.types.js +15 -0
- package/dist/Breadcrumb/BreadcrumbItem.d.ts +4 -0
- package/dist/Breadcrumb/BreadcrumbItem.js +78 -0
- package/dist/Breadcrumb/index.d.ts +4 -0
- package/dist/Breadcrumb/index.js +45 -0
- package/dist/Button/Button.css +37 -25
- package/dist/Calendar/Calendar.css +33 -18
- package/dist/Calendar/Calendar.d.ts +1 -1
- package/dist/Calendar/Calendar.js +38 -17
- package/dist/Calendar/Calendar.types.d.ts +21 -0
- package/dist/Card/CardFooter.css +2 -1
- package/dist/Card/CardHeader.css +3 -1
- package/dist/Checkbox/Checkbox.css +7 -5
- package/dist/CitySelector/CitySelector.css +29 -15
- package/dist/CitySelector/CitySelectorCore.js +25 -16
- package/dist/CitySelector/Selector/index.css +4 -4
- package/dist/Collapse/Collapse.css +6 -0
- package/dist/Collapse/Collapse.d.ts +5 -0
- package/dist/Collapse/Collapse.js +165 -0
- package/dist/Collapse/Collapse.types.d.ts +16 -0
- package/dist/Collapse/Collapse.types.js +15 -0
- package/dist/Collapse/index.d.ts +2 -0
- package/dist/Collapse/index.js +41 -0
- package/dist/CollapsePanel/CollapsePanel.css +32 -0
- package/dist/CollapsePanel/CollapsePanel.d.ts +5 -0
- package/dist/CollapsePanel/CollapsePanel.js +159 -0
- package/dist/CollapsePanel/CollapsePanel.types.d.ts +64 -0
- package/dist/CollapsePanel/CollapsePanel.types.js +15 -0
- package/dist/CollapsePanel/CollapsePanelItem.d.ts +4 -0
- package/dist/CollapsePanel/CollapsePanelItem.js +112 -0
- package/dist/CollapsePanel/index.d.ts +4 -0
- package/dist/CollapsePanel/index.js +45 -0
- package/dist/Countdown/Countdown.css +2 -1
- package/dist/Dialog/Dialog.d.ts +2 -2
- package/dist/Dialog/Dialog.js +20 -8
- package/dist/Dialog/Dialog.types.d.ts +12 -1
- package/dist/Dialog/FunctionalDialog.js +38 -2
- package/dist/Dialog/index.css +27 -18
- package/dist/Divider/Divider.css +6 -4
- package/dist/IconButton/IconButton.css +9 -7
- package/dist/Image/index.css +2 -1
- package/dist/Input/Input.css +14 -7
- package/dist/List/List.css +3 -0
- package/dist/List/ListItem.css +3 -3
- package/dist/List/ListItemContent.css +1 -1
- package/dist/Loading/Loading.css +4 -2
- package/dist/NavBar/NavBar.css +9 -5
- package/dist/Picker/Picker.css +25 -29
- package/dist/Picker/Picker.js +31 -11
- package/dist/Picker/Picker.types.d.ts +4 -0
- package/dist/Picker/PickerPanel.css +8 -8
- package/dist/Picker/PickerPanel.js +14 -8
- package/dist/Picker/utils.d.ts +16 -0
- package/dist/Picker/utils.js +32 -2
- package/dist/Popover/Popover.css +97 -0
- package/dist/Popover/Popover.d.ts +5 -0
- package/dist/Popover/Popover.js +195 -0
- package/dist/Popover/Popover.types.d.ts +58 -0
- package/dist/Popover/Popover.types.js +15 -0
- package/dist/Popover/index.d.ts +2 -0
- package/dist/Popover/index.js +41 -0
- package/dist/Portal/Portal.types.d.ts +4 -0
- package/dist/Portal/PortalCore.js +8 -1
- package/dist/Progress/Progress.css +9 -7
- package/dist/Radio/Radio.css +5 -4
- package/dist/Rating/Rating.css +8 -4
- package/dist/Select/Select.css +21 -10
- package/dist/Select/Select.js +1 -1
- package/dist/Select/SelectOption.js +3 -0
- package/dist/Skeleton/Skeleton.css +5 -5
- package/dist/Slider/Slider.css +29 -18
- package/dist/Steps/Step.css +13 -13
- package/dist/Steps/Steps.css +14 -7
- package/dist/Swiper/Swiper.css +2 -1
- package/dist/Switch/Switch.css +31 -16
- package/dist/TabBar/TabBar.css +7 -3
- package/dist/TabBar/TabBarItem.css +0 -1
- package/dist/Tabs/Tab.css +6 -10
- package/dist/Tabs/Tabs.css +10 -9
- package/dist/Tag/Tag.css +7 -10
- package/dist/Tag/TagGroup.css +9 -1
- package/dist/TextArea/TextArea.css +23 -13
- package/dist/ThemeProvider/ThemeProvider.d.ts +4 -0
- package/dist/ThemeProvider/ThemeProvider.js +91 -0
- package/dist/ThemeProvider/ThemeProvider.types.d.ts +127 -0
- package/dist/ThemeProvider/ThemeProvider.types.js +27 -0
- package/dist/ThemeProvider/hooks/ThemeContext.d.ts +4 -0
- package/dist/ThemeProvider/hooks/ThemeContext.js +35 -0
- package/dist/ThemeProvider/hooks/createTheme.d.ts +2 -0
- package/dist/ThemeProvider/hooks/createTheme.js +55 -0
- package/dist/ThemeProvider/hooks/index.d.ts +4 -0
- package/dist/ThemeProvider/hooks/index.js +43 -0
- package/dist/ThemeProvider/hooks/useTheme.d.ts +1 -0
- package/dist/ThemeProvider/hooks/useTheme.js +39 -0
- package/dist/ThemeProvider/index.d.ts +4 -0
- package/dist/ThemeProvider/index.js +45 -0
- package/dist/ThemeProvider/utils/constants.d.ts +38 -0
- package/dist/ThemeProvider/utils/constants.js +65 -0
- package/dist/ThemeProvider/utils/index.d.ts +2 -0
- package/dist/ThemeProvider/utils/index.js +23 -0
- package/dist/ThemeProvider/utils/mountTokens.d.ts +26 -0
- package/dist/ThemeProvider/utils/mountTokens.js +123 -0
- package/dist/Toast/FunctionalToast.js +18 -0
- package/dist/Toast/Toast.css +18 -20
- package/dist/Toast/Toast.d.ts +2 -2
- package/dist/Toast/Toast.js +52 -48
- package/dist/Toast/Toast.types.d.ts +15 -1
- package/dist/Tooltip/Tooltip.css +91 -0
- package/dist/Tooltip/Tooltip.d.ts +5 -0
- package/dist/Tooltip/Tooltip.js +184 -0
- package/dist/Tooltip/Tooltip.types.d.ts +49 -0
- package/dist/Tooltip/Tooltip.types.js +15 -0
- package/dist/Tooltip/index.d.ts +2 -0
- package/dist/Tooltip/index.js +41 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +15 -1
- package/dist/locales/base.d.ts +40 -0
- package/dist/locales/base.js +15 -0
- package/dist/locales/en-US.d.ts +3 -0
- package/dist/locales/en-US.js +69 -0
- package/dist/locales/hooks/useLocaleText.d.ts +3 -0
- package/dist/locales/hooks/useLocaleText.js +43 -0
- package/dist/locales/index.d.ts +5 -0
- package/dist/locales/index.js +49 -0
- package/dist/locales/zh-CN.d.ts +3 -0
- package/dist/locales/zh-CN.js +51 -0
- package/dist/locales/zh-TW.d.ts +3 -0
- package/dist/locales/zh-TW.js +51 -0
- package/es/ActionSheet/ActionSheet.css +6 -3
- package/es/ActionSheet/ActionSheetItem.css +10 -6
- package/es/Alert/index.css +14 -8
- package/es/Avatar/Avatar.css +13 -9
- package/es/Avatar/AvatarGroup.css +15 -8
- package/es/Backdrop/Backdrop.css +2 -1
- package/es/Badge/Badge.css +27 -17
- package/es/Breadcrumb/Breadcrumb.css +34 -0
- package/es/Breadcrumb/Breadcrumb.d.ts +5 -0
- package/es/Breadcrumb/Breadcrumb.js +101 -0
- package/es/Breadcrumb/Breadcrumb.types.d.ts +49 -0
- package/es/Breadcrumb/Breadcrumb.types.js +1 -0
- package/es/Breadcrumb/BreadcrumbItem.d.ts +4 -0
- package/es/Breadcrumb/BreadcrumbItem.js +51 -0
- package/es/Breadcrumb/index.d.ts +4 -0
- package/es/Breadcrumb/index.js +9 -0
- package/es/Button/Button.css +37 -25
- package/es/Calendar/Calendar.css +33 -18
- package/es/Calendar/Calendar.d.ts +1 -1
- package/es/Calendar/Calendar.js +38 -17
- package/es/Calendar/Calendar.types.d.ts +21 -0
- package/es/Card/CardFooter.css +2 -1
- package/es/Card/CardHeader.css +3 -1
- package/es/Checkbox/Checkbox.css +7 -5
- package/es/CitySelector/CitySelector.css +29 -15
- package/es/CitySelector/CitySelectorCore.js +25 -16
- package/es/CitySelector/Selector/index.css +4 -4
- package/es/Collapse/Collapse.css +6 -0
- package/es/Collapse/Collapse.d.ts +5 -0
- package/es/Collapse/Collapse.js +144 -0
- package/es/Collapse/Collapse.types.d.ts +16 -0
- package/es/Collapse/Collapse.types.js +1 -0
- package/es/Collapse/index.d.ts +2 -0
- package/es/Collapse/index.js +6 -0
- package/es/CollapsePanel/CollapsePanel.css +32 -0
- package/es/CollapsePanel/CollapsePanel.d.ts +5 -0
- package/es/CollapsePanel/CollapsePanel.js +132 -0
- package/es/CollapsePanel/CollapsePanel.types.d.ts +64 -0
- package/es/CollapsePanel/CollapsePanel.types.js +1 -0
- package/es/CollapsePanel/CollapsePanelItem.d.ts +4 -0
- package/es/CollapsePanel/CollapsePanelItem.js +85 -0
- package/es/CollapsePanel/index.d.ts +4 -0
- package/es/CollapsePanel/index.js +9 -0
- package/es/Countdown/Countdown.css +2 -1
- package/es/Dialog/Dialog.d.ts +2 -2
- package/es/Dialog/Dialog.js +20 -8
- package/es/Dialog/Dialog.types.d.ts +12 -1
- package/es/Dialog/FunctionalDialog.js +38 -2
- package/es/Dialog/index.css +27 -18
- package/es/Divider/Divider.css +6 -4
- package/es/IconButton/IconButton.css +9 -7
- package/es/Image/index.css +2 -1
- package/es/Input/Input.css +14 -7
- package/es/List/List.css +3 -0
- package/es/List/ListItem.css +3 -3
- package/es/List/ListItemContent.css +1 -1
- package/es/Loading/Loading.css +4 -2
- package/es/Modal/Modal.miniapp.d.ts +1 -1
- package/es/NavBar/NavBar.css +9 -5
- package/es/Picker/Picker.css +25 -29
- package/es/Picker/Picker.js +32 -12
- package/es/Picker/Picker.types.d.ts +4 -0
- package/es/Picker/PickerPanel.css +8 -8
- package/es/Picker/PickerPanel.js +14 -8
- package/es/Picker/utils.d.ts +16 -0
- package/es/Picker/utils.js +29 -1
- package/es/Popover/Popover.css +97 -0
- package/es/Popover/Popover.d.ts +5 -0
- package/es/Popover/Popover.js +172 -0
- package/es/Popover/Popover.types.d.ts +58 -0
- package/es/Popover/Popover.types.js +1 -0
- package/es/Popover/index.d.ts +2 -0
- package/es/Popover/index.js +6 -0
- package/es/Portal/Portal.types.d.ts +4 -0
- package/es/Portal/PortalCore.js +8 -1
- package/es/Progress/Progress.css +9 -7
- package/es/Radio/Radio.css +5 -4
- package/es/Rating/Rating.css +8 -4
- package/es/Select/Select.css +21 -10
- package/es/Select/Select.js +1 -1
- package/es/Select/SelectOption.js +3 -0
- package/es/Skeleton/Skeleton.css +5 -5
- package/es/Slider/Slider.css +29 -18
- package/es/Steps/Step.css +13 -13
- package/es/Steps/Steps.css +14 -7
- package/es/Swiper/Swiper.css +2 -1
- package/es/Switch/Switch.css +31 -16
- package/es/TabBar/TabBar.css +7 -3
- package/es/TabBar/TabBarItem.css +0 -1
- package/es/Tabs/Tab.css +6 -10
- package/es/Tabs/Tabs.css +10 -9
- package/es/Tag/Tag.css +7 -10
- package/es/Tag/TagGroup.css +9 -1
- package/es/TextArea/TextArea.css +23 -13
- package/es/ThemeProvider/ThemeProvider.d.ts +4 -0
- package/es/ThemeProvider/ThemeProvider.js +62 -0
- package/es/ThemeProvider/ThemeProvider.types.d.ts +127 -0
- package/es/ThemeProvider/ThemeProvider.types.js +1 -0
- package/es/ThemeProvider/hooks/ThemeContext.d.ts +4 -0
- package/es/ThemeProvider/hooks/ThemeContext.js +6 -0
- package/es/ThemeProvider/hooks/createTheme.d.ts +2 -0
- package/es/ThemeProvider/hooks/createTheme.js +38 -0
- package/es/ThemeProvider/hooks/index.d.ts +4 -0
- package/es/ThemeProvider/hooks/index.js +8 -0
- package/es/ThemeProvider/hooks/useTheme.d.ts +1 -0
- package/es/ThemeProvider/hooks/useTheme.js +10 -0
- package/es/ThemeProvider/index.d.ts +4 -0
- package/es/ThemeProvider/index.js +8 -0
- package/es/ThemeProvider/utils/constants.d.ts +38 -0
- package/es/ThemeProvider/utils/constants.js +40 -0
- package/es/ThemeProvider/utils/index.d.ts +2 -0
- package/es/ThemeProvider/utils/index.js +2 -0
- package/es/ThemeProvider/utils/mountTokens.d.ts +26 -0
- package/es/ThemeProvider/utils/mountTokens.js +88 -0
- package/es/Toast/FunctionalToast.js +18 -0
- package/es/Toast/Toast.css +18 -20
- package/es/Toast/Toast.d.ts +2 -2
- package/es/Toast/Toast.js +53 -49
- package/es/Toast/Toast.types.d.ts +15 -1
- package/es/Tooltip/Tooltip.css +91 -0
- package/es/Tooltip/Tooltip.d.ts +5 -0
- package/es/Tooltip/Tooltip.js +161 -0
- package/es/Tooltip/Tooltip.types.d.ts +49 -0
- package/es/Tooltip/Tooltip.types.js +1 -0
- package/es/Tooltip/index.d.ts +2 -0
- package/es/Tooltip/index.js +6 -0
- package/es/index.d.ts +7 -0
- package/es/index.js +7 -0
- package/es/locales/base.d.ts +40 -0
- package/es/locales/base.js +0 -0
- package/es/locales/en-US.d.ts +3 -0
- package/es/locales/en-US.js +50 -0
- package/es/locales/hooks/useLocaleText.d.ts +3 -0
- package/es/locales/hooks/useLocaleText.js +26 -0
- package/es/locales/index.d.ts +5 -0
- package/es/locales/index.js +11 -0
- package/es/locales/zh-CN.d.ts +3 -0
- package/es/locales/zh-CN.js +32 -0
- package/es/locales/zh-TW.d.ts +3 -0
- package/es/locales/zh-TW.js +32 -0
- package/package.json +5 -5
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
+
var __spreadValues = (a, b) => {
|
|
13
|
+
for (var prop in b || (b = {}))
|
|
14
|
+
if (__hasOwnProp.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
if (__getOwnPropSymbols)
|
|
17
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
+
if (__propIsEnum.call(b, prop))
|
|
19
|
+
__defNormalProp(a, prop, b[prop]);
|
|
20
|
+
}
|
|
21
|
+
return a;
|
|
22
|
+
};
|
|
23
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
+
var __objRest = (source, exclude) => {
|
|
25
|
+
var target = {};
|
|
26
|
+
for (var prop in source)
|
|
27
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
if (source != null && __getOwnPropSymbols)
|
|
30
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
31
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
32
|
+
target[prop] = source[prop];
|
|
33
|
+
}
|
|
34
|
+
return target;
|
|
35
|
+
};
|
|
36
|
+
var __export = (target, all) => {
|
|
37
|
+
for (var name in all)
|
|
38
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
39
|
+
};
|
|
40
|
+
var __copyProps = (to, from, except, desc) => {
|
|
41
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
42
|
+
for (let key of __getOwnPropNames(from))
|
|
43
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
44
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
45
|
+
}
|
|
46
|
+
return to;
|
|
47
|
+
};
|
|
48
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
49
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
50
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
51
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
52
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
53
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
54
|
+
mod
|
|
55
|
+
));
|
|
56
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
57
|
+
var Popover_exports = {};
|
|
58
|
+
__export(Popover_exports, {
|
|
59
|
+
default: () => Popover_default
|
|
60
|
+
});
|
|
61
|
+
module.exports = __toCommonJS(Popover_exports);
|
|
62
|
+
var import_clsx = __toESM(require("clsx"));
|
|
63
|
+
var import_react = __toESM(require("react"));
|
|
64
|
+
var import_utils = require("@bifrostui/utils");
|
|
65
|
+
var import_Portal = __toESM(require("../Portal"));
|
|
66
|
+
var import_Popover = require("./Popover.css");
|
|
67
|
+
const prefixCls = "bui-popover";
|
|
68
|
+
const Popover = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
|
|
69
|
+
const _a = props, {
|
|
70
|
+
className,
|
|
71
|
+
style,
|
|
72
|
+
children,
|
|
73
|
+
title,
|
|
74
|
+
content,
|
|
75
|
+
defaultOpen,
|
|
76
|
+
placement = "top",
|
|
77
|
+
trigger,
|
|
78
|
+
onOpenChange,
|
|
79
|
+
open,
|
|
80
|
+
hideArrow,
|
|
81
|
+
PortalProps
|
|
82
|
+
} = _a, others = __objRest(_a, [
|
|
83
|
+
"className",
|
|
84
|
+
"style",
|
|
85
|
+
"children",
|
|
86
|
+
"title",
|
|
87
|
+
"content",
|
|
88
|
+
"defaultOpen",
|
|
89
|
+
"placement",
|
|
90
|
+
"trigger",
|
|
91
|
+
"onOpenChange",
|
|
92
|
+
"open",
|
|
93
|
+
"hideArrow",
|
|
94
|
+
"PortalProps"
|
|
95
|
+
]);
|
|
96
|
+
const controlByUser = typeof open !== "undefined";
|
|
97
|
+
const positionArr = placement.split(/([A-Z])/);
|
|
98
|
+
const direction = positionArr[0];
|
|
99
|
+
let location;
|
|
100
|
+
if (positionArr.length > 1) {
|
|
101
|
+
positionArr.splice(0, 1);
|
|
102
|
+
location = positionArr.join("").toLowerCase();
|
|
103
|
+
} else {
|
|
104
|
+
location = "center";
|
|
105
|
+
}
|
|
106
|
+
const childrenRef = (0, import_react.useRef)();
|
|
107
|
+
const [openStatus, setOpenStatus] = (0, import_react.useState)(defaultOpen);
|
|
108
|
+
const [arrowDirection, setArrowDirection] = (0, import_react.useState)(direction);
|
|
109
|
+
const [arrowLocation, setArrowLocation] = (0, import_react.useState)(location);
|
|
110
|
+
const [tooltyles, setTooltyles] = (0, import_react.useState)({});
|
|
111
|
+
const ttId = (0, import_utils.useUniqueId)();
|
|
112
|
+
(0, import_react.useEffect)(() => {
|
|
113
|
+
if (!controlByUser)
|
|
114
|
+
return;
|
|
115
|
+
setOpenStatus(open);
|
|
116
|
+
}, [open]);
|
|
117
|
+
const onRootElementMouted = () => {
|
|
118
|
+
const result = (0, import_utils.getStylesAndLocation)({
|
|
119
|
+
childrenRef,
|
|
120
|
+
arrowDirection,
|
|
121
|
+
arrowLocation,
|
|
122
|
+
selector: `[data-id="tt_${ttId}"]`
|
|
123
|
+
});
|
|
124
|
+
if (!result)
|
|
125
|
+
return;
|
|
126
|
+
const { styles, newArrowDirection, newArrowLocation } = result;
|
|
127
|
+
if (newArrowDirection !== arrowDirection) {
|
|
128
|
+
setArrowDirection(newArrowDirection);
|
|
129
|
+
}
|
|
130
|
+
if (newArrowLocation !== arrowLocation) {
|
|
131
|
+
setArrowLocation(newArrowLocation);
|
|
132
|
+
}
|
|
133
|
+
setTooltyles(styles);
|
|
134
|
+
};
|
|
135
|
+
const changeOpenStatus = (event, status) => {
|
|
136
|
+
if (controlByUser)
|
|
137
|
+
return;
|
|
138
|
+
setOpenStatus(status);
|
|
139
|
+
onOpenChange == null ? void 0 : onOpenChange(event, { open: status });
|
|
140
|
+
};
|
|
141
|
+
const triggerClick = (event) => {
|
|
142
|
+
const targetStatus = !openStatus;
|
|
143
|
+
changeOpenStatus(event, targetStatus);
|
|
144
|
+
};
|
|
145
|
+
const hidePopover = (event) => {
|
|
146
|
+
changeOpenStatus(event, false);
|
|
147
|
+
};
|
|
148
|
+
const showPopover = (event) => {
|
|
149
|
+
changeOpenStatus(event, true);
|
|
150
|
+
};
|
|
151
|
+
if (!title && !content)
|
|
152
|
+
return null;
|
|
153
|
+
let triggerEventOption;
|
|
154
|
+
if (!controlByUser) {
|
|
155
|
+
triggerEventOption = (0, import_utils.triggerEventTransform)({
|
|
156
|
+
trigger,
|
|
157
|
+
click: triggerClick,
|
|
158
|
+
show: showPopover,
|
|
159
|
+
hide: hidePopover
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
const childrenOptions = __spreadValues({
|
|
163
|
+
ref: childrenRef
|
|
164
|
+
}, triggerEventOption);
|
|
165
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, open || openStatus ? /* @__PURE__ */ import_react.default.createElement(
|
|
166
|
+
import_Portal.default,
|
|
167
|
+
__spreadProps(__spreadValues({
|
|
168
|
+
onRootElementMouted
|
|
169
|
+
}, PortalProps), {
|
|
170
|
+
ref
|
|
171
|
+
}),
|
|
172
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
173
|
+
"div",
|
|
174
|
+
__spreadValues({
|
|
175
|
+
className: (0, import_clsx.default)(prefixCls, className, `popover-${arrowDirection}`, {
|
|
176
|
+
"bui-popover-arrow-hide": hideArrow
|
|
177
|
+
}),
|
|
178
|
+
"data-id": `tt_${ttId}`,
|
|
179
|
+
style: __spreadValues(__spreadValues({}, style), tooltyles)
|
|
180
|
+
}, others),
|
|
181
|
+
!hideArrow ? /* @__PURE__ */ import_react.default.createElement(
|
|
182
|
+
"div",
|
|
183
|
+
{
|
|
184
|
+
className: (0, import_clsx.default)(
|
|
185
|
+
"bui-popover-arrow",
|
|
186
|
+
`location-${arrowLocation}`
|
|
187
|
+
)
|
|
188
|
+
}
|
|
189
|
+
) : null,
|
|
190
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "bui-popover-content" }, title ? /* @__PURE__ */ import_react.default.createElement("div", { className: "bui-popover-title" }, title) : null, content ? /* @__PURE__ */ import_react.default.createElement("div", { className: "bui-popover-inner-content" }, content) : null)
|
|
191
|
+
)
|
|
192
|
+
) : null, import_react.default.isValidElement(children) ? import_react.default.cloneElement(children, childrenOptions) : children);
|
|
193
|
+
});
|
|
194
|
+
Popover.displayName = "BuiPopover";
|
|
195
|
+
var Popover_default = Popover;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { OverrideProps } from '@bifrostui/types';
|
|
3
|
+
import { PortalCoreProps } from '../Portal/Portal.types';
|
|
4
|
+
type triggerType = 'click' | 'hover';
|
|
5
|
+
export type PopoverProps<D extends React.ElementType = 'div', P = {}> = OverrideProps<{
|
|
6
|
+
props: P & {
|
|
7
|
+
/**
|
|
8
|
+
* 默认是否显隐
|
|
9
|
+
* @default false
|
|
10
|
+
*/
|
|
11
|
+
defaultOpen?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* 用于手动控制浮层显隐
|
|
14
|
+
*/
|
|
15
|
+
open?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* 浮层的标题
|
|
18
|
+
*/
|
|
19
|
+
title?: React.ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* 浮层的内容
|
|
22
|
+
*/
|
|
23
|
+
content?: React.ReactNode;
|
|
24
|
+
/**
|
|
25
|
+
* 是否展示箭头
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
28
|
+
hideArrow?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* 气泡框位置
|
|
31
|
+
* @default 'top'
|
|
32
|
+
*/
|
|
33
|
+
placement?: 'top' | 'left' | 'right' | 'bottom' | 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight' | 'leftTop' | 'leftBottom' | 'rightTop' | 'rightBottom';
|
|
34
|
+
/**
|
|
35
|
+
* 触发行为
|
|
36
|
+
* - click: 点击触发
|
|
37
|
+
* - hover: hover触发
|
|
38
|
+
* - 或者是他们的数组
|
|
39
|
+
* @default 'click'
|
|
40
|
+
*/
|
|
41
|
+
trigger?: triggerType | triggerType[];
|
|
42
|
+
/**
|
|
43
|
+
* Portal组件的属性
|
|
44
|
+
*/
|
|
45
|
+
PortalProps?: PortalCoreProps;
|
|
46
|
+
/**
|
|
47
|
+
* 点击事件回调方法
|
|
48
|
+
* - event 触发事件
|
|
49
|
+
* - data.open 浮层显隐状态
|
|
50
|
+
* @returns
|
|
51
|
+
*/
|
|
52
|
+
onOpenChange?: (event: React.SyntheticEvent, data: {
|
|
53
|
+
open: boolean;
|
|
54
|
+
}) => void;
|
|
55
|
+
};
|
|
56
|
+
defaultComponent: D;
|
|
57
|
+
}, D>;
|
|
58
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
var Popover_types_exports = {};
|
|
15
|
+
module.exports = __toCommonJS(Popover_types_exports);
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var Popover_exports = {};
|
|
30
|
+
__export(Popover_exports, {
|
|
31
|
+
Popover: () => import_Popover.default,
|
|
32
|
+
default: () => import_Popover.default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Popover_exports);
|
|
35
|
+
var import_Popover = __toESM(require("./Popover"));
|
|
36
|
+
__reExport(Popover_exports, require("./Popover.types"), module.exports);
|
|
37
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
38
|
+
0 && (module.exports = {
|
|
39
|
+
Popover,
|
|
40
|
+
...require("./Popover.types")
|
|
41
|
+
});
|
|
@@ -38,7 +38,13 @@ function getContainer(container) {
|
|
|
38
38
|
}
|
|
39
39
|
const PortalCore = /* @__PURE__ */ import_react.default.forwardRef(
|
|
40
40
|
function Portal(props, ref) {
|
|
41
|
-
const {
|
|
41
|
+
const {
|
|
42
|
+
children,
|
|
43
|
+
container,
|
|
44
|
+
disablePortal = false,
|
|
45
|
+
rootElement,
|
|
46
|
+
onRootElementMouted
|
|
47
|
+
} = props;
|
|
42
48
|
const [mountNode, setMountNode] = import_react.default.useState(null);
|
|
43
49
|
const handleRef = (0, import_utils.useForkRef)(
|
|
44
50
|
// @ts-expect-error will upstream fix
|
|
@@ -53,6 +59,7 @@ const PortalCore = /* @__PURE__ */ import_react.default.forwardRef(
|
|
|
53
59
|
(0, import_react.useLayoutEffect)(() => {
|
|
54
60
|
if (mountNode && !disablePortal) {
|
|
55
61
|
(0, import_utils.setRef)(ref, mountNode);
|
|
62
|
+
onRootElementMouted == null ? void 0 : onRootElementMouted(mountNode);
|
|
56
63
|
return () => {
|
|
57
64
|
(0, import_utils.setRef)(ref, null);
|
|
58
65
|
};
|
|
@@ -1,22 +1,24 @@
|
|
|
1
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
|
|
2
|
+
--fill-color: var(--bui-progress-fill-color, --bui-color-primary);
|
|
3
|
+
--trail-color: var(--bui-progress-trail-color, rgba(156, 156, 165, 0.2));
|
|
4
|
+
--stroke-width: var(--bui-progress-stroke-width, 8px);
|
|
5
|
+
--width: var(--bui-progress-width, 100%);
|
|
6
|
+
--border-radius: var(--bui-progress-border-radius, 100px);
|
|
7
|
+
width: var(--width);
|
|
6
8
|
font-family: var(--bui-font-family);
|
|
7
9
|
}
|
|
8
10
|
.bui-progress-inner {
|
|
9
11
|
position: relative;
|
|
10
12
|
display: inline-block;
|
|
11
|
-
width:
|
|
13
|
+
width: var(--width);
|
|
12
14
|
overflow: hidden;
|
|
13
15
|
vertical-align: middle;
|
|
14
16
|
background-color: var(--trail-color);
|
|
15
|
-
border-radius:
|
|
17
|
+
border-radius: var(--border-radius);
|
|
16
18
|
}
|
|
17
19
|
.bui-progress-bg {
|
|
18
20
|
position: relative;
|
|
19
|
-
border-radius:
|
|
21
|
+
border-radius: var(--border-radius);
|
|
20
22
|
background-color: var(--fill-color);
|
|
21
23
|
height: var(--stroke-width);
|
|
22
24
|
}
|
package/dist/Radio/Radio.css
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
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);
|
|
2
|
+
--label-color: var(--bui-radio-label-color, --bui-color-fg-default);
|
|
3
|
+
--label-font-size: var(--bui-radio-label-font-size, --bui-text-size-1);
|
|
4
|
+
--icon-font-size: var(--bui-radio-icon-font-size, --bui-title-size-2);
|
|
5
|
+
--icon-padding: var(--bui-radio-icon-padding, 5px);
|
|
5
6
|
display: inline-flex;
|
|
6
7
|
align-items: center;
|
|
7
8
|
position: relative;
|
|
@@ -35,7 +36,7 @@
|
|
|
35
36
|
align-items: center;
|
|
36
37
|
justify-content: center;
|
|
37
38
|
flex-shrink: 0;
|
|
38
|
-
padding:
|
|
39
|
+
padding: var(--icon-padding);
|
|
39
40
|
box-sizing: border-box;
|
|
40
41
|
}
|
|
41
42
|
.bui-radio-label {
|
package/dist/Rating/Rating.css
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
.bui-rating {
|
|
2
|
+
--small-margin-right: var(--bui-rating-small-margin-right, 0.5px);
|
|
3
|
+
--medium-margin-right: var(--bui-rating-medium-margin-right, 1px);
|
|
4
|
+
--large-margin-right: var(--bui-rating-large-margin-right, 2px);
|
|
5
|
+
--large-font-size: var(--bui-rating-large-font-size, 22px);
|
|
2
6
|
display: flex;
|
|
3
7
|
flex-wrap: wrap;
|
|
4
8
|
font-family: var(--bui-font-family);
|
|
@@ -19,15 +23,15 @@
|
|
|
19
23
|
}
|
|
20
24
|
.bui-rating-container-small {
|
|
21
25
|
font-size: var(--bui-text-size-1);
|
|
22
|
-
margin-right:
|
|
26
|
+
margin-right: var(--small-margin-right);
|
|
23
27
|
}
|
|
24
28
|
.bui-rating-container-medium {
|
|
25
29
|
font-size: var(--bui-title-size-3);
|
|
26
|
-
margin-right:
|
|
30
|
+
margin-right: var(--small-medium-right);
|
|
27
31
|
}
|
|
28
32
|
.bui-rating-container-large {
|
|
29
|
-
font-size:
|
|
30
|
-
margin-right:
|
|
33
|
+
font-size: var(--large-font-size);
|
|
34
|
+
margin-right: var(--large-margin-right);
|
|
31
35
|
}
|
|
32
36
|
.bui-rating-item {
|
|
33
37
|
display: flex;
|
package/dist/Select/Select.css
CHANGED
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
.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
|
+
--option-container-padding: var(--bui-select-option-container-padding, 3px 0);
|
|
7
|
+
--option-margin-top: var(--bui-select-option-margin-top, 6px);
|
|
8
|
+
--option-padding: var(--bui-select-option-padding, 0 14px);
|
|
9
|
+
--option-margin: var(--bui-select-option-margin, 0 3px);
|
|
10
|
+
--option-height: var(--bui-select-option-height, 27px);
|
|
11
|
+
--option-active-font-weight: var(--bui-select-option-active-font-weight, 500);
|
|
2
12
|
position: relative;
|
|
3
13
|
cursor: pointer;
|
|
4
|
-
height:
|
|
5
|
-
min-width:
|
|
6
|
-
font-size: var(--
|
|
14
|
+
height: var(--height);
|
|
15
|
+
min-width: var(--mini-width);
|
|
16
|
+
font-size: var(--font-size);
|
|
7
17
|
border-radius: 5px;
|
|
8
18
|
background-color: var(--bui-color-bg-view);
|
|
9
19
|
font-family: var(--bui-font-family);
|
|
@@ -15,7 +25,7 @@
|
|
|
15
25
|
.bui-select-selector-container {
|
|
16
26
|
display: flex;
|
|
17
27
|
align-items: center;
|
|
18
|
-
padding:
|
|
28
|
+
padding: var(--padding);
|
|
19
29
|
height: 100%;
|
|
20
30
|
}
|
|
21
31
|
.bui-select-input {
|
|
@@ -32,7 +42,7 @@
|
|
|
32
42
|
justify-content: space-between;
|
|
33
43
|
align-items: center;
|
|
34
44
|
flex: 1;
|
|
35
|
-
height:
|
|
45
|
+
height: var(--bui-select-height);
|
|
36
46
|
background-color: transparent;
|
|
37
47
|
outline: none;
|
|
38
48
|
border: 0;
|
|
@@ -47,24 +57,25 @@
|
|
|
47
57
|
left: 0;
|
|
48
58
|
width: 100%;
|
|
49
59
|
z-index: var(--bui-z-index-dropdown);
|
|
50
|
-
margin-top:
|
|
60
|
+
margin-top: var(--option-container-margin-top);
|
|
61
|
+
border-radius: 3px;
|
|
51
62
|
background-color: var(--bui-color-bg-view);
|
|
52
63
|
padding: 2px;
|
|
53
64
|
overflow: hidden;
|
|
54
65
|
}
|
|
55
66
|
.bui-select-option-main {
|
|
56
67
|
border-radius: 3px;
|
|
57
|
-
padding:
|
|
68
|
+
padding: var(--option-container-padding);
|
|
58
69
|
box-shadow: 0 0 0 2px var(--bui-color-bg-default);
|
|
59
70
|
overflow: hidden;
|
|
60
71
|
}
|
|
61
72
|
.bui-select-option {
|
|
62
73
|
display: flex;
|
|
63
74
|
align-items: center;
|
|
64
|
-
height:
|
|
65
|
-
padding:
|
|
75
|
+
height: var(--option-height);
|
|
76
|
+
padding: var(--option-padding);
|
|
66
77
|
border-radius: 5px;
|
|
67
|
-
margin:
|
|
78
|
+
margin: var(--option-margin);
|
|
68
79
|
}
|
|
69
80
|
.bui-select-option:hover {
|
|
70
81
|
background-color: var(---bui-select-options-active-bg, #fff2f0);
|
package/dist/Select/Select.js
CHANGED
|
@@ -142,7 +142,7 @@ const Select = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
|
|
|
142
142
|
};
|
|
143
143
|
const selectContext = (0, import_react.useMemo)(
|
|
144
144
|
() => ({ selectValue, setRenderValue, handleOptionClick }),
|
|
145
|
-
[selectValue]
|
|
145
|
+
[selectValue, onChange, setRenderValue]
|
|
146
146
|
);
|
|
147
147
|
(0, import_react.useEffect)(() => {
|
|
148
148
|
if (open !== void 0)
|
|
@@ -72,6 +72,9 @@ const SelectOption = /* @__PURE__ */ import_react.default.forwardRef(
|
|
|
72
72
|
if (value === selectValue) {
|
|
73
73
|
setRenderValue(label);
|
|
74
74
|
}
|
|
75
|
+
return () => {
|
|
76
|
+
setRenderValue("");
|
|
77
|
+
};
|
|
75
78
|
}, [selectValue, label, value]);
|
|
76
79
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
77
80
|
"div",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.bui-skeleton {
|
|
2
|
-
--
|
|
2
|
+
--height: var(--bui-skeleton-height, 1.2em);
|
|
3
3
|
display: block;
|
|
4
4
|
}
|
|
5
5
|
.bui-skeleton-animation-wave {
|
|
@@ -20,17 +20,17 @@
|
|
|
20
20
|
height: auto;
|
|
21
21
|
transform-origin: 0 55%;
|
|
22
22
|
transform: scale(1, 0.6);
|
|
23
|
-
border-radius: var(--
|
|
23
|
+
border-radius: var(--bui-shape-radius-label);
|
|
24
24
|
}
|
|
25
25
|
.bui-skeleton-text::before {
|
|
26
26
|
content: "\a0";
|
|
27
27
|
}
|
|
28
28
|
.bui-skeleton-rectangular {
|
|
29
|
-
height:
|
|
29
|
+
height: var(--height);
|
|
30
30
|
}
|
|
31
31
|
.bui-skeleton-rounded {
|
|
32
|
-
height:
|
|
33
|
-
border-radius: var(--
|
|
32
|
+
height: var(--height);
|
|
33
|
+
border-radius: var(--bui-shape-radius-label);
|
|
34
34
|
}
|
|
35
35
|
.bui-skeleton-circular {
|
|
36
36
|
border-radius: 50%;
|
package/dist/Slider/Slider.css
CHANGED
|
@@ -1,13 +1,24 @@
|
|
|
1
1
|
.bui-slider {
|
|
2
|
-
--line-color: var(--bui-color-primary);
|
|
3
|
-
--line-bg-color: var(--bui-color-border-default);
|
|
4
|
-
--
|
|
5
|
-
--
|
|
6
|
-
--
|
|
2
|
+
--line-color: var(--bui-slider-line-color, --bui-color-primary);
|
|
3
|
+
--line-bg-color: var(--bui-slider-line-bg-color, --bui-color-border-default);
|
|
4
|
+
--width: var(--bui-slider-width, 100%);
|
|
5
|
+
--height: var(--bui-slider-height, 2px);
|
|
6
|
+
--padding: var(--bui-slider-padding, 19px 0);
|
|
7
|
+
--button-width: var(--bui-slider-button-width, 26px);
|
|
8
|
+
--button-height: var(--bui-slider-button-height, 26px);
|
|
9
|
+
--button-font-size: var(--bui-slider-button-font-size, var(--bui-title-size-3));
|
|
10
|
+
--button-border-radius: var(--bui--slider-button-border-radius, 50%);
|
|
11
|
+
--tooltip-width: var(--bui-slider-tooltip-width, 46px);
|
|
12
|
+
--tooltip-height: var(--bui-slider-tooltip-height, 24px);
|
|
13
|
+
--tooltip-line-height: var(--bui-slider-tooltip-line-height, 24px);
|
|
14
|
+
--tooltip-border-radius: var(--bui-slider-tooltip-border-radius, 24px);
|
|
15
|
+
--tooltip-font-size: var(--bui-tooltip-font-size, --bui-text-size-3);
|
|
16
|
+
--tooltip-color: var(--bui-tooltip-color, --bui-color-white);
|
|
17
|
+
--tooltip-bg-color: var(--bui-tooltip-bg-color, --line-color);
|
|
7
18
|
position: relative;
|
|
8
|
-
width:
|
|
9
|
-
height:
|
|
10
|
-
padding:
|
|
19
|
+
width: var(--width);
|
|
20
|
+
height: var(--height);
|
|
21
|
+
padding: var(--padding);
|
|
11
22
|
box-sizing: border-box;
|
|
12
23
|
font-family: var(--bui-font-family);
|
|
13
24
|
}
|
|
@@ -19,7 +30,7 @@
|
|
|
19
30
|
position: absolute;
|
|
20
31
|
top: 50%;
|
|
21
32
|
left: 0;
|
|
22
|
-
height:
|
|
33
|
+
height: var(--height);
|
|
23
34
|
transform: translateY(-50%);
|
|
24
35
|
background-color: var(--line-color);
|
|
25
36
|
}
|
|
@@ -28,7 +39,7 @@
|
|
|
28
39
|
top: 50%;
|
|
29
40
|
left: 0;
|
|
30
41
|
width: 100%;
|
|
31
|
-
height:
|
|
42
|
+
height: var(---height);
|
|
32
43
|
transform: translateY(-50%);
|
|
33
44
|
background-color: var(--line-bg-color);
|
|
34
45
|
}
|
|
@@ -37,11 +48,11 @@
|
|
|
37
48
|
position: absolute;
|
|
38
49
|
justify-content: center;
|
|
39
50
|
align-items: center;
|
|
40
|
-
width:
|
|
41
|
-
height:
|
|
42
|
-
background-color:
|
|
51
|
+
width: var(--button-width);
|
|
52
|
+
height: var(--button-height);
|
|
53
|
+
background-color: var(--bui-color-white);
|
|
43
54
|
box-shadow: #ddd 0 0 10px;
|
|
44
|
-
border-radius:
|
|
55
|
+
border-radius: var(--button-border-radius);
|
|
45
56
|
transform: translate(-50%, -50%);
|
|
46
57
|
font-size: var(--bui-title-size-3);
|
|
47
58
|
cursor: grab;
|
|
@@ -67,11 +78,11 @@
|
|
|
67
78
|
.bui-slider-tooltip {
|
|
68
79
|
position: absolute;
|
|
69
80
|
top: -14px;
|
|
70
|
-
width:
|
|
71
|
-
height:
|
|
72
|
-
line-height:
|
|
81
|
+
width: var(--tooltip-width);
|
|
82
|
+
height: var(--tooltip-height);
|
|
83
|
+
line-height: var(--tooltip-line-height);
|
|
73
84
|
font-size: var(--tooltip-font-size);
|
|
74
|
-
border-radius:
|
|
85
|
+
border-radius: var(--tooltip-border-radius);
|
|
75
86
|
color: var(--tooltip-color);
|
|
76
87
|
text-align: center;
|
|
77
88
|
background-color: var(--tooltip-bg-color);
|