@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 CHANGED
@@ -632,16 +632,10 @@ interface CustomDialogProps {
632
632
  onClose: () => void;
633
633
  maxWidth?: DialogProps["maxWidth"];
634
634
  fullWidth?: boolean;
635
- fullScreen?: boolean;
636
635
  children: ReactNode;
637
636
  actions?: ReactNode;
638
637
  isSubmiting?: boolean;
639
- sx?: SxProps<Theme>;
640
- paperSx?: SxProps<Theme>;
641
- contentSx?: SxProps<Theme>;
642
- titleSx?: SxProps<Theme>;
643
- actionsSx?: SxProps<Theme>;
644
638
  }
645
- declare function CustomDialog({ title, icon: Icon, iconColor, open, onClose, maxWidth, fullWidth, fullScreen, children, actions, isSubmiting, sx, paperSx, contentSx, titleSx, actionsSx, }: CustomDialogProps): React$1.JSX.Element;
639
+ declare function CustomDialog({ title, icon: Icon, iconColor, open, onClose, maxWidth, fullWidth, children, actions, isSubmiting, }: CustomDialogProps): React$1.JSX.Element;
646
640
 
647
641
  export { Page as Accordion, AdvancedSearchButton, ConfirmationDialog$1 as ConfirmationDialog, ConnectToBasculeButton, CustomCheckbox, CustomDialog, type CustomDialogProps, CustomTimePicker, DataTable, DateFilter, DateFilterRange, DateMonthPicker, JalaliDatePicker$2 as DatePicker, JalaliDatePicker$1 as DateTimePicker, JalaliDateTimeRangePicker as DateTimeRangePicker, DraggablePaper, UploadImage as EnhancedUploadImage, FormInputNumber, FormInputText, HorizontalStepper, imgViewer as ImgViewer, LicensePlate, JalaliDatePicker as MobileDateTimePicker, ConfirmationDialog as Modal, NestedSelect as NestedSelectort, NoResult, PaginationList, type PaletteColor, PatternTextField, RadioButton, SearchLicensePlate, MultipleSelectChip as Selector, SkeletonCard, SonarSpinner, SwitchButton, Table, UploadImage$1 as UploadImage };
package/dist/index.d.ts CHANGED
@@ -632,16 +632,10 @@ interface CustomDialogProps {
632
632
  onClose: () => void;
633
633
  maxWidth?: DialogProps["maxWidth"];
634
634
  fullWidth?: boolean;
635
- fullScreen?: boolean;
636
635
  children: ReactNode;
637
636
  actions?: ReactNode;
638
637
  isSubmiting?: boolean;
639
- sx?: SxProps<Theme>;
640
- paperSx?: SxProps<Theme>;
641
- contentSx?: SxProps<Theme>;
642
- titleSx?: SxProps<Theme>;
643
- actionsSx?: SxProps<Theme>;
644
638
  }
645
- declare function CustomDialog({ title, icon: Icon, iconColor, open, onClose, maxWidth, fullWidth, fullScreen, children, actions, isSubmiting, sx, paperSx, contentSx, titleSx, actionsSx, }: CustomDialogProps): React$1.JSX.Element;
639
+ declare function CustomDialog({ title, icon: Icon, iconColor, open, onClose, maxWidth, fullWidth, children, actions, isSubmiting, }: CustomDialogProps): React$1.JSX.Element;
646
640
 
647
641
  export { Page as Accordion, AdvancedSearchButton, ConfirmationDialog$1 as ConfirmationDialog, ConnectToBasculeButton, CustomCheckbox, CustomDialog, type CustomDialogProps, CustomTimePicker, DataTable, DateFilter, DateFilterRange, DateMonthPicker, JalaliDatePicker$2 as DatePicker, JalaliDatePicker$1 as DateTimePicker, JalaliDateTimeRangePicker as DateTimeRangePicker, DraggablePaper, UploadImage as EnhancedUploadImage, FormInputNumber, FormInputText, HorizontalStepper, imgViewer as ImgViewer, LicensePlate, JalaliDatePicker as MobileDateTimePicker, ConfirmationDialog as Modal, NestedSelect as NestedSelectort, NoResult, PaginationList, type PaletteColor, PatternTextField, RadioButton, SearchLicensePlate, MultipleSelectChip as Selector, SkeletonCard, SonarSpinner, SwitchButton, Table, UploadImage$1 as UploadImage };
