@usefidel/design-system 0.25.1 → 0.27.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.js CHANGED
@@ -950,12 +950,23 @@ function Badge({ tone = "neutral", icon, className, children, ...rest }) {
950
950
  }
951
951
 
952
952
  // src/components/Tag/Tag.tsx
953
+ import { X } from "lucide-react";
953
954
  import { jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
954
- function Tag({ dot, icon, className, children, ...rest }) {
955
+ function Tag({ dot, icon, onRemove, removeLabel, className, children, ...rest }) {
955
956
  return /* @__PURE__ */ jsxs14("span", { className: ["fds-tag", className].filter(Boolean).join(" "), ...rest, children: [
956
957
  dot && /* @__PURE__ */ jsx16("span", { className: `fds-dot fds-dot--${dot}`, "aria-hidden": "true" }),
957
958
  icon != null && /* @__PURE__ */ jsx16("span", { className: "fds-tag__icon", "aria-hidden": "true", children: icon }),
958
- children
959
+ children,
960
+ onRemove && /* @__PURE__ */ jsx16(
961
+ "button",
962
+ {
963
+ type: "button",
964
+ className: "fds-tag__remove",
965
+ "aria-label": `Remove ${removeLabel ?? (typeof children === "string" ? children : "")}`.trim(),
966
+ onClick: onRemove,
967
+ children: /* @__PURE__ */ jsx16(X, { "aria-hidden": "true" })
968
+ }
969
+ )
959
970
  ] });
960
971
  }
961
972
 
@@ -2288,13 +2299,17 @@ var AppLayout = Object.assign(AppLayoutRoot, { Panel: AppLayoutPanel });
2288
2299
 
2289
2300
  // src/components/PageHeader/PageHeader.tsx
2290
2301
  import { jsx as jsx47, jsxs as jsxs38 } from "react/jsx-runtime";
2291
- function PageHeader({ title, description, breadcrumb, actions, className, children, ...rest }) {
2302
+ function PageHeader({ title, description, leading, meta, breadcrumb, actions, className, children, ...rest }) {
2292
2303
  return /* @__PURE__ */ jsxs38("header", { className: ["fds-page-header", className].filter(Boolean).join(" "), ...rest, children: [
2304
+ breadcrumb != null && /* @__PURE__ */ jsx47("div", { className: "fds-page-header__breadcrumb", children: breadcrumb }),
2293
2305
  /* @__PURE__ */ jsxs38("div", { className: "fds-page-header__row", children: [
2294
- /* @__PURE__ */ jsxs38("div", { className: "fds-page-header__text", children: [
2295
- breadcrumb != null && /* @__PURE__ */ jsx47("div", { className: "fds-page-header__breadcrumb", children: breadcrumb }),
2296
- /* @__PURE__ */ jsx47("h1", { className: "fds-page-header__title", children: title }),
2297
- description != null && /* @__PURE__ */ jsx47("p", { className: "fds-page-header__description", children: description })
2306
+ /* @__PURE__ */ jsxs38("div", { className: "fds-page-header__lead", children: [
2307
+ leading != null && /* @__PURE__ */ jsx47("div", { className: "fds-page-header__leading", children: leading }),
2308
+ /* @__PURE__ */ jsxs38("div", { className: "fds-page-header__text", children: [
2309
+ /* @__PURE__ */ jsx47("h1", { className: "fds-page-header__title", children: title }),
2310
+ description != null && /* @__PURE__ */ jsx47("p", { className: "fds-page-header__description", children: description }),
2311
+ meta != null && /* @__PURE__ */ jsx47("div", { className: "fds-page-header__meta", children: meta })
2312
+ ] })
2298
2313
  ] }),
2299
2314
  actions != null && /* @__PURE__ */ jsx47("div", { className: "fds-page-header__actions", children: actions })
2300
2315
  ] }),
@@ -2304,7 +2319,7 @@ function PageHeader({ title, description, breadcrumb, actions, className, childr
2304
2319
 
2305
2320
  // src/components/Toast/Toast.tsx
2306
2321
  import { useEffect as useEffect9 } from "react";
2307
- import { X } from "lucide-react";
2322
+ import { X as X2 } from "lucide-react";
2308
2323
  import { jsx as jsx48, jsxs as jsxs39 } from "react/jsx-runtime";
2309
2324
  function ToastRegion({ className, children, ...rest }) {
2310
2325
  return /* @__PURE__ */ jsx48("div", { className: ["fds-toast-region", className].filter(Boolean).join(" "), "aria-live": "polite", ...rest, children });
@@ -2318,7 +2333,509 @@ function Toast({ children, action, onDismiss, duration, className, ...rest }) {
2318
2333
  return /* @__PURE__ */ jsxs39("div", { role: "status", className: ["fds-toast", className].filter(Boolean).join(" "), ...rest, children: [
2319
2334
  /* @__PURE__ */ jsx48("span", { className: "fds-toast__message", children }),
2320
2335
  action && /* @__PURE__ */ jsx48("button", { type: "button", className: "fds-toast__action", onClick: action.onClick, children: action.label }),
2321
- onDismiss && /* @__PURE__ */ jsx48("button", { type: "button", className: "fds-toast__close", "aria-label": "Dismiss", onClick: onDismiss, children: /* @__PURE__ */ jsx48(X, { "aria-hidden": "true" }) })
2336
+ onDismiss && /* @__PURE__ */ jsx48("button", { type: "button", className: "fds-toast__close", "aria-label": "Dismiss", onClick: onDismiss, children: /* @__PURE__ */ jsx48(X2, { "aria-hidden": "true" }) })
2337
+ ] });
2338
+ }
2339
+
2340
+ // src/components/Stepper/Stepper.tsx
2341
+ import { Children, isValidElement } from "react";
2342
+ import { Check as Check2 } from "lucide-react";
2343
+ import { jsx as jsx49, jsxs as jsxs40 } from "react/jsx-runtime";
2344
+ function StepperStep(_) {
2345
+ return null;
2346
+ }
2347
+ function StepperRoot({ className, children, ...rest }) {
2348
+ const steps = Children.toArray(children).filter(isValidElement);
2349
+ return /* @__PURE__ */ jsx49("ol", { className: ["fds-stepper", className].filter(Boolean).join(" "), ...rest, children: steps.map((step, i) => {
2350
+ const { status, children: label } = step.props;
2351
+ return /* @__PURE__ */ jsxs40(
2352
+ "li",
2353
+ {
2354
+ className: `fds-stepper__step fds-stepper__step--${status}`,
2355
+ "aria-current": status === "current" ? "step" : void 0,
2356
+ children: [
2357
+ /* @__PURE__ */ jsx49("span", { className: "fds-stepper__marker", "aria-hidden": "true", children: status === "done" ? /* @__PURE__ */ jsx49(Check2, {}) : i + 1 }),
2358
+ /* @__PURE__ */ jsx49("span", { className: "fds-stepper__label", children: label })
2359
+ ]
2360
+ },
2361
+ i
2362
+ );
2363
+ }) });
2364
+ }
2365
+ var Stepper = Object.assign(StepperRoot, { Step: StepperStep });
2366
+
2367
+ // src/components/NumberedSteps/NumberedSteps.tsx
2368
+ import { Children as Children2 } from "react";
2369
+ import { jsx as jsx50, jsxs as jsxs41 } from "react/jsx-runtime";
2370
+ function NumberedStepsRoot({ className, children, ...rest }) {
2371
+ return /* @__PURE__ */ jsx50("ol", { className: ["fds-numbered-steps", className].filter(Boolean).join(" "), ...rest, children: Children2.toArray(children) });
2372
+ }
2373
+ function NumberedStepsItem({ className, children, ...rest }) {
2374
+ return /* @__PURE__ */ jsxs41("li", { className: ["fds-numbered-steps__item", className].filter(Boolean).join(" "), ...rest, children: [
2375
+ /* @__PURE__ */ jsx50("span", { className: "fds-numbered-steps__marker", "aria-hidden": "true" }),
2376
+ /* @__PURE__ */ jsx50("div", { className: "fds-numbered-steps__body", children })
2377
+ ] });
2378
+ }
2379
+ var NumberedSteps = Object.assign(NumberedStepsRoot, { Item: NumberedStepsItem });
2380
+
2381
+ // src/components/OptionList/OptionList.tsx
2382
+ import { jsx as jsx51, jsxs as jsxs42 } from "react/jsx-runtime";
2383
+ function OptionListRoot({ className, children, ...rest }) {
2384
+ return /* @__PURE__ */ jsx51("div", { className: ["fds-option-list", className].filter(Boolean).join(" "), ...rest, children });
2385
+ }
2386
+ function OptionListLabel({ className, children, ...rest }) {
2387
+ return /* @__PURE__ */ jsx51("div", { className: ["fds-option-list__label", className].filter(Boolean).join(" "), ...rest, children });
2388
+ }
2389
+ function OptionRow({ control = "radio", title, description, meta, className, checked, disabled, ...rest }) {
2390
+ const Control = control === "checkbox" ? Checkbox : Radio;
2391
+ return /* @__PURE__ */ jsxs42(
2392
+ "div",
2393
+ {
2394
+ className: ["fds-option-row", checked ? "fds-option-row--checked" : "", className].filter(Boolean).join(" "),
2395
+ "data-disabled": disabled ? "" : void 0,
2396
+ children: [
2397
+ /* @__PURE__ */ jsx51(Control, { label: title, description, checked, disabled, ...rest }),
2398
+ meta != null && /* @__PURE__ */ jsx51("span", { className: "fds-option-row__meta", children: meta })
2399
+ ]
2400
+ }
2401
+ );
2402
+ }
2403
+ var OptionList = Object.assign(OptionListRoot, { Label: OptionListLabel, Row: OptionRow });
2404
+
2405
+ // src/components/Checklist/Checklist.tsx
2406
+ import { Check as Check3 } from "lucide-react";
2407
+ import { jsx as jsx52, jsxs as jsxs43 } from "react/jsx-runtime";
2408
+ function ChecklistRoot({ title, className, children, ...rest }) {
2409
+ return /* @__PURE__ */ jsxs43("section", { className: ["fds-checklist", className].filter(Boolean).join(" "), ...rest, children: [
2410
+ title != null && /* @__PURE__ */ jsx52("h3", { className: "fds-checklist__title", children: title }),
2411
+ /* @__PURE__ */ jsx52("ul", { className: "fds-checklist__items", children })
2412
+ ] });
2413
+ }
2414
+ function ChecklistItem({ done, label, value }) {
2415
+ return /* @__PURE__ */ jsxs43("li", { className: ["fds-checklist__item", done ? "fds-checklist__item--done" : ""].filter(Boolean).join(" "), children: [
2416
+ /* @__PURE__ */ jsx52("span", { className: "fds-checklist__mark", "aria-hidden": "true", children: done && /* @__PURE__ */ jsx52(Check3, {}) }),
2417
+ /* @__PURE__ */ jsxs43("span", { className: "fds-checklist__text", children: [
2418
+ /* @__PURE__ */ jsx52("span", { className: "fds-checklist__label", children: label }),
2419
+ /* @__PURE__ */ jsx52("span", { className: "fds-checklist__value", children: value })
2420
+ ] })
2421
+ ] });
2422
+ }
2423
+ var Checklist = Object.assign(ChecklistRoot, { Item: ChecklistItem });
2424
+
2425
+ // src/components/Drawer/Drawer.tsx
2426
+ import { useEffect as useEffect10, useId as useId14, useRef as useRef10 } from "react";
2427
+ import { createPortal as createPortal3 } from "react-dom";
2428
+ import { X as X3 } from "lucide-react";
2429
+ import { jsx as jsx53, jsxs as jsxs44 } from "react/jsx-runtime";
2430
+ var FOCUSABLE2 = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
2431
+ function Drawer({ open, onClose, title, description, children, footer, dismissible = true }) {
2432
+ const titleId = useId14();
2433
+ const descriptionId = useId14();
2434
+ const panelRef = useRef10(null);
2435
+ const onCloseRef = useRef10(onClose);
2436
+ onCloseRef.current = onClose;
2437
+ const dismissibleRef = useRef10(dismissible);
2438
+ dismissibleRef.current = dismissible;
2439
+ useEffect10(() => {
2440
+ if (!open) return;
2441
+ const panel = panelRef.current;
2442
+ const previouslyFocused = document.activeElement;
2443
+ (panel?.querySelector("[data-autofocus]") ?? panel?.querySelector(`.fds-drawer__body ${FOCUSABLE2}`) ?? panel)?.focus();
2444
+ const previousOverflow = document.body.style.overflow;
2445
+ document.body.style.overflow = "hidden";
2446
+ const onKey = (e) => {
2447
+ if (e.key === "Escape" && dismissibleRef.current) {
2448
+ e.preventDefault();
2449
+ onCloseRef.current();
2450
+ return;
2451
+ }
2452
+ if (e.key === "Tab" && panel) {
2453
+ const focusable = Array.from(panel.querySelectorAll(FOCUSABLE2));
2454
+ if (focusable.length === 0) return;
2455
+ const first = focusable[0];
2456
+ const last = focusable[focusable.length - 1];
2457
+ if (e.shiftKey && (document.activeElement === first || document.activeElement === panel)) {
2458
+ e.preventDefault();
2459
+ last.focus();
2460
+ } else if (!e.shiftKey && document.activeElement === last) {
2461
+ e.preventDefault();
2462
+ first.focus();
2463
+ }
2464
+ }
2465
+ };
2466
+ window.addEventListener("keydown", onKey);
2467
+ return () => {
2468
+ window.removeEventListener("keydown", onKey);
2469
+ document.body.style.overflow = previousOverflow;
2470
+ previouslyFocused?.focus?.();
2471
+ };
2472
+ }, [open]);
2473
+ if (!open || typeof document === "undefined") return null;
2474
+ return createPortal3(
2475
+ /* @__PURE__ */ jsx53(
2476
+ "div",
2477
+ {
2478
+ className: "fds-drawer__scrim",
2479
+ onMouseDown: (e) => {
2480
+ if (e.target === e.currentTarget && dismissible) onClose();
2481
+ },
2482
+ children: /* @__PURE__ */ jsxs44(
2483
+ "div",
2484
+ {
2485
+ ref: panelRef,
2486
+ className: "fds-drawer",
2487
+ role: "dialog",
2488
+ "aria-modal": "true",
2489
+ "aria-labelledby": titleId,
2490
+ "aria-describedby": description != null ? descriptionId : void 0,
2491
+ tabIndex: -1,
2492
+ children: [
2493
+ /* @__PURE__ */ jsxs44("header", { className: "fds-drawer__header", children: [
2494
+ /* @__PURE__ */ jsxs44("div", { className: "fds-drawer__heading", children: [
2495
+ /* @__PURE__ */ jsx53("h2", { id: titleId, className: "fds-drawer__title", children: title }),
2496
+ description != null && /* @__PURE__ */ jsx53("p", { id: descriptionId, className: "fds-drawer__description", children: description })
2497
+ ] }),
2498
+ /* @__PURE__ */ jsx53("button", { type: "button", className: "fds-drawer__close", onClick: onClose, disabled: !dismissible, "aria-label": "Close", children: /* @__PURE__ */ jsx53(X3, { "aria-hidden": "true" }) })
2499
+ ] }),
2500
+ /* @__PURE__ */ jsx53("div", { className: "fds-drawer__body", children }),
2501
+ footer != null && /* @__PURE__ */ jsx53("footer", { className: "fds-drawer__footer", children: footer })
2502
+ ]
2503
+ }
2504
+ )
2505
+ }
2506
+ ),
2507
+ document.body
2508
+ );
2509
+ }
2510
+
2511
+ // src/components/ResourceCard/ResourceCard.tsx
2512
+ import { jsx as jsx54, jsxs as jsxs45 } from "react/jsx-runtime";
2513
+ function ResourceCard({ icon, title, badge, meta, stats, action, variant = "default", className, ...rest }) {
2514
+ return /* @__PURE__ */ jsxs45("div", { className: ["fds-resource-card", `fds-resource-card--${variant}`, className].filter(Boolean).join(" "), ...rest, children: [
2515
+ /* @__PURE__ */ jsxs45("div", { className: "fds-resource-card__main", children: [
2516
+ /* @__PURE__ */ jsxs45("div", { className: "fds-resource-card__title", children: [
2517
+ icon != null && /* @__PURE__ */ jsx54("span", { className: "fds-resource-card__icon", "aria-hidden": "true", children: icon }),
2518
+ /* @__PURE__ */ jsx54("span", { children: title }),
2519
+ badge
2520
+ ] }),
2521
+ meta?.map((line, i) => /* @__PURE__ */ jsx54("div", { className: "fds-resource-card__meta", children: line }, i))
2522
+ ] }),
2523
+ stats && stats.length > 0 && /* @__PURE__ */ jsx54("dl", { className: "fds-resource-card__stats", children: stats.map((s, i) => /* @__PURE__ */ jsxs45("div", { className: "fds-resource-card__stat", children: [
2524
+ /* @__PURE__ */ jsx54("dt", { children: s.label }),
2525
+ /* @__PURE__ */ jsx54("dd", { children: s.value })
2526
+ ] }, i)) }),
2527
+ action != null && /* @__PURE__ */ jsx54("div", { className: "fds-resource-card__action", children: action })
2528
+ ] });
2529
+ }
2530
+
2531
+ // src/components/PageSkeleton/PageSkeleton.tsx
2532
+ import { jsx as jsx55, jsxs as jsxs46 } from "react/jsx-runtime";
2533
+ function PageSkeletonRoot({ label = "Loading", children }) {
2534
+ return /* @__PURE__ */ jsx55(SkeletonGroup, { label, className: "fds-page-skeleton", children });
2535
+ }
2536
+ function PageSkeletonHeader({ title, description, breadcrumb, action, tabs = 0 }) {
2537
+ return /* @__PURE__ */ jsx55(
2538
+ PageHeader,
2539
+ {
2540
+ breadcrumb: breadcrumb ? /* @__PURE__ */ jsx55(Skeleton, { shape: "text", width: 140 }) : void 0,
2541
+ title: title ?? /* @__PURE__ */ jsx55(Skeleton, { width: 220, height: 28 }),
2542
+ description: description === true ? /* @__PURE__ */ jsx55(Skeleton, { shape: "text", width: 320 }) : description || void 0,
2543
+ actions: action ? /* @__PURE__ */ jsx55(Skeleton, { width: 128, height: 36 }) : void 0,
2544
+ children: tabs > 0 && /* @__PURE__ */ jsx55("div", { className: "fds-page-skeleton__tabs", children: Array.from({ length: tabs }, (_, i) => /* @__PURE__ */ jsx55(Skeleton, { shape: "text", width: 80 }, i)) })
2545
+ }
2546
+ );
2547
+ }
2548
+ function PageSkeletonToolbar({ filters = 2 }) {
2549
+ return /* @__PURE__ */ jsxs46("div", { className: "fds-page-skeleton__toolbar", children: [
2550
+ /* @__PURE__ */ jsx55(Skeleton, { width: 280, height: 36 }),
2551
+ Array.from({ length: filters }, (_, i) => /* @__PURE__ */ jsx55(Skeleton, { width: 140, height: 36 }, i))
2552
+ ] });
2553
+ }
2554
+ function PageSkeletonTable({ rows = 5, columns = 5 }) {
2555
+ const cells = (key, width) => Array.from({ length: columns }, (_, c) => /* @__PURE__ */ jsx55(Skeleton, { shape: "text", width: c === 0 ? "60%" : width }, `${key}-${c}`));
2556
+ return /* @__PURE__ */ jsxs46("div", { className: "fds-page-skeleton__table", style: { ["--fds-page-skeleton-columns"]: columns }, children: [
2557
+ /* @__PURE__ */ jsx55("div", { className: "fds-page-skeleton__row fds-page-skeleton__row--head", children: cells("h", "40%") }),
2558
+ Array.from({ length: rows }, (_, r) => /* @__PURE__ */ jsx55("div", { className: "fds-page-skeleton__row", children: cells(`r${r}`, "50%") }, r))
2559
+ ] });
2560
+ }
2561
+ function PageSkeletonCards({ count = 3, height = 120, columns = 3 }) {
2562
+ return /* @__PURE__ */ jsx55("div", { className: "fds-page-skeleton__cards", style: { ["--fds-page-skeleton-columns"]: columns }, children: Array.from({ length: count }, (_, i) => /* @__PURE__ */ jsx55(Skeleton, { height, className: "fds-page-skeleton__card" }, i)) });
2563
+ }
2564
+ function PageSkeletonForm({ fields = 3 }) {
2565
+ return /* @__PURE__ */ jsx55("div", { className: "fds-page-skeleton__form", children: Array.from({ length: fields }, (_, i) => /* @__PURE__ */ jsxs46("div", { className: "fds-page-skeleton__field", children: [
2566
+ /* @__PURE__ */ jsx55(Skeleton, { shape: "text", width: 120 }),
2567
+ /* @__PURE__ */ jsx55(Skeleton, { height: 36 })
2568
+ ] }, i)) });
2569
+ }
2570
+ function PageSkeletonSplit({ children, aside }) {
2571
+ return /* @__PURE__ */ jsxs46("div", { className: "fds-page-skeleton__split", children: [
2572
+ /* @__PURE__ */ jsx55("div", { className: "fds-page-skeleton__main", children }),
2573
+ /* @__PURE__ */ jsx55("div", { className: "fds-page-skeleton__aside", children: aside })
2574
+ ] });
2575
+ }
2576
+ var PageSkeleton = Object.assign(PageSkeletonRoot, {
2577
+ Header: PageSkeletonHeader,
2578
+ Toolbar: PageSkeletonToolbar,
2579
+ Table: PageSkeletonTable,
2580
+ Cards: PageSkeletonCards,
2581
+ Form: PageSkeletonForm,
2582
+ Split: PageSkeletonSplit
2583
+ });
2584
+
2585
+ // src/components/PreviewCard/PreviewCard.tsx
2586
+ import { jsx as jsx56, jsxs as jsxs47 } from "react/jsx-runtime";
2587
+ function PreviewCardRoot({ as, variant = "default", className, ...rest }) {
2588
+ const Root = as ?? "div";
2589
+ return /* @__PURE__ */ jsx56(Root, { className: ["fds-preview-card", `fds-preview-card--${variant}`, className].filter(Boolean).join(" "), ...rest });
2590
+ }
2591
+ function PreviewCardPreview({ label, className, children, ...rest }) {
2592
+ return /* @__PURE__ */ jsxs47("div", { className: ["fds-preview-card__preview", className].filter(Boolean).join(" "), ...rest, children: [
2593
+ label != null && /* @__PURE__ */ jsx56("span", { className: "fds-preview-card__label", children: label }),
2594
+ children
2595
+ ] });
2596
+ }
2597
+ function PreviewCardTitle({ aside, className, children, ...rest }) {
2598
+ return /* @__PURE__ */ jsxs47("div", { className: ["fds-preview-card__title", className].filter(Boolean).join(" "), ...rest, children: [
2599
+ /* @__PURE__ */ jsx56("span", { className: "fds-preview-card__name", children }),
2600
+ aside != null && /* @__PURE__ */ jsx56("span", { className: "fds-preview-card__aside", children: aside })
2601
+ ] });
2602
+ }
2603
+ function part(name) {
2604
+ return function PreviewCardPart({ className, ...rest }) {
2605
+ return /* @__PURE__ */ jsx56("div", { className: [`fds-preview-card__${name}`, className].filter(Boolean).join(" "), ...rest });
2606
+ };
2607
+ }
2608
+ var PreviewCard = Object.assign(PreviewCardRoot, {
2609
+ Preview: PreviewCardPreview,
2610
+ Body: part("body"),
2611
+ Title: PreviewCardTitle,
2612
+ Meta: part("meta"),
2613
+ Footer: part("footer")
2614
+ });
2615
+
2616
+ // src/components/Tile/Tile.tsx
2617
+ import { jsx as jsx57, jsxs as jsxs48 } from "react/jsx-runtime";
2618
+ function Tile({ label, aside, className, children, ...rest }) {
2619
+ return /* @__PURE__ */ jsxs48("section", { className: ["fds-tile", className].filter(Boolean).join(" "), ...rest, children: [
2620
+ /* @__PURE__ */ jsxs48("header", { className: "fds-tile__head", children: [
2621
+ /* @__PURE__ */ jsx57("span", { className: "fds-tile__label", children: label }),
2622
+ aside
2623
+ ] }),
2624
+ /* @__PURE__ */ jsx57("div", { className: "fds-tile__body", children })
2625
+ ] });
2626
+ }
2627
+
2628
+ // src/components/ListCard/ListCard.tsx
2629
+ import { jsx as jsx58, jsxs as jsxs49 } from "react/jsx-runtime";
2630
+ function ListCardRoot({ title, count, aside, footer, className, children, ...rest }) {
2631
+ return /* @__PURE__ */ jsxs49("section", { className: ["fds-list-card", className].filter(Boolean).join(" "), ...rest, children: [
2632
+ (title != null || aside != null) && /* @__PURE__ */ jsxs49("header", { className: "fds-list-card__head", children: [
2633
+ /* @__PURE__ */ jsxs49("span", { className: "fds-list-card__title", children: [
2634
+ title,
2635
+ count != null && /* @__PURE__ */ jsx58("span", { className: "fds-list-card__count", children: count })
2636
+ ] }),
2637
+ aside != null && /* @__PURE__ */ jsx58("span", { className: "fds-list-card__aside", children: aside })
2638
+ ] }),
2639
+ /* @__PURE__ */ jsx58("ul", { className: "fds-list-card__rows", children }),
2640
+ footer != null && /* @__PURE__ */ jsx58("footer", { className: "fds-list-card__footer", children: footer })
2641
+ ] });
2642
+ }
2643
+ function ListCardRow({ icon, tone = "neutral", title, description, trailing, muted, className, ...rest }) {
2644
+ return /* @__PURE__ */ jsxs49("li", { className: ["fds-list-card__row", muted ? "fds-list-card__row--muted" : "", className].filter(Boolean).join(" "), ...rest, children: [
2645
+ icon != null && /* @__PURE__ */ jsx58("span", { className: `fds-list-card__icon fds-list-card__icon--${tone}`, "aria-hidden": "true", children: icon }),
2646
+ /* @__PURE__ */ jsxs49("span", { className: "fds-list-card__text", children: [
2647
+ /* @__PURE__ */ jsx58("span", { className: "fds-list-card__row-title", children: title }),
2648
+ description != null && /* @__PURE__ */ jsx58("span", { className: "fds-list-card__description", children: description })
2649
+ ] }),
2650
+ trailing != null && /* @__PURE__ */ jsx58("span", { className: "fds-list-card__trailing", children: trailing })
2651
+ ] });
2652
+ }
2653
+ var ListCard = Object.assign(ListCardRoot, { Row: ListCardRow });
2654
+
2655
+ // src/components/DescriptionList/DescriptionList.tsx
2656
+ import { jsx as jsx59, jsxs as jsxs50 } from "react/jsx-runtime";
2657
+ function DescriptionList({ title, action, items = [], note, className, children, ...rest }) {
2658
+ return /* @__PURE__ */ jsxs50("section", { className: ["fds-description-list", className].filter(Boolean).join(" "), ...rest, children: [
2659
+ (title != null || action != null) && /* @__PURE__ */ jsxs50("header", { className: "fds-description-list__head", children: [
2660
+ /* @__PURE__ */ jsx59("span", { className: "fds-description-list__title", children: title }),
2661
+ action != null && /* @__PURE__ */ jsx59("span", { className: "fds-description-list__action", children: action })
2662
+ ] }),
2663
+ items.length > 0 && /* @__PURE__ */ jsx59("dl", { className: "fds-description-list__items", children: items.map((item, i) => /* @__PURE__ */ jsxs50("div", { className: "fds-description-list__item", children: [
2664
+ /* @__PURE__ */ jsx59("dt", { children: item.label }),
2665
+ /* @__PURE__ */ jsx59("dd", { children: item.value })
2666
+ ] }, i)) }),
2667
+ children,
2668
+ note != null && /* @__PURE__ */ jsx59("p", { className: "fds-description-list__note", children: note })
2669
+ ] });
2670
+ }
2671
+
2672
+ // src/components/ColorRamp/ColorRamp.tsx
2673
+ import { jsx as jsx60 } from "react/jsx-runtime";
2674
+ function ColorRamp({ colors, size = "md", className, ...rest }) {
2675
+ return /* @__PURE__ */ jsx60("div", { className: ["fds-color-ramp", `fds-color-ramp--${size}`, className].filter(Boolean).join(" "), "aria-hidden": "true", ...rest, children: colors.map((c, i) => /* @__PURE__ */ jsx60("span", { className: "fds-color-ramp__step", style: { "--fds-ramp-color": c } }, i)) });
2676
+ }
2677
+
2678
+ // src/components/SwatchList/SwatchList.tsx
2679
+ import { jsx as jsx61, jsxs as jsxs51 } from "react/jsx-runtime";
2680
+ function SwatchList({ items, className, ...rest }) {
2681
+ return /* @__PURE__ */ jsx61("ul", { className: ["fds-swatch-list", className].filter(Boolean).join(" "), ...rest, children: items.map((item, i) => /* @__PURE__ */ jsxs51("li", { className: "fds-swatch-list__item", children: [
2682
+ /* @__PURE__ */ jsx61(
2683
+ "span",
2684
+ {
2685
+ className: ["fds-swatch-list__dot", item.color ? "" : "fds-swatch-list__dot--empty"].filter(Boolean).join(" "),
2686
+ style: item.color ? { "--fds-swatch-list-color": item.color } : void 0,
2687
+ "aria-hidden": "true"
2688
+ }
2689
+ ),
2690
+ /* @__PURE__ */ jsx61("span", { className: "fds-swatch-list__name", children: item.name }),
2691
+ /* @__PURE__ */ jsx61("span", { className: "fds-swatch-list__value", children: item.value })
2692
+ ] }, i)) });
2693
+ }
2694
+
2695
+ // src/components/TypeSpecimen/TypeSpecimen.tsx
2696
+ import { jsx as jsx62, jsxs as jsxs52 } from "react/jsx-runtime";
2697
+ var ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789";
2698
+ function TypeSpecimen({ family, fontFamily, tokens, sample, weights = [], footer, className, ...rest }) {
2699
+ const face = { "--fds-specimen-font": fontFamily };
2700
+ return /* @__PURE__ */ jsxs52("section", { className: ["fds-type-specimen", className].filter(Boolean).join(" "), style: face, ...rest, children: [
2701
+ /* @__PURE__ */ jsxs52("header", { className: "fds-type-specimen__head", children: [
2702
+ /* @__PURE__ */ jsxs52("div", { className: "fds-type-specimen__titles", children: [
2703
+ /* @__PURE__ */ jsx62("h3", { className: "fds-type-specimen__family", children: family }),
2704
+ tokens != null && /* @__PURE__ */ jsx62("div", { className: "fds-type-specimen__tokens", children: tokens })
2705
+ ] }),
2706
+ /* @__PURE__ */ jsx62("span", { className: "fds-type-specimen__glyph", "aria-hidden": "true", children: "Aa" })
2707
+ ] }),
2708
+ sample != null && /* @__PURE__ */ jsx62("p", { className: "fds-type-specimen__sample", children: sample }),
2709
+ /* @__PURE__ */ jsx62("p", { className: "fds-type-specimen__alphabet", children: ALPHABET }),
2710
+ weights.length > 0 && /* @__PURE__ */ jsx62("ul", { className: "fds-type-specimen__weights", children: weights.map((w) => /* @__PURE__ */ jsxs52("li", { children: [
2711
+ /* @__PURE__ */ jsx62("span", { style: { fontWeight: w.weight }, children: "Ag" }),
2712
+ /* @__PURE__ */ jsx62("small", { children: w.label })
2713
+ ] }, w.label)) }),
2714
+ footer != null && /* @__PURE__ */ jsx62("footer", { className: "fds-type-specimen__footer", children: footer })
2715
+ ] });
2716
+ }
2717
+ function TypeSample({ fontFamily, caption, className, ...rest }) {
2718
+ return /* @__PURE__ */ jsxs52("div", { className: ["fds-type-sample", className].filter(Boolean).join(" "), style: { "--fds-specimen-font": fontFamily }, ...rest, children: [
2719
+ /* @__PURE__ */ jsx62("span", { className: "fds-type-sample__glyph", "aria-hidden": "true", children: "Aa" }),
2720
+ caption != null && /* @__PURE__ */ jsx62("span", { className: "fds-type-sample__caption", children: caption })
2721
+ ] });
2722
+ }
2723
+
2724
+ // src/components/TypeScale/TypeScale.tsx
2725
+ import { jsx as jsx63, jsxs as jsxs53 } from "react/jsx-runtime";
2726
+ function TypeScaleRoot({ className, ...rest }) {
2727
+ return /* @__PURE__ */ jsx63("ul", { className: ["fds-type-scale", className].filter(Boolean).join(" "), ...rest });
2728
+ }
2729
+ function TypeScaleRow({ name, detail, sampleStyle, sample = "Check every pull request", className, ...rest }) {
2730
+ return /* @__PURE__ */ jsxs53("li", { className: ["fds-type-scale__row", className].filter(Boolean).join(" "), ...rest, children: [
2731
+ /* @__PURE__ */ jsxs53("span", { className: "fds-type-scale__label", children: [
2732
+ /* @__PURE__ */ jsx63("span", { className: "fds-type-scale__name", children: name }),
2733
+ detail != null && /* @__PURE__ */ jsx63("span", { className: "fds-type-scale__detail", children: detail })
2734
+ ] }),
2735
+ /* @__PURE__ */ jsx63("span", { className: "fds-type-scale__sample", style: sampleStyle, children: sample })
2736
+ ] });
2737
+ }
2738
+ var TypeScale = Object.assign(TypeScaleRoot, { Row: TypeScaleRow });
2739
+
2740
+ // src/components/MeasureList/MeasureList.tsx
2741
+ import { jsx as jsx64, jsxs as jsxs54 } from "react/jsx-runtime";
2742
+ function MeasureList({ items, max, tone = "accent", className, ...rest }) {
2743
+ const top = max ?? Math.max(1, ...items.map((i) => i.amount));
2744
+ return /* @__PURE__ */ jsx64("ul", { className: ["fds-measure-list", `fds-measure-list--${tone}`, className].filter(Boolean).join(" "), ...rest, children: items.map((item, i) => /* @__PURE__ */ jsxs54("li", { className: "fds-measure-list__item", children: [
2745
+ /* @__PURE__ */ jsx64("span", { className: "fds-measure-list__name", children: item.name }),
2746
+ /* @__PURE__ */ jsx64("span", { className: "fds-measure-list__value", children: item.value }),
2747
+ /* @__PURE__ */ jsx64("span", { className: "fds-measure-list__track", "aria-hidden": "true", children: /* @__PURE__ */ jsx64("span", { className: "fds-measure-list__bar", style: { "--fds-measure": `${Math.min(100, item.amount / top * 100)}%` } }) })
2748
+ ] }, i)) });
2749
+ }
2750
+
2751
+ // src/components/TokenSample/TokenSample.tsx
2752
+ import { jsx as jsx65, jsxs as jsxs55 } from "react/jsx-runtime";
2753
+ function TokenSample({ kind, value, name, detail, className, ...rest }) {
2754
+ const style = { [kind === "radius" ? "--fds-sample-radius" : "--fds-sample-shadow"]: value };
2755
+ return /* @__PURE__ */ jsxs55("div", { className: ["fds-token-sample", `fds-token-sample--${kind}`, className].filter(Boolean).join(" "), ...rest, children: [
2756
+ /* @__PURE__ */ jsx65("span", { className: "fds-token-sample__shape", style, "aria-hidden": "true" }),
2757
+ /* @__PURE__ */ jsx65("span", { className: "fds-token-sample__name", children: name }),
2758
+ detail != null && /* @__PURE__ */ jsx65("span", { className: "fds-token-sample__detail", children: detail })
2759
+ ] });
2760
+ }
2761
+
2762
+ // src/components/EasingCurve/EasingCurve.tsx
2763
+ import { jsx as jsx66, jsxs as jsxs56 } from "react/jsx-runtime";
2764
+ var BEZIER = /cubic-bezier\(\s*([-\d.]+)\s*,\s*([-\d.]+)\s*,\s*([-\d.]+)\s*,\s*([-\d.]+)\s*\)/;
2765
+ var W = 120;
2766
+ var H = 72;
2767
+ var PAD = 12;
2768
+ function easingPath(value) {
2769
+ const m = BEZIER.exec(value);
2770
+ const [x1, y1, x2, y2] = m ? m.slice(1).map(Number) : [0, 0, 1, 1];
2771
+ const x = (t) => PAD + t * (W - PAD * 2);
2772
+ const y = (t) => H - PAD - t * (H - PAD * 2);
2773
+ return `M${x(0)},${y(0)} C${x(x1)},${y(y1)} ${x(x2)},${y(y2)} ${x(1)},${y(1)}`;
2774
+ }
2775
+ function EasingCurve({ value, name, className, ...rest }) {
2776
+ return /* @__PURE__ */ jsxs56("div", { className: ["fds-easing-curve", className].filter(Boolean).join(" "), ...rest, children: [
2777
+ /* @__PURE__ */ jsx66("svg", { className: "fds-easing-curve__plot", viewBox: `0 0 ${W} ${H}`, "aria-hidden": "true", children: /* @__PURE__ */ jsx66("path", { d: easingPath(value) }) }),
2778
+ /* @__PURE__ */ jsx66("span", { className: "fds-easing-curve__name", children: name }),
2779
+ /* @__PURE__ */ jsx66("span", { className: "fds-easing-curve__value", children: value })
2780
+ ] });
2781
+ }
2782
+
2783
+ // src/components/FilterChips/FilterChips.tsx
2784
+ import { useRef as useRef11 } from "react";
2785
+ import { jsx as jsx67, jsxs as jsxs57 } from "react/jsx-runtime";
2786
+ function FilterChips({ options, value, onChange, "aria-label": ariaLabel, className }) {
2787
+ const refs = useRef11([]);
2788
+ const onKeyDown = (e, index) => {
2789
+ const step = e.key === "ArrowRight" || e.key === "ArrowDown" ? 1 : e.key === "ArrowLeft" || e.key === "ArrowUp" ? -1 : 0;
2790
+ if (!step) return;
2791
+ e.preventDefault();
2792
+ const next = (index + step + options.length) % options.length;
2793
+ onChange(options[next].value);
2794
+ refs.current[next]?.focus();
2795
+ };
2796
+ return /* @__PURE__ */ jsx67("div", { role: "radiogroup", "aria-label": ariaLabel, className: ["fds-filter-chips", className].filter(Boolean).join(" "), children: options.map((o, i) => {
2797
+ const selected = o.value === value;
2798
+ return /* @__PURE__ */ jsxs57(
2799
+ "button",
2800
+ {
2801
+ ref: (el) => {
2802
+ refs.current[i] = el;
2803
+ },
2804
+ type: "button",
2805
+ role: "radio",
2806
+ "aria-checked": selected,
2807
+ tabIndex: selected ? 0 : -1,
2808
+ className: ["fds-filter-chips__chip", selected ? "fds-filter-chips__chip--selected" : ""].filter(Boolean).join(" "),
2809
+ onClick: () => onChange(o.value),
2810
+ onKeyDown: (e) => onKeyDown(e, i),
2811
+ children: [
2812
+ o.label,
2813
+ o.count != null && /* @__PURE__ */ jsx67("span", { className: "fds-filter-chips__count", children: o.count })
2814
+ ]
2815
+ },
2816
+ o.value
2817
+ );
2818
+ }) });
2819
+ }
2820
+
2821
+ // src/components/Meter/Meter.tsx
2822
+ import { jsx as jsx68, jsxs as jsxs58 } from "react/jsx-runtime";
2823
+ function Meter({ value, max, label, className, ...rest }) {
2824
+ const pct = max > 0 ? Math.min(100, Math.max(0, value / max * 100)) : 0;
2825
+ return /* @__PURE__ */ jsxs58("div", { className: ["fds-meter", className].filter(Boolean).join(" "), ...rest, children: [
2826
+ /* @__PURE__ */ jsx68(
2827
+ "span",
2828
+ {
2829
+ className: "fds-meter__track",
2830
+ role: "meter",
2831
+ "aria-valuemin": 0,
2832
+ "aria-valuemax": max,
2833
+ "aria-valuenow": value,
2834
+ "aria-label": typeof label === "string" ? label : void 0,
2835
+ children: /* @__PURE__ */ jsx68("span", { className: "fds-meter__fill", style: { "--fds-meter": `${pct}%` } })
2836
+ }
2837
+ ),
2838
+ /* @__PURE__ */ jsx68("span", { className: "fds-meter__label", children: label })
2322
2839
  ] });
2323
2840
  }
2324
2841
  export {
@@ -2334,22 +2851,37 @@ export {
2334
2851
  Callout,
2335
2852
  Card,
2336
2853
  Checkbox,
2854
+ Checklist,
2855
+ ColorRamp,
2856
+ DescriptionList,
2337
2857
  DiffPropertyList,
2338
2858
  DiffSection,
2339
2859
  Divider,
2860
+ Drawer,
2861
+ EasingCurve,
2340
2862
  EmptyState,
2863
+ FilterChips,
2341
2864
  IconButton,
2342
2865
  Input,
2866
+ ListCard,
2343
2867
  ListLabel,
2868
+ MeasureList,
2344
2869
  Menu,
2870
+ Meter,
2345
2871
  MismatchCard,
2346
2872
  Modal,
2347
2873
  MultiSelect,
2874
+ NumberedSteps,
2875
+ OptionList,
2876
+ OptionRow,
2348
2877
  PageHeader,
2878
+ PageSkeleton,
2349
2879
  Pagination,
2880
+ PreviewCard,
2350
2881
  PricingCard,
2351
2882
  Radio,
2352
2883
  RadioCard,
2884
+ ResourceCard,
2353
2885
  SearchInput,
2354
2886
  SectionHeader,
2355
2887
  SegmentedControl,
@@ -2365,14 +2897,21 @@ export {
2365
2897
  Stat,
2366
2898
  StatusDot,
2367
2899
  StepList,
2900
+ Stepper,
2368
2901
  Swatch,
2902
+ SwatchList,
2369
2903
  TabNav,
2370
2904
  Table,
2371
2905
  Tag,
2906
+ Tile,
2372
2907
  Toast,
2373
2908
  ToastRegion,
2374
2909
  Toggle,
2910
+ TokenSample,
2375
2911
  Tooltip,
2912
+ TypeSample,
2913
+ TypeScale,
2914
+ TypeSpecimen,
2376
2915
  WorkspaceAvatar,
2377
2916
  WorkspaceSwitcher,
2378
2917
  breakpoints,