@blocklet/list 0.8.27 → 0.8.30

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.
@@ -122,10 +122,10 @@ function BlockletList(_ref) {
122
122
  });
123
123
  }
124
124
 
125
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Grid.default, _objectSpread(_objectSpread({
125
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledGrid, _objectSpread(_objectSpread({
126
126
  container: true
127
127
  }, rest), {}, {
128
- children: blocklets.map(blocklet => /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledGrid, {
128
+ children: blocklets.map(blocklet => /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledGridItem, {
129
129
  item: true,
130
130
  lg: 4,
131
131
  md: 6,
@@ -147,8 +147,12 @@ BlockletList.defaultProps = {};
147
147
  const StyledGrid = (0, _styledComponents.default)(_Grid.default).withConfig({
148
148
  displayName: "list__StyledGrid",
149
149
  componentId: "sc-jzgpev-0"
150
- })(["@media (max-width:", "px){&.MuiGrid-item{padding-bottom:0px;margin-left:", ";padding-right:", ";}}@media (min-width:", "px){&.MuiGrid-item{margin-bottom:", ";}}"], props => props.theme.breakpoints.values.sm, props => props.theme.spacing(-2), props => props.theme.spacing(0.5), props => props.theme.breakpoints.values.sm, props => props.theme.spacing(2));
150
+ })(["&.MuiGrid-root{width:auto;margin:0 -16px;}"]);
151
+ const StyledGridItem = (0, _styledComponents.default)(_Grid.default).withConfig({
152
+ displayName: "list__StyledGridItem",
153
+ componentId: "sc-jzgpev-1"
154
+ })(["@media (max-width:", "px){&.MuiGrid-item{padding-bottom:0px;}}@media (min-width:", "px){&.MuiGrid-item{margin-bottom:", ";}}"], props => props.theme.breakpoints.values.sm, props => props.theme.breakpoints.values.sm, props => props.theme.spacing(2));
151
155
  const CustomEmpty = (0, _styledComponents.default)(_Empty.default).withConfig({
152
156
  displayName: "list__CustomEmpty",
153
- componentId: "sc-jzgpev-1"
157
+ componentId: "sc-jzgpev-2"
154
158
  })(["text-align:center;.primary{color:", ";}.tips{margin-top:", ";}"], props => props.theme.palette.primary.main, props => props.theme.spacing(1));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/list",
3
- "version": "0.8.27",
3
+ "version": "0.8.30",
4
4
  "description": "Common ux components of blocklet",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -38,7 +38,7 @@
38
38
  "react": ">=18.1.0"
39
39
  },
40
40
  "dependencies": {
41
- "@arcblock/ux": "^2.1.10",
41
+ "@arcblock/ux": "^2.1.15",
42
42
  "@emotion/react": "^11.9.0",
43
43
  "@emotion/styled": "^11.8.1",
44
44
  "@mui/icons-material": "^5.6.2",
@@ -62,5 +62,5 @@
62
62
  "eslint": "^8.16.0",
63
63
  "prettier": "^2.6.2"
64
64
  },
65
- "gitHead": "af6bdbc88dd0cd533d63dbe00dbc26e0d04d0ff6"
65
+ "gitHead": "b19c3408da3da4b86ad617086e0ae2deb831508c"
66
66
  }
@@ -80,13 +80,13 @@ export default function BlockletList({ blocklets, ...rest }) {
80
80
  }
81
81
 
82
82
  return (
83
- <Grid container {...rest}>
83
+ <StyledGrid container {...rest}>
84
84
  {blocklets.map((blocklet) => (
85
- <StyledGrid item lg={4} md={6} sm={6} xs={12} key={blocklet.did} data-blocklet-did={blocklet.did}>
85
+ <StyledGridItem item lg={4} md={6} sm={6} xs={12} key={blocklet.did} data-blocklet-did={blocklet.did}>
86
86
  {blockletRender({ blocklet, blocklets: blockletList })}
87
- </StyledGrid>
87
+ </StyledGridItem>
88
88
  ))}
89
- </Grid>
89
+ </StyledGrid>
90
90
  );
91
91
  }
92
92
 
@@ -97,11 +97,16 @@ BlockletList.propTypes = {
97
97
  BlockletList.defaultProps = {};
98
98
 
99
99
  const StyledGrid = styled(Grid)`
100
+ &.MuiGrid-root {
101
+ width: auto;
102
+ margin: 0 -16px;
103
+ }
104
+ `;
105
+
106
+ const StyledGridItem = styled(Grid)`
100
107
  @media (max-width: ${(props) => props.theme.breakpoints.values.sm}px) {
101
108
  &.MuiGrid-item {
102
109
  padding-bottom: 0px;
103
- margin-left: ${(props) => props.theme.spacing(-2)};
104
- padding-right: ${(props) => props.theme.spacing(0.5)};
105
110
  }
106
111
  }
107
112
  @media (min-width: ${(props) => props.theme.breakpoints.values.sm}px) {