@bifrostui/react 1.4.2-beta.1 → 1.4.3-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/Input/Input.css +1 -1
- package/dist/Modal/Modal.miniapp.d.ts +1 -1
- package/dist/Popover/Popover.js +7 -11
- package/dist/Tooltip/Tooltip.js +7 -11
- package/es/Input/Input.css +1 -1
- package/es/Modal/Modal.miniapp.d.ts +1 -1
- package/es/Popover/Popover.js +8 -11
- package/es/Tooltip/Tooltip.js +8 -11
- package/package.json +5 -5
package/dist/Input/Input.css
CHANGED
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
}
|
|
31
31
|
.bui-input-input {
|
|
32
32
|
flex: 1;
|
|
33
|
+
min-width: 0;
|
|
33
34
|
display: flex;
|
|
34
35
|
align-items: center;
|
|
35
36
|
padding: 0;
|
|
@@ -44,7 +45,6 @@
|
|
|
44
45
|
color: var(--bui-color-fg-subtle);
|
|
45
46
|
}
|
|
46
47
|
.bui-input-disabled {
|
|
47
|
-
pointer-events: none;
|
|
48
48
|
background-color: var(--disabled-background-color);
|
|
49
49
|
}
|
|
50
50
|
.bui-input-disabled .bui-input-input {
|
|
@@ -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" | keyof import("@bifrostui/types").ICommonProps | "
|
|
15
|
+
}, "open" | "container" | "disablePortal" | keyof import("@bifrostui/types").ICommonProps | "onClose" | "keepMounted" | "BackdropProps" | "hideBackdrop" | "disableScrollLock">, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
16
16
|
export default Modal;
|
package/dist/Popover/Popover.js
CHANGED
|
@@ -91,15 +91,7 @@ const Popover = /* @__PURE__ */ import_react.default.forwardRef((props, ref) =>
|
|
|
91
91
|
"hideArrow"
|
|
92
92
|
]);
|
|
93
93
|
const controlByUser = typeof open !== "undefined";
|
|
94
|
-
const
|
|
95
|
-
const direction = positionArr[0];
|
|
96
|
-
let location;
|
|
97
|
-
if (positionArr.length > 1) {
|
|
98
|
-
positionArr.splice(0, 1);
|
|
99
|
-
location = positionArr.join("").toLowerCase();
|
|
100
|
-
} else {
|
|
101
|
-
location = "center";
|
|
102
|
-
}
|
|
94
|
+
const { direction, location = "center" } = (0, import_utils.parsePlacement)(placement);
|
|
103
95
|
const childrenRef = (0, import_react.useRef)();
|
|
104
96
|
const [openStatus, setOpenStatus] = (0, import_react.useState)(defaultOpen);
|
|
105
97
|
const [arrowDirection, setArrowDirection] = (0, import_react.useState)(direction);
|
|
@@ -134,10 +126,14 @@ const Popover = /* @__PURE__ */ import_react.default.forwardRef((props, ref) =>
|
|
|
134
126
|
hidePopover(event);
|
|
135
127
|
};
|
|
136
128
|
const onRootElementMouted = (0, import_utils.throttle)(() => {
|
|
129
|
+
const {
|
|
130
|
+
direction: newParsedDirection,
|
|
131
|
+
location: newParsedLocation = "center"
|
|
132
|
+
} = (0, import_utils.parsePlacement)(placement);
|
|
137
133
|
const result = (0, import_utils.getStylesAndLocation)({
|
|
138
134
|
childrenRef,
|
|
139
|
-
arrowDirection,
|
|
140
|
-
arrowLocation,
|
|
135
|
+
arrowDirection: newParsedDirection,
|
|
136
|
+
arrowLocation: newParsedLocation,
|
|
141
137
|
offsetSpacing,
|
|
142
138
|
selector: `[data-id="tt_${ttId}"]`
|
|
143
139
|
});
|
package/dist/Tooltip/Tooltip.js
CHANGED
|
@@ -87,15 +87,7 @@ const Tooltip = /* @__PURE__ */ import_react.default.forwardRef((props, ref) =>
|
|
|
87
87
|
"open"
|
|
88
88
|
]);
|
|
89
89
|
const controlByUser = typeof open !== "undefined";
|
|
90
|
-
const
|
|
91
|
-
const direction = positionArr[0];
|
|
92
|
-
let location;
|
|
93
|
-
if (positionArr.length > 1) {
|
|
94
|
-
positionArr.splice(0, 1);
|
|
95
|
-
location = positionArr.join("").toLowerCase();
|
|
96
|
-
} else {
|
|
97
|
-
location = "center";
|
|
98
|
-
}
|
|
90
|
+
const { direction, location = "center" } = (0, import_utils.parsePlacement)(placement);
|
|
99
91
|
const childrenRef = (0, import_react.useRef)();
|
|
100
92
|
const [openStatus, setOpenStatus] = (0, import_react.useState)(defaultOpen);
|
|
101
93
|
const [arrowDirection, setArrowDirection] = (0, import_react.useState)(direction);
|
|
@@ -130,10 +122,14 @@ const Tooltip = /* @__PURE__ */ import_react.default.forwardRef((props, ref) =>
|
|
|
130
122
|
hideTooltip(event);
|
|
131
123
|
};
|
|
132
124
|
const onRootElementMouted = (0, import_utils.throttle)(() => {
|
|
125
|
+
const {
|
|
126
|
+
direction: newParsedDirection,
|
|
127
|
+
location: newParsedLocation = "center"
|
|
128
|
+
} = (0, import_utils.parsePlacement)(placement);
|
|
133
129
|
const result = (0, import_utils.getStylesAndLocation)({
|
|
134
130
|
childrenRef,
|
|
135
|
-
arrowDirection,
|
|
136
|
-
arrowLocation,
|
|
131
|
+
arrowDirection: newParsedDirection,
|
|
132
|
+
arrowLocation: newParsedLocation,
|
|
137
133
|
offsetSpacing,
|
|
138
134
|
selector: `[data-id="tt_${ttId}"]`
|
|
139
135
|
});
|
package/es/Input/Input.css
CHANGED
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
}
|
|
31
31
|
.bui-input-input {
|
|
32
32
|
flex: 1;
|
|
33
|
+
min-width: 0;
|
|
33
34
|
display: flex;
|
|
34
35
|
align-items: center;
|
|
35
36
|
padding: 0;
|
|
@@ -44,7 +45,6 @@
|
|
|
44
45
|
color: var(--bui-color-fg-subtle);
|
|
45
46
|
}
|
|
46
47
|
.bui-input-disabled {
|
|
47
|
-
pointer-events: none;
|
|
48
48
|
background-color: var(--disabled-background-color);
|
|
49
49
|
}
|
|
50
50
|
.bui-input-disabled .bui-input-input {
|
|
@@ -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
|
-
}, keyof import("@bifrostui/types").ICommonProps | "
|
|
15
|
+
}, "open" | keyof import("@bifrostui/types").ICommonProps | "container" | "disablePortal" | "hideBackdrop" | "BackdropProps" | "onClose" | "disableScrollLock" | "keepMounted">, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
16
16
|
export default Modal;
|
package/es/Popover/Popover.js
CHANGED
|
@@ -31,6 +31,7 @@ import React, { useState, useRef, useEffect } from "react";
|
|
|
31
31
|
import {
|
|
32
32
|
getStylesAndLocation,
|
|
33
33
|
triggerEventTransform,
|
|
34
|
+
parsePlacement,
|
|
34
35
|
useUniqueId,
|
|
35
36
|
throttle
|
|
36
37
|
} from "@bifrostui/utils";
|
|
@@ -66,15 +67,7 @@ const Popover = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
66
67
|
"hideArrow"
|
|
67
68
|
]);
|
|
68
69
|
const controlByUser = typeof open !== "undefined";
|
|
69
|
-
const
|
|
70
|
-
const direction = positionArr[0];
|
|
71
|
-
let location;
|
|
72
|
-
if (positionArr.length > 1) {
|
|
73
|
-
positionArr.splice(0, 1);
|
|
74
|
-
location = positionArr.join("").toLowerCase();
|
|
75
|
-
} else {
|
|
76
|
-
location = "center";
|
|
77
|
-
}
|
|
70
|
+
const { direction, location = "center" } = parsePlacement(placement);
|
|
78
71
|
const childrenRef = useRef();
|
|
79
72
|
const [openStatus, setOpenStatus] = useState(defaultOpen);
|
|
80
73
|
const [arrowDirection, setArrowDirection] = useState(direction);
|
|
@@ -109,10 +102,14 @@ const Popover = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
109
102
|
hidePopover(event);
|
|
110
103
|
};
|
|
111
104
|
const onRootElementMouted = throttle(() => {
|
|
105
|
+
const {
|
|
106
|
+
direction: newParsedDirection,
|
|
107
|
+
location: newParsedLocation = "center"
|
|
108
|
+
} = parsePlacement(placement);
|
|
112
109
|
const result = getStylesAndLocation({
|
|
113
110
|
childrenRef,
|
|
114
|
-
arrowDirection,
|
|
115
|
-
arrowLocation,
|
|
111
|
+
arrowDirection: newParsedDirection,
|
|
112
|
+
arrowLocation: newParsedLocation,
|
|
116
113
|
offsetSpacing,
|
|
117
114
|
selector: `[data-id="tt_${ttId}"]`
|
|
118
115
|
});
|
package/es/Tooltip/Tooltip.js
CHANGED
|
@@ -31,6 +31,7 @@ import React, { useState, useRef, useEffect } from "react";
|
|
|
31
31
|
import {
|
|
32
32
|
getStylesAndLocation,
|
|
33
33
|
triggerEventTransform,
|
|
34
|
+
parsePlacement,
|
|
34
35
|
useUniqueId,
|
|
35
36
|
throttle
|
|
36
37
|
} from "@bifrostui/utils";
|
|
@@ -62,15 +63,7 @@ const Tooltip = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
62
63
|
"open"
|
|
63
64
|
]);
|
|
64
65
|
const controlByUser = typeof open !== "undefined";
|
|
65
|
-
const
|
|
66
|
-
const direction = positionArr[0];
|
|
67
|
-
let location;
|
|
68
|
-
if (positionArr.length > 1) {
|
|
69
|
-
positionArr.splice(0, 1);
|
|
70
|
-
location = positionArr.join("").toLowerCase();
|
|
71
|
-
} else {
|
|
72
|
-
location = "center";
|
|
73
|
-
}
|
|
66
|
+
const { direction, location = "center" } = parsePlacement(placement);
|
|
74
67
|
const childrenRef = useRef();
|
|
75
68
|
const [openStatus, setOpenStatus] = useState(defaultOpen);
|
|
76
69
|
const [arrowDirection, setArrowDirection] = useState(direction);
|
|
@@ -105,10 +98,14 @@ const Tooltip = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
105
98
|
hideTooltip(event);
|
|
106
99
|
};
|
|
107
100
|
const onRootElementMouted = throttle(() => {
|
|
101
|
+
const {
|
|
102
|
+
direction: newParsedDirection,
|
|
103
|
+
location: newParsedLocation = "center"
|
|
104
|
+
} = parsePlacement(placement);
|
|
108
105
|
const result = getStylesAndLocation({
|
|
109
106
|
childrenRef,
|
|
110
|
-
arrowDirection,
|
|
111
|
-
arrowLocation,
|
|
107
|
+
arrowDirection: newParsedDirection,
|
|
108
|
+
arrowLocation: newParsedLocation,
|
|
112
109
|
offsetSpacing,
|
|
113
110
|
selector: `[data-id="tt_${ttId}"]`
|
|
114
111
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bifrostui/react",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.3-beta.0",
|
|
4
4
|
"description": "React components for building mobile application",
|
|
5
5
|
"homepage": "http://bui.taopiaopiao.com",
|
|
6
6
|
"license": "MIT",
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
"clsx": "^1.2.1",
|
|
34
34
|
"dayjs": "^1.11.7",
|
|
35
35
|
"swiper": "^8.1.5",
|
|
36
|
-
"@bifrostui/icons": "1.4.
|
|
37
|
-
"@bifrostui/styles": "1.4.
|
|
38
|
-
"@bifrostui/types": "1.4.
|
|
39
|
-
"@bifrostui/utils": "1.4.
|
|
36
|
+
"@bifrostui/icons": "1.4.3-beta.0",
|
|
37
|
+
"@bifrostui/styles": "1.4.3-beta.0",
|
|
38
|
+
"@bifrostui/types": "1.4.3-beta.0",
|
|
39
|
+
"@bifrostui/utils": "1.4.3-beta.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"@tarojs/components": "^3.0.0",
|