@bifrostui/react 2.0.0-alpha.26 → 2.0.0-alpha.27
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/DatePicker/DatePicker.d.ts +1 -1
- package/dist/Modal/Modal.miniapp.d.ts +1 -1
- package/dist/Tabs/Tabs.css +1 -0
- package/dist/Tabs/index.css +1 -0
- package/dist/Tabs/miniapp/Tabs.js +1 -2
- package/dist/Toast/FunctionalToast.js +2 -3
- package/es/DatePicker/DatePicker.d.ts +1 -1
- package/es/Modal/Modal.miniapp.d.ts +1 -1
- package/es/Tabs/Tabs.css +1 -0
- package/es/Tabs/index.css +1 -0
- package/es/Tabs/miniapp/Tabs.js +1 -2
- package/es/Toast/FunctionalToast.js +3 -4
- package/package.json +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DatePickerProps } from './DatePicker.types';
|
|
3
|
-
declare const DatePicker: React.ForwardRefExoticComponent<Omit<DatePickerProps<"div", Omit<import("../Picker").PickerProps<"div", import("..").DrawerProps>, "
|
|
3
|
+
declare const DatePicker: React.ForwardRefExoticComponent<Omit<DatePickerProps<"div", Omit<import("../Picker").PickerProps<"div", import("..").DrawerProps>, "defaultValue" | "value" | "onChange" | "onClose" | "onConfirm">>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
4
|
export default DatePicker;
|
|
@@ -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" | "container" | "BackdropProps" | "onClose" | "keepMounted" | "disablePortal" | "hideBackdrop" | "disableScrollLock">, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
16
16
|
export default Modal;
|
package/dist/Tabs/Tabs.css
CHANGED
package/dist/Tabs/index.css
CHANGED
|
@@ -232,8 +232,7 @@ const Tabs = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
|
|
|
232
232
|
onScroll: handleScroll,
|
|
233
233
|
enhanced: true,
|
|
234
234
|
showScrollbar: false,
|
|
235
|
-
enablePassive: true
|
|
236
|
-
enableFlex: true
|
|
235
|
+
enablePassive: true
|
|
237
236
|
},
|
|
238
237
|
/* @__PURE__ */ import_react.default.createElement("div", { id: wrapperId, className: import_classes.tabsScrollWrapperClass }, /* @__PURE__ */ import_react.default.createElement(
|
|
239
238
|
import_TabIndicator.default,
|
|
@@ -86,8 +86,7 @@ const Toast = (props) => {
|
|
|
86
86
|
};
|
|
87
87
|
const _a = options, { container } = _a, restOptions = __objRest(_a, ["container"]);
|
|
88
88
|
const rootWrapper = document.createElement("div");
|
|
89
|
-
|
|
90
|
-
rootElement == null ? void 0 : rootElement.appendChild(rootWrapper);
|
|
89
|
+
document.body.appendChild(rootWrapper);
|
|
91
90
|
const ToastComponent = () => {
|
|
92
91
|
const _a2 = restOptions, { duration, multiple, onClose, onExited } = _a2, others = __objRest(_a2, ["duration", "multiple", "onClose", "onExited"]);
|
|
93
92
|
const [open, setOpen] = (0, import_react.useState)(true);
|
|
@@ -125,7 +124,7 @@ const Toast = (props) => {
|
|
|
125
124
|
}
|
|
126
125
|
};
|
|
127
126
|
instance.close = close;
|
|
128
|
-
return /* @__PURE__ */ import_react.default.createElement(import_Toast.default, __spreadProps(__spreadValues({}, others), { open, onExited: onProxyExited }));
|
|
127
|
+
return /* @__PURE__ */ import_react.default.createElement(import_Portal.default, { container }, /* @__PURE__ */ import_react.default.createElement(import_Toast.default, __spreadProps(__spreadValues({}, others), { open, onExited: onProxyExited })));
|
|
129
128
|
};
|
|
130
129
|
(0, import_utils.render)(/* @__PURE__ */ import_react.default.createElement(ToastComponent, null), rootWrapper);
|
|
131
130
|
return instance;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DatePickerProps } from './DatePicker.types';
|
|
3
|
-
declare const DatePicker: React.ForwardRefExoticComponent<Omit<DatePickerProps<"div", Omit<import("../Picker").PickerProps<"div", import("..").DrawerProps>, "
|
|
3
|
+
declare const DatePicker: React.ForwardRefExoticComponent<Omit<DatePickerProps<"div", Omit<import("../Picker").PickerProps<"div", import("..").DrawerProps>, "defaultValue" | "onChange" | "value" | "onClose" | "onConfirm">>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
4
|
export default DatePicker;
|
|
@@ -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
|
-
}, "open" | "container" | keyof import("@bifrostui/types").ICommonProps | "
|
|
15
|
+
}, "open" | "container" | "disableScrollLock" | "onClose" | keyof import("@bifrostui/types").ICommonProps | "BackdropProps" | "disablePortal" | "keepMounted" | "hideBackdrop">, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
16
16
|
export default Modal;
|
package/es/Tabs/Tabs.css
CHANGED
package/es/Tabs/index.css
CHANGED
package/es/Tabs/miniapp/Tabs.js
CHANGED
|
@@ -207,8 +207,7 @@ const Tabs = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
207
207
|
onScroll: handleScroll,
|
|
208
208
|
enhanced: true,
|
|
209
209
|
showScrollbar: false,
|
|
210
|
-
enablePassive: true
|
|
211
|
-
enableFlex: true
|
|
210
|
+
enablePassive: true
|
|
212
211
|
},
|
|
213
212
|
/* @__PURE__ */ React.createElement("div", { id: wrapperId, className: tabsScrollWrapperClass }, /* @__PURE__ */ React.createElement(
|
|
214
213
|
TabIndicator,
|
|
@@ -35,7 +35,7 @@ import React, {
|
|
|
35
35
|
useState,
|
|
36
36
|
useRef
|
|
37
37
|
} from "react";
|
|
38
|
-
import { render, unmount
|
|
38
|
+
import { render, unmount } from "@bifrostui/utils";
|
|
39
39
|
import Portal from "../Portal";
|
|
40
40
|
import ToastView from "./Toast";
|
|
41
41
|
const defaultProps = {
|
|
@@ -61,8 +61,7 @@ const Toast = (props) => {
|
|
|
61
61
|
};
|
|
62
62
|
const _a = options, { container } = _a, restOptions = __objRest(_a, ["container"]);
|
|
63
63
|
const rootWrapper = document.createElement("div");
|
|
64
|
-
|
|
65
|
-
rootElement == null ? void 0 : rootElement.appendChild(rootWrapper);
|
|
64
|
+
document.body.appendChild(rootWrapper);
|
|
66
65
|
const ToastComponent = () => {
|
|
67
66
|
const _a2 = restOptions, { duration, multiple, onClose, onExited } = _a2, others = __objRest(_a2, ["duration", "multiple", "onClose", "onExited"]);
|
|
68
67
|
const [open, setOpen] = useState(true);
|
|
@@ -100,7 +99,7 @@ const Toast = (props) => {
|
|
|
100
99
|
}
|
|
101
100
|
};
|
|
102
101
|
instance.close = close;
|
|
103
|
-
return /* @__PURE__ */ React.createElement(ToastView, __spreadProps(__spreadValues({}, others), { open, onExited: onProxyExited }));
|
|
102
|
+
return /* @__PURE__ */ React.createElement(Portal, { container }, /* @__PURE__ */ React.createElement(ToastView, __spreadProps(__spreadValues({}, others), { open, onExited: onProxyExited })));
|
|
104
103
|
};
|
|
105
104
|
render(/* @__PURE__ */ React.createElement(ToastComponent, null), rootWrapper);
|
|
106
105
|
return instance;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bifrostui/react",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.27",
|
|
4
4
|
"description": "React components for building mobile application",
|
|
5
5
|
"homepage": "http://bui.taopiaopiao.com",
|
|
6
6
|
"license": "MIT",
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
"clsx": "^2.1.1",
|
|
44
44
|
"dayjs": "^1.11.7",
|
|
45
45
|
"swiper": "^8.1.5",
|
|
46
|
-
"@bifrostui/
|
|
47
|
-
"@bifrostui/
|
|
48
|
-
"@bifrostui/types": "2.0.0-alpha.
|
|
49
|
-
"@bifrostui/utils": "2.0.0-alpha.
|
|
46
|
+
"@bifrostui/styles": "2.0.0-alpha.27",
|
|
47
|
+
"@bifrostui/icons": "2.0.0-alpha.27",
|
|
48
|
+
"@bifrostui/types": "2.0.0-alpha.27",
|
|
49
|
+
"@bifrostui/utils": "2.0.0-alpha.27"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"@tarojs/components": "^3.0.0",
|