diff --git a/package-lock.json b/package-lock.json index de784465c..b356a5128 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@layer5/sistent", - "version": "0.14.9", + "version": "0.14.10", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@layer5/sistent", - "version": "0.14.9", + "version": "0.14.10", "devDependencies": { "@commitlint/cli": "^17.7.2", "@commitlint/config-conventional": "^17.7.0", diff --git a/package.json b/package.json index cb9b11b00..7521cb2e1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@layer5/sistent", - "version": "0.14.9", + "version": "0.14.10", "description": "Reusable React Components and SVG Icons library", "repository": { "type": "git", diff --git a/src/custom/index.tsx b/src/custom/index.tsx index 74c988399..51e7af88a 100644 --- a/src/custom/index.tsx +++ b/src/custom/index.tsx @@ -9,7 +9,11 @@ import { ErrorBoundary, WithErrorBoundary, withSuppressedErrorBoundary } from '. import { FlipCard } from './FlipCard'; import { useWindowDimensions } from './Helpers/Dimension'; import { useNotificationHandler } from './Helpers/Notification'; +import PopperListener, { IPopperListener } from './PopperListener'; +import ResponsiveDataTable from './ResponsiveDataTable'; +import SearchBar, { SearchBarProps } from './SearchBar'; import { StyledTooltip } from './Tooltip'; +import UniversalFilter, { UniversalFilterProps } from './UniversalFilter'; export { StyledChartDialog } from './ChartDialog'; export { StyledSearchBar } from './StyledSearchBar'; @@ -19,10 +23,20 @@ export { EmptyState, ErrorBoundary, FlipCard, + PopperListener, + ResponsiveDataTable, + SearchBar, StyledTooltip, + UniversalFilter, WithErrorBoundary, useNotificationHandler, useWindowDimensions, withSuppressedErrorBoundary }; -export type { CustomColumn, CustomColumnVisibilityControlProps }; +export type { + CustomColumn, + CustomColumnVisibilityControlProps, + IPopperListener, + SearchBarProps, + UniversalFilterProps +}; diff --git a/src/theme/ThemeProvider.tsx b/src/theme/ThemeProvider.tsx new file mode 100644 index 000000000..5e7f533ee --- /dev/null +++ b/src/theme/ThemeProvider.tsx @@ -0,0 +1,37 @@ +import { EmotionCache } from '@emotion/react'; +import { CssBaseline, PaletteMode, Theme, ThemeProvider } from '@mui/material'; +import React from 'react'; +import { createCustomTheme } from './theme'; + +interface SistentProviderContextType { + emotionCache?: EmotionCache; +} + +export const SistentThemeProviderContext = React.createContext({}); + +export interface SistentThemeProviderProps { + children: React.ReactNode; + emotionCache?: EmotionCache; + initialMode?: PaletteMode; +} + +function SistentThemeProvider({ + children, + emotionCache, + initialMode = 'light' +}: SistentThemeProviderProps): JSX.Element { + const theme = React.useMemo(() => createCustomTheme(initialMode), [initialMode]); + + return ( + + + + {children} + + + ); +} + +export default SistentThemeProvider; + +export { SistentThemeProvider }; diff --git a/src/theme/colors.ts b/src/theme/colors/colors.ts similarity index 99% rename from src/theme/colors.ts rename to src/theme/colors/colors.ts index 5afda6dcd..0b5788059 100644 --- a/src/theme/colors.ts +++ b/src/theme/colors/colors.ts @@ -209,7 +209,7 @@ export const actionIcon = { hover: darkTeal.dark }; -export const tabeMenu = { +export const tabMenu = { main: darkTeal.main, hover: darkTeal.dark }; diff --git a/src/theme/colors/index.ts b/src/theme/colors/index.ts new file mode 100644 index 000000000..e06ff5358 --- /dev/null +++ b/src/theme/colors/index.ts @@ -0,0 +1,64 @@ +export { + 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, + NOT_FOUND, + PATTERNS_BLUE, + PRIMARY_COLOR, + REGISTERED, + SAFFRON, + TEAL_BLUE, + WHITE, + WHITESMOKE, + YELLOW_SEA, + accentGrey, + actionIcon, + anakiwa, + black, + blue, + buttonDelete, + buttonDisabled, + casper, + charcoal, + common, + connected, + cultured, + darkSlateGray, + darkTeal, + eerieBlack, + green, + jungleGreen, + notificationColors, + patternsBlue, + primaryColor, + red, + redDelete, + tabMenu, + tableBackgroundHover, + white, + yellow +} from './colors'; diff --git a/src/theme/index.tsx b/src/theme/index.tsx index 5e7f533ee..b79bd9f08 100644 --- a/src/theme/index.tsx +++ b/src/theme/index.tsx @@ -1,37 +1,2 @@ -import { EmotionCache } from '@emotion/react'; -import { CssBaseline, PaletteMode, Theme, ThemeProvider } from '@mui/material'; -import React from 'react'; -import { createCustomTheme } from './theme'; - -interface SistentProviderContextType { - emotionCache?: EmotionCache; -} - -export const SistentThemeProviderContext = React.createContext({}); - -export interface SistentThemeProviderProps { - children: React.ReactNode; - emotionCache?: EmotionCache; - initialMode?: PaletteMode; -} - -function SistentThemeProvider({ - children, - emotionCache, - initialMode = 'light' -}: SistentThemeProviderProps): JSX.Element { - const theme = React.useMemo(() => createCustomTheme(initialMode), [initialMode]); - - return ( - - - - {children} - - - ); -} - -export default SistentThemeProvider; - -export { SistentThemeProvider }; +export { default as SistentThemeProvider } from './ThemeProvider'; +export * from './colors';