@syscore/ui-library 2.0.0-beta-publish-workflow-beta.10 → 2.0.0-beta-publish-workflow-beta.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/client/components/ui/avatar-identity.tsx +16 -3
  2. package/client/components/ui/avatar.tsx +32 -4
  3. package/client/components/ui/back-link.tsx +35 -0
  4. package/client/components/ui/button.tsx +3 -0
  5. package/client/components/ui/card.tsx +20 -3
  6. package/client/components/ui/centered-page.tsx +27 -0
  7. package/client/components/ui/checkbox-field.tsx +57 -0
  8. package/client/components/ui/data-grid.tsx +258 -0
  9. package/client/components/ui/dialog.tsx +6 -0
  10. package/client/components/ui/icon-button.tsx +45 -0
  11. package/client/components/ui/layout.tsx +32 -5
  12. package/client/components/ui/modal-panel.tsx +35 -4
  13. package/client/components/ui/outline-node.tsx +112 -0
  14. package/client/components/ui/radio-card.tsx +54 -0
  15. package/client/components/ui/resource-thumbnail.tsx +12 -1
  16. package/client/components/ui/side-nav.tsx +280 -0
  17. package/client/components/ui/status-pill.tsx +37 -4
  18. package/client/components/ui/table.tsx +26 -4
  19. package/client/components/ui/typography.tsx +33 -2
  20. package/client/global.css +980 -4
  21. package/client/ui/Avatar.stories.tsx +78 -0
  22. package/client/ui/BackLink.stories.tsx +50 -0
  23. package/client/ui/Button.stories.tsx +26 -0
  24. package/client/ui/Card.stories.tsx +30 -0
  25. package/client/ui/CenteredPage.stories.tsx +43 -0
  26. package/client/ui/CheckboxField.stories.tsx +68 -0
  27. package/client/ui/DataGrid.stories.tsx +114 -0
  28. package/client/ui/Dialog.stories.tsx +31 -0
  29. package/client/ui/IconButton.stories.tsx +77 -0
  30. package/client/ui/OutlineNode.stories.tsx +106 -0
  31. package/client/ui/RadioCard.stories.tsx +75 -0
  32. package/client/ui/SideNav.stories.tsx +105 -0
  33. package/client/ui/StatusPill.stories.tsx +78 -0
  34. package/client/ui/Table/Table.stories.tsx +32 -0
  35. package/dist/index.cjs.js +1 -1
  36. package/dist/index.d.ts +105 -0
  37. package/dist/index.es.js +653 -40
  38. package/package.json +3 -1
package/dist/index.es.js CHANGED
@@ -10,7 +10,7 @@ import * as SeparatorPrimitive from "@radix-ui/react-separator";
10
10
  import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
11
11
  import { GripVertical, X as X$1, PanelLeft, Eye, EyeOff, Circle, Dot, ChevronLeft, ChevronRight, Search, Check, MoreHorizontal, ChevronDown, ArrowLeft, ArrowRight } from "lucide-react";
12
12
  import * as ResizablePrimitive from "react-resizable-panels";
13
- import { Slot } from "@radix-ui/react-slot";
13
+ import { Slot, Slottable } from "@radix-ui/react-slot";
14
14
  import * as SheetPrimitive from "@radix-ui/react-dialog";
15
15
  import * as TooltipPrimitive from "@radix-ui/react-tooltip";
16
16
  import * as LabelPrimitive from "@radix-ui/react-label";
@@ -39,6 +39,8 @@ import * as ToastPrimitives from "@radix-ui/react-toast";
39
39
  import * as RechartsPrimitive from "recharts";
40
40
  import { format } from "date-fns";
41
41
  import { Text as Text$1 } from "@syscore/ui-library";
42
+ import { AgGridReact } from "ag-grid-react";
43
+ import { ModuleRegistry, AllCommunityModule, themeQuartz } from "ag-grid-community";
42
44
  function cn(...inputs) {
43
45
  return twMerge(clsx(inputs));
44
46
  }
