@majoo-ui/react 1.54.11 → 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 +30 -7
- package/index.umd.css +1 -0
- package/index.umd.js +32 -5
- 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
|
@@ -14044,9 +14044,10 @@ const ModalDialog = props => {
|
|
|
14044
14044
|
isMobile,
|
|
14045
14045
|
width,
|
|
14046
14046
|
onOpenAutoFocus,
|
|
14047
|
-
disabledCloseButton
|
|
14047
|
+
disabledCloseButton,
|
|
14048
|
+
onPointerDownOutside
|
|
14048
14049
|
} = props,
|
|
14049
|
-
rest = __rest(props, ["children", "size", "css", "layer", "isMobile", "width", "onOpenAutoFocus", "disabledCloseButton"]);
|
|
14050
|
+
rest = __rest(props, ["children", "size", "css", "layer", "isMobile", "width", "onOpenAutoFocus", "disabledCloseButton", "onPointerDownOutside"]);
|
|
14050
14051
|
|
|
14051
14052
|
const childArray = React__default.Children.toArray(children);
|
|
14052
14053
|
const modalDialogFooter = findNodeChild$1(childArray, 'ModalDialogFooter');
|
|
@@ -14085,7 +14086,8 @@ const ModalDialog = props => {
|
|
|
14085
14086
|
} else {
|
|
14086
14087
|
onOpenAutoFocus(e);
|
|
14087
14088
|
}
|
|
14088
|
-
}
|
|
14089
|
+
},
|
|
14090
|
+
onPointerDownOutside: e => onPointerDownOutside === null || onPointerDownOutside === void 0 ? void 0 : onPointerDownOutside(e)
|
|
14089
14091
|
}, {
|
|
14090
14092
|
children: jsxs(Box, Object.assign({
|
|
14091
14093
|
css: {
|
|
@@ -17992,7 +17994,8 @@ const MobileTable = /*#__PURE__*/React__default.forwardRef(({
|
|
|
17992
17994
|
rowGroup,
|
|
17993
17995
|
hiddenColumns,
|
|
17994
17996
|
css,
|
|
17995
|
-
customRowsStyle
|
|
17997
|
+
customRowsStyle,
|
|
17998
|
+
cellAlign
|
|
17996
17999
|
}, ref) => {
|
|
17997
18000
|
const {
|
|
17998
18001
|
getTableProps,
|
|
@@ -18007,6 +18010,20 @@ const MobileTable = /*#__PURE__*/React__default.forwardRef(({
|
|
|
18007
18010
|
sortBy
|
|
18008
18011
|
}
|
|
18009
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
|
+
|
|
18010
18027
|
return jsx(TableContainer$4, Object.assign({
|
|
18011
18028
|
css: css,
|
|
18012
18029
|
ref: ref
|
|
@@ -18094,10 +18111,14 @@ const MobileTable = /*#__PURE__*/React__default.forwardRef(({
|
|
|
18094
18111
|
css: {
|
|
18095
18112
|
backgroundColor: colors$4.bgGray,
|
|
18096
18113
|
padding: `$spacing-03 $spacing-05 ${'selection' in row.values ? '$spacing-03 $spacing-07' : ''}`,
|
|
18097
|
-
borderBottom: '1pt solid $bgBorder'
|
|
18114
|
+
borderBottom: '1pt solid $bgBorder',
|
|
18115
|
+
alignItems: cell.column.accessor ? getAlign(cellAlign) : 'center'
|
|
18098
18116
|
}
|
|
18099
18117
|
}, {
|
|
18100
18118
|
children: [jsx(Heading, Object.assign({
|
|
18119
|
+
css: {
|
|
18120
|
+
padding: '3px 0px'
|
|
18121
|
+
},
|
|
18101
18122
|
heading: "headerTable",
|
|
18102
18123
|
color: "secondary"
|
|
18103
18124
|
}, {
|
|
@@ -18861,7 +18882,8 @@ function Table({
|
|
|
18861
18882
|
rowGroup: rowGroup,
|
|
18862
18883
|
hiddenColumns: hiddenColumns,
|
|
18863
18884
|
css: css,
|
|
18864
|
-
customRowsStyle: customRowsStyle
|
|
18885
|
+
customRowsStyle: customRowsStyle,
|
|
18886
|
+
cellAlign: cellAlign
|
|
18865
18887
|
}, void 0)]
|
|
18866
18888
|
}), void 0);
|
|
18867
18889
|
} //Dummy component for mdx docs purpose only
|
|
@@ -30334,7 +30356,8 @@ function InputMapPicker(props) {
|
|
|
30334
30356
|
}), void 0)]
|
|
30335
30357
|
}), void 0), jsxs(ModalDialog, Object.assign({
|
|
30336
30358
|
width: isDesktop ? 565 : '100%',
|
|
30337
|
-
layer: "$modal"
|
|
30359
|
+
layer: "$modal",
|
|
30360
|
+
onPointerDownOutside: e => e.preventDefault()
|
|
30338
30361
|
}, {
|
|
30339
30362
|
children: [jsx(ModalDialogTrigger, Object.assign({
|
|
30340
30363
|
asChild: true
|
package/index.umd.css
CHANGED
package/index.umd.js
CHANGED
|
@@ -14216,7 +14216,8 @@
|
|
|
14216
14216
|
width = props.width,
|
|
14217
14217
|
onOpenAutoFocus = props.onOpenAutoFocus,
|
|
14218
14218
|
disabledCloseButton = props.disabledCloseButton,
|
|
14219
|
-
|
|
14219
|
+
onPointerDownOutside = props.onPointerDownOutside,
|
|
14220
|
+
rest = __rest(props, ["children", "size", "css", "layer", "isMobile", "width", "onOpenAutoFocus", "disabledCloseButton", "onPointerDownOutside"]);
|
|
14220
14221
|
|
|
14221
14222
|
var childArray = React__default["default"].Children.toArray(children);
|
|
14222
14223
|
var modalDialogFooter = findNodeChild$1(childArray, 'ModalDialogFooter');
|
|
@@ -14255,6 +14256,9 @@
|
|
|
14255
14256
|
} else {
|
|
14256
14257
|
onOpenAutoFocus(e);
|
|
14257
14258
|
}
|
|
14259
|
+
},
|
|
14260
|
+
onPointerDownOutside: function (e) {
|
|
14261
|
+
return onPointerDownOutside === null || onPointerDownOutside === void 0 ? void 0 : onPointerDownOutside(e);
|
|
14258
14262
|
}
|
|
14259
14263
|
}, {
|
|
14260
14264
|
children: jsxRuntime.jsxs(Box, __assign({
|
|
@@ -18279,7 +18283,8 @@
|
|
|
18279
18283
|
rowGroup = _a.rowGroup;
|
|
18280
18284
|
_a.hiddenColumns;
|
|
18281
18285
|
var css = _a.css,
|
|
18282
|
-
customRowsStyle = _a.customRowsStyle
|
|
18286
|
+
customRowsStyle = _a.customRowsStyle,
|
|
18287
|
+
cellAlign = _a.cellAlign;
|
|
18283
18288
|
var getTableProps = instance.getTableProps,
|
|
18284
18289
|
getTableBodyProps = instance.getTableBodyProps,
|
|
18285
18290
|
headerGroups = instance.headerGroups,
|
|
@@ -18289,6 +18294,20 @@
|
|
|
18289
18294
|
state = instance.state,
|
|
18290
18295
|
toggleAllRowsExpanded = instance.toggleAllRowsExpanded,
|
|
18291
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
|
+
|
|
18292
18311
|
return jsxRuntime.jsx(TableContainer$4, __assign({
|
|
18293
18312
|
css: css,
|
|
18294
18313
|
ref: ref
|
|
@@ -18386,10 +18405,14 @@
|
|
|
18386
18405
|
css: {
|
|
18387
18406
|
backgroundColor: colors$4.bgGray,
|
|
18388
18407
|
padding: "$spacing-03 $spacing-05 ".concat('selection' in row.values ? '$spacing-03 $spacing-07' : ''),
|
|
18389
|
-
borderBottom: '1pt solid $bgBorder'
|
|
18408
|
+
borderBottom: '1pt solid $bgBorder',
|
|
18409
|
+
alignItems: cell.column.accessor ? getAlign(cellAlign) : 'center'
|
|
18390
18410
|
}
|
|
18391
18411
|
}, {
|
|
18392
18412
|
children: [jsxRuntime.jsx(Heading, __assign({
|
|
18413
|
+
css: {
|
|
18414
|
+
padding: '3px 0px'
|
|
18415
|
+
},
|
|
18393
18416
|
heading: "headerTable",
|
|
18394
18417
|
color: "secondary"
|
|
18395
18418
|
}, {
|
|
@@ -19214,7 +19237,8 @@
|
|
|
19214
19237
|
rowGroup: rowGroup,
|
|
19215
19238
|
hiddenColumns: hiddenColumns,
|
|
19216
19239
|
css: css,
|
|
19217
|
-
customRowsStyle: customRowsStyle
|
|
19240
|
+
customRowsStyle: customRowsStyle,
|
|
19241
|
+
cellAlign: cellAlign
|
|
19218
19242
|
}, void 0)]
|
|
19219
19243
|
}), void 0);
|
|
19220
19244
|
} //Dummy component for mdx docs purpose only
|
|
@@ -30776,7 +30800,10 @@
|
|
|
30776
30800
|
}), void 0)]
|
|
30777
30801
|
}), void 0), jsxRuntime.jsxs(ModalDialog, __assign({
|
|
30778
30802
|
width: isDesktop ? 565 : '100%',
|
|
30779
|
-
layer: "$modal"
|
|
30803
|
+
layer: "$modal",
|
|
30804
|
+
onPointerDownOutside: function (e) {
|
|
30805
|
+
return e.preventDefault();
|
|
30806
|
+
}
|
|
30780
30807
|
}, {
|
|
30781
30808
|
children: [jsxRuntime.jsx(ModalDialogTrigger, __assign({
|
|
30782
30809
|
asChild: true
|