@usefidel/design-system 0.17.0 → 0.19.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.
package/dist/index.cjs CHANGED
@@ -20,19 +20,27 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/index.ts
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
+ Accordion: () => Accordion,
23
24
  AppNav: () => AppNav,
24
25
  Avatar: () => Avatar,
25
26
  Badge: () => Badge,
26
27
  Button: () => Button,
27
28
  ButtonLink: () => ButtonLink,
28
29
  Callout: () => Callout,
30
+ Card: () => Card,
31
+ Checkbox: () => Checkbox,
29
32
  DiffPropertyList: () => DiffPropertyList,
30
33
  DiffSection: () => DiffSection,
31
34
  EmptyState: () => EmptyState,
35
+ IconButton: () => IconButton,
36
+ Input: () => Input,
37
+ Menu: () => Menu,
32
38
  MismatchCard: () => MismatchCard,
33
39
  Modal: () => Modal,
34
40
  MultiSelect: () => MultiSelect,
35
41
  Pagination: () => Pagination,
42
+ PricingCard: () => PricingCard,
43
+ Radio: () => Radio,
36
44
  SearchInput: () => SearchInput,
37
45
  SectionHeader: () => SectionHeader,
38
46
  SegmentedControl: () => SegmentedControl,
@@ -42,7 +50,10 @@ __export(index_exports, {
42
50
  SkeletonGroup: () => SkeletonGroup,
43
51
  Split: () => Split,
44
52
  StackedCardsIllustration: () => StackedCardsIllustration,
53
+ Stat: () => Stat,
54
+ StepList: () => StepList,
45
55
  TabNav: () => TabNav,
56
+ Table: () => Table,
46
57
  Tag: () => Tag,
47
58
  Toggle: () => Toggle,
48
59
  breakpoints: () => breakpoints
@@ -401,7 +412,11 @@ var Select = (0, import_react3.forwardRef)(function Select2({
401
412
  id,
402
413
  name,
403
414
  className,
404
- containerClassName
415
+ containerClassName,
416
+ variant = "field",
417
+ size = "medium",
418
+ align = "start",
419
+ "aria-label": ariaLabel
405
420
  }, ref) {
406
421
  const genId = (0, import_react3.useId)();
407
422
  const triggerId = id ?? genId;
@@ -420,7 +435,7 @@ var Select = (0, import_react3.forwardRef)(function Select2({
420
435
  if (!searchable || !query.trim()) return options;
421
436
  const q = query.trim().toLowerCase();
422
437
  return options.filter(
423
- (o) => o.label.toLowerCase().includes(q) || (o.secondary?.toLowerCase().includes(q) ?? false)
438
+ (o) => o.label.toLowerCase().includes(q) || (o.secondary?.toLowerCase().includes(q) ?? false) || (o.description?.toLowerCase().includes(q) ?? false)
424
439
  );
425
440
  }, [options, searchable, query]);
426
441
  const hasMessage = Boolean(error ?? hint);
@@ -503,6 +518,8 @@ var Select = (0, import_react3.forwardRef)(function Select2({
503
518
  };
504
519
  const triggerClasses = [
505
520
  "fds-select__trigger",
521
+ variant === "inline" ? "fds-select__trigger--inline" : "",
522
+ size === "small" ? "fds-select__trigger--small" : "",
506
523
  error ? "fds-select__trigger--error" : "",
507
524
  open ? "fds-select__trigger--open" : "",
508
525
  className
@@ -511,7 +528,7 @@ var Select = (0, import_react3.forwardRef)(function Select2({
511
528
  "div",
512
529
  {
513
530
  ref: rootRef,
514
- className: ["fds-select-field", containerClassName].filter(Boolean).join(" "),
531
+ className: ["fds-select-field", variant === "inline" ? "fds-select-field--inline" : "", containerClassName].filter(Boolean).join(" "),
515
532
  children: [
516
533
  label != null && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("label", { htmlFor: triggerId, className: "fds-select__label", children: label }),
517
534
  /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "fds-select", children: [
@@ -528,6 +545,7 @@ var Select = (0, import_react3.forwardRef)(function Select2({
528
545
  "aria-controls": open ? listId : void 0,
529
546
  "aria-invalid": error ? true : void 0,
530
547
  "aria-describedby": hasMessage ? msgId : void 0,
548
+ "aria-label": ariaLabel,
531
549
  onClick: () => !disabled && setOpen((o) => !o),
532
550
  onKeyDown,
533
551
  children: [
@@ -543,7 +561,7 @@ var Select = (0, import_react3.forwardRef)(function Select2({
543
561
  ]
544
562
  }
545
563
  ),
546
- open && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "fds-select__popover", children: [
564
+ open && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: `fds-select__popover fds-select__popover--${align}`, children: [
547
565
  searchable && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "fds-select__search", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
548
566
  "input",
549
567
  {
@@ -588,9 +606,12 @@ var Select = (0, import_react3.forwardRef)(function Select2({
588
606
  onClick: () => choose(i),
589
607
  children: [
590
608
  o.avatar != null && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "fds-select__optAvatar", children: o.avatar }),
591
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "fds-select__optText", children: [
592
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "fds-select__optLabel", children: o.label }),
593
- o.secondary != null && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "fds-select__optSecondary", children: o.secondary })
609
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "fds-select__optBody", children: [
610
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "fds-select__optText", children: [
611
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "fds-select__optLabel", children: o.label }),
612
+ o.secondary != null && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "fds-select__optSecondary", children: o.secondary })
613
+ ] }),
614
+ o.description != null && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "fds-select__optDescription", children: o.description })
594
615
  ] }),
595
616
  o.value === value && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "fds-select__check", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(CheckIcon, {}) })
596
617
  ]
@@ -852,6 +873,7 @@ function SegmentedControl({
852
873
  value,
853
874
  onChange,
854
875
  "aria-label": ariaLabel,
876
+ variant = "underline",
855
877
  className
856
878
  }) {
857
879
  const refs = (0, import_react8.useRef)([]);
@@ -868,7 +890,7 @@ function SegmentedControl({
868
890
  onChange(options[next].value);
869
891
  refs.current[next]?.focus();
870
892
  };
871
- const classes = ["fds-segmented", className].filter(Boolean).join(" ");
893
+ const classes = ["fds-segmented", variant === "pill" ? "fds-segmented--pill" : "", className].filter(Boolean).join(" ");
872
894
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { role: "tablist", "aria-label": ariaLabel, className: classes, children: options.map((option, i) => {
873
895
  const selected = option.value === value;
874
896
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
@@ -983,9 +1005,10 @@ function Badge({ tone = "neutral", icon, className, children, ...rest }) {
983
1005
 
984
1006
  // src/components/Tag/Tag.tsx
985
1007
  var import_jsx_runtime16 = require("react/jsx-runtime");
986
- function Tag({ dot, className, children, ...rest }) {
1008
+ function Tag({ dot, icon, className, children, ...rest }) {
987
1009
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: ["fds-tag", className].filter(Boolean).join(" "), ...rest, children: [
988
1010
  dot && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: `fds-dot fds-dot--${dot}`, "aria-hidden": "true" }),
1011
+ icon != null && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "fds-tag__icon", "aria-hidden": "true", children: icon }),
989
1012
  children
990
1013
  ] });
991
1014
  }
@@ -996,11 +1019,17 @@ var import_jsx_runtime17 = require("react/jsx-runtime");
996
1019
  function ChevronIcon2() {
997
1020
  return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("svg", { viewBox: "0 0 20 20", width: "20", height: "20", fill: "none", "aria-hidden": "true", className: "fds-multiselect__chevronIcon", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M6 8l4 4 4-4", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", strokeLinejoin: "round" }) });
998
1021
  }
1022
+ function RemoveIcon() {
1023
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("svg", { viewBox: "0 0 12 12", width: "10", height: "10", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M3 3l6 6M9 3L3 9", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) });
1024
+ }
999
1025
  function CheckIcon2() {
1000
1026
  return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("svg", { viewBox: "0 0 12 12", width: "12", height: "12", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M10 3L4.5 8.5 2 6", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
1001
1027
  }
1002
1028
  function MultiSelect({
1003
1029
  label,
1030
+ variant = "filter",
1031
+ placeholder,
1032
+ showActions,
1004
1033
  options,
1005
1034
  value,
1006
1035
  onChange,
@@ -1071,8 +1100,59 @@ function MultiSelect({
1071
1100
  }
1072
1101
  };
1073
1102
  const triggerClasses = ["fds-multiselect__trigger", open ? "fds-multiselect__trigger--open" : ""].filter(Boolean).join(" ");
1074
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { ref: rootRef, className: ["fds-multiselect", className].filter(Boolean).join(" "), children: [
1075
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1103
+ const isField = variant === "field";
1104
+ const withActions = showActions ?? !isField;
1105
+ const chosen = options.filter((o) => selected.has(o.value));
1106
+ const fieldBox = /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1107
+ "div",
1108
+ {
1109
+ className: ["fds-multiselect__fieldBox", open ? "fds-multiselect__fieldBox--open" : "", disabled ? "fds-multiselect__fieldBox--disabled" : ""].filter(Boolean).join(" "),
1110
+ onClick: (e) => {
1111
+ if (disabled || e.target.closest("button")) return;
1112
+ setActiveIndex(0);
1113
+ setOpen((o) => !o);
1114
+ },
1115
+ children: [
1116
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "fds-multiselect__chips", children: [
1117
+ chosen.length === 0 && placeholder != null && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "fds-multiselect__placeholder", children: placeholder }),
1118
+ chosen.map((o) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "fds-multiselect__chip", children: [
1119
+ o.label,
1120
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1121
+ "button",
1122
+ {
1123
+ type: "button",
1124
+ className: "fds-multiselect__chipRemove",
1125
+ "aria-label": `Remove ${o.label}`,
1126
+ disabled,
1127
+ onClick: () => toggle(o),
1128
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(RemoveIcon, {})
1129
+ }
1130
+ )
1131
+ ] }, o.value))
1132
+ ] }),
1133
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1134
+ "button",
1135
+ {
1136
+ type: "button",
1137
+ id: triggerId,
1138
+ ref: triggerRef,
1139
+ className: "fds-multiselect__fieldBoxToggle",
1140
+ disabled,
1141
+ "aria-haspopup": "listbox",
1142
+ "aria-expanded": open,
1143
+ "aria-controls": open ? listId : void 0,
1144
+ "aria-label": `${label}: ${chosen.length === 0 ? "none chosen" : `${chosen.length} chosen`}`,
1145
+ onClick: () => setOpen((o) => !o),
1146
+ onKeyDown: onTriggerKeyDown,
1147
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: `fds-multiselect__chevron${open ? " fds-multiselect__chevron--open" : ""}`, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ChevronIcon2, {}) })
1148
+ }
1149
+ )
1150
+ ]
1151
+ }
1152
+ );
1153
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { ref: rootRef, className: ["fds-multiselect", isField ? "fds-multiselect--field" : "", className].filter(Boolean).join(" "), children: [
1154
+ isField && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("label", { htmlFor: triggerId, className: "fds-multiselect__fieldLabel", children: label }),
1155
+ isField ? fieldBox : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1076
1156
  "button",
1077
1157
  {
1078
1158
  type: "button",
@@ -1138,7 +1218,7 @@ function MultiSelect({
1138
1218
  })
1139
1219
  }
1140
1220
  ),
1141
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "fds-multiselect__footer", children: [
1221
+ withActions && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "fds-multiselect__footer", children: [
1142
1222
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { type: "button", className: "fds-multiselect__action", onClick: () => onChange(enabled.map((o) => o.value)), children: selectAllLabel }),
1143
1223
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { type: "button", className: "fds-multiselect__action", onClick: () => onChange([]), children: clearLabel })
1144
1224
  ] })
