@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
package/.ai/AGENTS.md CHANGED
@@ -54,7 +54,7 @@ import { DataGrid, DatePickers, TreeView } from '@wso2/oxygen-ui';
54
54
  - `OxygenTheme` - Default theme (recommended)
55
55
  - `AcrylicOrangeTheme` - Orange accent variant
56
56
  - `AcrylicPurpleTheme` - Purple accent variant
57
- - `ChoreoTheme` - Choreo product theme (indigo-violet gradient)
57
+ - `ChoreoLabsTheme` - Choreo Labs brand theme (Acrylic look with Choreo Labs colours and Sora font)
58
58
  - `ClassicTheme` - Traditional styling
59
59
  - `HighContrastTheme` - Accessibility-focused
60
60
  - `PaleBaseTheme` - Minimal color palette
@@ -65,11 +65,13 @@ import { DataGrid, DatePickers, TreeView } from '@wso2/oxygen-ui';
65
65
 
66
66
  - **Layout**: `AppShell`, `Layout`, `Header`, `Sidebar`, `Footer`, `PageContent`
67
67
  - **Data Display**: `ListingTable`, `PageTitle`, `CodeBlock`, `StatCard`
68
- - **Forms**: `Form.CardButton`, `Form.Section`, `Form.Stack`, `Form.Wizard`
68
+ - **Forms**: `Form.CardButton`, `Form.Section`, `Form.Stack`, `Form.Wizard`, `FullScreenWizard`
69
69
  - **Inputs**: `SearchBar`, `SearchBarWithAdvancedFilter`, `ComplexSelect`
70
70
  - **Feedback**: `NotificationPanel`, `NotificationBanner`
71
+ - **Panels**: `DrawerPanel`
71
72
  - **Theming**: `OxygenUIThemeProvider`, `ThemeSwitcher`, `ColorSchemeToggle`, `ColorSchemeImage`
72
73
  - **User**: `UserMenu`
74
+ - **Navigation**: `ContextSwitcher`
73
75
  - **Animations**: `ParticleBackground`
74
76
 
75
77
  ## Detailed Documentation
