@majoo-ui/react 1.54.10 → 1.54.12
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.
- package/components/modalDialog/ModalDialog.d.ts +2 -0
- package/components/table/MobileTable.d.ts +1 -0
- package/index.esm.css +1 -0
- package/index.esm.js +37 -15
- package/index.umd.css +1 -0
- package/index.umd.js +39 -13
- package/package.json +1 -1
|
@@ -398,6 +398,8 @@ interface ModalDialogProps extends IDialog, DialogContentProps {
|
|
|
398
398
|
width?: string | number;
|
|
399
399
|
/** Set default behavior when opening dialog with form. Usually used with prevent default*/
|
|
400
400
|
onOpenAutoFocus?: FocusScopeProps['onMountAutoFocus'];
|
|
401
|
+
/** Event handler called when a pointer event occurs outside the bounds of the component. It can be prevented by calling event.preventDefault.*/
|
|
402
|
+
onPointerDownOutside?: (e: any) => void;
|
|
401
403
|
/**
|
|
402
404
|
* If true, the close icon button is hidden
|
|
403
405
|
*/
|
|
@@ -18,6 +18,7 @@ interface MobileTableProps {
|
|
|
18
18
|
hiddenColumns?: string[];
|
|
19
19
|
css?: CSS;
|
|
20
20
|
customRowsStyle?: (e: any) => CustomRowsStyle[];
|
|
21
|
+
cellAlign?: 'top' | 'center' | 'bottom';
|
|
21
22
|
}
|
|
22
23
|
declare const MobileTable: React.ForwardRefExoticComponent<MobileTableProps & React.RefAttributes<HTMLDivElement>>;
|
|
23
24
|
export default MobileTable;
|
package/index.esm.css
CHANGED
package/index.esm.js
CHANGED
|
@@ -4098,11 +4098,10 @@ const CardComponent = styled('div', {
|
|
|
4098
4098
|
borderRadius: '$lg',
|
|
4099
4099
|
position: 'relative',
|
|
4100
4100
|
backgroundColor: '$white',
|
|
4101
|
-
border: '1px solid $bgBorder',
|
|
4102
4101
|
variants: {
|
|
4103
4102
|
shadow: {
|
|
4104
4103
|
true: {
|
|
4105
|
-
boxShadow: '0px 2px
|
|
4104
|
+
boxShadow: '0px 0px 11px rgba(0, 0, 0, 0.08), 0px 2px 2px rgba(0, 0, 0, 0.03)'
|
|
4106
4105
|
}
|
|
4107
4106
|
}
|
|
4108
4107
|
}
|
|
@@ -4242,7 +4241,7 @@ const Card = _ref => {
|
|
|
4242
4241
|
__self: undefined,
|
|
4243
4242
|
__source: {
|
|
4244
4243
|
fileName: _jsxFileName$V,
|
|
4245
|
-
lineNumber:
|
|
4244
|
+
lineNumber: 102,
|
|
4246
4245
|
columnNumber: 5
|
|
4247
4246
|
}
|
|
4248
4247
|
}, showBottomLine && /*#__PURE__*/React__default.createElement(CardLineColor, {
|
|
@@ -4250,14 +4249,14 @@ const Card = _ref => {
|
|
|
4250
4249
|
__self: undefined,
|
|
4251
4250
|
__source: {
|
|
4252
4251
|
fileName: _jsxFileName$V,
|
|
4253
|
-
lineNumber:
|
|
4252
|
+
lineNumber: 113,
|
|
4254
4253
|
columnNumber: 26
|
|
4255
4254
|
}
|
|
4256
4255
|
}), title !== '' ? icon !== undefined ? /*#__PURE__*/React__default.createElement(StyledTitle$2, {
|
|
4257
4256
|
__self: undefined,
|
|
4258
4257
|
__source: {
|
|
4259
4258
|
fileName: _jsxFileName$V,
|
|
4260
|
-
lineNumber:
|
|
4259
|
+
lineNumber: 116,
|
|
4261
4260
|
columnNumber: 11
|
|
4262
4261
|
}
|
|
4263
4262
|
}, /*#__PURE__*/React__default.createElement(StyledIcon$1, {
|
|
@@ -4266,14 +4265,14 @@ const Card = _ref => {
|
|
|
4266
4265
|
__self: undefined,
|
|
4267
4266
|
__source: {
|
|
4268
4267
|
fileName: _jsxFileName$V,
|
|
4269
|
-
lineNumber:
|
|
4268
|
+
lineNumber: 117,
|
|
4270
4269
|
columnNumber: 13
|
|
4271
4270
|
}
|
|
4272
4271
|
}, icon), title) : /*#__PURE__*/React__default.createElement(StyledTitle$2, {
|
|
4273
4272
|
__self: undefined,
|
|
4274
4273
|
__source: {
|
|
4275
4274
|
fileName: _jsxFileName$V,
|
|
4276
|
-
lineNumber:
|
|
4275
|
+
lineNumber: 123,
|
|
4277
4276
|
columnNumber: 11
|
|
4278
4277
|
}
|
|
4279
4278
|
}, title) : null, children);
|
|
@@ -4293,7 +4292,7 @@ Card.propTypes = {
|
|
|
4293
4292
|
Card.defaultProps = {
|
|
4294
4293
|
className: '',
|
|
4295
4294
|
color: 'green',
|
|
4296
|
-
shadow:
|
|
4295
|
+
shadow: true,
|
|
4297
4296
|
radius: '$lg',
|
|
4298
4297
|
padding: '12px',
|
|
4299
4298
|
title: '',
|
|
@@ -14045,9 +14044,10 @@ const ModalDialog = props => {
|
|
|
14045
14044
|
isMobile,
|
|
14046
14045
|
width,
|
|
14047
14046
|
onOpenAutoFocus,
|
|
14048
|
-
disabledCloseButton
|
|
14047
|
+
disabledCloseButton,
|
|
14048
|
+
onPointerDownOutside
|
|
14049
14049
|
} = props,
|
|
14050
|
-
rest = __rest(props, ["children", "size", "css", "layer", "isMobile", "width", "onOpenAutoFocus", "disabledCloseButton"]);
|
|
14050
|
+
rest = __rest(props, ["children", "size", "css", "layer", "isMobile", "width", "onOpenAutoFocus", "disabledCloseButton", "onPointerDownOutside"]);
|
|
14051
14051
|
|
|
14052
14052
|
const childArray = React__default.Children.toArray(children);
|
|
14053
14053
|
const modalDialogFooter = findNodeChild$1(childArray, 'ModalDialogFooter');
|
|
@@ -14086,7 +14086,8 @@ const ModalDialog = props => {
|
|
|
14086
14086
|
} else {
|
|
14087
14087
|
onOpenAutoFocus(e);
|
|
14088
14088
|
}
|
|
14089
|
-
}
|
|
14089
|
+
},
|
|
14090
|
+
onPointerDownOutside: e => onPointerDownOutside === null || onPointerDownOutside === void 0 ? void 0 : onPointerDownOutside(e)
|
|
14090
14091
|
}, {
|
|
14091
14092
|
children: jsxs(Box, Object.assign({
|
|
14092
14093
|
css: {
|
|
@@ -17993,7 +17994,8 @@ const MobileTable = /*#__PURE__*/React__default.forwardRef(({
|
|
|
17993
17994
|
rowGroup,
|
|
17994
17995
|
hiddenColumns,
|
|
17995
17996
|
css,
|
|
17996
|
-
customRowsStyle
|
|
17997
|
+
customRowsStyle,
|
|
17998
|
+
cellAlign
|
|
17997
17999
|
}, ref) => {
|
|
17998
18000
|
const {
|
|
17999
18001
|
getTableProps,
|
|
@@ -18008,6 +18010,20 @@ const MobileTable = /*#__PURE__*/React__default.forwardRef(({
|
|
|
18008
18010
|
sortBy
|
|
18009
18011
|
}
|
|
18010
18012
|
} = instance;
|
|
18013
|
+
|
|
18014
|
+
const getAlign = align => {
|
|
18015
|
+
switch (align) {
|
|
18016
|
+
case 'top':
|
|
18017
|
+
return 'start';
|
|
18018
|
+
|
|
18019
|
+
case 'bottom':
|
|
18020
|
+
return 'end';
|
|
18021
|
+
|
|
18022
|
+
default:
|
|
18023
|
+
return 'center';
|
|
18024
|
+
}
|
|
18025
|
+
};
|
|
18026
|
+
|
|
18011
18027
|
return jsx(TableContainer$4, Object.assign({
|
|
18012
18028
|
css: css,
|
|
18013
18029
|
ref: ref
|
|
@@ -18095,10 +18111,14 @@ const MobileTable = /*#__PURE__*/React__default.forwardRef(({
|
|
|
18095
18111
|
css: {
|
|
18096
18112
|
backgroundColor: colors$4.bgGray,
|
|
18097
18113
|
padding: `$spacing-03 $spacing-05 ${'selection' in row.values ? '$spacing-03 $spacing-07' : ''}`,
|
|
18098
|
-
borderBottom: '1pt solid $bgBorder'
|
|
18114
|
+
borderBottom: '1pt solid $bgBorder',
|
|
18115
|
+
alignItems: cell.column.accessor ? getAlign(cellAlign) : 'center'
|
|
18099
18116
|
}
|
|
18100
18117
|
}, {
|
|
18101
18118
|
children: [jsx(Heading, Object.assign({
|
|
18119
|
+
css: {
|
|
18120
|
+
padding: '3px 0px'
|
|
18121
|
+
},
|
|
18102
18122
|
heading: "headerTable",
|
|
18103
18123
|
color: "secondary"
|
|
18104
18124
|
}, {
|
|
@@ -18862,7 +18882,8 @@ function Table({
|
|
|
18862
18882
|
rowGroup: rowGroup,
|
|
18863
18883
|
hiddenColumns: hiddenColumns,
|
|
18864
18884
|
css: css,
|
|
18865
|
-
customRowsStyle: customRowsStyle
|
|
18885
|
+
customRowsStyle: customRowsStyle,
|
|
18886
|
+
cellAlign: cellAlign
|
|
18866
18887
|
}, void 0)]
|
|
18867
18888
|
}), void 0);
|
|
18868
18889
|
} //Dummy component for mdx docs purpose only
|
|
@@ -30335,7 +30356,8 @@ function InputMapPicker(props) {
|
|
|
30335
30356
|
}), void 0)]
|
|
30336
30357
|
}), void 0), jsxs(ModalDialog, Object.assign({
|
|
30337
30358
|
width: isDesktop ? 565 : '100%',
|
|
30338
|
-
layer: "$modal"
|
|
30359
|
+
layer: "$modal",
|
|
30360
|
+
onPointerDownOutside: e => e.preventDefault()
|
|
30339
30361
|
}, {
|
|
30340
30362
|
children: [jsx(ModalDialogTrigger, Object.assign({
|
|
30341
30363
|
asChild: true
|
package/index.umd.css
CHANGED
package/index.umd.js
CHANGED
|
@@ -4178,11 +4178,10 @@
|
|
|
4178
4178
|
borderRadius: '$lg',
|
|
4179
4179
|
position: 'relative',
|
|
4180
4180
|
backgroundColor: '$white',
|
|
4181
|
-
border: '1px solid $bgBorder',
|
|
4182
4181
|
variants: {
|
|
4183
4182
|
shadow: {
|
|
4184
4183
|
true: {
|
|
4185
|
-
boxShadow: '0px 2px
|
|
4184
|
+
boxShadow: '0px 0px 11px rgba(0, 0, 0, 0.08), 0px 2px 2px rgba(0, 0, 0, 0.03)'
|
|
4186
4185
|
}
|
|
4187
4186
|
}
|
|
4188
4187
|
}
|
|
@@ -4322,7 +4321,7 @@
|
|
|
4322
4321
|
__self: undefined,
|
|
4323
4322
|
__source: {
|
|
4324
4323
|
fileName: _jsxFileName$V,
|
|
4325
|
-
lineNumber:
|
|
4324
|
+
lineNumber: 102,
|
|
4326
4325
|
columnNumber: 5
|
|
4327
4326
|
}
|
|
4328
4327
|
}, showBottomLine && /*#__PURE__*/React__default["default"].createElement(CardLineColor, {
|
|
@@ -4330,14 +4329,14 @@
|
|
|
4330
4329
|
__self: undefined,
|
|
4331
4330
|
__source: {
|
|
4332
4331
|
fileName: _jsxFileName$V,
|
|
4333
|
-
lineNumber:
|
|
4332
|
+
lineNumber: 113,
|
|
4334
4333
|
columnNumber: 26
|
|
4335
4334
|
}
|
|
4336
4335
|
}), title !== '' ? icon !== undefined ? /*#__PURE__*/React__default["default"].createElement(StyledTitle$2, {
|
|
4337
4336
|
__self: undefined,
|
|
4338
4337
|
__source: {
|
|
4339
4338
|
fileName: _jsxFileName$V,
|
|
4340
|
-
lineNumber:
|
|
4339
|
+
lineNumber: 116,
|
|
4341
4340
|
columnNumber: 11
|
|
4342
4341
|
}
|
|
4343
4342
|
}, /*#__PURE__*/React__default["default"].createElement(StyledIcon$1, {
|
|
@@ -4346,14 +4345,14 @@
|
|
|
4346
4345
|
__self: undefined,
|
|
4347
4346
|
__source: {
|
|
4348
4347
|
fileName: _jsxFileName$V,
|
|
4349
|
-
lineNumber:
|
|
4348
|
+
lineNumber: 117,
|
|
4350
4349
|
columnNumber: 13
|
|
4351
4350
|
}
|
|
4352
4351
|
}, icon), title) : /*#__PURE__*/React__default["default"].createElement(StyledTitle$2, {
|
|
4353
4352
|
__self: undefined,
|
|
4354
4353
|
__source: {
|
|
4355
4354
|
fileName: _jsxFileName$V,
|
|
4356
|
-
lineNumber:
|
|
4355
|
+
lineNumber: 123,
|
|
4357
4356
|
columnNumber: 11
|
|
4358
4357
|
}
|
|
4359
4358
|
}, title) : null, children);
|
|
@@ -4373,7 +4372,7 @@
|
|
|
4373
4372
|
Card.defaultProps = {
|
|
4374
4373
|
className: '',
|
|
4375
4374
|
color: 'green',
|
|
4376
|
-
shadow:
|
|
4375
|
+
shadow: true,
|
|
4377
4376
|
radius: '$lg',
|
|
4378
4377
|
padding: '12px',
|
|
4379
4378
|
title: '',
|
|
@@ -14217,7 +14216,8 @@
|
|
|
14217
14216
|
width = props.width,
|
|
14218
14217
|
onOpenAutoFocus = props.onOpenAutoFocus,
|
|
14219
14218
|
disabledCloseButton = props.disabledCloseButton,
|
|
14220
|
-
|
|
14219
|
+
onPointerDownOutside = props.onPointerDownOutside,
|
|
14220
|
+
rest = __rest(props, ["children", "size", "css", "layer", "isMobile", "width", "onOpenAutoFocus", "disabledCloseButton", "onPointerDownOutside"]);
|
|
14221
14221
|
|
|
14222
14222
|
var childArray = React__default["default"].Children.toArray(children);
|
|
14223
14223
|
var modalDialogFooter = findNodeChild$1(childArray, 'ModalDialogFooter');
|
|
@@ -14256,6 +14256,9 @@
|
|
|
14256
14256
|
} else {
|
|
14257
14257
|
onOpenAutoFocus(e);
|
|
14258
14258
|
}
|
|
14259
|
+
},
|
|
14260
|
+
onPointerDownOutside: function (e) {
|
|
14261
|
+
return onPointerDownOutside === null || onPointerDownOutside === void 0 ? void 0 : onPointerDownOutside(e);
|
|
14259
14262
|
}
|
|
14260
14263
|
}, {
|
|
14261
14264
|
children: jsxRuntime.jsxs(Box, __assign({
|
|
@@ -18280,7 +18283,8 @@
|
|
|
18280
18283
|
rowGroup = _a.rowGroup;
|
|
18281
18284
|
_a.hiddenColumns;
|
|
18282
18285
|
var css = _a.css,
|
|
18283
|
-
customRowsStyle = _a.customRowsStyle
|
|
18286
|
+
customRowsStyle = _a.customRowsStyle,
|
|
18287
|
+
cellAlign = _a.cellAlign;
|
|
18284
18288
|
var getTableProps = instance.getTableProps,
|
|
18285
18289
|
getTableBodyProps = instance.getTableBodyProps,
|
|
18286
18290
|
headerGroups = instance.headerGroups,
|
|
@@ -18290,6 +18294,20 @@
|
|
|
18290
18294
|
state = instance.state,
|
|
18291
18295
|
toggleAllRowsExpanded = instance.toggleAllRowsExpanded,
|
|
18292
18296
|
sortBy = instance.state.sortBy;
|
|
18297
|
+
|
|
18298
|
+
var getAlign = function getAlign(align) {
|
|
18299
|
+
switch (align) {
|
|
18300
|
+
case 'top':
|
|
18301
|
+
return 'start';
|
|
18302
|
+
|
|
18303
|
+
case 'bottom':
|
|
18304
|
+
return 'end';
|
|
18305
|
+
|
|
18306
|
+
default:
|
|
18307
|
+
return 'center';
|
|
18308
|
+
}
|
|
18309
|
+
};
|
|
18310
|
+
|
|
18293
18311
|
return jsxRuntime.jsx(TableContainer$4, __assign({
|
|
18294
18312
|
css: css,
|
|
18295
18313
|
ref: ref
|
|
@@ -18387,10 +18405,14 @@
|
|
|
18387
18405
|
css: {
|
|
18388
18406
|
backgroundColor: colors$4.bgGray,
|
|
18389
18407
|
padding: "$spacing-03 $spacing-05 ".concat('selection' in row.values ? '$spacing-03 $spacing-07' : ''),
|
|
18390
|
-
borderBottom: '1pt solid $bgBorder'
|
|
18408
|
+
borderBottom: '1pt solid $bgBorder',
|
|
18409
|
+
alignItems: cell.column.accessor ? getAlign(cellAlign) : 'center'
|
|
18391
18410
|
}
|
|
18392
18411
|
}, {
|
|
18393
18412
|
children: [jsxRuntime.jsx(Heading, __assign({
|
|
18413
|
+
css: {
|
|
18414
|
+
padding: '3px 0px'
|
|
18415
|
+
},
|
|
18394
18416
|
heading: "headerTable",
|
|
18395
18417
|
color: "secondary"
|
|
18396
18418
|
}, {
|
|
@@ -19215,7 +19237,8 @@
|
|
|
19215
19237
|
rowGroup: rowGroup,
|
|
19216
19238
|
hiddenColumns: hiddenColumns,
|
|
19217
19239
|
css: css,
|
|
19218
|
-
customRowsStyle: customRowsStyle
|
|
19240
|
+
customRowsStyle: customRowsStyle,
|
|
19241
|
+
cellAlign: cellAlign
|
|
19219
19242
|
}, void 0)]
|
|
19220
19243
|
}), void 0);
|
|
19221
19244
|
} //Dummy component for mdx docs purpose only
|
|
@@ -30777,7 +30800,10 @@
|
|
|
30777
30800
|
}), void 0)]
|
|
30778
30801
|
}), void 0), jsxRuntime.jsxs(ModalDialog, __assign({
|
|
30779
30802
|
width: isDesktop ? 565 : '100%',
|
|
30780
|
-
layer: "$modal"
|
|
30803
|
+
layer: "$modal",
|
|
30804
|
+
onPointerDownOutside: function (e) {
|
|
30805
|
+
return e.preventDefault();
|
|
30806
|
+
}
|
|
30781
30807
|
}, {
|
|
30782
30808
|
children: [jsxRuntime.jsx(ModalDialogTrigger, __assign({
|
|
30783
30809
|
asChild: true
|