w-design-system 0.0.2 → 0.0.4
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/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +4 -1
- package/.storybook/main.ts +0 -19
- package/.storybook/preview.ts +0 -14
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -43
- package/public/logo192.png +0 -0
- package/public/logo512.png +0 -0
- package/public/manifest.json +0 -25
- package/public/robots.txt +0 -3
- package/src/App.css +0 -39
- package/src/App.test.tsx +0 -9
- package/src/App.tsx +0 -13
- package/src/assets/icon/alert.svg +0 -3
- package/src/assets/icon/close.svg +0 -10
- package/src/assets/icon/comment.svg +0 -10
- package/src/assets/icon/doc-check.svg +0 -10
- package/src/assets/icon/image.svg +0 -3
- package/src/assets/icon/index.ts +0 -6
- package/src/assets/icon/svg.d.ts +0 -1
- package/src/components/Banner/index.tsx +0 -47
- package/src/components/Banner/stories.tsx +0 -31
- package/src/components/Banner/styles.ts +0 -58
- package/src/components/Button/index.tsx +0 -31
- package/src/components/Button/stories.tsx +0 -98
- package/src/components/Button/styles.ts +0 -198
- package/src/components/Button/test.tsx +0 -44
- package/src/components/ButtonRadiusIcon/index.tsx +0 -22
- package/src/components/ButtonRadiusIcon/stories.tsx +0 -47
- package/src/components/ButtonRadiusIcon/styles.ts +0 -139
- package/src/components/ButtonRound/index.tsx +0 -25
- package/src/components/ButtonRound/stories.tsx +0 -50
- package/src/components/ButtonRound/styles.ts +0 -136
- package/src/components/IconWrapper/index.tsx +0 -43
- package/src/components/Modal/index.tsx +0 -30
- package/src/components/Modal/stories.tsx +0 -53
- package/src/components/Modal/styles.ts +0 -51
- package/src/components/Paragraph/index.tsx +0 -42
- package/src/components/Paragraph/stories.tsx +0 -107
- package/src/components/Tabs/index.tsx +0 -24
- package/src/components/Tabs/stories.tsx +0 -74
- package/src/components/Tabs/styles.ts +0 -23
- package/src/components/Themes/index.ts +0 -99
- package/src/components/Title/index.tsx +0 -33
- package/src/components/Title/stories.tsx +0 -68
- package/src/components/Types/index.ts +0 -45
- package/src/index.tsx +0 -10
- package/src/logo.svg +0 -1
- package/src/prettier.config.js +0 -11
- package/src/react-app-env.d.ts +0 -1
- package/src/reportWebVitals.ts +0 -16
- package/src/setupTests.ts +0 -5
- package/src/src/globalStyles.ts +0 -11
- package/src/stories/Button.stories.ts +0 -52
- package/src/stories/Button.tsx +0 -42
- package/src/stories/Configure.mdx +0 -364
- package/src/stories/Header.stories.ts +0 -33
- package/src/stories/Header.tsx +0 -56
- package/src/stories/Page.stories.ts +0 -32
- package/src/stories/Page.tsx +0 -73
- package/src/stories/assets/accessibility.png +0 -0
- package/src/stories/assets/accessibility.svg +0 -1
- package/src/stories/assets/addon-library.png +0 -0
- package/src/stories/assets/assets.png +0 -0
- package/src/stories/assets/avif-test-image.avif +0 -0
- package/src/stories/assets/context.png +0 -0
- package/src/stories/assets/discord.svg +0 -1
- package/src/stories/assets/docs.png +0 -0
- package/src/stories/assets/figma-plugin.png +0 -0
- package/src/stories/assets/github.svg +0 -1
- package/src/stories/assets/share.png +0 -0
- package/src/stories/assets/styling.png +0 -0
- package/src/stories/assets/testing.png +0 -0
- package/src/stories/assets/theming.png +0 -0
- package/src/stories/assets/tutorials.svg +0 -1
- package/src/stories/assets/youtube.svg +0 -1
- package/src/stories/button.css +0 -30
- package/src/stories/header.css +0 -32
- package/src/stories/page.css +0 -69
- package/src/utils/constanst.ts +0 -2
- package/tsconfig.json +0 -38
- package/webpack.config.js +0 -12
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import ReactDOM from 'react-dom'
|
|
3
|
-
import { closeSVG } from '../../assets/icon'
|
|
4
|
-
import { theme } from '../Themes'
|
|
5
|
-
import { Title } from '../Title'
|
|
6
|
-
import { IconWrapper } from '../IconWrapper'
|
|
7
|
-
import { ModalTypes } from '../Types'
|
|
8
|
-
import { ModalContainer, Overlay } from './styles'
|
|
9
|
-
const {
|
|
10
|
-
colors: { cyan50, shade30 },
|
|
11
|
-
} = theme
|
|
12
|
-
|
|
13
|
-
export const Modal: React.FC<ModalTypes> = ({ children, onClose, footer, ...props }) => {
|
|
14
|
-
return ReactDOM.createPortal(
|
|
15
|
-
<>
|
|
16
|
-
<Overlay onClick={onClose} />
|
|
17
|
-
<ModalContainer {...props}>
|
|
18
|
-
<div className={'modalHeader'}>
|
|
19
|
-
<Title size={'medium'} bold color={cyan50}>
|
|
20
|
-
Enviar
|
|
21
|
-
</Title>
|
|
22
|
-
<IconWrapper src={closeSVG} width={'14px'} height={'14px'} color={shade30} onClick={onClose} />
|
|
23
|
-
</div>
|
|
24
|
-
<div className={'modalContainer'}>{children}</div>
|
|
25
|
-
<div className={'modalFooter'}>{footer}</div>
|
|
26
|
-
</ModalContainer>
|
|
27
|
-
</>,
|
|
28
|
-
document.body,
|
|
29
|
-
)
|
|
30
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { Meta, StoryObj } from '@storybook/react'
|
|
3
|
-
import { useState } from 'react'
|
|
4
|
-
import { Modal } from './index'
|
|
5
|
-
import { Paragraph } from '../Paragraph'
|
|
6
|
-
import { Button } from '../Button'
|
|
7
|
-
|
|
8
|
-
const meta: Meta<typeof Modal> = {
|
|
9
|
-
title: 'Components/Modal',
|
|
10
|
-
component: Modal,
|
|
11
|
-
} satisfies Meta<typeof Modal>
|
|
12
|
-
|
|
13
|
-
export default meta
|
|
14
|
-
|
|
15
|
-
type Story = StoryObj<typeof Modal>
|
|
16
|
-
|
|
17
|
-
export const Playground: Story = {
|
|
18
|
-
render: () => {
|
|
19
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
20
|
-
const [isOpen, setIsOpen] = useState(false)
|
|
21
|
-
|
|
22
|
-
return (
|
|
23
|
-
<>
|
|
24
|
-
<Button onClick={() => setIsOpen(true)}>Open Modal</Button>
|
|
25
|
-
{isOpen && (
|
|
26
|
-
<Modal
|
|
27
|
-
onClose={() => setIsOpen(false)}
|
|
28
|
-
footer={
|
|
29
|
-
<>
|
|
30
|
-
<Button onClick={() => setIsOpen(true)} variant={'gray'}>
|
|
31
|
-
Cancelar
|
|
32
|
-
</Button>
|
|
33
|
-
<Button onClick={() => setIsOpen(true)}>Open Modal</Button>
|
|
34
|
-
</>
|
|
35
|
-
}
|
|
36
|
-
>
|
|
37
|
-
<Paragraph size={'medium'} weight={800}>
|
|
38
|
-
Modal Title
|
|
39
|
-
</Paragraph>
|
|
40
|
-
<Paragraph>
|
|
41
|
-
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the
|
|
42
|
-
industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and
|
|
43
|
-
scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into
|
|
44
|
-
electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release
|
|
45
|
-
of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software
|
|
46
|
-
like Aldus PageMaker including versions of Lorem Ipsum.
|
|
47
|
-
</Paragraph>
|
|
48
|
-
</Modal>
|
|
49
|
-
)}
|
|
50
|
-
</>
|
|
51
|
-
)
|
|
52
|
-
},
|
|
53
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components'
|
|
2
|
-
import { theme } from '../Themes'
|
|
3
|
-
const {
|
|
4
|
-
colors: { shade20 },
|
|
5
|
-
zIndex: { z8, z9 },
|
|
6
|
-
} = theme
|
|
7
|
-
|
|
8
|
-
export const Overlay = styled.div`
|
|
9
|
-
position: fixed;
|
|
10
|
-
top: 0;
|
|
11
|
-
left: 0;
|
|
12
|
-
width: 100%;
|
|
13
|
-
height: 100%;
|
|
14
|
-
background: rgba(0, 0, 0, 0.5);
|
|
15
|
-
z-index: ${z8};
|
|
16
|
-
`
|
|
17
|
-
export const ModalContainer = styled.div`
|
|
18
|
-
display: flex;
|
|
19
|
-
min-width: 360px;
|
|
20
|
-
width: auto;
|
|
21
|
-
height: auto;
|
|
22
|
-
padding: 30px;
|
|
23
|
-
flex-direction: column;
|
|
24
|
-
align-items: flex-start;
|
|
25
|
-
gap: 24px;
|
|
26
|
-
flex-shrink: 0;
|
|
27
|
-
border-radius: 24px;
|
|
28
|
-
border: 1px solid ${shade20};
|
|
29
|
-
background: white;
|
|
30
|
-
position: fixed;
|
|
31
|
-
top: 50%;
|
|
32
|
-
left: 50%;
|
|
33
|
-
transform: translate(-50%, -50%);
|
|
34
|
-
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
35
|
-
z-index: ${z9};
|
|
36
|
-
|
|
37
|
-
.modalContainer {
|
|
38
|
-
min-height: 100px;
|
|
39
|
-
}
|
|
40
|
-
.modalHeader {
|
|
41
|
-
display: inline-flex;
|
|
42
|
-
justify-content: space-between;
|
|
43
|
-
width: 100%;
|
|
44
|
-
}
|
|
45
|
-
.modalFooter {
|
|
46
|
-
display: inline-flex;
|
|
47
|
-
justify-content: flex-end;
|
|
48
|
-
width: 100%;
|
|
49
|
-
gap: 0 24px;
|
|
50
|
-
}
|
|
51
|
-
`
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import styled from 'styled-components'
|
|
3
|
-
|
|
4
|
-
interface ParagraphProps {
|
|
5
|
-
size?: 'x-small' | 'small' | 'medium' | 'large'
|
|
6
|
-
weight?: 400 | 600 | 700 | 800
|
|
7
|
-
as?: 'span' | 'div' | 'label' | 'p'
|
|
8
|
-
color?: string // Adicionando a propriedade color
|
|
9
|
-
children: React.ReactNode
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const sizes = {
|
|
13
|
-
'x-small': '12px',
|
|
14
|
-
small: '14px',
|
|
15
|
-
medium: '16px',
|
|
16
|
-
large: '18px',
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const weights = {
|
|
20
|
-
400: 400,
|
|
21
|
-
600: 600,
|
|
22
|
-
700: 700,
|
|
23
|
-
800: 800,
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
const ParagraphStyled = styled.p<ParagraphProps>`
|
|
27
|
-
margin: 0;
|
|
28
|
-
padding: 0;
|
|
29
|
-
font-size: ${props => sizes[props.size || 'small']};
|
|
30
|
-
font-weight: ${props => (props.weight ? weights[props.weight] : 400)};
|
|
31
|
-
line-height: 140%;
|
|
32
|
-
font-family: 'Nunito Sans', sans-serif;
|
|
33
|
-
color: ${props => props.color || 'inherit'}; // Aplicando a cor
|
|
34
|
-
`
|
|
35
|
-
|
|
36
|
-
export const Paragraph: React.FC<ParagraphProps> = ({ size = 'small', weight, as = 'p', color, children }) => {
|
|
37
|
-
return (
|
|
38
|
-
<ParagraphStyled as={as} size={size} weight={weight} color={color}>
|
|
39
|
-
{children}
|
|
40
|
-
</ParagraphStyled>
|
|
41
|
-
)
|
|
42
|
-
}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { Paragraph } from './index'
|
|
3
|
-
|
|
4
|
-
const meta: Meta<typeof Paragraph> = {
|
|
5
|
-
title: 'Components/Paragraph',
|
|
6
|
-
component: Paragraph,
|
|
7
|
-
parameters: {
|
|
8
|
-
layout: 'centered',
|
|
9
|
-
},
|
|
10
|
-
tags: ['autodocs'],
|
|
11
|
-
argTypes: {
|
|
12
|
-
size: {
|
|
13
|
-
control: { type: 'select', options: ['x-small', 'small', 'medium', 'large'] },
|
|
14
|
-
description: 'Select the size of the paragraph',
|
|
15
|
-
},
|
|
16
|
-
weight: {
|
|
17
|
-
control: { type: 'select', options: [400, 600, 700, 800] },
|
|
18
|
-
description: 'Select the font weight of the paragraph',
|
|
19
|
-
},
|
|
20
|
-
as: {
|
|
21
|
-
control: { type: 'select', options: ['span', 'div', 'label', 'p'] },
|
|
22
|
-
description: 'Select the HTML element to render',
|
|
23
|
-
},
|
|
24
|
-
color: {
|
|
25
|
-
control: 'color', // Adicionando o controle de cor
|
|
26
|
-
description: 'Select the color of the text',
|
|
27
|
-
},
|
|
28
|
-
children: {
|
|
29
|
-
control: 'text',
|
|
30
|
-
description: 'Content of the paragraph',
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
} satisfies Meta<typeof Paragraph>
|
|
34
|
-
|
|
35
|
-
export default meta
|
|
36
|
-
type Story = StoryObj<typeof meta>
|
|
37
|
-
|
|
38
|
-
// Define different stories for the Paragraph component
|
|
39
|
-
|
|
40
|
-
export const XSmall: Story = {
|
|
41
|
-
args: {
|
|
42
|
-
size: 'x-small',
|
|
43
|
-
color: '#000000', // Definindo a cor para XSmall
|
|
44
|
-
children: 'This is an X-small paragraph.',
|
|
45
|
-
},
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export const Small: Story = {
|
|
49
|
-
args: {
|
|
50
|
-
size: 'small',
|
|
51
|
-
weight: 600,
|
|
52
|
-
color: '#333333', // Definindo a cor para Small
|
|
53
|
-
children: 'This is a small paragraph with weight 600.',
|
|
54
|
-
},
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export const Medium: Story = {
|
|
58
|
-
args: {
|
|
59
|
-
size: 'medium',
|
|
60
|
-
weight: 700,
|
|
61
|
-
color: '#666666', // Definindo a cor para Medium
|
|
62
|
-
children: 'This is a medium paragraph with weight 700.',
|
|
63
|
-
},
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export const Large: Story = {
|
|
67
|
-
args: {
|
|
68
|
-
size: 'large',
|
|
69
|
-
color: '#999999', // Definindo a cor para Large
|
|
70
|
-
children: 'This is a large paragraph.',
|
|
71
|
-
},
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export const CustomElement: Story = {
|
|
75
|
-
args: {
|
|
76
|
-
size: 'medium',
|
|
77
|
-
as: 'label',
|
|
78
|
-
color: '#CC0000', // Definindo a cor para CustomElement
|
|
79
|
-
children: 'This is a medium paragraph rendered as a label.',
|
|
80
|
-
},
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export const AllSizes: Story = {
|
|
84
|
-
args: {
|
|
85
|
-
size: 'medium',
|
|
86
|
-
color: '#000000',
|
|
87
|
-
children: 'This paragraph can be adjusted to any size using the controls.',
|
|
88
|
-
},
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export const AllWeights: Story = {
|
|
92
|
-
args: {
|
|
93
|
-
size: 'medium',
|
|
94
|
-
weight: 400,
|
|
95
|
-
color: '#000000',
|
|
96
|
-
children: 'This paragraph weight can be adjusted to 400, 600, 700, or 800.',
|
|
97
|
-
},
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
export const AllElements: Story = {
|
|
101
|
-
args: {
|
|
102
|
-
size: 'medium',
|
|
103
|
-
as: 'div',
|
|
104
|
-
color: '#000000',
|
|
105
|
-
children: 'This paragraph can be rendered as different HTML elements.',
|
|
106
|
-
},
|
|
107
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react'
|
|
2
|
-
import { TabsTypes } from '../Types'
|
|
3
|
-
import { TabsContainerStyled, TabStyled } from './styles'
|
|
4
|
-
|
|
5
|
-
export const Tabs: React.FC<TabsTypes> = ({ tabs, defaultActiveTab, onTabChange }) => {
|
|
6
|
-
const [activeTab, setActiveTab] = useState(defaultActiveTab || tabs[0])
|
|
7
|
-
|
|
8
|
-
const handleTabClick = (tab: string) => {
|
|
9
|
-
setActiveTab(tab)
|
|
10
|
-
if (onTabChange) {
|
|
11
|
-
onTabChange(tab)
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
return (
|
|
16
|
-
<TabsContainerStyled>
|
|
17
|
-
{tabs.map(tab => (
|
|
18
|
-
<TabStyled key={tab} active={tab === activeTab} onClick={() => handleTabClick(tab)}>
|
|
19
|
-
{tab}
|
|
20
|
-
</TabStyled>
|
|
21
|
-
))}
|
|
22
|
-
</TabsContainerStyled>
|
|
23
|
-
)
|
|
24
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { Meta, StoryObj } from '@storybook/react'
|
|
3
|
-
import { Paragraph } from '../Paragraph'
|
|
4
|
-
import { Tabs } from './index'
|
|
5
|
-
import { useState } from 'react'
|
|
6
|
-
|
|
7
|
-
const meta: Meta<typeof Tabs> = {
|
|
8
|
-
title: 'Components/Tabs',
|
|
9
|
-
component: Tabs,
|
|
10
|
-
} satisfies Meta<typeof Tabs>
|
|
11
|
-
|
|
12
|
-
export default meta
|
|
13
|
-
|
|
14
|
-
type Story = StoryObj<typeof Tabs>
|
|
15
|
-
|
|
16
|
-
export const Playground: Story = {
|
|
17
|
-
render: () => {
|
|
18
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
19
|
-
const [activeTab, setActiveTab] = useState('Tab 1')
|
|
20
|
-
const handleTabChange = (activeTab: string) => {
|
|
21
|
-
setActiveTab(activeTab)
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
return (
|
|
25
|
-
<div style={{ background: '#e0dede', padding: '50px', height: '100vh' }}>
|
|
26
|
-
<Tabs tabs={['Tab 1', 'Tab 2', 'Tab 3']} defaultActiveTab="Tab 1" onTabChange={handleTabChange} />
|
|
27
|
-
<div style={{ background: 'white', padding: '50px 20px', borderRadius: '8px', marginTop: '-5px' }}>
|
|
28
|
-
{activeTab === 'Tab 1' && (
|
|
29
|
-
<>
|
|
30
|
-
<Paragraph size={'medium'} weight={800}>
|
|
31
|
-
Tab 1
|
|
32
|
-
</Paragraph>
|
|
33
|
-
<Paragraph>
|
|
34
|
-
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the
|
|
35
|
-
industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and
|
|
36
|
-
scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap
|
|
37
|
-
into electronic
|
|
38
|
-
</Paragraph>
|
|
39
|
-
</>
|
|
40
|
-
)}
|
|
41
|
-
{activeTab === 'Tab 2' && (
|
|
42
|
-
<>
|
|
43
|
-
<Paragraph size={'medium'} weight={800}>
|
|
44
|
-
Tab 2
|
|
45
|
-
</Paragraph>
|
|
46
|
-
<Paragraph>
|
|
47
|
-
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the
|
|
48
|
-
industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and
|
|
49
|
-
scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap
|
|
50
|
-
into electronic Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum
|
|
51
|
-
has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley
|
|
52
|
-
of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also
|
|
53
|
-
the leap into electronic
|
|
54
|
-
</Paragraph>
|
|
55
|
-
</>
|
|
56
|
-
)}
|
|
57
|
-
{activeTab === 'Tab 3' && (
|
|
58
|
-
<>
|
|
59
|
-
<Paragraph size={'medium'} weight={800}>
|
|
60
|
-
Tab 3
|
|
61
|
-
</Paragraph>
|
|
62
|
-
<Paragraph>
|
|
63
|
-
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the
|
|
64
|
-
industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and
|
|
65
|
-
scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap
|
|
66
|
-
into electronic
|
|
67
|
-
</Paragraph>
|
|
68
|
-
</>
|
|
69
|
-
)}
|
|
70
|
-
</div>
|
|
71
|
-
</div>
|
|
72
|
-
)
|
|
73
|
-
},
|
|
74
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components'
|
|
2
|
-
|
|
3
|
-
export const TabsContainerStyled = styled.div`
|
|
4
|
-
display: flex;
|
|
5
|
-
align-items: flex-end;
|
|
6
|
-
`
|
|
7
|
-
|
|
8
|
-
export const TabStyled = styled.div<{ active: boolean }>`
|
|
9
|
-
padding: 8px 16px;
|
|
10
|
-
cursor: pointer;
|
|
11
|
-
border-radius: 24px 24px 0 0;
|
|
12
|
-
background: white;
|
|
13
|
-
opacity: ${props => (props.active ? 1 : 0.8)};
|
|
14
|
-
height: ${props => (props.active ? '45px' : '40px')};
|
|
15
|
-
min-width: 95px;
|
|
16
|
-
display: inline-flex;
|
|
17
|
-
justify-content: center;
|
|
18
|
-
align-items: center;
|
|
19
|
-
font-family: 'Nunito Sans', sans-serif;
|
|
20
|
-
font-weight: ${props => (props.active ? 'bold' : 'normal')};
|
|
21
|
-
color: ${props => (props.active ? 'var(--PrimaryColor, #000)' : 'var(--SecondaryColor, #666)')};
|
|
22
|
-
transition: opacity 0.3s;
|
|
23
|
-
`
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
const cyan = {
|
|
2
|
-
cyan50: '#001640',
|
|
3
|
-
cyan40: '#1A3D7F',
|
|
4
|
-
cyan30: '#025FDE',
|
|
5
|
-
cyan20: '#217EFD',
|
|
6
|
-
cyan10: '#EEF5FF',
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
const shades = {
|
|
10
|
-
shade50: '#333333',
|
|
11
|
-
shade40: '#666666',
|
|
12
|
-
shade30: '#999999',
|
|
13
|
-
shade20: '#EEEEEE',
|
|
14
|
-
shade10: '#EFF1F3',
|
|
15
|
-
shade05: '#FAFAFA',
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const red = {
|
|
19
|
-
red40: '#981010',
|
|
20
|
-
red30: '#B41313',
|
|
21
|
-
red20: '#F3D9D9',
|
|
22
|
-
red10: '#F9EDED',
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const honey = {
|
|
26
|
-
honey40: '#F77202',
|
|
27
|
-
honey30: '#F77202',
|
|
28
|
-
honey20: '#FCCEA7',
|
|
29
|
-
honey10: '#FDE3CC',
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
const yellow = {
|
|
33
|
-
yellow30: '#D08007',
|
|
34
|
-
yellow20: '#EFD3A8',
|
|
35
|
-
yellow10: '#FAF2E6',
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
const mint = {
|
|
39
|
-
mint40: '#059D2F',
|
|
40
|
-
mint30: '#06B737',
|
|
41
|
-
mint20: '#D7EFDE',
|
|
42
|
-
mint10: '#EBF8EF',
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const white = '#FFFFFF'
|
|
46
|
-
const black = '#333333'
|
|
47
|
-
const transparent = 'transparent'
|
|
48
|
-
|
|
49
|
-
export const spacing = {
|
|
50
|
-
space1: '4px',
|
|
51
|
-
space2: '8px',
|
|
52
|
-
space3: '16px',
|
|
53
|
-
space4: '24px',
|
|
54
|
-
space5: '32px',
|
|
55
|
-
space6: '40px',
|
|
56
|
-
space7: '48px',
|
|
57
|
-
space8: '56px',
|
|
58
|
-
space9: '64px',
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
const zIndex = {
|
|
62
|
-
z1: 1,
|
|
63
|
-
z2: 2,
|
|
64
|
-
z3: 3,
|
|
65
|
-
z4: 4,
|
|
66
|
-
z5: 5,
|
|
67
|
-
z6: 6,
|
|
68
|
-
z7: 7,
|
|
69
|
-
z8: 8,
|
|
70
|
-
z9: 9,
|
|
71
|
-
full: 10000,
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export const theme = {
|
|
75
|
-
zIndex,
|
|
76
|
-
spacing,
|
|
77
|
-
colors: {
|
|
78
|
-
...yellow,
|
|
79
|
-
...shades,
|
|
80
|
-
...red,
|
|
81
|
-
...honey,
|
|
82
|
-
...mint,
|
|
83
|
-
...cyan,
|
|
84
|
-
white,
|
|
85
|
-
black,
|
|
86
|
-
transparent,
|
|
87
|
-
},
|
|
88
|
-
fonts: ['Nunito Sans', 'Helvetica Neue', 'Helvetica', 'Arial', 'sans-serif'],
|
|
89
|
-
title: {
|
|
90
|
-
medium: '24px',
|
|
91
|
-
large: '34px',
|
|
92
|
-
},
|
|
93
|
-
paragraph: {
|
|
94
|
-
'x-small': '12px',
|
|
95
|
-
small: '14px',
|
|
96
|
-
medium: '16px',
|
|
97
|
-
large: '18px',
|
|
98
|
-
},
|
|
99
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import styled from 'styled-components'
|
|
3
|
-
import { theme } from '../Themes'
|
|
4
|
-
|
|
5
|
-
interface ParagraphProps {
|
|
6
|
-
size: 'medium' | 'large'
|
|
7
|
-
bold?: boolean
|
|
8
|
-
as?: 'h1' | 'h2' | 'h3'
|
|
9
|
-
color?: string // Adicionando a propriedade color
|
|
10
|
-
children: React.ReactNode
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const sizes = {
|
|
14
|
-
...theme.title,
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const TitleStyled = styled.p<ParagraphProps>`
|
|
18
|
-
margin: 0;
|
|
19
|
-
padding: 0;
|
|
20
|
-
font-size: ${props => sizes[props.size]};
|
|
21
|
-
font-weight: ${props => (props.bold ? 800 : 400)};
|
|
22
|
-
line-height: 130%;
|
|
23
|
-
font-family: 'Nunito Sans', sans-serif;
|
|
24
|
-
color: ${props => props.color || 'inherit'}; // Aplicando a cor
|
|
25
|
-
`
|
|
26
|
-
|
|
27
|
-
export const Title: React.FC<ParagraphProps> = ({ size = 'medium', bold, as = 'h2', color, children }) => {
|
|
28
|
-
return (
|
|
29
|
-
<TitleStyled as={as} size={size} bold={bold} color={color}>
|
|
30
|
-
{children}
|
|
31
|
-
</TitleStyled>
|
|
32
|
-
)
|
|
33
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { theme } from '../Themes'
|
|
3
|
-
import { Title } from './index'
|
|
4
|
-
|
|
5
|
-
const sizes = theme.title
|
|
6
|
-
|
|
7
|
-
const meta: Meta<typeof Title> = {
|
|
8
|
-
title: 'Components/Title',
|
|
9
|
-
component: Title,
|
|
10
|
-
parameters: {
|
|
11
|
-
layout: 'centered',
|
|
12
|
-
},
|
|
13
|
-
argTypes: {
|
|
14
|
-
size: {
|
|
15
|
-
control: { type: 'select', options: ['medium', 'large'] },
|
|
16
|
-
description: 'Font size of the title',
|
|
17
|
-
},
|
|
18
|
-
bold: {
|
|
19
|
-
control: 'boolean',
|
|
20
|
-
description: 'Apply bold font weight',
|
|
21
|
-
},
|
|
22
|
-
as: {
|
|
23
|
-
control: { type: 'select', options: ['h1', 'h2', 'h3'] },
|
|
24
|
-
description: 'HTML element to render',
|
|
25
|
-
},
|
|
26
|
-
color: {
|
|
27
|
-
control: 'color',
|
|
28
|
-
description: 'Font color of the title',
|
|
29
|
-
},
|
|
30
|
-
children: {
|
|
31
|
-
control: 'text',
|
|
32
|
-
description: 'Content of the title',
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export default meta
|
|
38
|
-
type Story = StoryObj<typeof meta>
|
|
39
|
-
|
|
40
|
-
export const LargeBoldTitle: Story = {
|
|
41
|
-
args: {
|
|
42
|
-
size: 'large',
|
|
43
|
-
bold: true,
|
|
44
|
-
as: 'h1',
|
|
45
|
-
color: '#1A3D7F', // Example color
|
|
46
|
-
children: 'Large Bold Title',
|
|
47
|
-
},
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export const MediumTitle: Story = {
|
|
51
|
-
args: {
|
|
52
|
-
size: 'medium',
|
|
53
|
-
bold: false,
|
|
54
|
-
as: 'h2',
|
|
55
|
-
color: '#025FDE', // Example color
|
|
56
|
-
children: 'Medium Title',
|
|
57
|
-
},
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export const CustomColorTitle: Story = {
|
|
61
|
-
args: {
|
|
62
|
-
size: 'large',
|
|
63
|
-
bold: true,
|
|
64
|
-
as: 'h3',
|
|
65
|
-
color: '#FF5733', // Custom color
|
|
66
|
-
children: 'Custom Color Title',
|
|
67
|
-
},
|
|
68
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { ButtonHTMLAttributes, HTMLAttributes, ReactNode } from 'react'
|
|
2
|
-
|
|
3
|
-
type ColorsVariant = 'primary' | 'secondary' | 'success' | 'danger' | 'gray' | 'warning' | 'yellow'
|
|
4
|
-
type ColorsVariantBanner = 'notice' | 'success' | 'danger' | 'warning'
|
|
5
|
-
export interface ButtonTypes extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
6
|
-
variant?: ColorsVariant
|
|
7
|
-
icon?: string
|
|
8
|
-
radius?: boolean
|
|
9
|
-
outline?: boolean
|
|
10
|
-
halfLeft?: boolean
|
|
11
|
-
halfRight?: boolean
|
|
12
|
-
fullWidth?: boolean
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface ButtonRadiusIconTypes extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
16
|
-
variant?: ColorsVariant
|
|
17
|
-
icon?: string
|
|
18
|
-
subTitle?: string
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export interface ButtonRoundTypes extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
22
|
-
variant?: ColorsVariant
|
|
23
|
-
icon?: string
|
|
24
|
-
outline?: boolean
|
|
25
|
-
badge?: number
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export interface BannerTypes extends HTMLAttributes<HTMLDivElement> {
|
|
29
|
-
variant?: ColorsVariantBanner
|
|
30
|
-
title?: string
|
|
31
|
-
subTitle?: string
|
|
32
|
-
onClick?: () => void
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export interface ModalTypes extends HTMLAttributes<HTMLDivElement> {
|
|
36
|
-
children: ReactNode
|
|
37
|
-
onClose: () => void
|
|
38
|
-
footer?: ReactNode | ReactNode[]
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export interface TabsTypes extends HTMLAttributes<HTMLDivElement> {
|
|
42
|
-
tabs: string[]
|
|
43
|
-
defaultActiveTab?: string
|
|
44
|
-
onTabChange?: (activeTab: string) => void
|
|
45
|
-
}
|
package/src/index.tsx
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export { Banner } from './components/Banner/index'
|
|
2
|
-
export { Button } from './components/Button/index'
|
|
3
|
-
export { ButtonRadiusIcon } from './components/ButtonRadiusIcon/index'
|
|
4
|
-
export { ButtonRound } from './components/ButtonRound/index'
|
|
5
|
-
export { IconWrapper } from './components/IconWrapper/index'
|
|
6
|
-
export { Modal } from './components/Modal/index'
|
|
7
|
-
export { Paragraph } from './components/Paragraph/index'
|
|
8
|
-
export { Tabs } from './components/Tabs/index'
|
|
9
|
-
export { theme } from './components/Themes/index'
|
|
10
|
-
export { Title } from './components/Title/index'
|
package/src/logo.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 841.9 595.3"><g fill="#61DAFB"><path d="M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9V78c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6V78.5c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3zm-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9zm-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9zm32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1zM421.2 430c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32zm-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24 4.7 8 9.5 15.8 14.4 23.4zM420.7 163c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32zm-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9zm-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6 0-15.7 22.9-35.6 58.3-50.6 8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2zM310 490c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7zm237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1zm38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6zM320.8 78.4z"/><circle cx="420.9" cy="296.5" r="45.7"/><path d="M520.5 78.1z"/></g></svg>
|
package/src/prettier.config.js
DELETED