@bifrostui/react 1.2.3 → 1.2.5
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.types.js +15 -1
- package/dist/ActionSheet/ActionSheetItem.types.js +15 -1
- package/dist/Alert/Alert.types.js +15 -1
- package/dist/Avatar/Avatar.types.js +15 -1
- package/dist/Avatar/AvatarGroup.types.js +15 -1
- package/dist/Backdrop/Backdrop.types.js +15 -1
- package/dist/Badge/Badge.types.js +15 -1
- package/dist/Button/Button.types.js +15 -1
- package/dist/Calendar/Calendar.types.js +15 -1
- package/dist/Card/Card.types.js +15 -1
- package/dist/Card/CardContent.types.js +15 -1
- package/dist/Card/CardFooter.types.js +15 -1
- package/dist/Card/CardHeader.types.js +15 -1
- package/dist/Checkbox/Checkbox.types.js +15 -1
- package/dist/CitySelector/CitySelector.types.js +15 -1
- package/dist/Countdown/Countdown.types.js +15 -1
- package/dist/Divider/Divider.types.js +15 -1
- package/dist/Drawer/Drawer.types.js +15 -1
- package/dist/Fade/Fade.types.js +15 -1
- package/dist/IconButton/IconButton.types.js +15 -1
- package/dist/Image/Image.types.js +15 -1
- package/dist/Input/Input.types.js +15 -1
- package/dist/List/List.types.js +15 -1
- package/dist/List/ListItem.types.js +15 -1
- package/dist/List/ListItemContent.types.js +15 -1
- package/dist/List/ListItemExtra.types.js +15 -1
- package/dist/List/ListItemFooter.types.js +15 -1
- package/dist/List/ListItemHeader.types.js +15 -1
- package/dist/Loading/Loading.types.js +15 -1
- package/dist/Modal/Modal.miniapp.d.ts +1 -1
- package/dist/Modal/Modal.types.js +15 -1
- package/dist/NavBar/NavBar.types.js +15 -1
- package/dist/Picker/Picker.js +12 -0
- package/dist/Picker/Picker.types.js +15 -1
- package/dist/Picker/PickerPanel.js +6 -1
- package/dist/Portal/Portal.types.js +15 -1
- package/dist/Progress/Progress.types.js +15 -1
- package/dist/Radio/Radio.types.js +15 -1
- package/dist/Rating/Rating.types.js +15 -1
- package/dist/ScrollView/ScrollView.types.js +15 -1
- package/dist/Select/Select.types.js +15 -1
- package/dist/Skeleton/Skeleton.types.js +15 -1
- package/dist/Slide/Slide.types.js +15 -1
- package/dist/Slider/Slider.types.js +15 -1
- package/dist/Stack/Stack.types.js +15 -1
- package/dist/Steps/Step.types.js +15 -1
- package/dist/Steps/Steps.types.js +15 -1
- package/dist/Swiper/Swiper.types.js +15 -1
- package/dist/Switch/Switch.types.js +15 -1
- package/dist/TabBar/index.types.js +15 -1
- package/dist/Tabs/Tab.types.js +15 -1
- package/dist/Tabs/TabPanel.types.js +15 -1
- package/dist/Tabs/Tabs.css +4 -2
- package/dist/Tabs/Tabs.types.js +15 -1
- package/dist/Tag/Tag.types.js +15 -1
- package/dist/Tag/TagGroup.types.js +15 -1
- package/dist/TextArea/TextArea.types.js +15 -1
- package/dist/Transition/Transition.types.js +15 -1
- package/es/Modal/Modal.miniapp.d.ts +1 -1
- package/es/Picker/Picker.js +13 -1
- package/es/Picker/PickerPanel.js +7 -2
- package/es/Tabs/Tabs.css +4 -2
- package/package.json +5 -5
|
@@ -76,7 +76,7 @@ const PickerPanel = /* @__PURE__ */ import_react.default.forwardRef(
|
|
|
76
76
|
]);
|
|
77
77
|
const touch = (0, import_utils.useTouch)();
|
|
78
78
|
let timer;
|
|
79
|
-
const INERTIA_TIME =
|
|
79
|
+
const INERTIA_TIME = 200;
|
|
80
80
|
const INERTIA_DISTANCE = 15;
|
|
81
81
|
const DEFAULT_DURATION = 200;
|
|
82
82
|
const LINE_SPACING = 36;
|
|
@@ -90,6 +90,7 @@ const PickerPanel = /* @__PURE__ */ import_react.default.forwardRef(
|
|
|
90
90
|
const [scrollDistance, setScrollDistance] = (0, import_react.useState)(0);
|
|
91
91
|
const transformY = (0, import_react.useRef)(0);
|
|
92
92
|
const isVerticalMoving = (0, import_react.useRef)(false);
|
|
93
|
+
const rollerRef = (0, import_react.useRef)(null);
|
|
93
94
|
const PickerPanelRef = (0, import_react.useRef)(null);
|
|
94
95
|
const pickerPanelRef = (0, import_utils.useForkRef)(PickerPanelRef, ref);
|
|
95
96
|
(0, import_utils.useTouchEmulator)(PickerPanelRef.current);
|
|
@@ -221,6 +222,9 @@ const PickerPanel = /* @__PURE__ */ import_react.default.forwardRef(
|
|
|
221
222
|
columnIndex
|
|
222
223
|
});
|
|
223
224
|
};
|
|
225
|
+
(0, import_react.useImperativeHandle)(ref, () => ({
|
|
226
|
+
isMoving: isVerticalMoving.current
|
|
227
|
+
}));
|
|
224
228
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
225
229
|
"div",
|
|
226
230
|
__spreadValues({
|
|
@@ -234,6 +238,7 @@ const PickerPanel = /* @__PURE__ */ import_react.default.forwardRef(
|
|
|
234
238
|
"div",
|
|
235
239
|
{
|
|
236
240
|
className: `${prefixCls}-roller`,
|
|
241
|
+
ref: rollerRef,
|
|
237
242
|
style: {
|
|
238
243
|
transition: `transform ${touchTime}ms cubic-bezier(0.17, 0.89, 0.45, 1)`,
|
|
239
244
|
transform: `rotate3d(1, 0, 0, ${touchDeg})`
|
|
@@ -1 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
var Portal_types_exports = {};
|
|
15
|
+
module.exports = __toCommonJS(Portal_types_exports);
|
|
@@ -1 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
var Progress_types_exports = {};
|
|
15
|
+
module.exports = __toCommonJS(Progress_types_exports);
|
|
@@ -1 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
var Radio_types_exports = {};
|
|
15
|
+
module.exports = __toCommonJS(Radio_types_exports);
|
|
@@ -1 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
var Rating_types_exports = {};
|
|
15
|
+
module.exports = __toCommonJS(Rating_types_exports);
|
|
@@ -1 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
var ScrollView_types_exports = {};
|
|
15
|
+
module.exports = __toCommonJS(ScrollView_types_exports);
|
|
@@ -1 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
var Select_types_exports = {};
|
|
15
|
+
module.exports = __toCommonJS(Select_types_exports);
|
|
@@ -1 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
var Skeleton_types_exports = {};
|
|
15
|
+
module.exports = __toCommonJS(Skeleton_types_exports);
|
|
@@ -1 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
var Slide_types_exports = {};
|
|
15
|
+
module.exports = __toCommonJS(Slide_types_exports);
|
|
@@ -1 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
var Slider_types_exports = {};
|
|
15
|
+
module.exports = __toCommonJS(Slider_types_exports);
|
|
@@ -1 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
var Stack_types_exports = {};
|
|
15
|
+
module.exports = __toCommonJS(Stack_types_exports);
|
package/dist/Steps/Step.types.js
CHANGED
|
@@ -1 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
var Step_types_exports = {};
|
|
15
|
+
module.exports = __toCommonJS(Step_types_exports);
|
|
@@ -1 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
var Steps_types_exports = {};
|
|
15
|
+
module.exports = __toCommonJS(Steps_types_exports);
|
|
@@ -1 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
var Swiper_types_exports = {};
|
|
15
|
+
module.exports = __toCommonJS(Swiper_types_exports);
|
|
@@ -1 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
var Switch_types_exports = {};
|
|
15
|
+
module.exports = __toCommonJS(Switch_types_exports);
|
|
@@ -1 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
var index_types_exports = {};
|
|
15
|
+
module.exports = __toCommonJS(index_types_exports);
|
package/dist/Tabs/Tab.types.js
CHANGED
|
@@ -1 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
var Tab_types_exports = {};
|
|
15
|
+
module.exports = __toCommonJS(Tab_types_exports);
|
|
@@ -1 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
var TabPanel_types_exports = {};
|
|
15
|
+
module.exports = __toCommonJS(TabPanel_types_exports);
|
package/dist/Tabs/Tabs.css
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
--color: var(--bui-color-fg-subtle);
|
|
5
5
|
--active-color: var(--bui-color-fg-default);
|
|
6
6
|
--line-color: var(--bui-color-primary);
|
|
7
|
+
--line-height: 3PX;
|
|
8
|
+
--line-width: 18px;
|
|
7
9
|
position: relative;
|
|
8
10
|
font-family: var(--bui-font-family);
|
|
9
11
|
}
|
|
@@ -22,9 +24,9 @@
|
|
|
22
24
|
}
|
|
23
25
|
.bui-tabs-tabline {
|
|
24
26
|
position: absolute;
|
|
25
|
-
width:
|
|
27
|
+
width: var(--line-width);
|
|
26
28
|
bottom: 0;
|
|
27
|
-
height:
|
|
29
|
+
height: var(--line-height);
|
|
28
30
|
color: var(--bui-color-primary);
|
|
29
31
|
background: var(--line-color);
|
|
30
32
|
border-radius: var(--bui-shape-radius-label);
|
package/dist/Tabs/Tabs.types.js
CHANGED
|
@@ -1 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
var Tabs_types_exports = {};
|
|
15
|
+
module.exports = __toCommonJS(Tabs_types_exports);
|
package/dist/Tag/Tag.types.js
CHANGED
|
@@ -1 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
var Tag_types_exports = {};
|
|
15
|
+
module.exports = __toCommonJS(Tag_types_exports);
|
|
@@ -1 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
var TagGroup_types_exports = {};
|
|
15
|
+
module.exports = __toCommonJS(TagGroup_types_exports);
|
|
@@ -1 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
var TextArea_types_exports = {};
|
|
15
|
+
module.exports = __toCommonJS(TextArea_types_exports);
|
|
@@ -1 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
var Transition_types_exports = {};
|
|
15
|
+
module.exports = __toCommonJS(Transition_types_exports);
|
|
@@ -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" | "disablePortal" | "hideBackdrop" | "BackdropProps" | "onClose" | "disableScrollLock" | "keepMounted">, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
16
16
|
export default Modal;
|
package/es/Picker/Picker.js
CHANGED
|
@@ -30,7 +30,7 @@ var __objRest = (source, exclude) => {
|
|
|
30
30
|
return target;
|
|
31
31
|
};
|
|
32
32
|
import clsx from "clsx";
|
|
33
|
-
import React, { useEffect, useState } from "react";
|
|
33
|
+
import React, { useEffect, useRef, useState, useCallback } from "react";
|
|
34
34
|
import Drawer from "../Drawer";
|
|
35
35
|
import PickerPanel from "./PickerPanel";
|
|
36
36
|
import { formatOptions, pickerPanelType } from "./utils";
|
|
@@ -61,6 +61,7 @@ const Picker = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
61
61
|
"onClose"
|
|
62
62
|
]);
|
|
63
63
|
const pickerType = pickerPanelType(options);
|
|
64
|
+
const rollerRefs = useRef([]);
|
|
64
65
|
const [columns, setColumns] = useState([]);
|
|
65
66
|
const [internalValue, setInternalValue] = useState([]);
|
|
66
67
|
useEffect(() => {
|
|
@@ -88,6 +89,9 @@ const Picker = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
88
89
|
value: internalValue,
|
|
89
90
|
options: columns
|
|
90
91
|
};
|
|
92
|
+
const isMoving = rollerRefs.current.some((roller) => roller == null ? void 0 : roller.isMoving);
|
|
93
|
+
if (isMoving)
|
|
94
|
+
return;
|
|
91
95
|
onConfirm == null ? void 0 : onConfirm(e, payload);
|
|
92
96
|
onClose == null ? void 0 : onClose(e, __spreadValues({
|
|
93
97
|
from: "confirm"
|
|
@@ -152,6 +156,13 @@ const Picker = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
152
156
|
options: columns
|
|
153
157
|
}, data));
|
|
154
158
|
};
|
|
159
|
+
const setRefs = useCallback(
|
|
160
|
+
(index) => (e) => {
|
|
161
|
+
if (e)
|
|
162
|
+
rollerRefs.current[index] = e;
|
|
163
|
+
},
|
|
164
|
+
[]
|
|
165
|
+
);
|
|
155
166
|
return /* @__PURE__ */ React.createElement(
|
|
156
167
|
Drawer,
|
|
157
168
|
__spreadValues({
|
|
@@ -169,6 +180,7 @@ const Picker = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
169
180
|
/* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-container` }, columns.map((column, index) => /* @__PURE__ */ React.createElement(
|
|
170
181
|
PickerPanel,
|
|
171
182
|
{
|
|
183
|
+
ref: setRefs(index),
|
|
172
184
|
key: index,
|
|
173
185
|
options: column,
|
|
174
186
|
columnIndex: index,
|
package/es/Picker/PickerPanel.js
CHANGED
|
@@ -27,7 +27,7 @@ var __objRest = (source, exclude) => {
|
|
|
27
27
|
return target;
|
|
28
28
|
};
|
|
29
29
|
import clsx from "clsx";
|
|
30
|
-
import React, { useEffect, useState, useRef } from "react";
|
|
30
|
+
import React, { useEffect, useState, useRef, useImperativeHandle } from "react";
|
|
31
31
|
import { useTouch, useForkRef, useTouchEmulator } from "@bifrostui/utils";
|
|
32
32
|
import "./PickerPanel.css";
|
|
33
33
|
const prefixCls = "bui-picker-panel";
|
|
@@ -46,7 +46,7 @@ const PickerPanel = /* @__PURE__ */ React.forwardRef(
|
|
|
46
46
|
]);
|
|
47
47
|
const touch = useTouch();
|
|
48
48
|
let timer;
|
|
49
|
-
const INERTIA_TIME =
|
|
49
|
+
const INERTIA_TIME = 200;
|
|
50
50
|
const INERTIA_DISTANCE = 15;
|
|
51
51
|
const DEFAULT_DURATION = 200;
|
|
52
52
|
const LINE_SPACING = 36;
|
|
@@ -60,6 +60,7 @@ const PickerPanel = /* @__PURE__ */ React.forwardRef(
|
|
|
60
60
|
const [scrollDistance, setScrollDistance] = useState(0);
|
|
61
61
|
const transformY = useRef(0);
|
|
62
62
|
const isVerticalMoving = useRef(false);
|
|
63
|
+
const rollerRef = useRef(null);
|
|
63
64
|
const PickerPanelRef = useRef(null);
|
|
64
65
|
const pickerPanelRef = useForkRef(PickerPanelRef, ref);
|
|
65
66
|
useTouchEmulator(PickerPanelRef.current);
|
|
@@ -191,6 +192,9 @@ const PickerPanel = /* @__PURE__ */ React.forwardRef(
|
|
|
191
192
|
columnIndex
|
|
192
193
|
});
|
|
193
194
|
};
|
|
195
|
+
useImperativeHandle(ref, () => ({
|
|
196
|
+
isMoving: isVerticalMoving.current
|
|
197
|
+
}));
|
|
194
198
|
return /* @__PURE__ */ React.createElement(
|
|
195
199
|
"div",
|
|
196
200
|
__spreadValues({
|
|
@@ -204,6 +208,7 @@ const PickerPanel = /* @__PURE__ */ React.forwardRef(
|
|
|
204
208
|
"div",
|
|
205
209
|
{
|
|
206
210
|
className: `${prefixCls}-roller`,
|
|
211
|
+
ref: rollerRef,
|
|
207
212
|
style: {
|
|
208
213
|
transition: `transform ${touchTime}ms cubic-bezier(0.17, 0.89, 0.45, 1)`,
|
|
209
214
|
transform: `rotate3d(1, 0, 0, ${touchDeg})`
|
package/es/Tabs/Tabs.css
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
--color: var(--bui-color-fg-subtle);
|
|
5
5
|
--active-color: var(--bui-color-fg-default);
|
|
6
6
|
--line-color: var(--bui-color-primary);
|
|
7
|
+
--line-height: 3PX;
|
|
8
|
+
--line-width: 18px;
|
|
7
9
|
position: relative;
|
|
8
10
|
font-family: var(--bui-font-family);
|
|
9
11
|
}
|
|
@@ -22,9 +24,9 @@
|
|
|
22
24
|
}
|
|
23
25
|
.bui-tabs-tabline {
|
|
24
26
|
position: absolute;
|
|
25
|
-
width:
|
|
27
|
+
width: var(--line-width);
|
|
26
28
|
bottom: 0;
|
|
27
|
-
height:
|
|
29
|
+
height: var(--line-height);
|
|
28
30
|
color: var(--bui-color-primary);
|
|
29
31
|
background: var(--line-color);
|
|
30
32
|
border-radius: var(--bui-shape-radius-label);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bifrostui/react",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.5",
|
|
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/types": "1.2.
|
|
37
|
-
"@bifrostui/
|
|
38
|
-
"@bifrostui/
|
|
39
|
-
"@bifrostui/icons": "1.2.
|
|
36
|
+
"@bifrostui/types": "1.2.5",
|
|
37
|
+
"@bifrostui/styles": "1.2.5",
|
|
38
|
+
"@bifrostui/utils": "1.2.5",
|
|
39
|
+
"@bifrostui/icons": "1.2.5"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"@tarojs/components": "^3.0.0",
|