@usefidel/design-system 0.15.0 → 0.16.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.
@@ -10,6 +10,6 @@
10
10
  "webapp.css"
11
11
  ],
12
12
  "storybookUrl": null,
13
- "packageVersion": "0.15.0",
14
- "resolvedSha": "51806455235b517cf1c3b2695f590570786af610"
13
+ "packageVersion": "0.16.0",
14
+ "resolvedSha": "dcc25541ed959e050dde79c26e8a95ec819a566f"
15
15
  }
package/dist/icons.cjs CHANGED
@@ -3,6 +3,10 @@ var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
6
10
  var __copyProps = (to, from, except, desc) => {
7
11
  if (from && typeof from === "object" || typeof from === "function") {
8
12
  for (let key of __getOwnPropNames(from))
@@ -16,9 +20,39 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
16
20
 
17
21
  // src/icons.ts
18
22
  var icons_exports = {};
23
+ __export(icons_exports, {
24
+ FigmaLogo: () => FigmaLogo,
25
+ GitHubLogo: () => GitHubLogo
26
+ });
19
27
  module.exports = __toCommonJS(icons_exports);
20
28
  __reExport(icons_exports, require("lucide-react"), module.exports);
29
+
30
+ // src/brand-icons.tsx
31
+ var import_jsx_runtime = require("react/jsx-runtime");
32
+ function GitHubLogo(props) {
33
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", "aria-hidden": "true", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
34
+ "path",
35
+ {
36
+ d: "M4.49969 11.0004V9.00024C4.46469 8.69022 4.48969 8.37519 4.57469 8.07517C4.6597 7.77514 4.80471 7.49512 4.99972 7.2501C3.49964 7.2501 1.99955 6.25002 1.99955 4.49988C1.95879 3.87622 2.1355 3.25772 2.49958 2.74974C2.34957 2.17469 2.34957 1.57465 2.49958 0.9996C2.49958 0.9996 2.99961 0.9996 3.99966 1.74966C5.31974 1.49964 6.67981 1.49964 7.99989 1.74966C8.99994 0.9996 9.49997 0.9996 9.49997 0.9996C9.63998 1.57465 9.63998 2.17469 9.49997 2.74974C9.86499 3.25978 10.04 3.87483 10 4.49988C10 6.25002 8.49991 7.2501 6.99983 7.2501C7.38982 7.7452 7.56942 8.37383 7.49986 9.00024V11.0004M4.49969 9.00024C2.24457 10.0003 1.99966 8.00016 0.9996 8.00016",
37
+ stroke: "currentColor",
38
+ strokeLinecap: "round"
39
+ }
40
+ ) });
41
+ }
42
+ function FigmaLogo(props) {
43
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", "aria-hidden": "true", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
44
+ "path",
45
+ {
46
+ fillRule: "evenodd",
47
+ clipRule: "evenodd",
48
+ d: "M6.37508 7.6865C6.72146 7.96433 7.15046 8.11895 7.59444 8.12599C8.03841 8.13303 8.4721 7.99208 8.82712 7.72538C9.18213 7.45868 9.43827 7.08139 9.55514 6.65301C9.67201 6.22463 9.64296 5.76954 9.47258 5.3595C9.33009 5.01515 9.09422 4.71746 8.79158 4.5C9.04964 4.31482 9.25989 4.07085 9.40492 3.78827C9.54995 3.50569 9.62559 3.19263 9.62558 2.875C9.62558 2.34457 9.41486 1.83586 9.03979 1.46079C8.66472 1.08571 8.15601 0.875 7.62558 0.875H4.37558C3.95215 0.874878 3.53962 1.00914 3.19737 1.25846C2.85513 1.50778 2.60085 1.85928 2.47115 2.26235C2.34144 2.66542 2.34301 3.09926 2.47562 3.50138C2.60823 3.9035 2.86505 4.25316 3.20908 4.5C2.951 4.68517 2.74074 4.92914 2.5957 5.21172C2.45065 5.4943 2.375 5.80737 2.375 6.125C2.375 6.44263 2.45065 6.7557 2.5957 7.03828C2.74074 7.32086 2.951 7.56483 3.20908 7.75C2.93065 7.94979 2.70822 8.21778 2.56314 8.52825C2.41806 8.83872 2.35519 9.18126 2.38057 9.52302C2.40594 9.86478 2.5187 10.1943 2.70804 10.4799C2.89738 10.7656 3.15693 10.9978 3.46182 11.1543C3.7667 11.3107 4.10668 11.3863 4.44914 11.3736C4.7916 11.3609 5.12506 11.2604 5.41752 11.0818C5.70999 10.9032 5.95165 10.6524 6.11932 10.3535C6.287 10.0546 6.37507 9.7177 6.37508 9.375V7.6865ZM4.37508 1.625C4.04356 1.625 3.72561 1.7567 3.49119 1.99112C3.25677 2.22554 3.12508 2.54348 3.12508 2.875C3.12508 3.20652 3.25677 3.52446 3.49119 3.75888C3.72561 3.9933 4.04356 4.125 4.37508 4.125H5.62508V1.625H4.37508ZM5.62508 8.125H4.37508C4.12785 8.125 3.88618 8.19831 3.68061 8.33566C3.47505 8.47301 3.31484 8.66824 3.22023 8.89665C3.12562 9.12505 3.10086 9.37639 3.1491 9.61886C3.19733 9.86134 3.31638 10.0841 3.49119 10.2589C3.66601 10.4337 3.88874 10.5528 4.13121 10.601C4.37369 10.6492 4.62502 10.6245 4.85343 10.5298C5.08184 10.4352 5.27706 10.275 5.41441 10.0695C5.55177 9.8639 5.62508 9.62223 5.62508 9.375V8.125ZM4.37508 4.875C4.04356 4.875 3.72561 5.0067 3.49119 5.24112C3.25677 5.47554 3.12508 5.79348 3.12508 6.125C3.12508 6.45652 3.25677 6.77446 3.49119 7.00888C3.72561 7.2433 4.04356 7.375 4.37508 7.375H5.62508V4.875H4.37508ZM6.37508 6.125C6.37508 6.45659 6.5068 6.77459 6.74127 7.00906C6.97574 7.24353 7.29374 7.37525 7.62533 7.37525C7.95691 7.37525 8.27492 7.24353 8.50939 7.00906C8.74386 6.77459 8.87558 6.45659 8.87558 6.125C8.87558 5.79341 8.74386 5.47541 8.50939 5.24094C8.27492 5.00647 7.95691 4.87475 7.62533 4.87475C7.29374 4.87475 6.97574 5.00647 6.74127 5.24094C6.5068 5.47541 6.37508 5.79341 6.37508 6.125ZM7.62508 4.125C7.9566 4.125 8.27454 3.9933 8.50896 3.75888C8.74338 3.52446 8.87508 3.20652 8.87508 2.875C8.87508 2.54348 8.74338 2.22554 8.50896 1.99112C8.27454 1.7567 7.9566 1.625 7.62508 1.625H6.37508V4.125H7.62508Z",
49
+ fill: "currentColor"
50
+ }
51
+ ) });
52
+ }
21
53
  // Annotate the CommonJS export names for ESM import in node:
