@wso2/oxygen-ui 0.0.1-alpha.9 → 0.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.
Files changed (169) hide show
  1. package/.ai/AGENTS.md +78 -0
  2. package/.ai/components.md +798 -0
  3. package/.ai/migration.md +279 -0
  4. package/.ai/patterns.md +1185 -0
  5. package/.ai/theming.md +318 -0
  6. package/.claude/components.md +798 -0
  7. package/.claude/migration.md +279 -0
  8. package/.claude/patterns.md +1185 -0
  9. package/.claude/skills/oxygen-component/SKILL.md +141 -0
  10. package/.claude/skills/oxygen-form/SKILL.md +410 -0
  11. package/.claude/skills/oxygen-layout/SKILL.md +233 -0
  12. package/.claude/skills/oxygen-migrate/SKILL.md +277 -0
  13. package/.claude/theming.md +318 -0
  14. package/README.md +182 -2
  15. package/bin/cli.js +480 -0
  16. package/dist/animations/ParticleBackground/ParticleBackground.d.ts +66 -0
  17. package/dist/animations/ParticleBackground/index.d.ts +19 -0
  18. package/dist/animations/index.d.ts +18 -0
  19. package/dist/components/AppShell/AppShell.d.ts +69 -0
  20. package/dist/components/AppShell/AppShellFooter.d.ts +41 -0
  21. package/dist/components/AppShell/AppShellMain.d.ts +41 -0
  22. package/dist/components/AppShell/AppShellNavbar.d.ts +41 -0
  23. package/dist/components/AppShell/AppShellNotificationPanel.d.ts +41 -0
  24. package/dist/components/AppShell/AppShellSidebar.d.ts +41 -0
  25. package/dist/components/AppShell/index.d.ts +29 -0
  26. package/dist/components/CodeBlock/CodeBlock.d.ts +47 -0
  27. package/dist/components/CodeBlock/index.d.ts +19 -0
  28. package/dist/components/ColorSchemeImage/index.d.ts +19 -0
  29. package/dist/components/ColorSchemeToggle/index.d.ts +18 -0
  30. package/dist/components/ComplexSelect/ComplexSelect.d.ts +25 -0
  31. package/dist/components/ComplexSelect/ComplexSelectDivider.d.ts +4 -0
  32. package/dist/components/ComplexSelect/ComplexSelectListHeader.d.ts +7 -0
  33. package/dist/components/ComplexSelect/ComplexSelectMenuItem.d.ts +16 -0
  34. package/dist/components/ComplexSelect/ComplexSelectMenuItemAvatar.d.ts +7 -0
  35. package/dist/components/ComplexSelect/ComplexSelectMenuItemIcon.d.ts +7 -0
  36. package/dist/components/ComplexSelect/ComplexSelectMenuItemText.d.ts +8 -0
  37. package/dist/components/ComplexSelect/index.d.ts +21 -0
  38. package/dist/components/Footer/Footer.d.ts +71 -0
  39. package/dist/components/Footer/index.d.ts +19 -0
  40. package/dist/components/Form/CardButton.d.ts +30 -0
  41. package/dist/components/Form/ElementWrapper.d.ts +24 -0
  42. package/dist/components/Form/Section.d.ts +21 -0
  43. package/dist/components/Form/Stack.d.ts +19 -0
  44. package/dist/components/Form/Typography.d.ts +21 -0
  45. package/dist/components/Form/Wizard.d.ts +27 -0
  46. package/dist/components/Form/index.d.ts +38 -0
  47. package/dist/components/Header/Header.d.ts +89 -0
  48. package/dist/components/Header/HeaderActions.d.ts +42 -0
  49. package/dist/components/Header/HeaderBrand.d.ts +48 -0
  50. package/dist/components/Header/HeaderBrandLogo.d.ts +45 -0
  51. package/dist/components/Header/HeaderBrandTitle.d.ts +45 -0
  52. package/dist/components/Header/HeaderSwitchers.d.ts +45 -0
  53. package/dist/components/Header/HeaderToggle.d.ts +52 -0
  54. package/dist/components/Header/context.d.ts +34 -0
  55. package/dist/components/Header/index.d.ts +33 -0
  56. package/dist/components/ListingTable/ListingTable/ListingTable.d.ts +54 -0
  57. package/dist/components/ListingTable/ListingTable/ListingTableBody.d.ts +6 -0
  58. package/dist/components/ListingTable/ListingTable/ListingTableCell.d.ts +15 -0
  59. package/dist/components/ListingTable/ListingTable/ListingTableContainer.d.ts +17 -0
  60. package/dist/components/ListingTable/ListingTable/ListingTableFooter.d.ts +6 -0
  61. package/dist/components/ListingTable/ListingTable/ListingTableHead.d.ts +6 -0
  62. package/dist/components/ListingTable/ListingTable/ListingTableRow.d.ts +18 -0
  63. package/dist/components/ListingTable/ListingTable/index.d.ts +21 -0
  64. package/dist/components/ListingTable/ListingTableProvider.d.ts +28 -0
  65. package/dist/components/ListingTable/context.d.ts +78 -0
  66. package/dist/components/ListingTable/index.d.ts +22 -0
  67. package/dist/components/ListingTable/shared/ListingTableCellIcon.d.ts +31 -0
  68. package/dist/components/ListingTable/shared/ListingTableDensityControl.d.ts +26 -0
  69. package/dist/components/ListingTable/shared/ListingTableEmptyState.d.ts +32 -0
  70. package/dist/components/ListingTable/shared/ListingTableRowActions.d.ts +24 -0
  71. package/dist/components/ListingTable/shared/ListingTableSortLabel.d.ts +37 -0
  72. package/dist/components/ListingTable/shared/ListingTableToolbar.d.ts +52 -0
  73. package/dist/components/ListingTable/shared/index.d.ts +14 -0
  74. package/dist/components/ListingTable/shared/types.d.ts +5 -0
  75. package/dist/components/NotificationBanner/NotificationBanner.d.ts +69 -0
  76. package/dist/components/NotificationBanner/index.d.ts +19 -0
  77. package/dist/components/NotificationPanel/NotificationActions.d.ts +44 -0
  78. package/dist/components/NotificationPanel/NotificationEmptyState.d.ts +41 -0
  79. package/dist/components/NotificationPanel/NotificationHeader.d.ts +47 -0
  80. package/dist/components/NotificationPanel/NotificationHeaderBadge.d.ts +46 -0
  81. package/dist/components/NotificationPanel/NotificationHeaderClose.d.ts +46 -0
  82. package/dist/components/NotificationPanel/NotificationHeaderIcon.d.ts +43 -0
  83. package/dist/components/NotificationPanel/NotificationHeaderTitle.d.ts +43 -0
  84. package/dist/components/NotificationPanel/NotificationItem.d.ts +64 -0
  85. package/dist/components/NotificationPanel/NotificationItemAction.d.ts +46 -0
  86. package/dist/components/NotificationPanel/NotificationItemAvatar.d.ts +44 -0
  87. package/dist/components/NotificationPanel/NotificationItemContext.d.ts +52 -0
  88. package/dist/components/NotificationPanel/NotificationItemMessage.d.ts +47 -0
  89. package/dist/components/NotificationPanel/NotificationItemTimestamp.d.ts +46 -0
  90. package/dist/components/NotificationPanel/NotificationItemTitle.d.ts +49 -0
  91. package/dist/components/NotificationPanel/NotificationList.d.ts +37 -0
  92. package/dist/components/NotificationPanel/NotificationPanel.d.ts +122 -0
  93. package/dist/components/NotificationPanel/NotificationTabs.d.ts +51 -0
  94. package/dist/components/NotificationPanel/context.d.ts +34 -0
  95. package/dist/components/NotificationPanel/index.d.ts +55 -0
  96. package/dist/components/NotificationPanel/utils.d.ts +46 -0
  97. package/dist/components/PageContent/PageContent.d.ts +71 -0
  98. package/dist/components/PageContent/index.d.ts +2 -0
  99. package/dist/components/PageTitle/PageTitle.d.ts +34 -0
  100. package/dist/components/PageTitle/PageTitleAvatar.d.ts +16 -0
  101. package/dist/components/PageTitle/PageTitleHeader.d.ts +16 -0
  102. package/dist/components/PageTitle/PageTitleLink.d.ts +20 -0
  103. package/dist/components/PageTitle/PageTitleSubHeader.d.ts +16 -0
  104. package/dist/components/PageTitle/index.d.ts +27 -0
  105. package/dist/components/SearchBar/SearchBar.d.ts +5 -0
  106. package/dist/components/SearchBar/SearchBarWithAdvancedFilter.d.ts +26 -0
  107. package/dist/components/Sidebar/Sidebar.d.ts +120 -0
  108. package/dist/components/Sidebar/SidebarCategory.d.ts +47 -0
  109. package/dist/components/Sidebar/SidebarCategoryLabel.d.ts +47 -0
  110. package/dist/components/Sidebar/SidebarFooter.d.ts +38 -0
  111. package/dist/components/Sidebar/SidebarItem.d.ts +61 -0
  112. package/dist/components/Sidebar/SidebarItemBadge.d.ts +47 -0
  113. package/dist/components/Sidebar/SidebarItemContext.d.ts +49 -0
  114. package/dist/components/Sidebar/SidebarItemIcon.d.ts +47 -0
  115. package/dist/components/Sidebar/SidebarItemLabel.d.ts +44 -0
  116. package/dist/components/Sidebar/SidebarNav.d.ts +42 -0
  117. package/dist/components/Sidebar/SidebarUser.d.ts +57 -0
  118. package/dist/components/Sidebar/SidebarUserAvatar.d.ts +51 -0
  119. package/dist/components/Sidebar/SidebarUserEmail.d.ts +48 -0
  120. package/dist/components/Sidebar/SidebarUserName.d.ts +45 -0
  121. package/dist/components/Sidebar/context.d.ts +42 -0
  122. package/dist/components/Sidebar/index.d.ts +47 -0
  123. package/dist/components/StatCard/StatCard.d.ts +48 -0
  124. package/dist/components/StatCard/index.d.ts +2 -0
  125. package/dist/components/ThemeSwitcher/ThemeSelect.d.ts +37 -0
  126. package/dist/components/ThemeSwitcher/ThemeSwitcher.d.ts +65 -0
  127. package/dist/components/ThemeSwitcher/index.d.ts +4 -0
  128. package/dist/components/UserMenu/UserMenu.d.ts +74 -0
  129. package/dist/components/UserMenu/index.d.ts +19 -0
  130. package/dist/components/index.d.ts +54 -0
  131. package/dist/contexts/OxygenUIThemeProvider/OxygenUIThemeProvider.d.ts +58 -3
  132. package/dist/contexts/OxygenUIThemeProvider/index.d.ts +20 -0
  133. package/dist/contexts/index.d.ts +19 -0
  134. package/dist/hooks/index.d.ts +22 -0
  135. package/dist/hooks/useAppShell/index.d.ts +19 -0
  136. package/dist/hooks/useAppShell/useAppShell.d.ts +81 -0
  137. package/dist/hooks/useNotifications/index.d.ts +19 -0
  138. package/dist/hooks/useNotifications/useNotifications.d.ts +105 -0
  139. package/dist/hooks/useThemeContent/index.d.ts +18 -0
  140. package/dist/hooks/useThemeContent/useThemeContent.d.ts +57 -0
  141. package/dist/index.d.ts +8 -4
  142. package/dist/index.js +5189 -252
  143. package/dist/index.js.map +4 -4
  144. package/dist/layouts/Layout.d.ts +3 -0
  145. package/dist/layouts/LayoutContent.d.ts +3 -0
  146. package/dist/layouts/LayoutHeader.d.ts +3 -0
  147. package/dist/layouts/LayoutNavbar.d.ts +3 -0
  148. package/dist/layouts/LayoutSidebar.d.ts +3 -0
  149. package/dist/styles/Themes/AcrylicBaseTheme.d.ts +25 -0
  150. package/dist/styles/Themes/AcrylicOrangeTheme.d.ts +17 -0
  151. package/dist/styles/Themes/AcrylicPurpleTheme.d.ts +20 -0
  152. package/dist/styles/Themes/ClassicTheme.d.ts +24 -0
  153. package/dist/styles/Themes/HighContrastTheme.d.ts +20 -0
  154. package/dist/styles/Themes/OxygenThemeBase.d.ts +70 -0
  155. package/dist/styles/Themes/index.d.ts +22 -0
  156. package/dist/styles/index.d.ts +18 -0
  157. package/dist/utils/formatRelativeTime.d.ts +34 -0
  158. package/dist/utils/index.d.ts +19 -0
  159. package/dist/utils/pxToRem.d.ts +23 -0
  160. package/package.json +20 -12
  161. package/dist/components/ColorSchemeImage/ColorSchemeImage.js +0 -57
  162. package/dist/components/ColorSchemeImage/ColorSchemeImage.js.map +0 -7
  163. package/dist/components/ColorSchemeToggle/ColorSchemeToggle.js +0 -76
  164. package/dist/components/ColorSchemeToggle/ColorSchemeToggle.js.map +0 -7
  165. package/dist/contexts/OxygenUIThemeProvider/OxygenUIThemeProvider.js +0 -378
  166. package/dist/contexts/OxygenUIThemeProvider/OxygenUIThemeProvider.js.map +0 -7
  167. package/dist/styles/OxygenTheme/OxygenTheme.d.ts +0 -38
  168. package/dist/styles/OxygenTheme/OxygenTheme.js +0 -356
  169. package/dist/styles/OxygenTheme/OxygenTheme.js.map +0 -7
