@mamrp/components 1.7.6 → 1.7.7
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 +16 -2
- package/dist/index.d.ts +16 -2
- package/dist/index.js +90 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +98 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2,11 +2,12 @@ import * as React$1 from 'react';
|
|
|
2
2
|
import React__default, { ReactNode, CSSProperties, Dispatch, SetStateAction } from 'react';
|
|
3
3
|
import { Control, FieldValues, Path, FieldErrors, UseFormSetValue } from 'react-hook-form';
|
|
4
4
|
import { Moment } from 'moment-jalaali';
|
|
5
|
-
import { SxProps, Theme, PaperProps } from '@mui/material';
|
|
5
|
+
import { SxProps, Theme, PaperProps, DialogProps } from '@mui/material';
|
|
6
6
|
import { GridColDef, GridRowSelectionModel, GridRowParams } from '@mui/x-data-grid';
|
|
7
7
|
import { TextFieldProps } from '@mui/material/TextField';
|
|
8
8
|
import { MRT_ColumnDef, MRT_PaginationState, MRT_ColumnFiltersState, MRT_SortingState, MRT_TableOptions } from 'material-react-table';
|
|
9
9
|
export { MRT_ColumnDef } from 'material-react-table';
|
|
10
|
+
import { IconType } from 'react-icons';
|
|
10
11
|
|
|
11
12
|
interface MultipleSelectChipProps {
|
|
12
13
|
name: string;
|
|
@@ -609,4 +610,17 @@ type DataTableProps<T extends Record<string, any>> = {
|
|
|
609
610
|
*/
|
|
610
611
|
declare const DataTable: <T extends Record<string, any>>({ data, columns, isLoading, isRefetching, pagination, onPaginationChange, totalRows, manualPagination, columnFilters, onColumnFiltersChange, manualFiltering, onClearFilters, showClearFiltersButton, sorting, onSortingChange, manualSorting, columnVisibility, onColumnVisibilityChange, columnOrder, onColumnOrderChange, enableStickyHeader, maxHeight, density, enableColumnOrdering, enableGlobalFilter, enableColumnFilterModes, enableRowSelection, showColumnFilters, onShowColumnFiltersChange, renderTopToolbarCustomActions, renderBottomToolbarCustomActions, tableOptions, localization, enableColumnVirtualization, columnVirtualizerOptions, enableColumnResizing, }: DataTableProps<T>) => React$1.JSX.Element;
|
|
611
612
|
|
|
612
|
-
|
|
613
|
+
type PaletteColor = "primary" | "secondary" | "error" | "warning" | "info" | "success" | "tertiary" | "accent" | "successLight" | "orange" | "indigo" | "teal" | "pinkLight" | "aqua" | "customRed";
|
|
614
|
+
interface CustomDialogProps {
|
|
615
|
+
title: string;
|
|
616
|
+
icon?: IconType;
|
|
617
|
+
iconColor?: PaletteColor | string;
|
|
618
|
+
open: boolean;
|
|
619
|
+
onClose: () => void;
|
|
620
|
+
maxWidth?: DialogProps["maxWidth"];
|
|
621
|
+
fullWidth?: boolean;
|
|
622
|
+
children: ReactNode;
|
|
623
|
+
}
|
|
624
|
+
declare function CustomDialog({ title, icon: Icon, iconColor, open, onClose, maxWidth, fullWidth, children, }: CustomDialogProps): React$1.JSX.Element;
|
|
625
|
+
|
|
626
|
+
export { Page as Accordion, AdvancedSearchButton, ConfirmationDialog$1 as ConfirmationDialog, ConnectToBasculeButton, CustomCheckbox, CustomDialog, CustomTimePicker, DataTable, DateFilter, DateFilterRange, DateMonthPicker, JalaliDatePicker$2 as DatePicker, JalaliDatePicker$1 as DateTimePicker, JalaliDateTimeRangePicker as DateTimeRangePicker, DraggablePaper, UploadImage as EnhancedUploadImage, FormInputNumber, FormInputText, HorizontalStepper, LicensePlate, JalaliDatePicker as MobileDateTimePicker, ConfirmationDialog as Modal, NestedSelect as NestedSelectort, NoResult, PaginationList, PatternTextField, RadioButton, SearchLicensePlate, MultipleSelectChip as Selector, SkeletonCard, SonarSpinner, SwitchButton, Table, UploadImage$1 as UploadImage };
|
package/dist/index.d.ts
CHANGED
|
@@ -2,11 +2,12 @@ import * as React$1 from 'react';
|
|
|
2
2
|
import React__default, { ReactNode, CSSProperties, Dispatch, SetStateAction } from 'react';
|
|
3
3
|
import { Control, FieldValues, Path, FieldErrors, UseFormSetValue } from 'react-hook-form';
|
|
4
4
|
import { Moment } from 'moment-jalaali';
|
|
5
|
-
import { SxProps, Theme, PaperProps } from '@mui/material';
|
|
5
|
+
import { SxProps, Theme, PaperProps, DialogProps } from '@mui/material';
|
|
6
6
|
import { GridColDef, GridRowSelectionModel, GridRowParams } from '@mui/x-data-grid';
|
|
7
7
|
import { TextFieldProps } from '@mui/material/TextField';
|
|
8
8
|
import { MRT_ColumnDef, MRT_PaginationState, MRT_ColumnFiltersState, MRT_SortingState, MRT_TableOptions } from 'material-react-table';
|
|
9
9
|
export { MRT_ColumnDef } from 'material-react-table';
|
|
10
|
+
import { IconType } from 'react-icons';
|
|
10
11
|
|
|
11
12
|
interface MultipleSelectChipProps {
|
|
12
13
|
name: string;
|
|
@@ -609,4 +610,17 @@ type DataTableProps<T extends Record<string, any>> = {
|
|
|
609
610
|
*/
|
|
610
611
|
declare const DataTable: <T extends Record<string, any>>({ data, columns, isLoading, isRefetching, pagination, onPaginationChange, totalRows, manualPagination, columnFilters, onColumnFiltersChange, manualFiltering, onClearFilters, showClearFiltersButton, sorting, onSortingChange, manualSorting, columnVisibility, onColumnVisibilityChange, columnOrder, onColumnOrderChange, enableStickyHeader, maxHeight, density, enableColumnOrdering, enableGlobalFilter, enableColumnFilterModes, enableRowSelection, showColumnFilters, onShowColumnFiltersChange, renderTopToolbarCustomActions, renderBottomToolbarCustomActions, tableOptions, localization, enableColumnVirtualization, columnVirtualizerOptions, enableColumnResizing, }: DataTableProps<T>) => React$1.JSX.Element;
|
|
611
612
|
|
|
612
|
-
|
|
613
|
+
type PaletteColor = "primary" | "secondary" | "error" | "warning" | "info" | "success" | "tertiary" | "accent" | "successLight" | "orange" | "indigo" | "teal" | "pinkLight" | "aqua" | "customRed";
|
|
614
|
+
interface CustomDialogProps {
|
|
615
|
+
title: string;
|
|
616
|
+
icon?: IconType;
|
|
617
|
+
iconColor?: PaletteColor | string;
|
|
618
|
+
open: boolean;
|
|
619
|
+
onClose: () => void;
|
|
620
|
+
maxWidth?: DialogProps["maxWidth"];
|
|
621
|
+
fullWidth?: boolean;
|
|
622
|
+
children: ReactNode;
|
|
623
|
+
}
|
|
624
|
+
declare function CustomDialog({ title, icon: Icon, iconColor, open, onClose, maxWidth, fullWidth, children, }: CustomDialogProps): React$1.JSX.Element;
|
|
625
|
+
|
|
626
|
+
export { Page as Accordion, AdvancedSearchButton, ConfirmationDialog$1 as ConfirmationDialog, ConnectToBasculeButton, CustomCheckbox, CustomDialog, CustomTimePicker, DataTable, DateFilter, DateFilterRange, DateMonthPicker, JalaliDatePicker$2 as DatePicker, JalaliDatePicker$1 as DateTimePicker, JalaliDateTimeRangePicker as DateTimeRangePicker, DraggablePaper, UploadImage as EnhancedUploadImage, FormInputNumber, FormInputText, HorizontalStepper, LicensePlate, JalaliDatePicker as MobileDateTimePicker, ConfirmationDialog as Modal, NestedSelect as NestedSelectort, NoResult, PaginationList, PatternTextField, RadioButton, SearchLicensePlate, MultipleSelectChip as Selector, SkeletonCard, SonarSpinner, SwitchButton, Table, UploadImage$1 as UploadImage };
|
package/dist/index.js
CHANGED
|
@@ -35,6 +35,7 @@ __export(src_exports, {
|
|
|
35
35
|
ConfirmationDialog: () => ConfirmationDialog,
|
|
36
36
|
ConnectToBasculeButton: () => bascule_connection_button_default,
|
|
37
37
|
CustomCheckbox: () => CustomCheckbox,
|
|
38
|
+
CustomDialog: () => CustomDialog,
|
|
38
39
|
CustomTimePicker: () => CustomTimePicker,
|
|
39
40
|
DataTable: () => data_table_default,
|
|
40
41
|
DateFilter: () => DateFilter,
|
|
@@ -5220,6 +5221,94 @@ var DataTable = ({
|
|
|
5220
5221
|
return /* @__PURE__ */ React.createElement(import_material_react_table.MaterialReactTable, { table });
|
|
5221
5222
|
};
|
|
5222
5223
|
var data_table_default = DataTable;
|
|
5224
|
+
|
|
5225
|
+
// src/custom-dialog/index.tsx
|
|
5226
|
+
var import_material31 = require("@mui/material");
|
|
5227
|
+
var import_md9 = require("react-icons/md");
|
|
5228
|
+
function CustomDialog({
|
|
5229
|
+
title,
|
|
5230
|
+
icon: Icon,
|
|
5231
|
+
iconColor,
|
|
5232
|
+
open,
|
|
5233
|
+
onClose,
|
|
5234
|
+
maxWidth = "sm",
|
|
5235
|
+
fullWidth = true,
|
|
5236
|
+
children
|
|
5237
|
+
}) {
|
|
5238
|
+
return /* @__PURE__ */ React.createElement(
|
|
5239
|
+
import_material31.Dialog,
|
|
5240
|
+
{
|
|
5241
|
+
open,
|
|
5242
|
+
onClose,
|
|
5243
|
+
maxWidth,
|
|
5244
|
+
fullWidth,
|
|
5245
|
+
PaperComponent: DraggablePaper,
|
|
5246
|
+
disableScrollLock: true
|
|
5247
|
+
},
|
|
5248
|
+
/* @__PURE__ */ React.createElement(
|
|
5249
|
+
import_material31.DialogTitle,
|
|
5250
|
+
{
|
|
5251
|
+
fontWeight: 700,
|
|
5252
|
+
fontSize: "1.2rem",
|
|
5253
|
+
display: "flex",
|
|
5254
|
+
alignItems: "center",
|
|
5255
|
+
gap: "4px",
|
|
5256
|
+
sx: { cursor: "move" },
|
|
5257
|
+
id: "draggable-dialog"
|
|
5258
|
+
},
|
|
5259
|
+
/* @__PURE__ */ React.createElement(import_material31.Stack, { direction: "row", alignItems: "center", spacing: 0.5 }, /* @__PURE__ */ React.createElement(import_material31.Box, null, Icon && /* @__PURE__ */ React.createElement(
|
|
5260
|
+
import_material31.Stack,
|
|
5261
|
+
{
|
|
5262
|
+
alignItems: "center",
|
|
5263
|
+
sx: {
|
|
5264
|
+
color: iconColor ? (theme3) => {
|
|
5265
|
+
const paletteColors = [
|
|
5266
|
+
"primary",
|
|
5267
|
+
"secondary",
|
|
5268
|
+
"error",
|
|
5269
|
+
"warning",
|
|
5270
|
+
"info",
|
|
5271
|
+
"success",
|
|
5272
|
+
"tertiary",
|
|
5273
|
+
"accent",
|
|
5274
|
+
"successLight",
|
|
5275
|
+
"orange",
|
|
5276
|
+
"indigo",
|
|
5277
|
+
"teal",
|
|
5278
|
+
"pinkLight",
|
|
5279
|
+
"aqua",
|
|
5280
|
+
"customRed"
|
|
5281
|
+
];
|
|
5282
|
+
if (paletteColors.includes(iconColor)) {
|
|
5283
|
+
const palette = theme3.palette;
|
|
5284
|
+
return palette[iconColor]?.main || iconColor;
|
|
5285
|
+
}
|
|
5286
|
+
return iconColor;
|
|
5287
|
+
} : (theme3) => theme3.palette.info.main,
|
|
5288
|
+
pr: 0.5
|
|
5289
|
+
}
|
|
5290
|
+
},
|
|
5291
|
+
/* @__PURE__ */ React.createElement(Icon, { size: 20 })
|
|
5292
|
+
)), /* @__PURE__ */ React.createElement(import_material31.Box, null, title))
|
|
5293
|
+
),
|
|
5294
|
+
/* @__PURE__ */ React.createElement(import_material31.Tooltip, { title: "\u0628\u0633\u062A\u0646" }, /* @__PURE__ */ React.createElement(
|
|
5295
|
+
import_material31.IconButton,
|
|
5296
|
+
{
|
|
5297
|
+
"aria-label": "close",
|
|
5298
|
+
onClick: onClose,
|
|
5299
|
+
sx: {
|
|
5300
|
+
position: "absolute",
|
|
5301
|
+
right: 8,
|
|
5302
|
+
top: 8,
|
|
5303
|
+
color: (theme3) => theme3.palette.grey[500]
|
|
5304
|
+
}
|
|
5305
|
+
},
|
|
5306
|
+
/* @__PURE__ */ React.createElement(import_md9.MdClose, null)
|
|
5307
|
+
)),
|
|
5308
|
+
/* @__PURE__ */ React.createElement(import_material31.Divider, null),
|
|
5309
|
+
/* @__PURE__ */ React.createElement(import_material31.DialogContent, null, children)
|
|
5310
|
+
);
|
|
5311
|
+
}
|
|
5223
5312
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5224
5313
|
0 && (module.exports = {
|
|
5225
5314
|
Accordion,
|
|
@@ -5227,6 +5316,7 @@ var data_table_default = DataTable;
|
|
|
5227
5316
|
ConfirmationDialog,
|
|
5228
5317
|
ConnectToBasculeButton,
|
|
5229
5318
|
CustomCheckbox,
|
|
5319
|
+
CustomDialog,
|
|
5230
5320
|
CustomTimePicker,
|
|
5231
5321
|
DataTable,
|
|
5232
5322
|
DateFilter,
|