norma-library 0.5.10 → 0.5.11
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.d.ts +2 -2
- package/dist/esm/components/ChatMessageBalloon/ChatMessageBalloon.style.d.ts +1 -1
- package/dist/esm/components/Icons.d.ts +1 -1
- package/dist/esm/components/UncontrolledTable/components/header/index.js +3 -5
- package/dist/esm/components/UncontrolledTable/components/header/index.js.map +1 -1
- package/dist/esm/components/UncontrolledTable/index.js +9 -6
- package/dist/esm/components/UncontrolledTable/index.js.map +1 -1
- package/dist/esm/components/UncontrolledTable/interface.d.ts +9 -0
- 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 +37 -37
- 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 +113 -113
- 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 +47 -47
- package/src/components/RadioGroup.tsx +40 -40
- 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/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 +106 -106
- 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 +63 -51
- package/src/components/UncontrolledTable/components/header/styles.tsx +59 -59
- package/src/components/UncontrolledTable/components/index.tsx +8 -8
- package/src/components/UncontrolledTable/components/pagination/index.tsx +39 -39
- package/src/components/UncontrolledTable/components/pagination/styles.tsx +28 -28
- package/src/components/UncontrolledTable/components/tbody/index.tsx +30 -30
- package/src/components/UncontrolledTable/components/tbody/styles.tsx +4 -4
- package/src/components/UncontrolledTable/index.tsx +307 -300
- package/src/components/UncontrolledTable/interface.ts +36 -27
- package/src/components/UncontrolledTable/styles.tsx +120 -120
- 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 +206 -206
- package/src/helpers/index.ts +5 -5
- package/src/helpers/radios.ts +24 -24
- package/src/helpers/sizes.ts +72 -72
- package/src/index.ts +64 -64
- 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 +22 -22
- 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 +16 -16
- package/src/interfaces/Paper.ts +12 -12
- package/src/interfaces/ProgressBar.ts +18 -18
- package/src/interfaces/RadioGroup.ts +22 -22
- 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 +195 -195
- package/src/stories/MultiSelectInput.stories.tsx +90 -90
- package/src/stories/Paper.stories.tsx +53 -53
- package/src/stories/ProgressBar.stories.tsx +95 -95
- package/src/stories/RadioGroup.stories.tsx +87 -87
- package/src/stories/RangerSlider.stories.tsx +58 -58
- 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 +62 -62
- 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 +321 -379
- package/src/styles/globals.scss +17 -17
- package/src/types/index.ts +204 -204
- 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
|
+
}
|
package/.storybook/main.ts
CHANGED
|
@@ -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;
|
package/.storybook/preview.ts
CHANGED
|
@@ -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
|
-
[](https://github.com/mui/material-ui/blob/HEAD/LICENSE)
|
|
10
|
-
[](https://www.npmjs.com/package/@mui/material)
|
|
11
|
-
[](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
|
+
[](https://github.com/mui/material-ui/blob/HEAD/LICENSE)
|
|
10
|
+
[](https://www.npmjs.com/package/@mui/material)
|
|
11
|
+
[](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
|
```
|
package/commitlint.config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports = {extends: ['@commitlint/config-conventional']}
|
|
1
|
+
module.exports = {extends: ['@commitlint/config-conventional']}
|
|
@@ -2,6 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import { CardBaseProps } from '../interfaces';
|
|
3
3
|
import { ColorVariant } from '@/types';
|
|
4
4
|
export declare const Card: ({ children, border, color, ...props }: CardBaseProps & {
|
|
5
|
-
border?: boolean
|
|
6
|
-
color?: ColorVariant
|
|
5
|
+
border?: boolean;
|
|
6
|
+
color?: ColorVariant;
|
|
7
7
|
}) => React.JSX.Element;
|
|
@@ -10,7 +10,7 @@ export declare const ChatMessageBalloonStyle: import("@emotion/styled").StyledCo
|
|
|
10
10
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
11
11
|
export declare const ChatMessageDateStyle: import("@emotion/styled").StyledComponent<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
12
12
|
ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
13
|
-
}, "
|
|
13
|
+
}, "p" | "style" | "className" | "classes" | "children" | "sx" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint" | "variant" | "align" | "noWrap" | "gutterBottom" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
14
14
|
export declare const ChatMessageChildrenStyle: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
15
15
|
direction: string;
|
|
16
16
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -2,6 +2,6 @@ import React, { FunctionComponent } from 'react';
|
|
|
2
2
|
import { IconsProps, SvgProps } from '../interfaces/Icons';
|
|
3
3
|
export declare const Svg: import("@emotion/styled").StyledComponent<{
|
|
4
4
|
theme?: import("@emotion/react").Theme | undefined;
|
|
5
|
-
as?: React.ElementType<any
|
|
5
|
+
as?: React.ElementType<any> | undefined;
|
|
6
6
|
} & SvgProps, React.SVGProps<SVGSVGElement>, {}>;
|
|
7
7
|
export declare const Icons: FunctionComponent<IconsProps>;
|
|
@@ -2,15 +2,13 @@ import React, { useState } from 'react';
|
|
|
2
2
|
import * as S from './styles';
|
|
3
3
|
import SettingsIcon from '@mui/icons-material/Settings';
|
|
4
4
|
var Header = function (_a) {
|
|
5
|
-
var table = _a.table, showTotalResults = _a.showTotalResults, showSettings = _a.showSettings, showClearFiels = _a.showClearFiels, onClearFieldsClick = _a.onClearFieldsClick;
|
|
5
|
+
var table = _a.table, showTotalResults = _a.showTotalResults, showSettings = _a.showSettings, showClearFiels = _a.showClearFiels, onClearFieldsClick = _a.onClearFieldsClick, customTotalResults = _a.customTotalResults, clearLabel = _a.clearLabel;
|
|
6
6
|
var _b = useState(false), openTools = _b[0], setOpenTools = _b[1];
|
|
7
7
|
return (React.createElement(S.Header, { "$showResults": showTotalResults },
|
|
8
8
|
React.createElement("div", null,
|
|
9
9
|
showTotalResults && (React.createElement(S.Results, null,
|
|
10
|
-
React.createElement(S.TextResult, null,
|
|
11
|
-
|
|
12
|
-
" resultados encontrados."))),
|
|
13
|
-
showClearFiels && (React.createElement(S.TextClearSearch, { onClick: function () { return onClearFieldsClick && onClearFieldsClick(); } }, "Limpar busca"))),
|
|
10
|
+
React.createElement(S.TextResult, null, customTotalResults ? customTotalResults : "".concat(table.getRowModel().rows.length, " resultados encontrados.")))),
|
|
11
|
+
showClearFiels && (React.createElement(S.TextClearSearch, { onClick: function () { return onClearFieldsClick && onClearFieldsClick(); } }, clearLabel || 'Limpar busca'))),
|
|
14
12
|
React.createElement(S.Tools, null,
|
|
15
13
|
showSettings ? (React.createElement(S.IconTools, { onClick: function () { return setOpenTools(!openTools); } },
|
|
16
14
|
React.createElement(SettingsIcon, { sx: { fontSize: 16, color: '#DE8B50' } }))) : null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/UncontrolledTable/components/header/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAC9B,OAAO,YAAY,MAAM,8BAA8B,CAAC;AAExD,IAAM,MAAM,GAAkB,UAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/UncontrolledTable/components/header/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAC9B,OAAO,YAAY,MAAM,8BAA8B,CAAC;AAExD,IAAM,MAAM,GAAkB,UAAC,EAQ9B;QAPC,KAAK,WAAA,EACL,gBAAgB,sBAAA,EAChB,YAAY,kBAAA,EACZ,cAAc,oBAAA,EACd,kBAAkB,wBAAA,EAClB,kBAAkB,wBAAA,EAClB,UAAU,gBAAA;IAEJ,IAAA,KAA4B,QAAQ,CAAC,KAAK,CAAC,EAA1C,SAAS,QAAA,EAAE,YAAY,QAAmB,CAAC;IAElD,OAAO,CACL,oBAAC,CAAC,CAAC,MAAM,oBAAe,gBAAgB;QACtC;YACG,gBAAgB,IAAI,CACnB,oBAAC,CAAC,CAAC,OAAO;gBACR,oBAAC,CAAC,CAAC,UAAU,QACV,kBAAkB,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,UAAG,KAAK,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC,MAAM,6BAA0B,CAC1F,CACL,CACb;YACA,cAAc,IAAI,CACjB,oBAAC,CAAC,CAAC,eAAe,IAAC,OAAO,EAAE,cAAM,OAAA,kBAAkB,IAAI,kBAAkB,EAAE,EAA1C,CAA0C,IACzE,UAAU,IAAI,cAAc,CACX,CACrB,CACG;QACN,oBAAC,CAAC,CAAC,KAAK;YACL,YAAY,CAAC,CAAC,CAAC,CACd,oBAAC,CAAC,CAAC,SAAS,IAAC,OAAO,EAAE,cAAM,OAAA,YAAY,CAAC,CAAC,SAAS,CAAC,EAAxB,CAAwB;gBAClD,oBAAC,YAAY,IAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,GAAI,CAC5C,CACf,CAAC,CAAC,CAAC,IAAI;YACP,SAAS,CAAC,CAAC,CAAC,CACX,oBAAC,CAAC,CAAC,SAAS,QACT,KAAK,CAAC,iBAAiB,EAAE,CAAC,GAAG,CAAC,UAAC,MAAW;gBACzC,OAAO,CACL,6BAAK,GAAG,EAAE,MAAM,CAAC,EAAE,EAAE,SAAS,EAAC,MAAM;oBACnC;wBACE,+BAEI,IAAI,EAAE,UAAU;4BAChB,OAAO,EAAE,MAAM,CAAC,YAAY,EAAE;4BAC9B,QAAQ,EAAE,MAAM,CAAC,0BAA0B,EAAE,GAE/C;wBACD,MAAM,CAAC,EAAE,CACJ,CACJ,CACP,CAAC;YACJ,CAAC,CAAC,CACU,CACf,CAAC,CAAC,CAAC,IAAI,CACA,CACD,CACZ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { flexRender, getCoreRowModel, getSortedRowModel, useReactTable, getFilte
|
|
|
4
4
|
import { format, isAfter, isBefore } from 'date-fns';
|
|
5
5
|
import { Pagination, Header, TBody } from './components';
|
|
6
6
|
var UncontrolledTable = function (props) {
|
|
7
|
-
var data = props.data, columns = props.columns, onClick = props.onClick, onMouseOver = props.onMouseOver, onMouseOut = props.onMouseOut, showTotalResults = props.showTotalResults, showSettings = props.showSettings, rowCount = props.rowCount, onChangePage = props.onChangePage, pagination = props.pagination, showClearFields = props.showClearFields, onClearFieldsClick = props.onClearFieldsClick, onFilterClick = props.onFilterClick, onSortClick = props.onSortClick;
|
|
7
|
+
var data = props.data, columns = props.columns, onClick = props.onClick, onMouseOver = props.onMouseOver, onMouseOut = props.onMouseOut, showTotalResults = props.showTotalResults, showSettings = props.showSettings, rowCount = props.rowCount, onChangePage = props.onChangePage, pagination = props.pagination, showClearFields = props.showClearFields, onClearFieldsClick = props.onClearFieldsClick, onFilterClick = props.onFilterClick, onSortClick = props.onSortClick, customTotalResults = props.customTotalResults, labels = props.labels;
|
|
8
8
|
var _a = useState(''), openFilterDialog = _a[0], setOpenFilterDialog = _a[1];
|
|
9
9
|
var _b = useState([]), sorting = _b[0], setSorting = _b[1];
|
|
10
10
|
var _c = useState([]), filterByColumn = _c[0], setFilterByColumn = _c[1];
|
|
@@ -103,7 +103,7 @@ var UncontrolledTable = function (props) {
|
|
|
103
103
|
}, [data, sorting, filterByColumn, columns, pagination]);
|
|
104
104
|
var table = useReactTable(reactTableConfig);
|
|
105
105
|
return (React.createElement(S.Container, null,
|
|
106
|
-
React.createElement(Header, { table: table, globalFilters: globalFilters, orderSmallest: orderSmallest, orderLargest: orderLargest, showTotalResults: showTotalResults, showSettings: showSettings, setGlobalFilters: setGlobalFilters, setOrderLargest: setOrderLargest, setOrderSmallest: setOrderSmallest, showClearFiels: showClearFields, onClearFieldsClick: function () { return onClearFieldsClick && onClearFieldsClick(); } }),
|
|
106
|
+
React.createElement(Header, { table: table, globalFilters: globalFilters, orderSmallest: orderSmallest, orderLargest: orderLargest, showTotalResults: showTotalResults, showSettings: showSettings, setGlobalFilters: setGlobalFilters, setOrderLargest: setOrderLargest, setOrderSmallest: setOrderSmallest, showClearFiels: showClearFields, customTotalResults: customTotalResults, clearLabel: labels === null || labels === void 0 ? void 0 : labels.clearFilter, onClearFieldsClick: function () { return onClearFieldsClick && onClearFieldsClick(); } }),
|
|
107
107
|
React.createElement(S.Content, null,
|
|
108
108
|
React.createElement(S.Table, null,
|
|
109
109
|
React.createElement("thead", null, table.getHeaderGroups().map(function (headerGroup) { return (React.createElement("tr", { key: headerGroup.id }, headerGroup.headers.map(function (header) {
|
|
@@ -132,7 +132,7 @@ var UncontrolledTable = function (props) {
|
|
|
132
132
|
React.createElement("div", { className: "icon" },
|
|
133
133
|
React.createElement("svg", { fill: "#666", stroke: "currentColor", strokeWidth: "1.5", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", width: "20", height: "20" },
|
|
134
134
|
React.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 4.5v15m0 0l6.75-6.75M12 19.5l-6.75-6.75" }))),
|
|
135
|
-
React.createElement("p", null, "Menor primeiro")),
|
|
135
|
+
React.createElement("p", null, (labels === null || labels === void 0 ? void 0 : labels.orderAsc) || "Menor primeiro")),
|
|
136
136
|
React.createElement(S.OptionFilterDialog, { style: {
|
|
137
137
|
background: orderLargest ? 'rgba(0, 0, 0, 0.04)' : '',
|
|
138
138
|
}, onClick: function () {
|
|
@@ -142,12 +142,15 @@ var UncontrolledTable = function (props) {
|
|
|
142
142
|
React.createElement("div", { className: "icon rotate" },
|
|
143
143
|
React.createElement("svg", { fill: "#666", stroke: "currentColor", strokeWidth: "1.5", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", width: "20", height: "20" },
|
|
144
144
|
React.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 4.5v15m0 0l6.75-6.75M12 19.5l-6.75-6.75" }))),
|
|
145
|
-
React.createElement("p", null,
|
|
146
|
-
!((_f = (_e = header === null || header === void 0 ? void 0 : header.column) === null || _e === void 0 ? void 0 : _e.columnDef) === null || _f === void 0 ? void 0 : _f.nofilter) && (React.createElement(S.OptionFilterDialog, { onClick: function () {
|
|
145
|
+
React.createElement("p", null, (labels === null || labels === void 0 ? void 0 : labels.orderDesc) || 'Maior primeiro')),
|
|
146
|
+
!((_f = (_e = header === null || header === void 0 ? void 0 : header.column) === null || _e === void 0 ? void 0 : _e.columnDef) === null || _f === void 0 ? void 0 : _f.nofilter) && (React.createElement(S.OptionFilterDialog, { onClick: function () {
|
|
147
|
+
onFilterClick && onFilterClick(header.column.columnDef.accessorKey);
|
|
148
|
+
setOpenFilterDialog('');
|
|
149
|
+
} },
|
|
147
150
|
React.createElement("div", { className: "icon" },
|
|
148
151
|
React.createElement("svg", { fill: "none", stroke: "currentColor", strokeWidth: "1.5", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", width: "16", height: "16" },
|
|
149
152
|
React.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 01-.659 1.591l-5.432 5.432a2.25 2.25 0 00-.659 1.591v2.927a2.25 2.25 0 01-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 00-.659-1.591L3.659 7.409A2.25 2.25 0 013 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0112 3z" }))),
|
|
150
|
-
React.createElement("p", null,
|
|
153
|
+
React.createElement("p", null, (labels === null || labels === void 0 ? void 0 : labels.filter) || 'Filtrar por'))))))))));
|
|
151
154
|
}))); })),
|
|
152
155
|
React.createElement(TBody, { table: table, onClick: onClick, onMouseOver: onMouseOver, onMouseOut: onMouseOut }))),
|
|
153
156
|
React.createElement(Pagination, { table: table, onChangePage: onChangePage })));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/UncontrolledTable/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAC9B,OAAO,EACL,UAAU,EACV,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,mBAAmB,EAEnB,qBAAqB,GACtB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAGzD,IAAM,iBAAiB,GAAG,UAAC,KAA6B;IAEpD,IAAA,IAAI,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/UncontrolledTable/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,O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EAAE,UAAU,EAAE,UAAU,GAAI,CACnF,CACA;QACZ,oBAAC,UAAU,IAAC,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,YAAY,GAAI,CAC5C,CACf,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { ColumnDef } from '@tanstack/react-table';
|
|
2
|
+
type Labels = {
|
|
3
|
+
orderAsc: string;
|
|
4
|
+
orderDesc: string;
|
|
5
|
+
filter: string;
|
|
6
|
+
clearFilter: string;
|
|
7
|
+
};
|
|
2
8
|
export interface UncontrolledTableProps {
|
|
3
9
|
data: any;
|
|
4
10
|
columns: ColumnDef<ColumnsTable>[];
|
|
@@ -14,10 +20,12 @@ export interface UncontrolledTableProps {
|
|
|
14
20
|
totalPages: number;
|
|
15
21
|
};
|
|
16
22
|
showClearFields?: boolean;
|
|
23
|
+
customTotalResults?: string;
|
|
17
24
|
onChangePage?: (page: number) => void;
|
|
18
25
|
onClearFieldsClick?: () => void;
|
|
19
26
|
onFilterClick?: (column: string) => void;
|
|
20
27
|
onSortClick?: (column: string, direction: string) => void;
|
|
28
|
+
labels?: Labels;
|
|
21
29
|
}
|
|
22
30
|
export interface ColumnsTable {
|
|
23
31
|
header: string;
|
|
@@ -27,3 +35,4 @@ export interface ColumnsTable {
|
|
|
27
35
|
filterFn: string;
|
|
28
36
|
nofilter?: boolean;
|
|
29
37
|
}
|
|
38
|
+
export {};
|