22
54
  0 && (module.exports = {
55
+ FigmaLogo,
56
+ GitHubLogo,
23
57
  ...require("lucide-react")
24
58
  });
package/dist/icons.d.cts CHANGED
@@ -1 +1,12 @@
1
1
  export * from 'lucide-react';
2
+ import * as react from 'react';
3
+ import { SVGProps } from 'react';
4
+
5
+ /**
6
+ * Brand marks lucide-react doesn't ship. Paths are the Figma "✅Project" source-ref
7
+ * icons, drawn in currentColor at 12px; pass width/height to resize.
8
+ */
9
+ declare function GitHubLogo(props: SVGProps<SVGSVGElement>): react.JSX.Element;
10
+ declare function FigmaLogo(props: SVGProps<SVGSVGElement>): react.JSX.Element;
11
+
12
+ export { FigmaLogo, GitHubLogo };
package/dist/icons.d.ts CHANGED
@@ -1 +1,12 @@
1
1
  export * from 'lucide-react';
2
+ import * as react from 'react';
3
+ import { SVGProps } from 'react';
4
+
5
+ /**
6
+ * Brand marks lucide-react doesn't ship. Paths are the Figma "✅Project" source-ref
7
+ * icons, drawn in currentColor at 12px; pass width/height to resize.
8
+ */
9
+ declare function GitHubLogo(props: SVGProps<SVGSVGElement>): react.JSX.Element;
10
+ declare function FigmaLogo(props: SVGProps<SVGSVGElement>): react.JSX.Element;
11
+
12
+ export { FigmaLogo, GitHubLogo };
package/dist/icons.js CHANGED
@@ -1,2 +1,30 @@
1
1
  // src/icons.ts
