@arcblock/ux 2.12.70 → 2.12.72

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.
@@ -8,7 +8,7 @@ export default function DataTable(props: DataTableProps): import("react").ReactC
8
8
  export function getDurableData(key: any): any;
9
9
  export type DataTableCustomButton = {
10
10
  icon: import("react").ReactElement;
11
- title: string;
11
+ title: import("react").ReactElement | string;
12
12
  onClick?: () => void;
13
13
  };
14
14
  export type DataTableColumn = {
@@ -18,7 +18,7 @@ export type DataTableColumn = {
18
18
  } & import("mui-datatables").MUIDataTableColumnDef;
19
19
  export type DataTableState = Pick<import("mui-datatables").MUIDataTableState, "count" | "page" | "rowsPerPage" | "searchText" | "sortOrder" | "filterList">;
20
20
  export type ModifiedMUIDataTableProps = {
21
- title?: string;
21
+ title?: import("react").ReactElement | string;
22
22
  } & Omit<import("mui-datatables").MUIDataTableProps, "title">;
23
23
  export type DataTableProps = {
24
24
  data: Array<object | number[] | string[]>;
@@ -17,7 +17,7 @@ import { styled } from '../Theme';
17
17
  /**
18
18
  * @typedef {{
19
19
  * icon: import('react').ReactElement,
20
- * title: string,
20
+ * title: import('react').ReactElement | string,
21
21
  * onClick?: () => void
22
22
  * }} DataTableCustomButton
23
23
  */
@@ -36,7 +36,7 @@ import { styled } from '../Theme';
36
36
 
37
37
  /**
38
38
  * @typedef {{
39
- * title?: string, // The title of the table (optional)
39
+ * title?: import('react').ReactElement | string, // The title of the table (optional)
40
40
  * } & Omit<import('mui-datatables').MUIDataTableProps, 'title'>} ModifiedMUIDataTableProps
41
41
  */
42
42
 
package/lib/Img/index.js CHANGED
@@ -7,6 +7,7 @@ import ImageRoundedIcon from '@iconify-icons/material-symbols/image-rounded';
7
7
  import { Icon } from '@iconify/react';
8
8
  import { Box } from '@mui/material';
9
9
  import noop from 'lodash/noop';
10
+ import { mergeSx } from '../Util/style';
10
11
 
11
12
  /**
12
13
  * @typedef {Object} ImgExProps
@@ -122,7 +123,7 @@ function Img({
122
123
  ref: ref,
123
124
  style: outerStyle,
124
125
  ...rest,
125
- sx: {
126
+ sx: mergeSx({
126
127
  [`& .${classes.root}`]: {
127
128
  position: 'relative',
128
129
  overflow: 'hidden',
@@ -153,9 +154,8 @@ function Img({
153
154
  maxWidth: '80%',
154
155
  maxHeight: '80%'
155
156
  }
156
- },
157
- ...rest.sx
158
- },
157
+ }
158
+ }, rest.sx),
159
159
  children: /*#__PURE__*/_jsxs("div", {
160
160
  className: `image ${className} ${classes.root}`,
161
161
  style: mergedStyle,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcblock/ux",
3
- "version": "2.12.70",
3
+ "version": "2.12.72",
4
4
  "description": "Common used react components for arcblock products",
5
5
  "keywords": [
6
6
  "react",
@@ -70,12 +70,12 @@
70
70
  "react": ">=18.2.0",
71
71
  "react-router-dom": ">=6.22.3"
72
72
  },
73
- "gitHead": "89e31e2599d8ab7462307771239849a6edd19d7f",
73
+ "gitHead": "9050a7670edd33bb1edd1014770a00ddcbc2bd03",
74
74
  "dependencies": {
75
75
  "@arcblock/did-motif": "^1.1.13",
76
- "@arcblock/icons": "^2.12.70",
77
- "@arcblock/nft-display": "^2.12.70",
78
- "@arcblock/react-hooks": "^2.12.70",
76
+ "@arcblock/icons": "^2.12.72",
77
+ "@arcblock/nft-display": "^2.12.72",
78
+ "@arcblock/react-hooks": "^2.12.72",
79
79
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
80
80
  "@fontsource/roboto": "^5.2.5",
81
81
  "@fontsource/ubuntu-mono": "^5.0.18",
@@ -16,7 +16,7 @@ import { styled } from '../Theme';
16
16
  /**
17
17
  * @typedef {{
18
18
  * icon: import('react').ReactElement,
19
- * title: string,
19
+ * title: import('react').ReactElement | string,
20
20
  * onClick?: () => void
21
21
  * }} DataTableCustomButton
22
22
  */
@@ -35,7 +35,7 @@ import { styled } from '../Theme';
35
35
 
36
36
  /**
37
37
  * @typedef {{
38
- * title?: string, // The title of the table (optional)
38
+ * title?: import('react').ReactElement | string, // The title of the table (optional)
39
39
  * } & Omit<import('mui-datatables').MUIDataTableProps, 'title'>} ModifiedMUIDataTableProps
40
40
  */
41
41
 
package/src/Img/index.jsx CHANGED
@@ -6,6 +6,7 @@ import ImageRoundedIcon from '@iconify-icons/material-symbols/image-rounded';
6
6
  import { Icon } from '@iconify/react';
7
7
  import { Box } from '@mui/material';
8
8
  import noop from 'lodash/noop';
9
+ import { mergeSx } from '../Util/style';
9
10
 
10
11
  /**
11
12
  * @typedef {Object} ImgExProps
@@ -127,40 +128,42 @@ function Img({
127
128
  ref={ref}
128
129
  style={outerStyle}
129
130
  {...rest}
130
- sx={{
131
- [`& .${classes.root}`]: {
132
- position: 'relative',
133
- overflow: 'hidden',
134
- '& .image--state, & .image--img': {
135
- minWidth: '100%',
136
- minHeight: '100%',
137
- position: 'absolute',
138
- top: 0,
139
- left: '50%',
140
- transform: 'translateX(-50%)',
141
- },
142
- '& .image--state': {
143
- display: 'flex',
144
- flexDirection: 'column',
145
- justifyContent: 'center',
146
- alignItems: 'center',
147
- color: '#999',
148
- background: '#eee',
149
- width: '100%',
150
- height: '100%',
151
- },
152
- '& .image--img': {
153
- opacity: 0,
154
- visibility: 'hidden',
155
- },
156
- '& .image--icon': {
157
- fontSize: 30,
158
- maxWidth: '80%',
159
- maxHeight: '80%',
131
+ sx={mergeSx(
132
+ {
133
+ [`& .${classes.root}`]: {
134
+ position: 'relative',
135
+ overflow: 'hidden',
136
+ '& .image--state, & .image--img': {
137
+ minWidth: '100%',
138
+ minHeight: '100%',
139
+ position: 'absolute',
140
+ top: 0,
141
+ left: '50%',
142
+ transform: 'translateX(-50%)',
143
+ },
144
+ '& .image--state': {
145
+ display: 'flex',
146
+ flexDirection: 'column',
147
+ justifyContent: 'center',
148
+ alignItems: 'center',
149
+ color: '#999',
150
+ background: '#eee',
151
+ width: '100%',
152
+ height: '100%',
153
+ },
154
+ '& .image--img': {
155
+ opacity: 0,
156
+ visibility: 'hidden',
157
+ },
158
+ '& .image--icon': {
159
+ fontSize: 30,
160
+ maxWidth: '80%',
161
+ maxHeight: '80%',
162
+ },
160
163
  },
161
164
  },
162
- ...rest.sx,
163
- }}>
165
+ rest.sx
166
+ )}>
164
167
  <div className={`image ${className} ${classes.root}`} style={mergedStyle}>
165
168
  {!fallback && imgState === 'error' && (
166
169
  <div className="image--state" title="loading image">