norma-library 0.6.6 → 0.6.62

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.
Files changed (164) hide show
  1. package/.babelrc.json +18 -18
  2. package/.prettierignore +10 -10
  3. package/.prettierrc.json +20 -20
  4. package/.storybook/main.ts +20 -20
  5. package/.storybook/preview.ts +15 -15
  6. package/README.md +43 -43
  7. package/commitlint.config.js +1 -1
  8. package/dist/esm/helpers/colors.js +1 -1
  9. package/docs/index.md +118 -118
  10. package/package.json +136 -136
  11. package/src/components/Accordion.tsx +39 -39
  12. package/src/components/Avatar.tsx +17 -17
  13. package/src/components/Badge.tsx +14 -14
  14. package/src/components/Box/index.tsx +12 -12
  15. package/src/components/Box/interfaces.ts +3 -3
  16. package/src/components/Box/styles.tsx +22 -22
  17. package/src/components/Breadcrumb/index.tsx +27 -27
  18. package/src/components/Breadcrumb/interface.ts +8 -8
  19. package/src/components/Breadcrumb/styles.tsx +32 -32
  20. package/src/components/Button.tsx +26 -26
  21. package/src/components/Card.tsx +37 -37
  22. package/src/components/ChatMessage.tsx +87 -87
  23. package/src/components/ChatMessageBalloon/ChatMessageBalloon.style.ts +56 -56
  24. package/src/components/ChatMessageBalloon/ChatMessageBalloon.tsx +55 -55
  25. package/src/components/CheckBox.tsx +21 -21
  26. package/src/components/DateInput/index.tsx +34 -34
  27. package/src/components/DateInput/interface.ts +13 -13
  28. package/src/components/DateInput/styles.tsx +27 -27
  29. package/src/components/DatePicker.tsx +67 -67
  30. package/src/components/DropDown.tsx +24 -24
  31. package/src/components/IconButton.tsx +37 -37
  32. package/src/components/Icons.tsx +82 -82
  33. package/src/components/Modal.tsx +103 -103
  34. package/src/components/MultiSelectInput/components/MultiValue/index.tsx +44 -44
  35. package/src/components/MultiSelectInput/components/Option/index.tsx +62 -62
  36. package/src/components/MultiSelectInput/components/Option/styles.tsx +8 -8
  37. package/src/components/MultiSelectInput/index.tsx +60 -60
  38. package/src/components/MultiSelectInput/interfaces.ts +15 -15
  39. package/src/components/MultiSelectInput/styles.tsx +43 -43
  40. package/src/components/Paper.tsx +12 -12
  41. package/src/components/ProgressBar.tsx +71 -71
  42. package/src/components/RadioGroup.tsx +43 -43
  43. package/src/components/RangerSlider.tsx +65 -65
  44. package/src/components/Select.tsx +74 -74
  45. package/src/components/SelectInput/components/Option/index.tsx +61 -61
  46. package/src/components/SelectInput/components/Option/styles.tsx +8 -8
  47. package/src/components/SelectInput/index.tsx +45 -45
  48. package/src/components/SelectInput/interfaces.ts +15 -15
  49. package/src/components/SelectInput/styles.tsx +31 -31
  50. package/src/components/StatusModal/StatusModal.style.tsx +75 -75
  51. package/src/components/StatusModal/StatusModal.tsx +58 -58
  52. package/src/components/Svgs.tsx +506 -506
  53. package/src/components/Table/components/header/index.tsx +86 -86
  54. package/src/components/Table/components/header/styles.tsx +59 -59
  55. package/src/components/Table/components/index.tsx +8 -8
  56. package/src/components/Table/components/pagination/index.tsx +39 -39
  57. package/src/components/Table/components/pagination/styles.tsx +28 -28
  58. package/src/components/Table/components/tbody/index.tsx +30 -30
  59. package/src/components/Table/components/tbody/styles.tsx +4 -4
  60. package/src/components/Table/index.tsx +317 -317
  61. package/src/components/Table/interface.ts +23 -23
  62. package/src/components/Table/styles.tsx +117 -117
  63. package/src/components/Tabs.tsx +105 -105
  64. package/src/components/Tag.tsx +33 -33
  65. package/src/components/TextField.tsx +19 -19
  66. package/src/components/TextInput/index.tsx +37 -37
  67. package/src/components/TextInput/interface.ts +9 -9
  68. package/src/components/TextInput/styles.tsx +23 -23
  69. package/src/components/TimeLine.tsx +89 -89
  70. package/src/components/TimePicker.tsx +78 -78
  71. package/src/components/Typography/Text/index.tsx +20 -20
  72. package/src/components/Typography/Text/interfaces.ts +5 -5
  73. package/src/components/Typography/Text/styles.tsx +40 -40
  74. package/src/components/Typography/Title/index.tsx +22 -22
  75. package/src/components/Typography/Title/interfaces.ts +6 -6
  76. package/src/components/Typography/Title/styles.tsx +40 -40
  77. package/src/components/Typography/index.tsx +6 -6
  78. package/src/components/UncontrolledTable/components/header/index.tsx +72 -72
  79. package/src/components/UncontrolledTable/components/header/styles.tsx +66 -66
  80. package/src/components/UncontrolledTable/components/index.tsx +8 -8
  81. package/src/components/UncontrolledTable/components/pagination/index.tsx +43 -43
  82. package/src/components/UncontrolledTable/components/pagination/styles.tsx +28 -28
  83. package/src/components/UncontrolledTable/components/tbody/index.tsx +33 -33
  84. package/src/components/UncontrolledTable/components/tbody/styles.tsx +32 -32
  85. package/src/components/UncontrolledTable/index.tsx +223 -223
  86. package/src/components/UncontrolledTable/interface.ts +46 -46
  87. package/src/components/UncontrolledTable/styles.tsx +123 -123
  88. package/src/components/UncontrolledTabs/UncontrolledTabs.style.tsx +58 -58
  89. package/src/components/UncontrolledTabs/UncontrolledTabs.tsx +71 -71
  90. package/src/components/UncontrolledTabs/UncontrolledTabsInfo.style.ts +8 -8
  91. package/src/components/index.ts +24 -24
  92. package/src/helpers/alignments.ts +14 -14
  93. package/src/helpers/borders.ts +18 -18
  94. package/src/helpers/colors.ts +258 -258
  95. package/src/helpers/index.ts +5 -5
  96. package/src/helpers/radios.ts +24 -24
  97. package/src/helpers/sizes.ts +72 -72
  98. package/src/hooks/useClickOutside.tsx +18 -18
  99. package/src/index.ts +70 -70
  100. package/src/interfaces/Accordion.ts +12 -12
  101. package/src/interfaces/Avatar.tsx +15 -15
  102. package/src/interfaces/Badge.ts +19 -19
  103. package/src/interfaces/Button.ts +22 -22
  104. package/src/interfaces/Card.ts +11 -11
  105. package/src/interfaces/ChatMessage.ts +12 -12
  106. package/src/interfaces/ChatMessageBalloon.ts +17 -17
  107. package/src/interfaces/CheckBox.ts +27 -27
  108. package/src/interfaces/DatePicker.ts +13 -13
  109. package/src/interfaces/DropDown.ts +14 -14
  110. package/src/interfaces/IconButton.ts +22 -22
  111. package/src/interfaces/Icons.ts +17 -17
  112. package/src/interfaces/Modal.ts +18 -18
  113. package/src/interfaces/Paper.ts +12 -12
  114. package/src/interfaces/ProgressBar.ts +29 -29
  115. package/src/interfaces/RadioGroup.ts +23 -23
  116. package/src/interfaces/RangerSlider.ts +21 -21
  117. package/src/interfaces/Select.ts +17 -17
  118. package/src/interfaces/Tabs.ts +19 -19
  119. package/src/interfaces/Tag.ts +17 -17
  120. package/src/interfaces/TextField.ts +44 -44
  121. package/src/interfaces/TimeLine.ts +11 -11
  122. package/src/interfaces/TimePicker.ts +13 -13
  123. package/src/interfaces/index.ts +23 -23
  124. package/src/providers/NormaProvider.tsx +13 -13
  125. package/src/sample-data-2.json +178 -178
  126. package/src/sample-data.json +177 -177
  127. package/src/stories/Accordion.stories.tsx +65 -65
  128. package/src/stories/Avatar.stories.tsx +123 -123
  129. package/src/stories/Badge.stories.tsx +39 -39
  130. package/src/stories/Box.stories.tsx +35 -35
  131. package/src/stories/Breadcrumb.stories.tsx +44 -44
  132. package/src/stories/Button.stories.tsx +93 -93
  133. package/src/stories/Card.stories.tsx +39 -39
  134. package/src/stories/ChatMessage.stories.tsx +84 -84
  135. package/src/stories/ChatMessageBalloon.stories.tsx +108 -108
  136. package/src/stories/CheckBox.stories.tsx +88 -88
  137. package/src/stories/DateInput.stories.tsx +51 -51
  138. package/src/stories/DatePicker.stories.tsx +50 -50
  139. package/src/stories/DropDown.stories.tsx +57 -57
  140. package/src/stories/IconButton.stories.tsx +78 -78
  141. package/src/stories/Modal.stories.tsx +246 -246
  142. package/src/stories/ModalStatus.stories.tsx +46 -46
  143. package/src/stories/MultiSelectInput.stories.tsx +90 -90
  144. package/src/stories/Paper.stories.tsx +53 -53
  145. package/src/stories/ProgressBar.stories.tsx +116 -116
  146. package/src/stories/RadioGroup.stories.tsx +87 -87
  147. package/src/stories/RangerSlider.stories.tsx +149 -149
  148. package/src/stories/Select.stories.tsx +100 -100
  149. package/src/stories/SelectInput.stories.tsx +78 -78
  150. package/src/stories/Table.stories.tsx +372 -372
  151. package/src/stories/Tabs.stories.tsx +61 -61
  152. package/src/stories/Tag.stories.tsx +56 -56
  153. package/src/stories/Text.stories.tsx +37 -37
  154. package/src/stories/TextField.stories.tsx +310 -310
  155. package/src/stories/TextInput.stories.tsx +52 -52
  156. package/src/stories/TimeLine.stories.tsx +35 -35
  157. package/src/stories/TimePicker.stories.tsx +87 -87
  158. package/src/stories/Title.stories.tsx +43 -43
  159. package/src/stories/UncontrolledTable.stories.tsx +315 -315
  160. package/src/stories/UncontrolledTabs.stories.tsx +74 -74
  161. package/src/styles/globals.scss +17 -17
  162. package/src/types/index.ts +207 -207
  163. package/src/utils/styledBreakpoints.ts +25 -25
  164. package/vite.config.ts +15 -15