@@ -1222,8 +1302,8 @@ function Pagination({ page, pageCount, onPageChange, total, pageSize, variant =
1222
1302
 
1223
1303
  // src/components/EmptyState/EmptyState.tsx
1224
1304
  var import_jsx_runtime20 = require("react/jsx-runtime");
1225
- function EmptyState({ illustration, title, description, action, footer, className, ...rest }) {
1226
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: ["fds-empty", className].filter(Boolean).join(" "), ...rest, children: [
1305
+ function EmptyState({ illustration, title, description, action, footer, size = "default", className, ...rest }) {
1306
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: ["fds-empty", size === "compact" ? "fds-empty--compact" : "", className].filter(Boolean).join(" "), ...rest, children: [
1227
1307
  illustration != null && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "fds-empty__illustration", children: illustration }),
1228
1308
  /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "fds-empty__text", children: [
1229
1309
  /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("h2", { className: "fds-empty__title", children: title }),
@@ -1304,21 +1384,442 @@ function Skeleton({ shape = "rect", width, height, lines = 1, className, style,
1304
1384
  function SkeletonGroup({ label = "Loading", className, children, ...rest }) {
1305
1385
  return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { role: "status", "aria-busy": "true", "aria-label": label, className, ...rest, children });
1306
1386
  }
1387
+
1388
+ // src/components/Card/Card.tsx
1389
+ var import_jsx_runtime23 = require("react/jsx-runtime");
1390
+ function Card({ tone = "default", padding = "md", className, children, ...rest }) {
1391
+ const classes = ["fds-card", `fds-card--${tone}`, `fds-card--pad-${padding}`, className].filter(Boolean).join(" ");
1392
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: classes, ...rest, children });
1393
+ }
1394
+
1395
+ // src/components/Stat/Stat.tsx
1396
+ var import_jsx_runtime24 = require("react/jsx-runtime");
1397
+ function Stat({ label, value, children, className, ...rest }) {
1398
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: ["fds-stat", className].filter(Boolean).join(" "), ...rest, children: [
1399
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "fds-stat__label", children: label }),
1400
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "fds-stat__value", children: value }),
1401
+ children != null && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "fds-stat__detail", children })
1402
+ ] });
1403
+ }
1404
+
1405
+ // src/components/Checkbox/Checkbox.tsx
1406
+ var import_react12 = require("react");
1407
+ var import_jsx_runtime25 = require("react/jsx-runtime");
1408
+ var Checkbox = (0, import_react12.forwardRef)(function Checkbox2({ label, description, indeterminate = false, className, id, disabled, ...rest }, ref) {
1409
+ const generatedId = (0, import_react12.useId)();
1410
+ const inputId = id ?? generatedId;
1411
+ const inputRef = (0, import_react12.useRef)(null);
1412
+ (0, import_react12.useImperativeHandle)(ref, () => inputRef.current);
1413
+ (0, import_react12.useEffect)(() => {
1414
+ if (inputRef.current) inputRef.current.indeterminate = indeterminate;
1415
+ }, [indeterminate]);
1416
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
1417
+ "div",
1418
+ {
1419
+ className: ["fds-checkbox", className].filter(Boolean).join(" "),
1420
+ "data-disabled": disabled ? "" : void 0,
1421
+ children: [
1422
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1423
+ "input",
1424
+ {
1425
+ ...rest,
1426
+ id: inputId,
1427
+ ref: inputRef,
1428
+ type: "checkbox",
1429
+ disabled,
1430
+ className: "fds-checkbox__input"
1431
+ }
1432
+ ),
1433
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { htmlFor: inputId, className: "fds-checkbox__control", children: [
1434
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "fds-checkbox__box", "aria-hidden": "true", children: [
1435
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("svg", { className: "fds-checkbox__tick", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("path", { d: "M10 3L4.5 8.5 2 6", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1436
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("svg", { className: "fds-checkbox__dash", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("path", { d: "M3 6h6", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round" }) })
1437
+ ] }),
1438
+ (label != null || description != null) && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "fds-checkbox__text", children: [
1439
+ label != null && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "fds-checkbox__label", children: label }),
1440
+ description != null && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "fds-checkbox__description", children: description })
1441
+ ] })
1442
+ ] })
1443
+ ]
1444
+ }
1445
+ );
1446
+ });
1447
+
1448
+ // src/components/Radio/Radio.tsx
1449
+ var import_react13 = require("react");
1450
+ var import_jsx_runtime26 = require("react/jsx-runtime");
1451
+ var Radio = (0, import_react13.forwardRef)(function Radio2({ label, description, className, id, disabled, ...rest }, ref) {
1452
+ const generatedId = (0, import_react13.useId)();
1453
+ const inputId = id ?? generatedId;
1454
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: ["fds-radio", className].filter(Boolean).join(" "), "data-disabled": disabled ? "" : void 0, children: [
1455
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("input", { ...rest, id: inputId, ref, type: "radio", disabled, className: "fds-radio__input" }),
1456
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { htmlFor: inputId, className: "fds-radio__control", children: [
1457
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "fds-radio__circle", "aria-hidden": "true" }),
1458
+ (label != null || description != null) && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("span", { className: "fds-radio__text", children: [
1459
+ label != null && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "fds-radio__label", children: label }),
1460
+ description != null && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "fds-radio__description", children: description })
1461
+ ] })
1462
+ ] })
1463
+ ] });
1464
+ });
1465
+
1466
+ // src/components/Accordion/Accordion.tsx
1467
+ var import_react14 = require("react");
1468
+ var import_jsx_runtime27 = require("react/jsx-runtime");
1469
+ function Accordion({
1470
+ summary,
1471
+ actions,
1472
+ open: openProp,
1473
+ defaultOpen = false,
1474
+ onOpenChange,
1475
+ children,
1476
+ className,
1477
+ ...rest
1478
+ }) {
1479
+ const [openState, setOpenState] = (0, import_react14.useState)(defaultOpen);
1480
+ const open = openProp ?? openState;
1481
+ const bodyId = (0, import_react14.useId)();
1482
+ const toggle = () => {
1483
+ const next = !open;
1484
+ if (openProp === void 0) setOpenState(next);
1485
+ onOpenChange?.(next);
1486
+ };
1487
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
1488
+ "div",
1489
+ {
1490
+ className: ["fds-accordion", className].filter(Boolean).join(" "),
1491
+ "data-open": open ? "" : void 0,
1492
+ ...rest,
1493
+ children: [
1494
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "fds-accordion__header", children: [
1495
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1496
+ "button",
1497
+ {
1498
+ type: "button",
1499
+ className: "fds-accordion__trigger",
1500
+ "aria-expanded": open,
1501
+ "aria-controls": bodyId,
1502
+ onClick: toggle,
1503
+ children: summary
1504
+ }
1505
+ ),
1506
+ actions != null && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "fds-accordion__actions", children: actions }),
1507
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "fds-accordion__chevron", "aria-hidden": "true", onClick: toggle, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("path", { d: "M6 9l6 6 6-6", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) })
1508
+ ] }),
1509
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { id: bodyId, className: "fds-accordion__body", hidden: !open, children })
1510
+ ]
1511
+ }
1512
+ );
1513
+ }
1514
+
1515
+ // src/components/StepList/StepList.tsx
1516
+ var import_jsx_runtime28 = require("react/jsx-runtime");
1517
+ var STATUS_TEXT = {
1518
+ done: "Done",
1519
+ active: "In progress",
1520
+ pending: "Not started",
1521
+ failed: "Failed"
1522
+ };
1523
+ function StepIcon({ status }) {
1524
+ const common = { viewBox: "0 0 24 24", width: 18, height: 18, fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" };
1525
+ if (status === "done") {
1526
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("svg", { ...common, children: [
1527
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
1528
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("path", { d: "M8 12.5l2.5 2.5 5-5.5" })
1529
+ ] });
1530
+ }
1531
+ if (status === "active") {
1532
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("svg", { ...common, className: "fds-steps__spinner", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("path", { d: "M12 3v3M12 18v3M3 12h3M18 12h3M5.6 5.6l2.1 2.1M16.3 16.3l2.1 2.1M5.6 18.4l2.1-2.1M16.3 7.7l2.1-2.1" }) });
1533
+ }
1534
+ if (status === "failed") {
1535
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("svg", { ...common, children: [
1536
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
1537
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("path", { d: "M12 7.5v5.5M12 16.5v.01" })
1538
+ ] });
1539
+ }
1540
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("svg", { ...common, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("circle", { cx: "12", cy: "12", r: "9" }) });
1541
+ }
1542
+ function StepList({ steps, className, ...rest }) {
1543
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("ol", { className: ["fds-steps", className].filter(Boolean).join(" "), ...rest, children: steps.map((step) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
1544
+ "li",
1545
+ {
1546
+ className: `fds-steps__step fds-steps__step--${step.status}`,
1547
+ "aria-current": step.status === "active" ? "step" : void 0,
1548
+ children: [
1549
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "fds-steps__icon", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(StepIcon, { status: step.status }) }),
1550
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "fds-steps__label", children: step.label }),
1551
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { className: "fds-steps__sr", children: [
1552
+ ", ",
1553
+ STATUS_TEXT[step.status]
1554
+ ] })
1555
+ ]
1556
+ },
1557
+ step.id
1558
+ )) });
1559
+ }
1560
+
1561
+ // src/components/Input/Input.tsx
1562
+ var import_react15 = require("react");
1563
+ var import_jsx_runtime29 = require("react/jsx-runtime");
1564
+ var Input = (0, import_react15.forwardRef)(function Input2({ label, hint, error, leadingIcon, trailing, id, className, containerClassName, readOnly, disabled, ...rest }, ref) {
1565
+ const genId = (0, import_react15.useId)();
1566
+ const inputId = id ?? genId;
1567
+ const msgId = `${genId}-msg`;
1568
+ const message = error ?? hint;
1569
+ const boxClasses = [
1570
+ "fds-input__box",
1571
+ error ? "fds-input__box--error" : "",
1572
+ readOnly || disabled ? "fds-input__box--locked" : ""
1573
+ ].filter(Boolean).join(" ");
1574
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: ["fds-input", containerClassName].filter(Boolean).join(" "), children: [
1575
+ label != null && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("label", { htmlFor: inputId, className: "fds-input__label", children: label }),
1576
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: boxClasses, children: [
1577
+ leadingIcon != null && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "fds-input__icon", "aria-hidden": "true", children: leadingIcon }),
1578
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1579
+ "input",
1580
+ {
1581
+ ref,
1582
+ id: inputId,
1583
+ className: ["fds-input__control", className].filter(Boolean).join(" "),
1584
+ readOnly,
1585
+ disabled,
1586
+ "aria-invalid": error ? true : void 0,
1587
+ "aria-describedby": message != null ? msgId : void 0,
1588
+ ...rest
1589
+ }
1590
+ ),
1591
+ trailing != null && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "fds-input__trailing", children: trailing })
1592
+ ] }),
1593
+ message != null && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { id: msgId, className: error ? "fds-input__error" : "fds-input__hint", children: message })
1594
+ ] });
1595
+ });
1596
+
1597
+ // src/components/IconButton/IconButton.tsx
1598
+ var import_jsx_runtime30 = require("react/jsx-runtime");
1599
+ function IconButton({
1600
+ icon,
1601
+ variant = "outlined",
1602
+ size = "medium",
1603
+ type = "button",
1604
+ className,
1605
+ ...rest
1606
+ }) {
1607
+ const classes = ["fds-icon-button", `fds-icon-button--${variant}`, `fds-icon-button--${size}`, className].filter(Boolean).join(" ");
1608
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("button", { type, className: classes, ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "fds-icon-button__icon", "aria-hidden": "true", children: icon }) });
1609
+ }
1610
+
1611
+ // src/components/Menu/Menu.tsx
1612
+ var import_react16 = require("react");
1613
+ var import_jsx_runtime31 = require("react/jsx-runtime");
1614
+ function Menu({ trigger, items, align = "end", className }) {
1615
+ const listId = (0, import_react16.useId)();
1616
+ const rootRef = (0, import_react16.useRef)(null);
1617
+ const listRef = (0, import_react16.useRef)(null);
1618
+ const [open, setOpen] = (0, import_react16.useState)(false);
1619
+ const [active, setActive] = (0, import_react16.useState)(0);
1620
+ const enabled = items.map((it, i) => it.disabled ? -1 : i).filter((i) => i >= 0);
1621
+ (0, import_react16.useEffect)(() => {
1622
+ if (!open) return;
1623
+ const onDown = (e) => {
1624
+ if (rootRef.current && !rootRef.current.contains(e.target)) setOpen(false);
1625
+ };
1626
+ document.addEventListener("mousedown", onDown);
1627
+ const raf = requestAnimationFrame(() => listRef.current?.focus());
1628
+ return () => {
1629
+ document.removeEventListener("mousedown", onDown);
1630
+ cancelAnimationFrame(raf);
1631
+ };
1632
+ }, [open]);
1633
+ const triggerEl = () => rootRef.current?.querySelector('[aria-haspopup="menu"]');
1634
+ const close = () => {
1635
+ setOpen(false);
1636
+ triggerEl()?.focus();
1637
+ };
1638
+ const openAt = (index) => {
1639
+ setActive(index);
1640
+ setOpen(true);
1641
+ };
1642
+ const choose = (i) => {
1643
+ const it = items[i];
1644
+ if (!it || it.disabled) return;
1645
+ close();
1646
+ it.onSelect();
1647
+ };
1648
+ const step = (dir) => {
1649
+ if (enabled.length === 0) return;
1650
+ const at = enabled.indexOf(active);
1651
+ setActive(enabled[(at + dir + enabled.length) % enabled.length]);
1652
+ };
1653
+ const onListKeyDown = (e) => {
1654
+ if (e.key === "ArrowDown") {
1655
+ e.preventDefault();
1656
+ step(1);
1657
+ } else if (e.key === "ArrowUp") {
1658
+ e.preventDefault();
1659
+ step(-1);
1660
+ } else if (e.key === "Home") {
1661
+ e.preventDefault();
1662
+ setActive(enabled[0] ?? 0);
1663
+ } else if (e.key === "End") {
1664
+ e.preventDefault();
1665
+ setActive(enabled[enabled.length - 1] ?? 0);
1666
+ } else if (e.key === "Enter" || e.key === " ") {
1667
+ e.preventDefault();
1668
+ choose(active);
1669
+ } else if (e.key === "Escape") {
1670
+ e.preventDefault();
1671
+ close();
1672
+ } else if (e.key === "Tab") setOpen(false);
1673
+ };
1674
+ const own = trigger.props;
1675
+ const wired = (0, import_react16.cloneElement)(trigger, {
1676
+ "aria-haspopup": "menu",
1677
+ "aria-expanded": open,
1678
+ "aria-controls": open ? listId : void 0,
1679
+ onClick: (e) => {
1680
+ own.onClick?.(e);
1681
+ if (open) setOpen(false);
1682
+ else openAt(enabled[0] ?? 0);
1683
+ },
1684
+ onKeyDown: (e) => {
1685
+ own.onKeyDown?.(e);
1686
+ if (!open && (e.key === "ArrowDown" || e.key === "Enter" || e.key === " ")) {
1687
+ e.preventDefault();
1688
+ openAt(enabled[0] ?? 0);
1689
+ } else if (!open && e.key === "ArrowUp") {
1690
+ e.preventDefault();
1691
+ openAt(enabled[enabled.length - 1] ?? 0);
1692
+ }
1693
+ }
1694
+ });
1695
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { ref: rootRef, className: ["fds-menu", className].filter(Boolean).join(" "), children: [
1696
+ wired,
1697
+ open && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
1698
+ "div",
1699
+ {
1700
+ ref: listRef,
1701
+ id: listId,
1702
+ role: "menu",
1703
+ tabIndex: -1,
1704
+ className: `fds-menu__list fds-menu__list--${align}`,
1705
+ "aria-activedescendant": `${listId}-item-${active}`,
1706
+ onKeyDown: onListKeyDown,
1707
+ children: items.map((it, i) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
1708
+ "div",
1709
+ {
1710
+ id: `${listId}-item-${i}`,
1711
+ role: "menuitem",
1712
+ "aria-disabled": it.disabled || void 0,
1713
+ className: [
1714
+ "fds-menu__item",
1715
+ it.tone === "danger" ? "fds-menu__item--danger" : "",
1716
+ i === active ? "fds-menu__item--active" : "",
1717
+ it.disabled ? "fds-menu__item--disabled" : ""
1718
+ ].filter(Boolean).join(" "),
1719
+ onMouseEnter: () => !it.disabled && setActive(i),
1720
+ onMouseDown: (e) => e.preventDefault(),
1721
+ onClick: () => choose(i),
1722
+ children: [
1723
+ it.icon != null && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "fds-menu__icon", "aria-hidden": "true", children: it.icon }),
1724
+ it.label
1725
+ ]
1726
+ },
1727
+ i
1728
+ ))
1729
+ }
1730
+ )
1731
+ ] });
1732
+ }
1733
+
1734
+ // src/components/Table/Table.tsx
1735
+ var import_jsx_runtime32 = require("react/jsx-runtime");
1736
+ function Table({ columns, rows, rowKey, empty, className, "aria-label": ariaLabel, ...rest }) {
1737
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: ["fds-table", className].filter(Boolean).join(" "), ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("table", { className: "fds-table__table", "aria-label": ariaLabel, children: [
1738
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("tr", { children: columns.map((c) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
1739
+ "th",
1740
+ {
1741
+ scope: "col",
1742
+ className: c.align === "end" ? "fds-table__cell--end" : void 0,
1743
+ style: c.width ? { width: c.width } : void 0,
1744
+ children: c.header
1745
+ },
1746
+ c.key
1747
+ )) }) }),
1748
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("tbody", { children: [
1749
+ rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("tr", { children: columns.map((c) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("td", { className: c.align === "end" ? "fds-table__cell--end" : void 0, children: c.cell(row) }, c.key)) }, rowKey(row))),
1750
+ rows.length === 0 && empty != null && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("td", { colSpan: columns.length, className: "fds-table__empty", children: empty }) })
1751
+ ] })
1752
+ ] }) });
1753
+ }
1754
+
1755
+ // src/components/PricingCard/PricingCard.tsx
1756
+ var import_jsx_runtime33 = require("react/jsx-runtime");
1757
+ function CheckIcon3() {
1758
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("svg", { viewBox: "0 0 16 16", width: "12", height: "12", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("path", { d: "M3.5 8.5l3 3 6-7", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round" }) });
1759
+ }
1760
+ function PricingCard({
1761
+ eyebrow,
1762
+ title,
1763
+ badge,
1764
+ price,
1765
+ period,
1766
+ description,
1767
+ action,
1768
+ featuresTitle = "Features",
1769
+ featuresIntro,
1770
+ features = [],
1771
+ highlighted = false,
1772
+ className,
1773
+ ...rest
1774
+ }) {
1775
+ const classes = ["fds-pricing-card", highlighted ? "fds-pricing-card--highlighted" : "", className].filter(Boolean).join(" ");
1776
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("article", { className: classes, ...rest, children: [
1777
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "fds-pricing-card__top", children: [
1778
+ eyebrow != null && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "fds-pricing-card__eyebrow", children: eyebrow }),
1779
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("h3", { className: "fds-pricing-card__title", children: [
1780
+ title,
1781
+ badge
1782
+ ] }),
1783
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("p", { className: "fds-pricing-card__price", children: [
1784
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "fds-pricing-card__amount", children: price }),
1785
+ period != null && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "fds-pricing-card__period", children: period })
1786
+ ] }),
1787
+ description != null && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "fds-pricing-card__description", children: description }),
1788
+ action != null && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "fds-pricing-card__action", children: action })
1789
+ ] }),
1790
+ features.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "fds-pricing-card__features", children: [
1791
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "fds-pricing-card__featuresTitle", children: featuresTitle }),
1792
+ featuresIntro != null && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "fds-pricing-card__intro", children: featuresIntro }),
1793
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("ul", { className: "fds-pricing-card__list", children: features.map((f, i) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("li", { className: "fds-pricing-card__feature", children: [
1794
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "fds-pricing-card__check", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CheckIcon3, {}) }),
1795
+ f
1796
+ ] }, i)) })
1797
+ ] })
1798
+ ] });
1799
+ }
1307
1800
  // Annotate the CommonJS export names for ESM import in node:
1308
1801
  0 && (module.exports = {
1802
+ Accordion,
1309
1803
  AppNav,
1310
1804
  Avatar,
1311
1805
  Badge,
1312
1806
  Button,
1313
1807
  ButtonLink,
1314
1808
  Callout,
1809
+ Card,
1810
+ Checkbox,
1315
1811
  DiffPropertyList,
1316
1812
  DiffSection,
1317
1813
  EmptyState,
1814
+ IconButton,
1815
+ Input,
1816
+ Menu,
1318
1817
  MismatchCard,
1319
1818
  Modal,
1320
1819
  MultiSelect,
1321
1820
  Pagination,
1821
+ PricingCard,
1822
+ Radio,
1322
1823
  SearchInput,
1323
1824
  SectionHeader,
1324
1825
  SegmentedControl,
@@ -1328,7 +1829,10 @@ function SkeletonGroup({ label = "Loading", className, children, ...rest }) {
1328
1829
  SkeletonGroup,
1329
1830
  Split,
1330
1831
  StackedCardsIllustration,
1832
+ Stat,
1833
+ StepList,
1331
1834
  TabNav,
1835
+ Table,
1332
1836
  Tag,
1333
1837
  Toggle,
1334
1838
  breakpoints