package/dist/index.js CHANGED
@@ -5233,15 +5233,9 @@ function CustomDialog({
5233
5233
  onClose,
5234
5234
  maxWidth = "sm",
5235
5235
  fullWidth = true,
5236
- fullScreen = false,
5237
5236
  children,
5238
5237
  actions,
5239
- isSubmiting = false,
5240
- sx,
5241
- paperSx,
5242
- contentSx,
5243
- titleSx,
5244
- actionsSx
5238
+ isSubmiting = false
5245
5239
  }) {
5246
5240
  const handleClose = (event, reason) => {
5247
5241
  if (isSubmiting) {
@@ -5256,150 +5250,73 @@ function CustomDialog({
5256
5250
  onClose: handleClose,
5257
5251
  maxWidth,
5258
5252
  fullWidth,
5259
- fullScreen,
5260
- PaperComponent: fullScreen ? void 0 : DraggablePaper,
5261
- disableScrollLock: true,
5262
- sx: [
5263
- fullScreen ? {
5264
- "& .MuiDialog-container": {
5265
- alignItems: "flex-start"
5266
- }
5267
- } : {},
5268
- ...Array.isArray(sx) ? sx : [sx]
5269
- ],
5270
- PaperProps: {
5271
- sx: [
5272
- fullScreen ? {
5273
- height: "100vh",
5274
- maxHeight: "100vh",
5275
- width: "100%",
5276
- maxWidth: "100%",
5277
- margin: 0,
5278
- borderRadius: 0,
5279
- overflow: "hidden"
5280
- } : {
5281
- maxHeight: "calc(100vh - 64px)"
5282
- },
5283
- ...Array.isArray(paperSx) ? paperSx : [paperSx]
5284
- ]
5285
- }
5253
+ PaperComponent: DraggablePaper,
5254
+ disableScrollLock: true
5286
5255
  },
5287
5256
  /* @__PURE__ */ React.createElement(
5288
- import_material32.Box,
5257
+ import_material32.DialogTitle,
5289
5258
  {
5290
- sx: {
5291
- display: "flex",
5292
- flexDirection: "column",
5293
- height: fullScreen ? "100%" : "auto"
5294
- }
5259
+ fontWeight: 700,
5260
+ fontSize: "1.2rem",
5261
+ display: "flex",
5262
+ alignItems: "center",
5263
+ gap: "4px",
5264
+ sx: { cursor: "move" },
5265
+ id: "draggable-dialog"
5295
5266
  },
5296
- /* @__PURE__ */ React.createElement(
5297
- import_material32.DialogTitle,
5267
+ /* @__PURE__ */ React.createElement(import_material32.Stack, { direction: "row", alignItems: "center", spacing: 0.5 }, /* @__PURE__ */ React.createElement(import_material32.Box, null, Icon && /* @__PURE__ */ React.createElement(
5268
+ import_material32.Stack,
5298
5269
  {
5299
- fontWeight: 700,
5300
- fontSize: "1.2rem",
5301
- display: "flex",
5302
5270
  alignItems: "center",
5303
- gap: "4px",
5304
- sx: [
5305
- fullScreen ? { cursor: "default" } : { cursor: "move" },
5306
- {
5307
- flexShrink: 0,
5308
- py: 2,
5309
- px: 3
5310
- },
5311
- ...Array.isArray(titleSx) ? titleSx : [titleSx]
5312
- ],
5313
- id: fullScreen ? void 0 : "draggable-dialog"
5314
- },
5315
- /* @__PURE__ */ React.createElement(import_material32.Stack, { direction: "row", alignItems: "center", spacing: 0.5 }, /* @__PURE__ */ React.createElement(import_material32.Box, null, Icon && /* @__PURE__ */ React.createElement(
5316
- import_material32.Stack,
5317
- {
5318
- alignItems: "center",
5319
- sx: {
5320
- color: iconColor ? (theme3) => {
5321
- const paletteColors = [
5322
- "primary",
5323
- "secondary",
5324
- "error",
5325
- "warning",
5326
- "info",
5327
- "success",
5328
- "tertiary",
5329
- "accent",
5330
- "successLight",
5331
- "orange",
5332
- "indigo",
5333
- "teal",
5334
- "pinkLight",
5335
- "aqua",
5336
- "customRed"
5337
- ];
5338
- if (paletteColors.includes(iconColor)) {
5339
- const palette = theme3.palette;
5340
- return palette[iconColor]?.main || iconColor;
5341
- }
5342
- return iconColor;
5343
- } : (theme3) => theme3.palette.info.main,
5344
- pr: 0.5
5345
- }
5346
- },
5347
- /* @__PURE__ */ React.createElement(Icon, { size: 20 })
5348
- )), /* @__PURE__ */ React.createElement(import_material32.Box, null, title))
5349
- ),
5350
- /* @__PURE__ */ React.createElement(import_material32.Tooltip, { title: "\u0628\u0633\u062A\u0646" }, /* @__PURE__ */ React.createElement(
5351
- import_material32.IconButton,
5352
- {
5353
- "aria-label": "close",
5354
- onClick: onClose,
5355
- sx: [
5356
- {
5357
- position: "absolute",
5358
- right: 8,
5359
- top: 8,
5360
- color: (theme3) => theme3.palette.grey[500]
5361
- },
5362
- fullScreen && {
5363
- top: 12,
5364
- right: 12
5365
- }
5366
- ],
5367
- disabled: isSubmiting
5368
- },
5369
- /* @__PURE__ */ React.createElement(import_md10.MdClose, null)
5370
- )),
5371
- /* @__PURE__ */ React.createElement(import_material32.Divider, { sx: { flexShrink: 0 } }),
5372
- /* @__PURE__ */ React.createElement(
5373
- import_material32.DialogContent,
5374
- {
5375
- sx: [
5376
- {
5377
- flex: 1,
5378
- display: "flex",
5379
- flexDirection: "column",
5380
- overflow: "auto",
5381
- p: 0
5382
- },
5383
- ...Array.isArray(contentSx) ? contentSx : [contentSx]
5384
- ]
5271
+ sx: {
5272
+ color: iconColor ? (theme3) => {
5273
+ const paletteColors = [
5274
+ "primary",
5275
+ "secondary",
5276
+ "error",
5277
+ "warning",
5278
+ "info",
5279
+ "success",
5280
+ "tertiary",
5281
+ "accent",
5282
+ "successLight",
5283
+ "orange",
5284
+ "indigo",
5285
+ "teal",
5286
+ "pinkLight",
5287
+ "aqua",
5288
+ "customRed"
5289
+ ];
5290
+ if (paletteColors.includes(iconColor)) {
5291
+ const palette = theme3.palette;
5292
+ return palette[iconColor]?.main || iconColor;
5293
+ }
5294
+ return iconColor;
5295
+ } : (theme3) => theme3.palette.info.main,
5296
+ pr: 0.5
5297
+ }
5385
5298
  },
5386
- /* @__PURE__ */ React.createElement(import_material32.Box, { sx: { p: fullScreen ? 3 : 2, flex: 1, overflow: "auto" } }, children)
5387
- ),
5388
- actions && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
5389
- import_material32.DialogActions,
5390
- {
5391
- sx: [
5392
- {
5393
- flexShrink: 0,
5394
- py: 2,
5395
- px: 3
5396
- },
5397
- ...Array.isArray(actionsSx) ? actionsSx : [actionsSx]
5398
- ]
5299
+ /* @__PURE__ */ React.createElement(Icon, { size: 20 })
5300
+ )), /* @__PURE__ */ React.createElement(import_material32.Box, null, title))
5301
+ ),
5302
+ /* @__PURE__ */ React.createElement(import_material32.Tooltip, { title: "\u0628\u0633\u062A\u0646" }, /* @__PURE__ */ React.createElement(
5303
+ import_material32.IconButton,
5304
+ {
5305
+ "aria-label": "close",
5306
+ onClick: onClose,
5307
+ sx: {
5308
+ position: "absolute",
5309
+ right: 8,
5310
+ top: 8,
5311
+ color: (theme3) => theme3.palette.grey[500]
5399
5312
  },
5400
- actions
5401
- ))
5402
- )
5313
+ disabled: isSubmiting
5314
+ },
5315
+ /* @__PURE__ */ React.createElement(import_md10.MdClose, null)
5316
+ )),
5317
+ /* @__PURE__ */ React.createElement(import_material32.Divider, null),
5318
+ /* @__PURE__ */ React.createElement(import_material32.DialogContent, null, children),
5319
+ actions && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(import_material32.DialogActions, null, actions))
5403
5320
  );
5404
5321
  }
5405
5322
  // Annotate the CommonJS export names for ESM import in node: