@bifrostui/react 1.4.5-beta.1 → 1.4.5-beta.2

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.
@@ -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 | "open" | "container" | "disablePortal" | "hideBackdrop" | "BackdropProps" | "onClose" | "disableScrollLock" | "keepMounted">, "ref"> & React.RefAttributes<HTMLDivElement>>;
15
+ }, "open" | keyof import("@bifrostui/types").ICommonProps | "container" | "disablePortal" | "hideBackdrop" | "BackdropProps" | "onClose" | "disableScrollLock" | "keepMounted">, "ref"> & React.RefAttributes<HTMLDivElement>>;
16
16
  export default Modal;
package/dist/Tabs/Tab.css CHANGED
@@ -18,10 +18,6 @@
18
18
  line-height: var(--bui-line-height);
19
19
  --bui-tabs-color: var(--bui-color-fg-default);
20
20
  }
21
- .bui-tab-center {
22
- flex: 1 0 0;
23
- margin: 0 auto;
24
- }
25
21
  .bui-tab-miniapp-active {
26
22
  line-height: 1.5;
27
23
  font-weight: var(--bui-font-weight-medium);
package/dist/Tabs/Tab.js CHANGED
@@ -71,14 +71,13 @@ const defaultProps = {
71
71
  const Tab = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
72
72
  const _a = __spreadValues(__spreadValues({}, defaultProps), props), { className, children, index, disabled, onClick } = _a, others = __objRest(_a, ["className", "children", "index", "disabled", "onClick"]);
73
73
  const tabsContext = import_react.default.useContext(import_TabsContext.default);
74
- const { value, align, triggerChange } = tabsContext;
74
+ const { value, triggerChange } = tabsContext;
75
75
  return /* @__PURE__ */ import_react.default.createElement(
76
76
  "div",
77
77
  __spreadProps(__spreadValues({
78
78
  ref,
79
79
  className: (0, import_clsx.default)(
80
80
  prefixCls,
81
- align !== "start" && `${prefixCls}-${align}`,
82
81
  {
83
82
  [`${prefixCls}-active`]: !import_utils.isMini && index === value,
84
83
  [`${prefixCls}-miniapp-active`]: import_utils.isMini && index === value,
package/dist/Tabs/Tabs.js CHANGED
@@ -65,11 +65,10 @@ var import_bound = __toESM(require("./utils/bound"));
65
65
  var import_Tabs2 = require("./Tabs.css");
66
66
  const prefixCls = "bui-tabs";
67
67
  const defaultProps = {
68
- align: "center",
69
68
  tabs: []
70
69
  };
71
70
  const Tabs = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
72
- const _a = __spreadValues(__spreadValues({}, defaultProps), props), { children, className, value, tabs, align, onChange } = _a, others = __objRest(_a, ["children", "className", "value", "tabs", "align", "onChange"]);
71
+ const _a = __spreadValues(__spreadValues({}, defaultProps), props), { children, className, value, tabs, onChange } = _a, others = __objRest(_a, ["children", "className", "value", "tabs", "onChange"]);
73
72
  const [active, setActive] = (0, import_react.useState)("");
74
73
  const tabsRef = (0, import_react.useRef)(null);
75
74
  const activeLineRef = (0, import_react.useRef)(null);
@@ -193,8 +192,8 @@ const Tabs = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
193
192
  }
194
193
  };
195
194
  const providerValue = (0, import_react.useMemo)(() => {
196
- return { value, align, triggerChange: handleClick };
197
- }, [value, align, children, handleClick]);
195
+ return { value, triggerChange: handleClick };
196
+ }, [value, children, handleClick]);
198
197
  return /* @__PURE__ */ import_react.default.createElement("div", __spreadValues({ ref, className: (0, import_clsx.default)(prefixCls, className) }, others), /* @__PURE__ */ import_react.default.createElement(
199
198
  "div",
200
199
  {
@@ -26,10 +26,6 @@ export type TabsProps<D extends React.ElementType = 'div', P = {}> = OverridePro
26
26
  * 切换面板的数据
27
27
  */
28
28
  tabs?: ITabItem[];
29
- /**
30
- * 对齐方式,默认为center
31
- */
32
- align?: ITabAlign;
33
29
  /**
34
30
  * 切换面板的回调
35
31
  */
package/es/Tabs/Tab.css CHANGED
@@ -18,10 +18,6 @@
18
18
  line-height: var(--bui-line-height);
19
19
  --bui-tabs-color: var(--bui-color-fg-default);
20
20
  }
21
- .bui-tab-center {
22
- flex: 1 0 0;
23
- margin: 0 auto;
24
- }
25
21
  .bui-tab-miniapp-active {
26
22
  line-height: 1.5;
27
23
  font-weight: var(--bui-font-weight-medium);
package/es/Tabs/Tab.js CHANGED
@@ -41,14 +41,13 @@ const defaultProps = {
41
41
  const Tab = /* @__PURE__ */ React.forwardRef((props, ref) => {
42
42
  const _a = __spreadValues(__spreadValues({}, defaultProps), props), { className, children, index, disabled, onClick } = _a, others = __objRest(_a, ["className", "children", "index", "disabled", "onClick"]);
43
43
  const tabsContext = React.useContext(TabsContext);
44
- const { value, align, triggerChange } = tabsContext;
44
+ const { value, triggerChange } = tabsContext;
45
45
  return /* @__PURE__ */ React.createElement(
46
46
  "div",
47
47
  __spreadProps(__spreadValues({
48
48
  ref,
49
49
  className: clsx(
50
50
  prefixCls,
51
- align !== "start" && `${prefixCls}-${align}`,
52
51
  {
53
52
  [`${prefixCls}-active`]: !isMini && index === value,
54
53
  [`${prefixCls}-miniapp-active`]: isMini && index === value,
package/es/Tabs/Tabs.js CHANGED
@@ -46,11 +46,10 @@ import bound from "./utils/bound";
46
46
  import "./Tabs.css";
47
47
  const prefixCls = "bui-tabs";
48
48
  const defaultProps = {
49
- align: "center",
50
49
  tabs: []
51
50
  };
52
51
  const Tabs = /* @__PURE__ */ React.forwardRef((props, ref) => {
53
- const _a = __spreadValues(__spreadValues({}, defaultProps), props), { children, className, value, tabs, align, onChange } = _a, others = __objRest(_a, ["children", "className", "value", "tabs", "align", "onChange"]);
52
+ const _a = __spreadValues(__spreadValues({}, defaultProps), props), { children, className, value, tabs, onChange } = _a, others = __objRest(_a, ["children", "className", "value", "tabs", "onChange"]);
54
53
  const [active, setActive] = useState("");
55
54
  const tabsRef = useRef(null);
56
55
  const activeLineRef = useRef(null);
@@ -174,8 +173,8 @@ const Tabs = /* @__PURE__ */ React.forwardRef((props, ref) => {
174
173
  }
175
174
  };
176
175
  const providerValue = useMemo(() => {
177
- return { value, align, triggerChange: handleClick };
178
- }, [value, align, children, handleClick]);
176
+ return { value, triggerChange: handleClick };
177
+ }, [value, children, handleClick]);
179
178
  return /* @__PURE__ */ React.createElement("div", __spreadValues({ ref, className: clsx(prefixCls, className) }, others), /* @__PURE__ */ React.createElement(
180
179
  "div",
181
180
  {
@@ -26,10 +26,6 @@ export type TabsProps<D extends React.ElementType = 'div', P = {}> = OverridePro
26
26
  * 切换面板的数据
27
27
  */
28
28
  tabs?: ITabItem[];
29
- /**
30
- * 对齐方式,默认为center
31
- */
32
- align?: ITabAlign;
33
29
  /**
34
30
  * 切换面板的回调
35
31
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bifrostui/react",
3
- "version": "1.4.5-beta.1",
3
+ "version": "1.4.5-beta.2",
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/icons": "1.4.5-beta.1",
37
- "@bifrostui/types": "1.4.5-beta.1",
38
- "@bifrostui/styles": "1.4.5-beta.1",
39
- "@bifrostui/utils": "1.4.5-beta.1"
36
+ "@bifrostui/icons": "1.4.5-beta.2",
37
+ "@bifrostui/styles": "1.4.5-beta.2",
38
+ "@bifrostui/types": "1.4.5-beta.2",
39
+ "@bifrostui/utils": "1.4.5-beta.2"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "@tarojs/components": "^3.0.0",