@wso2/oxygen-ui 0.0.1-alpha.11 → 0.0.1-alpha.12
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/dist/animations/ParticleBackground/ParticleBackground.d.ts +66 -0
- package/dist/{styles/OxygenTheme/OxygenTheme.d.ts → animations/ParticleBackground/index.d.ts} +2 -2
- package/dist/animations/index.d.ts +18 -0
- package/dist/components/CodeBlock/CodeBlock.d.ts +47 -0
- package/dist/components/CodeBlock/index.d.ts +19 -0
- package/dist/components/ColorSchemeImage/index.d.ts +19 -0
- package/dist/components/ColorSchemeToggle/index.d.ts +18 -0
- package/dist/components/ComplexSelect/ComplexSelectDivider.d.ts +1 -2
- package/dist/components/PageTitle/PageTitle.d.ts +34 -0
- package/dist/components/PageTitle/PageTitleAvatar.d.ts +16 -0
- package/dist/components/PageTitle/PageTitleHeader.d.ts +16 -0
- package/dist/components/PageTitle/PageTitleLink.d.ts +20 -0
- package/dist/components/PageTitle/PageTitleSubHeader.d.ts +16 -0
- package/dist/components/PageTitle/index.d.ts +27 -0
- package/dist/components/index.d.ts +28 -0
- package/dist/contexts/OxygenUIThemeProvider/index.d.ts +20 -0
- package/dist/contexts/index.d.ts +19 -0
- package/dist/hooks/index.d.ts +18 -0
- package/dist/hooks/useThemeContent/index.d.ts +18 -0
- package/dist/hooks/useThemeContent/useThemeContent.d.ts +57 -0
- package/dist/index.d.ts +7 -10
- package/dist/index.js +1126 -186
- package/dist/index.js.map +4 -4
- package/dist/styles/Themes/AsgardeoTheme.d.ts +17 -0
- package/dist/styles/Themes/ChoreoTheme.d.ts +20 -0
- package/dist/styles/Themes/ClassicTheme.d.ts +20 -0
- package/dist/styles/Themes/HighContrastTheme.d.ts +20 -0
- package/dist/styles/Themes/OxygenBaseTheme.d.ts +66 -0
- package/dist/styles/Themes/index.d.ts +22 -0
- package/dist/styles/index.d.ts +18 -0
- package/package.json +10 -8
- package/dist/styles/OxygenTheme/OxygenThemeWithRadialBackground.d.ts +0 -17
|
@@ -0,0 +1,66 @@
|
|
|
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 interface ParticleBackgroundProps {
|
|
19
|
+
/**
|
|
20
|
+
* Opacity of the canvas
|
|
21
|
+
* @default 0.5
|
|
22
|
+
*/
|
|
23
|
+
opacity?: number;
|
|
24
|
+
/**
|
|
25
|
+
* Particles per 10,000 px^2 (scales with screen size)
|
|
26
|
+
* @default 0.12
|
|
27
|
+
*/
|
|
28
|
+
baseDensity?: number;
|
|
29
|
+
/**
|
|
30
|
+
* Maximum speed in px per frame
|
|
31
|
+
* @default 0.3
|
|
32
|
+
*/
|
|
33
|
+
maxSpeed?: number;
|
|
34
|
+
/**
|
|
35
|
+
* Min and max radius of particles
|
|
36
|
+
* @default [2.0, 3.2]
|
|
37
|
+
*/
|
|
38
|
+
radius?: [number, number];
|
|
39
|
+
/**
|
|
40
|
+
* Maximum distance to draw line between particles
|
|
41
|
+
* @default 210
|
|
42
|
+
*/
|
|
43
|
+
linkDist?: number;
|
|
44
|
+
/**
|
|
45
|
+
* Base opacity of the lines
|
|
46
|
+
* @default 0.2
|
|
47
|
+
*/
|
|
48
|
+
linkAlpha?: number;
|
|
49
|
+
/**
|
|
50
|
+
* Radius of mouse influence
|
|
51
|
+
* @default 110
|
|
52
|
+
*/
|
|
53
|
+
mouseInfluence?: number;
|
|
54
|
+
/**
|
|
55
|
+
* How strong the repel effect is
|
|
56
|
+
* @default 0.35
|
|
57
|
+
*/
|
|
58
|
+
repelStrength?: number;
|
|
59
|
+
/**
|
|
60
|
+
* Impulse on click
|
|
61
|
+
* @default 120
|
|
62
|
+
*/
|
|
63
|
+
clickBurst?: number;
|
|
64
|
+
}
|
|
65
|
+
export declare const ParticleBackground: React.FC<ParticleBackgroundProps>;
|
|
66
|
+
export default ParticleBackground;
|
package/dist/{styles/OxygenTheme/OxygenTheme.d.ts → animations/ParticleBackground/index.d.ts}
RENAMED
|
@@ -15,5 +15,5 @@
|
|
|
15
15
|
* specific language governing permissions and limitations
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
|
-
|
|
19
|
-
export
|
|
18
|
+
export { ParticleBackground, default } from './ParticleBackground';
|
|
19
|
+
export type { ParticleBackgroundProps } from './ParticleBackground';
|
|
@@ -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 * from './ParticleBackground';
|
|
@@ -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 React from 'react';
|
|
19
|
+
import 'prismjs/components/prism-javascript';
|
|
20
|
+
import 'prismjs/components/prism-typescript';
|
|
21
|
+
import 'prismjs/components/prism-jsx';
|
|
22
|
+
import 'prismjs/components/prism-tsx';
|
|
23
|
+
import 'prismjs/components/prism-css';
|
|
24
|
+
import 'prismjs/components/prism-bash';
|
|
25
|
+
import 'prismjs/components/prism-json';
|
|
26
|
+
import 'prismjs/components/prism-markup';
|
|
27
|
+
export interface CodeBlockProps {
|
|
28
|
+
/**
|
|
29
|
+
* The code to display
|
|
30
|
+
*/
|
|
31
|
+
code: string;
|
|
32
|
+
/**
|
|
33
|
+
* The programming language for syntax highlighting
|
|
34
|
+
* @default 'tsx'
|
|
35
|
+
*/
|
|
36
|
+
language?: 'javascript' | 'typescript' | 'jsx' | 'tsx' | 'css' | 'bash' | 'json' | 'markup' | 'html';
|
|
37
|
+
/**
|
|
38
|
+
* Show line numbers
|
|
39
|
+
* @default false
|
|
40
|
+
*/
|
|
41
|
+
showLineNumbers?: boolean;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* CodeBlock component with syntax highlighting powered by Prism.js
|
|
45
|
+
*/
|
|
46
|
+
declare const CodeBlock: React.FC<CodeBlockProps>;
|
|
47
|
+
export default CodeBlock;
|
|
@@ -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 } from './CodeBlock';
|
|
19
|
+
export * from './CodeBlock';
|
|
@@ -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 } from './ColorSchemeImage';
|
|
19
|
+
export type { ColorSchemeImageProps, ColorSchemeImageAttribute } from './ColorSchemeImage';
|
|
@@ -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 { ColorSchemeToggle, default } from './ColorSchemeToggle';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { DividerProps } from '@mui/material/Divider';
|
|
2
|
-
export
|
|
3
|
-
}
|
|
2
|
+
export type ComplexSelectDividerProps = DividerProps;
|
|
4
3
|
export declare function ComplexSelectDivider({ sx, ...props }: ComplexSelectDividerProps): import("react/jsx-runtime").JSX.Element;
|
|
5
4
|
export default ComplexSelectDivider;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PageTitleHeader from './PageTitleHeader';
|
|
3
|
+
import PageTitleSubHeader from './PageTitleSubHeader';
|
|
4
|
+
import PageTitleAvatar from './PageTitleAvatar';
|
|
5
|
+
import PageTitleLink from './PageTitleLink';
|
|
6
|
+
/**
|
|
7
|
+
* Props for the PageTitle root component
|
|
8
|
+
*/
|
|
9
|
+
export interface PageTitleProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
10
|
+
/**
|
|
11
|
+
* The content of the page title (can include Avatar, Header, SubHeader, and Link)
|
|
12
|
+
*/
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* PageTitle component with compound pattern support
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* <PageTitle>
|
|
21
|
+
* <PageTitle.Avatar src="/avatar.png" />
|
|
22
|
+
* <PageTitle.Header>Welcome</PageTitle.Header>
|
|
23
|
+
* <PageTitle.SubHeader>Get started with your dashboard</PageTitle.SubHeader>
|
|
24
|
+
* <PageTitle.Link href="/docs" icon={<LinkIcon />}>View Documentation</PageTitle.Link>
|
|
25
|
+
* </PageTitle>
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
declare const PageTitle: React.FC<PageTitleProps> & {
|
|
29
|
+
Avatar: typeof PageTitleAvatar;
|
|
30
|
+
Header: typeof PageTitleHeader;
|
|
31
|
+
SubHeader: typeof PageTitleSubHeader;
|
|
32
|
+
Link: typeof PageTitleLink;
|
|
33
|
+
};
|
|
34
|
+
export default PageTitle;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AvatarProps } from '@mui/material/Avatar';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the PageTitle Avatar component
|
|
5
|
+
*/
|
|
6
|
+
export interface PageTitleAvatarProps extends AvatarProps {
|
|
7
|
+
/**
|
|
8
|
+
* The content of the avatar (typically an image or icon)
|
|
9
|
+
*/
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* PageTitle Avatar component
|
|
14
|
+
*/
|
|
15
|
+
declare const PageTitleAvatar: React.FC<PageTitleAvatarProps>;
|
|
16
|
+
export default PageTitleAvatar;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TypographyProps } from '@mui/material/Typography';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the PageTitle Header component
|
|
5
|
+
*/
|
|
6
|
+
export interface PageTitleHeaderProps extends TypographyProps {
|
|
7
|
+
/**
|
|
8
|
+
* The content of the header
|
|
9
|
+
*/
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* PageTitle Header component
|
|
14
|
+
*/
|
|
15
|
+
declare const PageTitleHeader: React.FC<PageTitleHeaderProps>;
|
|
16
|
+
export default PageTitleHeader;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { LinkProps } from '@mui/material/Link';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the PageTitle Link component
|
|
5
|
+
*/
|
|
6
|
+
export interface PageTitleLinkProps extends LinkProps {
|
|
7
|
+
/**
|
|
8
|
+
* The content of the link
|
|
9
|
+
*/
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Icon to display before the link text
|
|
13
|
+
*/
|
|
14
|
+
icon?: React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* PageTitle Link component
|
|
18
|
+
*/
|
|
19
|
+
declare const PageTitleLink: React.FC<PageTitleLinkProps>;
|
|
20
|
+
export default PageTitleLink;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TypographyProps } from '@mui/material/Typography';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the PageTitle SubHeader component
|
|
5
|
+
*/
|
|
6
|
+
export interface PageTitleSubHeaderProps extends TypographyProps {
|
|
7
|
+
/**
|
|
8
|
+
* The content of the subheader
|
|
9
|
+
*/
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* PageTitle SubHeader component
|
|
14
|
+
*/
|
|
15
|
+
declare const PageTitleSubHeader: React.FC<PageTitleSubHeaderProps>;
|
|
16
|
+
export default PageTitleSubHeader;
|
|
@@ -0,0 +1,27 @@
|
|
|
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 './PageTitle';
|
|
19
|
+
export type { PageTitleProps } from './PageTitle';
|
|
20
|
+
export { default as PageTitleAvatar } from './PageTitleAvatar';
|
|
21
|
+
export type { PageTitleAvatarProps } from './PageTitleAvatar';
|
|
22
|
+
export { default as PageTitleHeader } from './PageTitleHeader';
|
|
23
|
+
export type { PageTitleHeaderProps } from './PageTitleHeader';
|
|
24
|
+
export { default as PageTitleSubHeader } from './PageTitleSubHeader';
|
|
25
|
+
export type { PageTitleSubHeaderProps } from './PageTitleSubHeader';
|
|
26
|
+
export { default as PageTitleLink } from './PageTitleLink';
|
|
27
|
+
export type { PageTitleLinkProps } from './PageTitleLink';
|
|
@@ -0,0 +1,28 @@
|
|
|
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 PageTitle } from './PageTitle';
|
|
26
|
+
export type { PageTitleProps, PageTitleAvatarProps, PageTitleHeaderProps, PageTitleSubHeaderProps, PageTitleLinkProps } from './PageTitle';
|
|
27
|
+
export { default as ThemeSwitcher, ThemeSelect } from './ThemeSwitcher';
|
|
28
|
+
export type { ThemeSwitcherProps, ThemeSelectProps } from './ThemeSwitcher';
|
|
@@ -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,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 as useThemeContentDefault } from './useThemeContent/useThemeContent';
|
|
@@ -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;
|
package/dist/index.d.ts
CHANGED
|
@@ -16,19 +16,16 @@
|
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
18
|
import './fonts.css';
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
export
|
|
22
|
-
export type { ThemeOption, ThemeSwitcherContextValue } from "./contexts/OxygenUIThemeProvider/OxygenUIThemeProvider";
|
|
23
|
-
export { default as ColorSchemeImage } from "./components/ColorSchemeImage/ColorSchemeImage";
|
|
24
|
-
export { default as ColorSchemeToggle } from "./components/ColorSchemeToggle/ColorSchemeToggle";
|
|
25
|
-
export { default as ComplexSelect } from "./components/ComplexSelect";
|
|
26
|
-
export type { ComplexSelectProps } from "./components/ComplexSelect";
|
|
27
|
-
export { default as ThemeSwitcher, ThemeSelect } from "./components/ThemeSwitcher";
|
|
28
|
-
export type { ThemeSwitcherProps, ThemeSelectProps } from "./components/ThemeSwitcher";
|
|
19
|
+
export * from "./styles";
|
|
20
|
+
export * from "./contexts";
|
|
21
|
+
export * from "./components";
|
|
29
22
|
export { default as Layout } from "./layouts";
|
|
23
|
+
export * from "./animations";
|
|
24
|
+
export * from "./hooks";
|
|
30
25
|
export * from '@mui/material';
|
|
26
|
+
export * as colors from '@mui/material/colors';
|
|
31
27
|
export * as Charts from '@mui/x-charts';
|
|
32
28
|
export * as DataGrid from '@mui/x-data-grid';
|
|
33
29
|
export * as DatePickers from '@mui/x-date-pickers';
|
|
30
|
+
export { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns';
|
|
34
31
|
export * as TreeView from '@mui/x-tree-view';
|