Skip to content

Commit

Permalink
Deploy
Browse files Browse the repository at this point in the history
5.3.8
  • Loading branch information
arietrouw committed Nov 26, 2024
1 parent 703a1a8 commit cc602e5
Show file tree
Hide file tree
Showing 48 changed files with 85 additions and 92 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/accordion/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/animation/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/app-settings/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/appbar/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/async-effect/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/base-page/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/button/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/cookie-consent/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/crypto/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/dialogs/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/error/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/experiments/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/flexbox/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/hooks/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/identicon/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/invertible-theme/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 2 additions & 2 deletions packages/invertible-theme/src/Buttons/DarkModeIconButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ export const DarkModeIconButton: React.FC<DarkModeIconButtonProps> = ({
toggleMode,
...props
}) => {
const darkModeIconColor = defaultDarkModeColor ?? 'inherit'
const lightModeIconColor = defaultLightModeColor ?? 'inherit'
const [iconColor, setIconColor] = useState<iconColor>(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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -19,11 +20,11 @@ const theme = createTheme({
},
})

const Template = () => (
const Template: StoryFn = () => (
<ThemeProvider theme={theme}>
<CssBaseline />
<InvertibleMuiThemeProvider>
<ThemeModeButtonGroup />
<ThemeModeButtonGroup sx={{ margin: 2 }} />
</InvertibleMuiThemeProvider>
</ThemeProvider>
)
Expand Down
56 changes: 24 additions & 32 deletions packages/invertible-theme/src/Buttons/ThemeModeButtonGroup.tsx
Original file line number Diff line number Diff line change
@@ -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<ButtonGroupProps> = (props) => {
const {
darkMode, lightMode, systemMode, mode, setMode,
darkMode, lightMode, systemMode, setMode,
} = useColorSchemeEx()

return (
<Stack direction="column" gap={2} alignItems="start">
<Stack direction="row" gap={2}>
Current Mode:
{' '}
<Chip label={mode} />
</Stack>
<ButtonGroup>
<Button
variant={darkMode ? 'contained' : 'outlined'}
onClick={() => setMode('dark')}
>
Dark Mode
</Button>
<Button
variant={lightMode ? 'contained' : 'outlined'}
onClick={() => setMode('light')}
>
Light Mode
</Button>
<Button
variant={systemMode ? 'contained' : 'outlined'}
onClick={() => setMode('system')}
>
System
</Button>
</ButtonGroup>
</Stack>
<ButtonGroup {...props}>
<Button
variant={darkMode ? 'contained' : 'outlined'}
onClick={() => setMode('dark')}
>
Dark Mode
</Button>
<Button
variant={lightMode ? 'contained' : 'outlined'}
onClick={() => setMode('light')}
>
Light Mode
</Button>
<Button
variant={systemMode ? 'contained' : 'outlined'}
onClick={() => setMode('system')}
>
System
</Button>
</ButtonGroup>
)
}
7 changes: 0 additions & 7 deletions packages/invertible-theme/src/InvertibleThemeContext.tsx

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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 }
Original file line number Diff line number Diff line change
@@ -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<InvertibleTheme>({ options: {} })
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable complexity */
import type { Theme, ThemeOptions } from '@mui/material'
import {
createTheme, responsiveFontSizes, ScopedCssBaseline, ThemeProvider,
Expand All @@ -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<InvertibleThemeProviderProps> = ({
options,
children,
Expand Down
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -18,5 +19,3 @@ interface InvertibleThemeProviderProps {
resolve?: boolean
scoped?: boolean
}

export type { InvertibleThemeProviderProps }
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export * from './InvertibleTheme.tsx'
export * from './InvertibleThemeContext.tsx'
export * from './InvertibleThemeProvider.tsx'
export * from './InvertibleThemeProviderProps.ts'
export * from './use.ts'
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useContext } from 'react'

import { InvertibleThemeContext } from './InvertibleThemeContext.tsx'

/** @deprecated use useColorSchemeEx instead */
export const useInvertibleThemeProvider = () => {
return useContext(InvertibleThemeContext)
}
6 changes: 1 addition & 5 deletions packages/invertible-theme/src/index.ts
Original file line number Diff line number Diff line change
@@ -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'
4 changes: 2 additions & 2 deletions packages/link/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/mixpanel/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/number-status/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/pixel-debugger/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/pixel/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/portal/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/promise/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
Loading

0 comments on commit cc602e5

Please sign in to comment.