venice-ui 1.0.1 → 1.0.3
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/cjs/index.d.ts +4 -3
- package/dist/cjs/index.js +4 -7
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.d.ts +4 -3
- package/dist/esm/index.js +4 -3
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/.circleci/config.yml +0 -36
- package/.eslintrc.json +0 -24
- package/.prettierignore +0 -10
- package/.prettierrc +0 -5
- package/.storybook/PCTheme.js +0 -10
- package/.storybook/main.js +0 -13
- package/.storybook/manager.js +0 -17
- package/.storybook/preview-head.html +0 -18
- package/.storybook/preview.js +0 -29
- package/.storybook/public/pc_logo.png +0 -0
- package/dist/cjs/components/Aligment/Aligment.stories.d.ts +0 -7
- package/dist/cjs/components/Aligment/Aligment.stories.js +0 -110
- package/dist/cjs/components/Aligment/Aligment.stories.js.map +0 -1
- package/dist/cjs/components/Button/Button.stories.d.ts +0 -7
- package/dist/cjs/components/Button/Button.stories.js +0 -51
- package/dist/cjs/components/Button/Button.stories.js.map +0 -1
- package/dist/cjs/components/Icons/Icon.stories.d.ts +0 -9
- package/dist/cjs/components/Icons/Icon.stories.js +0 -60
- package/dist/cjs/components/Icons/Icon.stories.js.map +0 -1
- package/dist/cjs/components/InputText/InputText.stories.d.ts +0 -5
- package/dist/cjs/components/InputText/InputText.stories.js +0 -18
- package/dist/cjs/components/InputText/InputText.stories.js.map +0 -1
- package/dist/cjs/components/Modal/Modal.stories.d.ts +0 -8
- package/dist/cjs/components/Modal/Modal.stories.js +0 -83
- package/dist/cjs/components/Modal/Modal.stories.js.map +0 -1
- package/dist/esm/components/Aligment/Aligment.stories.d.ts +0 -7
- package/dist/esm/components/Aligment/Aligment.stories.js +0 -104
- package/dist/esm/components/Aligment/Aligment.stories.js.map +0 -1
- package/dist/esm/components/Button/Button.stories.d.ts +0 -7
- package/dist/esm/components/Button/Button.stories.js +0 -45
- package/dist/esm/components/Button/Button.stories.js.map +0 -1
- package/dist/esm/components/Icons/Icon.stories.d.ts +0 -9
- package/dist/esm/components/Icons/Icon.stories.js +0 -54
- package/dist/esm/components/Icons/Icon.stories.js.map +0 -1
- package/dist/esm/components/InputText/InputText.stories.d.ts +0 -5
- package/dist/esm/components/InputText/InputText.stories.js +0 -12
- package/dist/esm/components/InputText/InputText.stories.js.map +0 -1
- package/dist/esm/components/Modal/Modal.stories.d.ts +0 -8
- package/dist/esm/components/Modal/Modal.stories.js +0 -57
- package/dist/esm/components/Modal/Modal.stories.js.map +0 -1
- package/src/Theme/Theme.ts +0 -47
- package/src/components/Aligment/Aligment.stories.tsx +0 -126
- package/src/components/Aligment/Aligment.styles.ts +0 -23
- package/src/components/Aligment/index.ts +0 -1
- package/src/components/Button/Button.stories.tsx +0 -53
- package/src/components/Button/Button.styles.tsx +0 -76
- package/src/components/Button/Button.tsx +0 -31
- package/src/components/Button/index.ts +0 -1
- package/src/components/Icons/Icon.stories.tsx +0 -62
- package/src/components/Icons/Icon.styles.ts +0 -29
- package/src/components/Icons/Icon.tsx +0 -35
- package/src/components/Icons/Icons.stories.mdx +0 -38
- package/src/components/Icons/IconsPath.ts +0 -13
- package/src/components/Icons/index.ts +0 -1
- package/src/components/InputText/InputText.stories.tsx +0 -18
- package/src/components/InputText/InputText.styles.ts +0 -19
- package/src/components/InputText/InputText.tsx +0 -24
- package/src/components/InputText/index.ts +0 -1
- package/src/components/Modal/Modal.stories.tsx +0 -183
- package/src/components/Modal/Modal.styles.ts +0 -38
- package/src/components/Modal/Modal.tsx +0 -63
- package/src/components/Modal/index.ts +0 -1
- package/src/components/Typography/Typography.stories.mdx +0 -35
- package/src/components/Typography/Typography.styles.tsx +0 -31
- package/src/components/Typography/index.ts +0 -1
- package/src/components/common/commonComponents.tsx +0 -13
- package/src/components/common/index.ts +0 -1
- package/src/example/ExampleComponent.tsx +0 -44
- package/src/example/index.ts +0 -1
- package/src/index.ts +0 -5
- package/tsconfig.json +0 -19
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import React, { FC } from 'react'
|
|
2
|
-
import { Theme } from '../../Theme/Theme'
|
|
3
|
-
import { Aligment } from '../Aligment'
|
|
4
|
-
import { Button } from '../Button'
|
|
5
|
-
import { ScrollCotainer } from '../common'
|
|
6
|
-
import { Icon } from '../Icons'
|
|
7
|
-
import { TextHeader } from '../Typography'
|
|
8
|
-
import { ModalElement, ModalOverlayer } from './Modal.styles'
|
|
9
|
-
|
|
10
|
-
export interface IModalProps {
|
|
11
|
-
children: React.ReactNode
|
|
12
|
-
title?: string
|
|
13
|
-
handleConfirm?: () => void
|
|
14
|
-
handleClose: () => void
|
|
15
|
-
labelConfirm?: string
|
|
16
|
-
labelClose: string
|
|
17
|
-
size?: string
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export const Modal: FC<IModalProps> = ({
|
|
21
|
-
children,
|
|
22
|
-
title,
|
|
23
|
-
handleConfirm,
|
|
24
|
-
handleClose,
|
|
25
|
-
labelConfirm,
|
|
26
|
-
labelClose,
|
|
27
|
-
size = 'small',
|
|
28
|
-
}) => {
|
|
29
|
-
const isMultiButtons = (): boolean => {
|
|
30
|
-
return handleConfirm !== undefined && labelConfirm !== undefined
|
|
31
|
-
}
|
|
32
|
-
return (
|
|
33
|
-
<ModalOverlayer>
|
|
34
|
-
<ModalElement size={size}>
|
|
35
|
-
<Aligment
|
|
36
|
-
justify={!title ? 'flex-end' : 'space-between'}
|
|
37
|
-
vPadding={Theme.padding.m}
|
|
38
|
-
hPadding={Theme.padding.m}
|
|
39
|
-
>
|
|
40
|
-
{title && <TextHeader>{title}</TextHeader>}
|
|
41
|
-
<Icon onClick={handleClose} name="close" />
|
|
42
|
-
</Aligment>
|
|
43
|
-
<ScrollCotainer>{children}</ScrollCotainer>
|
|
44
|
-
<Aligment
|
|
45
|
-
justify={'flex-end'}
|
|
46
|
-
vPadding={Theme.padding.m}
|
|
47
|
-
hPadding={Theme.padding.m}
|
|
48
|
-
>
|
|
49
|
-
<Button
|
|
50
|
-
mode={isMultiButtons() ? 'inverse' : 'primary'}
|
|
51
|
-
onClick={() => handleClose()}
|
|
52
|
-
text={labelClose}
|
|
53
|
-
left={isMultiButtons()}
|
|
54
|
-
/>
|
|
55
|
-
|
|
56
|
-
{handleConfirm && labelConfirm && (
|
|
57
|
-
<Button onClick={handleConfirm} text={labelConfirm} />
|
|
58
|
-
)}
|
|
59
|
-
</Aligment>
|
|
60
|
-
</ModalElement>
|
|
61
|
-
</ModalOverlayer>
|
|
62
|
-
)
|
|
63
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {Modal} from './Modal'
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { Text, TextHeader,TextSubHeader,TextLabel,TextSmall } from './Typography.styles'
|
|
2
|
-
import { Meta } from '@storybook/addon-docs';
|
|
3
|
-
import { ExampleTable, ExampleTableRow, ExampleTableHeader,ExampleTableCell , StoryWrapper } from '../../example'
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
<Meta title="Basic/Typography" />
|
|
7
|
-
|
|
8
|
-
<StoryWrapper>
|
|
9
|
-
<ExampleTable>
|
|
10
|
-
<ExampleTableRow>
|
|
11
|
-
<ExampleTableHeader>Font component</ExampleTableHeader>
|
|
12
|
-
<ExampleTableHeader>Sample</ExampleTableHeader>
|
|
13
|
-
</ExampleTableRow>
|
|
14
|
-
<ExampleTableRow>
|
|
15
|
-
<ExampleTableCell><code>TextHeader</code></ExampleTableCell>
|
|
16
|
-
<ExampleTableCell><TextHeader>One ring to rule them all</TextHeader></ExampleTableCell>
|
|
17
|
-
</ExampleTableRow>
|
|
18
|
-
<ExampleTableRow>
|
|
19
|
-
<ExampleTableCell><code>TextSubHeader</code></ExampleTableCell>
|
|
20
|
-
<ExampleTableCell><TextSubHeader>One ring to rule them all</TextSubHeader></ExampleTableCell>
|
|
21
|
-
</ExampleTableRow>
|
|
22
|
-
<ExampleTableRow>
|
|
23
|
-
<ExampleTableCell><code>Text</code></ExampleTableCell>
|
|
24
|
-
<ExampleTableCell><Text>One ring to rule them all</Text></ExampleTableCell>
|
|
25
|
-
</ExampleTableRow>
|
|
26
|
-
<ExampleTableRow>
|
|
27
|
-
<ExampleTableCell><code>TextSmall</code></ExampleTableCell>
|
|
28
|
-
<ExampleTableCell><TextSmall>One ring to rule them all</TextSmall></ExampleTableCell>
|
|
29
|
-
</ExampleTableRow>
|
|
30
|
-
<ExampleTableRow>
|
|
31
|
-
<ExampleTableCell><code>TextLabel</code></ExampleTableCell>
|
|
32
|
-
<ExampleTableCell><TextLabel>One ring to rule them all</TextLabel></ExampleTableCell>
|
|
33
|
-
</ExampleTableRow>
|
|
34
|
-
</ExampleTable>
|
|
35
|
-
</StoryWrapper>
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components'
|
|
2
|
-
import { Theme } from '../../Theme/Theme'
|
|
3
|
-
|
|
4
|
-
export const Text = styled.div`
|
|
5
|
-
font-size: ${Theme.fontSize.m};
|
|
6
|
-
line-height: ${Theme.lineHeight.m};
|
|
7
|
-
font-weight: normal;
|
|
8
|
-
`
|
|
9
|
-
export const TextSmall = styled.div`
|
|
10
|
-
font-size: ${Theme.fontSize.s};
|
|
11
|
-
line-height: ${Theme.lineHeight.s};
|
|
12
|
-
font-weight: normal;
|
|
13
|
-
`
|
|
14
|
-
|
|
15
|
-
export const TextHeader = styled.div`
|
|
16
|
-
font-size: ${Theme.fontSize.l};
|
|
17
|
-
line-height: ${Theme.lineHeight.l};
|
|
18
|
-
font-weight: 300;
|
|
19
|
-
`
|
|
20
|
-
|
|
21
|
-
export const TextSubHeader = styled.div`
|
|
22
|
-
font-size: ${Theme.fontSize.m};
|
|
23
|
-
line-height: ${Theme.lineHeight.m};
|
|
24
|
-
font-weight: 300;
|
|
25
|
-
`
|
|
26
|
-
|
|
27
|
-
export const TextLabel = styled.div`
|
|
28
|
-
font-size: ${Theme.fontSize.xs};
|
|
29
|
-
line-height: ${Theme.lineHeight.xs};
|
|
30
|
-
font-weight: bold;
|
|
31
|
-
`
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {Text, TextHeader,TextSubHeader,TextLabel } from './Typography.styles'
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components'
|
|
2
|
-
import { Theme } from '../../Theme/Theme'
|
|
3
|
-
|
|
4
|
-
export const Container = styled.div`
|
|
5
|
-
width: 100%;
|
|
6
|
-
`
|
|
7
|
-
|
|
8
|
-
export const ScrollCotainer = styled.div`
|
|
9
|
-
width: 100%;
|
|
10
|
-
padding: ${Theme.padding.l} ${Theme.padding.m};
|
|
11
|
-
overflow: auto;
|
|
12
|
-
box-sizing: border-box;
|
|
13
|
-
`
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './commonComponents'
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components'
|
|
2
|
-
import { Theme } from '../Theme/Theme'
|
|
3
|
-
|
|
4
|
-
export const StoryWrapper = styled.div`
|
|
5
|
-
padding: ${Theme.padding.l}
|
|
6
|
-
`
|
|
7
|
-
|
|
8
|
-
interface IExmpleBlock {
|
|
9
|
-
width?: string
|
|
10
|
-
height?: string
|
|
11
|
-
color?: string
|
|
12
|
-
}
|
|
13
|
-
export const ExmpleBlock = styled.div<IExmpleBlock>`
|
|
14
|
-
padding: ${(p) => (p.width ? p.width : '10px')} ${(p) => (p.height ? p.height : '10px')};
|
|
15
|
-
text-align: center;
|
|
16
|
-
font-size:${Theme.fontSize.xl}
|
|
17
|
-
`
|
|
18
|
-
|
|
19
|
-
interface IExmpleBlockWrapper {
|
|
20
|
-
color?: string
|
|
21
|
-
}
|
|
22
|
-
export const ExmpleBlockWrapper = styled.div<IExmpleBlockWrapper>`
|
|
23
|
-
background-color: ${(p) => (p.color ? p.color : '#aaaaaa')};
|
|
24
|
-
border-radius: ${Theme.borderRadius.m};
|
|
25
|
-
`
|
|
26
|
-
|
|
27
|
-
export const ExampleTable = styled.table`
|
|
28
|
-
width: 100%;
|
|
29
|
-
border-collapse: collapse;
|
|
30
|
-
`
|
|
31
|
-
export const ExampleTableRow = styled.tr`
|
|
32
|
-
width: 100%;
|
|
33
|
-
border-collapse: collapse;
|
|
34
|
-
`
|
|
35
|
-
export const ExampleTableCell = styled.td`
|
|
36
|
-
padding:${Theme.padding.m};
|
|
37
|
-
border-bottom:1px solid #dddddd;
|
|
38
|
-
`
|
|
39
|
-
export const ExampleTableHeader = styled.th`
|
|
40
|
-
padding:${Theme.padding.m};
|
|
41
|
-
border-collapse: collapse;
|
|
42
|
-
background-color:#dddddd;
|
|
43
|
-
text-align: left;
|
|
44
|
-
`
|
package/src/example/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './ExampleComponent'
|
package/src/index.ts
DELETED
package/tsconfig.json
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"allowSyntheticDefaultImports": true,
|
|
4
|
-
"declaration": true,
|
|
5
|
-
"esModuleInterop": true,
|
|
6
|
-
"jsx": "react",
|
|
7
|
-
"lib": ["ES5", "ES2015", "ES2016", "DOM", "ESNext"],
|
|
8
|
-
"types": ["node"],
|
|
9
|
-
"module": "es2015",
|
|
10
|
-
"moduleResolution": "node",
|
|
11
|
-
"noImplicitAny": false,
|
|
12
|
-
"noUnusedLocals": true,
|
|
13
|
-
"outDir": "dist/esm",
|
|
14
|
-
"sourceMap": true,
|
|
15
|
-
"strict": true,
|
|
16
|
-
"target": "ES6"
|
|
17
|
-
},
|
|
18
|
-
"include": ["src/**/*.ts", "src/**/*.tsx", "src/components/Typography/Typography.stories.mdx"]
|
|
19
|
-
}
|