@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/index.js
CHANGED
|
@@ -2299,13 +2299,17 @@ var AppLayout = Object.assign(AppLayoutRoot, { Panel: AppLayoutPanel });
|
|
|
2299
2299
|
|
|
2300
2300
|
// src/components/PageHeader/PageHeader.tsx
|
|
2301
2301
|
import { jsx as jsx47, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
2302
|
-
function PageHeader({ title, description, breadcrumb, actions, className, children, ...rest }) {
|
|
2302
|
+
function PageHeader({ title, description, leading, meta, breadcrumb, actions, className, children, ...rest }) {
|
|
2303
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 }),
|
|
2304
2305
|
/* @__PURE__ */ jsxs38("div", { className: "fds-page-header__row", children: [
|
|
2305
|
-
/* @__PURE__ */ jsxs38("div", { className: "fds-page-
|
|
2306
|
-
|
|
2307
|
-
/* @__PURE__ */
|
|
2308
|
-
|
|
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
|
+
] })
|
|
2309
2313
|
] }),
|
|
2310
2314
|
actions != null && /* @__PURE__ */ jsx47("div", { className: "fds-page-header__actions", children: actions })
|
|
2311
2315
|
] }),
|
|
@@ -2577,6 +2581,263 @@ var PageSkeleton = Object.assign(PageSkeletonRoot, {
|
|
|
2577
2581
|
Form: PageSkeletonForm,
|
|
2578
2582
|
Split: PageSkeletonSplit
|
|
2579
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 })
|
|
2839
|
+
] });
|
|
2840
|
+
}
|
|
2580
2841
|
export {
|
|
2581
2842
|
Accordion,
|
|
2582
2843
|
AppLayout,
|
|
@@ -2591,15 +2852,22 @@ export {
|
|
|
2591
2852
|
Card,
|
|
2592
2853
|
Checkbox,
|
|
2593
2854
|
Checklist,
|
|
2855
|
+
ColorRamp,
|
|
2856
|
+
DescriptionList,
|
|
2594
2857
|
DiffPropertyList,
|
|
2595
2858
|
DiffSection,
|
|
2596
2859
|
Divider,
|
|
2597
2860
|
Drawer,
|
|
2861
|
+
EasingCurve,
|
|
2598
2862
|
EmptyState,
|
|
2863
|
+
FilterChips,
|
|
2599
2864
|
IconButton,
|
|
2600
2865
|
Input,
|
|
2866
|
+
ListCard,
|
|
2601
2867
|
ListLabel,
|
|
2868
|
+
MeasureList,
|
|
2602
2869
|
Menu,
|
|
2870
|
+
Meter,
|
|
2603
2871
|
MismatchCard,
|
|
2604
2872
|
Modal,
|
|
2605
2873
|
MultiSelect,
|
|
@@ -2609,6 +2877,7 @@ export {
|
|
|
2609
2877
|
PageHeader,
|
|
2610
2878
|
PageSkeleton,
|
|
2611
2879
|
Pagination,
|
|
2880
|
+
PreviewCard,
|
|
2612
2881
|
PricingCard,
|
|
2613
2882
|
Radio,
|
|
2614
2883
|
RadioCard,
|
|
@@ -2630,13 +2899,19 @@ export {
|
|
|
2630
2899
|
StepList,
|
|
2631
2900
|
Stepper,
|
|
2632
2901
|
Swatch,
|
|
2902
|
+
SwatchList,
|
|
2633
2903
|
TabNav,
|
|
2634
2904
|
Table,
|
|
2635
2905
|
Tag,
|
|
2906
|
+
Tile,
|
|
2636
2907
|
Toast,
|
|
2637
2908
|
ToastRegion,
|
|
2638
2909
|
Toggle,
|
|
2910
|
+
TokenSample,
|
|
2639
2911
|
Tooltip,
|
|
2912
|
+
TypeSample,
|
|
2913
|
+
TypeScale,
|
|
2914
|
+
TypeSpecimen,
|
|
2640
2915
|
WorkspaceAvatar,
|
|
2641
2916
|
WorkspaceSwitcher,
|
|
2642
2917
|
breakpoints,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@usefidel/design-system",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.0",
|
|
4
4
|
"description": "Fidel brand design tokens + React component library — DTCG token source of truth, generated per-surface CSS + Tailwind-v4 parser-compatibility output, and on-brand React components (Button, MismatchCard, DiffSection).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -42,20 +42,25 @@
|
|
|
42
42
|
"typecheck": "tsc --noEmit",
|
|
43
43
|
"surface-check": "node build/surface-check.mjs",
|
|
44
44
|
"test": "node --test test/*.test.mjs",
|
|
45
|
-
"gitleaks": "gitleaks detect --no-banner --redact -v"
|
|
45
|
+
"gitleaks": "gitleaks detect --no-banner --redact -v",
|
|
46
|
+
"storybook": "storybook dev -p 6006",
|
|
47
|
+
"build-storybook": "storybook build -o storybook-static"
|
|
46
48
|
},
|
|
47
49
|
"peerDependencies": {
|
|
48
50
|
"react": ">=18",
|
|
49
51
|
"react-dom": ">=18"
|
|
50
52
|
},
|
|
51
53
|
"devDependencies": {
|
|
54
|
+
"@storybook/react-vite": "10.6.2",
|
|
52
55
|
"@types/react": "^18.3.12",
|
|
53
56
|
"@types/react-dom": "^18.3.1",
|
|
54
57
|
"react": "^18.3.1",
|
|
55
58
|
"react-dom": "^18.3.1",
|
|
59
|
+
"storybook": "10.6.2",
|
|
56
60
|
"style-dictionary": "^4.3.0",
|
|
57
61
|
"tsup": "^8.3.5",
|
|
58
|
-
"typescript": "^5.6.3"
|
|
62
|
+
"typescript": "^5.6.3",
|
|
63
|
+
"vite": "8.3.4"
|
|
59
64
|
},
|
|
60
65
|
"dependencies": {
|
|
61
66
|
"lucide-react": "^1.33.0"
|