@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,196 @@
|
|
|
1
|
+
import { ToastManagerAddOptions, ToastObject } from '@base-ui/react/toast';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { ButtonProps } from '../../components/button';
|
|
4
|
+
import { PortalContainer } from '../../utils/portal-provider';
|
|
5
|
+
/**
|
|
6
|
+
* Toast styling configuration for Figma plugin consumption.
|
|
7
|
+
* Toast has no user-facing variants but documents the styling structure.
|
|
8
|
+
*/
|
|
9
|
+
export declare const GOLDFINCH_TOAST_VARIANTS: {
|
|
10
|
+
readonly root: {
|
|
11
|
+
readonly classes: "rounded-lg border border-goldfinch-fill bg-goldfinch-control p-4 shadow-lg text-goldfinch-default";
|
|
12
|
+
readonly description: "Toast container with background, border, and shadow";
|
|
13
|
+
};
|
|
14
|
+
readonly title: {
|
|
15
|
+
readonly classes: "text-[0.975rem] leading-5 font-medium text-goldfinch-default";
|
|
16
|
+
readonly description: "Toast title with primary text color";
|
|
17
|
+
};
|
|
18
|
+
readonly description: {
|
|
19
|
+
readonly classes: "text-[0.925rem] leading-5 text-goldfinch-subtle";
|
|
20
|
+
readonly description: "Toast description with muted text color";
|
|
21
|
+
};
|
|
22
|
+
readonly close: {
|
|
23
|
+
readonly classes: "absolute top-2 right-2 size-5 rounded text-goldfinch-subtle hover:bg-current/15";
|
|
24
|
+
readonly description: "Button-based close control with variant-aware hover tint";
|
|
25
|
+
};
|
|
26
|
+
readonly variant: {
|
|
27
|
+
readonly default: {
|
|
28
|
+
readonly classes: "border-goldfinch-fill bg-goldfinch-base";
|
|
29
|
+
readonly description: "Default toast style";
|
|
30
|
+
};
|
|
31
|
+
readonly success: {
|
|
32
|
+
readonly classes: "ring-[0.3px] ring-goldfinch-success bg-goldfinch-base [&_[data-toast-icon]]:text-goldfinch-success [&_[data-toast-title]]:text-goldfinch-success";
|
|
33
|
+
readonly description: "Success toast for confirmations and positive outcomes";
|
|
34
|
+
readonly icon: import('@phosphor-icons/react').Icon;
|
|
35
|
+
};
|
|
36
|
+
readonly error: {
|
|
37
|
+
readonly classes: "ring-[0.3px] ring-goldfinch-danger bg-goldfinch-base [&_[data-toast-icon]]:text-goldfinch-danger [&_[data-toast-title]]:text-goldfinch-danger";
|
|
38
|
+
readonly description: "Error toast for critical issues";
|
|
39
|
+
readonly icon: import('@phosphor-icons/react').Icon;
|
|
40
|
+
};
|
|
41
|
+
readonly warning: {
|
|
42
|
+
readonly classes: "ring-[0.3px] ring-goldfinch-warning bg-goldfinch-base [&_[data-toast-icon]]:text-goldfinch-warning [&_[data-toast-title]]:text-goldfinch-warning";
|
|
43
|
+
readonly description: "Warning toast for cautionary messages";
|
|
44
|
+
readonly icon: import('@phosphor-icons/react').Icon;
|
|
45
|
+
};
|
|
46
|
+
readonly info: {
|
|
47
|
+
readonly classes: "ring-[0.3px] ring-goldfinch-info bg-goldfinch-control [&_[data-toast-icon]]:text-goldfinch-info [&_[data-toast-title]]:text-goldfinch-info";
|
|
48
|
+
readonly description: "Info toast for neutral informational messages";
|
|
49
|
+
readonly icon: import('@phosphor-icons/react').Icon;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
export declare const GOLDFINCH_TOAST_DEFAULT_VARIANTS: {
|
|
54
|
+
readonly variant: "default";
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Toast styling configuration for Figma plugin consumption.
|
|
58
|
+
* Provides structured metadata for generating Toast components in Figma.
|
|
59
|
+
*/
|
|
60
|
+
export declare const GOLDFINCH_TOAST_STYLING: {
|
|
61
|
+
readonly container: {
|
|
62
|
+
readonly width: 300;
|
|
63
|
+
readonly padding: 16;
|
|
64
|
+
readonly borderRadius: 8;
|
|
65
|
+
readonly background: "bg-goldfinch-base";
|
|
66
|
+
readonly border: "ring-[0.3px] ring-goldfinch-hairline";
|
|
67
|
+
readonly shadow: "shadow-lg";
|
|
68
|
+
readonly gap: 4;
|
|
69
|
+
};
|
|
70
|
+
readonly title: {
|
|
71
|
+
readonly fontSize: 16;
|
|
72
|
+
readonly fontWeight: 500;
|
|
73
|
+
readonly color: "text-color-surface";
|
|
74
|
+
};
|
|
75
|
+
readonly description: {
|
|
76
|
+
readonly fontSize: 15;
|
|
77
|
+
readonly fontWeight: 400;
|
|
78
|
+
readonly color: "text-color-muted";
|
|
79
|
+
};
|
|
80
|
+
readonly closeButton: {
|
|
81
|
+
readonly size: 20;
|
|
82
|
+
readonly iconSize: 16;
|
|
83
|
+
readonly iconName: "ph-x";
|
|
84
|
+
readonly iconColor: "text-color-muted";
|
|
85
|
+
readonly hoverBackground: "color-color-2";
|
|
86
|
+
readonly hoverColor: "text-color-label";
|
|
87
|
+
readonly borderRadius: 4;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
export type GoldfinchToastVariant = keyof typeof GOLDFINCH_TOAST_VARIANTS.variant;
|
|
91
|
+
export interface GoldfinchToastVariantsProps {
|
|
92
|
+
variant?: GoldfinchToastVariant;
|
|
93
|
+
}
|
|
94
|
+
export declare function toastVariants({ variant, }?: GoldfinchToastVariantsProps): string;
|
|
95
|
+
/**
|
|
96
|
+
* Toasty component props.
|
|
97
|
+
*
|
|
98
|
+
* Wrap your app with `<Toasty>` to enable toast notifications.
|
|
99
|
+
* Use `Toast.useToastManager().notify(…)` to create toasts.
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* ```tsx
|
|
103
|
+
* // 1. Wrap your app
|
|
104
|
+
* <Toasty>
|
|
105
|
+
* <App />
|
|
106
|
+
* </Toasty>
|
|
107
|
+
*
|
|
108
|
+
* // 2. Show a toast from any child component
|
|
109
|
+
* const toasts = Toast.useToastManager();
|
|
110
|
+
* toasts.notify({ title: "Saved", description: "Changes saved successfully." });
|
|
111
|
+
* ```
|
|
112
|
+
*
|
|
113
|
+
* @example Dispatching toasts from non-React-component code
|
|
114
|
+
* ```tsx
|
|
115
|
+
* // 1. Create a manager at module scope
|
|
116
|
+
* import { createGoldfinchToastManager } from "@catiarodrigues/goldfinch";
|
|
117
|
+
* export const appToastManager = createGoldfinchToastManager();
|
|
118
|
+
*
|
|
119
|
+
* // 2. Pass it to <Toasty>
|
|
120
|
+
* <Toasty toastManager={appToastManager}>
|
|
121
|
+
* <App />
|
|
122
|
+
* </Toasty>
|
|
123
|
+
*
|
|
124
|
+
* // 3. Dispatch from anywhere — timers, callbacks, query-cache listeners
|
|
125
|
+
* appToastManager.add({ title: "Saved" });
|
|
126
|
+
* ```
|
|
127
|
+
*/
|
|
128
|
+
export interface ToastyProps extends GoldfinchToastVariantsProps {
|
|
129
|
+
/** Application content. Toasts render via a portal above this. */
|
|
130
|
+
children: React.ReactNode;
|
|
131
|
+
/**
|
|
132
|
+
* Container element for the portal. Use this to render toasts inside
|
|
133
|
+
* a Shadow DOM or custom container. Overrides `GoldfinchPortalProvider` context.
|
|
134
|
+
* @default document.body (or GoldfinchPortalProvider container if set)
|
|
135
|
+
*/
|
|
136
|
+
container?: PortalContainer;
|
|
137
|
+
/**
|
|
138
|
+
* Optional toast manager created by `createGoldfinchToastManager()`. When
|
|
139
|
+
* provided, allows code outside the React tree (timers, module-load
|
|
140
|
+
* callbacks, query-cache listeners) to dispatch toasts via the same
|
|
141
|
+
* dedupe-aware manager that `useGoldfinchToastManager()` returns inside the
|
|
142
|
+
* tree.
|
|
143
|
+
*
|
|
144
|
+
* Forwarded to the underlying `@base-ui/react/toast` `Toast.Provider`
|
|
145
|
+
* `toastManager` prop — see
|
|
146
|
+
* https://base-ui.com/react/components/toast for the upstream primitive.
|
|
147
|
+
*/
|
|
148
|
+
toastManager?: ReturnType<typeof createGoldfinchToastManager>;
|
|
149
|
+
}
|
|
150
|
+
type GoldfinchToastOptionsBase = {
|
|
151
|
+
variant?: GoldfinchToastVariant;
|
|
152
|
+
content?: React.ReactNode;
|
|
153
|
+
actions?: Array<ButtonProps>;
|
|
154
|
+
bump?: boolean;
|
|
155
|
+
};
|
|
156
|
+
export type GoldfinchToastOptions<Data extends object> = ToastObject<Data> & GoldfinchToastOptionsBase;
|
|
157
|
+
export type GoldfinchToastManagerAddOptions<Data extends object> = ToastManagerAddOptions<Data> & GoldfinchToastOptionsBase;
|
|
158
|
+
export declare const useGoldfinchToastManager: () => {
|
|
159
|
+
toasts: Array<GoldfinchToastOptions<any>>;
|
|
160
|
+
add: (<T extends any = any>(options: ToastManagerAddOptions<T>) => string) & ((options: GoldfinchToastManagerAddOptions<any>) => any);
|
|
161
|
+
close: (toastId?: string) => void;
|
|
162
|
+
update: (<T extends any = any>(toastId: string, options: import('@base-ui/react').ToastManagerUpdateOptions<T>) => void) & ((id: string, options: Partial<GoldfinchToastManagerAddOptions<any>>) => any);
|
|
163
|
+
promise: (<Value, T extends any = any>(promise: Promise<Value>, options: import('@base-ui/react').ToastManagerPromiseOptions<Value, T>) => Promise<Value>) & (<T>(promise: Promise<T>, options: {
|
|
164
|
+
loading: GoldfinchToastManagerAddOptions<any>;
|
|
165
|
+
success: GoldfinchToastManagerAddOptions<any> | ((data: T) => GoldfinchToastManagerAddOptions<any>);
|
|
166
|
+
error: GoldfinchToastManagerAddOptions<any> | ((error: Error) => GoldfinchToastManagerAddOptions<any>);
|
|
167
|
+
}) => any);
|
|
168
|
+
};
|
|
169
|
+
export declare const createGoldfinchToastManager: () => import('@base-ui/react').ToastManager<any> & {
|
|
170
|
+
add: (options: GoldfinchToastManagerAddOptions<any>) => any;
|
|
171
|
+
update: (id: string, options: Partial<GoldfinchToastManagerAddOptions<any>>) => any;
|
|
172
|
+
promise: <T>(promise: Promise<T>, options: {
|
|
173
|
+
loading: GoldfinchToastManagerAddOptions<any>;
|
|
174
|
+
success: GoldfinchToastManagerAddOptions<any> | ((data: T) => GoldfinchToastManagerAddOptions<any>);
|
|
175
|
+
error: GoldfinchToastManagerAddOptions<any> | ((error: Error) => GoldfinchToastManagerAddOptions<any>);
|
|
176
|
+
}) => any;
|
|
177
|
+
};
|
|
178
|
+
/**
|
|
179
|
+
* Toasty — toast notification provider and viewport.
|
|
180
|
+
*
|
|
181
|
+
* Renders a `Toast.Provider` with a fixed-position viewport in the bottom-right corner.
|
|
182
|
+
* Toasts stack with smooth enter/exit animations, swipe-to-dismiss, and expand-on-hover.
|
|
183
|
+
*
|
|
184
|
+
* Built on `@base-ui/react/toast`.
|
|
185
|
+
*
|
|
186
|
+
* @example
|
|
187
|
+
* ```tsx
|
|
188
|
+
* <Toasty>
|
|
189
|
+
* <App />
|
|
190
|
+
* </Toasty>
|
|
191
|
+
* ```
|
|
192
|
+
*/
|
|
193
|
+
export declare function Toasty({ children, container: containerProp, toastManager, }: ToastyProps): React.JSX.Element;
|
|
194
|
+
/** Alias for Toasty — provided for discoverability when migrating from other libraries */
|
|
195
|
+
export declare const ToastProvider: typeof Toasty;
|
|
196
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Toggle, GOLDFINCH_TOGGLE_VARIANTS, GOLDFINCH_TOGGLE_DEFAULT_VARIANTS, type ToggleProps, type ToggleLegendProps, type ToggleGroupProps, type ToggleItemProps, type GoldfinchToggleSize, type GoldfinchToggleVariant, type ToggleSize, type ToggleVariant, } from './toggle';
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
/** Toggle size and variant definitions mapping names to their Tailwind classes. */
|
|
3
|
+
export declare const GOLDFINCH_TOGGLE_VARIANTS: {
|
|
4
|
+
readonly size: {
|
|
5
|
+
readonly sm: {
|
|
6
|
+
readonly classes: "h-5.5 w-8.5";
|
|
7
|
+
readonly description: "Small toggle for compact UIs";
|
|
8
|
+
};
|
|
9
|
+
readonly base: {
|
|
10
|
+
readonly classes: "h-6.5 w-10.5";
|
|
11
|
+
readonly description: "Default toggle size";
|
|
12
|
+
};
|
|
13
|
+
readonly lg: {
|
|
14
|
+
readonly classes: "h-7.5 w-12.5";
|
|
15
|
+
readonly description: "Large toggle for prominent toggles";
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
readonly variant: {
|
|
19
|
+
readonly default: {
|
|
20
|
+
readonly classes: "";
|
|
21
|
+
readonly description: "Default toggle with pill shape";
|
|
22
|
+
};
|
|
23
|
+
readonly neutral: {
|
|
24
|
+
readonly classes: "";
|
|
25
|
+
readonly description: "Monochrome toggle with pill shape for subtle toggles";
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export declare const GOLDFINCH_TOGGLE_DEFAULT_VARIANTS: {
|
|
30
|
+
readonly size: "base";
|
|
31
|
+
readonly variant: "default";
|
|
32
|
+
};
|
|
33
|
+
export type GoldfinchToggleSize = keyof typeof GOLDFINCH_TOGGLE_VARIANTS.size;
|
|
34
|
+
export type GoldfinchToggleVariant = keyof typeof GOLDFINCH_TOGGLE_VARIANTS.variant;
|
|
35
|
+
export interface GoldfinchToggleVariantsProps {
|
|
36
|
+
size?: GoldfinchToggleSize;
|
|
37
|
+
variant?: GoldfinchToggleVariant;
|
|
38
|
+
}
|
|
39
|
+
export declare function toggleVariants({ size, variant, }?: GoldfinchToggleVariantsProps): string;
|
|
40
|
+
export type ToggleSize = GoldfinchToggleSize;
|
|
41
|
+
export type ToggleVariant = GoldfinchToggleVariant;
|
|
42
|
+
export type ToggleProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children"> & {
|
|
43
|
+
variant?: ToggleVariant;
|
|
44
|
+
label?: ReactNode;
|
|
45
|
+
labelTooltip?: ReactNode;
|
|
46
|
+
required?: boolean;
|
|
47
|
+
controlFirst?: boolean;
|
|
48
|
+
size?: GoldfinchToggleSize;
|
|
49
|
+
defaultChecked?: boolean;
|
|
50
|
+
checked?: boolean;
|
|
51
|
+
disabled?: boolean;
|
|
52
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
53
|
+
transitioning?: boolean;
|
|
54
|
+
};
|
|
55
|
+
export interface ToggleLegendProps {
|
|
56
|
+
children: ReactNode;
|
|
57
|
+
className?: string;
|
|
58
|
+
}
|
|
59
|
+
export interface ToggleGroupProps {
|
|
60
|
+
legend?: string;
|
|
61
|
+
children: ReactNode;
|
|
62
|
+
error?: string;
|
|
63
|
+
description?: ReactNode;
|
|
64
|
+
disabled?: boolean;
|
|
65
|
+
controlFirst?: boolean;
|
|
66
|
+
className?: string;
|
|
67
|
+
}
|
|
68
|
+
export type ToggleItemProps = {
|
|
69
|
+
variant?: ToggleVariant;
|
|
70
|
+
label: string;
|
|
71
|
+
className?: string;
|
|
72
|
+
defaultChecked?: boolean;
|
|
73
|
+
checked?: boolean;
|
|
74
|
+
disabled?: boolean;
|
|
75
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
76
|
+
size?: GoldfinchToggleSize;
|
|
77
|
+
transitioning?: boolean;
|
|
78
|
+
};
|
|
79
|
+
declare function ToggleLegend({ children, className }: ToggleLegendProps): import("react").JSX.Element;
|
|
80
|
+
declare namespace ToggleLegend {
|
|
81
|
+
var displayName: string;
|
|
82
|
+
}
|
|
83
|
+
declare function ToggleGroup({ legend, children, error, description, disabled, controlFirst, className, }: ToggleGroupProps): import("react").JSX.Element;
|
|
84
|
+
export declare const Toggle: import('react').ForwardRefExoticComponent<Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children"> & {
|
|
85
|
+
variant?: ToggleVariant;
|
|
86
|
+
label?: ReactNode;
|
|
87
|
+
labelTooltip?: ReactNode;
|
|
88
|
+
required?: boolean;
|
|
89
|
+
controlFirst?: boolean;
|
|
90
|
+
size?: GoldfinchToggleSize;
|
|
91
|
+
defaultChecked?: boolean;
|
|
92
|
+
checked?: boolean;
|
|
93
|
+
disabled?: boolean;
|
|
94
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
95
|
+
transitioning?: boolean;
|
|
96
|
+
} & import('react').RefAttributes<HTMLButtonElement>> & {
|
|
97
|
+
Item: import('react').ForwardRefExoticComponent<ToggleItemProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
98
|
+
Group: typeof ToggleGroup;
|
|
99
|
+
Legend: typeof ToggleLegend;
|
|
100
|
+
};
|
|
101
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Toolbar, GOLDFINCH_TOOLBAR_VARIANTS, GOLDFINCH_TOOLBAR_DEFAULT_VARIANTS, type ToolbarProps, type ToolbarSize, type ToolbarButtonProps, type ToolbarInputProps, type ToolbarInputGroupProps, } from './toolbar';
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Toolbar as ToolbarBase } from '@base-ui/react/toolbar';
|
|
3
|
+
import { ButtonProps } from '../button/button';
|
|
4
|
+
import { InputProps } from '../input/input';
|
|
5
|
+
import { InputGroup } from '../input-group/input-group';
|
|
6
|
+
export declare const GOLDFINCH_TOOLBAR_VARIANTS: {
|
|
7
|
+
readonly size: {
|
|
8
|
+
readonly xs: {
|
|
9
|
+
readonly classes: "text-xs";
|
|
10
|
+
readonly description: "Extra small toolbar for compact UIs";
|
|
11
|
+
};
|
|
12
|
+
readonly sm: {
|
|
13
|
+
readonly classes: "text-xs";
|
|
14
|
+
readonly description: "Small toolbar for secondary controls";
|
|
15
|
+
};
|
|
16
|
+
readonly base: {
|
|
17
|
+
readonly classes: "text-base";
|
|
18
|
+
readonly description: "Default toolbar size";
|
|
19
|
+
};
|
|
20
|
+
readonly lg: {
|
|
21
|
+
readonly classes: "text-base";
|
|
22
|
+
readonly description: "Large toolbar for prominent controls";
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export declare const GOLDFINCH_TOOLBAR_DEFAULT_VARIANTS: {
|
|
27
|
+
readonly size: "base";
|
|
28
|
+
};
|
|
29
|
+
export type ToolbarSize = keyof typeof GOLDFINCH_TOOLBAR_VARIANTS.size;
|
|
30
|
+
export interface ToolbarProps extends Omit<ToolbarBase.Root.Props, "children"> {
|
|
31
|
+
/** Toolbar controls rendered as one grouped card. */
|
|
32
|
+
children: React.ReactNode;
|
|
33
|
+
/** Locks every toolbar item to this size. */
|
|
34
|
+
size?: ToolbarSize;
|
|
35
|
+
}
|
|
36
|
+
export type ToolbarButtonProps = Omit<ButtonProps, "size" | "variant"> & Pick<ToolbarBase.Button.Props, "focusableWhenDisabled">;
|
|
37
|
+
export type ToolbarInputProps = Omit<InputProps, "size" | "variant" | "label" | "labelTooltip" | "description" | "hideLabel" | "error" | "passwordManagerIgnore" | "render"> & {
|
|
38
|
+
/** When `true`, the item remains focusable when disabled. */
|
|
39
|
+
focusableWhenDisabled?: ToolbarBase.Input.Props["focusableWhenDisabled"];
|
|
40
|
+
};
|
|
41
|
+
export type ToolbarInputGroupProps = Omit<React.ComponentPropsWithoutRef<typeof InputGroup>, "size">;
|
|
42
|
+
export declare const Toolbar: React.ForwardRefExoticComponent<Omit<ToolbarProps, "ref"> & React.RefAttributes<HTMLDivElement>> & {
|
|
43
|
+
Button: React.ForwardRefExoticComponent<Omit<ToolbarButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
44
|
+
Input: React.ForwardRefExoticComponent<Omit<InputProps, "error" | "variant" | "size" | "description" | "label" | "render" | "labelTooltip" | "hideLabel" | "passwordManagerIgnore"> & {
|
|
45
|
+
/** When `true`, the item remains focusable when disabled. */
|
|
46
|
+
focusableWhenDisabled?: ToolbarBase.Input.Props["focusableWhenDisabled"];
|
|
47
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
48
|
+
InputGroup: React.ForwardRefExoticComponent<ToolbarInputGroupProps & React.RefAttributes<HTMLElement>>;
|
|
49
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Tooltip, TooltipProvider } from './tooltip';
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { Tooltip as TooltipBase } from '@base-ui/react/tooltip';
|
|
2
|
+
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
3
|
+
import { PortalContainer } from '../../utils/portal-provider';
|
|
4
|
+
/** Tooltip side variant definitions mapping positions to their Tailwind classes. */
|
|
5
|
+
export declare const GOLDFINCH_TOOLTIP_VARIANTS: {
|
|
6
|
+
readonly side: {
|
|
7
|
+
readonly top: {
|
|
8
|
+
readonly classes: "";
|
|
9
|
+
readonly description: "Tooltip appears above the trigger";
|
|
10
|
+
};
|
|
11
|
+
readonly bottom: {
|
|
12
|
+
readonly classes: "";
|
|
13
|
+
readonly description: "Tooltip appears below the trigger";
|
|
14
|
+
};
|
|
15
|
+
readonly left: {
|
|
16
|
+
readonly classes: "";
|
|
17
|
+
readonly description: "Tooltip appears to the left of the trigger";
|
|
18
|
+
};
|
|
19
|
+
readonly right: {
|
|
20
|
+
readonly classes: "";
|
|
21
|
+
readonly description: "Tooltip appears to the right of the trigger";
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export declare const GOLDFINCH_TOOLTIP_DEFAULT_VARIANTS: {
|
|
26
|
+
readonly side: "top";
|
|
27
|
+
};
|
|
28
|
+
export type GoldfinchTooltipSide = keyof typeof GOLDFINCH_TOOLTIP_VARIANTS.side;
|
|
29
|
+
export interface GoldfinchTooltipVariantsProps {
|
|
30
|
+
/**
|
|
31
|
+
* Preferred side of the trigger to render the tooltip.
|
|
32
|
+
* - `"top"` — Tooltip appears above the trigger
|
|
33
|
+
* - `"bottom"` — Tooltip appears below the trigger
|
|
34
|
+
* - `"left"` — Tooltip appears to the left of the trigger
|
|
35
|
+
* - `"right"` — Tooltip appears to the right of the trigger
|
|
36
|
+
* @default "top"
|
|
37
|
+
*/
|
|
38
|
+
side?: GoldfinchTooltipSide;
|
|
39
|
+
}
|
|
40
|
+
export declare function tooltipVariants({ side, }?: GoldfinchTooltipVariantsProps): string;
|
|
41
|
+
export declare const TooltipProvider: import('react').FC<import('@base-ui/react').TooltipProviderProps>;
|
|
42
|
+
type BaseTooltipProps = ComponentPropsWithoutRef<typeof TooltipBase.Root>;
|
|
43
|
+
type TriggerProps = ComponentPropsWithoutRef<typeof TooltipBase.Trigger>;
|
|
44
|
+
/** Alignment options for tooltip positioning. Source: PositionerProps["align"] */
|
|
45
|
+
type TooltipAlign = "start" | "center" | "end";
|
|
46
|
+
/**
|
|
47
|
+
* Tooltip component props.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```tsx
|
|
51
|
+
* <Tooltip content="Add new item" render={<Button shape="square" icon={PlusIcon} />}>
|
|
52
|
+
* Add
|
|
53
|
+
* </Tooltip>
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
export type TooltipProps = BaseTooltipProps & GoldfinchTooltipVariantsProps & {
|
|
57
|
+
/**
|
|
58
|
+
* Alignment on the axis perpendicular to `side`.
|
|
59
|
+
* - `"start"` — Align to the start edge
|
|
60
|
+
* - `"center"` — Center-aligned
|
|
61
|
+
* - `"end"` — Align to the end edge
|
|
62
|
+
*/
|
|
63
|
+
align?: TooltipAlign;
|
|
64
|
+
/**
|
|
65
|
+
* @deprecated Use the `render` prop instead.
|
|
66
|
+
* @example `<Tooltip render={<Button />}>Label</Tooltip>` instead of `<Tooltip asChild><Button>Label</Button></Tooltip>`
|
|
67
|
+
*/
|
|
68
|
+
asChild?: boolean;
|
|
69
|
+
/** Additional CSS classes merged via `cn()`. */
|
|
70
|
+
className?: string;
|
|
71
|
+
/** Content to display inside the tooltip popup. */
|
|
72
|
+
content: ReactNode;
|
|
73
|
+
/**
|
|
74
|
+
* Container element for the portal. Use this to render the tooltip inside
|
|
75
|
+
* a Shadow DOM or custom container. Overrides `GoldfinchPortalProvider` context.
|
|
76
|
+
* @default document.body (or GoldfinchPortalProvider container if set)
|
|
77
|
+
*/
|
|
78
|
+
container?: PortalContainer;
|
|
79
|
+
/**
|
|
80
|
+
* How long to wait before closing the tooltip. Specified in milliseconds.
|
|
81
|
+
* @default 0
|
|
82
|
+
*/
|
|
83
|
+
closeDelay?: number;
|
|
84
|
+
/**
|
|
85
|
+
* How long to wait before opening the tooltip. Specified in milliseconds.
|
|
86
|
+
* @default 600
|
|
87
|
+
*/
|
|
88
|
+
delay?: number;
|
|
89
|
+
/**
|
|
90
|
+
* Element to render as the tooltip trigger. Children are passed to this element.
|
|
91
|
+
* @example `<Tooltip content="Save" render={<Button />}>Save</Tooltip>`
|
|
92
|
+
*/
|
|
93
|
+
render?: TriggerProps["render"];
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* Accessible popup that shows additional information on hover/focus.
|
|
97
|
+
* Wrap your app or section with `<TooltipProvider>` to enable delay grouping.
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* ```tsx
|
|
101
|
+
* <Tooltip content="Save changes" render={<Button variant="primary" />}>
|
|
102
|
+
* Save
|
|
103
|
+
* </Tooltip>
|
|
104
|
+
* ```
|
|
105
|
+
*/
|
|
106
|
+
export declare function Tooltip({ content, children, align, asChild, render, side, className, container: containerProp, closeDelay, delay, ...props }: TooltipProps): import("react").JSX.Element;
|
|
107
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TopNavigation, type TopNavigationProps, type TopNavigationLogoProps, type TopNavigationNavProps, type TopNavigationNavItemProps, type TopNavigationActionsProps, } from './top-navigation';
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface TopNavigationProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
declare const TopNavigationRoot: import('react').ForwardRefExoticComponent<TopNavigationProps & import('react').RefAttributes<HTMLElement>>;
|
|
7
|
+
export interface TopNavigationLogoProps {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
declare function TopNavigationLogo({ children, className }: TopNavigationLogoProps): import("react").JSX.Element;
|
|
12
|
+
declare namespace TopNavigationLogo {
|
|
13
|
+
var displayName: string;
|
|
14
|
+
}
|
|
15
|
+
export interface TopNavigationNavProps {
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
declare function TopNavigationNav({ children, className }: TopNavigationNavProps): import("react").JSX.Element;
|
|
20
|
+
declare namespace TopNavigationNav {
|
|
21
|
+
var displayName: string;
|
|
22
|
+
}
|
|
23
|
+
export interface TopNavigationNavItemProps {
|
|
24
|
+
children: ReactNode;
|
|
25
|
+
active?: boolean;
|
|
26
|
+
className?: string;
|
|
27
|
+
}
|
|
28
|
+
declare function TopNavigationNavItem({ children, active, className }: TopNavigationNavItemProps): import("react").JSX.Element;
|
|
29
|
+
declare namespace TopNavigationNavItem {
|
|
30
|
+
var displayName: string;
|
|
31
|
+
}
|
|
32
|
+
export interface TopNavigationActionsProps {
|
|
33
|
+
children: ReactNode;
|
|
34
|
+
className?: string;
|
|
35
|
+
}
|
|
36
|
+
declare function TopNavigationActions({ children, className }: TopNavigationActionsProps): import("react").JSX.Element;
|
|
37
|
+
declare namespace TopNavigationActions {
|
|
38
|
+
var displayName: string;
|
|
39
|
+
}
|
|
40
|
+
type TopNavigationComponent = typeof TopNavigationRoot & {
|
|
41
|
+
Logo: typeof TopNavigationLogo;
|
|
42
|
+
Nav: typeof TopNavigationNav;
|
|
43
|
+
NavItem: typeof TopNavigationNavItem;
|
|
44
|
+
Actions: typeof TopNavigationActions;
|
|
45
|
+
};
|
|
46
|
+
declare const TopNavigation: TopNavigationComponent;
|
|
47
|
+
export { TopNavigation };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export { Badge } from './components/badge';
|
|
2
|
+
export type { BadgeVariant } from './components/badge';
|
|
3
|
+
export { Alert } from './components/alert';
|
|
4
|
+
export type { AlertVariant } from './components/alert';
|
|
5
|
+
export { Button, goldfinchButtonVariants, } from './components/button';
|
|
6
|
+
export type { GoldfinchButtonVariant, GoldfinchButtonSize } from './components/button';
|
|
7
|
+
export { Checkbox } from './components/checkbox';
|
|
8
|
+
export type { CheckboxProps, CheckboxLegendProps, CheckboxChangeEventDetails } from './components/checkbox';
|
|
9
|
+
export { CopyToClipboard } from './components/copy-to-clipboard';
|
|
10
|
+
export { Collapsible } from './components/collapsible';
|
|
11
|
+
export type { CollapsibleProps, CollapsibleRootProps, CollapsibleTriggerProps, CollapsiblePanelProps, CollapsibleDefaultTriggerProps, CollapsibleDefaultPanelProps } from './components/collapsible';
|
|
12
|
+
export { Modal, ModalRoot, ModalTrigger, ModalTitle, ModalDescription, ModalClose, } from './components/modal';
|
|
13
|
+
export type { ModalProps, ModalRootProps, ModalTriggerProps, ModalTitleProps, ModalDescriptionProps, ModalCloseProps } from './components/modal';
|
|
14
|
+
export { DropdownMenu } from './components/dropdown';
|
|
15
|
+
export { EmptyState } from './components/empty-state';
|
|
16
|
+
export type { EmptyStateProps } from './components/empty-state';
|
|
17
|
+
export { Field } from './components/field';
|
|
18
|
+
export type { FieldProps, FieldErrorMatch } from './components/field';
|
|
19
|
+
export { TopNavigation } from './components/top-navigation';
|
|
20
|
+
export type { TopNavigationProps, TopNavigationLogoProps, TopNavigationNavProps, TopNavigationNavItemProps, TopNavigationActionsProps } from './components/top-navigation';
|
|
21
|
+
export { Grid, GridItem } from './components/grid';
|
|
22
|
+
export type { GridProps, GridItemProps } from './components/grid';
|
|
23
|
+
export { Input, InputArea, Textarea, } from './components/input';
|
|
24
|
+
export type { InputProps, InputAreaProps } from './components/input';
|
|
25
|
+
export { InputGroup, } from './components/input-group';
|
|
26
|
+
export type { InputGroupRootProps, InputGroupAddonProps, InputGroupSuffixProps, InputGroupInputProps, InputGroupButtonProps } from './components/input-group';
|
|
27
|
+
export { Label } from './components/label';
|
|
28
|
+
export type { LabelProps } from './components/label';
|
|
29
|
+
export { Card } from './components/card';
|
|
30
|
+
export { Link } from './components/link';
|
|
31
|
+
export type { LinkProps } from './components/link';
|
|
32
|
+
export { Breadcrumbs } from './components/breadcrumbs';
|
|
33
|
+
export type { BreadcrumbsProps } from './components/breadcrumbs';
|
|
34
|
+
export { Spinner, SkeletonLine } from './components/spinner';
|
|
35
|
+
export { MenuBar, useMenuNavigation } from './components/menubar';
|
|
36
|
+
export { Progress } from './components/progress';
|
|
37
|
+
export { Page } from './components/page';
|
|
38
|
+
export type { PageRootProps, GoldfinchPageSize, PageTitleProps, PageDescriptionProps, PageBreadcrumbsProps } from './components/page';
|
|
39
|
+
export { Pagination } from './components/pagination';
|
|
40
|
+
export { Popover } from './components/popover';
|
|
41
|
+
export type { PopoverRootProps, PopoverTriggerProps, PopoverContentProps, PopoverTitleProps, PopoverDescriptionProps, PopoverCloseProps } from './components/popover';
|
|
42
|
+
export { Radio, RadioGroup } from './components/radio';
|
|
43
|
+
export type { RadioGroupProps, RadioGroupChangeEventDetails, RadioLegendProps, RadioItemProps, RadioControlPosition, RadioVariant } from './components/radio';
|
|
44
|
+
export { Select } from './components/select';
|
|
45
|
+
export { SensitiveInput } from './components/sensitive-input';
|
|
46
|
+
export type { SensitiveInputProps } from './components/sensitive-input';
|
|
47
|
+
export { Sidebar, SidebarProvider, SidebarRoot, SidebarHeader, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarMenu, SidebarMenuItem, SidebarMenuButton, SidebarMenuBadge, SidebarMenuSub, SidebarMenuSubItem, SidebarMenuSubButton, SidebarSeparator, SidebarTrigger, SidebarRail, SidebarResizeHandle, SidebarMenuChevron, SidebarCollapsible, SidebarCollapsibleTrigger, SidebarCollapsibleContent, SidebarSlidingViews, SidebarSlidingView, useSidebar, } from './components/sidebar';
|
|
48
|
+
export type { SidebarState, SidebarSide, SidebarVariant, SidebarProviderProps, SidebarRootProps, SidebarMenuButtonSize, SidebarMenuButtonProps, SidebarMenuSubButtonProps } from './components/sidebar';
|
|
49
|
+
export { Toggle } from './components/toggle';
|
|
50
|
+
export type { ToggleLegendProps } from './components/toggle';
|
|
51
|
+
export { Table } from './components/table';
|
|
52
|
+
export { TableOfContents } from './components/table-of-contents';
|
|
53
|
+
export type { TableOfContentsProps, TableOfContentsTitleProps, TableOfContentsListProps, TableOfContentsItemProps, TableOfContentsGroupProps } from './components/table-of-contents';
|
|
54
|
+
export { Tabs } from './components/tabs';
|
|
55
|
+
export type { TabsProps, TabsItem } from './components/tabs';
|
|
56
|
+
export { Text } from './components/text';
|
|
57
|
+
export { Toasty, ToastProvider, Toast, useGoldfinchToastManager, createGoldfinchToastManager } from './components/toast';
|
|
58
|
+
export { Toolbar } from './components/toolbar';
|
|
59
|
+
export type { ToolbarProps, ToolbarSize, ToolbarButtonProps, ToolbarInputProps, ToolbarInputGroupProps } from './components/toolbar';
|
|
60
|
+
export { Tooltip, TooltipProvider } from './components/tooltip';
|
|
61
|
+
export { cn, safeRandomId } from './utils/cn';
|
|
62
|
+
export { resolveVariant } from './utils/resolve-variant';
|
|
63
|
+
export { LinkProvider, useLinkComponent } from './utils/link-provider';
|
|
64
|
+
export type { LinkComponentProps } from './utils/link-provider';
|
|
65
|
+
export { GoldfinchPortalProvider, usePortalContainer } from './utils/portal-provider';
|
|
66
|
+
export type { PortalContainer } from './utils/portal-provider';
|
|
67
|
+
export declare const version = "0.0.0";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { cn, safeRandomId } from './cn';
|
|
2
|
+
export { resolveVariant } from './resolve-variant';
|
|
3
|
+
export { LinkProvider, useLinkComponent, type LinkComponentProps, } from './link-provider';
|
|
4
|
+
export { GoldfinchPortalProvider, usePortalContainer, type PortalContainer } from './portal-provider';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AnchorHTMLAttributes, ForwardRefExoticComponent, ReactNode, RefAttributes } from 'react';
|
|
2
|
+
type LinkComponentProps = AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
3
|
+
to?: string;
|
|
4
|
+
};
|
|
5
|
+
type ForwardLinkComponent = ForwardRefExoticComponent<LinkComponentProps & RefAttributes<HTMLAnchorElement>>;
|
|
6
|
+
export declare function useLinkComponent(): ForwardLinkComponent;
|
|
7
|
+
export declare function LinkProvider({ component, children, }: {
|
|
8
|
+
component?: ForwardLinkComponent;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
11
|
+
export type { LinkComponentProps };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReactNode, RefObject } from 'react';
|
|
2
|
+
export type PortalContainer = HTMLElement | ShadowRoot | null | RefObject<HTMLElement | ShadowRoot | null>;
|
|
3
|
+
export declare function GoldfinchPortalProvider({ container, children, }: {
|
|
4
|
+
container: PortalContainer;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}): import("react").JSX.Element;
|
|
7
|
+
export declare function usePortalContainer(): PortalContainer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function resolveVariant<T extends Record<string, unknown>>(variants: T, key: string, fallback: keyof T & string): T[keyof T];
|