@wso2/oxygen-ui 0.20.0 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -91,6 +91,34 @@ export interface TrialBadgeUsageItem {
91
91
  */
92
92
  limit: number;
93
93
  }
94
+ /**
95
+ * A run of resources inside a section, optionally under a sub-heading.
96
+ *
97
+ * One level only: a group holds rows, never further groups. Use a titled group
98
+ * to name a related run of rows ("Gateways") without promoting them to a
99
+ * section of their own, which would separate them from the rest of their
100
+ * section.
101
+ *
102
+ * An untitled group renders its rows plainly — no sub-heading, no indent, the
103
+ * same as a section's own `items`. That is how a section orders its content:
104
+ * loose `items` always come first, so a plain row that must follow a titled
105
+ * group goes in a trailing untitled group instead.
106
+ */
107
+ export interface TrialBadgeUsageGroup {
108
+ /**
109
+ * Stable key for the group. Falls back to the title.
110
+ */
111
+ key?: string;
112
+ /**
113
+ * Sub-heading shown above the group's rows, which are indented beneath it.
114
+ * Omit for a plain run of rows with no sub-heading.
115
+ */
116
+ title?: React.ReactNode;
117
+ /**
118
+ * The resources to list in this group.
119
+ */
120
+ items: TrialBadgeUsageItem[];
121
+ }
94
122
  /**
95
123
  * A titled group of resources in the usage panel.
96
124
  */
@@ -104,12 +132,21 @@ export interface TrialBadgeUsageSection {
104
132
  */
105
133
  title: React.ReactNode;
106
134
  /**
107
- * The resources to list. The section total is the sum of their counts and limits.
135
+ * The resources listed directly under the section heading, above any `groups`.
136
+ * Optional so a section can hold nothing but groups.
108
137
  */
109
- items: TrialBadgeUsageItem[];
138
+ items?: TrialBadgeUsageItem[];
139
+ /**
140
+ * Further runs of rows, rendered in order after `items`. A group may carry a
141
+ * sub-heading or not; an untitled one is the way to place a plain row below a
142
+ * titled group.
143
+ */
144
+ groups?: TrialBadgeUsageGroup[];
110
145
  /**
111
146
  * Text after the section total, e.g. `left` gives "14 of 30 left".
112
147
  * The total is shown only when this is passed.
148
+ *
149
+ * The total covers every row in the section, `groups` included.
113
150
  */
114
151
  totalSuffix?: React.ReactNode;
115
152
  }
@@ -41,7 +41,7 @@ export type { TextFieldProps, TextFieldLabelPlacement } from './TextField';
41
41
  export { default as StatCard } from './StatCard';
42
42
  export type { StatCardProps } from './StatCard';
43
43
  export { default as TrialBadge, getTrialBadgeStatus } from './TrialBadge';
44
- export type { TrialBadgeProps, TrialBadgeStatus, TrialBadgeUsage, TrialBadgeUsageItem, TrialBadgeUsageSection, TrialBadgeUsageTone, } from './TrialBadge';
44
+ export type { TrialBadgeProps, TrialBadgeStatus, TrialBadgeUsage, TrialBadgeUsageGroup, TrialBadgeUsageItem, TrialBadgeUsageSection, TrialBadgeUsageTone, } from './TrialBadge';
45
45
  export { default as ThemeSwitcher, ThemeSelect } from './ThemeSwitcher';
46
46
  export type { ThemeSwitcherProps, ThemeSelectProps } from './ThemeSwitcher';
47
47
  export { default as TimeRangeFilter } from './TimeRangeFilter';
