@wso2/oxygen-ui 0.4.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.ai/AGENTS.md +18 -15
- package/.ai/components.md +706 -73
- package/.ai/migration.md +4 -2
- package/.ai/patterns.md +20 -8
- package/.ai/theming.md +18 -2
- package/.claude/components.md +706 -73
- package/.claude/migration.md +4 -2
- package/.claude/patterns.md +20 -8
- package/.claude/skills/oxygen-component/SKILL.md +12 -6
- package/.claude/skills/oxygen-migrate/SKILL.md +5 -2
- package/.claude/skills/oxygen-sync/SKILL.md +157 -0
- package/.claude/theming.md +18 -2
- package/bin/cli.js +143 -43
- package/dist/components/ComplexSelect/ComplexSelectDivider.d.ts +3 -0
- package/dist/components/ComplexSelect/ComplexSelectListHeader.d.ts +3 -0
- package/dist/components/ComplexSelect/ComplexSelectMenuItemAvatar.d.ts +3 -0
- package/dist/components/ComplexSelect/ComplexSelectMenuItemIcon.d.ts +3 -0
- package/dist/components/ComplexSelect/ComplexSelectMenuItemText.d.ts +3 -0
- package/dist/components/Footer/Footer.d.ts +29 -26
- package/dist/components/Footer/FooterCopyright.d.ts +37 -0
- package/dist/components/Footer/FooterDivider.d.ts +28 -0
- package/dist/components/Footer/FooterLink.d.ts +38 -0
- package/dist/components/Footer/FooterVersion.d.ts +35 -0
- package/dist/components/Footer/index.d.ts +7 -0
- package/dist/components/UserMenu/UserMenu.d.ts +27 -32
- package/dist/components/UserMenu/UserMenuContext.d.ts +33 -0
- package/dist/components/UserMenu/UserMenuDivider.d.ts +22 -0
- package/dist/components/UserMenu/UserMenuHeader.d.ts +35 -0
- package/dist/components/UserMenu/UserMenuItem.d.ts +35 -0
- package/dist/components/UserMenu/UserMenuLogout.d.ts +33 -0
- package/dist/components/UserMenu/UserMenuTrigger.d.ts +33 -0
- package/dist/components/UserMenu/index.d.ts +9 -0
- package/dist/index.js +1480 -593
- package/dist/index.js.map +4 -4
- package/dist/styles/Themes/ChoreoTheme.d.ts +20 -0
- package/dist/styles/Themes/PaleBaseTheme.d.ts +25 -0
- package/dist/styles/Themes/PaleGray.d.ts +20 -0
- package/dist/styles/Themes/PaleIndigo.d.ts +20 -0
- package/dist/styles/Themes/index.d.ts +4 -0
- package/dist/utils/pxToRem.d.ts +1 -1
- package/package.json +2 -2
|
@@ -4,4 +4,7 @@ export interface ComplexSelectMenuItemIconProps extends ListItemIconProps {
|
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
}
|
|
6
6
|
export declare function ComplexSelectMenuItemIcon({ children, ...props }: ComplexSelectMenuItemIconProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare namespace ComplexSelectMenuItemIcon {
|
|
8
|
+
var displayName: string;
|
|
9
|
+
}
|
|
7
10
|
export default ComplexSelectMenuItemIcon;
|
|
@@ -5,4 +5,7 @@ export interface ComplexSelectMenuItemTextProps extends ListItemTextProps {
|
|
|
5
5
|
secondary?: ReactNode;
|
|
6
6
|
}
|
|
7
7
|
export declare function ComplexSelectMenuItemText({ primary, secondary, ...props }: ComplexSelectMenuItemTextProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare namespace ComplexSelectMenuItemText {
|
|
9
|
+
var displayName: string;
|
|
10
|
+
}
|
|
8
11
|
export default ComplexSelectMenuItemText;
|
|
@@ -17,25 +17,16 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import * as React from 'react';
|
|
19
19
|
import type { SxProps, Theme } from '@mui/material/styles';
|
|
20
|
+
import { FooterCopyright } from './FooterCopyright';
|
|
21
|
+
import { FooterVersion } from './FooterVersion';
|
|
22
|
+
import { FooterLink } from './FooterLink';
|
|
23
|
+
import { FooterDivider } from './FooterDivider';
|
|
20
24
|
/**
|
|
21
|
-
* Props for the Footer component.
|
|
25
|
+
* Props for the Footer root component.
|
|
22
26
|
*/
|
|
23
27
|
export interface FooterProps {
|
|
24
|
-
/**
|
|
25
|
-
|
|
26
|
-
/** Company/organization name */
|
|
27
|
-
companyName?: string;
|
|
28
|
-
/** Link to terms and conditions */
|
|
29
|
-
termsUrl?: string;
|
|
30
|
-
/** Link to privacy policy */
|
|
31
|
-
privacyUrl?: string;
|
|
32
|
-
/** Optional version string to display */
|
|
33
|
-
version?: string;
|
|
34
|
-
/** Additional links to display */
|
|
35
|
-
links?: Array<{
|
|
36
|
-
label: string;
|
|
37
|
-
url: string;
|
|
38
|
-
}>;
|
|
28
|
+
/** Child elements (Copyright, Version, Link, Divider components) */
|
|
29
|
+
children: React.ReactNode;
|
|
39
30
|
/** Additional sx props */
|
|
40
31
|
sx?: SxProps<Theme>;
|
|
41
32
|
}
|
|
@@ -56,16 +47,28 @@ export interface FooterProps {
|
|
|
56
47
|
* Usage:
|
|
57
48
|
* ```tsx
|
|
58
49
|
* <Footer
|
|
59
|
-
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
50
|
+
/**
|
|
51
|
+
* Footer - Application footer component.
|
|
52
|
+
*
|
|
53
|
+
* A compound component for building flexible footer layouts.
|
|
54
|
+
* Use the sub-components to compose your footer structure.
|
|
55
|
+
*
|
|
56
|
+
* Composition pattern example:
|
|
57
|
+
* ```tsx
|
|
58
|
+
* <Footer>
|
|
59
|
+
* <Footer.Copyright>© 2024 Your Company. All rights reserved.</Footer.Copyright>
|
|
60
|
+
* <Footer.Divider />
|
|
61
|
+
* <Footer.Version>v2.1.0</Footer.Version>
|
|
62
|
+
* <Footer.Link href="/terms">Terms & Conditions</Footer.Link>
|
|
63
|
+
* <Footer.Link href="/privacy">Privacy Policy</Footer.Link>
|
|
64
|
+
* </Footer>
|
|
68
65
|
* ```
|
|
69
66
|
*/
|
|
70
|
-
|
|
67
|
+
declare const Footer: React.FC<FooterProps> & {
|
|
68
|
+
Copyright: typeof FooterCopyright;
|
|
69
|
+
Version: typeof FooterVersion;
|
|
70
|
+
Link: typeof FooterLink;
|
|
71
|
+
Divider: typeof FooterDivider;
|
|
72
|
+
};
|
|
73
|
+
export { Footer };
|
|
71
74
|
export default Footer;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, 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
|
+
* Props for the FooterCopyright component.
|
|
21
|
+
*/
|
|
22
|
+
export interface FooterCopyrightProps {
|
|
23
|
+
/** Copyright text to display */
|
|
24
|
+
children: React.ReactNode;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* FooterCopyright - Copyright text for the footer.
|
|
28
|
+
*
|
|
29
|
+
* Usage:
|
|
30
|
+
* ```tsx
|
|
31
|
+
* <Footer.Copyright>
|
|
32
|
+
* © 2024 Your Company. All rights reserved.
|
|
33
|
+
* </Footer.Copyright>
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
export declare const FooterCopyright: React.FC<FooterCopyrightProps>;
|
|
37
|
+
export default FooterCopyright;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, 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
|
+
* FooterDivider - Vertical divider for the footer.
|
|
21
|
+
*
|
|
22
|
+
* Usage:
|
|
23
|
+
* ```tsx
|
|
24
|
+
* <Footer.Divider />
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare const FooterDivider: React.FC;
|
|
28
|
+
export default FooterDivider;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, 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 { LinkProps } from '@mui/material/Link';
|
|
20
|
+
/**
|
|
21
|
+
* Props for the FooterLink component.
|
|
22
|
+
*/
|
|
23
|
+
export interface FooterLinkProps extends Omit<LinkProps, 'underline'> {
|
|
24
|
+
/** Link text */
|
|
25
|
+
children: React.ReactNode;
|
|
26
|
+
/** Link URL */
|
|
27
|
+
href: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* FooterLink - Link element for the footer.
|
|
31
|
+
*
|
|
32
|
+
* Usage:
|
|
33
|
+
* ```tsx
|
|
34
|
+
* <Footer.Link href="/terms">Terms & Conditions</Footer.Link>
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export declare const FooterLink: React.FC<FooterLinkProps>;
|
|
38
|
+
export default FooterLink;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, 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
|
+
* Props for the FooterVersion component.
|
|
21
|
+
*/
|
|
22
|
+
export interface FooterVersionProps {
|
|
23
|
+
/** Version text to display */
|
|
24
|
+
children: React.ReactNode;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* FooterVersion - Version display for the footer.
|
|
28
|
+
*
|
|
29
|
+
* Usage:
|
|
30
|
+
* ```tsx
|
|
31
|
+
* <Footer.Version>v2.1.0</Footer.Version>
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export declare const FooterVersion: React.FC<FooterVersionProps>;
|
|
35
|
+
export default FooterVersion;
|
|
@@ -17,3 +17,10 @@
|
|
|
17
17
|
*/
|
|
18
18
|
export { Footer, default } from './Footer';
|
|
19
19
|
export type { FooterProps } from './Footer';
|
|
20
|
+
export { FooterCopyright } from './FooterCopyright';
|
|
21
|
+
export type { FooterCopyrightProps } from './FooterCopyright';
|
|
22
|
+
export { FooterVersion } from './FooterVersion';
|
|
23
|
+
export type { FooterVersionProps } from './FooterVersion';
|
|
24
|
+
export { FooterLink } from './FooterLink';
|
|
25
|
+
export type { FooterLinkProps } from './FooterLink';
|
|
26
|
+
export { FooterDivider } from './FooterDivider';
|
|
@@ -16,6 +16,11 @@
|
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
18
|
import * as React from 'react';
|
|
19
|
+
import { UserMenuTrigger } from './UserMenuTrigger';
|
|
20
|
+
import { UserMenuHeader } from './UserMenuHeader';
|
|
21
|
+
import { UserMenuItem } from './UserMenuItem';
|
|
22
|
+
import { UserMenuLogout } from './UserMenuLogout';
|
|
23
|
+
import { UserMenuDivider } from './UserMenuDivider';
|
|
19
24
|
/**
|
|
20
25
|
* User information for the UserMenu.
|
|
21
26
|
*/
|
|
@@ -30,45 +35,35 @@ export interface UserMenuUser {
|
|
|
30
35
|
role?: string;
|
|
31
36
|
}
|
|
32
37
|
/**
|
|
33
|
-
* Props for the UserMenu component.
|
|
38
|
+
* Props for the UserMenu root component (composition pattern).
|
|
34
39
|
*/
|
|
35
40
|
export interface UserMenuProps {
|
|
36
|
-
/**
|
|
37
|
-
|
|
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;
|
|
41
|
+
/** Child elements (Trigger, Header, Item components) */
|
|
42
|
+
children: React.ReactNode;
|
|
46
43
|
}
|
|
47
44
|
/**
|
|
48
|
-
* UserMenu -
|
|
45
|
+
* UserMenu - Dropdown menu for user account actions.
|
|
49
46
|
*
|
|
50
|
-
*
|
|
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")
|
|
47
|
+
* A compound component using the composition pattern for flexible menu customization.
|
|
56
48
|
*
|
|
57
|
-
*
|
|
49
|
+
* Composition pattern example:
|
|
58
50
|
* ```tsx
|
|
59
|
-
* <UserMenu
|
|
60
|
-
* user={
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
* }}
|
|
66
|
-
*
|
|
67
|
-
* onSettingsClick={() => navigate('/settings')}
|
|
68
|
-
* onBillingClick={() => navigate('/billing')}
|
|
69
|
-
* onLogout={() => handleLogout()}
|
|
70
|
-
* />
|
|
51
|
+
* <UserMenu>
|
|
52
|
+
* <UserMenu.Trigger user={mockUser} />
|
|
53
|
+
* <UserMenu.Header user={mockUser} />
|
|
54
|
+
* <UserMenu.Item icon={<UserIcon />} label="Profile" onClick={...} />
|
|
55
|
+
* <UserMenu.Item icon={<Settings />} label="Settings" onClick={...} />
|
|
56
|
+
* <UserMenu.Divider />
|
|
57
|
+
* <UserMenu.Item icon={<LogOut />} label="Log out" destructive onClick={...} />
|
|
58
|
+
* </UserMenu>
|
|
71
59
|
* ```
|
|
72
60
|
*/
|
|
73
|
-
|
|
61
|
+
declare const UserMenu: React.FC<UserMenuProps> & {
|
|
62
|
+
Trigger: typeof UserMenuTrigger;
|
|
63
|
+
Header: typeof UserMenuHeader;
|
|
64
|
+
Item: typeof UserMenuItem;
|
|
65
|
+
Logout: typeof UserMenuLogout;
|
|
66
|
+
Divider: typeof UserMenuDivider;
|
|
67
|
+
};
|
|
68
|
+
export { UserMenu };
|
|
74
69
|
export default UserMenu;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, 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
|
+
* Context for UserMenu state and actions.
|
|
21
|
+
*/
|
|
22
|
+
interface UserMenuContextType {
|
|
23
|
+
open: boolean;
|
|
24
|
+
anchorEl: null | HTMLElement;
|
|
25
|
+
handleOpen: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
26
|
+
handleClose: () => void;
|
|
27
|
+
}
|
|
28
|
+
export declare const UserMenuContext: React.Context<UserMenuContextType | undefined>;
|
|
29
|
+
/**
|
|
30
|
+
* Hook to use UserMenu context in sub-components.
|
|
31
|
+
*/
|
|
32
|
+
export declare const useUserMenu: () => UserMenuContextType;
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, 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
|
+
* UserMenu.Divider - Separator between menu sections.
|
|
21
|
+
*/
|
|
22
|
+
export declare const UserMenuDivider: React.FC;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, 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
|
+
* Props for the UserMenu.Header component.
|
|
21
|
+
*/
|
|
22
|
+
export interface UserMenuHeaderProps {
|
|
23
|
+
/** User display name */
|
|
24
|
+
name: string;
|
|
25
|
+
/** User email address */
|
|
26
|
+
email: string;
|
|
27
|
+
/** Avatar image URL (if null, falls back to initials) */
|
|
28
|
+
avatar?: string | null;
|
|
29
|
+
/** Role or plan badge (e.g., "Pro", "Admin") */
|
|
30
|
+
role?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* UserMenu.Header - User info section with name, email, and role badge.
|
|
34
|
+
*/
|
|
35
|
+
export declare const UserMenuHeader: React.FC<UserMenuHeaderProps>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, 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
|
+
* Props for the UserMenu.Item component.
|
|
21
|
+
*/
|
|
22
|
+
export interface UserMenuItemProps {
|
|
23
|
+
/** Icon to display on the left */
|
|
24
|
+
icon?: React.ReactNode;
|
|
25
|
+
/** Item label text */
|
|
26
|
+
label: string;
|
|
27
|
+
/** Optional badge/chip to display on the right */
|
|
28
|
+
badge?: string;
|
|
29
|
+
/** Callback when item is clicked */
|
|
30
|
+
onClick?: () => void;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* UserMenu.Item - Individual menu item with icon and label.
|
|
34
|
+
*/
|
|
35
|
+
export declare const UserMenuItem: React.FC<UserMenuItemProps>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, 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
|
+
* Props for the UserMenu.Logout component.
|
|
21
|
+
*/
|
|
22
|
+
export interface UserMenuLogoutProps {
|
|
23
|
+
/** Icon to display on the left */
|
|
24
|
+
icon?: React.ReactNode;
|
|
25
|
+
/** Item label text (default: "Log out") */
|
|
26
|
+
label?: string;
|
|
27
|
+
/** Callback when item is clicked */
|
|
28
|
+
onClick?: () => void;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* UserMenu.Logout - Destructive menu item for logout action.
|
|
32
|
+
*/
|
|
33
|
+
export declare const UserMenuLogout: React.FC<UserMenuLogoutProps>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, 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
|
+
* Props for the UserMenu.Trigger component.
|
|
21
|
+
*/
|
|
22
|
+
export interface UserMenuTriggerProps {
|
|
23
|
+
/** User display name */
|
|
24
|
+
name: string;
|
|
25
|
+
/** Avatar image URL (if null, falls back to initials) */
|
|
26
|
+
avatar?: string | null;
|
|
27
|
+
/** Whether to show the name text after the avatar */
|
|
28
|
+
showName?: boolean;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* UserMenu.Trigger - Avatar button that opens the menu.
|
|
32
|
+
*/
|
|
33
|
+
export declare const UserMenuTrigger: React.FC<UserMenuTriggerProps>;
|
|
@@ -17,3 +17,12 @@
|
|
|
17
17
|
*/
|
|
18
18
|
export { UserMenu, default } from './UserMenu';
|
|
19
19
|
export type { UserMenuProps, UserMenuUser } from './UserMenu';
|
|
20
|
+
export { UserMenuTrigger } from './UserMenuTrigger';
|
|
21
|
+
export type { UserMenuTriggerProps } from './UserMenuTrigger';
|
|
22
|
+
export { UserMenuHeader } from './UserMenuHeader';
|
|
23
|
+
export type { UserMenuHeaderProps } from './UserMenuHeader';
|
|
24
|
+
export { UserMenuItem } from './UserMenuItem';
|
|
25
|
+
export type { UserMenuItemProps } from './UserMenuItem';
|
|
26
|
+
export { UserMenuLogout } from './UserMenuLogout';
|
|
27
|
+
export type { UserMenuLogoutProps } from './UserMenuLogout';
|
|
28
|
+
export { UserMenuDivider } from './UserMenuDivider';
|