Comparing version 1.6.0-rc.4 to 1.6.0-rc.5
@@ -35,2 +35,3 @@ import React, { ReactNode } from "react"; | ||
onChange: (activeKey: string) => void; | ||
zIndex?: number; | ||
} | ||
@@ -37,0 +38,0 @@ |
@@ -8,2 +8,3 @@ "use strict"; | ||
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose")); | ||
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); | ||
var _react = _interopRequireWildcard(require("react")); | ||
@@ -20,2 +21,4 @@ var _clsx = _interopRequireDefault(require("clsx")); | ||
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
var BottomNavigation = /*#__PURE__*/_react["default"].forwardRef(function (props, ref) { | ||
@@ -30,3 +33,4 @@ var _classNames; | ||
activeKey = props.activeKey, | ||
defaultActiveKey = props.defaultActiveKey; | ||
defaultActiveKey = props.defaultActiveKey, | ||
zIndex = props.zIndex; | ||
var prefixCls = (0, _class.getPrefixCls)("bottom-navigation"); | ||
@@ -81,6 +85,9 @@ var cls = (0, _clsx["default"])(prefixCls, className, (_classNames = {}, _classNames[prefixCls + "-fixed"] = fixed, _classNames)); | ||
}, [items, mergedActiveKey]); | ||
var elStyle = _objectSpread(_objectSpread({}, style || {}), zIndex !== undefined ? { | ||
zIndex: zIndex | ||
} : {}); | ||
return /*#__PURE__*/_react["default"].createElement("div", { | ||
ref: ref, | ||
id: id, | ||
style: style, | ||
style: elStyle, | ||
className: cls | ||
@@ -87,0 +94,0 @@ }, /*#__PURE__*/_react["default"].createElement("div", { |
@@ -20,3 +20,3 @@ "use strict"; | ||
d: "M15.6784 1.89361C15.9136 1.24748 16.6317 0.908557 17.25 1.20938C18.2892 1.71497 19.2519 2.369 20.1071 3.15267C21.2689 4.21731 22.2097 5.50037 22.8757 6.92858C23.5417 8.3568 23.9198 9.90221 23.9886 11.4766C24.0392 12.6355 23.9214 13.7933 23.6407 14.9143C23.4737 15.5814 22.7525 15.9136 22.1064 15.6784C21.4603 15.4433 21.1358 14.7295 21.2846 14.0582C21.4641 13.2486 21.5373 12.4172 21.5009 11.5852C21.4465 10.3375 21.1468 9.11276 20.619 7.9809C20.0912 6.84904 19.3456 5.83222 18.4249 4.98849C17.8108 4.42584 17.1269 3.94752 16.3914 3.5646C15.7815 3.24709 15.4433 2.53973 15.6784 1.89361Z", | ||
fill: "#52A0FF" | ||
fill: "currentColor" | ||
})); | ||
@@ -23,0 +23,0 @@ }; |
@@ -177,5 +177,6 @@ "use strict"; | ||
setCurrentSnapPoint(currentSnapPoint + 1); | ||
} else { | ||
} else if (!sheetSnapPoints) { | ||
api.start({ | ||
transformAmount: 0 | ||
transformAmount: 0, | ||
movingAmount: 0 | ||
}); | ||
@@ -194,2 +195,13 @@ } | ||
} | ||
if (sheetSnapPoints) { | ||
api.start({ | ||
transformAmount: sheetSnapPoints[currentSnapPoint], | ||
movingAmount: 0 | ||
}); | ||
} else { | ||
api.start({ | ||
transformAmount: 0, | ||
movingAmount: 0 | ||
}); | ||
} | ||
return my; | ||
@@ -196,0 +208,0 @@ }; |
@@ -92,2 +92,5 @@ "use strict"; | ||
if (refEl.current.clientWidth) { | ||
if (refEl.current.scrollWidth > refEl.current.clientWidth) { | ||
refEl.current.style.setProperty("--zaui-tabbar-width", refEl.current.scrollWidth + "px"); | ||
} | ||
scrollToTab(activeKey); | ||
@@ -94,0 +97,0 @@ setLineStyles(); |
import _extends from "@babel/runtime/helpers/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose"; | ||
import _defineProperty from "@babel/runtime/helpers/defineProperty"; | ||
var _excluded = ["key", "style", "className", "itemKey", "linkTo"]; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
import React, { useEffect, useMemo, useState } from "react"; | ||
@@ -21,3 +24,4 @@ import classNames from "clsx"; | ||
activeKey = props.activeKey, | ||
defaultActiveKey = props.defaultActiveKey; | ||
defaultActiveKey = props.defaultActiveKey, | ||
zIndex = props.zIndex; | ||
var prefixCls = getPrefixCls("bottom-navigation"); | ||
@@ -72,6 +76,9 @@ var cls = classNames(prefixCls, className, (_classNames = {}, _classNames[prefixCls + "-fixed"] = fixed, _classNames)); | ||
}, [items, mergedActiveKey]); | ||
var elStyle = _objectSpread(_objectSpread({}, style || {}), zIndex !== undefined ? { | ||
zIndex: zIndex | ||
} : {}); | ||
return /*#__PURE__*/React.createElement("div", { | ||
ref: ref, | ||
id: id, | ||
style: style, | ||
style: elStyle, | ||
className: cls | ||
@@ -78,0 +85,0 @@ }, /*#__PURE__*/React.createElement("div", { |
@@ -15,5 +15,5 @@ import React from "react"; | ||
d: "M15.6784 1.89361C15.9136 1.24748 16.6317 0.908557 17.25 1.20938C18.2892 1.71497 19.2519 2.369 20.1071 3.15267C21.2689 4.21731 22.2097 5.50037 22.8757 6.92858C23.5417 8.3568 23.9198 9.90221 23.9886 11.4766C24.0392 12.6355 23.9214 13.7933 23.6407 14.9143C23.4737 15.5814 22.7525 15.9136 22.1064 15.6784C21.4603 15.4433 21.1358 14.7295 21.2846 14.0582C21.4641 13.2486 21.5373 12.4172 21.5009 11.5852C21.4465 10.3375 21.1468 9.11276 20.619 7.9809C20.0912 6.84904 19.3456 5.83222 18.4249 4.98849C17.8108 4.42584 17.1269 3.94752 16.3914 3.5646C15.7815 3.24709 15.4433 2.53973 15.6784 1.89361Z", | ||
fill: "#52A0FF" | ||
fill: "currentColor" | ||
})); | ||
}; | ||
export default LoadingIcon; |
@@ -170,5 +170,6 @@ import _extends from "@babel/runtime/helpers/extends"; | ||
setCurrentSnapPoint(currentSnapPoint + 1); | ||
} else { | ||
} else if (!sheetSnapPoints) { | ||
api.start({ | ||
transformAmount: 0 | ||
transformAmount: 0, | ||
movingAmount: 0 | ||
}); | ||
@@ -187,2 +188,13 @@ } | ||
} | ||
if (sheetSnapPoints) { | ||
api.start({ | ||
transformAmount: sheetSnapPoints[currentSnapPoint], | ||
movingAmount: 0 | ||
}); | ||
} else { | ||
api.start({ | ||
transformAmount: 0, | ||
movingAmount: 0 | ||
}); | ||
} | ||
return my; | ||
@@ -189,0 +201,0 @@ }; |
@@ -85,2 +85,5 @@ import React, { useCallback, useContext, useLayoutEffect, useRef, useState } from "react"; | ||
if (refEl.current.clientWidth) { | ||
if (refEl.current.scrollWidth > refEl.current.clientWidth) { | ||
refEl.current.style.setProperty("--zaui-tabbar-width", refEl.current.scrollWidth + "px"); | ||
} | ||
scrollToTab(activeKey); | ||
@@ -87,0 +90,0 @@ setLineStyles(); |
/** | ||
* Zaui 1.6.0-rc.4 | ||
* Zaui 1.6.0-rc.5 | ||
* Zalo Mini App framework | ||
@@ -10,3 +10,3 @@ * undefined | ||
* | ||
* Released on: March 27, 2023 | ||
* Released on: March 29, 2023 | ||
*/ | ||
@@ -13,0 +13,0 @@ |
{ | ||
"name": "zmp-ui", | ||
"version": "1.6.0-rc.4", | ||
"version": "1.6.0-rc.5", | ||
"description": "Zalo Mini App framework ", | ||
@@ -5,0 +5,0 @@ "main": "esm/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1210241
24244