@nationaldesignstudio/react 0.2.0 → 0.5.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 (97) hide show
  1. package/dist/component-registry.md +1310 -127
  2. package/dist/components/atoms/background/background.d.ts +13 -27
  3. package/dist/components/atoms/button/button.d.ts +64 -72
  4. package/dist/components/atoms/button/button.figma.d.ts +1 -0
  5. package/dist/components/atoms/button/icon-button.d.ts +62 -110
  6. package/dist/components/atoms/input/input-group.d.ts +278 -0
  7. package/dist/components/atoms/input/input.d.ts +121 -0
  8. package/dist/components/atoms/popover/popover.d.ts +195 -0
  9. package/dist/components/atoms/select/select.d.ts +131 -0
  10. package/dist/components/atoms/tooltip/tooltip.d.ts +161 -0
  11. package/dist/components/organisms/card/card.d.ts +3 -3
  12. package/dist/components/sections/hero/hero.d.ts +2 -2
  13. package/dist/components/sections/prose/prose.d.ts +3 -3
  14. package/dist/components/sections/river/river.d.ts +1 -1
  15. package/dist/components/sections/tout/tout.d.ts +4 -4
  16. package/dist/components/shared/floating-arrow.d.ts +34 -0
  17. package/dist/index.d.ts +12 -0
  18. package/dist/index.js +13935 -7622
  19. package/dist/index.js.map +1 -1
  20. package/dist/lib/form-control.d.ts +106 -0
  21. package/dist/tokens.css +4725 -19065
  22. package/package.json +2 -1
  23. package/src/components/atoms/accordion/accordion.stories.tsx +1 -1
  24. package/src/components/atoms/accordion/accordion.tsx +2 -2
  25. package/src/components/atoms/background/background.tsx +71 -109
  26. package/src/components/atoms/button/button.figma.tsx +37 -0
  27. package/src/components/atoms/button/button.stories.tsx +253 -115
  28. package/src/components/atoms/button/button.test.tsx +289 -5
  29. package/src/components/atoms/button/button.tsx +40 -101
  30. package/src/components/atoms/button/button.visual.test.tsx +28 -32
  31. package/src/components/atoms/button/icon-button.stories.tsx +44 -101
  32. package/src/components/atoms/button/icon-button.test.tsx +26 -94
  33. package/src/components/atoms/button/icon-button.tsx +81 -224
  34. package/src/components/atoms/input/index.ts +17 -0
  35. package/src/components/atoms/input/input-group.stories.tsx +646 -0
  36. package/src/components/atoms/input/input-group.test.tsx +362 -0
  37. package/src/components/atoms/input/input-group.tsx +409 -0
  38. package/src/components/atoms/input/input.stories.tsx +228 -0
  39. package/src/components/atoms/input/input.test.tsx +167 -0
  40. package/src/components/atoms/input/input.tsx +104 -0
  41. package/src/components/atoms/pager-control/pager-control.stories.tsx +6 -8
  42. package/src/components/atoms/pager-control/pager-control.tsx +12 -12
  43. package/src/components/atoms/popover/index.ts +30 -0
  44. package/src/components/atoms/popover/popover.stories.tsx +531 -0
  45. package/src/components/atoms/popover/popover.test.tsx +486 -0
  46. package/src/components/atoms/popover/popover.tsx +488 -0
  47. package/src/components/atoms/select/index.ts +18 -0
  48. package/src/components/atoms/select/select.stories.tsx +455 -0
  49. package/src/components/atoms/select/select.tsx +324 -0
  50. package/src/components/atoms/tooltip/index.ts +24 -0
  51. package/src/components/atoms/tooltip/tooltip.stories.tsx +348 -0
  52. package/src/components/atoms/tooltip/tooltip.test.tsx +363 -0
  53. package/src/components/atoms/tooltip/tooltip.tsx +347 -0
  54. package/src/components/dev-tools/dev-toolbar/dev-toolbar.stories.tsx +8 -17
  55. package/src/components/dev-tools/dev-toolbar/dev-toolbar.tsx +3 -3
  56. package/src/components/foundation/typography/typography.stories.tsx +401 -0
  57. package/src/components/organisms/card/card.stories.tsx +19 -19
  58. package/src/components/organisms/card/card.test.tsx +1 -1
  59. package/src/components/organisms/card/card.tsx +3 -3
  60. package/src/components/organisms/card/card.visual.test.tsx +11 -11
  61. package/src/components/organisms/navbar/navbar.tsx +2 -2
  62. package/src/components/organisms/navbar/navbar.visual.test.tsx +2 -2
  63. package/src/components/organisms/us-gov-banner/us-gov-banner.tsx +2 -2
  64. package/src/components/sections/banner/banner.stories.tsx +1 -5
  65. package/src/components/sections/banner/banner.test.tsx +2 -2
  66. package/src/components/sections/banner/banner.tsx +6 -6
  67. package/src/components/sections/card-grid/card-grid.tsx +5 -5
  68. package/src/components/sections/faq-section/faq-section.tsx +2 -2
  69. package/src/components/sections/hero/hero.stories.tsx +7 -7
  70. package/src/components/sections/hero/hero.test.tsx +5 -5
  71. package/src/components/sections/hero/hero.tsx +10 -11
  72. package/src/components/sections/prose/prose.test.tsx +2 -2
  73. package/src/components/sections/prose/prose.tsx +6 -7
  74. package/src/components/sections/river/river.stories.tsx +8 -8
  75. package/src/components/sections/river/river.test.tsx +4 -4
  76. package/src/components/sections/river/river.tsx +8 -16
  77. package/src/components/sections/tout/tout.stories.tsx +7 -31
  78. package/src/components/sections/tout/tout.test.tsx +1 -1
  79. package/src/components/sections/tout/tout.tsx +11 -11
  80. package/src/components/sections/two-column-section/two-column-section.tsx +7 -9
  81. package/src/components/shared/floating-arrow.tsx +78 -0
  82. package/src/components/shared/index.ts +5 -0
  83. package/src/index.ts +98 -0
  84. package/src/lib/form-control.ts +71 -0
  85. package/src/stories/grid-system.stories.tsx +309 -0
  86. package/src/stories/{Introduction.mdx → introduction.mdx} +29 -15
  87. package/src/stories/{ThemeProvider.stories.tsx → theme-provider.stories.tsx} +8 -22
  88. package/src/stories/{TokenShowcase.stories.tsx → token-showcase.stories.tsx} +1 -20
  89. package/src/stories/token-showcase.tsx +777 -0
  90. package/src/styles.css +3 -0
  91. package/src/tests/token-resolution.test.tsx +298 -0
  92. package/src/theme/hooks.ts +1 -1
  93. package/src/theme/index.ts +1 -1
  94. package/src/theme/theme-provider.test.tsx +270 -0
  95. package/src/theme/{ThemeProvider.tsx → theme-provider.tsx} +18 -2
  96. package/src/stories/GridSystem.stories.tsx +0 -84
  97. package/src/stories/TokenShowcase.tsx +0 -1429
