@bifrostui/react 2.0.0-beta.1 → 2.0.0-beta.10
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/Modal/Modal.miniapp.d.ts +1 -1
- package/dist/Swiper/Swiper.js +18 -4
- package/dist/Tabs/Tabs.js +1 -1
- package/es/Modal/Modal.miniapp.d.ts +1 -1
- package/es/Swiper/Swiper.js +18 -4
- package/es/Tabs/Tabs.js +1 -1
- package/package.json +5 -5
|
@@ -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/dist/Swiper/Swiper.js
CHANGED
|
@@ -121,19 +121,33 @@ const Swiper = (0, import_react.forwardRef)((props, ref) => {
|
|
|
121
121
|
const swiperInstance = (0, import_react.useRef)();
|
|
122
122
|
const isInit = (0, import_react.useRef)(true);
|
|
123
123
|
(0, import_react.useEffect)(() => {
|
|
124
|
-
var _a2, _b;
|
|
124
|
+
var _a2, _b, _c, _d;
|
|
125
125
|
if (isInit.current) {
|
|
126
126
|
isInit.current = false;
|
|
127
127
|
return;
|
|
128
128
|
}
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
if (circular) {
|
|
130
|
+
(_b = (_a2 = swiperInstance == null ? void 0 : swiperInstance.current) == null ? void 0 : _a2.slideToLoop) == null ? void 0 : _b.call(_a2, current);
|
|
131
|
+
} else {
|
|
132
|
+
(_d = (_c = swiperInstance == null ? void 0 : swiperInstance.current) == null ? void 0 : _c.slideTo) == null ? void 0 : _d.call(_c, current);
|
|
133
|
+
}
|
|
134
|
+
}, [current, circular]);
|
|
135
|
+
(0, import_react.useEffect)(() => {
|
|
136
|
+
var _a2, _b;
|
|
137
|
+
if (swiperInstance == null ? void 0 : swiperInstance.current) {
|
|
138
|
+
if (autoplay) {
|
|
139
|
+
(_a2 = swiperInstance == null ? void 0 : swiperInstance.current) == null ? void 0 : _a2.autoplay.start();
|
|
140
|
+
} else {
|
|
141
|
+
(_b = swiperInstance == null ? void 0 : swiperInstance.current) == null ? void 0 : _b.autoplay.stop();
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}, [autoplay]);
|
|
131
145
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
132
146
|
import_react2.Swiper,
|
|
133
147
|
__spreadProps(__spreadValues({
|
|
134
148
|
modules: [import_swiper.Pagination, import_swiper.Autoplay, import_swiper.EffectFade],
|
|
135
149
|
loop: circular,
|
|
136
|
-
autoplay:
|
|
150
|
+
autoplay: { delay: interval, disableOnInteraction: false },
|
|
137
151
|
speed: duration,
|
|
138
152
|
slidesPerView: displayMultipleItems,
|
|
139
153
|
direction: vertical ? "vertical" : "horizontal",
|
package/dist/Tabs/Tabs.js
CHANGED
|
@@ -204,7 +204,7 @@ const Tabs = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
|
|
|
204
204
|
}),
|
|
205
205
|
style: {
|
|
206
206
|
transition: "transform 0.3s ease-in-out",
|
|
207
|
-
transform: `
|
|
207
|
+
transform: `translate(${indicatorData.x}px, 0px)`
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
210
|
), /* @__PURE__ */ import_react.default.createElement(import_TabsContext.TabsContextProvider, { value: providerValue }, !!tabs.length && tabs.map((item) => {
|
|
@@ -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 | "container" | "
|
|
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/Swiper/Swiper.js
CHANGED
|
@@ -91,19 +91,33 @@ const Swiper = forwardRef((props, ref) => {
|
|
|
91
91
|
const swiperInstance = useRef();
|
|
92
92
|
const isInit = useRef(true);
|
|
93
93
|
useEffect(() => {
|
|
94
|
-
var _a2, _b;
|
|
94
|
+
var _a2, _b, _c, _d;
|
|
95
95
|
if (isInit.current) {
|
|
96
96
|
isInit.current = false;
|
|
97
97
|
return;
|
|
98
98
|
}
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
if (circular) {
|
|
100
|
+
(_b = (_a2 = swiperInstance == null ? void 0 : swiperInstance.current) == null ? void 0 : _a2.slideToLoop) == null ? void 0 : _b.call(_a2, current);
|
|
101
|
+
} else {
|
|
102
|
+
(_d = (_c = swiperInstance == null ? void 0 : swiperInstance.current) == null ? void 0 : _c.slideTo) == null ? void 0 : _d.call(_c, current);
|
|
103
|
+
}
|
|
104
|
+
}, [current, circular]);
|
|
105
|
+
useEffect(() => {
|
|
106
|
+
var _a2, _b;
|
|
107
|
+
if (swiperInstance == null ? void 0 : swiperInstance.current) {
|
|
108
|
+
if (autoplay) {
|
|
109
|
+
(_a2 = swiperInstance == null ? void 0 : swiperInstance.current) == null ? void 0 : _a2.autoplay.start();
|
|
110
|
+
} else {
|
|
111
|
+
(_b = swiperInstance == null ? void 0 : swiperInstance.current) == null ? void 0 : _b.autoplay.stop();
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}, [autoplay]);
|
|
101
115
|
return /* @__PURE__ */ React.createElement(
|
|
102
116
|
SwiperReact,
|
|
103
117
|
__spreadProps(__spreadValues({
|
|
104
118
|
modules: [Pagination, Autoplay, EffectFade],
|
|
105
119
|
loop: circular,
|
|
106
|
-
autoplay:
|
|
120
|
+
autoplay: { delay: interval, disableOnInteraction: false },
|
|
107
121
|
speed: duration,
|
|
108
122
|
slidesPerView: displayMultipleItems,
|
|
109
123
|
direction: vertical ? "vertical" : "horizontal",
|
package/es/Tabs/Tabs.js
CHANGED
|
@@ -174,7 +174,7 @@ const Tabs = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
174
174
|
}),
|
|
175
175
|
style: {
|
|
176
176
|
transition: "transform 0.3s ease-in-out",
|
|
177
|
-
transform: `
|
|
177
|
+
transform: `translate(${indicatorData.x}px, 0px)`
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
180
|
), /* @__PURE__ */ React.createElement(TabsContextProvider, { value: providerValue }, !!tabs.length && tabs.map((item) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bifrostui/react",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.10",
|
|
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": "^2.1.1",
|
|
34
34
|
"dayjs": "^1.11.7",
|
|
35
35
|
"swiper": "^8.1.5",
|
|
36
|
-
"@bifrostui/
|
|
37
|
-
"@bifrostui/
|
|
38
|
-
"@bifrostui/
|
|
39
|
-
"@bifrostui/
|
|
36
|
+
"@bifrostui/icons": "2.0.0-beta.10",
|
|
37
|
+
"@bifrostui/styles": "2.0.0-beta.10",
|
|
38
|
+
"@bifrostui/utils": "2.0.0-beta.10",
|
|
39
|
+
"@bifrostui/types": "2.0.0-beta.10"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"@tarojs/components": "^3.0.0",
|