@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,302 @@
1
+ import { cn as e } from "./utils.mjs";
2
+ import { t } from "./button-DDhP5P56.js";
3
+ import { t as n } from "./tooltip-QfSb4wnI.js";
4
+ import { t as r } from "./field-CZb7PLTY.js";
5
+ import { n as i } from "./input-variants-CZevxTd8.js";
6
+ import { t as a } from "./input-Bo8XL6_f.js";
7
+ import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
8
+ import l, { Children as u, cloneElement as d, createContext as f, forwardRef as p, isValidElement as m, useContext as h, useId as g, useMemo as _ } from "react";
9
+ //#region src/components/input-group/context.ts
10
+ var v = {
11
+ xs: {
12
+ inputOuter: "px-1.5",
13
+ addonOuterStart: "pl-1.5",
14
+ addonOuterEnd: "pr-1.5",
15
+ addonButtonOuterStart: "pl-1",
16
+ addonButtonOuterEnd: "pr-1",
17
+ suffixPad: "pr-1.5",
18
+ fontSize: "text-xs",
19
+ iconSize: 10
20
+ },
21
+ sm: {
22
+ inputOuter: "px-2",
23
+ addonOuterStart: "pl-1.5",
24
+ addonOuterEnd: "pr-1.5",
25
+ addonButtonOuterStart: "pl-1",
26
+ addonButtonOuterEnd: "pr-1",
27
+ suffixPad: "pr-2",
28
+ fontSize: "text-xs",
29
+ iconSize: 13
30
+ },
31
+ base: {
32
+ inputOuter: "px-3",
33
+ addonOuterStart: "pl-2",
34
+ addonOuterEnd: "pr-2",
35
+ addonButtonOuterStart: "pl-1",
36
+ addonButtonOuterEnd: "pr-1",
37
+ suffixPad: "pr-3",
38
+ fontSize: "text-base",
39
+ iconSize: 18
40
+ },
41
+ lg: {
42
+ inputOuter: "px-4",
43
+ addonOuterStart: "pl-2.5",
44
+ addonOuterEnd: "pr-2.5",
45
+ addonButtonOuterStart: "pl-1.5",
46
+ addonButtonOuterEnd: "pr-1.5",
47
+ suffixPad: "pr-4",
48
+ fontSize: "text-base",
49
+ iconSize: 20
50
+ }
51
+ }, y = {
52
+ xs: ["has-[[data-slot=input-group-addon-start]]:[&_input]:pl-1", "has-[[data-slot=input-group-addon-end]]:[&_input]:pr-1"].join(" "),
53
+ sm: ["has-[[data-slot=input-group-addon-start]]:[&_input]:pl-1.5", "has-[[data-slot=input-group-addon-end]]:[&_input]:pr-1.5"].join(" "),
54
+ base: ["has-[[data-slot=input-group-addon-start]]:[&_input]:pl-2", "has-[[data-slot=input-group-addon-end]]:[&_input]:pr-2"].join(" "),
55
+ lg: ["has-[[data-slot=input-group-addon-start]]:[&_input]:pl-2.5", "has-[[data-slot=input-group-addon-end]]:[&_input]:pr-2.5"].join(" ")
56
+ }, b = f(null), x = f(!1);
57
+ function S(e) {
58
+ let t = h(b);
59
+ return process.env.NODE_ENV !== "production" && !t && console.warn(`<InputGroup.${e}> must be used within <InputGroup>. Falling back to default values.`), t;
60
+ }
61
+ function C(e) {
62
+ let t = [], n = [];
63
+ return u.forEach(e, (e) => {
64
+ m(e) && e.type?.displayName === "InputGroup.Button" ? n.push(e) : t.push(e);
65
+ }), {
66
+ containerZone: t,
67
+ individualZone: n
68
+ };
69
+ }
70
+ function w(e) {
71
+ let t = !1, n = !1;
72
+ return u.forEach(e, (e) => {
73
+ if (!m(e)) return;
74
+ let r = e.type, i = typeof r == "function" || typeof r == "object" ? r.displayName : void 0;
75
+ if (i === "InputGroup.Addon") {
76
+ n = !0;
77
+ return;
78
+ }
79
+ if (i !== "InputGroup.Button") return;
80
+ let a = e.props.variant;
81
+ a !== void 0 && a !== "ghost" && (t = !0);
82
+ }), t && n ? "hybrid" : t ? "individual" : "container";
83
+ }
84
+ //#endregion
85
+ //#region src/components/input-group/input-group-input.tsx
86
+ var T = p((t, n) => {
87
+ let r = S("Input");
88
+ process.env.NODE_ENV !== "production" && r && (t.size !== void 0 && console.warn("InputGroup.Input: Set `size` on <InputGroup> instead of <InputGroup.Input>."), t.disabled !== void 0 && console.warn("InputGroup.Input: Set `disabled` on <InputGroup> instead of <InputGroup.Input>."), t.label !== void 0 && console.warn("InputGroup.Input: Use the `label` prop on <InputGroup> instead of <InputGroup.Input>."), t.description !== void 0 && console.warn("InputGroup.Input: Use <InputGroup.Suffix> instead of passing `description` to <InputGroup.Input>."));
89
+ let i = v[r?.size ?? "base"], o = r?.focusMode === "individual", c = !!r?.error, l = t.id ?? r?.inputId;
90
+ return /* @__PURE__ */ s(a, {
91
+ ref: n,
92
+ size: r?.size,
93
+ disabled: r?.disabled || t.disabled,
94
+ "aria-invalid": c || t["aria-invalid"],
95
+ ...t,
96
+ id: l,
97
+ className: e("flex h-full min-w-0 grow items-center rounded-none border-0 bg-transparent font-sans", i.inputOuter, "text-ellipsis", o ? [
98
+ "relative ring-0 focus:ring-0 border border-goldfinch-line",
99
+ "first:rounded-l-[inherit] last:rounded-r-[inherit]",
100
+ "not-first:-ml-px",
101
+ "hover:z-1 hover:border-goldfinch-line",
102
+ "focus:z-2 focus:border-goldfinch-focus/50"
103
+ ].join(" ") : "relative z-1 ring-0! shadow-none outline-none focus:ring-0! focus:outline-none", t.className)
104
+ });
105
+ });
106
+ T.displayName = "InputGroup.Input";
107
+ //#endregion
108
+ //#region src/components/input-group/input-group-button.tsx
109
+ var E = {
110
+ xs: "xs",
111
+ sm: "xs",
112
+ base: "sm",
113
+ lg: "base"
114
+ }, D = p(({ children: r, className: i, variant: a, size: o, disabled: c, tooltip: u, tooltipSide: d = "bottom", icon: f, ...p }, m) => {
115
+ let g = S("Button"), _ = h(x), y = c ?? g?.disabled, b = g?.focusMode === "individual" || g?.focusMode === "hybrid", C = a ?? "ghost";
116
+ process.env.NODE_ENV !== "production" && g && C === "ghost" && !_ && console.warn("InputGroup.Button: Ghost buttons should be wrapped in <InputGroup.Addon> for correct spacing."), process.env.NODE_ENV !== "production" && g && o !== void 0 && console.warn("InputGroup.Button: Set `size` on <InputGroup> instead of <InputGroup.Button>.");
117
+ let w = typeof u == "string" && !p["aria-label"] ? u : void 0, T = g ? v[g.size ?? "base"].iconSize : void 0, D = f && T && typeof f == "function" ? l.createElement(f, { size: T }) : f, O = /* @__PURE__ */ s(t, {
118
+ ref: m,
119
+ type: "button",
120
+ disabled: y,
121
+ "aria-label": w,
122
+ ...p,
123
+ icon: D,
124
+ variant: a ?? "ghost",
125
+ size: o ?? (b ? g?.size ?? "sm" : E[g?.size ?? "base"] ?? "sm"),
126
+ className: e("pointer-events-auto", "focus:ring-0", !b && "focus-visible:ring-[1.5px] focus-visible:ring-goldfinch-focus/50", b && [
127
+ "relative h-full! rounded-none ring-0 focus-visible:ring-0 border border-goldfinch-line",
128
+ "first:rounded-l-[inherit] last:rounded-r-[inherit]",
129
+ "not-first:-ml-px",
130
+ "hover:z-1",
131
+ "focus:z-2",
132
+ "focus-visible:border-goldfinch-focus/50",
133
+ "disabled:bg-goldfinch-overlay disabled:text-goldfinch-inactive!"
134
+ ], i),
135
+ children: r
136
+ });
137
+ return u ? /* @__PURE__ */ s(n, {
138
+ content: u,
139
+ side: d,
140
+ asChild: !0,
141
+ children: O
142
+ }) : O;
143
+ });
144
+ D.displayName = "InputGroup.Button";
145
+ //#endregion
146
+ //#region src/components/input-group/input-group-addon.tsx
147
+ var O = p(({ align: t = "start", className: n, children: r }, i) => {
148
+ let a = v[S("Addon")?.size ?? "base"], o = !1, c = u.map(r, (e) => m(e) ? e.type === D ? (o = !0, e) : e.props.size === void 0 ? d(e, { size: a.iconSize }) : e : e);
149
+ return /* @__PURE__ */ s("div", {
150
+ ref: i,
151
+ "data-slot": t === "start" ? "input-group-addon-start" : "input-group-addon-end",
152
+ className: e("relative z-[1] pointer-events-none flex shrink-0 items-center gap-1.5", "text-goldfinch-subtle", a.fontSize, "*:pointer-events-auto", t === "start" ? e("-order-1", o ? a.addonButtonOuterStart : a.addonOuterStart, "pr-0") : e("order-1", "pl-0", o ? a.addonButtonOuterEnd : a.addonOuterEnd), n),
153
+ children: /* @__PURE__ */ s(x.Provider, {
154
+ value: !0,
155
+ children: c
156
+ })
157
+ });
158
+ });
159
+ O.displayName = "InputGroup.Addon";
160
+ //#endregion
161
+ //#region src/components/input-group/input-group-suffix.tsx
162
+ var k = p(({ className: t, children: n }, r) => {
163
+ let i = v[S("Suffix")?.size ?? "base"];
164
+ return /* @__PURE__ */ s("div", {
165
+ ref: r,
166
+ "data-slot": "input-group-suffix",
167
+ className: e("pointer-events-none flex min-w-0 grow select-none items-center text-goldfinch-subtle", i.fontSize, i.suffixPad, t),
168
+ children: /* @__PURE__ */ s("span", {
169
+ className: "truncate",
170
+ children: n
171
+ })
172
+ });
173
+ });
174
+ k.displayName = "InputGroup.Suffix";
175
+ //#endregion
176
+ //#region src/components/input-group/input-group.tsx
177
+ var A = { size: {
178
+ xs: {
179
+ classes: "h-6 text-xs",
180
+ description: "Extra small size."
181
+ },
182
+ sm: {
183
+ classes: "h-7 text-xs",
184
+ description: "Small size."
185
+ },
186
+ base: {
187
+ classes: "h-9 text-base",
188
+ description: "Default size."
189
+ },
190
+ lg: {
191
+ classes: "h-11 text-base",
192
+ description: "Large size."
193
+ }
194
+ } }, j = { size: "base" }, M = p(({ size: t = "base", children: n, className: a, disabled: l = !1, label: u, description: d, error: f, required: p, labelTooltip: m, ...h }, v) => {
195
+ let x = g(), S = w(n), T = _(() => ({
196
+ size: t,
197
+ focusMode: S,
198
+ disabled: l,
199
+ error: f,
200
+ inputId: x
201
+ }), [
202
+ t,
203
+ S,
204
+ l,
205
+ f,
206
+ x
207
+ ]), E = e("relative w-full cursor-text", i({ size: t }), "shadow-xs", "data-[disabled]:pointer-events-none data-[disabled]:opacity-50", S === "container" ? ["overflow-hidden", "focus-within:ring-goldfinch-focus/50 focus-within:ring-[1.5px]"] : "isolate overflow-visible ring-0 shadow-none", "has-[input[aria-invalid=true]]:ring-goldfinch-danger", "px-0", "flex items-center gap-0", "has-[[data-slot=input-group-suffix]]:[&_input]:[field-sizing:content]", "has-[[data-slot=input-group-suffix]]:[&_input]:max-w-full", "has-[[data-slot=input-group-suffix]]:[&_input]:grow-0", "has-[[data-slot=input-group-suffix]]:[&_input]:pr-0", y[t], "!mb-0", a), D = {
208
+ "data-slot": "input-group",
209
+ "data-focus-mode": S,
210
+ "data-disabled": l ? "" : void 0
211
+ };
212
+ if (S === "hybrid") {
213
+ let { containerZone: a, individualZone: l } = C(n), g = {
214
+ ...T,
215
+ focusMode: "container"
216
+ }, _ = /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s(b.Provider, {
217
+ value: g,
218
+ children: /* @__PURE__ */ c("div", {
219
+ "data-slot": "input-group-container-zone",
220
+ className: e(i({ size: t }), "overflow-hidden", "has-[input[aria-invalid=true]]:ring-goldfinch-danger", "px-0", "flex min-w-0 flex-1 items-center gap-0", "ring-0 shadow-none", "border border-goldfinch-line", "focus-within:border-goldfinch-focus/50", "focus-within:z-2", "not-first:-ml-px", "first:rounded-l-[inherit] last:rounded-r-[inherit] rounded-none", y[t], "has-data-[slot=input-group-suffix]:[&_input]:field-sizing-content", "has-data-[slot=input-group-suffix]:[&_input]:max-w-full", "has-data-[slot=input-group-suffix]:[&_input]:grow-0", "has-data-[slot=input-group-suffix]:[&_input]:pr-0"),
221
+ children: [u && /* @__PURE__ */ s("label", {
222
+ htmlFor: x,
223
+ className: "absolute inset-0 z-0 cursor-text mb-0!",
224
+ "aria-hidden": "true"
225
+ }), a]
226
+ })
227
+ }), l] }), S = /* @__PURE__ */ s(b.Provider, {
228
+ value: T,
229
+ children: /* @__PURE__ */ s("div", {
230
+ ref: v,
231
+ ...D,
232
+ className: E,
233
+ ...h,
234
+ children: _
235
+ })
236
+ });
237
+ return u ? /* @__PURE__ */ s(r, {
238
+ label: u,
239
+ description: d,
240
+ error: f,
241
+ required: p,
242
+ labelTooltip: m,
243
+ children: S
244
+ }) : S;
245
+ }
246
+ let O = !u && S === "container", k = /* @__PURE__ */ s(b.Provider, {
247
+ value: T,
248
+ children: u ? /* @__PURE__ */ c("div", {
249
+ ref: v,
250
+ ...D,
251
+ className: E,
252
+ ...h,
253
+ children: [/* @__PURE__ */ s("label", {
254
+ htmlFor: x,
255
+ className: "absolute inset-0 z-0 mb-0!",
256
+ "aria-hidden": "true"
257
+ }), n]
258
+ }) : O ? /* @__PURE__ */ s("label", {
259
+ ref: v,
260
+ ...D,
261
+ className: e(E, "mb-0!"),
262
+ ...h,
263
+ children: n
264
+ }) : /* @__PURE__ */ s("div", {
265
+ ref: v,
266
+ ...D,
267
+ className: E,
268
+ ...h,
269
+ children: n
270
+ })
271
+ });
272
+ return u ? /* @__PURE__ */ s(r, {
273
+ label: u,
274
+ description: d,
275
+ error: f,
276
+ required: p,
277
+ labelTooltip: m,
278
+ children: k
279
+ }) : k;
280
+ });
281
+ M.displayName = "InputGroup";
282
+ var N = p((e, t) => /* @__PURE__ */ s(O, {
283
+ ref: t,
284
+ align: "start",
285
+ ...e
286
+ }));
287
+ N.displayName = "InputGroup.Label";
288
+ var P = p((e, t) => /* @__PURE__ */ s(k, {
289
+ ref: t,
290
+ ...e
291
+ }));
292
+ P.displayName = "InputGroup.Description";
293
+ var F = Object.assign(M, {
294
+ Input: T,
295
+ Button: D,
296
+ Addon: O,
297
+ Suffix: k,
298
+ Label: N,
299
+ Description: P
300
+ });
301
+ //#endregion
302
+ export { A as n, F as r, j as t };
@@ -0,0 +1,41 @@
1
+ import { cn as e } from "./utils.mjs";
2
+ import { t } from "./resolve-variant-DWiDeQhX.js";
3
+ //#region src/components/input/input-variants.ts
4
+ var n = {
5
+ size: {
6
+ xs: {
7
+ classes: "h-5 gap-1 rounded-sm px-1.5 text-xs",
8
+ description: "Extra small input for compact UIs"
9
+ },
10
+ sm: {
11
+ classes: "h-6.5 gap-1 rounded-md px-2 text-xs",
12
+ description: "Small input for secondary fields"
13
+ },
14
+ base: {
15
+ classes: "h-9 gap-1.5 rounded-lg px-3 text-base",
16
+ description: "Default input size"
17
+ },
18
+ lg: {
19
+ classes: "h-10 gap-2 rounded-lg px-4 text-base",
20
+ description: "Large input for prominent fields"
21
+ }
22
+ },
23
+ variant: {
24
+ default: {
25
+ classes: "focus:ring-goldfinch-focus/50 focus:ring-[1.5px]",
26
+ description: "Default input appearance"
27
+ },
28
+ error: {
29
+ classes: "!ring-goldfinch-danger focus:ring-goldfinch-danger/50 focus:ring-[1.5px]",
30
+ description: "Error state for validation failures"
31
+ }
32
+ }
33
+ }, r = {
34
+ size: "base",
35
+ variant: "default"
36
+ };
37
+ function i({ variant: i = r.variant, size: a = r.size, parentFocusIndicator: o = !1, focusIndicator: s = !1 } = {}) {
38
+ return e("border-0 bg-goldfinch-control text-goldfinch-default ring ring-goldfinch-line outline-none focus:outline-none", "goldfinch-input-placeholder disabled:text-goldfinch-disabled", t(n.size, a, r.size).classes, t(n.variant, i, r.variant).classes, o && (i === "error" ? "focus-within:ring-goldfinch-danger/50 focus-within:ring-[1.5px]" : "focus-within:ring-goldfinch-focus/50 focus-within:ring-[1.5px]"), s && (i === "error" ? "focus:ring-goldfinch-danger/50 focus:ring-[1.5px]" : "focus:ring-goldfinch-focus/50 focus:ring-[1.5px]"));
39
+ }
40
+ //#endregion
41
+ export { i as n, n as t };
@@ -0,0 +1,43 @@
1
+ import { cn as e } from "./utils.mjs";
2
+ import { t } from "./button-DDhP5P56.js";
3
+ import { t as n } from "./tooltip-QfSb4wnI.js";
4
+ import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
5
+ import { Info as o } from "@phosphor-icons/react";
6
+ //#region src/components/label/label.tsx
7
+ var s = {}, c = {};
8
+ function l(t = {}) {
9
+ return e("m-0 text-base font-medium text-goldfinch-default");
10
+ }
11
+ function u() {
12
+ return e("inline-flex items-center gap-1");
13
+ }
14
+ function d({ children: s, showOptional: c = !1, tooltip: d, className: f, htmlFor: p, asContent: m = !1 }) {
15
+ let h = /* @__PURE__ */ a(r, { children: [
16
+ s,
17
+ c && /* @__PURE__ */ i("span", {
18
+ className: "font-normal text-goldfinch-subtle",
19
+ children: "(optional)"
20
+ }),
21
+ d && /* @__PURE__ */ i(n, {
22
+ content: d,
23
+ render: /* @__PURE__ */ i(t, {
24
+ variant: "ghost",
25
+ size: "xs",
26
+ shape: "square",
27
+ "aria-label": "More information",
28
+ children: /* @__PURE__ */ i(o, { className: "size-4" })
29
+ })
30
+ })
31
+ ] });
32
+ return m ? /* @__PURE__ */ i("span", {
33
+ className: e(u(), f),
34
+ children: h
35
+ }) : /* @__PURE__ */ i("label", {
36
+ htmlFor: p,
37
+ className: e(l(), u(), f),
38
+ children: h
39
+ });
40
+ }
41
+ d.displayName = "Label";
42
+ //#endregion
43
+ export { l as a, u as i, s as n, d as r, c as t };
@@ -0,0 +1,21 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { createContext as t, forwardRef as n, useContext as r } from "react";
3
+ //#region src/utils/link-provider.tsx
4
+ var i = n(function({ to: t, href: n, ...r }, i) {
5
+ return /* @__PURE__ */ e("a", {
6
+ ref: i,
7
+ href: n ?? t ?? void 0,
8
+ ...r
9
+ });
10
+ }), a = t(i);
11
+ function o() {
12
+ return r(a);
13
+ }
14
+ function s({ component: t, children: n }) {
15
+ return /* @__PURE__ */ e(a.Provider, {
16
+ value: t ?? i,
17
+ children: n
18
+ });
19
+ }
20
+ //#endregion
21
+ export { o as n, s as t };
@@ -0,0 +1,59 @@
1
+ import { cn as e } from "./utils.mjs";
2
+ import { t } from "./tooltip-QfSb4wnI.js";
3
+ import { jsx as n } from "react/jsx-runtime";
4
+ import { useEffect as r, useRef as i } from "react";
5
+ import { IconContext as a } from "@phosphor-icons/react";
6
+ //#region src/components/menubar/use-menu-navigation.ts
7
+ var o = ({ menuRef: e, direction: t = "horizontal" }) => {
8
+ let n = i(null);
9
+ r(() => {
10
+ if (!e.current) return;
11
+ let r = Array.from(e.current.querySelectorAll("a, button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"])"));
12
+ if (r.length === 0) return;
13
+ let i = (e) => {
14
+ if (!n.current) return;
15
+ let i = r.indexOf(n.current), a = i, o = t === "horizontal", s = o ? "ArrowRight" : "ArrowDown", c = o ? "ArrowLeft" : "ArrowUp";
16
+ if (e.key === s) e.preventDefault(), a = (i + 1) % r.length;
17
+ else if (e.key === c) e.preventDefault(), a = (i - 1 + r.length) % r.length;
18
+ else return;
19
+ let l = r[a];
20
+ n.current = l, l.focus();
21
+ }, a = () => document.addEventListener("keydown", i), o = () => document.removeEventListener("keydown", i), s = () => {
22
+ n.current = document.activeElement, a();
23
+ }, c = () => {
24
+ n.current = null, o();
25
+ };
26
+ return e.current.addEventListener("focusin", s), e.current.addEventListener("focusout", c), () => {
27
+ e.current?.removeEventListener("focusin", s), e.current?.removeEventListener("focusout", c), o();
28
+ };
29
+ }, [e, t]);
30
+ }, s = ({ icon: r, id: i, isActive: o, onClick: s, tooltip: c }) => /* @__PURE__ */ n(t, {
31
+ content: c,
32
+ render: /* @__PURE__ */ n("button", {
33
+ "data-goldfinch-component": "MenuBar",
34
+ "data-goldfinch-part": "option",
35
+ "aria-label": c,
36
+ className: e("relative -ml-px flex h-full w-11 cursor-pointer items-center justify-center rounded-md border-none bg-goldfinch-recessed first:rounded-l-lg last:rounded-r-lg transition-colors focus:z-3 focus:outline-none focus:ring-goldfinch-focus/50 focus-visible:z-3 focus-visible:ring-2 focus-visible:ring-goldfinch-brand", { "z-2 bg-goldfinch-base shadow-xs transition-colors": o === i }),
37
+ onClick: s,
38
+ children: /* @__PURE__ */ n(a.Provider, {
39
+ value: { size: 18 },
40
+ children: r
41
+ })
42
+ })
43
+ }), c = ({ className: t, isActive: r, options: a, optionIds: c = !1 }) => {
44
+ let l = i(null);
45
+ return o({
46
+ menuRef: l,
47
+ direction: "horizontal"
48
+ }), /* @__PURE__ */ n("nav", {
49
+ className: e("isolate flex rounded-lg ring ring-goldfinch-line bg-goldfinch-recessed pl-px shadow-xs transition-colors", t),
50
+ ref: l,
51
+ children: a.map((e, t) => /* @__PURE__ */ n(s, {
52
+ ...e,
53
+ isActive: r,
54
+ id: c ? e.id : t
55
+ }, t))
56
+ });
57
+ };
58
+ //#endregion
59
+ export { o as n, c as t };
@@ -0,0 +1,132 @@
1
+ import { cn as e } from "./utils.mjs";
2
+ import { t } from "./resolve-variant-DWiDeQhX.js";
3
+ import { n } from "./portal-provider-CWX8j9O1.js";
4
+ import { t as r } from "./card-CVUWZOar.js";
5
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
+ import { createContext as o, useContext as s } from "react";
7
+ import { Dialog as c } from "@base-ui/react/dialog";
8
+ import { AlertDialog as l } from "@base-ui/react/alert-dialog";
9
+ //#region src/components/modal/modal.tsx
10
+ var u = {
11
+ size: {
12
+ base: {
13
+ classes: "sm:min-w-96",
14
+ description: "Default modal width"
15
+ },
16
+ sm: {
17
+ classes: "min-w-72",
18
+ description: "Small modal for simple confirmations"
19
+ },
20
+ lg: {
21
+ classes: "min-w-[32rem]",
22
+ description: "Large modal for complex content"
23
+ },
24
+ xl: {
25
+ classes: "min-w-[48rem]",
26
+ description: "Extra large modal for detailed views"
27
+ }
28
+ },
29
+ role: {
30
+ dialog: {
31
+ classes: "",
32
+ description: "Standard modal for general-purpose modals"
33
+ },
34
+ alertdialog: {
35
+ classes: "",
36
+ description: "Alert modal for confirmation flows requiring explicit user acknowledgment"
37
+ }
38
+ }
39
+ }, d = {
40
+ size: "base",
41
+ role: "dialog"
42
+ }, f = o("dialog");
43
+ function p() {
44
+ return s(f);
45
+ }
46
+ function m({ size: n = d.size } = {}) {
47
+ return e("shadow-m ring ring-goldfinch-line fixed top-1/2 left-1/2 w-full sm:w-auto max-w-[calc(100vw-2rem)] -translate-x-1/2 -translate-y-1/2 overflow-hidden rounded-xl bg-goldfinch-base text-goldfinch-default p-6 duration-150 data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-90 data-starting-style:opacity-0", t(u.size, n, d.size).classes);
48
+ }
49
+ function h({ className: t, children: o, style: s, size: u = d.size, container: f }) {
50
+ let h = p(), g = n(), _ = f ?? g ?? void 0, v = h === "alertdialog" ? l.Portal : c.Portal, y = h === "alertdialog" ? l.Backdrop : c.Backdrop, b = h === "alertdialog" ? l.Popup : c.Popup;
51
+ return /* @__PURE__ */ a(v, {
52
+ container: _,
53
+ children: [/* @__PURE__ */ i(y, { className: "fixed inset-0 bg-goldfinch-recessed opacity-80 transition-all duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0" }), /* @__PURE__ */ i(r, {
54
+ render: /* @__PURE__ */ i(b, {}),
55
+ className: e(m({ size: u }), t),
56
+ style: {
57
+ transitionProperty: "scale, opacity",
58
+ transitionTimingFunction: "var(--default-transition-timing-function)",
59
+ "--tw-shadow": "0 20px 25px -5px rgb(0 0 0 / 0.03), 0 8px 10px -6px rgb(0 0 0 / 0.03)",
60
+ ...s
61
+ },
62
+ children: o
63
+ })]
64
+ });
65
+ }
66
+ function g(e) {
67
+ if (e.role === "alertdialog") {
68
+ let { children: t, role: n, ...r } = e;
69
+ return /* @__PURE__ */ i(f.Provider, {
70
+ value: n,
71
+ children: /* @__PURE__ */ i(l.Root, {
72
+ ...r,
73
+ children: t
74
+ })
75
+ });
76
+ }
77
+ let { children: t, role: n = d.role, ...r } = e;
78
+ return /* @__PURE__ */ i(f.Provider, {
79
+ value: n,
80
+ children: /* @__PURE__ */ i(c.Root, {
81
+ ...r,
82
+ children: t
83
+ })
84
+ });
85
+ }
86
+ g.displayName = "Modal.Root";
87
+ function _({ children: e, ...t }) {
88
+ return p() === "alertdialog" ? /* @__PURE__ */ i(l.Trigger, {
89
+ "data-goldfinch-component": "Modal",
90
+ "data-goldfinch-part": "trigger",
91
+ ...t,
92
+ children: e
93
+ }) : /* @__PURE__ */ i(c.Trigger, {
94
+ "data-goldfinch-component": "Modal",
95
+ "data-goldfinch-part": "trigger",
96
+ ...t,
97
+ children: e
98
+ });
99
+ }
100
+ _.displayName = "Modal.Trigger";
101
+ function v({ className: e, ...t }) {
102
+ return /* @__PURE__ */ i(p() === "alertdialog" ? l.Title : c.Title, {
103
+ className: e,
104
+ ...t
105
+ });
106
+ }
107
+ v.displayName = "Modal.Title";
108
+ function y({ className: e, ...t }) {
109
+ return /* @__PURE__ */ i(p() === "alertdialog" ? l.Description : c.Description, {
110
+ className: e,
111
+ ...t
112
+ });
113
+ }
114
+ y.displayName = "Modal.Description";
115
+ function b({ children: e, ...t }) {
116
+ return /* @__PURE__ */ i(p() === "alertdialog" ? l.Close : c.Close, {
117
+ "data-goldfinch-component": "Modal",
118
+ "data-goldfinch-part": "close",
119
+ ...t,
120
+ children: e
121
+ });
122
+ }
123
+ b.displayName = "Modal.Close";
124
+ var x = Object.assign(h, {
125
+ Root: g,
126
+ Trigger: _,
127
+ Title: v,
128
+ Description: y,
129
+ Close: b
130
+ });
131
+ //#endregion
132
+ export { v as a, g as i, b as n, _ as o, y as r, x as t };
@@ -0,0 +1,60 @@
1
+ import { cn as e } from "./utils.mjs";
2
+ import { t } from "./resolve-variant-DWiDeQhX.js";
3
+ import { jsx as n } from "react/jsx-runtime";
4
+ import { forwardRef as r } from "react";
5
+ //#region src/components/page/page.tsx
6
+ var i = { size: {
7
+ sm: {
8
+ classes: "max-w-3xl",
9
+ description: "Narrow page width (48rem)"
10
+ },
11
+ base: {
12
+ classes: "max-w-5xl",
13
+ description: "Default page width (64rem)"
14
+ },
15
+ lg: {
16
+ classes: "max-w-7xl",
17
+ description: "Wide page width (80rem)"
18
+ },
19
+ full: {
20
+ classes: "max-w-none",
21
+ description: "Full width, no max-width constraint"
22
+ }
23
+ } }, a = { size: "base" };
24
+ function o({ size: n = a.size } = {}) {
25
+ return e("mx-auto w-full px-4 sm:px-6 lg:px-8 py-6", t(i.size, n, a.size).classes);
26
+ }
27
+ var s = r(function({ size: t = "base", children: r, className: i, ...a }, s) {
28
+ return /* @__PURE__ */ n("div", {
29
+ ref: s,
30
+ className: e(o({ size: t }), i),
31
+ ...a,
32
+ children: r
33
+ });
34
+ });
35
+ function c({ children: t, className: r }) {
36
+ return /* @__PURE__ */ n("h1", {
37
+ className: e("text-2xl font-semibold tracking-tight text-goldfinch-strong", r),
38
+ children: t
39
+ });
40
+ }
41
+ function l({ children: t, className: r }) {
42
+ return /* @__PURE__ */ n("p", {
43
+ className: e("text-sm text-goldfinch-subtle", r),
44
+ children: t
45
+ });
46
+ }
47
+ function u({ children: t, className: r }) {
48
+ return /* @__PURE__ */ n("div", {
49
+ className: e("mb-1 text-xs text-goldfinch-subtle", r),
50
+ children: t
51
+ });
52
+ }
53
+ s.displayName = "Page", c.displayName = "Page.Title", l.displayName = "Page.Description", u.displayName = "Page.Breadcrumbs";
54
+ var d = Object.assign(s, {
55
+ Title: c,
56
+ Description: l,
57
+ Breadcrumbs: u
58
+ });
59
+ //#endregion
60
+ export { o as i, i as n, d as r, a as t };