norma-library 0.6.64 → 0.6.66
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 +18 -18
- package/.prettierignore +10 -10
- package/.prettierrc.json +20 -20
- package/.storybook/main.ts +20 -20
- package/.storybook/preview.ts +15 -15
- package/README.md +43 -43
- package/commitlint.config.js +1 -1
- package/dist/esm/components/Card.js +3 -3
- package/dist/esm/components/Card.js.map +1 -1
- package/dist/esm/helpers/colors.js +6 -0
- package/dist/esm/helpers/colors.js.map +1 -1
- package/docs/index.md +118 -118
- package/package.json +136 -136
- package/src/components/Accordion.tsx +39 -39
- package/src/components/Avatar.tsx +17 -17
- package/src/components/Badge.tsx +14 -14
- package/src/components/Box/index.tsx +12 -12
- package/src/components/Box/interfaces.ts +3 -3
- package/src/components/Box/styles.tsx +22 -22
- package/src/components/Breadcrumb/index.tsx +27 -27
- package/src/components/Breadcrumb/interface.ts +8 -8
- package/src/components/Breadcrumb/styles.tsx +32 -32
- package/src/components/Button.tsx +26 -26
- package/src/components/Card.tsx +38 -38
- package/src/components/ChatMessage.tsx +87 -87
- package/src/components/ChatMessageBalloon/ChatMessageBalloon.style.ts +56 -56
- package/src/components/ChatMessageBalloon/ChatMessageBalloon.tsx +55 -55
- package/src/components/CheckBox.tsx +21 -21
- package/src/components/DateInput/index.tsx +34 -34
- package/src/components/DateInput/interface.ts +13 -13
- package/src/components/DateInput/styles.tsx +27 -27
- package/src/components/DatePicker.tsx +67 -67
- package/src/components/DropDown.tsx +24 -24
- package/src/components/IconButton.tsx +37 -37
- package/src/components/Icons.tsx +82 -82
- package/src/components/Modal.tsx +103 -103
- package/src/components/MultiSelectInput/components/MultiValue/index.tsx +44 -44
- package/src/components/MultiSelectInput/components/Option/index.tsx +62 -62
- package/src/components/MultiSelectInput/components/Option/styles.tsx +8 -8
- package/src/components/MultiSelectInput/index.tsx +60 -60
- package/src/components/MultiSelectInput/interfaces.ts +15 -15
- package/src/components/MultiSelectInput/styles.tsx +43 -43
- package/src/components/Paper.tsx +12 -12
- package/src/components/ProgressBar.tsx +71 -71
- package/src/components/RadioGroup.tsx +43 -43
- package/src/components/RangerSlider.tsx +65 -65
- package/src/components/Select.tsx +74 -74
- package/src/components/SelectInput/components/Option/index.tsx +61 -61
- package/src/components/SelectInput/components/Option/styles.tsx +8 -8
- package/src/components/SelectInput/index.tsx +45 -45
- package/src/components/SelectInput/interfaces.ts +15 -15
- package/src/components/SelectInput/styles.tsx +31 -31
- package/src/components/StatusModal/StatusModal.style.tsx +75 -75
- package/src/components/StatusModal/StatusModal.tsx +58 -58
- package/src/components/Svgs.tsx +506 -506
- package/src/components/Table/components/header/index.tsx +86 -86
- package/src/components/Table/components/header/styles.tsx +59 -59
- package/src/components/Table/components/index.tsx +8 -8
- package/src/components/Table/components/pagination/index.tsx +39 -39
- package/src/components/Table/components/pagination/styles.tsx +28 -28
- package/src/components/Table/components/tbody/index.tsx +30 -30
- package/src/components/Table/components/tbody/styles.tsx +4 -4
- package/src/components/Table/index.tsx +317 -317
- package/src/components/Table/interface.ts +23 -23
- package/src/components/Table/styles.tsx +117 -117
- package/src/components/Tabs.tsx +105 -105
- package/src/components/Tag.tsx +33 -33
- package/src/components/TextField.tsx +19 -19
- package/src/components/TextInput/index.tsx +37 -37
- package/src/components/TextInput/interface.ts +9 -9
- package/src/components/TextInput/styles.tsx +23 -23
- package/src/components/TimeLine.tsx +89 -89
- package/src/components/TimePicker.tsx +78 -78
- package/src/components/Typography/Text/index.tsx +20 -20
- package/src/components/Typography/Text/interfaces.ts +5 -5
- package/src/components/Typography/Text/styles.tsx +40 -40
- package/src/components/Typography/Title/index.tsx +22 -22
- package/src/components/Typography/Title/interfaces.ts +6 -6
- package/src/components/Typography/Title/styles.tsx +40 -40
- package/src/components/Typography/index.tsx +6 -6
- package/src/components/UncontrolledTable/components/header/index.tsx +72 -72
- package/src/components/UncontrolledTable/components/header/styles.tsx +66 -66
- package/src/components/UncontrolledTable/components/index.tsx +8 -8
- package/src/components/UncontrolledTable/components/pagination/index.tsx +43 -43
- package/src/components/UncontrolledTable/components/pagination/styles.tsx +28 -28
- package/src/components/UncontrolledTable/components/tbody/index.tsx +33 -33
- package/src/components/UncontrolledTable/components/tbody/styles.tsx +32 -32
- package/src/components/UncontrolledTable/index.tsx +223 -223
- package/src/components/UncontrolledTable/interface.ts +46 -46
- package/src/components/UncontrolledTable/styles.tsx +123 -123
- package/src/components/UncontrolledTabs/UncontrolledTabs.style.tsx +58 -58
- package/src/components/UncontrolledTabs/UncontrolledTabs.tsx +71 -71
- package/src/components/UncontrolledTabs/UncontrolledTabsInfo.style.ts +8 -8
- package/src/components/index.ts +24 -24
- package/src/helpers/alignments.ts +14 -14
- package/src/helpers/borders.ts +18 -18
- package/src/helpers/colors.ts +264 -258
- package/src/helpers/index.ts +5 -5
- package/src/helpers/radios.ts +24 -24
- package/src/helpers/sizes.ts +72 -72
- package/src/hooks/useClickOutside.tsx +18 -18
- package/src/index.ts +70 -70
- package/src/interfaces/Accordion.ts +12 -12
- package/src/interfaces/Avatar.tsx +15 -15
- package/src/interfaces/Badge.ts +19 -19
- package/src/interfaces/Button.ts +19 -19
- package/src/interfaces/Card.ts +11 -11
- package/src/interfaces/ChatMessage.ts +12 -12
- package/src/interfaces/ChatMessageBalloon.ts +17 -17
- package/src/interfaces/CheckBox.ts +27 -27
- package/src/interfaces/DatePicker.ts +13 -13
- package/src/interfaces/DropDown.ts +14 -14
- package/src/interfaces/IconButton.ts +22 -22
- package/src/interfaces/Icons.ts +17 -17
- package/src/interfaces/Modal.ts +18 -18
- package/src/interfaces/Paper.ts +12 -12
- package/src/interfaces/ProgressBar.ts +29 -29
- package/src/interfaces/RadioGroup.ts +23 -23
- package/src/interfaces/RangerSlider.ts +21 -21
- package/src/interfaces/Select.ts +17 -17
- package/src/interfaces/Tabs.ts +19 -19
- package/src/interfaces/Tag.ts +17 -17
- package/src/interfaces/TextField.ts +44 -44
- package/src/interfaces/TimeLine.ts +11 -11
- package/src/interfaces/TimePicker.ts +13 -13
- package/src/interfaces/index.ts +23 -23
- package/src/providers/NormaProvider.tsx +13 -13
- package/src/sample-data-2.json +178 -178
- package/src/sample-data.json +177 -177
- package/src/stories/Accordion.stories.tsx +65 -65
- package/src/stories/Avatar.stories.tsx +123 -123
- package/src/stories/Badge.stories.tsx +39 -39
- package/src/stories/Box.stories.tsx +35 -35
- package/src/stories/Breadcrumb.stories.tsx +44 -44
- package/src/stories/Button.stories.tsx +93 -93
- package/src/stories/Card.stories.tsx +39 -39
- package/src/stories/ChatMessage.stories.tsx +84 -84
- package/src/stories/ChatMessageBalloon.stories.tsx +108 -108
- package/src/stories/CheckBox.stories.tsx +88 -88
- package/src/stories/DateInput.stories.tsx +51 -51
- package/src/stories/DatePicker.stories.tsx +50 -50
- package/src/stories/DropDown.stories.tsx +57 -57
- package/src/stories/IconButton.stories.tsx +78 -78
- package/src/stories/Modal.stories.tsx +246 -246
- package/src/stories/ModalStatus.stories.tsx +46 -46
- package/src/stories/MultiSelectInput.stories.tsx +90 -90
- package/src/stories/Paper.stories.tsx +53 -53
- package/src/stories/ProgressBar.stories.tsx +116 -116
- package/src/stories/RadioGroup.stories.tsx +87 -87
- package/src/stories/RangerSlider.stories.tsx +149 -149
- package/src/stories/Select.stories.tsx +100 -100
- package/src/stories/SelectInput.stories.tsx +78 -78
- package/src/stories/Table.stories.tsx +372 -372
- package/src/stories/Tabs.stories.tsx +61 -61
- package/src/stories/Tag.stories.tsx +56 -56
- package/src/stories/Text.stories.tsx +37 -37
- package/src/stories/TextField.stories.tsx +310 -310
- package/src/stories/TextInput.stories.tsx +52 -52
- package/src/stories/TimeLine.stories.tsx +35 -35
- package/src/stories/TimePicker.stories.tsx +87 -87
- package/src/stories/Title.stories.tsx +43 -43
- package/src/stories/UncontrolledTable.stories.tsx +315 -315
- package/src/stories/UncontrolledTabs.stories.tsx +74 -74
- package/src/styles/globals.scss +17 -17
- package/src/types/index.ts +207 -207
- package/src/utils/styledBreakpoints.ts +25 -25
- package/vite.config.ts +15 -15
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { Theme } from '@emotion/react';
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
ButtonPropsColorOverrides,
|
|
6
|
-
ButtonPropsSizeOverrides,
|
|
7
|
-
ButtonPropsVariantOverrides,
|
|
8
|
-
SxProps,
|
|
9
|
-
} from '@mui/material';
|
|
10
|
-
|
|
11
|
-
import { OverridableStringUnion } from '@mui/types';
|
|
12
|
-
import { ColorVariant, ButtonVariant, SizeVariant, MuiIconButtonBaseProps } from '../types';
|
|
13
|
-
|
|
14
|
-
export interface IconButtonBaseProps extends MuiIconButtonBaseProps {
|
|
15
|
-
sx?: SxProps<Theme>;
|
|
16
|
-
children?: ReactNode;
|
|
17
|
-
circle?: boolean;
|
|
18
|
-
cursor?: string;
|
|
19
|
-
color?: OverridableStringUnion<ColorVariant, ButtonPropsColorOverrides>;
|
|
20
|
-
size?: OverridableStringUnion<SizeVariant, ButtonPropsSizeOverrides>;
|
|
21
|
-
variant?: OverridableStringUnion<ButtonVariant, ButtonPropsVariantOverrides>;
|
|
22
|
-
}
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { Theme } from '@emotion/react';
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
ButtonPropsColorOverrides,
|
|
6
|
+
ButtonPropsSizeOverrides,
|
|
7
|
+
ButtonPropsVariantOverrides,
|
|
8
|
+
SxProps,
|
|
9
|
+
} from '@mui/material';
|
|
10
|
+
|
|
11
|
+
import { OverridableStringUnion } from '@mui/types';
|
|
12
|
+
import { ColorVariant, ButtonVariant, SizeVariant, MuiIconButtonBaseProps } from '../types';
|
|
13
|
+
|
|
14
|
+
export interface IconButtonBaseProps extends MuiIconButtonBaseProps {
|
|
15
|
+
sx?: SxProps<Theme>;
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
circle?: boolean;
|
|
18
|
+
cursor?: string;
|
|
19
|
+
color?: OverridableStringUnion<ColorVariant, ButtonPropsColorOverrides>;
|
|
20
|
+
size?: OverridableStringUnion<SizeVariant, ButtonPropsSizeOverrides>;
|
|
21
|
+
variant?: OverridableStringUnion<ButtonVariant, ButtonPropsVariantOverrides>;
|
|
22
|
+
}
|
package/src/interfaces/Icons.ts
CHANGED
|
@@ -1,17 +1,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
|
-
}
|
|
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,18 +1,18 @@
|
|
|
1
|
-
import { SxProps } from '@mui/material';
|
|
2
|
-
import { Theme } from '@emotion/react';
|
|
3
|
-
import { MuiModalBaseProps, MuiPaperBaseProps, 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
|
-
actionSpaceBetween?: boolean;
|
|
12
|
-
className?: string;
|
|
13
|
-
title?: string;
|
|
14
|
-
id?: string;
|
|
15
|
-
paperProps?: MuiPaperBaseProps;
|
|
16
|
-
width?: string;
|
|
17
|
-
|
|
18
|
-
}
|
|
1
|
+
import { SxProps } from '@mui/material';
|
|
2
|
+
import { Theme } from '@emotion/react';
|
|
3
|
+
import { MuiModalBaseProps, MuiPaperBaseProps, 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
|
+
actionSpaceBetween?: boolean;
|
|
12
|
+
className?: string;
|
|
13
|
+
title?: string;
|
|
14
|
+
id?: string;
|
|
15
|
+
paperProps?: MuiPaperBaseProps;
|
|
16
|
+
width?: string;
|
|
17
|
+
|
|
18
|
+
}
|
package/src/interfaces/Paper.ts
CHANGED
|
@@ -1,12 +1,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
|
+
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,29 +1,29 @@
|
|
|
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
|
-
|
|
7
|
-
export interface LinearProgressPropsColorOverrides {}
|
|
8
|
-
|
|
9
|
-
export interface CustomColor {
|
|
10
|
-
root: string;
|
|
11
|
-
bar: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface ProgressBarBaseProps extends MuiProgressBarBaseProps {
|
|
15
|
-
sx?: SxProps<Theme>;
|
|
16
|
-
value?: number;
|
|
17
|
-
total?: number;
|
|
18
|
-
label?: string;
|
|
19
|
-
colorCustom?: CustomColor;
|
|
20
|
-
variant?: ProgressVariant;
|
|
21
|
-
localeString?: boolean;
|
|
22
|
-
color?: OverridableStringUnion<ColorVariant, LinearProgressPropsColorOverrides>;
|
|
23
|
-
h?: number;
|
|
24
|
-
hideValue?: boolean;
|
|
25
|
-
fSize?: string;
|
|
26
|
-
htmlLabel?: React.ReactNode;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
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
|
+
|
|
7
|
+
export interface LinearProgressPropsColorOverrides {}
|
|
8
|
+
|
|
9
|
+
export interface CustomColor {
|
|
10
|
+
root: string;
|
|
11
|
+
bar: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface ProgressBarBaseProps extends MuiProgressBarBaseProps {
|
|
15
|
+
sx?: SxProps<Theme>;
|
|
16
|
+
value?: number;
|
|
17
|
+
total?: number;
|
|
18
|
+
label?: string;
|
|
19
|
+
colorCustom?: CustomColor;
|
|
20
|
+
variant?: ProgressVariant;
|
|
21
|
+
localeString?: boolean;
|
|
22
|
+
color?: OverridableStringUnion<ColorVariant, LinearProgressPropsColorOverrides>;
|
|
23
|
+
h?: number;
|
|
24
|
+
hideValue?: boolean;
|
|
25
|
+
fSize?: string;
|
|
26
|
+
htmlLabel?: React.ReactNode;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export type ProgressBarType = keyof typeof ProgressBar;
|
|
@@ -1,23 +1,23 @@
|
|
|
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 Omit<MuiRadioBaseProps, 'onChange'> {
|
|
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
|
-
onChange?: (event: React.ChangeEvent<HTMLInputElement>, value: string) => void;
|
|
23
|
-
}
|
|
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 Omit<MuiRadioBaseProps, 'onChange'> {
|
|
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
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>, value: string) => void;
|
|
23
|
+
}
|
|
@@ -1,21 +1,21 @@
|
|
|
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
|
-
}
|
|
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 '@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 | 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 | string[];
|
|
12
|
+
open?: boolean;
|
|
13
|
+
onOpen?: (event: React.SyntheticEvent) => void;
|
|
14
|
+
onClose?: (event: React.SyntheticEvent) => void;
|
|
15
|
+
multiple?: boolean;
|
|
16
|
+
data?: DataSelect[];
|
|
17
|
+
}
|
package/src/interfaces/Tabs.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { SxProps } from '@mui/material';
|
|
2
|
-
import { Theme } from '@emotion/react';
|
|
3
|
-
import { ColorVariant, DataTabs, MuiTabsBaseProps, TabsVariant } from '../types';
|
|
4
|
-
|
|
5
|
-
export interface TabsBaseProps extends MuiTabsBaseProps {
|
|
6
|
-
sx?: SxProps<Theme>;
|
|
7
|
-
children?: React.ReactNode;
|
|
8
|
-
onChange?: (event: React.SyntheticEvent, value: any) => void;
|
|
9
|
-
color?: ColorVariant;
|
|
10
|
-
variant?: TabsVariant;
|
|
11
|
-
value?: any;
|
|
12
|
-
data?: DataTabs[];
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface TabPanelProps {
|
|
16
|
-
children?: React.ReactNode;
|
|
17
|
-
index: number;
|
|
18
|
-
value: number;
|
|
19
|
-
}
|
|
1
|
+
import { SxProps } from '@mui/material';
|
|
2
|
+
import { Theme } from '@emotion/react';
|
|
3
|
+
import { ColorVariant, DataTabs, MuiTabsBaseProps, TabsVariant } from '../types';
|
|
4
|
+
|
|
5
|
+
export interface TabsBaseProps extends MuiTabsBaseProps {
|
|
6
|
+
sx?: SxProps<Theme>;
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
onChange?: (event: React.SyntheticEvent, value: any) => void;
|
|
9
|
+
color?: ColorVariant;
|
|
10
|
+
variant?: TabsVariant;
|
|
11
|
+
value?: any;
|
|
12
|
+
data?: DataTabs[];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface TabPanelProps {
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
index: number;
|
|
18
|
+
value: number;
|
|
19
|
+
}
|
package/src/interfaces/Tag.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { SxProps } from '@mui/material';
|
|
2
|
-
import { Theme } from '@emotion/react';
|
|
3
|
-
import { ColorVariant, MuiTagBaseProps } from '../types';
|
|
4
|
-
import { OverridableStringUnion } from '@mui/types';
|
|
5
|
-
|
|
6
|
-
export interface ChipPropsColorOverrides {}
|
|
7
|
-
export interface ChipPropsSizeOverrides {}
|
|
8
|
-
|
|
9
|
-
export interface TagBaseProps extends MuiTagBaseProps {
|
|
10
|
-
label?: React.ReactNode | String;
|
|
11
|
-
sx?: SxProps<Theme>;
|
|
12
|
-
avatar?: React.ReactElement;
|
|
13
|
-
outlined?: Boolean;
|
|
14
|
-
size?: OverridableStringUnion<'small' | 'medium', ChipPropsSizeOverrides>;
|
|
15
|
-
color?: OverridableStringUnion<ColorVariant, ChipPropsColorOverrides>;
|
|
16
|
-
onClose?: React.ReactEventHandler<{}>;
|
|
17
|
-
}
|
|
1
|
+
import { SxProps } from '@mui/material';
|
|
2
|
+
import { Theme } from '@emotion/react';
|
|
3
|
+
import { ColorVariant, MuiTagBaseProps } from '../types';
|
|
4
|
+
import { OverridableStringUnion } from '@mui/types';
|
|
5
|
+
|
|
6
|
+
export interface ChipPropsColorOverrides {}
|
|
7
|
+
export interface ChipPropsSizeOverrides {}
|
|
8
|
+
|
|
9
|
+
export interface TagBaseProps extends MuiTagBaseProps {
|
|
10
|
+
label?: React.ReactNode | String;
|
|
11
|
+
sx?: SxProps<Theme>;
|
|
12
|
+
avatar?: React.ReactElement;
|
|
13
|
+
outlined?: Boolean;
|
|
14
|
+
size?: OverridableStringUnion<'small' | 'medium', ChipPropsSizeOverrides>;
|
|
15
|
+
color?: OverridableStringUnion<ColorVariant, ChipPropsColorOverrides>;
|
|
16
|
+
onClose?: React.ReactEventHandler<{}>;
|
|
17
|
+
}
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import React, { ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
import { TextFieldPropsColorOverrides, TextFieldPropsSizeOverrides } from '@mui/material/TextField';
|
|
4
|
-
import { FormHelperTextProps, InputBaseProps, InputLabelProps, OutlinedInputProps, SelectProps, SxProps, Theme } from '@mui/material';
|
|
5
|
-
import { InputProps as StandardInputProps } from '@mui/material/Input';
|
|
6
|
-
import { OverridableStringUnion } from '@mui/types';
|
|
7
|
-
import { TextField } from '@mui/material';
|
|
8
|
-
import { TextFieldColorVariant, MuiTextFieldBaseProps, TextFieldSizeVariant, TextFieldVariant } from '../types';
|
|
9
|
-
|
|
10
|
-
export interface TextFieldBaseProps extends MuiTextFieldBaseProps {
|
|
11
|
-
id?: string;
|
|
12
|
-
name?: string;
|
|
13
|
-
defaultValue?: string;
|
|
14
|
-
disabled?: boolean;
|
|
15
|
-
required?: boolean;
|
|
16
|
-
type?: React.InputHTMLAttributes<unknown>['type'];
|
|
17
|
-
hasError?: boolean;
|
|
18
|
-
label?: ReactNode;
|
|
19
|
-
children?: ReactNode;
|
|
20
|
-
error?: boolean;
|
|
21
|
-
variant?: TextFieldVariant;
|
|
22
|
-
helperText?: React.ReactNode;
|
|
23
|
-
InputLabelProps?: Partial<InputLabelProps>;
|
|
24
|
-
InputProps?: Partial<OutlinedInputProps>;
|
|
25
|
-
autoComplete?: string;
|
|
26
|
-
placeholder?: string;
|
|
27
|
-
multiline?: boolean;
|
|
28
|
-
rows?: string | number;
|
|
29
|
-
maxRows?: string | number;
|
|
30
|
-
minRows?: string | number;
|
|
31
|
-
select?: boolean;
|
|
32
|
-
SelectProps?: Partial<SelectProps>;
|
|
33
|
-
onChange?: OutlinedInputProps['onChange'];
|
|
34
|
-
onClick?: InputBaseProps['onClick'];
|
|
35
|
-
onBlur?: InputBaseProps['onBlur'];
|
|
36
|
-
onFocus?: StandardInputProps['onFocus'];
|
|
37
|
-
size?: OverridableStringUnion<TextFieldSizeVariant, TextFieldPropsSizeOverrides>;
|
|
38
|
-
FormHelperTextProps?: Partial<FormHelperTextProps>;
|
|
39
|
-
color?: OverridableStringUnion<TextFieldColorVariant, TextFieldPropsColorOverrides>;
|
|
40
|
-
value?: unknown;
|
|
41
|
-
sx?: SxProps<Theme> | undefined
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export type TextFieldType = keyof typeof TextField;
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
import { TextFieldPropsColorOverrides, TextFieldPropsSizeOverrides } from '@mui/material/TextField';
|
|
4
|
+
import { FormHelperTextProps, InputBaseProps, InputLabelProps, OutlinedInputProps, SelectProps, SxProps, Theme } from '@mui/material';
|
|
5
|
+
import { InputProps as StandardInputProps } from '@mui/material/Input';
|
|
6
|
+
import { OverridableStringUnion } from '@mui/types';
|
|
7
|
+
import { TextField } from '@mui/material';
|
|
8
|
+
import { TextFieldColorVariant, MuiTextFieldBaseProps, TextFieldSizeVariant, TextFieldVariant } from '../types';
|
|
9
|
+
|
|
10
|
+
export interface TextFieldBaseProps extends MuiTextFieldBaseProps {
|
|
11
|
+
id?: string;
|
|
12
|
+
name?: string;
|
|
13
|
+
defaultValue?: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
required?: boolean;
|
|
16
|
+
type?: React.InputHTMLAttributes<unknown>['type'];
|
|
17
|
+
hasError?: boolean;
|
|
18
|
+
label?: ReactNode;
|
|
19
|
+
children?: ReactNode;
|
|
20
|
+
error?: boolean;
|
|
21
|
+
variant?: TextFieldVariant;
|
|
22
|
+
helperText?: React.ReactNode;
|
|
23
|
+
InputLabelProps?: Partial<InputLabelProps>;
|
|
24
|
+
InputProps?: Partial<OutlinedInputProps>;
|
|
25
|
+
autoComplete?: string;
|
|
26
|
+
placeholder?: string;
|
|
27
|
+
multiline?: boolean;
|
|
28
|
+
rows?: string | number;
|
|
29
|
+
maxRows?: string | number;
|
|
30
|
+
minRows?: string | number;
|
|
31
|
+
select?: boolean;
|
|
32
|
+
SelectProps?: Partial<SelectProps>;
|
|
33
|
+
onChange?: OutlinedInputProps['onChange'];
|
|
34
|
+
onClick?: InputBaseProps['onClick'];
|
|
35
|
+
onBlur?: InputBaseProps['onBlur'];
|
|
36
|
+
onFocus?: StandardInputProps['onFocus'];
|
|
37
|
+
size?: OverridableStringUnion<TextFieldSizeVariant, TextFieldPropsSizeOverrides>;
|
|
38
|
+
FormHelperTextProps?: Partial<FormHelperTextProps>;
|
|
39
|
+
color?: OverridableStringUnion<TextFieldColorVariant, TextFieldPropsColorOverrides>;
|
|
40
|
+
value?: unknown;
|
|
41
|
+
sx?: SxProps<Theme> | undefined
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export type TextFieldType = keyof typeof TextField;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { SxProps } from '@mui/material';
|
|
2
|
-
import { Theme } from '@emotion/react';
|
|
3
|
-
import { ColorVariant, DataTimeLine, MuiTimeLineBaseProps, PositionVariant } from '../types';
|
|
4
|
-
|
|
5
|
-
export interface TimeLineBaseProps extends MuiTimeLineBaseProps {
|
|
6
|
-
position?: PositionVariant;
|
|
7
|
-
children?: React.ReactNode;
|
|
8
|
-
sx?: SxProps<Theme>;
|
|
9
|
-
color: ColorVariant;
|
|
10
|
-
data: DataTimeLine[];
|
|
11
|
-
}
|
|
1
|
+
import { SxProps } from '@mui/material';
|
|
2
|
+
import { Theme } from '@emotion/react';
|
|
3
|
+
import { ColorVariant, DataTimeLine, MuiTimeLineBaseProps, PositionVariant } from '../types';
|
|
4
|
+
|
|
5
|
+
export interface TimeLineBaseProps extends MuiTimeLineBaseProps {
|
|
6
|
+
position?: PositionVariant;
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
sx?: SxProps<Theme>;
|
|
9
|
+
color: ColorVariant;
|
|
10
|
+
data: DataTimeLine[];
|
|
11
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { SxProps } from '@mui/material';
|
|
2
|
-
import { Theme } from '@emotion/react';
|
|
3
|
-
|
|
4
|
-
import { DatePickVariant } from '../types';
|
|
5
|
-
|
|
6
|
-
export interface TimePickerBaseProps {
|
|
7
|
-
sx?: SxProps<Theme>;
|
|
8
|
-
label?: string;
|
|
9
|
-
timezone?: 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 TimePickerBaseProps {
|
|
7
|
+
sx?: SxProps<Theme>;
|
|
8
|
+
label?: string;
|
|
9
|
+
timezone?: string;
|
|
10
|
+
language?: string;
|
|
11
|
+
onChange?: React.ChangeEvent<HTMLInputElement>;
|
|
12
|
+
variant?: DatePickVariant;
|
|
13
|
+
}
|
package/src/interfaces/index.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
export * from './Accordion';
|
|
2
|
-
export * from './Avatar';
|
|
3
|
-
export * from './Badge';
|
|
4
|
-
export * from './Button';
|
|
5
|
-
export * from './Card';
|
|
6
|
-
export * from './ChatMessage';
|
|
7
|
-
export * from './CheckBox';
|
|
8
|
-
export * from './DatePicker';
|
|
9
|
-
export * from './DropDown';
|
|
10
|
-
export * from './IconButton';
|
|
11
|
-
export * from './Icons';
|
|
12
|
-
export * from './Modal';
|
|
13
|
-
export * from './Paper';
|
|
14
|
-
export * from './ProgressBar';
|
|
15
|
-
export * from './RadioGroup';
|
|
16
|
-
export * from './RangerSlider';
|
|
17
|
-
export * from './Select';
|
|
18
|
-
export * from './Tabs';
|
|
19
|
-
export * from './Tag';
|
|
20
|
-
export * from './TextField';
|
|
21
|
-
export * from './TimeLine';
|
|
22
|
-
export * from './TimePicker';
|
|
23
|
-
export * from './ChatMessageBalloon';
|
|
1
|
+
export * from './Accordion';
|
|
2
|
+
export * from './Avatar';
|
|
3
|
+
export * from './Badge';
|
|
4
|
+
export * from './Button';
|
|
5
|
+
export * from './Card';
|
|
6
|
+
export * from './ChatMessage';
|
|
7
|
+
export * from './CheckBox';
|
|
8
|
+
export * from './DatePicker';
|
|
9
|
+
export * from './DropDown';
|
|
10
|
+
export * from './IconButton';
|
|
11
|
+
export * from './Icons';
|
|
12
|
+
export * from './Modal';
|
|
13
|
+
export * from './Paper';
|
|
14
|
+
export * from './ProgressBar';
|
|
15
|
+
export * from './RadioGroup';
|
|
16
|
+
export * from './RangerSlider';
|
|
17
|
+
export * from './Select';
|
|
18
|
+
export * from './Tabs';
|
|
19
|
+
export * from './Tag';
|
|
20
|
+
export * from './TextField';
|
|
21
|
+
export * from './TimeLine';
|
|
22
|
+
export * from './TimePicker';
|
|
23
|
+
export * from './ChatMessageBalloon';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ThemeProvider } from '@mui/material';
|
|
3
|
-
import { ThemeProviderProps } from "@mui/material/styles/ThemeProvider";
|
|
4
|
-
|
|
5
|
-
export const NormaProvider = (props:ThemeProviderProps) => {
|
|
6
|
-
const { theme, children } = props;
|
|
7
|
-
|
|
8
|
-
return (
|
|
9
|
-
<ThemeProvider theme={theme}>
|
|
10
|
-
{children}
|
|
11
|
-
</ThemeProvider>
|
|
12
|
-
);
|
|
13
|
-
};
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ThemeProvider } from '@mui/material';
|
|
3
|
+
import { ThemeProviderProps } from "@mui/material/styles/ThemeProvider";
|
|
4
|
+
|
|
5
|
+
export const NormaProvider = (props:ThemeProviderProps) => {
|
|
6
|
+
const { theme, children } = props;
|
|
7
|
+
|
|
8
|
+
return (
|
|
9
|
+
<ThemeProvider theme={theme}>
|
|
10
|
+
{children}
|
|
11
|
+
</ThemeProvider>
|
|
12
|
+
);
|
|
13
|
+
};
|