Comparing version 1.6.0-rc.1 to 1.6.0-rc.2
@@ -101,3 +101,3 @@ | ||
*/ | ||
export interface BoxProps { | ||
export interface BoxProps extends React.HTMLProps<HTMLDivElement> { | ||
id?: string; | ||
@@ -104,0 +104,0 @@ className?: string; |
@@ -6,3 +6,5 @@ "use strict"; | ||
exports["default"] = void 0; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); | ||
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -13,2 +15,3 @@ var _clsx = _interopRequireDefault(require("clsx")); | ||
var _class = require("../../utils/class"); | ||
var _excluded = ["id", "children", "className", "style", "m", "p", "mt", "ml", "mb", "mr", "mx", "my", "pt", "pl", "pb", "pr", "px", "py", "noSpace", "inline", "width", "height", "verticalAlign", "textAlign", "flex", "flexDirection", "flexWrap", "justifyContent", "alignItems", "alignContent"]; | ||
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; } | ||
@@ -88,3 +91,4 @@ 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; } | ||
_props$alignContent = props.alignContent, | ||
alignContent = _props$alignContent === void 0 ? "" : _props$alignContent; | ||
alignContent = _props$alignContent === void 0 ? "" : _props$alignContent, | ||
rest = (0, _objectWithoutPropertiesLoose2["default"])(props, _excluded); | ||
var prefixCls = (0, _class.getPrefixCls)("box"); | ||
@@ -99,3 +103,3 @@ var classes = (0, _clsx["default"])(prefixCls, (_classNames = {}, _classNames[prefixCls + "-no-space"] = noSpace, _classNames[prefixCls + "-inline"] = inline, _classNames[prefixCls + "-m-" + m] = (0, _utils.validateSpacingNumber)(m), _classNames[prefixCls + "-mt-" + mt] = (0, _utils.validateSpacingNumber)(mt), _classNames[prefixCls + "-ml-" + ml] = (0, _utils.validateSpacingNumber)(ml), _classNames[prefixCls + "-mb-" + mb] = (0, _utils.validateSpacingNumber)(mb), _classNames[prefixCls + "-mr-" + mr] = (0, _utils.validateSpacingNumber)(mr), _classNames[prefixCls + "-mx-" + mx] = (0, _utils.validateSpacingNumber)(mx), _classNames[prefixCls + "-my-" + my] = (0, _utils.validateSpacingNumber)(my), _classNames[prefixCls + "-p-" + p] = (0, _utils.validateSpacingNumber)(p), _classNames[prefixCls + "-pt-" + pt] = (0, _utils.validateSpacingNumber)(pt), _classNames[prefixCls + "-pl-" + pl] = (0, _utils.validateSpacingNumber)(pl), _classNames[prefixCls + "-pb-" + pb] = (0, _utils.validateSpacingNumber)(pb), _classNames[prefixCls + "-pr-" + pr] = (0, _utils.validateSpacingNumber)(pr), _classNames[prefixCls + "-px-" + px] = (0, _utils.validateSpacingNumber)(px), _classNames[prefixCls + "-py-" + py] = (0, _utils.validateSpacingNumber)(py), _classNames[prefixCls + "-flex"] = flex, _classNames[prefixCls + "-flex-" + flexDirection] = (0, _utils.isValidBoxProps)(flexDirection, _constants.BoxPropsKeys.flexDirection), _classNames[prefixCls + "-vertical-align-" + verticalAlign] = (0, _utils.isValidBoxProps)(verticalAlign, _constants.BoxPropsKeys.verticalAlign), _classNames[prefixCls + "-text-align-" + textAlign] = (0, _utils.isValidBoxProps)(textAlign, _constants.BoxPropsKeys.textAlign), _classNames[prefixCls + "-flex-wrap"] = flexWrap === true, _classNames[prefixCls + "-flex-nowrap"] = flexWrap === false, _classNames[prefixCls + "-justify-" + justifyContent] = (0, _utils.isValidBoxProps)(justifyContent, _constants.BoxPropsKeys.justifyContent), _classNames[prefixCls + "-align-items-" + alignItems] = (0, _utils.isValidBoxProps)(alignItems, _constants.BoxPropsKeys.alignItems), _classNames[prefixCls + "-align-content-" + alignContent] = (0, _utils.isValidBoxProps)(alignContent, _constants.BoxPropsKeys.alignContent), _classNames), className); | ||
} | ||
return /*#__PURE__*/_react["default"].createElement("div", { | ||
return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({}, rest, { | ||
ref: ref, | ||
@@ -105,5 +109,5 @@ id: id, | ||
className: classes | ||
}, children); | ||
}), children); | ||
}); | ||
var _default = Box; | ||
exports["default"] = _default; |
@@ -6,5 +6,8 @@ "use strict"; | ||
exports["default"] = void 0; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose")); | ||
var _react = _interopRequireDefault(require("react")); | ||
var _clsx = _interopRequireDefault(require("clsx")); | ||
var _class = require("../../utils/class"); | ||
var _excluded = ["className", "children", "style", "size"]; | ||
var HeaderText = function HeaderText(props) { | ||
@@ -15,11 +18,12 @@ var _classNames; | ||
style = props.style, | ||
size = props.size; | ||
size = props.size, | ||
rest = (0, _objectWithoutPropertiesLoose2["default"])(props, _excluded); | ||
var prefixCls = (0, _class.getPrefixCls)("text-header"); | ||
var cls = (0, _clsx["default"])(prefixCls, (_classNames = {}, _classNames[prefixCls + "-" + size] = size, _classNames), className); | ||
return /*#__PURE__*/_react["default"].createElement("span", { | ||
return /*#__PURE__*/_react["default"].createElement("span", (0, _extends2["default"])({}, rest, { | ||
className: cls, | ||
style: style | ||
}, children); | ||
}), children); | ||
}; | ||
var _default = HeaderText; | ||
exports["default"] = _default; |
@@ -6,5 +6,8 @@ "use strict"; | ||
exports["default"] = void 0; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose")); | ||
var _react = _interopRequireDefault(require("react")); | ||
var _clsx = _interopRequireDefault(require("clsx")); | ||
var _class = require("../../utils/class"); | ||
var _excluded = ["className", "children", "style", "bold", "size"]; | ||
var Text = function Text(props) { | ||
@@ -16,11 +19,12 @@ var _classNames; | ||
bold = props.bold, | ||
size = props.size; | ||
size = props.size, | ||
rest = (0, _objectWithoutPropertiesLoose2["default"])(props, _excluded); | ||
var prefixCls = (0, _class.getPrefixCls)("text"); | ||
var cls = (0, _clsx["default"])(prefixCls, (_classNames = {}, _classNames[prefixCls + "-bold"] = bold, _classNames[prefixCls + "-" + size] = size, _classNames), className); | ||
return /*#__PURE__*/_react["default"].createElement("span", { | ||
return /*#__PURE__*/_react["default"].createElement("span", (0, _extends2["default"])({}, rest, { | ||
className: cls, | ||
style: style | ||
}, children); | ||
}), children); | ||
}; | ||
var _default = Text; | ||
exports["default"] = _default; |
@@ -6,5 +6,8 @@ "use strict"; | ||
exports["default"] = void 0; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose")); | ||
var _react = _interopRequireDefault(require("react")); | ||
var _clsx = _interopRequireDefault(require("clsx")); | ||
var _class = require("../../utils/class"); | ||
var _excluded = ["className", "children", "style", "size"]; | ||
var Title = function Title(props) { | ||
@@ -15,11 +18,12 @@ var _classNames; | ||
style = props.style, | ||
size = props.size; | ||
size = props.size, | ||
rest = (0, _objectWithoutPropertiesLoose2["default"])(props, _excluded); | ||
var prefixCls = (0, _class.getPrefixCls)("text-title"); | ||
var cls = (0, _clsx["default"])(prefixCls, (_classNames = {}, _classNames[prefixCls + "-" + size] = size, _classNames), className); | ||
return /*#__PURE__*/_react["default"].createElement("span", { | ||
return /*#__PURE__*/_react["default"].createElement("span", (0, _extends2["default"])({}, rest, { | ||
className: cls, | ||
style: style | ||
}, children); | ||
}), children); | ||
}; | ||
var _default = Title; | ||
exports["default"] = _default; |
@@ -0,2 +1,5 @@ | ||
import _extends from "@babel/runtime/helpers/extends"; | ||
import _defineProperty from "@babel/runtime/helpers/defineProperty"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose"; | ||
var _excluded = ["id", "children", "className", "style", "m", "p", "mt", "ml", "mb", "mr", "mx", "my", "pt", "pl", "pb", "pr", "px", "py", "noSpace", "inline", "width", "height", "verticalAlign", "textAlign", "flex", "flexDirection", "flexWrap", "justifyContent", "alignItems", "alignContent"]; | ||
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; } | ||
@@ -82,3 +85,4 @@ 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; } | ||
_props$alignContent = props.alignContent, | ||
alignContent = _props$alignContent === void 0 ? "" : _props$alignContent; | ||
alignContent = _props$alignContent === void 0 ? "" : _props$alignContent, | ||
rest = _objectWithoutPropertiesLoose(props, _excluded); | ||
var prefixCls = getPrefixCls("box"); | ||
@@ -93,3 +97,3 @@ var classes = classNames(prefixCls, (_classNames = {}, _classNames[prefixCls + "-no-space"] = noSpace, _classNames[prefixCls + "-inline"] = inline, _classNames[prefixCls + "-m-" + m] = validateSpacingNumber(m), _classNames[prefixCls + "-mt-" + mt] = validateSpacingNumber(mt), _classNames[prefixCls + "-ml-" + ml] = validateSpacingNumber(ml), _classNames[prefixCls + "-mb-" + mb] = validateSpacingNumber(mb), _classNames[prefixCls + "-mr-" + mr] = validateSpacingNumber(mr), _classNames[prefixCls + "-mx-" + mx] = validateSpacingNumber(mx), _classNames[prefixCls + "-my-" + my] = validateSpacingNumber(my), _classNames[prefixCls + "-p-" + p] = validateSpacingNumber(p), _classNames[prefixCls + "-pt-" + pt] = validateSpacingNumber(pt), _classNames[prefixCls + "-pl-" + pl] = validateSpacingNumber(pl), _classNames[prefixCls + "-pb-" + pb] = validateSpacingNumber(pb), _classNames[prefixCls + "-pr-" + pr] = validateSpacingNumber(pr), _classNames[prefixCls + "-px-" + px] = validateSpacingNumber(px), _classNames[prefixCls + "-py-" + py] = validateSpacingNumber(py), _classNames[prefixCls + "-flex"] = flex, _classNames[prefixCls + "-flex-" + flexDirection] = isValidBoxProps(flexDirection, BoxPropsKeys.flexDirection), _classNames[prefixCls + "-vertical-align-" + verticalAlign] = isValidBoxProps(verticalAlign, BoxPropsKeys.verticalAlign), _classNames[prefixCls + "-text-align-" + textAlign] = isValidBoxProps(textAlign, BoxPropsKeys.textAlign), _classNames[prefixCls + "-flex-wrap"] = flexWrap === true, _classNames[prefixCls + "-flex-nowrap"] = flexWrap === false, _classNames[prefixCls + "-justify-" + justifyContent] = isValidBoxProps(justifyContent, BoxPropsKeys.justifyContent), _classNames[prefixCls + "-align-items-" + alignItems] = isValidBoxProps(alignItems, BoxPropsKeys.alignItems), _classNames[prefixCls + "-align-content-" + alignContent] = isValidBoxProps(alignContent, BoxPropsKeys.alignContent), _classNames), className); | ||
} | ||
return /*#__PURE__*/React.createElement("div", { | ||
return /*#__PURE__*/React.createElement("div", _extends({}, rest, { | ||
ref: ref, | ||
@@ -99,4 +103,4 @@ id: id, | ||
className: classes | ||
}, children); | ||
}), children); | ||
}); | ||
export default Box; |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose"; | ||
var _excluded = ["className", "children", "style", "size"]; | ||
import React from "react"; | ||
@@ -9,10 +12,11 @@ import classNames from "clsx"; | ||
style = props.style, | ||
size = props.size; | ||
size = props.size, | ||
rest = _objectWithoutPropertiesLoose(props, _excluded); | ||
var prefixCls = getPrefixCls("text-header"); | ||
var cls = classNames(prefixCls, (_classNames = {}, _classNames[prefixCls + "-" + size] = size, _classNames), className); | ||
return /*#__PURE__*/React.createElement("span", { | ||
return /*#__PURE__*/React.createElement("span", _extends({}, rest, { | ||
className: cls, | ||
style: style | ||
}, children); | ||
}), children); | ||
}; | ||
export default HeaderText; |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose"; | ||
var _excluded = ["className", "children", "style", "bold", "size"]; | ||
import React from "react"; | ||
@@ -10,10 +13,11 @@ import classNames from "clsx"; | ||
bold = props.bold, | ||
size = props.size; | ||
size = props.size, | ||
rest = _objectWithoutPropertiesLoose(props, _excluded); | ||
var prefixCls = getPrefixCls("text"); | ||
var cls = classNames(prefixCls, (_classNames = {}, _classNames[prefixCls + "-bold"] = bold, _classNames[prefixCls + "-" + size] = size, _classNames), className); | ||
return /*#__PURE__*/React.createElement("span", { | ||
return /*#__PURE__*/React.createElement("span", _extends({}, rest, { | ||
className: cls, | ||
style: style | ||
}, children); | ||
}), children); | ||
}; | ||
export default Text; |
@@ -0,1 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose"; | ||
var _excluded = ["className", "children", "style", "size"]; | ||
import React from "react"; | ||
@@ -9,10 +12,11 @@ import classNames from "clsx"; | ||
style = props.style, | ||
size = props.size; | ||
size = props.size, | ||
rest = _objectWithoutPropertiesLoose(props, _excluded); | ||
var prefixCls = getPrefixCls("text-title"); | ||
var cls = classNames(prefixCls, (_classNames = {}, _classNames[prefixCls + "-" + size] = size, _classNames), className); | ||
return /*#__PURE__*/React.createElement("span", { | ||
return /*#__PURE__*/React.createElement("span", _extends({}, rest, { | ||
className: cls, | ||
style: style | ||
}, children); | ||
}), children); | ||
}; | ||
export default Title; |
/** | ||
* Zaui 1.6.0-rc.1 | ||
* Zaui 1.6.0-rc.2 | ||
* Zalo Mini App framework | ||
@@ -4,0 +4,0 @@ * undefined |
{ | ||
"name": "zmp-ui", | ||
"version": "1.6.0-rc.1", | ||
"version": "1.6.0-rc.2", | ||
"description": "Zalo Mini App framework ", | ||
@@ -5,0 +5,0 @@ "main": "esm/index.js", |
@@ -60,3 +60,4 @@ import React from "react"; | ||
*/ | ||
export interface BodyTextProps { | ||
export interface BodyTextProps | ||
extends Omit<React.HTMLProps<HTMLSpanElement>, "size"> { | ||
/** | ||
@@ -79,3 +80,4 @@ * Text size | ||
*/ | ||
export interface TitleTextProps { | ||
export interface TitleTextProps | ||
extends Omit<React.HTMLProps<HTMLSpanElement>, "size"> { | ||
/** | ||
@@ -96,3 +98,4 @@ * Text size | ||
*/ | ||
export interface HeaderTextProps { | ||
export interface HeaderTextProps | ||
extends Omit<React.HTMLProps<HTMLSpanElement>, "size"> { | ||
/** | ||
@@ -99,0 +102,0 @@ * Text size |
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
1202420
24032