jp.ui.app.ds 1.0.0 → 1.0.2
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 +23 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/matherial3/button/common-button.d.ts +15 -0
- package/dist/matherial3/button/common-button.style.d.ts +13 -0
- package/dist/matherial3/button/filled-button.d.ts +3 -0
- package/{src/matherial3/button/index.ts → dist/matherial3/button/index.d.ts} +1 -6
- package/dist/matherial3/button/outlined-button.d.ts +3 -0
- package/dist/matherial3/button/text-button.d.ts +3 -0
- package/dist/matherial3/checkbox/checkbox.d.ts +6 -0
- package/dist/matherial3/checkbox/checkbox.style.d.ts +29 -0
- package/{src/matherial3/checkbox/index.ts → dist/matherial3/checkbox/index.d.ts} +1 -4
- package/dist/matherial3/helpers/backdrop/backdrop.d.ts +2 -0
- package/dist/matherial3/helpers/backdrop/backdrop.style.d.ts +4 -0
- package/{src/matherial3/helpers/backdrop/index.ts → dist/matherial3/helpers/backdrop/index.d.ts} +1 -4
- package/dist/matherial3/helpers/index.d.ts +7 -0
- package/{src/matherial3/helpers/no-style-button/index.ts → dist/matherial3/helpers/no-style-button/index.d.ts} +1 -4
- package/dist/matherial3/helpers/no-style-button/no-style-button.style.d.ts +4 -0
- package/dist/matherial3/helpers/outside-click.d.ts +2 -0
- package/dist/matherial3/helpers/popup/popup.d.ts +8 -0
- package/dist/matherial3/helpers/popup/popup.style.d.ts +7 -0
- package/dist/matherial3/helpers/stack/column-center.d.ts +8 -0
- package/dist/matherial3/helpers/stack/column-left.d.ts +8 -0
- package/{src/matherial3/helpers/stack/index.ts → dist/matherial3/helpers/stack/index.d.ts} +1 -8
- package/dist/matherial3/helpers/stack/row-center.d.ts +6 -0
- package/dist/matherial3/helpers/stack/row-start.d.ts +6 -0
- package/dist/matherial3/helpers/stack/stack.d.ts +11 -0
- package/{src/matherial3/helpers/svg-icon/index.ts → dist/matherial3/helpers/svg-icon/index.d.ts} +1 -4
- package/dist/matherial3/helpers/svg-icon/svg-icon.d.ts +16 -0
- package/dist/matherial3/typography/body.d.ts +3 -0
- package/dist/matherial3/typography/display.d.ts +3 -0
- package/dist/matherial3/typography/headline.d.ts +3 -0
- package/{src/matherial3/typography/index.ts → dist/matherial3/typography/index.d.ts} +1 -8
- package/dist/matherial3/typography/label.d.ts +3 -0
- package/dist/matherial3/typography/m3-typography.d.ts +22 -0
- package/dist/matherial3/typography/title.d.ts +3 -0
- package/package.json +9 -6
- package/.storybook/main.ts +0 -31
- package/.storybook/preview.tsx +0 -38
- package/rollup.config.js +0 -31
- package/src/index.ts +0 -1
- package/src/matherial3/button/common-button.style.ts +0 -35
- package/src/matherial3/button/common-button.tsx +0 -40
- package/src/matherial3/button/filled-button.stories.ts +0 -33
- package/src/matherial3/button/filled-button.tsx +0 -20
- package/src/matherial3/button/outlined-button.stories.ts +0 -33
- package/src/matherial3/button/outlined-button.tsx +0 -18
- package/src/matherial3/button/text-button.stories.ts +0 -33
- package/src/matherial3/button/text-button.tsx +0 -17
- package/src/matherial3/checkbox/checkbox.stories.ts +0 -29
- package/src/matherial3/checkbox/checkbox.style.tsx +0 -53
- package/src/matherial3/checkbox/checkbox.tsx +0 -49
- package/src/matherial3/helpers/backdrop/backdrop.style.ts +0 -14
- package/src/matherial3/helpers/backdrop/backdrop.tsx +0 -9
- package/src/matherial3/helpers/index.ts +0 -19
- package/src/matherial3/helpers/no-style-button/no-style-button.style.ts +0 -12
- package/src/matherial3/helpers/outside-click.ts +0 -17
- package/src/matherial3/helpers/popup/popup.style.tsx +0 -14
- package/src/matherial3/helpers/popup/popup.tsx +0 -17
- package/src/matherial3/helpers/stack/column-center.tsx +0 -22
- package/src/matherial3/helpers/stack/column-left.tsx +0 -22
- package/src/matherial3/helpers/stack/row-center.tsx +0 -19
- package/src/matherial3/helpers/stack/row-start.tsx +0 -20
- package/src/matherial3/helpers/stack/stack.tsx +0 -16
- package/src/matherial3/helpers/svg-icon/svg-icon.tsx +0 -46
- package/src/matherial3/typography/body.tsx +0 -19
- package/src/matherial3/typography/display.tsx +0 -19
- package/src/matherial3/typography/headline.tsx +0 -19
- package/src/matherial3/typography/label.tsx +0 -19
- package/src/matherial3/typography/m3-typography.tsx +0 -45
- package/src/matherial3/typography/title.tsx +0 -19
- package/tsconfig.json +0 -30
- package/types/emotion.d.ts +0 -12
- /package/{src/matherial3/helpers/popup/index.ts → dist/matherial3/helpers/popup/index.d.ts} +0 -0
- /package/{src/matherial3/index.ts → dist/matherial3/index.d.ts} +0 -0
- /package/{src/matherial3/typography/typography-size.ts → dist/matherial3/typography/typography-size.d.ts} +0 -0
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { useTheme, Theme } from '@emotion/react';
|
|
3
|
-
|
|
4
|
-
import { Label } from '../typography';
|
|
5
|
-
|
|
6
|
-
import { CommonButtonStyled } from './common-button.style';
|
|
7
|
-
|
|
8
|
-
export type CommonTypeStyle = {
|
|
9
|
-
text: string;
|
|
10
|
-
onClick?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
11
|
-
className?: string;
|
|
12
|
-
disabled?: boolean;
|
|
13
|
-
textColor?: string;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
type componentTypeStyle = CommonTypeStyle & {
|
|
17
|
-
backgroundColor?: string;
|
|
18
|
-
textColor: string;
|
|
19
|
-
borderColor?: string;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export const CommonButton = ({ text, onClick, className, backgroundColor, textColor, borderColor, disabled }: componentTypeStyle) => {
|
|
23
|
-
const theme = useTheme() as Theme;
|
|
24
|
-
|
|
25
|
-
return (
|
|
26
|
-
<CommonButtonStyled
|
|
27
|
-
title={text}
|
|
28
|
-
onClick={onClick}
|
|
29
|
-
className={className}
|
|
30
|
-
backgroundColor={backgroundColor}
|
|
31
|
-
borderColor={borderColor}
|
|
32
|
-
hoverColor={theme.m3Schema.onPrimaryContainer}
|
|
33
|
-
disabled={disabled}
|
|
34
|
-
>
|
|
35
|
-
<Label color={textColor} size="lg">
|
|
36
|
-
{text}
|
|
37
|
-
</Label>
|
|
38
|
-
</CommonButtonStyled>
|
|
39
|
-
);
|
|
40
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
2
|
-
import { fn } from 'storybook/test';
|
|
3
|
-
|
|
4
|
-
import { FilledButton } from './filled-button';
|
|
5
|
-
|
|
6
|
-
const meta = {
|
|
7
|
-
title: 'm3/button/FilledButton',
|
|
8
|
-
component: FilledButton,
|
|
9
|
-
parameters: {
|
|
10
|
-
layout: 'centered',
|
|
11
|
-
},
|
|
12
|
-
tags: ['autodocs'],
|
|
13
|
-
argTypes: {
|
|
14
|
-
text: 'text',
|
|
15
|
-
},
|
|
16
|
-
args: { onClick: fn() },
|
|
17
|
-
} satisfies Meta<typeof FilledButton>;
|
|
18
|
-
|
|
19
|
-
export default meta;
|
|
20
|
-
type Story = StoryObj<typeof meta>;
|
|
21
|
-
|
|
22
|
-
export const Default: Story = {
|
|
23
|
-
args: {
|
|
24
|
-
text: 'Button',
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export const Disabled: Story = {
|
|
29
|
-
args: {
|
|
30
|
-
text: 'disabled',
|
|
31
|
-
disabled: true,
|
|
32
|
-
},
|
|
33
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { useTheme, Theme } from '@emotion/react';
|
|
3
|
-
|
|
4
|
-
import { CommonButton, CommonTypeStyle } from './common-button';
|
|
5
|
-
|
|
6
|
-
export const FilledButton = ({ text, onClick, className, disabled }: CommonTypeStyle) => {
|
|
7
|
-
const theme = useTheme() as Theme;
|
|
8
|
-
|
|
9
|
-
return (
|
|
10
|
-
<CommonButton
|
|
11
|
-
text={text}
|
|
12
|
-
onClick={onClick}
|
|
13
|
-
backgroundColor={disabled ? `${theme.m3Schema.onSurface}1f` : theme.m3Schema.primary}
|
|
14
|
-
borderColor={disabled ? 'transparent' : theme.m3Schema.primary}
|
|
15
|
-
textColor={disabled ? `${theme.m3Schema.onSurface}b0` : theme.m3Schema.onPrimary}
|
|
16
|
-
className={className}
|
|
17
|
-
disabled={disabled}
|
|
18
|
-
/>
|
|
19
|
-
);
|
|
20
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
2
|
-
import { fn } from 'storybook/test';
|
|
3
|
-
|
|
4
|
-
import { OutlinedButton } from './outlined-button';
|
|
5
|
-
|
|
6
|
-
const meta = {
|
|
7
|
-
title: 'm3/button/OutlinedButton',
|
|
8
|
-
component: OutlinedButton,
|
|
9
|
-
parameters: {
|
|
10
|
-
layout: 'centered',
|
|
11
|
-
},
|
|
12
|
-
tags: ['autodocs'],
|
|
13
|
-
argTypes: {
|
|
14
|
-
text: 'text',
|
|
15
|
-
},
|
|
16
|
-
args: { onClick: fn() },
|
|
17
|
-
} satisfies Meta<typeof OutlinedButton>;
|
|
18
|
-
|
|
19
|
-
export default meta;
|
|
20
|
-
type Story = StoryObj<typeof meta>;
|
|
21
|
-
|
|
22
|
-
export const Default: Story = {
|
|
23
|
-
args: {
|
|
24
|
-
text: 'default',
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export const Disabled: Story = {
|
|
29
|
-
args: {
|
|
30
|
-
text: 'disabled',
|
|
31
|
-
disabled: true,
|
|
32
|
-
},
|
|
33
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { useTheme, Theme } from '@emotion/react';
|
|
3
|
-
|
|
4
|
-
import { CommonButton, CommonTypeStyle } from './common-button';
|
|
5
|
-
|
|
6
|
-
export const OutlinedButton = ({ text, onClick, className }: CommonTypeStyle) => {
|
|
7
|
-
const theme = useTheme() as Theme;
|
|
8
|
-
|
|
9
|
-
return (
|
|
10
|
-
<CommonButton
|
|
11
|
-
text={text}
|
|
12
|
-
onClick={onClick}
|
|
13
|
-
textColor={theme.m3Schema.primary}
|
|
14
|
-
borderColor={theme.m3Schema.outline}
|
|
15
|
-
className={className}
|
|
16
|
-
/>
|
|
17
|
-
);
|
|
18
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
2
|
-
import { fn } from 'storybook/test';
|
|
3
|
-
|
|
4
|
-
import { TextButton } from './text-button';
|
|
5
|
-
|
|
6
|
-
const meta = {
|
|
7
|
-
title: 'm3/button/TextButton',
|
|
8
|
-
component: TextButton,
|
|
9
|
-
parameters: {
|
|
10
|
-
layout: 'centered',
|
|
11
|
-
},
|
|
12
|
-
tags: ['autodocs'],
|
|
13
|
-
argTypes: {
|
|
14
|
-
text: 'text',
|
|
15
|
-
},
|
|
16
|
-
args: { onClick: fn() },
|
|
17
|
-
} satisfies Meta<typeof TextButton>;
|
|
18
|
-
|
|
19
|
-
export default meta;
|
|
20
|
-
type Story = StoryObj<typeof meta>;
|
|
21
|
-
|
|
22
|
-
export const Default: Story = {
|
|
23
|
-
args: {
|
|
24
|
-
text: 'Button',
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export const Disabled: Story = {
|
|
29
|
-
args: {
|
|
30
|
-
text: 'disabled',
|
|
31
|
-
disabled: true,
|
|
32
|
-
},
|
|
33
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { useTheme, Theme } from '@emotion/react';
|
|
3
|
-
|
|
4
|
-
import { CommonButton, CommonTypeStyle } from './common-button';
|
|
5
|
-
|
|
6
|
-
export const TextButton = ({ text, onClick, className, textColor }: CommonTypeStyle) => {
|
|
7
|
-
const theme = useTheme() as Theme;
|
|
8
|
-
|
|
9
|
-
return (
|
|
10
|
-
<CommonButton
|
|
11
|
-
text={text}
|
|
12
|
-
onClick={onClick}
|
|
13
|
-
textColor={textColor ?? theme.m3Schema.primary}
|
|
14
|
-
className={className}
|
|
15
|
-
/>
|
|
16
|
-
);
|
|
17
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
2
|
-
import { fn } from 'storybook/test';
|
|
3
|
-
|
|
4
|
-
import { Checkbox } from './checkbox';
|
|
5
|
-
|
|
6
|
-
const meta = {
|
|
7
|
-
title: 'm3/Checkbox',
|
|
8
|
-
component: Checkbox,
|
|
9
|
-
parameters: {
|
|
10
|
-
layout: 'centered',
|
|
11
|
-
},
|
|
12
|
-
tags: ['autodocs'],
|
|
13
|
-
args: { onChange: fn(), checked: false },
|
|
14
|
-
} satisfies Meta<typeof Checkbox>;
|
|
15
|
-
|
|
16
|
-
export default meta;
|
|
17
|
-
type Story = StoryObj<typeof meta>;
|
|
18
|
-
|
|
19
|
-
export const Default: Story = {
|
|
20
|
-
args: {
|
|
21
|
-
checked: false,
|
|
22
|
-
},
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export const Checked: Story = {
|
|
26
|
-
args: {
|
|
27
|
-
checked: true,
|
|
28
|
-
},
|
|
29
|
-
};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import styled from '@emotion/styled';
|
|
2
|
-
import { Theme } from '@emotion/react';
|
|
3
|
-
import { SvgIcon } from '../helpers';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export const CheckboxRootWrapper = styled.div`
|
|
7
|
-
display: inline-flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
justify-content: center;
|
|
10
|
-
position: relative;
|
|
11
|
-
box-sizing: border-box;
|
|
12
|
-
-webkit-tap-highlight-color: transparent;
|
|
13
|
-
background-color: transparent;
|
|
14
|
-
outline: 0;
|
|
15
|
-
border: 0;
|
|
16
|
-
margin: 0;
|
|
17
|
-
cursor: pointer;
|
|
18
|
-
user-select: none;
|
|
19
|
-
vertical-align: middle;
|
|
20
|
-
appearance: none;
|
|
21
|
-
text-decoration: none;
|
|
22
|
-
border-radius: 50%;
|
|
23
|
-
`;
|
|
24
|
-
|
|
25
|
-
export const CheckboxCheckedIcon = styled(SvgIcon)`
|
|
26
|
-
svg {
|
|
27
|
-
path {
|
|
28
|
-
fill: ${({ theme }: { theme?: Theme }) => theme?.m3Schema.onSurfaceVariant};
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
`;
|
|
32
|
-
|
|
33
|
-
export const CheckboxUncheckedIcon = styled(SvgIcon)`
|
|
34
|
-
svg {
|
|
35
|
-
path {
|
|
36
|
-
fill: ${({ theme }: { theme?: Theme }) => theme?.m3Schema.onSurfaceVariant};
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
`;
|
|
40
|
-
|
|
41
|
-
export const CheckboxInput = styled.input`
|
|
42
|
-
cursor: inherit;
|
|
43
|
-
position: absolute;
|
|
44
|
-
opacity: 0;
|
|
45
|
-
width: 100%;
|
|
46
|
-
height: 100%;
|
|
47
|
-
top: 0;
|
|
48
|
-
left: 0;
|
|
49
|
-
margin: 0;
|
|
50
|
-
padding: 0;
|
|
51
|
-
z-index: 1;
|
|
52
|
-
`;
|
|
53
|
-
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { useCallback } from 'react';
|
|
3
|
-
import CheckBoxIcon from '@material-design-icons/svg/filled/check_box.svg';
|
|
4
|
-
import CheckBoxOutlineBlankIcon from '@material-design-icons/svg/filled/check_box_outline_blank.svg';
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
CheckboxRootWrapper,
|
|
8
|
-
CheckboxInput,
|
|
9
|
-
CheckboxUncheckedIcon,
|
|
10
|
-
CheckboxCheckedIcon,
|
|
11
|
-
} from './checkbox.style';
|
|
12
|
-
|
|
13
|
-
export type CheckboxProps = {
|
|
14
|
-
checked: boolean;
|
|
15
|
-
onChange?: (checked: boolean) => void;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export const Checkbox = ({ checked, onChange }: CheckboxProps) => {
|
|
19
|
-
return (
|
|
20
|
-
<div>
|
|
21
|
-
<CheckboxRootWrapper>
|
|
22
|
-
<CheckboxInput
|
|
23
|
-
type="checkbox"
|
|
24
|
-
checked={checked}
|
|
25
|
-
onChange={useCallback((event: React.ChangeEvent<HTMLInputElement>) => {
|
|
26
|
-
if (onChange) {
|
|
27
|
-
onChange(event.target.checked);
|
|
28
|
-
}
|
|
29
|
-
}, [onChange])}
|
|
30
|
-
/>
|
|
31
|
-
{
|
|
32
|
-
checked ? (
|
|
33
|
-
<CheckboxCheckedIcon
|
|
34
|
-
width={24}
|
|
35
|
-
height={24}
|
|
36
|
-
icon={CheckBoxIcon}
|
|
37
|
-
/>
|
|
38
|
-
) : (
|
|
39
|
-
<CheckboxUncheckedIcon
|
|
40
|
-
width={24}
|
|
41
|
-
height={24}
|
|
42
|
-
icon={CheckBoxOutlineBlankIcon}
|
|
43
|
-
/>
|
|
44
|
-
)
|
|
45
|
-
}
|
|
46
|
-
</CheckboxRootWrapper>
|
|
47
|
-
</div>
|
|
48
|
-
);
|
|
49
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import styled from '@emotion/styled';
|
|
2
|
-
|
|
3
|
-
export const BackdropStyled = styled.div`
|
|
4
|
-
background-color: ${({ theme }) => theme.m3Schema.scrim}85;
|
|
5
|
-
position: fixed;
|
|
6
|
-
display: flex;
|
|
7
|
-
align-items: center;
|
|
8
|
-
justify-content: center;
|
|
9
|
-
top: 0;
|
|
10
|
-
left: 0;
|
|
11
|
-
right: 0;
|
|
12
|
-
bottoM: 0;
|
|
13
|
-
z-index: -1;
|
|
14
|
-
`;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Backdrop } from './backdrop';
|
|
2
|
-
import { NoStyleButton } from './no-style-button';
|
|
3
|
-
import { Popup } from './popup';
|
|
4
|
-
import { ColumnLeft, ColumnCenter, RowCenter, RowStart, Stack} from './stack';
|
|
5
|
-
import { useOutsideClick } from './outside-click';
|
|
6
|
-
import { SvgIcon } from './svg-icon';
|
|
7
|
-
|
|
8
|
-
export {
|
|
9
|
-
Backdrop,
|
|
10
|
-
NoStyleButton,
|
|
11
|
-
Popup,
|
|
12
|
-
ColumnLeft,
|
|
13
|
-
ColumnCenter,
|
|
14
|
-
RowCenter,
|
|
15
|
-
RowStart,
|
|
16
|
-
Stack,
|
|
17
|
-
useOutsideClick,
|
|
18
|
-
SvgIcon,
|
|
19
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import styled from '@emotion/styled';
|
|
2
|
-
|
|
3
|
-
export const NoStyleButton = styled.button`
|
|
4
|
-
background-color: transparent;
|
|
5
|
-
cursor: pointer;
|
|
6
|
-
border: none;
|
|
7
|
-
padding: 0;
|
|
8
|
-
margin: 0;
|
|
9
|
-
-webkit-tap-highlight-color: transparent;
|
|
10
|
-
appearance: none;
|
|
11
|
-
user-select: none;
|
|
12
|
-
`;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { MutableRefObject, useEffect } from 'react';
|
|
2
|
-
|
|
3
|
-
export const useOutsideClick = (ref: MutableRefObject<HTMLElement | undefined | null>, callback: (event: MouseEvent) => void) => {
|
|
4
|
-
const handleClickOutside = (event: DocumentEventMap['mousedown']) => {
|
|
5
|
-
const target = event.target as HTMLElement;
|
|
6
|
-
if (ref.current && !ref.current?.contains(target)) {
|
|
7
|
-
callback(event);
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
useEffect(() => {
|
|
12
|
-
document.addEventListener('mousedown', handleClickOutside);
|
|
13
|
-
return () => {
|
|
14
|
-
document.removeEventListener('mousedown', handleClickOutside);
|
|
15
|
-
};
|
|
16
|
-
});
|
|
17
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import styled from '@emotion/styled';
|
|
2
|
-
|
|
3
|
-
export type PopupStyleType = {
|
|
4
|
-
zIndex: number;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export const PopupStyle = styled.div`
|
|
8
|
-
position: fixed;
|
|
9
|
-
z-index: ${({ zIndex }: PopupStyleType) => zIndex};
|
|
10
|
-
top: 0;
|
|
11
|
-
left: 0;
|
|
12
|
-
right: 0;
|
|
13
|
-
bottoM: 0;
|
|
14
|
-
`;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
import { PopupStyle } from './popup.style';
|
|
4
|
-
|
|
5
|
-
type componentType = {
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
zIndex: number;
|
|
8
|
-
className?: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const Popup = ({ children, zIndex, className }: componentType) => {
|
|
12
|
-
return (
|
|
13
|
-
<PopupStyle zIndex={zIndex} className={className}>
|
|
14
|
-
{children}
|
|
15
|
-
</PopupStyle>
|
|
16
|
-
);
|
|
17
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { SerializedStyles } from '@emotion/react';
|
|
3
|
-
|
|
4
|
-
import { Stack } from './stack';
|
|
5
|
-
|
|
6
|
-
type componentType = {
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
css?: SerializedStyles;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const ColumnCenter = ({ children, css }: componentType) => {
|
|
12
|
-
return (
|
|
13
|
-
<Stack
|
|
14
|
-
direction="column"
|
|
15
|
-
alignItems="center"
|
|
16
|
-
justifyContent="center"
|
|
17
|
-
css={css}
|
|
18
|
-
>
|
|
19
|
-
{children}
|
|
20
|
-
</Stack>
|
|
21
|
-
);
|
|
22
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { SerializedStyles } from '@emotion/react';
|
|
3
|
-
|
|
4
|
-
import { Stack } from './stack';
|
|
5
|
-
|
|
6
|
-
type componentType = {
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
css?: SerializedStyles;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const ColumnLeft = ({ children, css }: componentType) => {
|
|
12
|
-
return (
|
|
13
|
-
<Stack
|
|
14
|
-
direction="column"
|
|
15
|
-
alignItems="start"
|
|
16
|
-
justifyContent="center"
|
|
17
|
-
css={css}
|
|
18
|
-
>
|
|
19
|
-
{children}
|
|
20
|
-
</Stack>
|
|
21
|
-
);
|
|
22
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
import { Stack } from './stack';
|
|
4
|
-
|
|
5
|
-
type componentType = {
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export const RowCenter = ({ children }: componentType) => {
|
|
10
|
-
return (
|
|
11
|
-
<Stack
|
|
12
|
-
direction="row"
|
|
13
|
-
alignItems="center"
|
|
14
|
-
justifyContent="center"
|
|
15
|
-
>
|
|
16
|
-
{children}
|
|
17
|
-
</Stack>
|
|
18
|
-
);
|
|
19
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
import { Stack } from './stack';
|
|
5
|
-
|
|
6
|
-
type componentType = {
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export const RowStart = ({ children }: componentType) => {
|
|
11
|
-
return (
|
|
12
|
-
<Stack
|
|
13
|
-
direction="row"
|
|
14
|
-
alignItems="start"
|
|
15
|
-
justifyContent="center"
|
|
16
|
-
>
|
|
17
|
-
{children}
|
|
18
|
-
</Stack>
|
|
19
|
-
);
|
|
20
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import styled from '@emotion/styled';
|
|
2
|
-
|
|
3
|
-
type componentType = {
|
|
4
|
-
direction: 'row' | 'column'
|
|
5
|
-
justifyContent: 'start' | 'center' | 'space-between' | 'space-around' | 'space-evenly' | 'end'
|
|
6
|
-
alignItems: 'stretch' | 'center' | 'start' | 'end'
|
|
7
|
-
gap?: number
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export const Stack = styled.div`
|
|
11
|
-
display: flex;
|
|
12
|
-
flex-direction: ${({ direction }: componentType) => direction};
|
|
13
|
-
justify-content: ${({ justifyContent }: componentType) => justifyContent};
|
|
14
|
-
align-items: ${({ alignItems }: componentType) => alignItems};
|
|
15
|
-
gap: ${({ gap }: componentType) => gap ? `${gap}px` : 'initial'};
|
|
16
|
-
`;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import styled from '@emotion/styled';
|
|
3
|
-
|
|
4
|
-
type componentTypeStyle = {
|
|
5
|
-
width?: number;
|
|
6
|
-
height?: number;
|
|
7
|
-
color?: string;
|
|
8
|
-
className?: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const SvgIconStyle = styled.div`
|
|
12
|
-
display: flex;
|
|
13
|
-
width: ${({ width }: componentTypeStyle) => width}px;
|
|
14
|
-
height: ${({ height }: componentTypeStyle) => height}px;
|
|
15
|
-
|
|
16
|
-
svg {
|
|
17
|
-
width: ${({ width }: componentTypeStyle) => width}px;
|
|
18
|
-
height: ${({ height }: componentTypeStyle) => height}px;
|
|
19
|
-
}
|
|
20
|
-
path {
|
|
21
|
-
fill: ${({ color }: componentTypeStyle) => color};
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
circle {
|
|
25
|
-
fill: ${({ color }: componentTypeStyle) => color};
|
|
26
|
-
};
|
|
27
|
-
`;
|
|
28
|
-
|
|
29
|
-
type componentType = {
|
|
30
|
-
icon: string;
|
|
31
|
-
} & componentTypeStyle;
|
|
32
|
-
|
|
33
|
-
export const SvgIcon = ({ icon, width, height, color, className }: componentType) => {
|
|
34
|
-
const Icon = icon;
|
|
35
|
-
|
|
36
|
-
return (
|
|
37
|
-
<SvgIconStyle
|
|
38
|
-
width={width}
|
|
39
|
-
height={height}
|
|
40
|
-
color={color}
|
|
41
|
-
className={className}
|
|
42
|
-
>
|
|
43
|
-
<Icon />
|
|
44
|
-
</SvgIconStyle>
|
|
45
|
-
);
|
|
46
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { useTheme } from '@emotion/react';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
import { TextStyle, TypographyProps } from './m3-typography';
|
|
5
|
-
|
|
6
|
-
export const Body = ({ size, color, children, className }: TypographyProps) => {
|
|
7
|
-
const theme = useTheme();
|
|
8
|
-
|
|
9
|
-
return (
|
|
10
|
-
<TextStyle
|
|
11
|
-
className={className}
|
|
12
|
-
body={theme.m3TextStyle.body}
|
|
13
|
-
size={size}
|
|
14
|
-
color={color}
|
|
15
|
-
>
|
|
16
|
-
{children}
|
|
17
|
-
</TextStyle>
|
|
18
|
-
);
|
|
19
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { useTheme } from '@emotion/react';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
import { TextStyle, TypographyProps } from './m3-typography';
|
|
5
|
-
|
|
6
|
-
export const Display = ({ size, color, children, className }: TypographyProps) => {
|
|
7
|
-
const theme = useTheme();
|
|
8
|
-
|
|
9
|
-
return (
|
|
10
|
-
<TextStyle
|
|
11
|
-
className={className}
|
|
12
|
-
body={theme.m3TextStyle.display}
|
|
13
|
-
size={size}
|
|
14
|
-
color={color}
|
|
15
|
-
>
|
|
16
|
-
{children}
|
|
17
|
-
</TextStyle>
|
|
18
|
-
);
|
|
19
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { useTheme } from '@emotion/react';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
import { TextStyle, TypographyProps } from './m3-typography';
|
|
5
|
-
|
|
6
|
-
export const Headline = ({ size, color, children, className }: TypographyProps) => {
|
|
7
|
-
const theme = useTheme();
|
|
8
|
-
|
|
9
|
-
return (
|
|
10
|
-
<TextStyle
|
|
11
|
-
className={className}
|
|
12
|
-
body={theme.m3TextStyle.headline}
|
|
13
|
-
size={size}
|
|
14
|
-
color={color}
|
|
15
|
-
>
|
|
16
|
-
{children}
|
|
17
|
-
</TextStyle>
|
|
18
|
-
);
|
|
19
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { useTheme } from '@emotion/react';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
import { TextStyle, TypographyProps } from './m3-typography';
|
|
5
|
-
|
|
6
|
-
export const Label = ({ size, color, children, className }: TypographyProps) => {
|
|
7
|
-
const theme = useTheme();
|
|
8
|
-
|
|
9
|
-
return (
|
|
10
|
-
<TextStyle
|
|
11
|
-
className={className}
|
|
12
|
-
body={theme.m3TextStyle.label}
|
|
13
|
-
size={size}
|
|
14
|
-
color={color}
|
|
15
|
-
>
|
|
16
|
-
{children}
|
|
17
|
-
</TextStyle>
|
|
18
|
-
);
|
|
19
|
-
};
|