@wso2/oxygen-ui 0.26.0 → 0.27.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 (55) hide show
  1. package/.ai/components.md +32 -33
  2. package/.claude/components.md +32 -33
  3. package/.claude/skills/oxygen-layout/SKILL.md +1 -1
  4. package/.claude/skills/oxygen-migrate/SKILL.md +1 -1
  5. package/dist/components/AppShell/AppShell.d.ts +1 -1
  6. package/dist/components/AppShell/AppShellFooter.d.ts +1 -1
  7. package/dist/components/AppSwitcher/AppSwitcher.d.ts +12 -9
  8. package/dist/components/AppSwitcher/AppSwitcherApp.d.ts +19 -10
  9. package/dist/components/AppSwitcher/AppSwitcherFooter.d.ts +6 -6
  10. package/dist/components/AppSwitcher/AppSwitcherSection.d.ts +21 -7
  11. package/dist/components/AppSwitcher/AppSwitcherTrigger.d.ts +1 -1
  12. package/dist/components/Button/Button.d.ts +19 -0
  13. package/dist/components/Button/index.d.ts +2 -0
  14. package/dist/components/ContextSwitcher/ContextSwitcher.d.ts +1 -1
  15. package/dist/components/Footer/FooterLink.d.ts +6 -2
  16. package/dist/components/HeaderBreadcrumbs/persistence.d.ts +1 -1
  17. package/dist/components/HeaderBreadcrumbs/useHeaderBreadcrumbs.d.ts +1 -1
  18. package/dist/components/StatusIllustration/StatusIllustration.d.ts +49 -0
  19. package/dist/components/StatusIllustration/illustrationStyles.d.ts +212 -0
  20. package/dist/components/StatusIllustration/illustrations/FailedIllustration.d.ts +3 -0
  21. package/dist/components/StatusIllustration/illustrations/Http200Illustration.d.ts +3 -0
  22. package/dist/components/StatusIllustration/illustrations/Http201Illustration.d.ts +3 -0
  23. package/dist/components/StatusIllustration/illustrations/Http204Illustration.d.ts +3 -0
  24. package/dist/components/StatusIllustration/illustrations/Http301Illustration.d.ts +3 -0
  25. package/dist/components/StatusIllustration/illustrations/Http302Illustration.d.ts +3 -0
  26. package/dist/components/StatusIllustration/illustrations/Http304Illustration.d.ts +3 -0
  27. package/dist/components/StatusIllustration/illustrations/Http400Illustration.d.ts +3 -0
  28. package/dist/components/StatusIllustration/illustrations/Http401Illustration.d.ts +3 -0
  29. package/dist/components/StatusIllustration/illustrations/Http403Illustration.d.ts +3 -0
  30. package/dist/components/StatusIllustration/illustrations/Http404Illustration.d.ts +3 -0
  31. package/dist/components/StatusIllustration/illustrations/Http405Illustration.d.ts +3 -0
  32. package/dist/components/StatusIllustration/illustrations/Http408Illustration.d.ts +3 -0
  33. package/dist/components/StatusIllustration/illustrations/Http409Illustration.d.ts +3 -0
  34. package/dist/components/StatusIllustration/illustrations/Http422Illustration.d.ts +3 -0
  35. package/dist/components/StatusIllustration/illustrations/Http429Illustration.d.ts +3 -0
  36. package/dist/components/StatusIllustration/illustrations/Http500Illustration.d.ts +3 -0
  37. package/dist/components/StatusIllustration/illustrations/Http502Illustration.d.ts +3 -0
  38. package/dist/components/StatusIllustration/illustrations/Http503Illustration.d.ts +3 -0
  39. package/dist/components/StatusIllustration/illustrations/Http504Illustration.d.ts +3 -0
  40. package/dist/components/StatusIllustration/illustrations/MailSentIllustration.d.ts +3 -0
  41. package/dist/components/StatusIllustration/illustrations/NoRecordsIllustration.d.ts +3 -0
  42. package/dist/components/StatusIllustration/illustrations/UnsuccessfulIllustration.d.ts +3 -0
  43. package/dist/components/StatusIllustration/illustrations/index.d.ts +12 -0
  44. package/dist/components/StatusIllustration/index.d.ts +2 -0
  45. package/dist/components/StatusIllustration/types.d.ts +2 -0
  46. package/dist/components/StatusIllustration/useIllustrationId.d.ts +5 -0
  47. package/dist/components/TimeRangeFilter/TimeRangeFilter.d.ts +3 -2
  48. package/dist/components/TrialBadge/TrialBadge.d.ts +8 -8
  49. package/dist/components/index.d.ts +4 -0
  50. package/dist/index.d.ts +3 -2
  51. package/dist/index.js +2583 -1155
  52. package/dist/index.js.map +4 -4
  53. package/dist/styles/OxygenThemeBase.d.ts +150 -0
  54. package/package.json +2 -2
  55. package/dist/components/AppSwitcher/brand.d.ts +0 -49
