@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.
Files changed (70) hide show
  1. package/.ai/AGENTS.md +4 -2
  2. package/.ai/components.md +332 -0
  3. package/.ai/patterns.md +12 -8
  4. package/.ai/theming.md +4 -4
  5. package/.claude/components.md +332 -0
  6. package/.claude/patterns.md +12 -8
  7. package/.claude/skills/oxygen-component/SKILL.md +86 -0
  8. package/.claude/skills/oxygen-form/SKILL.md +8 -0
  9. package/.claude/skills/oxygen-layout/SKILL.md +1 -0
  10. package/.claude/theming.md +4 -4
  11. package/README.md +3 -3
  12. package/dist/components/AppBreadcrumbs/AppBreadcrumbs.d.ts +15 -2
  13. package/dist/components/ContextSwitcher/ContextSwitcher.d.ts +69 -0
  14. package/dist/components/ContextSwitcher/ContextSwitcherGroup.d.ts +39 -0
  15. package/dist/components/ContextSwitcher/ContextSwitcherLevel.d.ts +51 -0
  16. package/dist/components/ContextSwitcher/ContextSwitcherOption.d.ts +41 -0
  17. package/dist/components/ContextSwitcher/OverflowTooltip.d.ts +38 -0
  18. package/dist/components/ContextSwitcher/context.d.ts +41 -0
  19. package/dist/components/ContextSwitcher/index.d.ts +26 -0
  20. package/dist/components/ContextSwitcher/model.d.ts +44 -0
  21. package/dist/components/DrawerPanel/DrawerPanel.d.ts +98 -0
  22. package/dist/components/DrawerPanel/DrawerPanelActions.d.ts +44 -0
  23. package/dist/components/DrawerPanel/DrawerPanelBody.d.ts +42 -0
  24. package/dist/components/DrawerPanel/DrawerPanelCloseButton.d.ts +44 -0
  25. package/dist/components/DrawerPanel/DrawerPanelExpandButton.d.ts +46 -0
  26. package/dist/components/DrawerPanel/DrawerPanelFooter.d.ts +41 -0
  27. package/dist/components/DrawerPanel/DrawerPanelHeader.d.ts +44 -0
  28. package/dist/components/DrawerPanel/DrawerPanelTitle.d.ts +45 -0
  29. package/dist/components/DrawerPanel/context.d.ts +42 -0
  30. package/dist/components/DrawerPanel/index.d.ts +35 -0
  31. package/dist/components/FullScreenWizard/FullScreenWizard.d.ts +85 -0
  32. package/dist/components/FullScreenWizard/FullScreenWizardContent.d.ts +70 -0
  33. package/dist/components/FullScreenWizard/FullScreenWizardFooter.d.ts +59 -0
  34. package/dist/components/FullScreenWizard/FullScreenWizardHeader.d.ts +59 -0
  35. package/dist/components/FullScreenWizard/FullScreenWizardPreview.d.ts +61 -0
  36. package/dist/components/FullScreenWizard/FullScreenWizardProgress.d.ts +61 -0
  37. package/dist/components/FullScreenWizard/context.d.ts +71 -0
  38. package/dist/components/FullScreenWizard/index.d.ts +33 -0
  39. package/dist/components/FullScreenWizard/useWizardSteps.d.ts +85 -0
  40. package/dist/components/ListingCard/ListingCard.d.ts +92 -0
  41. package/dist/components/ListingCard/index.d.ts +2 -0
  42. package/dist/components/LogViewer/LogFilterChip.d.ts +31 -0
  43. package/dist/components/LogViewer/LogLevelMarker.d.ts +16 -0
  44. package/dist/components/LogViewer/LogViewer.d.ts +178 -0
  45. package/dist/components/LogViewer/LogViewerControls.d.ts +121 -0
  46. package/dist/components/LogViewer/LogViewerDetails.d.ts +11 -0
  47. package/dist/components/LogViewer/LogViewerSearch.d.ts +42 -0
  48. package/dist/components/LogViewer/LogViewerStream.d.ts +132 -0
  49. package/dist/components/LogViewer/LogViewerToolbar.d.ts +56 -0
  50. package/dist/components/LogViewer/columns.d.ts +17 -0
  51. package/dist/components/LogViewer/context.d.ts +81 -0
  52. package/dist/components/LogViewer/download.d.ts +14 -0
  53. package/dist/components/LogViewer/filters.d.ts +11 -0
  54. package/dist/components/LogViewer/index.d.ts +8 -0
  55. package/dist/components/LogViewer/timestamps.d.ts +26 -0
  56. package/dist/components/LogViewer/types.d.ts +163 -0
  57. package/dist/components/SearchBar/SearchBar.d.ts +7 -0
  58. package/dist/components/Sidebar/Sidebar.d.ts +2 -0
  59. package/dist/components/Sidebar/SidebarCollapseToggle.d.ts +50 -0
  60. package/dist/components/Sidebar/index.d.ts +2 -0
  61. package/dist/components/TextField/TextField.d.ts +28 -0
  62. package/dist/components/TextField/index.d.ts +2 -0
  63. package/dist/components/index.d.ts +13 -1
  64. package/dist/index.d.ts +3 -0
  65. package/dist/index.js +8520 -4539
  66. package/dist/index.js.map +4 -4
  67. package/dist/styles/OxygenThemeBase.d.ts +12 -0
  68. package/dist/styles/Themes/ChoreoLabsTheme.d.ts +20 -0
  69. package/dist/styles/Themes/index.d.ts +1 -0
  70. package/package.json +3 -2