package/dist/index.js CHANGED
@@ -585,7 +585,7 @@ var init_createOxygenTheme = __esm({
585
585
  // package.json
586
586
  var package_default = {
587
587
  name: "@wso2/oxygen-ui",
588
- version: "0.20.0",
588
+ version: "0.21.0",
589
589
  description: "WSO2 Oxygen UI | Design System - Powered with Material-UI component library with TypeScript support",
590
590
  type: "module",
591
591
  main: "./dist/index.js",
@@ -1133,15 +1133,35 @@ init_createOxygenTheme();
1133
1133
  import { extendTheme as extendTheme3 } from "@mui/material/styles";
1134
1134
  var ChoreoLabsColors = {
1135
1135
  signal: "#FF4600",
1136
+ flare: "#FF6E33",
1137
+ ember: "#8F2400",
1136
1138
  // Signal is below 4.5:1 as text on light surfaces, so orange text there uses Burn.
1137
1139
  burn: "#C43300",
1138
1140
  midnightInk: "#0B1633",
1141
+ deepNavy: "#17223A",
1139
1142
  blackout: "#050A1C",
1140
1143
  cobalt: "#1F4FFF",
1144
+ mist: "#EAF6FF",
1141
1145
  slate: "#5A6072",
1146
+ fog: "#D7DBE4",
1142
1147
  paper: "#F4F6FA",
1148
+ graphite: "#1E222C",
1143
1149
  white: "#FFFFFF"
1144
1150
  };
1151
+ var ChoreoLabsStatusColors = {
1152
+ light: {
1153
+ info: { main: ChoreoLabsColors.midnightInk, contrastText: ChoreoLabsColors.white },
1154
+ success: { main: "#16A34A", dark: "#15803D", contrastText: ChoreoLabsColors.white },
1155
+ warning: { main: "#F5B300", dark: "#8A5A00", contrastText: ChoreoLabsColors.midnightInk },
1156
+ error: { main: "#E5484D", dark: "#B42318", contrastText: ChoreoLabsColors.white }
1157
+ },
1158
+ dark: {
1159
+ info: { main: ChoreoLabsColors.white, contrastText: ChoreoLabsColors.midnightInk },
1160
+ success: { main: "#4ADE80", contrastText: ChoreoLabsColors.midnightInk },
1161
+ warning: { main: "#FCD34D", contrastText: ChoreoLabsColors.midnightInk },
1162
+ error: { main: "#FF7A7F", contrastText: ChoreoLabsColors.midnightInk }
1163
+ }
1164
+ };
1145
1165
  var fontFamily = "'Sora Variable', sans-serif";
1146
1166
  var typographyVariants = [
1147
1167
  "h1",
@@ -1160,59 +1180,83 @@ var typographyVariants = [
1160
1180
  ];
1161
1181
  var ChoreoLabsColorSchemes = {
1162
1182
  light: {
1163
- palette: {
1183
+ palette: __spreadProps(__spreadValues({
1164
1184
  primary: {
1165
1185
  main: ChoreoLabsColors.signal,
1166
1186
  dark: ChoreoLabsColors.burn,
1167
1187
  contrastText: ChoreoLabsColors.midnightInk
1168
- // Text on Signal is Midnight Ink
1169
1188
  },
1170
1189
  secondary: {
1171
- main: "#e8e8e8"
1172
- },
1173
- info: {
1174
- main: ChoreoLabsColors.cobalt,
1175
- contrastText: ChoreoLabsColors.white
1190
+ main: ChoreoLabsColors.fog
1176
1191
  },
1177
1192
  background: {
1178
1193
  default: ChoreoLabsColors.paper,
1179
1194
  paper: "#ffffffc5",
1180
- acrylic: "#ffffff40"
1181
- // More transparent version for Paper and Card components
1195
+ acrylic: ChoreoLabsColors.white
1182
1196
  },
1183
1197
  text: {
1184
1198
  primary: ChoreoLabsColors.midnightInk,
1185
1199
  secondary: ChoreoLabsColors.slate
1186
1200
  },
1187
- divider: "#00000012"
1188
- }
1201
+ divider: ChoreoLabsColors.fog
1202
+ }, ChoreoLabsStatusColors.light), {
1203
+ Alert: {
1204
+ infoColor: ChoreoLabsColors.midnightInk,
1205
+ infoIconColor: ChoreoLabsColors.midnightInk,
1206
+ infoStandardBg: ChoreoLabsColors.mist,
1207
+ successColor: "#15803D",
1208
+ successStandardBg: "#DCFCE7",
1209
+ warningColor: "#8A5A00",
1210
+ warningStandardBg: "#FEF6D8",
1211
+ warningFilledColor: ChoreoLabsColors.midnightInk,
1212
+ errorColor: "#B42318",
1213
+ errorStandardBg: "#FDE7E7"
1214
+ }
1215
+ })
1189
1216
  },
1190
1217
  dark: {
1191
- palette: {
1218
+ palette: __spreadProps(__spreadValues({
1192
1219
  primary: {
1193
1220
  main: ChoreoLabsColors.signal,
1194
1221
  dark: ChoreoLabsColors.burn,
1195
1222
  contrastText: ChoreoLabsColors.midnightInk
1196
1223
  },
1197
1224
  secondary: {
1198
- main: "#3c3c3c"
1199
- },
1200
- info: {
1201
- main: ChoreoLabsColors.cobalt,
1202
- contrastText: ChoreoLabsColors.white
1225
+ main: ChoreoLabsColors.graphite
1203
1226
  },
1204
1227
  background: {
1205
1228
  default: ChoreoLabsColors.blackout,
1206
- paper: `${ChoreoLabsColors.midnightInk}c5`,
1229
+ paper: `${ChoreoLabsColors.deepNavy}c5`,
1207
1230
  acrylic: `${ChoreoLabsColors.midnightInk}40`
1208
- // More transparent version for Paper and Card components
1209
1231
  },
1210
1232
  text: {
1211
1233
  primary: ChoreoLabsColors.white,
1212
1234
  secondary: "#D0D3E2"
1213
1235
  },
1214
1236
  divider: "#ffffff16"
1215
- }
1237
+ }, ChoreoLabsStatusColors.dark), {
1238
+ Alert: {
1239
+ infoColor: ChoreoLabsColors.white,
1240
+ infoIconColor: ChoreoLabsColors.white,
1241
+ infoStandardBg: ChoreoLabsColors.midnightInk,
1242
+ // The derived filled colour would be grey
1243
+ infoFilledBg: ChoreoLabsColors.deepNavy,
1244
+ infoFilledColor: ChoreoLabsColors.white,
1245
+ // Status text in dark mode is the light shade on Ink; filled alerts keep the base colours
1246
+ successColor: "#4ADE80",
1247
+ successStandardBg: ChoreoLabsColors.midnightInk,
1248
+ successFilledBg: "#16A34A",
1249
+ successFilledColor: ChoreoLabsColors.white,
1250
+ warningColor: "#FCD34D",
1251
+ warningStandardBg: ChoreoLabsColors.midnightInk,
1252
+ warningFilledBg: "#F5B300",
1253
+ warningFilledColor: ChoreoLabsColors.midnightInk,
1254
+ errorColor: "#FF7A7F",
1255
+ errorStandardBg: ChoreoLabsColors.midnightInk,
1256
+ errorFilledBg: "#E5484D",
1257
+ errorFilledColor: ChoreoLabsColors.white
1258
+ }
1259
+ })
1216
1260
  }
1217
1261
  };
1218
1262
  var { colorSchemes } = extendTheme3({
@@ -1230,8 +1274,7 @@ var ChoreoLabsThemeConfig = {
1230
1274
  borderRadius: 12
1231
1275
  },
1232
1276
  gradient: {
1233
- // The brand uses no gradients, so the theme itself doesn't use this. It stays a flat Signal for
1234
- // apps that read theme.gradient.primary.
1277
+ // Unused by the theme; kept flat for apps that read theme.gradient.primary
1235
1278
  primary: `linear-gradient(${ChoreoLabsColors.signal}, ${ChoreoLabsColors.signal})`
1236
1279
  },
1237
1280
  components: {
@@ -1243,6 +1286,16 @@ var ChoreoLabsThemeConfig = {
1243
1286
  })
1244
1287
  }
1245
1288
  },
1289
+ MuiButtonBase: {
1290
+ styleOverrides: {
1291
+ root: {
1292
+ "&.Mui-focusVisible": {
1293
+ outline: `2px solid ${ChoreoLabsColors.cobalt}`,
1294
+ outlineOffset: 2
1295
+ }
1296
+ }
1297
+ }
1298
+ },
1246
1299
  MuiButton: {
1247
1300
  styleOverrides: {
1248
1301
  root: {
@@ -1254,11 +1307,13 @@ var ChoreoLabsThemeConfig = {
1254
1307
  "&:not(:disabled)": {
1255
1308
  background: `${theme.vars.palette.primary.main} !important`,
1256
1309
  color: `${theme.vars.palette.primary.contrastText} !important`,
1257
- // The default hover darkens to Burn, which is below 4.5:1 against Midnight Ink text.
1258
1310
  "&:hover": {
1259
- background: `${theme.vars.palette.primary.main} !important`,
1260
- opacity: 0.9,
1261
- color: `${theme.vars.palette.primary.contrastText} !important`
1311
+ background: `${ChoreoLabsColors.flare} !important`
1312
+ },
1313
+ // Midnight Ink doesn't read on Ember, so the pressed label is white
1314
+ "&:active": {
1315
+ background: `${ChoreoLabsColors.ember} !important`,
1316
+ color: `${ChoreoLabsColors.white} !important`
1262
1317
  }
1263
1318
  }
1264
1319
  }),
@@ -1299,8 +1354,11 @@ var ChoreoLabsThemeConfig = {
1299
1354
  backgroundColor: theme.vars.palette.primary.main,
1300
1355
  color: theme.vars.palette.primary.contrastText,
1301
1356
  "&:hover": {
1302
- backgroundColor: theme.vars.palette.primary.main,
1303
- opacity: 0.9
1357
+ backgroundColor: ChoreoLabsColors.flare
1358
+ },
1359
+ "&:active": {
1360
+ backgroundColor: ChoreoLabsColors.ember,
1361
+ color: ChoreoLabsColors.white
1304
1362
  }
1305
1363
  })
1306
1364
  }
@@ -1323,21 +1381,25 @@ var ChoreoLabsThemeConfig = {
1323
1381
  },
1324
1382
  MuiSidebar: {
1325
1383
  styleOverrides: {
1326
- root: ({ theme }) => ({
1384
+ root: ({ theme }) => __spreadValues({
1327
1385
  backgroundColor: theme.vars.palette.background.acrylic,
1328
1386
  WebkitBackdropFilter: theme.blur.light,
1329
1387
  backdropFilter: theme.blur.light
1330
- })
1388
+ }, theme.applyStyles("light", {
1389
+ backgroundColor: ChoreoLabsColors.white
1390
+ }))
1331
1391
  }
1332
1392
  },
1333
1393
  MuiAppBar: {
1334
1394
  styleOverrides: {
1335
- root: ({ theme }) => ({
1395
+ root: ({ theme }) => __spreadValues({
1336
1396
  backgroundColor: `${theme.vars.palette.background.acrylic} !important`,
1337
1397
  WebkitBackdropFilter: theme.blur.medium,
1338
1398
  backdropFilter: theme.blur.medium,
1339
1399
  borderRadius: 0
1340
- })
1400
+ }, theme.applyStyles("light", {
1401
+ backgroundColor: `${ChoreoLabsColors.white} !important`
1402
+ }))
1341
1403
  },
1342
1404
  defaultProps: {
1343
1405
  color: "transparent"
@@ -1358,9 +1420,8 @@ var ChoreoLabsThemeConfig = {
1358
1420
  WebkitBackdropFilter: theme.blur.light,
1359
1421
  backdropFilter: theme.blur.light,
1360
1422
  border: `${theme.border.width} ${theme.border.style} ${theme.vars.palette.divider}`,
1361
- // More transparent for direct Paper component usage
1362
1423
  backgroundColor: theme.vars.palette.background.acrylic,
1363
- // No gradients: drop MUI's dark-mode elevation overlay
1424
+ // Drop MUI's dark-mode elevation overlay gradient
1364
1425
  backgroundImage: "none",
1365
1426
  boxShadow: theme.shadows[1]
1366
1427
  })
@@ -1389,7 +1450,6 @@ var ChoreoLabsThemeConfig = {
1389
1450
  MuiCard: {
1390
1451
  styleOverrides: {
1391
1452
  root: ({ theme }) => ({
1392
- // More transparent for Card component
1393
1453
  backgroundColor: theme.vars.palette.background.acrylic
1394
1454
  })
1395
1455
  }
@@ -1411,7 +1471,10 @@ var ChoreoLabsThemeConfig = {
1411
1471
  root: ({ theme }) => ({
1412
1472
  fontSize: theme.typography.body2.fontSize,
1413
1473
  borderRadius: 8,
1414
- backgroundColor: theme.vars.palette.background.acrylic
1474
+ backgroundColor: theme.vars.palette.background.acrylic,
1475
+ "&.Mui-focused:not(.Mui-error) .MuiOutlinedInput-notchedOutline": {
1476
+ borderColor: ChoreoLabsColors.cobalt
1477
+ }
1415
1478
  }),
1416
1479
  notchedOutline: ({ theme }) => ({
1417
1480
  borderWidth: 1,
@@ -1419,6 +1482,24 @@ var ChoreoLabsThemeConfig = {
1419
1482
  })
1420
1483
  }
1421
1484
  },
1485
+ MuiInput: {
1486
+ styleOverrides: {
1487
+ root: {
1488
+ "&:not(.Mui-error)::after": {
1489
+ borderBottomColor: ChoreoLabsColors.cobalt
1490
+ }
1491
+ }
1492
+ }
1493
+ },
1494
+ MuiFilledInput: {
1495
+ styleOverrides: {
1496
+ root: {
1497
+ "&:not(.Mui-error)::after": {
1498
+ borderBottomColor: ChoreoLabsColors.cobalt
1499
+ }
1500
+ }
1501
+ }
1502
+ },
1422
1503
  MuiMenuItem: {
1423
1504
  styleOverrides: {
1424
1505
  root: ({ theme }) => ({
@@ -1434,6 +1515,10 @@ var ChoreoLabsThemeConfig = {
1434
1515
  "&:hover": {
1435
1516
  color: theme.vars.palette.primary.dark,
1436
1517
  textDecoration: "underline"
1518
+ },
1519
+ "&.Mui-focusVisible, &:focus-visible": {
1520
+ outline: `2px solid ${ChoreoLabsColors.cobalt}`,
1521
+ outlineOffset: 2
1437
1522
  }
1438
1523
  }, theme.applyStyles("light", {
1439
1524
  color: theme.vars.palette.primary.dark
@@ -1445,9 +1530,7 @@ var ChoreoLabsThemeConfig = {
1445
1530
  root: ({ theme }) => ({
1446
1531
  borderRadius: 8,
1447
1532
  "&.Mui-selected": {
1448
- // Use CSS variable - automatically adapts to color scheme
1449
1533
  backgroundColor: theme.vars.palette.action.selected,
1450
- // Keep the selected background on hover so the item still reads as selected
1451
1534
  "&:hover": {
1452
1535
  backgroundColor: theme.vars.palette.action.selected
1453
1536
  }
@@ -7188,6 +7271,46 @@ var getUsageTone = (count, limit, warningThreshold, criticalThreshold) => {
7188
7271
  return "success";
7189
7272
  };
7190
7273
  var sumOf = (items, pick) => items.reduce((sum, item) => sum + Math.max(0, pick(item)), 0);
7274
+ var itemsOf = (section) => {
7275
+ var _a, _b;
7276
+ return [].concat((_a = section.items) != null ? _a : [], ...((_b = section.groups) != null ? _b : []).map((group) => group.items));
7277
+ };
7278
+ var TrialBadgeUsageRow = ({ item, warningThreshold, criticalThreshold }) => {
7279
+ const count = Math.max(0, item.count);
7280
+ const tone = getUsageTone(count, item.limit, warningThreshold, criticalThreshold);
7281
+ const value = item.limit > 0 ? Math.min(100, count / item.limit * 100) : 0;
7282
+ const label = typeof item.label === "string" ? item.label : void 0;
7283
+ return /* @__PURE__ */ jsxs22(
7284
+ Box19,
7285
+ {
7286
+ "data-tone": tone,
7287
+ sx: {
7288
+ display: "grid",
7289
+ gridTemplateColumns: "1fr 80px 32px",
7290
+ alignItems: "center",
7291
+ columnGap: 1.5
7292
+ },
7293
+ children: [
7294
+ /* @__PURE__ */ jsx48(Typography14, { variant: "caption", color: "text.secondary", noWrap: true, sx: { fontSize: "0.75rem" }, children: item.label }),
7295
+ /* @__PURE__ */ jsx48(
7296
+ LinearProgress,
7297
+ {
7298
+ variant: "determinate",
7299
+ value,
7300
+ color: tone,
7301
+ "aria-label": label != null ? label : "Usage",
7302
+ sx: { height: 4, borderRadius: 999, bgcolor: "action.hover" }
7303
+ }
7304
+ ),
7305
+ /* @__PURE__ */ jsxs22(Typography14, { variant: "caption", color: "text.secondary", sx: { textAlign: "right", fontSize: "0.75rem" }, children: [
7306
+ /* @__PURE__ */ jsx48(Box19, { component: "span", sx: { fontWeight: 700, color: "text.primary" }, children: count }),
7307
+ "/",
7308
+ item.limit
7309
+ ] })
7310
+ ]
7311
+ }
7312
+ );
7313
+ };
7191
7314
  var TrialBadgeUsagePanel = ({ usage }) => {
7192
7315
  var _a, _b, _c, _d, _e;
7193
7316
  const {
@@ -7201,7 +7324,7 @@ var TrialBadgeUsagePanel = ({ usage }) => {
7201
7324
  const sections = (_c = usage.sections) != null ? _c : [
7202
7325
  { title: (_a = usage.title) != null ? _a : "Components left", items: (_b = usage.items) != null ? _b : [], totalSuffix: usage.totalSuffix }
7203
7326
  ];
7204
- const allItems = [].concat(...sections.map((section) => section.items));
7327
+ const allItems = [].concat(...sections.map(itemsOf));
7205
7328
  const totalTone = getUsageTone(
7206
7329
  sumOf(allItems, (item) => item.count),
7207
7330
  sumOf(allItems, (item) => item.limit),
@@ -7257,9 +7380,10 @@ var TrialBadgeUsagePanel = ({ usage }) => {
7257
7380
  }
7258
7381
  ),
7259
7382
  sections.map((section, index) => {
7260
- var _a2, _b2;
7261
- const sectionCount = sumOf(section.items, (item) => item.count);
7262
- const sectionLimit = sumOf(section.items, (item) => item.limit);
7383
+ var _a2, _b2, _c2, _d2;
7384
+ const sectionItems = itemsOf(section);
7385
+ const sectionCount = sumOf(sectionItems, (item) => item.count);
7386
+ const sectionLimit = sumOf(sectionItems, (item) => item.limit);
7263
7387
  return /* @__PURE__ */ jsxs22(
7264
7388
  CardContent3,
7265
7389
  {
@@ -7284,51 +7408,58 @@ var TrialBadgeUsagePanel = ({ usage }) => {
7284
7408
  section.totalSuffix
7285
7409
  ] }) : null
7286
7410
  ] }),
7287
- /* @__PURE__ */ jsx48(Box19, { sx: { display: "flex", flexDirection: "column", gap: 1 }, children: section.items.map((item, itemIndex) => {
7288
- var _a3, _b3, _c2;
7289
- const count = Math.max(0, item.count);
7290
- const tone = getUsageTone(count, item.limit, warningThreshold, criticalThreshold);
7291
- const value = item.limit > 0 ? Math.min(100, count / item.limit * 100) : 0;
7292
- return /* @__PURE__ */ jsxs22(
7293
- Box19,
7294
- {
7295
- "data-tone": tone,
7296
- sx: {
7297
- display: "grid",
7298
- gridTemplateColumns: "1fr 80px 32px",
7299
- alignItems: "center",
7300
- columnGap: 1.5
7411
+ /* @__PURE__ */ jsxs22(Box19, { sx: { display: "flex", flexDirection: "column", gap: 1 }, children: [
7412
+ ((_c2 = section.items) != null ? _c2 : []).map((item, itemIndex) => {
7413
+ var _a3, _b3;
7414
+ return /* @__PURE__ */ jsx48(
7415
+ TrialBadgeUsageRow,
7416
+ {
7417
+ item,
7418
+ warningThreshold,
7419
+ criticalThreshold
7301
7420
  },
7302
- children: [
7303
- /* @__PURE__ */ jsx48(Typography14, { variant: "caption", color: "text.secondary", noWrap: true, sx: { fontSize: "0.75rem" }, children: item.label }),
7304
- /* @__PURE__ */ jsx48(
7305
- LinearProgress,
7306
- {
7307
- variant: "determinate",
7308
- value,
7309
- color: tone,
7310
- "aria-label": (_c2 = textOf(item.label)) != null ? _c2 : "Usage",
7311
- sx: { height: 4, borderRadius: 999, bgcolor: "action.hover" }
7312
- }
7313
- ),
7314
- /* @__PURE__ */ jsxs22(
7315
- Typography14,
7316
- {
7317
- variant: "caption",
7318
- color: "text.secondary",
7319
- sx: { textAlign: "right", fontSize: "0.75rem" },
7320
- children: [
7321
- /* @__PURE__ */ jsx48(Box19, { component: "span", sx: { fontWeight: 700, color: "text.primary" }, children: count }),
7322
- "/",
7323
- item.limit
7324
- ]
7325
- }
7326
- )
7327
- ]
7328
- },
7329
- (_b3 = (_a3 = item.key) != null ? _a3 : textOf(item.label)) != null ? _b3 : itemIndex
7330
- );
7331
- }) })
7421
+ (_b3 = (_a3 = item.key) != null ? _a3 : textOf(item.label)) != null ? _b3 : itemIndex
7422
+ );
7423
+ }),
7424
+ ((_d2 = section.groups) != null ? _d2 : []).map((group, groupIndex) => {
7425
+ var _a3, _b3, _c3;
7426
+ const rows = group.items.map((item, itemIndex) => {
7427
+ var _a4, _b4;
7428
+ return /* @__PURE__ */ jsx48(
7429
+ TrialBadgeUsageRow,
7430
+ {
7431
+ item,
7432
+ warningThreshold,
7433
+ criticalThreshold
7434
+ },
7435
+ (_b4 = (_a4 = item.key) != null ? _a4 : textOf(item.label)) != null ? _b4 : itemIndex
7436
+ );
7437
+ });
7438
+ if (group.title == null) {
7439
+ return /* @__PURE__ */ jsx48(React20.Fragment, { children: rows }, (_a3 = group.key) != null ? _a3 : groupIndex);
7440
+ }
7441
+ return /* @__PURE__ */ jsxs22(
7442
+ Box19,
7443
+ {
7444
+ role: "group",
7445
+ "aria-label": textOf(group.title),
7446
+ children: [
7447
+ /* @__PURE__ */ jsx48(
7448
+ Typography14,
7449
+ {
7450
+ variant: "caption",
7451
+ color: "text.secondary",
7452
+ sx: { display: "block", fontSize: "0.75rem", mb: 1 },
7453
+ children: group.title
7454
+ }
7455
+ ),
7456
+ /* @__PURE__ */ jsx48(Box19, { sx: { display: "flex", flexDirection: "column", gap: 1, pl: 1.5 }, children: rows })
7457
+ ]
7458
+ },
7459
+ (_c3 = (_b3 = group.key) != null ? _b3 : textOf(group.title)) != null ? _c3 : groupIndex
7460
+ );
7461
+ })
7462
+ ] })
7332
7463
  ]
7333
7464
  },
7334
7465
  (_b2 = (_a2 = section.key) != null ? _a2 : textOf(section.title)) != null ? _b2 : index