norma-library 0.1.1 → 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 +67 -12
- 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/types.d.ts.map +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/norma-library.es.js +3249 -2947
- package/dist/norma-library.umd.js +145 -73
- 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
|
|
|
@@ -87,9 +107,16 @@ O componente `TextField` aceita as seguintes propriedades:
|
|
|
87
107
|
|
|
88
108
|
### CheckBox
|
|
89
109
|
|
|
90
|
-
|
|
110
|
+
```jsx
|
|
111
|
+
import { CheckBox } from "norma-library`;
|
|
91
112
|
|
|
92
|
-
|
|
113
|
+
<CheckBox
|
|
114
|
+
id="checkbox-basic"
|
|
115
|
+
label="Checkbox"
|
|
116
|
+
checked={checked}
|
|
117
|
+
onChange={handleCheckboxChange}
|
|
118
|
+
/>
|
|
119
|
+
```
|
|
93
120
|
|
|
94
121
|
#### Props
|
|
95
122
|
|
|
@@ -103,3 +130,31 @@ O componente `CheckBox` aceita as seguintes propriedades:
|
|
|
103
130
|
- `size ` (string): O tamanho da caixa de seleção (small, medium).
|
|
104
131
|
- `value` (TextFieldValue): O valor do campo de entrada.
|
|
105
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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"
|
|
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,6 +1,7 @@
|
|
|
1
1
|
export type { ButtonBaseProps } from './Layout/Button/types';
|
|
2
2
|
export type { CardBaseProps } from './Layout/Card/types';
|
|
3
3
|
export type { ModalBaseProps } from './Layout/Modal/types';
|
|
4
|
+
export type { ProgressBarBaseProps } from './Data/ProgressBar/types';
|
|
4
5
|
export type { IconsProps } from './Data/Icon/types';
|
|
5
6
|
export type { TextFieldBaseProps } from './Form/TextField/types';
|
|
6
7
|
export type { CheckBoxBaseProps } from './Form/CheckBox/types';
|
|
@@ -11,5 +12,6 @@ export { TextField } from './Form/TextField';
|
|
|
11
12
|
export { CheckBox } from './Form/CheckBox';
|
|
12
13
|
export { Icons as DefaultIconSVG } from './Data/Icon/DefaultIcon';
|
|
13
14
|
export { Icons as NormaIconSVG } from './Data/Icon/NormaIcon';
|
|
15
|
+
export { ProgressBar } from './Data/ProgressBar';
|
|
14
16
|
export { palette, lightTheme, darkTheme } from '@helpers/colors';
|
|
15
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,cAAc,EAAE,MAAM,sBAAsB,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"}
|