@@ -1,3 +1,4 @@
1
+ import { useRender } from '@base-ui-components/react/use-render';
1
2
  import * as React from "react";
2
3
  declare const backgroundVariants: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "absolute inset-0", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "absolute inset-0", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
3
4
  /**
@@ -16,7 +17,7 @@ declare const backgroundVariants: import('tailwind-variants').TVReturnType<{} |
16
17
  export interface BackgroundProps extends React.HTMLAttributes<HTMLDivElement> {
17
18
  }
18
19
  declare const backgroundImageVariants: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "absolute inset-0 size-full object-cover", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "absolute inset-0 size-full object-cover", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
19
- export interface BackgroundImageProps extends Omit<React.ImgHTMLAttributes<HTMLImageElement>, "src"> {
20
+ export interface BackgroundImageProps extends useRender.ComponentProps<"img">, Omit<React.ImgHTMLAttributes<HTMLImageElement>, "src" | "render"> {
20
21
  /**
21
22
  * URL for the background image
22
23
  */
@@ -25,28 +26,18 @@ export interface BackgroundImageProps extends Omit<React.ImgHTMLAttributes<HTMLI
25
26
  * Object position (default: "center")
26
27
  */
27
28
  position?: string;
28
- /**
29
- * Custom render prop for element composition.
30
- * Accepts a React element or render function.
31
- * @example
32
- * ```tsx
33
- * // Element pattern
34
- * <BackgroundImage render={<img className="custom" />} src="/bg.jpg" />
35
- *
36
- * // Callback pattern
37
- * <BackgroundImage render={(props) => <img {...props} />} src="/bg.jpg" />
38
- * ```
39
- */
40
- render?: React.ReactElement | ((props: React.ImgHTMLAttributes<HTMLImageElement>) => React.ReactElement);
41
29
  }