package/.babelrc.json CHANGED
@@ -1,18 +1,18 @@
1
- {
2
- "sourceType": "unambiguous",
3
- "presets": [
4
- [
5
- "@babel/preset-env",
6
- {
7
- "targets": {
8
- "chrome": 100,
9
- "safari": 15,
10
- "firefox": 91
11
- }
12
- }
13
- ],
14
- "@babel/preset-typescript",
15
- "@babel/preset-react"
16
- ],
17
- "plugins": []
18
- }
1
+ {
2
+ "sourceType": "unambiguous",
3
+ "presets": [
4
+ [
5
+ "@babel/preset-env",
6
+ {
7
+ "targets": {
8
+ "chrome": 100,
9
+ "safari": 15,
10
+ "firefox": 91
11
+ }
12
+ }
13
+ ],
14
+ "@babel/preset-typescript",
15
+ "@babel/preset-react"
16
+ ],
17
+ "plugins": []
18
+ }
package/.prettierignore CHANGED
@@ -1,11 +1,11 @@
1
- *.json
2
- .husky/
3
- .storybook/
4
- storybook-static/
5
- scripts/
6
- lib/
7
- build/
8
- dist/
9
- src/styles/*
10
- *.d.ts
1
+ *.json
2
+ .husky/
3
+ .storybook/
4
+ storybook-static/
5
+ scripts/
6
+ lib/
7
+ build/
8
+ dist/
9
+ src/styles/*
10
+ *.d.ts
11
11
  .rollup.cache
package/.prettierrc.json CHANGED
@@ -1,20 +1,20 @@
1
- {
2
- "printWidth": 120,
3
- "singleQuote": true,
4
- "trailingComma": "all",
5
- "arrowParens": "avoid",
6
- "overrides": [
7
- {
8
- "files": ["docs/**/*.md", "docs/src/pages/**/*.{js,tsx}", "docs/data/**/*.{js,tsx}"],
9
- "options": {
10
- "printWidth": 85
11
- }
12
- },
13
- {
14
- "files": ["docs/pages/blog/**/*.md"],
15
- "options": {
16
- "printWidth": 82
17
- }
18
- }
19
- ]
20
- }
1
+ {
2
+ "printWidth": 120,
3
+ "singleQuote": true,
4
+ "trailingComma": "all",
5
+ "arrowParens": "avoid",
6
+ "overrides": [
7
+ {
8
+ "files": ["docs/**/*.md", "docs/src/pages/**/*.{js,tsx}", "docs/data/**/*.{js,tsx}"],
9
+ "options": {
10
+ "printWidth": 85
11
+ }
12
+ },
13
+ {
14
+ "files": ["docs/pages/blog/**/*.md"],
15
+ "options": {
16
+ "printWidth": 82
17
+ }
18
+ }
19
+ ]
20
+ }
@@ -1,20 +1,20 @@
1
- import type { StorybookConfig } from '@storybook/react-vite';
2
-
3
- const config: StorybookConfig = {
4
- stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
5
- addons: [
6
- '@storybook/addon-links',
7
- '@storybook/addon-essentials',
8
- '@storybook/addon-onboarding',
9
- '@storybook/addon-interactions',
10
- '@storybook/addon-mdx-gfm'
11
- ],
12
- framework: {
13
- name: '@storybook/react-vite',
14
- options: {},
15
- },
16
- docs: {
17
- autodocs: 'tag',
18
- },
19
- };
20
- export default config;
1
+ import type { StorybookConfig } from '@storybook/react-vite';
2
+
3
+ const config: StorybookConfig = {
4
+ stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
5
+ addons: [
6
+ '@storybook/addon-links',
7
+ '@storybook/addon-essentials',
8
+ '@storybook/addon-onboarding',
9
+ '@storybook/addon-interactions',
10
+ '@storybook/addon-mdx-gfm'
11
+ ],
12
+ framework: {
13
+ name: '@storybook/react-vite',
14
+ options: {},
15
+ },
16
+ docs: {
17
+ autodocs: 'tag',
18
+ },
19
+ };
20
+ export default config;
@@ -1,15 +1,15 @@
1
- import type { Preview } from '@storybook/react';
2
-
3
- const preview: Preview = {
4
- parameters: {
5
- actions: { argTypesRegex: '^on[A-Z].*' },
6
- controls: {
7
- matchers: {
8
- color: /(background|color)$/i,
9
- date: /Date$/i,
10
- },
11
- },
12
- },
13
- };
14
-
15
- export default preview;
1
+ import type { Preview } from '@storybook/react';
2
+
3
+ const preview: Preview = {
4
+ parameters: {
5
+ actions: { argTypesRegex: '^on[A-Z].*' },
6
+ controls: {
7
+ matchers: {
8
+ color: /(background|color)$/i,
9
+ date: /Date$/i,
10
+ },
11
+ },
12
+ },
13
+ };
14
+
15
+ export default preview;
package/README.md CHANGED
@@ -1,44 +1,44 @@
1
- <!-- markdownlint-disable-next-line -->
2
- <p align="center">
3
- <img width="120" height="120" src="https://www.olos.com.br/wp-content/uploads/2023/03/cropped-selo-olos-1-180x180.png" alt="Olos logo">
4
- </p>
5
- <h1 align="center">Norma DS </h1>
6
- <div align="center">
7
- Olos/Norma-DS. Design System based on Material UI, developed with TypeScript and Styled Components to create reusable and consistent components in web applications.
8
-
9
- [![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/mui/material-ui/blob/HEAD/LICENSE)
10
- [![npm latest package](https://img.shields.io/npm/v/@mui/material/latest.svg)](https://www.npmjs.com/package/@mui/material)
11
- [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
12
-
13
- [Documentation](#Documentation) |
14
- [Contributing](#Contributing) |
15
- [Changelog](#Changelog) |
16
- [License](#License)
17
-
18
- ---
19
-
20
- </div>
21
-
22
- ## Configurações
23
-
24
- - [React v18](https://react.dev/)
25
- - [TypeScript](https://www.typescriptlang.org/)
26
- - UI development with [Storybook](https://storybook.js.org/)
27
- - Unit test with [Testing-library](https://testing-library.com/)
28
- - Linting with [Eslint](https://eslint.org/) and code formatting with [Prettier](https://prettier.io/)
29
- - Conventional commit messages with [Commitlint][commitlint-url]
30
- - Build the library with [Rollup][rollup-url]
31
- - Automated release with [changesets][changesets-url]
32
-
33
- # Documentação
34
-
35
- ### Instalação
36
- Para instalação das dependencias:
37
- ```
38
- npm install
39
- ```
40
- ### Execução do projeto
41
- Para utilizar o Storybook:
42
- ```
43
- npm run storybook
1
+ <!-- markdownlint-disable-next-line -->
2
+ <p align="center">
3
+ <img width="120" height="120" src="https://www.olos.com.br/wp-content/uploads/2023/03/cropped-selo-olos-1-180x180.png" alt="Olos logo">
4
+ </p>
5
+ <h1 align="center">Norma DS </h1>
6
+ <div align="center">
7
+ Olos/Norma-DS. Design System based on Material UI, developed with TypeScript and Styled Components to create reusable and consistent components in web applications.
8
+
9
+ [![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/mui/material-ui/blob/HEAD/LICENSE)
10
+ [![npm latest package](https://img.shields.io/npm/v/@mui/material/latest.svg)](https://www.npmjs.com/package/@mui/material)
11
+ [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
12
+
13
+ [Documentation](#Documentation) |
14
+ [Contributing](#Contributing) |
15
+ [Changelog](#Changelog) |
16
+ [License](#License)
17
+
18
+ ---
19
+
20
+ </div>
21
+
22
+ ## Configurações
23
+
24
+ - [React v18](https://react.dev/)
25
+ - [TypeScript](https://www.typescriptlang.org/)
26
+ - UI development with [Storybook](https://storybook.js.org/)
27
+ - Unit test with [Testing-library](https://testing-library.com/)
28
+ - Linting with [Eslint](https://eslint.org/) and code formatting with [Prettier](https://prettier.io/)
29
+ - Conventional commit messages with [Commitlint][commitlint-url]
30
+ - Build the library with [Rollup][rollup-url]
31
+ - Automated release with [changesets][changesets-url]
32
+
33
+ # Documentação
34
+
35
+ ### Instalação
36
+ Para instalação das dependencias:
37
+ ```
38
+ npm install
39
+ ```
40
+ ### Execução do projeto
41
+ Para utilizar o Storybook:
42
+ ```
43
+ npm run storybook
44
44
  ```
@@ -1 +1 @@
1
- module.exports = {extends: ['@commitlint/config-conventional']}
1
+ module.exports = {extends: ['@commitlint/config-conventional']}
@@ -2,7 +2,7 @@ import { __assign } from "tslib";
2
2
  import { createTheme } from '@mui/material/styles';
3
3
  export var getPalette = function () {
4
4
  return {
5
- primary: '#db6619',
5
+ primary: '#fc7f29',
6
6
  primaryLight: '#FFDB9F',
7
7
  primaryMedium: '#FFA84C',
8
8
  primaryDark: '#B74608',
package/docs/index.md CHANGED
@@ -1,118 +1,118 @@
1
- ## Passos Básicos
2
-
3
- ### 1. Instalando o pacote em seu projeto
4
-
5
- Para instalar o pacote Norma em seu projeto execute o comando em seu terminal:
6
-
7
- ### `npm install norma-library`
8
-
9
- ## Components disponível e como usa-lo
10
-
11
- ### Button
12
-
13
- `import { Button } from "norma-library`;
14
-
15
- `<Button label="Clique-me" onClick={handleButtonClick} />`;
16
-
17
- #### Props
18
-
19
- O componente `Button` aceita as seguintes propriedades:
20
-
21
- - `label` (string, obrigatório): O texto exibido no botão.
22
- - `sx` (SxProps<Theme>): Estilos personalizados usando o sistema de estilos do Material-UI.
23
- - `color` (string): A cor do botão (inherit, primary, secondary, success, error, info, warning).
24
- - `size` (string): O tamanho do botão (small, medium, large).
25
- - `variant` (string): A variante do botão (text, outlined, contained).
26
- - `style` (React.CSSProperties): Estilos CSS adicionais.
27
- - `children` (ReactNode): Conteúdo adicional a ser exibido dentro do botão.
28
- - `onClick` (função): Uma função de callback para ser executada quando o botão for clicado.
29
-
30
- ### Card
31
-
32
- `import { Card } from "norma-library`;
33
-
34
- `<Card title="Titulo do cartão" />conteúdo do card</card>`;
35
-
36
- #### Props
37
-
38
- O componente `Card` aceita as seguintes propriedades:
39
-
40
- - `title` (string, opcional): O título exibido no cabeçalho do card, se fornecido.
41
- - `children` (ReactNode, obrigatório): O conteúdo do card, que pode incluir qualquer componente ou conteúdo.
42
-
43
- ### Modal
44
-
45
- `import { Modal} from "norma-library`;
46
-
47
- `<Modal open={open} onClose={handleClose} aria-labelledby="modal-modal-title" aria-describedby="modal-modal-description" onConfirm={handleConfirm}
48
- title="Titulo do modal">conteúdo do modal</modal>`;
49
-
50
- #### Props
51
-
52
- O componente `Modal` aceita as seguintes propriedades:
53
-
54
- - `sx` (SxProps<Theme>): Estilos personalizados usando o sistema de estilos do Material-UI.
55
- - `children` (React.ReactElement | React.ReactElement[]): Elementos filhos do modal.
56
- - `open` (boolean): Indica se o modal está aberto.
57
- - `onClose` (função): Função de callback chamada quando o modal é fechado.
58
- - `className` (string): Classe CSS adicional para estilização.
59
- - `title` (string): Título do modal.
60
- - `full` (boolean): Indica se o modal deve ocupar toda a largura.
61
- - `onConfirm` (função): Função de callback chamada quando o botão "Confirmar" é clicado.
62
-
63
- ### TextField
64
-
65
- `import { TextField } from "norma-library`;
66
-
67
- `<TextField id="outlined-basic" label="Outlined" variant="outlined" />`;
68
-
69
- #### Props
70
-
71
- O componente `TextField` aceita as seguintes propriedades:
72
-
73
- - `label` (ReactNode): Rótulo exibido acima do campo de entrada.
74
- - `variant` (string): A variante do campo (standard, outlined, filled).
75
- - `value` (TextFieldValue): O valor do campo de entrada.
76
- - `onChange` (função): Função de callback chamada quando o valor do campo muda.
77
- - `disabled` (boolean): Indica se o campo de entrada está desabilitado.
78
- - `required` (boolean): Indica se o campo de entrada é obrigatório.
79
- - `hasError` (boolean): Indica se o campo de entrada possui erro.
80
- - E outras propriedades relacionadas a estilos, tamanho, id, etc.
81
-
82
- ### CheckBox
83
-
84
- `import { CheckBox } from "norma-library`;
85
-
86
- `<CheckBox id="checkbox-basic" label="Checkbox" checked={checked} onChange={handleCheckboxChange} />`;
87
-
88
- #### Props
89
-
90
- O componente `CheckBox` aceita as seguintes propriedades:
91
-
92
- - `label` (ReactNode): Rótulo exibido acima do campo de entrada.
93
- - `checked ` (boolean): Indica se a caixa de seleção está marcada.
94
- - `onChange` (função): Função de callback chamada quando o valor do campo muda.
95
- - `disabled` (boolean): Indica se o campo de entrada está desabilitado.
96
- - `color ` (string): A cor da caixa de seleção (primary, secondary, error, info, success, warning, default).
97
- - `size ` (string): O tamanho da caixa de seleção (small, medium).
98
- - `value` (TextFieldValue): O valor do campo de entrada.
99
- - E outras propriedades relacionadas a estilos, required, id, etc.
100
-
101
- ### ProgressBar
102
-
103
- `import { ProgressBar } from "norma-library`;
104
-
105
- `<ProgressBar id="checkbox-basic" label="Checkbox" checked={checked} onChange={handleCheckboxChange} />`;
106
-
107
- #### Props
108
-
109
- O componente `ProgressBar` aceita as seguintes propriedades:
110
-
111
- - `sx` (SxProps<Theme>): Propriedade de estilo do Material-UI para estilizar o componente.
112
- - `usage` (number): O valor de uso para calcular a porcentagem da barra de progresso.
113
- - `value` (number): O valor da barra de progresso.
114
- - `total` (number): O valor total usado para calcular a porcentagem.
115
- - `label` (string): Texto do rótulo exibido acima da barra de progresso.
116
- - `colorCustom` (string): Cor personalizada para a barra de progresso.
117
- - `variant` ('determinate' | 'indeterminate' | 'buffer' | 'query'): O estilo da barra de progresso.
118
- - `color` (string): Cor da barra de progresso (primary, secondary, error, info, success, warning, inherit).
1
+ ## Passos Básicos
2
+
3
+ ### 1. Instalando o pacote em seu projeto
4
+
5
+ Para instalar o pacote Norma em seu projeto execute o comando em seu terminal:
6
+
7
+ ### `npm install norma-library`
8
+
9
+ ## Components disponível e como usa-lo
10
+
11
+ ### Button
12
+
13
+ `import { Button } from "norma-library`;
14
+
15
+ `<Button label="Clique-me" onClick={handleButtonClick} />`;
16
+
17
+ #### Props
18
+
19
+ O componente `Button` aceita as seguintes propriedades:
20
+
21
+ - `label` (string, obrigatório): O texto exibido no botão.
22
+ - `sx` (SxProps<Theme>): Estilos personalizados usando o sistema de estilos do Material-UI.
23
+ - `color` (string): A cor do botão (inherit, primary, secondary, success, error, info, warning).
24
+ - `size` (string): O tamanho do botão (small, medium, large).
25
+ - `variant` (string): A variante do botão (text, outlined, contained).
26
+ - `style` (React.CSSProperties): Estilos CSS adicionais.
27
+ - `children` (ReactNode): Conteúdo adicional a ser exibido dentro do botão.
28
+ - `onClick` (função): Uma função de callback para ser executada quando o botão for clicado.
29
+
30
+ ### Card
31
+
32
+ `import { Card } from "norma-library`;
33
+
34
+ `<Card title="Titulo do cartão" />conteúdo do card</card>`;
35
+
36
+ #### Props
37
+
38
+ O componente `Card` aceita as seguintes propriedades:
39
+
40
+ - `title` (string, opcional): O título exibido no cabeçalho do card, se fornecido.
41
+ - `children` (ReactNode, obrigatório): O conteúdo do card, que pode incluir qualquer componente ou conteúdo.
42
+
43
+ ### Modal
44
+
45
+ `import { Modal} from "norma-library`;
46
+
47
+ `<Modal open={open} onClose={handleClose} aria-labelledby="modal-modal-title" aria-describedby="modal-modal-description" onConfirm={handleConfirm}
48
+ title="Titulo do modal">conteúdo do modal</modal>`;
49
+
50
+ #### Props
51
+
52
+ O componente `Modal` aceita as seguintes propriedades:
53
+
54
+ - `sx` (SxProps<Theme>): Estilos personalizados usando o sistema de estilos do Material-UI.
55
+ - `children` (React.ReactElement | React.ReactElement[]): Elementos filhos do modal.
56
+ - `open` (boolean): Indica se o modal está aberto.
57
+ - `onClose` (função): Função de callback chamada quando o modal é fechado.
58
+ - `className` (string): Classe CSS adicional para estilização.
59
+ - `title` (string): Título do modal.
60
+ - `full` (boolean): Indica se o modal deve ocupar toda a largura.
61
+ - `onConfirm` (função): Função de callback chamada quando o botão "Confirmar" é clicado.
62
+
63
+ ### TextField
64
+
65
+ `import { TextField } from "norma-library`;
66
+
67
+ `<TextField id="outlined-basic" label="Outlined" variant="outlined" />`;
68
+
69
+ #### Props
70
+
71
+ O componente `TextField` aceita as seguintes propriedades:
72
+
73
+ - `label` (ReactNode): Rótulo exibido acima do campo de entrada.
74
+ - `variant` (string): A variante do campo (standard, outlined, filled).
75
+ - `value` (TextFieldValue): O valor do campo de entrada.
76
+ - `onChange` (função): Função de callback chamada quando o valor do campo muda.
77
+ - `disabled` (boolean): Indica se o campo de entrada está desabilitado.
78
+ - `required` (boolean): Indica se o campo de entrada é obrigatório.
79
+ - `hasError` (boolean): Indica se o campo de entrada possui erro.
80
+ - E outras propriedades relacionadas a estilos, tamanho, id, etc.
81
+
82
+ ### CheckBox
83
+
84
+ `import { CheckBox } from "norma-library`;
85
+
86
+ `<CheckBox id="checkbox-basic" label="Checkbox" checked={checked} onChange={handleCheckboxChange} />`;
87
+
88
+ #### Props
89
+
90
+ O componente `CheckBox` aceita as seguintes propriedades:
91
+
92
+ - `label` (ReactNode): Rótulo exibido acima do campo de entrada.
93
+ - `checked ` (boolean): Indica se a caixa de seleção está marcada.
94
+ - `onChange` (função): Função de callback chamada quando o valor do campo muda.
95
+ - `disabled` (boolean): Indica se o campo de entrada está desabilitado.
96
+ - `color ` (string): A cor da caixa de seleção (primary, secondary, error, info, success, warning, default).
97
+ - `size ` (string): O tamanho da caixa de seleção (small, medium).
98
+ - `value` (TextFieldValue): O valor do campo de entrada.
99
+ - E outras propriedades relacionadas a estilos, required, id, etc.
100
+
101
+ ### ProgressBar
102
+
103
+ `import { ProgressBar } from "norma-library`;
104
+
105
+ `<ProgressBar id="checkbox-basic" label="Checkbox" checked={checked} onChange={handleCheckboxChange} />`;
106
+
107
+ #### Props
108
+
109
+ O componente `ProgressBar` aceita as seguintes propriedades:
110
+
111
+ - `sx` (SxProps<Theme>): Propriedade de estilo do Material-UI para estilizar o componente.
112
+ - `usage` (number): O valor de uso para calcular a porcentagem da barra de progresso.
113
+ - `value` (number): O valor da barra de progresso.
114
+ - `total` (number): O valor total usado para calcular a porcentagem.
115
+ - `label` (string): Texto do rótulo exibido acima da barra de progresso.
116
+ - `colorCustom` (string): Cor personalizada para a barra de progresso.
117
+ - `variant` ('determinate' | 'indeterminate' | 'buffer' | 'query'): O estilo da barra de progresso.
118
+ - `color` (string): Cor da barra de progresso (primary, secondary, error, info, success, warning, inherit).