@bifrostui/react 1.3.1-beta.1 → 1.3.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 +3 -6
- package/dist/ActionSheet/ActionSheetItem.css +6 -10
- package/dist/Alert/index.css +8 -14
- package/dist/Avatar/Avatar.css +9 -13
- package/dist/Avatar/AvatarGroup.css +8 -15
- package/dist/Backdrop/Backdrop.css +1 -2
- package/dist/Badge/Badge.css +17 -27
- package/dist/Button/Button.css +17 -26
- package/dist/Calendar/Calendar.css +18 -33
- package/dist/Calendar/Calendar.d.ts +1 -1
- package/dist/Calendar/Calendar.js +17 -38
- package/dist/Calendar/Calendar.types.d.ts +0 -21
- package/dist/Card/CardFooter.css +1 -2
- package/dist/Card/CardHeader.css +1 -3
- package/dist/Checkbox/Checkbox.css +5 -7
- package/dist/CitySelector/CitySelector.css +15 -29
- package/dist/CitySelector/CitySelectorCore.js +16 -25
- package/dist/CitySelector/Selector/index.css +4 -4
- package/dist/Countdown/Countdown.css +1 -2
- package/dist/Dialog/Dialog.d.ts +2 -2
- package/dist/Dialog/Dialog.js +8 -20
- package/dist/Dialog/Dialog.types.d.ts +1 -12
- package/dist/Dialog/FunctionalDialog.js +2 -38
- package/dist/Dialog/index.css +18 -27
- package/dist/Divider/Divider.css +4 -6
- package/dist/IconButton/IconButton.css +7 -9
- package/dist/Image/index.css +1 -2
- package/dist/Input/Input.css +5 -10
- package/dist/List/List.css +0 -3
- package/dist/List/ListItem.css +3 -3
- package/dist/List/ListItemContent.css +1 -1
- package/dist/Loading/Loading.css +2 -4
- package/dist/Modal/Modal.miniapp.d.ts +1 -1
- package/dist/NavBar/NavBar.css +5 -9
- package/dist/Picker/Picker.css +29 -25
- package/dist/Picker/Picker.js +11 -31
- package/dist/Picker/Picker.types.d.ts +0 -4
- package/dist/Picker/PickerPanel.css +8 -8
- package/dist/Picker/PickerPanel.js +8 -14
- package/dist/Picker/utils.d.ts +0 -16
- package/dist/Picker/utils.js +2 -32
- package/dist/Portal/Portal.types.d.ts +0 -4
- package/dist/Portal/PortalCore.js +1 -8
- package/dist/Progress/Progress.css +6 -8
- package/dist/Radio/Radio.css +1 -2
- package/dist/Rating/Rating.css +4 -8
- package/dist/Select/Select.css +10 -21
- package/dist/Select/Select.js +1 -1
- package/dist/Select/SelectOption.js +0 -3
- package/dist/Skeleton/Skeleton.css +2 -3
- package/dist/Slider/Slider.css +13 -24
- package/dist/Steps/Step.css +11 -11
- package/dist/Steps/Steps.css +5 -14
- package/dist/Swiper/Swiper.css +1 -2
- package/dist/Switch/Switch.css +16 -31
- package/dist/TabBar/TabBar.css +3 -7
- package/dist/TabBar/TabBarItem.css +1 -0
- package/dist/Tabs/Tab.css +6 -2
- package/dist/Tabs/Tabs.css +4 -7
- package/dist/Tag/Tag.css +10 -7
- package/dist/Tag/TagGroup.css +1 -9
- package/dist/TextArea/TextArea.css +8 -14
- package/dist/Toast/FunctionalToast.js +0 -18
- package/dist/Toast/Toast.css +14 -15
- package/dist/Toast/Toast.d.ts +2 -2
- package/dist/Toast/Toast.js +48 -52
- package/dist/Toast/Toast.types.d.ts +1 -15
- package/dist/index.d.ts +0 -7
- package/dist/index.js +1 -15
- package/es/ActionSheet/ActionSheet.css +3 -6
- package/es/ActionSheet/ActionSheetItem.css +6 -10
- package/es/Alert/index.css +8 -14
- package/es/Avatar/Avatar.css +9 -13
- package/es/Avatar/AvatarGroup.css +8 -15
- package/es/Backdrop/Backdrop.css +1 -2
- package/es/Badge/Badge.css +17 -27
- package/es/Button/Button.css +17 -26
- package/es/Calendar/Calendar.css +18 -33
- package/es/Calendar/Calendar.d.ts +1 -1
- package/es/Calendar/Calendar.js +17 -38
- package/es/Calendar/Calendar.types.d.ts +0 -21
- package/es/Card/CardFooter.css +1 -2
- package/es/Card/CardHeader.css +1 -3
- package/es/Checkbox/Checkbox.css +5 -7
- package/es/CitySelector/CitySelector.css +15 -29
- package/es/CitySelector/CitySelectorCore.js +16 -25
- package/es/CitySelector/Selector/index.css +4 -4
- package/es/Countdown/Countdown.css +1 -2
- package/es/Dialog/Dialog.d.ts +2 -2
- package/es/Dialog/Dialog.js +8 -20
- package/es/Dialog/Dialog.types.d.ts +1 -12
- package/es/Dialog/FunctionalDialog.js +2 -38
- package/es/Dialog/index.css +18 -27
- package/es/Divider/Divider.css +4 -6
- package/es/IconButton/IconButton.css +7 -9
- package/es/Image/index.css +1 -2
- package/es/Input/Input.css +5 -10
- package/es/List/List.css +0 -3
- package/es/List/ListItem.css +3 -3
- package/es/List/ListItemContent.css +1 -1
- package/es/Loading/Loading.css +2 -4
- package/es/Modal/Modal.miniapp.d.ts +1 -1
- package/es/NavBar/NavBar.css +5 -9
- package/es/Picker/Picker.css +29 -25
- package/es/Picker/Picker.js +12 -32
- package/es/Picker/Picker.types.d.ts +0 -4
- package/es/Picker/PickerPanel.css +8 -8
- package/es/Picker/PickerPanel.js +8 -14
- package/es/Picker/utils.d.ts +0 -16
- package/es/Picker/utils.js +1 -29
- package/es/Portal/Portal.types.d.ts +0 -4
- package/es/Portal/PortalCore.js +1 -8
- package/es/Progress/Progress.css +6 -8
- package/es/Radio/Radio.css +1 -2
- package/es/Rating/Rating.css +4 -8
- package/es/Select/Select.css +10 -21
- package/es/Select/Select.js +1 -1
- package/es/Select/SelectOption.js +0 -3
- package/es/Skeleton/Skeleton.css +2 -3
- package/es/Slider/Slider.css +13 -24
- package/es/Steps/Step.css +11 -11
- package/es/Steps/Steps.css +5 -14
- package/es/Swiper/Swiper.css +1 -2
- package/es/Switch/Switch.css +16 -31
- package/es/TabBar/TabBar.css +3 -7
- package/es/TabBar/TabBarItem.css +1 -0
- package/es/Tabs/Tab.css +6 -2
- package/es/Tabs/Tabs.css +4 -7
- package/es/Tag/Tag.css +10 -7
- package/es/Tag/TagGroup.css +1 -9
- package/es/TextArea/TextArea.css +8 -14
- package/es/Toast/FunctionalToast.js +0 -18
- package/es/Toast/Toast.css +14 -15
- package/es/Toast/Toast.d.ts +2 -2
- package/es/Toast/Toast.js +49 -53
- package/es/Toast/Toast.types.d.ts +1 -15
- package/es/index.d.ts +0 -7
- package/es/index.js +0 -7
- package/package.json +5 -5
- package/dist/Breadcrumb/Breadcrumb.css +0 -34
- package/dist/Breadcrumb/Breadcrumb.d.ts +0 -5
- package/dist/Breadcrumb/Breadcrumb.js +0 -128
- package/dist/Breadcrumb/Breadcrumb.types.d.ts +0 -49
- package/dist/Breadcrumb/Breadcrumb.types.js +0 -15
- package/dist/Breadcrumb/BreadcrumbItem.d.ts +0 -4
- package/dist/Breadcrumb/BreadcrumbItem.js +0 -78
- package/dist/Breadcrumb/index.d.ts +0 -4
- package/dist/Breadcrumb/index.js +0 -45
- package/dist/Collapse/Collapse.css +0 -6
- package/dist/Collapse/Collapse.d.ts +0 -5
- package/dist/Collapse/Collapse.js +0 -165
- package/dist/Collapse/Collapse.types.d.ts +0 -16
- package/dist/Collapse/Collapse.types.js +0 -15
- package/dist/Collapse/index.d.ts +0 -2
- package/dist/Collapse/index.js +0 -41
- package/dist/CollapsePanel/CollapsePanel.css +0 -32
- package/dist/CollapsePanel/CollapsePanel.d.ts +0 -5
- package/dist/CollapsePanel/CollapsePanel.js +0 -159
- package/dist/CollapsePanel/CollapsePanel.types.d.ts +0 -64
- package/dist/CollapsePanel/CollapsePanel.types.js +0 -15
- package/dist/CollapsePanel/CollapsePanelItem.d.ts +0 -4
- package/dist/CollapsePanel/CollapsePanelItem.js +0 -112
- package/dist/CollapsePanel/index.d.ts +0 -4
- package/dist/CollapsePanel/index.js +0 -45
- package/dist/Popover/Popover.css +0 -97
- package/dist/Popover/Popover.d.ts +0 -5
- package/dist/Popover/Popover.js +0 -186
- package/dist/Popover/Popover.types.d.ts +0 -59
- package/dist/Popover/Popover.types.js +0 -15
- package/dist/Popover/index.d.ts +0 -2
- package/dist/Popover/index.js +0 -41
- package/dist/ThemeProvider/ThemeProvider.d.ts +0 -4
- package/dist/ThemeProvider/ThemeProvider.js +0 -91
- package/dist/ThemeProvider/ThemeProvider.types.d.ts +0 -127
- package/dist/ThemeProvider/ThemeProvider.types.js +0 -27
- package/dist/ThemeProvider/hooks/ThemeContext.d.ts +0 -4
- package/dist/ThemeProvider/hooks/ThemeContext.js +0 -35
- package/dist/ThemeProvider/hooks/createTheme.d.ts +0 -2
- package/dist/ThemeProvider/hooks/createTheme.js +0 -55
- package/dist/ThemeProvider/hooks/index.d.ts +0 -4
- package/dist/ThemeProvider/hooks/index.js +0 -43
- package/dist/ThemeProvider/hooks/useTheme.d.ts +0 -1
- package/dist/ThemeProvider/hooks/useTheme.js +0 -39
- package/dist/ThemeProvider/index.d.ts +0 -4
- package/dist/ThemeProvider/index.js +0 -45
- package/dist/ThemeProvider/utils/constants.d.ts +0 -38
- package/dist/ThemeProvider/utils/constants.js +0 -65
- package/dist/ThemeProvider/utils/index.d.ts +0 -2
- package/dist/ThemeProvider/utils/index.js +0 -23
- package/dist/ThemeProvider/utils/mountTokens.d.ts +0 -26
- package/dist/ThemeProvider/utils/mountTokens.js +0 -123
- package/dist/Tooltip/Tooltip.css +0 -91
- package/dist/Tooltip/Tooltip.d.ts +0 -5
- package/dist/Tooltip/Tooltip.js +0 -175
- package/dist/Tooltip/Tooltip.types.d.ts +0 -50
- package/dist/Tooltip/Tooltip.types.js +0 -15
- package/dist/Tooltip/index.d.ts +0 -2
- package/dist/Tooltip/index.js +0 -41
- package/dist/locales/base.d.ts +0 -40
- package/dist/locales/base.js +0 -15
- package/dist/locales/en-US.d.ts +0 -3
- package/dist/locales/en-US.js +0 -69
- package/dist/locales/hooks/useLocaleText.d.ts +0 -3
- package/dist/locales/hooks/useLocaleText.js +0 -43
- package/dist/locales/index.d.ts +0 -5
- package/dist/locales/index.js +0 -49
- package/dist/locales/zh-CN.d.ts +0 -3
- package/dist/locales/zh-CN.js +0 -51
- package/dist/locales/zh-TW.d.ts +0 -3
- package/dist/locales/zh-TW.js +0 -51
- package/es/Breadcrumb/Breadcrumb.css +0 -34
- package/es/Breadcrumb/Breadcrumb.d.ts +0 -5
- package/es/Breadcrumb/Breadcrumb.js +0 -101
- package/es/Breadcrumb/Breadcrumb.types.d.ts +0 -49
- package/es/Breadcrumb/Breadcrumb.types.js +0 -1
- package/es/Breadcrumb/BreadcrumbItem.d.ts +0 -4
- package/es/Breadcrumb/BreadcrumbItem.js +0 -51
- package/es/Breadcrumb/index.d.ts +0 -4
- package/es/Breadcrumb/index.js +0 -9
- package/es/Collapse/Collapse.css +0 -6
- package/es/Collapse/Collapse.d.ts +0 -5
- package/es/Collapse/Collapse.js +0 -144
- package/es/Collapse/Collapse.types.d.ts +0 -16
- package/es/Collapse/Collapse.types.js +0 -1
- package/es/Collapse/index.d.ts +0 -2
- package/es/Collapse/index.js +0 -6
- package/es/CollapsePanel/CollapsePanel.css +0 -32
- package/es/CollapsePanel/CollapsePanel.d.ts +0 -5
- package/es/CollapsePanel/CollapsePanel.js +0 -132
- package/es/CollapsePanel/CollapsePanel.types.d.ts +0 -64
- package/es/CollapsePanel/CollapsePanel.types.js +0 -1
- package/es/CollapsePanel/CollapsePanelItem.d.ts +0 -4
- package/es/CollapsePanel/CollapsePanelItem.js +0 -85
- package/es/CollapsePanel/index.d.ts +0 -4
- package/es/CollapsePanel/index.js +0 -9
- package/es/Popover/Popover.css +0 -97
- package/es/Popover/Popover.d.ts +0 -5
- package/es/Popover/Popover.js +0 -163
- package/es/Popover/Popover.types.d.ts +0 -59
- package/es/Popover/Popover.types.js +0 -1
- package/es/Popover/index.d.ts +0 -2
- package/es/Popover/index.js +0 -6
- package/es/ThemeProvider/ThemeProvider.d.ts +0 -4
- package/es/ThemeProvider/ThemeProvider.js +0 -62
- package/es/ThemeProvider/ThemeProvider.types.d.ts +0 -127
- package/es/ThemeProvider/ThemeProvider.types.js +0 -1
- package/es/ThemeProvider/hooks/ThemeContext.d.ts +0 -4
- package/es/ThemeProvider/hooks/ThemeContext.js +0 -6
- package/es/ThemeProvider/hooks/createTheme.d.ts +0 -2
- package/es/ThemeProvider/hooks/createTheme.js +0 -38
- package/es/ThemeProvider/hooks/index.d.ts +0 -4
- package/es/ThemeProvider/hooks/index.js +0 -8
- package/es/ThemeProvider/hooks/useTheme.d.ts +0 -1
- package/es/ThemeProvider/hooks/useTheme.js +0 -10
- package/es/ThemeProvider/index.d.ts +0 -4
- package/es/ThemeProvider/index.js +0 -8
- package/es/ThemeProvider/utils/constants.d.ts +0 -38
- package/es/ThemeProvider/utils/constants.js +0 -40
- package/es/ThemeProvider/utils/index.d.ts +0 -2
- package/es/ThemeProvider/utils/index.js +0 -2
- package/es/ThemeProvider/utils/mountTokens.d.ts +0 -26
- package/es/ThemeProvider/utils/mountTokens.js +0 -88
- package/es/Tooltip/Tooltip.css +0 -91
- package/es/Tooltip/Tooltip.d.ts +0 -5
- package/es/Tooltip/Tooltip.js +0 -152
- package/es/Tooltip/Tooltip.types.d.ts +0 -50
- package/es/Tooltip/Tooltip.types.js +0 -1
- package/es/Tooltip/index.d.ts +0 -2
- package/es/Tooltip/index.js +0 -6
- package/es/locales/base.d.ts +0 -40
- package/es/locales/base.js +0 -0
- package/es/locales/en-US.d.ts +0 -3
- package/es/locales/en-US.js +0 -50
- package/es/locales/hooks/useLocaleText.d.ts +0 -3
- package/es/locales/hooks/useLocaleText.js +0 -26
- package/es/locales/index.d.ts +0 -5
- package/es/locales/index.js +0 -11
- package/es/locales/zh-CN.d.ts +0 -3
- package/es/locales/zh-CN.js +0 -32
- package/es/locales/zh-TW.d.ts +0 -3
- package/es/locales/zh-TW.js +0 -32
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import { ModalProps } from '../Modal/Modal.types';
|
|
3
3
|
import { InputProps } from '../Input/Input.types';
|
|
4
|
-
import { ThemeProps } from '../ThemeProvider/ThemeProvider.types';
|
|
5
4
|
/**
|
|
6
5
|
* 对话框类型
|
|
7
6
|
*/
|
|
8
7
|
export type DialogType = 'confirm' | 'prompt';
|
|
9
8
|
export type Dispatch = (action: boolean, val?: string) => void;
|
|
10
|
-
export type DialogRef = {
|
|
11
|
-
theme?: ThemeProps;
|
|
12
|
-
};
|
|
13
9
|
export interface DialogProps extends ModalProps {
|
|
14
10
|
/**
|
|
15
11
|
* 对话框类型
|
|
@@ -40,10 +36,6 @@ export interface DialogProps extends ModalProps {
|
|
|
40
36
|
* 取消文本内容
|
|
41
37
|
*/
|
|
42
38
|
cancelText?: ReactNode;
|
|
43
|
-
/**
|
|
44
|
-
* theme 主题定制
|
|
45
|
-
*/
|
|
46
|
-
theme?: ThemeProps;
|
|
47
39
|
/**
|
|
48
40
|
* 确认回调
|
|
49
41
|
*/
|
|
@@ -90,7 +82,7 @@ export type DialogPromise = Promise<boolean | string>;
|
|
|
90
82
|
/**
|
|
91
83
|
* Dialog Instance
|
|
92
84
|
*/
|
|
93
|
-
export interface
|
|
85
|
+
export interface DialogInstance {
|
|
94
86
|
/**
|
|
95
87
|
* 直接调用显示确认框 Dialog
|
|
96
88
|
*/
|
|
@@ -104,6 +96,3 @@ export interface DialogFunction {
|
|
|
104
96
|
*/
|
|
105
97
|
prompt?: (options: PromptOptions, val?: string) => DialogPromise;
|
|
106
98
|
}
|
|
107
|
-
export interface DialogInstance extends DialogFunction {
|
|
108
|
-
useDialog: () => [DialogFunction, React.JSX.Element];
|
|
109
|
-
}
|
|
@@ -64,7 +64,7 @@ const DialogGenerator = (options) => {
|
|
|
64
64
|
const rootElement = getRootElement();
|
|
65
65
|
rootElement.appendChild(rootWrapper);
|
|
66
66
|
const DialogComponent = () => {
|
|
67
|
-
const _a = options, { onConfirm, onCancel
|
|
67
|
+
const _a = options, { onConfirm, onCancel } = _a, others = __objRest(_a, ["onConfirm", "onCancel"]);
|
|
68
68
|
const [visible, setVisible] = useState(false);
|
|
69
69
|
const close = useCallback(() => {
|
|
70
70
|
setVisible(false);
|
|
@@ -94,9 +94,7 @@ const DialogGenerator = (options) => {
|
|
|
94
94
|
});
|
|
95
95
|
return /* @__PURE__ */ React.createElement(
|
|
96
96
|
Popup,
|
|
97
|
-
__spreadProps(__spreadValues({
|
|
98
|
-
ref
|
|
99
|
-
}, others), {
|
|
97
|
+
__spreadProps(__spreadValues({}, others), {
|
|
100
98
|
open: visible,
|
|
101
99
|
onOk: (val) => dispatch(true, val),
|
|
102
100
|
onClose: () => dispatch(false)
|
|
@@ -135,42 +133,8 @@ const prompt = (options) => {
|
|
|
135
133
|
type: "prompt"
|
|
136
134
|
}, formatProps(options)));
|
|
137
135
|
};
|
|
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
136
|
Dialog.confirm = confirm;
|
|
172
137
|
Dialog.prompt = prompt;
|
|
173
|
-
Dialog.useDialog = useDialog;
|
|
174
138
|
var FunctionalDialog_default = Dialog;
|
|
175
139
|
export {
|
|
176
140
|
FunctionalDialog_default as default
|
package/es/Dialog/index.css
CHANGED
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
.bui-dialog {
|
|
2
|
-
--max-width:
|
|
3
|
-
--border-radius: var(--bui-
|
|
4
|
-
--
|
|
5
|
-
--
|
|
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));
|
|
2
|
+
--max-width: 300px;
|
|
3
|
+
--border-radius: var(--bui-shape-radius-drawer);
|
|
4
|
+
--header-font-size: var(--bui-title-size-2);
|
|
5
|
+
--message-font-size: var(--bui-title-size-4);
|
|
13
6
|
display: flex;
|
|
14
7
|
align-items: center;
|
|
15
8
|
justify-content: center;
|
|
@@ -24,26 +17,26 @@
|
|
|
24
17
|
line-height: 21px;
|
|
25
18
|
}
|
|
26
19
|
.bui-dialog-body-title {
|
|
27
|
-
padding:
|
|
28
|
-
font-size: var(--
|
|
20
|
+
padding: 0 40px 9px;
|
|
21
|
+
font-size: var(--header-font-size);
|
|
29
22
|
text-align: center;
|
|
30
23
|
color: var(--bui-color-fg-default);
|
|
31
|
-
font-weight:
|
|
24
|
+
font-weight: 500;
|
|
32
25
|
}
|
|
33
26
|
.bui-dialog-body-title + .bui-dialog-body-footer {
|
|
34
|
-
margin-top:
|
|
27
|
+
margin-top: 6px;
|
|
35
28
|
}
|
|
36
29
|
.bui-dialog-body-desc {
|
|
37
|
-
padding:
|
|
30
|
+
padding: 0 24px;
|
|
38
31
|
color: var(--bui-color-fg-muted);
|
|
39
|
-
font-size: var(--
|
|
32
|
+
font-size: var(--message-font-size);
|
|
40
33
|
text-align: center;
|
|
41
34
|
}
|
|
42
35
|
.bui-dialog-body-desc:first-child {
|
|
43
36
|
padding-top: 0;
|
|
44
37
|
}
|
|
45
38
|
.bui-dialog-body-footer {
|
|
46
|
-
margin-top:
|
|
39
|
+
margin-top: 15px;
|
|
47
40
|
border-top: 1px solid rgba(0, 0, 0, 0.05);
|
|
48
41
|
display: -webkit-box;
|
|
49
42
|
display: flex;
|
|
@@ -56,20 +49,18 @@
|
|
|
56
49
|
flex: 1;
|
|
57
50
|
display: block;
|
|
58
51
|
width: 100%;
|
|
59
|
-
height:
|
|
60
|
-
line-height:
|
|
61
|
-
padding:
|
|
62
|
-
font-size:
|
|
52
|
+
height: 53px;
|
|
53
|
+
line-height: 25px;
|
|
54
|
+
padding: 12px 0 13px;
|
|
55
|
+
font-size: 17px;
|
|
56
|
+
background: 0 0;
|
|
63
57
|
border: 0;
|
|
64
58
|
outline: 0;
|
|
65
|
-
border-left:
|
|
59
|
+
border-left: 1px solid rgba(0, 0, 0, 0.05);
|
|
66
60
|
border-radius: 0;
|
|
67
61
|
text-align: center;
|
|
68
62
|
box-sizing: border-box;
|
|
69
63
|
}
|
|
70
|
-
.bui-dialog-body-button:first-child {
|
|
71
|
-
border: none;
|
|
72
|
-
}
|
|
73
64
|
.bui-dialog-body-button:active {
|
|
74
|
-
background-color:
|
|
65
|
+
background-color: rgba(54, 57, 64, 0.05);
|
|
75
66
|
}
|
package/es/Divider/Divider.css
CHANGED
|
@@ -1,20 +1,18 @@
|
|
|
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);
|
|
6
4
|
border-color: var(--bui-color-border-default);
|
|
7
5
|
font-family: var(--bui-font-family);
|
|
8
6
|
}
|
|
9
7
|
.bui-divider-vertical {
|
|
10
8
|
height: var(--height);
|
|
11
9
|
display: inline-block;
|
|
12
|
-
border-right-width:
|
|
10
|
+
border-right-width: 1px;
|
|
13
11
|
border-right-style: solid;
|
|
14
12
|
}
|
|
15
13
|
.bui-divider-horizontal {
|
|
16
14
|
width: var(--width);
|
|
17
|
-
border-bottom-width:
|
|
15
|
+
border-bottom-width: 1px;
|
|
18
16
|
border-bottom-style: solid;
|
|
19
17
|
}
|
|
20
18
|
.bui-divider-vertical-dashed {
|
|
@@ -31,8 +29,8 @@
|
|
|
31
29
|
justify-content: center;
|
|
32
30
|
}
|
|
33
31
|
.bui-divider-line {
|
|
34
|
-
width:
|
|
35
|
-
border-bottom-width:
|
|
32
|
+
width: 40px;
|
|
33
|
+
border-bottom-width: 1px;
|
|
36
34
|
border-bottom-style: solid;
|
|
37
35
|
border-color: var(--bui-color-border-default);
|
|
38
36
|
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
.bui-icon-btn {
|
|
2
|
-
--bg-color: var(--bui-
|
|
3
|
-
--color: var(--bui-
|
|
4
|
-
--icon-size:
|
|
5
|
-
--user-area:
|
|
6
|
-
--large-font-size: var(--bui-icon-btn-large-font-size, 23px);
|
|
7
|
-
--disabled-opacity: var(--bui-icon-btn-disabled-opacity, 0.5);
|
|
2
|
+
--bg-color: var(--bui-color-neutral-5);
|
|
3
|
+
--color: var(--bui-color-fg-muted);
|
|
4
|
+
--icon-size: 17px;
|
|
5
|
+
--user-area: 5px;
|
|
8
6
|
position: relative;
|
|
9
7
|
display: inline-flex;
|
|
10
8
|
height: auto;
|
|
@@ -49,10 +47,10 @@
|
|
|
49
47
|
}
|
|
50
48
|
.bui-icon-btn-medium.bui-icon-btn-outlined,
|
|
51
49
|
.bui-icon-btn-medium.bui-icon-btn-contained {
|
|
52
|
-
padding:
|
|
50
|
+
padding: 5px;
|
|
53
51
|
}
|
|
54
52
|
.bui-icon-btn-large {
|
|
55
|
-
font-size:
|
|
53
|
+
font-size: 23px;
|
|
56
54
|
padding: var(--bui-spacing-sm);
|
|
57
55
|
}
|
|
58
56
|
.bui-icon-btn-large.bui-icon-btn-outlined,
|
|
@@ -61,7 +59,7 @@
|
|
|
61
59
|
}
|
|
62
60
|
.bui-icon-btn-disabled {
|
|
63
61
|
pointer-events: none;
|
|
64
|
-
opacity:
|
|
62
|
+
opacity: 0.5;
|
|
65
63
|
}
|
|
66
64
|
.bui-icon-btn-circular {
|
|
67
65
|
border-radius: 100%;
|
package/es/Image/index.css
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
.bui-image {
|
|
2
|
-
--default-background-color: var(--bui-image-default-background-color, rgba(127, 127, 127, 0.2));
|
|
3
2
|
width: auto;
|
|
4
3
|
height: auto;
|
|
5
4
|
display: inline-block;
|
|
@@ -32,5 +31,5 @@
|
|
|
32
31
|
.bui-image-default-icon-item {
|
|
33
32
|
width: 100%;
|
|
34
33
|
height: 100%;
|
|
35
|
-
background-color:
|
|
34
|
+
background-color: rgba(127, 127, 127, 0.2);
|
|
36
35
|
}
|
package/es/Input/Input.css
CHANGED
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
.bui-input {
|
|
2
|
-
--height: var(--bui-input-height, 32px);
|
|
3
|
-
--padding: var(--bui-input-padding, 4px 10px);
|
|
4
|
-
--icon-start-margin-right: var(--bui-input-icon-start-margin-right, 3px);
|
|
5
|
-
--icon-end-margin-left: var(--bui-input-icon-end-margin-left, 3px);
|
|
6
|
-
--disabled-background-color: var(--bui-input-disabled-background-color, rgba(0, 0, 0, 0.04));
|
|
7
2
|
position: relative;
|
|
8
3
|
display: flex;
|
|
9
4
|
align-items: center;
|
|
10
|
-
height:
|
|
11
|
-
padding:
|
|
5
|
+
height: 32px;
|
|
6
|
+
padding: 4px 10px;
|
|
12
7
|
box-sizing: border-box;
|
|
13
8
|
border-radius: var(--bui-shape-radius-default);
|
|
14
9
|
border: 1px solid var(--bui-color-border-default);
|
|
@@ -21,10 +16,10 @@
|
|
|
21
16
|
font-size: var(--bui-title-size-3);
|
|
22
17
|
}
|
|
23
18
|
.bui-input-icon-start {
|
|
24
|
-
margin-right:
|
|
19
|
+
margin-right: 3px;
|
|
25
20
|
}
|
|
26
21
|
.bui-input-icon-end {
|
|
27
|
-
margin-left:
|
|
22
|
+
margin-left: 3px;
|
|
28
23
|
}
|
|
29
24
|
.bui-input-input {
|
|
30
25
|
flex: 1;
|
|
@@ -43,7 +38,7 @@
|
|
|
43
38
|
}
|
|
44
39
|
.bui-input-disabled {
|
|
45
40
|
pointer-events: none;
|
|
46
|
-
background-color:
|
|
41
|
+
background-color: rgba(0, 0, 0, 0.04);
|
|
47
42
|
}
|
|
48
43
|
.bui-input-disabled .bui-input-input {
|
|
49
44
|
color: var(--bui-color-fg-disabled);
|
package/es/List/List.css
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
.bui-list {
|
|
2
|
-
--small-item-padding: var(--bui-list-small-item-padding, 5px 12px);
|
|
3
|
-
--medium-item-padding: var(--bui-list-medium-item-padding, 18px 12px);
|
|
4
|
-
--large-item-padding: var(--bui-list-large-item-padding, 20px 12px);
|
|
5
2
|
background: var(--bui-color-bg-view);
|
|
6
3
|
font-size: var(--bui-title-size-3);
|
|
7
4
|
font-family: var(--bui-font-family);
|
package/es/List/ListItem.css
CHANGED
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
color: var(--bui-color-fg-subtle);
|
|
11
11
|
}
|
|
12
12
|
.bui-list-small .bui-list-item {
|
|
13
|
-
padding:
|
|
13
|
+
padding: 5px 12px;
|
|
14
14
|
}
|
|
15
15
|
.bui-list-medium .bui-list-item {
|
|
16
|
-
padding:
|
|
16
|
+
padding: 18px 12px;
|
|
17
17
|
}
|
|
18
18
|
.bui-list-large .bui-list-item {
|
|
19
|
-
padding:
|
|
19
|
+
padding: 20px 12px;
|
|
20
20
|
}
|
|
21
21
|
.bui-list-item-divider:not(:last-child) {
|
|
22
22
|
border-bottom: 1px solid var(--bui-color-border-default);
|
package/es/Loading/Loading.css
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
.bui-loading {
|
|
2
|
-
--icon-font-size: var(--bui-loading-icon-font-size, 30px);
|
|
3
|
-
--text-padding: var(--bui-loading-text-padding, 10px);
|
|
4
2
|
--animation-duration: var(--bui-loading-animation-duration, 1.6s);
|
|
5
3
|
width: fit-content;
|
|
6
4
|
display: flex;
|
|
@@ -10,11 +8,11 @@
|
|
|
10
8
|
font-family: var(--bui-font-family);
|
|
11
9
|
}
|
|
12
10
|
.bui-loading-icon {
|
|
13
|
-
font-size:
|
|
11
|
+
font-size: 30px;
|
|
14
12
|
animation: loading var(--animation-duration) linear infinite;
|
|
15
13
|
}
|
|
16
14
|
.bui-loading-text {
|
|
17
|
-
padding:
|
|
15
|
+
padding: 10px;
|
|
18
16
|
font-size: var(--bui-title-size-3);
|
|
19
17
|
}
|
|
20
18
|
.bui-loading-vertical {
|
|
@@ -12,5 +12,5 @@ declare const Modal: React.ForwardRefExoticComponent<Omit<ViewProps & {
|
|
|
12
12
|
keepMounted?: boolean;
|
|
13
13
|
} & import("@bifrostui/types").ICommonProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
14
14
|
ref?: React.Ref<HTMLDivElement>;
|
|
15
|
-
},
|
|
15
|
+
}, keyof import("@bifrostui/types").ICommonProps | "open" | "onClose" | "container" | "disablePortal" | "hideBackdrop" | "BackdropProps" | "disableScrollLock" | "keepMounted">, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
16
16
|
export default Modal;
|
package/es/NavBar/NavBar.css
CHANGED
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
.bui-navbar {
|
|
2
|
-
--width: var(--bui-navbar-width, 100%);
|
|
3
2
|
--height: var(--bui-navbar-height, 45px);
|
|
4
|
-
--padding: var(--bui-navbar-padding, 0 8px);
|
|
5
3
|
--icon-size: var(--bui-navbar-icon-size, 24px);
|
|
6
|
-
--icon-font-size: var(--bui-navbar-icon-font-size, var(--bui-title-size-3));
|
|
7
4
|
--background-color: var(--bui-navbar-background-color, var(--bui-color-white));
|
|
8
5
|
--border-bottom: var(--bui-navbar-border-bottom, none);
|
|
9
6
|
--z-index: var(--bui-navbar-z-index, auto);
|
|
10
|
-
--title-max-width: var(--bui-navbar-title-max-width, 60%);
|
|
11
7
|
position: relative;
|
|
12
|
-
width:
|
|
8
|
+
width: 100%;
|
|
13
9
|
height: var(--height);
|
|
14
10
|
box-sizing: border-box;
|
|
15
|
-
padding:
|
|
11
|
+
padding: 0 8px;
|
|
16
12
|
display: flex;
|
|
17
13
|
justify-content: center;
|
|
18
14
|
align-items: center;
|
|
@@ -29,8 +25,8 @@
|
|
|
29
25
|
width: 100%;
|
|
30
26
|
}
|
|
31
27
|
.bui-navbar-title {
|
|
32
|
-
max-width:
|
|
33
|
-
padding:
|
|
28
|
+
max-width: 60%;
|
|
29
|
+
padding: 0 8px;
|
|
34
30
|
font-size: var(--bui-title-size-2);
|
|
35
31
|
width: auto;
|
|
36
32
|
overflow: hidden;
|
|
@@ -42,7 +38,7 @@
|
|
|
42
38
|
flex: 1;
|
|
43
39
|
display: flex;
|
|
44
40
|
align-items: center;
|
|
45
|
-
font-size: var(--
|
|
41
|
+
font-size: var(--bui-title-size-3);
|
|
46
42
|
}
|
|
47
43
|
.bui-navbar-left {
|
|
48
44
|
justify-content: flex-start;
|
package/es/Picker/Picker.css
CHANGED
|
@@ -1,49 +1,53 @@
|
|
|
1
1
|
.bui-picker {
|
|
2
|
-
--
|
|
3
|
-
--
|
|
4
|
-
--
|
|
5
|
-
--
|
|
6
|
-
--
|
|
7
|
-
--
|
|
8
|
-
--
|
|
9
|
-
--
|
|
10
|
-
--
|
|
2
|
+
--cancel-color: var(--bui-color-fg-default);
|
|
3
|
+
--cancel-font-size: var(--bui-title-size-4, 15px);
|
|
4
|
+
--confirm-color: var(--bui-color-primary);
|
|
5
|
+
--confirm-font-size: var(--bui-title-size-4, 15px);
|
|
6
|
+
--title-color: var(--bui-color-fg-default);
|
|
7
|
+
--title-font-size: var(--bui-title-size-3, 16px);
|
|
8
|
+
--title-font-weight: var(--bui-font-weight-medium, 500);
|
|
9
|
+
--panel-container-height: 260px;
|
|
10
|
+
--indicator-top: 108px;
|
|
11
|
+
--indicator-height: 36px;
|
|
12
|
+
--indicator-border-color: var(--bui-color-border-default);
|
|
13
|
+
--option-color: var(--bui-color-fg-default);
|
|
14
|
+
--option-font-size: var(--bui-title-size-4);
|
|
15
|
+
--option-height: 36px;
|
|
11
16
|
font-family: var(--bui-font-family);
|
|
12
17
|
}
|
|
13
18
|
.bui-picker .bui-drawer-content {
|
|
14
19
|
border-radius: var(--bui-shape-radius-drawer) var(--bui-shape-radius-drawer) 0 0;
|
|
15
20
|
}
|
|
16
21
|
.bui-picker-header {
|
|
17
|
-
height:
|
|
22
|
+
height: 50px;
|
|
18
23
|
display: flex;
|
|
19
24
|
align-items: center;
|
|
20
25
|
justify-content: space-between;
|
|
21
|
-
padding: var(--
|
|
26
|
+
padding: 0 var(--bui-spacing-lg);
|
|
22
27
|
}
|
|
23
28
|
.bui-picker-cancel {
|
|
24
|
-
|
|
25
|
-
height:
|
|
26
|
-
font-size: var(--
|
|
29
|
+
width: 40px;
|
|
30
|
+
height: 100%;
|
|
31
|
+
font-size: var(--cancel-font-size);
|
|
27
32
|
text-align: center;
|
|
28
|
-
line-height:
|
|
29
|
-
color: var(--
|
|
33
|
+
line-height: 50px;
|
|
34
|
+
color: var(--cancel-color);
|
|
30
35
|
}
|
|
31
36
|
.bui-picker-title {
|
|
32
|
-
font-size: var(--
|
|
33
|
-
color: var(--
|
|
34
|
-
font-weight: var(--
|
|
37
|
+
font-size: var(--title-font-size);
|
|
38
|
+
color: var(--title-color);
|
|
39
|
+
font-weight: var(--title-font-weight);
|
|
35
40
|
}
|
|
36
41
|
.bui-picker-confirm {
|
|
37
|
-
|
|
38
|
-
height:
|
|
39
|
-
font-size: var(--
|
|
42
|
+
width: 40px;
|
|
43
|
+
height: 100%;
|
|
44
|
+
font-size: var(--confirm-font-size);
|
|
40
45
|
text-align: center;
|
|
41
|
-
line-height:
|
|
42
|
-
color: var(--
|
|
46
|
+
line-height: 50px;
|
|
47
|
+
color: var(--confirm-color);
|
|
43
48
|
}
|
|
44
49
|
.bui-picker-container {
|
|
45
50
|
width: 100%;
|
|
46
51
|
height: var(--panel-container-height);
|
|
47
52
|
display: flex;
|
|
48
|
-
overflow: hidden;
|
|
49
53
|
}
|
package/es/Picker/Picker.js
CHANGED
|
@@ -33,8 +33,7 @@ import clsx from "clsx";
|
|
|
33
33
|
import React, { useEffect, useRef, useState, useCallback } from "react";
|
|
34
34
|
import Drawer from "../Drawer";
|
|
35
35
|
import PickerPanel from "./PickerPanel";
|
|
36
|
-
import {
|
|
37
|
-
import { formatOptions, pickerPanelType, safeData } from "./utils";
|
|
36
|
+
import { formatOptions, pickerPanelType } from "./utils";
|
|
38
37
|
import "./Picker.css";
|
|
39
38
|
const prefixCls = "bui-picker";
|
|
40
39
|
const Picker = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
@@ -65,7 +64,6 @@ const Picker = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
65
64
|
const rollerRefs = useRef([]);
|
|
66
65
|
const [columns, setColumns] = useState([]);
|
|
67
66
|
const [internalValue, setInternalValue] = useState([]);
|
|
68
|
-
const { cancel: cancelText, confirm: confirmText } = useLocaleText("picker");
|
|
69
67
|
useEffect(() => {
|
|
70
68
|
if (!open)
|
|
71
69
|
return;
|
|
@@ -87,18 +85,13 @@ const Picker = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
87
85
|
}
|
|
88
86
|
}, [value, options]);
|
|
89
87
|
const confirm = (e) => {
|
|
90
|
-
const isMoving = rollerRefs.current.some((roller) => roller == null ? void 0 : roller.isMoving);
|
|
91
|
-
if (isMoving)
|
|
92
|
-
return;
|
|
93
|
-
const { safeValue } = safeData({
|
|
94
|
-
value: internalValue,
|
|
95
|
-
formatted: columns,
|
|
96
|
-
options
|
|
97
|
-
});
|
|
98
88
|
const payload = {
|
|
99
|
-
value:
|
|
89
|
+
value: internalValue,
|
|
100
90
|
options: columns
|
|
101
91
|
};
|
|
92
|
+
const isMoving = rollerRefs.current.some((roller) => roller == null ? void 0 : roller.isMoving);
|
|
93
|
+
if (isMoving)
|
|
94
|
+
return;
|
|
102
95
|
onConfirm == null ? void 0 : onConfirm(e, payload);
|
|
103
96
|
onClose == null ? void 0 : onClose(e, __spreadValues({
|
|
104
97
|
from: "confirm"
|
|
@@ -106,18 +99,11 @@ const Picker = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
106
99
|
};
|
|
107
100
|
const cancel = (e) => {
|
|
108
101
|
onCancel == null ? void 0 : onCancel(e);
|
|
109
|
-
|
|
102
|
+
onClose == null ? void 0 : onClose(e, {
|
|
103
|
+
from: "cancel",
|
|
110
104
|
value: internalValue,
|
|
111
|
-
formatted: columns,
|
|
112
|
-
options
|
|
113
|
-
});
|
|
114
|
-
const payload = {
|
|
115
|
-
value: safeValue,
|
|
116
105
|
options: columns
|
|
117
|
-
};
|
|
118
|
-
onClose == null ? void 0 : onClose(e, __spreadValues({
|
|
119
|
-
from: "cancel"
|
|
120
|
-
}, payload));
|
|
106
|
+
});
|
|
121
107
|
};
|
|
122
108
|
const updateItem = (e, columnOption, columnIndex) => {
|
|
123
109
|
var _a2, _b, _c;
|
|
@@ -150,7 +136,7 @@ const Picker = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
150
136
|
currentOption: columnOption
|
|
151
137
|
});
|
|
152
138
|
} else {
|
|
153
|
-
const result =
|
|
139
|
+
const result = internalValue;
|
|
154
140
|
result[columnIndex] = columnOption.value;
|
|
155
141
|
setInternalValue(result);
|
|
156
142
|
onOptionChange == null ? void 0 : onOptionChange(e, {
|
|
@@ -165,13 +151,8 @@ const Picker = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
165
151
|
updateItem(e, columnOption, columnIndex);
|
|
166
152
|
};
|
|
167
153
|
const handleClose = (e, data) => {
|
|
168
|
-
const { safeValue } = safeData({
|
|
169
|
-
value: internalValue,
|
|
170
|
-
formatted: columns,
|
|
171
|
-
options
|
|
172
|
-
});
|
|
173
154
|
onClose == null ? void 0 : onClose(e, __spreadValues({
|
|
174
|
-
value:
|
|
155
|
+
value: internalValue,
|
|
175
156
|
options: columns
|
|
176
157
|
}, data));
|
|
177
158
|
};
|
|
@@ -195,7 +176,7 @@ const Picker = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
195
176
|
__spreadProps(__spreadValues({}, contentProps), {
|
|
196
177
|
className: clsx(`${prefixCls}-content`, contentProps == null ? void 0 : contentProps.className)
|
|
197
178
|
}),
|
|
198
|
-
/* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-header` }, /* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-cancel`, onClick: cancel },
|
|
179
|
+
/* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-header` }, /* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-cancel`, onClick: cancel }, "\u53D6\u6D88"), title && /* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-title` }, title), /* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-confirm`, onClick: confirm }, "\u786E\u8BA4")),
|
|
199
180
|
/* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-container` }, columns.map((column, index) => /* @__PURE__ */ React.createElement(
|
|
200
181
|
PickerPanel,
|
|
201
182
|
{
|
|
@@ -204,8 +185,7 @@ const Picker = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
204
185
|
options: column,
|
|
205
186
|
columnIndex: index,
|
|
206
187
|
defaultValue: internalValue == null ? void 0 : internalValue[index],
|
|
207
|
-
onSelect: handleSelect
|
|
208
|
-
pickerStyle: others == null ? void 0 : others.style
|
|
188
|
+
onSelect: handleSelect
|
|
209
189
|
}
|
|
210
190
|
)))
|
|
211
191
|
)
|
|
@@ -86,10 +86,6 @@ export type PickerPanelProps<D extends React.ElementType = 'div', P = {}> = Over
|
|
|
86
86
|
* 列索引
|
|
87
87
|
*/
|
|
88
88
|
columnIndex?: number;
|
|
89
|
-
/**
|
|
90
|
-
* Piker组件的样式,PickerPanel的主题定制与css变量传入的Tokens有关,需要透传计算
|
|
91
|
-
*/
|
|
92
|
-
pickerStyle?: React.CSSProperties;
|
|
93
89
|
/**
|
|
94
90
|
* 选择选项时的回调
|
|
95
91
|
*/
|
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
background-image:
|
|
22
22
|
linear-gradient(
|
|
23
23
|
180deg,
|
|
24
|
-
var(--bui-color-bg-
|
|
25
|
-
var(--bui-color-bg-
|
|
24
|
+
var(--bui-color-bg-view-opacity-9),
|
|
25
|
+
var(--bui-color-bg-view-opacity-4)),
|
|
26
26
|
linear-gradient(
|
|
27
27
|
0deg,
|
|
28
|
-
var(--bui-color-bg-
|
|
29
|
-
var(--bui-color-bg-
|
|
28
|
+
var(--bui-color-bg-view-opacity-9),
|
|
29
|
+
var(--bui-color-bg-view-opacity-4));
|
|
30
30
|
background-position: top, bottom;
|
|
31
31
|
background-size: 100% var(--indicator-top);
|
|
32
32
|
background-repeat: no-repeat;
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
.bui-picker-panel-indicator {
|
|
36
36
|
position: absolute;
|
|
37
37
|
top: var(--indicator-top);
|
|
38
|
-
height: var(--
|
|
38
|
+
height: var(--indicator-height);
|
|
39
39
|
width: 100%;
|
|
40
|
-
border-top: 1px solid var(--
|
|
41
|
-
border-bottom: 1px solid var(--
|
|
40
|
+
border-top: 1px solid var(--indicator-border-color);
|
|
41
|
+
border-bottom: 1px solid var(--indicator-border-color);
|
|
42
42
|
}
|
|
43
43
|
.bui-picker-panel-option {
|
|
44
44
|
position: absolute;
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
text-align: center;
|
|
48
48
|
height: var(--option-height);
|
|
49
49
|
line-height: var(--option-height);
|
|
50
|
-
color: var(--
|
|
50
|
+
color: var(--option-color);
|
|
51
51
|
font-size: var(--option-font-size);
|
|
52
52
|
backface-visibility: hidden;
|
|
53
53
|
width: auto;
|