@arcblock/ux 2.1.3 → 2.1.4

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.
@@ -94,7 +94,7 @@ Header.defaultProps = {
94
94
  const Root = _styledComponents.default.div.withConfig({
95
95
  displayName: "header__Root",
96
96
  componentId: "sc-15qnwg1-0"
97
- })(["position:relative;z-index:", ";font-size:14px;background:", ";.header-container{display:flex;align-items:center;height:64px;padding:8px 0;}.header-logo{display:inline-flex;justify-content:center;position:relative;height:40px;margin-right:16px;img,svg{width:auto;height:100%;}> a{height:100%;line-height:1;}> a::before{position:absolute;top:0;right:0;bottom:0;left:0;background-color:transparent;content:'';}}.header-brand{display:flex;flex-direction:column;flex-shrink:0;margin-right:16px;.header-brand-title{display:flex;align-items:center;h2{font-size:16px;}.header-brand-addon{margin-left:8px;}}.header-brand-desc{color:#9397a1;}}.header-addons{display:flex;align-items:center;}", "{.header-brand{margin-right:12px;.header-brand-title{h2{font-size:14px;}}}}", "{.header-container{height:56px;}.header-menu{display:inline-block;}.header-logo{height:32px;}.header-brand{display:none;}}"], props => props.$theme.zIndex.drawer + 1, props => props.$theme.palette.common.white, props => props.$theme.breakpoints.down('lg'), props => props.$theme.breakpoints.down('md'));
97
+ })(["position:relative;z-index:", ";font-size:14px;background:", ";.header-container{display:flex;align-items:center;height:64px;padding:0 16px;", "{padding:0;}}.header-logo{display:inline-flex;justify-content:center;position:relative;height:40px;margin-right:16px;img,svg{width:auto;height:100%;}> a{height:100%;line-height:1;}> a::before{position:absolute;top:0;right:0;bottom:0;left:0;background-color:transparent;content:'';}}.header-brand{display:flex;flex-direction:column;flex-shrink:0;margin-right:16px;.header-brand-title{display:flex;align-items:center;h2{font-size:16px;}.header-brand-addon{margin-left:8px;}}.header-brand-desc{color:#9397a1;}}.header-addons{display:flex;align-items:center;}", "{.header-brand{margin-right:12px;.header-brand-title{h2{font-size:14px;}}}}", "{.header-container{height:56px;}.header-menu{display:inline-block;}.header-logo{height:32px;}.header-brand{display:none;}}"], props => props.$theme.zIndex.drawer + 1, props => props.$theme.palette.common.white, props => props.$theme.breakpoints.up('lg'), props => props.$theme.breakpoints.down('lg'), props => props.$theme.breakpoints.down('md'));
98
98
 
99
99
  var _default = Header;
100
100
  exports.default = _default;
@@ -74,7 +74,7 @@ function NavMenu(_ref) {
74
74
  children = filterItems(children);
75
75
 
76
76
  if (!(items !== null && items !== void 0 && items.length) && !((_children = children) !== null && _children !== void 0 && _children.length)) {
77
- return new Error("One of 'items' or 'children' is required by NavMenu component.");
77
+ throw new Error("One of 'items' or 'children' is required by NavMenu component.");
78
78
  }
79
79
 
80
80
  const [state, setState] = (0, _react.useState)({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcblock/ux",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
4
4
  "description": "Common used react components for arcblock products",
5
5
  "keywords": [
6
6
  "react",
@@ -52,10 +52,10 @@
52
52
  "react": ">=18.1.0",
53
53
  "react-ga": "^2.7.0"
54
54
  },
55
- "gitHead": "b0ec8ebbd525abe7035465e2c75dc042e6637ba6",
55
+ "gitHead": "5a92264deb34d879813be444bc26fa3f0cef0672",
56
56
  "dependencies": {
57
- "@arcblock/icons": "^2.1.3",
58
- "@arcblock/react-hooks": "^2.1.3",
57
+ "@arcblock/icons": "^2.1.4",
58
+ "@arcblock/react-hooks": "^2.1.4",
59
59
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
60
60
  "@emotion/react": "^11.9.0",
61
61
  "@emotion/styled": "^11.8.1",
@@ -78,7 +78,11 @@ const Root = styled.div`
78
78
  display: flex;
79
79
  align-items: center;
80
80
  height: 64px;
81
- padding: 8px 0;
81
+ /* mui container 左右 padding 控制, 宽屏下不需要 padding (与 content 对齐), 窄屏下设置 16px padding */
82
+ padding: 0 16px;
83
+ ${props => props.$theme.breakpoints.up('lg')} {
84
+ padding: 0;
85
+ }
82
86
  }
83
87
  .header-logo {
84
88
  display: inline-flex;
@@ -38,7 +38,7 @@ function NavMenu({
38
38
  // eslint-disable-next-line no-param-reassign
39
39
  children = filterItems(children);
40
40
  if (!items?.length && !children?.length) {
41
- return new Error("One of 'items' or 'children' is required by NavMenu component.");
41
+ throw new Error("One of 'items' or 'children' is required by NavMenu component.");
42
42
  }
43
43
  const [state, setState] = useState({ activeId: defaultActiveId, openedIds: [] });
44
44
  const contextValue = useMemo(() => {