mui-design-system 0.0.10 → 0.0.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.
Files changed (107) hide show
  1. package/dist/components/custom-auto-complete-advanced/components/ListBox.js +1 -1
  2. package/dist/components/custom-date-picker/CustomDatePicker.d.ts +1 -1
  3. package/dist/components/custom-date-picker/CustomDatePicker.js +1 -1
  4. package/dist/mui/palette/dark/darkPalette.js +14 -14
  5. package/dist/mui/palette/light/lightPalette.js +14 -14
  6. package/dist/styles/datePicker.css +113 -0
  7. package/package.json +2 -2
  8. package/dist/assets/icons/AlertCircle.d.ts +0 -7
  9. package/dist/assets/icons/AlertCircle.js +0 -3
  10. package/dist/assets/icons/Calendar.d.ts +0 -7
  11. package/dist/assets/icons/Calendar.js +0 -3
  12. package/dist/assets/icons/ChevronDown.d.ts +0 -7
  13. package/dist/assets/icons/ChevronDown.js +0 -3
  14. package/dist/assets/icons/DocumentDownload.d.ts +0 -7
  15. package/dist/assets/icons/DocumentDownload.js +0 -3
  16. package/dist/assets/icons/FolderAdd.d.ts +0 -7
  17. package/dist/assets/icons/FolderAdd.js +0 -3
  18. package/dist/assets/icons/InfoCircle.d.ts +0 -7
  19. package/dist/assets/icons/InfoCircle.js +0 -3
  20. package/dist/assets/icons/InfoSquare.d.ts +0 -7
  21. package/dist/assets/icons/InfoSquare.js +0 -3
  22. package/dist/assets/icons/SuccessSquare.d.ts +0 -7
  23. package/dist/assets/icons/SuccessSquare.js +0 -3
  24. package/dist/assets/icons/Trash.d.ts +0 -7
  25. package/dist/assets/icons/Trash.js +0 -3
  26. package/dist/assets/icons/Union.d.ts +0 -7
  27. package/dist/assets/icons/Union.js +0 -3
  28. package/dist/assets/icons/Warning.d.ts +0 -7
  29. package/dist/assets/icons/Warning.js +0 -3
  30. package/dist/components/custom-modal/ConfirmModal.d.ts +0 -8
  31. package/dist/components/custom-modal/ConfirmModal.js +0 -10
  32. package/dist/components/custom-modal/DeleteModal.d.ts +0 -9
  33. package/dist/components/custom-modal/DeleteModal.js +0 -17
  34. package/dist/components/custom-numeric-input/CustomNumericInput.d.ts +0 -9
  35. package/dist/components/custom-numeric-input/CustomNumericInput.js +0 -32
  36. package/dist/components/custom-pagination/custom-pagination-1/types.d.ts +0 -6
  37. package/dist/components/custom-pagination/custom-pagination-1/types.js +0 -1
  38. package/dist/components/custom-table/types.d.ts +0 -77
  39. package/dist/components/custom-table/types.js +0 -1
  40. package/dist/components/error boundary/LoadingComponent.d.ts +0 -7
  41. package/dist/components/error boundary/LoadingComponent.js +0 -6
  42. package/dist/components/form/Form.d.ts +0 -21
  43. package/dist/components/form/Form.js +0 -18
  44. package/dist/components/form/UseFormInput.d.ts +0 -11
  45. package/dist/components/form/UseFormInput.js +0 -41
  46. package/dist/components/form/checkbox-list/CheckboxList.d.ts +0 -19
  47. package/dist/components/form/checkbox-list/CheckboxList.js +0 -30
  48. package/dist/components/form/components/UFAutoComplete.d.ts +0 -9
  49. package/dist/components/form/components/UFAutoComplete.js +0 -41
  50. package/dist/components/form/components/UFCheckbox.d.ts +0 -19
  51. package/dist/components/form/components/UFCheckbox.js +0 -21
  52. package/dist/components/form/components/UFCurrency.d.ts +0 -9
  53. package/dist/components/form/components/UFCurrency.js +0 -47
  54. package/dist/components/form/components/UFDatePicker.d.ts +0 -9
  55. package/dist/components/form/components/UFDatePicker.js +0 -17
  56. package/dist/components/form/components/UFMultiCheckbox.d.ts +0 -9
  57. package/dist/components/form/components/UFMultiCheckbox.js +0 -17
  58. package/dist/components/form/components/UFMultiSelect.d.ts +0 -9
  59. package/dist/components/form/components/UFMultiSelect.js +0 -56
  60. package/dist/components/form/components/UFRadio.d.ts +0 -9
  61. package/dist/components/form/components/UFRadio.js +0 -19
  62. package/dist/components/form/components/UFSelect.d.ts +0 -9
  63. package/dist/components/form/components/UFSelect.js +0 -23
  64. package/dist/components/form/components/UFTextArea.d.ts +0 -9
  65. package/dist/components/form/components/UFTextArea.js +0 -12
  66. package/dist/components/form/components/UFTextField.d.ts +0 -11
  67. package/dist/components/form/components/UFTextField.js +0 -37
  68. package/dist/components/form/components/UFUploader.d.ts +0 -9
  69. package/dist/components/form/components/UFUploader.js +0 -41
  70. package/dist/components/form/type.d.ts +0 -150
  71. package/dist/components/form/type.js +0 -1
  72. package/dist/components/input-list/components/UFCarLicencePlate.d.ts +0 -9
  73. package/dist/components/input-list/components/UFCarLicencePlate.js +0 -7
  74. package/dist/components/input-list/components/UFMotorCycleLicence.d.ts +0 -9
  75. package/dist/components/input-list/components/UFMotorCycleLicence.js +0 -7
  76. package/dist/components/licence-plate/car-licencePlate/CarLicencePlate.d.ts +0 -22
  77. package/dist/components/licence-plate/car-licencePlate/CarLicencePlate.js +0 -154
  78. package/dist/components/licence-plate/car-licencePlate/CarLicencePlateView.d.ts +0 -10
  79. package/dist/components/licence-plate/car-licencePlate/CarLicencePlateView.js +0 -22
  80. package/dist/components/licence-plate/motorcycle-licencePlate/MotorcycleLicencePlate.d.ts +0 -14
  81. package/dist/components/licence-plate/motorcycle-licencePlate/MotorcycleLicencePlate.js +0 -86
  82. package/dist/context/FormContext.d.ts +0 -16
  83. package/dist/context/FormContext.js +0 -8
  84. package/dist/mui/Badge/MuiBadge.d.ts +0 -2
  85. package/dist/mui/Badge/MuiBadge.js +0 -68
  86. package/dist/mui/BottomNavigation/MuiBottomNavigation.d.ts +0 -2
  87. package/dist/mui/BottomNavigation/MuiBottomNavigation.js +0 -12
  88. package/dist/mui/BottomNavigation/MuiBottomNavigationAction.d.ts +0 -2
  89. package/dist/mui/BottomNavigation/MuiBottomNavigationAction.js +0 -35
  90. package/dist/mui/Button/containedButton.d.ts +0 -2
  91. package/dist/mui/Button/containedButton.js +0 -32
  92. package/dist/mui/Button/elevatedButton.d.ts +0 -2
  93. package/dist/mui/Button/elevatedButton.js +0 -25
  94. package/dist/mui/Button/outlinedButton.d.ts +0 -2
  95. package/dist/mui/Button/outlinedButton.js +0 -36
  96. package/dist/mui/Button/textButton.d.ts +0 -2
  97. package/dist/mui/Button/textButton.js +0 -32
  98. package/dist/mui/Button/utils.d.ts +0 -23
  99. package/dist/mui/Button/utils.js +0 -42
  100. package/dist/mui/ButtonGroup/ButtonGroup.d.ts +0 -2
  101. package/dist/mui/ButtonGroup/ButtonGroup.js +0 -47
  102. package/dist/mui/Container/MuiContainer.d.ts +0 -2
  103. package/dist/mui/Container/MuiContainer.js +0 -19
  104. package/dist/mui/Dialog/MuiActions.d.ts +0 -2
  105. package/dist/mui/Dialog/MuiActions.js +0 -8
  106. package/dist/mui/Dialog/MuiTitle.d.ts +0 -2
  107. package/dist/mui/Dialog/MuiTitle.js +0 -16
