@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.
Files changed (170) hide show
  1. package/LICENSE +15 -0
  2. package/README.md +119 -0
  3. package/dist/alert-Iba34Kfr.js +72 -0
  4. package/dist/badge-dMKK_Gm2.js +147 -0
  5. package/dist/breadcrumbs-CHev-E0K.js +148 -0
  6. package/dist/button-DDhP5P56.js +40 -0
  7. package/dist/card-CVUWZOar.js +42 -0
  8. package/dist/checkbox-BubMDtGW.js +149 -0
  9. package/dist/collapsible-Bk5IP_KI.js +55 -0
  10. package/dist/components/alert.mjs +2 -0
  11. package/dist/components/badge.mjs +2 -0
  12. package/dist/components/breadcrumbs.mjs +2 -0
  13. package/dist/components/button.mjs +2 -0
  14. package/dist/components/card.mjs +2 -0
  15. package/dist/components/checkbox.mjs +2 -0
  16. package/dist/components/collapsible.mjs +2 -0
  17. package/dist/components/copy-to-clipboard.mjs +2 -0
  18. package/dist/components/dropdown.mjs +2 -0
  19. package/dist/components/empty-state.mjs +2 -0
  20. package/dist/components/field.mjs +2 -0
  21. package/dist/components/grid.mjs +2 -0
  22. package/dist/components/input-group.mjs +2 -0
  23. package/dist/components/input.mjs +4 -0
  24. package/dist/components/label.mjs +2 -0
  25. package/dist/components/link.mjs +58 -0
  26. package/dist/components/menubar.mjs +2 -0
  27. package/dist/components/modal.mjs +2 -0
  28. package/dist/components/page.mjs +2 -0
  29. package/dist/components/pagination.mjs +2 -0
  30. package/dist/components/popover.mjs +2 -0
  31. package/dist/components/progress.mjs +2 -0
  32. package/dist/components/radio.mjs +2 -0
  33. package/dist/components/select.mjs +2 -0
  34. package/dist/components/sensitive-input.mjs +2 -0
  35. package/dist/components/sidebar.mjs +2 -0
  36. package/dist/components/spinner.mjs +3 -0
  37. package/dist/components/table-of-contents.mjs +2 -0
  38. package/dist/components/table.mjs +2 -0
  39. package/dist/components/tabs.mjs +2 -0
  40. package/dist/components/text.mjs +2 -0
  41. package/dist/components/toast.mjs +2 -0
  42. package/dist/components/toggle.mjs +2 -0
  43. package/dist/components/toolbar.mjs +2 -0
  44. package/dist/components/tooltip.mjs +2 -0
  45. package/dist/components/top-navigation.mjs +2 -0
  46. package/dist/copy-to-clipboard-KXU8jo6k.js +139 -0
  47. package/dist/dropdown-A5hLlUjr.js +172 -0
  48. package/dist/empty-state-DuugAIN_.js +76 -0
  49. package/dist/field-CZb7PLTY.js +47 -0
  50. package/dist/grid-BFkQ5cmR.js +101 -0
  51. package/dist/index.mjs +47 -0
  52. package/dist/input-6C_-SelY.js +48 -0
  53. package/dist/input-Bo8XL6_f.js +43 -0
  54. package/dist/input-group-Dm4hKEhq.js +302 -0
  55. package/dist/input-variants-CZevxTd8.js +41 -0
  56. package/dist/label-7oCakbyx.js +43 -0
  57. package/dist/link-provider-H0J4aZPH.js +21 -0
  58. package/dist/menubar-DyXmaeKZ.js +59 -0
  59. package/dist/modal-BYQ8MRMy.js +132 -0
  60. package/dist/page-DOevDFqd.js +60 -0
  61. package/dist/pagination-C3f16UOC.js +239 -0
  62. package/dist/popover-3kcRy9HX.js +120 -0
  63. package/dist/portal-provider-CWX8j9O1.js +15 -0
  64. package/dist/progress-Ac96hU_C.js +26 -0
  65. package/dist/radio-C8rcmsbS.js +144 -0
  66. package/dist/resolve-variant-DWiDeQhX.js +7 -0
  67. package/dist/select-DaJRanrs.js +178 -0
  68. package/dist/sensitive-input-BEAOu1A6.js +181 -0
  69. package/dist/sidebar-CkZxFt33.js +703 -0
  70. package/dist/skeleton-line-Dh4TDbeq.js +32 -0
  71. package/dist/spinner-DKzSES7b.js +79 -0
  72. package/dist/src/components/alert/alert.d.ts +105 -0
  73. package/dist/src/components/alert/index.d.ts +1 -0
  74. package/dist/src/components/badge/badge.d.ts +204 -0
  75. package/dist/src/components/badge/index.d.ts +1 -0
  76. package/dist/src/components/breadcrumbs/breadcrumbs.d.ts +94 -0
  77. package/dist/src/components/breadcrumbs/index.d.ts +1 -0
  78. package/dist/src/components/button/button.d.ts +37 -0
  79. package/dist/src/components/button/index.d.ts +2 -0
  80. package/dist/src/components/card/card.d.ts +31 -0
  81. package/dist/src/components/card/index.d.ts +1 -0
  82. package/dist/src/components/checkbox/checkbox.d.ts +196 -0
  83. package/dist/src/components/checkbox/index.d.ts +1 -0
  84. package/dist/src/components/collapsible/collapsible.d.ts +108 -0
  85. package/dist/src/components/collapsible/index.d.ts +1 -0
  86. package/dist/src/components/copy-to-clipboard/copy-to-clipboard.d.ts +86 -0
  87. package/dist/src/components/copy-to-clipboard/index.d.ts +1 -0
  88. package/dist/src/components/dropdown/dropdown.d.ts +115 -0
  89. package/dist/src/components/dropdown/index.d.ts +1 -0
  90. package/dist/src/components/empty-state/empty-state.d.ts +68 -0
  91. package/dist/src/components/empty-state/index.d.ts +1 -0
  92. package/dist/src/components/field/field.d.ts +88 -0
  93. package/dist/src/components/field/index.d.ts +1 -0
  94. package/dist/src/components/grid/grid.d.ts +134 -0
  95. package/dist/src/components/grid/index.d.ts +1 -0
  96. package/dist/src/components/input/index.d.ts +30 -0
  97. package/dist/src/components/input/input-area.d.ts +64 -0
  98. package/dist/src/components/input/input-variants.d.ts +58 -0
  99. package/dist/src/components/input/input.d.ts +67 -0
  100. package/dist/src/components/input-group/context.d.ts +95 -0
  101. package/dist/src/components/input-group/index.d.ts +1 -0
  102. package/dist/src/components/input-group/input-group-addon.d.ts +14 -0
  103. package/dist/src/components/input-group/input-group-button.d.ts +35 -0
  104. package/dist/src/components/input-group/input-group-input.d.ts +8 -0
  105. package/dist/src/components/input-group/input-group-suffix.d.ts +12 -0
  106. package/dist/src/components/input-group/input-group.d.ts +42 -0
  107. package/dist/src/components/label/index.d.ts +1 -0
  108. package/dist/src/components/label/label.d.ts +66 -0
  109. package/dist/src/components/link/index.d.ts +1 -0
  110. package/dist/src/components/link/link.d.ts +65 -0
  111. package/dist/src/components/menubar/index.d.ts +2 -0
  112. package/dist/src/components/menubar/menubar.d.ts +65 -0
  113. package/dist/src/components/menubar/use-menu-navigation.d.ts +7 -0
  114. package/dist/src/components/modal/index.d.ts +1 -0
  115. package/dist/src/components/modal/modal.d.ts +204 -0
  116. package/dist/src/components/page/index.d.ts +1 -0
  117. package/dist/src/components/page/page.d.ts +65 -0
  118. package/dist/src/components/pagination/index.d.ts +1 -0
  119. package/dist/src/components/pagination/pagination.d.ts +240 -0
  120. package/dist/src/components/popover/index.d.ts +2 -0
  121. package/dist/src/components/popover/popover.d.ts +177 -0
  122. package/dist/src/components/progress/index.d.ts +1 -0
  123. package/dist/src/components/progress/progress.d.ts +43 -0
  124. package/dist/src/components/radio/index.d.ts +1 -0
  125. package/dist/src/components/radio/radio.d.ts +276 -0
  126. package/dist/src/components/select/index.d.ts +1 -0
  127. package/dist/src/components/select/select.d.ts +283 -0
  128. package/dist/src/components/sensitive-input/index.d.ts +1 -0
  129. package/dist/src/components/sensitive-input/sensitive-input.d.ts +93 -0
  130. package/dist/src/components/sidebar/index.d.ts +1 -0
  131. package/dist/src/components/sidebar/sidebar.d.ts +579 -0
  132. package/dist/src/components/spinner/index.d.ts +2 -0
  133. package/dist/src/components/spinner/skeleton-line.d.ts +11 -0
  134. package/dist/src/components/spinner/spinner.d.ts +69 -0
  135. package/dist/src/components/table/index.d.ts +1 -0
  136. package/dist/src/components/table/table.d.ts +137 -0
  137. package/dist/src/components/table-of-contents/index.d.ts +1 -0
  138. package/dist/src/components/table-of-contents/table-of-contents.d.ts +71 -0
  139. package/dist/src/components/tabs/index.d.ts +2 -0
  140. package/dist/src/components/tabs/tabs.d.ts +115 -0
  141. package/dist/src/components/text/index.d.ts +1 -0
  142. package/dist/src/components/text/text.d.ts +213 -0
  143. package/dist/src/components/toast/index.d.ts +4 -0
  144. package/dist/src/components/toast/toast.d.ts +196 -0
  145. package/dist/src/components/toggle/index.d.ts +1 -0
  146. package/dist/src/components/toggle/toggle.d.ts +101 -0
  147. package/dist/src/components/toolbar/index.d.ts +1 -0
  148. package/dist/src/components/toolbar/toolbar.d.ts +49 -0
  149. package/dist/src/components/tooltip/index.d.ts +1 -0
  150. package/dist/src/components/tooltip/tooltip.d.ts +107 -0
  151. package/dist/src/components/top-navigation/index.d.ts +1 -0
  152. package/dist/src/components/top-navigation/top-navigation.d.ts +47 -0
  153. package/dist/src/index.d.ts +67 -0
  154. package/dist/src/utils/cn.d.ts +3 -0
  155. package/dist/src/utils/index.d.ts +4 -0
  156. package/dist/src/utils/link-provider.d.ts +11 -0
  157. package/dist/src/utils/portal-provider.d.ts +7 -0
  158. package/dist/src/utils/resolve-variant.d.ts +1 -0
  159. package/dist/styles/index.css +294 -0
  160. package/dist/table-CKmEd0O5.js +135 -0
  161. package/dist/table-of-contents-CuE1aDKE.js +91 -0
  162. package/dist/tabs-JX7xyFcA.js +101 -0
  163. package/dist/text-B0EvLge5.js +88 -0
  164. package/dist/toast-pSr7cFVU.js +274 -0
  165. package/dist/toggle-C72Skv4q.js +179 -0
  166. package/dist/toolbar-DtT4MUHB.js +109 -0
  167. package/dist/tooltip-QfSb4wnI.js +59 -0
  168. package/dist/top-navigation-DoTeFaXD.js +45 -0
  169. package/dist/utils.mjs +11 -0
  170. package/package.json +228 -0
