@wso2/oxygen-ui 0.21.0 → 0.23.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 +2 -0
- package/.claude/skills/oxygen-form/SKILL.md +165 -98
- package/.claude/skills/oxygen-select/SKILL.md +139 -0
- package/.claude/skills/oxygen-textfield/SKILL.md +91 -0
- package/README.md +2 -0
- package/bin/cli.js +4 -0
- package/dist/components/AppBreadcrumbs/AppBreadcrumbs.d.ts +3 -2
- package/dist/components/AppSwitcher/AppSwitcher.d.ts +6 -6
- package/dist/components/AppSwitcher/AppSwitcherFooter.d.ts +14 -6
- package/dist/components/AppSwitcher/AppSwitcherSection.d.ts +8 -3
- package/dist/components/Select/Select.d.ts +23 -0
- package/dist/components/Select/index.d.ts +2 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1583 -960
- package/dist/index.js.map +4 -4
- package/dist/styles/Themes/ChoreoLabsTheme.d.ts +70 -0
- package/package.json +2 -2
package/bin/cli.js
CHANGED
|
@@ -414,6 +414,8 @@ function initClaude(includeInternal = false) {
|
|
|
414
414
|
console.log(' - /oxygen-component Generate Oxygen UI components');
|
|
415
415
|
console.log(' - /oxygen-layout Generate app layouts');
|
|
416
416
|
console.log(' - /oxygen-form Generate forms with validation');
|
|
417
|
+
console.log(' - /oxygen-textfield Use fixed-label text fields');
|
|
418
|
+
console.log(' - /oxygen-select Use fixed-label selects');
|
|
417
419
|
console.log(' - /oxygen-migrate Migrate MUI code to Oxygen UI');
|
|
418
420
|
if (includeInternal) {
|
|
419
421
|
console.log(' - /oxygen-sync Sync AI docs with source (internal)');
|
|
@@ -548,6 +550,8 @@ Available Skills (Claude mode only):
|
|
|
548
550
|
/oxygen-component Generate Oxygen UI React components
|
|
549
551
|
/oxygen-layout Generate app layouts with AppShell
|
|
550
552
|
/oxygen-form Generate forms with validation
|
|
553
|
+
/oxygen-textfield Use fixed-label text fields
|
|
554
|
+
/oxygen-select Use fixed-label selects
|
|
551
555
|
/oxygen-migrate Migrate existing MUI code
|
|
552
556
|
`);
|
|
553
557
|
}
|
|
@@ -42,7 +42,8 @@ export interface AppBreadcrumbsProps extends React.HTMLAttributes<HTMLDivElement
|
|
|
42
42
|
*/
|
|
43
43
|
maxItems?: number;
|
|
44
44
|
/**
|
|
45
|
-
* Separator between items. Defaults to a chevron
|
|
45
|
+
* Separator between items. Defaults to a chevron, unless the theme sets
|
|
46
|
+
* `components.MuiAppBreadcrumbs.defaultProps.separator`.
|
|
46
47
|
*/
|
|
47
48
|
separator?: ReactNode;
|
|
48
49
|
/**
|
|
@@ -50,7 +51,7 @@ export interface AppBreadcrumbsProps extends React.HTMLAttributes<HTMLDivElement
|
|
|
50
51
|
*/
|
|
51
52
|
sx?: SxProps<Theme>;
|
|
52
53
|
}
|
|
53
|
-
declare function AppBreadcrumbs(
|
|
54
|
+
declare function AppBreadcrumbs(inProps: AppBreadcrumbsProps): JSX.Element;
|
|
54
55
|
declare namespace AppBreadcrumbs {
|
|
55
56
|
var displayName: string;
|
|
56
57
|
}
|
|
@@ -61,8 +61,8 @@ export interface AppSwitcherProps {
|
|
|
61
61
|
* ```tsx
|
|
62
62
|
* <AppSwitcher currentAppId="agent-manager">
|
|
63
63
|
* <AppSwitcher.Trigger label="Switch platforms" />
|
|
64
|
-
* <AppSwitcher.Section label="
|
|
65
|
-
* <AppSwitcher.Footer
|
|
64
|
+
* <AppSwitcher.Section label="Categories" apps={platforms} loading={isLoading} />
|
|
65
|
+
* <AppSwitcher.Footer columns={2} links={cloudLinks} loading={isLoading} />
|
|
66
66
|
* </AppSwitcher>
|
|
67
67
|
* ```
|
|
68
68
|
*
|
|
@@ -71,14 +71,14 @@ export interface AppSwitcherProps {
|
|
|
71
71
|
* <Header.Actions>
|
|
72
72
|
* <AppSwitcher>
|
|
73
73
|
* <AppSwitcher.Trigger />
|
|
74
|
-
* <AppSwitcher.Section label="
|
|
74
|
+
* <AppSwitcher.Section label="Categories">
|
|
75
75
|
* <AppSwitcher.App name="Agent Manager" url="https://agent.wso2.com" />
|
|
76
76
|
* <AppSwitcher.App name="API Platform" url="https://api.wso2.com" />
|
|
77
77
|
* <AppSwitcher.App name="Analytics" disabled tooltip="Coming soon" />
|
|
78
78
|
* </AppSwitcher.Section>
|
|
79
|
-
* <AppSwitcher.Footer
|
|
80
|
-
* <AppSwitcher.App name="
|
|
81
|
-
* <AppSwitcher.App name="
|
|
79
|
+
* <AppSwitcher.Footer columns={2}>
|
|
80
|
+
* <AppSwitcher.App name="Cloud home" url="https://console.wso2.com" icon={<Home size={16} />} />
|
|
81
|
+
* <AppSwitcher.App name="Settings" url="https://console.wso2.com/settings" icon={<Settings size={16} />} />
|
|
82
82
|
* </AppSwitcher.Footer>
|
|
83
83
|
* </AppSwitcher>
|
|
84
84
|
* </Header.Actions>
|
|
@@ -46,8 +46,16 @@ export interface AppSwitcherFooterProps {
|
|
|
46
46
|
children?: React.ReactNode;
|
|
47
47
|
/** WSO2 Cloud destinations rendered as cards, as an alternative to `children` */
|
|
48
48
|
links?: AppSwitcherFooterLink[];
|
|
49
|
-
/**
|
|
49
|
+
/**
|
|
50
|
+
* Heading above the links. Omit it to show the links under the divider alone,
|
|
51
|
+
* as in the WSO2 Cloud design.
|
|
52
|
+
*/
|
|
50
53
|
label?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Accessible name for the links when there is no visible `label`
|
|
56
|
+
* (default: `"Manage"`)
|
|
57
|
+
*/
|
|
58
|
+
'aria-label'?: string;
|
|
51
59
|
/** Number of grid columns from the `sm` breakpoint up (default: 3) */
|
|
52
60
|
columns?: number;
|
|
53
61
|
/** Shows placeholder cards, e.g. while the links are fetched */
|
|
@@ -58,8 +66,8 @@ export interface AppSwitcherFooterProps {
|
|
|
58
66
|
/**
|
|
59
67
|
* AppSwitcher.Footer - Bottom section of the app switcher popover.
|
|
60
68
|
*
|
|
61
|
-
* Holds the WSO2 Cloud destinations (
|
|
62
|
-
*
|
|
69
|
+
* Holds the WSO2 Cloud destinations (e.g. Cloud home and Settings) below a
|
|
70
|
+
* divider, as a grid of cards, using the same card as the platform grid so both rows
|
|
63
71
|
* behave identically. The neutral mark and lighter type keep them visually
|
|
64
72
|
* secondary to the platforms above.
|
|
65
73
|
*
|
|
@@ -68,9 +76,9 @@ export interface AppSwitcherFooterProps {
|
|
|
68
76
|
*
|
|
69
77
|
* @example
|
|
70
78
|
* ```tsx
|
|
71
|
-
* <AppSwitcher.Footer
|
|
72
|
-
* <AppSwitcher.App name="
|
|
73
|
-
* <AppSwitcher.App name="
|
|
79
|
+
* <AppSwitcher.Footer columns={2}>
|
|
80
|
+
* <AppSwitcher.App name="Cloud home" url="https://console.wso2.com" icon={<Home size={16} />} />
|
|
81
|
+
* <AppSwitcher.App name="Settings" url="https://console.wso2.com/settings" icon={<Settings size={16} />} />
|
|
74
82
|
* </AppSwitcher.Footer>
|
|
75
83
|
* ```
|
|
76
84
|
*/
|
|
@@ -42,8 +42,13 @@ export interface AppSwitcherSectionProps {
|
|
|
42
42
|
* `url`, `onClick` or `component` renders disabled.
|
|
43
43
|
*/
|
|
44
44
|
apps?: AppSwitcherAppItem[];
|
|
45
|
-
/** Section heading, rendered as an uppercase label (e.g. `"
|
|
45
|
+
/** Section heading, rendered as an uppercase label (e.g. `"Categories"`) */
|
|
46
46
|
label?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Accessible name for the grid when there is no visible `label`. Ignored
|
|
49
|
+
* when `label` is set, since the heading already names the grid.
|
|
50
|
+
*/
|
|
51
|
+
'aria-label'?: string;
|
|
47
52
|
/** Number of grid columns from the `sm` breakpoint up (default: 3) */
|
|
48
53
|
columns?: number;
|
|
49
54
|
/** Shows placeholder cards, e.g. while the apps are fetched */
|
|
@@ -60,12 +65,12 @@ export interface AppSwitcherSectionProps {
|
|
|
60
65
|
*
|
|
61
66
|
* @example
|
|
62
67
|
* ```tsx
|
|
63
|
-
* <AppSwitcher.Section label="
|
|
68
|
+
* <AppSwitcher.Section label="Categories">
|
|
64
69
|
* <AppSwitcher.App name="Agent Manager" url="https://agent.wso2.com" />
|
|
65
70
|
* <AppSwitcher.App name="API Platform" url="https://api.wso2.com" />
|
|
66
71
|
* </AppSwitcher.Section>
|
|
67
72
|
*
|
|
68
|
-
* <AppSwitcher.Section label="
|
|
73
|
+
* <AppSwitcher.Section label="Categories" apps={platforms} loading={isLoading} />
|
|
69
74
|
* ```
|
|
70
75
|
*/
|
|
71
76
|
export declare const AppSwitcherSection: React.FC<AppSwitcherSectionProps>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type SelectProps as MuiSelectProps } from '@mui/material/Select';
|
|
3
|
+
/** `top` draws a static label above the select instead of MUI's floating label. */
|
|
4
|
+
export type SelectLabelPlacement = 'top';
|
|
5
|
+
export type SelectProps<Value = unknown> = MuiSelectProps<Value> & {
|
|
6
|
+
/** Leave unset for MUI's floating label; `top` draws a static label above the select. */
|
|
7
|
+
labelPlacement?: SelectLabelPlacement;
|
|
8
|
+
/** Shown in the field while nothing is selected. Ignored by `native` selects. */
|
|
9
|
+
placeholder?: React.ReactNode;
|
|
10
|
+
};
|
|
11
|
+
/** Select props that show `placeholder` while the value is empty; shared with `TextField select`. */
|
|
12
|
+
export declare function selectPlaceholderProps<Value>(placeholder: React.ReactNode, renderValue: ((value: Value) => React.ReactNode) | undefined, children: React.ReactNode): {
|
|
13
|
+
displayEmpty: boolean;
|
|
14
|
+
renderValue: (selected: Value) => string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
15
|
+
};
|
|
16
|
+
type SelectComponent = (<Value = unknown>(props: SelectProps<Value> & {
|
|
17
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
18
|
+
}) => React.JSX.Element) & {
|
|
19
|
+
muiName: string;
|
|
20
|
+
};
|
|
21
|
+
/** MUI's Select; with `labelPlacement="top"`, `ref` and layout props go to an outer FormControl. */
|
|
22
|
+
declare const Select: SelectComponent;
|
|
23
|
+
export default Select;
|
|
@@ -38,6 +38,8 @@ export { default as RelativeTime } from './RelativeTime';
|
|
|
38
38
|
export type { RelativeTimeProps } from './RelativeTime';
|
|
39
39
|
export { default as TextField } from './TextField';
|
|
40
40
|
export type { TextFieldProps, TextFieldLabelPlacement } from './TextField';
|
|
41
|
+
export { default as Select } from './Select';
|
|
42
|
+
export type { SelectProps, SelectLabelPlacement } from './Select';
|
|
41
43
|
export { default as StatCard } from './StatCard';
|
|
42
44
|
export type { StatCardProps } from './StatCard';
|
|
43
45
|
export { default as TrialBadge, getTrialBadgeStatus } from './TrialBadge';
|
package/dist/index.d.ts
CHANGED
|
@@ -25,8 +25,8 @@ export { default as Layout } from "./layouts";
|
|
|
25
25
|
export * from "./animations";
|
|
26
26
|
export * from "./hooks";
|
|
27
27
|
export * from "./utils";
|
|
28
|
-
export { TextField } from './components';
|
|
29
|
-
export type { TextFieldProps, TextFieldLabelPlacement } from './components';
|
|
28
|
+
export { TextField, Select } from './components';
|
|
29
|
+
export type { TextFieldProps, TextFieldLabelPlacement, SelectProps, SelectLabelPlacement } from './components';
|
|
30
30
|
export * from '@mui/material';
|
|
31
31
|
export * as colors from '@mui/material/colors';
|
|
32
32
|
export * as DataGrid from '@mui/x-data-grid';
|