@@ -0,0 +1,132 @@
1
+ import * as React from 'react';
2
+ import type { BoxProps } from '@mui/material/Box';
3
+ import type { SxProps, Theme } from '@mui/material/styles';
4
+ import type { LogEntry } from './types';
5
+ /**
6
+ * Props for the LogViewer.Stream component. The rest of the props go to the root element.
7
+ */
8
+ export interface LogViewerStreamProps extends Omit<BoxProps, 'children' | 'maxHeight' | 'onScroll' | 'onWheel'> {
9
+ /**
10
+ * Replaces the default expanded view (a list of `details` fields) of an entry.
11
+ */
12
+ renderDetails?: (entry: LogEntry) => React.ReactNode;
13
+ /**
14
+ * Largest height of the list, in pixels, before it scrolls.
15
+ * @default 640
16
+ */
17
+ maxHeight?: number;
18
+ /**
19
+ * Distance, in pixels, from the older end at which scrolling loads older entries.
20
+ * @default 72
21
+ */
22
+ scrollTriggerPx?: number;
23
+ /**
24
+ * Title of the empty state, shown when there are no entries, nothing is loading and there is no
25
+ * error. The layout is the same in every product; only the words are yours.
26
+ * @default 'No logs found'
27
+ */
28
+ emptyTitle?: string;
29
+ /**
30
+ * Description under the title of the empty state, such as what the reader can try next. Nothing
31
+ * is shown when omitted.
32
+ */
33
+ emptyDescription?: string;
34
+ /**
35
+ * Title of the empty state while the time range filter has no range, which is when nothing has been asked for yet.
36
+ * @default 'Select a time range'
37
+ */
38
+ noRangeTitle?: string;
39
+ /**
40
+ * Description under the title while the time range filter has no range.
41
+ * @default 'Choose a time range to load logs.'
42
+ */
43
+ noRangeDescription?: string;
44
+ /**
45
+ * Text of the retry button of the error.
46
+ * @default 'Try again'
47
+ */
48
+ retryLabel?: string;
49
+ /**
50
+ * Text of the load older button.
51
+ * @default 'Load older logs'
52
+ */
53
+ loadOlderLabel?: string;
54
+ /**
55
+ * Text shown at the older end when there is nothing older to load.
56
+ * @default 'No older logs'
57
+ */
58
+ noMoreOlderLabel?: string;
59
+ /**
60
+ * Text shown at the newer end. Nothing is shown when omitted.
61
+ */
62
+ newestLabel?: string;
63
+ /**
64
+ * Text of each entry's Copy button.
65
+ * @default 'Copy'
66
+ */
67
+ copyLabel?: string;
68
+ /**
69
+ * Text of each entry's Copy link button.
70
+ * @default 'Copy link'
71
+ */
72
+ copyLinkLabel?: string;
73
+ /**
74
+ * Text that replaces the Copy and Copy link labels for a moment after the copy succeeded.
75
+ * @default 'Copied'
76
+ */
77
+ copiedLabel?: string;
78
+ /**
79
+ * Accessible name of the button that opens or closes an entry.
80
+ * @default ({ open }) => (open ? 'Hide details' : 'Show details')
81
+ */
82
+ detailsToggleLabel?: (info: {
83
+ open: boolean;
84
+ }) => string;
85
+ /**
86
+ * Accessible name of the region that holds an opened entry's details. It receives the entry.
87
+ * @default (entry) => `Details for ${entry.id}`
88
+ */
89
+ detailsLabel?: (entry: LogEntry) => string;
90
+ /**
91
+ * Accessible name of the button that opens a collapsed object or list in the default details.
92
+ * @default 'Expand'
93
+ */
94
+ expandNodeLabel?: string;
95
+ /**
96
+ * Accessible name of the button that closes an open object or list in the default details.
97
+ * @default 'Collapse'
98
+ */
99
+ collapseNodeLabel?: string;
100
+ /**
101
+ * Accessible name of a sort control in a column heading.
102
+ * @default (label) => `Sort by ${label}`
103
+ */
104
+ sortColumnLabel?: (label: string) => string;
105
+ /**
106
+ * Accessible name of a filter control in a column heading.
107
+ * @default (label) => `Filter by ${label}`
108
+ */
109
+ filterColumnLabel?: (label: string) => string;
110
+ /**
111
+ * Accessible name of the loading indicator.
112
+ * @default 'Loading logs'
113
+ */
114
+ loadingLabel?: string;
115
+ /**
116
+ * Accessible name of the scrolling list.
117
+ * @default 'Log stream'
118
+ */
119
+ label?: string;
120
+ /**
121
+ * Custom styles for the root element.
122
+ */
123
+ sx?: SxProps<Theme>;
124
+ }
125
+ /**
126
+ * LogViewer.Stream - The scrolling list of entries, with its loading, empty and error states.
127
+ *
128
+ * Older entries load when the reader scrolls toward the older end, or uses the button there. Only
129
+ * movement toward that end loads, so the list does not load just because it starts at the top.
130
+ */
131
+ declare const LogViewerStream: React.ForwardRefExoticComponent<Omit<LogViewerStreamProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
132
+ export default LogViewerStream;
@@ -0,0 +1,56 @@
1
+ import * as React from 'react';
2
+ import type { BoxProps } from '@mui/material/Box';
3
+ /**
4
+ * Props for LogViewer.Toolbar. The rest of the props go to the root element.
5
+ */
6
+ export interface LogViewerToolbarProps extends Omit<BoxProps, 'children'> {
7
+ /**
8
+ * The controls of the toolbar: `LogViewer.Search`, `LogViewer.TimeZone`, `LogViewer.Sort`,
9
+ * `LogViewer.Download`, `LogViewer.Refresh` and `LogViewer.Count`. Include the ones you want. The
10
+ * layout is the same in every product: the filters and the search are on the left, and the other
11
+ * controls are on the right, in the order given. The count goes before the applied filter chips,
12
+ * or after the search when there are none.
13
+ */
14
+ children?: React.ReactNode;
15
+ /**
16
+ * Accessible name of the toolbar.
17
+ * @default 'Log toolbar'
18
+ */
19
+ label?: string;
20
+ /**
21
+ * Accessible name of the group of applied filter chips.
22
+ * @default 'Applied filters'
23
+ */
24
+ appliedFiltersLabel?: string;
25
+ /**
26
+ * Shows a removable chip below the toolbar for each applied filter, with a button that removes them all. Without the chips, the
27
+ * reader can no longer see which filters are active at a glance, so turn them off only when
28
+ * the page shows that some other way.
29
+ * @default true
30
+ */
31
+ showFilterChips?: boolean;
32
+ /**
33
+ * The action of an applied filter's chip, which reopens the filter. It receives the filter's label.
34
+ * The chip's accessible name is the text it shows, then this: `Status: Failed, Change status filter`.
35
+ * @default (name) => `Change ${name} filter`, with the name in lower case
36
+ */
37
+ changeFilterLabel?: (name: string) => string;
38
+ /**
39
+ * Accessible name of the remove icon of an applied filter's chip. It receives the filter's label.
40
+ * @default (name) => `Remove ${name} filter`, with the name in lower case
41
+ */
42
+ removeFilterLabel?: (name: string) => string;
43
+ /**
44
+ * Text of the button that removes every applied filter. It is shown with the chips, when more than one is applied.
45
+ * @default 'Clear all'
46
+ */
47
+ clearAllLabel?: string;
48
+ }
49
+ /**
50
+ * LogViewer.Toolbar - The filters of the viewer, the chips of the applied ones, and the controls
51
+ * given as children. Filters that a column heading holds are not shown here as buttons, only as
52
+ * chips. Place it above `LogViewer.Stream`. It passes `className`, `sx`, `data-*` and other props to
53
+ * its root element, and forwards its `ref` to it.
54
+ */
55
+ declare const LogViewerToolbar: React.ForwardRefExoticComponent<Omit<LogViewerToolbarProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
56
+ export default LogViewerToolbar;
@@ -0,0 +1,17 @@
1
+ import type { LogColumn } from './types';
2
+ /** The face the entries are set in. */
3
+ export declare const MONOSPACE = "'Consolas', 'Monaco', 'Courier New', monospace";
4
+ /**
5
+ * The width of a column as a CSS length, or `undefined` when the column takes a share of what is
6
+ * left. Used for the `<col>` of the table, which sizes its columns.
7
+ */
8
+ export declare const columnWidth: (column: LogColumn) => string | undefined;
9
+ /**
10
+ * The narrowest width the columns, their gaps and the row padding fit in, as a CSS length. A list
11
+ * narrower than this scrolls sideways, and its heading row scrolls with it.
12
+ */
13
+ export declare const columnsMinWidth: (columns: LogColumn[]) => string;
14
+ /**
15
+ * The heading of a column: its label, or the standard one for the built-in columns.
16
+ */
17
+ export declare const columnLabel: (column: LogColumn) => string;
@@ -0,0 +1,81 @@
1
+ import * as React from 'react';
2
+ import type { LogColumn, LogEntry, LogFilterDefinition, LogFilterValue, LogFilterValues, LogLevel, LogSort, LogTimeZone, LogViewerOrder } from './types';
3
+ /**
4
+ * Context value shared by the parts of a LogViewer. It holds the data and the state the root
5
+ * LogViewer owns; what the parts look like (their words and sizes) is set on the parts.
6
+ */
7
+ export interface LogViewerContextValue {
8
+ /** Entries in display order. */
9
+ entries: LogEntry[];
10
+ /** Number of entries loaded. */
11
+ count: number;
12
+ /** Which end of the list holds the newest entries. */
13
+ order: LogViewerOrder;
14
+ /** Switches between newest first and oldest first. */
15
+ toggleOrder: () => void;
16
+ /** True while the first page is loading. */
17
+ loading: boolean;
18
+ /** True while older entries are loading. */
19
+ loadingOlder: boolean;
20
+ /** True when entries older than the loaded ones can still be loaded. */
21
+ hasMoreOlder: boolean;
22
+ /** Asks for older entries. */
23
+ onLoadOlder?: () => void | Promise<unknown>;
24
+ /** Error shown above the list. */
25
+ error?: React.ReactNode;
26
+ /** Tries again after an error. The error shows a button for it when set. */
27
+ onRetry?: () => void;
28
+ /** Warning shown above the list. */
29
+ warning?: React.ReactNode;
30
+ /** The time zone timestamps are shown in. */
31
+ timeZone: LogTimeZone;
32
+ /** Switches the time zone. */
33
+ setTimeZone: (timeZone: LogTimeZone) => void;
34
+ /** The columns of each entry. */
35
+ columns: LogColumn[];
36
+ /** True when the heading row is visually hidden and its sort and filter controls are not offered. */
37
+ hideHeading: boolean;
38
+ /** The filters the viewer shows. */
39
+ filters: LogFilterDefinition[];
40
+ /**
41
+ * True when there is a time range filter, no range is applied to it, and nothing is loaded. The viewer then asks
42
+ * for a range instead of saying that no logs were found.
43
+ */
44
+ awaitingRange: boolean;
45
+ /** The applied filters, keyed by filter id. */
46
+ filterValues: LogFilterValues;
47
+ /** Called with a filter's id and its new value. */
48
+ onFilterChange?: (id: string, value: LogFilterValue) => void;
49
+ /** The column the entries are sorted by, when it is not the time. */
50
+ sort: LogSort | null;
51
+ /** Called when the reader sorts by a column other than the time. */
52
+ onSortChange?: (sort: LogSort | null) => void;
53
+ /**
54
+ * The time range picker that is open, if any: the id of its filter and the element it is placed
55
+ * under (`null` for the filter's own button). A chip or a column heading opens a picker through
56
+ * this, so each filter is drawn once, in the heading or in the toolbar.
57
+ */
58
+ rangePicker: {
59
+ id: string;
60
+ anchor: HTMLElement | null;
61
+ } | null;
62
+ /** Opens the time range picker of a filter, under `anchor` (or under its own button when `null`). */
63
+ openRangePicker: (id: string, anchor: HTMLElement | null) => void;
64
+ /** Closes the open time range picker. */
65
+ closeRangePicker: () => void;
66
+ /** Called after a Copy button is used, with whether the text was copied. */
67
+ onCopy?: (entry: LogEntry, copied: boolean) => void;
68
+ /** Gives the link to one entry. Each entry shows a Copy link button when set. */
69
+ getEntryLink?: (entry: LogEntry) => string | undefined;
70
+ /** Called after a Copy link button is used, with whether the link was copied. */
71
+ onCopyLink?: (entry: LogEntry, copied: boolean) => void;
72
+ /** The entry to mark and scroll into view, such as the one a shared link points at. */
73
+ highlightedEntryId?: string;
74
+ /** The text each level is shown as. */
75
+ levelLabels: Record<LogLevel, string>;
76
+ }
77
+ export declare const LogViewerContext: React.Context<LogViewerContextValue | null>;
78
+ /**
79
+ * Returns the LogViewer context and throws when used outside a LogViewer.
80
+ */
81
+ export declare const useLogViewerRequired: () => LogViewerContextValue;
@@ -0,0 +1,14 @@
1
+ import type { LogColumn, LogEntry, LogLevel, LogTimeZone } from './types';
2
+ /**
3
+ * The plain text of an entry: its `copyText`, or the text of its columns joined by spaces. Entries
4
+ * with no text have none.
5
+ */
6
+ export declare const entryText: (entry: LogEntry, columns: LogColumn[], timeZone: LogTimeZone, levelLabels: Record<LogLevel, string>) => string | undefined;
7
+ /**
8
+ * One line per entry that has text, in the order given.
9
+ */
10
+ export declare const buildLogText: (entries: LogEntry[], columns: LogColumn[], timeZone: LogTimeZone, levelLabels: Record<LogLevel, string>) => string;
11
+ /**
12
+ * Saves text as a file through the browser. Does nothing outside a browser.
13
+ */
14
+ export declare const saveTextFile: (text: string, fileName: string) => void;
@@ -0,0 +1,11 @@
1
+ import type { TimeRange } from '../TimeRangeFilter';
2
+ import type { LogFilterValue } from './types';
3
+ /**
4
+ * True when the value of a filter is a time range, which is the only filter value that is an object.
5
+ */
6
+ export declare const isRange: (value: LogFilterValue) => value is TimeRange;
7
+ /**
8
+ * True when a filter has a value to show: a time range, or a text that is not empty. An unset
9
+ * filter, or one set to an empty text, has none.
10
+ */
11
+ export declare const isApplied: (value: LogFilterValue) => boolean;
@@ -0,0 +1,8 @@
1
+ export { default } from './LogViewer';
2
+ export { default as LogViewer } from './LogViewer';
3
+ export type { LogViewerProps } from './LogViewer';
4
+ export type { LogViewerStreamProps } from './LogViewerStream';
5
+ export type { LogViewerToolbarProps } from './LogViewerToolbar';
6
+ export type { LogViewerSearchProps } from './LogViewerSearch';
7
+ export type { LogViewerCountProps, LogViewerDownloadProps, LogViewerRefreshProps, LogViewerSortProps, LogViewerTimeZoneProps, } from './LogViewerControls';
8
+ export type { LogColumn, LogEntry, LogFilterDefinition, LogFilterOption, LogFilterValue, LogFilterValues, LogLevel, LogSelectFilter, LogSort, LogTimeRangeFilter, LogTimeZone, LogViewerOrder, } from './types';
@@ -0,0 +1,26 @@
1
+ import type { LogTimeZone } from './types';
2
+ /**
3
+ * The date format of the viewer, as a date-fns format string, for the date fields of the time range
4
+ * picker. It is the date that `formatDisplay` and `formatShort` write, so a time reads the same in a row,
5
+ * in a filter chip and in the picker.
6
+ */
7
+ export declare const DATE_FORMAT = "yyyy-MM-dd";
8
+ /**
9
+ * The moment a timestamp stands for, or null when a string is not a date.
10
+ */
11
+ export declare const toDate: (timestamp: string | Date) => Date | null;
12
+ /**
13
+ * How a timestamp is shown in a row, for example "2026-10-15 08:16:55.622". A string that is not a
14
+ * date is shown as it is.
15
+ */
16
+ export declare const formatDisplay: (timestamp: string | Date, zone: LogTimeZone) => string;
17
+ /**
18
+ * How a timestamp is written into copied and downloaded text: ISO 8601 with the zone, for example
19
+ * "2026-10-15T08:16:55.622Z" or "2026-10-15T13:46:55.622+05:30", so a pasted line is unambiguous.
20
+ */
21
+ export declare const formatIso: (timestamp: string | Date, zone: LogTimeZone) => string;
22
+ /**
23
+ * A shorter form for filter chips, for example "2026-10-15 08:16:55". Local time adds its offset, for example
24
+ * "2026-10-15 13:46:55 +05:30", because two moments an hour apart read the same where the clocks are set back.
25
+ */
26
+ export declare const formatShort: (date: Date, zone: LogTimeZone) => string;
@@ -0,0 +1,163 @@
1
+ import type * as React from 'react';
2
+ import type { TimeRange, TimeRangePreset } from '../TimeRangeFilter';
3
+ /**
4
+ * How serious a log entry is. These are the six severity names of OpenTelemetry, from least to
5
+ * most serious.
6
+ */
7
+ export type LogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'fatal';
8
+ /**
9
+ * The time zone timestamps are shown in: UTC, or the reader's own (browser) time zone.
10
+ */
11
+ export type LogTimeZone = 'utc' | 'local';
12
+ /**
13
+ * One entry in a LogViewer.
14
+ */
15
+ export interface LogEntry {
16
+ /**
17
+ * Stable, unique identifier of the entry.
18
+ */
19
+ id: string;
20
+ /**
21
+ * When the entry happened. The viewer shows it in one standard format, in UTC or the reader's
22
+ * time zone. A string is read as a date; one that is not a date is shown as given.
23
+ */
24
+ timestamp: string | Date;
25
+ /**
26
+ * How serious the entry is. The viewer draws one standard marker for it, the same in every
27
+ * product, so do not color a column by hand to show severity. Leave it out for entries
28
+ * that have no level.
29
+ */
30
+ level?: LogLevel;
31
+ /**
32
+ * Fields shown when the entry is expanded, in the order given. Nested objects and arrays
33
+ * render as an expandable tree. The entry cannot be expanded when this is omitted and
34
+ * `renderDetails` is not set. The columns can read their content from here.
35
+ */
36
+ details?: Record<string, unknown>;
37
+ /**
38
+ * Plain text copied by the entry's Copy button and saved by Download. Defaults to the text of the
39
+ * entry's columns, joined by spaces. The button is hidden when there is no text to copy.
40
+ */
41
+ copyText?: string;
42
+ }
43
+ /**
44
+ * One column of the column layout. The viewer shows a heading for each column, and a filter and
45
+ * a sort control in it when the column has them.
46
+ */
47
+ export interface LogColumn {
48
+ /**
49
+ * Stable identifier. `time` and `level` are built in: without `render` they show the entry's
50
+ * time and level marker, and their label defaults to "Time" and "Level".
51
+ */
52
+ id: string;
53
+ /** Heading of the column. */
54
+ label?: string;
55
+ /**
56
+ * Width of the column: a number is pixels, a string is a CSS grid track size such as `'2fr'`.
57
+ * @default '1fr'
58
+ */
59
+ width?: number | string;
60
+ /** Content of the column for one entry. */
61
+ render?: (entry: LogEntry) => React.ReactNode;
62
+ /**
63
+ * Plain text of the column for one entry, used for the Copy button and Download. Defaults to the
64
+ * result of `render` when that is a string or a number, so it is only needed when `render` returns
65
+ * an element.
66
+ */
67
+ text?: (entry: LogEntry) => string;
68
+ /** Id of the entry of `filters` that is opened from this column's heading. */
69
+ filterId?: string;
70
+ /**
71
+ * Makes the heading a sort control. Sorting the `time` column switches between newest first and
72
+ * oldest first. Sorting any other column is reported through `onSortChange`.
73
+ */
74
+ sortable?: boolean;
75
+ }
76
+ /**
77
+ * The column the entries are sorted by, and the direction.
78
+ */
79
+ export interface LogSort {
80
+ /** Id of the sorted column. */
81
+ columnId: string;
82
+ direction: 'asc' | 'desc';
83
+ }
84
+ /**
85
+ * Which end of the list holds the newest entries.
86
+ * - `newest-first`: older entries are loaded at the bottom.
87
+ * - `oldest-first`: older entries are loaded at the top.
88
+ */
89
+ export type LogViewerOrder = 'newest-first' | 'oldest-first';
90
+ /**
91
+ * One choice of a `select` filter.
92
+ */
93
+ export interface LogFilterOption {
94
+ /**
95
+ * Value reported through `onFilterChange` and kept in `filterValues`. It must not be empty: an empty
96
+ * value means the filter is not applied, so a choice with one is left out of the list.
97
+ */
98
+ value: string;
99
+ /** Text shown for the choice. */
100
+ label: string;
101
+ }
102
+ /**
103
+ * A filter whose value is one of a list of options.
104
+ */
105
+ export interface LogSelectFilter {
106
+ /** Stable identifier. It is the key in `filterValues` and the first argument of `onFilterChange`. */
107
+ id: string;
108
+ /** Name of the filter, on its button and before the value in its chip (e.g. "Status"). */
109
+ label: string;
110
+ type: 'select';
111
+ /** Choices. Build them from the loaded entries or list them in advance. */
112
+ options: LogFilterOption[];
113
+ /**
114
+ * Adds a search box above the choices, for long lists.
115
+ * @default false
116
+ */
117
+ searchable?: boolean;
118
+ /**
119
+ * Text of the choice that clears the filter.
120
+ * @default 'Any {label}' with the label in lower case, for example 'Any status'
121
+ */
122
+ allLabel?: string;
123
+ /**
124
+ * Placeholder of the search box.
125
+ * @default 'Search'
126
+ */
127
+ searchPlaceholder?: string;
128
+ /**
129
+ * Text shown when the search matches no choice.
130
+ * @default 'No matches'
131
+ */
132
+ noMatchLabel?: string;
133
+ }
134
+ /**
135
+ * A filter whose value is a time range, picked from presets or entered as a custom range.
136
+ */
137
+ export interface LogTimeRangeFilter {
138
+ /** Stable identifier. It is the key in `filterValues` and the first argument of `onFilterChange`. */
139
+ id: string;
140
+ /** Name of the filter, on its button and before the range in its chip (e.g. "Time"). */
141
+ label: string;
142
+ type: 'timeRange';
143
+ /** Quick ranges listed in the menu. Defaults to those of `TimeRangeFilter`. */
144
+ presets?: TimeRangePreset[];
145
+ /** Longest range, in milliseconds, that a custom range may span. Unlimited when omitted. */
146
+ maxRangeMs?: number;
147
+ /** Formats the range shown in the filter's chip. Defaults to UTC start and end times. */
148
+ formatValue?: (range: TimeRange) => string;
149
+ }
150
+ /**
151
+ * Describes one filter the viewer shows in its toolbar. The viewer only displays the filter and
152
+ * reports changes; it never filters the entries. Load or filter them in `onFilterChange`.
153
+ */
154
+ export type LogFilterDefinition = LogSelectFilter | LogTimeRangeFilter;
155
+ /**
156
+ * The value of one filter: an option value for `select`, a range for `timeRange`. `null`,
157
+ * `undefined` or an empty string means the filter is not applied.
158
+ */
159
+ export type LogFilterValue = string | TimeRange | null | undefined;
160
+ /**
161
+ * The applied filters, keyed by filter id.
162
+ */
163
+ export type LogFilterValues = Record<string, LogFilterValue>;
@@ -1,6 +1,13 @@
1
1
  import * as React from 'react';