@@ -0,0 +1,149 @@
1
+ import { cn as e } from "./utils.mjs";
2
+ import { r as t } from "./label-7oCakbyx.js";
3
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
+ import { createContext as i, forwardRef as a, useContext as o } from "react";
5
+ import { CheckIcon as s, MinusIcon as c } from "@phosphor-icons/react";
6
+ import { Fieldset as l } from "@base-ui/react/fieldset";
7
+ import { Field as u } from "@base-ui/react/field";
8
+ import { CheckboxGroup as d } from "@base-ui/react/checkbox-group";
9
+ import { Checkbox as f } from "@base-ui/react/checkbox";
10
+ //#region src/components/checkbox/checkbox.tsx
11
+ var p = { variant: {
12
+ default: {
13
+ classes: "[&:focus-within>span]:ring-goldfinch-focus [&:hover>span]:ring-goldfinch-hairline",
14
+ description: "Default checkbox appearance"
15
+ },
16
+ error: {
17
+ classes: "[&>span]:ring-goldfinch-danger",
18
+ description: "Error state for validation failures"
19
+ }
20
+ } }, m = { variant: "default" }, h = i({ controlFirst: !0 }), g = a(({ className: i, checked: a, indeterminate: o, disabled: l, variant: d = "default", label: p, labelTooltip: m, controlFirst: h = !0, onCheckedChange: g, required: _, name: v, ...y }, b) => {
21
+ if (process.env.NODE_ENV !== "production") {
22
+ let e = !!p, t = !!y["aria-label"], n = !!y["aria-labelledby"];
23
+ !e && !t && !n && console.warn("[Goldfinch Checkbox]: Checkbox must have an accessible name. Provide either:\n - label prop: <Checkbox label='Accept terms' />\n - aria-label: <Checkbox aria-label='Select item' />\n - aria-labelledby for custom label association\n Note: When used inside Checkbox.Group, label is optional");
24
+ }
25
+ let x = /* @__PURE__ */ n(f.Root, {
26
+ ref: b,
27
+ "data-goldfinch-component": "Checkbox",
28
+ name: v,
29
+ checked: a,
30
+ indeterminate: o,
31
+ disabled: l,
32
+ onCheckedChange: g,
33
+ className: e("relative flex h-4 w-4 shrink-0 items-center justify-center rounded-sm border-0 bg-goldfinch-base ring focus:outline-none after:absolute after:-inset-x-3 after:-inset-y-2", p && "mt-0.5", d === "error" ? "ring-goldfinch-danger" : "ring-goldfinch-hairline", !l && "hover:ring-goldfinch-hairline focus:ring-goldfinch-focus focus:ring-2 focus-visible:ring-2 focus-visible:ring-goldfinch-brand", "data-[checked]:bg-goldfinch-contrast data-[checked]:ring-goldfinch-contrast data-[indeterminate]:bg-goldfinch-contrast data-[indeterminate]:ring-goldfinch-contrast", l && "cursor-not-allowed opacity-50", i),
34
+ ...y,
35
+ children: /* @__PURE__ */ n(f.Indicator, {
36
+ keepMounted: !0,
37
+ className: "flex items-center justify-center text-goldfinch-inverse data-[unchecked]:invisible",
38
+ render: (e, t) => /* @__PURE__ */ n("span", {
39
+ ...e,
40
+ children: t.indeterminate ? /* @__PURE__ */ n(c, {
41
+ weight: "bold",
42
+ size: 12
43
+ }) : /* @__PURE__ */ n(s, {
44
+ weight: "bold",
45
+ size: 12
46
+ })
47
+ })
48
+ })
49
+ });
50
+ return p ? /* @__PURE__ */ n(u.Root, {
51
+ className: "inline-flex",
52
+ children: /* @__PURE__ */ r(u.Label, {
53
+ className: e("!m-0 !min-h-0 !text-base inline-flex items-start gap-2", h ? "flex-row" : "flex-row-reverse justify-end", l ? "cursor-not-allowed" : "cursor-pointer"),
54
+ children: [x, /* @__PURE__ */ n(t, {
55
+ showOptional: _ === !1,
56
+ tooltip: m,
57
+ asContent: !0,
58
+ children: p
59
+ })]
60
+ })
61
+ }) : x;
62
+ });
63
+ g.displayName = "Checkbox";
64
+ var _ = a(({ className: t, checked: i, indeterminate: a, disabled: l, variant: u = "default", label: d, value: p, onCheckedChange: m, name: g }, _) => {
65
+ let { controlFirst: v } = o(h);
66
+ return /* @__PURE__ */ r("label", {
67
+ "data-goldfinch-component": "Checkbox",
68
+ "data-goldfinch-part": "item-label",
69
+ className: e("m-0 relative inline-flex items-start gap-2", !v && "flex-row-reverse justify-end", l ? "cursor-not-allowed opacity-50" : "cursor-pointer", t),
70
+ children: [/* @__PURE__ */ n(f.Root, {
71
+ ref: _,
72
+ "data-goldfinch-component": "Checkbox",
73
+ "data-goldfinch-part": "item",
74
+ value: p,
75
+ name: g,
76
+ checked: i,
77
+ indeterminate: a,
78
+ disabled: l,
79
+ onCheckedChange: m,
80
+ className: e("peer relative mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-sm border-0 bg-goldfinch-base ring after:absolute after:-inset-x-3 after:-inset-y-2", u === "error" ? "ring-goldfinch-danger" : "ring-goldfinch-hairline", !l && "group-hover:ring-goldfinch-hairline hover:ring-goldfinch-hairline focus:ring-goldfinch-focus focus:ring-2 focus-visible:ring-2 focus-visible:ring-goldfinch-brand", "data-[checked]:bg-goldfinch-contrast data-[checked]:ring-goldfinch-contrast data-[indeterminate]:bg-goldfinch-contrast data-[indeterminate]:ring-goldfinch-contrast"),
81
+ children: /* @__PURE__ */ n(f.Indicator, {
82
+ keepMounted: !0,
83
+ className: "flex items-center justify-center text-goldfinch-inverse data-[unchecked]:invisible",
84
+ render: (e, t) => /* @__PURE__ */ n("span", {
85
+ ...e,
86
+ children: t.indeterminate ? /* @__PURE__ */ n(c, {
87
+ weight: "bold",
88
+ size: 12
89
+ }) : /* @__PURE__ */ n(s, {
90
+ weight: "bold",
91
+ size: 12
92
+ })
93
+ })
94
+ })
95
+ }), /* @__PURE__ */ n("span", {
96
+ className: "text-base text-goldfinch-default",
97
+ children: d
98
+ })]
99
+ });
100
+ });
101
+ _.displayName = "Checkbox.Item";
102
+ function v({ children: t, className: r }) {
103
+ return /* @__PURE__ */ n(l.Legend, {
104
+ className: e("text-base font-medium text-goldfinch-default", r),
105
+ children: t
106
+ });
107
+ }
108
+ v.displayName = "Checkbox.Legend";
109
+ function y({ legend: t, children: i, error: a, description: o, defaultValue: s, value: c, onValueChange: u, allValues: f, disabled: p, controlFirst: m = !0, className: g }) {
110
+ return /* @__PURE__ */ n(h.Provider, {
111
+ value: { controlFirst: m },
112
+ children: /* @__PURE__ */ n(d, {
113
+ defaultValue: s,
114
+ value: c,
115
+ onValueChange: u,
116
+ allValues: f,
117
+ disabled: p,
118
+ children: /* @__PURE__ */ r(l.Root, {
119
+ className: e("flex flex-col gap-4", g),
120
+ children: [
121
+ t && /* @__PURE__ */ n(l.Legend, {
122
+ className: "text-base font-medium text-goldfinch-default",
123
+ children: t
124
+ }),
125
+ /* @__PURE__ */ n("div", {
126
+ className: "flex flex-col gap-2",
127
+ children: i
128
+ }),
129
+ a && /* @__PURE__ */ n("p", {
130
+ className: "text-sm text-goldfinch-danger",
131
+ children: a
132
+ }),
133
+ o && /* @__PURE__ */ n("p", {
134
+ className: "text-sm text-goldfinch-subtle",
135
+ children: o
136
+ })
137
+ ]
138
+ })
139
+ })
140
+ });
141
+ }
142
+ var b = Object.assign(g, {
143
+ Item: _,
144
+ Group: y,
145
+ Legend: v
146
+ });
147
+ b.displayName = "Checkbox";
148
+ //#endregion
149
+ export { m as n, p as r, b as t };
@@ -0,0 +1,55 @@
1
+ import { cn as e } from "./utils.mjs";
2
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
+ import { forwardRef as r } from "react";
4
+ import { CaretDownIcon as i } from "@phosphor-icons/react";
5
+ import { Collapsible as a } from "@base-ui/react/collapsible";
6
+ //#region src/components/collapsible/collapsible.tsx
7
+ function o({ className: e, ...n }) {
8
+ return /* @__PURE__ */ t(a.Root, {
9
+ className: e,
10
+ ...n
11
+ });
12
+ }
13
+ o.displayName = "Collapsible.Root";
14
+ var s = r(({ className: n, ...r }, i) => /* @__PURE__ */ t(a.Trigger, {
15
+ ref: i,
16
+ "data-goldfinch-component": "Collapsible",
17
+ "data-goldfinch-part": "trigger",
18
+ className: e("cursor-pointer", n),
19
+ ...r
20
+ }));
21
+ s.displayName = "Collapsible.Trigger";
22
+ var c = r(({ className: e, ...n }, r) => /* @__PURE__ */ t(a.Panel, {
23
+ ref: r,
24
+ className: e,
25
+ ...n
26
+ }));
27
+ c.displayName = "Collapsible.Panel";
28
+ var l = r(({ children: r, className: o }, s) => /* @__PURE__ */ n(a.Trigger, {
29
+ ref: s,
30
+ "data-goldfinch-component": "Collapsible",
31
+ "data-goldfinch-part": "default-trigger",
32
+ className: e("bg-transparent border-none shadow-none p-0 m-0", "flex cursor-pointer items-center gap-1 text-sm text-goldfinch-link select-none", o),
33
+ children: [
34
+ r,
35
+ " ",
36
+ /* @__PURE__ */ t(i, { className: "h-4 w-4 transition-transform [[data-panel-open]_&]:rotate-180" })
37
+ ]
38
+ }));
39
+ l.displayName = "Collapsible.DefaultTrigger";
40
+ var u = r(({ children: n, className: r, ...i }, o) => /* @__PURE__ */ t(a.Panel, {
41
+ ref: o,
42
+ className: e("my-2 space-y-4 border-l-2 border-goldfinch-fill pl-4", r),
43
+ ...i,
44
+ children: n
45
+ }));
46
+ u.displayName = "Collapsible.DefaultPanel";
47
+ var d = Object.assign(o, {
48
+ Root: o,
49
+ Trigger: s,
50
+ Panel: c,
51
+ DefaultTrigger: l,
52
+ DefaultPanel: u
53
+ });
54
+ //#endregion
55
+ export { d as t };
@@ -0,0 +1,2 @@
1
+ import { n as e, t } from "../alert-Iba34Kfr.js";
2
+ export { t as Alert, e as AlertVariant };
@@ -0,0 +1,2 @@
1
+ import { n as e, t } from "../badge-dMKK_Gm2.js";
2
+ export { t as Badge, e as GOLDFINCH_BADGE_BASE_STYLES };
@@ -0,0 +1,2 @@
1
+ import { i as e, n as t, r as n, t as r } from "../breadcrumbs-CHev-E0K.js";
2
+ export { r as Breadcrumbs, t as GOLDFINCH_BREADCRUMBS_DEFAULT_VARIANTS, n as GOLDFINCH_BREADCRUMBS_VARIANTS, e as breadcrumbsVariants };
@@ -0,0 +1,2 @@
1
+ import { n as e, r as t, t as n } from "../button-DDhP5P56.js";
2
+ export { n as Button, e as buttonVariants, t as goldfinchButtonVariants };
@@ -0,0 +1,2 @@
1
+ import { t as e } from "../card-CVUWZOar.js";
2
+ export { e as Card };
@@ -0,0 +1,2 @@
1
+ import { n as e, r as t, t as n } from "../checkbox-BubMDtGW.js";
2
+ export { n as Checkbox, e as GOLDFINCH_CHECKBOX_DEFAULT_VARIANTS, t as GOLDFINCH_CHECKBOX_VARIANTS };
@@ -0,0 +1,2 @@
1
+ import { t as e } from "../collapsible-Bk5IP_KI.js";
2
+ export { e as Collapsible };
@@ -0,0 +1,2 @@
1
+ import { t as e } from "../copy-to-clipboard-KXU8jo6k.js";
2
+ export { e as CopyToClipboard };
@@ -0,0 +1,2 @@
1
+ import { t as e } from "../dropdown-A5hLlUjr.js";
2
+ export { e as DropdownMenu };
@@ -0,0 +1,2 @@
1
+ import { i as e, n as t, r as n, t as r } from "../empty-state-DuugAIN_.js";
2
+ export { r as EmptyState, t as GOLDFINCH_EMPTY_STATE_DEFAULT_VARIANTS, n as GOLDFINCH_EMPTY_STATE_VARIANTS, e as emptyStateVariants };
@@ -0,0 +1,2 @@
1
+ import { a as e, i as t, n, r, t as i } from "../field-CZb7PLTY.js";
2
+ export { i as Field, n as GOLDFINCH_FIELD_DEFAULT_VARIANTS, r as GOLDFINCH_FIELD_VARIANTS, t as fieldVariants, e as normalizeFieldError };
@@ -0,0 +1,2 @@
1
+ import { a as e, i as t, n, o as r, r as i, t as a } from "../grid-BFkQ5cmR.js";
2
+ export { a as GOLDFINCH_GRID_DEFAULT_VARIANTS, n as GOLDFINCH_GRID_VARIANTS, i as Grid, t as GridItem, e as gridItemVariants, r as gridVariants };
@@ -0,0 +1,2 @@
1
+ import { n as e, r as t, t as n } from "../input-group-Dm4hKEhq.js";
2
+ export { n as GOLDFINCH_INPUT_GROUP_DEFAULT_VARIANTS, e as GOLDFINCH_INPUT_GROUP_VARIANTS, t as InputGroup };
@@ -0,0 +1,4 @@
1
+ import { n as e } from "../input-variants-CZevxTd8.js";
2
+ import { n as t, r as n, t as r } from "../input-group-Dm4hKEhq.js";
3
+ import { n as i, r as a, t as o } from "../input-6C_-SelY.js";
4
+ export { r as GOLDFINCH_INPUT_GROUP_DEFAULT_VARIANTS, t as GOLDFINCH_INPUT_GROUP_VARIANTS, o as Input, i as InputArea, n as InputGroup, a as Textarea, e as inputVariants };
@@ -0,0 +1,2 @@
1
+ import { a as e, i as t, n, r, t as i } from "../label-7oCakbyx.js";
2
+ export { i as GOLDFINCH_LABEL_DEFAULT_VARIANTS, n as GOLDFINCH_LABEL_VARIANTS, r as Label, t as labelContentVariants, e as labelVariants };
@@ -0,0 +1,58 @@
1
+ import { cn as e } from "../utils.mjs";
2
+ import { t } from "../resolve-variant-DWiDeQhX.js";
3
+ import { n } from "../link-provider-H0J4aZPH.js";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
+ import { forwardRef as a, useEffect as o } from "react";
6
+ import { mergeProps as s } from "@base-ui/react/merge-props";
7
+ import { useRender as c } from "@base-ui/react/use-render";
8
+ //#region src/components/link/link.tsx
9
+ var l = (e) => /* @__PURE__ */ i("svg", {
10
+ width: "1em",
11
+ height: "1em",
12
+ viewBox: "0 0 24 24",
13
+ fill: "none",
14
+ stroke: "currentColor",
15
+ strokeLinecap: "round",
16
+ strokeLinejoin: "round",
17
+ "aria-hidden": "true",
18
+ className: "link-external-icon",
19
+ ...e,
20
+ children: [/* @__PURE__ */ r("path", { d: "M9 4H8.8C7.11984 4 6.27976 4 5.63803 4.32698C5.07354 4.6146 4.6146 5.07354 4.32698 5.63803C4 6.27976 4 7.11984 4 8.8V15.2C4 16.8802 4 17.7202 4.32698 18.362C4.6146 18.9265 5.07354 19.3854 5.63803 19.673C6.27976 20 7.11984 20 8.8 20H15.2C16.8802 20 17.7202 20 18.362 19.673C18.9265 19.3854 19.3854 18.9265 19.673 18.362C20 17.7202 20 16.8802 20 15.2V15" }), /* @__PURE__ */ r("path", { d: "M14 4H20M20 4V10M20 4L11 13" })]
21
+ });
22
+ l.displayName = "Link.ExternalIcon";
23
+ var u = { variant: {
24
+ inline: {
25
+ classes: "text-goldfinch-link underline underline-offset-[0.15em] decoration-[0.0625em] link-current transition-colors",
26
+ description: "Inline text link that flows with content"
27
+ },
28
+ current: {
29
+ classes: "text-current underline underline-offset-[0.15em] decoration-[0.0625em] link-current transition-colors",
30
+ description: "Link that inherits color from parent text"
31
+ },
32
+ plain: {
33
+ classes: "text-goldfinch-link hover:text-goldfinch-link/70 transition-colors",
34
+ description: "Link without underline decoration"
35
+ }
36
+ } }, d = { variant: "inline" };
37
+ function f({ variant: n = d.variant } = {}) {
38
+ return e(t(u.variant, n, d.variant).classes);
39
+ }
40
+ var p = a(function({ className: t, variant: i = "inline", render: a, ...l }, u) {
41
+ let d = n();
42
+ process.env.NODE_ENV !== "production" && o(() => {
43
+ "to" in l && l.to !== void 0 && console.warn("[goldfinch] Link: The `to` prop is deprecated. Use `href` instead.\n\nIf your app uses a client-side router, configure a LinkProvider that\nmaps `href` to your router's navigation prop. See:\nhttps://goldfinch.example.com/utilities/link-provider\n\nMigration example:\n Before: <Link to=\"/page\">…</Link>\n After: <Link href=\"/page\">…</Link>");
44
+ }, []);
45
+ let p = {
46
+ "data-goldfinch-component": "Link",
47
+ className: e(f({ variant: i }), "group/link inline-flex items-center gap-[0.1875em]")
48
+ };
49
+ return c({
50
+ render: a ?? /* @__PURE__ */ r(d, {}),
51
+ ref: u,
52
+ props: s(p, l, { className: t })
53
+ });
54
+ });
55
+ p.displayName = "Link";
56
+ var m = Object.assign(p, { ExternalIcon: l });
57
+ //#endregion
58
+ export { d as GOLDFINCH_LINK_DEFAULT_VARIANTS, u as GOLDFINCH_LINK_VARIANTS, m as Link, f as linkVariants };
@@ -0,0 +1,2 @@
1
+ import { n as e, t } from "../menubar-DyXmaeKZ.js";
2
+ export { t as MenuBar, e as useMenuNavigation };
@@ -0,0 +1,2 @@
1
+ import { a as e, i as t, n, o as r, r as i, t as a } from "../modal-BYQ8MRMy.js";
2
+ export { a as Modal, n as ModalClose, i as ModalDescription, t as ModalRoot, e as ModalTitle, r as ModalTrigger };
@@ -0,0 +1,2 @@
1
+ import { i as e, n as t, r as n, t as r } from "../page-DOevDFqd.js";
2
+ export { r as GOLDFINCH_PAGE_DEFAULT_VARIANTS, t as GOLDFINCH_PAGE_VARIANTS, n as Page, e as pageVariants };
@@ -0,0 +1,2 @@
1
+ import { t as e } from "../pagination-C3f16UOC.js";
2
+ export { e as Pagination };
@@ -0,0 +1,2 @@
1
+ import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "../popover-3kcRy9HX.js";
2
+ export { c as GOLDFINCH_POPOVER_DEFAULT_VARIANTS, i as GOLDFINCH_POPOVER_VARIANTS, o as Popover, n as PopoverClose, e as PopoverContent, a as PopoverDescription, s as PopoverRoot, t as PopoverTitle, r as PopoverTrigger };
@@ -0,0 +1,2 @@
1
+ import { t as e } from "../progress-Ac96hU_C.js";
2
+ export { e as Progress };
@@ -0,0 +1,2 @@
1
+ import { a as e, i as t, n, r, t as i } from "../radio-C8rcmsbS.js";
2
+ export { i as GOLDFINCH_RADIO_DEFAULT_VARIANTS, n as GOLDFINCH_RADIO_VARIANTS, r as Radio, t as RadioGroup, e as radioVariants };
@@ -0,0 +1,2 @@
1
+ import { t as e } from "../select-DaJRanrs.js";
2
+ export { e as Select };
@@ -0,0 +1,2 @@
1
+ import { n as e, r as t, t as n } from "../sensitive-input-BEAOu1A6.js";
2
+ export { n as GOLDFINCH_SENSITIVE_INPUT_DEFAULT_VARIANTS, e as GOLDFINCH_SENSITIVE_INPUT_VARIANTS, t as SensitiveInput };
@@ -0,0 +1,2 @@
1
+ import { C as e, D as t, E as n, O as r, S as i, T as a, _ as o, a as s, b as c, c as l, d as u, f as d, g as f, h as p, i as m, k as h, l as g, m as _, n as v, o as y, p as b, r as x, s as S, t as C, u as w, v as T, w as E, x as D, y as O } from "../sidebar-CkZxFt33.js";
2
+ export { C as GOLDFINCH_SIDEBAR_DEFAULT_VARIANTS, v as GOLDFINCH_SIDEBAR_STYLING, x as GOLDFINCH_SIDEBAR_VARIANTS, m as Sidebar, s as SidebarCollapsible, y as SidebarCollapsibleContent, S as SidebarCollapsibleTrigger, l as SidebarContent, g as SidebarFooter, w as SidebarGroup, u as SidebarGroupLabel, d as SidebarHeader, b as SidebarMenu, _ as SidebarMenuBadge, p as SidebarMenuButton, f as SidebarMenuChevron, o as SidebarMenuItem, T as SidebarMenuSub, O as SidebarMenuSubButton, c as SidebarMenuSubItem, D as SidebarProvider, i as SidebarRail, e as SidebarResizeHandle, E as SidebarRoot, a as SidebarSeparator, n as SidebarSlidingView, t as SidebarSlidingViews, r as SidebarTrigger, h as useSidebar };
@@ -0,0 +1,3 @@
1
+ import { t as e } from "../skeleton-line-Dh4TDbeq.js";
2
+ import { t } from "../spinner-DKzSES7b.js";
3
+ export { e as SkeletonLine, t as Spinner };
@@ -0,0 +1,2 @@
1
+ import { n as e, r as t, t as n } from "../table-of-contents-CuE1aDKE.js";
2
+ export { n as GOLDFINCH_TABLE_OF_CONTENTS_DEFAULT_VARIANTS, e as GOLDFINCH_TABLE_OF_CONTENTS_VARIANTS, t as TableOfContents };
@@ -0,0 +1,2 @@
1
+ import { n as e, r as t, t as n } from "../table-CKmEd0O5.js";
2
+ export { n as GOLDFINCH_TABLE_DEFAULT_VARIANTS, e as GOLDFINCH_TABLE_VARIANTS, t as Table };
@@ -0,0 +1,2 @@
1
+ import { t as e } from "../tabs-JX7xyFcA.js";
2
+ export { e as Tabs };
@@ -0,0 +1,2 @@
1
+ import { t as e } from "../text-B0EvLge5.js";
2
+ export { e as Text };
@@ -0,0 +1,2 @@
1
+ import { a as e, i as t, n, r, t as i } from "../toast-pSr7cFVU.js";
2
+ export { i as Toast, n as ToastProvider, r as Toasty, t as createGoldfinchToastManager, e as useGoldfinchToastManager };
@@ -0,0 +1,2 @@
1
+ import { n as e, r as t, t as n } from "../toggle-C72Skv4q.js";
2
+ export { n as GOLDFINCH_TOGGLE_DEFAULT_VARIANTS, e as GOLDFINCH_TOGGLE_VARIANTS, t as Toggle };
@@ -0,0 +1,2 @@
1
+ import { n as e, r as t, t as n } from "../toolbar-DtT4MUHB.js";
2
+ export { n as GOLDFINCH_TOOLBAR_DEFAULT_VARIANTS, e as GOLDFINCH_TOOLBAR_VARIANTS, t as Toolbar };
@@ -0,0 +1,2 @@
1
+ import { n as e, t } from "../tooltip-QfSb4wnI.js";
2
+ export { t as Tooltip, e as TooltipProvider };
@@ -0,0 +1,2 @@
1
+ import { t as e } from "../top-navigation-DoTeFaXD.js";
2
+ export { e as TopNavigation };
@@ -0,0 +1,139 @@
1
+ import { cn as e } from "./utils.mjs";
2
+ import { t } from "./resolve-variant-DWiDeQhX.js";
3
+ import { t as n } from "./button-DDhP5P56.js";
4
+ import { n as r } from "./input-variants-CZevxTd8.js";
5
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
+ import { forwardRef as o, useCallback as s, useRef as c, useState as l } from "react";
7
+ import { CheckIcon as u, CopyIcon as d } from "@phosphor-icons/react";
8
+ import { Tooltip as f } from "@base-ui/react/tooltip";
9
+ import { Toast as p } from "@base-ui/react/toast";
10
+ //#region src/components/copy-to-clipboard/copy-to-clipboard.tsx
11
+ var m = p.createToastManager(), h = { size: {
12
+ sm: {
13
+ classes: "text-xs",
14
+ buttonSize: "sm",
15
+ description: "Small copy-to-clipboard for compact UIs"
16
+ },
17
+ base: {
18
+ classes: "text-sm",
19
+ buttonSize: "base",
20
+ description: "Default copy-to-clipboard size"
21
+ },
22
+ lg: {
23
+ classes: "text-sm",
24
+ buttonSize: "lg",
25
+ description: "Large copy-to-clipboard for prominent display"
26
+ }
27
+ } }, g = { size: "lg" }, _ = { slide: {
28
+ initial: "pointer-events-none absolute inset-0 flex items-center justify-center opacity-0 translate-y-full",
29
+ animate: "translate-y-0 opacity-100",
30
+ end: "pointer-events-none absolute inset-0 flex items-center justify-center opacity-0 -translate-y-full"
31
+ } };
32
+ function v({ size: n = g.size } = {}) {
33
+ return e("flex items-center overflow-hidden bg-goldfinch-base px-0 font-mono", t(h.size, n, g.size).classes);
34
+ }
35
+ function y() {
36
+ let { toasts: t } = p.useToastManager();
37
+ return /* @__PURE__ */ i(p.Viewport, {
38
+ className: "pointer-events-none fixed inset-0 isolate",
39
+ children: t.map((t) => /* @__PURE__ */ i(p.Positioner, {
40
+ toast: t,
41
+ className: "absolute",
42
+ children: /* @__PURE__ */ i(p.Root, {
43
+ toast: t,
44
+ className: e("flex origin-[var(--transform-origin)] flex-col rounded-md bg-goldfinch-base px-3 py-1.5 text-xs text-goldfinch-default font-sans", "shadow-lg shadow-goldfinch-tip-shadow outline outline-goldfinch-fill"),
45
+ children: /* @__PURE__ */ i(p.Description, {})
46
+ })
47
+ }, t.id))
48
+ });
49
+ }
50
+ function b({ children: e }) {
51
+ return /* @__PURE__ */ i(f.Provider, { children: /* @__PURE__ */ a(p.Provider, {
52
+ toastManager: m,
53
+ children: [/* @__PURE__ */ i(y, {}), e]
54
+ }) });
55
+ }
56
+ var x = o(({ text: o, textToCopy: p, className: y, size: x = g.size, onCopy: S, tooltip: C, labels: { copyAction: w = "Copy to clipboard" } = {} }, T) => {
57
+ let [E, D] = l(!1), O = c(null), k = t(h.size, x, g.size), { text: A = "Copy", copiedText: j = "Copied", side: M = "top" } = C ?? {}, N = s(async () => {
58
+ try {
59
+ if (typeof navigator < "u" && navigator.clipboard && typeof navigator.clipboard.writeText == "function") await navigator.clipboard.writeText(p ?? o);
60
+ else if (typeof document < "u") {
61
+ let e = document.createElement("textarea");
62
+ e.value = p ?? o, e.setAttribute("readonly", ""), e.style.position = "absolute", e.style.left = "-9999px", document.body.appendChild(e);
63
+ let t = document.getSelection(), n = t?.rangeCount ? t.getRangeAt(0) : null;
64
+ e.select();
65
+ try {
66
+ document.execCommand("copy");
67
+ } finally {
68
+ document.body.removeChild(e), n && (t?.removeAllRanges(), t?.addRange(n));
69
+ }
70
+ }
71
+ D(!0), C ? m.add({
72
+ description: j,
73
+ positionerProps: {
74
+ anchor: O.current,
75
+ side: M,
76
+ sideOffset: 8
77
+ },
78
+ timeout: 1500,
79
+ onClose() {
80
+ D(!1);
81
+ }
82
+ }) : setTimeout(() => D(!1), 1500), S?.();
83
+ } catch (e) {
84
+ console.warn("Clipboard copy failed", e);
85
+ }
86
+ }, [
87
+ o,
88
+ S,
89
+ C,
90
+ j,
91
+ M
92
+ ]), P = /* @__PURE__ */ a(n, {
93
+ ref: O,
94
+ size: k.buttonSize,
95
+ variant: "ghost",
96
+ className: e("rounded-l-none rounded-r-[inherit] border-l! border-goldfinch-line! px-3 relative isolate overflow-hidden transition-all duration-200", "focus:ring-inset focus:ring-goldfinch-focus/50", "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-goldfinch-brand"),
97
+ onClick: N,
98
+ "aria-label": w,
99
+ children: [/* @__PURE__ */ i("span", {
100
+ className: e("flex items-center gap-1 transition-all duration-200", E ? _.slide.animate : _.slide.initial),
101
+ children: /* @__PURE__ */ i(u, {})
102
+ }), /* @__PURE__ */ i("span", {
103
+ className: e("flex items-center justify-center transition-all duration-200", E ? _.slide.end : _.slide.animate),
104
+ children: /* @__PURE__ */ i(d, {})
105
+ })]
106
+ });
107
+ return /* @__PURE__ */ a("div", {
108
+ ref: T,
109
+ className: e(r({ size: k.buttonSize }), v({ size: x }), y),
110
+ children: [
111
+ /* @__PURE__ */ i("span", {
112
+ className: "grow truncate ps-4 pe-2",
113
+ children: o
114
+ }),
115
+ C ? /* @__PURE__ */ i(b, { children: /* @__PURE__ */ a(f.Root, {
116
+ disabled: E,
117
+ onOpenChange: (e, t) => {
118
+ t.reason === "trigger-press" && t.cancel();
119
+ },
120
+ children: [/* @__PURE__ */ i(f.Trigger, { render: P }), /* @__PURE__ */ i(f.Portal, { children: /* @__PURE__ */ i(f.Positioner, {
121
+ side: M,
122
+ sideOffset: 8,
123
+ children: /* @__PURE__ */ i(f.Popup, {
124
+ className: e("flex origin-[var(--transform-origin)] flex-col rounded-md bg-goldfinch-base px-3 py-1.5 text-xs text-goldfinch-default", "shadow-lg shadow-goldfinch-tip-shadow outline outline-goldfinch-fill"),
125
+ children: A
126
+ })
127
+ }) })]
128
+ }) }) : P,
129
+ /* @__PURE__ */ i("span", {
130
+ className: "sr-only",
131
+ "aria-live": "polite",
132
+ children: E ? j : ""
133
+ })
134
+ ]
135
+ });
136
+ });
137
+ x.displayName = "CopyToClipboard";
138
+ //#endregion
139
+ export { x as t };