diff --git a/package.json b/package.json index 7897a634..7c886b39 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@xylabs/sdk-react", - "version": "5.3.7", + "version": "5.3.8", "description": "Common React library for all XY Labs projects that use React", "keywords": [ "utility", diff --git a/packages/accordion/package.json b/packages/accordion/package.json index 894f89c7..497c149e 100644 --- a/packages/accordion/package.json +++ b/packages/accordion/package.json @@ -1,6 +1,6 @@ { "name": "@xylabs/react-accordion", - "version": "5.3.7", + "version": "5.3.8", "description": "Common React library for all XY Labs projects that use React", "keywords": [ "utility", diff --git a/packages/animation/package.json b/packages/animation/package.json index e536f0f2..62303b65 100644 --- a/packages/animation/package.json +++ b/packages/animation/package.json @@ -1,6 +1,6 @@ { "name": "@xylabs/react-animation", - "version": "5.3.7", + "version": "5.3.8", "description": "Common React library for all XY Labs projects that use React", "keywords": [ "utility", diff --git a/packages/app-settings/package.json b/packages/app-settings/package.json index 7c98ece6..b8221b7d 100644 --- a/packages/app-settings/package.json +++ b/packages/app-settings/package.json @@ -1,6 +1,6 @@ { "name": "@xylabs/react-app-settings", - "version": "5.3.7", + "version": "5.3.8", "description": "Common React library for all XY Labs projects that use React", "keywords": [ "utility", diff --git a/packages/appbar/package.json b/packages/appbar/package.json index bfe773f8..7cf800af 100644 --- a/packages/appbar/package.json +++ b/packages/appbar/package.json @@ -1,6 +1,6 @@ { "name": "@xylabs/react-appbar", - "version": "5.3.7", + "version": "5.3.8", "description": "Common React library for all XY Labs projects that use React", "keywords": [ "utility", diff --git a/packages/async-effect/package.json b/packages/async-effect/package.json index bb1d3f90..5ff3412d 100644 --- a/packages/async-effect/package.json +++ b/packages/async-effect/package.json @@ -1,6 +1,6 @@ { "name": "@xylabs/react-async-effect", - "version": "5.3.7", + "version": "5.3.8", "description": "Common React library for all XY Labs projects that use React", "keywords": [ "utility", diff --git a/packages/base-page/package.json b/packages/base-page/package.json index e51131d8..ef0f162d 100644 --- a/packages/base-page/package.json +++ b/packages/base-page/package.json @@ -1,6 +1,6 @@ { "name": "@xylabs/react-base-page", - "version": "5.3.7", + "version": "5.3.8", "description": "Common React library for all XY Labs projects that use React", "keywords": [ "utility", diff --git a/packages/button/package.json b/packages/button/package.json index 805de12e..03c3669f 100644 --- a/packages/button/package.json +++ b/packages/button/package.json @@ -1,6 +1,6 @@ { "name": "@xylabs/react-button", - "version": "5.3.7", + "version": "5.3.8", "description": "Common React library for all XY Labs projects that use React", "keywords": [ "utility", diff --git a/packages/common/package.json b/packages/common/package.json index c57a52f9..19b85b08 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,6 +1,6 @@ { "name": "@xylabs/react-common", - "version": "5.3.7", + "version": "5.3.8", "description": "Common React library for all XY Labs projects that use React", "keywords": [ "utility", diff --git a/packages/cookie-consent/package.json b/packages/cookie-consent/package.json index 13417e2c..11eb3647 100644 --- a/packages/cookie-consent/package.json +++ b/packages/cookie-consent/package.json @@ -1,6 +1,6 @@ { "name": "@xylabs/react-cookie-consent", - "version": "5.3.7", + "version": "5.3.8", "description": "Common React library for all XY Labs projects that use React", "keywords": [ "utility", diff --git a/packages/crypto/package.json b/packages/crypto/package.json index f1389184..d4b19c4f 100644 --- a/packages/crypto/package.json +++ b/packages/crypto/package.json @@ -1,6 +1,6 @@ { "name": "@xylabs/react-crypto", - "version": "5.3.7", + "version": "5.3.8", "description": "Common React library for all XY Labs projects that use React", "keywords": [ "utility", diff --git a/packages/dialogs/package.json b/packages/dialogs/package.json index ef68dbaa..6297eec6 100644 --- a/packages/dialogs/package.json +++ b/packages/dialogs/package.json @@ -1,6 +1,6 @@ { "name": "@xylabs/react-dialogs", - "version": "5.3.7", + "version": "5.3.8", "description": "Common React library for all XY Labs projects that use React", "keywords": [ "utility", diff --git a/packages/error/package.json b/packages/error/package.json index f5634d81..4d125529 100644 --- a/packages/error/package.json +++ b/packages/error/package.json @@ -1,6 +1,6 @@ { "name": "@xylabs/react-error", - "version": "5.3.7", + "version": "5.3.8", "description": "Common React library for all XY Labs projects that use React", "keywords": [ "utility", diff --git a/packages/experiments/package.json b/packages/experiments/package.json index c4805e1e..b9998812 100644 --- a/packages/experiments/package.json +++ b/packages/experiments/package.json @@ -1,6 +1,6 @@ { "name": "@xylabs/react-experiments", - "version": "5.3.7", + "version": "5.3.8", "description": "Common React library for all XY Labs projects that use React", "keywords": [ "utility", diff --git a/packages/flexbox/package.json b/packages/flexbox/package.json index 3ebd050e..3f2cc711 100644 --- a/packages/flexbox/package.json +++ b/packages/flexbox/package.json @@ -1,6 +1,6 @@ { "name": "@xylabs/react-flexbox", - "version": "5.3.7", + "version": "5.3.8", "description": "Common React library for all XY Labs projects that use React", "keywords": [ "utility", diff --git a/packages/hooks/package.json b/packages/hooks/package.json index e04c837d..8b0633a7 100644 --- a/packages/hooks/package.json +++ b/packages/hooks/package.json @@ -1,6 +1,6 @@ { "name": "@xylabs/react-hooks", - "version": "5.3.7", + "version": "5.3.8", "description": "Common React library for all XY Labs projects that use React", "keywords": [ "utility", diff --git a/packages/identicon/package.json b/packages/identicon/package.json index 2da6a77d..8cb47e72 100644 --- a/packages/identicon/package.json +++ b/packages/identicon/package.json @@ -1,6 +1,6 @@ { "name": "@xylabs/react-identicon", - "version": "5.3.7", + "version": "5.3.8", "description": "Common React library for all XY Labs projects that use React", "keywords": [ "utility", diff --git a/packages/invertible-theme/package.json b/packages/invertible-theme/package.json index 8c48bede..09eb953f 100644 --- a/packages/invertible-theme/package.json +++ b/packages/invertible-theme/package.json @@ -1,6 +1,6 @@ { "name": "@xylabs/react-invertible-theme", - "version": "5.3.7", + "version": "5.3.8", "description": "Common React library for all XY Labs projects that use React", "keywords": [ "utility", diff --git a/packages/invertible-theme/src/Buttons/DarkModeIconButton.tsx b/packages/invertible-theme/src/Buttons/DarkModeIconButton.tsx index 0eff9999..d8ded4c9 100644 --- a/packages/invertible-theme/src/Buttons/DarkModeIconButton.tsx +++ b/packages/invertible-theme/src/Buttons/DarkModeIconButton.tsx @@ -26,13 +26,13 @@ export const DarkModeIconButton: React.FC = ({ toggleMode, ...props }) => { - const darkModeIconColor = defaultDarkModeColor ?? 'inherit' - const lightModeIconColor = defaultLightModeColor ?? 'inherit' const [iconColor, setIconColor] = useState(darkMode ? defaultDarkModeColor : defaultLightModeColor) const [iconColorIsSet, setIconColorIsSet] = useState(false) const handleHover = () => { setIconColor(() => { + const darkModeIconColor = defaultDarkModeColor ?? 'inherit' + const lightModeIconColor = defaultLightModeColor ?? 'inherit' if (darkMode) { return iconColorIsSet ? darkModeIconColor : 'info' } else { diff --git a/packages/invertible-theme/src/Buttons/ThemeModeButtonGroup.stories.tsx b/packages/invertible-theme/src/Buttons/ThemeModeButtonGroup.stories.tsx index 8703eec7..95434bc1 100644 --- a/packages/invertible-theme/src/Buttons/ThemeModeButtonGroup.stories.tsx +++ b/packages/invertible-theme/src/Buttons/ThemeModeButtonGroup.stories.tsx @@ -1,5 +1,6 @@ import { CssBaseline, ThemeProvider } from '@mui/material' import { createTheme } from '@mui/material/styles' +import type { StoryFn } from '@storybook/react' import React from 'react' import { InvertibleMuiThemeProvider } from '../InvertibleMuiThemeProvider/index.ts' @@ -19,11 +20,11 @@ const theme = createTheme({ }, }) -const Template = () => ( +const Template: StoryFn = () => ( - + ) diff --git a/packages/invertible-theme/src/Buttons/ThemeModeButtonGroup.tsx b/packages/invertible-theme/src/Buttons/ThemeModeButtonGroup.tsx index ff44404b..b25436ca 100644 --- a/packages/invertible-theme/src/Buttons/ThemeModeButtonGroup.tsx +++ b/packages/invertible-theme/src/Buttons/ThemeModeButtonGroup.tsx @@ -1,42 +1,34 @@ -import { - Button, ButtonGroup, Chip, Stack, -} from '@mui/material' +import type { ButtonGroupProps } from '@mui/material' +import { Button, ButtonGroup } from '@mui/material' import React from 'react' import { useColorSchemeEx } from '../InvertibleMuiThemeProvider/index.ts' -export const ThemeModeButtonGroup: React.FC = () => { +export const ThemeModeButtonGroup: React.FC = (props) => { const { - darkMode, lightMode, systemMode, mode, setMode, + darkMode, lightMode, systemMode, setMode, } = useColorSchemeEx() return ( - - - Current Mode: - {' '} - - - - - - - - + + + + + ) } diff --git a/packages/invertible-theme/src/InvertibleThemeContext.tsx b/packages/invertible-theme/src/InvertibleThemeContext.tsx deleted file mode 100644 index 94427595..00000000 --- a/packages/invertible-theme/src/InvertibleThemeContext.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import { createContext } from 'react' - -import type { InvertibleTheme } from './InvertibleTheme.tsx' - -const InvertibleThemeContext = createContext({ options: {} }) - -export { InvertibleThemeContext } diff --git a/packages/invertible-theme/src/InvertibleTheme.tsx b/packages/invertible-theme/src/LegacyInvertibleThemeProvider/InvertibleTheme.tsx similarity index 53% rename from packages/invertible-theme/src/InvertibleTheme.tsx rename to packages/invertible-theme/src/LegacyInvertibleThemeProvider/InvertibleTheme.tsx index b42b0e00..61db0c94 100644 --- a/packages/invertible-theme/src/InvertibleTheme.tsx +++ b/packages/invertible-theme/src/LegacyInvertibleThemeProvider/InvertibleTheme.tsx @@ -1,9 +1,8 @@ import type { ThemeOptions } from '@mui/material' -interface InvertibleTheme { +/** @deprecated switch to InvertibleMuiThemeProvider which does not require this */ +export interface InvertibleTheme { darkOptions?: ThemeOptions lightOptions?: ThemeOptions options: ThemeOptions } - -export type { InvertibleTheme } diff --git a/packages/invertible-theme/src/LegacyInvertibleThemeProvider/InvertibleThemeContext.tsx b/packages/invertible-theme/src/LegacyInvertibleThemeProvider/InvertibleThemeContext.tsx new file mode 100644 index 00000000..b4cd2a7b --- /dev/null +++ b/packages/invertible-theme/src/LegacyInvertibleThemeProvider/InvertibleThemeContext.tsx @@ -0,0 +1,6 @@ +import { createContext } from 'react' + +import type { InvertibleTheme } from './InvertibleTheme.tsx' + +/** @deprecated switch to InvertibleMuiThemeProvider which does not require this */ +export const InvertibleThemeContext = createContext({ options: {} }) diff --git a/packages/invertible-theme/src/InvertibleThemeProvider.stories.tsx b/packages/invertible-theme/src/LegacyInvertibleThemeProvider/InvertibleThemeProvider.stories.tsx similarity index 100% rename from packages/invertible-theme/src/InvertibleThemeProvider.stories.tsx rename to packages/invertible-theme/src/LegacyInvertibleThemeProvider/InvertibleThemeProvider.stories.tsx diff --git a/packages/invertible-theme/src/InvertibleThemeProvider.tsx b/packages/invertible-theme/src/LegacyInvertibleThemeProvider/InvertibleThemeProvider.tsx similarity index 96% rename from packages/invertible-theme/src/InvertibleThemeProvider.tsx rename to packages/invertible-theme/src/LegacyInvertibleThemeProvider/InvertibleThemeProvider.tsx index 3dc05898..822e8cb2 100644 --- a/packages/invertible-theme/src/InvertibleThemeProvider.tsx +++ b/packages/invertible-theme/src/LegacyInvertibleThemeProvider/InvertibleThemeProvider.tsx @@ -1,3 +1,4 @@ +/* eslint-disable complexity */ import type { Theme, ThemeOptions } from '@mui/material' import { createTheme, responsiveFontSizes, ScopedCssBaseline, ThemeProvider, @@ -11,7 +12,7 @@ import type { InvertibleThemeProviderProps } from './InvertibleThemeProviderProp import { resolveThemeColors } from './resolveThemeColors.js' import { useInvertibleThemeProvider } from './use.ts' -// eslint-disable-next-line complexity +/** @deprecated use InvertibleMuiThemeProvider instead */ export const InvertibleThemeProvider: React.FC = ({ options, children, diff --git a/packages/invertible-theme/src/InvertibleThemeProviderProps.ts b/packages/invertible-theme/src/LegacyInvertibleThemeProvider/InvertibleThemeProviderProps.ts similarity index 77% rename from packages/invertible-theme/src/InvertibleThemeProviderProps.ts rename to packages/invertible-theme/src/LegacyInvertibleThemeProvider/InvertibleThemeProviderProps.ts index e42db060..7bc40cbd 100644 --- a/packages/invertible-theme/src/InvertibleThemeProviderProps.ts +++ b/packages/invertible-theme/src/LegacyInvertibleThemeProvider/InvertibleThemeProviderProps.ts @@ -1,7 +1,8 @@ import type { ThemeOptions } from '@mui/material' import type { ReactNode } from 'react' -interface InvertibleThemeProviderProps { +/** @deprecated use InvertibleMuiThemeProviderProps instead */ +export interface InvertibleThemeProviderProps { children?: ReactNode dark?: boolean @@ -18,5 +19,3 @@ interface InvertibleThemeProviderProps { resolve?: boolean scoped?: boolean } - -export type { InvertibleThemeProviderProps } diff --git a/packages/invertible-theme/src/LegacyInvertibleThemeProvider/index.ts b/packages/invertible-theme/src/LegacyInvertibleThemeProvider/index.ts new file mode 100644 index 00000000..f5f4c0a1 --- /dev/null +++ b/packages/invertible-theme/src/LegacyInvertibleThemeProvider/index.ts @@ -0,0 +1,5 @@ +export * from './InvertibleTheme.tsx' +export * from './InvertibleThemeContext.tsx' +export * from './InvertibleThemeProvider.tsx' +export * from './InvertibleThemeProviderProps.ts' +export * from './use.ts' diff --git a/packages/invertible-theme/src/resolveThemeColors.ts b/packages/invertible-theme/src/LegacyInvertibleThemeProvider/resolveThemeColors.ts similarity index 100% rename from packages/invertible-theme/src/resolveThemeColors.ts rename to packages/invertible-theme/src/LegacyInvertibleThemeProvider/resolveThemeColors.ts diff --git a/packages/invertible-theme/src/use.ts b/packages/invertible-theme/src/LegacyInvertibleThemeProvider/use.ts similarity index 80% rename from packages/invertible-theme/src/use.ts rename to packages/invertible-theme/src/LegacyInvertibleThemeProvider/use.ts index 139cbbaa..2c94ef41 100644 --- a/packages/invertible-theme/src/use.ts +++ b/packages/invertible-theme/src/LegacyInvertibleThemeProvider/use.ts @@ -2,6 +2,7 @@ import { useContext } from 'react' import { InvertibleThemeContext } from './InvertibleThemeContext.tsx' +/** @deprecated use useColorSchemeEx instead */ export const useInvertibleThemeProvider = () => { return useContext(InvertibleThemeContext) } diff --git a/packages/invertible-theme/src/index.ts b/packages/invertible-theme/src/index.ts index 8c4e4d60..3b9da53e 100644 --- a/packages/invertible-theme/src/index.ts +++ b/packages/invertible-theme/src/index.ts @@ -1,7 +1,3 @@ export * from './Buttons/index.ts' export * from './InvertibleMuiThemeProvider/index.ts' -export * from './InvertibleTheme.tsx' -export * from './InvertibleThemeContext.tsx' -export * from './InvertibleThemeProvider.tsx' -export * from './InvertibleThemeProviderProps.ts' -export * from './use.ts' +export * from './LegacyInvertibleThemeProvider/index.ts' diff --git a/packages/link/package.json b/packages/link/package.json index 4da84023..419d5019 100644 --- a/packages/link/package.json +++ b/packages/link/package.json @@ -1,6 +1,6 @@ { "name": "@xylabs/react-link", - "version": "5.3.7", + "version": "5.3.8", "description": "Common React library for all XY Labs projects that use React", "keywords": [ "utility", @@ -44,7 +44,7 @@ "@mui/material": "^6.1.8", "@storybook/react": "^8.4.5", "@types/react": "^18.3.12", - "@xylabs/react-flexbox": "^5.3.7", + "@xylabs/react-flexbox": "^5.3.8", "@xylabs/react-pixel": "workspace:^", "@xylabs/ts-scripts-yarn3": "^4.2.4", "@xylabs/tsconfig-react": "^4.2.4", diff --git a/packages/mixpanel/package.json b/packages/mixpanel/package.json index 39d1888b..7a387ba6 100644 --- a/packages/mixpanel/package.json +++ b/packages/mixpanel/package.json @@ -1,6 +1,6 @@ { "name": "@xylabs/react-mixpanel", - "version": "5.3.7", + "version": "5.3.8", "description": "Common React library for all XY Labs projects that use React", "keywords": [ "utility", diff --git a/packages/number-status/package.json b/packages/number-status/package.json index aa05172f..980ed047 100644 --- a/packages/number-status/package.json +++ b/packages/number-status/package.json @@ -1,6 +1,6 @@ { "name": "@xylabs/react-number-status", - "version": "5.3.7", + "version": "5.3.8", "description": "Common React library for all XY Labs projects that use React", "keywords": [ "utility", diff --git a/packages/pixel-debugger/package.json b/packages/pixel-debugger/package.json index 2b7e21cc..cd30ea42 100644 --- a/packages/pixel-debugger/package.json +++ b/packages/pixel-debugger/package.json @@ -1,6 +1,6 @@ { "name": "@xylabs/react-pixel-debugger", - "version": "5.3.7", + "version": "5.3.8", "description": "Common React library for all XY Labs projects that use React", "keywords": [ "utility", diff --git a/packages/pixel/package.json b/packages/pixel/package.json index 86aacd0d..a7f49e8c 100644 --- a/packages/pixel/package.json +++ b/packages/pixel/package.json @@ -1,6 +1,6 @@ { "name": "@xylabs/react-pixel", - "version": "5.3.7", + "version": "5.3.8", "description": "Common React library for all XY Labs projects that use React", "keywords": [ "utility", diff --git a/packages/portal/package.json b/packages/portal/package.json index 6e5bd61d..a27f3893 100644 --- a/packages/portal/package.json +++ b/packages/portal/package.json @@ -1,6 +1,6 @@ { "name": "@xylabs/react-portal", - "version": "5.3.7", + "version": "5.3.8", "description": "Common React library for all XY Labs projects that use React", "keywords": [ "utility", diff --git a/packages/promise/package.json b/packages/promise/package.json index 084991cb..2bc33c50 100644 --- a/packages/promise/package.json +++ b/packages/promise/package.json @@ -1,6 +1,6 @@ { "name": "@xylabs/react-promise", - "version": "5.3.7", + "version": "5.3.8", "description": "Common React library for all XY Labs projects that use React", "keywords": [ "utility", diff --git a/packages/quick-tip-button/package.json b/packages/quick-tip-button/package.json index 5bbc6976..43f66843 100644 --- a/packages/quick-tip-button/package.json +++ b/packages/quick-tip-button/package.json @@ -1,6 +1,6 @@ { "name": "@xylabs/react-quick-tip-button", - "version": "5.3.7", + "version": "5.3.8", "description": "Common React library for all XY Labs projects that use React", "keywords": [ "utility", diff --git a/packages/render-spin-check/package.json b/packages/render-spin-check/package.json index 0c971a0d..e769b6d8 100644 --- a/packages/render-spin-check/package.json +++ b/packages/render-spin-check/package.json @@ -1,6 +1,6 @@ { "name": "@xylabs/react-render-spin-check", - "version": "5.3.7", + "version": "5.3.8", "description": "Common React library for all XY Labs projects that use React", "keywords": [ "utility", diff --git a/packages/rich-result/package.json b/packages/rich-result/package.json index 935977a1..8d1cee05 100644 --- a/packages/rich-result/package.json +++ b/packages/rich-result/package.json @@ -1,6 +1,6 @@ { "name": "@xylabs/react-rich-result", - "version": "5.3.7", + "version": "5.3.8", "description": "Common React library for all XY Labs projects that use React", "keywords": [ "utility", diff --git a/packages/scroll-to-top/package.json b/packages/scroll-to-top/package.json index 29273265..d86774bb 100644 --- a/packages/scroll-to-top/package.json +++ b/packages/scroll-to-top/package.json @@ -1,6 +1,6 @@ { "name": "@xylabs/react-scroll-to-top", - "version": "5.3.7", + "version": "5.3.8", "description": "Common React library for all XY Labs projects that use React", "keywords": [ "utility", diff --git a/packages/select/package.json b/packages/select/package.json index 9c5cf366..1a6ec4bd 100644 --- a/packages/select/package.json +++ b/packages/select/package.json @@ -1,6 +1,6 @@ { "name": "@xylabs/react-select", - "version": "5.3.7", + "version": "5.3.8", "description": "Common React library for all XY Labs projects that use React", "keywords": [ "utility", diff --git a/packages/shared/package.json b/packages/shared/package.json index 2440d19c..797e68ee 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -1,6 +1,6 @@ { "name": "@xylabs/react-shared", - "version": "5.3.7", + "version": "5.3.8", "description": "Common React library for all XY Labs projects that use React", "keywords": [ "utility", diff --git a/packages/theme/package.json b/packages/theme/package.json index 38a45ff7..452dadc1 100644 --- a/packages/theme/package.json +++ b/packages/theme/package.json @@ -1,6 +1,6 @@ { "name": "@xylabs/react-theme", - "version": "5.3.7", + "version": "5.3.8", "description": "Common React library for all XY Labs projects that use React", "keywords": [ "utility", diff --git a/packages/theme/src/ThemeShowcase.tsx b/packages/theme/src/ThemeShowcase.tsx index c8f92696..e30f636e 100644 --- a/packages/theme/src/ThemeShowcase.tsx +++ b/packages/theme/src/ThemeShowcase.tsx @@ -8,7 +8,7 @@ export const ThemeShowcase: React.FC = () => { return ( - XYO Website Theme Showcase + Theme Showcase