@wso2/oxygen-ui 0.12.1 → 0.13.1

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/dist/index.js CHANGED
@@ -188,6 +188,37 @@ var init_OxygenThemeBase = __esm({
188
188
  }
189
189
  },
190
190
  components: {
191
+ MuiAccordionSummary: {
192
+ defaultProps: {
193
+ expandIcon: React.createElement(ChevronDown)
194
+ },
195
+ styleOverrides: {
196
+ root: ({ theme }) => ({
197
+ fontWeight: theme.typography.fontWeightMedium,
198
+ "& .MuiTypography-root": {
199
+ fontWeight: theme.typography.fontWeightMedium
200
+ },
201
+ "&:hover:not(.Mui-disabled)": {
202
+ backgroundColor: (theme.vars || theme).palette.action.hover,
203
+ cursor: "pointer"
204
+ }
205
+ })
206
+ }
207
+ },
208
+ MuiCssBaseline: {
209
+ styleOverrides: {
210
+ // Honor the user's OS-level reduced-motion preference (WCAG 2.3.3):
211
+ // collapse all CSS animations/transitions to near-instant.
212
+ "@media (prefers-reduced-motion: reduce)": {
213
+ "*, *::before, *::after": {
214
+ animationDuration: "0.01ms !important",
215
+ animationIterationCount: "1 !important",
216
+ transitionDuration: "0.01ms !important",
217
+ scrollBehavior: "auto !important"
218
+ }
219
+ }
220
+ }
221
+ },
191
222
  MuiAutocomplete: {
192
223
  defaultProps: {
193
224
  popupIcon: React.createElement(ChevronDown),
@@ -274,12 +305,13 @@ var init_OxygenThemeBase = __esm({
274
305
  light: {
275
306
  background: "#f5f5f5",
276
307
  text: "#24292e",
277
- comment: "#6a737d",
278
- keyword: "#d73a49",
308
+ // Darkened from GitHub-light defaults to meet WCAG AA 4.5:1 contrast on #f5f5f5
309
+ comment: "#57606a",
310
+ keyword: "#cf222e",
279
311
  string: "#032f62",
280
312
  function: "#6f42c1",
281
313
  number: "#005cc5",
282
- operator: "#d73a49"
314
+ operator: "#cf222e"
283
315
  },
284
316
  dark: {
285
317
  background: "#1e1e1e",
@@ -324,6 +356,27 @@ var init_createOxygenTheme = __esm({
324
356
  if (typeof document !== "undefined") {
325
357
  const style = document.createElement("style");
326
358
  style.setAttribute("data-oxygen-fonts", "true");
359
+ let nonce;
360
+ try {
361
+ if (typeof __webpack_nonce__ !== "undefined" && __webpack_nonce__) {
362
+ nonce = __webpack_nonce__;
363
+ } else {
364
+ const viteMeta = document.querySelector('meta[property="csp-nonce"]');
365
+ if (viteMeta) {
366
+ nonce = viteMeta.nonce || viteMeta.getAttribute("nonce") || viteMeta.getAttribute("content");
367
+ }
368
+ if (!nonce) {
369
+ const muiMeta = document.querySelector('meta[name="csp-nonce"]');
370
+ if (muiMeta) {
371
+ nonce = muiMeta.getAttribute("content");
372
+ }
373
+ }
374
+ }
375
+ } catch (e) {
376
+ }
377
+ if (nonce) {
378
+ style.setAttribute("nonce", nonce);
379
+ }
327
380
  style.textContent = `/**
328
381
  * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
329
382
  *
@@ -419,7 +472,7 @@ var init_createOxygenTheme = __esm({
419
472
  // package.json
420
473
  var package_default = {
421
474
  name: "@wso2/oxygen-ui",
422
- version: "0.12.1",
475
+ version: "0.13.1",
423
476
  description: "WSO2 Oxygen UI | Design System - Powered with Material-UI component library with TypeScript support",
424
477
  type: "module",
425
478
  main: "./dist/index.js",
@@ -460,7 +513,7 @@ var package_default = {
460
513
  lint: "eslint src",
461
514
  "lint:fix": "eslint src --fix",
462
515
  clean: "rimraf dist",
463
- test: "vitest run --passWithNoTests",
516
+ test: "vitest run",
464
517
  "test:watch": "vitest"
465
518
  },
466
519
  keywords: [
@@ -485,6 +538,7 @@ var package_default = {
485
538
  },
486
539
  homepage: "https://github.com/wso2/oxygen-ui#readme",
487
540
  dependencies: {
541
+ "@emotion/cache": "catalog:",
488
542
  "@emotion/react": "catalog:",
489
543
  "@emotion/styled": "catalog:",
490
544
  "@fontsource-variable/inter": "5.2.8",
@@ -503,6 +557,8 @@ var package_default = {
503
557
  },
504
558
  devDependencies: {
505
559
  "@eslint/js": "catalog:",
560
+ "@testing-library/dom": "catalog:",
561
+ "@testing-library/react": "catalog:",
506
562
  "@types/prismjs": "^1.26.5",
507
563
  "@types/react": "catalog:",
508
564
  "@types/react-dom": "catalog:",
@@ -515,6 +571,7 @@ var package_default = {
515
571
  eslint: "catalog:",
516
572
  "eslint-plugin-react": "catalog:",
517
573
  "eslint-plugin-react-hooks": "catalog:",
574
+ jsdom: "catalog:",
518
575
  rimraf: "catalog:",
519
576
  typescript: "catalog:",
520
577
  vite: "catalog:",
@@ -1871,7 +1928,9 @@ var WSO2Theme_default = WSO2Theme;
1871
1928
  // src/contexts/OxygenUIThemeProvider/OxygenUIThemeProvider.tsx
1872
1929
  import { ThemeProvider, StyledEngineProvider } from "@mui/material/styles";
1873
1930
  import { CssBaseline } from "@mui/material";
1874
- import { createContext, useContext, useState, useEffect } from "react";
1931
+ import { CacheProvider } from "@emotion/react";
1932
+ import createCache from "@emotion/cache";
1933
+ import { createContext, useContext, useState, useEffect, useMemo } from "react";
1875
1934
  import { jsx, jsxs } from "react/jsx-runtime";
1876
1935
  var THEME_STORAGE_KEY = "oxygen-theme";
1877
1936
  var defaultThemes = [
@@ -1959,11 +2018,22 @@ function OxygenUIThemeProvider({
1959
2018
  theme,
1960
2019
  themes,
1961
2020
  initialTheme,
1962
- onThemesLoaded
2021
+ onThemesLoaded,
2022
+ nonce,
2023
+ emotionCache
1963
2024
  }) {
1964
2025
  var _a, _b;
1965
2026
  const [resolvedThemes, setResolvedThemes] = useState([]);
1966
2027
  const [themesLoaded, setThemesLoaded] = useState(false);
2028
+ const styleCache = useMemo(() => {
2029
+ if (emotionCache) {
2030
+ return emotionCache;
2031
+ }
2032
+ if (nonce) {
2033
+ return createCache({ key: "css", nonce, prepend: true });
2034
+ }
2035
+ return null;
2036
+ }, [emotionCache, nonce]);
1967
2037
  useEffect(() => {
1968
2038
  const allThemes = themes || defaultThemes;
1969
2039
  const themesToLoad = allThemes.filter((t) => typeof t.theme === "string");
@@ -2049,26 +2119,28 @@ function OxygenUIThemeProvider({
2049
2119
  if (useThemeSwitching && !themesLoaded) {
2050
2120
  return null;
2051
2121
  }
2052
- const content = /* @__PURE__ */ jsx(StyledEngineProvider, { injectFirst: true, children: /* @__PURE__ */ jsxs(ThemeProvider, { theme: resolvedTheme, children: [
2122
+ const themedContent = /* @__PURE__ */ jsxs(ThemeProvider, { theme: resolvedTheme, children: [
2053
2123
  /* @__PURE__ */ jsx(CssBaseline, { enableColorScheme: true }),
2054
2124
  children
2055
- ] }) });
2125
+ ] });
2126
+ const content = styleCache ? /* @__PURE__ */ jsx(CacheProvider, { value: styleCache, children: themedContent }) : /* @__PURE__ */ jsx(StyledEngineProvider, { injectFirst: true, children: themedContent });
2056
2127
  if (useThemeSwitching) {
2057
2128
  return /* @__PURE__ */ jsx(ThemeSwitcherContext.Provider, { value: contextValue, children: content });
2058
2129
  }
2059
2130
  return content;
2060
2131
  }
2061
2132
 
2133
+ // src/contexts/index.ts
2134
+ import { default as default2 } from "@emotion/cache";
2135
+
2062
2136
  // src/components/AppBreadcrumbs/AppBreadcrumbs.tsx
2063
2137
  import Breadcrumbs from "@mui/material/Breadcrumbs";
2138
+ import Menu from "@mui/material/Menu";
2064
2139
  import MenuItem from "@mui/material/MenuItem";
2065
- import MenuList from "@mui/material/MenuList";
2066
- import Paper from "@mui/material/Paper";
2067
- import Popper from "@mui/material/Popper";
2068
2140
  import Typography from "@mui/material/Typography";
2069
2141
  import { styled } from "@mui/material/styles";
2070
2142
  import { ChevronRight } from "@wso2/oxygen-ui-icons-react";
2071
- import { useEffect as useEffect2, useRef, useState as useState2 } from "react";
2143
+ import { useId, useState as useState2 } from "react";
2072
2144
  import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
2073
2145
  var AppBreadcrumbsRoot = styled("div", {
2074
2146
  name: "MuiAppBreadcrumbs",
@@ -2080,63 +2152,68 @@ var AppBreadcrumbsRoot = styled("div", {
2080
2152
  var AppBreadcrumbsItem = styled(Typography, {
2081
2153
  name: "MuiAppBreadcrumbs",
2082
2154
  slot: "Item"
2083
- })(
2084
- ({ theme, ownerState }) => {
2085
- var _a, _b, _c, _d, _e, _f;
2086
- return ownerState.isLast ? {
2155
+ })(({ theme, ownerState }) => {
2156
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
2157
+ if (ownerState.isLast) {
2158
+ return {
2087
2159
  whiteSpace: "nowrap",
2088
- color: (_b = (_a = theme.vars) == null ? void 0 : _a.palette.text.primary) != null ? _b : theme.palette.text.primary
2089
- } : {
2090
- cursor: "pointer",
2160
+ textDecoration: "none",
2161
+ color: (_b = (_a = theme.vars) == null ? void 0 : _a.palette.text.primary) != null ? _b : theme.palette.text.primary,
2162
+ "&:hover": {
2163
+ textDecoration: "none",
2164
+ color: (_d = (_c = theme.vars) == null ? void 0 : _c.palette.text.primary) != null ? _d : theme.palette.text.primary
2165
+ }
2166
+ };
2167
+ }
2168
+ if (!ownerState.isClickable) {
2169
+ return {
2091
2170
  whiteSpace: "nowrap",
2092
- color: (_d = (_c = theme.vars) == null ? void 0 : _c.palette.text.secondary) != null ? _d : theme.palette.text.secondary,
2171
+ textDecoration: "none",
2172
+ color: (_f = (_e = theme.vars) == null ? void 0 : _e.palette.text.disabled) != null ? _f : theme.palette.text.disabled,
2173
+ fontStyle: "italic",
2174
+ opacity: 0.7,
2093
2175
  "&:hover": {
2094
- textDecoration: "underline",
2095
- color: (_f = (_e = theme.vars) == null ? void 0 : _e.palette.text.primary) != null ? _f : theme.palette.text.primary
2176
+ textDecoration: "none",
2177
+ color: (_h = (_g = theme.vars) == null ? void 0 : _g.palette.text.disabled) != null ? _h : theme.palette.text.disabled
2096
2178
  }
2097
2179
  };
2098
2180
  }
2099
- );
2100
- var AppBreadcrumbsEllipsis = styled(Typography, {
2181
+ return {
2182
+ cursor: "pointer",
2183
+ whiteSpace: "nowrap",
2184
+ color: (_j = (_i = theme.vars) == null ? void 0 : _i.palette.text.secondary) != null ? _j : theme.palette.text.secondary,
2185
+ "&:hover": {
2186
+ textDecoration: "underline",
2187
+ color: (_l = (_k = theme.vars) == null ? void 0 : _k.palette.text.primary) != null ? _l : theme.palette.text.primary
2188
+ }
2189
+ };
2190
+ });
2191
+ var AppBreadcrumbsEllipsis = styled("button", {
2101
2192
  name: "MuiAppBreadcrumbs",
2102
2193
  slot: "Ellipsis"
2103
2194
  })(({ theme, ownerState }) => {
2104
2195
  var _a, _b, _c, _d, _e, _f;
2105
- return {
2196
+ return __spreadProps(__spreadValues({}, theme.typography.h5), {
2197
+ border: 0,
2198
+ padding: theme.spacing(0, 0.5),
2106
2199
  cursor: "pointer",
2107
2200
  whiteSpace: "nowrap",
2108
2201
  userSelect: "none",
2109
- px: 0.5,
2110
2202
  borderRadius: theme.shape.borderRadius,
2111
2203
  color: (_b = (_a = theme.vars) == null ? void 0 : _a.palette.text.secondary) != null ? _b : theme.palette.text.secondary,
2112
2204
  backgroundColor: ownerState.active ? (_d = (_c = theme.vars) == null ? void 0 : _c.palette.action.hover) != null ? _d : theme.palette.action.hover : "transparent",
2113
2205
  "&:hover": {
2114
2206
  backgroundColor: (_f = (_e = theme.vars) == null ? void 0 : _e.palette.action.hover) != null ? _f : theme.palette.action.hover
2115
2207
  }
2116
- };
2208
+ });
2117
2209
  });
2118
2210
  function AppBreadcrumbs(_a) {
2119
2211
  var _b = _a, { items, maxItems = 4, sx } = _b, props = __objRest(_b, ["items", "maxItems", "sx"]);
2120
2212
  const [anchorEl, setAnchorEl] = useState2(null);
2121
2213
  const [ellipsisHovered, setEllipsisHovered] = useState2(false);
2122
- const ellipsisRef = useRef(null);
2123
- const popperRef = useRef(null);
2214
+ const menuId = useId();
2124
2215
  const open = Boolean(anchorEl);
2125
- useEffect2(() => {
2126
- if (!open) return void 0;
2127
- const handleDocumentClick = (e) => {
2128
- var _a2, _b2;
2129
- const target = e.target;
2130
- if (((_a2 = ellipsisRef.current) == null ? void 0 : _a2.contains(target)) || ((_b2 = popperRef.current) == null ? void 0 : _b2.contains(target))) {
2131
- return;
2132
- }
2133
- setAnchorEl(null);
2134
- };
2135
- document.addEventListener("click", handleDocumentClick);
2136
- return () => document.removeEventListener("click", handleDocumentClick);
2137
- }, [open]);
2138
2216
  const handleEllipsisClick = (e) => {
2139
- ellipsisRef.current = e.currentTarget;
2140
2217
  setAnchorEl(open ? null : e.currentTarget);
2141
2218
  };
2142
2219
  const handleMenuItemClick = (item) => {
@@ -2145,46 +2222,56 @@ function AppBreadcrumbs(_a) {
2145
2222
  (_a2 = item.onClick) == null ? void 0 : _a2.call(item);
2146
2223
  };
2147
2224
  const shouldTruncate = items.length > maxItems;
2148
- const visibleItems = shouldTruncate ? [items[0], ...items.slice(items.length - 2)] : items;
2149
- const hiddenItems = shouldTruncate ? items.slice(1, items.length - 2) : [];
2150
- const renderItem = (item, isLast) => /* @__PURE__ */ jsx2(
2151
- AppBreadcrumbsItem,
2152
- {
2153
- variant: "h5",
2154
- ownerState: { isLast },
2155
- role: isLast ? void 0 : "button",
2156
- tabIndex: isLast ? void 0 : 0,
2157
- onClick: isLast ? void 0 : item.onClick,
2158
- onKeyDown: isLast ? void 0 : (e) => {
2159
- var _a2;
2160
- if (e.key === "Enter" || e.key === " ") {
2161
- e.preventDefault();
2162
- (_a2 = item.onClick) == null ? void 0 : _a2.call(item);
2225
+ const visibleItems = shouldTruncate ? [...items.slice(0, maxItems - 1), items[items.length - 1]] : items;
2226
+ const hiddenItems = shouldTruncate ? items.slice(maxItems - 1, items.length - 1) : [];
2227
+ const renderItem = (item, isLast) => {
2228
+ const isClickable = !isLast && !!item.onClick;
2229
+ return /* @__PURE__ */ jsx2(
2230
+ AppBreadcrumbsItem,
2231
+ __spreadProps(__spreadValues({
2232
+ variant: "h5",
2233
+ ownerState: { isLast, isClickable }
2234
+ }, isClickable && {
2235
+ role: "button",
2236
+ tabIndex: 0,
2237
+ onClick: item.onClick,
2238
+ onKeyDown: (e) => {
2239
+ var _a2;
2240
+ if (e.key === "Enter" || e.key === " ") {
2241
+ e.preventDefault();
2242
+ (_a2 = item.onClick) == null ? void 0 : _a2.call(item);
2243
+ }
2163
2244
  }
2164
- },
2165
- children: item.label
2166
- },
2167
- item.key
2168
- );
2245
+ }), {
2246
+ children: item.label
2247
+ }),
2248
+ item.key
2249
+ );
2250
+ };
2169
2251
  const breadcrumbChildren = [];
2170
2252
  if (shouldTruncate) {
2171
- breadcrumbChildren.push(renderItem(visibleItems[0], false));
2253
+ visibleItems.slice(0, -1).forEach((item, index) => {
2254
+ breadcrumbChildren.push(renderItem(item, false));
2255
+ });
2172
2256
  breadcrumbChildren.push(
2173
2257
  /* @__PURE__ */ jsx2(
2174
2258
  AppBreadcrumbsEllipsis,
2175
2259
  {
2176
- variant: "h5",
2260
+ type: "button",
2177
2261
  ownerState: { active: ellipsisHovered || open },
2178
2262
  onClick: handleEllipsisClick,
2179
2263
  onMouseEnter: () => setEllipsisHovered(true),
2180
2264
  onMouseLeave: () => setEllipsisHovered(false),
2265
+ "aria-label": "Show hidden breadcrumbs",
2266
+ "aria-haspopup": "menu",
2267
+ "aria-expanded": open || void 0,
2268
+ "aria-controls": open ? menuId : void 0,
2181
2269
  children: "..."
2182
2270
  },
2183
2271
  "__ellipsis__"
2184
2272
  )
2185
2273
  );
2186
- breadcrumbChildren.push(renderItem(visibleItems[1], false));
2187
- breadcrumbChildren.push(renderItem(visibleItems[2], true));
2274
+ breadcrumbChildren.push(renderItem(visibleItems[visibleItems.length - 1], true));
2188
2275
  } else {
2189
2276
  items.forEach((item, index) => {
2190
2277
  breadcrumbChildren.push(renderItem(item, index === items.length - 1));
@@ -2194,19 +2281,30 @@ function AppBreadcrumbs(_a) {
2194
2281
  /* @__PURE__ */ jsx2(
2195
2282
  Breadcrumbs,
2196
2283
  {
2197
- separator: /* @__PURE__ */ jsx2(ChevronRight, { size: 16 }),
2284
+ separator: /* @__PURE__ */ jsx2(ChevronRight, { size: 16, "aria-hidden": "true" }),
2198
2285
  "aria-label": "breadcrumb",
2199
2286
  sx: { "& ol": { flexWrap: "nowrap", alignItems: "center" } },
2200
2287
  children: breadcrumbChildren
2201
2288
  }
2202
2289
  ),
2203
- /* @__PURE__ */ jsx2(Popper, { open, anchorEl, placement: "bottom-start", sx: { zIndex: 1400 }, children: /* @__PURE__ */ jsx2(Paper, { ref: popperRef, elevation: 3, sx: { minWidth: 160, mt: 0.5 }, children: /* @__PURE__ */ jsx2(MenuList, { dense: true, children: hiddenItems.map((item) => /* @__PURE__ */ jsx2(MenuItem, { onClick: () => handleMenuItemClick(item), children: /* @__PURE__ */ jsx2(Typography, { variant: "body2", children: item.label }) }, item.key)) }) }) })
2290
+ /* @__PURE__ */ jsx2(
2291
+ Menu,
2292
+ {
2293
+ id: menuId,
2294
+ open,
2295
+ anchorEl,
2296
+ onClose: () => setAnchorEl(null),
2297
+ anchorOrigin: { vertical: "bottom", horizontal: "left" },
2298
+ slotProps: { paper: { elevation: 3, sx: { minWidth: 160, mt: 0.5 } }, list: { dense: true } },
2299
+ children: hiddenItems.map((item) => /* @__PURE__ */ jsx2(MenuItem, { onClick: () => handleMenuItemClick(item), children: /* @__PURE__ */ jsx2(Typography, { variant: "body2", children: item.label }) }, item.key))
2300
+ }
2301
+ )
2204
2302
  ] }));
2205
2303
  }
2206
2304
  AppBreadcrumbs.displayName = "AppBreadcrumbs";
2207
2305
 
2208
2306
  // src/components/CodeBlock/CodeBlock.tsx
2209
- import React2, { useEffect as useEffect3 } from "react";
2307
+ import React2, { useEffect as useEffect2 } from "react";
2210
2308
  import { Box, useTheme } from "@mui/material";
2211
2309
  import Prism from "prismjs";
2212
2310
  import "prismjs/components/prism-javascript";
@@ -2240,18 +2338,19 @@ var CodeBlock = ({
2240
2338
  });
2241
2339
  return () => observer.disconnect();
2242
2340
  }, [theme.palette.mode]);
2243
- useEffect3(() => {
2341
+ useEffect2(() => {
2244
2342
  Prism.highlightAll();
2245
2343
  }, [code, language]);
2246
2344
  const defaultColors = {
2247
2345
  background: isDark ? "#1e1e1e" : "#f5f5f5",
2248
2346
  text: isDark ? "#d4d4d4" : "#24292e",
2249
- comment: isDark ? "#6a9955" : "#6a737d",
2250
- keyword: isDark ? "#569cd6" : "#d73a49",
2347
+ // Light-mode values darkened to meet WCAG AA 4.5:1 contrast on #f5f5f5
2348
+ comment: isDark ? "#6a9955" : "#57606a",
2349
+ keyword: isDark ? "#569cd6" : "#cf222e",
2251
2350
  string: isDark ? "#ce9178" : "#032f62",
2252
2351
  function: isDark ? "#dcdcaa" : "#6f42c1",
2253
2352
  number: isDark ? "#b5cea8" : "#005cc5",
2254
- operator: isDark ? "#d4d4d4" : "#d73a49"
2353
+ operator: isDark ? "#d4d4d4" : "#cf222e"
2255
2354
  };
2256
2355
  const colors2 = (isDark ? (_b = (_a = theme.vars) == null ? void 0 : _a.syntax) == null ? void 0 : _b.dark : (_d = (_c = theme.vars) == null ? void 0 : _c.syntax) == null ? void 0 : _d.light) || defaultColors;
2257
2356
  return /* @__PURE__ */ jsx3(
@@ -2472,52 +2571,62 @@ function ColorSchemeSVG(_a) {
2472
2571
  }
2473
2572
 
2474
2573
  // src/components/ColorSchemeToggle/ColorSchemeToggle.tsx
2574
+ import * as React3 from "react";
2475
2575
  import { useColorScheme as useColorScheme3 } from "@mui/material/styles";
2476
2576
  import IconButton from "@mui/material/IconButton";
2477
2577
  import { Moon, Monitor, Sun } from "@wso2/oxygen-ui-icons-react";
2478
2578
  import { Tooltip } from "@mui/material";
2479
2579
  import { jsx as jsx6 } from "react/jsx-runtime";
2480
- var ColorSchemeToggle = (_a) => {
2481
- var _b = _a, {
2482
- darkModeIcon,
2483
- lightModeIcon,
2484
- systemModeIcon
2485
- } = _b, buttonProps = __objRest(_b, [
2486
- "darkModeIcon",
2487
- "lightModeIcon",
2488
- "systemModeIcon"
2489
- ]);
2490
- const { mode, setMode } = useColorScheme3();
2491
- if (!mode) {
2492
- return null;
2493
- }
2494
- const nextMode = (currentMode2) => {
2495
- if (currentMode2 === "light") return "dark";
2496
- if (currentMode2 === "dark") return "system";
2497
- return "light";
2498
- };
2499
- const currentMode = mode != null ? mode : "system";
2500
- const ColorSchemeIcon = () => {
2501
- switch (currentMode) {
2502
- case "light":
2503
- return lightModeIcon != null ? lightModeIcon : /* @__PURE__ */ jsx6(Sun, {});
2504
- case "dark":
2505
- return darkModeIcon != null ? darkModeIcon : /* @__PURE__ */ jsx6(Moon, {});
2506
- default:
2507
- return systemModeIcon != null ? systemModeIcon : /* @__PURE__ */ jsx6(Monitor, {});
2580
+ var ColorSchemeToggle = React3.forwardRef(
2581
+ function ColorSchemeToggle2(_a, ref) {
2582
+ var _b = _a, { darkModeIcon, lightModeIcon, systemModeIcon, onClick, "aria-label": ariaLabel } = _b, buttonProps = __objRest(_b, ["darkModeIcon", "lightModeIcon", "systemModeIcon", "onClick", "aria-label"]);
2583
+ const { mode, setMode } = useColorScheme3();
2584
+ if (!mode) {
2585
+ return null;
2508
2586
  }
2509
- };
2510
- return /* @__PURE__ */ jsx6(Tooltip, { title: `${currentMode.charAt(0).toUpperCase()}${currentMode.slice(1)} Mode`, children: /* @__PURE__ */ jsx6(IconButton, __spreadProps(__spreadValues({}, buttonProps), { onClick: () => setMode(nextMode(currentMode)), children: /* @__PURE__ */ jsx6(ColorSchemeIcon, {}) })) });
2511
- };
2587
+ const nextMode = (currentMode2) => {
2588
+ if (currentMode2 === "light") return "dark";
2589
+ if (currentMode2 === "dark") return "system";
2590
+ return "light";
2591
+ };
2592
+ const currentMode = mode != null ? mode : "system";
2593
+ const defaultAriaLabel = `Switch to ${nextMode(currentMode)} mode`;
2594
+ const resolvedAriaLabel = typeof ariaLabel === "string" && ariaLabel.trim().length > 0 ? ariaLabel : defaultAriaLabel;
2595
+ const ColorSchemeIcon = () => {
2596
+ switch (currentMode) {
2597
+ case "light":
2598
+ return lightModeIcon != null ? lightModeIcon : /* @__PURE__ */ jsx6(Sun, {});
2599
+ case "dark":
2600
+ return darkModeIcon != null ? darkModeIcon : /* @__PURE__ */ jsx6(Moon, {});
2601
+ default:
2602
+ return systemModeIcon != null ? systemModeIcon : /* @__PURE__ */ jsx6(Monitor, {});
2603
+ }
2604
+ };
2605
+ return /* @__PURE__ */ jsx6(Tooltip, { title: `${currentMode.charAt(0).toUpperCase()}${currentMode.slice(1)} Mode`, children: /* @__PURE__ */ jsx6(
2606
+ IconButton,
2607
+ __spreadProps(__spreadValues({
2608
+ ref
2609
+ }, buttonProps), {
2610
+ "aria-label": resolvedAriaLabel,
2611
+ onClick: (event) => {
2612
+ setMode(nextMode(currentMode));
2613
+ onClick == null ? void 0 : onClick(event);
2614
+ },
2615
+ children: /* @__PURE__ */ jsx6(ColorSchemeIcon, {})
2616
+ })
2617
+ ) });
2618
+ }
2619
+ );
2512
2620
  var ColorSchemeToggle_default = ColorSchemeToggle;
2513
2621
 
2514
2622
  // src/components/ComplexSelect/ComplexSelect.tsx
2515
- import { Children, isValidElement } from "react";
2623
+ import { Children, isValidElement, useId as useId2 } from "react";
2516
2624
  import MuiSelect, { selectClasses } from "@mui/material/Select";
2517
2625
  import MuiFormControl from "@mui/material/FormControl";
2518
2626
  import MuiInputLabel from "@mui/material/InputLabel";
2519
2627
  import MuiTypography from "@mui/material/Typography";
2520
2628
  import { styled as styled7 } from "@mui/material/styles";
2629
+ import { visuallyHidden } from "@mui/utils";
2521
2630
 
2522
2631
  // src/components/ComplexSelect/ComplexSelectListHeader.tsx
2523
2632
  import MuiListSubheader from "@mui/material/ListSubheader";
@@ -2713,6 +2822,7 @@ var StyledInputLabel = styled7(MuiInputLabel, {
2713
2822
  });
2714
2823
  function ComplexSelect(_a) {
2715
2824
  var _b = _a, { children, sx, label, labelId, labelAnchor = "inside" } = _b, props = __objRest(_b, ["children", "sx", "label", "labelId", "labelAnchor"]);
2825
+ const autoLabelId = useId2();
2716
2826
  const injectLabelIntoContent = (content) => {
2717
2827
  if (!label || labelAnchor !== "inside") return content;
2718
2828
  const processChildren = (node) => {
@@ -2785,9 +2895,9 @@ function ComplexSelect(_a) {
2785
2895
  })
2786
2896
  );
2787
2897
  if (label) {
2788
- const generatedLabelId = labelId || `complex-select-label-${Math.random().toString(36).substr(2, 9)}`;
2898
+ const generatedLabelId = labelId || autoLabelId;
2789
2899
  return /* @__PURE__ */ jsxs3(StyledFormControl, { fullWidth: props.fullWidth, children: [
2790
- labelAnchor !== "inside" && /* @__PURE__ */ jsx13(
2900
+ labelAnchor === "inside" ? /* @__PURE__ */ jsx13(StyledInputLabel, { id: generatedLabelId, labelAnchor, sx: visuallyHidden, children: label }) : /* @__PURE__ */ jsx13(
2791
2901
  StyledInputLabel,
2792
2902
  {
2793
2903
  id: generatedLabelId,
@@ -2869,7 +2979,7 @@ PageContent.displayName = "PageContent";
2869
2979
  var PageContent_default = PageContent;
2870
2980
 
2871
2981
  // src/components/PageTitle/PageTitle.tsx
2872
- import React4 from "react";
2982
+ import React5 from "react";
2873
2983
  import { styled as styled15 } from "@mui/material/styles";
2874
2984
 
2875
2985
  // src/components/PageTitle/PageTitleHeader.tsx
@@ -2984,7 +3094,7 @@ PageTitleActions.displayName = "PageTitle.Actions";
2984
3094
  var PageTitleActions_default = PageTitleActions;
2985
3095
 
2986
3096
  // src/components/PageTitle/PageTitleBackButton.tsx
2987
- import React3 from "react";
3097
+ import React4 from "react";
2988
3098
  import { styled as styled14 } from "@mui/material/styles";
2989
3099
  import Button from "@mui/material/Button";
2990
3100
  import Typography4 from "@mui/material/Typography";
@@ -3014,13 +3124,13 @@ var PageTitleBackButton = (_a) => {
3014
3124
  }
3015
3125
  }, props), {
3016
3126
  children: [
3017
- /* @__PURE__ */ jsx20(ArrowLeft, { size: 20 }),
3127
+ /* @__PURE__ */ jsx20(ArrowLeft, { size: 20, "aria-hidden": "true" }),
3018
3128
  /* @__PURE__ */ jsx20(Typography4, { variant: "body2", children })
3019
3129
  ]
3020
3130
  })
3021
3131
  );
3022
- if (React3.isValidElement(Component)) {
3023
- return /* @__PURE__ */ jsx20(PageTitleBackButtonRoot, { children: React3.cloneElement(
3132
+ if (React4.isValidElement(Component)) {
3133
+ return /* @__PURE__ */ jsx20(PageTitleBackButtonRoot, { children: React4.cloneElement(
3024
3134
  Component,
3025
3135
  { style: { textDecoration: "none" } },
3026
3136
  button
@@ -3090,20 +3200,20 @@ var PageTitleColumnRight = styled15("div", {
3090
3200
  })();
3091
3201
  var PageTitle = (_a) => {
3092
3202
  var _b = _a, { children, sx } = _b, props = __objRest(_b, ["children", "sx"]);
3093
- const childrenArray = React4.Children.toArray(children);
3203
+ const childrenArray = React5.Children.toArray(children);
3094
3204
  const avatar = childrenArray.find(
3095
- (child) => React4.isValidElement(child) && child.type === PageTitleAvatar_default
3205
+ (child) => React5.isValidElement(child) && child.type === PageTitleAvatar_default
3096
3206
  );
3097
3207
  const actions = childrenArray.find(
3098
- (child) => React4.isValidElement(child) && child.type === PageTitleActions_default
3208
+ (child) => React5.isValidElement(child) && child.type === PageTitleActions_default
3099
3209
  );
3100
3210
  let backButtonElement = null;
3101
3211
  childrenArray.forEach((child) => {
3102
- if (React4.isValidElement(child)) {
3212
+ if (React5.isValidElement(child)) {
3103
3213
  if (child.type === PageTitleBackButton_default) {
3104
3214
  backButtonElement = child;
3105
3215
  }
3106
- if (child.props && typeof child.props === "object" && "children" in child.props && React4.isValidElement(child.props.children)) {
3216
+ if (child.props && typeof child.props === "object" && "children" in child.props && React5.isValidElement(child.props.children)) {
3107
3217
  if (child.props.children.type === PageTitleBackButton_default) {
3108
3218
  backButtonElement = child;
3109
3219
  }
@@ -3112,15 +3222,15 @@ var PageTitle = (_a) => {
3112
3222
  });
3113
3223
  const otherChildren = childrenArray.filter(
3114
3224
  (child) => {
3115
- if (!React4.isValidElement(child)) {
3225
+ if (!React5.isValidElement(child)) {
3116
3226
  return true;
3117
3227
  }
3118
3228
  if (child.type === PageTitleAvatar_default || child.type === PageTitleActions_default || child.type === PageTitleBackButton_default) {
3119
3229
  return false;
3120
3230
  }
3121
- if (child.props && typeof child.props === "object" && "children" in child.props && React4.isValidElement(child.props.children)) {
3231
+ if (child.props && typeof child.props === "object" && "children" in child.props && React5.isValidElement(child.props.children)) {
3122
3232
  const childrenProp = child.props.children;
3123
- if (React4.isValidElement(childrenProp) && childrenProp.type === PageTitleBackButton_default) {
3233
+ if (React5.isValidElement(childrenProp) && childrenProp.type === PageTitleBackButton_default) {
3124
3234
  return false;
3125
3235
  }
3126
3236
  }
@@ -3164,7 +3274,14 @@ var StatCard = (_a) => {
3164
3274
  "iconColor"
3165
3275
  ]);
3166
3276
  return /* @__PURE__ */ jsx22(Card, __spreadProps(__spreadValues({ variant: "outlined" }, props), { children: /* @__PURE__ */ jsx22(CardContent, { children: /* @__PURE__ */ jsxs7(Box6, { sx: { display: "flex", alignItems: "center", gap: 2 }, children: [
3167
- icon && /* @__PURE__ */ jsx22(Box6, { sx: { color: (theme) => theme.palette[iconColor].main, display: "flex", alignItems: "center" }, children: icon }),
3277
+ icon && /* @__PURE__ */ jsx22(
3278
+ Box6,
3279
+ {
3280
+ "aria-hidden": "true",
3281
+ sx: { color: (theme) => theme.palette[iconColor].main, display: "flex", alignItems: "center" },
3282
+ children: icon
3283
+ }
3284
+ ),
3168
3285
  /* @__PURE__ */ jsxs7(Box6, { children: [
3169
3286
  /* @__PURE__ */ jsx22(Typography5, { variant: "h5", children: value }),
3170
3287
  /* @__PURE__ */ jsx22(Typography5, { variant: "body2", color: "text.secondary", children: label })
@@ -3175,7 +3292,9 @@ StatCard.displayName = "StatCard";
3175
3292
  var StatCard_default = StatCard;
3176
3293
 
3177
3294
  // src/components/ThemeSwitcher/ThemeSelect.tsx
3295
+ import { useId as useId3 } from "react";
3178
3296
  import { Select, MenuItem as MenuItem2, FormControl, InputLabel } from "@mui/material";
3297
+ import { visuallyHidden as visuallyHidden2 } from "@mui/utils";
3179
3298
  import { jsx as jsx23, jsxs as jsxs8 } from "react/jsx-runtime";
3180
3299
  function ThemeSelect({
3181
3300
  size = "small",
@@ -3185,18 +3304,19 @@ function ThemeSelect({
3185
3304
  sx
3186
3305
  }) {
3187
3306
  const { currentTheme, themes, setTheme } = useThemeSwitcher();
3307
+ const labelId = useId3();
3188
3308
  const handleChange = (event) => {
3189
3309
  setTheme(event.target.value);
3190
3310
  };
3191
3311
  return /* @__PURE__ */ jsxs8(FormControl, { size, variant, sx: __spreadValues({ minWidth: 120 }, sx), children: [
3192
- showLabel && /* @__PURE__ */ jsx23(InputLabel, { id: "theme-select-label", children: label }),
3312
+ /* @__PURE__ */ jsx23(InputLabel, { id: labelId, sx: showLabel ? void 0 : visuallyHidden2, children: label }),
3193
3313
  /* @__PURE__ */ jsx23(
3194
3314
  Select,
3195
3315
  {
3196
- labelId: showLabel ? "theme-select-label" : void 0,
3316
+ labelId,
3197
3317
  value: currentTheme,
3198
3318
  onChange: handleChange,
3199
- label: showLabel ? label : void 0,
3319
+ label,
3200
3320
  children: themes.map((themeOption) => /* @__PURE__ */ jsx23(MenuItem2, { value: themeOption.key, children: themeOption.label }, themeOption.key))
3201
3321
  }
3202
3322
  )
@@ -3230,7 +3350,7 @@ function ThemeSwitcher({
3230
3350
  }
3231
3351
 
3232
3352
  // src/components/SearchBar/SearchBarWithAdvancedFilter.tsx
3233
- import * as React5 from "react";
3353
+ import * as React7 from "react";
3234
3354
  import TextField2 from "@mui/material/TextField";
3235
3355
  import InputAdornment2 from "@mui/material/InputAdornment";
3236
3356
  import Box7 from "@mui/material/Box";
@@ -3247,31 +3367,46 @@ import MenuItem3 from "@mui/material/MenuItem";
3247
3367
  import { ListFilter } from "@wso2/oxygen-ui-icons-react";
3248
3368
 
3249
3369
  // src/components/SearchBar/SearchBarBase.tsx
3370
+ import * as React6 from "react";
3250
3371
  import TextField from "@mui/material/TextField";
3251
3372
  import InputAdornment from "@mui/material/InputAdornment";
3252
3373
  import { Search } from "@wso2/oxygen-ui-icons-react";
3253
3374
  import { jsx as jsx25 } from "react/jsx-runtime";
3254
- function SearchBarBase(_a) {
3375
+ var hasMeaningfulAriaValue = (value) => typeof value === "string" && value.trim().length > 0;
3376
+ var SearchBarBase = React6.forwardRef(function SearchBarBase2(_a, ref) {
3255
3377
  var _b = _a, {
3256
3378
  placeholder = "Search",
3257
3379
  endAdornment,
3258
3380
  slotProps,
3259
- sx
3381
+ sx,
3382
+ label,
3383
+ "aria-label": ariaLabel,
3384
+ "aria-labelledby": ariaLabelledBy
3260
3385
  } = _b, props = __objRest(_b, [
3261
3386
  "placeholder",
3262
3387
  "endAdornment",
3263
3388
  "slotProps",
3264
- "sx"
3389
+ "sx",
3390
+ "label",
3391
+ "aria-label",
3392
+ "aria-labelledby"
3265
3393
  ]);
3394
+ const htmlInputSlotProps = slotProps == null ? void 0 : slotProps.htmlInput;
3395
+ const hasMeaningfulLabel = typeof label === "string" ? hasMeaningfulAriaValue(label) : Boolean(label);
3396
+ const hasAccessibleName = hasMeaningfulLabel || hasMeaningfulAriaValue(ariaLabel) || hasMeaningfulAriaValue(ariaLabelledBy) || hasMeaningfulAriaValue(htmlInputSlotProps == null ? void 0 : htmlInputSlotProps["aria-label"]) || hasMeaningfulAriaValue(htmlInputSlotProps == null ? void 0 : htmlInputSlotProps["aria-labelledby"]);
3397
+ const shouldInjectPlaceholderLabel = !hasAccessibleName && hasMeaningfulAriaValue(placeholder);
3398
+ const htmlInput = shouldInjectPlaceholderLabel || (slotProps == null ? void 0 : slotProps.htmlInput) || hasMeaningfulAriaValue(ariaLabel) || hasMeaningfulAriaValue(ariaLabelledBy) ? __spreadValues(__spreadValues(__spreadValues(__spreadValues({}, slotProps == null ? void 0 : slotProps.htmlInput), hasMeaningfulAriaValue(ariaLabelledBy) ? { "aria-labelledby": ariaLabelledBy } : null), hasMeaningfulAriaValue(ariaLabel) ? { "aria-label": ariaLabel } : null), shouldInjectPlaceholderLabel ? { "aria-label": placeholder } : null) : void 0;
3266
3399
  return /* @__PURE__ */ jsx25(
3267
3400
  TextField,
3268
3401
  __spreadProps(__spreadValues({}, props), {
3402
+ ref,
3403
+ label,
3269
3404
  placeholder,
3270
3405
  variant: "outlined",
3271
3406
  size: "small",
3272
- slotProps: __spreadProps(__spreadValues({}, slotProps), {
3407
+ slotProps: __spreadProps(__spreadValues(__spreadValues({}, slotProps), htmlInput ? { htmlInput } : null), {
3273
3408
  input: __spreadProps(__spreadValues({}, slotProps == null ? void 0 : slotProps.input), {
3274
- startAdornment: /* @__PURE__ */ jsx25(InputAdornment, { position: "start", children: /* @__PURE__ */ jsx25(Search, { fontSize: "small" }) }),
3409
+ startAdornment: /* @__PURE__ */ jsx25(InputAdornment, { position: "start", children: /* @__PURE__ */ jsx25(Search, { fontSize: "small", "aria-hidden": "true" }) }),
3275
3410
  endAdornment
3276
3411
  })
3277
3412
  }),
@@ -3285,7 +3420,7 @@ function SearchBarBase(_a) {
3285
3420
  }, sx)
3286
3421
  })
3287
3422
  );
3288
- }
3423
+ });
3289
3424
 
3290
3425
  // src/components/SearchBar/SearchBarWithAdvancedFilter.tsx
3291
3426
  import { Fragment as Fragment3, jsx as jsx26, jsxs as jsxs9 } from "react/jsx-runtime";
@@ -3315,7 +3450,7 @@ function SearchBarWithAdvancedFilter(_a) {
3315
3450
  "popoverWidth",
3316
3451
  "sx"
3317
3452
  ]);
3318
- const [anchorEl, setAnchorEl] = React5.useState(null);
3453
+ const [anchorEl, setAnchorEl] = React7.useState(null);
3319
3454
  const open = Boolean(anchorEl);
3320
3455
  const handleInputChange = (e) => {
3321
3456
  onChange(e.target.value);
@@ -3451,34 +3586,32 @@ function SearchBarWithAdvancedFilter(_a) {
3451
3586
  var SearchBarWithAdvancedFilter_default = SearchBarWithAdvancedFilter;
3452
3587
 
3453
3588
  // src/components/SearchBar/SearchBar.tsx
3589
+ import * as React8 from "react";
3454
3590
  import { jsx as jsx27 } from "react/jsx-runtime";
3455
- function SearchBar(_a) {
3456
- var _b = _a, {
3457
- placeholder = "Search"
3458
- } = _b, props = __objRest(_b, [
3459
- "placeholder"
3460
- ]);
3591
+ var SearchBar = React8.forwardRef(function SearchBar2(_a, ref) {
3592
+ var _b = _a, { placeholder = "Search" } = _b, props = __objRest(_b, ["placeholder"]);
3461
3593
  return /* @__PURE__ */ jsx27(
3462
3594
  SearchBarBase,
3463
3595
  __spreadProps(__spreadValues({}, props), {
3596
+ ref,
3464
3597
  placeholder
3465
3598
  })
3466
3599
  );
3467
- }
3600
+ });
3468
3601
  var SearchBar_default = SearchBar;
3469
3602
 
3470
3603
  // src/components/Header/Header.tsx
3471
- import * as React9 from "react";
3604
+ import * as React12 from "react";
3472
3605
  import AppBar from "@mui/material/AppBar";
3473
3606
  import Toolbar from "@mui/material/Toolbar";
3474
3607
  import Box12 from "@mui/material/Box";
3475
3608
  import { styled as styled22 } from "@mui/material/styles";
3476
3609
 
3477
3610
  // src/components/Header/context.ts
3478
- import * as React6 from "react";
3479
- var HeaderContext = React6.createContext(null);
3611
+ import * as React9 from "react";
3612
+ var HeaderContext = React9.createContext(null);
3480
3613
  var useHeader = () => {
3481
- const context = React6.useContext(HeaderContext);
3614
+ const context = React9.useContext(HeaderContext);
3482
3615
  if (!context) {
3483
3616
  throw new Error("Header compound components must be used within Header");
3484
3617
  }
@@ -3486,16 +3619,16 @@ var useHeader = () => {
3486
3619
  };
3487
3620
 
3488
3621
  // src/components/Header/HeaderToggle.tsx
3489
- import * as React8 from "react";
3622
+ import * as React11 from "react";
3490
3623
  import IconButton3 from "@mui/material/IconButton";
3491
3624
  import Tooltip2 from "@mui/material/Tooltip";
3492
3625
  import { styled as styled16 } from "@mui/material/styles";
3493
- import { Menu, PanelLeftClose } from "@wso2/oxygen-ui-icons-react";
3626
+ import { Menu as Menu2, ChevronLeft } from "@wso2/oxygen-ui-icons-react";
3494
3627
 
3495
3628
  // src/components/AppShell/context.tsx
3496
- import * as React7 from "react";
3629
+ import * as React10 from "react";
3497
3630
  import { jsx as jsx28 } from "react/jsx-runtime";
3498
- var AppShellContext = React7.createContext(void 0);
3631
+ var AppShellContext = React10.createContext(void 0);
3499
3632
  var AppShellProvider = ({
3500
3633
  children,
3501
3634
  value
@@ -3522,15 +3655,26 @@ var HeaderToggle = ({
3522
3655
  sx
3523
3656
  }) => {
3524
3657
  var _a, _b;
3525
- const appShellContext = React8.useContext(AppShellContext);
3658
+ const appShellContext = React11.useContext(AppShellContext);
3526
3659
  const collapsed = (_a = collapsedProp != null ? collapsedProp : appShellContext == null ? void 0 : appShellContext.state.sidebarCollapsed) != null ? _a : false;
3527
3660
  const onToggle = (_b = onToggleProp != null ? onToggleProp : appShellContext == null ? void 0 : appShellContext.actions.toggleSidebar) != null ? _b : (() => {
3528
3661
  });
3529
- return /* @__PURE__ */ jsx29(Tooltip2, { title: collapsed ? expandLabel : collapseLabel, children: /* @__PURE__ */ jsx29(HeaderToggleRoot, { onClick: onToggle, size: "small", sx, children: collapsed ? expandIcon || /* @__PURE__ */ jsx29(Menu, { size: 20 }) : collapseIcon || /* @__PURE__ */ jsx29(PanelLeftClose, { size: 20 }) }) });
3662
+ return /* @__PURE__ */ jsx29(Tooltip2, { title: collapsed ? expandLabel : collapseLabel, children: /* @__PURE__ */ jsx29(
3663
+ HeaderToggleRoot,
3664
+ {
3665
+ onClick: onToggle,
3666
+ size: "small",
3667
+ sx,
3668
+ "aria-label": collapsed ? expandLabel : collapseLabel,
3669
+ "aria-expanded": !collapsed,
3670
+ children: /* @__PURE__ */ jsx29("span", { "aria-hidden": "true", style: { display: "inline-flex" }, children: collapsed ? expandIcon || /* @__PURE__ */ jsx29(Menu2, { size: 20 }) : collapseIcon || /* @__PURE__ */ jsx29(ChevronLeft, { size: 20 }) })
3671
+ }
3672
+ ) });
3530
3673
  };
3531
3674
 
3532
3675
  // src/components/Header/HeaderBrand.tsx
3533
3676
  import Box9 from "@mui/material/Box";
3677
+ import ButtonBase from "@mui/material/ButtonBase";
3534
3678
  import { styled as styled19 } from "@mui/material/styles";
3535
3679
 
3536
3680
  // src/components/Header/HeaderBrandLogo.tsx
@@ -3589,12 +3733,25 @@ var HeaderBrandRoot = styled19(Box9, {
3589
3733
  marginLeft: theme.spacing(1),
3590
3734
  cursor: clickable ? "pointer" : "default"
3591
3735
  }));
3736
+ var HeaderBrandButtonRoot = styled19(ButtonBase, {
3737
+ name: "MuiHeader",
3738
+ slot: "BrandButton"
3739
+ })(({ theme }) => ({
3740
+ display: "flex",
3741
+ alignItems: "center",
3742
+ marginLeft: theme.spacing(1),
3743
+ borderRadius: theme.shape.borderRadius
3744
+ }));
3592
3745
  var HeaderBrand = ({
3593
3746
  onClick,
3747
+ "aria-label": ariaLabel,
3594
3748
  children,
3595
3749
  sx
3596
3750
  }) => {
3597
- return /* @__PURE__ */ jsx32(HeaderBrandRoot, { onClick, clickable: !!onClick, sx, children });
3751
+ if (onClick) {
3752
+ return /* @__PURE__ */ jsx32(HeaderBrandButtonRoot, { onClick, "aria-label": ariaLabel, sx, children });
3753
+ }
3754
+ return /* @__PURE__ */ jsx32(HeaderBrandRoot, { clickable: false, sx, children });
3598
3755
  };
3599
3756
  HeaderBrand.displayName = "HeaderBrand";
3600
3757
 
@@ -3689,7 +3846,7 @@ var Header = ({
3689
3846
  minimal = false,
3690
3847
  sx
3691
3848
  }) => {
3692
- const contextValue = React9.useMemo(() => ({ minimal }), [minimal]);
3849
+ const contextValue = React12.useMemo(() => ({ minimal }), [minimal]);
3693
3850
  return /* @__PURE__ */ jsx35(HeaderContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx35(HeaderRootStyled, { position: "static", color: "default", elevation: 0, sx, children: /* @__PURE__ */ jsx35(HeaderToolbar, { children }) }) });
3694
3851
  };
3695
3852
  var HeaderSpacer = ({ sx }) => /* @__PURE__ */ jsx35(HeaderSpacerStyled, { sx });
@@ -3703,15 +3860,15 @@ Header.Spacer = HeaderSpacer;
3703
3860
  Header.displayName = "Header";
3704
3861
 
3705
3862
  // src/components/Sidebar/Sidebar.tsx
3706
- import * as React17 from "react";
3863
+ import * as React20 from "react";
3707
3864
  import Box18 from "@mui/material/Box";
3708
3865
  import { styled as styled35 } from "@mui/material/styles";
3709
3866
 
3710
3867
  // src/components/Sidebar/context.ts
3711
- import * as React10 from "react";
3712
- var SidebarContext = React10.createContext(null);
3868
+ import * as React13 from "react";
3869
+ var SidebarContext = React13.createContext(null);
3713
3870
  var useSidebar = () => {
3714
- const context = React10.useContext(SidebarContext);
3871
+ const context = React13.useContext(SidebarContext);
3715
3872
  if (!context) {
3716
3873
  throw new Error("Sidebar compound components must be used within Sidebar");
3717
3874
  }
@@ -3719,7 +3876,7 @@ var useSidebar = () => {
3719
3876
  };
3720
3877
 
3721
3878
  // src/components/Sidebar/SidebarNav.tsx
3722
- import * as React11 from "react";
3879
+ import * as React14 from "react";
3723
3880
  import Box13 from "@mui/material/Box";
3724
3881
  import Divider3 from "@mui/material/Divider";
3725
3882
  import { styled as styled23 } from "@mui/material/styles";
@@ -3759,15 +3916,15 @@ var SidebarNav = ({
3759
3916
  sx
3760
3917
  }) => {
3761
3918
  const { collapsed } = useSidebar();
3762
- const childArray = React11.Children.toArray(children);
3763
- return /* @__PURE__ */ jsx36(SidebarNavRoot, { component: "nav", sx, children: childArray.map((child, index) => /* @__PURE__ */ jsxs11(React11.Fragment, { children: [
3919
+ const childArray = React14.Children.toArray(children);
3920
+ return /* @__PURE__ */ jsx36(SidebarNavRoot, { component: "nav", sx, children: childArray.map((child, index) => /* @__PURE__ */ jsxs11(React14.Fragment, { children: [
3764
3921
  index > 0 && showDividers && !collapsed && /* @__PURE__ */ jsx36(SidebarNavDivider, {}),
3765
3922
  child
3766
3923
  ] }, index)) });
3767
3924
  };
3768
3925
 
3769
3926
  // src/components/Sidebar/SidebarCategory.tsx
3770
- import * as React12 from "react";
3927
+ import * as React15 from "react";
3771
3928
  import Box14 from "@mui/material/Box";
3772
3929
  import List from "@mui/material/List";
3773
3930
  import { styled as styled25 } from "@mui/material/styles";
@@ -3816,9 +3973,9 @@ var SidebarCategoryRoot = styled25(Box14, {
3816
3973
  var separateChildren = (children) => {
3817
3974
  let labelChild = null;
3818
3975
  const otherChildren = [];
3819
- React12.Children.forEach(children, (child) => {
3976
+ React15.Children.forEach(children, (child) => {
3820
3977
  var _a;
3821
- if (React12.isValidElement(child)) {
3978
+ if (React15.isValidElement(child)) {
3822
3979
  const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
3823
3980
  if (displayName === "SidebarCategoryLabel") {
3824
3981
  labelChild = child;
@@ -3844,13 +4001,15 @@ var SidebarCategory = ({
3844
4001
  SidebarCategory.displayName = "SidebarCategory";
3845
4002
 
3846
4003
  // src/components/Sidebar/SidebarItem.tsx
3847
- import * as React15 from "react";
4004
+ import * as React18 from "react";
3848
4005
  import Box15 from "@mui/material/Box";
3849
4006
  import List2 from "@mui/material/List";
3850
4007
  import ListItem from "@mui/material/ListItem";
3851
4008
  import ListItemButton from "@mui/material/ListItemButton";
3852
4009
  import ListItemIcon2 from "@mui/material/ListItemIcon";
3853
4010
  import ListItemText2 from "@mui/material/ListItemText";
4011
+ import MenuItem4 from "@mui/material/MenuItem";
4012
+ import MenuList from "@mui/material/MenuList";
3854
4013
  import Collapse from "@mui/material/Collapse";
3855
4014
  import Tooltip3 from "@mui/material/Tooltip";
3856
4015
  import Popover2 from "@mui/material/Popover";
@@ -3858,11 +4017,11 @@ import { styled as styled29 } from "@mui/material/styles";
3858
4017
  import { ChevronDown as ChevronDown2, ChevronUp } from "@wso2/oxygen-ui-icons-react";
3859
4018
 
3860
4019
  // src/components/Sidebar/SidebarItemContext.tsx
3861
- import * as React13 from "react";
4020
+ import * as React16 from "react";
3862
4021
  import { jsx as jsx39 } from "react/jsx-runtime";
3863
- var SidebarItemContext = React13.createContext(null);
4022
+ var SidebarItemContext = React16.createContext(null);
3864
4023
  var useSidebarItemContext = () => {
3865
- const context = React13.useContext(SidebarItemContext);
4024
+ const context = React16.useContext(SidebarItemContext);
3866
4025
  if (!context) {
3867
4026
  throw new Error(
3868
4027
  "useSidebarItemContext must be used within a SidebarItem component"
@@ -3875,7 +4034,7 @@ var SidebarItemProvider = ({ value, children }) => {
3875
4034
  };
3876
4035
 
3877
4036
  // src/components/Sidebar/SidebarItemIcon.tsx
3878
- import * as React14 from "react";
4037
+ import * as React17 from "react";
3879
4038
  import ListItemIcon from "@mui/material/ListItemIcon";
3880
4039
  import { styled as styled26 } from "@mui/material/styles";
3881
4040
  import { jsx as jsx40 } from "react/jsx-runtime";
@@ -3896,7 +4055,7 @@ var SidebarItemIcon = ({
3896
4055
  var _a;
3897
4056
  const { collapsed } = useSidebar();
3898
4057
  const { isActive } = useSidebarItemContext();
3899
- const iconWithSize = React14.isValidElement(children) ? React14.cloneElement(children, __spreadProps(__spreadValues({}, children.props), {
4058
+ const iconWithSize = React17.isValidElement(children) ? React17.cloneElement(children, __spreadProps(__spreadValues({}, children.props), {
3900
4059
  size: (_a = children.props.size) != null ? _a : 20
3901
4060
  })) : children;
3902
4061
  return /* @__PURE__ */ jsx40(
@@ -4016,14 +4175,14 @@ var SidebarItemPopover = styled29(Popover2, {
4016
4175
  })({
4017
4176
  pointerEvents: "none"
4018
4177
  });
4019
- var SidebarItemPopoverList = styled29(List2, {
4178
+ var SidebarItemPopoverList = styled29(MenuList, {
4020
4179
  name: "MuiSidebar",
4021
4180
  slot: "ItemPopoverList"
4022
4181
  })(({ theme }) => ({
4023
4182
  padding: theme.spacing(0.5),
4024
4183
  pointerEvents: "auto"
4025
4184
  }));
4026
- var SidebarItemPopoverButton = styled29(ListItemButton, {
4185
+ var SidebarItemPopoverButton = styled29(MenuItem4, {
4027
4186
  name: "MuiSidebar",
4028
4187
  slot: "ItemPopoverButton"
4029
4188
  })(({ theme }) => ({
@@ -4047,9 +4206,9 @@ var CHILD_DISPLAY_NAMES = [
4047
4206
  var separateChildren2 = (children) => {
4048
4207
  const composableChildren = [];
4049
4208
  const nestedItems = [];
4050
- React15.Children.toArray(children).forEach((child) => {
4209
+ React18.Children.toArray(children).forEach((child) => {
4051
4210
  var _a;
4052
- if (React15.isValidElement(child)) {
4211
+ if (React18.isValidElement(child)) {
4053
4212
  const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
4054
4213
  if (displayName && CHILD_DISPLAY_NAMES.includes(displayName)) {
4055
4214
  composableChildren.push(child);
@@ -4064,9 +4223,9 @@ var separateChildren2 = (children) => {
4064
4223
  };
4065
4224
  var getTooltipLabel = (children) => {
4066
4225
  let tooltipLabel = "";
4067
- React15.Children.forEach(children, (child) => {
4226
+ React18.Children.forEach(children, (child) => {
4068
4227
  var _a;
4069
- if (React15.isValidElement(child)) {
4228
+ if (React18.isValidElement(child)) {
4070
4229
  const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
4071
4230
  const props = child.props;
4072
4231
  if (displayName === "SidebarItemLabel" && props.children) {
@@ -4079,9 +4238,9 @@ var getTooltipLabel = (children) => {
4079
4238
  var extractItemContent = (itemChildren) => {
4080
4239
  let icon = null;
4081
4240
  let label = "";
4082
- React15.Children.forEach(itemChildren, (child) => {
4241
+ React18.Children.forEach(itemChildren, (child) => {
4083
4242
  var _a;
4084
- if (React15.isValidElement(child)) {
4243
+ if (React18.isValidElement(child)) {
4085
4244
  const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
4086
4245
  const props = child.props;
4087
4246
  if (displayName === "SidebarItemIcon") {
@@ -4105,17 +4264,37 @@ var SidebarItem = ({
4105
4264
  const hasNestedItems = nestedItems.length > 0;
4106
4265
  const isActive = activeItem === id;
4107
4266
  const isExpanded = expandedMenus[id] || false;
4108
- const hasActiveChild = React15.useMemo(() => {
4267
+ const hasActiveChild = React18.useMemo(() => {
4109
4268
  if (!hasNestedItems || !activeItem) return false;
4110
4269
  return nestedItems.some((child) => {
4111
- if (React15.isValidElement(child)) {
4270
+ if (React18.isValidElement(child)) {
4112
4271
  return child.props.id === activeItem;
4113
4272
  }
4114
4273
  return false;
4115
4274
  });
4116
4275
  }, [hasNestedItems, nestedItems, activeItem]);
4117
- const [popoverAnchor, setPopoverAnchor] = React15.useState(null);
4276
+ const [popoverAnchor, setPopoverAnchor] = React18.useState(null);
4277
+ const [popoverOpenedByClick, setPopoverOpenedByClick] = React18.useState(false);
4278
+ const closeTimeoutRef = React18.useRef(null);
4118
4279
  const popoverOpen = Boolean(popoverAnchor);
4280
+ const popoverId = React18.useId();
4281
+ const clearCloseTimeout = React18.useCallback(() => {
4282
+ if (closeTimeoutRef.current != null) {
4283
+ clearTimeout(closeTimeoutRef.current);
4284
+ closeTimeoutRef.current = null;
4285
+ }
4286
+ }, []);
4287
+ const closePopover = React18.useCallback(() => {
4288
+ clearCloseTimeout();
4289
+ setPopoverAnchor(null);
4290
+ setPopoverOpenedByClick(false);
4291
+ }, [clearCloseTimeout]);
4292
+ React18.useEffect(() => () => clearCloseTimeout(), [clearCloseTimeout]);
4293
+ React18.useEffect(() => {
4294
+ if (!collapsed) {
4295
+ closePopover();
4296
+ }
4297
+ }, [collapsed, closePopover]);
4119
4298
  const contextValue = {
4120
4299
  id,
4121
4300
  isActive,
@@ -4123,8 +4302,17 @@ var SidebarItem = ({
4123
4302
  hasChildren: hasNestedItems,
4124
4303
  depth
4125
4304
  };
4126
- const handleClick = () => {
4127
- if (hasNestedItems) {
4305
+ const handleClick = (event) => {
4306
+ if (collapsed && hasNestedItems) {
4307
+ const nextAnchor = popoverAnchor ? null : event.currentTarget;
4308
+ clearCloseTimeout();
4309
+ setPopoverAnchor(nextAnchor);
4310
+ setPopoverOpenedByClick(Boolean(nextAnchor));
4311
+ const shouldBeExpanded = Boolean(nextAnchor);
4312
+ if (isExpanded !== shouldBeExpanded) {
4313
+ onToggleExpand == null ? void 0 : onToggleExpand(id);
4314
+ }
4315
+ } else if (hasNestedItems) {
4128
4316
  onToggleExpand == null ? void 0 : onToggleExpand(id);
4129
4317
  } else {
4130
4318
  onSelect == null ? void 0 : onSelect(id);
@@ -4132,11 +4320,22 @@ var SidebarItem = ({
4132
4320
  };
4133
4321
  const handleMouseEnter = (event) => {
4134
4322
  if (collapsed && hasNestedItems) {
4323
+ clearCloseTimeout();
4135
4324
  setPopoverAnchor(event.currentTarget);
4325
+ setPopoverOpenedByClick(false);
4326
+ if (!isExpanded) {
4327
+ onToggleExpand == null ? void 0 : onToggleExpand(id);
4328
+ }
4136
4329
  }
4137
4330
  };
4138
4331
  const handleMouseLeave = () => {
4139
- setPopoverAnchor(null);
4332
+ if (popoverOpenedByClick) {
4333
+ return;
4334
+ }
4335
+ clearCloseTimeout();
4336
+ closeTimeoutRef.current = setTimeout(() => {
4337
+ closePopover();
4338
+ }, 100);
4140
4339
  };
4141
4340
  const tooltipLabel = getTooltipLabel(children);
4142
4341
  const ownerState = { collapsed, depth };
@@ -4148,18 +4347,22 @@ var SidebarItem = ({
4148
4347
  onClick: handleClick,
4149
4348
  ownerState,
4150
4349
  sx,
4350
+ "aria-label": collapsed && tooltipLabel ? tooltipLabel : void 0,
4351
+ "aria-expanded": hasNestedItems ? collapsed ? popoverOpen : isExpanded : void 0,
4352
+ "aria-haspopup": collapsed && hasNestedItems ? "menu" : void 0,
4353
+ "aria-controls": popoverOpen ? popoverId : void 0,
4151
4354
  children: /* @__PURE__ */ jsxs13(SidebarItemProvider, { value: contextValue, children: [
4152
4355
  composableChildren,
4153
- !collapsed && hasNestedItems && /* @__PURE__ */ jsx43(SidebarItemChevron, { children: isExpanded ? /* @__PURE__ */ jsx43(ChevronUp, { size: 16 }) : /* @__PURE__ */ jsx43(ChevronDown2, { size: 16 }) }),
4356
+ !collapsed && hasNestedItems && /* @__PURE__ */ jsx43(SidebarItemChevron, { "aria-hidden": "true", children: isExpanded ? /* @__PURE__ */ jsx43(ChevronUp, { size: 16 }) : /* @__PURE__ */ jsx43(ChevronDown2, { size: 16 }) }),
4154
4357
  !collapsed && !hasNestedItems && /* @__PURE__ */ jsx43(Box15, { sx: { ml: "auto", width: 16, pl: 1 } })
4155
4358
  ] })
4156
4359
  }
4157
4360
  );
4158
- const wrappedContent = link ? /* @__PURE__ */ jsx43(Fragment5, { children: React15.cloneElement(link, {}, buttonContent) }) : buttonContent;
4361
+ const wrappedContent = link ? /* @__PURE__ */ jsx43(Fragment5, { children: React18.cloneElement(link, {}, buttonContent) }) : buttonContent;
4159
4362
  const collapsedWithNested = collapsed && hasNestedItems;
4160
4363
  const handlePopoverItemClick = (itemId) => {
4161
4364
  onSelect == null ? void 0 : onSelect(itemId);
4162
- setPopoverAnchor(null);
4365
+ closePopover();
4163
4366
  };
4164
4367
  return /* @__PURE__ */ jsxs13(Fragment5, { children: [
4165
4368
  /* @__PURE__ */ jsx43(
@@ -4181,39 +4384,49 @@ var SidebarItem = ({
4181
4384
  anchorEl: popoverAnchor,
4182
4385
  anchorOrigin: { vertical: "center", horizontal: "right" },
4183
4386
  transformOrigin: { vertical: "center", horizontal: "left" },
4184
- onClose: handleMouseLeave,
4185
- disableRestoreFocus: true,
4387
+ onClose: closePopover,
4388
+ disableAutoFocus: !popoverOpenedByClick,
4389
+ disableEnforceFocus: !popoverOpenedByClick,
4390
+ disableRestoreFocus: !popoverOpenedByClick,
4186
4391
  slotProps: {
4187
4392
  paper: {
4188
- onMouseEnter: () => setPopoverAnchor(popoverAnchor),
4393
+ onMouseEnter: clearCloseTimeout,
4189
4394
  onMouseLeave: handleMouseLeave
4190
4395
  }
4191
4396
  },
4192
- children: /* @__PURE__ */ jsx43(SidebarItemPopoverList, { disablePadding: true, children: nestedItems.map((child, index) => {
4193
- if (React15.isValidElement(child)) {
4194
- const childProps = child.props;
4195
- const { icon, label } = extractItemContent(childProps.children);
4196
- const isItemActive = activeItem === childProps.id;
4197
- return /* @__PURE__ */ jsxs13(
4198
- SidebarItemPopoverButton,
4199
- {
4200
- selected: isItemActive,
4201
- onClick: () => handlePopoverItemClick(childProps.id),
4202
- children: [
4203
- icon && /* @__PURE__ */ jsx43(ListItemIcon2, { sx: { minWidth: "auto" }, children: icon }),
4204
- /* @__PURE__ */ jsx43(ListItemText2, { primary: label })
4205
- ]
4206
- },
4207
- childProps.id || index
4208
- );
4397
+ children: /* @__PURE__ */ jsx43(
4398
+ SidebarItemPopoverList,
4399
+ {
4400
+ id: popoverId,
4401
+ autoFocusItem: popoverOpen && popoverOpenedByClick,
4402
+ disablePadding: true,
4403
+ children: nestedItems.map((child, index) => {
4404
+ if (React18.isValidElement(child)) {
4405
+ const childProps = child.props;
4406
+ const { icon, label } = extractItemContent(childProps.children);
4407
+ const isItemActive = activeItem === childProps.id;
4408
+ return /* @__PURE__ */ jsxs13(
4409
+ SidebarItemPopoverButton,
4410
+ {
4411
+ selected: isItemActive,
4412
+ onClick: () => handlePopoverItemClick(childProps.id),
4413
+ children: [
4414
+ icon && /* @__PURE__ */ jsx43(ListItemIcon2, { sx: { minWidth: "auto" }, children: icon }),
4415
+ /* @__PURE__ */ jsx43(ListItemText2, { primary: label })
4416
+ ]
4417
+ },
4418
+ childProps.id || index
4419
+ );
4420
+ }
4421
+ return child;
4422
+ })
4209
4423
  }
4210
- return child;
4211
- }) })
4424
+ )
4212
4425
  }
4213
4426
  ),
4214
4427
  hasNestedItems && !collapsed && /* @__PURE__ */ jsx43(Collapse, { in: isExpanded, timeout: "auto", unmountOnExit: true, children: /* @__PURE__ */ jsx43(List2, { disablePadding: true, children: nestedItems.map((child, index) => {
4215
- if (React15.isValidElement(child)) {
4216
- return React15.cloneElement(child, {
4428
+ if (React18.isValidElement(child)) {
4429
+ return React18.cloneElement(child, {
4217
4430
  key: child.key || index,
4218
4431
  depth: depth + 1
4219
4432
  });
@@ -4248,7 +4461,7 @@ var SidebarFooter = ({
4248
4461
  };
4249
4462
 
4250
4463
  // src/components/Sidebar/SidebarUser.tsx
4251
- import * as React16 from "react";
4464
+ import * as React19 from "react";
4252
4465
  import Box17 from "@mui/material/Box";
4253
4466
  import ListItemButton2 from "@mui/material/ListItemButton";
4254
4467
  import Tooltip4 from "@mui/material/Tooltip";
@@ -4373,9 +4586,9 @@ var SidebarUserTextContainer = styled34(Box17, {
4373
4586
  var separateChildren3 = (children) => {
4374
4587
  let avatarChild = null;
4375
4588
  const textChildren = [];
4376
- React16.Children.forEach(children, (child) => {
4589
+ React19.Children.forEach(children, (child) => {
4377
4590
  var _a;
4378
- if (React16.isValidElement(child)) {
4591
+ if (React19.isValidElement(child)) {
4379
4592
  const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
4380
4593
  if (displayName === "SidebarUserAvatar") {
4381
4594
  avatarChild = child;
@@ -4388,9 +4601,9 @@ var separateChildren3 = (children) => {
4388
4601
  };
4389
4602
  var getTooltipText = (children) => {
4390
4603
  let tooltipText = "";
4391
- React16.Children.forEach(children, (child) => {
4604
+ React19.Children.forEach(children, (child) => {
4392
4605
  var _a;
4393
- if (React16.isValidElement(child)) {
4606
+ if (React19.isValidElement(child)) {
4394
4607
  const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
4395
4608
  const props = child.props;
4396
4609
  if (displayName === "SidebarUserName" && props.children) {
@@ -4460,10 +4673,10 @@ var Sidebar = ({
4460
4673
  sx
4461
4674
  }) => {
4462
4675
  var _a, _b, _c;
4463
- const appShellContext = React17.useContext(AppShellContext);
4676
+ const appShellContext = React20.useContext(AppShellContext);
4464
4677
  const collapsed = (_a = collapsedProp != null ? collapsedProp : appShellContext == null ? void 0 : appShellContext.state.sidebarCollapsed) != null ? _a : false;
4465
4678
  const activeItem = activeItemProp != null ? activeItemProp : appShellContext == null ? void 0 : appShellContext.state.activeMenuItem;
4466
- const expandedMenus = React17.useMemo(
4679
+ const expandedMenus = React20.useMemo(
4467
4680
  () => {
4468
4681
  var _a2;
4469
4682
  return (_a2 = expandedMenusProp != null ? expandedMenusProp : appShellContext == null ? void 0 : appShellContext.state.expandedMenus) != null ? _a2 : {};
@@ -4474,7 +4687,7 @@ var Sidebar = ({
4474
4687
  const onToggleExpand = onToggleExpandProp != null ? onToggleExpandProp : appShellContext == null ? void 0 : appShellContext.actions.toggleMenu;
4475
4688
  const width = (_b = widthProp != null ? widthProp : appShellContext == null ? void 0 : appShellContext.state.sidebarWidth) != null ? _b : SIDEBAR_WIDTH;
4476
4689
  const collapsedWidth = (_c = collapsedWidthProp != null ? collapsedWidthProp : appShellContext == null ? void 0 : appShellContext.state.sidebarCollapsedWidth) != null ? _c : COLLAPSED_SIDEBAR_WIDTH;
4477
- const contextValue = React17.useMemo(
4690
+ const contextValue = React20.useMemo(
4478
4691
  () => ({
4479
4692
  collapsed,
4480
4693
  activeItem,
@@ -4502,15 +4715,17 @@ Sidebar.UserEmail = SidebarUserEmail;
4502
4715
  Sidebar.displayName = "Sidebar";
4503
4716
 
4504
4717
  // src/components/NotificationPanel/NotificationPanel.tsx
4505
- import * as React23 from "react";
4718
+ import * as React26 from "react";
4719
+ import Box27 from "@mui/material/Box";
4506
4720
  import Drawer from "@mui/material/Drawer";
4507
4721
  import { styled as styled51 } from "@mui/material/styles";
4722
+ import { visuallyHidden as visuallyHidden3 } from "@mui/utils";
4508
4723
 
4509
4724
  // src/components/NotificationPanel/context.ts
4510
- import * as React18 from "react";
4511
- var NotificationPanelContext = React18.createContext(null);
4725
+ import * as React21 from "react";
4726
+ var NotificationPanelContext = React21.createContext(null);
4512
4727
  var useNotificationPanel = () => {
4513
- const context = React18.useContext(NotificationPanelContext);
4728
+ const context = React21.useContext(NotificationPanelContext);
4514
4729
  if (!context) {
4515
4730
  throw new Error(
4516
4731
  "NotificationPanel compound components must be used within NotificationPanel"
@@ -4520,7 +4735,7 @@ var useNotificationPanel = () => {
4520
4735
  };
4521
4736
 
4522
4737
  // src/components/NotificationPanel/NotificationHeader.tsx
4523
- import * as React19 from "react";
4738
+ import * as React22 from "react";
4524
4739
  import Box19 from "@mui/material/Box";
4525
4740
  import { styled as styled36 } from "@mui/material/styles";
4526
4741
  import { jsx as jsx50, jsxs as jsxs16 } from "react/jsx-runtime";
@@ -4545,9 +4760,9 @@ var NotificationHeaderContent = styled36(Box19, {
4545
4760
  var separateChildren4 = (children) => {
4546
4761
  const leftChildren = [];
4547
4762
  let closeChild = null;
4548
- React19.Children.forEach(children, (child) => {
4763
+ React22.Children.forEach(children, (child) => {
4549
4764
  var _a;
4550
- if (React19.isValidElement(child)) {
4765
+ if (React22.isValidElement(child)) {
4551
4766
  const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
4552
4767
  if (displayName === "NotificationHeaderClose") {
4553
4768
  closeChild = child;
@@ -4654,7 +4869,16 @@ var NotificationHeaderClose = ({
4654
4869
  onClose == null ? void 0 : onClose();
4655
4870
  }
4656
4871
  };
4657
- return /* @__PURE__ */ jsx54(NotificationHeaderCloseRoot, { onClick: handleClick, size: "small", sx, children: children || /* @__PURE__ */ jsx54(X2, { size: 20 }) });
4872
+ return /* @__PURE__ */ jsx54(
4873
+ NotificationHeaderCloseRoot,
4874
+ {
4875
+ onClick: handleClick,
4876
+ size: "small",
4877
+ sx,
4878
+ "aria-label": "Close notifications",
4879
+ children: children || /* @__PURE__ */ jsx54(X2, { size: 20, "aria-hidden": "true" })
4880
+ }
4881
+ );
4658
4882
  };
4659
4883
  NotificationHeaderClose.displayName = "NotificationHeaderClose";
4660
4884
 
@@ -4786,7 +5010,7 @@ var NotificationActions = ({
4786
5010
  };
4787
5011
 
4788
5012
  // src/components/NotificationPanel/NotificationList.tsx
4789
- import * as React20 from "react";
5013
+ import * as React23 from "react";
4790
5014
  import Box23 from "@mui/material/Box";
4791
5015
  import List3 from "@mui/material/List";
4792
5016
  import Divider6 from "@mui/material/Divider";
@@ -4804,15 +5028,15 @@ var NotificationList = ({
4804
5028
  showDividers = true,
4805
5029
  sx
4806
5030
  }) => {
4807
- const childArray = React20.Children.toArray(children);
4808
- return /* @__PURE__ */ jsx57(NotificationListRoot, { sx, children: /* @__PURE__ */ jsx57(List3, { disablePadding: true, children: childArray.map((child, index) => /* @__PURE__ */ jsxs19(React20.Fragment, { children: [
5031
+ const childArray = React23.Children.toArray(children);
5032
+ return /* @__PURE__ */ jsx57(NotificationListRoot, { sx, children: /* @__PURE__ */ jsx57(List3, { disablePadding: true, children: childArray.map((child, index) => /* @__PURE__ */ jsxs19(React23.Fragment, { children: [
4809
5033
  child,
4810
5034
  showDividers && index < childArray.length - 1 && /* @__PURE__ */ jsx57(Divider6, {})
4811
5035
  ] }, index)) }) });
4812
5036
  };
4813
5037
 
4814
5038
  // src/components/NotificationPanel/NotificationItem.tsx
4815
- import * as React22 from "react";
5039
+ import * as React25 from "react";
4816
5040
  import Box24 from "@mui/material/Box";
4817
5041
  import ListItem2 from "@mui/material/ListItem";
4818
5042
  import ListItemButton3 from "@mui/material/ListItemButton";
@@ -4858,11 +5082,11 @@ var getNotificationTypeProps = (type) => {
4858
5082
  };
4859
5083
 
4860
5084
  // src/components/NotificationPanel/NotificationItemContext.tsx
4861
- import * as React21 from "react";
5085
+ import * as React24 from "react";
4862
5086
  import { jsx as jsx58 } from "react/jsx-runtime";
4863
- var NotificationItemContext = React21.createContext(null);
5087
+ var NotificationItemContext = React24.createContext(null);
4864
5088
  var useNotificationItemContext = () => {
4865
- const context = React21.useContext(NotificationItemContext);
5089
+ const context = React24.useContext(NotificationItemContext);
4866
5090
  if (!context) {
4867
5091
  throw new Error(
4868
5092
  "useNotificationItemContext must be used within a NotificationItem component"
@@ -4916,9 +5140,9 @@ var separateChildren5 = (children) => {
4916
5140
  let messageChild = null;
4917
5141
  let timestampChild = null;
4918
5142
  let actionChild = null;
4919
- React22.Children.forEach(children, (child) => {
5143
+ React25.Children.forEach(children, (child) => {
4920
5144
  var _a;
4921
- if (React22.isValidElement(child)) {
5145
+ if (React25.isValidElement(child)) {
4922
5146
  const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
4923
5147
  switch (displayName) {
4924
5148
  case "NotificationItemAvatar":
@@ -4977,11 +5201,12 @@ var NotificationItem = ({
4977
5201
  NotificationItemDismiss,
4978
5202
  {
4979
5203
  size: "small",
5204
+ "aria-label": "Dismiss notification",
4980
5205
  onClick: (e) => {
4981
5206
  e.stopPropagation();
4982
5207
  onDismiss(id);
4983
5208
  },
4984
- children: /* @__PURE__ */ jsx59(X3, { size: 16 })
5209
+ children: /* @__PURE__ */ jsx59(X3, { size: 16, "aria-hidden": "true" })
4985
5210
  }
4986
5211
  ),
4987
5212
  sx,
@@ -5198,7 +5423,7 @@ var NotificationEmptyState = ({
5198
5423
  };
5199
5424
 
5200
5425
  // src/components/NotificationPanel/NotificationPanel.tsx
5201
- import { jsx as jsx66 } from "react/jsx-runtime";
5426
+ import { jsx as jsx66, jsxs as jsxs23 } from "react/jsx-runtime";
5202
5427
  var NotificationPanelRoot = styled51(Drawer, {
5203
5428
  name: "MuiNotificationPanel",
5204
5429
  slot: "Root",
@@ -5221,12 +5446,14 @@ var NotificationPanel = ({
5221
5446
  width = 380,
5222
5447
  anchor = "right",
5223
5448
  variant = "temporary",
5449
+ "aria-label": ariaLabelProp,
5450
+ liveAnnouncement: liveAnnouncementProp,
5224
5451
  sx
5225
5452
  }) => {
5226
5453
  var _a;
5227
- const appShellContext = React23.useContext(AppShellContext);
5454
+ const appShellContext = React26.useContext(AppShellContext);
5228
5455
  const open = (_a = openProp != null ? openProp : appShellContext == null ? void 0 : appShellContext.state.notificationPanelOpen) != null ? _a : false;
5229
- const onClose = React23.useMemo(
5456
+ const onClose = React26.useMemo(
5230
5457
  () => {
5231
5458
  var _a2;
5232
5459
  return (_a2 = onCloseProp != null ? onCloseProp : appShellContext == null ? void 0 : appShellContext.actions.toggleNotificationPanel) != null ? _a2 : (() => {
@@ -5234,9 +5461,42 @@ var NotificationPanel = ({
5234
5461
  },
5235
5462
  [onCloseProp, appShellContext == null ? void 0 : appShellContext.actions.toggleNotificationPanel]
5236
5463
  );
5237
- const contextValue = React23.useMemo(() => ({ onClose }), [onClose]);
5464
+ const ariaLabel = typeof ariaLabelProp === "string" && ariaLabelProp.trim().length > 0 ? ariaLabelProp.trim() : "Notifications";
5465
+ const [liveAnnouncement, setLiveAnnouncementState] = React26.useState("");
5466
+ const [liveAnnouncementNonce, setLiveAnnouncementNonce] = React26.useState(0);
5467
+ const prevLiveAnnouncementPropRef = React26.useRef(void 0);
5468
+ const publishLiveAnnouncement = React26.useCallback(
5469
+ (message) => {
5470
+ if (!open) return;
5471
+ setLiveAnnouncementState(message);
5472
+ setLiveAnnouncementNonce((n) => n + 1);
5473
+ },
5474
+ [open]
5475
+ );
5476
+ React26.useEffect(() => {
5477
+ if (!open) {
5478
+ setLiveAnnouncementState("");
5479
+ prevLiveAnnouncementPropRef.current = liveAnnouncementProp;
5480
+ return;
5481
+ }
5482
+ const prev = prevLiveAnnouncementPropRef.current;
5483
+ prevLiveAnnouncementPropRef.current = liveAnnouncementProp;
5484
+ if (liveAnnouncementProp === void 0) {
5485
+ if (prev !== void 0) {
5486
+ setLiveAnnouncementState("");
5487
+ }
5488
+ return;
5489
+ }
5490
+ if (liveAnnouncementProp !== prev) {
5491
+ publishLiveAnnouncement(liveAnnouncementProp);
5492
+ }
5493
+ }, [open, liveAnnouncementProp, publishLiveAnnouncement]);
5494
+ const contextValue = React26.useMemo(
5495
+ () => ({ onClose, open, setLiveAnnouncement: publishLiveAnnouncement }),
5496
+ [onClose, open, publishLiveAnnouncement]
5497
+ );
5238
5498
  const ownerState = { width };
5239
- return /* @__PURE__ */ jsx66(NotificationPanelContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx66(
5499
+ return /* @__PURE__ */ jsx66(NotificationPanelContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs23(
5240
5500
  NotificationPanelRoot,
5241
5501
  {
5242
5502
  anchor,
@@ -5245,7 +5505,27 @@ var NotificationPanel = ({
5245
5505
  ownerState,
5246
5506
  sx,
5247
5507
  variant,
5248
- children
5508
+ slotProps: {
5509
+ paper: {
5510
+ "aria-label": ariaLabel
5511
+ }
5512
+ },
5513
+ children: [
5514
+ /* @__PURE__ */ jsx66(
5515
+ Box27,
5516
+ {
5517
+ component: "div",
5518
+ role: "status",
5519
+ "aria-live": "polite",
5520
+ "aria-atomic": "true",
5521
+ sx: visuallyHidden3,
5522
+ "data-testid": "notification-panel-live-region",
5523
+ children: liveAnnouncement
5524
+ },
5525
+ liveAnnouncementNonce
5526
+ ),
5527
+ children
5528
+ ]
5249
5529
  }
5250
5530
  ) });
5251
5531
  };
@@ -5267,8 +5547,8 @@ NotificationPanel.EmptyState = NotificationEmptyState;
5267
5547
  NotificationPanel.displayName = "NotificationPanel";
5268
5548
 
5269
5549
  // src/components/Footer/Footer.tsx
5270
- import * as React24 from "react";
5271
- import Box27 from "@mui/material/Box";
5550
+ import * as React27 from "react";
5551
+ import Box28 from "@mui/material/Box";
5272
5552
  import { styled as styled55 } from "@mui/material/styles";
5273
5553
 
5274
5554
  // src/components/Footer/FooterCopyright.tsx
@@ -5294,7 +5574,9 @@ var StyledVersion = styled53(Typography17, {
5294
5574
  name: "MuiFooter",
5295
5575
  slot: "Version"
5296
5576
  })(({ theme }) => ({
5297
- color: (theme.vars || theme).palette.text.disabled,
5577
+ // text.secondary (not text.disabled) so the version text keeps a
5578
+ // WCAG AA compliant 4.5:1 contrast ratio at this small size.
5579
+ color: (theme.vars || theme).palette.text.secondary,
5298
5580
  fontFamily: "monospace",
5299
5581
  fontSize: 11
5300
5582
  }));
@@ -5339,8 +5621,8 @@ var FooterDivider = () => {
5339
5621
  FooterDivider.displayName = "Footer.Divider";
5340
5622
 
5341
5623
  // src/components/Footer/Footer.tsx
5342
- import { jsx as jsx71, jsxs as jsxs23 } from "react/jsx-runtime";
5343
- var FooterRoot = styled55(Box27, {
5624
+ import { jsx as jsx71, jsxs as jsxs24 } from "react/jsx-runtime";
5625
+ var FooterRoot = styled55(Box28, {
5344
5626
  name: "MuiFooter",
5345
5627
  slot: "Root"
5346
5628
  })(({ theme }) => ({
@@ -5353,7 +5635,7 @@ var FooterRoot = styled55(Box27, {
5353
5635
  borderTop: `1px solid ${(theme.vars || theme).palette.divider}`,
5354
5636
  backgroundColor: (theme.vars || theme).palette.background.paper
5355
5637
  }));
5356
- var FooterContent = styled55(Box27, {
5638
+ var FooterContent = styled55(Box28, {
5357
5639
  name: "MuiFooter",
5358
5640
  slot: "Content"
5359
5641
  })(({ theme }) => ({
@@ -5367,7 +5649,7 @@ var FooterContent = styled55(Box27, {
5367
5649
  alignItems: "center"
5368
5650
  }
5369
5651
  }));
5370
- var FooterLeft = styled55(Box27, {
5652
+ var FooterLeft = styled55(Box28, {
5371
5653
  name: "MuiFooter",
5372
5654
  slot: "Left"
5373
5655
  })(({ theme }) => ({
@@ -5376,7 +5658,7 @@ var FooterLeft = styled55(Box27, {
5376
5658
  gap: theme.spacing(2),
5377
5659
  flexWrap: "wrap"
5378
5660
  }));
5379
- var FooterRight = styled55(Box27, {
5661
+ var FooterRight = styled55(Box28, {
5380
5662
  name: "MuiFooter",
5381
5663
  slot: "Right"
5382
5664
  })(({ theme }) => ({
@@ -5386,11 +5668,11 @@ var FooterRight = styled55(Box27, {
5386
5668
  flexWrap: "wrap"
5387
5669
  }));
5388
5670
  var Footer = ({ children, sx }) => {
5389
- const childrenArray = React24.Children.toArray(children);
5671
+ const childrenArray = React27.Children.toArray(children);
5390
5672
  const leftChildren = [];
5391
5673
  const rightChildren = [];
5392
5674
  childrenArray.forEach((child) => {
5393
- if (React24.isValidElement(child)) {
5675
+ if (React27.isValidElement(child)) {
5394
5676
  if (child.type === FooterCopyright || child.type === FooterVersion || child.type === FooterDivider) {
5395
5677
  leftChildren.push(child);
5396
5678
  } else if (child.type === FooterLink) {
@@ -5398,7 +5680,7 @@ var Footer = ({ children, sx }) => {
5398
5680
  }
5399
5681
  }
5400
5682
  });
5401
- return /* @__PURE__ */ jsx71(FooterRoot, { component: "footer", sx, children: /* @__PURE__ */ jsxs23(FooterContent, { children: [
5683
+ return /* @__PURE__ */ jsx71(FooterRoot, { component: "footer", sx, children: /* @__PURE__ */ jsxs24(FooterContent, { children: [
5402
5684
  leftChildren.length > 0 && /* @__PURE__ */ jsx71(FooterLeft, { children: leftChildren }),
5403
5685
  rightChildren.length > 0 && /* @__PURE__ */ jsx71(FooterRight, { children: rightChildren })
5404
5686
  ] }) });
@@ -5410,14 +5692,14 @@ Footer.Divider = FooterDivider;
5410
5692
  Footer.displayName = "Footer";
5411
5693
 
5412
5694
  // src/components/UserMenu/UserMenu.tsx
5413
- import * as React28 from "react";
5414
- import Menu2 from "@mui/material/Menu";
5695
+ import * as React32 from "react";
5696
+ import Menu3 from "@mui/material/Menu";
5415
5697
 
5416
5698
  // src/components/UserMenu/UserMenuContext.tsx
5417
- import * as React25 from "react";
5418
- var UserMenuContext = React25.createContext(void 0);
5699
+ import * as React28 from "react";
5700
+ var UserMenuContext = React28.createContext(void 0);
5419
5701
  var useUserMenu = () => {
5420
- const context = React25.useContext(UserMenuContext);
5702
+ const context = React28.useContext(UserMenuContext);
5421
5703
  if (!context) {
5422
5704
  throw new Error("UserMenu sub-components must be used within a UserMenu component");
5423
5705
  }
@@ -5426,11 +5708,33 @@ var useUserMenu = () => {
5426
5708
  UserMenuContext.displayName = "UserMenu.Context";
5427
5709
 
5428
5710
  // src/components/UserMenu/UserMenuTrigger.tsx
5711
+ import * as React29 from "react";
5429
5712
  import Tooltip5 from "@mui/material/Tooltip";
5430
5713
  import IconButton6 from "@mui/material/IconButton";
5431
5714
  import Avatar4 from "@mui/material/Avatar";
5432
5715
  import { styled as styled56 } from "@mui/material/styles";
5433
- import { jsx as jsx72, jsxs as jsxs24 } from "react/jsx-runtime";
5716
+
5717
+ // src/components/UserMenu/getUserMenuAvatarProps.ts
5718
+ var IMAGE_URL_PATTERN = /^(https?:|\/|data:|blob:)/i;
5719
+ function isUserMenuAvatarImageUrl(value) {
5720
+ return IMAGE_URL_PATTERN.test(value);
5721
+ }
5722
+ function getUserMenuAvatarProps(name, avatar) {
5723
+ const nameInitial = name.charAt(0);
5724
+ if (!avatar) {
5725
+ return { children: nameInitial };
5726
+ }
5727
+ if (isUserMenuAvatarImageUrl(avatar)) {
5728
+ return {
5729
+ src: avatar,
5730
+ children: nameInitial
5731
+ };
5732
+ }
5733
+ return { children: avatar };
5734
+ }
5735
+
5736
+ // src/components/UserMenu/UserMenuTrigger.tsx
5737
+ import { jsx as jsx72, jsxs as jsxs25 } from "react/jsx-runtime";
5434
5738
  var StyledTrigger = styled56(IconButton6, {
5435
5739
  name: "MuiUserMenu",
5436
5740
  slot: "Trigger",
@@ -5465,43 +5769,53 @@ var StyledNameText = styled56("span", {
5465
5769
  display: "block"
5466
5770
  }
5467
5771
  }));
5468
- var UserMenuTrigger = ({ name, avatar, showName = false }) => {
5469
- const { open, handleOpen } = useUserMenu();
5470
- return /* @__PURE__ */ jsx72(Tooltip5, { title: "Account", children: /* @__PURE__ */ jsxs24(
5471
- StyledTrigger,
5472
- {
5473
- onClick: handleOpen,
5474
- size: "small",
5475
- showName,
5476
- "aria-label": showName ? name : "Account",
5477
- "aria-controls": open ? "user-menu" : void 0,
5478
- "aria-haspopup": "true",
5479
- "aria-expanded": open ? "true" : void 0,
5480
- children: [
5481
- /* @__PURE__ */ jsx72(StyledAvatar2, { src: avatar || void 0, alt: name, children: !avatar && name.charAt(0) }),
5482
- showName && /* @__PURE__ */ jsx72(StyledNameText, { children: name })
5483
- ]
5484
- }
5485
- ) });
5486
- };
5772
+ var UserMenuTrigger = React29.forwardRef(
5773
+ function UserMenuTrigger2(_a, ref) {
5774
+ var _b = _a, { name, avatar, showName = false, onClick, "aria-label": ariaLabel } = _b, props = __objRest(_b, ["name", "avatar", "showName", "onClick", "aria-label"]);
5775
+ const { open, handleOpen } = useUserMenu();
5776
+ const avatarProps = getUserMenuAvatarProps(name, avatar);
5777
+ const defaultAriaLabel = showName ? name : "Account";
5778
+ const resolvedAriaLabel = typeof ariaLabel === "string" && ariaLabel.trim().length > 0 ? ariaLabel : defaultAriaLabel;
5779
+ return /* @__PURE__ */ jsx72(Tooltip5, { title: "Account", children: /* @__PURE__ */ jsxs25(
5780
+ StyledTrigger,
5781
+ __spreadProps(__spreadValues({}, props), {
5782
+ ref,
5783
+ onClick: (event) => {
5784
+ handleOpen(event);
5785
+ onClick == null ? void 0 : onClick(event);
5786
+ },
5787
+ size: "small",
5788
+ showName,
5789
+ "aria-label": resolvedAriaLabel,
5790
+ "aria-controls": open ? "user-menu" : void 0,
5791
+ "aria-haspopup": "true",
5792
+ "aria-expanded": open ? "true" : void 0,
5793
+ children: [
5794
+ /* @__PURE__ */ jsx72(StyledAvatar2, { src: avatarProps.src, alt: name, children: avatarProps.children }),
5795
+ showName && /* @__PURE__ */ jsx72(StyledNameText, { children: name })
5796
+ ]
5797
+ })
5798
+ ) });
5799
+ }
5800
+ );
5487
5801
  UserMenuTrigger.displayName = "UserMenu.Trigger";
5488
5802
 
5489
5803
  // src/components/UserMenu/UserMenuHeader.tsx
5490
5804
  import Divider8 from "@mui/material/Divider";
5491
- import Box28 from "@mui/material/Box";
5805
+ import Box29 from "@mui/material/Box";
5492
5806
  import Avatar5 from "@mui/material/Avatar";
5493
5807
  import Typography18 from "@mui/material/Typography";
5494
5808
  import Chip5 from "@mui/material/Chip";
5495
5809
  import { styled as styled57 } from "@mui/material/styles";
5496
- import { Fragment as Fragment9, jsx as jsx73, jsxs as jsxs25 } from "react/jsx-runtime";
5497
- var StyledHeaderBox = styled57(Box28, {
5810
+ import { Fragment as Fragment9, jsx as jsx73, jsxs as jsxs26 } from "react/jsx-runtime";
5811
+ var StyledHeaderBox = styled57(Box29, {
5498
5812
  name: "MuiUserMenu",
5499
5813
  slot: "HeaderBox"
5500
5814
  })(({ theme }) => ({
5501
5815
  padding: theme.spacing(2),
5502
5816
  paddingBottom: theme.spacing(1.5)
5503
5817
  }));
5504
- var StyledHeaderContent = styled57(Box28, {
5818
+ var StyledHeaderContent = styled57(Box29, {
5505
5819
  name: "MuiUserMenu",
5506
5820
  slot: "HeaderContent"
5507
5821
  })(({ theme }) => ({
@@ -5520,7 +5834,7 @@ var StyledHeaderAvatar = styled57(Avatar5, {
5520
5834
  fontSize: 16,
5521
5835
  fontWeight: 600
5522
5836
  }));
5523
- var StyledUserInfo = styled57(Box28, {
5837
+ var StyledUserInfo = styled57(Box29, {
5524
5838
  name: "MuiUserMenu",
5525
5839
  slot: "UserInfo"
5526
5840
  })(({ theme }) => ({
@@ -5530,7 +5844,7 @@ var StyledUserInfo = styled57(Box28, {
5530
5844
  flex: 1,
5531
5845
  minWidth: 0
5532
5846
  }));
5533
- var StyledNameRow = styled57(Box28, {
5847
+ var StyledNameRow = styled57(Box29, {
5534
5848
  name: "MuiUserMenu",
5535
5849
  slot: "NameRow"
5536
5850
  })(({ theme }) => ({
@@ -5566,11 +5880,12 @@ var StyledEmail = styled57(Typography18, {
5566
5880
  textOverflow: "ellipsis"
5567
5881
  }));
5568
5882
  var UserMenuHeader = ({ name, email, avatar, role }) => {
5569
- return /* @__PURE__ */ jsxs25(Fragment9, { children: [
5570
- /* @__PURE__ */ jsx73(StyledHeaderBox, { children: /* @__PURE__ */ jsxs25(StyledHeaderContent, { children: [
5571
- /* @__PURE__ */ jsx73(StyledHeaderAvatar, { src: avatar || void 0, alt: name, children: !avatar && name.charAt(0) }),
5572
- /* @__PURE__ */ jsxs25(StyledUserInfo, { children: [
5573
- /* @__PURE__ */ jsxs25(StyledNameRow, { children: [
5883
+ const avatarProps = getUserMenuAvatarProps(name, avatar);
5884
+ return /* @__PURE__ */ jsxs26(Fragment9, { children: [
5885
+ /* @__PURE__ */ jsx73(StyledHeaderBox, { children: /* @__PURE__ */ jsxs26(StyledHeaderContent, { children: [
5886
+ /* @__PURE__ */ jsx73(StyledHeaderAvatar, { src: avatarProps.src, alt: name, children: avatarProps.children }),
5887
+ /* @__PURE__ */ jsxs26(StyledUserInfo, { children: [
5888
+ /* @__PURE__ */ jsxs26(StyledNameRow, { children: [
5574
5889
  /* @__PURE__ */ jsx73(StyledName, { variant: "subtitle2", children: name }),
5575
5890
  role && /* @__PURE__ */ jsx73(
5576
5891
  StyledRoleChip,
@@ -5590,16 +5905,16 @@ var UserMenuHeader = ({ name, email, avatar, role }) => {
5590
5905
  UserMenuHeader.displayName = "UserMenu.Header";
5591
5906
 
5592
5907
  // src/components/UserMenu/UserMenuItem.tsx
5593
- import * as React26 from "react";
5594
- import MenuItem4 from "@mui/material/MenuItem";
5908
+ import * as React30 from "react";
5909
+ import MenuItem5 from "@mui/material/MenuItem";
5595
5910
  import ListItemIcon3 from "@mui/material/ListItemIcon";
5596
5911
  import ListItemText4 from "@mui/material/ListItemText";
5597
- import Box29 from "@mui/material/Box";
5912
+ import Box30 from "@mui/material/Box";
5598
5913
  import Chip6 from "@mui/material/Chip";
5599
5914
  import { styled as styled58 } from "@mui/material/styles";
5600
5915
  import { ChevronRight as ChevronRight2 } from "@wso2/oxygen-ui-icons-react";
5601
- import { jsx as jsx74, jsxs as jsxs26 } from "react/jsx-runtime";
5602
- var StyledMenuItem2 = styled58(MenuItem4, {
5916
+ import { jsx as jsx74, jsxs as jsxs27 } from "react/jsx-runtime";
5917
+ var StyledMenuItem2 = styled58(MenuItem5, {
5603
5918
  name: "MuiUserMenu",
5604
5919
  slot: "MenuItem"
5605
5920
  })(({ theme }) => ({
@@ -5626,12 +5941,12 @@ var UserMenuItem = ({
5626
5941
  handleClose();
5627
5942
  onClick == null ? void 0 : onClick();
5628
5943
  };
5629
- return /* @__PURE__ */ jsxs26(StyledMenuItem2, { onClick: handleClick, children: [
5630
- icon && /* @__PURE__ */ jsx74(ListItemIcon3, { children: React26.isValidElement(icon) ? React26.cloneElement(icon, __spreadProps(__spreadValues({}, icon.props), {
5944
+ return /* @__PURE__ */ jsxs27(StyledMenuItem2, { onClick: handleClick, children: [
5945
+ icon && /* @__PURE__ */ jsx74(ListItemIcon3, { children: React30.isValidElement(icon) ? React30.cloneElement(icon, __spreadProps(__spreadValues({}, icon.props), {
5631
5946
  size: (_a = icon.props.size) != null ? _a : 18
5632
5947
  })) : icon }),
5633
5948
  /* @__PURE__ */ jsx74(ListItemText4, { primary: label }),
5634
- /* @__PURE__ */ jsxs26(Box29, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
5949
+ /* @__PURE__ */ jsxs27(Box30, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
5635
5950
  badge && /* @__PURE__ */ jsx74(
5636
5951
  StyledBillingChip,
5637
5952
  {
@@ -5647,13 +5962,13 @@ var UserMenuItem = ({
5647
5962
  UserMenuItem.displayName = "UserMenu.Item";
5648
5963
 
5649
5964
  // src/components/UserMenu/UserMenuLogout.tsx
5650
- import * as React27 from "react";
5651
- import MenuItem5 from "@mui/material/MenuItem";
5965
+ import * as React31 from "react";
5966
+ import MenuItem6 from "@mui/material/MenuItem";
5652
5967
  import ListItemIcon4 from "@mui/material/ListItemIcon";
5653
5968
  import ListItemText5 from "@mui/material/ListItemText";
5654
5969
  import { styled as styled59 } from "@mui/material/styles";
5655
- import { jsx as jsx75, jsxs as jsxs27 } from "react/jsx-runtime";
5656
- var StyledLogoutItem = styled59(MenuItem5, {
5970
+ import { jsx as jsx75, jsxs as jsxs28 } from "react/jsx-runtime";
5971
+ var StyledLogoutItem = styled59(MenuItem6, {
5657
5972
  name: "MuiUserMenu",
5658
5973
  slot: "LogoutItem"
5659
5974
  })(({ theme }) => ({
@@ -5679,8 +5994,8 @@ var UserMenuLogout = ({
5679
5994
  handleClose();
5680
5995
  onClick == null ? void 0 : onClick();
5681
5996
  };
5682
- return /* @__PURE__ */ jsxs27(StyledLogoutItem, { onClick: handleClick, children: [
5683
- icon && /* @__PURE__ */ jsx75(ListItemIcon4, { children: React27.isValidElement(icon) ? React27.cloneElement(icon, __spreadProps(__spreadValues({}, icon.props), {
5997
+ return /* @__PURE__ */ jsxs28(StyledLogoutItem, { onClick: handleClick, children: [
5998
+ icon && /* @__PURE__ */ jsx75(ListItemIcon4, { children: React31.isValidElement(icon) ? React31.cloneElement(icon, __spreadProps(__spreadValues({}, icon.props), {
5684
5999
  size: (_a = icon.props.size) != null ? _a : 18
5685
6000
  })) : icon }),
5686
6001
  /* @__PURE__ */ jsx75(ListItemText5, { primary: label })
@@ -5695,9 +6010,9 @@ var UserMenuDivider = () => /* @__PURE__ */ jsx76(Divider9, {});
5695
6010
  UserMenuDivider.displayName = "UserMenu.Divider";
5696
6011
 
5697
6012
  // src/components/UserMenu/UserMenu.tsx
5698
- import { jsx as jsx77, jsxs as jsxs28 } from "react/jsx-runtime";
6013
+ import { jsx as jsx77, jsxs as jsxs29 } from "react/jsx-runtime";
5699
6014
  var UserMenu = ({ children }) => {
5700
- const [anchorEl, setAnchorEl] = React28.useState(null);
6015
+ const [anchorEl, setAnchorEl] = React32.useState(null);
5701
6016
  const open = Boolean(anchorEl);
5702
6017
  const handleOpen = (event) => {
5703
6018
  setAnchorEl(event.currentTarget);
@@ -5705,17 +6020,17 @@ var UserMenu = ({ children }) => {
5705
6020
  const handleClose = () => {
5706
6021
  setAnchorEl(null);
5707
6022
  };
5708
- const childrenArray = React28.Children.toArray(children);
6023
+ const childrenArray = React32.Children.toArray(children);
5709
6024
  const triggerChild = childrenArray.find(
5710
- (child) => React28.isValidElement(child) && child.type === UserMenuTrigger
6025
+ (child) => React32.isValidElement(child) && child.type === UserMenuTrigger
5711
6026
  );
5712
6027
  const menuChildren = childrenArray.filter(
5713
- (child) => React28.isValidElement(child) && child.type !== UserMenuTrigger
6028
+ (child) => React32.isValidElement(child) && child.type !== UserMenuTrigger
5714
6029
  );
5715
- return /* @__PURE__ */ jsxs28(UserMenuContext.Provider, { value: { open, anchorEl, handleOpen, handleClose }, children: [
6030
+ return /* @__PURE__ */ jsxs29(UserMenuContext.Provider, { value: { open, anchorEl, handleOpen, handleClose }, children: [
5716
6031
  triggerChild,
5717
6032
  /* @__PURE__ */ jsx77(
5718
- Menu2,
6033
+ Menu3,
5719
6034
  {
5720
6035
  id: "user-menu",
5721
6036
  anchorEl,
@@ -5744,18 +6059,18 @@ UserMenu.Divider = UserMenuDivider;
5744
6059
  UserMenu.displayName = "UserMenu";
5745
6060
 
5746
6061
  // src/components/NotificationBanner/NotificationBanner.tsx
5747
- import * as React29 from "react";
6062
+ import * as React33 from "react";
5748
6063
  import Alert from "@mui/material/Alert";
5749
6064
  import AlertTitle from "@mui/material/AlertTitle";
5750
6065
  import Collapse2 from "@mui/material/Collapse";
5751
6066
  import Button4 from "@mui/material/Button";
5752
- import Box30 from "@mui/material/Box";
6067
+ import Box31 from "@mui/material/Box";
5753
6068
  import { styled as styled60 } from "@mui/material/styles";
5754
- import { jsx as jsx78, jsxs as jsxs29 } from "react/jsx-runtime";
6069
+ import { jsx as jsx78, jsxs as jsxs30 } from "react/jsx-runtime";
5755
6070
  var NotificationBannerAlert = styled60(Alert, {
5756
6071
  name: "MuiNotificationBanner",
5757
6072
  slot: "Root"
5758
- })({
6073
+ })(({ theme }) => __spreadValues({
5759
6074
  borderRadius: 0,
5760
6075
  "& .MuiAlert-message": {
5761
6076
  width: "100%",
@@ -5769,8 +6084,18 @@ var NotificationBannerAlert = styled60(Alert, {
5769
6084
  paddingTop: 0,
5770
6085
  alignItems: "center"
5771
6086
  }
5772
- });
5773
- var NotificationBannerContent = styled60(Box30, {
6087
+ }, theme.applyStyles("light", {
6088
+ "&.MuiAlert-filledInfo": {
6089
+ backgroundColor: (theme.vars || theme).palette.info.dark
6090
+ },
6091
+ "&.MuiAlert-filledWarning": {
6092
+ color: "#000",
6093
+ "& .MuiAlert-icon, & .MuiAlert-action": {
6094
+ color: "#000"
6095
+ }
6096
+ }
6097
+ })));
6098
+ var NotificationBannerContent = styled60(Box31, {
5774
6099
  name: "MuiNotificationBanner",
5775
6100
  slot: "Content"
5776
6101
  })({
@@ -5800,8 +6125,8 @@ var NotificationBanner = ({
5800
6125
  onDismiss,
5801
6126
  sx
5802
6127
  }) => {
5803
- const [isVisible, setIsVisible] = React29.useState(visible);
5804
- React29.useEffect(() => {
6128
+ const [isVisible, setIsVisible] = React33.useState(visible);
6129
+ React33.useEffect(() => {
5805
6130
  setIsVisible(visible);
5806
6131
  }, [visible]);
5807
6132
  const handleDismiss = () => {
@@ -5824,16 +6149,16 @@ var NotificationBanner = ({
5824
6149
  children: actionLabel
5825
6150
  }
5826
6151
  ) : void 0,
5827
- children: /* @__PURE__ */ jsxs29(NotificationBannerContent, { children: [
6152
+ children: /* @__PURE__ */ jsxs30(NotificationBannerContent, { children: [
5828
6153
  title && /* @__PURE__ */ jsx78(AlertTitle, { sx: { mb: 0 }, children: title }),
5829
- /* @__PURE__ */ jsx78(Box30, { component: "span", children: message })
6154
+ /* @__PURE__ */ jsx78(Box31, { component: "span", children: message })
5830
6155
  ] })
5831
6156
  }
5832
6157
  ) });
5833
6158
  };
5834
6159
 
5835
6160
  // src/components/Form/CardButton.tsx
5836
- import { Card as Card2, ButtonBase, Box as Box31, styled as styled61 } from "@mui/material";
6161
+ import { Card as Card2, ButtonBase as ButtonBase2, Box as Box32, styled as styled61 } from "@mui/material";
5837
6162
  import { CardHeader, CardContent as CardContent2, CardActions, CardMedia } from "@mui/material";
5838
6163
  import { jsx as jsx79 } from "react/jsx-runtime";
5839
6164
  var StyledCardButton = styled61(Card2, {
@@ -5868,13 +6193,13 @@ var CardButton = (props) => {
5868
6193
  StyledCardButton,
5869
6194
  __spreadValues({
5870
6195
  alignItems,
5871
- component: ButtonBase,
6196
+ component: ButtonBase2,
5872
6197
  selected,
5873
6198
  disabled
5874
6199
  }, rest)
5875
6200
  );
5876
6201
  };
5877
- var DisappearingCardButtonContent = (props) => /* @__PURE__ */ jsx79(Box31, __spreadValues({ className: "creation-flow-card-actions" }, props));
6202
+ var DisappearingCardButtonContent = (props) => /* @__PURE__ */ jsx79(Box32, __spreadValues({ className: "creation-flow-card-actions" }, props));
5878
6203
 
5879
6204
  // src/components/Form/Stack.tsx
5880
6205
  import { Stack as OxygenStack } from "@mui/material";
@@ -5916,15 +6241,15 @@ import {
5916
6241
  Divider as Divider10
5917
6242
  } from "@mui/material";
5918
6243
  import { styled as styled62 } from "@mui/material/styles";
5919
- import { useMemo as useMemo5 } from "react";
5920
- import { jsx as jsx83, jsxs as jsxs30 } from "react/jsx-runtime";
6244
+ import { useMemo as useMemo6 } from "react";
6245
+ import { jsx as jsx83, jsxs as jsxs31 } from "react/jsx-runtime";
5921
6246
  var StyledWizardActionsStack = styled62(Stack2)(() => ({
5922
6247
  justifyContent: "space-between",
5923
6248
  flexGrow: 1
5924
6249
  }));
5925
6250
  function Wizard({ steps, activeStep, actions }) {
5926
- const step = useMemo5(() => activeStep < steps.length ? steps[activeStep] : null, [steps, activeStep]);
5927
- return /* @__PURE__ */ jsx83(Card4, { children: /* @__PURE__ */ jsx83(CardContent4, { children: /* @__PURE__ */ jsxs30(Stack2, { children: [
6251
+ const step = useMemo6(() => activeStep < steps.length ? steps[activeStep] : null, [steps, activeStep]);
6252
+ return /* @__PURE__ */ jsx83(Card4, { children: /* @__PURE__ */ jsx83(CardContent4, { children: /* @__PURE__ */ jsxs31(Stack2, { children: [
5928
6253
  /* @__PURE__ */ jsx83(Stepper, { activeStep, children: steps.map((step2) => /* @__PURE__ */ jsx83(Step, { children: /* @__PURE__ */ jsx83(StepLabel, { children: step2.label }) }, step2.label)) }),
5929
6254
  /* @__PURE__ */ jsx83(Divider10, {}),
5930
6255
  /* @__PURE__ */ jsx83(Stack2, { direction: "row", children: step == null ? void 0 : step.component }),
@@ -5934,12 +6259,21 @@ function Wizard({ steps, activeStep, actions }) {
5934
6259
 
5935
6260
  // src/components/Form/ElementWrapper.tsx
5936
6261
  import { FormControl as FormControl3, FormLabel } from "@mui/material";
5937
- import { jsx as jsx84, jsxs as jsxs31 } from "react/jsx-runtime";
6262
+ import React34 from "react";
6263
+ import { jsx as jsx84, jsxs as jsxs32 } from "react/jsx-runtime";
5938
6264
  var ElementWrapper = (props) => {
5939
6265
  const { label, name, children } = props;
5940
- return /* @__PURE__ */ jsxs31(FormControl3, { fullWidth: true, children: [
5941
- /* @__PURE__ */ jsx84(FormLabel, { htmlFor: name, children: label }),
5942
- children
6266
+ const labelId = `${name}-label`;
6267
+ const enhancedChildren = React34.Children.map(children, (child) => {
6268
+ var _a;
6269
+ if (React34.isValidElement(child) && ((_a = child.type) == null ? void 0 : _a.muiName) === "Select" && !child.props.labelId) {
6270
+ return React34.cloneElement(child, { labelId });
6271
+ }
6272
+ return child;
6273
+ });
6274
+ return /* @__PURE__ */ jsxs32(FormControl3, { fullWidth: true, children: [
6275
+ /* @__PURE__ */ jsx84(FormLabel, { id: labelId, htmlFor: name, children: label }),
6276
+ enhancedChildren
5943
6277
  ] });
5944
6278
  };
5945
6279
 
@@ -5962,16 +6296,16 @@ var Form = {
5962
6296
  };
5963
6297
 
5964
6298
  // src/components/AppShell/AppShell.tsx
5965
- import * as React31 from "react";
5966
- import Box36 from "@mui/material/Box";
6299
+ import * as React36 from "react";
6300
+ import Box37 from "@mui/material/Box";
5967
6301
 
5968
6302
  // src/layouts/Layout.tsx
5969
- import Box32 from "@mui/material/Box";
6303
+ import Box33 from "@mui/material/Box";
5970
6304
  import { jsx as jsx85 } from "react/jsx-runtime";
5971
6305
  function Layout(_a) {
5972
6306
  var _b = _a, { children = null, sx } = _b, rest = __objRest(_b, ["children", "sx"]);
5973
6307
  return /* @__PURE__ */ jsx85(
5974
- Box32,
6308
+ Box33,
5975
6309
  __spreadProps(__spreadValues({
5976
6310
  sx: __spreadValues({
5977
6311
  display: "flex",
@@ -5986,12 +6320,12 @@ Layout.displayName = "Layout";
5986
6320
  var Layout_default = Layout;
5987
6321
 
5988
6322
  // src/layouts/LayoutSidebar.tsx
5989
- import Box33 from "@mui/material/Box";
6323
+ import Box34 from "@mui/material/Box";
5990
6324
  import { jsx as jsx86 } from "react/jsx-runtime";
5991
6325
  function LayoutSidebar(_a) {
5992
6326
  var _b = _a, { children = null, sx } = _b, rest = __objRest(_b, ["children", "sx"]);
5993
6327
  return /* @__PURE__ */ jsx86(
5994
- Box33,
6328
+ Box34,
5995
6329
  __spreadProps(__spreadValues({
5996
6330
  sx: __spreadValues({
5997
6331
  display: "flex",
@@ -6013,12 +6347,12 @@ LayoutNavbar.displayName = "Layout.Navbar";
6013
6347
  var LayoutNavbar_default = LayoutNavbar;
6014
6348
 
6015
6349
  // src/layouts/LayoutContent.tsx
6016
- import Box34 from "@mui/material/Box";
6350
+ import Box35 from "@mui/material/Box";
6017
6351
  import { jsx as jsx87 } from "react/jsx-runtime";
6018
6352
  function LayoutContent(_a) {
6019
6353
  var _b = _a, { children = null } = _b, rest = __objRest(_b, ["children"]);
6020
6354
  return /* @__PURE__ */ jsx87(
6021
- Box34,
6355
+ Box35,
6022
6356
  __spreadProps(__spreadValues({
6023
6357
  component: "main",
6024
6358
  sx: {
@@ -6036,12 +6370,12 @@ LayoutContent.displayName = "Layout.Content";
6036
6370
  var LayoutContent_default = LayoutContent;
6037
6371
 
6038
6372
  // src/layouts/LayoutHeader.tsx
6039
- import Box35 from "@mui/material/Box";
6373
+ import Box36 from "@mui/material/Box";
6040
6374
  import { jsx as jsx88 } from "react/jsx-runtime";
6041
6375
  function LayoutHeader(_a) {
6042
6376
  var _b = _a, { children = null, sx } = _b, rest = __objRest(_b, ["children", "sx"]);
6043
6377
  return /* @__PURE__ */ jsx88(
6044
- Box35,
6378
+ Box36,
6045
6379
  __spreadProps(__spreadValues({
6046
6380
  sx: __spreadValues({
6047
6381
  display: "flex"
@@ -6099,10 +6433,10 @@ var AppShellNotificationPanel = ({ children }) => {
6099
6433
  AppShellNotificationPanel.displayName = "AppShellNotificationPanel";
6100
6434
 
6101
6435
  // src/hooks/useAppShell/useAppShell.ts
6102
- import * as React30 from "react";
6436
+ import * as React35 from "react";
6103
6437
  import useMediaQuery3 from "@mui/material/useMediaQuery";
6104
6438
  var useAppShell = (options) => {
6105
- const contextValue = React30.useContext(AppShellContext);
6439
+ const contextValue = React35.useContext(AppShellContext);
6106
6440
  const {
6107
6441
  initialCollapsed = false,
6108
6442
  initialActiveItem = "dashboard",
@@ -6113,7 +6447,7 @@ var useAppShell = (options) => {
6113
6447
  } = options || {};
6114
6448
  const isMobile = useMediaQuery3((theme) => theme.breakpoints.down("md"));
6115
6449
  const isCreateMode = options !== void 0;
6116
- const [state, setState] = React30.useState({
6450
+ const [state, setState] = React35.useState({
6117
6451
  sidebarCollapsed: initialCollapsed,
6118
6452
  notificationPanelOpen: false,
6119
6453
  activeMenuItem: initialActiveItem,
@@ -6121,29 +6455,29 @@ var useAppShell = (options) => {
6121
6455
  sidebarWidth,
6122
6456
  sidebarCollapsedWidth
6123
6457
  });
6124
- React30.useEffect(() => {
6458
+ React35.useEffect(() => {
6125
6459
  if (isCreateMode && collapseOnMobile && isMobile) {
6126
6460
  setState((prev) => __spreadProps(__spreadValues({}, prev), { sidebarCollapsed: true }));
6127
6461
  }
6128
6462
  }, [isCreateMode, collapseOnMobile, isMobile]);
6129
- const toggleSidebar = React30.useCallback(() => {
6463
+ const toggleSidebar = React35.useCallback(() => {
6130
6464
  setState((prev) => __spreadProps(__spreadValues({}, prev), { sidebarCollapsed: !prev.sidebarCollapsed }));
6131
6465
  }, []);
6132
- const setSidebarCollapsed = React30.useCallback((collapsed) => {
6466
+ const setSidebarCollapsed = React35.useCallback((collapsed) => {
6133
6467
  setState((prev) => __spreadProps(__spreadValues({}, prev), { sidebarCollapsed: collapsed }));
6134
6468
  }, []);
6135
- const collapseSidebar = React30.useCallback(() => {
6469
+ const collapseSidebar = React35.useCallback(() => {
6136
6470
  setState((prev) => __spreadProps(__spreadValues({}, prev), { sidebarCollapsed: true }));
6137
6471
  }, []);
6138
- const expandSidebar = React30.useCallback(() => {
6472
+ const expandSidebar = React35.useCallback(() => {
6139
6473
  setState((prev) => __spreadProps(__spreadValues({}, prev), { sidebarCollapsed: false }));
6140
6474
  }, []);
6141
- const toggleNotificationPanel = React30.useCallback(() => {
6475
+ const toggleNotificationPanel = React35.useCallback(() => {
6142
6476
  setState((prev) => __spreadProps(__spreadValues({}, prev), {
6143
6477
  notificationPanelOpen: !prev.notificationPanelOpen
6144
6478
  }));
6145
6479
  }, []);
6146
- const setActiveMenuItem = React30.useCallback((id) => {
6480
+ const setActiveMenuItem = React35.useCallback((id) => {
6147
6481
  setState((prev) => {
6148
6482
  const newState = __spreadProps(__spreadValues({}, prev), { activeMenuItem: id });
6149
6483
  if (collapseOnSelectOnMobile && isMobile && !prev.sidebarCollapsed) {
@@ -6152,14 +6486,14 @@ var useAppShell = (options) => {
6152
6486
  return newState;
6153
6487
  });
6154
6488
  }, [collapseOnSelectOnMobile, isMobile]);
6155
- const toggleMenu = React30.useCallback((id) => {
6489
+ const toggleMenu = React35.useCallback((id) => {
6156
6490
  setState((prev) => __spreadProps(__spreadValues({}, prev), {
6157
6491
  expandedMenus: __spreadProps(__spreadValues({}, prev.expandedMenus), {
6158
6492
  [id]: !prev.expandedMenus[id]
6159
6493
  })
6160
6494
  }));
6161
6495
  }, []);
6162
- const actions = React30.useMemo(
6496
+ const actions = React35.useMemo(
6163
6497
  () => ({
6164
6498
  toggleSidebar,
6165
6499
  setSidebarCollapsed,
@@ -6179,7 +6513,7 @@ var useAppShell = (options) => {
6179
6513
  toggleMenu
6180
6514
  ]
6181
6515
  );
6182
- const createdValue = React30.useMemo(
6516
+ const createdValue = React35.useMemo(
6183
6517
  () => ({
6184
6518
  state,
6185
6519
  actions
@@ -6198,7 +6532,7 @@ var useAppShell = (options) => {
6198
6532
  };
6199
6533
 
6200
6534
  // src/components/AppShell/AppShell.tsx
6201
- import { jsx as jsx94, jsxs as jsxs32 } from "react/jsx-runtime";
6535
+ import { jsx as jsx94, jsxs as jsxs33 } from "react/jsx-runtime";
6202
6536
  var SLOT_DISPLAY_NAMES = {
6203
6537
  Navbar: "AppShellNavbar",
6204
6538
  Sidebar: "AppShellSidebar",
@@ -6214,9 +6548,9 @@ var extractSlots = (children) => {
6214
6548
  footer: null,
6215
6549
  notificationPanel: null
6216
6550
  };
6217
- React31.Children.forEach(children, (child) => {
6551
+ React36.Children.forEach(children, (child) => {
6218
6552
  var _a;
6219
- if (React31.isValidElement(child)) {
6553
+ if (React36.isValidElement(child)) {
6220
6554
  const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
6221
6555
  const childProps = child.props;
6222
6556
  switch (displayName) {
@@ -6248,12 +6582,12 @@ var AppShell = (_a) => {
6248
6582
  var _b = _a, { children, sx } = _b, shellOptions = __objRest(_b, ["children", "sx"]);
6249
6583
  const shell = useAppShell(shellOptions);
6250
6584
  const slots = extractSlots(children);
6251
- return /* @__PURE__ */ jsx94(AppShellContext.Provider, { value: shell, children: /* @__PURE__ */ jsxs32(layouts_default, { sx: __spreadValues({ height: "100vh", flexDirection: "column" }, sx), children: [
6585
+ return /* @__PURE__ */ jsx94(AppShellContext.Provider, { value: shell, children: /* @__PURE__ */ jsxs33(layouts_default, { sx: __spreadValues({ height: "100vh", flexDirection: "column" }, sx), children: [
6252
6586
  slots.navbar && /* @__PURE__ */ jsx94(layouts_default.Navbar, { children: slots.navbar }),
6253
- /* @__PURE__ */ jsxs32(layouts_default, { sx: { flex: 1, overflow: "hidden" }, children: [
6587
+ /* @__PURE__ */ jsxs33(layouts_default, { sx: { flex: 1, overflow: "hidden" }, children: [
6254
6588
  slots.sidebar && /* @__PURE__ */ jsx94(layouts_default.Sidebar, { children: slots.sidebar }),
6255
- /* @__PURE__ */ jsxs32(layouts_default.Content, { sx: { flex: 1, display: "flex", flexDirection: "column", overflow: "auto" }, children: [
6256
- /* @__PURE__ */ jsx94(Box36, { sx: { flex: 1, overflow: "auto", display: "flex" }, children: slots.main }),
6589
+ /* @__PURE__ */ jsxs33(layouts_default.Content, { sx: { flex: 1, display: "flex", flexDirection: "column", overflow: "auto" }, children: [
6590
+ /* @__PURE__ */ jsx94(Box37, { sx: { flex: 1, overflow: "auto", display: "flex" }, children: slots.main }),
6257
6591
  slots.footer
6258
6592
  ] })
6259
6593
  ] }),
@@ -6280,7 +6614,7 @@ var densityStyles = {
6280
6614
 
6281
6615
  // src/components/ListingTable/ListingTable/ListingTableContainer.tsx
6282
6616
  import MuiTableContainer from "@mui/material/TableContainer";
6283
- import Paper2 from "@mui/material/Paper";
6617
+ import Paper from "@mui/material/Paper";
6284
6618
  import { jsx as jsx95 } from "react/jsx-runtime";
6285
6619
  function ListingTableContainer(_a) {
6286
6620
  var _b = _a, {
@@ -6295,7 +6629,7 @@ function ListingTableContainer(_a) {
6295
6629
  if (disablePaper) {
6296
6630
  return /* @__PURE__ */ jsx95(MuiTableContainer, __spreadProps(__spreadValues({ sx: __spreadValues({ width: "100%" }, props.sx) }, props), { children }));
6297
6631
  }
6298
- return /* @__PURE__ */ jsx95(MuiTableContainer, __spreadProps(__spreadValues({ component: Paper2, elevation, sx: __spreadValues({ width: "100%" }, props.sx) }, props), { children }));
6632
+ return /* @__PURE__ */ jsx95(MuiTableContainer, __spreadProps(__spreadValues({ component: Paper, elevation, sx: __spreadValues({ width: "100%" }, props.sx) }, props), { children }));
6299
6633
  }
6300
6634
  var ListingTableContainer_default = ListingTableContainer;
6301
6635
 
@@ -6433,19 +6767,19 @@ function ListingTableCell(_a) {
6433
6767
  var ListingTableCell_default = ListingTableCell;
6434
6768
 
6435
6769
  // src/components/ListingTable/ListingTable/ListingTableDataGrid.tsx
6436
- import { useCallback as useCallback2 } from "react";
6770
+ import { useCallback as useCallback4 } from "react";
6437
6771
  import { DataGrid } from "@mui/x-data-grid";
6438
6772
  import { styled as styled66, alpha as alpha2 } from "@mui/material/styles";
6439
6773
 
6440
6774
  // src/components/ListingTable/context.ts
6441
- import * as React32 from "react";
6442
- var ListingTableContext = React32.createContext(null);
6775
+ import * as React37 from "react";
6776
+ var ListingTableContext = React37.createContext(null);
6443
6777
  ListingTableContext.displayName = "ListingTableContext";
6444
6778
  var useListingTable = () => {
6445
- return React32.useContext(ListingTableContext);
6779
+ return React37.useContext(ListingTableContext);
6446
6780
  };
6447
6781
  var useListingTableRequired = () => {
6448
- const context = React32.useContext(ListingTableContext);
6782
+ const context = React37.useContext(ListingTableContext);
6449
6783
  if (!context) {
6450
6784
  throw new Error(
6451
6785
  "useListingTableRequired must be used within a ListingTable.Provider. Use useListingTable() for optional context access."
@@ -6493,16 +6827,21 @@ var StyledDataGrid = styled66(DataGrid)(({ theme }) => ({
6493
6827
  )
6494
6828
  }
6495
6829
  },
6496
- // Remove default cell focus outline, rely on theme focus ring
6497
6830
  "& .MuiDataGrid-cell": {
6498
6831
  display: "flex",
6499
6832
  alignItems: "center"
6500
6833
  },
6834
+ // Hide the default outline for mouse interactions but keep a clearly
6835
+ // visible focus indicator for keyboard navigation (WCAG 2.4.7).
6501
6836
  "& .MuiDataGrid-cell:focus, & .MuiDataGrid-cell:focus-within": {
6502
6837
  outline: "none"
6503
6838
  },
6504
6839
  "& .MuiDataGrid-columnHeader:focus, & .MuiDataGrid-columnHeader:focus-within": {
6505
6840
  outline: "none"
6841
+ },
6842
+ "& .MuiDataGrid-cell:focus-visible, & .MuiDataGrid-columnHeader:focus-visible": {
6843
+ outline: `2px solid ${(theme.vars || theme).palette.primary.main}`,
6844
+ outlineOffset: -2
6506
6845
  }
6507
6846
  }));
6508
6847
  function ListingTableDataGrid(_a) {
@@ -6531,7 +6870,7 @@ function ListingTableDataGrid(_a) {
6531
6870
  items: [],
6532
6871
  quickFilterValues: searchValue ? [searchValue] : []
6533
6872
  };
6534
- const defaultCardRowSpacing = useCallback2(
6873
+ const defaultCardRowSpacing = useCallback4(
6535
6874
  (params) => ({ top: params.isFirstVisible ? 0 : 12, bottom: 0 }),
6536
6875
  []
6537
6876
  );
@@ -6623,13 +6962,13 @@ function ListingTableDataGrid(_a) {
6623
6962
  var ListingTableDataGrid_default = ListingTableDataGrid;
6624
6963
 
6625
6964
  // src/components/ListingTable/shared/ListingTableToolbar.tsx
6626
- import { useState as useState8, useCallback as useCallback3 } from "react";
6627
- import Box37 from "@mui/material/Box";
6965
+ import { useState as useState9, useCallback as useCallback5 } from "react";
6966
+ import Box38 from "@mui/material/Box";
6628
6967
  import TextField3 from "@mui/material/TextField";
6629
6968
  import InputAdornment3 from "@mui/material/InputAdornment";
6630
6969
  import IconButton7 from "@mui/material/IconButton";
6631
6970
  import { Search as Search2, X as X4 } from "@wso2/oxygen-ui-icons-react";
6632
- import { Fragment as Fragment15, jsx as jsx102, jsxs as jsxs33 } from "react/jsx-runtime";
6971
+ import { Fragment as Fragment15, jsx as jsx102, jsxs as jsxs34 } from "react/jsx-runtime";
6633
6972
  function ListingTableToolbar({
6634
6973
  showSearch = false,
6635
6974
  searchSlot,
@@ -6643,13 +6982,13 @@ function ListingTableToolbar({
6643
6982
  sx
6644
6983
  }) {
6645
6984
  const tableContext = useListingTable();
6646
- const [internalSearchValue, setInternalSearchValue] = useState8("");
6985
+ const [internalSearchValue, setInternalSearchValue] = useState9("");
6647
6986
  const isControlledByProp = controlledSearchValue !== void 0;
6648
6987
  const isControlledByContext = !isControlledByProp && (tableContext == null ? void 0 : tableContext.searchValue) !== void 0;
6649
6988
  const isControlled = isControlledByProp || isControlledByContext;
6650
6989
  const searchValue = isControlledByProp ? controlledSearchValue : isControlledByContext ? tableContext.searchValue : internalSearchValue;
6651
6990
  const effectiveOnSearchChange = onSearchChange != null ? onSearchChange : tableContext == null ? void 0 : tableContext.onSearchChange;
6652
- const handleSearchChange = useCallback3(
6991
+ const handleSearchChange = useCallback5(
6653
6992
  (event) => {
6654
6993
  const newValue = event.target.value;
6655
6994
  if (!isControlled) {
@@ -6659,7 +6998,7 @@ function ListingTableToolbar({
6659
6998
  },
6660
6999
  [isControlled, effectiveOnSearchChange]
6661
7000
  );
6662
- const handleClearSearch = useCallback3(() => {
7001
+ const handleClearSearch = useCallback5(() => {
6663
7002
  if (!isControlled) {
6664
7003
  setInternalSearchValue("");
6665
7004
  }
@@ -6681,18 +7020,25 @@ function ListingTableToolbar({
6681
7020
  minWidth: searchMinWidth,
6682
7021
  maxWidth: searchMaxWidth
6683
7022
  },
6684
- InputProps: {
6685
- startAdornment: /* @__PURE__ */ jsx102(InputAdornment3, { position: "start", children: /* @__PURE__ */ jsx102(Search2, { size: 18 }) }),
6686
- endAdornment: searchValue ? /* @__PURE__ */ jsx102(InputAdornment3, { position: "end", children: /* @__PURE__ */ jsx102(IconButton7, { size: "small", onClick: handleClearSearch, edge: "end", children: /* @__PURE__ */ jsx102(X4, { size: 16 }) }) }) : null
7023
+ slotProps: {
7024
+ htmlInput: {
7025
+ "aria-label": searchPlaceholder || "Search"
7026
+ },
7027
+ input: {
7028
+ startAdornment: /* @__PURE__ */ jsx102(InputAdornment3, { position: "start", children: /* @__PURE__ */ jsx102(Search2, { size: 18, "aria-hidden": "true" }) }),
7029
+ endAdornment: searchValue ? /* @__PURE__ */ jsx102(InputAdornment3, { position: "end", children: /* @__PURE__ */ jsx102(IconButton7, { size: "small", onClick: handleClearSearch, edge: "end", "aria-label": "Clear search", children: /* @__PURE__ */ jsx102(X4, { size: 16, "aria-hidden": "true" }) }) }) : null
7030
+ }
6687
7031
  }
6688
7032
  }
6689
7033
  );
6690
7034
  }
6691
7035
  return null;
6692
7036
  };
6693
- return /* @__PURE__ */ jsxs33(
6694
- Box37,
7037
+ return /* @__PURE__ */ jsxs34(
7038
+ Box38,
6695
7039
  {
7040
+ role: "toolbar",
7041
+ "aria-label": "Table toolbar",
6696
7042
  sx: __spreadValues({
6697
7043
  display: "flex",
6698
7044
  alignItems: "center",
@@ -6704,9 +7050,9 @@ function ListingTableToolbar({
6704
7050
  children: [
6705
7051
  renderSearch(),
6706
7052
  children,
6707
- actions && /* @__PURE__ */ jsxs33(Fragment15, { children: [
6708
- /* @__PURE__ */ jsx102(Box37, { sx: { flex: 1 } }),
6709
- /* @__PURE__ */ jsx102(Box37, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: actions })
7053
+ actions && /* @__PURE__ */ jsxs34(Fragment15, { children: [
7054
+ /* @__PURE__ */ jsx102(Box38, { sx: { flex: 1 } }),
7055
+ /* @__PURE__ */ jsx102(Box38, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: actions })
6710
7056
  ] })
6711
7057
  ]
6712
7058
  }
@@ -6715,9 +7061,9 @@ function ListingTableToolbar({
6715
7061
  var ListingTableToolbar_default = ListingTableToolbar;
6716
7062
 
6717
7063
  // src/components/ListingTable/shared/ListingTableEmptyState.tsx
6718
- import Box38 from "@mui/material/Box";
7064
+ import Box39 from "@mui/material/Box";
6719
7065
  import Typography20 from "@mui/material/Typography";
6720
- import { jsx as jsx103, jsxs as jsxs34 } from "react/jsx-runtime";
7066
+ import { jsx as jsx103, jsxs as jsxs35 } from "react/jsx-runtime";
6721
7067
  function ListingTableEmptyState({
6722
7068
  title = "No data available",
6723
7069
  description,
@@ -6726,8 +7072,8 @@ function ListingTableEmptyState({
6726
7072
  minHeight = 300,
6727
7073
  sx
6728
7074
  }) {
6729
- return /* @__PURE__ */ jsxs34(
6730
- Box38,
7075
+ return /* @__PURE__ */ jsxs35(
7076
+ Box39,
6731
7077
  {
6732
7078
  sx: __spreadValues({
6733
7079
  display: "flex",
@@ -6740,7 +7086,7 @@ function ListingTableEmptyState({
6740
7086
  }, sx),
6741
7087
  children: [
6742
7088
  illustration && /* @__PURE__ */ jsx103(
6743
- Box38,
7089
+ Box39,
6744
7090
  {
6745
7091
  sx: {
6746
7092
  mb: 2,
@@ -6755,7 +7101,7 @@ function ListingTableEmptyState({
6755
7101
  ),
6756
7102
  /* @__PURE__ */ jsx103(Typography20, { variant: "h6", component: "div", sx: { mb: description ? 1 : 0, fontWeight: 500 }, children: title }),
6757
7103
  description && /* @__PURE__ */ jsx103(Typography20, { variant: "body2", color: "text.secondary", sx: { mb: action ? 2 : 0, maxWidth: 400 }, children: description }),
6758
- action && /* @__PURE__ */ jsx103(Box38, { children: action })
7104
+ action && /* @__PURE__ */ jsx103(Box39, { children: action })
6759
7105
  ]
6760
7106
  }
6761
7107
  );
@@ -6763,15 +7109,15 @@ function ListingTableEmptyState({
6763
7109
  var ListingTableEmptyState_default = ListingTableEmptyState;
6764
7110
 
6765
7111
  // src/components/ListingTable/shared/ListingTableDensityControl.tsx
6766
- import { useCallback as useCallback4 } from "react";
7112
+ import { useCallback as useCallback6 } from "react";
6767
7113
  import ToggleButton from "@mui/material/ToggleButton";
6768
7114
  import ToggleButtonGroup from "@mui/material/ToggleButtonGroup";
6769
7115
  import Tooltip6 from "@mui/material/Tooltip";
6770
- import { AlignJustify, Menu as Menu3, List as List4 } from "@wso2/oxygen-ui-icons-react";
7116
+ import { AlignJustify, Menu as Menu4, List as List4 } from "@wso2/oxygen-ui-icons-react";
6771
7117
  import { jsx as jsx104 } from "react/jsx-runtime";
6772
7118
  var densityOptions = [
6773
7119
  { value: "compact", label: "Compact", icon: /* @__PURE__ */ jsx104(AlignJustify, { size: 18 }) },
6774
- { value: "standard", label: "Standard", icon: /* @__PURE__ */ jsx104(Menu3, { size: 18 }) },
7120
+ { value: "standard", label: "Standard", icon: /* @__PURE__ */ jsx104(Menu4, { size: 18 }) },
6775
7121
  { value: "comfortable", label: "Comfortable", icon: /* @__PURE__ */ jsx104(List4, { size: 18 }) }
6776
7122
  ];
6777
7123
  function ListingTableDensityControl({
@@ -6784,7 +7130,7 @@ function ListingTableDensityControl({
6784
7130
  const tableContext = useListingTable();
6785
7131
  const value = (_a = valueProp != null ? valueProp : tableContext == null ? void 0 : tableContext.density) != null ? _a : "standard";
6786
7132
  const effectiveOnChange = onChangeProp != null ? onChangeProp : tableContext == null ? void 0 : tableContext.onDensityChange;
6787
- const handleChange = useCallback4(
7133
+ const handleChange = useCallback6(
6788
7134
  (_event, newDensity) => {
6789
7135
  if (newDensity !== null) {
6790
7136
  effectiveOnChange == null ? void 0 : effectiveOnChange(newDensity);
@@ -6792,12 +7138,23 @@ function ListingTableDensityControl({
6792
7138
  },
6793
7139
  [effectiveOnChange]
6794
7140
  );
6795
- return /* @__PURE__ */ jsx104(ToggleButtonGroup, { value, exclusive: true, onChange: handleChange, size, sx, children: densityOptions.map((option) => /* @__PURE__ */ jsx104(ToggleButton, { value: option.value, children: /* @__PURE__ */ jsx104(Tooltip6, { title: option.label, children: /* @__PURE__ */ jsx104("span", { style: { display: "flex", alignItems: "center" }, children: option.icon }) }) }, option.value)) });
7141
+ return /* @__PURE__ */ jsx104(
7142
+ ToggleButtonGroup,
7143
+ {
7144
+ value,
7145
+ exclusive: true,
7146
+ onChange: handleChange,
7147
+ size,
7148
+ sx,
7149
+ "aria-label": "Table density",
7150
+ children: densityOptions.map((option) => /* @__PURE__ */ jsx104(ToggleButton, { value: option.value, "aria-label": option.label, children: /* @__PURE__ */ jsx104(Tooltip6, { title: option.label, children: /* @__PURE__ */ jsx104("span", { style: { display: "flex", alignItems: "center" }, "aria-hidden": "true", children: option.icon }) }) }, option.value))
7151
+ }
7152
+ );
6796
7153
  }
6797
7154
  var ListingTableDensityControl_default = ListingTableDensityControl;
6798
7155
 
6799
7156
  // src/components/ListingTable/shared/ListingTableSortLabel.tsx
6800
- import { useCallback as useCallback5 } from "react";
7157
+ import { useCallback as useCallback7 } from "react";
6801
7158
  import MuiTableSortLabel from "@mui/material/TableSortLabel";
6802
7159
  import { styled as styled67 } from "@mui/material/styles";
6803
7160
  import { jsx as jsx105 } from "react/jsx-runtime";
@@ -6831,7 +7188,7 @@ function ListingTableSortLabel(_a) {
6831
7188
  const isActiveFromContext = field !== void 0 && (tableContext == null ? void 0 : tableContext.sortField) === field;
6832
7189
  const active = activeProp != null ? activeProp : isActiveFromContext;
6833
7190
  const direction = (_a2 = directionProp != null ? directionProp : isActiveFromContext ? tableContext == null ? void 0 : tableContext.sortDirection : void 0) != null ? _a2 : "asc";
6834
- const handleClick = useCallback5(
7191
+ const handleClick = useCallback7(
6835
7192
  (event) => {
6836
7193
  if (onClickProp) {
6837
7194
  onClickProp(event);
@@ -6849,7 +7206,7 @@ function ListingTableSortLabel(_a) {
6849
7206
  var ListingTableSortLabel_default = ListingTableSortLabel;
6850
7207
 
6851
7208
  // src/components/ListingTable/shared/ListingTableRowActions.tsx
6852
- import Box39 from "@mui/material/Box";
7209
+ import Box40 from "@mui/material/Box";
6853
7210
  import { jsx as jsx106 } from "react/jsx-runtime";
6854
7211
  var alignmentMap = {
6855
7212
  left: "flex-start",
@@ -6863,7 +7220,7 @@ function ListingTableRowActions({
6863
7220
  sx
6864
7221
  }) {
6865
7222
  return /* @__PURE__ */ jsx106(
6866
- Box39,
7223
+ Box40,
6867
7224
  {
6868
7225
  className: "table-row-actions",
6869
7226
  sx: __spreadValues(__spreadValues({
@@ -6886,9 +7243,9 @@ function ListingTableRowActions({
6886
7243
  var ListingTableRowActions_default = ListingTableRowActions;
6887
7244
 
6888
7245
  // src/components/ListingTable/shared/ListingTableCellIcon.tsx
6889
- import Box40 from "@mui/material/Box";
7246
+ import Box41 from "@mui/material/Box";
6890
7247
  import Typography21 from "@mui/material/Typography";
6891
- import { Fragment as Fragment16, jsx as jsx107, jsxs as jsxs35 } from "react/jsx-runtime";
7248
+ import { Fragment as Fragment16, jsx as jsx107, jsxs as jsxs36 } from "react/jsx-runtime";
6892
7249
  function ListingTableCellIcon({
6893
7250
  icon,
6894
7251
  primary,
@@ -6898,7 +7255,7 @@ function ListingTableCellIcon({
6898
7255
  sx
6899
7256
  }) {
6900
7257
  const iconElement = /* @__PURE__ */ jsx107(
6901
- Box40,
7258
+ Box41,
6902
7259
  {
6903
7260
  sx: __spreadValues({
6904
7261
  display: "flex",
@@ -6910,7 +7267,7 @@ function ListingTableCellIcon({
6910
7267
  children: icon
6911
7268
  }
6912
7269
  );
6913
- const textContent = /* @__PURE__ */ jsxs35(Box40, { sx: { minWidth: 0, flex: 1 }, children: [
7270
+ const textContent = /* @__PURE__ */ jsxs36(Box41, { sx: { minWidth: 0, flex: 1 }, children: [
6914
7271
  /* @__PURE__ */ jsx107(
6915
7272
  Typography21,
6916
7273
  {
@@ -6941,7 +7298,7 @@ function ListingTableCellIcon({
6941
7298
  )
6942
7299
  ] });
6943
7300
  return /* @__PURE__ */ jsx107(
6944
- Box40,
7301
+ Box41,
6945
7302
  {
6946
7303
  sx: __spreadValues({
6947
7304
  display: "flex",
@@ -6949,10 +7306,10 @@ function ListingTableCellIcon({
6949
7306
  gap: 1.5,
6950
7307
  minWidth: 0
6951
7308
  }, sx),
6952
- children: iconPosition === "left" ? /* @__PURE__ */ jsxs35(Fragment16, { children: [
7309
+ children: iconPosition === "left" ? /* @__PURE__ */ jsxs36(Fragment16, { children: [
6953
7310
  iconElement,
6954
7311
  textContent
6955
- ] }) : /* @__PURE__ */ jsxs35(Fragment16, { children: [
7312
+ ] }) : /* @__PURE__ */ jsxs36(Fragment16, { children: [
6956
7313
  textContent,
6957
7314
  iconElement
6958
7315
  ] })
@@ -6962,7 +7319,7 @@ function ListingTableCellIcon({
6962
7319
  var ListingTableCellIcon_default = ListingTableCellIcon;
6963
7320
 
6964
7321
  // src/components/ListingTable/ListingTableProvider.tsx
6965
- import { useMemo as useMemo7 } from "react";
7322
+ import { useMemo as useMemo8 } from "react";
6966
7323
  import { jsx as jsx108 } from "react/jsx-runtime";
6967
7324
  function ListingTableProvider({
6968
7325
  children,
@@ -7001,7 +7358,7 @@ function ListingTableProvider({
7001
7358
  // Loading
7002
7359
  loading
7003
7360
  }) {
7004
- const contextValue = useMemo7(
7361
+ const contextValue = useMemo8(
7005
7362
  () => ({
7006
7363
  // Search
7007
7364
  searchValue,
@@ -7156,7 +7513,7 @@ var ListingTableCompound = Object.assign(ListingTable, {
7156
7513
  var ListingTable_default = ListingTableCompound;
7157
7514
 
7158
7515
  // src/animations/ParticleBackground/ParticleBackground.tsx
7159
- import { useEffect as useEffect6, useRef as useRef2 } from "react";
7516
+ import { useEffect as useEffect7, useRef as useRef3 } from "react";
7160
7517
  import { useColorScheme as useColorScheme4 } from "@mui/material/styles";
7161
7518
  import { jsx as jsx110 } from "react/jsx-runtime";
7162
7519
  var ParticleBackground = ({
@@ -7170,9 +7527,9 @@ var ParticleBackground = ({
7170
7527
  repelStrength = 0.35,
7171
7528
  clickBurst = 120
7172
7529
  }) => {
7173
- const canvasRef = useRef2(null);
7530
+ const canvasRef = useRef3(null);
7174
7531
  const { mode } = useColorScheme4();
7175
- useEffect6(() => {
7532
+ useEffect7(() => {
7176
7533
  const canvas = canvasRef.current;
7177
7534
  if (!canvas) return;
7178
7535
  const ctx = canvas.getContext("2d", { alpha: true });
@@ -7249,6 +7606,7 @@ var ParticleBackground = ({
7249
7606
  context.fill();
7250
7607
  }
7251
7608
  }
7609
+ const reducedMotionQuery = window.matchMedia("(prefers-reduced-motion: reduce)");
7252
7610
  function resize() {
7253
7611
  DPR = Math.max(1, Math.min(2, window.devicePixelRatio || 1));
7254
7612
  W = canvasEl.width = Math.floor(window.innerWidth * DPR);
@@ -7256,6 +7614,9 @@ var ParticleBackground = ({
7256
7614
  canvasEl.style.width = window.innerWidth + "px";
7257
7615
  canvasEl.style.height = window.innerHeight + "px";
7258
7616
  computeParticlesCount();
7617
+ if (reducedMotionQuery.matches) {
7618
+ drawStaticFrame();
7619
+ }
7259
7620
  }
7260
7621
  function computeParticlesCount() {
7261
7622
  const area = W * H / (DPR * DPR);
@@ -7270,6 +7631,7 @@ var ParticleBackground = ({
7270
7631
  }
7271
7632
  const mouse = { x: null, y: null };
7272
7633
  const handleMouseMove = (e) => {
7634
+ if (reducedMotionQuery.matches) return;
7273
7635
  mouse.x = e.clientX * DPR;
7274
7636
  mouse.y = e.clientY * DPR;
7275
7637
  };
@@ -7277,6 +7639,7 @@ var ParticleBackground = ({
7277
7639
  mouse.x = mouse.y = null;
7278
7640
  };
7279
7641
  const handleClick = (e) => {
7642
+ if (reducedMotionQuery.matches) return;
7280
7643
  const mx = e.clientX * DPR;
7281
7644
  const my = e.clientY * DPR;
7282
7645
  for (let i = 0; i < particles.length; i++) {
@@ -7316,6 +7679,13 @@ var ParticleBackground = ({
7316
7679
  }
7317
7680
  context.globalAlpha = 1;
7318
7681
  }
7682
+ function drawStaticFrame() {
7683
+ context.clearRect(0, 0, W, H);
7684
+ drawLinks();
7685
+ for (let i = 0; i < particles.length; i++) {
7686
+ particles[i].draw();
7687
+ }
7688
+ }
7319
7689
  function loop() {
7320
7690
  context.clearRect(0, 0, W, H);
7321
7691
  for (let i = 0; i < particles.length; i++) {
@@ -7327,6 +7697,17 @@ var ParticleBackground = ({
7327
7697
  }
7328
7698
  animationFrameId = requestAnimationFrame(loop);
7329
7699
  }
7700
+ function startRendering() {
7701
+ cancelAnimationFrame(animationFrameId);
7702
+ if (reducedMotionQuery.matches) {
7703
+ drawStaticFrame();
7704
+ } else {
7705
+ loop();
7706
+ }
7707
+ }
7708
+ const handleReducedMotionChange = () => {
7709
+ startRendering();
7710
+ };
7330
7711
  resize();
7331
7712
  for (let i = 0; i < 120; i++) particles.push(new Particle());
7332
7713
  computeParticlesCount();
@@ -7334,12 +7715,14 @@ var ParticleBackground = ({
7334
7715
  window.addEventListener("mousemove", handleMouseMove, { passive: true });
7335
7716
  window.addEventListener("mouseleave", handleMouseLeave);
7336
7717
  window.addEventListener("click", handleClick);
7337
- loop();
7718
+ reducedMotionQuery.addEventListener("change", handleReducedMotionChange);
7719
+ startRendering();
7338
7720
  return () => {
7339
7721
  window.removeEventListener("resize", resize);
7340
7722
  window.removeEventListener("mousemove", handleMouseMove);
7341
7723
  window.removeEventListener("mouseleave", handleMouseLeave);
7342
7724
  window.removeEventListener("click", handleClick);
7725
+ reducedMotionQuery.removeEventListener("change", handleReducedMotionChange);
7343
7726
  cancelAnimationFrame(animationFrameId);
7344
7727
  };
7345
7728
  }, [baseDensity, maxSpeed, radius, linkDist, linkAlpha, mouseInfluence, repelStrength, clickBurst, mode]);
@@ -7348,6 +7731,7 @@ var ParticleBackground = ({
7348
7731
  {
7349
7732
  ref: canvasRef,
7350
7733
  id: "particle-bg",
7734
+ "aria-hidden": "true",
7351
7735
  style: {
7352
7736
  position: "fixed",
7353
7737
  top: 0,
@@ -7371,44 +7755,44 @@ function useThemeContent(contentMap, fallback) {
7371
7755
  var useThemeContent_default = useThemeContent;
7372
7756
 
7373
7757
  // src/hooks/useNotifications/useNotifications.ts
7374
- import * as React33 from "react";
7758
+ import * as React38 from "react";
7375
7759
  var generateId = () => {
7376
7760
  return `notif-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
7377
7761
  };
7378
7762
  var useNotifications = (options = {}) => {
7379
7763
  const { initialNotifications = [] } = options;
7380
- const [notifications, setNotifications] = React33.useState(
7764
+ const [notifications, setNotifications] = React38.useState(
7381
7765
  initialNotifications
7382
7766
  );
7383
- const markRead = React33.useCallback((id) => {
7767
+ const markRead = React38.useCallback((id) => {
7384
7768
  setNotifications(
7385
7769
  (prev) => prev.map((n) => n.id === id ? __spreadProps(__spreadValues({}, n), { read: true }) : n)
7386
7770
  );
7387
7771
  }, []);
7388
- const dismiss = React33.useCallback((id) => {
7772
+ const dismiss = React38.useCallback((id) => {
7389
7773
  setNotifications((prev) => prev.filter((n) => n.id !== id));
7390
7774
  }, []);
7391
- const markAllRead = React33.useCallback(() => {
7775
+ const markAllRead = React38.useCallback(() => {
7392
7776
  setNotifications((prev) => prev.map((n) => __spreadProps(__spreadValues({}, n), { read: true })));
7393
7777
  }, []);
7394
- const clearAll = React33.useCallback(() => {
7778
+ const clearAll = React38.useCallback(() => {
7395
7779
  setNotifications([]);
7396
7780
  }, []);
7397
- const add = React33.useCallback((notification) => {
7781
+ const add = React38.useCallback((notification) => {
7398
7782
  const newNotification = __spreadProps(__spreadValues({}, notification), {
7399
7783
  id: generateId()
7400
7784
  });
7401
7785
  setNotifications((prev) => [newNotification, ...prev]);
7402
7786
  }, []);
7403
- const unreadCount = React33.useMemo(
7787
+ const unreadCount = React38.useMemo(
7404
7788
  () => notifications.filter((n) => !n.read).length,
7405
7789
  [notifications]
7406
7790
  );
7407
- const unreadNotifications = React33.useMemo(
7791
+ const unreadNotifications = React38.useMemo(
7408
7792
  () => notifications.filter((n) => !n.read),
7409
7793
  [notifications]
7410
7794
  );
7411
- const actions = React33.useMemo(
7795
+ const actions = React38.useMemo(
7412
7796
  () => ({
7413
7797
  markRead,
7414
7798
  dismiss,
@@ -7478,6 +7862,7 @@ export {
7478
7862
  UserMenu,
7479
7863
  WSO2Theme_default as WSO2Theme,
7480
7864
  colors,
7865
+ default2 as createEmotionCache,
7481
7866
  createOxygenTheme,
7482
7867
  formatRelativeTime,
7483
7868
  pxToRem,