2
2
  import { TextFieldProps } from '@mui/material/TextField';
3
3
  export interface SearchBarProps extends Omit<TextFieldProps, 'variant'> {
4
+ /**
5
+ * `standard` sizes the field to 400px, shrinking in narrower containers.
6
+ * Use it for list and grid page search so it looks the same across the product.
7
+ * `fullWidth` takes precedence when both are set.
8
+ * @default 'auto'
9
+ */
10
+ width?: 'auto' | 'standard';
4
11
  }
5
12
  export declare const SearchBar: React.ForwardRefExoticComponent<Omit<SearchBarProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
6
13
  export default SearchBar;
@@ -21,6 +21,7 @@ import { SidebarNav } from './SidebarNav';
21
21
  import { SidebarCategory, SidebarCategoryLabel } from './SidebarCategory';
22
22
  import { SidebarItem, SidebarItemIcon, SidebarItemLabel, SidebarItemBadge } from './SidebarItem';
23
23
  import { SidebarFooter } from './SidebarFooter';
24
+ import { SidebarCollapseToggle } from './SidebarCollapseToggle';
24
25
  import { SidebarUser, SidebarUserAvatar, SidebarUserName, SidebarUserEmail } from './SidebarUser';
25
26
  /**
26
27
  * Theme tokens used in this component:
@@ -111,6 +112,7 @@ declare const Sidebar: React.FC<SidebarProps> & {
111
112
  ItemLabel: typeof SidebarItemLabel;
112
113
  ItemBadge: typeof SidebarItemBadge;
113
114
  Footer: typeof SidebarFooter;
115
+ CollapseToggle: typeof SidebarCollapseToggle;
114
116
  User: typeof SidebarUser;
115
117
  UserAvatar: typeof SidebarUserAvatar;
116
118
  UserName: typeof SidebarUserName;
@@ -0,0 +1,50 @@
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 SidebarCollapseToggle component.
22
+ */
23
+ export interface SidebarCollapseToggleProps {
24
+ /** Toggles the sidebar; defaults to the AppShell action */
25
+ onToggle?: () => void;
26
+ /** Label when expanded */
27
+ collapseLabel?: string;
28
+ /** Tooltip when collapsed */
29
+ expandLabel?: string;
30
+ /** Icon when expanded */
31
+ collapseIcon?: React.ReactNode;
32
+ /** Icon when collapsed */
33
+ expandIcon?: React.ReactNode;
34
+ /** Additional sx props */
35
+ sx?: SxProps<Theme>;
36
+ }
37
+ /**
38
+ * SidebarCollapseToggle - Collapse control for the bottom of the sidebar.
39
+ *
40
+ * Place it in `Sidebar.Footer` so it stays in the same spot however long the nav gets.
41
+ *
42
+ * @example
43
+ * ```tsx
44
+ * <Sidebar.Footer>
45
+ * <Sidebar.CollapseToggle onToggle={toggle} />
46
+ * </Sidebar.Footer>
47
+ * ```
48
+ */
49
+ export declare const SidebarCollapseToggle: React.FC<SidebarCollapseToggleProps>;
50
+ export default SidebarCollapseToggle;
@@ -35,6 +35,8 @@ export { SidebarItemContext, SidebarItemProvider, useSidebarItemContext, } from
35
35
  export type { SidebarItemContextValue } from './SidebarItemContext';