2
2
  export * from "lucide-react";
3
+
4
+ // src/brand-icons.tsx
5
+ import { jsx } from "react/jsx-runtime";
6
+ function GitHubLogo(props) {
7
+ return /* @__PURE__ */ jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", "aria-hidden": "true", ...props, children: /* @__PURE__ */ jsx(
8
+ "path",
9
+ {
10
+ d: "M4.49969 11.0004V9.00024C4.46469 8.69022 4.48969 8.37519 4.57469 8.07517C4.6597 7.77514 4.80471 7.49512 4.99972 7.2501C3.49964 7.2501 1.99955 6.25002 1.99955 4.49988C1.95879 3.87622 2.1355 3.25772 2.49958 2.74974C2.34957 2.17469 2.34957 1.57465 2.49958 0.9996C2.49958 0.9996 2.99961 0.9996 3.99966 1.74966C5.31974 1.49964 6.67981 1.49964 7.99989 1.74966C8.99994 0.9996 9.49997 0.9996 9.49997 0.9996C9.63998 1.57465 9.63998 2.17469 9.49997 2.74974C9.86499 3.25978 10.04 3.87483 10 4.49988C10 6.25002 8.49991 7.2501 6.99983 7.2501C7.38982 7.7452 7.56942 8.37383 7.49986 9.00024V11.0004M4.49969 9.00024C2.24457 10.0003 1.99966 8.00016 0.9996 8.00016",
11
+ stroke: "currentColor",
12
+ strokeLinecap: "round"
13
+ }
14
+ ) });
15
+ }
16
+ function FigmaLogo(props) {
17
+ return /* @__PURE__ */ jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", "aria-hidden": "true", ...props, children: /* @__PURE__ */ jsx(
18
+ "path",
19
+ {
20
+ fillRule: "evenodd",
21
+ clipRule: "evenodd",
22
+ d: "M6.37508 7.6865C6.72146 7.96433 7.15046 8.11895 7.59444 8.12599C8.03841 8.13303 8.4721 7.99208 8.82712 7.72538C9.18213 7.45868 9.43827 7.08139 9.55514 6.65301C9.67201 6.22463 9.64296 5.76954 9.47258 5.3595C9.33009 5.01515 9.09422 4.71746 8.79158 4.5C9.04964 4.31482 9.25989 4.07085 9.40492 3.78827C9.54995 3.50569 9.62559 3.19263 9.62558 2.875C9.62558 2.34457 9.41486 1.83586 9.03979 1.46079C8.66472 1.08571 8.15601 0.875 7.62558 0.875H4.37558C3.95215 0.874878 3.53962 1.00914 3.19737 1.25846C2.85513 1.50778 2.60085 1.85928 2.47115 2.26235C2.34144 2.66542 2.34301 3.09926 2.47562 3.50138C2.60823 3.9035 2.86505 4.25316 3.20908 4.5C2.951 4.68517 2.74074 4.92914 2.5957 5.21172C2.45065 5.4943 2.375 5.80737 2.375 6.125C2.375 6.44263 2.45065 6.7557 2.5957 7.03828C2.74074 7.32086 2.951 7.56483 3.20908 7.75C2.93065 7.94979 2.70822 8.21778 2.56314 8.52825C2.41806 8.83872 2.35519 9.18126 2.38057 9.52302C2.40594 9.86478 2.5187 10.1943 2.70804 10.4799C2.89738 10.7656 3.15693 10.9978 3.46182 11.1543C3.7667 11.3107 4.10668 11.3863 4.44914 11.3736C4.7916 11.3609 5.12506 11.2604 5.41752 11.0818C5.70999 10.9032 5.95165 10.6524 6.11932 10.3535C6.287 10.0546 6.37507 9.7177 6.37508 9.375V7.6865ZM4.37508 1.625C4.04356 1.625 3.72561 1.7567 3.49119 1.99112C3.25677 2.22554 3.12508 2.54348 3.12508 2.875C3.12508 3.20652 3.25677 3.52446 3.49119 3.75888C3.72561 3.9933 4.04356 4.125 4.37508 4.125H5.62508V1.625H4.37508ZM5.62508 8.125H4.37508C4.12785 8.125 3.88618 8.19831 3.68061 8.33566C3.47505 8.47301 3.31484 8.66824 3.22023 8.89665C3.12562 9.12505 3.10086 9.37639 3.1491 9.61886C3.19733 9.86134 3.31638 10.0841 3.49119 10.2589C3.66601 10.4337 3.88874 10.5528 4.13121 10.601C4.37369 10.6492 4.62502 10.6245 4.85343 10.5298C5.08184 10.4352 5.27706 10.275 5.41441 10.0695C5.55177 9.8639 5.62508 9.62223 5.62508 9.375V8.125ZM4.37508 4.875C4.04356 4.875 3.72561 5.0067 3.49119 5.24112C3.25677 5.47554 3.12508 5.79348 3.12508 6.125C3.12508 6.45652 3.25677 6.77446 3.49119 7.00888C3.72561 7.2433 4.04356 7.375 4.37508 7.375H5.62508V4.875H4.37508ZM6.37508 6.125C6.37508 6.45659 6.5068 6.77459 6.74127 7.00906C6.97574 7.24353 7.29374 7.37525 7.62533 7.37525C7.95691 7.37525 8.27492 7.24353 8.50939 7.00906C8.74386 6.77459 8.87558 6.45659 8.87558 6.125C8.87558 5.79341 8.74386 5.47541 8.50939 5.24094C8.27492 5.00647 7.95691 4.87475 7.62533 4.87475C7.29374 4.87475 6.97574 5.00647 6.74127 5.24094C6.5068 5.47541 6.37508 5.79341 6.37508 6.125ZM7.62508 4.125C7.9566 4.125 8.27454 3.9933 8.50896 3.75888C8.74338 3.52446 8.87508 3.20652 8.87508 2.875C8.87508 2.54348 8.74338 2.22554 8.50896 1.99112C8.27454 1.7567 7.9566 1.625 7.62508 1.625H6.37508V4.125H7.62508Z",
23
+ fill: "currentColor"
24
+ }
25
+ ) });
26
+ }
27
+ export {
28
+ FigmaLogo,
29
+ GitHubLogo
30
+ };
package/dist/index.cjs CHANGED
@@ -22,17 +22,26 @@ var index_exports = {};
22
22
  __export(index_exports, {
23
23
  AppNav: () => AppNav,
24
24
  Avatar: () => Avatar,
25
+ Badge: () => Badge,
25
26
  Button: () => Button,
26
27
  DiffPropertyList: () => DiffPropertyList,
27
28
  DiffSection: () => DiffSection,
29
+ EmptyState: () => EmptyState,
28
30
  MismatchCard: () => MismatchCard,
29
31
  Modal: () => Modal,
32
+ MultiSelect: () => MultiSelect,
33
+ Pagination: () => Pagination,
34
+ SearchInput: () => SearchInput,
30
35
  SectionHeader: () => SectionHeader,
31
36
  SegmentedControl: () => SegmentedControl,
32
37
  Select: () => Select,
33
38
  SettingsSection: () => SettingsSection,
39
+ Skeleton: () => Skeleton,
40
+ SkeletonGroup: () => SkeletonGroup,
34
41
  Split: () => Split,
42
+ StackedCardsIllustration: () => StackedCardsIllustration,
35
43
  TabNav: () => TabNav,
44
+ Tag: () => Tag,
36
45
  Toggle: () => Toggle,
37
46
  breakpoints: () => breakpoints
38
47
  });
