diff --git a/examples/next-12/components/AllColors/index.jsx b/examples/next-12/components/AllColors/index.jsx
new file mode 100644
index 000000000..32d39910f
--- /dev/null
+++ b/examples/next-12/components/AllColors/index.jsx
@@ -0,0 +1,305 @@
+'use client';
+
+import { Alert, Box, Chip, Container, Paper, Snackbar, Typography } from '@mui/material';
+import { useContext, useState } from 'react';
+import { ThemeContext } from '../../lib/context/AppThemeContext';
+import { darkModePalette, lightModePalette } from '../../lib/palette';
+
+// Helper function to flatten nested objects and get all color values
+const flattenColors = (obj, prefix = '', seen = new Set()) => {
+ let colors = [];
+
+ Object.entries(obj).forEach(([key, value]) => {
+ const fullKey = prefix ? `${prefix}.${key}` : key;
+
+ if (typeof value === 'string') {
+ if (!seen.has(fullKey)) {
+ colors.push({
+ token: fullKey,
+ color: value,
+ category: prefix || 'root'
+ });
+ seen.add(fullKey);
+ }
+ } else if (typeof value === 'object' && value !== null) {
+ colors = colors.concat(flattenColors(value, fullKey, seen));
+ }
+ });
+
+ return colors;
+};
+
+export default function AllColors() {
+ const { mode } = useContext(ThemeContext);
+ const palette = mode === 'dark' ? darkModePalette : lightModePalette;
+
+ const [snackbarOpen, setSnackbarOpen] = useState(false);
+ const [copiedText, setCopiedText] = useState('');
+
+ const handleCopy = (value) => {
+ navigator.clipboard.writeText(value);
+ setCopiedText(value);
+ setSnackbarOpen(true);
+ };
+
+ const handleClose = () => setSnackbarOpen(false);
+
+ // Get all colors from the palette
+ const allColors = flattenColors(palette);
+
+ // Group colors by category
+ const groupedColors = allColors.reduce((acc, color) => {
+ const category = color.category;
+ if (!acc[category]) {
+ acc[category] = [];
+ }
+ acc[category].push(color);
+ return acc;
+ }, {});
+
+ const categoryNames = {
+ root: 'Primary Colors',
+ surface: 'Surface Colors',
+ interactive: 'Interactive Colors',
+ navigation: 'Navigation Colors',
+ background: 'Background Colors',
+ text: 'Text Colors',
+ border: 'Border Colors',
+ icon: 'Icon Colors',
+ primary: 'Primary Palette',
+ secondary: 'Secondary Palette'
+ };
+
+ const getCategoryDescription = (category) => {
+ const descriptions = {
+ root: 'Main palette colors',
+ surface: 'Background surfaces with proper contrast',
+ interactive: 'Colors for buttons, links, and interactive elements',
+ navigation: 'Navigation bar and menu colors',
+ background: 'Extended background color options',
+ text: 'Text color variations',
+ border: 'Border and divider colors',
+ icon: 'Icon color variations',
+ primary: 'Primary color palette',
+ secondary: 'Secondary color palette'
+ };
+ return descriptions[category] || 'Color variations';
+ };
+
+ return (
+
+
+
+ All Colors Tokens
+
+
+ Complete color palette explorer with all color tokens from the {mode} mode -{' '}
+ {allColors.length} total colors
+
+
+ {Object.entries(groupedColors).map(([category, colors]) => (
+
+
+ {categoryNames[category] || category.charAt(0).toUpperCase() + category.slice(1)}
+
+
+
+ {getCategoryDescription(category)}
+
+
+
+ {colors.map(({ token, color }) => (
+ handleCopy(color)}
+ >
+
+ {color.includes('gradient') && (
+
+ GRADIENT
+
+ )}
+
+
+
+ {token}
+
+
+
+ {color}
+
+
+ ))}
+
+
+ ))}
+
+
+
+ Palette Summary
+
+
+
+
+ • Total Colors: {allColors.length} | Categories: {Object.keys(groupedColors).length} |
+ Mode: {mode.charAt(0).toUpperCase() + mode.slice(1)}
+
+
+
+ • Primary: {palette.primary?.main || 'N/A'} | Surface:{' '}
+ {palette.surface?.primary || 'N/A'} | Text: {palette.text?.default || 'N/A'}
+
+
+
+
+
+
+
+ Copied: {copiedText}
+
+
+
+ );
+}
diff --git a/examples/next-12/components/BorderAndIcons/index.jsx b/examples/next-12/components/BorderAndIcons/index.jsx
new file mode 100644
index 000000000..0d6241e08
--- /dev/null
+++ b/examples/next-12/components/BorderAndIcons/index.jsx
@@ -0,0 +1,259 @@
+'use client';
+
+import { Palette, RemoveRedEye, Send, Star, WbSunny } from '@mui/icons-material';
+import { Alert, Box, Container, Grid, Paper, Snackbar, Typography } from '@mui/material';
+import { useContext, useState } from 'react';
+import { ThemeContext } from '../../lib/context/AppThemeContext';
+import { darkModePalette, lightModePalette } from '../../lib/palette';
+
+export default function BorderAndIconColors() {
+ const { mode } = useContext(ThemeContext);
+ const palette = mode === 'dark' ? darkModePalette : lightModePalette;
+ const borderColors = palette.border;
+ const iconColors = palette.icon;
+
+ const [snackbarOpen, setSnackbarOpen] = useState(false);
+ const [copiedText, setCopiedText] = useState('');
+
+ const handleCopy = (value) => {
+ navigator.clipboard.writeText(value);
+ setCopiedText(value);
+ setSnackbarOpen(true);
+ };
+
+ const handleClose = () => setSnackbarOpen(false);
+
+ const borderSwatches = [
+ { key: 'default', label: 'Default', desc: 'Standard borders' },
+ { key: 'strong', label: 'Strong', desc: 'Emphasized borders' },
+ { key: 'brand', label: 'Brand', desc: 'Brand borders' },
+ { key: 'normal', label: 'Normal', desc: 'Normal borders' },
+ { key: 'neutral.default', label: 'Neutral Default', desc: 'Neutral borders' },
+ { key: 'neutral.alt', label: 'Neutral Alt', desc: 'Alternate neutral borders' }
+ ];
+
+ const iconSwatches = [
+ { key: 'default', label: 'Default', desc: 'Standard icons' },
+ { key: 'secondary', label: 'Secondary', desc: 'Secondary icons' },
+ { key: 'brand', label: 'Brand', desc: 'Brand icons' },
+ { key: 'inverse', label: 'Inverse', desc: 'Inverse icons' },
+ { key: 'weather', label: 'Weather', desc: 'Weather icons' },
+ { key: 'disabled', label: 'Disabled', desc: 'Disabled icons' },
+ { key: 'dualTone', label: 'Dual Tone', desc: 'Two-tone icons' },
+ { key: 'dualToneInverse', label: 'Dual Tone Inverse', desc: 'Inverse dual-tone icons' },
+ { key: 'neutral.default', label: 'Neutral Default', desc: 'Neutral icons' },
+ { key: 'neutral.alt', label: 'Neutral Alt', desc: 'Alt neutral icons' }
+ ];
+
+ const getColor = (obj, path) => path.split('.').reduce((acc, part) => acc && acc[part], obj);
+
+ return (
+
+
+
+ Border Colors
+
+
+ Border colors for different emphasis levels
+
+
+
+ {borderSwatches.map(({ key, label, desc }) => (
+
+
+ handleCopy(getColor(borderColors, key))}
+ sx={{
+ width: 60,
+ height: 60,
+ borderRadius: '8px',
+ border: `4px solid ${getColor(borderColors, key)}`,
+ cursor: 'pointer',
+ '&:hover': { boxShadow: `0 0 0 3px ${palette.border.default}33` }
+ }}
+ />
+
+ {label}
+
+
+ {desc}
+
+
+ {getColor(borderColors, key)}
+
+
+
+ ))}
+
+
+
+
+ Border Examples
+
+
+ {borderSwatches.slice(0, 4).map(({ key, label }) => (
+
+ {label} Border
+
+ ))}
+
+
+
+
+
+
+ Icon Colors
+
+
+ Icon colors for different contexts and states
+
+
+
+ {iconSwatches.map(({ key, label, desc }) => (
+
+
+ handleCopy(getColor(iconColors, key))}
+ sx={{
+ width: 60,
+ height: 60,
+ borderRadius: '8px',
+ backgroundColor: getColor(iconColors, key),
+ cursor: 'pointer',
+ border: `2px solid ${palette.border.normal}`,
+ '&:hover': { boxShadow: `0 0 0 3px ${palette.border.default}33` }
+ }}
+ />
+
+ {label}
+
+
+ {desc}
+
+
+ {getColor(iconColors, key)}
+
+
+
+ ))}
+
+
+
+
+ Icon Examples
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Copied: {copiedText}
+
+
+
+ );
+}
diff --git a/examples/next-12/components/DefaultModal/index.jsx b/examples/next-12/components/DefaultModal/index.jsx
index ce37b6063..87eaad62b 100644
--- a/examples/next-12/components/DefaultModal/index.jsx
+++ b/examples/next-12/components/DefaultModal/index.jsx
@@ -1,3 +1,4 @@
+import { lightModePalette } from '@/lib/palette';
import {
Button,
Dialog,
@@ -8,6 +9,7 @@ import {
Typography
} from '@layer5/sistent-components';
import { CloseIcon } from '@layer5/sistent-svg';
+import { Tooltip } from '@mui/material';
import React from 'react';
export default function DefaultModal() {
@@ -25,32 +27,39 @@ export default function DefaultModal() {
-
+
+
+
);
}
diff --git a/examples/next-12/components/Footer/index.jsx b/examples/next-12/components/Footer/index.jsx
new file mode 100644
index 000000000..501000624
--- /dev/null
+++ b/examples/next-12/components/Footer/index.jsx
@@ -0,0 +1,59 @@
+'use client';
+
+import { Box, Container, Typography } from '@mui/material';
+import * as React from 'react';
+import { ThemeContext } from '../../lib/context/AppThemeContext';
+import { darkModePalette, lightModePalette } from '../../lib/palette';
+
+export default function Footer() {
+ const { mode } = React.useContext(ThemeContext);
+
+ const palette = mode === 'dark' ? darkModePalette : lightModePalette;
+
+ return (
+
+
+
+
+ Design System Palette
+
+
+ Comprehensive color system with {mode} mode active
+
+
+
+
+ 9 Color Categories
+
+
+
+ );
+}
diff --git a/examples/next-12/components/Icon/index.jsx b/examples/next-12/components/Icon/index.jsx
new file mode 100644
index 000000000..3a9680ce4
--- /dev/null
+++ b/examples/next-12/components/Icon/index.jsx
@@ -0,0 +1,109 @@
+'use client';
+
+import { lightModePalette } from '@/lib/palette';
+import InfoIcon from '@mui/icons-material/Info';
+import {
+ Alert,
+ Box,
+ Button,
+ Dialog,
+ DialogActions,
+ DialogContent,
+ DialogTitle,
+ Grid,
+ IconButton,
+ Snackbar,
+ Tooltip
+} from '@mui/material';
+import * as React from 'react';
+
+export default function IconColorDemo() {
+ const [open, setOpen] = React.useState(false);
+ const [copied, setCopied] = React.useState('');
+
+ const handleOpen = () => setOpen(true);
+ const handleClose = () => setOpen(false);
+
+ const handleCopy = (color) => {
+ navigator.clipboard.writeText(color);
+ setCopied(color);
+ };
+
+ const flattenColors = (obj, prefix = 'lightMode', seen = new Set()) => {
+ let colors = [];
+ Object.keys(obj).forEach((key) => {
+ const value = obj[key];
+ if (typeof value === 'string') {
+ const token = `${prefix}.${key}`;
+ if (!seen.has(token)) {
+ colors.push({ token, color: value });
+ seen.add(token);
+ }
+ } else if (typeof value === 'object') {
+ colors = colors.concat(flattenColors(value, `${prefix}.${key}`, seen));
+ }
+ });
+ return colors;
+ };
+
+ const iconColors = flattenColors(lightModePalette.icon);
+ const allColors = [...iconColors];
+
+ return (
+
+
+
+
+
+
setCopied('')}
+ anchorOrigin={{ vertical: 'bottom', horizontal: 'center' }}
+ >
+
+ Copied {copied} to clipboard!
+
+
+
+ );
+}
diff --git a/examples/next-12/components/Interactive/index.jsx b/examples/next-12/components/Interactive/index.jsx
new file mode 100644
index 000000000..852ac0457
--- /dev/null
+++ b/examples/next-12/components/Interactive/index.jsx
@@ -0,0 +1,200 @@
+'use client';
+
+import { Alert, Box, Button, Container, Paper, Snackbar, Tooltip, Typography } from '@mui/material';
+import * as React from 'react';
+import { useContext } from 'react';
+import { ThemeContext } from '../../lib/context/AppThemeContext';
+import { darkModePalette, lightModePalette } from '../../lib/palette';
+
+export default function Interactive() {
+ const { mode } = useContext(ThemeContext);
+
+ const palette = mode === 'dark' ? darkModePalette : lightModePalette;
+ const interactiveColors = palette.interactive;
+
+ const [snackbarOpen, setSnackbarOpen] = React.useState(false);
+ const [copiedText, setCopiedText] = React.useState('');
+
+ const handleCopy = (value) => {
+ navigator.clipboard.writeText(value);
+ setCopiedText(value);
+ setSnackbarOpen(true);
+ };
+
+ const handleClose = (_event, reason) => {
+ if (reason === 'clickaway') return;
+ setSnackbarOpen(false);
+ };
+
+ return (
+
+
+
+ Interactive Tokens
+
+
+ Colors for buttons, links, and interactive elements with all states
+
+
+
+ {Object.entries(interactiveColors).map(([name, value]) => {
+ const isGradient = typeof value === 'string' && value.includes('gradient');
+ const displayValue = isGradient ? 'Gradient' : value;
+
+ return (
+ handleCopy(displayValue)}
+ >
+
+
+
+
+
+ {name.charAt(0).toUpperCase() + name.slice(1)}
+
+
+
+ {isGradient
+ ? 'Highlight surfaces'
+ : name === 'primary'
+ ? 'Default interactive'
+ : name === 'hover'
+ ? 'Hover state'
+ : name === 'pressed'
+ ? 'Pressed state'
+ : name === 'secondary'
+ ? 'Secondary elements'
+ : name === 'tertiary'
+ ? 'Tertiary elements'
+ : name === 'disabled'
+ ? 'Disabled state'
+ : ''}
+
+
+
+ {displayValue}
+
+
+ );
+ })}
+
+
+
+
+ Interactive Demo
+
+
+
+ {Object.entries(interactiveColors).map(([name, value]) => (
+
+ ))}
+
+
+
+
+
+
+ Copied: {copiedText}
+
+
+
+ );
+}
diff --git a/examples/next-12/components/Menus/index.jsx b/examples/next-12/components/Menus/index.jsx
new file mode 100644
index 000000000..644f675d5
--- /dev/null
+++ b/examples/next-12/components/Menus/index.jsx
@@ -0,0 +1,42 @@
+'use client';
+
+import { lightModePalette } from '@/lib/palette';
+import { Box, Button, Tooltip } from '@mui/material';
+import * as React from 'react';
+
+const navItems = ['Home', 'About', 'Services', 'Contact'];
+
+export default function NavigationMenu() {
+ const [activeIndex, setActiveIndex] = React.useState(0);
+
+ return (
+
+ {navItems.map((item, index) => (
+
+
+
+ ))}
+
+ );
+}
diff --git a/examples/next-12/components/ModeToggleButton.jsx b/examples/next-12/components/ModeToggleButton.jsx
index d1bfcc286..a4196a2a8 100644
--- a/examples/next-12/components/ModeToggleButton.jsx
+++ b/examples/next-12/components/ModeToggleButton.jsx
@@ -1,9 +1,9 @@
-import { toggleTheme } from '@/lib/redux/theme/themeSlice';
import { IconButton } from '@mui/material';
-import { useDispatch, useSelector } from 'react-redux';
+import { useContext } from 'react';
import DarkModeIcon from '@mui/icons-material/DarkMode';
import LightModeIcon from '@mui/icons-material/LightMode';
+import { ThemeContext } from '../lib/context/AppThemeContext';
function DynamicIcon({ mode }) {
if (mode === 'dark') {
@@ -14,14 +14,9 @@ function DynamicIcon({ mode }) {
}
function ModeToggleButton() {
- const dispatch = useDispatch(); // Initialize the useDispatch function
-
- // Use useSelector to get the darkTheme state from your Redux store
- const mode = useSelector((state) => (state.theme.darkTheme ? 'dark' : 'light'));
-
+ const { setMode, mode } = useContext(ThemeContext);
const toggleMode = () => {
- // Dispatch the toggleTheme action when the button is clicked
- dispatch(toggleTheme());
+ setMode((prev) => (prev === 'dark' ? 'light' : 'dark'));
};
return (
diff --git a/examples/next-12/components/Navigation/index.jsx b/examples/next-12/components/Navigation/index.jsx
new file mode 100644
index 000000000..943f02de1
--- /dev/null
+++ b/examples/next-12/components/Navigation/index.jsx
@@ -0,0 +1,187 @@
+'use client';
+
+import { Alert, Box, Container, Paper, Snackbar, Tooltip, Typography } from '@mui/material';
+import * as React from 'react';
+import { darkModePalette, lightModePalette } from '../../lib/palette';
+
+import { useContext } from 'react';
+import { ThemeContext } from '../../lib/context/AppThemeContext';
+
+export default function Navigation() {
+ const { mode } = useContext(ThemeContext);
+
+ const palette = mode === 'dark' ? darkModePalette : lightModePalette;
+ const navColors = palette.navigation;
+
+ const [snackbarOpen, setSnackbarOpen] = React.useState(false);
+ const [copiedText, setCopiedText] = React.useState('');
+
+ const handleCopy = (value) => {
+ navigator.clipboard.writeText(value);
+ setCopiedText(value);
+ setSnackbarOpen(true);
+ };
+
+ const handleClose = (event, reason) => {
+ if (reason === 'clickaway') return;
+ setSnackbarOpen(false);
+ };
+
+ return (
+
+
+
+ Navigation Tokens
+
+
+ Colors for navigation bars, menu items, and navigation states
+
+
+
+ {Object.entries(navColors).map(([name, value]) => (
+ handleCopy(value)}
+ >
+
+
+
+
+
+ {name.charAt(0).toUpperCase() + name.slice(1)}
+
+
+
+ {name === 'primary'
+ ? 'Main nav background'
+ : name === 'secondary'
+ ? 'Secondary nav bg'
+ : name === 'active'
+ ? 'Active nav item'
+ : name === 'hover'
+ ? 'Nav item hover'
+ : ''}
+
+
+
+ {value}
+
+
+ ))}
+
+
+
+
+ Navigation Demo
+
+
+
+
+ • Primary Navigation
+
+
+
+ • Secondary Navigation
+
+
+
+
+
+
+
+ Copied: {copiedText}
+
+
+
+ );
+}
diff --git a/examples/next-12/components/Semantic/index.jsx b/examples/next-12/components/Semantic/index.jsx
new file mode 100644
index 000000000..bb482ed71
--- /dev/null
+++ b/examples/next-12/components/Semantic/index.jsx
@@ -0,0 +1,119 @@
+'use client';
+
+import { Alert, Box, Container, Grid, Paper, Snackbar, Typography } from '@mui/material';
+import { useContext, useState } from 'react';
+import { ThemeContext } from '../../lib/context/AppThemeContext';
+import { darkModePalette, lightModePalette } from '../../lib/palette';
+
+export default function SemanticColors() {
+ const { mode } = useContext(ThemeContext);
+
+ const palette = mode === 'dark' ? darkModePalette : lightModePalette;
+ const semanticGroups = palette.background;
+
+ const [snackbarOpen, setSnackbarOpen] = useState(false);
+ const [copiedText, setCopiedText] = useState('');
+
+ const handleCopy = (value) => {
+ navigator.clipboard.writeText(value);
+ setCopiedText(value);
+ setSnackbarOpen(true);
+ };
+
+ const handleClose = () => setSnackbarOpen(false);
+
+ const descriptions = {
+ brand: 'Primary brand color with all interaction states',
+ cta: 'High-impact CTA elements with interaction states',
+ info: 'Informational UI states',
+ success: 'Positive feedback states',
+ warning: 'Warning and caution states',
+ error: 'Error and critical states'
+ };
+
+ const layout = [['brand'], ['cta'], ['info', 'success'], ['warning', 'error']];
+
+ return (
+
+ {layout.map((row, rowIndex) => (
+
+ {row.map((groupName) => {
+ const states = semanticGroups[groupName];
+ if (!states) return null;
+
+ return (
+
+
+
+ {groupName.charAt(0).toUpperCase() + groupName.slice(1)} Colors
+
+
+
+ {descriptions[groupName]}
+
+
+
+ {groupName.charAt(0).toUpperCase() + groupName.slice(1)} States
+
+
+
+ {Object.entries(states).map(([state, value]) => (
+ handleCopy(value)}
+ sx={{
+ px: 2,
+ py: 1,
+ borderRadius: '6px',
+ background: value,
+ color: palette.text.onPrimary,
+ fontWeight: 600,
+ fontSize: '0.8rem',
+ cursor: 'pointer',
+ boxShadow: 1,
+ userSelect: 'none'
+ }}
+ >
+ {state.charAt(0).toUpperCase() + state.slice(1)}
+
+ ))}
+
+
+
+ );
+ })}
+
+ ))}
+
+
+
+ Copied: {copiedText}
+
+
+
+ );
+}
diff --git a/examples/next-12/components/Surface/index.jsx b/examples/next-12/components/Surface/index.jsx
new file mode 100644
index 000000000..023f830f6
--- /dev/null
+++ b/examples/next-12/components/Surface/index.jsx
@@ -0,0 +1,212 @@
+'use client';
+
+import { Alert, Box, Container, Paper, Snackbar, Typography } from '@mui/material';
+import * as React from 'react';
+import { useContext } from 'react';
+
+import { ThemeContext } from '../../lib/context/AppThemeContext';
+import { darkModePalette, lightModePalette } from '../../lib/palette';
+
+export default function Surface() {
+ const { mode } = useContext(ThemeContext);
+
+ const palette = mode === 'dark' ? darkModePalette : lightModePalette;
+ const surfaceColors = palette.surface;
+
+ const [snackbarOpen, setSnackbarOpen] = React.useState(false);
+ const [copiedText, setCopiedText] = React.useState('');
+
+ const handleCopy = (value) => {
+ navigator.clipboard.writeText(value);
+ setCopiedText(value);
+ setSnackbarOpen(true);
+ };
+
+ const handleClose = (_event, reason) => {
+ if (reason === 'clickaway') return;
+ setSnackbarOpen(false);
+ };
+
+ const descriptions = {
+ primary: 'Main page background',
+ secondary: 'Slightly darker background',
+ tertiary: 'Even darker background',
+ elevated: 'Floating elements',
+ overlay: 'Modal backdrops',
+ inverse: 'High contrast alt',
+ gradient: 'Highlight surfaces'
+ };
+
+ return (
+
+
+
+ Surface Tokens
+
+
+ Background surfaces with proper contrast for text and interactive elements
+
+
+
+ {Object.entries(surfaceColors).map(([name, value]) => {
+ const isGradient = typeof value === 'string' && value.includes('gradient');
+ const displayValue = isGradient ? 'Gradient' : value;
+
+ return (
+ handleCopy(displayValue)}
+ >
+
+
+
+ {name.charAt(0).toUpperCase() + name.slice(1)}
+
+
+
+ {descriptions[name] || ''}
+
+
+
+ {displayValue}
+
+
+ );
+ })}
+
+
+
+
+ Surface Demo
+
+
+
+
+ • Primary Surface
+
+
+
+ • Secondary Surface
+
+
+
+ • Elevated Surface
+
+
+
+
+
+
+
+ Copied: {copiedText}
+
+
+
+ );
+}
diff --git a/examples/next-12/components/Tabs/index.jsx b/examples/next-12/components/Tabs/index.jsx
new file mode 100644
index 000000000..b0bff084b
--- /dev/null
+++ b/examples/next-12/components/Tabs/index.jsx
@@ -0,0 +1,63 @@
+import AddReactionOutlinedIcon from '@mui/icons-material/AddReactionOutlined';
+import BackHandOutlinedIcon from '@mui/icons-material/BackHandOutlined';
+import CropSquareOutlinedIcon from '@mui/icons-material/CropSquareOutlined';
+import FormatColorTextOutlinedIcon from '@mui/icons-material/FormatColorTextOutlined';
+import NavigationOutlinedIcon from '@mui/icons-material/NavigationOutlined';
+import PaletteOutlinedIcon from '@mui/icons-material/PaletteOutlined';
+import RemoveRedEyeOutlinedIcon from '@mui/icons-material/RemoveRedEyeOutlined';
+import { Tab, Tabs } from '@mui/material';
+import { useContext } from 'react';
+import { ThemeContext } from '../../lib/context/AppThemeContext';
+import { darkModePalette, lightModePalette } from '../../lib/palette';
+
+export default function TabMenu({ value, setValue }) {
+ const { mode } = useContext(ThemeContext);
+
+ const palette = mode === 'dark' ? darkModePalette : lightModePalette;
+
+ const handleChange = (event, newValue) => {
+ setValue(newValue);
+ };
+
+ return (
+
+ {[
+ { icon: , label: 'Surfaces' },
+ { icon: , label: 'Interactive' },
+ { icon: , label: 'Navigation' },
+ { icon: , label: 'Semantic' },
+ { icon: , label: 'Text' },
+ { icon: , label: 'Borders & Icons' },
+ { icon: , label: 'All Colors' }
+ ].map((tab, i) => (
+
+ ))}
+
+ );
+}
diff --git a/examples/next-12/components/Text/index.jsx b/examples/next-12/components/Text/index.jsx
new file mode 100644
index 000000000..335baf3f6
--- /dev/null
+++ b/examples/next-12/components/Text/index.jsx
@@ -0,0 +1,156 @@
+'use client';
+
+import { Alert, Box, Container, Paper, Snackbar, Typography } from '@mui/material';
+import { useContext, useState } from 'react';
+import { ThemeContext } from '../../lib/context/AppThemeContext';
+import { darkModePalette, lightModePalette } from '../../lib/palette';
+
+export default function TextColors() {
+ const { mode } = useContext(ThemeContext);
+ const palette = mode === 'dark' ? darkModePalette : lightModePalette;
+ const textColors = palette.text;
+
+ const [copiedColor, setCopiedColor] = useState('');
+ const [snackbarOpen, setSnackbarOpen] = useState(false);
+
+ const handleCopy = (color) => {
+ navigator.clipboard.writeText(color);
+ setCopiedColor(color);
+ setSnackbarOpen(true);
+ };
+
+ return (
+
+
+
+ Text Colors
+
+
+
+ Typography colors for different content hierarchy and semantic meaning
+
+
+
+ {[
+ { key: 'default', label: 'Primary text' },
+ { key: 'secondary', label: 'Secondary text' },
+ { key: 'tertiary', label: 'Tertiary text' },
+ { key: 'disabled', label: 'Disabled text' },
+ { key: 'inverse', label: 'Inverse text' },
+ { key: 'brand', label: 'Brand text' }
+ ].map(({ key, label }) => (
+ handleCopy(textColors[key])}
+ sx={{
+ width: 120,
+ p: 1.5,
+ textAlign: 'center',
+ borderRadius: '10px',
+ boxShadow: `0px 2px 8px ${palette.surface?.overlay ?? 'rgba(0,0,0,0.12)'}`,
+ cursor: 'pointer',
+ backgroundColor: palette.surface?.elevated
+ }}
+ >
+
+
+ {key.charAt(0).toUpperCase() + key.slice(1)}
+
+
+ {label}
+
+
+ {textColors[key]}
+
+
+ ))}
+
+
+
+
+
+ Semantic Text Colors
+
+
+ Info text color
+
+
+ Success text color
+
+
+ Warning text color
+
+
+ Error text color
+
+
+
+
+
+ Text Hierarchy
+
+
+ Primary Heading
+
+
+ Secondary Heading
+
+
+ Tertiary body text
+
+
+ Disabled text
+
+
+
+
+
+ setSnackbarOpen(false)}
+ anchorOrigin={{ vertical: 'bottom', horizontal: 'center' }}
+ >
+
+ Copied {copiedColor} to clipboard!
+
+
+
+ );
+}
diff --git a/examples/next-12/lib/colors/colors.ts b/examples/next-12/lib/colors/colors.ts
new file mode 100644
index 000000000..fa3c75540
--- /dev/null
+++ b/examples/next-12/lib/colors/colors.ts
@@ -0,0 +1,392 @@
+import { alpha } from '@mui/material';
+
+/**
+ * Define the base common colors to derive from
+ */
+export const KEPPEL = '#00B39F';
+
+export const DARK_KEPPEL = '#00A18F';
+export const CARIBBEAN_GREEN = '#00D3A9';
+export const TEAL_BLUE = '#477E96';
+export const DARK_TEAL_BLUE = '#3B687B';
+export const CHARCOAL = '#3C494F';
+export const BLACK = '#000000';
+export const MIDNIGHT_BLACK = '#111111';
+export const ALABASTER_WHITE = '#FAFAFA';
+export const WHITE = '#FFFFFF';
+export const ONYX_BLACK = '#1D1817';
+export const SLATE_BLUE = '#3C494F';
+export const TRANSPARENT_WHITE = '#ffffff66';
+export const SILVER_GRAY = '#E6E6E6';
+export const DARK_SHADE_GRAY = '#222222';
+export const CHINESE_SILVER = '#CCCCCC'; // same as lightGray
+export const SAFFRON = '#EBC017';
+export const GRAY = '#696969';
+export const GRAY97 = '#f7f7f7';
+export const DARK_SLATE_GRAY = '#294957';
+export const LIGHT_GRAY = '#d3d3d3'; // same as tableBorder
+export const STEEL_GRAY = '#525252';
+export const ALICE_BLUE = '#EBEFF1';
+export const LIMED_SPRUCE = '#3C494F';
+export const WHITESMOKE = '#F5F5F5';
+export const PRIMARY_COLOR = '#647881';
+export const DARK_PRIMARY_COLOR = '#51636B';
+export const SLATE_GRAY = '#7a848e';
+export const DARK_JUNGLE_GREEN = '#1E2117';
+export const CASPER = '#b1b6b8';
+export const EERIE_BLACK = '#b1b6b8';
+export const PATTERNS_BLUE = '#D9E0E2';
+export const GREEN = 'green';
+export const DARK_TEAL = '#455a64';
+export const LIGHT_TEAL = '#607d8b';
+export const CULTURED = '#F6F8F8';
+export const ANAKIWA = '#9EFFEC';
+export const NOT_FOUND = '#666666';
+export const YELLOW_SEA = '#F0A303';
+export const PINE_GREEN = '#008071';
+export const DARK_BLUE_GRAY = '#263238';
+export const BUTTON_MODAL = '#396679';
+export const BUTTON_MODAL_DARK = '#202020';
+export const SLIGHT_BLUE = '#548194';
+export const SLIGHT_BLACK_2 = '#23365f';
+export const SNOW_WHITE = '#FBFBFB';
+export const MEDIUM_GREY = '#DDDDDD';
+export const common = {
+ black: BLACK,
+ white: WHITE
+};
+
+export const keppel = {
+ 70: '#daf3eb',
+ 60: '#93E6D1',
+ 50: '#41CCB3',
+ 40: '#00B39F',
+
+ 30: '#007763',
+ 20: '#006661',
+ 10: '#00403f'
+};
+
+export const carribean = {
+ 70: '#E6FFF6',
+ 60: '#A3FFE0',
+ 50: '#78FAD3',
+ 40: '#00D3A9',
+ 30: '#00AD90',
+ 20: '#006157',
+ 10: '#003B37'
+};
+
+export const saffron = {
+ 70: '#FFFEE6',
+ 60: '#fffbbd',
+ 50: '#ffeb6b',
+ 40: '#ebc017',
+ 30: '#c4990a',
+ 20: '#785400',
+ 10: '#523600'
+};
+
+/**
+ * Grayscale Colors
+ */
+export const charcoal = {
+ 110: '#525252',
+ 100: '#FDFDFD',
+ 90: '#EAEDEE',
+ 80: '#D2D8DA',
+ 70: '#B1B9BC',
+ 60: '#8C999E',
+ 50: '#647176',
+ 40: '#3C494F',
+ 30: '#28353A',
+ 20: '#142126',
+
+ 10: '#000D12'
+};
+
+export const gray = {
+ 10: '#1A1A1A',
+ 20: '#212121',
+ 30: '#303030'
+};
+
+export const accentGrey = {
+ 100: '#F6F8F8',
+ 90: '#E8EFF3',
+ 80: '#C9DBE3',
+ 70: '#ABBDC5',
+ 60: '#8D9FA7',
+ 50: '#6F8189',
+ 40: '#51636B',
+ 30: '#3D4F57',
+ 20: '#293B43',
+ 10: '#15272F'
+};
+
+/**
+ * Function Colors
+ */
+export const blue = {
+ 70: '#F0FBFF',
+ 60: '#9EDDFF',
+ 50: '#75CAFF',
+ 40: '#2196F3',
+ 30: '#1272CC',
+ 20: '#0754A6',
+ 10: '#003980'
+};
+
+export const green = {
+ 70: '#EFFCED',
+ 60: '#B2E3AF',
+ 50: '#5BC95B',
+ 40: '#36BC3B',
+ 30: '#15701E',
+ 20: '#0A4A13',
+ 10: '#05340A'
+};
+
+export const yellow = {
+ 70: '#FFFCE6',
+ 60: '#FFE57D',
+ 50: '#FFC72B',
+ 40: '#FFB302',
+ 30: '#D99100',
+ 20: '#8C5400',
+ 10: '#663A00'
+};
+
+export const red = {
+ 70: '#FFF0F0',
+ 60: '#FFB3B9',
+ 50: '#FF6179',
+ 40: '#ff385c',
+ 30: '#B3153D',
+ 20: '#8C0a2F',
+ 10: '#660624'
+};
+
+export const redOrange = {
+ 70: '#E8BEB3',
+ 60: '#E1A999',
+ 50: '#D99380',
+ 40: '#D17D66',
+ 30: '#CA684D',
+ 20: '#C25233',
+ 10: '#BB3D1A'
+};
+
+export const defaultPalette = {
+ keppel: ['#DAF3EB', '#93E6D1', '#41CCB3', '#00B39F', '#007763', '#006661', '#00403F']
+};
+
+type BackgroundColor = {
+ [key in
+ | 'default'
+ | 'secondary'
+ | 'tertiary'
+ | 'hover'
+ | 'brand-default'
+ | 'info-default'
+ | 'success-default'
+ | 'warning-default'
+ | 'error-default']: string;
+};
+
+export const background: BackgroundColor = {
+ default: charcoal[100],
+ secondary: accentGrey[90],
+ tertiary: accentGrey[80],
+ hover: charcoal[90],
+ 'brand-default': accentGrey[40],
+ 'info-default': blue[30],
+ 'success-default': green[30],
+ 'warning-default': yellow[30],
+ 'error-default': red[30]
+};
+
+interface TextColor {
+ default: string;
+ secondary: string;
+ tertiary: string;
+ inverse: string;
+ brand: string;
+ info: string;
+ success: string;
+ warning: string;
+ error: string;
+}
+
+export const text: TextColor = {
+ default: charcoal[10],
+ secondary: charcoal[90],
+ tertiary: charcoal[50],
+ inverse: charcoal[100],
+ brand: accentGrey[40],
+ info: blue[30],
+ success: green[30],
+ warning: yellow[30],
+ error: red[30]
+};
+
+interface BorderColor {
+ default: string;
+ strong: string;
+ brand: string;
+}
+
+export const border: BorderColor = {
+ default: charcoal[90],
+ strong: charcoal[50],
+ brand: accentGrey[40]
+};
+
+/**
+ * Use the colors below that provides the action that you want to use
+ */
+export const primaryColor = {
+ main: PRIMARY_COLOR,
+ dark: DARK_PRIMARY_COLOR
+};
+
+export const patternsBlue = {
+ main: PATTERNS_BLUE
+};
+
+export const cultured = {
+ main: CULTURED
+};
+
+export const darkTeal = {
+ main: DARK_TEAL,
+ dark: LIGHT_TEAL
+};
+
+export const actionIcon = {
+ main: darkTeal.main,
+ hover: darkTeal.dark
+};
+
+export const tabMenu = {
+ main: darkTeal.main,
+ hover: darkTeal.dark
+};
+
+export const darkSlateGray = {
+ main: DARK_SLATE_GRAY,
+ dark: alpha(DARK_SLATE_GRAY, 0.65)
+};
+
+export const eerieBlack = {
+ main: EERIE_BLACK,
+ light: alpha(EERIE_BLACK, 0.8),
+ lighter: alpha(EERIE_BLACK, 0.6)
+};
+
+export const casper = {
+ main: CASPER,
+ light: alpha(CASPER, 0.8),
+ lighter: alpha(CASPER, 0.6)
+};
+
+export const slateGray = {
+ main: SLATE_GRAY,
+ light: alpha(SLATE_GRAY, 0.8)
+};
+
+export const white = {
+ main: WHITE,
+ light: alpha(WHITE, 0.8),
+ lighter: alpha(WHITE, 0.6)
+};
+
+export const black = {
+ main: BLACK,
+ light: alpha(BLACK, 0.8),
+ lighter: alpha(BLACK, 0.6),
+ dark: alpha(BLACK, 0.2)
+};
+
+export const jungleGreen = {
+ main: DARK_JUNGLE_GREEN,
+ light: alpha(DARK_JUNGLE_GREEN, 0.8),
+ lighter: alpha(DARK_JUNGLE_GREEN, 0.6)
+};
+
+export const buttonDisabled = {
+ main: '#b0bec5'
+};
+
+export const tableBackgroundHover = {
+ main: '#ADD8E6'
+};
+
+export const DELETE = '#8F1F00';
+export const HOVER_DELETE = '#b32700';
+
+export const redDelete = {
+ main: DELETE,
+ light: HOVER_DELETE
+};
+
+export const buttonDelete = {
+ main: redDelete.main,
+ hover: redDelete.light
+};
+
+export const darkModalGradient = {
+ header: `linear-gradient(90deg, ${charcoal[30]} 0%, ${accentGrey[30]} 100%)`,
+ fotter: `linear-gradient(90deg, ${accentGrey[30]} 0%, ${charcoal[30]} 100%)`
+};
+
+export const lightModalGradient = {
+ header: `linear-gradient(90deg, ${TEAL_BLUE} 0%, ${DARK_TEAL_BLUE} 100%)`,
+ fotter: `linear-gradient(90deg, ${DARK_TEAL_BLUE} 0%, ${TEAL_BLUE} 100%)`
+};
+/**
+ * Notification Colors
+ */
+export const notificationColors = {
+ info: {
+ main: '#2196F3'
+ },
+ error: {
+ main: '#F91313',
+ dark: '#B32700'
+ },
+ warning: {
+ main: '#F0A303',
+ light: '#E75225'
+ },
+ success: {
+ main: '#206D24'
+ }
+};
+
+export const CONNECTED = KEPPEL;
+export const REGISTERED = TEAL_BLUE;
+export const DISCOVERED = notificationColors.info.main;
+export const IGNORED = primaryColor.dark;
+export const DELETED = redDelete.main;
+export const MAINTAINENCE = notificationColors.warning.main;
+export const DISCONNECTED = notificationColors.warning.light;
+
+export const connected = {
+ main: CONNECTED
+};
+
+export const anakiwa = {
+ main: ANAKIWA
+};
+
+/**
+ * Social media or equivalent icons colors
+ */
+export const socialIcons = {
+ slack: '#4A154B',
+ twitter: '#1da1f2',
+ github: '#24292e',
+ youtube: '#ff0000',
+ docker: '#2496ed'
+};
diff --git a/examples/next-12/lib/colors/index.ts b/examples/next-12/lib/colors/index.ts
new file mode 100644
index 000000000..3d1a19607
--- /dev/null
+++ b/examples/next-12/lib/colors/index.ts
@@ -0,0 +1,76 @@
+export {
+ ALABASTER_WHITE,
+ ALICE_BLUE,
+ ANAKIWA,
+ BLACK,
+ CARIBBEAN_GREEN,
+ CASPER,
+ CHARCOAL,
+ CHINESE_SILVER,
+ CONNECTED,
+ CULTURED,
+ DARK_BLUE_GRAY,
+ DARK_PRIMARY_COLOR,
+ DARK_SHADE_GRAY,
+ DARK_SLATE_GRAY,
+ DARK_TEAL,
+ DELETED,
+ DISCONNECTED,
+ DISCOVERED,
+ EERIE_BLACK,
+ GRAY,
+ GRAY97,
+ GREEN,
+ IGNORED,
+ KEPPEL,
+ LIGHT_GRAY,
+ LIGHT_TEAL,
+ LIMED_SPRUCE,
+ MAINTAINENCE,
+ MIDNIGHT_BLACK,
+ NOT_FOUND,
+ ONYX_BLACK,
+ PATTERNS_BLUE,
+ PRIMARY_COLOR,
+ REGISTERED,
+ SAFFRON,
+ SILVER_GRAY,
+ SLATE_BLUE,
+ TEAL_BLUE,
+ TRANSPARENT_WHITE,
+ WHITE,
+ WHITESMOKE,
+ YELLOW_SEA,
+ accentGrey,
+ actionIcon,
+ anakiwa,
+ black,
+ blue,
+ buttonDelete,
+ buttonDisabled,
+ carribean,
+ casper,
+ charcoal,
+ common,
+ connected,
+ cultured,
+ darkSlateGray,
+ darkTeal,
+ eerieBlack,
+ gray,
+ green,
+ jungleGreen,
+ keppel,
+ notificationColors,
+ patternsBlue,
+ primaryColor,
+ red,
+ redDelete,
+ saffron,
+ slateGray,
+ socialIcons,
+ tabMenu,
+ tableBackgroundHover,
+ white,
+ yellow
+} from './colors';
diff --git a/examples/next-12/lib/context/AppThemeContext.jsx b/examples/next-12/lib/context/AppThemeContext.jsx
new file mode 100644
index 000000000..787cf3b26
--- /dev/null
+++ b/examples/next-12/lib/context/AppThemeContext.jsx
@@ -0,0 +1,60 @@
+'use client';
+import { CacheProvider } from '@emotion/react';
+import { CssBaseline, ThemeProvider, createTheme } from '@mui/material';
+import { useRouter } from 'next/router';
+import { createContext, useMemo, useState } from 'react';
+import createEmotionCache from '../../styles/createEmotionCache';
+import { darkTheme, lightTheme } from '../../styles/themes/theme';
+import { darkModePalette, lightModePalette } from '../palette';
+
+const clientSideEmotionCache = createEmotionCache();
+
+export const ThemeContext = createContext({
+ mode: 'light',
+ setMode: () => {}
+});
+export function AppThemeContext({ children, emotionCache = clientSideEmotionCache }) {
+ const router = useRouter();
+ const [mode, setMode] = useState('light'); // light or dark
+
+ const theme = useMemo(
+ () =>
+ createTheme({
+ palette: {
+ mode,
+ primary: {
+ main:
+ router.pathname === '/themes-explorer'
+ ? mode === 'light'
+ ? lightModePalette.surface.primary // just a color string
+ : darkModePalette.surface.primary
+ : mode === 'light'
+ ? lightTheme.palette.primary.main
+ : darkTheme.palette.primary.main
+ },
+
+ secondary: {
+ main: '#EE5351'
+ },
+ background: {
+ ...(mode === 'light' ? lightTheme.palette.background : darkTheme.palette.background)
+ },
+ text: {
+ ...(mode === 'light' ? lightTheme.palette.text : darkTheme.palette.text)
+ }
+ }
+ }),
+ [mode]
+ );
+
+ return (
+
+
+
+
+ {children}
+
+
+
+ );
+}
diff --git a/examples/next-12/lib/palette.ts b/examples/next-12/lib/palette.ts
new file mode 100644
index 000000000..54350370f
--- /dev/null
+++ b/examples/next-12/lib/palette.ts
@@ -0,0 +1,571 @@
+import { PaletteOptions, alpha } from '@mui/material';
+import * as Colors from './colors/colors';
+
+declare module '@mui/material/styles' {
+ // Defines the interaction color options used in the palette.
+ interface Interactiveness {
+ default: string;
+ hover: string;
+ disabled?: string;
+ pressed: string;
+ secondary: string;
+ tertiary: string;
+ }
+ // Defines the extended background color options used in the palette.
+ interface TypeBackground {
+ secondary?: string;
+ supplementary?: string;
+ graphics?: {
+ default: string;
+ };
+ tabs?: string;
+ elevatedComponents?: string;
+ card?: string;
+ tertiary?: string;
+ hover?: string;
+ blur?: {
+ heavy: string;
+ light: string;
+ };
+ //additional color palette {neutral}
+ neutral?: {
+ default: string;
+ hover: string;
+ pressed: string;
+ };
+ constant?: {
+ disabled: string;
+ white: string;
+ table: string;
+ };
+ inverse?: string;
+ brand?: Interactiveness;
+ cta?: Interactiveness;
+ info?: Interactiveness;
+ success?: Interactiveness;
+ warning?: Interactiveness;
+ error?: Interactiveness;
+ code?: string;
+ surfaces?: string;
+
+ appNavigationBar?: string;
+ secondaryAppNavigationBar?: string;
+ }
+
+ // Defines the extended text color options used in the palette.
+ interface TypeText {
+ default?: string;
+ secondary: string;
+ tertiary?: string;
+ disabled: string;
+ inverse?: string;
+ brand?: string;
+ info?: string;
+ success?: string;
+ warning?: string;
+ error?: string;
+ neutral?: {
+ default: string;
+ alt: string;
+ };
+ constant?: {
+ white: string;
+ disabled: string;
+ };
+ }
+
+ // Defines the color options for the palette
+ interface PaletteColor {
+ secondary?: string;
+ supplementary?: string;
+ blur?: {
+ heavy: string;
+ light: string;
+ };
+ neutral?: {
+ default: string;
+ hover: string;
+ pressed: string;
+ alt: string;
+ };
+ constant?: {
+ white: string;
+ disabled: string;
+ table: string;
+ };
+ inverse?: string;
+ brand?: Interactiveness;
+ cta?: Interactiveness;
+ info?: Interactiveness;
+ success?: Interactiveness;
+ warning?: Interactiveness;
+ error?: Interactiveness;
+ code?: string;
+ strong?: string;
+ normal?: string;
+ disabled?: string;
+ surfaces?: string;
+ }
+
+ // Defines the simple palette color options.
+ interface SimplePaletteColorOptions {
+ secondary?: string;
+ supplementary?: string;
+ blur?: {
+ heavy: string;
+ light: string;
+ };
+ neutral?: {
+ default: string;
+ hover: string;
+ pressed: string;
+ alt: string;
+ };
+ constant?: {
+ white: string;
+ disabled: string;
+ table: string;
+ };
+ inverse?: string;
+ brand?: Interactiveness;
+ cta?: Interactiveness;
+ info?: Interactiveness;
+ success?: Interactiveness;
+ warning?: Interactiveness;
+ error?: Interactiveness;
+ code?: string;
+ strong?: string;
+ normal?: string;
+ disabled?: string;
+ surfaces?: string;
+ }
+
+ /* Defines the palette containing border and icon color options.
+ To define any additional custom color options, you can extend the interface here.
+ */
+ interface Palette {
+ surface: SurfaceTokens;
+ interactive: InteractiveTokens;
+ navigation: NavigationTokens;
+ border: {
+ default: string;
+ strong: string;
+ brand: string;
+ normal: string;
+ neutral?: {
+ default: string;
+ alt: string;
+ };
+ };
+ icon: {
+ default: string;
+ secondary: string;
+ brand: string;
+ inverse: string;
+ weather: string;
+ disabled: string;
+ neutral?: {
+ default: string;
+ alt: string;
+ };
+ };
+ }
+
+ // surface tokens need to have enough contrast
+ // with text and interactive elements
+ type SurfaceTokens = {
+ /** main page background, content containers (pure bg color) */
+ primary: string;
+
+ /** secondary surfaces (slightly darker bg) */
+ secondary: string;
+
+ /** tertiary surfaces (even darker bg) */
+ tertiary: string;
+
+ /** floating elements with depth (bg + shadow) */
+ elevated: string;
+
+ /** modal backdrops (semi-transparent bg) */
+ overlay: string;
+
+ /** highlight surfaces (eg. modal headers , tabs, ) */
+ tint: string;
+
+ /** high contrast alternative (fg as bg) */
+ inverse: string;
+ };
+
+ type InteractiveTokens = {
+ /** default interactive elements (primary color) */
+ primary: string;
+
+ /** hover state for interactive elements (primary hover tint) */
+ hover: string;
+
+ /** disabled state for interactive elements (primary disabled tint) */
+ disabled?: string;
+
+ /** pressed state for interactive elements (primary pressed tint) */
+ pressed: string;
+
+ /** secondary interactive elements (secondary color) */
+ secondary: string;
+
+ /** tertiary interactive elements (tertiary color) */
+ tertiary: string;
+ };
+
+ type NavigationTokens = {
+ /** main navigation bar background */
+ primary: string;
+
+ /** secondary navigation bar background */
+ secondary: string;
+
+ /** active navigation item background */
+ active: string;
+
+ /** hover state for navigation items */
+ hover: string;
+ };
+
+ // Defines the options available for the palette.
+ interface PaletteOptions {
+ surface: SurfaceTokens;
+ interactive: InteractiveTokens;
+ navigation: NavigationTokens;
+
+ border: {
+ default: string;
+ strong: string;
+ brand: string;
+ normal: string;
+ neutral?: {
+ default: string;
+ alt: string;
+ };
+ };
+
+ icon: {
+ default: string;
+ dualTone?: string; // For icons with two colors
+ dualToneInverse?: string; // For icons with two colors in inverse mode (eg on primary colored bg)
+ secondary: string;
+ brand: string;
+ inverse: string;
+ weather: string;
+ disabled: string;
+ neutral?: {
+ default: string;
+ alt: string;
+ };
+ };
+ }
+}
+
+export type ThemePalette = PaletteOptions;
+
+export const lightModePalette: PaletteOptions = {
+ surface: {
+ primary: Colors.charcoal[100],
+ secondary: Colors.charcoal[90],
+ tertiary: Colors.charcoal[80],
+ elevated: Colors.WHITE,
+ overlay: alpha(Colors.charcoal[90], 0.8),
+ inverse: Colors.charcoal[10],
+ tint: `linear-gradient(90deg, ${Colors.TEAL_BLUE} 0%, ${Colors.DARK_TEAL} 100%)`
+ },
+
+ interactive: {
+ primary: Colors.KEPPEL,
+ hover: Colors.keppel[50],
+ disabled: Colors.charcoal[90],
+ pressed: Colors.keppel[60],
+ secondary: Colors.keppel[40],
+ tertiary: Colors.keppel[70]
+ },
+
+ navigation: {
+ primary: '#252e31',
+ secondary: '#294957',
+ active: Colors.KEPPEL,
+ hover: Colors.keppel[50]
+ },
+
+ primary: {
+ main: Colors.KEPPEL
+ },
+ secondary: {
+ main: Colors.charcoal[40]
+ },
+ background: {
+ default: Colors.charcoal[100],
+ secondary: Colors.accentGrey[90],
+ tertiary: Colors.accentGrey[80],
+ tabs: Colors.accentGrey[100], // TODO: Make this name or token to more genric
+ card: Colors.charcoal[100],
+ elevatedComponents: Colors.WHITE,
+ hover: Colors.charcoal[90],
+ supplementary: Colors.accentGrey[40],
+ blur: {
+ heavy: alpha(Colors.charcoal[90], 0.8),
+ light: alpha(Colors.charcoal[90], 0.5)
+ },
+ neutral: {
+ default: Colors.charcoal[40],
+ hover: Colors.charcoal[30],
+ pressed: Colors.charcoal[20]
+ },
+ inverse: Colors.charcoal[10],
+ brand: {
+ default: Colors.keppel[40],
+ hover: Colors.keppel[50],
+ disabled: Colors.charcoal[90],
+ pressed: Colors.keppel[60],
+ secondary: Colors.keppel[50],
+ tertiary: Colors.keppel[70]
+ },
+ graphics: {
+ default: Colors.carribean[30]
+ },
+ cta: {
+ default: Colors.saffron[40],
+ hover: Colors.saffron[50],
+ pressed: Colors.saffron[60],
+ secondary: Colors.saffron[60],
+ tertiary: Colors.saffron[70]
+ },
+ info: {
+ default: Colors.blue[40],
+ hover: Colors.blue[20],
+ pressed: Colors.blue[10],
+ secondary: Colors.blue[60],
+ tertiary: Colors.blue[70]
+ },
+ success: {
+ default: Colors.KEPPEL,
+ hover: Colors.green[20],
+ pressed: Colors.green[10],
+ secondary: Colors.green[60],
+ tertiary: Colors.green[70]
+ },
+ warning: {
+ default: Colors.yellow[30],
+ hover: Colors.yellow[20],
+ pressed: Colors.yellow[10],
+ secondary: Colors.yellow[60],
+ tertiary: Colors.yellow[70]
+ },
+ error: {
+ default: Colors.red[30],
+ hover: Colors.red[20],
+ pressed: Colors.red[10],
+ secondary: Colors.red[60],
+ tertiary: Colors.red[70]
+ },
+ code: Colors.charcoal[90],
+
+ constant: {
+ white: Colors.accentGrey[100],
+ disabled: Colors.charcoal[70],
+ table: Colors.charcoal[100]
+ },
+ surfaces: Colors.accentGrey[100]
+ },
+ text: {
+ default: Colors.charcoal[10],
+ secondary: Colors.charcoal[40],
+ tertiary: Colors.charcoal[50],
+ disabled: Colors.charcoal[70],
+ inverse: Colors.charcoal[100],
+ brand: Colors.keppel[40],
+ info: Colors.blue[40],
+ success: Colors.green[30],
+ warning: Colors.yellow[30],
+ error: Colors.red[30],
+ neutral: {
+ default: Colors.charcoal[40],
+ alt: Colors.charcoal[40]
+ },
+ constant: {
+ white: Colors.charcoal[100],
+ disabled: Colors.charcoal[50]
+ }
+ },
+ border: {
+ default: Colors.charcoal[90],
+ strong: Colors.charcoal[30],
+ brand: Colors.keppel[40],
+ normal: Colors.charcoal[60],
+ neutral: {
+ default: Colors.charcoal[40],
+ alt: Colors.charcoal[40]
+ }
+ },
+ icon: {
+ default: Colors.accentGrey[10],
+ dualTone: Colors.KEPPEL,
+ dualToneInverse: Colors.charcoal[10],
+ secondary: Colors.charcoal[40],
+ brand: Colors.keppel[40],
+ inverse: Colors.charcoal[100],
+ weather: Colors.accentGrey[50],
+ disabled: Colors.charcoal[70],
+ neutral: {
+ default: Colors.charcoal[40],
+ alt: Colors.charcoal[40]
+ }
+ }
+};
+
+export const darkModePalette: PaletteOptions = {
+ surface: {
+ primary: Colors.charcoal[10],
+ secondary: Colors.charcoal[20],
+ tertiary: Colors.charcoal[30],
+ elevated: Colors.charcoal[40],
+ overlay: alpha(Colors.charcoal[20], 0.8),
+ inverse: Colors.WHITE,
+ tint: `linear-gradient(90deg, ${Colors.charcoal[30]} 0%, ${Colors.accentGrey[30]} 100%)`
+ },
+ interactive: {
+ primary: Colors.KEPPEL,
+ hover: Colors.keppel[50],
+ disabled: Colors.charcoal[30],
+ pressed: Colors.keppel[60],
+ secondary: Colors.keppel[20],
+ tertiary: Colors.keppel[10]
+ },
+
+ navigation: {
+ primary: Colors.charcoal[10],
+ secondary: Colors.charcoal[20],
+ active: Colors.KEPPEL,
+ hover: Colors.keppel[50]
+ },
+
+ primary: {
+ main: Colors.KEPPEL
+ },
+ secondary: {
+ main: Colors.charcoal[70]
+ },
+ background: {
+ default: Colors.charcoal[10],
+ secondary: Colors.accentGrey[20],
+ tertiary: Colors.accentGrey[30],
+ tabs: Colors.gray[10], // TODO: Make this name or token to more genric
+ card: Colors.gray[20],
+ elevatedComponents: Colors.gray[30],
+ hover: Colors.charcoal[20],
+ supplementary: Colors.accentGrey[40],
+ blur: {
+ heavy: alpha(Colors.charcoal[10], 0.8),
+ light: alpha(Colors.charcoal[10], 0.5)
+ },
+ neutral: {
+ default: Colors.accentGrey[100],
+ hover: Colors.charcoal[90],
+ pressed: Colors.charcoal[80]
+ },
+ brand: {
+ default: Colors.keppel[40],
+ hover: Colors.keppel[50],
+ disabled: Colors.charcoal[30],
+ pressed: Colors.keppel[60],
+ secondary: Colors.keppel[20],
+ tertiary: Colors.keppel[10]
+ },
+ graphics: {
+ default: Colors.carribean[40]
+ },
+ cta: {
+ default: Colors.saffron[40],
+ hover: Colors.saffron[50],
+ pressed: Colors.saffron[60],
+ secondary: Colors.saffron[20],
+ tertiary: Colors.saffron[10]
+ },
+ info: {
+ default: Colors.blue[40],
+ hover: Colors.blue[50],
+ pressed: Colors.blue[60],
+ secondary: Colors.blue[20],
+ tertiary: Colors.blue[10]
+ },
+ success: {
+ default: Colors.KEPPEL,
+ hover: Colors.green[50],
+ pressed: Colors.green[60],
+ secondary: Colors.green[20],
+ tertiary: Colors.green[10]
+ },
+ warning: {
+ default: Colors.yellow[40],
+ hover: Colors.yellow[50],
+ pressed: Colors.yellow[60],
+ secondary: Colors.yellow[20],
+ tertiary: Colors.yellow[10]
+ },
+ error: {
+ default: Colors.red[40],
+ hover: Colors.red[50],
+ pressed: Colors.red[60],
+ secondary: Colors.red[20],
+ tertiary: Colors.red[10]
+ },
+ code: Colors.charcoal[10],
+ constant: {
+ white: Colors.accentGrey[100],
+ disabled: Colors.charcoal[70],
+ table: '#363636'
+ },
+ surfaces: Colors.accentGrey[10]
+ },
+ text: {
+ default: Colors.charcoal[100],
+ secondary: Colors.charcoal[70],
+ tertiary: Colors.charcoal[60],
+ disabled: Colors.charcoal[60],
+ inverse: Colors.charcoal[10],
+ brand: Colors.keppel[40],
+ info: Colors.blue[40],
+ success: Colors.green[40],
+ warning: Colors.yellow[40],
+ error: Colors.red[40],
+ neutral: {
+ default: Colors.accentGrey[100],
+ alt: Colors.keppel[40]
+ },
+ constant: {
+ white: Colors.charcoal[100],
+ disabled: Colors.charcoal[50]
+ }
+ },
+ border: {
+ default: Colors.accentGrey[10],
+ strong: Colors.accentGrey[60],
+ brand: Colors.keppel[40],
+ normal: Colors.accentGrey[30],
+ neutral: {
+ default: Colors.accentGrey[100],
+ alt: Colors.keppel[40]
+ }
+ },
+
+ icon: {
+ default: Colors.charcoal[80],
+ secondary: Colors.charcoal[70],
+ dualTone: Colors.KEPPEL,
+ dualToneInverse: Colors.charcoal[100],
+ brand: Colors.keppel[40],
+ inverse: Colors.charcoal[10],
+ weather: Colors.saffron[40],
+ disabled: Colors.charcoal[50],
+ neutral: {
+ default: Colors.accentGrey[100],
+ alt: Colors.keppel[40]
+ }
+ }
+};
diff --git a/examples/next-12/lib/providers/AppThemeProvider.jsx b/examples/next-12/lib/providers/AppThemeProvider.jsx
deleted file mode 100644
index 63bd67467..000000000
--- a/examples/next-12/lib/providers/AppThemeProvider.jsx
+++ /dev/null
@@ -1,45 +0,0 @@
-import createEmotionCache from '@/styles/createEmotionCache';
-import { darkTheme, lightTheme } from '@/styles/themes/theme';
-import { CacheProvider } from '@emotion/react';
-import { CssBaseline, ThemeProvider, createTheme } from '@mui/material';
-import { useMemo } from 'react';
-import { useSelector } from 'react-redux';
-
-const clientSideEmotionCache = createEmotionCache();
-
-export function AppThemeProvider({ children, emotionCache = clientSideEmotionCache }) {
- // const dispatch = useDispatch();
-
- const mode = useSelector((state) => (state.theme.darkTheme ? 'dark' : 'light'));
-
- const theme = useMemo(
- () =>
- createTheme({
- palette: {
- mode,
- primary: {
- ...(mode === 'light' ? lightTheme.palette.primary : darkTheme.palette.primary)
- },
- secondary: {
- main: '#EE5351'
- },
- background: {
- ...(mode === 'light' ? lightTheme.palette.background : darkTheme.palette.background)
- },
- text: {
- ...(mode === 'light' ? lightTheme.palette.text : darkTheme.palette.text)
- }
- }
- }),
- [mode]
- );
-
- return (
-
-
-
- {children}
-
-
- );
-}
diff --git a/examples/next-12/lib/providers/ReduxProvider.jsx b/examples/next-12/lib/providers/ReduxProvider.jsx
deleted file mode 100644
index 4c87ff88e..000000000
--- a/examples/next-12/lib/providers/ReduxProvider.jsx
+++ /dev/null
@@ -1,6 +0,0 @@
-import { Provider } from 'react-redux';
-import store from '../redux/store';
-
-export function ReduxProvider({ children }) {
- return {children};
-}
diff --git a/examples/next-12/package-lock.json b/examples/next-12/package-lock.json
index 0d27b10f0..95f44f25b 100644
--- a/examples/next-12/package-lock.json
+++ b/examples/next-12/package-lock.json
@@ -18,8 +18,8 @@
"@reduxjs/toolkit": "^1.9.7",
"mui-datatables": "^4.3.0",
"next": "14",
- "react": "17",
- "react-dom": "17",
+ "react": "^18.3.1",
+ "react-dom": "^18.3.1",
"react-redux": "^8.1.3"
},
"devDependencies": {
@@ -546,9 +546,9 @@
}
},
"node_modules/@mui/core-downloads-tracker": {
- "version": "5.16.14",
- "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.16.14.tgz",
- "integrity": "sha512-sbjXW+BBSvmzn61XyTMun899E7nGPTXwqD9drm1jBUAvWEhJpPFIRxwQQiATWZnd9rvdxtnhhdsDxEGWI0jxqA==",
+ "version": "5.18.0",
+ "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.18.0.tgz",
+ "integrity": "sha512-jbhwoQ1AY200PSSOrNXmrFCaSDSJWP7qk6urkTmIirvRXDROkqe+QwcLlUiw/PrREwsIF/vm3/dAXvjlMHF0RA==",
"license": "MIT",
"funding": {
"type": "opencollective",
@@ -582,16 +582,16 @@
}
},
"node_modules/@mui/material": {
- "version": "5.16.14",
- "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.16.14.tgz",
- "integrity": "sha512-eSXQVCMKU2xc7EcTxe/X/rC9QsV2jUe8eLM3MUCPYbo6V52eCE436akRIvELq/AqZpxx2bwkq7HC0cRhLB+yaw==",
+ "version": "5.18.0",
+ "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.18.0.tgz",
+ "integrity": "sha512-bbH/HaJZpFtXGvWg3TsBWG4eyt3gah3E7nCNU8GLyRjVoWcA91Vm/T+sjHfUcwgJSw9iLtucfHBoq+qW/T30aA==",
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.23.9",
- "@mui/core-downloads-tracker": "^5.16.14",
- "@mui/system": "^5.16.14",
- "@mui/types": "^7.2.15",
- "@mui/utils": "^5.16.14",
+ "@mui/core-downloads-tracker": "^5.18.0",
+ "@mui/system": "^5.18.0",
+ "@mui/types": "~7.2.15",
+ "@mui/utils": "^5.17.1",
"@popperjs/core": "^2.11.8",
"@types/react-transition-group": "^4.4.10",
"clsx": "^2.1.0",
@@ -627,13 +627,13 @@
}
},
"node_modules/@mui/private-theming": {
- "version": "5.16.14",
- "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.16.14.tgz",
- "integrity": "sha512-12t7NKzvYi819IO5IapW2BcR33wP/KAVrU8d7gLhGHoAmhDxyXlRoKiRij3TOD8+uzk0B6R9wHUNKi4baJcRNg==",
+ "version": "5.17.1",
+ "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.17.1.tgz",
+ "integrity": "sha512-XMxU0NTYcKqdsG8LRmSoxERPXwMbp16sIXPcLVgLGII/bVNagX0xaheWAwFv8+zDK7tI3ajllkuD3GZZE++ICQ==",
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.23.9",
- "@mui/utils": "^5.16.14",
+ "@mui/utils": "^5.17.1",
"prop-types": "^15.8.1"
},
"engines": {
@@ -654,13 +654,14 @@
}
},
"node_modules/@mui/styled-engine": {
- "version": "5.16.14",
- "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.16.14.tgz",
- "integrity": "sha512-UAiMPZABZ7p8mUW4akDV6O7N3+4DatStpXMZwPlt+H/dA0lt67qawN021MNND+4QTpjaiMYxbhKZeQcyWCbuKw==",
+ "version": "5.18.0",
+ "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.18.0.tgz",
+ "integrity": "sha512-BN/vKV/O6uaQh2z5rXV+MBlVrEkwoS/TK75rFQ2mjxA7+NBo8qtTAOA4UaM0XeJfn7kh2wZ+xQw2HAx0u+TiBg==",
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.23.9",
"@emotion/cache": "^11.13.5",
+ "@emotion/serialize": "^1.3.3",
"csstype": "^3.1.3",
"prop-types": "^15.8.1"
},
@@ -686,16 +687,16 @@
}
},
"node_modules/@mui/system": {
- "version": "5.16.14",
- "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.16.14.tgz",
- "integrity": "sha512-KBxMwCb8mSIABnKvoGbvM33XHyT+sN0BzEBG+rsSc0lLQGzs7127KWkCA6/H8h6LZ00XpBEME5MAj8mZLiQ1tw==",
+ "version": "5.18.0",
+ "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.18.0.tgz",
+ "integrity": "sha512-ojZGVcRWqWhu557cdO3pWHloIGJdzVtxs3rk0F9L+x55LsUjcMUVkEhiF7E4TMxZoF9MmIHGGs0ZX3FDLAf0Xw==",
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.23.9",
- "@mui/private-theming": "^5.16.14",
- "@mui/styled-engine": "^5.16.14",
- "@mui/types": "^7.2.15",
- "@mui/utils": "^5.16.14",
+ "@mui/private-theming": "^5.17.1",
+ "@mui/styled-engine": "^5.18.0",
+ "@mui/types": "~7.2.15",
+ "@mui/utils": "^5.17.1",
"clsx": "^2.1.0",
"csstype": "^3.1.3",
"prop-types": "^15.8.1"
@@ -726,9 +727,9 @@
}
},
"node_modules/@mui/types": {
- "version": "7.2.21",
- "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.21.tgz",
- "integrity": "sha512-6HstngiUxNqLU+/DPqlUJDIPbzUBxIVHb1MmXP0eTWDIROiCR2viugXpEif0PPe2mLqqakPzzRClWAnK+8UJww==",
+ "version": "7.2.24",
+ "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.24.tgz",
+ "integrity": "sha512-3c8tRt/CbWZ+pEg7QpSwbdxOk36EfmhbKf6AGZsD1EcLDLTSZoxxJ86FVtcjxvjuhdyBiWKSTGZFaXCnidO2kw==",
"license": "MIT",
"peerDependencies": {
"@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0"
@@ -740,13 +741,13 @@
}
},
"node_modules/@mui/utils": {
- "version": "5.16.14",
- "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.16.14.tgz",
- "integrity": "sha512-wn1QZkRzSmeXD1IguBVvJJHV3s6rxJrfb6YuC9Kk6Noh9f8Fb54nUs5JRkKm+BOerRhj5fLg05Dhx/H3Ofb8Mg==",
+ "version": "5.17.1",
+ "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.17.1.tgz",
+ "integrity": "sha512-jEZ8FTqInt2WzxDV8bhImWBqeQRD99c/id/fq83H0ER9tFl+sfZlaAoCdznGvbSQQ9ividMxqSV2c7cC1vBcQg==",
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.23.9",
- "@mui/types": "^7.2.15",
+ "@mui/types": "~7.2.15",
"@types/prop-types": "^15.7.12",
"clsx": "^2.1.1",
"prop-types": "^15.8.1",
@@ -770,15 +771,15 @@
}
},
"node_modules/@next/env": {
- "version": "14.2.30",
- "resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.30.tgz",
- "integrity": "sha512-KBiBKrDY6kxTQWGzKjQB7QirL3PiiOkV7KW98leHFjtVRKtft76Ra5qSA/SL75xT44dp6hOcqiiJ6iievLOYug==",
+ "version": "14.2.32",
+ "resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.32.tgz",
+ "integrity": "sha512-n9mQdigI6iZ/DF6pCTwMKeWgF2e8lg7qgt5M7HXMLtyhZYMnf/u905M18sSpPmHL9MKp9JHo56C6jrD2EvWxng==",
"license": "MIT"
},
"node_modules/@next/swc-darwin-arm64": {
- "version": "14.2.30",
- "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.30.tgz",
- "integrity": "sha512-EAqfOTb3bTGh9+ewpO/jC59uACadRHM6TSA9DdxJB/6gxOpyV+zrbqeXiFTDy9uV6bmipFDkfpAskeaDcO+7/g==",
+ "version": "14.2.32",
+ "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.32.tgz",
+ "integrity": "sha512-osHXveM70zC+ilfuFa/2W6a1XQxJTvEhzEycnjUaVE8kpUS09lDpiDDX2YLdyFCzoUbvbo5r0X1Kp4MllIOShw==",
"cpu": [
"arm64"
],
@@ -792,9 +793,9 @@
}
},
"node_modules/@next/swc-darwin-x64": {
- "version": "14.2.30",
- "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.30.tgz",
- "integrity": "sha512-TyO7Wz1IKE2kGv8dwQ0bmPL3s44EKVencOqwIY69myoS3rdpO1NPg5xPM5ymKu7nfX4oYJrpMxv8G9iqLsnL4A==",
+ "version": "14.2.32",
+ "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.32.tgz",
+ "integrity": "sha512-P9NpCAJuOiaHHpqtrCNncjqtSBi1f6QUdHK/+dNabBIXB2RUFWL19TY1Hkhu74OvyNQEYEzzMJCMQk5agjw1Qg==",
"cpu": [
"x64"
],
@@ -808,9 +809,9 @@
}
},
"node_modules/@next/swc-linux-arm64-gnu": {
- "version": "14.2.30",
- "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.30.tgz",
- "integrity": "sha512-I5lg1fgPJ7I5dk6mr3qCH1hJYKJu1FsfKSiTKoYwcuUf53HWTrEkwmMI0t5ojFKeA6Vu+SfT2zVy5NS0QLXV4Q==",
+ "version": "14.2.32",
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.32.tgz",
+ "integrity": "sha512-v7JaO0oXXt6d+cFjrrKqYnR2ubrD+JYP7nQVRZgeo5uNE5hkCpWnHmXm9vy3g6foMO8SPwL0P3MPw1c+BjbAzA==",
"cpu": [
"arm64"
],
@@ -824,9 +825,9 @@
}
},
"node_modules/@next/swc-linux-arm64-musl": {
- "version": "14.2.30",
- "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.30.tgz",
- "integrity": "sha512-8GkNA+sLclQyxgzCDs2/2GSwBc92QLMrmYAmoP2xehe5MUKBLB2cgo34Yu242L1siSkwQkiV4YLdCnjwc/Micw==",
+ "version": "14.2.32",
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.32.tgz",
+ "integrity": "sha512-tA6sIKShXtSJBTH88i0DRd6I9n3ZTirmwpwAqH5zdJoQF7/wlJXR8DkPmKwYl5mFWhEKr5IIa3LfpMW9RRwKmQ==",
"cpu": [
"arm64"
],
@@ -840,9 +841,9 @@
}
},
"node_modules/@next/swc-linux-x64-gnu": {
- "version": "14.2.30",
- "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.30.tgz",
- "integrity": "sha512-8Ly7okjssLuBoe8qaRCcjGtcMsv79hwzn/63wNeIkzJVFVX06h5S737XNr7DZwlsbTBDOyI6qbL2BJB5n6TV/w==",
+ "version": "14.2.32",
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.32.tgz",
+ "integrity": "sha512-7S1GY4TdnlGVIdeXXKQdDkfDysoIVFMD0lJuVVMeb3eoVjrknQ0JNN7wFlhCvea0hEk0Sd4D1hedVChDKfV2jw==",
"cpu": [
"x64"
],
@@ -856,9 +857,9 @@
}
},
"node_modules/@next/swc-linux-x64-musl": {
- "version": "14.2.30",
- "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.30.tgz",
- "integrity": "sha512-dBmV1lLNeX4mR7uI7KNVHsGQU+OgTG5RGFPi3tBJpsKPvOPtg9poyav/BYWrB3GPQL4dW5YGGgalwZ79WukbKQ==",
+ "version": "14.2.32",
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.32.tgz",
+ "integrity": "sha512-OHHC81P4tirVa6Awk6eCQ6RBfWl8HpFsZtfEkMpJ5GjPsJ3nhPe6wKAJUZ/piC8sszUkAgv3fLflgzPStIwfWg==",
"cpu": [
"x64"
],
@@ -872,9 +873,9 @@
}
},
"node_modules/@next/swc-win32-arm64-msvc": {
- "version": "14.2.30",
- "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.30.tgz",
- "integrity": "sha512-6MMHi2Qc1Gkq+4YLXAgbYslE1f9zMGBikKMdmQRHXjkGPot1JY3n5/Qrbg40Uvbi8//wYnydPnyvNhI1DMUW1g==",
+ "version": "14.2.32",
+ "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.32.tgz",
+ "integrity": "sha512-rORQjXsAFeX6TLYJrCG5yoIDj+NKq31Rqwn8Wpn/bkPNy5rTHvOXkW8mLFonItS7QC6M+1JIIcLe+vOCTOYpvg==",
"cpu": [
"arm64"
],
@@ -888,9 +889,9 @@
}
},
"node_modules/@next/swc-win32-ia32-msvc": {
- "version": "14.2.30",
- "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.30.tgz",
- "integrity": "sha512-pVZMnFok5qEX4RT59mK2hEVtJX+XFfak+/rjHpyFh7juiT52r177bfFKhnlafm0UOSldhXjj32b+LZIOdswGTg==",
+ "version": "14.2.32",
+ "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.32.tgz",
+ "integrity": "sha512-jHUeDPVHrgFltqoAqDB6g6OStNnFxnc7Aks3p0KE0FbwAvRg6qWKYF5mSTdCTxA3axoSAUwxYdILzXJfUwlHhA==",
"cpu": [
"ia32"
],
@@ -904,9 +905,9 @@
}
},
"node_modules/@next/swc-win32-x64-msvc": {
- "version": "14.2.30",
- "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.30.tgz",
- "integrity": "sha512-4KCo8hMZXMjpTzs3HOqOGYYwAXymXIy7PEPAXNEcEOyKqkjiDlECumrWziy+JEF0Oi4ILHGxzgQ3YiMGG2t/Lg==",
+ "version": "14.2.32",
+ "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.32.tgz",
+ "integrity": "sha512-2N0lSoU4GjfLSO50wvKpMQgKd4HdI2UHEhQPPPnlgfBJlOgJxkjpkYBqzk08f1gItBB6xF/n+ykso2hgxuydsA==",
"cpu": [
"x64"
],
@@ -1227,9 +1228,9 @@
}
},
"node_modules/caniuse-lite": {
- "version": "1.0.30001699",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001699.tgz",
- "integrity": "sha512-b+uH5BakXZ9Do9iK+CkDmctUSEqZl+SP056vc5usa0PL+ev5OHw003rZXcnjNDv3L8P5j6rwT6C0BPKSikW08w==",
+ "version": "1.0.30001735",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001735.tgz",
+ "integrity": "sha512-EV/laoX7Wq2J9TQlyIXRxTJqIw4sxfXS4OYgudGxBYRuTv0q7AM6yMEpU/Vo1I94thg9U6EZ2NfZx9GJq83u7w==",
"funding": [
{
"type": "opencollective",
@@ -2195,12 +2196,12 @@
"license": "MIT"
},
"node_modules/next": {
- "version": "14.2.30",
- "resolved": "https://registry.npmjs.org/next/-/next-14.2.30.tgz",
- "integrity": "sha512-+COdu6HQrHHFQ1S/8BBsCag61jZacmvbuL2avHvQFbWa2Ox7bE+d8FyNgxRLjXQ5wtPyQwEmk85js/AuaG2Sbg==",
+ "version": "14.2.32",
+ "resolved": "https://registry.npmjs.org/next/-/next-14.2.32.tgz",
+ "integrity": "sha512-fg5g0GZ7/nFc09X8wLe6pNSU8cLWbLRG3TZzPJ1BJvi2s9m7eF991se67wliM9kR5yLHRkyGKU49MMx58s3LJg==",
"license": "MIT",
"dependencies": {
- "@next/env": "14.2.30",
+ "@next/env": "14.2.32",
"@swc/helpers": "0.5.5",
"busboy": "1.6.0",
"caniuse-lite": "^1.0.30001579",
@@ -2215,15 +2216,15 @@
"node": ">=18.17.0"
},
"optionalDependencies": {
- "@next/swc-darwin-arm64": "14.2.30",
- "@next/swc-darwin-x64": "14.2.30",
- "@next/swc-linux-arm64-gnu": "14.2.30",
- "@next/swc-linux-arm64-musl": "14.2.30",
- "@next/swc-linux-x64-gnu": "14.2.30",
- "@next/swc-linux-x64-musl": "14.2.30",
- "@next/swc-win32-arm64-msvc": "14.2.30",
- "@next/swc-win32-ia32-msvc": "14.2.30",
- "@next/swc-win32-x64-msvc": "14.2.30"
+ "@next/swc-darwin-arm64": "14.2.32",
+ "@next/swc-darwin-x64": "14.2.32",
+ "@next/swc-linux-arm64-gnu": "14.2.32",
+ "@next/swc-linux-arm64-musl": "14.2.32",
+ "@next/swc-linux-x64-gnu": "14.2.32",
+ "@next/swc-linux-x64-musl": "14.2.32",
+ "@next/swc-win32-arm64-msvc": "14.2.32",
+ "@next/swc-win32-ia32-msvc": "14.2.32",
+ "@next/swc-win32-x64-msvc": "14.2.32"
},
"peerDependencies": {
"@opentelemetry/api": "^1.1.0",
@@ -2496,13 +2497,12 @@
}
},
"node_modules/react": {
- "version": "17.0.2",
- "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz",
- "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==",
+ "version": "18.3.1",
+ "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz",
+ "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==",
"license": "MIT",
"dependencies": {
- "loose-envify": "^1.1.0",
- "object-assign": "^4.1.1"
+ "loose-envify": "^1.1.0"
},
"engines": {
"node": ">=0.10.0"
@@ -2539,43 +2539,23 @@
"dnd-core": "^11.1.3"
}
},
- "node_modules/react-dnd-scrollzone-patch-react-17": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/react-dnd-scrollzone-patch-react-17/-/react-dnd-scrollzone-patch-react-17-1.0.2.tgz",
- "integrity": "sha512-Wfhyc/Y/Veim29REBYm8nMmtDB5IwSmPPhXIuabBgsEa1MrVsuOwK9+7LmuP+mGbDOEP/S6G8+5XvDqPlRFK2g==",
- "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.",
- "license": "MIT",
- "dependencies": {
- "hoist-non-react-statics": "^3.1.0",
- "lodash.throttle": "^4.0.1",
- "prop-types": "^15.5.9",
- "raf": "^3.2.0",
- "react-display-name": "^0.2.0"
- },
- "peerDependencies": {
- "react": "^17.0.1",
- "react-dnd": "^11.1.3",
- "react-dom": "^17.0.1"
- }
- },
"node_modules/react-dom": {
- "version": "17.0.2",
- "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz",
- "integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==",
+ "version": "18.3.1",
+ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz",
+ "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==",
"license": "MIT",
"dependencies": {
"loose-envify": "^1.1.0",
- "object-assign": "^4.1.1",
- "scheduler": "^0.20.2"
+ "scheduler": "^0.23.2"
},
"peerDependencies": {
- "react": "17.0.2"
+ "react": "^18.3.1"
}
},
"node_modules/react-is": {
- "version": "19.0.0",
- "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.0.0.tgz",
- "integrity": "sha512-H91OHcwjZsbq3ClIDHMzBShc1rotbfACdWENsmEf0IFvZ3FgGPtdHMcsv45bQ1hAbgdfiA8SnxTKfDS+x/8m2g==",
+ "version": "19.1.1",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.1.1.tgz",
+ "integrity": "sha512-tr41fA15Vn8p4X9ntI+yCyeGSf1TlYaY5vlTZfQmeLBrFo3psOPX6HhTDnFNL9uj3EhP0KAQ80cugCl4b4BERA==",
"license": "MIT"
},
"node_modules/react-lifecycles-compat": {
@@ -2652,6 +2632,62 @@
"react-dom": "^17.0.0"
}
},
+ "node_modules/react-sortable-tree-patch-react-17/node_modules/react": {
+ "version": "17.0.2",
+ "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz",
+ "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==",
+ "license": "MIT",
+ "dependencies": {
+ "loose-envify": "^1.1.0",
+ "object-assign": "^4.1.1"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/react-sortable-tree-patch-react-17/node_modules/react-dnd-scrollzone-patch-react-17": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/react-dnd-scrollzone-patch-react-17/-/react-dnd-scrollzone-patch-react-17-1.0.2.tgz",
+ "integrity": "sha512-Wfhyc/Y/Veim29REBYm8nMmtDB5IwSmPPhXIuabBgsEa1MrVsuOwK9+7LmuP+mGbDOEP/S6G8+5XvDqPlRFK2g==",
+ "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.",
+ "license": "MIT",
+ "dependencies": {
+ "hoist-non-react-statics": "^3.1.0",
+ "lodash.throttle": "^4.0.1",
+ "prop-types": "^15.5.9",
+ "raf": "^3.2.0",
+ "react-display-name": "^0.2.0"
+ },
+ "peerDependencies": {
+ "react": "^17.0.1",
+ "react-dnd": "^11.1.3",
+ "react-dom": "^17.0.1"
+ }
+ },
+ "node_modules/react-sortable-tree-patch-react-17/node_modules/react-dom": {
+ "version": "17.0.2",
+ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz",
+ "integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==",
+ "license": "MIT",
+ "dependencies": {
+ "loose-envify": "^1.1.0",
+ "object-assign": "^4.1.1",
+ "scheduler": "^0.20.2"
+ },
+ "peerDependencies": {
+ "react": "17.0.2"
+ }
+ },
+ "node_modules/react-sortable-tree-patch-react-17/node_modules/scheduler": {
+ "version": "0.20.2",
+ "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz",
+ "integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==",
+ "license": "MIT",
+ "dependencies": {
+ "loose-envify": "^1.1.0",
+ "object-assign": "^4.1.1"
+ }
+ },
"node_modules/react-to-print": {
"version": "2.15.1",
"resolved": "https://registry.npmjs.org/react-to-print/-/react-to-print-2.15.1.tgz",
@@ -2817,13 +2853,12 @@
}
},
"node_modules/scheduler": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz",
- "integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==",
+ "version": "0.23.2",
+ "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz",
+ "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==",
"license": "MIT",
"dependencies": {
- "loose-envify": "^1.1.0",
- "object-assign": "^4.1.1"
+ "loose-envify": "^1.1.0"
}
},
"node_modules/shebang-command": {
diff --git a/examples/next-12/package.json b/examples/next-12/package.json
index a148be98a..7da4185a5 100644
--- a/examples/next-12/package.json
+++ b/examples/next-12/package.json
@@ -19,8 +19,8 @@
"@reduxjs/toolkit": "^1.9.7",
"mui-datatables": "^4.3.0",
"next": "14",
- "react": "17",
- "react-dom": "17",
+ "react": "^18.3.1",
+ "react-dom": "^18.3.1",
"react-redux": "^8.1.3"
},
"devDependencies": {
diff --git a/examples/next-12/pages/_app.js b/examples/next-12/pages/_app.js
index 68ae8c08b..bfc402914 100644
--- a/examples/next-12/pages/_app.js
+++ b/examples/next-12/pages/_app.js
@@ -1,12 +1,13 @@
-import { AppThemeProvider } from '@/lib/providers/AppThemeProvider';
-import { ReduxProvider } from '@/lib/providers/ReduxProvider';
+import { AppThemeContext } from './../lib/context/AppThemeContext';
+import { Provider } from 'react-redux';
+import store from './../lib/redux/store';
export default function App({ Component, pageProps }) {
return (
-
-
+
+
-
-
+
+
);
}
diff --git a/examples/next-12/pages/index.js b/examples/next-12/pages/index.js
index 5db13948f..7ad1b2bdc 100644
--- a/examples/next-12/pages/index.js
+++ b/examples/next-12/pages/index.js
@@ -1,4 +1,4 @@
-import ModeToggleButton from '@/components/ModeToggleButton';
+import ModeToggleButton from '../components/ModeToggleButton';
import { ResponsiveDataTable } from '@layer5/sistent-components';
import React from 'react';
diff --git a/examples/next-12/pages/themes-explorer/index.jsx b/examples/next-12/pages/themes-explorer/index.jsx
new file mode 100644
index 000000000..fe6656ec4
--- /dev/null
+++ b/examples/next-12/pages/themes-explorer/index.jsx
@@ -0,0 +1,46 @@
+import React from 'react';
+
+import { ColorLens } from '@mui/icons-material';
+import { Box, Typography } from '@mui/material';
+import AllColors from '../../components/AllColors';
+import ColorsExplorer from '../../components/BorderAndIcons';
+import Footer from '../../components/Footer';
+import Interactive from '../../components/Interactive';
+import ModeToggleButton from '../../components/ModeToggleButton';
+import Navigation from '../../components/Navigation';
+import SemanticColors from '../../components/Semantic';
+import Surface from '../../components/Surface';
+import TabMenu from '../../components/Tabs';
+import TextColors from '../../components/Text';
+
+export default function ThemeFunction() {
+ const [value, setValue] = React.useState(0);
+
+ return (
+
+
+
+
+
+
+ Design System Palette
+
+
+
+ Comprehensive color system with surface navigation and semantic tokens
+
+
+
+ {value === 0 && }
+ {value === 1 && }
+ {value === 2 && }
+ {value === 3 && }
+ {value === 4 && }
+ {value === 5 && }
+ {value === 6 && }
+
+
+
+
+ );
+}
diff --git a/examples/next-12/styles/themes/theme.js b/examples/next-12/styles/themes/theme.js
index 1ae828820..c14216727 100644
--- a/examples/next-12/styles/themes/theme.js
+++ b/examples/next-12/styles/themes/theme.js
@@ -6,31 +6,15 @@ const createCustomTheme = (paletteType) => {
primary: {
main: '#477E96'
},
- secondary: {
- main: '#00D3A9'
- },
- neutral: {
- main: '#64748B',
- contrastText: '#FFF'
- }
+ secondary: { main: '#00D3A9' },
+ neutral: { main: '#64748B', contrastText: '#FFF' }
};
- const palette =
- paletteType === 'dark'
- ? {
- mode: 'dark',
- ...commonPalette,
- secondary: {
- ...commonPalette.secondary
- }
- }
- : {
- mode: 'light',
- ...commonPalette,
- secondary: {
- ...commonPalette.secondary
- }
- };
+ const palette = {
+ mode: paletteType,
+ ...commonPalette,
+ secondary: { ...commonPalette.secondary }
+ };
const theme = createTheme({
palette,
@@ -43,13 +27,7 @@ const createCustomTheme = (paletteType) => {
},
shape: { borderRadius: 8 },
breakpoints: {
- values: {
- xs: 0,
- sm: 600,
- md: 960,
- lg: 1280,
- xl: 1920
- }
+ values: { xs: 0, sm: 600, md: 960, lg: 1280, xl: 1920 }
},
components: {
MuiAppBar: {
@@ -61,31 +39,23 @@ const createCustomTheme = (paletteType) => {
backgroundColor: blueGrey[600]
}
}
- }
- }
- });
-
- const overrides = {
- // Your overrides here
- };
-
- theme.overrides = {
- ...overrides,
- MuiCssBaseline: {
- '@global': {
- body: {
- backgroundColor: paletteType === 'dark' ? '#303030' : '#eaeff1',
- color: paletteType === 'dark' ? '#000000' : '#FFFFFF'
- },
- h5: {
- color: paletteType === 'dark' ? '#000000' : '#FFFFFF'
- },
- p: {
- color: paletteType === 'dark' ? '#000000' : '#FFFFFF'
+ },
+ MuiCssBaseline: {
+ styleOverrides: {
+ body: {
+ backgroundColor: paletteType === 'dark' ? '#303030' : '#eaeff1',
+ color: paletteType === 'dark' ? '#FFFFFF' : '#000000'
+ },
+ h5: {
+ color: paletteType === 'dark' ? '#FFFFFF' : '#000000'
+ },
+ p: {
+ color: paletteType === 'dark' ? '#FFFFFF' : '#000000'
+ }
}
}
}
- };
+ });
return theme;
};
diff --git a/examples/next-12/tsconfig.json b/examples/next-12/tsconfig.json
new file mode 100644
index 000000000..d55eb3081
--- /dev/null
+++ b/examples/next-12/tsconfig.json
@@ -0,0 +1,28 @@
+{
+ "compilerOptions": {
+ "lib": [
+ "dom",
+ "dom.iterable",
+ "esnext"
+ ],
+ "allowJs": true,
+ "skipLibCheck": true,
+ "strict": false,
+ "noEmit": true,
+ "incremental": true,
+ "module": "esnext",
+ "esModuleInterop": true,
+ "moduleResolution": "node",
+ "resolveJsonModule": true,
+ "isolatedModules": true,
+ "jsx": "preserve"
+ },
+ "include": [
+ "next-env.d.ts",
+ "**/*.ts",
+ "**/*.tsx"
+ ],
+ "exclude": [
+ "node_modules"
+ ]
+}