norma-library 0.4.9 → 0.5.1
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/.babelrc.json +1 -1
- package/.husky/commit-msg +4 -0
- package/.prettierignore +11 -0
- package/.prettierrc.json +20 -0
- package/CHANGELOG.md +0 -0
- package/CONTRIBUTING.md +0 -0
- package/README.md +42 -0
- package/commitlint.config.js +1 -0
- package/dist/Button/index.d.ts +9 -0
- package/dist/Button/types.d.ts +18 -0
- package/dist/Card/Card.d.ts +3 -0
- package/dist/Card/CardHeader.d.ts +3 -0
- package/dist/Card/index.d.ts +4 -0
- package/dist/Card/styles.d.ts +546 -0
- package/dist/Card/types.d.ts +8 -0
- package/dist/esm/components/Accordion.d.ts +2 -2
- package/dist/esm/components/Accordion.js +8 -8
- package/dist/esm/components/Accordion.js.map +1 -1
- package/dist/esm/components/Avatar.d.ts +2 -2
- package/dist/esm/components/Avatar.js +7 -7
- package/dist/esm/components/Avatar.js.map +1 -1
- package/dist/esm/components/Badge.d.ts +2 -2
- package/dist/esm/components/Badge.js +5 -5
- package/dist/esm/components/Badge.js.map +1 -1
- package/dist/esm/components/Button.d.ts +2 -2
- package/dist/esm/components/Button.js +10 -10
- package/dist/esm/components/Button.js.map +1 -1
- package/dist/esm/components/Card.d.ts +3 -3
- package/dist/esm/components/Card.js +8 -8
- package/dist/esm/components/Card.js.map +1 -1
- package/dist/esm/components/ChatMessage.d.ts +2 -2
- package/dist/esm/components/ChatMessage.js +35 -35
- package/dist/esm/components/ChatMessage.js.map +1 -1
- package/dist/esm/components/CheckBox.d.ts +2 -2
- package/dist/esm/components/CheckBox.js +5 -5
- package/dist/esm/components/CheckBox.js.map +1 -1
- package/dist/esm/components/DataGrid/base/dropdown.d.ts +2 -2
- package/dist/esm/components/DataGrid/base/dropdown.js +32 -32
- package/dist/esm/components/DataGrid/base/dropdown.js.map +1 -1
- package/dist/esm/components/DataGrid/base/number-filter.d.ts +2 -2
- package/dist/esm/components/DataGrid/base/number-filter.js +21 -21
- package/dist/esm/components/DataGrid/base/sorting.d.ts +2 -2
- package/dist/esm/components/DataGrid/base/sorting.js +1 -1
- package/dist/esm/components/DataGrid/base/sorting.js.map +1 -1
- package/dist/esm/components/DataGrid/icons.d.ts +1 -1
- package/dist/esm/components/DataGrid/icons.js +1 -1
- package/dist/esm/components/DataGrid/icons.js.map +1 -1
- package/dist/esm/components/DataGrid/index.d.ts +2 -2
- package/dist/esm/components/DataGrid/index.js +35 -44
- package/dist/esm/components/DataGrid/index.js.map +1 -1
- package/dist/esm/components/DataGrid/shared.d.ts +1 -1
- package/dist/esm/components/DataGrid/shared.js +19 -32
- package/dist/esm/components/DataGrid/shared.js.map +1 -1
- package/dist/esm/components/DataGrid/styled.d.ts +2 -2
- package/dist/esm/components/DataGrid/styled.js +35 -35
- package/dist/esm/components/DataGrid/styled.js.map +1 -1
- package/dist/esm/components/DatePicker.d.ts +5 -5
- package/dist/esm/components/DatePicker.js +37 -37
- package/dist/esm/components/DatePicker.js.map +1 -1
- package/dist/esm/components/DropDown.d.ts +2 -2
- package/dist/esm/components/DropDown.js +6 -6
- package/dist/esm/components/DropDown.js.map +1 -1
- package/dist/esm/components/IconButton.d.ts +2 -2
- package/dist/esm/components/IconButton.js +7 -7
- package/dist/esm/components/IconButton.js.map +1 -1
- package/dist/esm/components/Icons.d.ts +2 -2
- package/dist/esm/components/Icons.js +10 -10
- package/dist/esm/components/Icons.js.map +1 -1
- package/dist/esm/components/Modal.d.ts +2 -2
- package/dist/esm/components/Modal.js +8 -8
- package/dist/esm/components/Modal.js.map +1 -1
- package/dist/esm/components/Paper.d.ts +2 -2
- package/dist/esm/components/Paper.js +5 -5
- package/dist/esm/components/Paper.js.map +1 -1
- package/dist/esm/components/ProgressBar.d.ts +2 -2
- package/dist/esm/components/ProgressBar.js +11 -11
- package/dist/esm/components/ProgressBar.js.map +1 -1
- package/dist/esm/components/RadioGroup.d.ts +2 -2
- package/dist/esm/components/RadioGroup.js +7 -7
- package/dist/esm/components/RadioGroup.js.map +1 -1
- package/dist/esm/components/RangerSlider.d.ts +2 -2
- package/dist/esm/components/RangerSlider.js +31 -31
- package/dist/esm/components/RangerSlider.js.map +1 -1
- package/dist/esm/components/Select.d.ts +2 -2
- package/dist/esm/components/Select.js +14 -14
- package/dist/esm/components/Select.js.map +1 -1
- package/dist/esm/components/Svgs.d.ts +1 -1
- package/dist/esm/components/Svgs.js +1 -1
- package/dist/esm/components/Svgs.js.map +1 -1
- package/dist/esm/components/Tabs.d.ts +2 -2
- package/dist/esm/components/Tabs.js +25 -26
- package/dist/esm/components/Tabs.js.map +1 -1
- package/dist/esm/components/Tag.d.ts +2 -2
- package/dist/esm/components/Tag.js +8 -8
- package/dist/esm/components/Tag.js.map +1 -1
- package/dist/esm/components/TextField.d.ts +2 -2
- package/dist/esm/components/TextField.js +8 -8
- package/dist/esm/components/TextField.js.map +1 -1
- package/dist/esm/components/TimeLine.d.ts +2 -2
- package/dist/esm/components/TimeLine.js +20 -20
- package/dist/esm/components/TimeLine.js.map +1 -1
- package/dist/esm/components/TimePicker.d.ts +8 -8
- package/dist/esm/components/TimePicker.js +43 -43
- package/dist/esm/components/TimePicker.js.map +1 -1
- package/dist/esm/components/index.d.ts +23 -23
- package/dist/esm/components/index.js +23 -23
- package/dist/esm/helpers/alignments.js +7 -7
- package/dist/esm/helpers/borders.js +11 -11
- package/dist/esm/helpers/colors.js +41 -41
- package/dist/esm/helpers/index.d.ts +5 -5
- package/dist/esm/helpers/index.js +5 -5
- package/dist/esm/helpers/sizes.d.ts +1 -1
- package/dist/esm/helpers/sizes.js +39 -39
- package/dist/esm/helpers/sizes.js.map +1 -1
- package/dist/esm/index.d.ts +17 -17
- package/dist/esm/index.js +17 -17
- package/dist/esm/interfaces/Accordion.d.ts +3 -3
- package/dist/esm/interfaces/Avatar.d.ts +6 -6
- package/dist/esm/interfaces/Badge.d.ts +7 -7
- package/dist/esm/interfaces/Button.d.ts +5 -5
- package/dist/esm/interfaces/Card.d.ts +3 -3
- package/dist/esm/interfaces/ChatMessage.d.ts +1 -1
- package/dist/esm/interfaces/CheckBox.d.ts +10 -10
- package/dist/esm/interfaces/DataGrid.d.ts +4 -4
- package/dist/esm/interfaces/DatePicker.d.ts +3 -3
- package/dist/esm/interfaces/DropDown.d.ts +4 -4
- package/dist/esm/interfaces/IconButton.d.ts +5 -5
- package/dist/esm/interfaces/Icons.d.ts +3 -3
- package/dist/esm/interfaces/Modal.d.ts +3 -3
- package/dist/esm/interfaces/Paper.d.ts +4 -4
- package/dist/esm/interfaces/ProgressBar.d.ts +5 -5
- package/dist/esm/interfaces/RadioGroup.d.ts +4 -4
- package/dist/esm/interfaces/RangerSlider.d.ts +8 -8
- package/dist/esm/interfaces/Select.d.ts +3 -3
- package/dist/esm/interfaces/Tabs.d.ts +3 -3
- package/dist/esm/interfaces/Tag.d.ts +5 -5
- package/dist/esm/interfaces/TextField.d.ts +12 -12
- package/dist/esm/interfaces/TimeLine.d.ts +3 -3
- package/dist/esm/interfaces/TimePicker.d.ts +3 -3
- package/dist/esm/interfaces/index.d.ts +23 -23
- package/dist/esm/interfaces/index.js +23 -23
- package/dist/esm/types/index.d.ts +41 -41
- package/dist/esm/types/index.js +2 -2
- package/dist/esm/types/index.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.es.js +6992 -0
- package/dist/index.es.js.map +1 -0
- package/dist/index.umd.js +266 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/vite.svg +1 -0
- package/docs/index.md +118 -0
- package/package.json +65 -8
- package/src/components/Accordion.tsx +47 -64
- package/src/components/Avatar.tsx +22 -29
- package/src/components/Badge.tsx +19 -22
- package/src/components/Button.tsx +12 -19
- package/src/components/Card.tsx +44 -47
- package/src/components/ChatMessage.tsx +87 -89
- package/src/components/CheckBox.tsx +8 -19
- package/src/components/DataGrid/allData.json +2918 -2918
- package/src/components/DataGrid/base/dropdown.tsx +212 -235
- package/src/components/DataGrid/base/number-filter.tsx +43 -43
- package/src/components/DataGrid/base/sorting.tsx +29 -35
- package/src/components/DataGrid/icons.tsx +53 -61
- package/src/components/DataGrid/index.tsx +254 -319
- package/src/components/DataGrid/shared.ts +154 -179
- package/src/components/DataGrid/styled.ts +96 -102
- package/src/components/DataGrid/styles/dropdown.module.css +86 -86
- package/src/components/DataGrid/styles/number-filter.module.css +16 -16
- package/src/components/DataGrid/styles/styles.module.css +107 -107
- package/src/components/DatePicker.tsx +73 -84
- package/src/components/DropDown.tsx +31 -38
- package/src/components/IconButton.tsx +12 -29
- package/src/components/Icons.tsx +82 -87
- package/src/components/Modal.tsx +114 -123
- package/src/components/Paper.tsx +19 -22
- package/src/components/ProgressBar.tsx +54 -63
- package/src/components/RadioGroup.tsx +47 -55
- package/src/components/RangerSlider.tsx +70 -81
- package/src/components/Select.tsx +82 -98
- package/src/components/Svgs.tsx +498 -522
- package/src/components/Tabs.tsx +111 -140
- package/src/components/Tag.tsx +37 -45
- package/src/components/TextField.tsx +11 -22
- package/src/components/TimeLine.tsx +93 -103
- package/src/components/TimePicker.tsx +84 -95
- package/src/components/index.ts +23 -23
- package/src/helpers/alignments.ts +7 -7
- package/src/helpers/borders.ts +11 -11
- package/src/helpers/colors.ts +42 -42
- package/src/helpers/index.ts +5 -5
- package/src/helpers/sizes.ts +39 -46
- package/src/index.ts +17 -17
- package/src/interfaces/Accordion.ts +12 -12
- package/src/interfaces/Avatar.tsx +15 -18
- package/src/interfaces/Badge.ts +19 -32
- package/src/interfaces/Button.ts +5 -10
- package/src/interfaces/Card.ts +11 -11
- package/src/interfaces/ChatMessage.ts +12 -12
- package/src/interfaces/CheckBox.ts +12 -18
- package/src/interfaces/DataGrid.ts +46 -51
- package/src/interfaces/DatePicker.ts +13 -13
- package/src/interfaces/DropDown.ts +14 -14
- package/src/interfaces/IconButton.ts +5 -10
- package/src/interfaces/Icons.ts +17 -17
- package/src/interfaces/Modal.ts +15 -15
- package/src/interfaces/Paper.ts +12 -12
- package/src/interfaces/ProgressBar.ts +18 -25
- package/src/interfaces/RadioGroup.ts +22 -28
- package/src/interfaces/RangerSlider.ts +21 -32
- package/src/interfaces/Select.ts +17 -17
- package/src/interfaces/Tabs.ts +19 -24
- package/src/interfaces/Tag.ts +17 -17
- package/src/interfaces/TextField.ts +14 -34
- package/src/interfaces/TimeLine.ts +11 -16
- package/src/interfaces/TimePicker.ts +13 -13
- package/src/interfaces/index.ts +23 -23
- package/src/sample-data.json +178 -178
- package/src/stories/Accordion.stories.tsx +65 -65
- package/src/stories/Avatar.stories.tsx +123 -139
- package/src/stories/Badge.stories.tsx +39 -47
- package/src/stories/Button.stories.tsx +18 -26
- package/src/stories/Card.stories.tsx +40 -55
- package/src/stories/ChatMessage.stories.tsx +84 -85
- package/src/stories/CheckBox.stories.tsx +17 -23
- package/src/stories/DataGrid.stories.tsx +28 -28
- package/src/stories/DatePicker.stories.tsx +50 -77
- package/src/stories/DropDown.stories.tsx +57 -57
- package/src/stories/IconButton.stories.tsx +78 -114
- package/src/stories/Modal.stories.tsx +190 -190
- package/src/stories/Paper.stories.tsx +53 -53
- package/src/stories/ProgressBar.stories.tsx +95 -139
- package/src/stories/RadioGroup.stories.tsx +21 -28
- package/src/stories/RangerSlider.stories.tsx +58 -68
- package/src/stories/Select.stories.tsx +100 -128
- package/src/stories/Tabs.stories.tsx +62 -62
- package/src/stories/Tag.stories.tsx +56 -74
- package/src/stories/TextField.stories.tsx +54 -189
- package/src/stories/TimeLine.stories.tsx +35 -43
- package/src/stories/TimePicker.stories.tsx +87 -113
- package/src/types/index.ts +90 -155
- package/tsconfig.json +1 -1
- package/buildcache/front-end +0 -1
- package/norma-library.tar +0 -0
- package/postcss.config.js +0 -6
- package/tailwind.config.js +0 -58
package/src/interfaces/Badge.ts
CHANGED
|
@@ -1,32 +1,19 @@
|
|
|
1
|
-
import { ReactNode } from
|
|
2
|
-
import { Theme } from
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
| "secondary"
|
|
21
|
-
| "default"
|
|
22
|
-
| "error"
|
|
23
|
-
| "info"
|
|
24
|
-
| "success"
|
|
25
|
-
| "warning",
|
|
26
|
-
BadgePropsColorOverrides
|
|
27
|
-
>;
|
|
28
|
-
variant?: OverridableStringUnion<
|
|
29
|
-
"standard" | "dot",
|
|
30
|
-
BadgePropsVariantOverrides
|
|
31
|
-
>;
|
|
32
|
-
}
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { Theme } from '@emotion/react';
|
|
3
|
+
|
|
4
|
+
import { BadgePropsColorOverrides, BadgePropsVariantOverrides, SxProps } from '@mui/material';
|
|
5
|
+
import { MuiBadgeBaseProps } from '@/types';
|
|
6
|
+
import { OverridableStringUnion } from '@mui/types';
|
|
7
|
+
|
|
8
|
+
export interface BadgeBaseProps extends MuiBadgeBaseProps {
|
|
9
|
+
sx?: SxProps<Theme>;
|
|
10
|
+
className?: string;
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
badgeContent?: ReactNode;
|
|
13
|
+
invisible?: boolean;
|
|
14
|
+
color?: OverridableStringUnion<
|
|
15
|
+
'primary' | 'secondary' | 'default' | 'error' | 'info' | 'success' | 'warning',
|
|
16
|
+
BadgePropsColorOverrides
|
|
17
|
+
>;
|
|
18
|
+
variant?: OverridableStringUnion<'standard' | 'dot', BadgePropsVariantOverrides>;
|
|
19
|
+
}
|
package/src/interfaces/Button.ts
CHANGED
|
@@ -1,20 +1,15 @@
|
|
|
1
|
-
import { ReactNode } from
|
|
2
|
-
import { Theme } from
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { Theme } from '@emotion/react';
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
5
|
ButtonPropsColorOverrides,
|
|
6
6
|
ButtonPropsSizeOverrides,
|
|
7
7
|
ButtonPropsVariantOverrides,
|
|
8
8
|
SxProps,
|
|
9
|
-
} from
|
|
9
|
+
} from '@mui/material';
|
|
10
10
|
|
|
11
|
-
import { OverridableStringUnion } from
|
|
12
|
-
import {
|
|
13
|
-
ColorVariant,
|
|
14
|
-
ButtonVariant,
|
|
15
|
-
SizeVariant,
|
|
16
|
-
MuiButtonBaseProps,
|
|
17
|
-
} from "../types";
|
|
11
|
+
import { OverridableStringUnion } from '@mui/types';
|
|
12
|
+
import { ColorVariant, ButtonVariant, SizeVariant, MuiButtonBaseProps } from '../types';
|
|
18
13
|
|
|
19
14
|
export interface ButtonBaseProps extends MuiButtonBaseProps {
|
|
20
15
|
label?: string;
|
package/src/interfaces/Card.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { SxProps } from
|
|
2
|
-
import { Theme } from
|
|
3
|
-
import { ColorVariant, MuiCardBaseProps } from
|
|
4
|
-
|
|
5
|
-
export interface CardBaseProps extends MuiCardBaseProps {
|
|
6
|
-
sx?: SxProps<Theme>;
|
|
7
|
-
raised?: boolean;
|
|
8
|
-
border?: boolean;
|
|
9
|
-
color?: ColorVariant;
|
|
10
|
-
children?: React.ReactNode;
|
|
11
|
-
}
|
|
1
|
+
import { SxProps } from '@mui/material';
|
|
2
|
+
import { Theme } from '@emotion/react';
|
|
3
|
+
import { ColorVariant, MuiCardBaseProps } from '../types';
|
|
4
|
+
|
|
5
|
+
export interface CardBaseProps extends MuiCardBaseProps {
|
|
6
|
+
sx?: SxProps<Theme>;
|
|
7
|
+
raised?: boolean;
|
|
8
|
+
border?: boolean;
|
|
9
|
+
color?: ColorVariant;
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export interface ChatProps {
|
|
2
|
-
name: string;
|
|
3
|
-
message: string;
|
|
4
|
-
emotion?: React.ReactNode;
|
|
5
|
-
emotionReplay?: React.ReactNode;
|
|
6
|
-
time: string;
|
|
7
|
-
send:
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export interface ChatMessageProps {
|
|
11
|
-
data: ChatProps[];
|
|
12
|
-
}
|
|
1
|
+
export interface ChatProps {
|
|
2
|
+
name: string;
|
|
3
|
+
message: string;
|
|
4
|
+
emotion?: React.ReactNode;
|
|
5
|
+
emotionReplay?: React.ReactNode;
|
|
6
|
+
time: string;
|
|
7
|
+
send: 'me' | 'replay';
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface ChatMessageProps {
|
|
11
|
+
data: ChatProps[];
|
|
12
|
+
}
|
|
@@ -1,32 +1,26 @@
|
|
|
1
|
-
import { OverridableStringUnion } from
|
|
2
|
-
import { Checkbox, SxProps, Theme } from
|
|
3
|
-
import { SwitchBaseProps } from
|
|
1
|
+
import { OverridableStringUnion } from '@mui/types';
|
|
2
|
+
import { Checkbox, SxProps, Theme } from '@mui/material';
|
|
3
|
+
import { SwitchBaseProps } from '@mui/material/internal/SwitchBase';
|
|
4
4
|
import {
|
|
5
5
|
CheckBoxColorVariant,
|
|
6
6
|
CheckboxPropsColorOverrides,
|
|
7
7
|
CheckboxPropsSizeOverrides,
|
|
8
8
|
MuiCheckBoxBaseProps,
|
|
9
9
|
TextFieldSizeVariant,
|
|
10
|
-
} from
|
|
10
|
+
} from '../types';
|
|
11
11
|
|
|
12
12
|
export interface CheckBoxBaseProps extends MuiCheckBoxBaseProps {
|
|
13
13
|
sx?: SxProps<Theme>;
|
|
14
14
|
name?: string;
|
|
15
15
|
label?: string;
|
|
16
|
-
checked?: SwitchBaseProps[
|
|
17
|
-
color?: OverridableStringUnion<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
required?: SwitchBaseProps["required"];
|
|
25
|
-
size?: OverridableStringUnion<
|
|
26
|
-
TextFieldSizeVariant,
|
|
27
|
-
CheckboxPropsSizeOverrides
|
|
28
|
-
>;
|
|
29
|
-
value?: SwitchBaseProps["value"];
|
|
16
|
+
checked?: SwitchBaseProps['checked'];
|
|
17
|
+
color?: OverridableStringUnion<CheckBoxColorVariant, CheckboxPropsColorOverrides>;
|
|
18
|
+
disabled?: SwitchBaseProps['disabled'];
|
|
19
|
+
id?: SwitchBaseProps['id'];
|
|
20
|
+
onChange?: SwitchBaseProps['onChange'];
|
|
21
|
+
required?: SwitchBaseProps['required'];
|
|
22
|
+
size?: OverridableStringUnion<TextFieldSizeVariant, CheckboxPropsSizeOverrides>;
|
|
23
|
+
value?: SwitchBaseProps['value'];
|
|
30
24
|
defaultChecked?: boolean;
|
|
31
25
|
}
|
|
32
26
|
|
|
@@ -1,51 +1,46 @@
|
|
|
1
|
-
import { MuiDataGridBaseProps } from
|
|
2
|
-
import { SxProps, Theme } from
|
|
3
|
-
import { OverridableStringUnion } from
|
|
4
|
-
|
|
5
|
-
export interface DataGridPropsVariantOverrides {}
|
|
6
|
-
|
|
7
|
-
export interface SortingProps {
|
|
8
|
-
sort?: string;
|
|
9
|
-
active?: boolean;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface DataGridBaseProps extends MuiDataGridBaseProps {
|
|
13
|
-
data: { dataSource: any; columns: any }[];
|
|
14
|
-
sx?: SxProps<Theme>;
|
|
15
|
-
variant?: OverridableStringUnion<
|
|
16
|
-
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export interface PaginationProps {
|
|
49
|
-
totalItems: number;
|
|
50
|
-
pageSize: number;
|
|
51
|
-
}
|
|
1
|
+
import { MuiDataGridBaseProps } from '@/types';
|
|
2
|
+
import { SxProps, Theme } from '@mui/material';
|
|
3
|
+
import { OverridableStringUnion } from '@mui/types';
|
|
4
|
+
|
|
5
|
+
export interface DataGridPropsVariantOverrides {}
|
|
6
|
+
|
|
7
|
+
export interface SortingProps {
|
|
8
|
+
sort?: string;
|
|
9
|
+
active?: boolean;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface DataGridBaseProps extends MuiDataGridBaseProps {
|
|
13
|
+
data: { dataSource: any; columns: any }[];
|
|
14
|
+
sx?: SxProps<Theme>;
|
|
15
|
+
variant?: OverridableStringUnion<
|
|
16
|
+
'standard' | 'standard-divider' | 'standard-selectable' | 'quiet' | 'quiet-divider' | 'quiet-selectable',
|
|
17
|
+
DataGridPropsVariantOverrides
|
|
18
|
+
>;
|
|
19
|
+
width?: string;
|
|
20
|
+
height?: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface DataSourceItem {
|
|
24
|
+
[key: string]: string | number;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface DropdownFilterProps {
|
|
28
|
+
onSelectAll: boolean;
|
|
29
|
+
format?: string;
|
|
30
|
+
data: (string | number)[];
|
|
31
|
+
onFilter: (item: string) => void;
|
|
32
|
+
onOrder: (item: string) => void;
|
|
33
|
+
onChecketAll: (item: boolean) => void;
|
|
34
|
+
onSelected: (item: (string | number)[]) => void;
|
|
35
|
+
itemsSelected: (string | number)[];
|
|
36
|
+
onFilterSelected: () => void;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface NumberFilterProps {
|
|
40
|
+
onClick: (selectedOption: string) => void;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface PaginationProps {
|
|
44
|
+
totalItems: number;
|
|
45
|
+
pageSize: number;
|
|
46
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { SxProps } from
|
|
2
|
-
import { Theme } from
|
|
3
|
-
|
|
4
|
-
import { DatePickVariant } from
|
|
5
|
-
|
|
6
|
-
export interface DatePickerBaseProps {
|
|
7
|
-
sx?: SxProps<Theme>;
|
|
8
|
-
label?: string;
|
|
9
|
-
format?: string;
|
|
10
|
-
language?: string;
|
|
11
|
-
onChange?: React.ChangeEvent<HTMLInputElement>;
|
|
12
|
-
variant?: DatePickVariant;
|
|
13
|
-
}
|
|
1
|
+
import { SxProps } from '@mui/material';
|
|
2
|
+
import { Theme } from '@emotion/react';
|
|
3
|
+
|
|
4
|
+
import { DatePickVariant } from '../types';
|
|
5
|
+
|
|
6
|
+
export interface DatePickerBaseProps {
|
|
7
|
+
sx?: SxProps<Theme>;
|
|
8
|
+
label?: string;
|
|
9
|
+
format?: string;
|
|
10
|
+
language?: string;
|
|
11
|
+
onChange?: React.ChangeEvent<HTMLInputElement>;
|
|
12
|
+
variant?: DatePickVariant;
|
|
13
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { ReactNode } from
|
|
2
|
-
import { Theme } from
|
|
3
|
-
|
|
4
|
-
import { SxProps } from
|
|
5
|
-
|
|
6
|
-
import { DropVariant, MuiDropDownBaseProps } from
|
|
7
|
-
|
|
8
|
-
export interface DropDownBaseProps extends MuiDropDownBaseProps {
|
|
9
|
-
sx?: SxProps<Theme>;
|
|
10
|
-
open: boolean;
|
|
11
|
-
onClose?: React.ReactEventHandler<{}>;
|
|
12
|
-
children?: ReactNode;
|
|
13
|
-
variant?: DropVariant;
|
|
14
|
-
}
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { Theme } from '@emotion/react';
|
|
3
|
+
|
|
4
|
+
import { SxProps } from '@mui/material';
|
|
5
|
+
|
|
6
|
+
import { DropVariant, MuiDropDownBaseProps } from '../types';
|
|
7
|
+
|
|
8
|
+
export interface DropDownBaseProps extends MuiDropDownBaseProps {
|
|
9
|
+
sx?: SxProps<Theme>;
|
|
10
|
+
open: boolean;
|
|
11
|
+
onClose?: React.ReactEventHandler<{}>;
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
variant?: DropVariant;
|
|
14
|
+
}
|
|
@@ -1,20 +1,15 @@
|
|
|
1
|
-
import { ReactNode } from
|
|
2
|
-
import { Theme } from
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { Theme } from '@emotion/react';
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
5
|
ButtonPropsColorOverrides,
|
|
6
6
|
ButtonPropsSizeOverrides,
|
|
7
7
|
ButtonPropsVariantOverrides,
|
|
8
8
|
SxProps,
|
|
9
|
-
} from
|
|
9
|
+
} from '@mui/material';
|
|
10
10
|
|
|
11
|
-
import { OverridableStringUnion } from
|
|
12
|
-
import {
|
|
13
|
-
ColorVariant,
|
|
14
|
-
ButtonVariant,
|
|
15
|
-
SizeVariant,
|
|
16
|
-
MuiIconButtonBaseProps,
|
|
17
|
-
} from "../types";
|
|
11
|
+
import { OverridableStringUnion } from '@mui/types';
|
|
12
|
+
import { ColorVariant, ButtonVariant, SizeVariant, MuiIconButtonBaseProps } from '../types';
|
|
18
13
|
|
|
19
14
|
export interface IconButtonBaseProps extends MuiIconButtonBaseProps {
|
|
20
15
|
sx?: SxProps<Theme>;
|
package/src/interfaces/Icons.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { ComponentProps } from
|
|
2
|
-
import { IconScale, IconColors, IconType } from
|
|
3
|
-
import { Svg } from
|
|
4
|
-
|
|
5
|
-
export interface IconsProps extends ComponentProps<typeof Svg> {
|
|
6
|
-
useSymbol?: boolean;
|
|
7
|
-
scale?: IconScale;
|
|
8
|
-
color?: IconColors;
|
|
9
|
-
width?: number;
|
|
10
|
-
height?: number;
|
|
11
|
-
fill?: string;
|
|
12
|
-
icon: IconType;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface SvgProps {
|
|
16
|
-
inline?: boolean;
|
|
17
|
-
}
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { IconScale, IconColors, IconType } from '../types';
|
|
3
|
+
import { Svg } from '../components/Icons';
|
|
4
|
+
|
|
5
|
+
export interface IconsProps extends ComponentProps<typeof Svg> {
|
|
6
|
+
useSymbol?: boolean;
|
|
7
|
+
scale?: IconScale;
|
|
8
|
+
color?: IconColors;
|
|
9
|
+
width?: number;
|
|
10
|
+
height?: number;
|
|
11
|
+
fill?: string;
|
|
12
|
+
icon: IconType;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface SvgProps {
|
|
16
|
+
inline?: boolean;
|
|
17
|
+
}
|
package/src/interfaces/Modal.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { SxProps } from
|
|
2
|
-
import { Theme } from
|
|
3
|
-
import { MuiModalBaseProps, OnAction } from
|
|
4
|
-
|
|
5
|
-
export interface ModalBaseProps extends MuiModalBaseProps {
|
|
6
|
-
sx?: SxProps<Theme>;
|
|
7
|
-
children: React.ReactElement;
|
|
8
|
-
open: boolean;
|
|
9
|
-
onClose?: React.ReactEventHandler<{}>;
|
|
10
|
-
action?: OnAction[];
|
|
11
|
-
className?: string;
|
|
12
|
-
full?: boolean;
|
|
13
|
-
title?: string;
|
|
14
|
-
id?: string;
|
|
15
|
-
}
|
|
1
|
+
import { SxProps } from '@mui/material';
|
|
2
|
+
import { Theme } from '@emotion/react';
|
|
3
|
+
import { MuiModalBaseProps, OnAction } from '@/types';
|
|
4
|
+
|
|
5
|
+
export interface ModalBaseProps extends MuiModalBaseProps {
|
|
6
|
+
sx?: SxProps<Theme>;
|
|
7
|
+
children: React.ReactElement;
|
|
8
|
+
open: boolean;
|
|
9
|
+
onClose?: React.ReactEventHandler<{}>;
|
|
10
|
+
action?: OnAction[];
|
|
11
|
+
className?: string;
|
|
12
|
+
full?: boolean;
|
|
13
|
+
title?: string;
|
|
14
|
+
id?: string;
|
|
15
|
+
}
|
package/src/interfaces/Paper.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { PaperPropsVariantOverrides, SxProps } from
|
|
2
|
-
import { Theme } from
|
|
3
|
-
import { MuiPaperBaseProps, PaperVariant } from
|
|
4
|
-
import { OverridableStringUnion } from
|
|
5
|
-
|
|
6
|
-
export interface PaperBaseProps extends MuiPaperBaseProps {
|
|
7
|
-
sx?: SxProps<Theme>;
|
|
8
|
-
elevation?: number;
|
|
9
|
-
square?: boolean;
|
|
10
|
-
children?: React.ReactNode;
|
|
11
|
-
variant?: OverridableStringUnion<PaperVariant, PaperPropsVariantOverrides>;
|
|
12
|
-
}
|
|
1
|
+
import { PaperPropsVariantOverrides, SxProps } from '@mui/material';
|
|
2
|
+
import { Theme } from '@emotion/react';
|
|
3
|
+
import { MuiPaperBaseProps, PaperVariant } from '../types';
|
|
4
|
+
import { OverridableStringUnion } from '@mui/types';
|
|
5
|
+
|
|
6
|
+
export interface PaperBaseProps extends MuiPaperBaseProps {
|
|
7
|
+
sx?: SxProps<Theme>;
|
|
8
|
+
elevation?: number;
|
|
9
|
+
square?: boolean;
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
variant?: OverridableStringUnion<PaperVariant, PaperPropsVariantOverrides>;
|
|
12
|
+
}
|
|
@@ -1,25 +1,18 @@
|
|
|
1
|
-
import { SxProps } from
|
|
2
|
-
import { Theme } from
|
|
3
|
-
import { OverridableStringUnion } from
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
color?: OverridableStringUnion<
|
|
20
|
-
ColorVariant,
|
|
21
|
-
LinearProgressPropsColorOverrides
|
|
22
|
-
>;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export type ProgressBarType = keyof typeof ProgressBar;
|
|
1
|
+
import { SxProps } from '@mui/material';
|
|
2
|
+
import { Theme } from '@emotion/react';
|
|
3
|
+
import { OverridableStringUnion } from '@mui/types';
|
|
4
|
+
import { ColorVariant, MuiProgressBarBaseProps, ProgressVariant } from '../types';
|
|
5
|
+
import { ProgressBar } from '..';
|
|
6
|
+
export interface LinearProgressPropsColorOverrides {}
|
|
7
|
+
|
|
8
|
+
export interface ProgressBarBaseProps extends MuiProgressBarBaseProps {
|
|
9
|
+
sx?: SxProps<Theme>;
|
|
10
|
+
value?: number;
|
|
11
|
+
total?: number;
|
|
12
|
+
label?: string;
|
|
13
|
+
colorCustom?: string;
|
|
14
|
+
variant?: ProgressVariant;
|
|
15
|
+
color?: OverridableStringUnion<ColorVariant, LinearProgressPropsColorOverrides>;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export type ProgressBarType = keyof typeof ProgressBar;
|
|
@@ -1,28 +1,22 @@
|
|
|
1
|
-
import { ReactNode } from
|
|
2
|
-
import {
|
|
3
|
-
CheckBoxColorVariant,
|
|
4
|
-
DirectionVariant,
|
|
5
|
-
MuiRadioBaseProps,
|
|
6
|
-
OptionsRadios,
|
|
7
|
-
TextFieldSizeVariant,
|
|
8
|
-
} from
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
color?: OverridableStringUnion<
|
|
24
|
-
CheckBoxColorVariant,
|
|
25
|
-
CheckboxPropsColorOverrides
|
|
26
|
-
>;
|
|
27
|
-
checked?: string;
|
|
28
|
-
}
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
CheckBoxColorVariant,
|
|
4
|
+
DirectionVariant,
|
|
5
|
+
MuiRadioBaseProps,
|
|
6
|
+
OptionsRadios,
|
|
7
|
+
TextFieldSizeVariant,
|
|
8
|
+
} from '../types';
|
|
9
|
+
import { CheckboxPropsColorOverrides, RadioPropsSizeOverrides } from '@mui/material';
|
|
10
|
+
import { OverridableStringUnion } from '@mui/types';
|
|
11
|
+
|
|
12
|
+
export interface RadioBaseProps extends MuiRadioBaseProps {
|
|
13
|
+
id?: string;
|
|
14
|
+
name?: string;
|
|
15
|
+
options?: OptionsRadios[];
|
|
16
|
+
required?: boolean;
|
|
17
|
+
direction?: DirectionVariant;
|
|
18
|
+
label?: ReactNode;
|
|
19
|
+
size?: OverridableStringUnion<TextFieldSizeVariant, RadioPropsSizeOverrides>;
|
|
20
|
+
color?: OverridableStringUnion<CheckBoxColorVariant, CheckboxPropsColorOverrides>;
|
|
21
|
+
checked?: string;
|
|
22
|
+
}
|
|
@@ -1,32 +1,21 @@
|
|
|
1
|
-
import { Theme } from
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
) => void;
|
|
23
|
-
orientation?: "horizontal" | "vertical";
|
|
24
|
-
size?: OverridableStringUnion<"small" | "medium", SliderPropsSizeOverrides>;
|
|
25
|
-
step?: number | null;
|
|
26
|
-
defaultValue?: number | number[];
|
|
27
|
-
valueLabelDisplay?: "on" | "auto" | "off";
|
|
28
|
-
color?: OverridableStringUnion<
|
|
29
|
-
"primary" | "secondary",
|
|
30
|
-
SliderPropsColorOverrides
|
|
31
|
-
>;
|
|
32
|
-
}
|
|
1
|
+
import { Theme } from '@emotion/react';
|
|
2
|
+
|
|
3
|
+
import { SliderPropsColorOverrides, SliderPropsSizeOverrides, SxProps } from '@mui/material';
|
|
4
|
+
import { OverridableStringUnion } from '@mui/types';
|
|
5
|
+
|
|
6
|
+
import { MuiRangerSliderBaseProps } from '../types';
|
|
7
|
+
|
|
8
|
+
export interface RangerSliderBaseProps extends MuiRangerSliderBaseProps {
|
|
9
|
+
sx?: SxProps<Theme>;
|
|
10
|
+
max?: number;
|
|
11
|
+
min?: number;
|
|
12
|
+
name?: string;
|
|
13
|
+
mode?: Boolean;
|
|
14
|
+
onChange?: (event: Event, value: number | number[], activeThumb: number) => void;
|
|
15
|
+
orientation?: 'horizontal' | 'vertical';
|
|
16
|
+
size?: OverridableStringUnion<'small' | 'medium', SliderPropsSizeOverrides>;
|
|
17
|
+
step?: number | null;
|
|
18
|
+
defaultValue?: number | number[];
|
|
19
|
+
valueLabelDisplay?: 'on' | 'auto' | 'off';
|
|
20
|
+
color?: OverridableStringUnion<'primary' | 'secondary', SliderPropsColorOverrides>;
|
|
21
|
+
}
|
package/src/interfaces/Select.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { SxProps } from
|
|
2
|
-
import { Theme } from
|
|
3
|
-
import { DataSelect, MuiSelectBaseProps, TextFieldVariant } from
|
|
4
|
-
|
|
5
|
-
export interface SelectBaseProps extends MuiSelectBaseProps {
|
|
6
|
-
sx?: SxProps<Theme>;
|
|
7
|
-
id?: string;
|
|
8
|
-
label?: React.ReactNode;
|
|
9
|
-
input?: React.ReactElement<any, any>;
|
|
10
|
-
variant?: TextFieldVariant;
|
|
11
|
-
value?: string;
|
|
12
|
-
open?: boolean;
|
|
13
|
-
onOpen?: (event: React.SyntheticEvent) => void;
|
|
14
|
-
onClose?: (event: React.SyntheticEvent) => void;
|
|
15
|
-
multiple?: boolean;
|
|
16
|
-
data?: DataSelect[];
|
|
17
|
-
}
|
|
1
|
+
import { SxProps } from '@mui/material';
|
|
2
|
+
import { Theme } from '@emotion/react';
|
|
3
|
+
import { DataSelect, MuiSelectBaseProps, TextFieldVariant } from '../types';
|
|
4
|
+
|
|
5
|
+
export interface SelectBaseProps extends MuiSelectBaseProps {
|
|
6
|
+
sx?: SxProps<Theme>;
|
|
7
|
+
id?: string;
|
|
8
|
+
label?: React.ReactNode;
|
|
9
|
+
input?: React.ReactElement<any, any>;
|
|
10
|
+
variant?: TextFieldVariant;
|
|
11
|
+
value?: string;
|
|
12
|
+
open?: boolean;
|
|
13
|
+
onOpen?: (event: React.SyntheticEvent) => void;
|
|
14
|
+
onClose?: (event: React.SyntheticEvent) => void;
|
|
15
|
+
multiple?: boolean;
|
|
16
|
+
data?: DataSelect[];
|
|
17
|
+
}
|