@@ -5,8 +5,8 @@ import useMediaQuery from '@mui/material/useMediaQuery';
5
5
  import * as React from 'react';
6
6
  import { VariableSizeList } from 'react-window';
7
7
  import { ListRow } from './ListRow';
8
- import { debounce } from 'lodash';
9
8
  import { useRef } from 'react';
9
+ import debounce from '../../../methods/debounce';
10
10
  export const LISTBOX_PADDING = 8; // px
11
11
  export const ListBox = React.forwardRef(function ListBox(props, ref) {
12
12
  const { children, onReachEnd, isLoading, ...other } = props;
@@ -1,5 +1,5 @@
1
1
  import { FC } from "react";
2
- import "./color.css";
2
+ import "../../styles/datePicker.css";
3
3
  import { CalendarProps } from "react-multi-date-picker";
4
4
  import { BaseTextFieldProps } from "@mui/material/TextField/TextField";
5
5
  import { TInputLabelMode } from "../input-list/type";
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useEffect, useState } from "react";
3
- import "./color.css";
3
+ import "../../styles/datePicker.css";
4
4
  import DatePicker from "react-multi-date-picker";
5
5
  import CustomComponent from "./CustomComponent";
6
6
  import { useTheme } from "@mui/material";
@@ -117,19 +117,19 @@ export const darkPalette = {
117
117
  1: "#cddbff",
118
118
  },
119
119
  inherit: {
120
- main: "inherit",
121
- light: "inherit",
122
- dark: "inherit",
123
- contrastText: "inherit",
124
- 10: "inherit",
125
- 9: "inherit",
126
- 8: "inherit",
127
- 7: "inherit",
128
- 6: "inherit",
129
- 5: "inherit",
130
- 4: "inherit",
131
- 3: "inherit",
132
- 2: "inherit",
133
- 1: "inherit",
120
+ light: "#212EBB",
121
+ dark: "#7B9EFE",
122
+ contrastText: "#FAFAFA",
123
+ main: "#3440C1",
124
+ 10: "#212EBB",
125
+ 9: "#3440C1",
126
+ 8: "#4D59D7",
127
+ 7: "#646FED",
128
+ 6: "#727CF4",
129
+ 5: "#7984FF",
130
+ 4: "#6B91FB",
131
+ 3: "#7B9EFE",
132
+ 2: "#98B3FE",
133
+ 1: "#cddbff",
134
134
  },
135
135
  };
