@usefidel/design-system 0.26.0 → 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/fidel.manifest.json +2 -2
- package/dist/index.cjs +294 -5
- package/dist/index.css +819 -0
- package/dist/index.d.cts +218 -3
- package/dist/index.d.ts +218 -3
- package/dist/index.js +280 -5
- package/package.json +8 -3
package/dist/fidel.manifest.json
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -33,15 +33,22 @@ __export(index_exports, {
|
|
|
33
33
|
Card: () => Card,
|
|
34
34
|
Checkbox: () => Checkbox,
|
|
35
35
|
Checklist: () => Checklist,
|
|
36
|
+
ColorRamp: () => ColorRamp,
|
|
37
|
+
DescriptionList: () => DescriptionList,
|
|
36
38
|
DiffPropertyList: () => DiffPropertyList,
|
|
37
39
|
DiffSection: () => DiffSection,
|
|
38
40
|
Divider: () => Divider,
|
|
39
41
|
Drawer: () => Drawer,
|
|
42
|
+
EasingCurve: () => EasingCurve,
|
|
40
43
|
EmptyState: () => EmptyState,
|
|
44
|
+
FilterChips: () => FilterChips,
|
|
41
45
|
IconButton: () => IconButton,
|
|
42
46
|
Input: () => Input,
|
|
47
|
+
ListCard: () => ListCard,
|
|
43
48
|
ListLabel: () => ListLabel,
|
|
49
|
+
MeasureList: () => MeasureList,
|
|
44
50
|
Menu: () => Menu,
|
|
51
|
+
Meter: () => Meter,
|
|
45
52
|
MismatchCard: () => MismatchCard,
|
|
46
53
|
Modal: () => Modal,
|
|
47
54
|
MultiSelect: () => MultiSelect,
|
|
@@ -51,6 +58,7 @@ __export(index_exports, {
|
|
|
51
58
|
PageHeader: () => PageHeader,
|
|
52
59
|
PageSkeleton: () => PageSkeleton,
|
|
53
60
|
Pagination: () => Pagination,
|
|
61
|
+
PreviewCard: () => PreviewCard,
|
|
54
62
|
PricingCard: () => PricingCard,
|
|
55
63
|
Radio: () => Radio,
|
|
56
64
|
RadioCard: () => RadioCard,
|
|
@@ -72,13 +80,19 @@ __export(index_exports, {
|
|
|
72
80
|
StepList: () => StepList,
|
|
73
81
|
Stepper: () => Stepper,
|
|
74
82
|
Swatch: () => Swatch,
|
|
83
|
+
SwatchList: () => SwatchList,
|
|
75
84
|
TabNav: () => TabNav,
|
|
76
85
|
Table: () => Table,
|
|
77
86
|
Tag: () => Tag,
|
|
87
|
+
Tile: () => Tile,
|
|
78
88
|
Toast: () => Toast,
|
|
79
89
|
ToastRegion: () => ToastRegion,
|
|
80
90
|
Toggle: () => Toggle,
|
|
91
|
+
TokenSample: () => TokenSample,
|
|
81
92
|
Tooltip: () => Tooltip,
|
|
93
|
+
TypeSample: () => TypeSample,
|
|
94
|
+
TypeScale: () => TypeScale,
|
|
95
|
+
TypeSpecimen: () => TypeSpecimen,
|
|
82
96
|
WorkspaceAvatar: () => WorkspaceAvatar,
|
|
83
97
|
WorkspaceSwitcher: () => WorkspaceSwitcher,
|
|
84
98
|
breakpoints: () => breakpoints,
|
|
@@ -2355,13 +2369,17 @@ var AppLayout = Object.assign(AppLayoutRoot, { Panel: AppLayoutPanel });
|
|
|
2355
2369
|
|
|
2356
2370
|
// src/components/PageHeader/PageHeader.tsx
|
|
2357
2371
|
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
2358
|
-
function PageHeader({ title, description, breadcrumb, actions, className, children, ...rest }) {
|
|
2372
|
+
function PageHeader({ title, description, leading, meta, breadcrumb, actions, className, children, ...rest }) {
|
|
2359
2373
|
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("header", { className: ["fds-page-header", className].filter(Boolean).join(" "), ...rest, children: [
|
|
2374
|
+
breadcrumb != null && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "fds-page-header__breadcrumb", children: breadcrumb }),
|
|
2360
2375
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "fds-page-header__row", children: [
|
|
2361
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "fds-page-
|
|
2362
|
-
|
|
2363
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.
|
|
2364
|
-
|
|
2376
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "fds-page-header__lead", children: [
|
|
2377
|
+
leading != null && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "fds-page-header__leading", children: leading }),
|
|
2378
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "fds-page-header__text", children: [
|
|
2379
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("h1", { className: "fds-page-header__title", children: title }),
|
|
2380
|
+
description != null && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "fds-page-header__description", children: description }),
|
|
2381
|
+
meta != null && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "fds-page-header__meta", children: meta })
|
|
2382
|
+
] })
|
|
2365
2383
|
] }),
|
|
2366
2384
|
actions != null && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "fds-page-header__actions", children: actions })
|
|
2367
2385
|
] }),
|
|
@@ -2633,6 +2651,263 @@ var PageSkeleton = Object.assign(PageSkeletonRoot, {
|
|
|
2633
2651
|
Form: PageSkeletonForm,
|
|
2634
2652
|
Split: PageSkeletonSplit
|
|
2635
2653
|
});
|
|
2654
|
+
|
|
2655
|
+
// src/components/PreviewCard/PreviewCard.tsx
|
|
2656
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
2657
|
+
function PreviewCardRoot({ as, variant = "default", className, ...rest }) {
|
|
2658
|
+
const Root = as ?? "div";
|
|
2659
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Root, { className: ["fds-preview-card", `fds-preview-card--${variant}`, className].filter(Boolean).join(" "), ...rest });
|
|
2660
|
+
}
|
|
2661
|
+
function PreviewCardPreview({ label, className, children, ...rest }) {
|
|
2662
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: ["fds-preview-card__preview", className].filter(Boolean).join(" "), ...rest, children: [
|
|
2663
|
+
label != null && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "fds-preview-card__label", children: label }),
|
|
2664
|
+
children
|
|
2665
|
+
] });
|
|
2666
|
+
}
|
|
2667
|
+
function PreviewCardTitle({ aside, className, children, ...rest }) {
|
|
2668
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: ["fds-preview-card__title", className].filter(Boolean).join(" "), ...rest, children: [
|
|
2669
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "fds-preview-card__name", children }),
|
|
2670
|
+
aside != null && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "fds-preview-card__aside", children: aside })
|
|
2671
|
+
] });
|
|
2672
|
+
}
|
|
2673
|
+
function part(name) {
|
|
2674
|
+
return function PreviewCardPart({ className, ...rest }) {
|
|
2675
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: [`fds-preview-card__${name}`, className].filter(Boolean).join(" "), ...rest });
|
|
2676
|
+
};
|
|
2677
|
+
}
|
|
2678
|
+
var PreviewCard = Object.assign(PreviewCardRoot, {
|
|
2679
|
+
Preview: PreviewCardPreview,
|
|
2680
|
+
Body: part("body"),
|
|
2681
|
+
Title: PreviewCardTitle,
|
|
2682
|
+
Meta: part("meta"),
|
|
2683
|
+
Footer: part("footer")
|
|
2684
|
+
});
|
|
2685
|
+
|
|
2686
|
+
// src/components/Tile/Tile.tsx
|
|
2687
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
2688
|
+
function Tile({ label, aside, className, children, ...rest }) {
|
|
2689
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("section", { className: ["fds-tile", className].filter(Boolean).join(" "), ...rest, children: [
|
|
2690
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("header", { className: "fds-tile__head", children: [
|
|
2691
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "fds-tile__label", children: label }),
|
|
2692
|
+
aside
|
|
2693
|
+
] }),
|
|
2694
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "fds-tile__body", children })
|
|
2695
|
+
] });
|
|
2696
|
+
}
|
|
2697
|
+
|
|
2698
|
+
// src/components/ListCard/ListCard.tsx
|
|
2699
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
2700
|
+
function ListCardRoot({ title, count, aside, footer, className, children, ...rest }) {
|
|
2701
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("section", { className: ["fds-list-card", className].filter(Boolean).join(" "), ...rest, children: [
|
|
2702
|
+
(title != null || aside != null) && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("header", { className: "fds-list-card__head", children: [
|
|
2703
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("span", { className: "fds-list-card__title", children: [
|
|
2704
|
+
title,
|
|
2705
|
+
count != null && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "fds-list-card__count", children: count })
|
|
2706
|
+
] }),
|
|
2707
|
+
aside != null && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "fds-list-card__aside", children: aside })
|
|
2708
|
+
] }),
|
|
2709
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("ul", { className: "fds-list-card__rows", children }),
|
|
2710
|
+
footer != null && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("footer", { className: "fds-list-card__footer", children: footer })
|
|
2711
|
+
] });
|
|
2712
|
+
}
|
|
2713
|
+
function ListCardRow({ icon, tone = "neutral", title, description, trailing, muted, className, ...rest }) {
|
|
2714
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("li", { className: ["fds-list-card__row", muted ? "fds-list-card__row--muted" : "", className].filter(Boolean).join(" "), ...rest, children: [
|
|
2715
|
+
icon != null && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: `fds-list-card__icon fds-list-card__icon--${tone}`, "aria-hidden": "true", children: icon }),
|
|
2716
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("span", { className: "fds-list-card__text", children: [
|
|
2717
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "fds-list-card__row-title", children: title }),
|
|
2718
|
+
description != null && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "fds-list-card__description", children: description })
|
|
2719
|
+
] }),
|
|
2720
|
+
trailing != null && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "fds-list-card__trailing", children: trailing })
|
|
2721
|
+
] });
|
|
2722
|
+
}
|
|
2723
|
+
var ListCard = Object.assign(ListCardRoot, { Row: ListCardRow });
|
|
2724
|
+
|
|
2725
|
+
// src/components/DescriptionList/DescriptionList.tsx
|
|
2726
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
2727
|
+
function DescriptionList({ title, action, items = [], note, className, children, ...rest }) {
|
|
2728
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("section", { className: ["fds-description-list", className].filter(Boolean).join(" "), ...rest, children: [
|
|
2729
|
+
(title != null || action != null) && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("header", { className: "fds-description-list__head", children: [
|
|
2730
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "fds-description-list__title", children: title }),
|
|
2731
|
+
action != null && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "fds-description-list__action", children: action })
|
|
2732
|
+
] }),
|
|
2733
|
+
items.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("dl", { className: "fds-description-list__items", children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "fds-description-list__item", children: [
|
|
2734
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("dt", { children: item.label }),
|
|
2735
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("dd", { children: item.value })
|
|
2736
|
+
] }, i)) }),
|
|
2737
|
+
children,
|
|
2738
|
+
note != null && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "fds-description-list__note", children: note })
|
|
2739
|
+
] });
|
|
2740
|
+
}
|
|
2741
|
+
|
|
2742
|
+
// src/components/ColorRamp/ColorRamp.tsx
|
|
2743
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
2744
|
+
function ColorRamp({ colors, size = "md", className, ...rest }) {
|
|
2745
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: ["fds-color-ramp", `fds-color-ramp--${size}`, className].filter(Boolean).join(" "), "aria-hidden": "true", ...rest, children: colors.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "fds-color-ramp__step", style: { "--fds-ramp-color": c } }, i)) });
|
|
2746
|
+
}
|
|
2747
|
+
|
|
2748
|
+
// src/components/SwatchList/SwatchList.tsx
|
|
2749
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
2750
|
+
function SwatchList({ items, className, ...rest }) {
|
|
2751
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("ul", { className: ["fds-swatch-list", className].filter(Boolean).join(" "), ...rest, children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("li", { className: "fds-swatch-list__item", children: [
|
|
2752
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
2753
|
+
"span",
|
|
2754
|
+
{
|
|
2755
|
+
className: ["fds-swatch-list__dot", item.color ? "" : "fds-swatch-list__dot--empty"].filter(Boolean).join(" "),
|
|
2756
|
+
style: item.color ? { "--fds-swatch-list-color": item.color } : void 0,
|
|
2757
|
+
"aria-hidden": "true"
|
|
2758
|
+
}
|
|
2759
|
+
),
|
|
2760
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "fds-swatch-list__name", children: item.name }),
|
|
2761
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "fds-swatch-list__value", children: item.value })
|
|
2762
|
+
] }, i)) });
|
|
2763
|
+
}
|
|
2764
|
+
|
|
2765
|
+
// src/components/TypeSpecimen/TypeSpecimen.tsx
|
|
2766
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
2767
|
+
var ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789";
|
|
2768
|
+
function TypeSpecimen({ family, fontFamily, tokens, sample, weights = [], footer, className, ...rest }) {
|
|
2769
|
+
const face = { "--fds-specimen-font": fontFamily };
|
|
2770
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("section", { className: ["fds-type-specimen", className].filter(Boolean).join(" "), style: face, ...rest, children: [
|
|
2771
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("header", { className: "fds-type-specimen__head", children: [
|
|
2772
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "fds-type-specimen__titles", children: [
|
|
2773
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("h3", { className: "fds-type-specimen__family", children: family }),
|
|
2774
|
+
tokens != null && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "fds-type-specimen__tokens", children: tokens })
|
|
2775
|
+
] }),
|
|
2776
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "fds-type-specimen__glyph", "aria-hidden": "true", children: "Aa" })
|
|
2777
|
+
] }),
|
|
2778
|
+
sample != null && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("p", { className: "fds-type-specimen__sample", children: sample }),
|
|
2779
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("p", { className: "fds-type-specimen__alphabet", children: ALPHABET }),
|
|
2780
|
+
weights.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("ul", { className: "fds-type-specimen__weights", children: weights.map((w) => /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("li", { children: [
|
|
2781
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { style: { fontWeight: w.weight }, children: "Ag" }),
|
|
2782
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("small", { children: w.label })
|
|
2783
|
+
] }, w.label)) }),
|
|
2784
|
+
footer != null && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("footer", { className: "fds-type-specimen__footer", children: footer })
|
|
2785
|
+
] });
|
|
2786
|
+
}
|
|
2787
|
+
function TypeSample({ fontFamily, caption, className, ...rest }) {
|
|
2788
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: ["fds-type-sample", className].filter(Boolean).join(" "), style: { "--fds-specimen-font": fontFamily }, ...rest, children: [
|
|
2789
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "fds-type-sample__glyph", "aria-hidden": "true", children: "Aa" }),
|
|
2790
|
+
caption != null && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "fds-type-sample__caption", children: caption })
|
|
2791
|
+
] });
|
|
2792
|
+
}
|
|
2793
|
+
|
|
2794
|
+
// src/components/TypeScale/TypeScale.tsx
|
|
2795
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
2796
|
+
function TypeScaleRoot({ className, ...rest }) {
|
|
2797
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("ul", { className: ["fds-type-scale", className].filter(Boolean).join(" "), ...rest });
|
|
2798
|
+
}
|
|
2799
|
+
function TypeScaleRow({ name, detail, sampleStyle, sample = "Check every pull request", className, ...rest }) {
|
|
2800
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("li", { className: ["fds-type-scale__row", className].filter(Boolean).join(" "), ...rest, children: [
|
|
2801
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("span", { className: "fds-type-scale__label", children: [
|
|
2802
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "fds-type-scale__name", children: name }),
|
|
2803
|
+
detail != null && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "fds-type-scale__detail", children: detail })
|
|
2804
|
+
] }),
|
|
2805
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "fds-type-scale__sample", style: sampleStyle, children: sample })
|
|
2806
|
+
] });
|
|
2807
|
+
}
|
|
2808
|
+
var TypeScale = Object.assign(TypeScaleRoot, { Row: TypeScaleRow });
|
|
2809
|
+
|
|
2810
|
+
// src/components/MeasureList/MeasureList.tsx
|
|
2811
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
2812
|
+
function MeasureList({ items, max, tone = "accent", className, ...rest }) {
|
|
2813
|
+
const top = max ?? Math.max(1, ...items.map((i) => i.amount));
|
|
2814
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("ul", { className: ["fds-measure-list", `fds-measure-list--${tone}`, className].filter(Boolean).join(" "), ...rest, children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("li", { className: "fds-measure-list__item", children: [
|
|
2815
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "fds-measure-list__name", children: item.name }),
|
|
2816
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "fds-measure-list__value", children: item.value }),
|
|
2817
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "fds-measure-list__track", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "fds-measure-list__bar", style: { "--fds-measure": `${Math.min(100, item.amount / top * 100)}%` } }) })
|
|
2818
|
+
] }, i)) });
|
|
2819
|
+
}
|
|
2820
|
+
|
|
2821
|
+
// src/components/TokenSample/TokenSample.tsx
|
|
2822
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
2823
|
+
function TokenSample({ kind, value, name, detail, className, ...rest }) {
|
|
2824
|
+
const style = { [kind === "radius" ? "--fds-sample-radius" : "--fds-sample-shadow"]: value };
|
|
2825
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: ["fds-token-sample", `fds-token-sample--${kind}`, className].filter(Boolean).join(" "), ...rest, children: [
|
|
2826
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "fds-token-sample__shape", style, "aria-hidden": "true" }),
|
|
2827
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "fds-token-sample__name", children: name }),
|
|
2828
|
+
detail != null && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "fds-token-sample__detail", children: detail })
|
|
2829
|
+
] });
|
|
2830
|
+
}
|
|
2831
|
+
|
|
2832
|
+
// src/components/EasingCurve/EasingCurve.tsx
|
|
2833
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
2834
|
+
var BEZIER = /cubic-bezier\(\s*([-\d.]+)\s*,\s*([-\d.]+)\s*,\s*([-\d.]+)\s*,\s*([-\d.]+)\s*\)/;
|
|
2835
|
+
var W = 120;
|
|
2836
|
+
var H = 72;
|
|
2837
|
+
var PAD = 12;
|
|
2838
|
+
function easingPath(value) {
|
|
2839
|
+
const m = BEZIER.exec(value);
|
|
2840
|
+
const [x1, y1, x2, y2] = m ? m.slice(1).map(Number) : [0, 0, 1, 1];
|
|
2841
|
+
const x = (t) => PAD + t * (W - PAD * 2);
|
|
2842
|
+
const y = (t) => H - PAD - t * (H - PAD * 2);
|
|
2843
|
+
return `M${x(0)},${y(0)} C${x(x1)},${y(y1)} ${x(x2)},${y(y2)} ${x(1)},${y(1)}`;
|
|
2844
|
+
}
|
|
2845
|
+
function EasingCurve({ value, name, className, ...rest }) {
|
|
2846
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: ["fds-easing-curve", className].filter(Boolean).join(" "), ...rest, children: [
|
|
2847
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("svg", { className: "fds-easing-curve__plot", viewBox: `0 0 ${W} ${H}`, "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("path", { d: easingPath(value) }) }),
|
|
2848
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "fds-easing-curve__name", children: name }),
|
|
2849
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "fds-easing-curve__value", children: value })
|
|
2850
|
+
] });
|
|
2851
|
+
}
|
|
2852
|
+
|
|
2853
|
+
// src/components/FilterChips/FilterChips.tsx
|
|
2854
|
+
var import_react27 = require("react");
|
|
2855
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
2856
|
+
function FilterChips({ options, value, onChange, "aria-label": ariaLabel, className }) {
|
|
2857
|
+
const refs = (0, import_react27.useRef)([]);
|
|
2858
|
+
const onKeyDown = (e, index) => {
|
|
2859
|
+
const step = e.key === "ArrowRight" || e.key === "ArrowDown" ? 1 : e.key === "ArrowLeft" || e.key === "ArrowUp" ? -1 : 0;
|
|
2860
|
+
if (!step) return;
|
|
2861
|
+
e.preventDefault();
|
|
2862
|
+
const next = (index + step + options.length) % options.length;
|
|
2863
|
+
onChange(options[next].value);
|
|
2864
|
+
refs.current[next]?.focus();
|
|
2865
|
+
};
|
|
2866
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { role: "radiogroup", "aria-label": ariaLabel, className: ["fds-filter-chips", className].filter(Boolean).join(" "), children: options.map((o, i) => {
|
|
2867
|
+
const selected = o.value === value;
|
|
2868
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
|
|
2869
|
+
"button",
|
|
2870
|
+
{
|
|
2871
|
+
ref: (el) => {
|
|
2872
|
+
refs.current[i] = el;
|
|
2873
|
+
},
|
|
2874
|
+
type: "button",
|
|
2875
|
+
role: "radio",
|
|
2876
|
+
"aria-checked": selected,
|
|
2877
|
+
tabIndex: selected ? 0 : -1,
|
|
2878
|
+
className: ["fds-filter-chips__chip", selected ? "fds-filter-chips__chip--selected" : ""].filter(Boolean).join(" "),
|
|
2879
|
+
onClick: () => onChange(o.value),
|
|
2880
|
+
onKeyDown: (e) => onKeyDown(e, i),
|
|
2881
|
+
children: [
|
|
2882
|
+
o.label,
|
|
2883
|
+
o.count != null && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "fds-filter-chips__count", children: o.count })
|
|
2884
|
+
]
|
|
2885
|
+
},
|
|
2886
|
+
o.value
|
|
2887
|
+
);
|
|
2888
|
+
}) });
|
|
2889
|
+
}
|
|
2890
|
+
|
|
2891
|
+
// src/components/Meter/Meter.tsx
|
|
2892
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
2893
|
+
function Meter({ value, max, label, className, ...rest }) {
|
|
2894
|
+
const pct = max > 0 ? Math.min(100, Math.max(0, value / max * 100)) : 0;
|
|
2895
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: ["fds-meter", className].filter(Boolean).join(" "), ...rest, children: [
|
|
2896
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
2897
|
+
"span",
|
|
2898
|
+
{
|
|
2899
|
+
className: "fds-meter__track",
|
|
2900
|
+
role: "meter",
|
|
2901
|
+
"aria-valuemin": 0,
|
|
2902
|
+
"aria-valuemax": max,
|
|
2903
|
+
"aria-valuenow": value,
|
|
2904
|
+
"aria-label": typeof label === "string" ? label : void 0,
|
|
2905
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "fds-meter__fill", style: { "--fds-meter": `${pct}%` } })
|
|
2906
|
+
}
|
|
2907
|
+
),
|
|
2908
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "fds-meter__label", children: label })
|
|
2909
|
+
] });
|
|
2910
|
+
}
|
|
2636
2911
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2637
2912
|
0 && (module.exports = {
|
|
2638
2913
|
Accordion,
|
|
@@ -2648,15 +2923,22 @@ var PageSkeleton = Object.assign(PageSkeletonRoot, {
|
|
|
2648
2923
|
Card,
|
|
2649
2924
|
Checkbox,
|
|
2650
2925
|
Checklist,
|
|
2926
|
+
ColorRamp,
|
|
2927
|
+
DescriptionList,
|
|
2651
2928
|
DiffPropertyList,
|
|
2652
2929
|
DiffSection,
|
|
2653
2930
|
Divider,
|
|
2654
2931
|
Drawer,
|
|
2932
|
+
EasingCurve,
|
|
2655
2933
|
EmptyState,
|
|
2934
|
+
FilterChips,
|
|
2656
2935
|
IconButton,
|
|
2657
2936
|
Input,
|
|
2937
|
+
ListCard,
|
|
2658
2938
|
ListLabel,
|
|
2939
|
+
MeasureList,
|
|
2659
2940
|
Menu,
|
|
2941
|
+
Meter,
|
|
2660
2942
|
MismatchCard,
|
|
2661
2943
|
Modal,
|
|
2662
2944
|
MultiSelect,
|
|
@@ -2666,6 +2948,7 @@ var PageSkeleton = Object.assign(PageSkeletonRoot, {
|
|
|
2666
2948
|
PageHeader,
|
|
2667
2949
|
PageSkeleton,
|
|
2668
2950
|
Pagination,
|
|
2951
|
+
PreviewCard,
|
|
2669
2952
|
PricingCard,
|
|
2670
2953
|
Radio,
|
|
2671
2954
|
RadioCard,
|
|
@@ -2687,13 +2970,19 @@ var PageSkeleton = Object.assign(PageSkeletonRoot, {
|
|
|
2687
2970
|
StepList,
|
|
2688
2971
|
Stepper,
|
|
2689
2972
|
Swatch,
|
|
2973
|
+
SwatchList,
|
|
2690
2974
|
TabNav,
|
|
2691
2975
|
Table,
|
|
2692
2976
|
Tag,
|
|
2977
|
+
Tile,
|
|
2693
2978
|
Toast,
|
|
2694
2979
|
ToastRegion,
|
|
2695
2980
|
Toggle,
|
|
2981
|
+
TokenSample,
|
|
2696
2982
|
Tooltip,
|
|
2983
|
+
TypeSample,
|
|
2984
|
+
TypeScale,
|
|
2985
|
+
TypeSpecimen,
|
|
2697
2986
|
WorkspaceAvatar,
|
|
2698
2987
|
WorkspaceSwitcher,
|
|
2699
2988
|
breakpoints,
|