@mamrp/components 1.7.18 → 1.7.20
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/dist/index.d.mts +1 -7
- package/dist/index.d.ts +1 -7
- package/dist/index.js +60 -143
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +60 -143
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -6
package/dist/index.mjs
CHANGED
|
@@ -5260,15 +5260,9 @@ function CustomDialog({
|
|
|
5260
5260
|
onClose,
|
|
5261
5261
|
maxWidth = "sm",
|
|
5262
5262
|
fullWidth = true,
|
|
5263
|
-
fullScreen = false,
|
|
5264
5263
|
children,
|
|
5265
5264
|
actions,
|
|
5266
|
-
isSubmiting = false
|
|
5267
|
-
sx,
|
|
5268
|
-
paperSx,
|
|
5269
|
-
contentSx,
|
|
5270
|
-
titleSx,
|
|
5271
|
-
actionsSx
|
|
5265
|
+
isSubmiting = false
|
|
5272
5266
|
}) {
|
|
5273
5267
|
const handleClose = (event, reason) => {
|
|
5274
5268
|
if (isSubmiting) {
|
|
@@ -5283,150 +5277,73 @@ function CustomDialog({
|
|
|
5283
5277
|
onClose: handleClose,
|
|
5284
5278
|
maxWidth,
|
|
5285
5279
|
fullWidth,
|
|
5286
|
-
|
|
5287
|
-
|
|
5288
|
-
disableScrollLock: true,
|
|
5289
|
-
sx: [
|
|
5290
|
-
fullScreen ? {
|
|
5291
|
-
"& .MuiDialog-container": {
|
|
5292
|
-
alignItems: "flex-start"
|
|
5293
|
-
}
|
|
5294
|
-
} : {},
|
|
5295
|
-
...Array.isArray(sx) ? sx : [sx]
|
|
5296
|
-
],
|
|
5297
|
-
PaperProps: {
|
|
5298
|
-
sx: [
|
|
5299
|
-
fullScreen ? {
|
|
5300
|
-
height: "100vh",
|
|
5301
|
-
maxHeight: "100vh",
|
|
5302
|
-
width: "100%",
|
|
5303
|
-
maxWidth: "100%",
|
|
5304
|
-
margin: 0,
|
|
5305
|
-
borderRadius: 0,
|
|
5306
|
-
overflow: "hidden"
|
|
5307
|
-
} : {
|
|
5308
|
-
maxHeight: "calc(100vh - 64px)"
|
|
5309
|
-
},
|
|
5310
|
-
...Array.isArray(paperSx) ? paperSx : [paperSx]
|
|
5311
|
-
]
|
|
5312
|
-
}
|
|
5280
|
+
PaperComponent: DraggablePaper,
|
|
5281
|
+
disableScrollLock: true
|
|
5313
5282
|
},
|
|
5314
5283
|
/* @__PURE__ */ React.createElement(
|
|
5315
|
-
|
|
5284
|
+
DialogTitle6,
|
|
5316
5285
|
{
|
|
5317
|
-
|
|
5318
|
-
|
|
5319
|
-
|
|
5320
|
-
|
|
5321
|
-
|
|
5286
|
+
fontWeight: 700,
|
|
5287
|
+
fontSize: "1.2rem",
|
|
5288
|
+
display: "flex",
|
|
5289
|
+
alignItems: "center",
|
|
5290
|
+
gap: "4px",
|
|
5291
|
+
sx: { cursor: "move" },
|
|
5292
|
+
id: "draggable-dialog"
|
|
5322
5293
|
},
|
|
5323
|
-
/* @__PURE__ */ React.createElement(
|
|
5324
|
-
|
|
5294
|
+
/* @__PURE__ */ React.createElement(Stack7, { direction: "row", alignItems: "center", spacing: 0.5 }, /* @__PURE__ */ React.createElement(Box25, null, Icon && /* @__PURE__ */ React.createElement(
|
|
5295
|
+
Stack7,
|
|
5325
5296
|
{
|
|
5326
|
-
fontWeight: 700,
|
|
5327
|
-
fontSize: "1.2rem",
|
|
5328
|
-
display: "flex",
|
|
5329
5297
|
alignItems: "center",
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
|
|
5347
|
-
|
|
5348
|
-
|
|
5349
|
-
|
|
5350
|
-
|
|
5351
|
-
|
|
5352
|
-
|
|
5353
|
-
|
|
5354
|
-
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
"successLight",
|
|
5358
|
-
"orange",
|
|
5359
|
-
"indigo",
|
|
5360
|
-
"teal",
|
|
5361
|
-
"pinkLight",
|
|
5362
|
-
"aqua",
|
|
5363
|
-
"customRed"
|
|
5364
|
-
];
|
|
5365
|
-
if (paletteColors.includes(iconColor)) {
|
|
5366
|
-
const palette = theme3.palette;
|
|
5367
|
-
return palette[iconColor]?.main || iconColor;
|
|
5368
|
-
}
|
|
5369
|
-
return iconColor;
|
|
5370
|
-
} : (theme3) => theme3.palette.info.main,
|
|
5371
|
-
pr: 0.5
|
|
5372
|
-
}
|
|
5373
|
-
},
|
|
5374
|
-
/* @__PURE__ */ React.createElement(Icon, { size: 20 })
|
|
5375
|
-
)), /* @__PURE__ */ React.createElement(Box25, null, title))
|
|
5376
|
-
),
|
|
5377
|
-
/* @__PURE__ */ React.createElement(Tooltip4, { title: "\u0628\u0633\u062A\u0646" }, /* @__PURE__ */ React.createElement(
|
|
5378
|
-
IconButton11,
|
|
5379
|
-
{
|
|
5380
|
-
"aria-label": "close",
|
|
5381
|
-
onClick: onClose,
|
|
5382
|
-
sx: [
|
|
5383
|
-
{
|
|
5384
|
-
position: "absolute",
|
|
5385
|
-
right: 8,
|
|
5386
|
-
top: 8,
|
|
5387
|
-
color: (theme3) => theme3.palette.grey[500]
|
|
5388
|
-
},
|
|
5389
|
-
fullScreen && {
|
|
5390
|
-
top: 12,
|
|
5391
|
-
right: 12
|
|
5392
|
-
}
|
|
5393
|
-
],
|
|
5394
|
-
disabled: isSubmiting
|
|
5395
|
-
},
|
|
5396
|
-
/* @__PURE__ */ React.createElement(MdClose6, null)
|
|
5397
|
-
)),
|
|
5398
|
-
/* @__PURE__ */ React.createElement(Divider4, { sx: { flexShrink: 0 } }),
|
|
5399
|
-
/* @__PURE__ */ React.createElement(
|
|
5400
|
-
DialogContent6,
|
|
5401
|
-
{
|
|
5402
|
-
sx: [
|
|
5403
|
-
{
|
|
5404
|
-
flex: 1,
|
|
5405
|
-
display: "flex",
|
|
5406
|
-
flexDirection: "column",
|
|
5407
|
-
overflow: "auto",
|
|
5408
|
-
p: 0
|
|
5409
|
-
},
|
|
5410
|
-
...Array.isArray(contentSx) ? contentSx : [contentSx]
|
|
5411
|
-
]
|
|
5298
|
+
sx: {
|
|
5299
|
+
color: iconColor ? (theme3) => {
|
|
5300
|
+
const paletteColors = [
|
|
5301
|
+
"primary",
|
|
5302
|
+
"secondary",
|
|
5303
|
+
"error",
|
|
5304
|
+
"warning",
|
|
5305
|
+
"info",
|
|
5306
|
+
"success",
|
|
5307
|
+
"tertiary",
|
|
5308
|
+
"accent",
|
|
5309
|
+
"successLight",
|
|
5310
|
+
"orange",
|
|
5311
|
+
"indigo",
|
|
5312
|
+
"teal",
|
|
5313
|
+
"pinkLight",
|
|
5314
|
+
"aqua",
|
|
5315
|
+
"customRed"
|
|
5316
|
+
];
|
|
5317
|
+
if (paletteColors.includes(iconColor)) {
|
|
5318
|
+
const palette = theme3.palette;
|
|
5319
|
+
return palette[iconColor]?.main || iconColor;
|
|
5320
|
+
}
|
|
5321
|
+
return iconColor;
|
|
5322
|
+
} : (theme3) => theme3.palette.info.main,
|
|
5323
|
+
pr: 0.5
|
|
5324
|
+
}
|
|
5412
5325
|
},
|
|
5413
|
-
/* @__PURE__ */ React.createElement(
|
|
5414
|
-
),
|
|
5415
|
-
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
|
|
5421
|
-
|
|
5422
|
-
|
|
5423
|
-
|
|
5424
|
-
|
|
5425
|
-
]
|
|
5326
|
+
/* @__PURE__ */ React.createElement(Icon, { size: 20 })
|
|
5327
|
+
)), /* @__PURE__ */ React.createElement(Box25, null, title))
|
|
5328
|
+
),
|
|
5329
|
+
/* @__PURE__ */ React.createElement(Tooltip4, { title: "\u0628\u0633\u062A\u0646" }, /* @__PURE__ */ React.createElement(
|
|
5330
|
+
IconButton11,
|
|
5331
|
+
{
|
|
5332
|
+
"aria-label": "close",
|
|
5333
|
+
onClick: onClose,
|
|
5334
|
+
sx: {
|
|
5335
|
+
position: "absolute",
|
|
5336
|
+
right: 8,
|
|
5337
|
+
top: 8,
|
|
5338
|
+
color: (theme3) => theme3.palette.grey[500]
|
|
5426
5339
|
},
|
|
5427
|
-
|
|
5428
|
-
|
|
5429
|
-
|
|
5340
|
+
disabled: isSubmiting
|
|
5341
|
+
},
|
|
5342
|
+
/* @__PURE__ */ React.createElement(MdClose6, null)
|
|
5343
|
+
)),
|
|
5344
|
+
/* @__PURE__ */ React.createElement(Divider4, null),
|
|
5345
|
+
/* @__PURE__ */ React.createElement(DialogContent6, null, children),
|
|
5346
|
+
actions && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(DialogActions4, null, actions))
|
|
5430
5347
|
);
|
|
5431
5348
|
}
|
|
5432
5349
|
export {
|