package/.ai/components.md CHANGED
@@ -12,8 +12,11 @@ Complete API reference for custom Oxygen UI components. For MUI components, refe
12
12
  - [Sidebar](#sidebar)
13
13
  - [Footer](#footer)
14
14
  - [UserMenu](#usermenu)
15
+ - [ContextSwitcher](#contextswitcher)
15
16
  - [AppSwitcher](#appswitcher)
16
17
  - [Form](#form)
18
+ - [FullScreenWizard](#fullscreenwizard)
19
+ - [DrawerPanel](#drawerpanel)
17
20
  - [NotificationPanel](#notificationpanel)
18
21
  - [NotificationBanner](#notificationbanner)
19
22
  - [ParticleBackground](#particlebackground)
@@ -554,6 +557,223 @@ interface WizardProps {
554
557
 
555
558
  ---
556
559
 
560
+ ## FullScreenWizard
561
+
562
+ Full-screen layout for create and onboarding flows: a progress bar, a header with a close button,
563
+ a scrolling content column with an actions footer, and an optional live preview beside the form.
564
+
565
+ ```tsx
566
+ import { FullScreenWizard, useWizardSteps } from '@wso2/oxygen-ui';
567
+ ```
568
+
569
+ ### Compound component
570
+
571
+ - `FullScreenWizard.Progress` — determinate progress bar or segments; leave it out for a single-step form
572
+ - `FullScreenWizard.Header` — `<header>` with the built-in close button, then breadcrumbs or a title
573
+ - `FullScreenWizard.Content` — scroll region holding the active step; `<main>` in page mode
574
+ - `FullScreenWizard.Footer` — actions row, under the step in the content column or as a full-width bar
575
+ - `FullScreenWizard.Preview` — `<aside>` side panel (live preview, step rail, tips); adding it switches to a split layout
576
+
577
+ The wizard is stateless: the consumer owns the steps, or uses `useWizardSteps`. It has no routing
578
+ and no product logic, so confirming a close or warning about unsaved changes happens in `onClose`.
579
+ Use it for flows that take over the screen; use `Form.Wizard` for a stepper inside a page, and a
580
+ regular `Dialog` for a short task that keeps the page in view.
581
+
582
+ ### FullScreenWizard Props
583
+
584
+ | Prop | Type | Default | Description |
585
+ |------|------|---------|-------------|
586
+ | `children` | `ReactNode` | required | Progress, Header, Content, Footer and an optional Preview |
587
+ | `onClose` | `() => void` | - | Called by the close button and, in modal mode, by `Esc`. No close button without it |
588
+ | `closeLabel` | `string` | `'Close'` | Accessible name of the close button |
589
+ | `modal` | `boolean` | `false` | Renders the wizard in MUI's full-screen `Dialog` |
590
+ | `open` | `boolean` | `false` | Whether the dialog is open (modal only) |
591
+ | `DialogProps` | `Partial<DialogProps>` | - | Extra props for the `Dialog` (modal only) |
592
+ | `aria-label` | `string` | - | Names the dialog in modal mode, the `main` region in page mode |
593
+ | `aria-labelledby` | `string` | - | Id of the element naming the wizard; wins over `aria-label` |
594
+ | `sx` | `SxProps<Theme>` | - | Additional styles for the root |
595
+
596
+ The root forwards its `ref` and passes other attributes (`id`, `className`, `data-*`) to its element.
597
+ Page mode fills `100dvh`. Every part forwards its `ref` and accepts `sx` and its element's attributes,
598
+ and the theme can restyle each slot through `components.MuiFullScreenWizard.styleOverrides`.
599
+
600
+ Parts are found by `displayName` among the wizard's children and inside fragments. A product
601
+ component that wraps a part must set the same `displayName` (for example
602
+ `'FullScreenWizard.Footer'`) and pass props such as `variant` or `position` through. Use one `Content`.
603
+
604
+ ### FullScreenWizard.Progress Props
605
+
606
+ | Prop | Type | Default | Description |
607
+ |------|------|---------|-------------|
608
+ | `value` | `number` | required | Progress from 0 to 100; clamped |
609
+ | `valueText` | `string` | - | Read in place of the percentage, e.g. `"Step 2 of 3"` |
610
+ | `progressLabel` | `string` | `'Progress'` | Accessible name of the bar |
611
+ | `variant` | `'bar' \| 'segmented'` | `'bar'` | `bar` is a thin full-width bar; `segmented` shows one segment per step, inset to line up with the header |
612
+ | `steps` | `number` | - | Number of segments in the `segmented` variant |
613
+
614
+ Other `LinearProgress` props are forwarded in the `bar` variant.
615
+
616
+ ### FullScreenWizard.Header Props
617
+
618
+ | Prop | Type | Default | Description |
619
+ |------|------|---------|-------------|
620
+ | `children` | `ReactNode` | - | Breadcrumbs, a title or a stepper, shown beside the close button |
621
+ | `closePosition` | `'start' \| 'end'` | `'start'` | Side of the header the close button sits on |
622
+ | `closeIcon` | `ReactNode` | `<X size={20} />` | Icon of the close button |
623
+ | `CloseButtonProps` | `Partial<IconButtonProps>` | - | Extra props for the close button (`size`, `color`, `sx`); its name and handler come from the wizard |
624
+ | `sx` | `SxProps<Theme>` | - | Additional styles |
625
+
626
+ ### FullScreenWizard.Content Props
627
+
628
+ | Prop | Type | Default | Description |
629
+ |------|------|---------|-------------|
630
+ | `component` | `ElementType` | `'main'` (page), `'div'` (modal) | Element the region renders as; `'div'` when the page already has a `main`, such as an `AppShell` |
631
+ | `maxWidth` | `Breakpoint \| number \| false` | `'md'` | Width cap of the content column; `xs` is at least 444px, as in `Container`; `false` fills the width |
632
+ | `align` | `'start' \| 'center'` | `'start'` | `start` keeps the column left-aligned; `center` centres it in both directions, for a welcome or picker screen |
633
+ | `focusKey` | `string \| number` | - | When it changes, focus moves to the region and it scrolls to the top |
634
+ | `sx` | `SxProps<Theme>` | - | Additional styles |
635
+
636
+ Content forwards its `ref`. It is a plain region inside the dialog in modal mode.
637
+
638
+ ### FullScreenWizard.Footer Props
639
+
640
+ | Prop | Type | Default | Description |
641
+ |------|------|---------|-------------|
642
+ | `sticky` | `boolean` | `false` | Pins the footer to the bottom of the scroll region for long forms |
643
+ | `variant` | `'inline' \| 'bar'` | `'inline'` | `inline` sits under the step in the content column; `bar` is a full-width bar along the bottom of the form column, outside the scroll |
644
+ | `sx` | `SxProps<Theme>` | - | Additional styles |
645
+
646
+ Actions are end-aligned; push a Back button to the start with `sx={{ mr: 'auto' }}`.
647
+
648
+ ### FullScreenWizard.Preview Props
649
+
650
+ | Prop | Type | Default | Description |
651
+ |------|------|---------|-------------|
652
+ | `hideBelow` | `Breakpoint \| false` | `'md'` | Hides the preview below this breakpoint; `false` always shows it |
653
+ | `position` | `'start' \| 'end'` | `'end'` | Side of the form the panel sits on; with a narrower `flexBasis` in `sx`, `start` makes a step rail |
654
+ | `previewLabel` | `string` | `'Preview'` | Accessible name of the `aside` |
655
+ | `sx` | `SxProps<Theme>` | - | Additional styles |
656
+
657
+ ### useWizardSteps
658
+
659
+ ```tsx
660
+ const wizard = useWizardSteps(['details', { id: 'access', skip: !needsAccess }, 'review'], {
661
+ initialStep: 'details',
662
+ });
663
+ // { activeStep, activeIndex, steps, count, isFirst, isLast, next, back, goTo, progress }
664
+ ```
665
+
666
+ Skipped steps are left out of navigation, `count` and `progress`. `next` and `back` clamp at the
667
+ ends, `goTo` ignores unknown and skipped ids, and if the active step becomes skipped the wizard
668
+ moves to the next visible step (or the previous one at the end). `progress` is
669
+ `(activeIndex + 1) / count * 100`.
670
+
671
+ ### Usage
672
+
673
+ ```tsx
674
+ import { AppBreadcrumbs, Button, FullScreenWizard, useWizardSteps } from '@wso2/oxygen-ui';
675
+
676
+ const wizard = useWizardSteps(['details', 'access', 'review']);
677
+
678
+ <FullScreenWizard onClose={handleClose} aria-label="Create project">
679
+ <FullScreenWizard.Progress
680
+ value={wizard.progress}
681
+ valueText={`Step ${wizard.activeIndex + 1} of ${wizard.count}`}
682
+ />
683
+ <FullScreenWizard.Header>
684
+ <AppBreadcrumbs items={breadcrumbs} />
685
+ </FullScreenWizard.Header>
686
+ <FullScreenWizard.Content focusKey={wizard.activeStep}>
687
+ {wizard.activeStep && stepContent[wizard.activeStep]}
688
+ </FullScreenWizard.Content>
689
+ <FullScreenWizard.Footer>
690
+ {!wizard.isFirst && (
691
+ <Button variant="outlined" onClick={wizard.back} sx={{ mr: 'auto' }}>Back</Button>
692
+ )}
693
+ <Button variant="contained" onClick={wizard.isLast ? handleCreate : wizard.next}>
694
+ {wizard.isLast ? 'Create' : 'Continue'}
695
+ </Button>
696
+ </FullScreenWizard.Footer>
697
+ <FullScreenWizard.Preview>{preview}</FullScreenWizard.Preview>
698
+ </FullScreenWizard>
699
+ ```
700
+
701
+ ### Keyboard & Accessibility
702
+
703
+ | Key | Behavior |
704
+ | --- | --- |
705
+ | `Tab` | Moves through the close button, the step's fields and the footer actions |
706
+ | `Enter` / `Space` | Activates the focused button |
707
+ | `Esc` | Calls `onClose` in modal mode |
708
+
709
+ - Landmarks: `header`, `main` (page mode, named by `aria-label`) and `aside` for the preview. Inside a page that already has a `main`, pass `component="div"` to Content.
710
+ - The close button is named (`closeLabel`); the progress bar has a label and `aria-valuetext`.
711
+ - Changing `focusKey` moves focus to the new step, so screen readers start there.
712
+ - Modal mode traps focus, locks page scroll, and names the dialog by `aria-label` or `aria-labelledby`.
713
+
714
+ ---
715
+
716
+ ## DrawerPanel
717
+
718
+ Slide-out side panel for item details or secondary tasks, with a title, optional expand button and close button.
719
+
720
+ ```tsx
721
+ import { DrawerPanel } from '@wso2/oxygen-ui';
722
+ ```
723
+
724
+ ### Sub-components
725
+
726
+ | Component | Description |
727
+ |-----------|-------------|
728
+ | `DrawerPanel.Header` | Top row with the title and action buttons only |
729
+ | `DrawerPanel.Title` | Panel heading with optional `icon`; names the drawer |
730
+ | `DrawerPanel.Actions` | Right-aligned header actions |
731
+ | `DrawerPanel.ExpandButton` | Toggles between `width` and `expandedWidth` (hidden on mobile) |
732
+ | `DrawerPanel.CloseButton` | Calls `onClose` (or its own `onClick`) |
733
+ | `DrawerPanel.Body` | Scrollable main content |
734
+ | `DrawerPanel.Footer` | Sticky footer for panel actions |
735
+
736
+ ### Props
737
+
738
+ | Prop | Type | Default | Description |
739
+ |------|------|---------|-------------|
740
+ | `open` | `boolean` | required | Panel visibility |
741
+ | `onClose` | `() => void` | required | Close handler |
742
+ | `width` | `number \| string` | `560` | Width on sm+ screens |
743
+ | `expandedWidth` | `number \| string` | `'100%'` | Width on sm+ screens while expanded |
744
+ | `expanded` | `boolean` | - | Controlled expanded state |
745
+ | `defaultExpanded` | `boolean` | `false` | Initial expanded state when uncontrolled |
746
+ | `onExpandedChange` | `(expanded: boolean) => void` | - | Called when the expand button toggles |
747
+ | `anchor` | `'left' \| 'right'` | `'right'` | Drawer side |
748
+ | `variant` | `'temporary' \| 'persistent'` | `'temporary'` | Drawer variant |
749
+ | `aria-label` | `string` | - | Accessible name when there is no `DrawerPanel.Title` |
750
+
751
+ ### Usage
752
+
753
+ ```tsx
754
+ <DrawerPanel open={open} onClose={() => setOpen(false)}>
755
+ <DrawerPanel.Header>
756
+ <DrawerPanel.Title icon={<ListTree size={20} />}>Build details</DrawerPanel.Title>
757
+ <DrawerPanel.Actions>
758
+ <DrawerPanel.ExpandButton />
759
+ <DrawerPanel.CloseButton />
760
+ </DrawerPanel.Actions>
761
+ </DrawerPanel.Header>
762
+ <DrawerPanel.Body>
763
+ <RelativeTime action="Triggered" time="about 1 hour ago" />
764
+ {/* content */}
765
+ </DrawerPanel.Body>
766
+ <DrawerPanel.Footer>
767
+ <Button variant="contained">Rerun build</Button>
768
+ </DrawerPanel.Footer>
769
+ </DrawerPanel>
770
+ ```
771
+
772
+ - Keep `CloseButton` rightmost; put extra icon actions (with `Tooltip` and `aria-label`) before `ExpandButton`
773
+ - Add `ExpandButton` only when content benefits from more room (logs, tables, diffs)
774
+
775
+ ---
776
+
557
777
  ## NotificationPanel
558
778
 
559
779
  Slide-out notification panel with tabs and compound component pattern.
@@ -675,6 +895,8 @@ import { SearchBar, SearchBarWithAdvancedFilter } from '@wso2/oxygen-ui';
675
895
  | `value` | `string` | - | Search input value |
676
896
  | `onChange` | `(value: string) => void` | - | Change handler |
677
897
  | `placeholder` | `string` | `'Search...'` | Placeholder text |
898
+ | `width` | `'auto' \| 'standard'` | `'auto'` | `'standard'` sizes search to 400px, shrinking in narrower containers. Use it for list and grid page search |
899
+ | `fullWidth` | `boolean` | `false` | Stretches search across its container. Takes precedence over `width` |
678
900
 
679
901
  ### SearchBarWithAdvancedFilter Props
680
902
 
@@ -1022,6 +1244,116 @@ import { UserIcon, SettingsIcon, LogOutIcon } from '@wso2/oxygen-ui-icons-react'
1022
1244
  </UserMenu>
1023
1245
  ```
1024
1246
 
1247
+ ## ContextSwitcher
1248
+
1249
+ Shows where a person is in a product's hierarchy, such as organization, project, and component, and lets them choose another place in it. It belongs in `Header.Switchers`.
1250
+
1251
+ ```tsx
1252
+ import { ContextSwitcher } from '@wso2/oxygen-ui';
1253
+ import type { ContextSwitcherValue } from '@wso2/oxygen-ui';
1254
+ ```
1255
+
1256
+ ### Compound component
1257
+
1258
+ - `ContextSwitcher.Level` — one named step in the hierarchy: a field, and the panel that picks its value
1259
+ - `ContextSwitcher.Group` — a labelled cluster of options inside a level's panel
1260
+ - `ContextSwitcher.Option` — one choice in a level's panel
1261
+
1262
+ The switcher is controlled. `value` maps each level `id` to the selected option `value`; a missing id is an empty level. The product routes from `onChange`.
1263
+
1264
+ Choosing a field opens its panel: a search box, then options and groups in the order they are written. Choosing an option opens the next level's panel. The same option keeps the levels under it; a different option clears them.
1265
+
1266
+ **Two variants:**
1267
+
1268
+ - **Chain** (default): the levels sit side by side with a slash between them. An empty level stays on screen as "Select project", in a quieter fill, and opens like any other level.
1269
+ - **Back** (`back`): only the current level is on screen, with Back in front of it in one bordered field. The current level is the deepest level with a selection, or the empty level whose options are open. Back clears the current level and steps up one level; the first level has no Back.
1270
+
1271
+ A name that does not fit ends in an ellipsis at 180px. Hovering it, focusing the field with the keyboard, or highlighting the option with the arrow keys shows the full text.
1272
+
1273
+ ### ContextSwitcher Props
1274
+
1275
+ | Prop | Type | Default | Description |
1276
+ |------|------|---------|-------------|
1277
+ | `value` | `ContextSwitcherValue` | required | Selected option value for each level id (`Record<string, string>`) |
1278
+ | `onChange` | `(value: ContextSwitcherValue) => void` | required | Called with the next map when the selection changes |
1279
+ | `back` | `boolean` | `false` | Show only the current level, with Back in front of it |
1280
+ | `children` | `ReactNode` | required | `ContextSwitcher.Level` elements, in order |
1281
+
1282
+ Other `div` props and `ref` are forwarded to the root.
1283
+
1284
+ ### ContextSwitcher.Level Props
1285
+
1286
+ | Prop | Type | Default | Description |
1287
+ |------|------|---------|-------------|
1288
+ | `id` | `string` | required | Key used in the `value` map |
1289
+ | `label` | `string` | required | Name shown on the field, such as `"Organization"` |
1290
+ | `loading` | `boolean` | `false` | The panel shows a progress indicator instead of the options |
1291
+ | `searchPlaceholder` | `string` | `'Search'` | Placeholder in the panel search box |
1292
+ | `searchLabel` | `string` | `` `Search ${label}` `` | Accessible name of the search box |
1293
+ | `noOptionsText` | `string` | `'No options'` | Shown when the level has no options |
1294
+ | `noMatchesText` | `string` | `'No matches'` | Shown when the search matches nothing |
1295
+ | `loadingLabel` | `string` | `` `Loading ${label}` `` | Accessible name of the progress indicator |
1296
+ | `promptText` | `string` | `` `Select ${label}` `` | Shown on the field while the level has no selection |
1297
+ | `backLabel` | `string` | `` `Go to the ${label} level` `` | Name of the Back control that returns to this level |
1298
+ | `children` | `ReactNode` | - | Options and groups, in the order they should appear |
1299
+
1300
+ ### ContextSwitcher.Group Props
1301
+
1302
+ | Prop | Type | Default | Description |
1303
+ |------|------|---------|-------------|
1304
+ | `label` | `string` | required | Visible heading and accessible name of the group |
1305
+ | `children` | `ReactNode` | required | `ContextSwitcher.Option` elements |
1306
+
1307
+ The group is omitted when search filters out all of its options.
1308
+
1309
+ ### ContextSwitcher.Option Props
1310
+
1311
+ | Prop | Type | Default | Description |
1312
+ |------|------|---------|-------------|
1313
+ | `value` | `string` | required | Value written into the `value` map when picked |
1314
+ | `disabled` | `boolean` | `false` | Shown, but cannot be picked |
1315
+ | `children` | `ReactNode` | required | Label; search filters this text |
1316
+
1317
+ ### Type Exports
1318
+
1319
+ `ContextSwitcherProps`, `ContextSwitcherValue`, `ContextSwitcherLevelProps`, `ContextSwitcherGroupProps`, `ContextSwitcherOptionProps`
1320
+
1321
+ ### Usage
1322
+
1323
+ ```tsx
1324
+ import { ContextSwitcher, Header } from '@wso2/oxygen-ui';
1325
+ import type { ContextSwitcherValue } from '@wso2/oxygen-ui';
1326
+
1327
+ const [value, setValue] = useState<ContextSwitcherValue>({
1328
+ organization: 'wso2',
1329
+ project: 'finance-web',
1330
+ });
1331
+
1332
+ <Header.Switchers>
1333
+ <ContextSwitcher value={value} onChange={setValue}>
1334
+ <ContextSwitcher.Level id="organization" label="Organization">
1335
+ <ContextSwitcher.Option value="personal">Personal</ContextSwitcher.Option>
1336
+ <ContextSwitcher.Group label="Invited organizations">
1337
+ <ContextSwitcher.Option value="wso2">WSO2</ContextSwitcher.Option>
1338
+ <ContextSwitcher.Option value="demo">Demo Organization</ContextSwitcher.Option>
1339
+ </ContextSwitcher.Group>
1340
+ </ContextSwitcher.Level>
1341
+ <ContextSwitcher.Level id="project" label="Project" loading={projectsLoading}>
1342
+ {projects.map((project) => (
1343
+ <ContextSwitcher.Option key={project.id} value={project.id}>
1344
+ {project.name}
1345
+ </ContextSwitcher.Option>
1346
+ ))}
1347
+ </ContextSwitcher.Level>
1348
+ </ContextSwitcher>
1349
+ </Header.Switchers>
1350
+
1351
+ // One level with Back
1352
+ <ContextSwitcher back value={value} onChange={setValue}>
1353
+ {/* same levels */}
1354
+ </ContextSwitcher>
1355
+ ```
1356
+
1025
1357
  ## AppSwitcher
1026
1358
 
1027
1359
  Popover for navigating between WSO2 Cloud platforms.
package/.ai/patterns.md CHANGED
@@ -429,7 +429,7 @@ function DashboardCharts() {
429
429
 
430
430
  ```tsx
431
431
  import { useState, useMemo } from 'react';
432
- import { ListingTable, Button, IconButton, Chip } from '@wso2/oxygen-ui';
432
+ import { ListingTable, Button, IconButton, Chip, PageTitle } from '@wso2/oxygen-ui';
433
433
  import { EditIcon, TrashIcon, MoreVerticalIcon } from '@wso2/oxygen-ui-icons-react';
434
434
 
435
435
  interface User {
@@ -476,6 +476,14 @@ function UsersTable({ users }: { users: User[] }) {
476
476
  );
477
477
 
478
478
  return (
479
+ <>
480
+ {/* The primary action goes in the page header, not the table toolbar */}
481
+ <PageTitle>
482
+ <PageTitle.Header>Users</PageTitle.Header>
483
+ <PageTitle.Actions>
484
+ <Button variant="contained">Add user</Button>
485
+ </PageTitle.Actions>
486
+ </PageTitle>
479
487
  <ListingTable.Provider
480
488
  searchValue={search}
481
489
  onSearchChange={setSearch}
@@ -495,11 +503,6 @@ function UsersTable({ users }: { users: User[] }) {
495
503
  <ListingTable.Toolbar
496
504
  showSearch
497
505
  searchPlaceholder="Search users..."
498
- actions={
499
- <Button variant="contained" size="small">
500
- Add User
501
- </Button>
502
- }
503
506
  />
504
507
 
505
508
  <ListingTable>
@@ -554,6 +557,7 @@ function UsersTable({ users }: { users: User[] }) {
554
557
  </ListingTable>
555
558
  </ListingTable.Container>
556
559
  </ListingTable.Provider>
560
+ </>
557
561
  );
558
562
  }
559
563
  ```
@@ -1140,7 +1144,7 @@ import {
1140
1144
  OxygenTheme,
1141
1145
  AcrylicOrangeTheme,
1142
1146
  AcrylicPurpleTheme,
1143
- ChoreoTheme,
1147
+ ChoreoLabsTheme,
1144
1148
  ClassicTheme,
1145
1149
  HighContrastTheme,
1146
1150
  PaleBaseTheme,
@@ -1155,7 +1159,7 @@ const themes = [
1155
1159
  { key: 'default', label: 'Default', theme: OxygenTheme },
1156
1160
  { key: 'orange', label: 'Acrylic Orange', theme: AcrylicOrangeTheme },
1157
1161
  { key: 'purple', label: 'Acrylic Purple', theme: AcrylicPurpleTheme },
1158
- { key: 'choreo', label: 'Choreo', theme: ChoreoTheme },
1162
+ { key: 'choreoLabs', label: 'Choreo Labs', theme: ChoreoLabsTheme },
1159
1163
  { key: 'classic', label: 'Classic', theme: ClassicTheme },
1160
1164
  { key: 'highContrast', label: 'High Contrast', theme: HighContrastTheme },
1161
1165
  { key: 'paleBase', label: 'Pale Base', theme: PaleBaseTheme },
package/.ai/theming.md CHANGED
@@ -17,7 +17,7 @@
17
17
  | OxygenTheme | `OxygenTheme` | Default theme (Acrylic Base) |
18
18
  | Acrylic Orange | `AcrylicOrangeTheme` | Glass-morphism effects, orange primary |
19
19
  | Acrylic Purple | `AcrylicPurpleTheme` | Glass-morphism with purple accents |
20
- | Choreo | `ChoreoTheme` | Choreo product theme (indigo-violet gradient) |
20
+ | Choreo Labs | `ChoreoLabsTheme` | Choreo Labs brand theme (Acrylic look with Choreo Labs colours and Sora font) |
21
21
  | Classic | `ClassicTheme` | Standard flat design |
22
22
  | High Contrast | `HighContrastTheme` | Accessibility-focused with high contrast colors |
23
23
  | Pale Base | `PaleBaseTheme` | Minimal color palette for subtle interfaces |
@@ -29,7 +29,7 @@ import {
29
29
  OxygenTheme,
30
30
  AcrylicOrangeTheme,
31
31
  AcrylicPurpleTheme,
32
- ChoreoTheme,
32
+ ChoreoLabsTheme,
33
33
  ClassicTheme,
34
34
  HighContrastTheme,
35
35
  PaleBaseTheme,
@@ -67,7 +67,7 @@ import {
67
67
  OxygenTheme,
68
68
  AcrylicOrangeTheme,
69
69
  AcrylicPurpleTheme,
70
- ChoreoTheme,
70
+ ChoreoLabsTheme,
71
71
  ClassicTheme,
72
72
  HighContrastTheme,
73
73
  PaleBaseTheme,
@@ -80,7 +80,7 @@ import {
80
80
  { key: 'default', label: 'Default', theme: OxygenTheme },
81
81
  { key: 'orange', label: 'Acrylic Orange', theme: AcrylicOrangeTheme },
82
82
  { key: 'purple', label: 'Acrylic Purple', theme: AcrylicPurpleTheme },
83
- { key: 'choreo', label: 'Choreo', theme: ChoreoTheme },
83
+ { key: 'choreoLabs', label: 'Choreo Labs', theme: ChoreoLabsTheme },
84
84
  { key: 'classic', label: 'Classic', theme: ClassicTheme },
85
85
  { key: 'highContrast', label: 'High Contrast', theme: HighContrastTheme },
86
86
  { key: 'paleBase', label: 'Pale Base', theme: PaleBaseTheme },