@@ -712,6 +714,9 @@ const buttonVariants = cva(
712
714
  "general-primary": "button--general-primary",
713
715
  "general-secondary": "button--general-secondary",
714
716
  "general-tertiary": "button--general-tertiary",
717
+ // Destructive actions: delete, remove, deactivate, void. `primary` confirms, `secondary` starts the action.
718
+ "danger-primary": "button--danger-primary",
719
+ "danger-secondary": "button--danger-secondary",
715
720
  "transparent-tertiary": "button--transparent-tertiary",
716
721
  "tooltip-primary": "button--tooltip-primary",
717
722
  "tooltip-secondary": "button--tooltip-secondary",
@@ -1139,13 +1144,31 @@ const defaultElementMap = {
1139
1144
  "number-base": "span"
1140
1145
  };
1141
1146
  const Text = React.forwardRef(
1142
- ({ className, variant = "body-base", as, ...props }, ref) => {
1147
+ ({
1148
+ className,
1149
+ variant = "body-base",
1150
+ as,
1151
+ tone = "default",
1152
+ strong = false,
1153
+ align,
1154
+ leading = "default",
1155
+ family = "default",
1156
+ ...props
1157
+ }, ref) => {
1143
1158
  const Component = as || defaultElementMap[variant];
1144
1159
  return /* @__PURE__ */ jsx(
1145
1160
  Component,
1146
1161
  {
1147
1162
  ref,
1148
- className: cn(typographyVariants({ variant }), className),
1163
+ className: cn(
1164
+ typographyVariants({ variant }),
1165
+ tone === "muted" && "typo--muted",
1166
+ strong && "typo--strong",
1167
+ align === "center" && "typo--center",
1168
+ leading === "relaxed" && "typo--relaxed",
1169
+ family === "sans" && "typo--sans",
1170
+ className
1171
+ ),
1149
1172
  ...props
1150
1173
  }
1151
1174
  );
@@ -1194,24 +1217,38 @@ const cardVariants = cva("card", {
1194
1217
  outlined: "card--outlined",
1195
1218
  elevated: "card--elevated",
1196
1219
  filled: "card--filled",
1197
- interactive: "card--interactive"
1220
+ interactive: "card--interactive",
1221
+ /** A bordered 16px-radius panel for a side summary. */
1222
+ panel: "card--panel",
1223
+ /** A bordered 12px-radius box nested inside a form or another card. */
1224
+ inset: "card--inset"
1198
1225
  },
1199
1226
  padding: {
1200
1227
  default: "",
1201
1228
  spacious: "card--padding-spacious"
1229
+ },
1230
+ /** `relaxed` — more air between heading, description and content (dense back-office pages). */
1231
+ spacing: {
1232
+ default: "",
1233
+ relaxed: "card--spacing-relaxed"
1202
1234
  }
1203
1235
  },
1204
1236
  defaultVariants: {
1205
1237
  variant: "default",
1206
- padding: "default"
1238
+ padding: "default",
1239
+ spacing: "default"
1207
1240
  }
1208
1241
  });
1209
1242
  const Card = React.forwardRef(
1210
- ({ className, variant, padding, ...props }, ref) => /* @__PURE__ */ jsx(
1243
+ ({ className, variant, padding, spacing: spacing2, sticky = false, ...props }, ref) => /* @__PURE__ */ jsx(
1211
1244
  "div",
1212
1245
  {
1213
1246
  ref,
1214
- className: cn(cardVariants({ variant, padding }), className),
1247
+ className: cn(
1248
+ cardVariants({ variant, padding, spacing: spacing2 }),
1249
+ sticky && "card--sticky",
1250
+ className
1251
+ ),
1215
1252
  ...props
1216
1253
  }
1217
1254
  )
@@ -1355,15 +1392,31 @@ const ScrollBar = React.forwardRef(({ className, orientation = "vertical", ...pr
1355
1392
  ));
1356
1393
  ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
1357
1394
  const Table = React.forwardRef(
1358
- ({ className, containerClassName, density = "compact", ...props }, ref) => /* @__PURE__ */ jsx("div", { className: cn("table-wrapper", containerClassName), children: /* @__PURE__ */ jsx(
1359
- "table",
1395
+ ({
1396
+ className,
1397
+ containerClassName,
1398
+ density = "compact",
1399
+ appearance = "plain",
1400
+ ...props
1401
+ }, ref) => /* @__PURE__ */ jsx(
1402
+ "div",
1360
1403
  {
1361
- ref,
1362
- "data-density": density,
1363
- className: cn("table", className),
1364
- ...props
1404
+ className: cn(
1405
+ "table-wrapper",
1406
+ appearance === "card" && "table-wrapper--card",
1407
+ containerClassName
1408
+ ),
1409
+ children: /* @__PURE__ */ jsx(
1410
+ "table",
1411
+ {
1412
+ ref,
1413
+ "data-density": density,
1414
+ className: cn("table", className),
1415
+ ...props
1416
+ }
1417
+ )
1365
1418
  }
1366
- ) })
1419
+ )
1367
1420
  );
1368
1421
  Table.displayName = "Table";
1369
1422
  const TableHeader = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", { ref, className: cn("table-header", className), ...props }));
@@ -1400,12 +1453,12 @@ const TableHead = React.forwardRef(
1400
1453
  );
1401
1454
  TableHead.displayName = "TableHead";
1402
1455
  const TableCell = React.forwardRef(
1403
- ({ className, align = "left", text, tag, action, children, ...props }, ref) => /* @__PURE__ */ jsx(
1456
+ ({ className, align = "left", strong = false, text, tag, action, children, ...props }, ref) => /* @__PURE__ */ jsx(
1404
1457
  "td",
1405
1458
  {
1406
1459
  ref,
1407
1460
  "data-align": align,
1408
- className: cn("table-cell", className),
1461
+ className: cn("table-cell", strong && "table-cell--strong", className),
1409
1462
  ...props,
1410
1463
  children: /* @__PURE__ */ jsxs("span", { className: "table-cell-inner", children: [
1411
1464
  text,
@@ -2833,6 +2886,38 @@ const Checkbox = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__
2833
2886
  }
2834
2887
  ));
2835
2888
  Checkbox.displayName = CheckboxPrimitive.Root.displayName;
2889
+ const CheckboxField = React.forwardRef(({ className, label, description, id, disabled, ...props }, ref) => {
2890
+ const generatedId = React.useId();
2891
+ const fieldId = id ?? generatedId;
2892
+ const descriptionId = description ? `${fieldId}-description` : void 0;
2893
+ return /* @__PURE__ */ jsxs(
2894
+ "div",
2895
+ {
2896
+ className: cn(
2897
+ "checkbox-field",
2898
+ disabled && "checkbox-field--disabled",
2899
+ className
2900
+ ),
2901
+ children: [
2902
+ /* @__PURE__ */ jsx(
2903
+ Checkbox,
2904
+ {
2905
+ ref,
2906
+ id: fieldId,
2907
+ disabled,
2908
+ "aria-describedby": descriptionId,
2909
+ ...props
2910
+ }
2911
+ ),
2912
+ /* @__PURE__ */ jsxs("div", { className: "checkbox-field__text", children: [
2913
+ /* @__PURE__ */ jsx("label", { htmlFor: fieldId, className: "checkbox-field__label", children: label }),
2914
+ description ? /* @__PURE__ */ jsx("span", { id: descriptionId, className: "checkbox-field__description", children: description }) : null
2915
+ ] })
2916
+ ]
2917
+ }
2918
+ );
2919
+ });
2920
+ CheckboxField.displayName = "CheckboxField";
2836
2921
  const RadioGroup = React.forwardRef(({ className, ...props }, ref) => {
2837
2922
  return /* @__PURE__ */ jsx(
2838
2923
  RadioGroupPrimitive.Root,
@@ -3591,11 +3676,17 @@ const avatarIdentityVariants = cva("avatar-identity", {
3591
3676
  textDirection: {
3592
3677
  right: "avatar-identity--right",
3593
3678
  left: "avatar-identity--left"
3679
+ },
3680
+ /** `soft` — a table-row identity: pale initials disc, no ring, name over a quieter email. */
3681
+ appearance: {
3682
+ default: "",
3683
+ soft: "avatar-identity--soft"
3594
3684
  }
3595
3685
  },
3596
3686
  defaultVariants: {
3597
3687
  size: "xlarge",
3598
- textDirection: "right"
3688
+ textDirection: "right",
3689
+ appearance: "default"
3599
3690
  }
3600
3691
  });
3601
3692
  function initialsFromName(name) {
@@ -3606,10 +3697,12 @@ const AvatarIdentity = React.forwardRef(
3606
3697
  className,
3607
3698
  size,
3608
3699
  textDirection,
3700
+ appearance,
3609
3701
  variant = "placeholder",
3610
3702
  name = "",
3611
3703
  email = "",
3612
3704
  initials,
3705
+ icon,
3613
3706
  src,
3614
3707
  alt,
3615
3708
  showText = true,
@@ -3621,7 +3714,10 @@ const AvatarIdentity = React.forwardRef(
3621
3714
  "div",
3622
3715
  {
3623
3716
  ref,
3624
- className: cn(avatarIdentityVariants({ size, textDirection }), className),
3717
+ className: cn(
3718
+ avatarIdentityVariants({ size, textDirection, appearance }),
3719
+ className
3720
+ ),
3625
3721
  ...props,
3626
3722
  children: [
3627
3723
  /* @__PURE__ */ jsxs("div", { className: "avatar-identity__face", "data-face": face, children: [
@@ -3633,7 +3729,7 @@ const AvatarIdentity = React.forwardRef(
3633
3729
  alt: alt || name
3634
3730
  }
3635
3731
  ) : null,
3636
- face === "initials" ? /* @__PURE__ */ jsx("span", { className: "avatar-identity__initials", "aria-hidden": showText, children: letters }) : null,
3732
+ face === "initials" ? /* @__PURE__ */ jsx("span", { className: "avatar-identity__initials", "aria-hidden": showText, children: icon ?? letters }) : null,
3637
3733
  face === "placeholder" ? /* @__PURE__ */ jsx(
3638
3734
  "img",
3639
3735
  {
@@ -3646,7 +3742,7 @@ const AvatarIdentity = React.forwardRef(
3646
3742
  ] }),
3647
3743
  showText ? /* @__PURE__ */ jsxs("div", { className: "avatar-identity__text", children: [
3648
3744
  /* @__PURE__ */ jsx("p", { className: "avatar-identity__name", children: name }),
3649
- /* @__PURE__ */ jsx("p", { className: "avatar-identity__email", children: email })
3745
+ email ? /* @__PURE__ */ jsx("p", { className: "avatar-identity__email", children: email }) : null
3650
3746
  ] }) : null
3651
3747
  ]
3652
3748
  }
@@ -4236,11 +4332,29 @@ const AlertDialogPanel = ({
4236
4332
  }
4237
4333
  );
4238
4334
  AlertDialogPanel.displayName = "AlertDialogPanel";
4239
- const Avatar = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4335
+ const avatarVariants = cva("avatar", {
4336
+ variants: {
4337
+ size: {
4338
+ sm: "avatar--sm",
4339
+ md: "",
4340
+ lg: "avatar--lg",
4341
+ xl: "avatar--xl"
4342
+ },
4343
+ appearance: {
4344
+ default: "",
4345
+ brand: "avatar--brand"
4346
+ }
4347
+ },
4348
+ defaultVariants: {
4349
+ size: "md",
4350
+ appearance: "default"
4351
+ }
4352
+ });
4353
+ const Avatar = React.forwardRef(({ className, size, appearance, ...props }, ref) => /* @__PURE__ */ jsx(
4240
4354
  AvatarPrimitive.Root,
4241
4355
  {
4242
4356
  ref,
4243
- className: cn("avatar", className),
4357
+ className: cn(avatarVariants({ size, appearance }), className),
4244
4358
  ...props
4245
4359
  }
4246
4360
  ));
@@ -4618,6 +4732,7 @@ function DialogContent({
4618
4732
  children,
4619
4733
  showCloseButton = true,
4620
4734
  size = "default",
4735
+ appearance = "default",
4621
4736
  ...props
4622
4737
  }) {
4623
4738
  return /* @__PURE__ */ jsx(DialogPortal, { "data-slot": "dialog-portal", children: /* @__PURE__ */ jsx(
@@ -4634,6 +4749,7 @@ function DialogContent({
4634
4749
  className: cn(
4635
4750
  "dialog-content",
4636
4751
  size === "fullscreen" && "dialog-content--fullscreen",
4752
+ appearance === "form" && "dialog-content--form",
4637
4753
  className
4638
4754
  ),
4639
4755
  ...props,
@@ -5285,6 +5401,8 @@ const GridSpan = React.forwardRef(
5285
5401
  GridSpan.displayName = "GridSpan";
5286
5402
  const ColumnsPresetMap = {
5287
5403
  sidebar: "var(--layout-panel-width-default) 1fr",
5404
+ // A flexible main column and a 20–27.5rem aside (a form beside its live summary).
5405
+ "main-aside": "minmax(0, 1fr) minmax(20rem, 27.5rem)",
5288
5406
  "sidebar-right": "1fr var(--layout-panel-width-default)",
5289
5407
  "wide-sidebar": "var(--layout-panel-width-wide) 1fr",
5290
5408
  "narrow-sidebar": "var(--layout-panel-width-narrow) 1fr",
@@ -5304,6 +5422,7 @@ const Columns = React.forwardRef(
5304
5422
  columnGap,
5305
5423
  rowGap,
5306
5424
  collapse,
5425
+ align,
5307
5426
  className,
5308
5427
  style,
5309
5428
  ...props
@@ -5316,6 +5435,7 @@ const Columns = React.forwardRef(
5316
5435
  className: cn(
5317
5436
  "columns-layout",
5318
5437
  collapse && `columns-layout--collapse-${collapse}`,
5438
+ align === "start" && "columns-layout--align-start",
5319
5439
  className
5320
5440
  ),
5321
5441
  style: {
@@ -5425,7 +5545,7 @@ function panelWidthVar(width) {
5425
5545
  if (width == null) return void 0;
5426
5546
  if (typeof width === "number") {
5427
5547
  warnOnce(
5428
- `LayoutPanel: width={${width}} freezes ${width}px into this app. Use width="narrow" | "default" | "wide" so --layout-panel-width-* stays in control.`
5548
+ `LayoutPanel: width={${width}} freezes ${width}px into this app. Use width="rail" | "nav" | "narrow" | "default" | "wide" so --layout-panel-width-* stays in control.`
5429
5549
  );
5430
5550
  return `${width}px`;
5431
5551
  }
@@ -5456,9 +5576,16 @@ function slotIdOf(element) {
5456
5576
  }
5457
5577
  const LayoutHeader = markSlot(
5458
5578
  React.forwardRef(
5459
- ({ as = "header", ...props }, ref) => {
5579
+ ({ as = "header", sticky = false, ...props }, ref) => {
5460
5580
  const Component = as;
5461
- return /* @__PURE__ */ jsx(Component, { ref, className: "layout-header", ...props });
5581
+ return /* @__PURE__ */ jsx(
5582
+ Component,
5583
+ {
5584
+ ref,
5585
+ className: cn("layout-header", sticky && "layout-header--sticky"),
5586
+ ...props
5587
+ }
5588
+ );
5462
5589
  }
5463
5590
  ),
5464
5591
  "header"
@@ -5502,6 +5629,8 @@ const LayoutPanel = markSlot(
5502
5629
  placement = "start",
5503
5630
  width,
5504
5631
  padding,
5632
+ appearance = "default",
5633
+ collapsed = false,
5505
5634
  isScrollable = true,
5506
5635
  tabIndex,
5507
5636
  "aria-label": ariaLabel,
@@ -5515,12 +5644,14 @@ const LayoutPanel = markSlot(
5515
5644
  className: cn(
5516
5645
  "layout-panel",
5517
5646
  `layout-panel--${placement}`,
5518
- isScrollable && "layout-panel--scrollable"
5647
+ isScrollable && "layout-panel--scrollable",
5648
+ appearance === "nav" && "layout-panel--nav"
5519
5649
  ),
5520
5650
  style: {
5521
5651
  ...width != null ? { ["--layout-panel-width"]: panelWidthVar(width) } : void 0,
5522
5652
  ...padding != null ? { ["--layout-panel-padding"]: tokenCss(padding) } : void 0
5523
5653
  },
5654
+ "data-collapsed": collapsed || void 0,
5524
5655
  tabIndex: tabIndex ?? (isScrollable ? 0 : void 0),
5525
5656
  "aria-label": ariaLabel ?? (placement === "end" ? "Details" : "Navigation"),
5526
5657
  ...props
@@ -17206,18 +17337,30 @@ const TONES = [
17206
17337
  "paid",
17207
17338
  "waived",
17208
17339
  "void",
17209
- "neutral"
17340
+ "neutral",
17341
+ "info",
17342
+ "success",
17343
+ "warning",
17344
+ "danger",
17345
+ "accent",
17346
+ "inactive",
17347
+ "plain"
17210
17348
  ];
17211
17349
  function toneForStatus(status) {
17212
17350
  const value = String(status ?? "").toLowerCase();
17213
17351
  return TONES.includes(value) ? value : "neutral";
17214
17352
  }
17215
17353
  const StatusPill = React.forwardRef(
17216
- ({ tone = "neutral", children, className, ...props }, ref) => /* @__PURE__ */ jsx(
17354
+ ({ tone = "neutral", appearance = "default", children, className, ...props }, ref) => /* @__PURE__ */ jsx(
17217
17355
  "span",
17218
17356
  {
17219
17357
  ref,
17220
- className: cn("status-pill", `status-pill--${tone}`, className),
17358
+ className: cn(
17359
+ "status-pill",
17360
+ `status-pill--${tone}`,
17361
+ appearance === "chip" && "status-pill--chip",
17362
+ className
17363
+ ),
17221
17364
  ...props,
17222
17365
  children
17223
17366
  }
@@ -17363,16 +17506,28 @@ const ModalContainer = React.forwardRef(
17363
17506
  );
17364
17507
  ModalContainer.displayName = "ModalContainer";
17365
17508
  const ModalCloseRow = React.forwardRef(
17366
- ({ onClose, label = "Close", icon, className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("modal-close-row", className), ...props, children: /* @__PURE__ */ jsx(
17367
- "button",
17509
+ ({ onClose, label = "Close", icon, inset = "default", className, ...props }, ref) => /* @__PURE__ */ jsx(
17510
+ "div",
17368
17511
  {
17369
- type: "button",
17370
- className: "modal-close",
17371
- onClick: onClose,
17372
- "aria-label": label,
17373
- children: icon
17512
+ ref,
17513
+ className: cn(
17514
+ "modal-close-row",
17515
+ inset === "roomy" && "modal-close-row--roomy",
17516
+ className
17517
+ ),
17518
+ ...props,
17519
+ children: /* @__PURE__ */ jsx(
17520
+ "button",
17521
+ {
17522
+ type: "button",
17523
+ className: "modal-close",
17524
+ onClick: onClose,
17525
+ "aria-label": label,
17526
+ children: icon
17527
+ }
17528
+ )
17374
17529
  }
17375
- ) })
17530
+ )
17376
17531
  );
17377
17532
  ModalCloseRow.displayName = "ModalCloseRow";
17378
17533
  const ModalPanel = React.forwardRef(
@@ -17382,6 +17537,9 @@ const ModalPanel = React.forwardRef(
17382
17537
  align = "start",
17383
17538
  angle = 114.72731273771963,
17384
17539
  height,
17540
+ gap,
17541
+ paddingTop,
17542
+ paddingBottom,
17385
17543
  className,
17386
17544
  style,
17387
17545
  ...props
@@ -17398,6 +17556,9 @@ const ModalPanel = React.forwardRef(
17398
17556
  style: {
17399
17557
  ...tone === "accent" ? { ["--panel-gradient-angle"]: `${angle}deg` } : null,
17400
17558
  ...height !== void 0 ? { height } : null,
17559
+ ...gap ? { ["--modal-panel-gap"]: `var(--space-${gap})` } : null,
17560
+ ...paddingTop ? { ["--modal-panel-padding-top"]: `var(--space-${paddingTop})` } : null,
17561
+ ...paddingBottom ? { ["--modal-panel-padding-bottom"]: `var(--space-${paddingBottom})` } : null,
17401
17562
  ...style
17402
17563
  },
17403
17564
  ...props
@@ -17406,7 +17567,13 @@ const ModalPanel = React.forwardRef(
17406
17567
  );
17407
17568
  ModalPanel.displayName = "ModalPanel";
17408
17569
  const ModalTitle = React.forwardRef(
17409
- ({ as: Component = "h2", children, className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: cn("modal-title", className), children: /* @__PURE__ */ jsx(Component, { ref, className: "modal-title__text heading-xxsmall", ...props, children }) })
17570
+ ({ as: Component = "h2", size = "default", children, className, ...props }, ref) => /* @__PURE__ */ jsx(
17571
+ "div",
17572
+ {
17573
+ className: cn("modal-title", size === "large" && "modal-title--large", className),
17574
+ children: /* @__PURE__ */ jsx(Component, { ref, className: "modal-title__text heading-xxsmall", ...props, children })
17575
+ }
17576
+ )
17410
17577
  );
17411
17578
  ModalTitle.displayName = "ModalTitle";
17412
17579
  const ModalPromptRow = React.forwardRef(
@@ -17730,12 +17897,17 @@ const FileUploadTrigger = React.forwardRef(
17730
17897
  FileUploadTrigger.displayName = "FileUploadTrigger";
17731
17898
  function ResourceThumbnail({
17732
17899
  src,
17733
- alt = ""
17900
+ alt = "",
17901
+ size = "default"
17734
17902
  }) {
17735
17903
  return /* @__PURE__ */ jsx(
17736
17904
  "img",
17737
17905
  {
17738
- className: "resource-thumbnail",
17906
+ className: cn(
17907
+ "resource-thumbnail",
17908
+ size === "preview" && "resource-thumbnail--preview",
17909
+ size === "thumb" && "resource-thumbnail--thumb"
17910
+ ),
17739
17911
  src,
17740
17912
  alt,
17741
17913
  loading: "lazy"
@@ -17795,6 +17967,428 @@ const PriceTag = React.forwardRef(
17795
17967
  )
17796
17968
  );
17797
17969
  PriceTag.displayName = "PriceTag";
17970
+ const SideNavContext = React.createContext({
17971
+ collapsed: false
17972
+ });
17973
+ const SideNav = React.forwardRef(
17974
+ ({ className, collapsed = false, children, ...props }, ref) => /* @__PURE__ */ jsx(SideNavContext.Provider, { value: { collapsed }, children: /* @__PURE__ */ jsx(
17975
+ "nav",
17976
+ {
17977
+ ref,
17978
+ "data-collapsed": collapsed || void 0,
17979
+ className: cn("side-nav", collapsed && "side-nav--collapsed", className),
17980
+ ...props,
17981
+ children
17982
+ }
17983
+ ) })
17984
+ );
17985
+ SideNav.displayName = "SideNav";
17986
+ function useDisclosure(open, defaultOpen, onOpenChange) {
17987
+ const [inner, setInner] = React.useState(defaultOpen);
17988
+ const isOpen = open ?? inner;
17989
+ const setOpen = (next) => {
17990
+ if (open === void 0) setInner(next);
17991
+ onOpenChange == null ? void 0 : onOpenChange(next);
17992
+ };
17993
+ return [isOpen, setOpen];
17994
+ }
17995
+ const SideNavGroup = React.forwardRef(
17996
+ ({
17997
+ className,
17998
+ label,
17999
+ collapsible = false,
18000
+ open,
18001
+ defaultOpen = true,
18002
+ onOpenChange,
18003
+ children,
18004
+ ...props
18005
+ }, ref) => {
18006
+ const { collapsed } = React.useContext(SideNavContext);
18007
+ const headingId = React.useId();
18008
+ const itemsId = React.useId();
18009
+ const [isOpen, setOpen] = useDisclosure(open, defaultOpen, onOpenChange);
18010
+ if (!collapsible) {
18011
+ return /* @__PURE__ */ jsxs(
18012
+ "div",
18013
+ {
18014
+ ref,
18015
+ role: "group",
18016
+ "aria-labelledby": label ? headingId : void 0,
18017
+ className: cn("side-nav__group", className),
18018
+ ...props,
18019
+ children: [
18020
+ label ? /* @__PURE__ */ jsx("span", { id: headingId, className: "side-nav__heading", children: label }) : null,
18021
+ children
18022
+ ]
18023
+ }
18024
+ );
18025
+ }
18026
+ const shown = collapsed || isOpen;
18027
+ return /* @__PURE__ */ jsxs(
18028
+ "div",
18029
+ {
18030
+ ref,
18031
+ role: "group",
18032
+ "aria-labelledby": label ? headingId : void 0,
18033
+ className: cn("side-nav__group", className),
18034
+ ...props,
18035
+ children: [
18036
+ label ? /* @__PURE__ */ jsxs(
18037
+ "button",
18038
+ {
18039
+ type: "button",
18040
+ id: headingId,
18041
+ className: "side-nav__heading side-nav__heading--toggle",
18042
+ "aria-expanded": shown,
18043
+ "aria-controls": itemsId,
18044
+ onClick: () => setOpen(!isOpen),
18045
+ children: [
18046
+ /* @__PURE__ */ jsx("span", { children: label }),
18047
+ /* @__PURE__ */ jsx(ChevronDown, { className: "side-nav__chevron", "aria-hidden": "true" })
18048
+ ]
18049
+ }
18050
+ ) : null,
18051
+ /* @__PURE__ */ jsx("div", { id: itemsId, className: "side-nav__items", hidden: !shown, children })
18052
+ ]
18053
+ }
18054
+ );
18055
+ }
18056
+ );
18057
+ SideNavGroup.displayName = "SideNavGroup";
18058
+ const SideNavItem = React.forwardRef(
18059
+ ({ className, icon, active = false, asChild = false, children, ...props }, ref) => {
18060
+ const { collapsed } = React.useContext(SideNavContext);
18061
+ const Comp = asChild ? Slot : "button";
18062
+ const label = typeof children === "string" ? children : void 0;
18063
+ return /* @__PURE__ */ jsxs(
18064
+ Comp,
18065
+ {
18066
+ ref,
18067
+ ...asChild ? {} : { type: "button" },
18068
+ "aria-current": active ? "page" : void 0,
18069
+ "aria-label": collapsed ? label : void 0,
18070
+ title: collapsed ? label : void 0,
18071
+ className: cn(
18072
+ "side-nav__item",
18073
+ active && "side-nav__item--active",
18074
+ className
18075
+ ),
18076
+ ...props,
18077
+ children: [
18078
+ icon ? /* @__PURE__ */ jsx("span", { className: "side-nav__icon", "aria-hidden": "true", children: icon }) : null,
18079
+ asChild ? /* @__PURE__ */ jsx(Slottable, { children }) : /* @__PURE__ */ jsx("span", { className: "side-nav__label", children })
18080
+ ]
18081
+ }
18082
+ );
18083
+ }
18084
+ );
18085
+ SideNavItem.displayName = "SideNavItem";
18086
+ const SideNavBranch = React.forwardRef(
18087
+ ({
18088
+ className,
18089
+ icon,
18090
+ label,
18091
+ active = false,
18092
+ open,
18093
+ defaultOpen = false,
18094
+ onOpenChange,
18095
+ onClick,
18096
+ children,
18097
+ ...props
18098
+ }, ref) => {
18099
+ const { collapsed } = React.useContext(SideNavContext);
18100
+ const subId = React.useId();
18101
+ const [isOpen, setOpen] = useDisclosure(open, defaultOpen, onOpenChange);
18102
+ return /* @__PURE__ */ jsxs("div", { ref, className: cn("side-nav__branch", className), ...props, children: [
18103
+ /* @__PURE__ */ jsxs(
18104
+ "button",
18105
+ {
18106
+ type: "button",
18107
+ className: cn(
18108
+ "side-nav__item",
18109
+ "side-nav__item--branch",
18110
+ active && "side-nav__item--branch-active"
18111
+ ),
18112
+ "aria-expanded": collapsed ? void 0 : isOpen,
18113
+ "aria-controls": subId,
18114
+ "aria-label": collapsed ? label : void 0,
18115
+ title: collapsed ? label : void 0,
18116
+ onClick: (event) => {
18117
+ if (collapsed) onClick == null ? void 0 : onClick(event);
18118
+ else setOpen(!isOpen);
18119
+ },
18120
+ children: [
18121
+ icon ? /* @__PURE__ */ jsx("span", { className: "side-nav__icon", "aria-hidden": "true", children: icon }) : null,
18122
+ /* @__PURE__ */ jsx("span", { className: "side-nav__label", children: label }),
18123
+ /* @__PURE__ */ jsx(ChevronDown, { className: "side-nav__chevron", "aria-hidden": "true" })
18124
+ ]
18125
+ }
18126
+ ),
18127
+ /* @__PURE__ */ jsx("div", { id: subId, className: "side-nav__sub", hidden: collapsed || !isOpen, children })
18128
+ ] });
18129
+ }
18130
+ );
18131
+ SideNavBranch.displayName = "SideNavBranch";
18132
+ const RadioCardGroup = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
18133
+ RadioGroupPrimitive.Root,
18134
+ {
18135
+ ref,
18136
+ className: cn("radio-card-group", className),
18137
+ ...props
18138
+ }
18139
+ ));
18140
+ RadioCardGroup.displayName = "RadioCardGroup";
18141
+ const RadioCardItem = React.forwardRef(({ className, title, description, ...props }, ref) => /* @__PURE__ */ jsxs(
18142
+ RadioGroupPrimitive.Item,
18143
+ {
18144
+ ref,
18145
+ className: cn("radio-card", className),
18146
+ ...props,
18147
+ children: [
18148
+ /* @__PURE__ */ jsx("span", { className: "radio-card__title", children: title }),
18149
+ description ? /* @__PURE__ */ jsx("span", { className: "radio-card__description", children: description }) : null
18150
+ ]
18151
+ }
18152
+ ));
18153
+ RadioCardItem.displayName = "RadioCardItem";
18154
+ const outlineNodeVariants = cva("tree-node", {
18155
+ variants: {
18156
+ level: {
18157
+ section: "tree-node--section",
18158
+ branch: "tree-node--branch",
18159
+ leaf: "tree-node--leaf"
18160
+ }
18161
+ },
18162
+ defaultVariants: { level: "section" }
18163
+ });
18164
+ const OutlineNode = React.forwardRef(
18165
+ ({ className, level, inactive = false, ...props }, ref) => /* @__PURE__ */ jsx(
18166
+ "div",
18167
+ {
18168
+ ref,
18169
+ "data-inactive": inactive || void 0,
18170
+ className: cn(outlineNodeVariants({ level }), className),
18171
+ ...props
18172
+ }
18173
+ )
18174
+ );
18175
+ OutlineNode.displayName = "OutlineNode";
18176
+ const OutlineNodeHead = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("tree-node__head", className), ...props }));
18177
+ OutlineNodeHead.displayName = "OutlineNodeHead";
18178
+ const OutlineNodeTitle = React.forwardRef(
18179
+ ({ className, code, children, ...props }, ref) => /* @__PURE__ */ jsxs("div", { ref, className: cn("tree-node__title", className), ...props, children: [
18180
+ code != null ? /* @__PURE__ */ jsxs(Fragment, { children: [
18181
+ /* @__PURE__ */ jsx("strong", { className: "tree-node__code", children: code }),
18182
+ "· "
18183
+ ] }) : null,
18184
+ children
18185
+ ] })
18186
+ );
18187
+ OutlineNodeTitle.displayName = "OutlineNodeTitle";
18188
+ const OutlineNodeMeta = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("span", { ref, className: cn("tree-node__meta", className), ...props }));
18189
+ OutlineNodeMeta.displayName = "OutlineNodeMeta";
18190
+ const OutlineNodeControls = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
18191
+ "div",
18192
+ {
18193
+ ref,
18194
+ className: cn("tree-node__controls", className),
18195
+ ...props
18196
+ }
18197
+ ));
18198
+ OutlineNodeControls.displayName = "OutlineNodeControls";
18199
+ const BackLink = React.forwardRef(
18200
+ ({ className, asChild = false, children, ...props }, ref) => {
18201
+ const Comp = asChild ? Slot : "button";
18202
+ return /* @__PURE__ */ jsxs(
18203
+ Comp,
18204
+ {
18205
+ ref,
18206
+ ...asChild ? {} : { type: "button" },
18207
+ className: cn("back-link", className),
18208
+ ...props,
18209
+ children: [
18210
+ /* @__PURE__ */ jsx(ArrowLeft, { className: "back-link__icon", "aria-hidden": "true" }),
18211
+ asChild ? /* @__PURE__ */ jsx(Slottable, { children }) : /* @__PURE__ */ jsx("span", { children })
18212
+ ]
18213
+ }
18214
+ );
18215
+ }
18216
+ );
18217
+ BackLink.displayName = "BackLink";
18218
+ const CenteredPage = React.forwardRef(
18219
+ ({ as: Component = "main", className, children, ...props }, ref) => /* @__PURE__ */ jsx(Component, { ref, className: cn("centered-page", className), ...props, children: /* @__PURE__ */ jsx("div", { className: "centered-page__body", children }) })
18220
+ );
18221
+ CenteredPage.displayName = "CenteredPage";
18222
+ ModuleRegistry.registerModules([AllCommunityModule]);
18223
+ const dataGridTheme = themeQuartz.withParams({
18224
+ fontFamily: "var(--font-mazzard, 'Mazzard Soft M'), sans-serif",
18225
+ fontSize: 14,
18226
+ foregroundColor: "#1f2430",
18227
+ backgroundColor: "#ffffff",
18228
+ accentColor: "#0f748a",
18229
+ borderColor: "#e3e8ef",
18230
+ wrapperBorderRadius: 16,
18231
+ headerBackgroundColor: "#f6f8fb",
18232
+ headerTextColor: "#6b7280",
18233
+ headerFontSize: 12,
18234
+ headerFontWeight: 600,
18235
+ // The pinned (action) column joins the rest of the row; no divider line.
18236
+ pinnedColumnBorder: false,
18237
+ rowHoverColor: "#f4f9fd",
18238
+ columnBorder: false,
18239
+ headerColumnBorder: false,
18240
+ // The resize handle stays (the column still drags) but is drawn as a faint tick, not a separator line.
18241
+ headerColumnResizeHandleColor: "transparent",
18242
+ spacing: 8
18243
+ });
18244
+ const ALIGN_CLASS = {
18245
+ left: void 0,
18246
+ center: "data-grid__cell--center",
18247
+ right: "data-grid__cell--right"
18248
+ };
18249
+ function shapeOf(columns) {
18250
+ return JSON.stringify(
18251
+ columns.map((c) => [
18252
+ c.key,
18253
+ c.header,
18254
+ c.sortable ?? false,
18255
+ c.filter ?? false,
18256
+ c.resizable ?? true,
18257
+ c.width ?? null,
18258
+ c.minWidth ?? null,
18259
+ c.flex ?? null,
18260
+ c.align ?? null,
18261
+ c.pinned ?? null,
18262
+ c.wrap ?? false,
18263
+ Boolean(c.value),
18264
+ Boolean(c.cell)
18265
+ ])
18266
+ );
18267
+ }
18268
+ function DataGrid({
18269
+ columns,
18270
+ rows,
18271
+ getRowId,
18272
+ loading = false,
18273
+ emptyText = "Nothing to show.",
18274
+ quickFilter,
18275
+ sort,
18276
+ onSortChange,
18277
+ onRowClick,
18278
+ className,
18279
+ "aria-label": ariaLabel
18280
+ }) {
18281
+ const serverSorted = onSortChange !== void 0;
18282
+ const latest = React.useRef(columns);
18283
+ latest.current = columns;
18284
+ const shape = shapeOf(columns);
18285
+ const sortKey = (sort == null ? void 0 : sort.key) ?? null;
18286
+ const sortDirection = (sort == null ? void 0 : sort.direction) ?? null;
18287
+ const columnDefs = React.useMemo(
18288
+ () => latest.current.map((column) => {
18289
+ const fixed = column.width !== void 0;
18290
+ const find = () => latest.current.find((c) => c.key === column.key);
18291
+ return {
18292
+ colId: column.key,
18293
+ headerName: column.header,
18294
+ valueGetter: column.value ? (params) => {
18295
+ var _a, _b;
18296
+ return params.data ? (_b = (_a = find()) == null ? void 0 : _a.value) == null ? void 0 : _b.call(_a, params.data) : void 0;
18297
+ } : void 0,
18298
+ cellRenderer: column.cell ? (params) => {
18299
+ var _a, _b;
18300
+ return params.data ? (_b = (_a = find()) == null ? void 0 : _a.cell) == null ? void 0 : _b.call(_a, params.data) : null;
18301
+ } : void 0,
18302
+ sortable: column.sortable ?? false,
18303
+ filter: column.filter ?? false,
18304
+ resizable: column.resizable ?? true,
18305
+ suppressMovable: true,
18306
+ width: column.width,
18307
+ minWidth: column.minWidth ?? (fixed ? column.width : 96),
18308
+ flex: fixed ? void 0 : column.flex ?? 1,
18309
+ pinned: column.pinned,
18310
+ wrapText: column.wrap ?? false,
18311
+ autoHeight: column.wrap ?? false,
18312
+ cellClass: column.align ? ALIGN_CLASS[column.align] : void 0,
18313
+ headerClass: column.align ? ALIGN_CLASS[column.align] : void 0,
18314
+ // Server-sorted data keeps the order it arrived in; the grid only draws the indicator.
18315
+ ...serverSorted ? {
18316
+ comparator: () => 0,
18317
+ // Server-side sort has no "no sort": clicking again flips the direction.
18318
+ sortingOrder: ["asc", "desc"],
18319
+ sort: sortKey === column.key ? sortDirection : null
18320
+ } : {}
18321
+ };
18322
+ }),
18323
+ // `shape` stands for the column list; the list itself is a new array on most renders.
18324
+ // eslint-disable-next-line react-hooks/exhaustive-deps
18325
+ [shape, serverSorted, sortKey, sortDirection]
18326
+ );
18327
+ const handleSortChanged = React.useCallback(
18328
+ (event) => {
18329
+ if (!serverSorted) return;
18330
+ const active = event.api.getColumnState().find((state) => state.sort);
18331
+ const next = (active == null ? void 0 : active.colId) ? { key: active.colId, direction: active.sort === "desc" ? "desc" : "asc" } : null;
18332
+ if ((next == null ? void 0 : next.key) === (sort == null ? void 0 : sort.key) && (next == null ? void 0 : next.direction) === (sort == null ? void 0 : sort.direction)) return;
18333
+ if (!next && !sort) return;
18334
+ onSortChange == null ? void 0 : onSortChange(next);
18335
+ },
18336
+ [serverSorted, sort, onSortChange]
18337
+ );
18338
+ return /* @__PURE__ */ jsx(
18339
+ "div",
18340
+ {
18341
+ role: "region",
18342
+ "aria-label": ariaLabel,
18343
+ className: cn(
18344
+ "data-grid",
18345
+ rows.length === 0 && "data-grid--empty",
18346
+ onRowClick && "data-grid--clickable",
18347
+ className
18348
+ ),
18349
+ children: /* @__PURE__ */ jsx(
18350
+ AgGridReact,
18351
+ {
18352
+ theme: dataGridTheme,
18353
+ rowData: rows,
18354
+ columnDefs,
18355
+ domLayout: "autoHeight",
18356
+ rowHeight: 64,
18357
+ headerHeight: 48,
18358
+ loading,
18359
+ quickFilterText: quickFilter,
18360
+ getRowId: getRowId ? (params) => getRowId(params.data) : void 0,
18361
+ onSortChanged: handleSortChanged,
18362
+ onRowClicked: onRowClick ? (event) => event.data && onRowClick(event.data) : void 0,
18363
+ suppressCellFocus: true,
18364
+ localeText: { noRowsToShow: emptyText }
18365
+ }
18366
+ )
18367
+ }
18368
+ );
18369
+ }
18370
+ const iconButtonVariants = cva("icon-button", {
18371
+ variants: {
18372
+ size: {
18373
+ sm: "icon-button--sm",
18374
+ md: "icon-button--md",
18375
+ bare: "icon-button--bare"
18376
+ }
18377
+ },
18378
+ defaultVariants: { size: "md" }
18379
+ });
18380
+ const IconButton = React.forwardRef(
18381
+ ({ className, size, type = "button", ...props }, ref) => /* @__PURE__ */ jsx(
18382
+ "button",
18383
+ {
18384
+ ref,
18385
+ type,
18386
+ className: cn(iconButtonVariants({ size }), className),
18387
+ ...props
18388
+ }
18389
+ )
18390
+ );
18391
+ IconButton.displayName = "IconButton";
17798
18392
  export {
17799
18393
  Accordion,
17800
18394
  AccordionContainer,
@@ -17837,6 +18431,7 @@ export {
17837
18431
  AvatarFallback,
17838
18432
  AvatarIdentity,
17839
18433
  AvatarImage,
18434
+ BackLink,
17840
18435
  BadgeCertificationBronze,
17841
18436
  BadgeCertificationGold,
17842
18437
  BadgeCertificationPlatinum,
@@ -17901,12 +18496,14 @@ export {
17901
18496
  CarouselNext,
17902
18497
  CarouselPrevious,
17903
18498
  Center,
18499
+ CenteredPage,
17904
18500
  ChartContainer,
17905
18501
  ChartLegend,
17906
18502
  ChartStyle,
17907
18503
  ChartTooltip,
17908
18504
  ChartTooltipContent,
17909
18505
  Checkbox,
18506
+ CheckboxField,
17910
18507
  CodeBadge,
17911
18508
  Collapsible,
17912
18509
  CollapsibleContent,
@@ -17939,6 +18536,7 @@ export {
17939
18536
  ContextMenuTrigger,
17940
18537
  Copy,
17941
18538
  CreditCardPreview,
18539
+ DataGrid,
17942
18540
  DatePicker,
17943
18541
  DateRangePicker,
17944
18542
  Dialog,
@@ -18010,6 +18608,7 @@ export {
18010
18608
  HoverCardContent,
18011
18609
  HoverCardTrigger,
18012
18610
  IWBILogo,
18611
+ IconButton,
18013
18612
  IconConceptAir,
18014
18613
  IconConceptCommunity,
18015
18614
  IconConceptInnovation,
@@ -18081,6 +18680,11 @@ export {
18081
18680
  NavigationMenuList,
18082
18681
  NavigationMenuTrigger,
18083
18682
  NavigationTray,
18683
+ OutlineNode,
18684
+ OutlineNodeControls,
18685
+ OutlineNodeHead,
18686
+ OutlineNodeMeta,
18687
+ OutlineNodeTitle,
18084
18688
  PageHeader,
18085
18689
  PageHeaderBadge,
18086
18690
  PageHeaderDescription,
@@ -18109,6 +18713,8 @@ export {
18109
18713
  ProfileAvatar,
18110
18714
  ProfileRow,
18111
18715
  Progress,
18716
+ RadioCardGroup,
18717
+ RadioCardItem,
18112
18718
  RadioGroup,
18113
18719
  RadioGroupItem,
18114
18720
  ResizableHandle,
@@ -18170,6 +18776,10 @@ export {
18170
18776
  SheetTitle,
18171
18777
  SheetTrigger,
18172
18778
  Show,
18779
+ SideNav,
18780
+ SideNavBranch,
18781
+ SideNavGroup,
18782
+ SideNavItem,
18173
18783
  Sidebar,
18174
18784
  SidebarContent,
18175
18785
  SidebarFooter,
@@ -18278,6 +18888,7 @@ export {
18278
18888
  alertDialogPanelVariants,
18279
18889
  alertV02Variants,
18280
18890
  avatarIdentityVariants,
18891
+ avatarVariants,
18281
18892
  bannerVariants,
18282
18893
  buttonV01Variants,
18283
18894
  buttonVariants,
@@ -18285,7 +18896,9 @@ export {
18285
18896
  cn,
18286
18897
  conceptColors,
18287
18898
  conceptOrder,
18899
+ iconButtonVariants,
18288
18900
  navigationMenuTriggerStyle,
18901
+ outlineNodeVariants,
18289
18902
  switchV01Variants,
18290
18903
  tagStatusV02Variants,
18291
18904
  tagV02Variants,