@@ -117,19 +117,19 @@ export const lightPalette = {
117
117
  1: "#cddbff",
118
118
  },
119
119
  inherit: {
120
- main: "inherit",
121
- light: "inherit",
122
- dark: "inherit",
123
- contrastText: "inherit",
124
- 10: "inherit",
125
- 9: "inherit",
126
- 8: "inherit",
127
- 7: "inherit",
128
- 6: "inherit",
129
- 5: "inherit",
130
- 4: "inherit",
131
- 3: "inherit",
132
- 2: "inherit",
133
- 1: "inherit",
120
+ light: "#212EBB",
121
+ dark: "#7B9EFE",
122
+ contrastText: "#FAFAFA",
123
+ main: "#3440C1",
124
+ 10: "#212EBB",
125
+ 9: "#3440C1",
126
+ 8: "#4D59D7",
127
+ 7: "#646FED",
128
+ 6: "#727CF4",
129
+ 5: "#7984FF",
130
+ 4: "#6B91FB",
131
+ 3: "#7B9EFE",
132
+ 2: "#98B3FE",
133
+ 1: "#cddbff",
134
134
  },
135
135
  };
@@ -0,0 +1,113 @@
1
+ :root {
2
+ --rmdp-primary-theme: #3d9970;
3
+ --rmdp-secondary-theme: #87ad92;
4
+ --rmdp-shadow-theme: #87ad92;
5
+ --rmdp-today-theme: #01ff70;
6
+ --rmdp-hover-theme: #2ecc40;
7
+ --rmdp-deselect-theme: #39795c;
8
+ --rmdp-background-theme: #fff;
9
+ --rmdp-text-theme: #000
10
+ }
11
+
12
+ .custom-calender .rmdp-wrapper {
13
+ border: 1px solid var(--rmdp-secondary-theme);
14
+ box-shadow: 0 0 5px var(--rmdp-secondary-theme);
15
+ background-color: var(--rmdp-primary-theme);
16
+ }
17
+
18
+ .custom-calender .rmdp-panel-body li {
19
+ background-color: var(--rmdp-primary-theme);
20
+ box-shadow: 0 0 2px var(--rmdp-secondary-theme);
21
+ }
22
+
23
+ .custom-calender .rmdp-week-day {
24
+ color: var(--rmdp-primary-theme);
25
+ }
26
+
27
+ .custom-calender .rmdp-day.rmdp-deactive {
28
+ color: var(--rmdp-secondary-theme);
29
+ }
30
+
31
+ .custom-calender .rmdp-range {
32
+ background-color: var(--rmdp-primary-theme);
33
+ box-shadow: 0 0 3px var(--rmdp-shadow-theme);
34
+ }
35
+
36
+ .custom-calender .rmdp-arrow {
37
+ border: solid var(--rmdp-primary-theme);
38
+ border-width: 0 2px 2px 0;
39
+ }
40
+
41
+ .custom-calender .rmdp-arrow-container:hover {
42
+ background-color: var(--rmdp-primary-theme);
43
+ box-shadow: 0 0 3px var(--rmdp-secondary-theme);
44
+ }
45
+
46
+ .custom-calender .rmdp-panel-body::-webkit-scrollbar-thumb {
47
+ background: var(--rmdp-primary-theme);
48
+ }
49
+
50
+ .custom-calender .rmdp-day.rmdp-today span {
51
+ background-color: var(--rmdp-today-theme);
52
+ }
53
+
54
+ .custom-calender .rmdp-rtl .rmdp-panel {
55
+ border-left: unset;
56
+ border-right: 1px solid var(--rmdp-secondary-theme);
57
+ }
58
+
59
+ .custom-calender .rmdp-day.rmdp-selected span:not(.highlight) {
60
+ background-color: var(--rmdp-primary-theme);
61
+ box-shadow: 0 0 3px var(--rmdp-shadow-theme);
62
+ }
63
+
64
+ .custom-calender .rmdp-day:not(.rmdp-day-hidden) span:hover {
65
+ background-color: var(--rmdp-hover-theme) !important;
66
+ }
67
+
68
+ .custom-calender .b-deselect {
69
+ color: var(--rmdp-deselect-theme);
70
+ background-color: white;
71
+ }
72
+
73
+ .custom-calender .rmdp-action-button {
74
+ color: var(--rmdp-primary-theme);
75
+ }
76
+
77
+ .custom-calender .rmdp-button:not(.rmdp-action-button) {
78
+ background-color: var(--rmdp-primary-theme);
79
+ }
80
+
81
+ .custom-calender .rmdp-button:not(.rmdp-action-button):hover {
82
+ background-color: var(--rmdp-deselect-theme);
83
+ }
84
+
85
+ .rmdp-wrapper {
86
+ background-color: var(--rmdp-background-theme) !important;
87
+ }
88
+
89
+ .rmdp-time-picker div input {
90
+ font-family: inherit;
91
+ background-color: var(--rmdp-background-theme) !important;
92
+ color: var(--rmdp-text-theme) !important;
93
+ }
94
+
95
+ .rmdp-time-picker {
96
+ color: var(--rmdp-text-theme) !important;
97
+ }
98
+
99
+ .rmdp-ep-arrow:after {
100
+ background-color: var(--rmdp-background-theme) !important;
101
+ }
102
+
103
+ .rmdp-ep-arrow {
104
+ border-color: var(--rmdp-background-theme) !important;
105
+ }
106
+
107
+ .rmdp-header-values {
108
+ color: var(--rmdp-text-theme) !important;
109
+ }
110
+
111
+ .rmdp-day {
112
+ color: var(--rmdp-text-theme) !important;
113
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mui-design-system",
3
- "version": "0.0.10",
3
+ "version": "0.0.12",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -13,7 +13,7 @@
13
13
  "dist"
14
14
  ],
