@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,42 @@
1
+ import { PropsWithChildren } from 'react';
2
+ import { InputGroupRootPropsInternal } from './context';
3
+ export { type InputGroupRootProps } from './context';
4
+ export { type InputGroupInputProps } from './input-group-input';
5
+ export { type InputGroupButtonProps } from './input-group-button';
6
+ export { type InputGroupAddonProps } from './input-group-addon';
7
+ export { type InputGroupSuffixProps } from './input-group-suffix';
8
+ export declare const GOLDFINCH_INPUT_GROUP_VARIANTS: {
9
+ readonly size: {
10
+ readonly xs: {
11
+ readonly classes: "h-6 text-xs";
12
+ readonly description: "Extra small size.";
13
+ };
14
+ readonly sm: {
15
+ readonly classes: "h-7 text-xs";
16
+ readonly description: "Small size.";
17
+ };
18
+ readonly base: {
19
+ readonly classes: "h-9 text-base";
20
+ readonly description: "Default size.";
21
+ };
22
+ readonly lg: {
23
+ readonly classes: "h-11 text-base";
24
+ readonly description: "Large size.";
25
+ };
26
+ };
27
+ };
28
+ export declare const GOLDFINCH_INPUT_GROUP_DEFAULT_VARIANTS: {
29
+ readonly size: "base";
30
+ };
31
+ export declare const InputGroup: import('react').ForwardRefExoticComponent<InputGroupRootPropsInternal & {
32
+ children?: import('react').ReactNode | undefined;
33
+ } & import('react').RefAttributes<HTMLElement>> & {
34
+ Input: import('react').ForwardRefExoticComponent<import('./input-group-input').InputGroupInputProps & import('react').RefAttributes<HTMLInputElement>>;
35
+ Button: import('react').ForwardRefExoticComponent<Omit<PropsWithChildren<import('./input-group-button').InputGroupButtonProps>, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
36
+ Addon: import('react').ForwardRefExoticComponent<import('./input-group-addon').InputGroupAddonProps & import('react').RefAttributes<HTMLDivElement>>;
37
+ Suffix: import('react').ForwardRefExoticComponent<import('./input-group-suffix').InputGroupSuffixProps & import('react').RefAttributes<HTMLDivElement>>;
38
+ /** @deprecated Use `InputGroup.Addon` instead. */
39
+ Label: import('react').ForwardRefExoticComponent<Omit<import('./input-group-addon').InputGroupAddonProps & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
40
+ /** @deprecated Use `InputGroup.Suffix` instead. */
41
+ Description: import('react').ForwardRefExoticComponent<Omit<import('./input-group-suffix').InputGroupSuffixProps & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
42
+ };
@@ -0,0 +1 @@
1
+ export { Label, type LabelProps, labelVariants, labelContentVariants, GOLDFINCH_LABEL_VARIANTS, GOLDFINCH_LABEL_DEFAULT_VARIANTS, } from './label';
@@ -0,0 +1,66 @@
1
+ import { ReactNode } from 'react';
2
+ /** Label variant definitions (currently empty, reserved for future additions). */
3
+ export declare const GOLDFINCH_LABEL_VARIANTS: {};
4
+ export declare const GOLDFINCH_LABEL_DEFAULT_VARIANTS: {};
5
+ export interface GoldfinchLabelVariantsProps {
6
+ }
7
+ export declare function labelVariants(_props?: GoldfinchLabelVariantsProps): string;
8
+ export declare function labelContentVariants(): string;
9
+ /**
10
+ * Label component props.
11
+ *
12
+ * @example
13
+ * ```tsx
14
+ * <Label>Email</Label>
15
+ * <Label showOptional>Middle Name</Label>
16
+ * <Label tooltip="We'll use this to send you updates">Email</Label>
17
+ * ```
18
+ */
19
+ export interface LabelProps extends GoldfinchLabelVariantsProps {
20
+ /** The label content — can be a string or any React node. */
21
+ children: ReactNode;
22
+ /** When `true`, shows gray "(optional)" text after the label. */
23
+ showOptional?: boolean;
24
+ /** Tooltip content displayed next to the label via an info icon. */
25
+ tooltip?: ReactNode;
26
+ /** Additional CSS classes merged via `cn()`. */
27
+ className?: string;
28
+ /** The id of the form element this label is associated with */
29
+ htmlFor?: string;
30
+ /**
31
+ * When true, only renders the inline content (indicators, tooltip) without
32
+ * the outer label element with font styling. Useful when composed inside another
33
+ * label element that already provides the text styling.
34
+ * @default false
35
+ */
36
+ asContent?: boolean;
37
+ }
38
+ /**
39
+ * Label component for form fields.
40
+ *
41
+ * Provides a standardized way to display labels with optional indicators:
42
+ * - Optional indicator: gray "(optional)" text when `showOptional={true}`
43
+ * - Tooltip: info icon with hover tooltip for additional context
44
+ *
45
+ * @example
46
+ * // Basic label
47
+ * <Label>Email</Label>
48
+ *
49
+ * @example
50
+ * // Optional field with indicator
51
+ * <Label showOptional>Middle Name</Label>
52
+ *
53
+ * @example
54
+ * // With tooltip
55
+ * <Label tooltip="We'll use this to send you updates">Email</Label>
56
+ *
57
+ * @example
58
+ * // With ReactNode children
59
+ * <Label>
60
+ * <span>Custom label with <strong>bold</strong> text</span>
61
+ * </Label>
62
+ */
63
+ export declare function Label({ children, showOptional, tooltip, className, htmlFor, asContent, }: LabelProps): import("react").JSX.Element;
64
+ export declare namespace Label {
65
+ var displayName: string;
66
+ }
@@ -0,0 +1 @@
1
+ export * from './link';
@@ -0,0 +1,65 @@
1
+ import { SVGProps } from 'react';
2
+ import { useRender } from '@base-ui/react/use-render';
3
+ import { LinkComponentProps } from '../../utils/link-provider';
4
+ /** Link variant definitions mapping variant names to their Tailwind classes. */
5
+ export declare const GOLDFINCH_LINK_VARIANTS: {
6
+ readonly variant: {
7
+ readonly inline: {
8
+ readonly classes: "text-goldfinch-link underline underline-offset-[0.15em] decoration-[0.0625em] link-current transition-colors";
9
+ readonly description: "Inline text link that flows with content";
10
+ };
11
+ readonly current: {
12
+ readonly classes: "text-current underline underline-offset-[0.15em] decoration-[0.0625em] link-current transition-colors";
13
+ readonly description: "Link that inherits color from parent text";
14
+ };
15
+ readonly plain: {
16
+ readonly classes: "text-goldfinch-link hover:text-goldfinch-link/70 transition-colors";
17
+ readonly description: "Link without underline decoration";
18
+ };
19
+ };
20
+ };
21
+ export declare const GOLDFINCH_LINK_DEFAULT_VARIANTS: {
22
+ readonly variant: "inline";
23
+ };
24
+ export type GoldfinchLinkVariant = keyof typeof GOLDFINCH_LINK_VARIANTS.variant;
25
+ export interface GoldfinchLinkVariantsProps {
26
+ /**
27
+ * Visual style of the link.
28
+ * - `"inline"` — Inline text link that flows with content
29
+ * - `"current"` — Link that inherits color from parent text
30
+ * - `"plain"` — Link without underline decoration
31
+ * @default "inline"
32
+ */
33
+ variant?: GoldfinchLinkVariant;
34
+ }
35
+ export declare function linkVariants({ variant, }?: GoldfinchLinkVariantsProps): string;
36
+ /**
37
+ * Link component props.
38
+ *
39
+ * Use `href` for the link destination. For framework-specific routing, use the
40
+ * `render` prop or configure a `LinkProvider` at the app root.
41
+ *
42
+ * @example Internal link
43
+ * ```tsx
44
+ * <Link href="/docs">Learn more</Link>
45
+ * ```
46
+ *
47
+ * @example External link
48
+ * ```tsx
49
+ * <Link href="https://example.com" target="_blank" rel="noopener noreferrer">
50
+ * Visit Example <Link.ExternalIcon />
51
+ * </Link>
52
+ * ```
53
+ *
54
+ * @example Composition with render prop
55
+ * ```tsx
56
+ * <Link render={<RouterLink to="/dashboard" />}>Dashboard</Link>
57
+ * ```
58
+ */
59
+ export type LinkProps = useRender.ComponentProps<"a"> & LinkComponentProps & GoldfinchLinkVariantsProps;
60
+ export declare const Link: import('react').ForwardRefExoticComponent<Omit<LinkProps, "ref"> & import('react').RefAttributes<HTMLAnchorElement>> & {
61
+ ExternalIcon: {
62
+ (props: SVGProps<SVGSVGElement>): import("react").JSX.Element;
63
+ displayName: string;
64
+ };
65
+ };
@@ -0,0 +1,2 @@
1
+ export { MenuBar } from './menubar';
2
+ export { useMenuNavigation } from './use-menu-navigation';
@@ -0,0 +1,65 @@
1
+ import { default as React } from 'react';
2
+ /** MenuBar variant definitions (currently empty, reserved for future additions). */
3
+ export declare const GOLDFINCH_MENUBAR_VARIANTS: {};
4
+ export declare const GOLDFINCH_MENUBAR_DEFAULT_VARIANTS: {};
5
+ export interface GoldfinchMenuBarVariantsProps {
6
+ }
7
+ export declare function menuBarVariants(_props?: GoldfinchMenuBarVariantsProps): string;
8
+ /** Props for an individual menu option within a MenuBar. */
9
+ type MenuOptionProps = {
10
+ /** Icon element (typically from `@phosphor-icons/react`) rendered at 18px */
11
+ icon: React.ReactNode;
12
+ /** Unique identifier for the option (used when `optionIds` is true) */
13
+ id?: number | string;
14
+ /** Currently active value from the parent MenuBar */
15
+ isActive?: number | boolean | string | undefined;
16
+ /** Callback when this option is clicked */
17
+ onClick: () => void;
18
+ /** Tooltip text shown on hover */
19
+ tooltip: string;
20
+ };
21
+ /**
22
+ * MenuBar component props.
23
+ *
24
+ * Horizontal icon-button toolbar with keyboard navigation and tooltip labels.
25
+ *
26
+ * @example
27
+ * ```tsx
28
+ * <MenuBar
29
+ * isActive={activeIndex}
30
+ * options={[
31
+ * { icon: <ListIcon />, tooltip: "List view", onClick: () => setView("list") },
32
+ * { icon: <GridFourIcon />, tooltip: "Grid view", onClick: () => setView("grid") },
33
+ * ]}
34
+ * />
35
+ * ```
36
+ */
37
+ type MenuBarProps = {
38
+ /** Additional CSS classes merged via `cn()`. */
39
+ className?: string;
40
+ /** The currently active option value — matched against option index or `id`. */
41
+ isActive: number | boolean | string | undefined;
42
+ /** Array of menu option configurations. */
43
+ options: MenuOptionProps[];
44
+ /** When true, each option's `id` field is used for matching instead of its array index. */
45
+ optionIds?: boolean;
46
+ };
47
+ /**
48
+ * MenuBar — horizontal icon-button toolbar with keyboard arrow-key navigation.
49
+ *
50
+ * Each option renders as a `<button>` with a Tooltip. The active option is
51
+ * visually highlighted with an elevated background.
52
+ *
53
+ * @example
54
+ * ```tsx
55
+ * <MenuBar
56
+ * isActive={0}
57
+ * options={[
58
+ * { icon: <ListIcon />, tooltip: "List", onClick: () => {} },
59
+ * { icon: <GridFourIcon />, tooltip: "Grid", onClick: () => {} },
60
+ * ]}
61
+ * />
62
+ * ```
63
+ */
64
+ export declare const MenuBar: ({ className, isActive, options, optionIds, }: MenuBarProps) => React.JSX.Element;
65
+ export {};
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ type UseMenuNavigationProps = {
3
+ menuRef: React.RefObject<HTMLElement | null>;
4
+ direction?: "horizontal" | "vertical";
5
+ };
6
+ export declare const useMenuNavigation: ({ menuRef, direction, }: UseMenuNavigationProps) => void;
7
+ export {};
@@ -0,0 +1 @@
1
+ export { Modal, ModalRoot, ModalTrigger, ModalTitle, ModalDescription, ModalClose, type ModalProps, type ModalRootProps, type ModalTriggerProps, type ModalTitleProps, type ModalDescriptionProps, type ModalCloseProps, } from './modal';
@@ -0,0 +1,204 @@
1
+ import { ComponentPropsWithoutRef, CSSProperties, ReactNode } from 'react';
2
+ import { Dialog as DialogBase } from '@base-ui/react/dialog';
3
+ import { AlertDialog as AlertDialogBase } from '@base-ui/react/alert-dialog';
4
+ import { PortalContainer } from '../../utils/portal-provider';
5
+ /** Modal size variant definitions mapping sizes to their minimum widths. */
6
+ export declare const GOLDFINCH_MODAL_VARIANTS: {
7
+ readonly size: {
8
+ readonly base: {
9
+ readonly classes: "sm:min-w-96";
10
+ readonly description: "Default modal width";
11
+ };
12
+ readonly sm: {
13
+ readonly classes: "min-w-72";
14
+ readonly description: "Small modal for simple confirmations";
15
+ };
16
+ readonly lg: {
17
+ readonly classes: "min-w-[32rem]";
18
+ readonly description: "Large modal for complex content";
19
+ };
20
+ readonly xl: {
21
+ readonly classes: "min-w-[48rem]";
22
+ readonly description: "Extra large modal for detailed views";
23
+ };
24
+ };
25
+ readonly role: {
26
+ readonly dialog: {
27
+ readonly classes: "";
28
+ readonly description: "Standard modal for general-purpose modals";
29
+ };
30
+ readonly alertdialog: {
31
+ readonly classes: "";
32
+ readonly description: "Alert modal for confirmation flows requiring explicit user acknowledgment";
33
+ };
34
+ };
35
+ };
36
+ export declare const GOLDFINCH_MODAL_DEFAULT_VARIANTS: {
37
+ readonly size: "base";
38
+ readonly role: "dialog";
39
+ };
40
+ export declare const GOLDFINCH_MODAL_STYLING: {
41
+ readonly dimensions: {
42
+ readonly sm: {
43
+ readonly width: 350;
44
+ readonly titleSize: 20;
45
+ readonly descSize: 16;
46
+ readonly padding: 16;
47
+ readonly gap: 8;
48
+ readonly buttonSize: "sm";
49
+ };
50
+ readonly base: {
51
+ readonly width: 384;
52
+ readonly titleSize: 20;
53
+ readonly descSize: 16;
54
+ readonly padding: 24;
55
+ readonly gap: 16;
56
+ readonly buttonSize: "base";
57
+ };
58
+ readonly lg: {
59
+ readonly width: 512;
60
+ readonly titleSize: 20;
61
+ readonly descSize: 16;
62
+ readonly padding: 24;
63
+ readonly gap: 16;
64
+ readonly buttonSize: "base";
65
+ };
66
+ readonly xl: {
67
+ readonly width: 768;
68
+ readonly titleSize: 20;
69
+ readonly descSize: 16;
70
+ readonly padding: 24;
71
+ readonly gap: 16;
72
+ readonly buttonSize: "base";
73
+ };
74
+ };
75
+ readonly baseTokens: {
76
+ readonly background: "color-surface";
77
+ readonly text: "text-color-surface";
78
+ readonly borderRadius: 12;
79
+ readonly shadow: "shadow-m";
80
+ };
81
+ readonly backdrop: {
82
+ readonly background: "color-surface-secondary";
83
+ readonly opacity: 0.8;
84
+ };
85
+ readonly header: {
86
+ readonly title: {
87
+ readonly fontWeight: 600;
88
+ readonly color: "text-color-surface";
89
+ };
90
+ readonly closeIcon: {
91
+ readonly name: "ph-x";
92
+ readonly size: 20;
93
+ readonly color: "text-color-muted";
94
+ };
95
+ };
96
+ readonly description: {
97
+ readonly fontWeight: 400;
98
+ readonly color: "text-color-muted";
99
+ };
100
+ readonly buttons: {
101
+ readonly primary: {
102
+ readonly background: "color-primary";
103
+ readonly text: "white";
104
+ };
105
+ readonly secondary: {
106
+ readonly ring: "color-border";
107
+ readonly text: "text-color-surface";
108
+ };
109
+ };
110
+ };
111
+ export type GoldfinchModalSize = keyof typeof GOLDFINCH_MODAL_VARIANTS.size;
112
+ export type GoldfinchModalRole = keyof typeof GOLDFINCH_MODAL_VARIANTS.role;
113
+ export interface GoldfinchModalVariantsProps {
114
+ /**
115
+ * Modal width.
116
+ * - `"sm"` — Small (min 288px) for simple confirmations
117
+ * - `"base"` — Default (min 384px)
118
+ * - `"lg"` — Large (min 512px) for complex content
119
+ * - `"xl"` — Extra large (min 768px) for detailed views
120
+ * @default "base"
121
+ */
122
+ size?: GoldfinchModalSize;
123
+ }
124
+ export declare function modalVariants({ size, }?: GoldfinchModalVariantsProps): string;
125
+ /**
126
+ * Modal component props — the modal content panel.
127
+ */
128
+ export type ModalProps = GoldfinchModalVariantsProps & {
129
+ /** Additional CSS classes merged via `cn()`. */
130
+ className?: string;
131
+ /** Modal content (typically Title, Description, Close, and action buttons). */
132
+ children: ReactNode;
133
+ /** Inline styles. */
134
+ style?: CSSProperties;
135
+ /**
136
+ * Container element for the portal. Use this to render the modal inside
137
+ * a Shadow DOM or custom container. Overrides `GoldfinchPortalProvider` context.
138
+ * @default document.body (or GoldfinchPortalProvider container if set)
139
+ */
140
+ container?: PortalContainer;
141
+ };
142
+ /**
143
+ * Modal overlay with backdrop. Compound component with `Modal.Root`,
144
+ * `Modal.Trigger`, `Modal.Title`, `Modal.Description`, and `Modal.Close`.
145
+ */
146
+ declare function ModalContent({ className, children, style, size, container: containerProp, }: ModalProps): import("react").JSX.Element;
147
+ type BaseModalRootProps = ComponentPropsWithoutRef<typeof DialogBase.Root>;
148
+ type BaseAlertModalRootProps = ComponentPropsWithoutRef<typeof AlertDialogBase.Root>;
149
+ type StandardModalRootProps = BaseModalRootProps & {
150
+ /**
151
+ * The ARIA role for the modal.
152
+ * - `"dialog"` — Standard modal for general-purpose modals. Dismissible via outside click by default.
153
+ * - `"alertdialog"` — Alert modal for destructive or confirmation flows. Not dismissible via outside click.
154
+ *
155
+ * Use `role="alertdialog"` for:
156
+ * - Destructive actions (delete, discard, remove)
157
+ * - Confirmation dialogs requiring explicit user acknowledgment
158
+ * - Actions that cannot be undone
159
+ *
160
+ * @default "dialog"
161
+ */
162
+ role?: "dialog";
163
+ };
164
+ type AlertModalRootProps = BaseAlertModalRootProps & {
165
+ role: "alertdialog";
166
+ };
167
+ export type ModalRootProps = StandardModalRootProps | AlertModalRootProps;
168
+ declare function ModalRoot(props: ModalRootProps): import("react").JSX.Element;
169
+ declare namespace ModalRoot {
170
+ var displayName: string;
171
+ }
172
+ type BaseModalTriggerProps = ComponentPropsWithoutRef<typeof DialogBase.Trigger>;
173
+ type BaseAlertModalTriggerProps = ComponentPropsWithoutRef<typeof AlertDialogBase.Trigger>;
174
+ export type ModalTriggerProps = BaseModalTriggerProps | BaseAlertModalTriggerProps;
175
+ declare function ModalTrigger({ children, ...props }: ModalTriggerProps): import("react").JSX.Element;
176
+ declare namespace ModalTrigger {
177
+ var displayName: string;
178
+ }
179
+ type BaseModalTitleProps = ComponentPropsWithoutRef<typeof DialogBase.Title>;
180
+ export type ModalTitleProps = BaseModalTitleProps;
181
+ declare function ModalTitle({ className, ...props }: ModalTitleProps): import("react").JSX.Element;
182
+ declare namespace ModalTitle {
183
+ var displayName: string;
184
+ }
185
+ type BaseModalDescriptionProps = ComponentPropsWithoutRef<typeof DialogBase.Description>;
186
+ export type ModalDescriptionProps = BaseModalDescriptionProps;
187
+ declare function ModalDescription({ className, ...props }: ModalDescriptionProps): import("react").JSX.Element;
188
+ declare namespace ModalDescription {
189
+ var displayName: string;
190
+ }
191
+ type BaseModalCloseProps = ComponentPropsWithoutRef<typeof DialogBase.Close>;
192
+ export type ModalCloseProps = BaseModalCloseProps;
193
+ declare function ModalClose({ children, ...props }: ModalCloseProps): import("react").JSX.Element;
194
+ declare namespace ModalClose {
195
+ var displayName: string;
196
+ }
197
+ declare const Modal: typeof ModalContent & {
198
+ Root: typeof ModalRoot;
199
+ Trigger: typeof ModalTrigger;
200
+ Title: typeof ModalTitle;
201
+ Description: typeof ModalDescription;
202
+ Close: typeof ModalClose;
203
+ };
204
+ export { Modal, ModalRoot, ModalTrigger, ModalTitle, ModalDescription, ModalClose, };
@@ -0,0 +1 @@
1
+ export { Page, pageVariants, GOLDFINCH_PAGE_VARIANTS, GOLDFINCH_PAGE_DEFAULT_VARIANTS, type PageRootProps, type GoldfinchPageSize, type GoldfinchPageVariantsProps, type PageTitleProps, type PageDescriptionProps, type PageBreadcrumbsProps, } from './page';
@@ -0,0 +1,65 @@
1
+ import { ReactNode } from 'react';
2
+ export declare const GOLDFINCH_PAGE_VARIANTS: {
3
+ readonly size: {
4
+ readonly sm: {
5
+ readonly classes: "max-w-3xl";
6
+ readonly description: "Narrow page width (48rem)";
7
+ };
8
+ readonly base: {
9
+ readonly classes: "max-w-5xl";
10
+ readonly description: "Default page width (64rem)";
11
+ };
12
+ readonly lg: {
13
+ readonly classes: "max-w-7xl";
14
+ readonly description: "Wide page width (80rem)";
15
+ };
16
+ readonly full: {
17
+ readonly classes: "max-w-none";
18
+ readonly description: "Full width, no max-width constraint";
19
+ };
20
+ };
21
+ };
22
+ export declare const GOLDFINCH_PAGE_DEFAULT_VARIANTS: {
23
+ readonly size: "base";
24
+ };
25
+ export type GoldfinchPageSize = keyof typeof GOLDFINCH_PAGE_VARIANTS.size;
26
+ export interface GoldfinchPageVariantsProps {
27
+ size?: GoldfinchPageSize;
28
+ }
29
+ export declare function pageVariants({ size, }?: GoldfinchPageVariantsProps): string;
30
+ export interface PageRootProps extends GoldfinchPageVariantsProps {
31
+ children: ReactNode;
32
+ className?: string;
33
+ }
34
+ declare const PageRoot: import('react').ForwardRefExoticComponent<PageRootProps & import('react').RefAttributes<HTMLDivElement>>;
35
+ export interface PageTitleProps {
36
+ children: ReactNode;
37
+ className?: string;
38
+ }
39
+ declare function PageTitle({ children, className }: PageTitleProps): import("react").JSX.Element;
40
+ declare namespace PageTitle {
41
+ var displayName: string;
42
+ }
43
+ export interface PageDescriptionProps {
44
+ children: ReactNode;
45
+ className?: string;
46
+ }
47
+ declare function PageDescription({ children, className }: PageDescriptionProps): import("react").JSX.Element;
48
+ declare namespace PageDescription {
49
+ var displayName: string;
50
+ }
51
+ export interface PageBreadcrumbsProps {
52
+ children: ReactNode;
53
+ className?: string;
54
+ }
55
+ declare function PageBreadcrumbs({ children, className }: PageBreadcrumbsProps): import("react").JSX.Element;
56
+ declare namespace PageBreadcrumbs {
57
+ var displayName: string;
58
+ }
59
+ type PageComponent = typeof PageRoot & {
60
+ Title: typeof PageTitle;
61
+ Description: typeof PageDescription;
62
+ Breadcrumbs: typeof PageBreadcrumbs;
63
+ };
64
+ declare const Page: PageComponent;
65
+ export { Page };
@@ -0,0 +1 @@
1
+ export { Pagination } from './pagination';