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,45 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import styled from '@emotion/styled';
|
|
3
|
-
import { Theme } from '@emotion/react'
|
|
4
|
-
import { M3TextStylesBody } from '@choochoochoo/jp.theme';
|
|
5
|
-
|
|
6
|
-
import { TypographySize } from './typography-size';
|
|
7
|
-
|
|
8
|
-
export function getTextStyle (styleBody: M3TextStylesBody, size: TypographySize) {
|
|
9
|
-
switch (size) {
|
|
10
|
-
case 'lg': {
|
|
11
|
-
return styleBody.large;
|
|
12
|
-
}
|
|
13
|
-
case 'sm': {
|
|
14
|
-
return styleBody.small;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
return styleBody.medium;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export type TypographyProps = {
|
|
22
|
-
color: string;
|
|
23
|
-
size: TypographySize;
|
|
24
|
-
children: React.ReactNode;
|
|
25
|
-
className?: string;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
type TextStyleType = {
|
|
29
|
-
body: M3TextStylesBody;
|
|
30
|
-
size: TypographySize;
|
|
31
|
-
color: string;
|
|
32
|
-
theme?: Theme;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export const TextStyle = styled.div(({ body, size, color }: TextStyleType) => ({
|
|
36
|
-
fontFamily: `${getTextStyle(body, size).fontFamilyName}`,
|
|
37
|
-
fontStyle: 'normal',
|
|
38
|
-
fontWeight: `${getTextStyle(body, size).fontWeight}`,
|
|
39
|
-
fontSize: `${getTextStyle(body, size).fontSize}px`,
|
|
40
|
-
lineHeight: `${getTextStyle(body, size).lineHeight}px`,
|
|
41
|
-
letterSpacing: `${getTextStyle(body, size).letterSpacing}px`,
|
|
42
|
-
color: `${color}`,
|
|
43
|
-
margin: 0,
|
|
44
|
-
}))
|
|
45
|
-
|
|
@@ -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 Title = ({ size, color, children, className }: TypographyProps) => {
|
|
7
|
-
const theme = useTheme();
|
|
8
|
-
|
|
9
|
-
return (
|
|
10
|
-
<TextStyle
|
|
11
|
-
className={className}
|
|
12
|
-
body={theme.m3TextStyle.title}
|
|
13
|
-
size={size}
|
|
14
|
-
color={color}
|
|
15
|
-
>
|
|
16
|
-
{children}
|
|
17
|
-
</TextStyle>
|
|
18
|
-
);
|
|
19
|
-
};
|
package/tsconfig.json
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
// Default
|
|
4
|
-
"target": "es5",
|
|
5
|
-
"esModuleInterop": true,
|
|
6
|
-
"forceConsistentCasingInFileNames": true,
|
|
7
|
-
"strict": true,
|
|
8
|
-
"skipLibCheck": true,
|
|
9
|
-
|
|
10
|
-
// Added
|
|
11
|
-
"jsx": "react",
|
|
12
|
-
"module": "ESNext",
|
|
13
|
-
"sourceMap": true,
|
|
14
|
-
"outDir": "dist",
|
|
15
|
-
"moduleResolution": "node",
|
|
16
|
-
"allowSyntheticDefaultImports": true,
|
|
17
|
-
"typeRoots": [
|
|
18
|
-
"node_modules/@types",
|
|
19
|
-
"types"
|
|
20
|
-
],
|
|
21
|
-
"allowImportingTsExtensions": true,
|
|
22
|
-
"emitDeclarationOnly": true,
|
|
23
|
-
"declaration": true,
|
|
24
|
-
"declarationDir": "dist"
|
|
25
|
-
},
|
|
26
|
-
"exclude": [
|
|
27
|
-
"src/**/*.stories.ts",
|
|
28
|
-
"src/**/*.stories.tsx"
|
|
29
|
-
]
|
|
30
|
-
}
|
package/types/emotion.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import '@emotion/react';
|
|
2
|
-
import { M3Palettes, M3Schema, M3TextStyles, ThemesEnum } from '@choochoochoo/jp.theme';
|
|
3
|
-
|
|
4
|
-
declare module '@emotion/react' {
|
|
5
|
-
export interface Theme {
|
|
6
|
-
themeId: ThemesEnum;
|
|
7
|
-
m3Schema: M3Schema;
|
|
8
|
-
m3TextStyle: M3TextStyles;
|
|
9
|
-
m3Palettes: M3Palettes;
|
|
10
|
-
ext: object;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|