@@ -65,9 +65,22 @@ declare module '@mui/material/styles' {
65
65
  * that is neither good nor bad). Use it for text, outlines and light tints, not for solid fills.
66
66
  */
67
67
  blue: Palette['primary'];
68
+ /**
69
+ * A violet-to-blue gradient for the `gradient` Button color, used to set apart AI features such as
70
+ * an assistant. `start` and `end` are the gradient stops; `main` is a solid midpoint for anything
71
+ * that needs a single color, such as an icon.
72
+ */
73
+ gradient: Palette['primary'] & {
74
+ start: string;
75
+ end: string;
76
+ };
68
77
  }
69
78
  interface PaletteOptions {
70
79
  blue?: PaletteOptions['primary'];
80
+ gradient?: PaletteOptions['primary'] & {
81
+ start?: string;
82
+ end?: string;
83
+ };
71
84
  }
72
85
  interface ThemeOptions extends Partial<CustomThemeProperties> {
73
86
  }
@@ -91,8 +104,145 @@ declare module '@mui/material/Chip' {
91
104
  blue: true;
92
105
  }
93
106
  }
107
+ declare module '@mui/material/Button' {
108
+ interface ButtonPropsColorOverrides {
109
+ gradient: true;
110
+ }
111
+ }
94
112
  export interface OxygenTheme extends Theme {
95
113
  vars: NonNullable<Theme['vars']>;
96
114
  }
115
+ /** Class the Oxygen `Button` adds for `animated`; the theme animates gradient buttons that carry it. */
116
+ export declare const GRADIENT_ANIMATED_CLASS = "OxygenButton-animated";
117
+ /** Registered custom property the circling outline rotates through (see the Oxygen `Button`). */
118
+ export declare const GRADIENT_ANGLE_PROPERTY = "--oxygen-gradient-angle";
119
+ /**
120
+ * Styles for the `gradient` Button color, in every variant:
121
+ * - `contained` - the gradient as the fill
122
+ * - `outlined` - a gradient outline around a transparent fill, as for an AI assistant entry point
123
+ * - `text` - gradient label text
124
+ *
125
+ * The outline is drawn by a masked pseudo-element rather than `border-image`, which cannot follow the
126
+ * pill radius, so the fill stays transparent on any surface. Icons take the solid `main` color, since
127
+ * an SVG stroke cannot take a CSS gradient. Exported so themes that define their own Button variants
128
+ * can keep these.
129
+ */
130
+ export declare const gradientButtonVariants: ({
131
+ props: {
132
+ variant: "contained";
133
+ color: "gradient";
134
+ };
135
+ style: ({ theme }: {
136
+ theme: Theme;
137
+ }) => {
138
+ "&.Mui-disabled, &.Mui-disabled.OxygenButton-animated": {
139
+ backgroundImage: string;
140
+ filter: string;
141
+ animation: string;
142
+ };
143
+ "&.OxygenButton-animated": {
144
+ backgroundImage: string;
145
+ backgroundSize: string;
146
+ animation: string;
147
+ };
148
+ '@media (prefers-reduced-motion: reduce)': {
149
+ "&.OxygenButton-animated": {
150
+ animation: string;
151
+ };
152
+ };
153
+ backgroundImage: string;
154
+ color: string;
155
+ '&:hover, &.Mui-focusVisible, &:active': {
156
+ backgroundImage: string;
157
+ color: string;
158
+ filter: string;
159
+ };
160
+ };
161
+ } | {
162
+ props: {
163
+ variant: "outlined";
164
+ color: "gradient";
165
+ };
166
+ style: ({ theme }: {
167
+ theme: Theme;
168
+ }) => {
169
+ position: "relative";
170
+ borderColor: string;
171
+ backgroundColor: string;
172
+ color: string;
173
+ '&::before': {
174
+ content: string;
175
+ position: "absolute";
176
+ inset: number;
177
+ borderRadius: string;
178
+ padding: number;
179
+ background: string;
180
+ WebkitMask: string;
181
+ WebkitMaskComposite: string;
182
+ maskComposite: string;
183
+ pointerEvents: "none";
184
+ };
185
+ '& .MuiButton-startIcon, & .MuiButton-endIcon': {
186
+ color: string;
187
+ };
188
+ '&:hover, &.Mui-focusVisible, &:active': {
189
+ borderColor: string;
190
+ color: string;
191
+ backgroundColor: string;
192
+ };
193
+ "&.OxygenButton-animated::before": {
194
+ background: string;
195
+ animation: string;
196
+ };
197
+ '@media (prefers-reduced-motion: reduce)': {
198
+ "&.OxygenButton-animated::before": {
199
+ animation: string;
200
+ };
201
+ };
202
+ '&.Mui-disabled::before': {
203
+ opacity: number;
204
+ animation: string;
205
+ };
206
+ };
207
+ } | {
208
+ props: {
209
+ variant: "text";
210
+ color: "gradient";
211
+ };
212
+ style: ({ theme }: {
213
+ theme: Theme;
214
+ }) => {
215
+ color: string;
216
+ '& .MuiButton-startIcon, & .MuiButton-endIcon': {
217
+ color: string;
218
+ };
219
+ '@supports (background-clip: text)': {
220
+ "&.OxygenButton-animated": {
221
+ backgroundImage: string;
222
+ backgroundSize: string;
223
+ animation: string;
224
+ };
225
+ '@media (prefers-reduced-motion: reduce)': {
226
+ "&.OxygenButton-animated": {
227
+ animation: string;
228
+ };
229
+ };
230
+ backgroundImage: string;
231
+ backgroundClip: string;
232
+ WebkitBackgroundClip: string;
233
+ WebkitTextFillColor: string;
234
+ };
235
+ '&:hover, &.Mui-focusVisible': {
236
+ backgroundColor: string;
237
+ filter: string;
238
+ };
239
+ "&.Mui-disabled, &.Mui-disabled.OxygenButton-animated": {
240
+ backgroundImage: string;
241
+ WebkitTextFillColor: string;
242
+ filter: string;
243
+ animation: string;
244
+ };
245
+ };
246
+ })[];
97
247
  declare const _default: OxygenTheme;
