norma-library 0.1.0 → 0.1.2
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/README.md +84 -10
- package/dist/components/Data/ProgressBar/index.d.ts +8 -0
- package/dist/components/Data/ProgressBar/index.d.ts.map +1 -0
- package/dist/components/Data/ProgressBar/types.d.ts +16 -0
- package/dist/components/Data/ProgressBar/types.d.ts.map +1 -0
- package/dist/components/Form/CheckBox/index.d.ts +4 -0
- package/dist/components/Form/CheckBox/index.d.ts.map +1 -0
- package/dist/components/Form/CheckBox/types.d.ts +21 -0
- package/dist/components/Form/CheckBox/types.d.ts.map +1 -0
- package/dist/components/index.d.ts +6 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/norma-library.es.js +4667 -4110
- package/dist/norma-library.umd.js +146 -74
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,9 +16,10 @@ Para instalar o pacote Norma em seu projeto execute o comando em seu terminal:
|
|
|
16
16
|
|
|
17
17
|
### Button
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
```jsx
|
|
20
|
+
import { Button } from 'norma-library'
|
|
21
|
+
;<Button label="Clique-me" onClick={handleButtonClick} />
|
|
22
|
+
```
|
|
22
23
|
|
|
23
24
|
#### Props
|
|
24
25
|
|
|
@@ -35,9 +36,11 @@ O componente `Button` aceita as seguintes propriedades:
|
|
|
35
36
|
|
|
36
37
|
### Card
|
|
37
38
|
|
|
38
|
-
|
|
39
|
+
```jsx
|
|
40
|
+
import { Card } from "norma-library`;
|
|
39
41
|
|
|
40
|
-
|
|
42
|
+
<Card title="Titulo do cartão" /> Conteúdo do card </Card>
|
|
43
|
+
```
|
|
41
44
|
|
|
42
45
|
#### Props
|
|
43
46
|
|
|
@@ -48,10 +51,20 @@ O componente `Card` aceita as seguintes propriedades:
|
|
|
48
51
|
|
|
49
52
|
### Modal
|
|
50
53
|
|
|
51
|
-
|
|
54
|
+
```jsx
|
|
55
|
+
|
|
56
|
+
import { Modal} from "norma-library`;
|
|
52
57
|
|
|
53
|
-
|
|
54
|
-
|
|
58
|
+
<Modal
|
|
59
|
+
open={open}
|
|
60
|
+
onClose={handleClose}
|
|
61
|
+
aria-labelledby="modal-modal-title"
|
|
62
|
+
aria-describedby="modal-modal-description"
|
|
63
|
+
onConfirm={handleConfirm}
|
|
64
|
+
title="Titulo do modal">
|
|
65
|
+
conteúdo do modal
|
|
66
|
+
</modal>
|
|
67
|
+
```
|
|
55
68
|
|
|
56
69
|
#### Props
|
|
57
70
|
|
|
@@ -68,9 +81,16 @@ O componente `Modal` aceita as seguintes propriedades:
|
|
|
68
81
|
|
|
69
82
|
### TextField
|
|
70
83
|
|
|
71
|
-
|
|
84
|
+
```jsx
|
|
85
|
+
import { TextField } from "norma-library`;
|
|
86
|
+
|
|
87
|
+
<TextField
|
|
88
|
+
id="outlined-basic"
|
|
89
|
+
label="Outlined"
|
|
90
|
+
variant="outlined"
|
|
91
|
+
/>
|
|
72
92
|
|
|
73
|
-
|
|
93
|
+
```
|
|
74
94
|
|
|
75
95
|
#### Props
|
|
76
96
|
|
|
@@ -84,3 +104,57 @@ O componente `TextField` aceita as seguintes propriedades:
|
|
|
84
104
|
- `required` (boolean): Indica se o campo de entrada é obrigatório.
|
|
85
105
|
- `hasError` (boolean): Indica se o campo de entrada possui erro.
|
|
86
106
|
- E outras propriedades relacionadas a estilos, tamanho, id, etc.
|
|
107
|
+
|
|
108
|
+
### CheckBox
|
|
109
|
+
|
|
110
|
+
```jsx
|
|
111
|
+
import { CheckBox } from "norma-library`;
|
|
112
|
+
|
|
113
|
+
<CheckBox
|
|
114
|
+
id="checkbox-basic"
|
|
115
|
+
label="Checkbox"
|
|
116
|
+
checked={checked}
|
|
117
|
+
onChange={handleCheckboxChange}
|
|
118
|
+
/>
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
#### Props
|
|
122
|
+
|
|
123
|
+
O componente `CheckBox` aceita as seguintes propriedades:
|
|
124
|
+
|
|
125
|
+
- `label` (ReactNode): Rótulo exibido acima do campo de entrada.
|
|
126
|
+
- `checked ` (boolean): Indica se a caixa de seleção está marcada.
|
|
127
|
+
- `onChange` (função): Função de callback chamada quando o valor do campo muda.
|
|
128
|
+
- `disabled` (boolean): Indica se o campo de entrada está desabilitado.
|
|
129
|
+
- `color ` (string): A cor da caixa de seleção (primary, secondary, error, info, success, warning, default).
|
|
130
|
+
- `size ` (string): O tamanho da caixa de seleção (small, medium).
|
|
131
|
+
- `value` (TextFieldValue): O valor do campo de entrada.
|
|
132
|
+
- E outras propriedades relacionadas a estilos, required, id, etc.
|
|
133
|
+
|
|
134
|
+
### ProgressBar
|
|
135
|
+
|
|
136
|
+
```jsx
|
|
137
|
+
import { ProgressBar } from "norma-library`;
|
|
138
|
+
|
|
139
|
+
<ProgressBar
|
|
140
|
+
variant="determinate"
|
|
141
|
+
value={(35 / 180) * 100} // value
|
|
142
|
+
usage={35}
|
|
143
|
+
total={180}
|
|
144
|
+
label="Progresso"
|
|
145
|
+
color="primary"
|
|
146
|
+
/>
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
#### Props
|
|
150
|
+
|
|
151
|
+
O componente `ProgressBar` aceita as seguintes propriedades:
|
|
152
|
+
|
|
153
|
+
- `sx` (SxProps<Theme>): Propriedade de estilo do Material-UI para estilizar o componente.
|
|
154
|
+
- `usage` (number): O valor de uso para calcular a porcentagem da barra de progresso.
|
|
155
|
+
- `value` (number): O valor da barra de progresso.
|
|
156
|
+
- `total` (number): O valor total usado para calcular a porcentagem.
|
|
157
|
+
- `label` (string): Texto do rótulo exibido acima da barra de progresso.
|
|
158
|
+
- `colorCustom` (string): Cor personalizada para a barra de progresso.
|
|
159
|
+
- `variant` ('determinate' | 'indeterminate' | 'buffer' | 'query'): O estilo da barra de progresso.
|
|
160
|
+
- `color` (string): Cor da barra de progresso (primary, secondary, error, info, success, warning, inherit).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAiC9C,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAChC,oBAAoB,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAuBhF,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SxProps, LinearProgressProps } from '@mui/material';
|
|
2
|
+
import { Theme } from '@emotion/react';
|
|
3
|
+
import { OverridableStringUnion } from '@mui/types';
|
|
4
|
+
export interface LinearProgressPropsColorOverrides {
|
|
5
|
+
}
|
|
6
|
+
export type ProgressBarBaseProps = Pick<LinearProgressProps, 'sx'> & {
|
|
7
|
+
sx?: SxProps<Theme>;
|
|
8
|
+
usage?: number;
|
|
9
|
+
value?: number;
|
|
10
|
+
total?: number;
|
|
11
|
+
label?: string;
|
|
12
|
+
colorCustom?: string;
|
|
13
|
+
variant?: 'determinate' | 'indeterminate' | 'buffer' | 'query';
|
|
14
|
+
color?: OverridableStringUnion<'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning' | 'inherit', LinearProgressPropsColorOverrides>;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AACtC,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AAGnD,MAAM,WAAW,iCAAiC;CAAG;AAErD,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,mBAAmB,EAAE,IAAI,CAAC,GAAG;IACnE,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,aAAa,GAAG,eAAe,GAAG,QAAQ,GAAG,OAAO,CAAA;IAC9D,KAAK,CAAC,EAAE,sBAAsB,CAC5B,SAAS,GAAG,WAAW,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,EAC9E,iCAAiC,CAClC,CAAA;CACF,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAK3C,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAMhD,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { OverridableStringUnion } from '@mui/types';
|
|
2
|
+
import { CheckboxProps as MuiCheckBoxProps, SxProps, Theme } from '@mui/material';
|
|
3
|
+
import { SwitchBaseProps } from '@mui/material/internal/SwitchBase';
|
|
4
|
+
export interface CheckboxPropsSizeOverrides {
|
|
5
|
+
}
|
|
6
|
+
export interface CheckboxPropsColorOverrides {
|
|
7
|
+
}
|
|
8
|
+
export type CheckBoxBaseProps = Pick<MuiCheckBoxProps, 'sx'> & {
|
|
9
|
+
sx?: SxProps<Theme>;
|
|
10
|
+
name?: string;
|
|
11
|
+
checked?: SwitchBaseProps['checked'];
|
|
12
|
+
color?: OverridableStringUnion<'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning' | 'default', CheckboxPropsColorOverrides>;
|
|
13
|
+
disabled?: SwitchBaseProps['disabled'];
|
|
14
|
+
id?: SwitchBaseProps['id'];
|
|
15
|
+
onChange?: SwitchBaseProps['onChange'];
|
|
16
|
+
required?: SwitchBaseProps['required'];
|
|
17
|
+
size?: OverridableStringUnion<'small' | 'medium', CheckboxPropsSizeOverrides>;
|
|
18
|
+
value?: SwitchBaseProps['value'];
|
|
19
|
+
defaultChecked?: boolean;
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AACnD,OAAO,EAAE,aAAa,IAAI,gBAAgB,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAA;AAGnE,MAAM,WAAW,0BAA0B;CAAG;AAE9C,MAAM,WAAW,2BAA2B;CAAG;AAE/C,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,GAAG;IAC7D,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,eAAe,CAAC,SAAS,CAAC,CAAA;IACpC,KAAK,CAAC,EAAE,sBAAsB,CAC5B,SAAS,GAAG,WAAW,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,EAC9E,2BAA2B,CAC5B,CAAA;IACD,QAAQ,CAAC,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACtC,EAAE,CAAC,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;IAC1B,QAAQ,CAAC,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACtC,QAAQ,CAAC,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACtC,IAAI,CAAC,EAAE,sBAAsB,CAAC,OAAO,GAAG,QAAQ,EAAE,0BAA0B,CAAC,CAAA;IAC7E,KAAK,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC,CAAA;IAChC,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB,CAAA"}
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
export type { ButtonBaseProps } from './Layout/Button/types';
|
|
2
2
|
export type { CardBaseProps } from './Layout/Card/types';
|
|
3
|
-
export type { IconsProps } from './Data/Icon/types';
|
|
4
3
|
export type { ModalBaseProps } from './Layout/Modal/types';
|
|
4
|
+
export type { ProgressBarBaseProps } from './Data/ProgressBar/types';
|
|
5
|
+
export type { IconsProps } from './Data/Icon/types';
|
|
6
|
+
export type { TextFieldBaseProps } from './Form/TextField/types';
|
|
7
|
+
export type { CheckBoxBaseProps } from './Form/CheckBox/types';
|
|
5
8
|
export { Button } from './Layout/Button';
|
|
6
9
|
export { Card } from './Layout/Card';
|
|
7
10
|
export { Modal } from './Layout/Modal';
|
|
8
11
|
export { TextField } from './Form/TextField';
|
|
12
|
+
export { CheckBox } from './Form/CheckBox';
|
|
9
13
|
export { Icons as DefaultIconSVG } from './Data/Icon/DefaultIcon';
|
|
10
14
|
export { Icons as NormaIconSVG } from './Data/Icon/NormaIcon';
|
|
15
|
+
export { ProgressBar } from './Data/ProgressBar';
|
|
11
16
|
export { palette, lightTheme, darkTheme } from '@helpers/colors';
|
|
12
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,YAAY,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACxD,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,YAAY,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACxD,YAAY,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,YAAY,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAEpE,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAEnD,YAAY,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAChE,YAAY,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AAE9D,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAEtC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAE1C,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACjE,OAAO,EAAE,KAAK,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAEhD,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA"}
|