@catiarodrigues/goldfinch 1.0.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/LICENSE +15 -0
- package/README.md +119 -0
- package/dist/alert-Iba34Kfr.js +72 -0
- package/dist/badge-dMKK_Gm2.js +147 -0
- package/dist/breadcrumbs-CHev-E0K.js +148 -0
- package/dist/button-DDhP5P56.js +40 -0
- package/dist/card-CVUWZOar.js +42 -0
- package/dist/checkbox-BubMDtGW.js +149 -0
- package/dist/collapsible-Bk5IP_KI.js +55 -0
- package/dist/components/alert.mjs +2 -0
- package/dist/components/badge.mjs +2 -0
- package/dist/components/breadcrumbs.mjs +2 -0
- package/dist/components/button.mjs +2 -0
- package/dist/components/card.mjs +2 -0
- package/dist/components/checkbox.mjs +2 -0
- package/dist/components/collapsible.mjs +2 -0
- package/dist/components/copy-to-clipboard.mjs +2 -0
- package/dist/components/dropdown.mjs +2 -0
- package/dist/components/empty-state.mjs +2 -0
- package/dist/components/field.mjs +2 -0
- package/dist/components/grid.mjs +2 -0
- package/dist/components/input-group.mjs +2 -0
- package/dist/components/input.mjs +4 -0
- package/dist/components/label.mjs +2 -0
- package/dist/components/link.mjs +58 -0
- package/dist/components/menubar.mjs +2 -0
- package/dist/components/modal.mjs +2 -0
- package/dist/components/page.mjs +2 -0
- package/dist/components/pagination.mjs +2 -0
- package/dist/components/popover.mjs +2 -0
- package/dist/components/progress.mjs +2 -0
- package/dist/components/radio.mjs +2 -0
- package/dist/components/select.mjs +2 -0
- package/dist/components/sensitive-input.mjs +2 -0
- package/dist/components/sidebar.mjs +2 -0
- package/dist/components/spinner.mjs +3 -0
- package/dist/components/table-of-contents.mjs +2 -0
- package/dist/components/table.mjs +2 -0
- package/dist/components/tabs.mjs +2 -0
- package/dist/components/text.mjs +2 -0
- package/dist/components/toast.mjs +2 -0
- package/dist/components/toggle.mjs +2 -0
- package/dist/components/toolbar.mjs +2 -0
- package/dist/components/tooltip.mjs +2 -0
- package/dist/components/top-navigation.mjs +2 -0
- package/dist/copy-to-clipboard-KXU8jo6k.js +139 -0
- package/dist/dropdown-A5hLlUjr.js +172 -0
- package/dist/empty-state-DuugAIN_.js +76 -0
- package/dist/field-CZb7PLTY.js +47 -0
- package/dist/grid-BFkQ5cmR.js +101 -0
- package/dist/index.mjs +47 -0
- package/dist/input-6C_-SelY.js +48 -0
- package/dist/input-Bo8XL6_f.js +43 -0
- package/dist/input-group-Dm4hKEhq.js +302 -0
- package/dist/input-variants-CZevxTd8.js +41 -0
- package/dist/label-7oCakbyx.js +43 -0
- package/dist/link-provider-H0J4aZPH.js +21 -0
- package/dist/menubar-DyXmaeKZ.js +59 -0
- package/dist/modal-BYQ8MRMy.js +132 -0
- package/dist/page-DOevDFqd.js +60 -0
- package/dist/pagination-C3f16UOC.js +239 -0
- package/dist/popover-3kcRy9HX.js +120 -0
- package/dist/portal-provider-CWX8j9O1.js +15 -0
- package/dist/progress-Ac96hU_C.js +26 -0
- package/dist/radio-C8rcmsbS.js +144 -0
- package/dist/resolve-variant-DWiDeQhX.js +7 -0
- package/dist/select-DaJRanrs.js +178 -0
- package/dist/sensitive-input-BEAOu1A6.js +181 -0
- package/dist/sidebar-CkZxFt33.js +703 -0
- package/dist/skeleton-line-Dh4TDbeq.js +32 -0
- package/dist/spinner-DKzSES7b.js +79 -0
- package/dist/src/components/alert/alert.d.ts +105 -0
- package/dist/src/components/alert/index.d.ts +1 -0
- package/dist/src/components/badge/badge.d.ts +204 -0
- package/dist/src/components/badge/index.d.ts +1 -0
- package/dist/src/components/breadcrumbs/breadcrumbs.d.ts +94 -0
- package/dist/src/components/breadcrumbs/index.d.ts +1 -0
- package/dist/src/components/button/button.d.ts +37 -0
- package/dist/src/components/button/index.d.ts +2 -0
- package/dist/src/components/card/card.d.ts +31 -0
- package/dist/src/components/card/index.d.ts +1 -0
- package/dist/src/components/checkbox/checkbox.d.ts +196 -0
- package/dist/src/components/checkbox/index.d.ts +1 -0
- package/dist/src/components/collapsible/collapsible.d.ts +108 -0
- package/dist/src/components/collapsible/index.d.ts +1 -0
- package/dist/src/components/copy-to-clipboard/copy-to-clipboard.d.ts +86 -0
- package/dist/src/components/copy-to-clipboard/index.d.ts +1 -0
- package/dist/src/components/dropdown/dropdown.d.ts +115 -0
- package/dist/src/components/dropdown/index.d.ts +1 -0
- package/dist/src/components/empty-state/empty-state.d.ts +68 -0
- package/dist/src/components/empty-state/index.d.ts +1 -0
- package/dist/src/components/field/field.d.ts +88 -0
- package/dist/src/components/field/index.d.ts +1 -0
- package/dist/src/components/grid/grid.d.ts +134 -0
- package/dist/src/components/grid/index.d.ts +1 -0
- package/dist/src/components/input/index.d.ts +30 -0
- package/dist/src/components/input/input-area.d.ts +64 -0
- package/dist/src/components/input/input-variants.d.ts +58 -0
- package/dist/src/components/input/input.d.ts +67 -0
- package/dist/src/components/input-group/context.d.ts +95 -0
- package/dist/src/components/input-group/index.d.ts +1 -0
- package/dist/src/components/input-group/input-group-addon.d.ts +14 -0
- package/dist/src/components/input-group/input-group-button.d.ts +35 -0
- package/dist/src/components/input-group/input-group-input.d.ts +8 -0
- package/dist/src/components/input-group/input-group-suffix.d.ts +12 -0
- package/dist/src/components/input-group/input-group.d.ts +42 -0
- package/dist/src/components/label/index.d.ts +1 -0
- package/dist/src/components/label/label.d.ts +66 -0
- package/dist/src/components/link/index.d.ts +1 -0
- package/dist/src/components/link/link.d.ts +65 -0
- package/dist/src/components/menubar/index.d.ts +2 -0
- package/dist/src/components/menubar/menubar.d.ts +65 -0
- package/dist/src/components/menubar/use-menu-navigation.d.ts +7 -0
- package/dist/src/components/modal/index.d.ts +1 -0
- package/dist/src/components/modal/modal.d.ts +204 -0
- package/dist/src/components/page/index.d.ts +1 -0
- package/dist/src/components/page/page.d.ts +65 -0
- package/dist/src/components/pagination/index.d.ts +1 -0
- package/dist/src/components/pagination/pagination.d.ts +240 -0
- package/dist/src/components/popover/index.d.ts +2 -0
- package/dist/src/components/popover/popover.d.ts +177 -0
- package/dist/src/components/progress/index.d.ts +1 -0
- package/dist/src/components/progress/progress.d.ts +43 -0
- package/dist/src/components/radio/index.d.ts +1 -0
- package/dist/src/components/radio/radio.d.ts +276 -0
- package/dist/src/components/select/index.d.ts +1 -0
- package/dist/src/components/select/select.d.ts +283 -0
- package/dist/src/components/sensitive-input/index.d.ts +1 -0
- package/dist/src/components/sensitive-input/sensitive-input.d.ts +93 -0
- package/dist/src/components/sidebar/index.d.ts +1 -0
- package/dist/src/components/sidebar/sidebar.d.ts +579 -0
- package/dist/src/components/spinner/index.d.ts +2 -0
- package/dist/src/components/spinner/skeleton-line.d.ts +11 -0
- package/dist/src/components/spinner/spinner.d.ts +69 -0
- package/dist/src/components/table/index.d.ts +1 -0
- package/dist/src/components/table/table.d.ts +137 -0
- package/dist/src/components/table-of-contents/index.d.ts +1 -0
- package/dist/src/components/table-of-contents/table-of-contents.d.ts +71 -0
- package/dist/src/components/tabs/index.d.ts +2 -0
- package/dist/src/components/tabs/tabs.d.ts +115 -0
- package/dist/src/components/text/index.d.ts +1 -0
- package/dist/src/components/text/text.d.ts +213 -0
- package/dist/src/components/toast/index.d.ts +4 -0
- package/dist/src/components/toast/toast.d.ts +196 -0
- package/dist/src/components/toggle/index.d.ts +1 -0
- package/dist/src/components/toggle/toggle.d.ts +101 -0
- package/dist/src/components/toolbar/index.d.ts +1 -0
- package/dist/src/components/toolbar/toolbar.d.ts +49 -0
- package/dist/src/components/tooltip/index.d.ts +1 -0
- package/dist/src/components/tooltip/tooltip.d.ts +107 -0
- package/dist/src/components/top-navigation/index.d.ts +1 -0
- package/dist/src/components/top-navigation/top-navigation.d.ts +47 -0
- package/dist/src/index.d.ts +67 -0
- package/dist/src/utils/cn.d.ts +3 -0
- package/dist/src/utils/index.d.ts +4 -0
- package/dist/src/utils/link-provider.d.ts +11 -0
- package/dist/src/utils/portal-provider.d.ts +7 -0
- package/dist/src/utils/resolve-variant.d.ts +1 -0
- package/dist/styles/index.css +294 -0
- package/dist/table-CKmEd0O5.js +135 -0
- package/dist/table-of-contents-CuE1aDKE.js +91 -0
- package/dist/tabs-JX7xyFcA.js +101 -0
- package/dist/text-B0EvLge5.js +88 -0
- package/dist/toast-pSr7cFVU.js +274 -0
- package/dist/toggle-C72Skv4q.js +179 -0
- package/dist/toolbar-DtT4MUHB.js +109 -0
- package/dist/tooltip-QfSb4wnI.js +59 -0
- package/dist/top-navigation-DoTeFaXD.js +45 -0
- package/dist/utils.mjs +11 -0
- package/package.json +228 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { cn as e } from "./utils.mjs";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import { useMemo as n } from "react";
|
|
4
|
+
//#region src/components/spinner/skeleton-line.tsx
|
|
5
|
+
var r = (e, t) => Math.floor(Math.random() * (t - e + 1) + e), i = (e, t) => (Math.random() * (t - e) + e).toFixed(2), a = ({ minWidth: a = 30, maxWidth: o = 100, minDuration: s = 1.3, maxDuration: c = 1.7, minDelay: l = 0, maxDelay: u = .5, blockHeight: d, className: f }) => {
|
|
6
|
+
let { width: p, duration: m, delay: h } = n(() => ({
|
|
7
|
+
width: r(a, o),
|
|
8
|
+
duration: i(s, c),
|
|
9
|
+
delay: i(l, u)
|
|
10
|
+
}), [
|
|
11
|
+
a,
|
|
12
|
+
o,
|
|
13
|
+
s,
|
|
14
|
+
c,
|
|
15
|
+
l,
|
|
16
|
+
u
|
|
17
|
+
]), g = {
|
|
18
|
+
"--skeleton-width": `${p}%`,
|
|
19
|
+
"--shimmer-duration": `${m}s`,
|
|
20
|
+
"--shimmer-delay": `${h}s`
|
|
21
|
+
}, _ = /* @__PURE__ */ t("div", {
|
|
22
|
+
className: e("skeleton-line", f),
|
|
23
|
+
style: g
|
|
24
|
+
});
|
|
25
|
+
return d === void 0 ? _ : /* @__PURE__ */ t("div", {
|
|
26
|
+
className: "flex items-center",
|
|
27
|
+
style: { height: typeof d == "number" ? `${d}px` : d },
|
|
28
|
+
children: _
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
//#endregion
|
|
32
|
+
export { a as t };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { t as e } from "./resolve-variant-DWiDeQhX.js";
|
|
2
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/spinner/spinner.tsx
|
|
4
|
+
var r = { size: {
|
|
5
|
+
sm: {
|
|
6
|
+
value: 16,
|
|
7
|
+
description: "Small spinner for inline use"
|
|
8
|
+
},
|
|
9
|
+
base: {
|
|
10
|
+
value: 24,
|
|
11
|
+
description: "Default spinner size"
|
|
12
|
+
},
|
|
13
|
+
lg: {
|
|
14
|
+
value: 32,
|
|
15
|
+
description: "Large spinner for prominent loading states"
|
|
16
|
+
}
|
|
17
|
+
} }, i = { size: "base" };
|
|
18
|
+
function a({ size: t = i.size } = {}) {
|
|
19
|
+
return typeof t == "number" ? t : e(r.size, t, i.size).value;
|
|
20
|
+
}
|
|
21
|
+
var o = ({ className: e, size: r = i.size, "aria-label": o = "Loading" }) => {
|
|
22
|
+
let s = a({ size: r });
|
|
23
|
+
return /* @__PURE__ */ n("svg", {
|
|
24
|
+
width: "24",
|
|
25
|
+
height: "24",
|
|
26
|
+
viewBox: "0 0 24 24",
|
|
27
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
28
|
+
stroke: "currentColor",
|
|
29
|
+
className: e,
|
|
30
|
+
style: {
|
|
31
|
+
height: s,
|
|
32
|
+
width: s
|
|
33
|
+
},
|
|
34
|
+
role: "status",
|
|
35
|
+
"aria-label": o,
|
|
36
|
+
children: [/* @__PURE__ */ n("circle", {
|
|
37
|
+
cx: "12",
|
|
38
|
+
cy: "12",
|
|
39
|
+
r: "9.5",
|
|
40
|
+
fill: "none",
|
|
41
|
+
strokeWidth: "2",
|
|
42
|
+
strokeLinecap: "round",
|
|
43
|
+
children: [
|
|
44
|
+
/* @__PURE__ */ t("animateTransform", {
|
|
45
|
+
attributeName: "transform",
|
|
46
|
+
type: "rotate",
|
|
47
|
+
from: "0 12 12",
|
|
48
|
+
to: "360 12 12",
|
|
49
|
+
dur: "2s",
|
|
50
|
+
repeatCount: "indefinite"
|
|
51
|
+
}),
|
|
52
|
+
/* @__PURE__ */ t("animate", {
|
|
53
|
+
attributeName: "stroke-dasharray",
|
|
54
|
+
values: "0 150;42 150;42 150",
|
|
55
|
+
keyTimes: "0;0.5;1",
|
|
56
|
+
dur: "1.5s",
|
|
57
|
+
repeatCount: "indefinite"
|
|
58
|
+
}),
|
|
59
|
+
/* @__PURE__ */ t("animate", {
|
|
60
|
+
attributeName: "stroke-dashoffset",
|
|
61
|
+
values: "0;-16;-59",
|
|
62
|
+
keyTimes: "0;0.5;1",
|
|
63
|
+
dur: "1.5s",
|
|
64
|
+
repeatCount: "indefinite"
|
|
65
|
+
})
|
|
66
|
+
]
|
|
67
|
+
}), /* @__PURE__ */ t("circle", {
|
|
68
|
+
cx: "12",
|
|
69
|
+
cy: "12",
|
|
70
|
+
r: "9.5",
|
|
71
|
+
fill: "none",
|
|
72
|
+
opacity: .1,
|
|
73
|
+
strokeWidth: "2",
|
|
74
|
+
strokeLinecap: "round"
|
|
75
|
+
})]
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
//#endregion
|
|
79
|
+
export { o as t };
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
/** Base styles applied to all alert variants. */
|
|
3
|
+
export declare const GOLDFINCH_ALERT_BASE_STYLES = "flex w-full items-start gap-3 rounded-lg px-4 py-3 text-base";
|
|
4
|
+
/** Alert variant definitions mapping style options to their Tailwind classes and descriptions. */
|
|
5
|
+
export declare const GOLDFINCH_ALERT_VARIANTS: {
|
|
6
|
+
readonly variant: {
|
|
7
|
+
readonly default: {
|
|
8
|
+
readonly classes: "bg-goldfinch-banner-info text-goldfinch-info";
|
|
9
|
+
readonly iconClasses: "text-goldfinch-info";
|
|
10
|
+
readonly description: "Informational alert for general messages";
|
|
11
|
+
};
|
|
12
|
+
readonly alert: {
|
|
13
|
+
readonly classes: "bg-goldfinch-banner-warning text-goldfinch-warning";
|
|
14
|
+
readonly iconClasses: "text-goldfinch-warning";
|
|
15
|
+
readonly description: "Warning alert for cautionary messages";
|
|
16
|
+
};
|
|
17
|
+
readonly error: {
|
|
18
|
+
readonly classes: "bg-goldfinch-danger-tint/60 text-goldfinch-danger";
|
|
19
|
+
readonly iconClasses: "text-goldfinch-danger";
|
|
20
|
+
readonly description: "Error alert for critical issues";
|
|
21
|
+
};
|
|
22
|
+
readonly secondary: {
|
|
23
|
+
readonly classes: "bg-goldfinch-contrast/5 text-goldfinch-subtle";
|
|
24
|
+
readonly iconClasses: "text-goldfinch-subtle";
|
|
25
|
+
readonly description: "Neutral alert for secondary messages";
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export declare const GOLDFINCH_ALERT_DEFAULT_VARIANTS: {
|
|
30
|
+
readonly variant: "default";
|
|
31
|
+
};
|
|
32
|
+
export type GoldfinchAlertVariant = keyof typeof GOLDFINCH_ALERT_VARIANTS.variant;
|
|
33
|
+
export interface GoldfinchAlertVariantsProps {
|
|
34
|
+
/**
|
|
35
|
+
* Visual style of the alert.
|
|
36
|
+
* - `"default"` — Informational alert for general messages
|
|
37
|
+
* - `"alert"` — Warning alert for cautionary messages
|
|
38
|
+
* - `"error"` — Error alert for critical issues
|
|
39
|
+
* - `"secondary"` — Neutral alert for secondary messages
|
|
40
|
+
* @default "default"
|
|
41
|
+
*/
|
|
42
|
+
variant?: GoldfinchAlertVariant;
|
|
43
|
+
}
|
|
44
|
+
export declare function alertVariants({ variant, }?: GoldfinchAlertVariantsProps): string;
|
|
45
|
+
export declare enum AlertVariant {
|
|
46
|
+
DEFAULT = 0,
|
|
47
|
+
ALERT = 1,
|
|
48
|
+
ERROR = 2
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Alert component props.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```tsx
|
|
55
|
+
* <Alert title="Update available" description="A new version is ready to install." />
|
|
56
|
+
* <Alert variant="alert" title="Session expiring" description="Your session will expire soon." />
|
|
57
|
+
* <Alert variant="error" title="Save failed" description="We couldn't save your changes." />
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
export interface AlertProps extends Omit<HTMLAttributes<HTMLDivElement>, "children" | "title"> {
|
|
61
|
+
/** Icon element rendered before the alert content (e.g. from `@phosphor-icons/react`). */
|
|
62
|
+
icon?: ReactNode;
|
|
63
|
+
/** Primary heading text for the alert. Use for i18n string injection. */
|
|
64
|
+
title?: string;
|
|
65
|
+
/** Secondary description text displayed below the title. Use for i18n string injection. */
|
|
66
|
+
description?: ReactNode;
|
|
67
|
+
/** Action slot rendered at the trailing end of the alert (e.g. a CTA button or link). Only used in structured mode (with `title` or `description`). */
|
|
68
|
+
action?: ReactNode;
|
|
69
|
+
/** @deprecated Use `title` and `description` instead. Will be removed in a future major version. */
|
|
70
|
+
text?: string;
|
|
71
|
+
/** @deprecated Use `title` and `description` instead for better i18n support. */
|
|
72
|
+
children?: ReactNode;
|
|
73
|
+
/**
|
|
74
|
+
* Visual style of the alert.
|
|
75
|
+
* - `"default"` — Informational blue alert for general messages
|
|
76
|
+
* - `"alert"` — Warning yellow alert for cautionary messages
|
|
77
|
+
* - `"error"` — Error red alert for critical issues
|
|
78
|
+
* - `"secondary"` — Neutral alert for secondary messages
|
|
79
|
+
* @default "default"
|
|
80
|
+
*/
|
|
81
|
+
variant?: GoldfinchAlertVariant;
|
|
82
|
+
/** Additional CSS classes merged via `cn()`. */
|
|
83
|
+
className?: string;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Full-width message bar for informational, warning, or error notices.
|
|
87
|
+
* Supports structured title/description for i18n, or simple children for basic usage.
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* ```tsx
|
|
91
|
+
* // Structured (recommended for i18n)
|
|
92
|
+
* <Alert
|
|
93
|
+
* variant="alert"
|
|
94
|
+
* icon={<WarningCircle />}
|
|
95
|
+
* title="Review required"
|
|
96
|
+
* description="Please review your billing information."
|
|
97
|
+
* />
|
|
98
|
+
*
|
|
99
|
+
* // Simple (backwards compatible)
|
|
100
|
+
* <Alert variant="alert" icon={<WarningCircle />}>
|
|
101
|
+
* Review your billing information.
|
|
102
|
+
* </Alert>
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
export declare const Alert: import('react').ForwardRefExoticComponent<AlertProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Alert, AlertVariant } from './alert';
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/** Base styles applied to all badge variants. */
|
|
3
|
+
export declare const GOLDFINCH_BADGE_BASE_STYLES = "inline-flex w-fit flex-none shrink-0 items-center justify-self-start rounded-full font-medium whitespace-nowrap";
|
|
4
|
+
/** Badge variant definitions mapping variant names to their Tailwind classes and descriptions. */
|
|
5
|
+
export declare const GOLDFINCH_BADGE_VARIANTS: {
|
|
6
|
+
readonly variant: {
|
|
7
|
+
/** Semantic token badges */
|
|
8
|
+
readonly primary: {
|
|
9
|
+
readonly classes: "bg-goldfinch-badge-inverted text-goldfinch-badge-inverted";
|
|
10
|
+
readonly description: "Primary badge";
|
|
11
|
+
};
|
|
12
|
+
readonly secondary: {
|
|
13
|
+
readonly classes: "bg-goldfinch-fill text-goldfinch-badge-neutral-subtle";
|
|
14
|
+
readonly description: "Secondary badge";
|
|
15
|
+
};
|
|
16
|
+
readonly error: {
|
|
17
|
+
readonly classes: "bg-goldfinch-danger-tint/60 text-goldfinch-danger";
|
|
18
|
+
readonly description: "Error badge";
|
|
19
|
+
};
|
|
20
|
+
readonly warning: {
|
|
21
|
+
readonly classes: "bg-goldfinch-warning-tint/70 text-goldfinch-warning";
|
|
22
|
+
readonly description: "Warning badge";
|
|
23
|
+
};
|
|
24
|
+
readonly success: {
|
|
25
|
+
readonly classes: "bg-goldfinch-success-tint/70 text-goldfinch-success";
|
|
26
|
+
readonly description: "Success badge";
|
|
27
|
+
};
|
|
28
|
+
readonly destructive: {
|
|
29
|
+
readonly classes: "bg-goldfinch-badge-red text-white";
|
|
30
|
+
readonly description: "Deprecated. Use red instead.";
|
|
31
|
+
};
|
|
32
|
+
readonly info: {
|
|
33
|
+
readonly classes: "bg-goldfinch-info-tint/70 text-goldfinch-info";
|
|
34
|
+
readonly description: "Info badge";
|
|
35
|
+
};
|
|
36
|
+
readonly beta: {
|
|
37
|
+
readonly classes: "border border-dashed border-goldfinch-brand bg-transparent text-goldfinch-link";
|
|
38
|
+
readonly description: "Indicates beta or experimental features";
|
|
39
|
+
};
|
|
40
|
+
readonly outline: {
|
|
41
|
+
readonly classes: "border border-goldfinch-fill bg-transparent text-goldfinch-default";
|
|
42
|
+
readonly description: "Bordered badge with transparent background";
|
|
43
|
+
};
|
|
44
|
+
/** Other color token variants */
|
|
45
|
+
readonly red: {
|
|
46
|
+
readonly classes: "bg-goldfinch-badge-red text-white";
|
|
47
|
+
readonly description: "Red badge";
|
|
48
|
+
};
|
|
49
|
+
readonly green: {
|
|
50
|
+
readonly classes: "bg-goldfinch-badge-green text-white";
|
|
51
|
+
readonly description: "Green badge";
|
|
52
|
+
};
|
|
53
|
+
readonly neutral: {
|
|
54
|
+
readonly classes: "bg-goldfinch-badge-neutral text-white";
|
|
55
|
+
readonly description: "Neutral badge";
|
|
56
|
+
};
|
|
57
|
+
readonly orange: {
|
|
58
|
+
readonly classes: "bg-goldfinch-badge-orange text-black";
|
|
59
|
+
readonly description: "Orange badge";
|
|
60
|
+
};
|
|
61
|
+
readonly purple: {
|
|
62
|
+
readonly classes: "bg-goldfinch-badge-purple text-white";
|
|
63
|
+
readonly description: "Purple badge";
|
|
64
|
+
};
|
|
65
|
+
readonly teal: {
|
|
66
|
+
readonly classes: "bg-goldfinch-badge-teal text-white";
|
|
67
|
+
readonly description: "Teal badge";
|
|
68
|
+
};
|
|
69
|
+
readonly "teal-subtle": {
|
|
70
|
+
readonly classes: "bg-goldfinch-badge-teal-subtle text-goldfinch-badge-teal-subtle";
|
|
71
|
+
readonly description: "Subtle teal badge";
|
|
72
|
+
};
|
|
73
|
+
readonly blue: {
|
|
74
|
+
readonly classes: "bg-goldfinch-badge-blue text-white";
|
|
75
|
+
readonly description: "Blue badge";
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
readonly appearance: {
|
|
79
|
+
readonly filled: {
|
|
80
|
+
readonly classes: "";
|
|
81
|
+
readonly description: "Filled badge with background color (default)";
|
|
82
|
+
};
|
|
83
|
+
readonly dot: {
|
|
84
|
+
readonly classes: "gap-1.5 bg-transparent text-goldfinch-default ring ring-goldfinch-hairline";
|
|
85
|
+
readonly description: "Outlined badge with a colored circle dot indicating status";
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
readonly size: {
|
|
89
|
+
readonly sm: {
|
|
90
|
+
readonly classes: "text-xs px-1.5 py-0.5";
|
|
91
|
+
readonly description: "Small badge";
|
|
92
|
+
};
|
|
93
|
+
readonly md: {
|
|
94
|
+
readonly classes: "text-sm px-2.5 py-0.5";
|
|
95
|
+
readonly description: "Medium badge (default)";
|
|
96
|
+
};
|
|
97
|
+
readonly lg: {
|
|
98
|
+
readonly classes: "text-base px-3 py-1";
|
|
99
|
+
readonly description: "Large badge";
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
readonly dotColor: {
|
|
103
|
+
readonly none: {
|
|
104
|
+
readonly classes: "";
|
|
105
|
+
readonly description: "No dot indicator (used when appearance is not dot, or variant has no dot color)";
|
|
106
|
+
};
|
|
107
|
+
readonly success: {
|
|
108
|
+
readonly classes: "bg-goldfinch-success";
|
|
109
|
+
readonly description: "Green dot for success status";
|
|
110
|
+
};
|
|
111
|
+
readonly warning: {
|
|
112
|
+
readonly classes: "bg-goldfinch-badge-orange";
|
|
113
|
+
readonly description: "Orange dot for warning status";
|
|
114
|
+
};
|
|
115
|
+
readonly error: {
|
|
116
|
+
readonly classes: "bg-goldfinch-badge-red";
|
|
117
|
+
readonly description: "Red dot for error status";
|
|
118
|
+
};
|
|
119
|
+
readonly neutral: {
|
|
120
|
+
readonly classes: "bg-goldfinch-badge-neutral";
|
|
121
|
+
readonly description: "Neutral dot for informational status";
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
export declare const GOLDFINCH_BADGE_DEFAULT_VARIANTS: {
|
|
126
|
+
readonly variant: "primary";
|
|
127
|
+
readonly appearance: "filled";
|
|
128
|
+
readonly size: "md";
|
|
129
|
+
readonly dotColor: "none";
|
|
130
|
+
};
|
|
131
|
+
export type GoldfinchBadgeVariant = keyof typeof GOLDFINCH_BADGE_VARIANTS.variant;
|
|
132
|
+
export type GoldfinchBadgeAppearance = keyof typeof GOLDFINCH_BADGE_VARIANTS.appearance;
|
|
133
|
+
export type GoldfinchBadgeSize = keyof typeof GOLDFINCH_BADGE_VARIANTS.size;
|
|
134
|
+
export type GoldfinchBadgeDotColor = keyof typeof GOLDFINCH_BADGE_VARIANTS.dotColor;
|
|
135
|
+
export interface GoldfinchBadgeVariantsProps {
|
|
136
|
+
variant?: GoldfinchBadgeVariant;
|
|
137
|
+
appearance?: GoldfinchBadgeAppearance;
|
|
138
|
+
size?: GoldfinchBadgeSize;
|
|
139
|
+
}
|
|
140
|
+
export declare function badgeVariants({ variant, appearance, size, }?: GoldfinchBadgeVariantsProps): string;
|
|
141
|
+
export type BadgeVariant = GoldfinchBadgeVariant;
|
|
142
|
+
/**
|
|
143
|
+
* Badge component props.
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* ```tsx
|
|
147
|
+
* <Badge variant="green">Active</Badge>
|
|
148
|
+
* <Badge variant="red">Error</Badge>
|
|
149
|
+
* <Badge variant="neutral">Inactive</Badge>
|
|
150
|
+
* <Badge variant="success" appearance="dot">Healthy</Badge>
|
|
151
|
+
* ```
|
|
152
|
+
*/
|
|
153
|
+
export interface BadgeProps {
|
|
154
|
+
/**
|
|
155
|
+
* Color variant of the badge.
|
|
156
|
+
* Recommended semantic variants:
|
|
157
|
+
* - `"primary"` — Primary badge
|
|
158
|
+
* - `"secondary"` — Secondary badge
|
|
159
|
+
* - `"error"` — Error badge
|
|
160
|
+
* - `"warning"` — Warning badge
|
|
161
|
+
* - `"success"` — Success badge
|
|
162
|
+
* - `"info"` — Info badge
|
|
163
|
+
*
|
|
164
|
+
* Additional token variants:
|
|
165
|
+
* - `"red"`, `"orange"`, `"green"`, `"teal"`, `"blue"`, `"purple"`, `"neutral"`
|
|
166
|
+
* - `"teal-subtle"`, `"neutral-subtle"`
|
|
167
|
+
* - `"inverted"`
|
|
168
|
+
* - `"outline"` — Bordered badge with transparent background
|
|
169
|
+
* - `"beta"` — Dashed-border badge for beta/experimental features
|
|
170
|
+
* @default "primary"
|
|
171
|
+
*/
|
|
172
|
+
variant?: GoldfinchBadgeVariant;
|
|
173
|
+
/**
|
|
174
|
+
* Visual appearance of the badge.
|
|
175
|
+
* - `"filled"` — Filled background using the variant color (default)
|
|
176
|
+
* - `"dot"` — Outlined badge with a colored circle dot. Only `success`,
|
|
177
|
+
* `warning`, `error`, and `neutral` variants show a dot; other variants
|
|
178
|
+
* render the badge without a dot.
|
|
179
|
+
* @default "filled"
|
|
180
|
+
*/
|
|
181
|
+
appearance?: GoldfinchBadgeAppearance;
|
|
182
|
+
/**
|
|
183
|
+
* Size of the badge.
|
|
184
|
+
* - `"sm"` — Extra small, ideal for inline placement near text or icons
|
|
185
|
+
* - `"md"` — Default medium size
|
|
186
|
+
* - `"lg"` — Large badge for standalone display
|
|
187
|
+
* @default "md"
|
|
188
|
+
*/
|
|
189
|
+
size?: GoldfinchBadgeSize;
|
|
190
|
+
/** Additional CSS classes merged via `cn()`. */
|
|
191
|
+
className?: string;
|
|
192
|
+
/** Content rendered inside the badge. */
|
|
193
|
+
children: ReactNode;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Small status label for categorizing or highlighting content.
|
|
197
|
+
*
|
|
198
|
+
* @example
|
|
199
|
+
* ```tsx
|
|
200
|
+
* <Badge variant="green">Active</Badge>
|
|
201
|
+
* <Badge variant="success" appearance="dot">Healthy</Badge>
|
|
202
|
+
* ```
|
|
203
|
+
*/
|
|
204
|
+
export declare function Badge({ variant, appearance, size, className, children, }: BadgeProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Badge, GOLDFINCH_BADGE_BASE_STYLES, type BadgeVariant } from './badge';
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
/** Breadcrumbs size variant definitions. */
|
|
3
|
+
export declare const GOLDFINCH_BREADCRUMBS_VARIANTS: {
|
|
4
|
+
readonly size: {
|
|
5
|
+
readonly sm: {
|
|
6
|
+
readonly classes: "text-sm h-10 gap-0.5";
|
|
7
|
+
readonly description: "Compact breadcrumbs for dense UIs";
|
|
8
|
+
};
|
|
9
|
+
readonly base: {
|
|
10
|
+
readonly classes: "text-base h-12 gap-1";
|
|
11
|
+
readonly description: "Default breadcrumbs size";
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export declare const GOLDFINCH_BREADCRUMBS_DEFAULT_VARIANTS: {
|
|
16
|
+
readonly size: "base";
|
|
17
|
+
};
|
|
18
|
+
export type GoldfinchBreadcrumbsSize = keyof typeof GOLDFINCH_BREADCRUMBS_VARIANTS.size;
|
|
19
|
+
export interface GoldfinchBreadcrumbsVariantsProps {
|
|
20
|
+
/**
|
|
21
|
+
* Size of the breadcrumbs.
|
|
22
|
+
* - `"sm"` — Compact breadcrumbs for dense UIs
|
|
23
|
+
* - `"base"` — Default breadcrumbs size
|
|
24
|
+
* @default "base"
|
|
25
|
+
*/
|
|
26
|
+
size?: GoldfinchBreadcrumbsSize;
|
|
27
|
+
}
|
|
28
|
+
export declare function breadcrumbsVariants({ size, }?: GoldfinchBreadcrumbsVariantsProps): string;
|
|
29
|
+
export interface BreadcrumbsItemProps {
|
|
30
|
+
href: string;
|
|
31
|
+
icon?: React.ReactNode;
|
|
32
|
+
}
|
|
33
|
+
interface BreadcrumbsCurrentProps {
|
|
34
|
+
loading?: boolean;
|
|
35
|
+
icon?: React.ReactNode;
|
|
36
|
+
}
|
|
37
|
+
export interface BreadcrumbItem {
|
|
38
|
+
label: string;
|
|
39
|
+
href?: string;
|
|
40
|
+
icon?: React.ReactNode;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Breadcrumbs component props.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```tsx
|
|
47
|
+
* // With compound children
|
|
48
|
+
* <Breadcrumbs>
|
|
49
|
+
* <Breadcrumbs.Link href="/">Home</Breadcrumbs.Link>
|
|
50
|
+
* <Breadcrumbs.Separator />
|
|
51
|
+
* <Breadcrumbs.Link href="/docs">Docs</Breadcrumbs.Link>
|
|
52
|
+
* <Breadcrumbs.Separator />
|
|
53
|
+
* <Breadcrumbs.Current>Current Page</Breadcrumbs.Current>
|
|
54
|
+
* </Breadcrumbs>
|
|
55
|
+
*
|
|
56
|
+
* // With items prop
|
|
57
|
+
* <Breadcrumbs items={[
|
|
58
|
+
* { label: "Home", href: "/" },
|
|
59
|
+
* { label: "Current" },
|
|
60
|
+
* ]} />
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
export interface BreadcrumbsProps extends PropsWithChildren, GoldfinchBreadcrumbsVariantsProps {
|
|
64
|
+
/** Additional CSS classes merged via `cn()`. */
|
|
65
|
+
className?: string;
|
|
66
|
+
/**
|
|
67
|
+
* Convenience array of breadcrumb items. Alternative to using compound children.
|
|
68
|
+
* The last item without an `href` is rendered as the current page.
|
|
69
|
+
*/
|
|
70
|
+
items?: BreadcrumbItem[];
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Navigation breadcrumb trail showing the current page's location in a hierarchy.
|
|
74
|
+
* Compound component with `Breadcrumbs.Link`, `Breadcrumbs.Current`, `Breadcrumbs.Separator`, and `Breadcrumbs.Clipboard`.
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```tsx
|
|
78
|
+
* <Breadcrumbs>
|
|
79
|
+
* <Breadcrumbs.Link href="/">Home</Breadcrumbs.Link>
|
|
80
|
+
* <Breadcrumbs.Separator />
|
|
81
|
+
* <Breadcrumbs.Current>Dashboard</Breadcrumbs.Current>
|
|
82
|
+
* </Breadcrumbs>
|
|
83
|
+
* ```
|
|
84
|
+
*/
|
|
85
|
+
export declare function Breadcrumb({ children, size, className, items, }: BreadcrumbsProps): import("react").JSX.Element;
|
|
86
|
+
export declare namespace Breadcrumb {
|
|
87
|
+
var Link: ({ href, icon, children, }: PropsWithChildren<BreadcrumbsItemProps>) => import("react").JSX.Element;
|
|
88
|
+
var Current: ({ children, icon, loading, }: PropsWithChildren<BreadcrumbsCurrentProps>) => import("react").JSX.Element;
|
|
89
|
+
var Separator: () => import("react").JSX.Element;
|
|
90
|
+
var Clipboard: ({ text }: {
|
|
91
|
+
text: string;
|
|
92
|
+
}) => import("react").JSX.Element;
|
|
93
|
+
}
|
|
94
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Breadcrumb as Breadcrumbs, breadcrumbsVariants, GOLDFINCH_BREADCRUMBS_VARIANTS, GOLDFINCH_BREADCRUMBS_DEFAULT_VARIANTS, type BreadcrumbItem, type BreadcrumbsProps, type GoldfinchBreadcrumbsSize, type GoldfinchBreadcrumbsVariantsProps, } from './breadcrumbs';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Button as BaseButton } from '@base-ui/react/button';
|
|
2
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
3
|
+
export declare const goldfinchButtonVariants: {
|
|
4
|
+
readonly variant: {
|
|
5
|
+
readonly primary: "bg-goldfinch-brand text-goldfinch-inverse hover:bg-goldfinch-brand-hover";
|
|
6
|
+
readonly secondary: "bg-goldfinch-base text-goldfinch-default ring ring-goldfinch-line hover:bg-goldfinch-tint";
|
|
7
|
+
readonly ghost: "text-goldfinch-default hover:bg-goldfinch-tint bg-transparent";
|
|
8
|
+
readonly outline: "bg-transparent text-goldfinch-default ring ring-goldfinch-line hover:ring-goldfinch-focus/25";
|
|
9
|
+
readonly destructive: "bg-goldfinch-danger text-white";
|
|
10
|
+
};
|
|
11
|
+
readonly size: {
|
|
12
|
+
readonly xs: "px-2 py-1 text-xs rounded-md";
|
|
13
|
+
readonly sm: "px-2.5 py-1 text-sm rounded-md";
|
|
14
|
+
readonly base: "px-4 py-2 text-sm rounded-lg";
|
|
15
|
+
readonly lg: "px-5 py-2.5 text-base rounded-lg";
|
|
16
|
+
};
|
|
17
|
+
readonly shape: {
|
|
18
|
+
readonly base: "";
|
|
19
|
+
readonly square: "rounded-none";
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export type GoldfinchButtonVariant = keyof typeof goldfinchButtonVariants.variant;
|
|
23
|
+
export type GoldfinchButtonSize = keyof typeof goldfinchButtonVariants.size;
|
|
24
|
+
export type GoldfinchButtonShape = keyof typeof goldfinchButtonVariants.shape;
|
|
25
|
+
export declare function buttonVariants({ variant, size, shape, }?: {
|
|
26
|
+
variant?: GoldfinchButtonVariant;
|
|
27
|
+
size?: GoldfinchButtonSize;
|
|
28
|
+
shape?: GoldfinchButtonShape;
|
|
29
|
+
}): string;
|
|
30
|
+
export type ButtonProps = ComponentProps<typeof BaseButton> & {
|
|
31
|
+
variant?: GoldfinchButtonVariant;
|
|
32
|
+
size?: GoldfinchButtonSize;
|
|
33
|
+
shape?: GoldfinchButtonShape;
|
|
34
|
+
icon?: ReactNode;
|
|
35
|
+
loading?: boolean;
|
|
36
|
+
};
|
|
37
|
+
export declare function Button({ className, variant, size, shape, icon, loading, children, ...props }: ButtonProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
3
|
+
/** Card variant definitions (currently empty, reserved for future additions). */
|
|
4
|
+
export declare const GOLDFINCH_CARD_VARIANTS: {};
|
|
5
|
+
export declare const GOLDFINCH_CARD_DEFAULT_VARIANTS: {};
|
|
6
|
+
export interface GoldfinchCardVariantsProps {
|
|
7
|
+
}
|
|
8
|
+
export declare function cardVariants(_props?: GoldfinchCardVariantsProps): string;
|
|
9
|
+
export type CardProps = useRender.ComponentProps<"div"> & GoldfinchCardVariantsProps;
|
|
10
|
+
export type CardSectionProps = ComponentPropsWithoutRef<"div">;
|
|
11
|
+
/**
|
|
12
|
+
* Card container for both simple surfaces and layered layouts.
|
|
13
|
+
*
|
|
14
|
+
* Render children directly for a single-surface card, or use
|
|
15
|
+
* `Card.Secondary` and `Card.Primary` for the layered card treatment.
|
|
16
|
+
*/
|
|
17
|
+
declare const CardRoot: import('react').ForwardRefExoticComponent<Omit<CardProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
18
|
+
declare function CardSecondary({ children, className, ...props }: CardSectionProps): import("react").JSX.Element;
|
|
19
|
+
declare namespace CardSecondary {
|
|
20
|
+
var displayName: string;
|
|
21
|
+
}
|
|
22
|
+
declare function CardPrimary({ children, className, ...props }: CardSectionProps): import("react").JSX.Element;
|
|
23
|
+
declare namespace CardPrimary {
|
|
24
|
+
var displayName: string;
|
|
25
|
+
}
|
|
26
|
+
type CardComponent = typeof CardRoot & {
|
|
27
|
+
Primary: typeof CardPrimary;
|
|
28
|
+
Secondary: typeof CardSecondary;
|
|
29
|
+
};
|
|
30
|
+
declare const Card: CardComponent;
|
|
31
|
+
export { Card };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Card } from './card';
|