98
248
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wso2/oxygen-ui",
3
- "version": "0.26.0",
3
+ "version": "0.27.0",
4
4
  "description": "Choreo Oxygen UI | Design System - Powered with Material-UI component library with TypeScript support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -86,7 +86,7 @@
86
86
  "@typescript-eslint/parser": "8.45.0",
87
87
  "@vitest/ui": "4.0.6",
88
88
  "@wso2/esbuild-plugin-inline-css-fonts": "^0.0.1",
89
- "@wso2/oxygen-ui-icons-react": "^0.26.0",
89
+ "@wso2/oxygen-ui-icons-react": "^0.27.0",
90
90
  "esbuild": "0.25.11",
91
91
  "eslint": "9.12.0",
92
92
  "eslint-plugin-react": "7.37.5",
@@ -1,49 +0,0 @@
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
- /**
19
- * WSO2 brand colors used by the AppSwitcher.
20
- *
21
- * These are deliberately fixed rather than read from `palette.primary`: the
22
- * switcher is WSO2 Cloud chrome, so it shows the brand orange even in a product
23
- * running an indigo or grey theme.
24
- *
25
- * Contrast (WCAG 2.1 AA needs 4.5:1 for normal text): `main` (#FF7300) is
26
- * 2.73:1 on white, so it is used only for decorative surfaces — the WSO2 mark
27
- * and the hover border. Any brand-colored *text* would need a darker shade;
28
- * the switcher has none.
29
- *
30
- * The focus indicator is author-defined, so WCAG 2.1 SC 1.4.11 holds it to
31
- * 3:1 against the adjacent surface. `main` misses that, so `focus` (#E56800)
32
- * carries the ring instead: 3.33:1 on the light card (#FFFFFF) and 5.63:1 on
33
- * the dark one (#121212). The current app's border needs the same 3:1.
34
- *
35
- * See https://github.com/wso2/oxygen-ui/issues/558 for the palette-wide
36
- * contrast discussion.
37
- */
38
- export declare const APP_SWITCHER_BRAND: {
39
- /** Full-strength WSO2 orange. Decorative surfaces only. */
40
- readonly main: "#FF7300";
41
- /**
42
- * Darker orange reserved for the focus ring and the current app's border,
43
- * where 3:1 against the card surface is required. Do not swap it back to
44
- * `main`.
45
- */
46
- readonly focus: "#E56800";
47
- /** Faded orange for the mark of a platform that is not yet available. */
48
- readonly surfaceMark: "#FFC199";
49
- };