norma-library 0.6.78 → 0.6.80
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/.eslintrc.cjs +89 -0
- package/.prettierrc +8 -0
- package/.storybook/main.ts +1 -1
- package/dist/esm/components/Button/index.d.ts +9 -0
- package/dist/esm/components/Button/index.js +16 -0
- package/dist/esm/components/Button/index.js.map +1 -0
- package/dist/esm/components/Button/types.d.ts +18 -0
- package/dist/esm/components/Button/types.js +2 -0
- package/dist/esm/components/Button/types.js.map +1 -0
- package/dist/esm/components/Card/Card.d.ts +4 -0
- package/dist/esm/components/Card/Card.js +11 -0
- package/dist/esm/components/Card/Card.js.map +1 -0
- package/dist/esm/components/Card/CardHeader.d.ts +4 -0
- package/dist/esm/components/Card/CardHeader.js +8 -0
- package/dist/esm/components/Card/CardHeader.js.map +1 -0
- package/dist/esm/components/Card/index.d.ts +4 -0
- package/dist/esm/components/Card/index.js +5 -0
- package/dist/esm/components/Card/index.js.map +1 -0
- package/dist/esm/components/Card/styles.d.ts +2 -0
- package/dist/esm/components/Card/styles.js +6 -0
- package/dist/esm/components/Card/styles.js.map +1 -0
- package/dist/esm/components/Card/types.d.ts +8 -0
- package/dist/esm/components/Card/types.js +2 -0
- package/dist/esm/components/Card/types.js.map +1 -0
- package/dist/esm/components/IconifyIcon.d.ts +8 -0
- package/dist/esm/components/IconifyIcon.js +7 -0
- package/dist/esm/components/IconifyIcon.js.map +1 -0
- package/dist/esm/components/Modal.js +7 -3
- package/dist/esm/components/Modal.js.map +1 -1
- package/dist/esm/components/ProductCard/ProductCard.d.ts +3 -0
- package/dist/esm/components/ProductCard/ProductCard.js +34 -0
- package/dist/esm/components/ProductCard/ProductCard.js.map +1 -0
- package/dist/esm/components/ProductCard/ProductCard.style.d.ts +19 -0
- package/dist/esm/components/ProductCard/ProductCard.style.js +8 -0
- package/dist/esm/components/ProductCard/ProductCard.style.js.map +1 -0
- package/dist/esm/components/RangerSlider.d.ts +1 -1
- package/dist/esm/components/RangerSlider.js +28 -3
- package/dist/esm/components/RangerSlider.js.map +1 -1
- package/dist/esm/components/ServiceCard/ServiceCard.d.ts +3 -0
- package/dist/esm/components/ServiceCard/ServiceCard.js +20 -0
- package/dist/esm/components/ServiceCard/ServiceCard.js.map +1 -0
- package/dist/esm/components/ServiceCard/ServiceCard.style.d.ts +18 -0
- package/dist/esm/components/ServiceCard/ServiceCard.style.js +8 -0
- package/dist/esm/components/ServiceCard/ServiceCard.style.js.map +1 -0
- package/dist/esm/components/index.d.ts +2 -0
- package/dist/esm/components/index.js +2 -0
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/interfaces/Modal.d.ts +1 -0
- package/dist/esm/interfaces/ProductCard.d.ts +18 -0
- package/dist/esm/interfaces/ProductCard.js +2 -0
- package/dist/esm/interfaces/ProductCard.js.map +1 -0
- package/dist/esm/interfaces/RangerSlider.d.ts +3 -0
- package/dist/esm/interfaces/ServiceCard.d.ts +10 -0
- package/dist/esm/interfaces/ServiceCard.js +2 -0
- package/dist/esm/interfaces/ServiceCard.js.map +1 -0
- package/dist/esm/utils/pxToRem.d.ts +1 -0
- package/dist/esm/utils/pxToRem.js +4 -0
- package/dist/esm/utils/pxToRem.js.map +1 -0
- package/index.html +13 -0
- package/package.json +2 -1
- package/public/vite.svg +1 -0
- package/src/assets/react.svg +1 -0
- package/src/components/Card/Card.tsx +15 -0
- package/src/components/Card/CardHeader.tsx +9 -0
- package/src/components/Card/index.ts +5 -0
- package/src/components/Card/styles.ts +16 -0
- package/src/components/Card/types.ts +10 -0
- package/src/components/IconifyIcon.tsx +23 -0
- package/src/components/Modal.tsx +11 -4
- package/src/components/ProductCard/ProductCard.style.ts +56 -0
- package/src/components/ProductCard/ProductCard.tsx +71 -0
- package/src/components/RangerSlider.tsx +59 -3
- package/src/components/ServiceCard/ServiceCard.style.ts +53 -0
- package/src/components/ServiceCard/ServiceCard.tsx +30 -0
- package/src/components/index.ts +2 -0
- package/src/index.ts +3 -1
- package/src/interfaces/Modal.ts +2 -1
- package/src/interfaces/ProductCard.ts +23 -0
- package/src/interfaces/RangerSlider.ts +3 -0
- package/src/interfaces/ServiceCard.ts +11 -0
- package/src/stories/IconifyIcon.stories.tsx +31 -0
- package/src/stories/Modal.stories.tsx +54 -0
- package/src/stories/ProductCard.stories.tsx +22 -0
- package/src/stories/RangerSlider.stories.tsx +6 -2
- package/src/stories/ServiceCard.stories.tsx +20 -0
- package/src/utils/pxToRem.ts +4 -0
- package/src/vite-env.d.ts +1 -0
- package/tsconfig.json +32 -32
- package/tsconfig.node.json +10 -0
- package/dist/esm/components/NormaTimeLine/NormaTimeLine.d.ts +0 -14
- package/dist/esm/components/NormaTimeLine/NormaTimeLine.js +0 -48
- package/dist/esm/components/NormaTimeLine/NormaTimeLine.js.map +0 -1
- package/dist/esm/components/TimeLine.d.ts +0 -3
- package/dist/esm/components/TimeLine.js +0 -56
- package/dist/esm/components/TimeLine.js.map +0 -1
- package/dist/esm/components/UncontrolledTable/components/tbody/index.d.ts +0 -3
- package/dist/esm/components/UncontrolledTable/components/tbody/index.js +0 -15
- package/dist/esm/components/UncontrolledTable/components/tbody/index.js.map +0 -1
- package/dist/esm/components/UncontrolledTable/components/tbody/styles.d.ts +0 -2
- package/dist/esm/components/UncontrolledTable/components/tbody/styles.js +0 -12
- package/dist/esm/components/UncontrolledTable/components/tbody/styles.js.map +0 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IconifyIcon } from '../components/IconifyIcon';
|
|
3
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
4
|
+
|
|
5
|
+
const meta: Meta<typeof IconifyIcon> = {
|
|
6
|
+
title: "Display/IconifyIcons",
|
|
7
|
+
component: IconifyIcon,
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
export const OpenSourceIcons: Story = {
|
|
15
|
+
parameters: {
|
|
16
|
+
docs: {
|
|
17
|
+
description: {
|
|
18
|
+
story: 'Este é um exemplo de uso do componente IconifyIcon, que permite a utilização de ícones de diversas bibliotecas, como Lucide, Material UI, e mais.',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
render: () => (
|
|
23
|
+
<>
|
|
24
|
+
<IconifyIcon iconName="mdi:home" size="24px" color="red" />
|
|
25
|
+
<IconifyIcon iconName="mdi:account" size="24px" color="blue" />
|
|
26
|
+
<IconifyIcon iconName="mdi:account-check" size="24px" color="green" />
|
|
27
|
+
<IconifyIcon iconName="mdi:account-edit" size="24px" color="purple" />
|
|
28
|
+
</>
|
|
29
|
+
|
|
30
|
+
),
|
|
31
|
+
}
|
|
@@ -244,3 +244,57 @@ export const ModalSize = () => {
|
|
|
244
244
|
};
|
|
245
245
|
|
|
246
246
|
ModalSize.storyName = 'Modal width and height';
|
|
247
|
+
|
|
248
|
+
export const ModalOutsideClick = () => {
|
|
249
|
+
const [open, setOpen] = React.useState(false);
|
|
250
|
+
const handleOpen = () => setOpen(true);
|
|
251
|
+
const handleClose = () => setOpen(false);
|
|
252
|
+
|
|
253
|
+
const defaultAction = [
|
|
254
|
+
{
|
|
255
|
+
label: 'Cancelar',
|
|
256
|
+
action: handleClose,
|
|
257
|
+
color: 'error',
|
|
258
|
+
size: 'medium',
|
|
259
|
+
variant: 'outlined',
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
label: 'Confirmar',
|
|
263
|
+
action: handleClose,
|
|
264
|
+
color: 'primary',
|
|
265
|
+
size: 'medium',
|
|
266
|
+
variant: 'contained',
|
|
267
|
+
},
|
|
268
|
+
];
|
|
269
|
+
return (
|
|
270
|
+
<>
|
|
271
|
+
<Button onClick={handleOpen} color="primary" variant="outlined">
|
|
272
|
+
Open modal
|
|
273
|
+
</Button>
|
|
274
|
+
|
|
275
|
+
{open && (
|
|
276
|
+
<Modal
|
|
277
|
+
open={open}
|
|
278
|
+
shouldNotCloseOnOutsideClick={true}
|
|
279
|
+
onClose={handleClose}
|
|
280
|
+
aria-labelledby="modal-modal-title"
|
|
281
|
+
aria-describedby="modal-modal-description"
|
|
282
|
+
action={defaultAction}
|
|
283
|
+
title="Select a company"
|
|
284
|
+
width='90vw'
|
|
285
|
+
>
|
|
286
|
+
<>
|
|
287
|
+
<Typography id="modal-modal-title" variant="h6" component="h2">
|
|
288
|
+
Text in a modal
|
|
289
|
+
</Typography>
|
|
290
|
+
<Typography id="modal-modal-description" sx={{ mt: 2 }}>
|
|
291
|
+
Duis mollis, est non commodo luctus, nisi erat porttitor ligula.
|
|
292
|
+
</Typography>
|
|
293
|
+
</>
|
|
294
|
+
</Modal>
|
|
295
|
+
)}
|
|
296
|
+
</>
|
|
297
|
+
);
|
|
298
|
+
};
|
|
299
|
+
|
|
300
|
+
ModalOutsideClick.storyName = 'Modal custom outside click behaviour';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Meta } from "@storybook/react";
|
|
2
|
+
import { ProductCard } from "../components/ProductCard/ProductCard";
|
|
3
|
+
import React from "react";
|
|
4
|
+
|
|
5
|
+
const meta = {
|
|
6
|
+
title: 'Layout/ProductCard',
|
|
7
|
+
component: ProductCard,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'centered',
|
|
10
|
+
},
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
argTypes: {},
|
|
13
|
+
} satisfies Meta<typeof ProductCard>;
|
|
14
|
+
|
|
15
|
+
export default meta;
|
|
16
|
+
|
|
17
|
+
export const BasicProductCard = () => <ProductCard flaggable title="Financeiro e Jurídico" description="Novas possibilidades de análise de desempenho operacional, elasticidade e segurança." iconColor="#247010" color="#F3FCEA" iconName="lucide:briefcase-medical" />;
|
|
18
|
+
BasicProductCard.storyName = 'Basic Product Card';
|
|
19
|
+
|
|
20
|
+
export const DisabledProductCard = () => <ProductCard title="Suporte" description="Novo mundo de possibilidades em jornada omnicanal, design de Data Lake, Data Blocks e Segurança." iconColor="#6a491d" color="#FDF6E3" iconName="lucide:bookmark" disabled />;
|
|
21
|
+
|
|
22
|
+
export const NoBorderProductCard = () => <ProductCard flaggable title="Teste" description="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi eleifend, ex sit amet sagittis interdum, est ante placerat velit, sed consectetur arcu sem id nisi. Integer vitae mauris et lectus vulputate maximus" iconColor="#6a491d" color="#FDF6E3" iconName="lucide:user" hasBorder={false} />;
|
|
@@ -68,9 +68,11 @@ type Story = StoryObj<typeof meta>;
|
|
|
68
68
|
|
|
69
69
|
export const RangerSliderBasic: Story = {
|
|
70
70
|
args: {
|
|
71
|
-
value: [
|
|
71
|
+
value: [0, 37],
|
|
72
72
|
valueLabelDisplay: 'on',
|
|
73
73
|
getAriaLabel: () => 'Faixa de temperatura',
|
|
74
|
+
showValueInline: true,
|
|
75
|
+
label: 'Faixa de temperatura',
|
|
74
76
|
},
|
|
75
77
|
argTypes: {
|
|
76
78
|
value: {
|
|
@@ -97,8 +99,9 @@ export const RangerSliderBasic: Story = {
|
|
|
97
99
|
export const RangerSliderFormatter: Story = {
|
|
98
100
|
args: {
|
|
99
101
|
value: [0, 540],
|
|
100
|
-
valueLabelDisplay: '
|
|
102
|
+
valueLabelDisplay: 'off',
|
|
101
103
|
getAriaLabel: () => 'Faixa de tempo',
|
|
104
|
+
showValueInline: true,
|
|
102
105
|
valueLabelFormat: (value: number) => {
|
|
103
106
|
if (value < 60) {
|
|
104
107
|
return `${value}s`;
|
|
@@ -123,6 +126,7 @@ export const RangerSliderFormatter: Story = {
|
|
|
123
126
|
},
|
|
124
127
|
min: 0,
|
|
125
128
|
max: 1000,
|
|
129
|
+
label: 'Faixa de tempo',
|
|
126
130
|
},
|
|
127
131
|
argTypes: {
|
|
128
132
|
value: {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Meta } from "@storybook/react";
|
|
2
|
+
import {ServiceCard} from "../components/ServiceCard/ServiceCard";
|
|
3
|
+
import React from "react";
|
|
4
|
+
|
|
5
|
+
const meta = {
|
|
6
|
+
title: 'Layout/ServiceCard',
|
|
7
|
+
component: ServiceCard,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'centered',
|
|
10
|
+
},
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
argTypes: {},
|
|
13
|
+
} satisfies Meta<typeof ServiceCard>;
|
|
14
|
+
|
|
15
|
+
export default meta;
|
|
16
|
+
|
|
17
|
+
export const BasicServiceCard = () => <ServiceCard title="Financeiro e Jurídico" description="Dados financeiros e legais sobre seus produtos." iconName="ic:baseline-account-balance" iconColor="#247010" color="#F3FCEA"/>;
|
|
18
|
+
BasicServiceCard.storyName = 'Basic Service Card';
|
|
19
|
+
|
|
20
|
+
export const DisabledServiceCard = () => <ServiceCard title="Suporte" description="Suporte técnico para seus produtos." iconColor="#6a491d" iconName="ic:baseline-add-photo-alternate" color="#FDF6E3" disabled/>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|
package/tsconfig.json
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
{
|
|
2
|
-
"include": ["src"],
|
|
3
|
-
"exclude": ["dist", "node_modules", "src/stories", ".docz", "docs"],
|
|
4
|
-
"compilerOptions": {
|
|
5
|
-
"module": "esnext",
|
|
6
|
-
"lib": ["dom", "esnext"],
|
|
7
|
-
"importHelpers": true,
|
|
8
|
-
"declaration": true,
|
|
9
|
-
"sourceMap": true,
|
|
10
|
-
"rootDir": "./src",
|
|
11
|
-
"outDir": "./dist/esm",
|
|
12
|
-
"strict": true,
|
|
13
|
-
"noImplicitReturns": false,
|
|
14
|
-
"noFallthroughCasesInSwitch": true,
|
|
15
|
-
"noUnusedLocals": true,
|
|
16
|
-
"noUnusedParameters": true,
|
|
17
|
-
"moduleResolution": "node",
|
|
18
|
-
"jsx": "react",
|
|
19
|
-
"esModuleInterop": true,
|
|
20
|
-
"skipLibCheck": true,
|
|
21
|
-
"forceConsistentCasingInFileNames": true,
|
|
22
|
-
"paths": {
|
|
23
|
-
"@/*": ["./src/*"],
|
|
24
|
-
"@components/*": ["./src/components/*"],
|
|
25
|
-
"@styles/*": ["./src/styles/*"],
|
|
26
|
-
"@interfaces/*": ["./src/interfaces/*"],
|
|
27
|
-
"@helpers/*": ["./src/helpers/*"],
|
|
28
|
-
"@types/*": ["./src/types/*"],
|
|
29
|
-
"@stories/*": ["./src/stories/*"]
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"include": ["src"],
|
|
3
|
+
"exclude": ["dist", "node_modules", "src/stories", ".docz", "docs"],
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"module": "esnext",
|
|
6
|
+
"lib": ["dom", "esnext"],
|
|
7
|
+
"importHelpers": true,
|
|
8
|
+
"declaration": true,
|
|
9
|
+
"sourceMap": true,
|
|
10
|
+
"rootDir": "./src",
|
|
11
|
+
"outDir": "./dist/esm",
|
|
12
|
+
"strict": true,
|
|
13
|
+
"noImplicitReturns": false,
|
|
14
|
+
"noFallthroughCasesInSwitch": true,
|
|
15
|
+
"noUnusedLocals": true,
|
|
16
|
+
"noUnusedParameters": true,
|
|
17
|
+
"moduleResolution": "node",
|
|
18
|
+
"jsx": "react",
|
|
19
|
+
"esModuleInterop": true,
|
|
20
|
+
"skipLibCheck": true,
|
|
21
|
+
"forceConsistentCasingInFileNames": true,
|
|
22
|
+
"paths": {
|
|
23
|
+
"@/*": ["./src/*"],
|
|
24
|
+
"@components/*": ["./src/components/*"],
|
|
25
|
+
"@styles/*": ["./src/styles/*"],
|
|
26
|
+
"@interfaces/*": ["./src/interfaces/*"],
|
|
27
|
+
"@helpers/*": ["./src/helpers/*"],
|
|
28
|
+
"@types/*": ["./src/types/*"],
|
|
29
|
+
"@stories/*": ["./src/stories/*"]
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ColorVariant } from '@/types';
|
|
3
|
-
export interface TimeLineData {
|
|
4
|
-
date: string;
|
|
5
|
-
description?: string;
|
|
6
|
-
children?: React.ReactNode;
|
|
7
|
-
}
|
|
8
|
-
interface TimeLineProps {
|
|
9
|
-
data: TimeLineData[];
|
|
10
|
-
theme?: ColorVariant;
|
|
11
|
-
color?: string;
|
|
12
|
-
}
|
|
13
|
-
export declare const TimeLine: React.FC<TimeLineProps>;
|
|
14
|
-
export {};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { __assign, __makeTemplateObject } from "tslib";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { Typography } from '@mui/material';
|
|
4
|
-
import { Timeline, TimelineItem, TimelineSeparator, TimelineConnector, TimelineContent, TimelineDot, timelineItemClasses, } from '@mui/lab';
|
|
5
|
-
import { palette } from '../../helpers';
|
|
6
|
-
import styled from 'styled-components';
|
|
7
|
-
var colorMap = {
|
|
8
|
-
inherit: palette.inherit,
|
|
9
|
-
primary: '#DB6619',
|
|
10
|
-
secondary: palette.secondary,
|
|
11
|
-
error: palette.error,
|
|
12
|
-
warning: palette.warning,
|
|
13
|
-
info: palette.info,
|
|
14
|
-
success: palette.success,
|
|
15
|
-
};
|
|
16
|
-
export var TimeLine = function (_a) {
|
|
17
|
-
var data = _a.data, _b = _a.theme, theme = _b === void 0 ? 'primary' : _b, color = _a.color;
|
|
18
|
-
var _mainColor = color || colorMap[theme];
|
|
19
|
-
var NormaTimeLine = styled(Timeline)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n .", " {\n &:before {\n flex: 0;\n padding: 0;\n }\n }\n\n .MuiTimelineDot-root {\n &:last-child {\n &:before {\n content: '';\n width: 70%;\n height: 70%;\n background: ", ";\n position: absolute;\n border-radius: 50%;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n }\n }\n "], ["\n .", " {\n &:before {\n flex: 0;\n padding: 0;\n }\n }\n\n .MuiTimelineDot-root {\n &:last-child {\n &:before {\n content: '';\n width: 70%;\n height: 70%;\n background: ", ";\n position: absolute;\n border-radius: 50%;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n }\n }\n "])), timelineItemClasses.root, _mainColor);
|
|
20
|
-
var _getDotStyle = function (last) {
|
|
21
|
-
var style = {
|
|
22
|
-
background: 'none',
|
|
23
|
-
boxShadow: 'none',
|
|
24
|
-
padding: '6px',
|
|
25
|
-
margin: '0',
|
|
26
|
-
border: "3px solid ".concat(_mainColor),
|
|
27
|
-
};
|
|
28
|
-
var lastStyle = {
|
|
29
|
-
padding: '8px',
|
|
30
|
-
position: 'relative',
|
|
31
|
-
left: '-2px',
|
|
32
|
-
};
|
|
33
|
-
return last ? __assign(__assign({}, style), lastStyle) : style;
|
|
34
|
-
};
|
|
35
|
-
return (React.createElement(NormaTimeLine, null, data.map(function (item, key) {
|
|
36
|
-
var last = key !== data.length - 1;
|
|
37
|
-
return (React.createElement(TimelineItem, { key: key, sx: { minHeight: 'auto' } },
|
|
38
|
-
React.createElement(TimelineSeparator, null,
|
|
39
|
-
React.createElement(TimelineDot, { sx: _getDotStyle(!last) }),
|
|
40
|
-
last && React.createElement(TimelineConnector, { sx: { bgcolor: _mainColor, width: '5px' } })),
|
|
41
|
-
React.createElement(TimelineContent, { sx: { py: 0, pl: 2, pb: '35px' } },
|
|
42
|
-
React.createElement(Typography, { sx: { m: 'auto 0' }, className: "TimelineContent__Date", variant: "body1" }, item.date),
|
|
43
|
-
item.description && (React.createElement(Typography, { sx: { m: 'auto 0' }, className: "TimelineContent__Description", variant: "body2" }, item.description)),
|
|
44
|
-
item.children)));
|
|
45
|
-
})));
|
|
46
|
-
};
|
|
47
|
-
var templateObject_1;
|
|
48
|
-
//# sourceMappingURL=NormaTimeLine.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{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@@ -1,56 +0,0 @@
|
|
|
1
|
-
var _a;
|
|
2
|
-
import { __assign, __rest } from "tslib";
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { Typography } from '@mui/material';
|
|
5
|
-
import { Timeline as MuiTimeLine, TimelineItem, timelineItemClasses, TimelineSeparator, TimelineConnector, TimelineContent, TimelineDot, } from '@mui/lab';
|
|
6
|
-
import { styled } from '@mui/material/styles';
|
|
7
|
-
import { palette, lightenRGB } from '../helpers';
|
|
8
|
-
var colorMap = {
|
|
9
|
-
inherit: palette.inherit,
|
|
10
|
-
primary: palette.primary,
|
|
11
|
-
secondary: palette.secondary,
|
|
12
|
-
error: palette.error,
|
|
13
|
-
warning: palette.warning,
|
|
14
|
-
info: palette.info,
|
|
15
|
-
success: palette.success,
|
|
16
|
-
};
|
|
17
|
-
var sampleData = [
|
|
18
|
-
{
|
|
19
|
-
title: 'imported register',
|
|
20
|
-
data: '01/04/2023 at 07h00',
|
|
21
|
-
by: 'By IEM',
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
title: '80% score applied on register',
|
|
25
|
-
data: '01/04/2023 at 07h05',
|
|
26
|
-
by: 'By IEM',
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
title: 'Registers transfered to campaign ID 10',
|
|
30
|
-
data: '',
|
|
31
|
-
by: '',
|
|
32
|
-
},
|
|
33
|
-
];
|
|
34
|
-
var TimeLineStyled = styled(MuiTimeLine)((_a = {},
|
|
35
|
-
_a["& .".concat(timelineItemClasses.root, ":before")] = {
|
|
36
|
-
flex: 0,
|
|
37
|
-
padding: 0,
|
|
38
|
-
},
|
|
39
|
-
_a));
|
|
40
|
-
export var TimeLine = function (_a) {
|
|
41
|
-
var _b = _a.data, data = _b === void 0 ? sampleData : _b, _c = _a.color, color = _c === void 0 ? 'primary' : _c, _d = _a.position, position = _d === void 0 ? 'left' : _d, props = __rest(_a, ["data", "color", "position"]);
|
|
42
|
-
var renderList = data.map(function (item, key) { return (React.createElement(TimelineItem, { key: key },
|
|
43
|
-
React.createElement(TimelineSeparator, null,
|
|
44
|
-
React.createElement(TimelineDot, { sx: {
|
|
45
|
-
bgcolor: colorMap[color],
|
|
46
|
-
p: '6px',
|
|
47
|
-
border: "4px solid ".concat(lightenRGB(colorMap[color], 50)),
|
|
48
|
-
} }),
|
|
49
|
-
key !== data.length - 1 && React.createElement(TimelineConnector, { sx: { bgcolor: colorMap[color], pt: '55px', pl: '3px' } })),
|
|
50
|
-
React.createElement(TimelineContent, null,
|
|
51
|
-
item.title,
|
|
52
|
-
React.createElement(Typography, { sx: { m: 'auto 0' }, variant: "body2", color: "text.secondary" }, item.data),
|
|
53
|
-
React.createElement(Typography, { sx: { m: 'auto 0', color: colorMap[color] }, variant: "body2" }, item.by)))); });
|
|
54
|
-
return (React.createElement(TimeLineStyled, __assign({}, props), renderList));
|
|
55
|
-
};
|
|
56
|
-
//# sourceMappingURL=TimeLine.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TimeLine.js","sourceRoot":"","sources":["../../../src/components/TimeLine.tsx"],"names":[],"mappings":";;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EACL,QAAQ,IAAI,WAAW,EACvB,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,WAAW,GACZ,MAAM,UAAU,CAAC;AAIlB,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAGjD,IAAM,QAAQ,GAAiC;IAC7C,OAAO,EAAE,OAAO,CAAC,OAAO;IACxB,OAAO,EAAE,OAAO,CAAC,OAAO;IACxB,SAAS,EAAE,OAAO,CAAC,SAAS;IAC5B,KAAK,EAAE,OAAO,CAAC,KAAK;IACpB,OAAO,EAAE,OAAO,CAAC,OAAO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AAQ,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,GAAI,CACxF;QACpB,oBAAC,eAAe;YACb,IAAI,CAAC,KAAK;YACX,oBAAC,UAAU,IAAC,EAAE,EAAE,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAC,OAAO,EAAC,KAAK,EAAC,gBAAgB,IACpE,IAAI,CAAC,IAAI,CACC;YACb,oBAAC,UAAU,IAAC,EAAE,EAAE,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,EAAE,OAAO,EAAC,OAAO,IACrE,IAAI,CAAC,EAAE,CACG,CACG,CACL,CAChB,EAtB0C,CAsB1C,CAAC,CAAC;IAEH,OAAO,CACL,oBAAC,cAAc,eAAK,KAAK,GAAG,UAAU,CAAkB,CACzD,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { flexRender } from '@tanstack/react-table';
|
|
3
|
-
import * as S from './styles';
|
|
4
|
-
var TBody = function (_a) {
|
|
5
|
-
var table = _a.table, onClick = _a.onClick, onMouseOver = _a.onMouseOver, onMouseOut = _a.onMouseOut;
|
|
6
|
-
return (React.createElement("tbody", null, table.getRowModel().rows.map(function (row, index) {
|
|
7
|
-
return (React.createElement(S.Tr, { key: index, "$hasAction": !!onClick || !!onMouseOver || !!onMouseOut, onClick: function () { return (onClick ? onClick(row.original) : null); }, onMouseOver: function () { return (onMouseOver ? onMouseOver(row.original) : null); }, onMouseOut: function () { return (onMouseOut ? onMouseOut(row.original) : null); } }, row.getVisibleCells().map(function (cell, index) {
|
|
8
|
-
return (React.createElement(S.Td, { key: index }, cell.column.columnDef.type == 'action'
|
|
9
|
-
? cell.getValue()
|
|
10
|
-
: flexRender(cell.column.columnDef.cell, cell.getContext())));
|
|
11
|
-
})));
|
|
12
|
-
})));
|
|
13
|
-
};
|
|
14
|
-
export default TBody;
|
|
15
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/UncontrolledTable/components/tbody/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAE9B,IAAM,KAAK,GAAkB,UAAC,EAA2C;QAAzC,KAAK,WAAA,EAAE,OAAO,aAAA,EAAE,WAAW,iBAAA,EAAE,UAAU,gBAAA;IACrE,OAAO,CACL,mCACG,KAAK,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,UAAC,GAAQ,EAAE,KAAa;QACpD,OAAO,CACL,oBAAC,CAAC,CAAC,EAAE,IACH,GAAG,EAAE,KAAK,gBACE,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,WAAW,IAAI,CAAC,CAAC,UAAU,EACtD,OAAO,EAAE,cAAM,OAAA,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAxC,CAAwC,EACvD,WAAW,EAAE,cAAM,OAAA,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAhD,CAAgD,EACnE,UAAU,EAAE,cAAM,OAAA,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAA9C,CAA8C,IAE/D,GAAG,CAAC,eAAe,EAAE,CAAC,GAAG,CAAC,UAAC,IAAS,EAAE,KAAa;YAClD,OAAO,CACL,oBAAC,CAAC,CAAC,EAAE,IAAC,GAAG,EAAE,KAAK,IACb,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,IAAI,QAAQ;gBACrC,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE;gBACjB,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,CACxD,CACR,CAAC;QACJ,CAAC,CAAC,CACG,CACR,CAAC;IACJ,CAAC,CAAC,CACI,CACT,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const Tr: import("styled-components/dist/types").IStyledComponentBase<"web", any> & string;
|
|
2
|
-
export declare const Td: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, never>> & string;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { __makeTemplateObject } from "tslib";
|
|
2
|
-
import { breakpoints } from '../../../../utils/styledBreakpoints';
|
|
3
|
-
import styled from 'styled-components';
|
|
4
|
-
export var Tr = styled.tr(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: inherit;\n display: table-row;\n vertical-align: middle;\n outline: 0;\n &:nth-of-type(even) {\n background-color: #fafafa;\n }\n"], ["\n color: inherit;\n display: table-row;\n vertical-align: middle;\n outline: 0;\n &:nth-of-type(even) {\n background-color: #fafafa;\n }\n"])));
|
|
5
|
-
export var Td = styled.td(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-weight: 500;\n font-size: 0.875rem;\n line-height: 1.5rem;\n letter-spacing: 0.01071em;\n display: table-cell;\n vertical-align: inherit;\n border-bottom: 1px solid rgba(224, 224, 224, 1);\n text-align: left;\n padding: 16px;\n ", ";\n color: #666666;\n font-size: 0.875rem;\n"], ["\n font-weight: 500;\n font-size: 0.875rem;\n line-height: 1.5rem;\n letter-spacing: 0.01071em;\n display: table-cell;\n vertical-align: inherit;\n border-bottom: 1px solid rgba(224, 224, 224, 1);\n text-align: left;\n padding: 16px;\n ", ";\n color: #666666;\n font-size: 0.875rem;\n"])), breakpoints({
|
|
6
|
-
cssProp: 'padding',
|
|
7
|
-
cssPropUnits: 'px',
|
|
8
|
-
values: [{ 1440: 8 }],
|
|
9
|
-
mediaQueryType: 'max-width',
|
|
10
|
-
}));
|
|
11
|
-
var templateObject_1, templateObject_2;
|
|
12
|
-
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../../src/components/UncontrolledTable/components/tbody/styles.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,CAAC,IAAM,EAAE,GAAG,MAAM,CAAC,EAAE,yNAAK,sJAQ/B,IAAA,CAAC;AAEF,MAAM,CAAC,IAAM,EAAE,GAAG,MAAM,CAAC,EAAE,6WAAA,wPAUvB,EAKA,gDAGH,KARG,WAAW,CAAC;IACZ,OAAO,EAAE,SAAS;IAClB,YAAY,EAAE,IAAI;IAClB,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IACrB,cAAc,EAAE,WAAW;CAC5B,CAAC,CAGH,CAAC"}
|