@open-ui-kit/core 2.0.4 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -9,7 +9,7 @@ A React component library and theme system built on Material UI, with Open UI Ki
9
9
  ## What you get
10
10
 
11
11
  - **Production-ready components** for application screens, forms, navigation, feedback, data display, and charts.
12
- - **Open UI Kit themes** with light and dark mode support through `ThemeProvider`.
12
+ - **Open UI Kit light/dark and IoC themes** through `ThemeProvider`.
13
13
  - **Material UI compatibility** for `sx`, slots, theme overrides, and familiar component APIs.
14
14
  - **TypeScript support** with exported component and theme types.
15
15
  - **Interactive examples** in Storybook for component states, variants, and composition patterns.
@@ -45,8 +45,8 @@ Some components need additional peers, such as icons, date pickers, routing, mot
45
45
  Import the typography CSS once near your app root, then wrap the app with `ThemeProvider`.
46
46
 
47
47
  ```tsx
48
- import '@open-ui-kit/core/typography.css';
49
- import { Button, Stack, ThemeProvider, Typography } from '@open-ui-kit/core';
48
+ import "@open-ui-kit/core/typography.css";
49
+ import { Button, Stack, ThemeProvider, Typography } from "@open-ui-kit/core";
50
50
 
51
51
  export function App() {
52
52
  return (
@@ -65,23 +65,43 @@ export function App() {
65
65
 
66
66
  ## Theme mode
67
67
 
68
- Use `useThemeMode()` inside `ThemeProvider` to read or change the active light or dark theme.
68
+ Use `useThemeMode()` inside `ThemeProvider` to read or change the active built-in theme.
69
+ Open UI Kit ships `ThemeMode.Light`, `ThemeMode.Dark`, and `ThemeMode.IoC`.
69
70
 
70
71
  ```tsx
71
- import { Button, ThemeMode, useThemeMode } from '@open-ui-kit/core';
72
+ import {
73
+ Button,
74
+ ThemeMode,
75
+ ThemeProvider,
76
+ useThemeMode,
77
+ } from "@open-ui-kit/core";
78
+ import type { ReactNode } from "react";
72
79
 
73
- export function ThemeToggle() {
74
- const { mode, toggleTheme } = useThemeMode();
80
+ export function ThemeSelector() {
81
+ const { mode, setTheme } = useThemeMode();
75
82
 
76
83
  return (
77
- <Button variant="outlined" onClick={toggleTheme}>
78
- Use {mode === ThemeMode.Dark ? 'light' : 'dark'} theme
84
+ <Button
85
+ variant="outlined"
86
+ onClick={() =>
87
+ setTheme(mode === ThemeMode.IoC ? ThemeMode.Light : ThemeMode.IoC)
88
+ }
89
+ >
90
+ Use {mode === ThemeMode.IoC ? "light" : "IoC"} theme
79
91
  </Button>
80
92
  );
81
93
  }
94
+
95
+ export function IocApp({ children }: { children: ReactNode }) {
96
+ return <ThemeProvider defaultMode={ThemeMode.IoC}>{children}</ThemeProvider>;
97
+ }
82
98
  ```
83
99
 
84
100
  Use `defaultMode={ThemeMode.Dark}` on `ThemeProvider` when an app needs to start in dark mode.
101
+ Use `defaultMode={ThemeMode.IoC}` when an app should start with the IoC theme.
102
+
103
+ IoC palette helpers such as `iocGradients`, `iocGlows`, and `iocShape` are exported for IoC-specific product surfaces.
104
+ Reusable Open UI Kit components still read semantic colors from `theme.palette.vars`.
85
105
 
86
106
  ## Local development
87
107
 
@@ -106,6 +126,7 @@ yarn workspace @open-ui-kit/core storybook:build
106
126
  - Storybook: https://main--68cc22452afe30d90e4ca977.chromatic.com
107
127
  - Installation guide: https://github.com/outshift-open/open-ui-kit/blob/main/docs/data/material/getting-started/installation/installation.md
108
128
  - Usage guide: https://github.com/outshift-open/open-ui-kit/blob/main/docs/data/material/getting-started/usage/usage.md
129
+ - Theming guide: https://github.com/outshift-open/open-ui-kit/blob/main/docs/data/material/getting-started/theming/theming.md
109
130
  - Migration notes: https://github.com/outshift-open/open-ui-kit/blob/main/MIGRATION.md
110
131
  - Contributing: https://github.com/outshift-open/open-ui-kit/blob/main/CONTRIBUTING.md
111
132