@wso2/oxygen-ui 0.0.1-alpha.9 → 0.1.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 +5172 -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,65 @@
1
+ import { ReactNode } from 'react';
2
+ import { type ThemeSwitcherContextValue } from '../../contexts/OxygenUIThemeProvider/OxygenUIThemeProvider';
3
+ export interface ThemeSwitcherProps {
4
+ /**
5
+ * Optional render props function for custom UI.
6
+ * If not provided, renders the default ThemeSelect component.
7
+ */
8
+ children?: (props: ThemeSwitcherContextValue) => ReactNode;
9
+ /**
10
+ * Size of the default select component (when not using render props)
11
+ */
12
+ size?: 'small' | 'medium';
13
+ /**
14
+ * Show label for the default select (when not using render props)
15
+ */
16
+ showLabel?: boolean;
17
+ /**
18
+ * Custom label text for the default select (when not using render props)
19
+ */
20
+ label?: string;
21
+ /**
22
+ * Variant of the default select (when not using render props)
23
+ */
24
+ variant?: 'outlined' | 'filled' | 'standard';
25
+ /**
26
+ * Additional sx prop for styling the default select (when not using render props)
27
+ */
28
+ sx?: object;
29
+ }
30
+ /**
31
+ * ThemeSwitcher - UI component for theme switching
32
+ *
33
+ * Must be used within OxygenUIThemeProvider with themes prop.
34
+ *
35
+ * Default Usage (renders a select dropdown):
36
+ * ```tsx
37
+ * <OxygenUIThemeProvider themes={myThemes}>
38
+ * <ThemeSwitcher />
39
+ * <App />
40
+ * </OxygenUIThemeProvider>
41
+ * ```
42
+ *
43
+ * Custom UI with Render Props:
44
+ * ```tsx
45
+ * <OxygenUIThemeProvider themes={myThemes}>
46
+ * <ThemeSwitcher>
47
+ * {({ currentTheme, themes, setTheme, isActive }) => (
48
+ * <div>
49
+ * {themes.map(t => (
50
+ * <button
51
+ * key={t.key}
52
+ * onClick={() => setTheme(t.key)}
53
+ * style={{ fontWeight: isActive(t.key) ? 'bold' : 'normal' }}
54
+ * >
55
+ * {t.label}
56
+ * </button>
57
+ * ))}
58
+ * </div>
59
+ * )}
60
+ * </ThemeSwitcher>
61
+ * <App />
62
+ * </OxygenUIThemeProvider>
63
+ * ```
64
+ */
65
+ export default function ThemeSwitcher({ children, size, showLabel, label, variant, sx, }: ThemeSwitcherProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export { default } from './ThemeSwitcher';
2
+ export { default as ThemeSelect } from './ThemeSelect';
3
+ export type { ThemeSwitcherProps } from './ThemeSwitcher';
4
+ export type { ThemeSelectProps } from './ThemeSelect';
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
3
+ *
4
+ * WSO2 LLC. licenses this file to you under the Apache License,
5
+ * Version 2.0 (the "License"); you may not use this file except
6
+ * in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing,
12
+ * software distributed under the License is distributed on an
13
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ * KIND, either express or implied. See the License for the
15
+ * specific language governing permissions and limitations
16
+ * under the License.
17
+ */
18
+ import * as React from 'react';
19
+ /**
20
+ * User information for the UserMenu.
21
+ */
22
+ export interface UserMenuUser {
23
+ /** User display name */
24
+ name: string;
25
+ /** User email address */
26
+ email: string;
27
+ /** Avatar text or initials */
28
+ avatar?: string;
29
+ /** Role or plan badge (e.g., "Pro", "Admin") */
30
+ role?: string;
31
+ }
32
+ /**
33
+ * Props for the UserMenu component.
34
+ */
35
+ export interface UserMenuProps {
36
+ /** User information */
37
+ user: UserMenuUser;
38
+ /** Callback when profile is clicked */
39
+ onProfileClick?: () => void;
40
+ /** Callback when settings is clicked */
41
+ onSettingsClick?: () => void;
42
+ /** Callback when billing is clicked */
43
+ onBillingClick?: () => void;
44
+ /** Callback when logout is clicked */
45
+ onLogout?: () => void;
46
+ }
47
+ /**
48
+ * UserMenu - User profile dropdown menu component.
49
+ *
50
+ * Features:
51
+ * - User avatar button that opens dropdown
52
+ * - User info header with name, email, and role badge
53
+ * - Menu items for Profile, Settings, Billing, and Logout
54
+ * - Destructive styling for logout action
55
+ * - Role/plan badge display (e.g., "Pro")
56
+ *
57
+ * Usage:
58
+ * ```tsx
59
+ * <UserMenu
60
+ * user={{
61
+ * name: 'John Doe',
62
+ * email: 'john@example.com',
63
+ * avatar: 'JD',
64
+ * role: 'Pro'
65
+ * }}
66
+ * onProfileClick={() => navigate('/profile')}
67
+ * onSettingsClick={() => navigate('/settings')}
68
+ * onBillingClick={() => navigate('/billing')}
69
+ * onLogout={() => handleLogout()}
70
+ * />
71
+ * ```
72
+ */
73
+ export declare const UserMenu: React.FC<UserMenuProps>;
74
+ export default UserMenu;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
3
+ *
4
+ * WSO2 LLC. licenses this file to you under the Apache License,
5
+ * Version 2.0 (the "License"); you may not use this file except
6
+ * in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing,
12
+ * software distributed under the License is distributed on an
13
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ * KIND, either express or implied. See the License for the
15
+ * specific language governing permissions and limitations
16
+ * under the License.
17
+ */
18
+ export { UserMenu, default } from './UserMenu';
19
+ export type { UserMenuProps, UserMenuUser } from './UserMenu';
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
3
+ *
4
+ * WSO2 LLC. licenses this file to you under the Apache License,
5
+ * Version 2.0 (the "License"); you may not use this file except
6
+ * in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing,
12
+ * software distributed under the License is distributed on an
13
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ * KIND, either express or implied. See the License for the
15
+ * specific language governing permissions and limitations
16
+ * under the License.
17
+ */
18
+ export { default as CodeBlock } from './CodeBlock';
19
+ export type { CodeBlockProps } from './CodeBlock';
20
+ export { default as ColorSchemeImage } from './ColorSchemeImage';
21
+ export type { ColorSchemeImageProps, ColorSchemeImageAttribute } from './ColorSchemeImage';
22
+ export { ColorSchemeToggle, default as ColorSchemeToggleDefault } from './ColorSchemeToggle';
23
+ export { default as ComplexSelect } from './ComplexSelect';
24
+ export type { ComplexSelectProps } from './ComplexSelect';
25
+ export { default as PageContent } from './PageContent';
26
+ export type { PageContentProps } from './PageContent';
27
+ export { default as PageTitle } from './PageTitle';
28
+ export type { PageTitleProps, PageTitleAvatarProps, PageTitleHeaderProps, PageTitleSubHeaderProps, PageTitleLinkProps } from './PageTitle';
29
+ export { default as StatCard } from './StatCard';
30
+ export type { StatCardProps } from './StatCard';
31
+ export { default as ThemeSwitcher, ThemeSelect } from './ThemeSwitcher';
32
+ export type { ThemeSwitcherProps, ThemeSelectProps } from './ThemeSwitcher';
33
+ export { default as SearchBarWithAdvancedFilter } from './SearchBar/SearchBarWithAdvancedFilter';
34
+ export type { SearchBarWithAdvancedFilterProps } from './SearchBar/SearchBarWithAdvancedFilter';
35
+ export { default as SearchBar } from './SearchBar/SearchBar';
36
+ export type { SearchBarProps } from './SearchBar/SearchBar';
37
+ export { Header } from './Header';
38
+ export type { HeaderProps, HeaderSpacerProps, HeaderToggleProps, HeaderBrandProps, HeaderBrandLogoProps, HeaderBrandTitleProps, HeaderSwitchersProps, HeaderActionsProps, HeaderContextValue, } from './Header';
39
+ export { Sidebar } from './Sidebar';
40
+ export type { SidebarProps, SidebarNavProps, SidebarCategoryProps, SidebarCategoryLabelProps, SidebarItemProps, SidebarItemIconProps, SidebarItemLabelProps, SidebarItemBadgeProps, SidebarFooterProps, SidebarUserProps, SidebarUserAvatarProps, SidebarUserNameProps, SidebarUserEmailProps, SidebarContextValue, SidebarItemContextValue, } from './Sidebar';
41
+ export { NotificationPanel } from './NotificationPanel';
42
+ export type { NotificationPanelProps, NotificationHeaderProps, NotificationHeaderIconProps, NotificationHeaderTitleProps, NotificationHeaderBadgeProps, NotificationHeaderCloseProps, NotificationTabsProps, NotificationTabConfig, NotificationActionsProps, NotificationListProps, NotificationItemProps, NotificationItemAvatarProps, NotificationItemTitleProps, NotificationItemMessageProps, NotificationItemTimestampProps, NotificationItemActionProps, NotificationItemContextValue, NotificationEmptyStateProps, NotificationPanelContextValue, NotificationType, NotificationTypeProps, } from './NotificationPanel';
43
+ export { Footer } from './Footer';
44
+ export type { FooterProps } from './Footer';
45
+ export { UserMenu } from './UserMenu';
46
+ export type { UserMenuProps, UserMenuUser } from './UserMenu';
47
+ export { NotificationBanner } from './NotificationBanner';
48
+ export type { NotificationBannerProps } from './NotificationBanner';
49
+ export { Form } from './Form';
50
+ export { AppShell } from './AppShell';
51
+ export type { AppShellProps } from './AppShell';
52
+ export { default as ListingTable } from './ListingTable';
53
+ export { useListingTable, useListingTableRequired, ListingTableContext, ListingTableProvider, } from './ListingTable';
54
+ export type { ListingTableProps, ListingTableContainerProps, ListingTableHeadProps, ListingTableBodyProps, ListingTableFooterProps, ListingTableRowProps, ListingTableCellProps, ListingTableDensity, ListingTableVariant, ListingTableToolbarProps, ListingTableEmptyStateProps, ListingTableDensityControlProps, ListingTableSortLabelProps, ListingSortDirection, ListingTableRowActionsProps, ListingTableCellIconProps, ListingTableContextValue, ListingTableSortDirection, ListingTableProviderProps, } from './ListingTable';
@@ -1,8 +1,63 @@
1
1
  import { Theme } from '@mui/material/styles';
2
+ import { ReactNode } from 'react';
3
+ export interface ThemeOption {
4
+ /**
5
+ * Unique key for the theme
6
+ */
7
+ key: string;
8
+ /**
9
+ * Display label for the theme
10
+ */
11
+ label: string;
12
+ /**
13
+ * The theme object
14
+ */
15
+ theme: Theme;
16
+ }
17
+ export interface ThemeSwitcherContextValue {
18
+ /**
19
+ * The current active theme object
20
+ */
21
+ theme: Theme;
22
+ /**
23
+ * The current theme key
24
+ */
25
+ currentTheme: string;
26
+ /**
27
+ * All available theme options
28
+ */
29
+ themes: ThemeOption[];
30
+ /**
31
+ * Function to switch to a specific theme by key
32
+ */
33
+ setTheme: (themeKey: string) => void;
34
+ /**
35
+ * Check if a specific theme is active
36
+ */
37
+ isActive: (themeKey: string) => boolean;
38
+ }
39
+ /**
40
+ * Hook to access theme switcher context
41
+ */
42
+ export declare const useThemeSwitcher: () => ThemeSwitcherContextValue;
2
43
  interface OxygenUIThemeProviderProps {
3
- children: React.ReactNode;
44
+ children: ReactNode;
45
+ /**
46
+ * Optional single theme object. If provided, theme switching will be disabled.
47
+ * Use this for simple single-theme applications.
48
+ */
4
49
  theme?: Theme;
5
- radialBackground?: boolean;
50
+ /**
51
+ * Array of theme options for theme switching.
52
+ * If provided, enables theme switching functionality.
53
+ * Takes precedence over the `theme` prop.
54
+ */
55
+ themes?: ThemeOption[];
56
+ /**
57
+ * Initial theme key when using theme switching.
58
+ * Defaults to the first theme in the themes array.
59
+ */
60
+ initialTheme?: string;
6
61
  }
7
- export default function OxygenUIThemeProvider({ children, theme, radialBackground }: OxygenUIThemeProviderProps): import("react/jsx-runtime").JSX.Element;
62
+ export default function OxygenUIThemeProvider({ children, theme, themes, initialTheme, }: OxygenUIThemeProviderProps): import("react/jsx-runtime").JSX.Element;
8
63
  export {};
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
3
+ *
4
+ * WSO2 LLC. licenses this file to you under the Apache License,
5
+ * Version 2.0 (the "License"); you may not use this file except
6
+ * in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing,
12
+ * software distributed under the License is distributed on an
13
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ * KIND, either express or implied. See the License for the
15
+ * specific language governing permissions and limitations
16
+ * under the License.
17
+ */
18
+ export { default } from './OxygenUIThemeProvider';
19
+ export { useThemeSwitcher } from './OxygenUIThemeProvider';
20
+ export type { ThemeOption, ThemeSwitcherContextValue } from './OxygenUIThemeProvider';
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
3
+ *
4
+ * WSO2 LLC. licenses this file to you under the Apache License,
5
+ * Version 2.0 (the "License"); you may not use this file except
6
+ * in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing,
12
+ * software distributed under the License is distributed on an
13
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ * KIND, either express or implied. See the License for the
15
+ * specific language governing permissions and limitations
16
+ * under the License.
17
+ */
18
+ export { default as OxygenUIThemeProvider, useThemeSwitcher } from './OxygenUIThemeProvider/OxygenUIThemeProvider';
19
+ export type { ThemeOption, ThemeSwitcherContextValue } from './OxygenUIThemeProvider/OxygenUIThemeProvider';
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
3
+ *
4
+ * WSO2 LLC. licenses this file to you under the Apache License,
5
+ * Version 2.0 (the "License"); you may not use this file except
6
+ * in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing,
12
+ * software distributed under the License is distributed on an
13
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ * KIND, either express or implied. See the License for the
15
+ * specific language governing permissions and limitations
16
+ * under the License.
17
+ */
18
+ export { useThemeContent, default as useThemeContentDefault } from './useThemeContent/useThemeContent';
19
+ export { useAppShell } from './useAppShell/useAppShell';
20
+ export type { AppShellState, AppShellActions, UseAppShellOptions, UseAppShellReturn, } from './useAppShell/useAppShell';
21
+ export { useNotifications } from './useNotifications/useNotifications';
22
+ export type { NotificationItem, NotificationActions, UseNotificationsOptions, UseNotificationsReturn, } from './useNotifications/useNotifications';
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
3
+ *
4
+ * WSO2 LLC. licenses this file to you under the Apache License,
5
+ * Version 2.0 (the "License"); you may not use this file except
6
+ * in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing,
12
+ * software distributed under the License is distributed on an
13
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ * KIND, either express or implied. See the License for the
15
+ * specific language governing permissions and limitations
16
+ * under the License.
17
+ */
18
+ export { useAppShell, default } from './useAppShell';
19
+ export type { AppShellState, AppShellActions, UseAppShellOptions, UseAppShellReturn, } from './useAppShell';
@@ -0,0 +1,81 @@
1
+ /**
2
+ * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
3
+ *
4
+ * WSO2 LLC. licenses this file to you under the Apache License,
5
+ * Version 2.0 (the "License"); you may not use this file except
6
+ * in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing,
12
+ * software distributed under the License is distributed on an
13
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ * KIND, either express or implied. See the License for the
15
+ * specific language governing permissions and limitations
16
+ * under the License.
17
+ */
18
+ /**
19
+ * App Shell state interface.
20
+ */
21
+ export interface AppShellState {
22
+ /** Whether the sidebar is collapsed */
23
+ sidebarCollapsed: boolean;
24
+ /** Whether the notification panel is open */
25
+ notificationPanelOpen: boolean;
26
+ /** Currently active menu item ID */
27
+ activeMenuItem: string;
28
+ /** Map of expanded menu IDs */
29
+ expandedMenus: Record<string, boolean>;
30
+ }
31
+ /**
32
+ * App Shell actions interface.
33
+ */
34
+ export interface AppShellActions {
35
+ toggleSidebar: () => void;
36
+ toggleNotificationPanel: () => void;
37
+ setActiveMenuItem: (id: string) => void;
38
+ toggleMenu: (id: string) => void;
39
+ }
40
+ /**
41
+ * Options for useAppShell hook.
42
+ */
43
+ export interface UseAppShellOptions {
44
+ /** Initial sidebar collapsed state */
45
+ initialCollapsed?: boolean;
46
+ /** Initial active menu item */
47
+ initialActiveItem?: string;
48
+ }
49
+ /**
50
+ * Return type for useAppShell hook.
51
+ */
52
+ export interface UseAppShellReturn {
53
+ state: AppShellState;
54
+ actions: AppShellActions;
55
+ }
56
+ /**
57
+ * Custom hook for App Shell layout state management.
58
+ *
59
+ * Provides a clean pattern for managing core shell layout state including:
60
+ * - Sidebar collapse state
61
+ * - Notification panel visibility
62
+ * - Active menu item and expanded menus
63
+ *
64
+ * For notification data management, use the `useNotifications` hook separately.
65
+ *
66
+ * @example
67
+ * ```tsx
68
+ * const { state, actions } = useAppShell({
69
+ * initialCollapsed: false,
70
+ * });
71
+ *
72
+ * // Use state
73
+ * <Sidebar collapsed={state.sidebarCollapsed} />
74
+ * <NotificationPanel open={state.notificationPanelOpen} />
75
+ *
76
+ * // Use actions
77
+ * <Button onClick={actions.toggleSidebar}>Toggle</Button>
78
+ * ```
79
+ */
80
+ export declare const useAppShell: (options?: UseAppShellOptions) => UseAppShellReturn;
81
+ export default useAppShell;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
3
+ *
4
+ * WSO2 LLC. licenses this file to you under the Apache License,
5
+ * Version 2.0 (the "License"); you may not use this file except
6
+ * in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing,
12
+ * software distributed under the License is distributed on an
13
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ * KIND, either express or implied. See the License for the
15
+ * specific language governing permissions and limitations
16
+ * under the License.
17
+ */
18
+ export { useNotifications, default } from './useNotifications';
19
+ export type { NotificationItem, NotificationActions, UseNotificationsOptions, UseNotificationsReturn, } from './useNotifications';
@@ -0,0 +1,105 @@
1
+ /**
2
+ * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
3
+ *
4
+ * WSO2 LLC. licenses this file to you under the Apache License,
5
+ * Version 2.0 (the "License"); you may not use this file except
6
+ * in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing,
12
+ * software distributed under the License is distributed on an
13
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ * KIND, either express or implied. See the License for the
15
+ * specific language governing permissions and limitations
16
+ * under the License.
17
+ */
18
+ import * as React from 'react';
19
+ /**
20
+ * Notification item data model.
21
+ */
22
+ export interface NotificationItem {
23
+ /** Unique identifier */
24
+ id: string;
25
+ /** Notification type for styling */
26
+ type?: 'info' | 'success' | 'warning' | 'error';
27
+ /** Notification title */
28
+ title: string;
29
+ /** Notification message */
30
+ message: string;
31
+ /** Timestamp of the notification */
32
+ timestamp: Date;
33
+ /** Whether the notification has been read */
34
+ read: boolean;
35
+ /** Optional avatar content */
36
+ avatar?: React.ReactNode;
37
+ /** Optional action button label */
38
+ actionLabel?: string;
39
+ }
40
+ /**
41
+ * Notification actions interface.
42
+ */
43
+ export interface NotificationActions {
44
+ /** Mark a single notification as read */
45
+ markRead: (id: string) => void;
46
+ /** Dismiss/remove a single notification */
47
+ dismiss: (id: string) => void;
48
+ /** Mark all notifications as read */
49
+ markAllRead: () => void;
50
+ /** Clear all notifications */
51
+ clearAll: () => void;
52
+ /** Add a new notification */
53
+ add: (notification: Omit<NotificationItem, 'id'>) => void;
54
+ }
55
+ /**
56
+ * Options for useNotifications hook.
57
+ */
58
+ export interface UseNotificationsOptions {
59
+ /** Initial notifications list */
60
+ initialNotifications?: NotificationItem[];
61
+ }
62
+ /**
63
+ * Return type for useNotifications hook.
64
+ */
65
+ export interface UseNotificationsReturn {
66
+ /** Current notifications list */
67
+ notifications: NotificationItem[];
68
+ /** Notification actions */
69
+ actions: NotificationActions;
70
+ /** Count of unread notifications */
71
+ unreadCount: number;
72
+ /** Filtered list of unread notifications */
73
+ unreadNotifications: NotificationItem[];
74
+ }
75
+ /**
76
+ * Custom hook for notification state management.
77
+ *
78
+ * Provides a clean pattern for managing notifications including:
79
+ * - List of notifications
80
+ * - CRUD operations (add, mark read, dismiss, clear)
81
+ * - Computed values (unreadCount, unreadNotifications)
82
+ *
83
+ * @example
84
+ * ```tsx
85
+ * const { notifications, actions, unreadCount, unreadNotifications } = useNotifications({
86
+ * initialNotifications: myNotifications,
87
+ * });
88
+ *
89
+ * // Add a notification
90
+ * actions.add({
91
+ * title: 'New message',
92
+ * message: 'You have a new message',
93
+ * timestamp: new Date(),
94
+ * read: false,
95
+ * });
96
+ *
97
+ * // Mark as read
98
+ * actions.markRead(notificationId);
99
+ *
100
+ * // Display unread count
101
+ * <Badge badgeContent={unreadCount} />
102
+ * ```
103
+ */
104
+ export declare const useNotifications: (options?: UseNotificationsOptions) => UseNotificationsReturn;
105
+ export default useNotifications;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
3
+ *
4
+ * WSO2 LLC. licenses this file to you under the Apache License,
5
+ * Version 2.0 (the "License"); you may not use this file except
6
+ * in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing,
12
+ * software distributed under the License is distributed on an
13
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ * KIND, either express or implied. See the License for the
15
+ * specific language governing permissions and limitations
16
+ * under the License.
17
+ */
18
+ export { useThemeContent, default } from './useThemeContent';
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Hook to get theme-specific content based on the currently active theme.
3
+ * Returns the appropriate content for the current theme from the provided mapping.
4
+ *
5
+ * @template T - The type of content being returned
6
+ * @param contentMap - Object mapping theme keys to content values
7
+ * @param fallback - Optional fallback content if current theme key is not in the map
8
+ * @returns The content for the current theme, or fallback, or the first available content
9
+ *
10
+ * @example
11
+ * Basic usage with strings
12
+ * ```tsx
13
+ * const greeting = useThemeContent({
14
+ * default: 'Welcome to Default Theme',
15
+ * purple: 'Welcome to Purple Theme',
16
+ * green: 'Welcome to Green Theme'
17
+ * });
18
+ *
19
+ * return <h1>{greeting}</h1>;
20
+ * ```
21
+ *
22
+ * @example
23
+ * With image URLs
24
+ * ```tsx
25
+ * const logoSrc = useThemeContent({
26
+ * default: '/logos/logo-blue.svg',
27
+ * purple: '/logos/logo-purple.svg'
28
+ * }, '/logos/logo-default.svg');
29
+ *
30
+ * return <img src={logoSrc} alt="Logo" />;
31
+ * ```
32
+ *
33
+ * @example
34
+ * With complex objects
35
+ * ```tsx
36
+ * const themeConfig = useThemeContent({
37
+ * default: { color: '#1976d2', icon: 'home' },
38
+ * purple: { color: '#9c27b0', icon: 'star' }
39
+ * });
40
+ *
41
+ * return <Icon name={themeConfig.icon} color={themeConfig.color} />;
42
+ * ```
43
+ *
44
+ * @example
45
+ * With React components
46
+ * ```tsx
47
+ * const ThemeIcon = useThemeContent({
48
+ * default: <HomeIcon />,
49
+ * purple: <StarIcon />,
50
+ * green: <NatureIcon />
51
+ * });
52
+ *
53
+ * return <div>{ThemeIcon}</div>;
54
+ * ```
55
+ */
56
+ export declare function useThemeContent<T>(contentMap: Record<string, T>, fallback?: T): T;
57
+ export default useThemeContent;