diff --git a/.storybook/Theme/dataism/customThemeColors.tsx b/.storybook/Theme/dataism/customThemeColors.tsx deleted file mode 100644 index 0ada1a946d..0000000000 --- a/.storybook/Theme/dataism/customThemeColors.tsx +++ /dev/null @@ -1,132 +0,0 @@ -import type { PaletteColor, PaletteColorOptions } from '@mui/material' -import { darken, lighten } from '@mui/material' - -declare module '@mui/material/styles' { - interface Palette { - personas: { - aegis: PaletteColor - cass: PaletteColor - echo: PaletteColor - lux: PaletteColor - myca: PaletteColor - nova: PaletteColor - rook: PaletteColor - vex: PaletteColor - } - } - - interface PaletteOptions { - personas?: { - aegis?: PaletteColorOptions - cass?: PaletteColorOptions - echo?: PaletteColorOptions - lux?: PaletteColorOptions - myca?: PaletteColorOptions - nova?: PaletteColorOptions - rook?: PaletteColorOptions - vex?: PaletteColorOptions - } - } -} - -export const personaColorsLightMode = { - nova: { - main: '#F6BF28', - dark: '#D09E16', - light: lighten('#FADD8C', 0.4), - contrastText: darken('#FADD8C', 0.8), - }, - vex: { - main: '#BFF07F', - dark: '#8FCC3E', - light: lighten('#BFF07F', 0.4), - contrastText: darken('#BFF07F', 0.8), - }, - rook: { - main: '#B0AED5', - dark: '#615dac', - light: lighten('#B0AED5', 0.4), - contrastText: darken('#B0AED5', 0.8), - }, - lux: { - main: '#FFDBF6', - dark: '#FF5CD6', - light: lighten('#FFDBF6', 0.4), - contrastText: darken('#FFDBF6', 0.8), - }, - aegis: { - main: '#B3C9F9', - dark: '#7AA1F5', - light: lighten('#B3C9F9', 0.4), - contrastText: darken('#B3C9F9', 0.8), - }, - echo: { - main: '#B0E4DA', - dark: '#49C1A9', - light: lighten('#B0E4DA', 0.4), - contrastText: darken('#B0E4DA', 0.8), - }, - myca: { - main: '#BF936D', - dark: '#AA774B', - light: lighten('#BF936D', 0.4), - contrastText: darken('#BF936D', 0.8), - }, - cass: { - main: '#b2cae4', - dark: '#4078B5', - light: lighten('#b2cae4', 0.4), - contrastText: darken('#b2cae4', 0.8), - }, -} - -export const personaColorsDarkMode = { - nova: { - main: '#FADD8C', - contrastText: darken('#FADD8C', 0.9), - light: lighten('#FADD8C', 0.4), - dark: darken('#FADD8C', 0.5), - }, - vex: { - main: '#BFF07F', - contrastText: darken('#BFF07F', 0.9), - light: lighten('#BFF07F', 0.4), - dark: darken('#BFF07F', 0.5), - }, - rook: { - main: '#8B88C2', - contrastText: darken('#8B88C2', 0.9), - light: lighten('#8B88C2', 0.4), - dark: darken('#8B88C2', 0.5), - }, - lux: { - main: '#EB97D6', - contrastText: darken('#EB97D6', 0.9), - light: lighten('#EB97D6', 0.4), - dark: darken('#EB97D6', 0.5), - }, - aegis: { - main: '#7aa1f5', - contrastText: darken('#7aa1f5', 0.9), - light: lighten('#7aa1f5', 0.4), - dark: darken('#7aa1f5', 0.5), - }, - echo: { - main: '#B0E4DA', - contrastText: darken('#B0E4DA', 0.9), - light: lighten('#B0E4DA', 0.4), - dark: darken('#B0E4DA', 0.5), - }, - myca: { - main: '#BF936D', - contrastText: darken('#BF936D', 0.9), - light: lighten('#BF936D', 0.4), - dark: darken('#BF936D', 0.5), - }, - cass: { - main: '#b2cae4', - contrastText: darken('#b2cae4', 0.9), - light: lighten('#b2cae4', 0.4), - dark: darken('#b2cae4', 0.5), - }, -} diff --git a/.storybook/Theme/dataism/darkThemePalette.tsx b/.storybook/Theme/dataism/darkThemePalette.tsx deleted file mode 100644 index 8ef3eedae1..0000000000 --- a/.storybook/Theme/dataism/darkThemePalette.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import type { ColorSystemOptions } from '@mui/material' - -import { personaColorsDarkMode } from './customThemeColors.tsx' - -export const darkThemePalette: ColorSystemOptions['palette'] = { - background: { paper: '#1E1E1E' }, - info: { main: '#72b4f4' }, - mode: 'dark', - primary: { main: '#fff' }, - secondary: { - main: '#66caf7', - contrastText: '#020223', - }, - success: { - main: '#7efc81', - contrastText: '#011e01', - }, - warning: { main: '#f7d866' }, - error: { main: '#f6594e' }, - text: { - disabled: '#a5acdb', - primary: '#E3E4EB', - secondary: '#e3e4eba3', - }, - personas: personaColorsDarkMode, -} diff --git a/.storybook/Theme/dataism/index.ts b/.storybook/Theme/dataism/index.ts deleted file mode 100644 index fc6c2f69f6..0000000000 --- a/.storybook/Theme/dataism/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './theme' diff --git a/.storybook/Theme/dataism/lightThemePalette.tsx b/.storybook/Theme/dataism/lightThemePalette.tsx deleted file mode 100644 index fed34d9eb6..0000000000 --- a/.storybook/Theme/dataism/lightThemePalette.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import type { ColorSystemOptions } from '@mui/material' - -import { personaColorsLightMode } from './customThemeColors.tsx' - -export const lightThemePalette: ColorSystemOptions['palette'] = { - background: { paper: '#FAFAFA' }, - info: { main: '#72b4f4' }, - mode: 'light', - primary: { main: '#000' }, - secondary: { main: '#186ecc' }, - success: { main: '#48BA4B', contrastText: '#fff' }, - text: { - disabled: '#D3D0CB', - primary: '#1E2019', - secondary: '#393E41', - }, - personas: personaColorsLightMode, -} diff --git a/.storybook/Theme/dataism/theme.tsx b/.storybook/Theme/dataism/theme.tsx deleted file mode 100644 index ae474f0ae7..0000000000 --- a/.storybook/Theme/dataism/theme.tsx +++ /dev/null @@ -1,167 +0,0 @@ -import type { Theme } from '@mui/material' -import { - alpha, createTheme, lighten, -} from '@mui/material' - -import { darkThemePalette } from './darkThemePalette.tsx' -import { lightThemePalette } from './lightThemePalette.tsx' - -export const DataismTheme: Theme = createTheme({ - colorSchemes: { - dark: { palette: darkThemePalette }, - light: { palette: lightThemePalette }, - }, - breakpoints: { - values: { - lg: 1350, - md: 900, - sm: 600, - xl: 1536, - xs: 0, - }, - }, - components: { - MuiAlert: { - styleOverrides: { - root: ({ theme }) => ({ - backgroundColor: alpha(theme.palette.background.paper, 0.3), - color: 'inherit', - }), - standardError: ({ theme }) => ({ backgroundColor: alpha(theme.palette.error.main, 0.3), color: theme.palette.error.light }), - standardInfo: ({ theme }) => ({ backgroundColor: alpha(theme.palette.info.main, 0.3), color: theme.palette.info.light }), - standardSuccess: ({ theme }) => ({ backgroundColor: alpha(theme.palette.success.main, 0.3), color: theme.palette.success.light }), - standardWarning: ({ theme }) => ({ backgroundColor: alpha(theme.palette.warning.main, 0.3), color: theme.palette.warning.light }), - }, - }, - MuiButton: { - styleOverrides: { - root: ({ theme }) => ({ - boxShadow: 'none', - padding: `${theme.spacing(0.75)} ${theme.spacing(1.5)}`, - borderWidth: '2px', - borderColor: 'inherit', - }), - }, - variants: [ - { - props: { variant: 'outlined' }, - style: { - 'WebkitBackdropFilter': 'blur(2px)', - 'backdropFilter': 'blur(2px)', - 'border': '2px solid', - '&:hover': { border: '2px solid' }, - }, - }, - { - props: { variant: 'text' }, - style: { - '&:hover': { - textDecoration: 'underline 1.5px #66caf7', - textUnderlineOffset: '5px', - backgroundColor: 'transparent', - }, - }, - }, - { - props: { size: 'small' }, - style: ({ theme }) => ({ padding: `${theme.spacing(0.5)} ${theme.spacing(1)}`, fontSize: '1rem' }), - }, - ], - }, - MuiCard: { - defaultProps: { elevation: 0 }, - styleOverrides: { - root: { - display: 'flex', - flexDirection: 'column', - justifyContent: 'space-between', - }, - }, - }, - MuiCardContent: { styleOverrides: { root: ({ theme }) => ({ '&:last-child': { paddingBottom: theme.spacing(1) } }) } }, - MuiChip: { - styleOverrides: { - root: { - borderRadius: 4, - fontWeight: 400, - }, - colorError: { backgroundColor: alpha('#f6594e', 0.2), color: lighten('#f6594e', 0.2) }, - colorInfo: { backgroundColor: alpha('#72b4f4', 0.2), color: lighten('#72b4f4', 0.2) }, - colorPrimary: { backgroundColor: alpha('#5658F3', 0.2), color: lighten('#5658F3', 0.2) }, - colorSecondary: { backgroundColor: alpha('#66caf7', 0.2), color: lighten('#66caf7', 0.2) }, - colorSuccess: { backgroundColor: alpha('#7efc81', 0.2), color: lighten('#7efc81', 0.2) }, - colorWarning: { backgroundColor: alpha('#f7d866', 0.2), color: lighten('#f7d866', 0.2) }, - }, - }, - MuiContainer: { styleOverrides: { root: { maxWidth: 'xl' } }, defaultProps: { maxWidth: 'xl' } }, - MuiDialog: { - styleOverrides: { - root: { - '& .MuiDialog-paper': { - backgroundImage: 'none', - paddingLeft: 2, - paddingRight: 2, - }, - }, - }, - }, - MuiInputBase: { - styleOverrides: { - input: { - '&:-webkit-autofill': { - transitionDelay: '9999s', - transitionProperty: 'background-color, color', - }, - }, - }, - }, - MuiFilledInput: { - styleOverrides: { - input: { - '&:-webkit-autofill': { - WebkitBoxShadow: 'inherit', - WebkitTextFillColor: 'inherit', - caretColor: 'inherit', - }, - }, - }, - }, - MuiOutlinedInput: { - styleOverrides: { - input: { - '&:-webkit-autofill': { - WebkitBoxShadow: 'inherit', - WebkitTextFillColor: 'inherit', - caretColor: 'inherit', - }, - }, - }, - }, - MuiLink: { styleOverrides: { root: { textDecoration: 'none' } } }, - }, - shape: { borderRadius: 8 }, - spacing: 12, - typography: { - body1: { fontSize: '1.1rem' }, - button: { - fontSize: '1rem', - textTransform: 'inherit', - }, - fontFamily: '"Fustat", sans-serif', - fontWeightBold: 700, - fontWeightLight: 300, - fontWeightMedium: 500, - fontWeightRegular: 400, - h1: { fontSize: '3.2rem' }, - h2: { fontSize: '2.7rem' }, - h3: { fontSize: '2.24rem' }, - h4: { fontSize: '2rem' }, - h5: { fontSize: '1.5rem' }, - h6: { fontSize: '1.25rem' }, - subtitle1: { - opacity: '50%', - textTransform: 'uppercase', - }, - subtitle2: { opacity: '50%' }, - }, -}) diff --git a/.storybook/Theme/index.ts b/.storybook/Theme/index.ts deleted file mode 100644 index f03bb5c303..0000000000 --- a/.storybook/Theme/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './dataism/index.ts' -export * from './xylabs/index.ts' -export * from './xyo-website/index.ts' diff --git a/.storybook/Theme/xylabs/darkThemeOptions.tsx b/.storybook/Theme/xylabs/darkThemeOptions.tsx deleted file mode 100644 index ca87ef3eae..0000000000 --- a/.storybook/Theme/xylabs/darkThemeOptions.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import type { ThemeOptions } from '@mui/material' - -export const darkThemeOptions: ThemeOptions = { - palette: { - background: { - default: '#0b0f30', - paper: '#101742', - }, - mode: 'dark', - text: { - disabled: '#a5acdb', - primary: '#f7f8fc', - secondary: '#daddf2', - }, - }, -} diff --git a/.storybook/Theme/xylabs/index.ts b/.storybook/Theme/xylabs/index.ts deleted file mode 100644 index fc6c2f69f6..0000000000 --- a/.storybook/Theme/xylabs/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './theme' diff --git a/.storybook/Theme/xylabs/lightThemeOptions.tsx b/.storybook/Theme/xylabs/lightThemeOptions.tsx deleted file mode 100644 index 4ce9ae25b1..0000000000 --- a/.storybook/Theme/xylabs/lightThemeOptions.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import type { ThemeOptions } from '@mui/material' - -export const lightThemeOptions: ThemeOptions = { - palette: { - info: { main: '#2733B1' }, - mode: 'light', - primary: { - dark: '#010965', - light: '#EBECFF', - main: '#384AFD', - }, - secondary: { - dark: '#AD8E13', - light: '#F9D549', - main: '#FFC91D', - }, - success: { - contrastText: '#142B12', - main: '#76C46D', - }, - text: { primary: '#1F2025' }, - }, -} diff --git a/.storybook/Theme/xylabs/theme.tsx b/.storybook/Theme/xylabs/theme.tsx deleted file mode 100644 index 9f0c4a53b4..0000000000 --- a/.storybook/Theme/xylabs/theme.tsx +++ /dev/null @@ -1,64 +0,0 @@ -import { createTheme, type Theme } from '@mui/material' - -import { darkThemeOptions } from './darkThemeOptions' -import { lightThemeOptions } from './lightThemeOptions' - -export const XyLabsTheme: Theme = createTheme({ - colorSchemes: { - light: lightThemeOptions, - dark: darkThemeOptions, - }, - components: { - MuiAlert: { - styleOverrides: { - root: { - paddingBottom: 0.5, - paddingTop: 0.5, - }, - }, - }, - MuiButton: { - styleOverrides: { - outlined: { backgroundColor: 'inherit' }, - root: { overflow: 'hidden' }, - }, - }, - MuiLink: { - defaultProps: { underline: 'none' }, - styleOverrides: { root: { '&:hover': { filter: 'brightness(75%)' } } }, - }, - MuiStepper: { styleOverrides: { root: { padding: '0px' } } }, - }, - shape: { borderRadius: 4 }, - spacing: 12, - typography: { - body1: { - fontSize: '1.1rem', - fontWeight: 300, - }, - button: { - fontSize: '1rem', - fontWeight: 500, - textTransform: 'capitalize', - }, - - fontWeightBold: 700, - fontWeightLight: 300, - fontWeightMedium: 400, - fontWeightRegular: 400, - h1: { fontSize: '4rem' }, - h2: { fontSize: '2.7rem' }, - h3: { fontSize: '2.24rem' }, - h4: { fontSize: '2rem' }, - h5: { fontSize: '1.5rem' }, - h6: { - fontSize: '1.25rem', - fontWeight: 300, - }, - subtitle1: { - opacity: '50%', - textTransform: 'uppercase', - }, - subtitle2: { opacity: '50%' }, - }, -}) diff --git a/.storybook/Theme/xyo-website/Theme.ts b/.storybook/Theme/xyo-website/Theme.ts deleted file mode 100644 index 94e1f61cae..0000000000 --- a/.storybook/Theme/xyo-website/Theme.ts +++ /dev/null @@ -1,154 +0,0 @@ -import type { Theme } from '@mui/material' -import { - alpha, createTheme, darken, -} from '@mui/material' - -import { darkThemeOptions } from './darkThemeOptions' -import { lightThemeOptions } from './lightThemeOptions' - -export const XYOWebsiteTheme = (theme: Theme, rtl = false): Theme => createTheme({ - colorSchemes: { - dark: darkThemeOptions, - light: lightThemeOptions, - }, - direction: rtl ? 'rtl' : 'ltr', - breakpoints: { - values: { - lg: 1350, - md: 900, - sm: 600, - xl: 1536, - xs: 0, - }, - }, - components: { - MuiAlert: { - styleOverrides: { - root: { - backgroundColor: alpha(theme.palette.background.paper, 0.3), - color: 'inherit', - }, - standardError: { backgroundColor: alpha(theme.palette.error.main, 0.3), color: theme.palette.error.light }, - standardInfo: { backgroundColor: alpha(theme.palette.info.main, 0.3), color: theme.palette.info.light }, - standardSuccess: { backgroundColor: alpha(theme.palette.success.main, 0.3), color: theme.palette.success.light }, - standardWarning: { backgroundColor: alpha(theme.palette.warning.main, 0.3), color: theme.palette.warning.light }, - }, - }, - MuiButton: { - styleOverrides: { - root: { - boxShadow: 'none', - padding: `${theme.spacing(1)} ${theme.spacing(2)}`, - borderWidth: '2px', - borderColor: 'inherit', - }, - }, - variants: [ - { - props: { variant: 'outlined' }, - style: { - 'WebkitBackdropFilter': 'blur(2px)', - 'backdropFilter': 'blur(2px)', - 'border': `2px solid ${alpha('#fff', 0.4)}`, - 'color': '#fff', - '&:hover': { - backgroundColor: '#ffffff', - border: `2px solid ${alpha('#fff', 0)}`, - color: darken(theme.palette.primary.dark, 0.7), - }, - }, - }, - { - props: { size: 'small' }, - style: { padding: `${theme.spacing(0.5)} ${theme.spacing(1)}` }, - }, - ], - }, - MuiCard: { - defaultProps: { elevation: 0 }, - styleOverrides: { - root: { - display: 'flex', - flexDirection: 'column', - justifyContent: 'space-between', - }, - }, - }, - MuiContainer: { styleOverrides: { root: { maxWidth: 'xl' } } }, - MuiInputBase: { - styleOverrides: { - input: { - '&:-webkit-autofill': { - transitionDelay: '9999s', - transitionProperty: 'background-color, color', - }, - }, - }, - }, - MuiFilledInput: { - styleOverrides: { - input: { - '&:-webkit-autofill': { - WebkitBoxShadow: 'inherit', - WebkitTextFillColor: 'inherit', - caretColor: 'inherit', - }, - }, - }, - }, - MuiOutlinedInput: { - styleOverrides: { - input: { - '&:-webkit-autofill': { - WebkitBoxShadow: 'inherit', - WebkitTextFillColor: 'inherit', - caretColor: 'inherit', - }, - }, - }, - }, - }, - shape: { borderRadius: 8 }, - spacing: 12, - typography: { - fontFamily: '"Lexend Deca", sans-serif', - body1: { fontSize: '1.1rem' }, - button: { - fontSize: '1rem', - fontWeight: 500, - }, - fontWeightBold: 600, - fontWeightLight: 200, - fontWeightMedium: 500, - fontWeightRegular: 300, - h1: { - fontSize: '3.2rem', - fontWeight: 400, - }, - h2: { - fontSize: '2.7rem', - fontWeight: 400, - }, - h3: { - fontSize: '2.24rem', - fontWeight: 400, - }, - h4: { - fontSize: '2rem', - fontWeight: 400, - }, - h5: { - fontSize: '1.5rem', - fontWeight: 400, - }, - h6: { - fontSize: '1.25rem', - fontWeight: 300, - }, - subtitle1: { - opacity: '50%', - textTransform: 'uppercase', - }, - subtitle2: { opacity: '50%' }, - }, -}) diff --git a/.storybook/Theme/xyo-website/customThemeColors.ts b/.storybook/Theme/xyo-website/customThemeColors.ts deleted file mode 100644 index 562f145c2b..0000000000 --- a/.storybook/Theme/xyo-website/customThemeColors.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { alpha } from '@mui/material/styles' - -declare module '@mui/material/styles' { - interface Palette { - neutral: Palette['primary'] - } - - interface PaletteOptions { - neutral?: PaletteOptions['primary'] - } -} - -declare module '@mui/material/Button' { - interface ButtonPropsColorOverrides { - neutral: true - } -} - -declare module '@mui/material/Alert' { - interface AlertPropsColorOverrides { - neutral: true - } -} - -export const neutralButtonStylesContained = { - 'color': '#000', - 'backgroundColor': '#fff', - '&:hover': { backgroundColor: alpha('#fff', 0.8) }, -} - -export const neutralButtonStylesOutlined = { - 'color': '#fff', - '&:hover': { backgroundColor: alpha('#fff', 0.9) }, -} - -export const neutralAlertStyles = { - 'color': '#fff', - 'backgroundColor': alpha('#000', 0.02), - 'WebkitBackdropFilter': 'blur(20px)', - 'backdropFilter': 'saturate(180%) blur(20px)', - '&:hover': { backgroundColor: alpha('#fff', 0.05) }, -} diff --git a/.storybook/Theme/xyo-website/darkThemeOptions.tsx b/.storybook/Theme/xyo-website/darkThemeOptions.tsx deleted file mode 100644 index 43e1ce4bb8..0000000000 --- a/.storybook/Theme/xyo-website/darkThemeOptions.tsx +++ /dev/null @@ -1,89 +0,0 @@ -import { - alpha, lighten, type ThemeOptions, -} from '@mui/material' - -import { neutralButtonStylesContained, neutralButtonStylesOutlined } from './customThemeColors.ts' -export const darkThemeOptions: ThemeOptions = { - palette: { - background: { - default: '#020223', - paper: '#16163D', - }, - neutral: { - main: '#fff', - contrastText: '#000', - }, - info: { main: '#72b4f4' }, - mode: 'dark', - primary: { main: '#5658F3' }, - secondary: { - main: '#66caf7', - contrastText: '#020223', - }, - success: { - main: '#7efc81', - contrastText: '#011e01', - }, - warning: { main: '#f7d866' }, - error: { main: '#f6594e' }, - text: { - disabled: '#a5acdb', - primary: '#E3E4EB', - secondary: '#e3e4eba3', - }, - }, - typography: { - body1: { color: '#ffffffa3' }, - body2: { color: '#B3B3BD' }, - caption: { color: '#B3B3BD' }, - }, - components: { - MuiButton: { - defaultProps: { color: 'neutral' }, - variants: [ - { - props: { variant: 'contained', color: 'neutral' }, - style: neutralButtonStylesContained, - }, - { - props: { variant: 'outlined', color: 'neutral' }, - style: neutralButtonStylesOutlined, - }, - { - props: { variant: 'text' }, - style: { - '&:hover': { - textDecoration: 'underline 1.5px #66caf7', - textUnderlineOffset: '5px', - backgroundColor: 'transparent', - }, - }, - }, - ], - }, - MuiChip: { - styleOverrides: { - colorError: { backgroundColor: alpha('#f6594e', 0.2), color: lighten('#f6594e', 0.2) }, - colorInfo: { backgroundColor: alpha('#72b4f4', 0.2), color: lighten('#72b4f4', 0.2) }, - colorPrimary: { backgroundColor: alpha('#5658F3', 0.2), color: lighten('#5658F3', 0.2) }, - colorSecondary: { backgroundColor: alpha('#66caf7', 0.2), color: lighten('#66caf7', 0.2) }, - colorSuccess: { backgroundColor: alpha('#7efc81', 0.2), color: lighten('#7efc81', 0.2) }, - colorWarning: { backgroundColor: alpha('#f7d866', 0.2), color: lighten('#f7d866', 0.2) }, - }, - }, - MuiDialog: { - styleOverrides: { - root: { - '& .MuiDialog-paper': { - backgroundColor: '#16163D', - backgroundImage: 'none', - paddingLeft: 2, - paddingRight: 2, - border: `1px solid ${lighten('#16163D', 0.05)}`, - }, - }, - }, - }, - MuiTable: { styleOverrides: { root: { background: '#20205A' } } }, - }, -} diff --git a/.storybook/Theme/xyo-website/index.ts b/.storybook/Theme/xyo-website/index.ts deleted file mode 100644 index 9590e59100..0000000000 --- a/.storybook/Theme/xyo-website/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './Theme' diff --git a/.storybook/Theme/xyo-website/lightThemeOptions.tsx b/.storybook/Theme/xyo-website/lightThemeOptions.tsx deleted file mode 100644 index a0b45327f5..0000000000 --- a/.storybook/Theme/xyo-website/lightThemeOptions.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import type { ThemeOptions } from '@mui/material' -import { alpha } from '@mui/material' - -export const lightThemeOptions: ThemeOptions = { - palette: { - background: { paper: '#FAFAFA' }, - neutral: { - contrastText: '#fff', - main: '#000', - }, - info: { main: '#72b4f4' }, - primary: { main: '#463dc6' }, - secondary: { main: '#186ecc' }, - success: { main: '#48BA4B' }, - text: { - primary: '#060312', - secondary: alpha('#060312', 0.85), - }, - }, -} diff --git a/.storybook/main.ts b/.storybook/main.ts index 6e2858d50b..7dbac1021e 100644 --- a/.storybook/main.ts +++ b/.storybook/main.ts @@ -1,4 +1,7 @@ import type { StorybookConfig } from '@storybook/react-vite' +import { mergeConfig } from 'vite' + +import rootViteConfig from './vite.config.ts' const config: StorybookConfig = { stories: ['../**/src/**/*.mdx', '../**/src/**/*.stories.@(ts|tsx|js|jsx)'], @@ -8,6 +11,9 @@ const config: StorybookConfig = { 'storybook-dark-mode', ], framework: '@storybook/react-vite', + viteFinal(config) { + return mergeConfig(config, rootViteConfig) + }, } export default config diff --git a/.storybook/package.json b/.storybook/package.json new file mode 100644 index 0000000000..aead43de36 --- /dev/null +++ b/.storybook/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} \ No newline at end of file diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx index a470ce28d9..d10a853339 100644 --- a/.storybook/preview.tsx +++ b/.storybook/preview.tsx @@ -1,16 +1,17 @@ +import type { Theme } from '@mui/material' import { Box, createTheme, CssBaseline, useTheme, } from '@mui/material' import type { Decorator } from '@storybook/react' import { InvertibleMuiThemeProvider } from '@xylabs/react-invertible-theme' +import { + DataismTheme, XyLabsTheme, XyoTheme, +} from '@xylabs/react-theme' import React from 'react' import { useDarkMode } from 'storybook-dark-mode' -import { - DataismTheme, XyLabsTheme, XYOWebsiteTheme, -} from './Theme' - -const themeNames = ['None', 'XYO Website', 'Dataism', 'XY Labs Website'] +const themeNames = ['None', 'XYO', 'Dataism', 'XYLabs'] as const +type ThemeName = typeof themeNames[number] export const globalTypes = { theme: { @@ -29,13 +30,13 @@ export const globalTypes = { }, } -const getTheme = (themeName) => { +const getTheme = (themeName: ThemeName) => { const theme = useTheme() - const themes = { - 'None': theme, - 'XYO Website': XYOWebsiteTheme(theme, false), - 'Dataism': DataismTheme, - 'XY Labs Website': XyLabsTheme, + const themes: Record = { + None: theme, + XYO: XyoTheme(theme, false), + Dataism: DataismTheme(theme, false), + XYLabs: XyLabsTheme(theme, false), } return themes[themeName] ?? {} } diff --git a/.storybook/tsconfig.json b/.storybook/tsconfig.json new file mode 100644 index 0000000000..e8319e4aab --- /dev/null +++ b/.storybook/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "@xylabs/tsconfig-react", +} \ No newline at end of file diff --git a/.storybook/vite.config.ts b/.storybook/vite.config.ts new file mode 100644 index 0000000000..064c63c4bf --- /dev/null +++ b/.storybook/vite.config.ts @@ -0,0 +1,28 @@ +import { config } from 'dotenv' +import { defineConfig } from 'vite' +import { default as topLevelAwait } from 'vite-plugin-top-level-await' + +// eslint-disable-next-line @typescript-eslint/no-explicit-any +const TopLevelAwaitPlugin = topLevelAwait as any + +config() + +const parsedPort = Number.parseInt(process.env.PORT ?? '') +const port = Number.isNaN(parsedPort) ? 3000 : parsedPort + +// https://vitejs.dev/config/ +export default defineConfig({ + base: '/', + plugins: [ + { + ...TopLevelAwaitPlugin({ + // The export name of top-level await promise for each chunk module + promiseExportName: '__tla', + // The function to generate import names of top-level await promise in each chunk module + // eslint-disable-next-line @typescript-eslint/no-explicit-any + promiseImportName: (i: any) => `__tla_${i}`, + }), + apply: 'serve', + }], + server: { port }, +}) diff --git a/package.json b/package.json index af7106281f..c5a407d463 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,6 @@ "react-helmet": "^6.1.0" }, "devDependencies": { - "@babel/core": "^7.26.0", "@emotion/react": "^11.13.5", "@emotion/styled": "^11.13.5", "@eslint-react/eslint-plugin": "^1.17.0", @@ -87,6 +86,7 @@ "@vitejs/plugin-react-swc": "^3.7.1", "@xylabs/eslint-config-flat": "^4.2.4", "@xylabs/eslint-config-react-flat": "^4.2.4", + "@xylabs/react-theme": "^5.3.8", "@xylabs/ts-scripts-yarn3": "^4.2.4", "@xylabs/tsconfig-react": "^4.2.4", "chromatic": "^11.18.1", @@ -124,4 +124,4 @@ ], "docs": "dist/docs.json", "resolutions_comment": "We set the above resolutions to make sure we pull in the latest versions of these packages even if some sub packages request earlier versions" -} +} \ No newline at end of file diff --git a/packages/plugins/packages/elevation-quadkey/package.json b/packages/plugins/packages/elevation-quadkey/package.json index 8b6587b531..6975d7b5cf 100644 --- a/packages/plugins/packages/elevation-quadkey/package.json +++ b/packages/plugins/packages/elevation-quadkey/package.json @@ -45,12 +45,12 @@ "dependencies": { "@xylabs/react-async-effect": "^5.3.7", "@xylabs/react-flexbox": "^5.3.7", - "@xyo-network/axios": "^2.91.3", "@xyo-network/payload-model": "^3.4.2", "@xyo-network/react-map": "workspace:^", "@xyo-network/react-map-model": "workspace:^", "@xyo-network/react-shared": "workspace:^", "@xyo-network/sdk-geo": "^3.0.2", + "axios": "^1.7.8", "geojson": "^0.5.0", "mapbox-gl": "^3.8.0" }, diff --git a/packages/plugins/packages/elevation-quadkey/src/classes/OpenElevation/OpenElevationApiClient.ts b/packages/plugins/packages/elevation-quadkey/src/classes/OpenElevation/OpenElevationApiClient.ts index 23b4f2b811..44f5d183f5 100644 --- a/packages/plugins/packages/elevation-quadkey/src/classes/OpenElevation/OpenElevationApiClient.ts +++ b/packages/plugins/packages/elevation-quadkey/src/classes/OpenElevation/OpenElevationApiClient.ts @@ -1,5 +1,5 @@ -import type { AxiosResponse } from '@xyo-network/axios' -import { axios } from '@xyo-network/axios' +import type { AxiosResponse } from 'axios' +import axios from 'axios' import type { LatLngTuple, LookupPostRequest, LookupResponse, diff --git a/tsconfig.storybook.json b/tsconfig.storybook.json index d683bea250..276736e635 100644 --- a/tsconfig.storybook.json +++ b/tsconfig.storybook.json @@ -11,7 +11,7 @@ "isolatedModules": true, "importHelpers": true, "incremental": false, - "lib": ["ESNext"], + "lib": ["ESNext", "DOM"], "module": "NodeNext", "moduleResolution": "NodeNext", "noImplicitAny": true, diff --git a/vite.config.ts b/vite.config.ts index 195d074564..71151ee604 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -16,16 +16,20 @@ const port = Number.isNaN(parsedPort) ? 3000 : parsedPort // https://vitejs.dev/config/ export default defineConfig({ base: '/', - plugins: [react(), Checker({ typescript: { tsconfigPath: process.env.TS_NODE_PROJECT } }), tsconfigPaths(), { - ...TopLevelAwaitPlugin({ - // The export name of top-level await promise for each chunk module - promiseExportName: '__tla', - // The function to generate import names of top-level await promise in each chunk module - // eslint-disable-next-line @typescript-eslint/no-explicit-any - promiseImportName: (i: any) => `__tla_${i}`, - }), - apply: 'serve', - }], + plugins: [ + react(), + Checker({ typescript: { tsconfigPath: process.env.TS_NODE_PROJECT } }), + tsconfigPaths(), + { + ...TopLevelAwaitPlugin({ + // The export name of top-level await promise for each chunk module + promiseExportName: '__tla', + // The function to generate import names of top-level await promise in each chunk module + // eslint-disable-next-line @typescript-eslint/no-explicit-any + promiseImportName: (i: any) => `__tla_${i}`, + }), + apply: 'serve', + }], build: { sourcemap: true, rollupOptions: { output: { entryFileNames: 'assets/index-main-[hash].js' } }, diff --git a/yarn.lock b/yarn.lock index 391f784bbd..bc6f3c8bb7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5750,6 +5750,15 @@ __metadata: languageName: node linkType: hard +"@xylabs/api@npm:^4.4.9": + version: 4.4.10 + resolution: "@xylabs/api@npm:4.4.10" + dependencies: + axios: "npm:^1.7.8" + checksum: 10/6e38b3ec340cbbb8a8e8915ae5925065ad784574090f1360b7ac730705ada4b81889d3271d20888872aa4f8b8fc8d757b716ca066713cd9dabbf63bb3e35dee7 + languageName: node + linkType: hard + "@xylabs/array@npm:^4.3.13": version: 4.4.0 resolution: "@xylabs/array@npm:4.4.0" @@ -5777,6 +5786,13 @@ __metadata: languageName: node linkType: hard +"@xylabs/assert@npm:^4.4.10": + version: 4.4.10 + resolution: "@xylabs/assert@npm:4.4.10" + checksum: 10/413cfa2c65cae73c64a568b7392b0a48e46b172ff26bfa5fcff20aa7de4cd6b1e4da8d38fc8436972d99299f049f42f239d7c15403165241ce9e21afc6b20929 + languageName: node + linkType: hard + "@xylabs/axios@npm:^4.3.13": version: 4.4.0 resolution: "@xylabs/axios@npm:4.4.0" @@ -5805,10 +5821,12 @@ __metadata: languageName: node linkType: hard -"@xylabs/error@npm:^3.0.5": - version: 3.6.12 - resolution: "@xylabs/error@npm:3.6.12" - checksum: 10/697eef671253b45f327971f7ac895fb293c834624a47402d733483af0c96f855638b88c8a07c74470fc89e4caee993b740567e21d5200c7e5bd72213eeeb2d4c +"@xylabs/delay@npm:^4.4.9": + version: 4.4.10 + resolution: "@xylabs/delay@npm:4.4.10" + dependencies: + "@xylabs/timer": "npm:^4.4.10" + checksum: 10/ad92cbdd0541b36ee6312c01297c90ca7edbf366a205db9b0fa4b90f403dc90991dfc4fa197a8f0e79546998e401e45eafd6b45d2a3b5466fceb07e4feddee44 languageName: node linkType: hard @@ -5900,6 +5918,18 @@ __metadata: languageName: node linkType: hard +"@xylabs/log@npm:^4.4.9": + version: 4.4.10 + resolution: "@xylabs/log@npm:4.4.10" + peerDependencies: + rollbar: ^2 + peerDependenciesMeta: + rollbar: + optional: true + checksum: 10/45cd77d6c9bd9d69fa6834e437b7e1323f320f07e0b5b0e6d368a48f4a4bb9cceda53fc8cf66b4043308167fac3060fdfe49d6919e9d7716cf306cbdbfc667c0 + languageName: node + linkType: hard + "@xylabs/logger@npm:^4.3.13, @xylabs/logger@npm:^4.4.0": version: 4.4.0 resolution: "@xylabs/logger@npm:4.4.0" @@ -5967,6 +5997,20 @@ __metadata: languageName: node linkType: hard +"@xylabs/react-animation@npm:^5.3.8": + version: 5.3.8 + resolution: "@xylabs/react-animation@npm:5.3.8" + dependencies: + "@react-spring/web": "npm:^9.7.5" + "@xylabs/react-flexbox": "npm:^5.3.8" + peerDependencies: + "@mui/material": ^6 + react: ^18 + react-dom: ^18 + checksum: 10/d44917f2080408fba39dbbaabc8261099c8c4836632f9a5d27f7ecfcab2b77c91c5d314d56fd3cfeb780bca8784e1b4f082b8191d962be5ad7e32122daff7f31 + languageName: node + linkType: hard + "@xylabs/react-app-settings@npm:^5.3.7": version: 5.3.7 resolution: "@xylabs/react-app-settings@npm:5.3.7" @@ -6012,6 +6056,17 @@ __metadata: languageName: node linkType: hard +"@xylabs/react-async-effect@npm:^5.3.8": + version: 5.3.8 + resolution: "@xylabs/react-async-effect@npm:5.3.8" + dependencies: + "@xylabs/react-promise": "npm:^5.3.8" + peerDependencies: + react: ^18 + checksum: 10/cca041b3d99312da8c3023b286418e32d61402dfea1ca85102a3a19afba4e426f971806cb2c13f35d68b3c17072f89846803dab5b75e2221c31e1a1905aff22c + languageName: node + linkType: hard + "@xylabs/react-button@npm:^5.3.7": version: 5.3.7 resolution: "@xylabs/react-button@npm:5.3.7" @@ -6106,6 +6161,21 @@ __metadata: languageName: node linkType: hard +"@xylabs/react-flexbox@npm:^5.3.8": + version: 5.3.8 + resolution: "@xylabs/react-flexbox@npm:5.3.8" + dependencies: + "@xylabs/delay": "npm:^4.4.9" + "@xylabs/react-async-effect": "npm:^5.3.8" + "@xylabs/react-shared": "npm:^5.3.8" + peerDependencies: + "@mui/material": ^6 + react: ^18 + react-dom: ^18 + checksum: 10/f83f9017c82abf4e22e4d0cdf815ada0207caa4d6d725101788a1c6b25c6f58a1988a4b63710ec9ac8d167cabaeb78acb62d1501bb6a1ee35f9ccf308f44fbe5 + languageName: node + linkType: hard + "@xylabs/react-hooks@npm:^5.3.7": version: 5.3.7 resolution: "@xylabs/react-hooks@npm:5.3.7" @@ -6150,6 +6220,23 @@ __metadata: languageName: node linkType: hard +"@xylabs/react-invertible-theme@npm:^5.3.8": + version: 5.3.8 + resolution: "@xylabs/react-invertible-theme@npm:5.3.8" + dependencies: + "@xylabs/react-animation": "npm:^5.3.8" + "@xylabs/react-flexbox": "npm:^5.3.8" + deepmerge: "npm:^4.3.1" + rfdc: "npm:^1.4.1" + peerDependencies: + "@mui/icons-material": ^6 + "@mui/material": ^6 + react: ^18 + react-dom: ^18 + checksum: 10/8700f410416d51607e7abf7a510d8bad57da9db26e790d59e56b086d49eefe7bc93901a968f5022b21d1b1272c60268dbbeb890db393b39b866b0852025ea4de + languageName: node + linkType: hard + "@xylabs/react-link@npm:^5.3.7": version: 5.3.7 resolution: "@xylabs/react-link@npm:5.3.7" @@ -6209,6 +6296,17 @@ __metadata: languageName: node linkType: hard +"@xylabs/react-promise@npm:^5.3.8": + version: 5.3.8 + resolution: "@xylabs/react-promise@npm:5.3.8" + dependencies: + async-mutex: "npm:^0.5.0" + peerDependencies: + react: ^18 + checksum: 10/189d648bccd82074240daf9055dad2c37cb2138329c950ede8d392fa110f12c5898174b0db877d4e924dec9959ab4cca89d5d901b9bcd759cda55c50e6ba6a63 + languageName: node + linkType: hard + "@xylabs/react-quick-tip-button@npm:^5.3.7": version: 5.3.7 resolution: "@xylabs/react-quick-tip-button@npm:5.3.7" @@ -6249,6 +6347,34 @@ __metadata: languageName: node linkType: hard +"@xylabs/react-shared@npm:^5.3.8": + version: 5.3.8 + resolution: "@xylabs/react-shared@npm:5.3.8" + dependencies: + "@xylabs/api": "npm:^4.4.9" + "@xylabs/log": "npm:^4.4.9" + "@xylabs/react-async-effect": "npm:^5.3.8" + peerDependencies: + "@mui/material": ^6 + react: ^18 + react-dom: ^18 + checksum: 10/47acef95976f8e3ef7cd8e1d12069626b57ff1429207a7407227569d7344bbb1383f5ce41e138f4990ef65ceeb87ea6cd50aa0bc849187ad6aec0e06d78ee33c + languageName: node + linkType: hard + +"@xylabs/react-theme@npm:^5.3.8": + version: 5.3.8 + resolution: "@xylabs/react-theme@npm:5.3.8" + dependencies: + "@xylabs/react-invertible-theme": "npm:^5.3.8" + peerDependencies: + "@mui/material": ^6 + react: ^18 + react-dom: ^18 + checksum: 10/847270d82367eac8a25d887162b5e70f0e333ed0a43b6da26702cd505ee1f0b3d9fb4ffad0ea01819bf81372f0588ebd798162353d4801c9df9643eb79ae16c7 + languageName: node + linkType: hard + "@xylabs/react-webapp@npm:^5.3.7": version: 5.3.7 resolution: "@xylabs/react-webapp@npm:5.3.7" @@ -6341,6 +6467,15 @@ __metadata: languageName: node linkType: hard +"@xylabs/timer@npm:^4.4.10": + version: 4.4.10 + resolution: "@xylabs/timer@npm:4.4.10" + dependencies: + "@xylabs/assert": "npm:^4.4.10" + checksum: 10/353137e533b79a00ce2e8ed179e441167c0a05ce8963620969aff34957698c6f1218a5b3ec97803078da90de68ede559238e8c46e4c4d90bd7c9732163d509c5 + languageName: node + linkType: hard + "@xylabs/ts-scripts-yarn3@npm:^4.2.4": version: 4.2.4 resolution: "@xylabs/ts-scripts-yarn3@npm:4.2.4" @@ -6725,17 +6860,6 @@ __metadata: languageName: node linkType: hard -"@xyo-network/axios@npm:^2.91.3": - version: 2.91.3 - resolution: "@xyo-network/axios@npm:2.91.3" - dependencies: - "@xyo-network/shared": "npm:~2.91.3" - axios: "npm:^1.6.7" - pako: "npm:^2.1.0" - checksum: 10/0d3c6e4a86f461d9cac497b4c1b3856207f01d5ef1289683bc4fcfe8af6c060fb7195dac5126ad741e1e5317c1c248f9092f54095be602da913d12b2c51fdf37 - languageName: node - linkType: hard - "@xyo-network/blocknative-ethereum-gas-payload-plugin@npm:^3.1.1": version: 3.1.1 resolution: "@xyo-network/blocknative-ethereum-gas-payload-plugin@npm:3.1.1" @@ -8781,12 +8905,12 @@ __metadata: "@xylabs/react-flexbox": "npm:^5.3.7" "@xylabs/ts-scripts-yarn3": "npm:^4.2.4" "@xylabs/tsconfig-react": "npm:^4.2.4" - "@xyo-network/axios": "npm:^2.91.3" "@xyo-network/payload-model": "npm:^3.4.2" "@xyo-network/react-map": "workspace:^" "@xyo-network/react-map-model": "workspace:^" "@xyo-network/react-shared": "workspace:^" "@xyo-network/sdk-geo": "npm:^3.0.2" + axios: "npm:^1.7.8" geojson: "npm:^0.5.0" mapbox-gl: "npm:^3.8.0" react: "npm:^18.3.1" @@ -11061,6 +11185,7 @@ __metadata: "@xylabs/eslint-config-flat": "npm:^4.2.4" "@xylabs/eslint-config-react-flat": "npm:^4.2.4" "@xylabs/pixel": "npm:^2.0.6" + "@xylabs/react-theme": "npm:^5.3.8" "@xylabs/ts-scripts-yarn3": "npm:^4.2.4" "@xylabs/tsconfig-react": "npm:^4.2.4" "@xyo-network/react-modules": "workspace:^" @@ -11174,15 +11299,6 @@ __metadata: languageName: node linkType: hard -"@xyo-network/shared@npm:~2.91.3": - version: 2.91.3 - resolution: "@xyo-network/shared@npm:2.91.3" - dependencies: - "@xylabs/error": "npm:^3.0.5" - checksum: 10/e5619adf3e90bcba218bc93a7483946ebadc387c9de9422d494a089109fcbeb0aab7d23fb285ce1d285d9c49dc0056c711d198d8a5bf2a32ba8f3e8f01cc0d68 - languageName: node - linkType: hard - "@xyo-network/typeof@npm:^3.4.2": version: 3.4.2 resolution: "@xyo-network/typeof@npm:3.4.2" @@ -11800,7 +11916,7 @@ __metadata: languageName: node linkType: hard -"axios@npm:^1.6.7, axios@npm:^1.7.7": +"axios@npm:^1.7.7": version: 1.7.7 resolution: "axios@npm:1.7.7" dependencies: @@ -11811,6 +11927,17 @@ __metadata: languageName: node linkType: hard +"axios@npm:^1.7.8": + version: 1.7.8 + resolution: "axios@npm:1.7.8" + dependencies: + follow-redirects: "npm:^1.15.6" + form-data: "npm:^4.0.0" + proxy-from-env: "npm:^1.1.0" + checksum: 10/7ddcde188041ac55090186254b4025eb2af842be3cf615ce45393fd7f543c1eab0ad2fdd2017a5f6190695e3ecea73ee5e9c37f204854aec2698f9579046efdf + languageName: node + linkType: hard + "axobject-query@npm:^4.1.0": version: 4.1.0 resolution: "axobject-query@npm:4.1.0"