15
15
  "scripts": {
16
- "build": "tsc",
16
+ "build": "tsc && node copy-files.js",
17
17
  "prepublishOnly": "npm run build",
18
18
  "test": "echo \"Error: no test specified\" && exit 1"
19
19
  },
@@ -1,7 +0,0 @@
1
- import type { SVGProps } from 'react';
2
- interface Props extends SVGProps<SVGSVGElement> {
3
- primarycolor?: string;
4
- secondarycolor?: string;
5
- }
6
- declare const SvgAlertCircle: ({ primarycolor, secondarycolor, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
7
- export default SvgAlertCircle;
@@ -1,3 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- const SvgAlertCircle = ({ primarycolor, secondarycolor, ...props }) => (_jsx("svg", { xmlns: 'http://www.w3.org/2000/svg', viewBox: '0 0 24 24', fill: 'none', ...props, children: _jsx("path", { fill: primarycolor || '#D03430', fillRule: 'evenodd', d: 'M2 12C2 6.48 6.48 2 12 2c5.53 0 10 4.48 10 10s-4.47 10-10 10C6.48 22 2 17.52 2 12Zm9.12-3.79c0-.48.4-.88.88-.88s.87.4.87.88v4.42a.87.87 0 0 1-.87.87.879.879 0 0 1-.88-.87V8.21Zm.89 8.47c-.49 0-.88-.4-.88-.88s.39-.87.87-.87c.49 0 .88.39.88.87s-.39.88-.87.88Z', clipRule: 'evenodd' }) }));
3
- export default SvgAlertCircle;
@@ -1,7 +0,0 @@
1
- import type { SVGProps } from "react";
2
- interface Props extends SVGProps<any> {
3
- primarycolor?: string;
4
- secondarycolor?: string;
5
- }
6
- declare const SvgCalendar: ({ primarycolor, secondarycolor, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
7
- export default SvgCalendar;
@@ -1,3 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- const SvgCalendar = ({ primarycolor, secondarycolor, ...props }) => (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, fill: secondarycolor || "none", viewBox: "0 0 24 24", ...props, children: [_jsx("path", { stroke: primarycolor || "#1A1A1A", strokeLinecap: "round", strokeLinejoin: "round", strokeMiterlimit: 10, strokeWidth: 1.5, d: "M8 2v3M16 2v3M3.5 9.09h17M21 8.5V17c0 3-1.5 5-5 5H8c-3.5 0-5-2-5-5V8.5c0-3 1.5-5 5-5h8c3.5 0 5 2 5 5" }), _jsx("path", { stroke: primarycolor || "#1A1A1A", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15.695 13.7h.009M15.695 16.7h.009M11.996 13.7h.008M11.996 16.7h.008M8.294 13.7h.01M8.294 16.7h.01" })] }));
3
- export default SvgCalendar;
@@ -1,7 +0,0 @@
1
- import type { SVGProps } from 'react';
2
- interface Props extends SVGProps<any> {
3
- primarycolor?: string;
4
- secondarycolor?: string;
5
- }
6
- declare const SvgChevronDown: ({ primarycolor, secondarycolor, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
7
- export default SvgChevronDown;
@@ -1,3 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- const SvgChevronDown = ({ primarycolor, secondarycolor, ...props }) => (_jsx("svg", { xmlns: 'http://www.w3.org/2000/svg', width: 18, height: 18, fill: secondarycolor || 'none', viewBox: '0 0 24 24', ...props, children: _jsx("path", { fill: '#6A6A6A', d: 'M2.92 5.878a.586.586 0 0 1 .756-.056l.065.056 5.01 4.947 5.008-4.947a.586.586 0 0 1 .756-.056l.065.056a.569.569 0 0 1 .056.746l-.056.065-5.42 5.353a.586.586 0 0 1-.755.055l-.065-.055-5.42-5.353a.569.569 0 0 1 0-.811Z' }) }));
3
- export default SvgChevronDown;
@@ -1,7 +0,0 @@
1
- import type { SVGProps } from "react";
2
- interface Props extends SVGProps<any> {
3
- primarycolor?: string;
4
- secondarycolor?: string;
5
- }
6
- declare const SvgDocumentDownload: ({ primarycolor, secondarycolor, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
7
- export default SvgDocumentDownload;
@@ -1,3 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- const SvgDocumentDownload = ({ primarycolor, secondarycolor, ...props }) => (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, fill: secondarycolor || "none", viewBox: "0 0 24 24", ...props, children: [_jsx("path", { stroke: primarycolor || "#1A1A1A", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M9 11v6l2-2M9 17l-2-2" }), _jsx("path", { stroke: primarycolor || "#1A1A1A", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M22 10v5c0 5-2 7-7 7H9c-5 0-7-2-7-7V9c0-5 2-7 7-7h5" }), _jsx("path", { stroke: primarycolor || "#1A1A1A", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M22 10h-4c-3 0-4-1-4-4V2z" })] }));
3
- export default SvgDocumentDownload;
@@ -1,7 +0,0 @@
1
- import type { SVGProps } from "react";
2
- interface Props extends SVGProps<any> {
3
- primarycolor?: string;
4
- secondarycolor?: string;
5
- }
6
- declare const SvgFolderAdd: ({ primarycolor, secondarycolor, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
7
- export default SvgFolderAdd;
@@ -1,3 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- const SvgFolderAdd = ({ primarycolor, secondarycolor, ...props }) => (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, fill: secondarycolor || "none", viewBox: "0 0 24 24", ...props, children: [_jsx("path", { stroke: primarycolor || "#1A1A1A", strokeLinecap: "round", strokeLinejoin: "round", strokeMiterlimit: 10, strokeWidth: 1.5, d: "M12.06 16.5v-5M14.5 14h-5" }), _jsx("path", { stroke: primarycolor || "#1A1A1A", strokeMiterlimit: 10, strokeWidth: 1.5, d: "M22 11v6c0 4-1 5-5 5H7c-4 0-5-1-5-5V7c0-4 1-5 5-5h1.5c1.5 0 1.83.44 2.4 1.2l1.5 2c.38.5.6.8 1.6.8h3c4 0 5 1 5 5Z" })] }));
3
- export default SvgFolderAdd;
@@ -1,7 +0,0 @@
1
- import type { SVGProps } from "react";
2
- interface Props extends SVGProps<any> {
3
- primarycolor?: string;
4
- secondarycolor?: string;
5
- }
6
- declare const SvgInfoCircle: ({ primarycolor, secondarycolor, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
7
- export default SvgInfoCircle;
@@ -1,3 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- const SvgInfoCircle = ({ primarycolor, secondarycolor, ...props }) => (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, fill: secondarycolor || "none", viewBox: "0 0 24 24", ...props, children: [_jsx("path", { stroke: primarycolor || "#1A1A1A", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10M12 8v5" }), _jsx("path", { stroke: primarycolor || "#1A1A1A", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M11.995 16h.009" })] }));
3
- export default SvgInfoCircle;
@@ -1,7 +0,0 @@
1
- import type { SVGProps } from 'react';
2
- interface Props extends SVGProps<SVGSVGElement> {
3
- primarycolor?: string;
4
- secondarycolor?: string;
5
- }
6
- declare const SvgInfoSquare: ({ primarycolor, secondarycolor, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
7
- export default SvgInfoSquare;
@@ -1,3 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- const SvgInfoSquare = ({ primarycolor, secondarycolor, ...props }) => (_jsx("svg", { xmlns: 'http://www.w3.org/2000/svg', viewBox: '0 0 24 24', fill: 'none', ...props, children: _jsx("path", { fill: '#1B7CD0', fillRule: 'evenodd', d: 'M7.67 2h8.67C19.73 2 22 4.38 22 7.92v8.17c0 3.53-2.27 5.91-5.66 5.91H7.67C4.28 22 2 19.62 2 16.09V7.92C2 4.38 4.28 2 7.67 2Zm4.32 7.06a.87.87 0 0 1-.86-.87.875.875 0 1 1 .86.87Zm.88 6.72c0 .48-.39.87-.88.87a.87.87 0 0 1-.87-.87v-4.42c0-.48.39-.88.87-.88.49 0 .88.4.88.88v4.42Z', clipRule: 'evenodd' }) }));
3
- export default SvgInfoSquare;
@@ -1,7 +0,0 @@
1
- import type { SVGProps } from 'react';
2
- interface Props extends SVGProps<SVGSVGElement> {
3
- primarycolor?: string;
4
- secondarycolor?: string;
5
- }
6
- declare const SvgSuccessSquare: ({ primarycolor, secondarycolor, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
7
- export default SvgSuccessSquare;
@@ -1,3 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- const SvgSuccessSquare = ({ primarycolor, secondarycolor, ...props }) => (_jsx("svg", { xmlns: 'http://www.w3.org/2000/svg', viewBox: '0 0 24 24', fill: secondarycolor || 'none', ...props, children: _jsx("path", { fill: primarycolor || '#307232', fillRule: 'evenodd', d: 'M7.67 2h8.67C19.73 2 22 4.38 22 7.92v8.171C22 19.62 19.73 22 16.34 22H7.67C4.28 22 2 19.62 2 16.091V7.92C2 4.38 4.28 2 7.67 2Zm3.76 12.99 4.75-4.75c.34-.34.34-.89 0-1.24a.881.881 0 0 0-1.24 0l-4.13 4.13-1.75-1.75a.881.881 0 0 0-1.24 0c-.34.34-.34.89 0 1.24l2.38 2.37c.17.17.39.25.61.25.23 0 .45-.08.62-.25Z', clipRule: 'evenodd' }) }));
3
- export default SvgSuccessSquare;
@@ -1,7 +0,0 @@
1
- import type { SVGProps } from "react";
2
- interface Props extends SVGProps<any> {
3
- primarycolor?: string;
4
- secondarycolor?: string;
5
- }
6
- declare const SvgTrash: ({ primarycolor, secondarycolor, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
7
- export default SvgTrash;
@@ -1,3 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- const SvgTrash = ({ primarycolor, secondarycolor, ...props }) => (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, fill: secondarycolor || "none", viewBox: "0 0 24 24", ...props, children: _jsx("path", { stroke: primarycolor || "#1A1A1A", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M21 5.98c-3.33-.33-6.68-.5-10.02-.5-1.98 0-3.96.1-5.94.3L3 5.98M8.5 4.97l.22-1.31C8.88 2.71 9 2 10.69 2h2.62c1.69 0 1.82.75 1.97 1.67l.22 1.3M18.85 9.14l-.65 10.07C18.09 20.78 18 22 15.21 22H8.79C6 22 5.91 20.78 5.8 19.21L5.15 9.14M10.33 16.5h3.33M9.5 12.5h5" }) }));
3
- export default SvgTrash;
@@ -1,7 +0,0 @@
1
- import type { SVGProps } from "react";
2
- interface Props extends SVGProps<any> {
3
- primarycolor?: string;
4
- secondarycolor?: string;
5
- }
6
- declare const SvgUnion: ({ primarycolor, secondarycolor, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
7
- export default SvgUnion;
@@ -1,3 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- const SvgUnion = ({ primarycolor, secondarycolor, ...props }) => (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: 14, height: 19, fill: secondarycolor || "none", viewBox: "0 0 16 24", ...props, children: _jsx("path", { fill: primarycolor || "#1A1A1A", fillRule: "evenodd", d: "M8.534 2.106a.75.75 0 0 0-1.07-1.052l-6.407 6.52a2.76 2.76 0 0 0 0 3.852l6.407 6.52a.75.75 0 0 0 1.07-1.052l-6.407-6.52a1.26 1.26 0 0 1 0-1.748zm4.977 0a.75.75 0 1 0-1.07-1.052l-6.408 6.52a2.76 2.76 0 0 0 0 3.852l6.408 6.52a.75.75 0 0 0 1.07-1.052l-6.408-6.52a1.26 1.26 0 0 1 0-1.748z", clipRule: "evenodd" }) }));
3
- export default SvgUnion;
@@ -1,7 +0,0 @@
1
- import type { SVGProps } from 'react';
2
- interface Props extends SVGProps<SVGSVGElement> {
3
- primarycolor?: string;
4
- secondarycolor?: string;
5
- }
6
- declare const SvgWarning: ({ primarycolor, secondarycolor, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
7
- export default SvgWarning;
@@ -1,3 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- const SvgWarning = ({ primarycolor, secondarycolor, ...props }) => (_jsx("svg", { xmlns: 'http://www.w3.org/2000/svg', fill: 'none', viewBox: '0 0 24 24', ...props, children: _jsx("path", { fill: '#E6C530', fillRule: 'evenodd', d: 'm14.477 4.442 7.269 12.615c.16.377.23.683.25 1.001a2.76 2.76 0 0 1-.73 2.022c-.51.554-1.2.88-1.95.92H4.68c-.31-.019-.62-.09-.91-.198-1.45-.585-2.15-2.23-1.56-3.655L9.53 4.432a2.73 2.73 0 0 1 1.099-1.08 2.85 2.85 0 0 1 3.85 1.09Zm-1.61 8.314c0 .476-.39.873-.87.873a.885.885 0 0 1-.88-.873V9.953c0-.477.4-.862.88-.862s.87.385.87.862v2.803Zm-.87 4.262a.884.884 0 0 1-.88-.872c0-.477.4-.873.88-.873s.87.387.87.862c0 .485-.39.883-.87.883Z', clipRule: 'evenodd' }) }));
3
- export default SvgWarning;
@@ -1,8 +0,0 @@
1
- import { FC, ReactNode } from "react";
2
- interface IConfirmModal {
3
- onCancel: () => void;
4
- onConfirm: () => void;
5
- children: ReactNode;
6
- }
7
- declare const ConfirmModal: FC<IConfirmModal>;
8
- export default ConfirmModal;
@@ -1,10 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- //Mui
3
- import Stack from "@mui/material/Stack";
4
- import Button from "@mui/material/Button";
5
- const ConfirmModal = ({ children, onCancel, onConfirm }) => {
6
- //Dependencies
7
- //Handlers
8
- return (_jsx(_Fragment, { children: _jsxs(Stack, { justifyContent: "space-evenly", alignItems: "center", sx: { height: 255, width: 500 }, children: [children, _jsxs(Stack, { direction: "row", gap: 10, children: [_jsx(Button, { variant: "outlined", color: "error", sx: { width: 150 }, onClick: () => onCancel(), children: "\u062E\u06CC\u0631" }), _jsx(Button, { variant: "contained", sx: { width: 150 }, onClick: () => onConfirm(), children: "\u0628\u0644\u0647" })] })] }) }));
9
- };
10
- export default ConfirmModal;
@@ -1,9 +0,0 @@
1
- import React, { FC } from "react";
2
- interface Props {
3
- children: React.ReactNode;
4
- onDelete?: () => void;
5
- onCancel?: () => void;
6
- open: boolean;
7
- }
8
- declare const DeleteModal: FC<Props>;
9
- export default DeleteModal;
@@ -1,17 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import Stack from "@mui/material/Stack";
3
- import Box from "@mui/material/Box";
4
- import { Button } from "@mui/material";
5
- import CustomModal from "./CustomModal";
6
- import SvgTrash from "../../icons/Trash";
7
- const DeleteModal = ({ onDelete, onCancel, children, open }) => {
8
- return (_jsx(CustomModal, { open: open, onClose: onCancel, withoutDivider: true, boxProps: {
9
- width: 675,
10
- boxShadow: "0px 1px 1px rgba(3, 7, 18, 0.02),\n" +
11
- " 0px 5px 4px rgba(3, 7, 18, 0.03),\n" +
12
- " 0px 12px 9px rgba(3, 7, 18, 0.05),\n" +
13
- " 0px 20px 15px rgba(3, 7, 18, 0.06),\n" +
14
- " 0px 32px 24px rgba(3, 7, 18, 0.08);\n",
15
- }, children: _jsxs(Stack, { alignItems: "center", gap: 6, mb: 4, mt: 4, children: [_jsx(SvgTrash, { width: 100, height: 100, primarycolor: 'red' }), children, _jsxs(Box, { display: "flex", gap: 5, width: 300, children: [_jsx(Button, { variant: "outlined", fullWidth: true, onClick: onDelete, children: "\u0628\u0644\u0647" }), _jsx(Button, { variant: "contained", fullWidth: true, onClick: onCancel, children: "\u062E\u06CC\u0631" })] })] }) }));
16
- };
17
- export default DeleteModal;
@@ -1,9 +0,0 @@
1
- import { FC, ReactNode } from "react";
2
- import { TextFieldProps } from "@mui/material/TextField";
3
- export interface ICustomNumericInputProps extends Omit<TextFieldProps, "onChange" | "value"> {
4
- onChange?: (value: string | number) => void;
5
- value?: string | number;
6
- currencyIcon?: ReactNode;
7
- }
8
- declare const CustomNumericInput: FC<ICustomNumericInputProps>;
9
- export default CustomNumericInput;
@@ -1,32 +0,0 @@
1
- import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { useEffect, useState } from "react";
3
- import TextField from "@mui/material/TextField";
4
- const CustomNumericInput = ({ onChange, value, ...props }) => {
5
- useEffect(() => {
6
- setCustomValue(formatAsCurrency(value));
7
- }, [value]);
8
- const [customValue, setCustomValue] = useState(formatAsCurrency(value));
9
- function formatAsCurrency(number) {
10
- // Use toLocaleString to format the number as currency
11
- return number?.toLocaleString(); // Remove 'USD' and a space at the beginning
12
- }
13
- function convertCurrencyToNumber(currencyString) {
14
- // Replace Persian numerals with Arabic numerals
15
- const numericString = currencyString.replace(/[۰-۹]/g, (match) => String.fromCharCode(match.charCodeAt(0) - 1728));
16
- // Remove all non-numeric characters except for the decimal point
17
- const sanitizedNumericString = numericString.replace(/[^0-9.]/g, "");
18
- // Parse the numeric string to a floating-point number
19
- const numberValue = parseFloat(sanitizedNumericString);
20
- // Check if the parsed value is a valid number (not NaN)
21
- return isNaN(numberValue) ? "" : numberValue;
22
- }
23
- const handleChange = (e) => {
24
- const value = e.target.value;
25
- setCustomValue(formatAsCurrency(convertCurrencyToNumber(value)));
26
- if (onChange) {
27
- onChange(convertCurrencyToNumber(value));
28
- }
29
- };
30
- return (_jsx(_Fragment, { children: _jsx(TextField, { fullWidth: true, className: "numeric-input", value: customValue, onChange: handleChange, ...props }) }));
31
- };
32
- export default CustomNumericInput;
@@ -1,6 +0,0 @@
1
- import { BoxProps } from '@mui/material/Box';
2
- import { ITablePagination } from '../../custom-table/types';
3
- export interface ICustomPagination1Props {
4
- pagination: ITablePagination;
5
- boxProps?: BoxProps;
6
- }
@@ -1,77 +0,0 @@
1
- import React, { ReactNode } from 'react';
2
- import { Cell, Row, ColumnDef, TableOptions, Table as TableType } from '@tanstack/react-table';
3
- import { SystemStyleObject } from '@mui/system';
4
- import { StackProps } from '@mui/material/Stack';
5
- import { TypographyProps } from '@mui/material/Typography';
6
- import { RadioProps } from '@mui/material/Radio';
7
- import { ITableFooterProps } from '../custom-pagination/custom-pagination-2/CustomPagination2';
8
- import { CheckboxProps as MuiCheckboxProps } from '@mui/material/Checkbox';
9
- export type TColumns = ColumnDef<any, any>[];
10
- export interface IUseTableProps extends Partial<Omit<TableOptions<any>, 'getRowId'>> {
11
- columns: ColumnDef<any, any>[];
12
- data: any;
13
- pageSize?: number;
14
- multiSelect?: boolean;
15
- onSelectRow?: (data: any) => void;
16
- getRowId?: string;
17
- renderSubComponent?: (props: {
18
- row: Row<any>;
19
- }) => React.ReactElement;
20
- getRowCanExpand?: (row: Row<any>) => boolean;
21
- }
22
- export interface ITablePagination {
23
- pageIndex: number;
24
- pageSize: number;
25
- pageCounts: number;
26
- onChangePage: (pageIndex: number) => void;
27
- onChangePageSize?: (pageSize: number) => void;
28
- }
29
- export interface ITableRowStyle {
30
- row: Row<any>;
31
- hover?: boolean;
32
- }
33
- export interface ITableCellsStyle {
34
- row: Row<any>;
35
- cell?: Cell<any, any>;
36
- hover?: boolean;
37
- }
38
- export type TRowStyle = (props: ITableRowStyle) => SystemStyleObject;
39
- export type TCellsStyle = (props: ITableCellsStyle) => SystemStyleObject;
40
- export interface ICheckboxProps extends Omit<MuiCheckboxProps, 'onChange'> {
41
- onChange?: (event: React.ChangeEvent<HTMLInputElement>, checked: boolean, row?: Row<any>) => void;
42
- }
43
- export type TCheckboxProps = ((props: {
44
- row?: Row<any>;
45
- table: TableType<any>;
46
- }) => ICheckboxProps) | ICheckboxProps;
47
- export type TTableVariants = 'zebra' | 'linear';
48
- export interface ICustomTable {
49
- id?: string;
50
- pagination?: ITablePagination;
51
- table: TableType<any>;
52
- variant?: TTableVariants;
53
- wrapperStackProps?: StackProps;
54
- footerProps?: Omit<ITableFooterProps, 'pagination'>;
55
- onClickRow?: (row: Row<any>) => void;
56
- renderSubComponent?: any;
57
- isLoading?: boolean;
58
- isError?: boolean;
59
- withRadio?: boolean;
60
- withSelect?: boolean;
61
- withIndex?: boolean;
62
- rowStyle?: TRowStyle;
63
- cellsStyle?: TCellsStyle;
64
- headerStyle?: SystemStyleObject;
65
- headerTypoProps?: TypographyProps;
66
- checkboxProps?: TCheckboxProps;
67
- radioProps?: RadioProps;
68
- emptyListComponent?: string | ReactNode;
69
- rowBorderRadius?: number;
70
- borderRadius?: number;
71
- }
72
- export interface ITableAction {
73
- label: string | React.ReactNode;
74
- icon?: React.ReactElement;
75
- onClick?: () => void;
76
- disabled?: boolean;
77
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,7 +0,0 @@
1
- import { FC } from 'react';
2
- interface SkeletonProps {
3
- skeletonWidth?: string | number;
4
- skeletonHeight?: string | number;
5
- }
6
- declare const LoadingComponent: FC<SkeletonProps>;
7
- export default LoadingComponent;
@@ -1,6 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import Skeleton from '@mui/material/Skeleton';
3
- const LoadingComponent = ({ skeletonHeight = '100%', skeletonWidth = '100%', }) => {
4
- return (_jsx(Skeleton, { variant: 'rectangular', width: skeletonWidth, height: skeletonHeight, sx: { borderRadius: 1, minHeight: '40px', maxHeight: '55px' } }));
5
- };
6
- export default LoadingComponent;
@@ -1,21 +0,0 @@
1
- import { FC } from "react";
2
- import { UseFormReturn } from "react-hook-form";
3
- import { GridProps } from "@mui/material/Grid";
4
- import { TypographyProps } from "@mui/material/Typography";
5
- import { TFormSchema, TInputLabelMode } from "./type";
6
- import { TextFieldProps } from "@mui/material/TextField";
7
- export interface FormProps {
8
- schema: TFormSchema;
9
- form: UseFormReturn<any, any, any>;
10
- gridContainerProps?: GridProps;
11
- gridItemProps?: GridProps;
12
- itemProps?: any;
13
- labelsProps?: Partial<TypographyProps<"label", {}>> | undefined;
14
- hideRequiredStar?: boolean;
15
- inputLabelMode?: TInputLabelMode;
16
- inputVariants?: TextFieldProps["variant"];
17
- withoutHelperText?: boolean;
18
- disabled?: boolean;
19
- }
20
- declare const Form: FC<FormProps>;
21
- export default Form;