-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b8475d1
commit 4397a3d
Showing
28 changed files
with
266 additions
and
29 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from './xyo-website/index.ts' | ||
export * from './dataism/index.ts' | ||
export * from './dataism/index.ts' | ||
export * from './xylabs/index.ts' |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import type { BoxProps } from '@mui/material' | ||
import { | ||
Box, | ||
Typography, useTheme, | ||
} from '@mui/material' | ||
import React from 'react' | ||
|
||
export interface ColorCardProps extends BoxProps { | ||
color: string | ||
colorName: string | ||
subtype?: string | ||
} | ||
|
||
export const ColorCard: React.FC<ColorCardProps> = ({ | ||
color, colorName, subtype, ...props | ||
}) => { | ||
return ( | ||
<Box | ||
display="flex" | ||
flexDirection="column" | ||
justifyContent="space-between" | ||
flex="1 1 0px" | ||
padding={2} | ||
{...props} | ||
> | ||
<Box flexDirection="column"> | ||
<Typography variant="caption">{subtype}</Typography> | ||
<Typography variant="h6"> | ||
{colorName} | ||
</Typography> | ||
</Box> | ||
<Typography alignSelf="flex-end" variant="caption"> | ||
{color} | ||
</Typography> | ||
</Box> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { Box } from '@mui/material' | ||
import type { Meta, StoryFn } from '@storybook/react' | ||
import React from 'react' | ||
|
||
import { ColorShowcase } from './ColorShowcase.tsx' | ||
|
||
const StorybookEntry = { | ||
argTypes: {}, | ||
component: ColorShowcase, | ||
parameters: { docs: { page: null }, layout: 'fullscreen' }, | ||
title: 'Theme/ColorShowcase', | ||
} as Meta<typeof ColorShowcase> | ||
|
||
const Template: StoryFn<typeof ColorShowcase> = () => ( | ||
<Box display="flex" height="100vh" width="100vw"> | ||
<ColorShowcase></ColorShowcase> | ||
</Box> | ||
) | ||
|
||
const Default = Template.bind({}) | ||
Default.args = { | ||
error: new Error('Test Error'), | ||
title: 'Test Error', | ||
} | ||
|
||
export { Default } | ||
|
||
export default StorybookEntry |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { | ||
Box, | ||
useTheme, | ||
} from '@mui/material' | ||
import React from 'react' | ||
|
||
import { ColorCard } from './ColorCard.tsx' | ||
import { PaletteColorCard } from './PaletteColorCard.tsx' | ||
|
||
export const ColorShowcase: React.FC = () => { | ||
const theme = useTheme() | ||
|
||
return ( | ||
<Box display="flex" flexDirection="column" flex="1 1 0px"> | ||
<Box display="flex" flex="1 1 0px" flexDirection="row" justifyContent="stretch"> | ||
<ColorCard | ||
bgcolor={theme.palette.background.default} | ||
color={theme.palette.background.default as string} | ||
colorName="Background" | ||
subtype="default" | ||
/> | ||
<ColorCard | ||
bgcolor={theme.palette.background.paper} | ||
color={theme.palette.background.paper as string} | ||
colorName="Background" | ||
subtype="paper" | ||
/> | ||
<ColorCard | ||
bgcolor={theme.palette.background.gradient} | ||
color={theme.palette.background.gradient as string} | ||
colorName="Gradient" | ||
/> | ||
</Box> | ||
<Box display="flex" flex="1 1 0px" flexDirection="row" justifyContent="stretch"> | ||
<PaletteColorCard color={theme.palette.primary} colorName="Primary" subtype="main" /> | ||
<PaletteColorCard color={theme.palette.secondary} colorName="Secondary" subtype="main" /> | ||
<Box display="flex" flex="1 1 0px" flexDirection="column"> | ||
<Box display="flex" flex="1 1 0px" flexDirection="row"> | ||
<PaletteColorCard color={theme.palette.info} colorName="Info" subtype="main" /> | ||
<PaletteColorCard color={theme.palette.success} colorName="Success" subtype="main" /> | ||
</Box> | ||
<Box display="flex" flex="1 1 0px" flexDirection="row"> | ||
<PaletteColorCard color={theme.palette.warning} colorName="Warning" subtype="main" /> | ||
<PaletteColorCard color={theme.palette.error} colorName="Error" subtype="main" /> | ||
</Box> | ||
</Box> | ||
</Box> | ||
</Box> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { Box, useTheme } from '@mui/material' | ||
import type { Meta, StoryFn } from '@storybook/react' | ||
import React from 'react' | ||
|
||
import type { PaletteColorCardProps } from './PaletteColorCard.tsx' | ||
import { PaletteColorCard } from './PaletteColorCard.tsx' | ||
|
||
const StorybookEntry = { | ||
argTypes: {}, | ||
component: PaletteColorCard, | ||
parameters: { docs: { page: null }, layout: 'fullscreen' }, | ||
title: 'Theme/PaletteColorCard', | ||
} as Meta<typeof PaletteColorCard> | ||
|
||
const Template: StoryFn<typeof PaletteColorCard> = (args: PaletteColorCardProps) => { | ||
const theme = useTheme() | ||
return ( | ||
<Box display="flex" height="100vh" width="100vw"> | ||
<PaletteColorCard {...args} color={theme.palette.primary} /> | ||
</Box> | ||
) | ||
} | ||
|
||
const Default = Template.bind({}) | ||
Default.args = { colorName: 'Primary', subtype: 'main' } | ||
|
||
export { Default } | ||
|
||
export default StorybookEntry |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import type { | ||
Palette, PaletteColorOptions, PaletteOptions, SimplePaletteColorOptions, | ||
Check warning on line 2 in packages/theme/src/PaletteColorCard.tsx GitHub Actions / build (ubuntu-latest, 22.3.0)
Check warning on line 2 in packages/theme/src/PaletteColorCard.tsx GitHub Actions / build (ubuntu-latest, 22.3.0)
|
||
TypeBackground, | ||
} from '@mui/material' | ||
import { | ||
Box, | ||
Typography, useTheme, | ||
} from '@mui/material' | ||
import React from 'react' | ||
|
||
export interface PaletteColorCardProps { | ||
color: SimplePaletteColorOptions | ||
colorName: string | ||
subtype: keyof SimplePaletteColorOptions | ||
} | ||
|
||
export const PaletteColorCard: React.FC<PaletteColorCardProps> = ({ | ||
color, colorName, subtype, | ||
}) => { | ||
const theme = useTheme() | ||
return ( | ||
<Box | ||
display="flex" | ||
flexDirection="column" | ||
justifyContent="space-between" | ||
flex="1 1 0px" | ||
bgcolor={color[subtype]} | ||
padding={2} | ||
> | ||
<Box flexDirection="column"> | ||
<Typography variant="caption" color={color.contrastText}>{subtype}</Typography> | ||
<Typography variant="h6" color={color.contrastText}>{colorName}</Typography> | ||
</Box> | ||
<Typography alignSelf="flex-end" variant="caption" color={color.contrastText}>{color[subtype]?.toString()}</Typography> | ||
</Box> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './customThemeColors.ts' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { Box } from '@mui/material' | ||
import type { Meta, StoryFn } from '@storybook/react' | ||
import React from 'react' | ||
|
||
import { ThemeShowcase } from './ThemeShowcase.tsx' | ||
|
||
const StorybookEntry = { | ||
argTypes: {}, | ||
component: ThemeShowcase, | ||
parameters: { docs: { page: null } }, | ||
title: 'Theme/ThemeShowcase', | ||
} as Meta<typeof ThemeShowcase> | ||
|
||
const Template: StoryFn<typeof ThemeShowcase> = () => ( | ||
<Box height="100vh" width="100vw"> | ||
<ThemeShowcase></ThemeShowcase> | ||
</Box> | ||
) | ||
|
||
const Default = Template.bind({}) | ||
Default.args = { | ||
error: new Error('Test Error'), | ||
title: 'Test Error', | ||
} | ||
|
||
export { Default } | ||
|
||
export default StorybookEntry |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { | ||
Box, | ||
Typography, | ||
} from '@mui/material' | ||
import React from 'react' | ||
|
||
export const ThemeShowcase: React.FC = () => { | ||
return ( | ||
<Box> | ||
<Typography variant="h4" gutterBottom> | ||
XYO Website Theme Showcase | ||
</Typography> | ||
</Box> | ||
) | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './theme.tsx' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export * from './darkThemeOptions.ts' | ||
export * from './lightThemeOptions.ts' | ||
export * from './theme.ts' | ||
export * from './dataism/index.ts' | ||
export * from './xylabs/index.ts' | ||
export * from './xyo-website/index.ts' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './theme.tsx' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/theme/src/theme.ts → packages/theme/src/xylabs/theme.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './theme.ts' |
10 changes: 7 additions & 3 deletions
10
...k/Theme/xyo-website/lightThemeOptions.tsx → ...eme/src/xyo-website/lightThemeOptions.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.