42
30
  /**
43
31
  * Background image layer using an actual img element with object-cover.
44
32
  * Supports native lazy loading, srcset, and better accessibility.
45
33
  * Supports render prop for element composition.
46
34
  */
47
- declare const BackgroundImage: React.ForwardRefExoticComponent<BackgroundImageProps & React.RefAttributes<HTMLImageElement>>;
35
+ declare function BackgroundImage(props: BackgroundImageProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
36
+ declare namespace BackgroundImage {
37
+ var displayName: string;
38
+ }
48
39
  declare const backgroundVideoVariants: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "absolute inset-0 size-full object-cover", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "absolute inset-0 size-full object-cover", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
49
- export interface BackgroundVideoProps extends Omit<React.VideoHTMLAttributes<HTMLVideoElement>, "children"> {
40
+ export interface BackgroundVideoProps extends useRender.ComponentProps<"video">, Omit<React.VideoHTMLAttributes<HTMLVideoElement>, "children" | "render" | "src"> {
50
41
  /**
51
42
  * URL for the video source
52
43
  */
@@ -59,20 +50,15 @@ export interface BackgroundVideoProps extends Omit<React.VideoHTMLAttributes<HTM
59
50
  * Poster image URL shown before video loads
60
51
  */
61
52
  poster?: string;
62
- /**
63
- * Custom render prop for element composition.
64
- * @example
65
- * ```tsx
66
- * <BackgroundVideo render={<video className="custom" />} src="/bg.mp4" />
67
- * ```
68
- */
69
- render?: React.ReactElement | ((props: React.VideoHTMLAttributes<HTMLVideoElement>) => React.ReactElement);
70
53
  }
71
54
  /**
72
55
  * Background video layer using HTML5 video element.
73
56
  * Supports render prop for element composition.
74
57
  */
75
- declare const BackgroundVideo: React.ForwardRefExoticComponent<BackgroundVideoProps & React.RefAttributes<HTMLVideoElement>>;
58
+ declare function BackgroundVideo(props: BackgroundVideoProps): import("react/jsx-runtime").JSX.Element;
59
+ declare namespace BackgroundVideo {
60
+ var displayName: string;
61
+ }
76
62
  declare const backgroundStreamVariants: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "absolute inset-0 size-full border-0 scale-[1.5] object-cover", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "absolute inset-0 size-full border-0 scale-[1.5] object-cover", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
77
63
  export interface BackgroundStreamProps extends React.IframeHTMLAttributes<HTMLIFrameElement> {
78
64
  /**
@@ -149,8 +135,8 @@ export interface BackgroundGradientProps extends React.HTMLAttributes<HTMLDivEle
149
135
  */
150
136
  declare const BackgroundGradient: React.ForwardRefExoticComponent<BackgroundGradientProps & React.RefAttributes<HTMLDivElement>>;
151
137
  declare const BackgroundCompound: React.ForwardRefExoticComponent<BackgroundProps & React.RefAttributes<HTMLDivElement>> & {
152
- Image: React.ForwardRefExoticComponent<BackgroundImageProps & React.RefAttributes<HTMLImageElement>>;
153
- Video: React.ForwardRefExoticComponent<BackgroundVideoProps & React.RefAttributes<HTMLVideoElement>>;
138
+ Image: typeof BackgroundImage;
139
+ Video: typeof BackgroundVideo;
154
140
  Stream: React.ForwardRefExoticComponent<BackgroundStreamProps & React.RefAttributes<HTMLIFrameElement>>;
155
141
  Overlay: React.ForwardRefExoticComponent<BackgroundOverlayProps & React.RefAttributes<HTMLDivElement>>;
156
142
  Gradient: React.ForwardRefExoticComponent<BackgroundGradientProps & React.RefAttributes<HTMLDivElement>>;
@@ -3,22 +3,21 @@ import { VariantProps } from 'tailwind-variants';
3
3
  import { ButtonTheme } from '../../../lib/theme';
4
4
  import * as React from "react";
5
5
  /**
6
- * Button component based on Figma BaseKit / Interface / Buttons
6
+ * Button component based on Figma Button component
7
7
  *
8
- * Variants:
9
- * - solid: Filled button
10
- * - outline: Outlined button
11
- * - ghost: No background/border, just text
12
- * - subtle: Light background with subtle styling
8
+ * Variants (matches Figma):
9
+ * - primary: Blue filled button for primary actions
10
+ * - default: Dark filled button for secondary prominence
11
+ * - secondary: Light gray filled button with subtle border
12
+ * - destructive: Red filled button for destructive actions
13
+ * - outline: Bordered button with transparent background
14
+ * - ghost: Transparent button with subtle hover
15
+ * - link: Text-only button with underline on hover
13
16
  *
14
- * Color Schemes:
15
- * - dark: Dark colors for use on light backgrounds (default)
16
- * - light: Light colors for use on dark backgrounds
17
- *
18
- * Sizes:
19
- * - lg: Large buttons
20
- * - default: Medium buttons
21
- * - sm: Small buttons
17
+ * Sizes (matches Figma):
18
+ * - sm: Small buttons (32px height)
19
+ * - default: Default buttons (36px height)
20
+ * - lg: Large buttons (40px height)
22
21
  *
23
22
  * For icon-only buttons, use the IconButton component instead.
24
23
  *
@@ -27,122 +26,115 @@ import * as React from "react";
27
26
  */
28
27
  declare const buttonVariants: import('tailwind-variants').TVReturnType<{
29
28
  variant: {
30
- solid: string;
29
+ primary: string;
30
+ default: string;
31
+ secondary: string;
32
+ destructive: string;
31
33
  outline: string;
32
34
  ghost: string;
33
- subtle: string;
35
+ link: string;
34
36
  themed: string;
35
37
  };
36
- colorScheme: {
37
- dark: string;
38
- light: string;
39
- };
40
38
  size: {
41
- lg: string;
42
- default: string;
43
39
  sm: string;
40
+ default: string;
41
+ lg: string;
44
42
  };
45
- }, undefined, "inline-flex items-center justify-center gap-spacing-8 whitespace-nowrap transition-colors duration-150 cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 rounded-surface-button stroke-surface-button border-solid", import('tailwind-variants/dist/config.js').TVConfig<{
43
+ }, undefined, "inline-flex items-center justify-center gap-spatial-ui-button-gap-icon-text whitespace-nowrap transition-colors duration-150 cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus focus-visible:ring-offset-1 disabled:pointer-events-none disabled:opacity-50", import('tailwind-variants/dist/config.js').TVConfig<{
46
44
  variant: {
47
- solid: string;
45
+ primary: string;
46
+ default: string;
47
+ secondary: string;
48
+ destructive: string;
48
49
  outline: string;
49
50
  ghost: string;
50
- subtle: string;
51
+ link: string;
51
52
  themed: string;
52
53
  };
53
- colorScheme: {
54
- dark: string;
55
- light: string;
56
- };
57
54
  size: {
58
- lg: string;
59
- default: string;
60
55
  sm: string;
56
+ default: string;
57
+ lg: string;
61
58
  };
62
59
  }, {
63
60
  variant: {
64
- solid: string;
61
+ primary: string;
62
+ default: string;
63
+ secondary: string;
64
+ destructive: string;
65
65
  outline: string;
66
66
  ghost: string;
67
- subtle: string;
67
+ link: string;
68
68
  themed: string;
69
69
  };
70
- colorScheme: {
71
- dark: string;
72
- light: string;
73
- };
74
70
  size: {
75
- lg: string;
76
- default: string;
77
71
  sm: string;
72
+ default: string;
73
+ lg: string;
78
74
  };
79
75
  }>, {
80
76
  variant: {
81
- solid: string;
77
+ primary: string;
78
+ default: string;
79
+ secondary: string;
80
+ destructive: string;
82
81
  outline: string;
83
82
  ghost: string;
84
- subtle: string;
83
+ link: string;
85
84
  themed: string;
86
85
  };
87
- colorScheme: {
88
- dark: string;
89
- light: string;
90
- };
91
86
  size: {
92
- lg: string;
93
- default: string;
94
87
  sm: string;
88
+ default: string;
89
+ lg: string;
95
90
  };
96
91
  }, undefined, import('tailwind-variants').TVReturnType<{
97
92
  variant: {
98
- solid: string;
93
+ primary: string;
94
+ default: string;
95
+ secondary: string;
96
+ destructive: string;
99
97
  outline: string;
100
98
  ghost: string;
101
- subtle: string;
99
+ link: string;
102
100
  themed: string;
103
101
  };
104
- colorScheme: {
105
- dark: string;
106
- light: string;
107
- };
108
102
  size: {
109
- lg: string;
110
- default: string;
111
103
  sm: string;
104
+ default: string;
105
+ lg: string;
112
106
  };
113
- }, undefined, "inline-flex items-center justify-center gap-spacing-8 whitespace-nowrap transition-colors duration-150 cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 rounded-surface-button stroke-surface-button border-solid", import('tailwind-variants/dist/config.js').TVConfig<{
107
+ }, undefined, "inline-flex items-center justify-center gap-spatial-ui-button-gap-icon-text whitespace-nowrap transition-colors duration-150 cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus focus-visible:ring-offset-1 disabled:pointer-events-none disabled:opacity-50", import('tailwind-variants/dist/config.js').TVConfig<{
114
108
  variant: {
115
- solid: string;
109
+ primary: string;
110
+ default: string;
111
+ secondary: string;
112
+ destructive: string;
116
113
  outline: string;
117
114
  ghost: string;
118
- subtle: string;
115
+ link: string;
119
116
  themed: string;
120
117
  };
121
- colorScheme: {
122
- dark: string;
123
- light: string;
124
- };
125
118
  size: {
126
- lg: string;
127
- default: string;
128
119
  sm: string;
120
+ default: string;
121
+ lg: string;
129
122
  };
130
123
  }, {
131
124
  variant: {
132
- solid: string;
125
+ primary: string;
126
+ default: string;
127
+ secondary: string;
128
+ destructive: string;
133
129
  outline: string;
134
130
  ghost: string;
135
- subtle: string;
131
+ link: string;
136
132
  themed: string;
137
133
  };
138
- colorScheme: {
139
- dark: string;
140
- light: string;
141
- };
142
134
  size: {
143
- lg: string;
144
- default: string;
145
135
  sm: string;
136
+ default: string;
137
+ lg: string;
146
138
  };
147
139
  }>, unknown, unknown, undefined>>;
148
140
  export type HTMLButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement>;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,7 +1,7 @@
1
+ import { useRender } from '@base-ui-components/react/use-render';
1
2
  import { VariantProps } from 'tailwind-variants';
2
- import * as React from "react";
3
3
  /**
4
- * IconButton component based on Figma BaseKit / Interface / Icon Button
4
+ * IconButton component based on Figma Button component (icon-only variant)
5
5
  *
6
6
  * **IMPORTANT: Accessibility Requirement**
7
7
  * Icon-only buttons MUST have an accessible label. Provide one of:
@@ -17,204 +17,156 @@ import * as React from "react";
17
17
  * </IconButton>
18
18
  * ```
19
19
  *
20
- * Variants:
21
- * - solid: Filled button
22
- * - outline: Outlined button
23
- * - ghost: No background/border, just icon
24
- * - subtle: Subtle outlined button
25
- *
26
- * Color Schemes:
27
- * - dark: Dark colors for use on light backgrounds (default)
28
- * - light: Light colors for use on dark backgrounds
20
+ * Variants (matches Figma):
21
+ * - primary: Filled brand button (indigo background)
22
+ * - primary-outline: Outlined brand button (indigo border/text)
23
+ * - secondary: Filled neutral button (white background, for dark backgrounds)
24
+ * - secondary-outline: Outlined neutral button (white border/text, for dark backgrounds)
25
+ * - ghost: Transparent button with subtle hover (for light backgrounds)
26
+ * - ghost-inverse: Transparent button with subtle hover (for dark backgrounds)
29
27
  *
30
28
  * Sizes:
31
- * - sm: Small (32x32)
32
- * - default: Medium (40x40)
33
- * - lg: Large (48x48)
29
+ * - sm: Small (28x28)
30
+ * - md: Medium (40x40) - default
31
+ * - lg: Large (56x56)
34
32
  *
35
33
  * Rounded:
36
- * - default: Standard border radius
37
- * - sm: Smaller border radius
34
+ * - default: Standard border radius (matches size)
38
35
  * - full: Fully circular
39
36
  */
40
37
  declare const iconButtonVariants: import('tailwind-variants').TVReturnType<{
41
38
  variant: {
42
- solid: string;
43
- outline: string;
39
+ primary: string;
40
+ "primary-outline": string;
41
+ secondary: string;
42
+ "secondary-outline": string;
44
43
  ghost: string;
45
- subtle: string;
46
- };
47
- colorScheme: {
48
- dark: string;
49
- light: string;
44
+ "ghost-inverse": string;
50
45
  };
51
46
  size: {
52
47
  sm: string;
53
- default: string;
48
+ md: string;
54
49
  lg: string;
55
50
  };
56
51
  rounded: {
57
52
  default: string;
58
- sm: string;
59
53
  full: string;
60
54
  };
61
55
  }, undefined, "inline-flex items-center justify-center whitespace-nowrap transition-colors duration-150 cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", import('tailwind-variants/dist/config.js').TVConfig<{
62
56
  variant: {
63
- solid: string;
64
- outline: string;
57
+ primary: string;
58
+ "primary-outline": string;
59
+ secondary: string;
60
+ "secondary-outline": string;
65
61
  ghost: string;
66
- subtle: string;
67
- };
68
- colorScheme: {
69
- dark: string;
70
- light: string;
62
+ "ghost-inverse": string;
71
63
  };
72
64
  size: {
73
65
  sm: string;
74
- default: string;
66
+ md: string;
75
67
  lg: string;
76
68
  };
77
69
  rounded: {
78
70
  default: string;
79
- sm: string;
80
71
  full: string;
81
72
  };
82
73
  }, {
83
74
  variant: {
84
- solid: string;
85
- outline: string;
75
+ primary: string;
76
+ "primary-outline": string;
77
+ secondary: string;
78
+ "secondary-outline": string;
86
79
  ghost: string;
87
- subtle: string;
88
- };
89
- colorScheme: {
90
- dark: string;
91
- light: string;
80
+ "ghost-inverse": string;
92
81
  };
93
82
  size: {
94
83
  sm: string;
95
- default: string;
84
+ md: string;
96
85
  lg: string;
97
86
  };
98
87
  rounded: {
99
88
  default: string;
100
- sm: string;
101
89
  full: string;
102
90
  };
103
91
  }>, {
104
92
  variant: {
105
- solid: string;
106
- outline: string;
93
+ primary: string;
94
+ "primary-outline": string;
95
+ secondary: string;
96
+ "secondary-outline": string;
107
97
  ghost: string;
108
- subtle: string;
109
- };
110
- colorScheme: {
111
- dark: string;
112
- light: string;
98
+ "ghost-inverse": string;
113
99
  };
114
100
  size: {
115
101
  sm: string;
116
- default: string;
102
+ md: string;
117
103
  lg: string;
118
104
  };
119
105
  rounded: {
120
106
  default: string;
121
- sm: string;
122
107
  full: string;
123
108
  };
124
109
  }, undefined, import('tailwind-variants').TVReturnType<{
125
110
  variant: {
126
- solid: string;
127
- outline: string;
111
+ primary: string;
112
+ "primary-outline": string;
113
+ secondary: string;
114
+ "secondary-outline": string;
128
115
  ghost: string;
129
- subtle: string;
130
- };
131
- colorScheme: {
132
- dark: string;
133
- light: string;
116
+ "ghost-inverse": string;
134
117
  };
135
118
  size: {
136
119
  sm: string;
137
- default: string;
120
+ md: string;
138
121
  lg: string;
139
122
  };
140
123
  rounded: {
141
124
  default: string;
142
- sm: string;
143
125
  full: string;
144
126
  };
145
127
  }, undefined, "inline-flex items-center justify-center whitespace-nowrap transition-colors duration-150 cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", import('tailwind-variants/dist/config.js').TVConfig<{
146
128
  variant: {
147
- solid: string;
148
- outline: string;
129
+ primary: string;
130
+ "primary-outline": string;
131
+ secondary: string;
132
+ "secondary-outline": string;
149
133
  ghost: string;
150
- subtle: string;
151
- };
152
- colorScheme: {
153
- dark: string;
154
- light: string;
134
+ "ghost-inverse": string;
155
135
  };
156
136
  size: {
157
137
  sm: string;
158
- default: string;
138
+ md: string;
159
139
  lg: string;
160
140
  };
161
141
  rounded: {
162
142
  default: string;
163
- sm: string;
164
143
  full: string;
165
144
  };
166
145
  }, {
167
146
  variant: {
168
- solid: string;
169
- outline: string;
147
+ primary: string;
148
+ "primary-outline": string;
149
+ secondary: string;
150
+ "secondary-outline": string;
170
151
  ghost: string;
171
- subtle: string;
172
- };
173
- colorScheme: {
174
- dark: string;
175
- light: string;
152
+ "ghost-inverse": string;
176
153
  };
177
154
  size: {
178
155
  sm: string;
179
- default: string;
156
+ md: string;
180
157
  lg: string;
181
158
  };
182
159
  rounded: {
183
160
  default: string;
184
- sm: string;
185
161
  full: string;
186
162
  };
187
163
  }>, unknown, unknown, undefined>>;
188
- export interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof iconButtonVariants> {
189
- /**
190
- * Custom render prop for element composition.
191
- * Accepts a React element or render function.
192
- * @example
193
- * ```tsx
194
- * // Render as a link
195
- * <IconButton render={<a href="/contact" />} aria-label="Contact">
196
- * <LinkIcon />
197
- * </IconButton>
198
- *
199
- * // Render with custom element
200
- * <IconButton render={(props) => <Link {...props} to="/home" />} aria-label="Home">
201
- * <HomeIcon />
202
- * </IconButton>
203
- * ```
204
- */
205
- render?: React.ReactElement | ((props: React.ButtonHTMLAttributes<HTMLButtonElement>) => React.ReactElement);
206
- /**
207
- * @deprecated Use `render` prop instead for element composition.
208
- * @example
209
- * ```tsx
210
- * // Old (deprecated)
211
- * <IconButton asChild><a href="/link">...</a></IconButton>
212
- *
213
- * // New (recommended)
214
- * <IconButton render={<a href="/link" />}>...</IconButton>
215
- * ```
216
- */
217
- asChild?: boolean;
164
+ interface IconButtonState extends Record<string, unknown> {
165
+ variant: "primary" | "primary-outline" | "secondary" | "secondary-outline" | "ghost" | "ghost-inverse";
166
+ size: "sm" | "md" | "lg";
167
+ rounded: "default" | "full";
168
+ }
169
+ export interface IconButtonProps extends useRender.ComponentProps<"button", IconButtonState>, VariantProps<typeof iconButtonVariants> {
218
170
  }
219
- declare const IconButton: React.ForwardRefExoticComponent<IconButtonProps & React.RefAttributes<HTMLButtonElement>>;
171
+ declare function IconButton(props: IconButtonProps): import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
220
172
  export { IconButton, iconButtonVariants };