@bifrostui/react 1.2.1 → 1.2.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.js +1 -1
- package/dist/ActionSheet/ActionSheet.types.js +1 -15
- package/dist/ActionSheet/ActionSheetItem.js +1 -1
- package/dist/ActionSheet/ActionSheetItem.types.js +1 -15
- package/dist/Alert/Alert.js +1 -1
- package/dist/Alert/Alert.types.js +1 -15
- package/dist/Avatar/Avatar.js +1 -1
- package/dist/Avatar/Avatar.types.js +1 -15
- package/dist/Avatar/AvatarGroup.js +1 -1
- package/dist/Avatar/AvatarGroup.types.js +1 -15
- package/dist/Backdrop/Backdrop.js +1 -1
- package/dist/Backdrop/Backdrop.types.js +1 -15
- package/dist/Badge/Badge.js +1 -1
- package/dist/Badge/Badge.types.js +1 -15
- package/dist/Button/Button.js +1 -1
- package/dist/Button/Button.types.js +1 -15
- package/dist/Calendar/Calendar.js +1 -1
- package/dist/Calendar/Calendar.types.js +1 -15
- package/dist/Card/Card.js +1 -1
- package/dist/Card/Card.types.js +1 -15
- package/dist/Card/CardContent.js +1 -1
- package/dist/Card/CardContent.types.js +1 -15
- package/dist/Card/CardFooter.js +1 -1
- package/dist/Card/CardFooter.types.js +1 -15
- package/dist/Card/CardHeader.js +1 -1
- package/dist/Card/CardHeader.types.js +1 -15
- package/dist/Checkbox/Checkbox.types.js +1 -15
- package/dist/CitySelector/CitySelector.js +1 -1
- package/dist/CitySelector/CitySelector.miniapp.js +1 -1
- package/dist/CitySelector/CitySelector.types.js +1 -15
- package/dist/CitySelector/CitySelectorCore.js +1 -1
- package/dist/Countdown/Countdown.types.js +1 -15
- package/dist/Divider/Divider.types.js +1 -15
- package/dist/Drawer/Drawer.js +1 -1
- package/dist/Drawer/Drawer.types.js +1 -15
- package/dist/Fade/Fade.js +1 -1
- package/dist/Fade/Fade.types.js +1 -15
- package/dist/IconButton/IconButton.js +1 -1
- package/dist/IconButton/IconButton.types.js +1 -15
- package/dist/Image/Image.js +1 -1
- package/dist/Image/Image.types.js +1 -15
- package/dist/Input/Input.types.js +1 -15
- package/dist/List/List.js +1 -1
- package/dist/List/List.types.js +1 -15
- package/dist/List/ListItem.js +1 -1
- package/dist/List/ListItem.types.js +1 -15
- package/dist/List/ListItemContent.js +1 -1
- package/dist/List/ListItemContent.types.js +1 -15
- package/dist/List/ListItemExtra.js +1 -1
- package/dist/List/ListItemExtra.types.js +1 -15
- package/dist/List/ListItemFooter.js +1 -1
- package/dist/List/ListItemFooter.types.js +1 -15
- package/dist/List/ListItemHeader.js +1 -1
- package/dist/List/ListItemHeader.types.js +1 -15
- package/dist/Loading/Loading.js +1 -1
- package/dist/Loading/Loading.types.js +1 -15
- package/dist/Modal/Modal.js +1 -1
- package/dist/Modal/Modal.miniapp.d.ts +1 -1
- package/dist/Modal/Modal.miniapp.js +1 -1
- package/dist/Modal/Modal.types.js +1 -15
- package/dist/NavBar/NavBar.js +1 -1
- package/dist/NavBar/NavBar.types.js +1 -15
- package/dist/Picker/Picker.js +1 -1
- package/dist/Picker/Picker.types.js +1 -15
- package/dist/Picker/PickerPanel.js +1 -1
- package/dist/Portal/Portal.js +1 -1
- package/dist/Portal/Portal.types.js +1 -15
- package/dist/Portal/PortalCore.js +1 -1
- package/dist/Progress/Progress.js +1 -1
- package/dist/Progress/Progress.types.js +1 -15
- package/dist/Radio/Radio.types.js +1 -15
- package/dist/Rating/Rating.types.js +1 -15
- package/dist/ScrollView/ScrollView.types.js +1 -15
- package/dist/Select/Select.js +1 -1
- package/dist/Select/Select.types.js +1 -15
- package/dist/Select/SelectOption.js +1 -1
- package/dist/Skeleton/Skeleton.js +1 -1
- package/dist/Skeleton/Skeleton.types.js +1 -15
- package/dist/Slide/Slide.js +1 -1
- package/dist/Slide/Slide.types.js +1 -15
- package/dist/Slider/Slider.js +1 -1
- package/dist/Slider/Slider.types.js +1 -15
- package/dist/Stack/Stack.js +1 -1
- package/dist/Stack/Stack.types.js +1 -15
- package/dist/Steps/Step.types.js +1 -15
- package/dist/Steps/Steps.types.js +1 -15
- package/dist/Swiper/Swiper.types.js +1 -15
- package/dist/Switch/Switch.types.js +1 -15
- package/dist/TabBar/TabBar.js +1 -1
- package/dist/TabBar/TabBarItem.js +1 -1
- package/dist/TabBar/index.types.js +1 -15
- package/dist/Tabs/Tab.js +1 -1
- package/dist/Tabs/Tab.types.js +1 -15
- package/dist/Tabs/TabPanel.types.js +1 -15
- package/dist/Tabs/Tabs.js +14 -2
- package/dist/Tabs/Tabs.types.js +1 -15
- package/dist/Tag/Tag.js +1 -1
- package/dist/Tag/Tag.types.js +1 -15
- package/dist/Tag/TagGroup.js +1 -1
- package/dist/Tag/TagGroup.types.js +1 -15
- package/dist/TextArea/TextArea.js +1 -1
- package/dist/TextArea/TextArea.types.js +1 -15
- package/dist/Transition/Transition.js +1 -1
- package/dist/Transition/Transition.miniapp.js +1 -1
- package/dist/Transition/Transition.types.js +1 -15
- package/es/ActionSheet/ActionSheet.js +1 -1
- package/es/ActionSheet/ActionSheet.types.js +1 -0
- package/es/ActionSheet/ActionSheetItem.js +1 -1
- package/es/ActionSheet/ActionSheetItem.types.js +1 -0
- package/es/Alert/Alert.js +1 -1
- package/es/Alert/Alert.types.js +1 -0
- package/es/Avatar/Avatar.js +1 -1
- package/es/Avatar/Avatar.types.js +1 -0
- package/es/Avatar/AvatarGroup.js +1 -1
- package/es/Avatar/AvatarGroup.types.js +1 -0
- package/es/Backdrop/Backdrop.js +1 -1
- package/es/Backdrop/Backdrop.types.js +1 -0
- package/es/Badge/Badge.js +1 -1
- package/es/Badge/Badge.types.js +1 -0
- package/es/Button/Button.js +1 -1
- package/es/Button/Button.types.js +1 -0
- package/es/Calendar/Calendar.js +1 -1
- package/es/Calendar/Calendar.types.js +1 -0
- package/es/Card/Card.js +1 -1
- package/es/Card/Card.types.js +1 -0
- package/es/Card/CardContent.js +1 -1
- package/es/Card/CardContent.types.js +1 -0
- package/es/Card/CardFooter.js +1 -1
- package/es/Card/CardFooter.types.js +1 -0
- package/es/Card/CardHeader.js +1 -1
- package/es/Card/CardHeader.types.js +1 -0
- package/es/Checkbox/Checkbox.types.js +1 -0
- package/es/CitySelector/CitySelector.js +1 -1
- package/es/CitySelector/CitySelector.miniapp.js +1 -1
- package/es/CitySelector/CitySelector.types.js +1 -0
- package/es/CitySelector/CitySelectorCore.js +1 -1
- package/es/Countdown/Countdown.types.js +1 -0
- package/es/Divider/Divider.types.js +1 -0
- package/es/Drawer/Drawer.js +1 -1
- package/es/Drawer/Drawer.types.js +1 -0
- package/es/Fade/Fade.js +1 -1
- package/es/Fade/Fade.types.js +1 -0
- package/es/IconButton/IconButton.js +1 -1
- package/es/IconButton/IconButton.types.js +1 -0
- package/es/Image/Image.js +1 -1
- package/es/Image/Image.types.js +1 -0
- package/es/Input/Input.types.js +1 -0
- package/es/List/List.js +1 -1
- package/es/List/List.types.js +1 -0
- package/es/List/ListItem.js +1 -1
- package/es/List/ListItem.types.js +1 -0
- package/es/List/ListItemContent.js +1 -1
- package/es/List/ListItemContent.types.js +1 -0
- package/es/List/ListItemExtra.js +1 -1
- package/es/List/ListItemExtra.types.js +1 -0
- package/es/List/ListItemFooter.js +1 -1
- package/es/List/ListItemFooter.types.js +1 -0
- package/es/List/ListItemHeader.js +1 -1
- package/es/List/ListItemHeader.types.js +1 -0
- package/es/Loading/Loading.js +1 -1
- package/es/Loading/Loading.types.js +1 -0
- package/es/Modal/Modal.js +1 -1
- package/es/Modal/Modal.miniapp.js +1 -1
- package/es/Modal/Modal.types.js +1 -0
- package/es/NavBar/NavBar.js +1 -1
- package/es/NavBar/NavBar.types.js +1 -0
- package/es/Picker/Picker.js +1 -1
- package/es/Picker/Picker.types.js +1 -0
- package/es/Picker/PickerPanel.js +1 -1
- package/es/Portal/Portal.js +1 -1
- package/es/Portal/Portal.types.js +1 -0
- package/es/Portal/PortalCore.js +1 -1
- package/es/Progress/Progress.js +1 -1
- package/es/Progress/Progress.types.js +1 -0
- package/es/Radio/Radio.types.js +1 -0
- package/es/Rating/Rating.types.js +1 -0
- package/es/ScrollView/ScrollView.types.js +1 -0
- package/es/Select/Select.js +1 -1
- package/es/Select/Select.types.js +1 -0
- package/es/Select/SelectOption.js +1 -1
- package/es/Skeleton/Skeleton.js +1 -1
- package/es/Skeleton/Skeleton.types.js +1 -0
- package/es/Slide/Slide.js +1 -1
- package/es/Slide/Slide.types.js +1 -0
- package/es/Slider/Slider.js +1 -1
- package/es/Slider/Slider.types.js +1 -0
- package/es/Stack/Stack.js +1 -1
- package/es/Stack/Stack.types.js +1 -0
- package/es/Steps/Step.types.js +1 -0
- package/es/Steps/Steps.types.js +1 -0
- package/es/Swiper/Swiper.types.js +1 -0
- package/es/Switch/Switch.types.js +1 -0
- package/es/TabBar/TabBar.js +1 -1
- package/es/TabBar/TabBarItem.js +1 -1
- package/es/TabBar/index.types.js +1 -0
- package/es/Tabs/Tab.js +1 -1
- package/es/Tabs/Tab.types.js +1 -0
- package/es/Tabs/TabPanel.types.js +1 -0
- package/es/Tabs/Tabs.js +14 -2
- package/es/Tabs/Tabs.types.js +1 -0
- package/es/Tag/Tag.js +1 -1
- package/es/Tag/Tag.types.js +1 -0
- package/es/Tag/TagGroup.js +1 -1
- package/es/Tag/TagGroup.types.js +1 -0
- package/es/TextArea/TextArea.js +1 -1
- package/es/TextArea/TextArea.types.js +1 -0
- package/es/Transition/Transition.js +1 -1
- package/es/Transition/Transition.miniapp.js +1 -1
- package/es/Transition/Transition.types.js +1 -0
- package/package.json +5 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/es/Loading/Loading.js
CHANGED
|
@@ -31,7 +31,7 @@ import clsx from "clsx";
|
|
|
31
31
|
import { LoadingThreeQuartersOutlinedIcon } from "@bifrostui/icons";
|
|
32
32
|
import "./Loading.css";
|
|
33
33
|
const prefixCls = "bui-loading";
|
|
34
|
-
const Loading = React.forwardRef((props, ref) => {
|
|
34
|
+
const Loading = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
35
35
|
const _a = props, { className, icon, IconProps, children, direction } = _a, otherProps = __objRest(_a, ["className", "icon", "IconProps", "children", "direction"]);
|
|
36
36
|
const renderIcon = () => {
|
|
37
37
|
return icon != null ? icon : /* @__PURE__ */ React.createElement(
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/es/Modal/Modal.js
CHANGED
|
@@ -36,7 +36,7 @@ import Backdrop from "../Backdrop";
|
|
|
36
36
|
import Portal from "../Portal";
|
|
37
37
|
import "./Modal.css";
|
|
38
38
|
const prefixCls = "bui-modal";
|
|
39
|
-
const Modal = React.forwardRef((props, ref) => {
|
|
39
|
+
const Modal = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
40
40
|
const _a = props, {
|
|
41
41
|
className,
|
|
42
42
|
open,
|
|
@@ -37,7 +37,7 @@ import Backdrop from "../Backdrop";
|
|
|
37
37
|
import Portal from "../Portal";
|
|
38
38
|
import "./Modal.css";
|
|
39
39
|
const prefixCls = "bui-modal";
|
|
40
|
-
const Modal = React.forwardRef(
|
|
40
|
+
const Modal = /* @__PURE__ */ React.forwardRef(
|
|
41
41
|
(props, ref) => {
|
|
42
42
|
const _a = props, {
|
|
43
43
|
className,
|
package/es/Modal/Modal.types.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/es/NavBar/NavBar.js
CHANGED
|
@@ -32,7 +32,7 @@ import { useForkRef, useSize } from "@bifrostui/utils";
|
|
|
32
32
|
import { ArrowBackwardLargeIcon } from "@bifrostui/icons";
|
|
33
33
|
import "./NavBar.css";
|
|
34
34
|
const prefixCls = "bui-navbar";
|
|
35
|
-
const NavBar = React.forwardRef((props, ref) => {
|
|
35
|
+
const NavBar = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
36
36
|
const _a = props, {
|
|
37
37
|
className,
|
|
38
38
|
title,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/es/Picker/Picker.js
CHANGED
|
@@ -36,7 +36,7 @@ import PickerPanel from "./PickerPanel";
|
|
|
36
36
|
import { formatOptions, pickerPanelType } from "./utils";
|
|
37
37
|
import "./Picker.css";
|
|
38
38
|
const prefixCls = "bui-picker";
|
|
39
|
-
const Picker = React.forwardRef((props, ref) => {
|
|
39
|
+
const Picker = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
40
40
|
const _a = props, {
|
|
41
41
|
className,
|
|
42
42
|
open = false,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/es/Picker/PickerPanel.js
CHANGED
|
@@ -31,7 +31,7 @@ import React, { useEffect, useState, useRef } from "react";
|
|
|
31
31
|
import { useTouch, useForkRef, useTouchEmulator } from "@bifrostui/utils";
|
|
32
32
|
import "./PickerPanel.css";
|
|
33
33
|
const prefixCls = "bui-picker-panel";
|
|
34
|
-
const PickerPanel = React.forwardRef(
|
|
34
|
+
const PickerPanel = /* @__PURE__ */ React.forwardRef(
|
|
35
35
|
(props, ref) => {
|
|
36
36
|
const _a = props, {
|
|
37
37
|
options = [],
|
package/es/Portal/Portal.js
CHANGED
|
@@ -19,7 +19,7 @@ var __spreadValues = (a, b) => {
|
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import React from "react";
|
|
21
21
|
import PortalCore from "./PortalCore";
|
|
22
|
-
const Portal = React.forwardRef(
|
|
22
|
+
const Portal = /* @__PURE__ */ React.forwardRef(
|
|
23
23
|
(props, ref) => {
|
|
24
24
|
return /* @__PURE__ */ React.createElement(PortalCore, __spreadProps(__spreadValues({}, props), { ref, rootElement: document.body }));
|
|
25
25
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/es/Portal/PortalCore.js
CHANGED
|
@@ -4,7 +4,7 @@ import { createPortal } from "react-dom";
|
|
|
4
4
|
function getContainer(container) {
|
|
5
5
|
return typeof container === "function" ? container() : container;
|
|
6
6
|
}
|
|
7
|
-
const PortalCore = React.forwardRef(
|
|
7
|
+
const PortalCore = /* @__PURE__ */ React.forwardRef(
|
|
8
8
|
function Portal(props, ref) {
|
|
9
9
|
const { children, container, disablePortal = false, rootElement } = props;
|
|
10
10
|
const [mountNode, setMountNode] = React.useState(null);
|
package/es/Progress/Progress.js
CHANGED
|
@@ -63,7 +63,7 @@ const handleGradient = (strokeColor) => {
|
|
|
63
63
|
}
|
|
64
64
|
return { backgroundImage: `linear-gradient(${direction}, ${from}, ${to})` };
|
|
65
65
|
};
|
|
66
|
-
const Progress = React.forwardRef(
|
|
66
|
+
const Progress = /* @__PURE__ */ React.forwardRef(
|
|
67
67
|
(props, ref) => {
|
|
68
68
|
const _a = props, {
|
|
69
69
|
className,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/es/Radio/Radio.types.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/es/Select/Select.js
CHANGED
|
@@ -39,7 +39,7 @@ import BuiSelectContext from "./selectContext";
|
|
|
39
39
|
import Backdrop from "../Backdrop";
|
|
40
40
|
import "./Select.css";
|
|
41
41
|
const prefixCls = "bui-select";
|
|
42
|
-
const Select = React.forwardRef((props, ref) => {
|
|
42
|
+
const Select = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
43
43
|
const _a = props, {
|
|
44
44
|
className,
|
|
45
45
|
children,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -34,7 +34,7 @@ import React, { useContext, useEffect } from "react";
|
|
|
34
34
|
import BuiSelectContext from "./selectContext";
|
|
35
35
|
import "./Select.css";
|
|
36
36
|
const prefixCls = "bui-select-option";
|
|
37
|
-
const SelectOption = React.forwardRef(
|
|
37
|
+
const SelectOption = /* @__PURE__ */ React.forwardRef(
|
|
38
38
|
(props, ref) => {
|
|
39
39
|
const _a = props, { value, label, disabled, className, children } = _a, others = __objRest(_a, ["value", "label", "disabled", "className", "children"]);
|
|
40
40
|
const { selectValue, setRenderValue, handleOptionClick } = useContext(BuiSelectContext);
|
package/es/Skeleton/Skeleton.js
CHANGED
|
@@ -30,7 +30,7 @@ import clsx from "clsx";
|
|
|
30
30
|
import React from "react";
|
|
31
31
|
import "./Skeleton.css";
|
|
32
32
|
const prefixCls = "bui-skeleton";
|
|
33
|
-
const Skeleton = React.forwardRef(
|
|
33
|
+
const Skeleton = /* @__PURE__ */ React.forwardRef(
|
|
34
34
|
(props, ref) => {
|
|
35
35
|
const _a = props, {
|
|
36
36
|
className,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/es/Slide/Slide.js
CHANGED
|
@@ -46,7 +46,7 @@ const defaultTimeout = {
|
|
|
46
46
|
enter: duration.enteringScreen,
|
|
47
47
|
exit: duration.leavingScreen
|
|
48
48
|
};
|
|
49
|
-
const Slide = React.forwardRef((props, ref) => {
|
|
49
|
+
const Slide = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
50
50
|
const _a = props, {
|
|
51
51
|
appear,
|
|
52
52
|
in: inProp,
|
package/es/Slide/Slide.types.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/es/Slider/Slider.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/es/Stack/Stack.js
CHANGED
|
@@ -30,7 +30,7 @@ import clsx from "clsx";
|
|
|
30
30
|
import React from "react";
|
|
31
31
|
import "./Stack.css";
|
|
32
32
|
const prefixCls = "bui-stack";
|
|
33
|
-
const Stack = React.forwardRef((props, ref) => {
|
|
33
|
+
const Stack = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
34
34
|
const _a = props, {
|
|
35
35
|
className,
|
|
36
36
|
children,
|
package/es/Stack/Stack.types.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/es/Steps/Step.types.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/es/Steps/Steps.types.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/es/TabBar/TabBar.js
CHANGED
|
@@ -31,7 +31,7 @@ import clsx from "clsx";
|
|
|
31
31
|
import TabBarContext from "./TabBarContext";
|
|
32
32
|
import "./TabBar.css";
|
|
33
33
|
const prefixCls = "bui-tab-bar";
|
|
34
|
-
const TabBar = React.forwardRef((props, ref) => {
|
|
34
|
+
const TabBar = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
35
35
|
const _a = props || {}, {
|
|
36
36
|
current,
|
|
37
37
|
activeColor,
|
package/es/TabBar/TabBarItem.js
CHANGED
|
@@ -32,7 +32,7 @@ import clsx from "clsx";
|
|
|
32
32
|
import "./TabBarItem.css";
|
|
33
33
|
import TabBarContext from "./TabBarContext";
|
|
34
34
|
const prefixCls = "bui-tab-bar-item";
|
|
35
|
-
const TabBarItem = React.forwardRef(
|
|
35
|
+
const TabBarItem = /* @__PURE__ */ React.forwardRef(
|
|
36
36
|
(props, ref) => {
|
|
37
37
|
var _b;
|
|
38
38
|
const { currentIndex, activeColor, color, onChange } = useContext(TabBarContext);
|
package/es/TabBar/index.types.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/es/Tabs/Tab.js
CHANGED
|
@@ -35,7 +35,7 @@ import React from "react";
|
|
|
35
35
|
import TabsContext from "./TabsContext";
|
|
36
36
|
import "./Tab.css";
|
|
37
37
|
const prefixCls = "bui-tab";
|
|
38
|
-
const Tab = React.forwardRef((props, ref) => {
|
|
38
|
+
const Tab = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
39
39
|
const _a = props, { className, children, index, disabled, onClick } = _a, others = __objRest(_a, ["className", "children", "index", "disabled", "onClick"]);
|
|
40
40
|
const tabsContext = React.useContext(TabsContext);
|
|
41
41
|
const { value, align, triggerChange } = tabsContext;
|
package/es/Tabs/Tab.types.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/es/Tabs/Tabs.js
CHANGED
|
@@ -45,7 +45,7 @@ import "./Tabs.css";
|
|
|
45
45
|
import { TabsContextProvider } from "./TabsContext";
|
|
46
46
|
import bound from "./utils/bound";
|
|
47
47
|
const prefixCls = "bui-tabs";
|
|
48
|
-
const Tabs = React.forwardRef((props, ref) => {
|
|
48
|
+
const Tabs = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
49
49
|
const _a = props, { children, className, value, tabs, align, onChange } = _a, others = __objRest(_a, ["children", "className", "value", "tabs", "align", "onChange"]);
|
|
50
50
|
const [active, setActive] = useState("");
|
|
51
51
|
const tabsRef = useRef(null);
|
|
@@ -128,8 +128,20 @@ const Tabs = React.forwardRef((props, ref) => {
|
|
|
128
128
|
const safeValue = () => {
|
|
129
129
|
var _a2;
|
|
130
130
|
let defaultIndex = value;
|
|
131
|
+
const childs = React.Children.toArray(children);
|
|
132
|
+
const hasSameChild = !!childs.length && childs.some(
|
|
133
|
+
(child) => {
|
|
134
|
+
var _a3;
|
|
135
|
+
return React.isValidElement(child) && child.type === Tab && ((_a3 = child == null ? void 0 : child.props) == null ? void 0 : _a3.index) === value;
|
|
136
|
+
}
|
|
137
|
+
);
|
|
131
138
|
if (!!tabs.length && !tabs.some((item) => item.index === value)) {
|
|
132
139
|
defaultIndex = (_a2 = tabs[0]) == null ? void 0 : _a2.index;
|
|
140
|
+
} else if (children && !hasSameChild) {
|
|
141
|
+
const childNode = childs[0];
|
|
142
|
+
if (React.isValidElement(childNode)) {
|
|
143
|
+
defaultIndex = childNode.props.index;
|
|
144
|
+
}
|
|
133
145
|
}
|
|
134
146
|
return defaultIndex;
|
|
135
147
|
};
|
|
@@ -175,7 +187,7 @@ const Tabs = React.forwardRef((props, ref) => {
|
|
|
175
187
|
const providerValue = useMemo(() => {
|
|
176
188
|
const v = safeValue();
|
|
177
189
|
return { value: v, align, triggerChange: handleClick };
|
|
178
|
-
}, [value, align, handleClick]);
|
|
190
|
+
}, [value, align, children, handleClick]);
|
|
179
191
|
return /* @__PURE__ */ React.createElement("div", __spreadValues({ ref, className: clsx(prefixCls, className) }, others), /* @__PURE__ */ React.createElement(
|
|
180
192
|
"div",
|
|
181
193
|
{
|
package/es/Tabs/Tabs.types.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/es/Tag/Tag.js
CHANGED
|
@@ -43,7 +43,7 @@ const colorHandler = (color, opacity = 1) => {
|
|
|
43
43
|
return convertHexToRGBA(color, opacity);
|
|
44
44
|
};
|
|
45
45
|
const prefixCls = "bui-tag";
|
|
46
|
-
const Tag = React.forwardRef((props, ref) => {
|
|
46
|
+
const Tag = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
47
47
|
const _a = props, {
|
|
48
48
|
className,
|
|
49
49
|
style,
|
package/es/Tag/Tag.types.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/es/Tag/TagGroup.js
CHANGED
|
@@ -30,7 +30,7 @@ import clsx from "clsx";
|
|
|
30
30
|
import React from "react";
|
|
31
31
|
import "./TagGroup.css";
|
|
32
32
|
const prefixCls = "bui-tag-group";
|
|
33
|
-
const Tag = React.forwardRef((props, ref) => {
|
|
33
|
+
const Tag = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
34
34
|
const _a = props, { className, onClick, children } = _a, others = __objRest(_a, ["className", "onClick", "children"]);
|
|
35
35
|
return /* @__PURE__ */ React.createElement(
|
|
36
36
|
"div",
|
package/es/Tag/TagGroup.types.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/es/TextArea/TextArea.js
CHANGED
|
@@ -35,7 +35,7 @@ import React, { useEffect, useRef } from "react";
|
|
|
35
35
|
import "./TextArea.css";
|
|
36
36
|
const prefixCls = "bui-textarea";
|
|
37
37
|
const DEFAULT_ROWS = 2;
|
|
38
|
-
const TextArea = React.forwardRef(
|
|
38
|
+
const TextArea = /* @__PURE__ */ React.forwardRef(
|
|
39
39
|
(props, ref) => {
|
|
40
40
|
const _a = props, {
|
|
41
41
|
className,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -19,7 +19,7 @@ var __spreadValues = (a, b) => {
|
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import React from "react";
|
|
21
21
|
import TransitionCore from "./TransitionCore";
|
|
22
|
-
const Transition = React.forwardRef(
|
|
22
|
+
const Transition = /* @__PURE__ */ React.forwardRef(
|
|
23
23
|
(props, ref) => {
|
|
24
24
|
return /* @__PURE__ */ React.createElement(TransitionCore, __spreadProps(__spreadValues({}, props), { ref, nextTick: setTimeout }));
|
|
25
25
|
}
|
|
@@ -20,7 +20,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
20
20
|
import Taro from "@tarojs/taro";
|
|
21
21
|
import React from "react";
|
|
22
22
|
import TransitionCore from "./TransitionCore";
|
|
23
|
-
const Transition = React.forwardRef(
|
|
23
|
+
const Transition = /* @__PURE__ */ React.forwardRef(
|
|
24
24
|
(props, ref) => {
|
|
25
25
|
return /* @__PURE__ */ React.createElement(TransitionCore, __spreadProps(__spreadValues({}, props), { nextTick: Taro.nextTick, ref }));
|
|
26
26
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bifrostui/react",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
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/
|
|
37
|
-
"@bifrostui/
|
|
38
|
-
"@bifrostui/
|
|
39
|
-
"@bifrostui/
|
|
36
|
+
"@bifrostui/types": "1.2.3",
|
|
37
|
+
"@bifrostui/utils": "1.2.3",
|
|
38
|
+
"@bifrostui/styles": "1.2.3",
|
|
39
|
+
"@bifrostui/icons": "1.2.3"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"@tarojs/components": "^3.0.0",
|