@bifrostui/react 1.2.9-beta.0 → 1.3.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +26 -17
- package/dist/Calendar/Calendar.css +33 -18
- package/dist/Calendar/Calendar.d.ts +1 -1
- package/dist/Calendar/Calendar.js +85 -18
- package/dist/Calendar/Calendar.types.d.ts +33 -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/Countdown/Countdown.js +3 -0
- package/dist/Dialog/Dialog.d.ts +5 -0
- package/dist/Dialog/Dialog.js +152 -0
- package/dist/Dialog/Dialog.types.d.ts +109 -0
- package/dist/Dialog/Dialog.types.js +15 -0
- package/dist/Dialog/FunctionalDialog.d.ts +3 -0
- package/dist/Dialog/FunctionalDialog.js +204 -0
- package/dist/Dialog/index.css +75 -0
- package/dist/Dialog/index.d.ts +2 -0
- package/dist/Dialog/index.js +41 -0
- 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 +10 -5
- 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/Modal/Modal.miniapp.d.ts +1 -1
- 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 +186 -0
- package/dist/Popover/Popover.types.d.ts +60 -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 +8 -6
- package/dist/Radio/Radio.css +2 -1
- package/dist/Radio/Radio.js +1 -1
- package/dist/Radio/RadioButtonIcon.d.ts +1 -6
- package/dist/Radio/RadioButtonIcon.js +0 -3
- 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 +3 -2
- package/dist/Slider/Slider.css +24 -13
- package/dist/Steps/Step.css +11 -11
- package/dist/Steps/Steps.css +14 -5
- 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 +2 -6
- package/dist/Tabs/Tabs.css +7 -4
- package/dist/Tag/Tag.css +7 -10
- package/dist/Tag/TagGroup.css +9 -1
- package/dist/TextArea/TextArea.css +14 -8
- package/dist/ThemeProvider/ThemeProvider.d.ts +4 -0
- package/dist/ThemeProvider/ThemeProvider.js +90 -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.d.ts +3 -0
- package/dist/Toast/FunctionalToast.js +177 -0
- package/dist/Toast/Toast.css +56 -0
- package/dist/Toast/Toast.d.ts +5 -0
- package/dist/Toast/Toast.js +121 -0
- package/dist/Toast/Toast.types.d.ts +101 -0
- package/dist/Toast/Toast.types.js +15 -0
- package/dist/Toast/index.d.ts +2 -0
- package/dist/Toast/index.js +41 -0
- package/dist/Tooltip/Tooltip.css +91 -0
- package/dist/Tooltip/Tooltip.d.ts +5 -0
- package/dist/Tooltip/Tooltip.js +177 -0
- package/dist/Tooltip/Tooltip.types.d.ts +51 -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/Transition/Transition.miniapp.js +7 -1
- package/dist/index.d.ts +9 -0
- package/dist/index.js +19 -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 +26 -17
- package/es/Calendar/Calendar.css +33 -18
- package/es/Calendar/Calendar.d.ts +1 -1
- package/es/Calendar/Calendar.js +91 -19
- package/es/Calendar/Calendar.types.d.ts +33 -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/Countdown/Countdown.js +3 -0
- package/es/Dialog/Dialog.d.ts +5 -0
- package/es/Dialog/Dialog.js +125 -0
- package/es/Dialog/Dialog.types.d.ts +109 -0
- package/es/Dialog/Dialog.types.js +1 -0
- package/es/Dialog/FunctionalDialog.d.ts +3 -0
- package/es/Dialog/FunctionalDialog.js +177 -0
- package/es/Dialog/index.css +75 -0
- package/es/Dialog/index.d.ts +2 -0
- package/es/Dialog/index.js +6 -0
- 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 +10 -5
- 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 +159 -0
- package/es/Popover/Popover.types.d.ts +60 -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 +8 -6
- package/es/Radio/Radio.css +2 -1
- package/es/Radio/Radio.js +1 -1
- package/es/Radio/RadioButtonIcon.d.ts +1 -6
- package/es/Radio/RadioButtonIcon.js +0 -3
- 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 +3 -2
- package/es/Slider/Slider.css +24 -13
- package/es/Steps/Step.css +11 -11
- package/es/Steps/Steps.css +14 -5
- 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 +2 -6
- package/es/Tabs/Tabs.css +7 -4
- package/es/Tag/Tag.css +7 -10
- package/es/Tag/TagGroup.css +9 -1
- package/es/TextArea/TextArea.css +14 -8
- package/es/ThemeProvider/ThemeProvider.d.ts +4 -0
- package/es/ThemeProvider/ThemeProvider.js +61 -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.d.ts +3 -0
- package/es/Toast/FunctionalToast.js +150 -0
- package/es/Toast/Toast.css +56 -0
- package/es/Toast/Toast.d.ts +5 -0
- package/es/Toast/Toast.js +99 -0
- package/es/Toast/Toast.types.d.ts +101 -0
- package/es/Toast/Toast.types.js +1 -0
- package/es/Toast/index.d.ts +2 -0
- package/es/Toast/index.js +6 -0
- package/es/Tooltip/Tooltip.css +91 -0
- package/es/Tooltip/Tooltip.d.ts +5 -0
- package/es/Tooltip/Tooltip.js +150 -0
- package/es/Tooltip/Tooltip.types.d.ts +51 -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/Transition/Transition.miniapp.js +7 -1
- package/es/index.d.ts +9 -0
- package/es/index.js +9 -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,85 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
17
|
+
var __objRest = (source, exclude) => {
|
|
18
|
+
var target = {};
|
|
19
|
+
for (var prop in source)
|
|
20
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
21
|
+
target[prop] = source[prop];
|
|
22
|
+
if (source != null && __getOwnPropSymbols)
|
|
23
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
24
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
25
|
+
target[prop] = source[prop];
|
|
26
|
+
}
|
|
27
|
+
return target;
|
|
28
|
+
};
|
|
29
|
+
import React from "react";
|
|
30
|
+
import clsx from "clsx";
|
|
31
|
+
import { Collapse } from "../Collapse";
|
|
32
|
+
const prefixCls = "bui-collapse-panel-item";
|
|
33
|
+
const CollapsePanelItem = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
34
|
+
const _a = props, {
|
|
35
|
+
className,
|
|
36
|
+
style,
|
|
37
|
+
label,
|
|
38
|
+
children,
|
|
39
|
+
icon,
|
|
40
|
+
active,
|
|
41
|
+
onClick
|
|
42
|
+
} = _a, others = __objRest(_a, [
|
|
43
|
+
"className",
|
|
44
|
+
"style",
|
|
45
|
+
"label",
|
|
46
|
+
"children",
|
|
47
|
+
"icon",
|
|
48
|
+
"active",
|
|
49
|
+
"onClick"
|
|
50
|
+
]);
|
|
51
|
+
const isControlledIcon = typeof icon === "function";
|
|
52
|
+
const getIcon = () => {
|
|
53
|
+
return typeof icon === "function" ? icon(active) : icon;
|
|
54
|
+
};
|
|
55
|
+
return /* @__PURE__ */ React.createElement(
|
|
56
|
+
"div",
|
|
57
|
+
__spreadValues({
|
|
58
|
+
className: clsx(prefixCls, active && `${prefixCls}-active`, className),
|
|
59
|
+
style,
|
|
60
|
+
ref
|
|
61
|
+
}, others),
|
|
62
|
+
/* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-header`, onClick }, /* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-header-label` }, label), /* @__PURE__ */ React.createElement(
|
|
63
|
+
"div",
|
|
64
|
+
{
|
|
65
|
+
className: clsx(
|
|
66
|
+
`${prefixCls}-header-icon`,
|
|
67
|
+
`${prefixCls}-header-icon-arrow`,
|
|
68
|
+
{
|
|
69
|
+
[`${prefixCls}-header-icon-arrow-active`]: !isControlledIcon && active
|
|
70
|
+
}
|
|
71
|
+
)
|
|
72
|
+
},
|
|
73
|
+
getIcon()
|
|
74
|
+
)),
|
|
75
|
+
/* @__PURE__ */ React.createElement(Collapse, { in: active, direction: "vertical", timeout: 300 }, /* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-content` }, children))
|
|
76
|
+
);
|
|
77
|
+
});
|
|
78
|
+
CollapsePanelItem.displayName = "BuiCollapsePanelItem";
|
|
79
|
+
CollapsePanelItem.defaultProps = {
|
|
80
|
+
active: false
|
|
81
|
+
};
|
|
82
|
+
var CollapsePanelItem_default = CollapsePanelItem;
|
|
83
|
+
export {
|
|
84
|
+
CollapsePanelItem_default as default
|
|
85
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as default2 } from "./CollapsePanel";
|
|
2
|
+
import { default as default3 } from "./CollapsePanel";
|
|
3
|
+
import { default as default4 } from "./CollapsePanelItem";
|
|
4
|
+
export * from "./CollapsePanel.types";
|
|
5
|
+
export {
|
|
6
|
+
default3 as CollapsePanel,
|
|
7
|
+
default4 as CollapsePanelItem,
|
|
8
|
+
default2 as default
|
|
9
|
+
};
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
--font-size: var(--bui-countdown-font-size, var(--bui-text-size-1));
|
|
3
3
|
--color: var(--bui-countdown-color, var(--bui-color-fg-default));
|
|
4
4
|
--font-weight: var(--bui-countdown-font-weight, var(--bui-font-weight-normal));
|
|
5
|
+
--slice-unit-margin: var(--bui-countdown-slice-unit-margin, 0 2px);
|
|
5
6
|
display: flex;
|
|
6
7
|
flex-direction: row;
|
|
7
8
|
align-items: center;
|
|
@@ -34,5 +35,5 @@
|
|
|
34
35
|
sans-serif;
|
|
35
36
|
}
|
|
36
37
|
.bui-countdown-slice-unit {
|
|
37
|
-
margin:
|
|
38
|
+
margin: var(--slice-unit-margin);
|
|
38
39
|
}
|
|
@@ -82,6 +82,9 @@ const Countdown = forwardRef((props, ref) => {
|
|
|
82
82
|
if (serverTimestamp && endTimestamp) {
|
|
83
83
|
setStartTime(serverTimestamp);
|
|
84
84
|
setEndTime(endTimestamp);
|
|
85
|
+
} else if (endTimestamp) {
|
|
86
|
+
setStartTime(Date.now());
|
|
87
|
+
setEndTime(endTimestamp);
|
|
85
88
|
}
|
|
86
89
|
}, [serverTimestamp, endTimestamp]);
|
|
87
90
|
const defaultRender = (timeIns) => {
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __objRest = (source, exclude) => {
|
|
21
|
+
var target = {};
|
|
22
|
+
for (var prop in source)
|
|
23
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
+
target[prop] = source[prop];
|
|
25
|
+
if (source != null && __getOwnPropSymbols)
|
|
26
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
};
|
|
32
|
+
import clsx from "clsx";
|
|
33
|
+
import React, { useImperativeHandle, useRef } from "react";
|
|
34
|
+
import { Input } from "../Input";
|
|
35
|
+
import { Button } from "../Button";
|
|
36
|
+
import { useLocaleText } from "../locales";
|
|
37
|
+
import Modal from "../Modal";
|
|
38
|
+
import { useTheme } from "../ThemeProvider";
|
|
39
|
+
import "./index.css";
|
|
40
|
+
const prefixCls = "bui-dialog";
|
|
41
|
+
const Dialog = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
42
|
+
const _a = props, {
|
|
43
|
+
open,
|
|
44
|
+
onOk,
|
|
45
|
+
onClose,
|
|
46
|
+
header,
|
|
47
|
+
message,
|
|
48
|
+
type,
|
|
49
|
+
confirmText,
|
|
50
|
+
cancelText,
|
|
51
|
+
placeholder,
|
|
52
|
+
InputProps,
|
|
53
|
+
className,
|
|
54
|
+
theme
|
|
55
|
+
} = _a, others = __objRest(_a, [
|
|
56
|
+
"open",
|
|
57
|
+
"onOk",
|
|
58
|
+
"onClose",
|
|
59
|
+
"header",
|
|
60
|
+
"message",
|
|
61
|
+
"type",
|
|
62
|
+
"confirmText",
|
|
63
|
+
"cancelText",
|
|
64
|
+
"placeholder",
|
|
65
|
+
"InputProps",
|
|
66
|
+
"className",
|
|
67
|
+
"theme"
|
|
68
|
+
]);
|
|
69
|
+
const InputRef = useRef(null);
|
|
70
|
+
const themeConfig = useTheme(theme);
|
|
71
|
+
const {
|
|
72
|
+
cancel,
|
|
73
|
+
confirm,
|
|
74
|
+
placeholder: placeholderLocaleName
|
|
75
|
+
} = useLocaleText("dialog", themeConfig);
|
|
76
|
+
useImperativeHandle(ref, () => {
|
|
77
|
+
return { theme: themeConfig };
|
|
78
|
+
});
|
|
79
|
+
const footerNode = /* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-body-footer` }, /* @__PURE__ */ React.createElement(
|
|
80
|
+
Button,
|
|
81
|
+
{
|
|
82
|
+
variant: "text",
|
|
83
|
+
onClick: onClose,
|
|
84
|
+
className: `${prefixCls}-body-button`
|
|
85
|
+
},
|
|
86
|
+
cancelText || cancel
|
|
87
|
+
), /* @__PURE__ */ React.createElement(
|
|
88
|
+
Button,
|
|
89
|
+
{
|
|
90
|
+
variant: "text",
|
|
91
|
+
color: "primary",
|
|
92
|
+
onClick: () => {
|
|
93
|
+
var _a2;
|
|
94
|
+
onOk((_a2 = InputRef == null ? void 0 : InputRef.current) == null ? void 0 : _a2.value);
|
|
95
|
+
},
|
|
96
|
+
className: `${prefixCls}-body-button`
|
|
97
|
+
},
|
|
98
|
+
confirmText || confirm
|
|
99
|
+
));
|
|
100
|
+
const inputNode = type === "prompt" && /* @__PURE__ */ React.createElement(
|
|
101
|
+
Input,
|
|
102
|
+
__spreadProps(__spreadValues({}, InputProps), {
|
|
103
|
+
inputRef: InputRef,
|
|
104
|
+
className: `${prefixCls}-body-input`,
|
|
105
|
+
placeholder: `${placeholder || placeholderLocaleName}`
|
|
106
|
+
})
|
|
107
|
+
);
|
|
108
|
+
if (!open)
|
|
109
|
+
return null;
|
|
110
|
+
return /* @__PURE__ */ React.createElement(
|
|
111
|
+
Modal,
|
|
112
|
+
__spreadProps(__spreadValues({}, others), {
|
|
113
|
+
open: true,
|
|
114
|
+
className: clsx(prefixCls, className),
|
|
115
|
+
disablePortal: true,
|
|
116
|
+
onClose
|
|
117
|
+
}),
|
|
118
|
+
/* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-body` }, header && /* @__PURE__ */ React.createElement("h1", { className: `${prefixCls}-body-title` }, header), message && /* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-body-desc` }, message), inputNode, footerNode)
|
|
119
|
+
);
|
|
120
|
+
});
|
|
121
|
+
Dialog.displayName = "BuiDialog";
|
|
122
|
+
var Dialog_default = Dialog;
|
|
123
|
+
export {
|
|
124
|
+
Dialog_default as default
|
|
125
|
+
};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { ModalProps } from '../Modal/Modal.types';
|
|
3
|
+
import { InputProps } from '../Input/Input.types';
|
|
4
|
+
import { ThemeProps } from '../ThemeProvider/ThemeProvider.types';
|
|
5
|
+
/**
|
|
6
|
+
* 对话框类型
|
|
7
|
+
*/
|
|
8
|
+
export type DialogType = 'confirm' | 'prompt';
|
|
9
|
+
export type Dispatch = (action: boolean, val?: string) => void;
|
|
10
|
+
export type DialogRef = {
|
|
11
|
+
theme?: ThemeProps;
|
|
12
|
+
};
|
|
13
|
+
export interface DialogProps extends ModalProps {
|
|
14
|
+
/**
|
|
15
|
+
* 对话框类型
|
|
16
|
+
* @default confirm
|
|
17
|
+
*/
|
|
18
|
+
type?: DialogType;
|
|
19
|
+
/**
|
|
20
|
+
* 自定义标题
|
|
21
|
+
*/
|
|
22
|
+
header?: ReactNode;
|
|
23
|
+
/**
|
|
24
|
+
* 自定义内容
|
|
25
|
+
*/
|
|
26
|
+
message?: ReactNode;
|
|
27
|
+
/**
|
|
28
|
+
* 输入框占位文本
|
|
29
|
+
*/
|
|
30
|
+
placeholder?: string;
|
|
31
|
+
/**
|
|
32
|
+
* 透传给内部Input组件的属性
|
|
33
|
+
*/
|
|
34
|
+
InputProps?: Partial<InputProps>;
|
|
35
|
+
/**
|
|
36
|
+
* 确认文本内容
|
|
37
|
+
*/
|
|
38
|
+
confirmText?: ReactNode;
|
|
39
|
+
/**
|
|
40
|
+
* 取消文本内容
|
|
41
|
+
*/
|
|
42
|
+
cancelText?: ReactNode;
|
|
43
|
+
/**
|
|
44
|
+
* theme 主题定制
|
|
45
|
+
*/
|
|
46
|
+
theme?: ThemeProps;
|
|
47
|
+
/**
|
|
48
|
+
* 确认回调
|
|
49
|
+
*/
|
|
50
|
+
onOk?: (val?: string) => void;
|
|
51
|
+
/**
|
|
52
|
+
* 取消回调
|
|
53
|
+
*/
|
|
54
|
+
onClose?: () => void;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* 函数式调用配置参数
|
|
58
|
+
*/
|
|
59
|
+
export type DialogOptions = Omit<DialogProps, 'placeholder' | 'inputProps' | 'onOk' | 'onClose'> & {
|
|
60
|
+
/**
|
|
61
|
+
* 确认回调
|
|
62
|
+
*/
|
|
63
|
+
onConfirm?: (val?: string) => void | Promise<void>;
|
|
64
|
+
/**
|
|
65
|
+
* 取消回调
|
|
66
|
+
*/
|
|
67
|
+
onCancel?: () => void | Promise<void>;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* prompt函数式调用配置参数
|
|
71
|
+
*/
|
|
72
|
+
export type PromptOptions = (DialogOptions & {
|
|
73
|
+
/**
|
|
74
|
+
* 输入框占位文本
|
|
75
|
+
*/
|
|
76
|
+
placeholder?: string;
|
|
77
|
+
/**
|
|
78
|
+
* 内部<input>标签的标准属性
|
|
79
|
+
*/
|
|
80
|
+
inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
|
|
81
|
+
}) | string;
|
|
82
|
+
/**
|
|
83
|
+
* confirm函数式调用配置参数
|
|
84
|
+
*/
|
|
85
|
+
export type ConfirmOptions = DialogOptions | string;
|
|
86
|
+
/**
|
|
87
|
+
* Dialog函数式调用返回值类型
|
|
88
|
+
*/
|
|
89
|
+
export type DialogPromise = Promise<boolean | string>;
|
|
90
|
+
/**
|
|
91
|
+
* Dialog Instance
|
|
92
|
+
*/
|
|
93
|
+
export interface DialogFunction {
|
|
94
|
+
/**
|
|
95
|
+
* 直接调用显示确认框 Dialog
|
|
96
|
+
*/
|
|
97
|
+
(options: ConfirmOptions): DialogPromise;
|
|
98
|
+
/**
|
|
99
|
+
* 显示确认框 Dialog.confirm
|
|
100
|
+
*/
|
|
101
|
+
confirm?: (options: ConfirmOptions) => DialogPromise;
|
|
102
|
+
/**
|
|
103
|
+
* 显示提示对话框 Dialog.prompt
|
|
104
|
+
*/
|
|
105
|
+
prompt?: (options: PromptOptions, val?: string) => DialogPromise;
|
|
106
|
+
}
|
|
107
|
+
export interface DialogInstance extends DialogFunction {
|
|
108
|
+
useDialog: () => [DialogFunction, React.JSX.Element];
|
|
109
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __objRest = (source, exclude) => {
|
|
21
|
+
var target = {};
|
|
22
|
+
for (var prop in source)
|
|
23
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
+
target[prop] = source[prop];
|
|
25
|
+
if (source != null && __getOwnPropSymbols)
|
|
26
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
};
|
|
32
|
+
var __async = (__this, __arguments, generator) => {
|
|
33
|
+
return new Promise((resolve, reject) => {
|
|
34
|
+
var fulfilled = (value) => {
|
|
35
|
+
try {
|
|
36
|
+
step(generator.next(value));
|
|
37
|
+
} catch (e) {
|
|
38
|
+
reject(e);
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
var rejected = (value) => {
|
|
42
|
+
try {
|
|
43
|
+
step(generator.throw(value));
|
|
44
|
+
} catch (e) {
|
|
45
|
+
reject(e);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
49
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
import React, { useCallback, useEffect, useState } from "react";
|
|
53
|
+
import { getRootElement, render, unmount } from "@bifrostui/utils";
|
|
54
|
+
import Popup from "./Dialog";
|
|
55
|
+
const { isValidElement, Component } = React;
|
|
56
|
+
const formatProps = (props) => {
|
|
57
|
+
if (typeof props === "string" || isValidElement(props)) {
|
|
58
|
+
return { message: props };
|
|
59
|
+
}
|
|
60
|
+
return props;
|
|
61
|
+
};
|
|
62
|
+
const DialogGenerator = (options) => {
|
|
63
|
+
const rootWrapper = document.createElement("div");
|
|
64
|
+
const rootElement = getRootElement();
|
|
65
|
+
rootElement.appendChild(rootWrapper);
|
|
66
|
+
const DialogComponent = () => {
|
|
67
|
+
const _a = options, { onConfirm, onCancel, ref } = _a, others = __objRest(_a, ["onConfirm", "onCancel", "ref"]);
|
|
68
|
+
const [visible, setVisible] = useState(false);
|
|
69
|
+
const close = useCallback(() => {
|
|
70
|
+
setVisible(false);
|
|
71
|
+
setTimeout(() => {
|
|
72
|
+
const unmountRes = unmount(rootWrapper);
|
|
73
|
+
if (unmountRes && rootWrapper.parentNode) {
|
|
74
|
+
rootWrapper.parentNode.removeChild(rootWrapper);
|
|
75
|
+
}
|
|
76
|
+
}, 150);
|
|
77
|
+
}, [rootWrapper]);
|
|
78
|
+
useEffect(() => {
|
|
79
|
+
setVisible(true);
|
|
80
|
+
}, []);
|
|
81
|
+
const dispatch = (action, val) => __async(void 0, null, function* () {
|
|
82
|
+
if (action === true) {
|
|
83
|
+
try {
|
|
84
|
+
yield onConfirm == null ? void 0 : onConfirm(val);
|
|
85
|
+
} catch (error) {
|
|
86
|
+
}
|
|
87
|
+
} else if (action === false) {
|
|
88
|
+
try {
|
|
89
|
+
yield onCancel == null ? void 0 : onCancel();
|
|
90
|
+
} catch (error) {
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
close();
|
|
94
|
+
});
|
|
95
|
+
return /* @__PURE__ */ React.createElement(
|
|
96
|
+
Popup,
|
|
97
|
+
__spreadProps(__spreadValues({
|
|
98
|
+
ref
|
|
99
|
+
}, others), {
|
|
100
|
+
open: visible,
|
|
101
|
+
onOk: (val) => dispatch(true, val),
|
|
102
|
+
onClose: () => dispatch(false)
|
|
103
|
+
})
|
|
104
|
+
);
|
|
105
|
+
};
|
|
106
|
+
return render(/* @__PURE__ */ React.createElement(DialogComponent, null), rootWrapper);
|
|
107
|
+
};
|
|
108
|
+
const Dialog = (props) => {
|
|
109
|
+
const options = formatProps(props);
|
|
110
|
+
const _a = options, { onConfirm, onCancel } = _a, rest = __objRest(_a, ["onConfirm", "onCancel"]);
|
|
111
|
+
return new Promise((resolve) => {
|
|
112
|
+
DialogGenerator(__spreadProps(__spreadValues({}, rest), {
|
|
113
|
+
onConfirm: (val) => __async(void 0, null, function* () {
|
|
114
|
+
yield onConfirm == null ? void 0 : onConfirm(val);
|
|
115
|
+
if (rest.type === "prompt")
|
|
116
|
+
resolve(val);
|
|
117
|
+
else
|
|
118
|
+
resolve(true);
|
|
119
|
+
}),
|
|
120
|
+
onCancel: () => __async(void 0, null, function* () {
|
|
121
|
+
yield onCancel == null ? void 0 : onCancel();
|
|
122
|
+
resolve(false);
|
|
123
|
+
})
|
|
124
|
+
}));
|
|
125
|
+
});
|
|
126
|
+
};
|
|
127
|
+
Dialog.prototype = Component.prototype;
|
|
128
|
+
const confirm = (options) => {
|
|
129
|
+
return Dialog(__spreadValues({
|
|
130
|
+
type: "confirm"
|
|
131
|
+
}, formatProps(options)));
|
|
132
|
+
};
|
|
133
|
+
const prompt = (options) => {
|
|
134
|
+
return Dialog(__spreadValues({
|
|
135
|
+
type: "prompt"
|
|
136
|
+
}, formatProps(options)));
|
|
137
|
+
};
|
|
138
|
+
const useDialog = () => {
|
|
139
|
+
const holderRef = React.useRef(null);
|
|
140
|
+
const wrapAPI = (props) => {
|
|
141
|
+
const options = __spreadValues({ theme: holderRef.current.theme }, formatProps(props));
|
|
142
|
+
const _a = options, { onConfirm, onCancel } = _a, rest = __objRest(_a, ["onConfirm", "onCancel"]);
|
|
143
|
+
return new Promise((resolve) => {
|
|
144
|
+
DialogGenerator(__spreadProps(__spreadValues({}, rest), {
|
|
145
|
+
onConfirm: (val) => __async(void 0, null, function* () {
|
|
146
|
+
yield onConfirm == null ? void 0 : onConfirm(val);
|
|
147
|
+
if (rest.type === "prompt")
|
|
148
|
+
resolve(val);
|
|
149
|
+
else
|
|
150
|
+
resolve(true);
|
|
151
|
+
}),
|
|
152
|
+
onCancel: () => __async(void 0, null, function* () {
|
|
153
|
+
yield onCancel == null ? void 0 : onCancel();
|
|
154
|
+
resolve(false);
|
|
155
|
+
})
|
|
156
|
+
}));
|
|
157
|
+
});
|
|
158
|
+
};
|
|
159
|
+
wrapAPI.confirm = (options) => Dialog(__spreadProps(__spreadValues({
|
|
160
|
+
type: "confirm"
|
|
161
|
+
}, formatProps(options)), {
|
|
162
|
+
theme: holderRef.current.theme
|
|
163
|
+
}));
|
|
164
|
+
wrapAPI.prompt = (options) => Dialog(__spreadProps(__spreadValues({
|
|
165
|
+
type: "prompt"
|
|
166
|
+
}, formatProps(options)), {
|
|
167
|
+
theme: holderRef.current.theme
|
|
168
|
+
}));
|
|
169
|
+
return [wrapAPI, /* @__PURE__ */ React.createElement(Popup, { key: "dialog-holder", ref: holderRef })];
|
|
170
|
+
};
|
|
171
|
+
Dialog.confirm = confirm;
|
|
172
|
+
Dialog.prompt = prompt;
|
|
173
|
+
Dialog.useDialog = useDialog;
|
|
174
|
+
var FunctionalDialog_default = Dialog;
|
|
175
|
+
export {
|
|
176
|
+
FunctionalDialog_default as default
|
|
177
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
.bui-dialog {
|
|
2
|
+
--max-width: var(--bui-dialog-max-width, 300px);
|
|
3
|
+
--border-radius: var(--bui-dialog-border-radius, var(--bui-shape-radius-drawer));
|
|
4
|
+
--title-padding: var(--bui-dialog-title-padding, 0 40px 9px);
|
|
5
|
+
--desc-padding: var(--bui-dialog-desc-padding, 0 24px);
|
|
6
|
+
--footer-margin-top: var(--bui-dialog-footer-margin-top, 15px);
|
|
7
|
+
--button-height: var(--bui-dialog-button-height, 53px);
|
|
8
|
+
--button-line-height: var(--bui-dialog-button-line-height, 25px);
|
|
9
|
+
--button-padding: var(--bui-dialog-button-padding, 12px 0 13px);
|
|
10
|
+
--button-font-size: var(--bui-dialog-button-font-size, 17px);
|
|
11
|
+
--button-border-left: var(--bui-dialog-button-border-left, 1px solid rgba(0, 0, 0, 0.05));
|
|
12
|
+
--button-active-background-color: var(--bui-dialog-button-active-background-color, rgba(54, 57, 64, 0.05));
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
justify-content: center;
|
|
16
|
+
}
|
|
17
|
+
.bui-dialog-body {
|
|
18
|
+
padding-top: 21px;
|
|
19
|
+
min-width: var(--max-width);
|
|
20
|
+
margin: 0 auto;
|
|
21
|
+
border-radius: var(--border-radius);
|
|
22
|
+
background-clip: padding-box;
|
|
23
|
+
background-color: var(--bui-color-bg-view);
|
|
24
|
+
line-height: 21px;
|
|
25
|
+
}
|
|
26
|
+
.bui-dialog-body-title {
|
|
27
|
+
padding: var(--title-padding);
|
|
28
|
+
font-size: var(--bui-title-size-2);
|
|
29
|
+
text-align: center;
|
|
30
|
+
color: var(--bui-color-fg-default);
|
|
31
|
+
font-weight: var(--bui-font-weight-medium);
|
|
32
|
+
}
|
|
33
|
+
.bui-dialog-body-title + .bui-dialog-body-footer {
|
|
34
|
+
margin-top: var(--bui-spacing-sm);
|
|
35
|
+
}
|
|
36
|
+
.bui-dialog-body-desc {
|
|
37
|
+
padding: var(--desc-padding);
|
|
38
|
+
color: var(--bui-color-fg-muted);
|
|
39
|
+
font-size: var(--bui-title-size-4);
|
|
40
|
+
text-align: center;
|
|
41
|
+
}
|
|
42
|
+
.bui-dialog-body-desc:first-child {
|
|
43
|
+
padding-top: 0;
|
|
44
|
+
}
|
|
45
|
+
.bui-dialog-body-footer {
|
|
46
|
+
margin-top: var(--footer-margin-top);
|
|
47
|
+
border-top: 1px solid rgba(0, 0, 0, 0.05);
|
|
48
|
+
display: -webkit-box;
|
|
49
|
+
display: flex;
|
|
50
|
+
}
|
|
51
|
+
.bui-dialog-body-input {
|
|
52
|
+
width: calc(100% - 48px);
|
|
53
|
+
margin: 14px 24px 0;
|
|
54
|
+
}
|
|
55
|
+
.bui-dialog-body-button {
|
|
56
|
+
flex: 1;
|
|
57
|
+
display: block;
|
|
58
|
+
width: 100%;
|
|
59
|
+
height: var(--button-height);
|
|
60
|
+
line-height: var(--button-line-height);
|
|
61
|
+
padding: var(--button-padding);
|
|
62
|
+
font-size: var(--button-font-size);
|
|
63
|
+
border: 0;
|
|
64
|
+
outline: 0;
|
|
65
|
+
border-left: var(--button-border-left);
|
|
66
|
+
border-radius: 0;
|
|
67
|
+
text-align: center;
|
|
68
|
+
box-sizing: border-box;
|
|
69
|
+
}
|
|
70
|
+
.bui-dialog-body-button:first-child {
|
|
71
|
+
border: none;
|
|
72
|
+
}
|
|
73
|
+
.bui-dialog-body-button:active {
|
|
74
|
+
background-color: var(--button-active-background-color);
|
|
75
|
+
}
|
package/es/Divider/Divider.css
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
.bui-divider {
|
|
2
2
|
--height: var(--bui-divider-height, 100%);
|
|
3
3
|
--width: var(--bui-divider-width, 100%);
|
|
4
|
+
--border-width: var(--bui-divider-border-width, 1px);
|
|
5
|
+
--line-width: var(--bui-divider-line-width, 40px);
|
|
4
6
|
border-color: var(--bui-color-border-default);
|
|
5
7
|
font-family: var(--bui-font-family);
|
|
6
8
|
}
|
|
7
9
|
.bui-divider-vertical {
|
|
8
10
|
height: var(--height);
|
|
9
11
|
display: inline-block;
|
|
10
|
-
border-right-width:
|
|
12
|
+
border-right-width: var(--border-width);
|
|
11
13
|
border-right-style: solid;
|
|
12
14
|
}
|
|
13
15
|
.bui-divider-horizontal {
|
|
14
16
|
width: var(--width);
|
|
15
|
-
border-bottom-width:
|
|
17
|
+
border-bottom-width: var(--border-width);
|
|
16
18
|
border-bottom-style: solid;
|
|
17
19
|
}
|
|
18
20
|
.bui-divider-vertical-dashed {
|
|
@@ -29,8 +31,8 @@
|
|
|
29
31
|
justify-content: center;
|
|
30
32
|
}
|
|
31
33
|
.bui-divider-line {
|
|
32
|
-
width:
|
|
33
|
-
border-bottom-width:
|
|
34
|
+
width: var(--line-width);
|
|
35
|
+
border-bottom-width: var(--border-width);
|
|
34
36
|
border-bottom-style: solid;
|
|
35
37
|
border-color: var(--bui-color-border-default);
|
|
36
38
|
}
|