@wso2/oxygen-ui 0.25.0 → 0.26.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/.ai/AGENTS.md CHANGED
@@ -1,6 +1,6 @@
1
- # Oxygen UI - AI Development Guide
1
+ # Choreo Oxygen UI - AI Development Guide
2
2
 
3
- > WSO2's React component library built on Material-UI v7
3
+ > Choreo Labs' React component library built on Material-UI v7
4
4
 
5
5
  ## Quick Start
6
6
 
@@ -55,13 +55,8 @@ import { DataGrid, DatePickers, TreeView } from '@wso2/oxygen-ui';
55
55
  ## Available Themes
56
56
 
57
57
  - `OxygenTheme` - Default theme (recommended): brand colours, Sora font and flat surfaces
58
- - `AcrylicOrangeTheme` - Orange accent variant
59
- - `AcrylicPurpleTheme` - Purple accent variant
60
58
  - `ClassicTheme` - Traditional styling
61
59
  - `HighContrastTheme` - Accessibility-focused
62
- - `PaleBaseTheme` - Minimal color palette
63
- - `PaleGrayTheme` - Soft gray tones
64
- - `PaleIndigoTheme` - Soft indigo tones
65
60
 
66
61
  ## Custom Oxygen Components
67
62
 
package/.ai/components.md CHANGED
@@ -69,14 +69,14 @@ interface ThemeOption {
69
69
  import {
70
70
  OxygenUIThemeProvider,
71
71
  OxygenTheme,
72
- AcrylicOrangeTheme,
73
- AcrylicPurpleTheme,
72
+ ClassicTheme,
73
+ HighContrastTheme,
74
74
  } from '@wso2/oxygen-ui';
75
75
 
76
76
  const themes = [
77
77
  { key: 'default', label: 'Default', theme: OxygenTheme },
78
- { key: 'orange', label: 'Orange', theme: AcrylicOrangeTheme },
79
- { key: 'purple', label: 'Purple', theme: AcrylicPurpleTheme },
78
+ { key: 'classic', label: 'Classic', theme: ClassicTheme },
79
+ { key: 'highContrast', label: 'High Contrast', theme: HighContrastTheme },
80
80
  ];
81
81
 
82
82
  <OxygenUIThemeProvider themes={themes} initialTheme="default">
package/.ai/patterns.md CHANGED
@@ -1142,8 +1142,6 @@ function TabNavigation() {
1142
1142
  import {
1143
1143
  OxygenUIThemeProvider,
1144
1144
  OxygenTheme,
1145
- AcrylicOrangeTheme,
1146
- AcrylicPurpleTheme,
1147
1145
  ClassicTheme,
1148
1146
  HighContrastTheme,
1149
1147
  PaleBaseTheme,
@@ -1156,8 +1154,6 @@ import {
1156
1154
 
1157
1155
  const themes = [
1158
1156
  { key: 'default', label: 'Default', theme: OxygenTheme },
1159
- { key: 'orange', label: 'Acrylic Orange', theme: AcrylicOrangeTheme },
1160
- { key: 'purple', label: 'Acrylic Purple', theme: AcrylicPurpleTheme },
1161
1157
  { key: 'classic', label: 'Classic', theme: ClassicTheme },
1162
1158
  { key: 'highContrast', label: 'High Contrast', theme: HighContrastTheme },
1163
1159
  { key: 'paleBase', label: 'Pale Base', theme: PaleBaseTheme },
package/.ai/theming.md CHANGED
@@ -15,19 +15,12 @@
15
15
  | Theme | Import | Description |
16
16
  |-------|--------|-------------|
17
17
  | OxygenTheme | `OxygenTheme` | Default theme (brand colours, Sora font and flat surfaces) |
18
- | Acrylic Orange | `AcrylicOrangeTheme` | Glass-morphism effects, orange primary |
19
- | Acrylic Purple | `AcrylicPurpleTheme` | Glass-morphism with purple accents |
20
18
  | Classic | `ClassicTheme` | Standard flat design |
21
19
  | High Contrast | `HighContrastTheme` | Accessibility-focused with high contrast colors |
22
- | Pale Base | `PaleBaseTheme` | Minimal color palette for subtle interfaces |
23
- | Pale Gray | `PaleGrayTheme` | Soft gray tones for a muted appearance |
24
- | Pale Indigo | `PaleIndigoTheme` | Soft indigo tones for a calm interface |
25
20
 
26
21
  ```tsx
27
22
  import {
28
23
  OxygenTheme,
29
- AcrylicOrangeTheme,
30
- AcrylicPurpleTheme,
31
24
  ClassicTheme,
32
25
  HighContrastTheme,
33
26
  PaleBaseTheme,
@@ -63,8 +56,6 @@ import { OxygenUIThemeProvider, ClassicTheme } from '@wso2/oxygen-ui';
63
56
  import {
64
57
  OxygenUIThemeProvider,
65
58
  OxygenTheme,
66
- AcrylicOrangeTheme,
67
- AcrylicPurpleTheme,
68
59
  ClassicTheme,
69
60
  HighContrastTheme,
70
61
  PaleBaseTheme,
@@ -75,8 +66,6 @@ import {
75
66
  <OxygenUIThemeProvider
76
67
  themes={[
77
68
  { key: 'default', label: 'Default', theme: OxygenTheme },
78
- { key: 'orange', label: 'Acrylic Orange', theme: AcrylicOrangeTheme },
79
- { key: 'purple', label: 'Acrylic Purple', theme: AcrylicPurpleTheme },
80
69
  { key: 'classic', label: 'Classic', theme: ClassicTheme },
81
70
  { key: 'highContrast', label: 'High Contrast', theme: HighContrastTheme },
82
71
  { key: 'paleBase', label: 'Pale Base', theme: PaleBaseTheme },
@@ -20,6 +20,7 @@ Complete API reference for custom Oxygen UI components. For MUI components, refe
20
20
  - [DrawerPanel](#drawerpanel)
21
21
  - [NotificationPanel](#notificationpanel)
22
22
  - [NotificationBanner](#notificationbanner)
23
+ - [PageLoader](#pageloader)
23
24
  - [ParticleBackground](#particlebackground)
24
25
  - [Other Components](#other-components)
25
26
  - [MUI X Namespaces](#mui-x-namespaces)
@@ -70,14 +71,14 @@ interface ThemeOption {
70
71
  import {
71
72
  OxygenUIThemeProvider,
72
73
  OxygenTheme,
73
- AcrylicOrangeTheme,
74
- AcrylicPurpleTheme,
74
+ ClassicTheme,
75
+ HighContrastTheme,
75
76
  } from '@wso2/oxygen-ui';
76
77
 
77
78
  const themes = [
78
79
  { key: 'default', label: 'Default', theme: OxygenTheme },
79
- { key: 'orange', label: 'Orange', theme: AcrylicOrangeTheme },
80
- { key: 'purple', label: 'Purple', theme: AcrylicPurpleTheme },
80
+ { key: 'classic', label: 'Classic', theme: ClassicTheme },
81
+ { key: 'highContrast', label: 'High Contrast', theme: HighContrastTheme },
81
82
  ];
82
83
 
83
84
  <OxygenUIThemeProvider themes={themes} initialTheme="default">
@@ -1065,6 +1066,49 @@ import { NotificationBanner } from '@wso2/oxygen-ui';
1065
1066
 
1066
1067
  ---
1067
1068
 
1069
+ ## PageLoader
1070
+
1071
+ Full-page loader. Animates the Oxygen UI mark in the centre while a background task runs. When `loading` turns `false`, the mark comes to rest, the title slides out to its right (pushing the mark left until the full logo is centred), and after `holdDuration` it calls `onComplete`, fades out and shows `children`. Honours `prefers-reduced-motion`.
1072
+
1073
+ ```tsx
1074
+ import { PageLoader, PageLoaderIcon } from '@wso2/oxygen-ui';
1075
+ ```
1076
+
1077
+ ### Props
1078
+
1079
+ | Prop | Type | Default | Description |
1080
+ |------|------|---------|-------------|
1081
+ | `loading` | `boolean` | required | `true` while the task runs; `false` starts the reveal |
1082
+ | `title` | `ReactNode` | Oxygen UI wordmark | Revealed to the right of the icon. A string is set in the theme font, sized and tracked to match the wordmark |
1083
+ | `icon` | `ReactNode` | `<PageLoaderIcon />` | Replaces the animated mark |
1084
+ | `size` | `number` | `48` | Icon height in px; the title scales with it |
1085
+ | `onComplete` | `() => void` | - | Called once the full logo has been shown, before the fade out |
1086
+ | `onPhaseChange` | `(phase: PageLoaderPhase) => void` | - | `loading` → `settling` → `revealing` → `revealed` → `exiting` → `done` |
1087
+ | `revealDuration` | `number` | `700` | Reveal length in ms |
1088
+ | `holdDuration` | `number` | `600` | How long the full logo stays before `onComplete`, in ms |
1089
+ | `exitDuration` | `number` | `400` | Fade out length in ms |
1090
+ | `fullScreen` | `boolean` | `true` | Cover the viewport; `false` fills a positioned parent |
1091
+ | `loadingLabel` | `string` | `'Loading'` | Screen reader label while loading |
1092
+ | `children` | `ReactNode` | - | Shown once the loader finishes |
1093
+
1094
+ `PageLoaderIcon` takes `size` (default `48`) plus any SVG props, and uses `currentColor`.
1095
+
1096
+ ### Usage
1097
+
1098
+ ```tsx
1099
+ const [loading, setLoading] = useState(true);
1100
+
1101
+ useEffect(() => {
1102
+ Promise.all([loadUser(), loadConfig()]).finally(() => setLoading(false));
1103
+ }, []);
1104
+
1105
+ <PageLoader loading={loading} onComplete={() => track('app-ready')}>
1106
+ <App />
1107
+ </PageLoader>
1108
+ ```
1109
+
1110
+ ---
1111
+
1068
1112
  ## ParticleBackground
1069
1113
 
1070
1114
  Animated particle canvas background with mouse interaction. Adapts to light/dark color scheme.
@@ -1142,8 +1142,6 @@ function TabNavigation() {
1142
1142
  import {
1143
1143
  OxygenUIThemeProvider,
1144
1144
  OxygenTheme,
1145
- AcrylicOrangeTheme,
1146
- AcrylicPurpleTheme,
1147
1145
  ClassicTheme,
1148
1146
  HighContrastTheme,
1149
1147
  PaleBaseTheme,
@@ -1156,8 +1154,6 @@ import {
1156
1154
 
1157
1155
  const themes = [
1158
1156
  { key: 'default', label: 'Default', theme: OxygenTheme },
1159
- { key: 'orange', label: 'Acrylic Orange', theme: AcrylicOrangeTheme },
1160
- { key: 'purple', label: 'Acrylic Purple', theme: AcrylicPurpleTheme },
1161
1157
  { key: 'classic', label: 'Classic', theme: ClassicTheme },
1162
1158
  { key: 'highContrast', label: 'High Contrast', theme: HighContrastTheme },
1163
1159
  { key: 'paleBase', label: 'Pale Base', theme: PaleBaseTheme },
@@ -15,8 +15,6 @@
15
15
  | Theme | Import | Description |
16
16
  |-------|--------|-------------|
17
17
  | OxygenTheme | `OxygenTheme` | Default theme (brand colours, Sora font and flat surfaces) |
18
- | Acrylic Orange | `AcrylicOrangeTheme` | Glass-morphism effects, orange primary |
19
- | Acrylic Purple | `AcrylicPurpleTheme` | Glass-morphism with purple accents |
20
18
  | Classic | `ClassicTheme` | Standard flat design |
21
19
  | High Contrast | `HighContrastTheme` | Accessibility-focused with high contrast colors |
22
20
  | Pale Base | `PaleBaseTheme` | Minimal color palette for subtle interfaces |
@@ -26,8 +24,6 @@
26
24
  ```tsx
27
25
  import {
28
26
  OxygenTheme,
29
- AcrylicOrangeTheme,
30
- AcrylicPurpleTheme,
31
27
  ClassicTheme,
32
28
  HighContrastTheme,
33
29
  PaleBaseTheme,
@@ -63,8 +59,6 @@ import { OxygenUIThemeProvider, ClassicTheme } from '@wso2/oxygen-ui';
63
59
  import {
64
60
  OxygenUIThemeProvider,
65
61
  OxygenTheme,
66
- AcrylicOrangeTheme,
67
- AcrylicPurpleTheme,
68
62
  ClassicTheme,
69
63
  HighContrastTheme,
70
64
  PaleBaseTheme,
@@ -75,8 +69,6 @@ import {
75
69
  <OxygenUIThemeProvider
76
70
  themes={[
77
71
  { key: 'default', label: 'Default', theme: OxygenTheme },
78
- { key: 'orange', label: 'Acrylic Orange', theme: AcrylicOrangeTheme },
79
- { key: 'purple', label: 'Acrylic Purple', theme: AcrylicPurpleTheme },
80
72
  { key: 'classic', label: 'Classic', theme: ClassicTheme },
81
73
  { key: 'highContrast', label: 'High Contrast', theme: HighContrastTheme },
82
74
  { key: 'paleBase', label: 'Pale Base', theme: PaleBaseTheme },
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @wso2/oxygen-ui
2
2
 
3
- WSO2 Oxygen UI React component library - A comprehensive design system powered by Material-UI with TypeScript support.
3
+ Choreo Oxygen UI React component library - A comprehensive design system powered by Material-UI with TypeScript support.
4
4
 
5
5
  ## Installation
6
6
 
package/bin/cli.js CHANGED
@@ -542,7 +542,7 @@ Examples:
542
542
  npx @wso2/oxygen-ui update # Auto-detects previous mode
543
543
  npx @wso2/oxygen-ui update --claude # Force Claude mode update
544
544
 
545
- Internal (WSO2 maintainers):
545
+ Internal (Choreo Labs maintainers):
546
546
  npx @wso2/oxygen-ui init --claude --internal # Include internal skills
547
547
  npx @wso2/oxygen-ui update --claude --internal # Update with internal skills
548
548
 
@@ -0,0 +1,92 @@
1
+ import * as React from 'react';
2
+ import type { BoxProps } from '@mui/material';
3
+ /**
4
+ * Where the loader is in its sequence.
5
+ * - `loading`: the icon animates while the background task runs.
6
+ * - `settling`: the task is done; waiting for the icon to come to rest.
7
+ * - `revealing`: the title slides out and pushes the icon to the left.
8
+ * - `revealed`: the full logo is on screen, held for `holdDuration`.
9
+ * - `exiting`: `onComplete` has fired and the overlay fades out.
10
+ * - `done`: the overlay is gone and `children` are shown.
11
+ */
12
+ export type PageLoaderPhase = 'loading' | 'settling' | 'revealing' | 'revealed' | 'exiting' | 'done';
13
+ export interface PageLoaderProps extends Omit<BoxProps, 'title' | 'children'> {
14
+ /**
15
+ * `true` while the background task runs. Set it to `false` when the task is done to
16
+ * start the reveal; `onComplete` fires once the full logo has been shown.
17
+ */
18
+ loading: boolean;
19
+ /**
20
+ * Text or element revealed to the right of the icon. Defaults to the Oxygen UI wordmark.
21
+ * Text is set in the theme font, sized and tracked to match the wordmark.
22
+ */
23
+ title?: React.ReactNode;
24
+ /**
25
+ * Replaces the animated mark. When it is not the default icon, the loader does not
26
+ * wait for it to come to rest before revealing.
27
+ */
28
+ icon?: React.ReactNode;
29
+ /**
30
+ * Height of the icon in pixels. The title is sized to match.
31
+ * @default 48
32
+ */
33
+ size?: number;
34
+ /**
35
+ * Called once the full logo has been shown, before the overlay fades out.
36
+ */
37
+ onComplete?: () => void;
38
+ /**
39
+ * Called on every phase change.
40
+ */
41
+ onPhaseChange?: (phase: PageLoaderPhase) => void;
42
+ /**
43
+ * Length of the reveal, in milliseconds.
44
+ * @default 700
45
+ */
46
+ revealDuration?: number;
47
+ /**
48
+ * How long the full logo stays on screen before `onComplete`, in milliseconds.
49
+ * @default 600
50
+ */
51
+ holdDuration?: number;
52
+ /**
53
+ * Length of the fade out after `onComplete`, in milliseconds.
54
+ * @default 400
55
+ */
56
+ exitDuration?: number;
57
+ /**
58
+ * Covers the viewport. Set to `false` to fill the parent instead.
59
+ * @default true
60
+ */
61
+ fullScreen?: boolean;
62
+ /**
63
+ * Label read out by screen readers while loading.
64
+ * @default 'Loading'
65
+ */
66
+ loadingLabel?: string;
67
+ /**
68
+ * Content shown once the loader has finished. It mounts when the overlay starts
69
+ * fading out, so it is already in place underneath.
70
+ */
71
+ children?: React.ReactNode;
72
+ }
73
+ /**
74
+ * PageLoader shows an animated icon in the middle of the page while a background task runs.
75
+ * When `loading` turns `false`, the icon comes to rest, the title slides out to its right
76
+ * pushing the icon to the left until the full logo is centred, and then `onComplete` fires.
77
+ *
78
+ * @example
79
+ * ```tsx
80
+ * const [loading, setLoading] = useState(true);
81
+ *
82
+ * useEffect(() => {
83
+ * bootstrap().finally(() => setLoading(false));
84
+ * }, []);
85
+ *
86
+ * <PageLoader loading={loading} onComplete={() => track('app-ready')}>
87
+ * <App />
88
+ * </PageLoader>
89
+ * ```
90
+ */
91
+ declare const PageLoader: React.ForwardRefExoticComponent<Omit<PageLoaderProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
92
+ export default PageLoader;
@@ -0,0 +1,20 @@
1
+ import * as React from 'react';
2
+ /** Length of one full loop, in seconds. */
3
+ export declare const PAGE_LOADER_ICON_CYCLE = 4.6;
4
+ /** Length of one step (a move followed by a hold), in seconds. */
5
+ export declare const PAGE_LOADER_ICON_STEP: number;
6
+ /** Part of each step spent moving; the rest is a hold where the mark is at rest. */
7
+ export declare const PAGE_LOADER_ICON_MOVE = 0.3;
8
+ export interface PageLoaderIconProps extends Omit<React.SVGProps<SVGSVGElement>, 'ref'> {
9
+ /**
10
+ * Height of the icon in pixels. The width follows the aspect ratio.
11
+ * @default 48
12
+ */
13
+ size?: number;
14
+ }
15
+ /**
16
+ * The animated Oxygen UI mark: ten ellipses rotating around a ring.
17
+ * Uses `currentColor`, so it follows the CSS `color` of its parent.
18
+ */
19
+ declare const PageLoaderIcon: React.ForwardRefExoticComponent<PageLoaderIconProps & React.RefAttributes<SVGSVGElement>>;
20
+ export default PageLoaderIcon;
@@ -0,0 +1,19 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * Space between the mark and the wordmark in the logo, as a share of the mark's height.
4
+ * The logo has a 48 unit gap; `PageLoaderIcon` already leaves about 3 units of padding on its right.
5
+ */
6
+ export declare const PAGE_LOADER_WORDMARK_GAP: number;
7
+ export interface PageLoaderWordmarkProps extends Omit<React.SVGProps<SVGSVGElement>, 'ref'> {
8
+ /**
9
+ * Height in pixels. Use the icon's size: the wordmark lines up with the mark the way it
10
+ * does in the logo.
11
+ * @default 48
12
+ */
13
+ size?: number;
14
+ }
15
+ /**
16
+ * The "Oxygen UI" wordmark from the Oxygen UI logo. Uses `currentColor`.
17
+ */
18
+ declare const PageLoaderWordmark: React.FC<PageLoaderWordmarkProps>;
19
+ export default PageLoaderWordmark;
@@ -0,0 +1,4 @@
1
+ export { default } from './PageLoader';
2
+ export * from './PageLoader';
3
+ export { default as PageLoaderIcon } from './PageLoaderIcon';
4
+ export type { PageLoaderIconProps } from './PageLoaderIcon';
@@ -16,3 +16,5 @@
16
16
  * under the License.
17
17
  */
18
18
  export * from './ParticleBackground';
19
+ export { default as PageLoader, PageLoaderIcon } from './PageLoader';
20
+ export type { PageLoaderProps, PageLoaderPhase, PageLoaderIconProps } from './PageLoader';