@wso2/oxygen-ui 0.18.0 → 0.20.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 +4 -2
- package/.ai/components.md +332 -0
- package/.ai/patterns.md +12 -8
- package/.ai/theming.md +4 -4
- package/.claude/components.md +332 -0
- package/.claude/patterns.md +12 -8
- package/.claude/skills/oxygen-component/SKILL.md +86 -0
- package/.claude/skills/oxygen-form/SKILL.md +8 -0
- package/.claude/skills/oxygen-layout/SKILL.md +1 -0
- package/.claude/theming.md +4 -4
- package/README.md +3 -3
- package/dist/components/AppBreadcrumbs/AppBreadcrumbs.d.ts +15 -2
- package/dist/components/ContextSwitcher/ContextSwitcher.d.ts +69 -0
- package/dist/components/ContextSwitcher/ContextSwitcherGroup.d.ts +39 -0
- package/dist/components/ContextSwitcher/ContextSwitcherLevel.d.ts +51 -0
- package/dist/components/ContextSwitcher/ContextSwitcherOption.d.ts +41 -0
- package/dist/components/ContextSwitcher/OverflowTooltip.d.ts +38 -0
- package/dist/components/ContextSwitcher/context.d.ts +41 -0
- package/dist/components/ContextSwitcher/index.d.ts +26 -0
- package/dist/components/ContextSwitcher/model.d.ts +44 -0
- package/dist/components/DrawerPanel/DrawerPanel.d.ts +98 -0
- package/dist/components/DrawerPanel/DrawerPanelActions.d.ts +44 -0
- package/dist/components/DrawerPanel/DrawerPanelBody.d.ts +42 -0
- package/dist/components/DrawerPanel/DrawerPanelCloseButton.d.ts +44 -0
- package/dist/components/DrawerPanel/DrawerPanelExpandButton.d.ts +46 -0
- package/dist/components/DrawerPanel/DrawerPanelFooter.d.ts +41 -0
- package/dist/components/DrawerPanel/DrawerPanelHeader.d.ts +44 -0
- package/dist/components/DrawerPanel/DrawerPanelTitle.d.ts +45 -0
- package/dist/components/DrawerPanel/context.d.ts +42 -0
- package/dist/components/DrawerPanel/index.d.ts +35 -0
- package/dist/components/FullScreenWizard/FullScreenWizard.d.ts +85 -0
- package/dist/components/FullScreenWizard/FullScreenWizardContent.d.ts +70 -0
- package/dist/components/FullScreenWizard/FullScreenWizardFooter.d.ts +59 -0
- package/dist/components/FullScreenWizard/FullScreenWizardHeader.d.ts +59 -0
- package/dist/components/FullScreenWizard/FullScreenWizardPreview.d.ts +61 -0
- package/dist/components/FullScreenWizard/FullScreenWizardProgress.d.ts +61 -0
- package/dist/components/FullScreenWizard/context.d.ts +71 -0
- package/dist/components/FullScreenWizard/index.d.ts +33 -0
- package/dist/components/FullScreenWizard/useWizardSteps.d.ts +85 -0
- package/dist/components/ListingCard/ListingCard.d.ts +92 -0
- package/dist/components/ListingCard/index.d.ts +2 -0
- package/dist/components/LogViewer/LogFilterChip.d.ts +31 -0
- package/dist/components/LogViewer/LogLevelMarker.d.ts +16 -0
- package/dist/components/LogViewer/LogViewer.d.ts +178 -0
- package/dist/components/LogViewer/LogViewerControls.d.ts +121 -0
- package/dist/components/LogViewer/LogViewerDetails.d.ts +11 -0
- package/dist/components/LogViewer/LogViewerSearch.d.ts +42 -0
- package/dist/components/LogViewer/LogViewerStream.d.ts +132 -0
- package/dist/components/LogViewer/LogViewerToolbar.d.ts +56 -0
- package/dist/components/LogViewer/columns.d.ts +17 -0
- package/dist/components/LogViewer/context.d.ts +81 -0
- package/dist/components/LogViewer/download.d.ts +14 -0
- package/dist/components/LogViewer/filters.d.ts +11 -0
- package/dist/components/LogViewer/index.d.ts +8 -0
- package/dist/components/LogViewer/timestamps.d.ts +26 -0
- package/dist/components/LogViewer/types.d.ts +163 -0
- package/dist/components/SearchBar/SearchBar.d.ts +7 -0
- package/dist/components/Sidebar/Sidebar.d.ts +2 -0
- package/dist/components/Sidebar/SidebarCollapseToggle.d.ts +50 -0
- package/dist/components/Sidebar/index.d.ts +2 -0
- package/dist/components/TextField/TextField.d.ts +28 -0
- package/dist/components/TextField/index.d.ts +2 -0
- package/dist/components/index.d.ts +13 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +8520 -4539
- package/dist/index.js.map +4 -4
- package/dist/styles/OxygenThemeBase.d.ts +12 -0
- package/dist/styles/Themes/ChoreoLabsTheme.d.ts +20 -0
- package/dist/styles/Themes/index.d.ts +1 -0
- package/package.json +3 -2
|
@@ -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 * as React from 'react';
|
|
19
|
+
import type { SxProps, Theme } from '@mui/material/styles';
|
|
20
|
+
/**
|
|
21
|
+
* Props for DrawerPanelHeader component.
|
|
22
|
+
*/
|
|
23
|
+
export interface DrawerPanelHeaderProps {
|
|
24
|
+
/** Header content, typically `DrawerPanel.Title` and `DrawerPanel.Actions` */
|
|
25
|
+
children: React.ReactNode;
|
|
26
|
+
/** Additional sx props */
|
|
27
|
+
sx?: SxProps<Theme>;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* DrawerPanelHeader - Top row of the drawer panel holding the title and actions.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```tsx
|
|
34
|
+
* <DrawerPanel.Header>
|
|
35
|
+
* <DrawerPanel.Title icon={<ListTree size={20} />}>Build details</DrawerPanel.Title>
|
|
36
|
+
* <DrawerPanel.Actions>
|
|
37
|
+
* <DrawerPanel.ExpandButton />
|
|
38
|
+
* <DrawerPanel.CloseButton />
|
|
39
|
+
* </DrawerPanel.Actions>
|
|
40
|
+
* </DrawerPanel.Header>
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export declare const DrawerPanelHeader: React.FC<DrawerPanelHeaderProps>;
|
|
44
|
+
export default DrawerPanelHeader;
|
|
@@ -0,0 +1,45 @@
|
|
|
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 type { SxProps, Theme } from '@mui/material/styles';
|
|
20
|
+
/**
|
|
21
|
+
* Props for DrawerPanelTitle component.
|
|
22
|
+
*/
|
|
23
|
+
export interface DrawerPanelTitleProps {
|
|
24
|
+
/** Title text, written in sentence case */
|
|
25
|
+
children: React.ReactNode;
|
|
26
|
+
/** Optional icon shown before the title */
|
|
27
|
+
icon?: React.ReactNode;
|
|
28
|
+
/** Heading element rendered for the title (default: `h2`) */
|
|
29
|
+
component?: React.ElementType;
|
|
30
|
+
/** Additional sx props */
|
|
31
|
+
sx?: SxProps<Theme>;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* DrawerPanelTitle - Heading of the drawer panel.
|
|
35
|
+
*
|
|
36
|
+
* The drawer uses this heading as its accessible name, so screen readers
|
|
37
|
+
* announce the title when the panel opens.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```tsx
|
|
41
|
+
* <DrawerPanel.Title icon={<ListTree size={20} />}>Build details</DrawerPanel.Title>
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
export declare const DrawerPanelTitle: React.FC<DrawerPanelTitleProps>;
|
|
45
|
+
export default DrawerPanelTitle;
|
|
@@ -0,0 +1,42 @@
|
|
|
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 value for DrawerPanel compound component.
|
|
21
|
+
*/
|
|
22
|
+
export interface DrawerPanelContextValue {
|
|
23
|
+
/** Whether the panel is open */
|
|
24
|
+
open: boolean;
|
|
25
|
+
/** Callback to close the panel */
|
|
26
|
+
onClose: () => void;
|
|
27
|
+
/** Whether the panel is expanded to its wide width */
|
|
28
|
+
expanded: boolean;
|
|
29
|
+
/** Toggle between the default and expanded width */
|
|
30
|
+
toggleExpanded: () => void;
|
|
31
|
+
/** Id applied to `DrawerPanel.Title`; the drawer is labelled by it */
|
|
32
|
+
titleId: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Context for sharing state between DrawerPanel compound components.
|
|
36
|
+
*/
|
|
37
|
+
export declare const DrawerPanelContext: React.Context<DrawerPanelContextValue | null>;
|
|
38
|
+
/**
|
|
39
|
+
* Hook to access DrawerPanel context.
|
|
40
|
+
* @throws Error if used outside DrawerPanel
|
|
41
|
+
*/
|
|
42
|
+
export declare const useDrawerPanel: () => DrawerPanelContextValue;
|
|
@@ -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
|
+
export { DrawerPanel, default } from './DrawerPanel';
|
|
19
|
+
export type { DrawerPanelProps } from './DrawerPanel';
|
|
20
|
+
export { DrawerPanelHeader } from './DrawerPanelHeader';
|
|
21
|
+
export type { DrawerPanelHeaderProps } from './DrawerPanelHeader';
|
|
22
|
+
export { DrawerPanelTitle } from './DrawerPanelTitle';
|
|
23
|
+
export type { DrawerPanelTitleProps } from './DrawerPanelTitle';
|
|
24
|
+
export { DrawerPanelActions } from './DrawerPanelActions';
|
|
25
|
+
export type { DrawerPanelActionsProps } from './DrawerPanelActions';
|
|
26
|
+
export { DrawerPanelExpandButton } from './DrawerPanelExpandButton';
|
|
27
|
+
export type { DrawerPanelExpandButtonProps } from './DrawerPanelExpandButton';
|
|
28
|
+
export { DrawerPanelCloseButton } from './DrawerPanelCloseButton';
|
|
29
|
+
export type { DrawerPanelCloseButtonProps } from './DrawerPanelCloseButton';
|
|
30
|
+
export { DrawerPanelBody } from './DrawerPanelBody';
|
|
31
|
+
export type { DrawerPanelBodyProps } from './DrawerPanelBody';
|
|
32
|
+
export { DrawerPanelFooter } from './DrawerPanelFooter';
|
|
33
|
+
export type { DrawerPanelFooterProps } from './DrawerPanelFooter';
|
|
34
|
+
export { DrawerPanelContext, useDrawerPanel } from './context';
|
|
35
|
+
export type { DrawerPanelContextValue } from './context';
|
|
@@ -0,0 +1,85 @@
|
|
|
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 type { DialogProps } from '@mui/material/Dialog';
|
|
20
|
+
import type { SxProps, Theme } from '@mui/material/styles';
|
|
21
|
+
import { FullScreenWizardProgress } from './FullScreenWizardProgress';
|
|
22
|
+
import { FullScreenWizardHeader } from './FullScreenWizardHeader';
|
|
23
|
+
import { FullScreenWizardContent } from './FullScreenWizardContent';
|
|
24
|
+
import { FullScreenWizardFooter } from './FullScreenWizardFooter';
|
|
25
|
+
import { FullScreenWizardPreview } from './FullScreenWizardPreview';
|
|
26
|
+
/**
|
|
27
|
+
* Props for the FullScreenWizard component.
|
|
28
|
+
*/
|
|
29
|
+
export interface FullScreenWizardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children' | 'aria-label' | 'aria-labelledby'> {
|
|
30
|
+
/**
|
|
31
|
+
* Wizard parts: Progress, Header, Content, Footer and an optional Preview.
|
|
32
|
+
* Parts are found by their `displayName`, so a product component that wraps
|
|
33
|
+
* a part must set the same `displayName` (e.g. `'FullScreenWizard.Footer'`)
|
|
34
|
+
* and pass its props (such as `variant` or `position`) through.
|
|
35
|
+
*/
|
|
36
|
+
children: React.ReactNode;
|
|
37
|
+
/**
|
|
38
|
+
* Called by the built-in close button and, in modal mode, by Escape. Ask
|
|
39
|
+
* for confirmation here when there are unsaved changes.
|
|
40
|
+
*/
|
|
41
|
+
onClose?: () => void;
|
|
42
|
+
/**
|
|
43
|
+
* Accessible name of the built-in close button.
|
|
44
|
+
* @default 'Close'
|
|
45
|
+
*/
|
|
46
|
+
closeLabel?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Renders the wizard in MUI's full-screen `Dialog`, which traps focus,
|
|
49
|
+
* locks page scroll and closes on Escape.
|
|
50
|
+
* @default false
|
|
51
|
+
*/
|
|
52
|
+
modal?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Whether the dialog is open. Modal mode only.
|
|
55
|
+
* @default false
|
|
56
|
+
*/
|
|
57
|
+
open?: boolean;
|
|
58
|
+
/** Extra props for the `Dialog`. Modal mode only. */
|
|
59
|
+
DialogProps?: Partial<Omit<DialogProps, 'open' | 'onClose' | 'fullScreen' | 'children'>>;
|
|
60
|
+
/** Accessible name of the wizard: names the dialog in modal mode, the `main` region in page mode */
|
|
61
|
+
'aria-label'?: string;
|
|
62
|
+
/** Id of the element naming the wizard; takes precedence over `aria-label` */
|
|
63
|
+
'aria-labelledby'?: string;
|
|
64
|
+
/** Additional sx props applied to the root */
|
|
65
|
+
sx?: SxProps<Theme>;
|
|
66
|
+
}
|
|
67
|
+
type FullScreenWizardComponent = React.ForwardRefExoticComponent<FullScreenWizardProps & React.RefAttributes<HTMLDivElement>> & {
|
|
68
|
+
Progress: typeof FullScreenWizardProgress;
|
|
69
|
+
Header: typeof FullScreenWizardHeader;
|
|
70
|
+
Content: typeof FullScreenWizardContent;
|
|
71
|
+
Footer: typeof FullScreenWizardFooter;
|
|
72
|
+
Preview: typeof FullScreenWizardPreview;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* FullScreenWizard compound component with attached sub-components.
|
|
76
|
+
*
|
|
77
|
+
* Sub-components:
|
|
78
|
+
* - `FullScreenWizard.Progress` - Determinate progress bar
|
|
79
|
+
* - `FullScreenWizard.Header` - Header with the built-in close button
|
|
80
|
+
* - `FullScreenWizard.Content` - Scroll region holding the active step
|
|
81
|
+
* - `FullScreenWizard.Footer` - Actions row under the step
|
|
82
|
+
* - `FullScreenWizard.Preview` - Live preview beside the form
|
|
83
|
+
*/
|
|
84
|
+
export declare const FullScreenWizard: FullScreenWizardComponent;
|
|
85
|
+
export default FullScreenWizard;
|
|
@@ -0,0 +1,70 @@
|
|
|
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 type { Breakpoint, SxProps, Theme } from '@mui/material/styles';
|
|
20
|
+
/**
|
|
21
|
+
* Props for the FullScreenWizard.Content component.
|
|
22
|
+
*/
|
|
23
|
+
export interface FullScreenWizardContentProps extends React.HTMLAttributes<HTMLElement> {
|
|
24
|
+
/** The active step */
|
|
25
|
+
children?: React.ReactNode;
|
|
26
|
+
/**
|
|
27
|
+
* Element the content region renders as. Pass `'div'` when the page around
|
|
28
|
+
* the wizard already has a `main` landmark, such as an `AppShell`.
|
|
29
|
+
* @default 'main' in page mode, 'div' in modal mode
|
|
30
|
+
*/
|
|
31
|
+
component?: React.ElementType;
|
|
32
|
+
/**
|
|
33
|
+
* Maximum width of the content column: a breakpoint key, a width in pixels,
|
|
34
|
+
* or `false` to fill the available width. `xs` is at least 444px, as in MUI's `Container`.
|
|
35
|
+
* @default 'md'
|
|
36
|
+
*/
|
|
37
|
+
maxWidth?: Breakpoint | number | false;
|
|
38
|
+
/**
|
|
39
|
+
* Position of the content column. `start` keeps the form left-aligned, so
|
|
40
|
+
* showing or hiding a preview does not move it. `center` centres the column
|
|
41
|
+
* in both directions, for a landing screen such as a welcome page.
|
|
42
|
+
* @default 'start'
|
|
43
|
+
*/
|
|
44
|
+
align?: 'start' | 'center';
|
|
45
|
+
/**
|
|
46
|
+
* Identifies the active step. When it changes, focus moves to the content
|
|
47
|
+
* region and the region scrolls to the top, so screen readers start at the
|
|
48
|
+
* new step. Nothing happens on the first render.
|
|
49
|
+
*/
|
|
50
|
+
focusKey?: string | number;
|
|
51
|
+
/** Additional sx props */
|
|
52
|
+
sx?: SxProps<Theme>;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* FullScreenWizard.Content - Scroll region holding the active step.
|
|
56
|
+
*
|
|
57
|
+
* Renders a `<main>` landmark in page mode and a plain region inside the
|
|
58
|
+
* dialog in modal mode; `component` overrides the element. The step and the `FullScreenWizard.Footer` share a
|
|
59
|
+
* left-aligned column capped at `maxWidth`, so showing or hiding a preview
|
|
60
|
+
* does not move the form.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```tsx
|
|
64
|
+
* <FullScreenWizard.Content maxWidth="md" focusKey={wizard.activeStep}>
|
|
65
|
+
* {wizard.activeStep && stepContent[wizard.activeStep]}
|
|
66
|
+
* </FullScreenWizard.Content>
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
export declare const FullScreenWizardContent: React.ForwardRefExoticComponent<FullScreenWizardContentProps & React.RefAttributes<HTMLElement>>;
|
|
70
|
+
export default FullScreenWizardContent;
|
|
@@ -0,0 +1,59 @@
|
|
|
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 type { SxProps, Theme } from '@mui/material/styles';
|
|
20
|
+
/**
|
|
21
|
+
* Props for the FullScreenWizard.Footer component.
|
|
22
|
+
*/
|
|
23
|
+
export interface FullScreenWizardFooterProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
24
|
+
/** Actions, e.g. Back and Continue buttons */
|
|
25
|
+
children?: React.ReactNode;
|
|
26
|
+
/**
|
|
27
|
+
* Pins the footer to the bottom of the scroll region, so the actions stay in
|
|
28
|
+
* view on a long form.
|
|
29
|
+
* @default false
|
|
30
|
+
*/
|
|
31
|
+
sticky?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* `inline` renders the actions under the step, in the content column.
|
|
34
|
+
* `bar` anchors them in a full-width bar along the bottom of the form
|
|
35
|
+
* column, outside the scroll region, so they are always in view.
|
|
36
|
+
* @default 'inline'
|
|
37
|
+
*/
|
|
38
|
+
variant?: 'inline' | 'bar';
|
|
39
|
+
/** Additional sx props */
|
|
40
|
+
sx?: SxProps<Theme>;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* FullScreenWizard.Footer - Row of actions under the step content.
|
|
44
|
+
*
|
|
45
|
+
* Actions are end-aligned. Push a Back button to the start with
|
|
46
|
+
* `sx={{ mr: 'auto' }}`. The inline footer renders inside the content's
|
|
47
|
+
* scroll region, in the same column as the step, wherever it sits among the
|
|
48
|
+
* wizard's children. The bar footer spans the bottom of the form column.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```tsx
|
|
52
|
+
* <FullScreenWizard.Footer>
|
|
53
|
+
* <Button variant="outlined" onClick={wizard.back} sx={{ mr: 'auto' }}>Back</Button>
|
|
54
|
+
* <Button variant="contained" onClick={wizard.next}>Continue</Button>
|
|
55
|
+
* </FullScreenWizard.Footer>
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
export declare const FullScreenWizardFooter: React.ForwardRefExoticComponent<FullScreenWizardFooterProps & React.RefAttributes<HTMLDivElement>>;
|
|
59
|
+
export default FullScreenWizardFooter;
|
|
@@ -0,0 +1,59 @@
|
|
|
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 type { IconButtonProps } from '@mui/material/IconButton';
|
|
20
|
+
import type { SxProps, Theme } from '@mui/material/styles';
|
|
21
|
+
/**
|
|
22
|
+
* Props for the FullScreenWizard.Header component.
|
|
23
|
+
*/
|
|
24
|
+
export interface FullScreenWizardHeaderProps extends React.HTMLAttributes<HTMLElement> {
|
|
25
|
+
/** Breadcrumbs or a title, shown beside the close button */
|
|
26
|
+
children?: React.ReactNode;
|
|
27
|
+
/**
|
|
28
|
+
* Side of the header the close button sits on. Use `end` on a landing screen
|
|
29
|
+
* or a flow whose header holds a title or a stepper on the left.
|
|
30
|
+
* @default 'start'
|
|
31
|
+
*/
|
|
32
|
+
closePosition?: 'start' | 'end';
|
|
33
|
+
/**
|
|
34
|
+
* Icon of the close button.
|
|
35
|
+
* @default <X size={20} />
|
|
36
|
+
*/
|
|
37
|
+
closeIcon?: React.ReactNode;
|
|
38
|
+
/** Extra props for the close button, e.g. `size`, `color` or `sx`. Its name and click handler come from the wizard. */
|
|
39
|
+
CloseButtonProps?: Partial<Omit<IconButtonProps, 'onClick' | 'children'>>;
|
|
40
|
+
/** Additional sx props */
|
|
41
|
+
sx?: SxProps<Theme>;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* FullScreenWizard.Header - Header row with the built-in close button.
|
|
45
|
+
*
|
|
46
|
+
* Renders a `<header>` holding the close button, named by the wizard's
|
|
47
|
+
* `closeLabel` and calling its `onClose`, and `children`. The close button
|
|
48
|
+
* comes first by default; `closePosition="end"` moves it after `children`. It
|
|
49
|
+
* is not rendered when the wizard has no `onClose`.
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```tsx
|
|
53
|
+
* <FullScreenWizard.Header>
|
|
54
|
+
* <AppBreadcrumbs items={breadcrumbs} />
|
|
55
|
+
* </FullScreenWizard.Header>
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
export declare const FullScreenWizardHeader: React.ForwardRefExoticComponent<FullScreenWizardHeaderProps & React.RefAttributes<HTMLElement>>;
|
|
59
|
+
export default FullScreenWizardHeader;
|
|
@@ -0,0 +1,61 @@
|
|
|
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 type { Breakpoint, SxProps, Theme } from '@mui/material/styles';
|
|
20
|
+
/**
|
|
21
|
+
* Props for the FullScreenWizard.Preview component.
|
|
22
|
+
*/
|
|
23
|
+
export interface FullScreenWizardPreviewProps extends React.HTMLAttributes<HTMLElement> {
|
|
24
|
+
/** Live preview of what the wizard creates, or other supporting content such as a step list or tips */
|
|
25
|
+
children?: React.ReactNode;
|
|
26
|
+
/**
|
|
27
|
+
* Side of the form the panel sits on.
|
|
28
|
+
* @default 'end'
|
|
29
|
+
*/
|
|
30
|
+
position?: 'start' | 'end';
|
|
31
|
+
/**
|
|
32
|
+
* Hides the preview below this breakpoint. The preview is supplementary, so
|
|
33
|
+
* small screens show the form alone. Pass `false` to always show it.
|
|
34
|
+
* @default 'md'
|
|
35
|
+
*/
|
|
36
|
+
hideBelow?: Breakpoint | false;
|
|
37
|
+
/**
|
|
38
|
+
* Accessible name of the preview region.
|
|
39
|
+
* @default 'Preview'
|
|
40
|
+
*/
|
|
41
|
+
previewLabel?: string;
|
|
42
|
+
/** Additional sx props */
|
|
43
|
+
sx?: SxProps<Theme>;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* FullScreenWizard.Preview - Live preview beside the form.
|
|
47
|
+
*
|
|
48
|
+
* Adding a preview switches the wizard to a split layout: the header, content
|
|
49
|
+
* and footer take one column and the preview takes the other at full height,
|
|
50
|
+
* on the right by default or on the left with `position="start"`. It renders an `<aside>` landmark with its own
|
|
51
|
+
* scroll.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```tsx
|
|
55
|
+
* <FullScreenWizard.Preview>
|
|
56
|
+
* <SignInPreview branding={branding} />
|
|
57
|
+
* </FullScreenWizard.Preview>
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
export declare const FullScreenWizardPreview: React.ForwardRefExoticComponent<FullScreenWizardPreviewProps & React.RefAttributes<HTMLElement>>;
|
|
61
|
+
export default FullScreenWizardPreview;
|
|
@@ -0,0 +1,61 @@
|
|
|
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 type { LinearProgressProps } from '@mui/material/LinearProgress';
|
|
20
|
+
/**
|
|
21
|
+
* Props for the FullScreenWizard.Progress component.
|
|
22
|
+
*/
|
|
23
|
+
export interface FullScreenWizardProgressProps extends Omit<LinearProgressProps, 'variant' | 'value' | 'valueBuffer'> {
|
|
24
|
+
/** Progress through the wizard, from 0 to 100. Values outside the range are clamped. */
|
|
25
|
+
value: number;
|
|
26
|
+
/**
|
|
27
|
+
* Text read by screen readers in place of the percentage, e.g. "Step 2 of 3".
|
|
28
|
+
*/
|
|
29
|
+
valueText?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Accessible name of the progress bar.
|
|
32
|
+
* @default 'Progress'
|
|
33
|
+
*/
|
|
34
|
+
progressLabel?: string;
|
|
35
|
+
/**
|
|
36
|
+
* `bar` is a thin bar across the full width. `segmented` shows one segment
|
|
37
|
+
* per step, inset to line up with the header; it needs `steps`.
|
|
38
|
+
* @default 'bar'
|
|
39
|
+
*/
|
|
40
|
+
variant?: 'bar' | 'segmented';
|
|
41
|
+
/** Number of segments in the `segmented` variant, usually the number of steps */
|
|
42
|
+
steps?: number;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* FullScreenWizard.Progress - Determinate progress indicator along the top of the wizard.
|
|
46
|
+
*
|
|
47
|
+
* Leave it out for a single-step form. Both variants render a `progressbar`
|
|
48
|
+
* with the same value, name and value text.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```tsx
|
|
52
|
+
* <FullScreenWizard.Progress
|
|
53
|
+
* value={wizard.progress}
|
|
54
|
+
* valueText={`Step ${wizard.activeIndex + 1} of ${wizard.count}`}
|
|
55
|
+
* />
|
|
56
|
+
*
|
|
57
|
+
* <FullScreenWizard.Progress variant="segmented" steps={wizard.count} value={wizard.progress} />
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
export declare const FullScreenWizardProgress: React.ForwardRefExoticComponent<Omit<FullScreenWizardProgressProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
61
|
+
export default FullScreenWizardProgress;
|
|
@@ -0,0 +1,71 @@
|
|
|
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 value for the FullScreenWizard compound component.
|
|
21
|
+
*/
|
|
22
|
+
export interface FullScreenWizardContextValue {
|
|
23
|
+
/** Called by the built-in close button. The button is not rendered without it. */
|
|
24
|
+
onClose?: () => void;
|
|
25
|
+
/** Accessible name of the built-in close button */
|
|
26
|
+
closeLabel: string;
|
|
27
|
+
/** Whether the wizard is rendered inside a full-screen dialog */
|
|
28
|
+
modal: boolean;
|
|
29
|
+
/** Accessible name of the wizard; names the `main` region in page mode */
|
|
30
|
+
ariaLabel?: string;
|
|
31
|
+
/** Id of the element naming the wizard; names the `main` region in page mode */
|
|
32
|
+
ariaLabelledby?: string;
|
|
33
|
+
/**
|
|
34
|
+
* The `FullScreenWizard.Footer` element, lifted out of the children so
|
|
35
|
+
* `FullScreenWizard.Content` can render it inside its scroll region, under
|
|
36
|
+
* the step content.
|
|
37
|
+
*/
|
|
38
|
+
footer: React.ReactNode;
|
|
39
|
+
/**
|
|
40
|
+
* Height of `FullScreenWizard.Header` in pixels, measured as it renders, so
|
|
41
|
+
* centred content can balance it and sit in the middle of the whole screen.
|
|
42
|
+
*/
|
|
43
|
+
headerHeight: number;
|
|
44
|
+
/** Reports the header's height; used by `FullScreenWizard.Header` */
|
|
45
|
+
setHeaderHeight: (height: number) => void;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Returns `label` when it is a non-blank string, otherwise `fallback`. An empty
|
|
49
|
+
* or whitespace label must not wipe a control's default accessible name.
|
|
50
|
+
*/
|
|
51
|
+
export declare const resolveLabel: (label: string | undefined, fallback: string) => string;
|
|
52
|
+
/**
|
|
53
|
+
* Context for sharing state between FullScreenWizard compound components.
|
|
54
|
+
*/
|
|
55
|
+
export declare const FullScreenWizardContext: React.Context<FullScreenWizardContextValue | null>;
|
|
56
|
+
/**
|
|
57
|
+
* Hook to access the FullScreenWizard context with a helpful error message.
|
|
58
|
+
*
|
|
59
|
+
* @param componentName - Name of the component using the context (for error messages)
|
|
60
|
+
* @returns FullScreenWizard context value
|
|
61
|
+
* @throws Error if used outside FullScreenWizard
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```tsx
|
|
65
|
+
* function StepTitle() {
|
|
66
|
+
* const { modal } = useFullScreenWizard('StepTitle');
|
|
67
|
+
* // ...
|
|
68
|
+
* }
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
export declare const useFullScreenWizard: (componentName?: string) => FullScreenWizardContextValue;
|
|
@@ -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
|
+
export { FullScreenWizard, default } from './FullScreenWizard';
|
|
19
|
+
export type { FullScreenWizardProps } from './FullScreenWizard';
|
|
20
|
+
export { FullScreenWizardProgress } from './FullScreenWizardProgress';
|
|
21
|
+
export type { FullScreenWizardProgressProps } from './FullScreenWizardProgress';
|
|
22
|
+
export { FullScreenWizardHeader } from './FullScreenWizardHeader';
|
|
23
|
+
export type { FullScreenWizardHeaderProps } from './FullScreenWizardHeader';
|
|
24
|
+
export { FullScreenWizardContent } from './FullScreenWizardContent';
|
|
25
|
+
export type { FullScreenWizardContentProps } from './FullScreenWizardContent';
|
|
26
|
+
export { FullScreenWizardFooter } from './FullScreenWizardFooter';
|
|
27
|
+
export type { FullScreenWizardFooterProps } from './FullScreenWizardFooter';
|
|
28
|
+
export { FullScreenWizardPreview } from './FullScreenWizardPreview';
|
|
29
|
+
export type { FullScreenWizardPreviewProps } from './FullScreenWizardPreview';
|
|
30
|
+
export { FullScreenWizardContext, useFullScreenWizard } from './context';
|
|
31
|
+
export type { FullScreenWizardContextValue } from './context';
|
|
32
|
+
export { useWizardSteps } from './useWizardSteps';
|
|
33
|
+
export type { UseWizardStepsOptions, UseWizardStepsReturn, WizardStepInput, } from './useWizardSteps';
|