@@ -935,21 +944,338 @@ function Split({
935
944
  }
936
945
  );
937
946
  }
947
+
948
+ // src/components/Badge/Badge.tsx
949
+ var import_jsx_runtime14 = require("react/jsx-runtime");
950
+ function Badge({ tone = "neutral", icon, className, children, ...rest }) {
951
+ const classes = ["fds-badge", `fds-badge--${tone}`, className].filter(Boolean).join(" ");
952
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: classes, ...rest, children: [
953
+ icon != null && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "fds-badge__icon", "aria-hidden": "true", children: icon }),
954
+ children
955
+ ] });
956
+ }
957
+
958
+ // src/components/Tag/Tag.tsx
959
+ var import_jsx_runtime15 = require("react/jsx-runtime");
960
+ function Tag({ dot, className, children, ...rest }) {
961
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: ["fds-tag", className].filter(Boolean).join(" "), ...rest, children: [
962
+ dot && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: `fds-dot fds-dot--${dot}`, "aria-hidden": "true" }),
963
+ children
964
+ ] });
965
+ }
966
+
967
+ // src/components/MultiSelect/MultiSelect.tsx
968
+ var import_react10 = require("react");
969
+ var import_jsx_runtime16 = require("react/jsx-runtime");
970
+ function ChevronIcon2() {
971
+ return /* @__PURE__ */ (0, import_jsx_runtime16.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_runtime16.jsx)("path", { d: "M6 8l4 4 4-4", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", strokeLinejoin: "round" }) });
972
+ }
973
+ function CheckIcon2() {
974
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("svg", { viewBox: "0 0 12 12", width: "12", height: "12", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("path", { d: "M10 3L4.5 8.5 2 6", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
975
+ }
976
+ function MultiSelect({
977
+ label,
978
+ options,
979
+ value,
980
+ onChange,
981
+ disabled = false,
982
+ selectAllLabel = "Select all",
983
+ clearLabel = "Clear",
984
+ id,
985
+ className
986
+ }) {
987
+ const genId = (0, import_react10.useId)();
988
+ const triggerId = id ?? genId;
989
+ const listId = `${genId}-list`;
990
+ const rootRef = (0, import_react10.useRef)(null);
991
+ const triggerRef = (0, import_react10.useRef)(null);
992
+ const listRef = (0, import_react10.useRef)(null);
993
+ const [open, setOpen] = (0, import_react10.useState)(false);
994
+ const [activeIndex, setActiveIndex] = (0, import_react10.useState)(0);
995
+ const selected = new Set(value);
996
+ const enabled = options.filter((o) => !o.disabled);
997
+ (0, import_react10.useEffect)(() => {
998
+ if (!open) return;
999
+ const onDown = (e) => {
1000
+ if (rootRef.current && !rootRef.current.contains(e.target)) setOpen(false);
1001
+ };
1002
+ document.addEventListener("mousedown", onDown);
1003
+ const raf = requestAnimationFrame(() => listRef.current?.focus());
1004
+ return () => {
1005
+ document.removeEventListener("mousedown", onDown);
1006
+ cancelAnimationFrame(raf);
1007
+ };
1008
+ }, [open]);
1009
+ const close = () => {
1010
+ setOpen(false);
1011
+ triggerRef.current?.focus();
1012
+ };
1013
+ const toggle = (o) => {
1014
+ if (!o || o.disabled) return;
1015
+ const next = selected.has(o.value) ? value.filter((v) => v !== o.value) : options.filter((x) => x.value === o.value || selected.has(x.value)).map((x) => x.value);
1016
+ onChange(next);
1017
+ };
1018
+ const onTriggerKeyDown = (e) => {
1019
+ if (e.key === "ArrowDown" || e.key === "ArrowUp" || e.key === "Enter" || e.key === " ") {
1020
+ e.preventDefault();
1021
+ setActiveIndex(0);
1022
+ setOpen(true);
1023
+ }
1024
+ };
1025
+ const onListKeyDown = (e) => {
1026
+ const last = options.length - 1;
1027
+ if (e.key === "ArrowDown") {
1028
+ e.preventDefault();
1029
+ setActiveIndex((i) => i >= last ? 0 : i + 1);
1030
+ } else if (e.key === "ArrowUp") {
1031
+ e.preventDefault();
1032
+ setActiveIndex((i) => i <= 0 ? last : i - 1);
1033
+ } else if (e.key === "Home") {
1034
+ e.preventDefault();
1035
+ setActiveIndex(0);
1036
+ } else if (e.key === "End") {
1037
+ e.preventDefault();
1038
+ setActiveIndex(last);
1039
+ } else if (e.key === "Enter" || e.key === " ") {
1040
+ e.preventDefault();
1041
+ toggle(options[activeIndex]);
1042
+ } else if (e.key === "Escape" || e.key === "Tab") {
1043
+ if (e.key === "Escape") e.preventDefault();
1044
+ close();
1045
+ }
1046
+ };
1047
+ const triggerClasses = ["fds-multiselect__trigger", open ? "fds-multiselect__trigger--open" : ""].filter(Boolean).join(" ");
1048
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { ref: rootRef, className: ["fds-multiselect", className].filter(Boolean).join(" "), children: [
1049
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
1050
+ "button",
1051
+ {
1052
+ type: "button",
1053
+ id: triggerId,
1054
+ ref: triggerRef,
1055
+ className: triggerClasses,
1056
+ disabled,
1057
+ "aria-haspopup": "listbox",
1058
+ "aria-expanded": open,
1059
+ "aria-controls": open ? listId : void 0,
1060
+ onClick: () => setOpen((o) => !o),
1061
+ onKeyDown: onTriggerKeyDown,
1062
+ children: [
1063
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "fds-multiselect__label", children: label }),
1064
+ value.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "fds-multiselect__count", "aria-label": `${value.length} of ${options.length} selected`, children: [
1065
+ value.length,
1066
+ "/",
1067
+ options.length
1068
+ ] }),
1069
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: `fds-multiselect__chevron${open ? " fds-multiselect__chevron--open" : ""}`, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ChevronIcon2, {}) })
1070
+ ]
1071
+ }
1072
+ ),
1073
+ open && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "fds-multiselect__popover", children: [
1074
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1075
+ "div",
1076
+ {
1077
+ ref: listRef,
1078
+ id: listId,
1079
+ role: "listbox",
1080
+ "aria-multiselectable": "true",
1081
+ "aria-label": label,
1082
+ tabIndex: 0,
1083
+ className: "fds-multiselect__list",
1084
+ "aria-activedescendant": `${listId}-opt-${activeIndex}`,
1085
+ onKeyDown: onListKeyDown,
1086
+ children: options.map((o, i) => {
1087
+ const checked = selected.has(o.value);
1088
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
1089
+ "div",
1090
+ {
1091
+ id: `${listId}-opt-${i}`,
1092
+ role: "option",
1093
+ "aria-selected": checked,
1094
+ "aria-disabled": o.disabled || void 0,
1095
+ className: [
1096
+ "fds-multiselect__option",
1097
+ i === activeIndex ? "fds-multiselect__option--active" : "",
1098
+ o.disabled ? "fds-multiselect__option--disabled" : ""
1099
+ ].filter(Boolean).join(" "),
1100
+ onMouseEnter: () => setActiveIndex(i),
1101
+ onMouseDown: (e) => e.preventDefault(),
1102
+ onClick: () => toggle(o),
1103
+ children: [
1104
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: `fds-multiselect__box${checked ? " fds-multiselect__box--checked" : ""}`, "aria-hidden": "true", children: checked && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(CheckIcon2, {}) }),
1105
+ o.dot && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: `fds-dot fds-dot--${o.dot}`, "aria-hidden": "true" }),
1106
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "fds-multiselect__optLabel", children: o.label }),
1107
+ o.count != null && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "fds-multiselect__optCount", children: o.count })
1108
+ ]
1109
+ },
1110
+ o.value
1111
+ );
1112
+ })
1113
+ }
1114
+ ),
1115
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "fds-multiselect__footer", children: [
1116
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { type: "button", className: "fds-multiselect__action", onClick: () => onChange(enabled.map((o) => o.value)), children: selectAllLabel }),
1117
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { type: "button", className: "fds-multiselect__action", onClick: () => onChange([]), children: clearLabel })
1118
+ ] })
1119
+ ] })
1120
+ ] });
1121
+ }
1122
+
1123
+ // src/components/SearchInput/SearchInput.tsx
1124
+ var import_react11 = require("react");
1125
+ var import_jsx_runtime17 = require("react/jsx-runtime");
1126
+ var SearchInput = (0, import_react11.forwardRef)(function SearchInput2({ shortcut, containerClassName, className, value, ...rest }, ref) {
1127
+ const empty = value === void 0 || value === "";
1128
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: ["fds-search", containerClassName].filter(Boolean).join(" "), children: [
1129
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("svg", { className: "fds-search__icon", viewBox: "0 0 24 24", width: "20", height: "20", fill: "none", "aria-hidden": "true", children: [
1130
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("circle", { cx: "11", cy: "11", r: "8", stroke: "currentColor", strokeWidth: "2" }),
1131
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "m21 21-4.3-4.3", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })
1132
+ ] }),
1133
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("input", { ref, type: "search", value, className: ["fds-search__input", className].filter(Boolean).join(" "), ...rest }),
1134
+ shortcut && empty && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("kbd", { className: "fds-search__kbd", "aria-hidden": "true", children: shortcut })
1135
+ ] });
1136
+ });
1137
+
1138
+ // src/components/Pagination/Pagination.tsx
1139
+ var import_jsx_runtime18 = require("react/jsx-runtime");
1140
+ function pageItems(page, pageCount) {
1141
+ if (pageCount <= 7) return Array.from({ length: pageCount }, (_, i) => i + 1);
1142
+ const start = Math.max(2, Math.min(page - 1, pageCount - 4));
1143
+ const end = Math.min(pageCount - 1, Math.max(page + 1, 5));
1144
+ const items = [1];
1145
+ if (start > 2) items.push(null);
1146
+ for (let p = start; p <= end; p++) items.push(p);
1147
+ if (end < pageCount - 1) items.push(null);
1148
+ items.push(pageCount);
1149
+ return items;
1150
+ }
1151
+ function Arrow2({ dir }) {
1152
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("svg", { viewBox: "0 0 20 20", width: "20", height: "20", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: dir === "prev" ? "M12 15l-5-5 5-5" : "M8 5l5 5-5 5", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", strokeLinejoin: "round" }) });
1153
+ }
1154
+ function Pagination({ page, pageCount, onPageChange, total, pageSize, variant = "full", className }) {
1155
+ if (pageCount <= 1) return null;
1156
+ const go = (p) => {
1157
+ if (p >= 1 && p <= pageCount && p !== page) onPageChange(p);
1158
+ };
1159
+ const showRange = variant === "full" && total != null && pageSize != null;
1160
+ const from = (page - 1) * (pageSize ?? 0) + 1;
1161
+ const to = Math.min(page * (pageSize ?? 0), total ?? 0);
1162
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("nav", { className: ["fds-pagination", `fds-pagination--${variant}`, className].filter(Boolean).join(" "), "aria-label": "Pagination", children: [
1163
+ showRange && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { className: "fds-pagination__range", children: [
1164
+ "Showing ",
1165
+ from,
1166
+ "\u2013",
1167
+ to,
1168
+ " of ",
1169
+ total
1170
+ ] }),
1171
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "fds-pagination__controls", children: [
1172
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { type: "button", className: "fds-pagination__arrow", onClick: () => go(page - 1), disabled: page <= 1, "aria-label": "Previous page", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Arrow2, { dir: "prev" }) }),
1173
+ variant === "compact" ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "fds-pagination__status", "aria-live": "polite", children: [
1174
+ "Page ",
1175
+ page,
1176
+ " of ",
1177
+ pageCount
1178
+ ] }) : pageItems(page, pageCount).map(
1179
+ (p, i) => p === null ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "fds-pagination__gap", "aria-hidden": "true", children: "\u2026" }, `gap-${i}`) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1180
+ "button",
1181
+ {
1182
+ type: "button",
1183
+ className: `fds-pagination__page${p === page ? " fds-pagination__page--current" : ""}`,
1184
+ "aria-current": p === page ? "page" : void 0,
1185
+ "aria-label": `Page ${p}`,
1186
+ onClick: () => go(p),
1187
+ children: p
1188
+ },
1189
+ p
1190
+ )
1191
+ ),
1192
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { type: "button", className: "fds-pagination__arrow", onClick: () => go(page + 1), disabled: page >= pageCount, "aria-label": "Next page", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Arrow2, { dir: "next" }) })
1193
+ ] })
1194
+ ] });
1195
+ }
1196
+
1197
+ // src/components/EmptyState/EmptyState.tsx
1198
+ var import_jsx_runtime19 = require("react/jsx-runtime");
1199
+ function EmptyState({ illustration, title, description, action, footer, className, ...rest }) {
1200
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: ["fds-empty", className].filter(Boolean).join(" "), ...rest, children: [
1201
+ illustration != null && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "fds-empty__illustration", children: illustration }),
1202
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "fds-empty__text", children: [
1203
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h2", { className: "fds-empty__title", children: title }),
1204
+ description != null && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "fds-empty__description", children: description })
1205
+ ] }),
1206
+ (action != null || footer != null) && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "fds-empty__actions", children: [
1207
+ action,
1208
+ footer != null && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "fds-empty__footer", children: footer })
1209
+ ] })
1210
+ ] });
1211
+ }
1212
+ function StackedCardsIllustration({ className }) {
1213
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: ["fds-stacked-cards", className].filter(Boolean).join(" "), "aria-hidden": "true", children: [
1214
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "fds-stacked-cards__card fds-stacked-cards__card--back" }),
1215
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "fds-stacked-cards__card fds-stacked-cards__card--front", children: [
1216
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "fds-stacked-cards__lines", children: [
1217
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", {}),
1218
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", {}),
1219
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", {})
1220
+ ] }),
1221
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", className: "fds-stacked-cards__status", children: [
1222
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("rect", { x: "0.75", y: "0.75", width: "16.5", height: "16.5", rx: "8.25", stroke: "currentColor", strokeWidth: "1.5" }),
1223
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("circle", { cx: "9", cy: "9", r: "3", className: "fds-stacked-cards__statusDot" })
1224
+ ] })
1225
+ ] }),
1226
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "fds-stacked-cards__badge", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("svg", { viewBox: "0 0 24 24", width: "20", height: "20", fill: "none", children: [
1227
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("circle", { cx: "11", cy: "11", r: "8", stroke: "currentColor", strokeWidth: "2" }),
1228
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("path", { d: "m21 21-4.3-4.3", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })
1229
+ ] }) })
1230
+ ] });
1231
+ }
1232
+
1233
+ // src/components/Skeleton/Skeleton.tsx
1234
+ var import_jsx_runtime20 = require("react/jsx-runtime");
1235
+ var px = (v) => typeof v === "number" ? `${v}px` : v;
1236
+ function Skeleton({ shape = "rect", width, height, lines = 1, className, style, ...rest }) {
1237
+ const classes = ["fds-skeleton", `fds-skeleton--${shape}`, className].filter(Boolean).join(" ");
1238
+ if (shape === "text" && lines > 1) {
1239
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "fds-skeleton-lines", style: { width: px(width) }, "aria-hidden": "true", children: Array.from({ length: lines }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1240
+ "span",
1241
+ {
1242
+ className: classes,
1243
+ style: { height: px(height), width: i === lines - 1 ? "60%" : void 0, ...style },
1244
+ ...rest
1245
+ },
1246
+ i
1247
+ )) });
1248
+ }
1249
+ const size = shape === "circle" ? { width: px(width ?? height ?? 16), height: px(height ?? width ?? 16) } : { width: px(width), height: px(height) };
1250
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: classes, style: { ...size, ...style }, "aria-hidden": "true", ...rest });
1251
+ }
1252
+ function SkeletonGroup({ label = "Loading", className, children, ...rest }) {
1253
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { role: "status", "aria-busy": "true", "aria-label": label, className, ...rest, children });
1254
+ }
938
1255
  // Annotate the CommonJS export names for ESM import in node:
939
1256
  0 && (module.exports = {
940
1257
  AppNav,
941
1258
  Avatar,
1259
+ Badge,
942
1260
  Button,
943
1261
  DiffPropertyList,
944
1262
  DiffSection,
1263
+ EmptyState,
945
1264
  MismatchCard,
946
1265
  Modal,
1266
+ MultiSelect,
1267
+ Pagination,
1268
+ SearchInput,
947
1269
  SectionHeader,
948
1270
  SegmentedControl,
949
1271
  Select,
950
1272
  SettingsSection,
1273
+ Skeleton,
1274
+ SkeletonGroup,
951
1275
  Split,
1276
+ StackedCardsIllustration,
952
1277
  TabNav,
1278
+ Tag,
953
1279
  Toggle,
954
1280
  breakpoints
955
1281
  });