36
36
  export { SidebarFooter } from './SidebarFooter';
37
37
  export type { SidebarFooterProps } from './SidebarFooter';
38
+ export { SidebarCollapseToggle } from './SidebarCollapseToggle';
39
+ export type { SidebarCollapseToggleProps } from './SidebarCollapseToggle';
38
40
  export { SidebarUser } from './SidebarUser';
39
41
  export type { SidebarUserProps } from './SidebarUser';
40
42
  export { SidebarUserAvatar } from './SidebarUserAvatar';
@@ -0,0 +1,28 @@
1
+ import * as React from 'react';
2
+ import { type TextFieldProps as MuiTextFieldProps } from '@mui/material/TextField';
3
+ /** `top` draws a static label above the field instead of MUI's floating label. */
4
+ export type TextFieldLabelPlacement = 'top';
5
+ export type TextFieldProps = MuiTextFieldProps & {
6
+ /** Leave unset for MUI's floating label; `top` draws a static label above the field. */
7
+ labelPlacement?: TextFieldLabelPlacement;
8
+ /** Appends "(Optional)" to the label; ignored without a label or on a `required` field. */
9
+ optional?: boolean;
10
+ };
11
+ /** MUI's TextField; with `labelPlacement="top"`, `ref` and layout props go to an outer FormControl. */
12
+ declare const TextField: React.ForwardRefExoticComponent<(Omit<import("@mui/material").FilledTextFieldProps & {
13
+ /** Leave unset for MUI's floating label; `top` draws a static label above the field. */
14
+ labelPlacement?: TextFieldLabelPlacement;
15
+ /** Appends "(Optional)" to the label; ignored without a label or on a `required` field. */
16
+ optional?: boolean;
17
+ }, "ref"> | Omit<import("@mui/material").OutlinedTextFieldProps & {
18
+ /** Leave unset for MUI's floating label; `top` draws a static label above the field. */
19
+ labelPlacement?: TextFieldLabelPlacement;
20
+ /** Appends "(Optional)" to the label; ignored without a label or on a `required` field. */
21
+ optional?: boolean;
22
+ }, "ref"> | Omit<import("@mui/material").StandardTextFieldProps & {
23
+ /** Leave unset for MUI's floating label; `top` draws a static label above the field. */
24
+ labelPlacement?: TextFieldLabelPlacement;
25
+ /** Appends "(Optional)" to the label; ignored without a label or on a `required` field. */
26
+ optional?: boolean;
27
+ }, "ref">) & React.RefAttributes<HTMLDivElement>>;
28
+ export default TextField;
@@ -0,0 +1,2 @@
1
+ export { default } from './TextField';
2
+ export * from './TextField';