mui-design-system 0.0.35 → 0.0.36
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/components/custom-date-picker/CustomComponent.d.ts +1 -1
- package/dist/components/custom-date-picker/CustomDatePicker.d.ts +1 -1
- package/dist/components/custom-table/components/CustomTableBody.js +2 -2
- package/dist/components/custom-table/components/CustomTableHead.js +2 -2
- package/dist/components/custom-table/components/CustomTableRow.js +4 -4
- package/dist/components/form/Form.d.ts +1 -1
- package/dist/components/form/Form.js +1 -1
- package/dist/components/form/components/UFCheckbox.d.ts +1 -2
- package/dist/components/form/components/UFCheckbox.js +1 -0
- package/dist/components/form/type.d.ts +1 -1
- package/dist/mui/AutoComplete/MuiAutoComplete.js +1 -1
- package/dist/mui/Button/MuiButton.d.ts +1 -1
- package/dist/mui/Button/MuiButton.js +3 -3
- package/dist/mui/Dialog/MuiDialog.js +1 -1
- package/dist/mui/Tabs/Tab/MuiTab.js +1 -1
- package/dist/mui/TextField/MuiFilledInput.js +1 -1
- package/dist/mui/TextField/TextField.js +1 -1
- package/dist/mui/Typography/index.d.ts +2 -2
- package/dist/mui/palette/dark/darkPalette.d.ts +1 -1
- package/dist/mui/palette/light/lightPalette.d.ts +1 -1
- package/dist/types/palette.d.ts +6 -10
- package/dist/types/typography.js +1 -0
- package/package.json +6 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { TextFieldVariants } from '@mui/material';
|
|
3
|
-
import { BaseTextFieldProps } from '@mui/material/TextField
|
|
3
|
+
import type { BaseTextFieldProps } from '@mui/material/TextField';
|
|
4
4
|
import { TInputLabelMode } from '../form/type';
|
|
5
5
|
interface Props extends BaseTextFieldProps {
|
|
6
6
|
openCalendar: any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FC } from "react";
|
|
2
2
|
import "../../styles/datePicker.css";
|
|
3
3
|
import { CalendarProps } from "react-multi-date-picker";
|
|
4
|
-
import { BaseTextFieldProps } from "@mui/material/TextField
|
|
4
|
+
import type { BaseTextFieldProps } from "@mui/material/TextField";
|
|
5
5
|
import { TInputLabelMode } from "../form/type";
|
|
6
6
|
export interface ICustomDatePickerProps extends CalendarProps {
|
|
7
7
|
error: any;
|
|
@@ -16,10 +16,10 @@ const CustomTableBody = ({ table, onClickRow, renderSubComponent, withSelect, wi
|
|
|
16
16
|
'& tr:last-child': {
|
|
17
17
|
'& > td > div': { border: 'unset' },
|
|
18
18
|
'& > td:first-child > div': {
|
|
19
|
-
borderEndStartRadius: borderRadius * theme.shape.borderRadius,
|
|
19
|
+
borderEndStartRadius: borderRadius * Number(theme.shape.borderRadius),
|
|
20
20
|
},
|
|
21
21
|
'& > td:last-child > div': {
|
|
22
|
-
borderEndEndRadius: borderRadius * theme.shape.borderRadius,
|
|
22
|
+
borderEndEndRadius: borderRadius * Number(theme.shape.borderRadius),
|
|
23
23
|
},
|
|
24
24
|
},
|
|
25
25
|
}, children: table?.getRowModel()?.rows?.map((row, i) => {
|
|
@@ -23,10 +23,10 @@ const CustomTableHead = ({ table, variant, withSelect, withRadio, withIndex, hea
|
|
|
23
23
|
bgcolor: 'surface.secondary',
|
|
24
24
|
borderBottom: (theme) => `1px solid ${theme.palette.divider}`,
|
|
25
25
|
'& th:first-of-type': {
|
|
26
|
-
borderRadius: `${borderRadius * theme
|
|
26
|
+
borderRadius: `${borderRadius * Number(theme.shape.borderRadius)}px 0 0 ${rowBorderRadius * Number(theme.shape.borderRadius)}px`,
|
|
27
27
|
},
|
|
28
28
|
'& th:last-child': {
|
|
29
|
-
borderRadius: `0 ${borderRadius * theme
|
|
29
|
+
borderRadius: `0 ${borderRadius * Number(theme.shape.borderRadius)}px ${rowBorderRadius * Number(theme.shape.borderRadius)}px 0`,
|
|
30
30
|
},
|
|
31
31
|
'& th': {
|
|
32
32
|
border: variant === 'linear' ? 0 : '',
|
|
@@ -20,12 +20,12 @@ const CustomTableRow = ({ row, onClickRow, renderSubComponent, withSelect, withI
|
|
|
20
20
|
height: { xs: 44, md: 56 },
|
|
21
21
|
cursor: onClickRow ? 'pointer' : '',
|
|
22
22
|
'& td:first-of-type > div': {
|
|
23
|
-
borderEndStartRadius: rowBorderRadius * theme
|
|
24
|
-
borderStartStartRadius: rowBorderRadius * theme
|
|
23
|
+
borderEndStartRadius: rowBorderRadius * Number(theme.shape.borderRadius),
|
|
24
|
+
borderStartStartRadius: rowBorderRadius * Number(theme.shape.borderRadius),
|
|
25
25
|
},
|
|
26
26
|
'& td:last-child > div': {
|
|
27
|
-
borderEndEndRadius: rowBorderRadius * theme
|
|
28
|
-
borderStartEndRadius: rowBorderRadius * theme
|
|
27
|
+
borderEndEndRadius: rowBorderRadius * Number(theme.shape.borderRadius),
|
|
28
|
+
borderStartEndRadius: rowBorderRadius * Number(theme.shape.borderRadius),
|
|
29
29
|
},
|
|
30
30
|
...(rowStyle ? rowStyle({ row }) : {}),
|
|
31
31
|
'& td > div': {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FC } from "react";
|
|
2
2
|
import { UseFormReturn } from "react-hook-form";
|
|
3
|
-
import { GridProps } from "@mui/material/
|
|
3
|
+
import { GridLegacyProps as GridProps } from "@mui/material/GridLegacy";
|
|
4
4
|
import { TypographyProps } from "@mui/material/Typography";
|
|
5
5
|
import { TFormSchema, TInputLabelMode } from "./type";
|
|
6
6
|
import { TextFieldProps } from "@mui/material/TextField";
|
|
@@ -3,7 +3,7 @@ import { isValidElement } from "react";
|
|
|
3
3
|
//------------------------------------------------------------------------
|
|
4
4
|
//@Mui
|
|
5
5
|
import Box from "@mui/material/Box";
|
|
6
|
-
import Grid from "@mui/material/
|
|
6
|
+
import Grid from "@mui/material/GridLegacy";
|
|
7
7
|
import Stack from "@mui/material/Stack";
|
|
8
8
|
import Typography from "@mui/material/Typography";
|
|
9
9
|
import UseFormInput from "./UseFormInput";
|
|
@@ -2,10 +2,9 @@ import { FC } from "react";
|
|
|
2
2
|
import { ICheckboxForm } from "../type";
|
|
3
3
|
import { CheckboxProps } from "@mui/material";
|
|
4
4
|
import { UseFormReturn } from "react-hook-form";
|
|
5
|
-
import { SwitchBaseProps } from "@mui/material/internal/SwitchBase";
|
|
6
5
|
import { TypographyProps } from "@mui/material/Typography";
|
|
7
6
|
export interface ICustomCheckboxProps {
|
|
8
|
-
inputProps:
|
|
7
|
+
inputProps: CheckboxProps["inputProps"];
|
|
9
8
|
slotProps: {
|
|
10
9
|
typography?: TypographyProps;
|
|
11
10
|
};
|
|
@@ -3,6 +3,7 @@ import Checkbox from "@mui/material/Checkbox";
|
|
|
3
3
|
import FormControl from "@mui/material/FormControl";
|
|
4
4
|
import { Controller } from "react-hook-form";
|
|
5
5
|
import FormControlLabel from "@mui/material/FormControlLabel";
|
|
6
|
+
// inputProps matches Checkbox's underlying input; avoid MUI internal SwitchBase (not in public API in MUI 7)
|
|
6
7
|
import Typography from "@mui/material/Typography";
|
|
7
8
|
import { useFormContext } from "../../../context/FormContext";
|
|
8
9
|
import { deepMerge } from "../../../methods/general";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GridProps } from '@mui/material/
|
|
1
|
+
import { GridLegacyProps as GridProps } from '@mui/material/GridLegacy';
|
|
2
2
|
import React, { ReactNode } from 'react';
|
|
3
3
|
import { RegisterOptions } from 'react-hook-form';
|
|
4
4
|
import { TypographyProps } from '@mui/material/Typography';
|
|
@@ -7,7 +7,7 @@ export const MuiAutoComplete = {
|
|
|
7
7
|
styleOverrides: {
|
|
8
8
|
root: ({ ownerState, theme }) => ({
|
|
9
9
|
position: 'relative',
|
|
10
|
-
borderRadius: theme.shape.borderRadius * 2,
|
|
10
|
+
borderRadius: Number(theme.shape.borderRadius) * 2,
|
|
11
11
|
'& .Mui-focused': {
|
|
12
12
|
height: 'auto !important',
|
|
13
13
|
},
|
|
@@ -10,7 +10,7 @@ export const MuiButton = {
|
|
|
10
10
|
root: ({ ownerState, theme }) => ({
|
|
11
11
|
fontWeight: 500,
|
|
12
12
|
outline: "0px solid",
|
|
13
|
-
borderRadius: theme.shape.borderRadius * 2,
|
|
13
|
+
borderRadius: Number(theme.shape.borderRadius) * 2,
|
|
14
14
|
minHeight: ownerState.size === "small" ? "36px" : "48px",
|
|
15
15
|
fontSize: ownerState.size === "small" ? 15 : 17,
|
|
16
16
|
width: ownerState.fullWidth ? "100%" : "max-content",
|
|
@@ -113,7 +113,7 @@ export const MuiButton = {
|
|
|
113
113
|
backgroundColor: theme.palette.background.default,
|
|
114
114
|
content: "''",
|
|
115
115
|
position: "absolute",
|
|
116
|
-
borderRadius: theme.shape.borderRadius * 2,
|
|
116
|
+
borderRadius: Number(theme.shape.borderRadius) * 2,
|
|
117
117
|
opacity: 0,
|
|
118
118
|
transition: "all 0.3s",
|
|
119
119
|
},
|
|
@@ -160,7 +160,7 @@ export const MuiButton = {
|
|
|
160
160
|
backgroundColor: theme.palette.background.default,
|
|
161
161
|
content: "''",
|
|
162
162
|
position: "absolute",
|
|
163
|
-
borderRadius: theme.shape.borderRadius * 2,
|
|
163
|
+
borderRadius: Number(theme.shape.borderRadius) * 2,
|
|
164
164
|
opacity: 0,
|
|
165
165
|
transition: "all 0.3s",
|
|
166
166
|
},
|
|
@@ -12,7 +12,7 @@ export const MuiDialog = {
|
|
|
12
12
|
...(ownerState.withoutBoxShadow && {
|
|
13
13
|
boxShadow: "none",
|
|
14
14
|
}),
|
|
15
|
-
borderRadius: theme.shape.borderRadius * 2,
|
|
15
|
+
borderRadius: Number(theme.shape.borderRadius) * 2,
|
|
16
16
|
minHeight: "340px",
|
|
17
17
|
minWidth: "500px",
|
|
18
18
|
padding: "16px 24px",
|
|
@@ -18,7 +18,7 @@ export const MuiTab = {
|
|
|
18
18
|
backgroundColor: theme.palette.mode === 'light' ? theme.palette.primary.main : theme.palette.text.primary,
|
|
19
19
|
color: theme.palette.mode === 'light' ? theme.palette.text.secondary : theme.palette.primary.main,
|
|
20
20
|
stroke: theme.palette.mode === 'light' ? theme.palette.text.secondary : theme.palette.primary.main,
|
|
21
|
-
borderRadius: theme.shape.borderRadius * 2,
|
|
21
|
+
borderRadius: Number(theme.shape.borderRadius) * 2,
|
|
22
22
|
fontWeight: 500,
|
|
23
23
|
},
|
|
24
24
|
}),
|
|
@@ -35,7 +35,7 @@ export const MuiFilledInput = {
|
|
|
35
35
|
//Temporary Added
|
|
36
36
|
paddingRight: 10,
|
|
37
37
|
border: `1px solid ${theme.palette.background[4]}`,
|
|
38
|
-
borderRadius: theme.shape.borderRadius * 2,
|
|
38
|
+
borderRadius: Number(theme.shape.borderRadius) * 2,
|
|
39
39
|
transition: 'all 0.2s ease',
|
|
40
40
|
color: theme.palette.mode === 'light'
|
|
41
41
|
? theme.palette.text.primary
|
|
@@ -36,7 +36,7 @@ export const MuiTextField = {
|
|
|
36
36
|
},
|
|
37
37
|
//Base Input & Text area components
|
|
38
38
|
'& .MuiInputBase-input': {
|
|
39
|
-
borderRadius: theme.shape.borderRadius / 2,
|
|
39
|
+
borderRadius: Number(theme.shape.borderRadius) / 2,
|
|
40
40
|
'&:-webkit-autofill': {
|
|
41
41
|
WebkitTextFillColor: theme.palette.text.primary,
|
|
42
42
|
transition: 'background-color 5000s ease-in-out 0s',
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const typography:
|
|
1
|
+
import type { TypographyVariantsOptions } from '@mui/material/styles';
|
|
2
|
+
export declare const typography: TypographyVariantsOptions;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { PaletteOptions } from '@mui/material/styles
|
|
1
|
+
import type { PaletteOptions } from '@mui/material/styles';
|
|
2
2
|
export declare const darkPalette: PaletteOptions;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { PaletteOptions } from '@mui/material/styles
|
|
1
|
+
import type { PaletteOptions } from '@mui/material/styles';
|
|
2
2
|
export declare const lightPalette: PaletteOptions;
|
package/dist/types/palette.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PaletteColor } from '@mui/material/styles
|
|
1
|
+
import type { PaletteColor } from '@mui/material/styles';
|
|
2
2
|
interface ICustomColor {
|
|
3
3
|
main?: string;
|
|
4
4
|
16?: string;
|
|
@@ -22,19 +22,17 @@ declare module '@mui/material' {
|
|
|
22
22
|
interface Color extends ICustomColor {
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
|
|
25
|
+
interface IPalette {
|
|
26
|
+
default: PaletteColor;
|
|
27
|
+
inherit: PaletteColor;
|
|
28
|
+
}
|
|
29
|
+
declare module '@mui/material/styles' {
|
|
26
30
|
interface PaletteColor extends ICustomColor {
|
|
27
31
|
}
|
|
28
32
|
interface SimplePaletteColorOptions extends ICustomColor {
|
|
29
33
|
}
|
|
30
34
|
interface TypeText extends ICustomColor {
|
|
31
35
|
}
|
|
32
|
-
}
|
|
33
|
-
interface IPalette {
|
|
34
|
-
default: PaletteColor;
|
|
35
|
-
inherit: PaletteColor;
|
|
36
|
-
}
|
|
37
|
-
declare module '@mui/material/styles' {
|
|
38
36
|
interface Palette extends IPalette {
|
|
39
37
|
}
|
|
40
38
|
interface PaletteOptions extends IPalette {
|
|
@@ -48,8 +46,6 @@ declare module '@mui/material/styles' {
|
|
|
48
46
|
3?: string;
|
|
49
47
|
4?: string;
|
|
50
48
|
}
|
|
51
|
-
}
|
|
52
|
-
declare module '@mui/material/styles/createPalette' {
|
|
53
49
|
interface PaletteColor {
|
|
54
50
|
main: string;
|
|
55
51
|
}
|
package/dist/types/typography.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mui-design-system",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.36",
|
|
4
4
|
"description": "MUI-based design system with theme, form components, and utilities",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"react-hook-form": "^7.51.2"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"@emotion/react": "^11.
|
|
40
|
-
"@emotion/styled": "^11.
|
|
41
|
-
"@mui/material": "^
|
|
42
|
-
"@mui/material-nextjs": "^
|
|
43
|
-
"@mui/styled-engine-sc": "^
|
|
39
|
+
"@emotion/react": "^11.14.0",
|
|
40
|
+
"@emotion/styled": "^11.14.1",
|
|
41
|
+
"@mui/material": "^7.3.9",
|
|
42
|
+
"@mui/material-nextjs": "^7.3.9",
|
|
43
|
+
"@mui/styled-engine-sc": "^7.3.9",
|
|
44
44
|
"styled-components": "^6.1.8",
|
|
45
45
|
"stylis-plugin-rtl": "^2.1.1",
|
|
46
46
|
"react": "^18.2.0",
|