@wso2/oxygen-ui 0.10.1 → 0.12.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/dist/components/AppBreadcrumbs/AppBreadcrumbs.d.ts +44 -0
- package/dist/{styles/Themes/ChoreoTheme.d.ts → components/AppBreadcrumbs/index.d.ts} +3 -4
- package/dist/components/ColorSchemeSVG/ColorSchemeSVG.d.ts +19 -4
- package/dist/components/index.d.ts +2 -0
- package/dist/index.js +791 -843
- package/dist/index.js.map +4 -4
- package/dist/styles/Themes/index.d.ts +0 -1
- package/package.json +3 -3
|
@@ -0,0 +1,44 @@
|
|
|
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 type { SxProps, Theme } from '@mui/material';
|
|
19
|
+
import type { JSX } from 'react';
|
|
20
|
+
export interface BreadcrumbItem {
|
|
21
|
+
key: string;
|
|
22
|
+
label: string;
|
|
23
|
+
onClick?: () => void;
|
|
24
|
+
}
|
|
25
|
+
export interface AppBreadcrumbsProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
26
|
+
/**
|
|
27
|
+
* The breadcrumb items to display.
|
|
28
|
+
*/
|
|
29
|
+
items: BreadcrumbItem[];
|
|
30
|
+
/**
|
|
31
|
+
* Maximum number of items to show before truncating with an ellipsis.
|
|
32
|
+
* @default 4
|
|
33
|
+
*/
|
|
34
|
+
maxItems?: number;
|
|
35
|
+
/**
|
|
36
|
+
* The sx prop for styling with Material-UI system.
|
|
37
|
+
*/
|
|
38
|
+
sx?: SxProps<Theme>;
|
|
39
|
+
}
|
|
40
|
+
declare function AppBreadcrumbs({ items, maxItems, sx, ...props }: AppBreadcrumbsProps): JSX.Element;
|
|
41
|
+
declare namespace AppBreadcrumbs {
|
|
42
|
+
var displayName: string;
|
|
43
|
+
}
|
|
44
|
+
export default AppBreadcrumbs;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2026, WSO2 LLC. (https://www.wso2.com).
|
|
3
3
|
*
|
|
4
4
|
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
5
|
* Version 2.0 (the "License"); you may not use this file except
|
|
@@ -15,6 +15,5 @@
|
|
|
15
15
|
* specific language governing permissions and limitations
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
export default ChoreoTheme;
|
|
18
|
+
export { default } from './AppBreadcrumbs';
|
|
19
|
+
export type { AppBreadcrumbsProps, BreadcrumbItem } from './AppBreadcrumbs';
|
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
import { BoxProps } from '@mui/material/Box';
|
|
2
2
|
import { ComponentType, JSX, ReactNode, SVGProps } from 'react';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
* Extends BoxProps to inherit Box component properties for styling.
|
|
4
|
+
* SVG component source for light and dark modes.
|
|
6
5
|
*/
|
|
6
|
+
export interface ColorSchemeSVGComponentSource {
|
|
7
|
+
/** SVGR component to use in light mode */
|
|
8
|
+
light: ComponentType<SVGProps<SVGSVGElement>>;
|
|
9
|
+
/** SVGR component to use in dark mode */
|
|
10
|
+
dark: ComponentType<SVGProps<SVGSVGElement>>;
|
|
11
|
+
}
|
|
7
12
|
export interface ColorSchemeSVGProps extends Omit<BoxProps, 'component' | 'children'> {
|
|
8
13
|
/**
|
|
9
14
|
* SVG elements as children. Use this OR the svg prop.
|
|
10
15
|
*/
|
|
11
16
|
children?: ReactNode;
|
|
12
17
|
/**
|
|
13
|
-
|
|
18
|
+
* SVG component imported with ?react suffix, or an object with light/dark SVG components.
|
|
19
|
+
* Use this OR children.
|
|
14
20
|
*/
|
|
15
|
-
svg?: ComponentType<SVGProps<SVGSVGElement
|
|
21
|
+
svg?: ComponentType<SVGProps<SVGSVGElement>> | ColorSchemeSVGComponentSource;
|
|
16
22
|
/**
|
|
17
23
|
* Width of the SVG. Can be a number (treated as pixels) or a string.
|
|
18
24
|
*/
|
|
@@ -77,6 +83,15 @@ export interface ColorSchemeSVGProps extends Omit<BoxProps, 'component' | 'child
|
|
|
77
83
|
*
|
|
78
84
|
* <ColorSchemeSVG svg={MyLogo} width={200} />
|
|
79
85
|
* ```
|
|
86
|
+
|
|
87
|
+
* @example
|
|
88
|
+
* ```tsx
|
|
89
|
+
* // With mode-aware SVGR components
|
|
90
|
+
* import LogoLight from './logo-light.svg?react';
|
|
91
|
+
* import LogoDark from './logo-dark.svg?react';
|
|
92
|
+
*
|
|
93
|
+
* <ColorSchemeSVG svg={{ light: LogoLight, dark: LogoDark }} width={200} />
|
|
94
|
+
* ```
|
|
80
95
|
*
|
|
81
96
|
* @example
|
|
82
97
|
* ```tsx
|
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
* specific language governing permissions and limitations
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
|
+
export { default as AppBreadcrumbs } from './AppBreadcrumbs';
|
|
19
|
+
export type { AppBreadcrumbsProps, BreadcrumbItem } from './AppBreadcrumbs';
|
|
18
20
|
export { default as CodeBlock } from './CodeBlock';
|
|
19
21
|
export type { CodeBlockProps } from './CodeBlock';
|
|
20
22
|
export { default as ColorSchemeImage } from './ColorSchemeImage';
|