@@ -0,0 +1,798 @@
1
+ # Oxygen UI Component Reference
2
+
3
+ Complete API reference for custom Oxygen UI components. For MUI components, refer to [Material-UI documentation](https://mui.com/material-ui/).
4
+
5
+ ## Table of Contents
6
+
7
+ - [OxygenUIThemeProvider](#oxygenuitthemeprovider)
8
+ - [ListingTable](#listingtable)
9
+ - [AppShell](#appshell)
10
+ - [Header](#header)
11
+ - [Sidebar](#sidebar)
12
+ - [Form](#form)
13
+ - [NotificationPanel](#notificationpanel)
14
+ - [Other Components](#other-components)
15
+ - [MUI X Namespaces](#mui-x-namespaces)
16
+ - [Hooks](#hooks)
17
+
18
+ ---
19
+
20
+ ## OxygenUIThemeProvider
21
+
22
+ Theme provider that wraps your application. Required at the root level.
23
+
24
+ ```tsx
25
+ import { OxygenUIThemeProvider, OxygenTheme } from '@wso2/oxygen-ui';
26
+ ```
27
+
28
+ ### Props
29
+
30
+ | Prop | Type | Default | Description |
31
+ |------|------|---------|-------------|
32
+ | `children` | `ReactNode` | required | App content |
33
+ | `theme` | `Theme` | `OxygenTheme` | Single theme (disables switching) |
34
+ | `themes` | `ThemeOption[]` | - | Array of themes (enables switching) |
35
+ | `initialTheme` | `string` | First theme key | Initial theme key |
36
+
37
+ ### ThemeOption Type
38
+
39
+ ```tsx
40
+ interface ThemeOption {
41
+ key: string; // Unique identifier
42
+ label: string; // Display name
43
+ theme: Theme; // MUI Theme object
44
+ }
45
+ ```
46
+
47
+ ### Basic Usage
48
+
49
+ ```tsx
50
+ // Single theme (no switching)
51
+ <OxygenUIThemeProvider theme={OxygenTheme}>
52
+ <App />
53
+ </OxygenUIThemeProvider>
54
+ ```
55
+
56
+ ### Theme Switching
57
+
58
+ ```tsx
59
+ import {
60
+ OxygenUIThemeProvider,
61
+ OxygenTheme,
62
+ AcrylicOrangeTheme,
63
+ AcrylicPurpleTheme,
64
+ } from '@wso2/oxygen-ui';
65
+
66
+ const themes = [
67
+ { key: 'default', label: 'Default', theme: OxygenTheme },
68
+ { key: 'orange', label: 'Orange', theme: AcrylicOrangeTheme },
69
+ { key: 'purple', label: 'Purple', theme: AcrylicPurpleTheme },
70
+ ];
71
+
72
+ <OxygenUIThemeProvider themes={themes} initialTheme="default">
73
+ <App />
74
+ </OxygenUIThemeProvider>
75
+ ```
76
+
77
+ ---
78
+
79
+ ## ListingTable
80
+
81
+ Advanced data table with compound component pattern. Supports search, sort, pagination, selection, and bulk actions.
82
+
83
+ ```tsx
84
+ import { ListingTable } from '@wso2/oxygen-ui';
85
+ ```
86
+
87
+ ### Sub-components
88
+
89
+ | Component | Description |
90
+ |-----------|-------------|
91
+ | `ListingTable.Provider` | Context provider for state management |
92
+ | `ListingTable.Container` | Paper wrapper with styling |
93
+ | `ListingTable.Toolbar` | Search, filters, and actions bar |
94
+ | `ListingTable.Head` | Table header wrapper |
95
+ | `ListingTable.Body` | Table body wrapper |
96
+ | `ListingTable.Footer` | Table footer (pagination) |
97
+ | `ListingTable.Row` | Table row |
98
+ | `ListingTable.Cell` | Table cell |
99
+ | `ListingTable.SortLabel` | Sortable column header |
100
+ | `ListingTable.DensityControl` | Density toggle button |
101
+ | `ListingTable.EmptyState` | Empty state display |
102
+ | `ListingTable.RowActions` | Row action buttons |
103
+ | `ListingTable.CellIcon` | Icon in cell |
104
+
105
+ ### ListingTable Props
106
+
107
+ | Prop | Type | Default | Description |
108
+ |------|------|---------|-------------|
109
+ | `variant` | `'table' \| 'card'` | `'table'` | Display style |
110
+ | `density` | `'compact' \| 'standard' \| 'comfortable'` | `'standard'` | Row padding |
111
+ | `striped` | `boolean` | `false` | Alternating row colors |
112
+ | `bordered` | `boolean` | `false` | Cell borders |
113
+
114
+ ### Provider Props (Context State)
115
+
116
+ ```tsx
117
+ interface ListingTableProviderProps {
118
+ // Search
119
+ searchValue?: string;
120
+ onSearchChange?: (value: string) => void;
121
+
122
+ // Sort
123
+ sortField?: string;
124
+ sortDirection?: 'asc' | 'desc';
125
+ onSortChange?: (field: string, direction: 'asc' | 'desc') => void;
126
+
127
+ // Pagination
128
+ page?: number; // 0-indexed
129
+ rowsPerPage?: number;
130
+ totalCount?: number;
131
+ onPageChange?: (page: number) => void;
132
+ onRowsPerPageChange?: (rowsPerPage: number) => void;
133
+
134
+ // Selection
135
+ selected?: readonly string[];
136
+ onSelectionChange?: (selected: readonly string[]) => void;
137
+ onSelectAll?: () => void;
138
+ onClearSelection?: () => void;
139
+ isSelected?: (id: string) => boolean;
140
+
141
+ // Filters
142
+ filters?: Record<string, unknown>;
143
+ onFilterChange?: (key: string, value: unknown) => void;
144
+ onClearFilters?: () => void;
145
+
146
+ // Bulk Actions
147
+ onBulkDelete?: (ids: readonly string[]) => void;
148
+ onBulkAction?: (actionId: string, ids: readonly string[]) => void;
149
+
150
+ // UI State
151
+ density?: 'compact' | 'standard' | 'comfortable';
152
+ onDensityChange?: (density: ListingTableDensity) => void;
153
+ loading?: boolean;
154
+ }
155
+ ```
156
+
157
+ ### Toolbar Props
158
+
159
+ | Prop | Type | Default | Description |
160
+ |------|------|---------|-------------|
161
+ | `showSearch` | `boolean` | `false` | Show built-in search |
162
+ | `searchSlot` | `ReactNode` | - | Custom search component |
163
+ | `searchPlaceholder` | `string` | `'Search...'` | Search placeholder |
164
+ | `actions` | `ReactNode` | - | Right-side actions |
165
+ | `children` | `ReactNode` | - | Center content |
166
+
167
+ ### Basic Table
168
+
169
+ ```tsx
170
+ <ListingTable.Container>
171
+ <ListingTable>
172
+ <ListingTable.Head>
173
+ <ListingTable.Row>
174
+ <ListingTable.Cell>Name</ListingTable.Cell>
175
+ <ListingTable.Cell>Status</ListingTable.Cell>
176
+ <ListingTable.Cell>Actions</ListingTable.Cell>
177
+ </ListingTable.Row>
178
+ </ListingTable.Head>
179
+ <ListingTable.Body>
180
+ {data.map((row) => (
181
+ <ListingTable.Row key={row.id}>
182
+ <ListingTable.Cell>{row.name}</ListingTable.Cell>
183
+ <ListingTable.Cell>{row.status}</ListingTable.Cell>
184
+ <ListingTable.Cell>
185
+ <ListingTable.RowActions
186
+ actions={[
187
+ { id: 'edit', label: 'Edit', onClick: () => edit(row.id) },
188
+ { id: 'delete', label: 'Delete', onClick: () => delete(row.id) },
189
+ ]}
190
+ />
191
+ </ListingTable.Cell>
192
+ </ListingTable.Row>
193
+ ))}
194
+ </ListingTable.Body>
195
+ </ListingTable>
196
+ </ListingTable.Container>
197
+ ```
198
+
199
+ ### Full-Featured Table with Context
200
+
201
+ ```tsx
202
+ const [search, setSearch] = useState('');
203
+ const [sortField, setSortField] = useState('name');
204
+ const [sortDirection, setSortDirection] = useState<'asc' | 'desc'>('asc');
205
+ const [page, setPage] = useState(0);
206
+ const [rowsPerPage, setRowsPerPage] = useState(10);
207
+
208
+ <ListingTable.Provider
209
+ searchValue={search}
210
+ onSearchChange={setSearch}
211
+ sortField={sortField}
212
+ sortDirection={sortDirection}
213
+ onSortChange={(field, dir) => {
214
+ setSortField(field);
215
+ setSortDirection(dir);
216
+ }}
217
+ page={page}
218
+ rowsPerPage={rowsPerPage}
219
+ totalCount={data.length}
220
+ onPageChange={setPage}
221
+ onRowsPerPageChange={setRowsPerPage}
222
+ >
223
+ <ListingTable.Container>
224
+ <ListingTable.Toolbar
225
+ showSearch
226
+ actions={<ListingTable.DensityControl />}
227
+ />
228
+ <ListingTable variant="card">
229
+ <ListingTable.Head>
230
+ <ListingTable.Row>
231
+ <ListingTable.Cell>
232
+ <ListingTable.SortLabel field="name">Name</ListingTable.SortLabel>
233
+ </ListingTable.Cell>
234
+ <ListingTable.Cell>
235
+ <ListingTable.SortLabel field="status">Status</ListingTable.SortLabel>
236
+ </ListingTable.Cell>
237
+ </ListingTable.Row>
238
+ </ListingTable.Head>
239
+ <ListingTable.Body>
240
+ {paginatedData.map((row) => (
241
+ <ListingTable.Row key={row.id}>
242
+ <ListingTable.Cell>{row.name}</ListingTable.Cell>
243
+ <ListingTable.Cell>{row.status}</ListingTable.Cell>
244
+ </ListingTable.Row>
245
+ ))}
246
+ </ListingTable.Body>
247
+ <ListingTable.Footer />
248
+ </ListingTable>
249
+ </ListingTable.Container>
250
+ </ListingTable.Provider>
251
+ ```
252
+
253
+ ---
254
+
255
+ ## AppShell
256
+
257
+ Application layout wrapper using compound component pattern.
258
+
259
+ ```tsx
260
+ import { AppShell } from '@wso2/oxygen-ui';
261
+ ```
262
+
263
+ ### Sub-components
264
+
265
+ | Component | Description |
266
+ |-----------|-------------|
267
+ | `AppShell.Navbar` | Top navigation area (header) |
268
+ | `AppShell.Sidebar` | Left sidebar area |
269
+ | `AppShell.Main` | Main content area |
270
+ | `AppShell.Footer` | Bottom footer area |
271
+ | `AppShell.NotificationPanel` | Overlay notification panel |
272
+
273
+ ### Usage
274
+
275
+ ```tsx
276
+ <AppShell>
277
+ <AppShell.Navbar>
278
+ <Header>...</Header>
279
+ </AppShell.Navbar>
280
+
281
+ <AppShell.Sidebar>
282
+ <Sidebar collapsed={collapsed}>...</Sidebar>
283
+ </AppShell.Sidebar>
284
+
285
+ <AppShell.Main>
286
+ <Outlet /> {/* React Router outlet */}
287
+ </AppShell.Main>
288
+
289
+ <AppShell.Footer>
290
+ <Footer companyName="WSO2 LLC" />
291
+ </AppShell.Footer>
292
+
293
+ <AppShell.NotificationPanel>
294
+ <NotificationPanel open={open} onClose={onClose}>
295
+ ...
296
+ </NotificationPanel>
297
+ </AppShell.NotificationPanel>
298
+ </AppShell>
299
+ ```
300
+
301
+ ---
302
+
303
+ ## Header
304
+
305
+ Top navigation bar compound component.
306
+
307
+ ```tsx
308
+ import { Header } from '@wso2/oxygen-ui';
309
+ ```
310
+
311
+ ### Sub-components
312
+
313
+ | Component | Description |
314
+ |-----------|-------------|
315
+ | `Header.Toggle` | Sidebar collapse toggle button |
316
+ | `Header.Brand` | Logo and title container |
317
+ | `Header.BrandLogo` | Logo image/icon |
318
+ | `Header.BrandTitle` | Application title |
319
+ | `Header.Switchers` | Context switcher container |
320
+ | `Header.Actions` | Right-side action buttons |
321
+ | `Header.Spacer` | Flexible spacer |
322
+
323
+ ### Props
324
+
325
+ | Prop | Type | Default | Description |
326
+ |------|------|---------|-------------|
327
+ | `minimal` | `boolean` | `false` | Hide switchers section |
328
+ | `sx` | `SxProps` | - | Custom styles |
329
+
330
+ ### Usage
331
+
332
+ ```tsx
333
+ <Header>
334
+ <Header.Toggle collapsed={collapsed} onToggle={() => setCollapsed(!collapsed)} />
335
+
336
+ <Header.Brand>
337
+ <Header.BrandLogo>
338
+ <img src="/logo.svg" alt="Logo" />
339
+ </Header.BrandLogo>
340
+ <Header.BrandTitle>My Application</Header.BrandTitle>
341
+ </Header.Brand>
342
+
343
+ <Header.Switchers>
344
+ <OrganizationSwitcher />
345
+ <ProjectSwitcher />
346
+ </Header.Switchers>
347
+
348
+ <Header.Spacer />
349
+
350
+ <Header.Actions>
351
+ <ColorSchemeToggle />
352
+ <NotificationButton />
353
+ <UserMenu user={user} />
354
+ </Header.Actions>
355
+ </Header>
356
+ ```
357
+
358
+ ---
359
+
360
+ ## Sidebar
361
+
362
+ Collapsible navigation sidebar compound component.
363
+
364
+ ```tsx
365
+ import { Sidebar, SIDEBAR_WIDTH, COLLAPSED_SIDEBAR_WIDTH } from '@wso2/oxygen-ui';
366
+ ```
367
+
368
+ ### Sub-components
369
+
370
+ | Component | Description |
371
+ |-----------|-------------|
372
+ | `Sidebar.Nav` | Scrollable navigation container |
373
+ | `Sidebar.Category` | Menu category group |
374
+ | `Sidebar.CategoryLabel` | Category heading text |
375
+ | `Sidebar.Item` | Navigation menu item |
376
+ | `Sidebar.ItemIcon` | Item icon |
377
+ | `Sidebar.ItemLabel` | Item text label |
378
+ | `Sidebar.ItemBadge` | Badge indicator |
379
+ | `Sidebar.Footer` | Fixed bottom section |
380
+ | `Sidebar.User` | User profile section |
381
+ | `Sidebar.UserAvatar` | User avatar |
382
+ | `Sidebar.UserName` | User name text |
383
+ | `Sidebar.UserEmail` | User email text |
384
+
385
+ ### Props
386
+
387
+ | Prop | Type | Default | Description |
388
+ |------|------|---------|-------------|
389
+ | `collapsed` | `boolean` | `false` | Collapsed state |
390
+ | `activeItem` | `string` | - | Active menu item ID |
391
+ | `expandedMenus` | `Record<string, boolean>` | `{}` | Expanded submenu map |
392
+ | `onSelect` | `(id: string) => void` | - | Item selection handler |
393
+ | `onToggleExpand` | `(id: string) => void` | - | Submenu toggle handler |
394
+ | `width` | `number` | `250` | Expanded width (px) |
395
+ | `collapsedWidth` | `number` | `64` | Collapsed width (px) |
396
+
397
+ ### Usage
398
+
399
+ ```tsx
400
+ import { HomeIcon, SettingsIcon } from '@wso2/oxygen-ui-icons-react';
401
+
402
+ <Sidebar
403
+ collapsed={collapsed}
404
+ activeItem={activeId}
405
+ expandedMenus={expandedMenus}
406
+ onSelect={setActiveId}
407
+ onToggleExpand={(id) => toggleExpand(id)}
408
+ >
409
+ <Sidebar.Nav>
410
+ <Sidebar.Category>
411
+ <Sidebar.CategoryLabel>Main</Sidebar.CategoryLabel>
412
+
413
+ <Sidebar.Item id="home">
414
+ <Sidebar.ItemIcon><HomeIcon size={20} /></Sidebar.ItemIcon>
415
+ <Sidebar.ItemLabel>Home</Sidebar.ItemLabel>
416
+ </Sidebar.Item>
417
+
418
+ <Sidebar.Item id="dashboard">
419
+ <Sidebar.ItemIcon><DashboardIcon size={20} /></Sidebar.ItemIcon>
420
+ <Sidebar.ItemLabel>Dashboard</Sidebar.ItemLabel>
421
+ <Sidebar.ItemBadge>5</Sidebar.ItemBadge>
422
+ </Sidebar.Item>
423
+ </Sidebar.Category>
424
+ </Sidebar.Nav>
425
+
426
+ <Sidebar.Footer>
427
+ <Sidebar.Item id="settings">
428
+ <Sidebar.ItemIcon><SettingsIcon size={20} /></Sidebar.ItemIcon>
429
+ <Sidebar.ItemLabel>Settings</Sidebar.ItemLabel>
430
+ </Sidebar.Item>
431
+ </Sidebar.Footer>
432
+ </Sidebar>
433
+ ```
434
+
435
+ ---
436
+
437
+ ## Form
438
+
439
+ Form components namespace with enhanced inputs.
440
+
441
+ ```tsx
442
+ import { Form } from '@wso2/oxygen-ui';
443
+ ```
444
+
445
+ ### Components
446
+
447
+ | Component | Description |
448
+ |-----------|-------------|
449
+ | `Form.TextInput` | Enhanced text field |
450
+ | `Form.SelectInput` | Enhanced select dropdown |
451
+ | `Form.MenuItem` | Select menu item |
452
+ | `Form.AutocompleteInput` | Autocomplete input |
453
+ | `Form.CardButton` | Clickable card |
454
+ | `Form.Section` | Form section with heading |
455
+ | `Form.Header` | Section header text |
456
+ | `Form.Subheader` | Section subheader text |
457
+ | `Form.Body` | Section body text |
458
+ | `Form.Stack` | Form field stack layout |
459
+ | `Form.Wizard` | Multi-step form wizard |
460
+
461
+ ### Wizard Props
462
+
463
+ ```tsx
464
+ interface WizardStep {
465
+ id: string;
466
+ label: string;
467
+ content: ReactNode;
468
+ optional?: boolean;
469
+ }
470
+
471
+ interface WizardProps {
472
+ steps: WizardStep[];
473
+ activeStep: number;
474
+ onStepChange: (step: number) => void;
475
+ onComplete?: () => void;
476
+ }
477
+ ```
478
+
479
+ ### Usage
480
+
481
+ ```tsx
482
+ <Form.Section>
483
+ <Form.Header>User Details</Form.Header>
484
+ <Form.Subheader>Enter your information</Form.Subheader>
485
+
486
+ <Form.Stack spacing={2}>
487
+ <Form.TextInput
488
+ label="Name"
489
+ value={name}
490
+ onChange={(e) => setName(e.target.value)}
491
+ />
492
+
493
+ <Form.SelectInput
494
+ label="Role"
495
+ value={role}
496
+ onChange={(e) => setRole(e.target.value)}
497
+ >
498
+ <Form.MenuItem value="admin">Admin</Form.MenuItem>
499
+ <Form.MenuItem value="user">User</Form.MenuItem>
500
+ </Form.SelectInput>
501
+ </Form.Stack>
502
+ </Form.Section>
503
+ ```
504
+
505
+ ---
506
+
507
+ ## NotificationPanel
508
+
509
+ Slide-out notification panel with tabs.
510
+
511
+ ```tsx
512
+ import { NotificationPanel } from '@wso2/oxygen-ui';
513
+ ```
514
+
515
+ ### Props
516
+
517
+ | Prop | Type | Default | Description |
518
+ |------|------|---------|-------------|
519
+ | `open` | `boolean` | required | Panel visibility |
520
+ | `onClose` | `() => void` | required | Close handler |
521
+ | `title` | `string` | `'Notifications'` | Panel title |
522
+
523
+ ### Usage
524
+
525
+ ```tsx
526
+ <NotificationPanel open={open} onClose={() => setOpen(false)}>
527
+ <NotificationPanel.Header>
528
+ <NotificationPanel.Tabs>
529
+ <NotificationPanel.Tab label="All" />
530
+ <NotificationPanel.Tab label="Unread" badge={3} />
531
+ </NotificationPanel.Tabs>
532
+ <NotificationPanel.Actions>
533
+ <Button onClick={markAllRead}>Mark all read</Button>
534
+ </NotificationPanel.Actions>
535
+ </NotificationPanel.Header>
536
+
537
+ <NotificationPanel.List>
538
+ {notifications.map((n) => (
539
+ <NotificationPanel.Item
540
+ key={n.id}
541
+ title={n.title}
542
+ message={n.message}
543
+ time={n.timestamp}
544
+ read={n.read}
545
+ />
546
+ ))}
547
+ </NotificationPanel.List>
548
+
549
+ <NotificationPanel.EmptyState message="No notifications" />
550
+ </NotificationPanel>
551
+ ```
552
+
553
+ ---
554
+
555
+ ## Other Components
556
+
557
+ ### ColorSchemeToggle
558
+
559
+ Dark/light mode toggle button.
560
+
561
+ ```tsx
562
+ import { ColorSchemeToggle } from '@wso2/oxygen-ui';
563
+
564
+ <ColorSchemeToggle />
565
+ ```
566
+
567
+ ### ThemeSwitcher
568
+
569
+ Theme selection UI component.
570
+
571
+ ```tsx
572
+ import { ThemeSwitcher } from '@wso2/oxygen-ui';
573
+
574
+ <ThemeSwitcher /> // Requires OxygenUIThemeProvider with themes
575
+ ```
576
+
577
+ ### Footer
578
+
579
+ Application footer component.
580
+
581
+ ```tsx
582
+ import { Footer } from '@wso2/oxygen-ui';
583
+
584
+ <Footer
585
+ companyName="WSO2 LLC"
586
+ year={2025}
587
+ links={[
588
+ { label: 'Privacy', href: '/privacy' },
589
+ { label: 'Terms', href: '/terms' },
590
+ ]}
591
+ />
592
+ ```
593
+
594
+ ### UserMenu
595
+
596
+ User profile dropdown menu.
597
+
598
+ ```tsx
599
+ import { UserMenu } from '@wso2/oxygen-ui';
600
+
601
+ <UserMenu
602
+ user={{ name: 'John Doe', email: 'john@example.com', avatar: '/avatar.png' }}
603
+ onSignOut={() => signOut()}
604
+ />
605
+ ```
606
+
607
+ ### PageTitle
608
+
609
+ Page header with avatar and breadcrumb support.
610
+
611
+ ```tsx
612
+ import { PageTitle } from '@wso2/oxygen-ui';
613
+
614
+ <PageTitle>
615
+ <PageTitle.Avatar><UserIcon /></PageTitle.Avatar>
616
+ <PageTitle.Header>Dashboard</PageTitle.Header>
617
+ <PageTitle.SubHeader>Overview of your projects</PageTitle.SubHeader>
618
+ </PageTitle>
619
+ ```
620
+
621
+ ### CodeBlock
622
+
623
+ Syntax-highlighted code display.
624
+
625
+ ```tsx
626
+ import { CodeBlock } from '@wso2/oxygen-ui';
627
+
628
+ <CodeBlock language="typescript">
629
+ {`const greeting = "Hello, World!";`}
630
+ </CodeBlock>
631
+ ```
632
+
633
+ ---
634
+
635
+ ## MUI X Namespaces
636
+
637
+ MUI X components are exported as namespaces to avoid naming conflicts.
638
+
639
+ ```tsx
640
+ import { DataGrid, Charts, DatePickers, TreeView, AdapterDateFns } from '@wso2/oxygen-ui';
641
+ ```
642
+
643
+ ### DataGrid
644
+
645
+ ```tsx
646
+ <DataGrid.DataGrid
647
+ rows={rows}
648
+ columns={columns}
649
+ pageSize={10}
650
+ checkboxSelection
651
+ />
652
+
653
+ <DataGrid.DataGridPro
654
+ rows={rows}
655
+ columns={columns}
656
+ treeData
657
+ />
658
+ ```
659
+
660
+ ### Charts
661
+
662
+ ```tsx
663
+ <Charts.LineChart
664
+ series={[{ data: [1, 2, 3, 4], label: 'Sales' }]}
665
+ xAxis={[{ data: ['Jan', 'Feb', 'Mar', 'Apr'], scaleType: 'band' }]}
666
+ />
667
+
668
+ <Charts.BarChart series={series} />
669
+ <Charts.PieChart series={series} />
670
+ <Charts.ScatterChart series={series} />
671
+ ```
672
+
673
+ ### DatePickers
674
+
675
+ ```tsx
676
+ <DatePickers.LocalizationProvider dateAdapter={AdapterDateFns}>
677
+ <DatePickers.DatePicker
678
+ value={date}
679
+ onChange={setDate}
680
+ label="Select date"
681
+ />
682
+
683
+ <DatePickers.DateTimePicker
684
+ value={dateTime}
685
+ onChange={setDateTime}
686
+ />
687
+
688
+ <DatePickers.DateRangePicker
689
+ value={range}
690
+ onChange={setRange}
691
+ />
692
+ </DatePickers.LocalizationProvider>
693
+ ```
694
+
695
+ ### TreeView
696
+
697
+ ```tsx
698
+ <TreeView.SimpleTreeView>
699
+ <TreeView.TreeItem itemId="1" label="Parent">
700
+ <TreeView.TreeItem itemId="2" label="Child 1" />
701
+ <TreeView.TreeItem itemId="3" label="Child 2" />
702
+ </TreeView.TreeItem>
703
+ </TreeView.SimpleTreeView>
704
+
705
+ <TreeView.RichTreeView
706
+ items={treeData}
707
+ multiSelect
708
+ />
709
+ ```
710
+
711
+ ---
712
+
713
+ ## Hooks
714
+
715
+ ### useThemeSwitcher
716
+
717
+ Access theme switching context.
718
+
719
+ ```tsx
720
+ import { useThemeSwitcher } from '@wso2/oxygen-ui';
721
+
722
+ function ThemeSelector() {
723
+ const { currentTheme, themes, setTheme, isActive } = useThemeSwitcher();
724
+
725
+ return (
726
+ <Select value={currentTheme} onChange={(e) => setTheme(e.target.value)}>
727
+ {themes.map((t) => (
728
+ <MenuItem key={t.key} value={t.key}>{t.label}</MenuItem>
729
+ ))}
730
+ </Select>
731
+ );
732
+ }
733
+ ```
734
+
735
+ ### useListingTable
736
+
737
+ Access ListingTable context (returns null outside Provider).
738
+
739
+ ```tsx
740
+ import { useListingTable } from '@wso2/oxygen-ui';
741
+
742
+ function CustomFilter() {
743
+ const context = useListingTable();
744
+ if (!context) return null;
745
+
746
+ return (
747
+ <TextField
748
+ value={context.searchValue}
749
+ onChange={(e) => context.onSearchChange?.(e.target.value)}
750
+ />
751
+ );
752
+ }
753
+ ```
754
+
755
+ ### useListingTableRequired
756
+
757
+ Access ListingTable context (throws if outside Provider).
758
+
759
+ ```tsx
760
+ import { useListingTableRequired } from '@wso2/oxygen-ui';
761
+
762
+ function TableControls() {
763
+ const { density, onDensityChange } = useListingTableRequired();
764
+ // ...
765
+ }
766
+ ```
767
+
768
+ ---
769
+
770
+ ## Type Exports
771
+
772
+ Import types for TypeScript usage:
773
+
774
+ ```tsx
775
+ import type {
776
+ // Theme
777
+ ThemeOption,
778
+ ThemeSwitcherContextValue,
779
+
780
+ // ListingTable
781
+ ListingTableProps,
782
+ ListingTableProviderProps,
783
+ ListingTableContextValue,
784
+ ListingTableToolbarProps,
785
+ ListingTableDensity,
786
+ ListingTableVariant,
787
+ ListingTableSortDirection,
788
+
789
+ // Layout components
790
+ AppShellProps,
791
+ HeaderProps,
792
+ SidebarProps,
793
+
794
+ // Form
795
+ WizardProps,
796
+ WizardStep,
797
+ } from '@wso2/oxygen-ui';
798
+ ```