@wso2/oxygen-ui 0.0.1-alpha.6 → 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,43 @@
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
+ import type { SxProps, Theme } from '@mui/material/styles';
20
+ /**
21
+ * Props for NotificationHeaderIcon component.
22
+ */
23
+ export interface NotificationHeaderIconProps {
24
+ /** Icon element */
25
+ children: React.ReactNode;
26
+ /** Additional sx props */
27
+ sx?: SxProps<Theme>;
28
+ }
29
+ /**
30
+ * NotificationHeaderIcon - Icon for the notification panel header.
31
+ *
32
+ * Displays an icon in the header section.
33
+ *
34
+ * @example
35
+ * ```tsx
36
+ * <NotificationPanel.Header>
37
+ * <NotificationPanel.HeaderIcon><Bell size={20} /></NotificationPanel.HeaderIcon>
38
+ * ...
39
+ * </NotificationPanel.Header>
40
+ * ```
41
+ */
42
+ export declare const NotificationHeaderIcon: React.FC<NotificationHeaderIconProps>;
43
+ export default NotificationHeaderIcon;
@@ -0,0 +1,43 @@
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
+ import type { SxProps, Theme } from '@mui/material/styles';
20
+ /**
21
+ * Props for NotificationHeaderTitle component.
22
+ */
23
+ export interface NotificationHeaderTitleProps {
24
+ /** Title text */
25
+ children: React.ReactNode;
26
+ /** Additional sx props */
27
+ sx?: SxProps<Theme>;
28
+ }
29
+ /**
30
+ * NotificationHeaderTitle - Title for the notification panel header.
31
+ *
32
+ * Displays the panel title with proper styling.
33
+ *
34
+ * @example
35
+ * ```tsx
36
+ * <NotificationPanel.Header>
37
+ * <NotificationPanel.HeaderTitle>Notifications</NotificationPanel.HeaderTitle>
38
+ * ...
39
+ * </NotificationPanel.Header>
40
+ * ```
41
+ */
42
+ export declare const NotificationHeaderTitle: React.FC<NotificationHeaderTitleProps>;
43
+ export default NotificationHeaderTitle;
@@ -0,0 +1,64 @@
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
+ import type { SxProps, Theme } from '@mui/material/styles';
20
+ import { NotificationType } from './utils';
21
+ /**
22
+ * Props for NotificationItem component.
23
+ */
24
+ export interface NotificationItemProps {
25
+ /** Unique identifier */
26
+ id: string;
27
+ /** Notification type for icon/color */
28
+ type: NotificationType;
29
+ /** Whether notification has been read */
30
+ read?: boolean;
31
+ /** Composable children (ItemAvatar, ItemTitle, ItemMessage, ItemTimestamp, ItemAction) */
32
+ children: React.ReactNode;
33
+ /** Optional action callback */
34
+ onAction?: () => void;
35
+ /** Callback when marked as read */
36
+ onMarkRead?: (id: string) => void;
37
+ /** Callback when dismissed */
38
+ onDismiss?: (id: string) => void;
39
+ /** Additional sx props */
40
+ sx?: SxProps<Theme>;
41
+ }
42
+ /**
43
+ * NotificationItem - Individual notification in the panel.
44
+ *
45
+ * Uses composable children API:
46
+ * ```tsx
47
+ * <NotificationPanel.Item id="1" type="info">
48
+ * <NotificationPanel.ItemAvatar>A</NotificationPanel.ItemAvatar>
49
+ * <NotificationPanel.ItemTitle>New feature</NotificationPanel.ItemTitle>
50
+ * <NotificationPanel.ItemMessage>Check it out</NotificationPanel.ItemMessage>
51
+ * <NotificationPanel.ItemTimestamp>5m ago</NotificationPanel.ItemTimestamp>
52
+ * <NotificationPanel.ItemAction>View</NotificationPanel.ItemAction>
53
+ * </NotificationPanel.Item>
54
+ * ```
55
+ *
56
+ * Theme tokens used:
57
+ * - `action.hover` - Unread notification background
58
+ * - `action.selected` - Hover state
59
+ * - `primary.main` - Unread indicator dot
60
+ * - `text.secondary` - Message text
61
+ * - `text.disabled` - Timestamp text
62
+ */
63
+ export declare const NotificationItem: React.FC<NotificationItemProps>;
64
+ export default NotificationItem;
@@ -0,0 +1,46 @@
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
+ import type { SxProps, Theme } from '@mui/material/styles';
20
+ /**
21
+ * Props for NotificationItemAction component.
22
+ */
23
+ export interface NotificationItemActionProps {
24
+ /** Action button label */
25
+ children: React.ReactNode;
26
+ /** Click handler (overrides context onAction) */
27
+ onClick?: (e: React.MouseEvent) => void;
28
+ /** Additional sx props */
29
+ sx?: SxProps<Theme>;
30
+ }
31
+ /**
32
+ * NotificationItemAction - Action button for a notification item.
33
+ *
34
+ * Displays a small action chip/button. Clicking triggers the onAction
35
+ * callback from context (unless overridden with onClick prop).
36
+ *
37
+ * @example
38
+ * ```tsx
39
+ * <NotificationPanel.Item id="1" type="info">
40
+ * ...
41
+ * <NotificationPanel.ItemAction>View</NotificationPanel.ItemAction>
42
+ * </NotificationPanel.Item>
43
+ * ```
44
+ */
45
+ export declare const NotificationItemAction: React.FC<NotificationItemActionProps>;
46
+ export default NotificationItemAction;
@@ -0,0 +1,44 @@
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
+ import type { SxProps, Theme } from '@mui/material/styles';
20
+ /**
21
+ * Props for NotificationItemAvatar component.
22
+ */
23
+ export interface NotificationItemAvatarProps {
24
+ /** Avatar content (initials/text) or icon */
25
+ children?: React.ReactNode;
26
+ /** Additional sx props */
27
+ sx?: SxProps<Theme>;
28
+ }
29
+ /**
30
+ * NotificationItemAvatar - Avatar for a notification item.
31
+ *
32
+ * Displays an avatar with type-based colors. If no children are provided,
33
+ * displays the default icon for the notification type.
34
+ *
35
+ * @example
36
+ * ```tsx
37
+ * <NotificationPanel.Item id="1" type="info">
38
+ * <NotificationPanel.ItemAvatar>A</NotificationPanel.ItemAvatar>
39
+ * ...
40
+ * </NotificationPanel.Item>
41
+ * ```
42
+ */
43
+ export declare const NotificationItemAvatar: React.FC<NotificationItemAvatarProps>;
44
+ export default NotificationItemAvatar;
@@ -0,0 +1,52 @@
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
+ import type { NotificationType, NotificationTypeProps } from './utils';
20
+ /**
21
+ * Context value for notification item state.
22
+ */
23
+ export interface NotificationItemContextValue {
24
+ /** Notification ID */
25
+ id: string;
26
+ /** Notification type */
27
+ type: NotificationType;
28
+ /** Type-based styling props */
29
+ typeProps: NotificationTypeProps;
30
+ /** Whether notification is read */
31
+ read: boolean;
32
+ /** Mark as read handler */
33
+ onMarkRead?: () => void;
34
+ /** Action handler */
35
+ onAction?: () => void;
36
+ }
37
+ /**
38
+ * Context for sharing state between NotificationItem and its children.
39
+ */
40
+ export declare const NotificationItemContext: React.Context<NotificationItemContextValue | null>;
41
+ /**
42
+ * Hook to access the notification item context.
43
+ * Must be used within a NotificationItem component.
44
+ */
45
+ export declare const useNotificationItemContext: () => NotificationItemContextValue;
46
+ /**
47
+ * Provider component for notification item context.
48
+ */
49
+ export declare const NotificationItemProvider: React.FC<{
50
+ value: NotificationItemContextValue;
51
+ children: React.ReactNode;
52
+ }>;
@@ -0,0 +1,47 @@
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
+ import type { SxProps, Theme } from '@mui/material/styles';
20
+ /**
21
+ * Props for NotificationItemMessage component.
22
+ */
23
+ export interface NotificationItemMessageProps {
24
+ /** Message text */
25
+ children: React.ReactNode;
26
+ /** Additional sx props */
27
+ sx?: SxProps<Theme>;
28
+ }
29
+ /**
30
+ * NotificationItemMessage - Message/description for a notification item.
31
+ *
32
+ * Displays the notification message with secondary text styling.
33
+ *
34
+ * Theme tokens used:
35
+ * - `text.secondary` - Message text color
36
+ *
37
+ * @example
38
+ * ```tsx
39
+ * <NotificationPanel.Item id="1" type="info">
40
+ * <NotificationPanel.ItemTitle>New feature</NotificationPanel.ItemTitle>
41
+ * <NotificationPanel.ItemMessage>Check it out!</NotificationPanel.ItemMessage>
42
+ * ...
43
+ * </NotificationPanel.Item>
44
+ * ```
45
+ */
46
+ export declare const NotificationItemMessage: React.FC<NotificationItemMessageProps>;
47
+ export default NotificationItemMessage;
@@ -0,0 +1,46 @@
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
+ import type { SxProps, Theme } from '@mui/material/styles';
20
+ /**
21
+ * Props for NotificationItemTimestamp component.
22
+ */
23
+ export interface NotificationItemTimestampProps {
24
+ /** Timestamp text (e.g., "5 minutes ago") */
25
+ children: React.ReactNode;
26
+ /** Additional sx props */
27
+ sx?: SxProps<Theme>;
28
+ }
29
+ /**
30
+ * NotificationItemTimestamp - Timestamp for a notification item.
31
+ *
32
+ * Displays when the notification was created.
33
+ *
34
+ * Theme tokens used:
35
+ * - `text.disabled` - Timestamp text color
36
+ *
37
+ * @example
38
+ * ```tsx
39
+ * <NotificationPanel.Item id="1" type="info">
40
+ * ...
41
+ * <NotificationPanel.ItemTimestamp>5m ago</NotificationPanel.ItemTimestamp>
42
+ * </NotificationPanel.Item>
43
+ * ```
44
+ */
45
+ export declare const NotificationItemTimestamp: React.FC<NotificationItemTimestampProps>;
46
+ export default NotificationItemTimestamp;
@@ -0,0 +1,49 @@
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
+ import type { SxProps, Theme } from '@mui/material/styles';
20
+ /**
21
+ * Props for NotificationItemTitle component.
22
+ */
23
+ export interface NotificationItemTitleProps {
24
+ /** Title text */
25
+ children: React.ReactNode;
26
+ /** Whether to show unread indicator dot */
27
+ showUnreadIndicator?: boolean;
28
+ /** Additional sx props */
29
+ sx?: SxProps<Theme>;
30
+ }
31
+ /**
32
+ * NotificationItemTitle - Title for a notification item.
33
+ *
34
+ * Displays the notification title with bold styling for unread notifications.
35
+ * Can optionally show an unread indicator dot.
36
+ *
37
+ * Theme tokens used:
38
+ * - `primary.main` - Unread indicator dot color
39
+ *
40
+ * @example
41
+ * ```tsx
42
+ * <NotificationPanel.Item id="1" type="info">
43
+ * <NotificationPanel.ItemTitle>New feature</NotificationPanel.ItemTitle>
44
+ * ...
45
+ * </NotificationPanel.Item>
46
+ * ```
47
+ */
48
+ export declare const NotificationItemTitle: React.FC<NotificationItemTitleProps>;
49
+ export default NotificationItemTitle;
@@ -0,0 +1,37 @@
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
+ import type { SxProps, Theme } from '@mui/material/styles';
20
+ /**
21
+ * Props for NotificationList component.
22
+ */
23
+ export interface NotificationListProps {
24
+ /** Notification items */
25
+ children: React.ReactNode;
26
+ /** Whether to show dividers between items */
27
+ showDividers?: boolean;
28
+ /** Additional sx props */
29
+ sx?: SxProps<Theme>;
30
+ }
31
+ /**
32
+ * NotificationList - Scrollable container for notification items.
33
+ *
34
+ * Renders a list of NotificationItem components with optional dividers.
35
+ */
36
+ export declare const NotificationList: React.FC<NotificationListProps>;
37
+ export default NotificationList;
@@ -0,0 +1,122 @@
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
+ import type { SxProps, Theme } from '@mui/material/styles';
20
+ import { NotificationHeader } from './NotificationHeader';
21
+ import { NotificationHeaderIcon } from './NotificationHeaderIcon';
22
+ import { NotificationHeaderTitle } from './NotificationHeaderTitle';
23
+ import { NotificationHeaderBadge } from './NotificationHeaderBadge';
24
+ import { NotificationHeaderClose } from './NotificationHeaderClose';
25
+ import { NotificationTabs } from './NotificationTabs';
26
+ import { NotificationActions } from './NotificationActions';
27
+ import { NotificationList } from './NotificationList';
28
+ import { NotificationItem } from './NotificationItem';
29
+ import { NotificationItemAvatar } from './NotificationItemAvatar';
30
+ import { NotificationItemTitle } from './NotificationItemTitle';
31
+ import { NotificationItemMessage } from './NotificationItemMessage';
32
+ import { NotificationItemTimestamp } from './NotificationItemTimestamp';
33
+ import { NotificationItemAction } from './NotificationItemAction';
34
+ import { NotificationEmptyState } from './NotificationEmptyState';
35
+ /**
36
+ * Props for the NotificationPanel component.
37
+ */
38
+ export interface NotificationPanelProps {
39
+ /** Whether the panel is open */
40
+ open: boolean;
41
+ /** Callback to close the panel */
42
+ onClose: () => void;
43
+ /** Panel content */
44
+ children: React.ReactNode;
45
+ /** Panel width (default: 380) */
46
+ width?: number;
47
+ /** Drawer anchor position */
48
+ anchor?: 'left' | 'right';
49
+ /** Drawer variant (default: 'temporary') */
50
+ variant?: 'permanent' | 'persistent' | 'temporary';
51
+ /** Additional sx props */
52
+ sx?: SxProps<Theme>;
53
+ }
54
+ /**
55
+ * NotificationPanel - Slide-out notification drawer compound component.
56
+ *
57
+ * A composable notification panel that uses the compound component pattern.
58
+ * Children can include Header, Tabs, Actions, List, Item, and EmptyState.
59
+ *
60
+ * Features:
61
+ * - Right-anchored drawer that slides in
62
+ * - Compound component pattern for maximum flexibility
63
+ * - Context-based close handler sharing
64
+ * - Responsive width (full on mobile, fixed on desktop)
65
+ * - Supports temporary, persistent, and permanent variants
66
+ * - Can be clipped under app bar using persistent/permanent variant
67
+ *
68
+ * @example
69
+ * // Clipped under app bar
70
+ * <Box sx={{ display: 'flex' }}>
71
+ * <AppBar position="fixed" sx={{ zIndex: (theme) => theme.zIndex.drawer + 1 }}>
72
+ * <Toolbar>...</Toolbar>
73
+ * </AppBar>
74
+ * <Box component="main" sx={{ flexGrow: 1 }}>
75
+ * <Toolbar />
76
+ * <NotificationPanel open={open} onClose={handleClose} variant="persistent">
77
+ * ...
78
+ * </NotificationPanel>
79
+ * </Box>
80
+ * </Box>
81
+ *
82
+ * @example
83
+ * // Default overlay
84
+ * <NotificationPanel open={open} onClose={handleClose}>
85
+ * <NotificationPanel.Header>
86
+ * <NotificationPanel.HeaderIcon>...</NotificationPanel.HeaderIcon>
87
+ * <NotificationPanel.HeaderTitle>Notifications</NotificationPanel.HeaderTitle>
88
+ * <NotificationPanel.HeaderBadge>5</NotificationPanel.HeaderBadge>
89
+ * <NotificationPanel.HeaderClose />
90
+ * </NotificationPanel.Header>
91
+ * <NotificationPanel.Tabs tabs={tabs} value={tabIndex} onChange={setTabIndex} />
92
+ * <NotificationPanel.Actions hasUnread={true} onMarkAllRead={handler} onClearAll={handler} />
93
+ * <NotificationPanel.List>
94
+ * <NotificationPanel.Item id="1" type="info">
95
+ * <NotificationPanel.ItemAvatar>A</NotificationPanel.ItemAvatar>
96
+ * <NotificationPanel.ItemTitle>Title</NotificationPanel.ItemTitle>
97
+ * <NotificationPanel.ItemMessage>Message</NotificationPanel.ItemMessage>
98
+ * <NotificationPanel.ItemTimestamp>5 min ago</NotificationPanel.ItemTimestamp>
99
+ * <NotificationPanel.ItemAction>View</NotificationPanel.ItemAction>
100
+ * </NotificationPanel.Item>
101
+ * </NotificationPanel.List>
102
+ * </NotificationPanel>
103
+ */
104
+ declare const NotificationPanel: React.FC<NotificationPanelProps> & {
105
+ Header: typeof NotificationHeader;
106
+ HeaderIcon: typeof NotificationHeaderIcon;
107
+ HeaderTitle: typeof NotificationHeaderTitle;
108
+ HeaderBadge: typeof NotificationHeaderBadge;
109
+ HeaderClose: typeof NotificationHeaderClose;
110
+ Tabs: typeof NotificationTabs;
111
+ Actions: typeof NotificationActions;
112
+ List: typeof NotificationList;
113
+ Item: typeof NotificationItem;
114
+ ItemAvatar: typeof NotificationItemAvatar;
115
+ ItemTitle: typeof NotificationItemTitle;
116
+ ItemMessage: typeof NotificationItemMessage;
117
+ ItemTimestamp: typeof NotificationItemTimestamp;
118
+ ItemAction: typeof NotificationItemAction;
119
+ EmptyState: typeof NotificationEmptyState;
120
+ };
121
+ export { NotificationPanel };
122
+ export default NotificationPanel;
@@ -0,0 +1,51 @@
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
+ import type { SxProps, Theme } from '@mui/material/styles';
20
+ /**
21
+ * Tab configuration for NotificationTabs.
22
+ */
23
+ export interface NotificationTabConfig {
24
+ /** Tab label */
25
+ label: string;
26
+ /** Count badge value */
27
+ count?: number;
28
+ /** Badge color */
29
+ color?: 'default' | 'primary' | 'warning' | 'error';
30
+ }
31
+ export interface NotificationTabsProps {
32
+ /** Tab configurations */
33
+ tabs: NotificationTabConfig[];
34
+ /** Currently selected tab index */
35
+ value: number;
36
+ /** Callback when tab changes */
37
+ onChange: (index: number) => void;
38
+ /** Additional sx props */
39
+ sx?: SxProps<Theme>;
40
+ }
41
+ /**
42
+ * NotificationTabs - Tab navigation for filtering notifications.
43
+ *
44
+ * Provides a tab interface for switching between notification views
45
+ * (e.g., All, Unread, Alerts).
46
+ *
47
+ * Theme tokens used:
48
+ * - `divider` - Bottom border
49
+ */
50
+ export declare const NotificationTabs: React.FC<NotificationTabsProps>;
51
+ export default NotificationTabs;