@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.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
- fullScreen,
5287
- PaperComponent: fullScreen ? void 0 : DraggablePaper,
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
- Box25,
5284
+ DialogTitle6,
5316
5285
  {
5317
- sx: {
5318
- display: "flex",
5319
- flexDirection: "column",
5320
- height: fullScreen ? "100%" : "auto"
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
- DialogTitle6,
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
- gap: "4px",
5331
- sx: [
5332
- fullScreen ? { cursor: "default" } : { cursor: "move" },
5333
- {
5334
- flexShrink: 0,
5335
- py: 2,
5336
- px: 3
5337
- },
5338
- ...Array.isArray(titleSx) ? titleSx : [titleSx]
5339
- ],
5340
- id: fullScreen ? void 0 : "draggable-dialog"
5341
- },
5342
- /* @__PURE__ */ React.createElement(Stack7, { direction: "row", alignItems: "center", spacing: 0.5 }, /* @__PURE__ */ React.createElement(Box25, null, Icon && /* @__PURE__ */ React.createElement(
5343
- Stack7,
5344
- {
5345
- alignItems: "center",
5346
- sx: {
5347
- color: iconColor ? (theme3) => {
5348
- const paletteColors = [
5349
- "primary",
5350
- "secondary",
5351
- "error",
5352
- "warning",
5353
- "info",
5354
- "success",
5355
- "tertiary",
5356
- "accent",
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(Box25, { sx: { p: fullScreen ? 3 : 2, flex: 1, overflow: "auto" } }, children)
5414
- ),
5415
- actions && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
5416
- DialogActions4,
5417
- {
5418
- sx: [
5419
- {
5420
- flexShrink: 0,
5421
- py: 2,
5422
- px: 3
5423
- },
5424
- ...Array.isArray(actionsSx) ? actionsSx : [actionsSx]
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
- actions
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 {