@nationaldesignstudio/react 0.2.0 → 0.3.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 (58) hide show
  1. package/dist/components/atoms/background/background.d.ts +13 -27
  2. package/dist/components/atoms/button/button.d.ts +55 -71
  3. package/dist/components/atoms/button/icon-button.d.ts +62 -110
  4. package/dist/components/atoms/input/input-group.d.ts +278 -0
  5. package/dist/components/atoms/input/input.d.ts +121 -0
  6. package/dist/components/atoms/select/select.d.ts +131 -0
  7. package/dist/components/organisms/card/card.d.ts +2 -2
  8. package/dist/components/sections/prose/prose.d.ts +3 -3
  9. package/dist/components/sections/river/river.d.ts +1 -1
  10. package/dist/components/sections/tout/tout.d.ts +1 -1
  11. package/dist/index.d.ts +4 -0
  12. package/dist/index.js +11034 -7824
  13. package/dist/index.js.map +1 -1
  14. package/dist/lib/form-control.d.ts +105 -0
  15. package/dist/tokens.css +2132 -17329
  16. package/package.json +1 -1
  17. package/src/components/atoms/background/background.tsx +71 -109
  18. package/src/components/atoms/button/button.stories.tsx +42 -0
  19. package/src/components/atoms/button/button.test.tsx +1 -1
  20. package/src/components/atoms/button/button.tsx +38 -103
  21. package/src/components/atoms/button/button.visual.test.tsx +70 -24
  22. package/src/components/atoms/button/icon-button.tsx +81 -224
  23. package/src/components/atoms/input/index.ts +17 -0
  24. package/src/components/atoms/input/input-group.stories.tsx +650 -0
  25. package/src/components/atoms/input/input-group.test.tsx +376 -0
  26. package/src/components/atoms/input/input-group.tsx +384 -0
  27. package/src/components/atoms/input/input.stories.tsx +232 -0
  28. package/src/components/atoms/input/input.test.tsx +183 -0
  29. package/src/components/atoms/input/input.tsx +97 -0
  30. package/src/components/atoms/select/index.ts +18 -0
  31. package/src/components/atoms/select/select.stories.tsx +455 -0
  32. package/src/components/atoms/select/select.tsx +320 -0
  33. package/src/components/dev-tools/dev-toolbar/dev-toolbar.stories.tsx +2 -6
  34. package/src/components/foundation/typography/typography.stories.tsx +401 -0
  35. package/src/components/organisms/card/card.stories.tsx +11 -11
  36. package/src/components/organisms/card/card.test.tsx +1 -1
  37. package/src/components/organisms/card/card.tsx +2 -2
  38. package/src/components/organisms/card/card.visual.test.tsx +6 -6
  39. package/src/components/organisms/navbar/navbar.tsx +2 -2
  40. package/src/components/organisms/navbar/navbar.visual.test.tsx +2 -2
  41. package/src/components/sections/card-grid/card-grid.tsx +1 -1
  42. package/src/components/sections/faq-section/faq-section.tsx +2 -2
  43. package/src/components/sections/hero/hero.test.tsx +5 -5
  44. package/src/components/sections/prose/prose.test.tsx +2 -2
  45. package/src/components/sections/prose/prose.tsx +4 -5
  46. package/src/components/sections/river/river.stories.tsx +8 -8
  47. package/src/components/sections/river/river.test.tsx +1 -1
  48. package/src/components/sections/river/river.tsx +2 -4
  49. package/src/components/sections/tout/tout.test.tsx +1 -1
  50. package/src/components/sections/tout/tout.tsx +2 -2
  51. package/src/index.ts +41 -0
  52. package/src/lib/form-control.ts +69 -0
  53. package/src/stories/Introduction.mdx +29 -15
  54. package/src/stories/ThemeProvider.stories.tsx +1 -3
  55. package/src/stories/TokenShowcase.stories.tsx +0 -19
  56. package/src/stories/TokenShowcase.tsx +714 -1366
  57. package/src/styles.css +3 -0
  58. package/src/tests/token-resolution.test.tsx +301 -0
@@ -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,20 @@ 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
13
- *
14
- * Color Schemes:
15
- * - dark: Dark colors for use on light backgrounds (default)
16
- * - light: Light colors for use on dark backgrounds
8
+ * Variants (matches Figma):
9
+ * - primary: Filled brand button (indigo background)
10
+ * - primary-outline: Outlined brand button (indigo border/text)
11
+ * - secondary: Filled neutral button (white background, for dark backgrounds)
12
+ * - secondary-outline: Outlined neutral button (white border/text, for dark backgrounds)
13
+ * - ghost: Transparent button with subtle hover (for light backgrounds)
14
+ * - ghost-inverse: Transparent button with subtle hover (for dark backgrounds)
17
15
  *
18
16
  * Sizes:
19
- * - lg: Large buttons
20
- * - default: Medium buttons
21
- * - sm: Small buttons
17
+ * - lg: Large buttons (56px height)
18
+ * - md: Medium buttons (40px height) - default
19
+ * - sm: Small buttons (28px height)
22
20
  *
23
21
  * For icon-only buttons, use the IconButton component instead.
24
22
  *
@@ -27,121 +25,107 @@ import * as React from "react";
27
25
  */
28
26
  declare const buttonVariants: import('tailwind-variants').TVReturnType<{
29
27
  variant: {
30
- solid: string;
31
- outline: string;
28
+ primary: string;
29
+ "primary-outline": string;
30
+ secondary: string;
31
+ "secondary-outline": string;
32
32
  ghost: string;
33
- subtle: string;
33
+ "ghost-inverse": string;
34
34
  themed: string;
35
35
  };
36
- colorScheme: {
37
- dark: string;
38
- light: string;
39
- };
40
36
  size: {
41
37
  lg: string;
42
- default: string;
38
+ md: string;
43
39
  sm: string;
44
40
  };
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<{
41
+ }, undefined, "inline-flex items-center justify-center gap-6 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 border-solid", import('tailwind-variants/dist/config.js').TVConfig<{
46
42
  variant: {
47
- solid: string;
48
- outline: string;
43
+ primary: string;
44
+ "primary-outline": string;
45
+ secondary: string;
46
+ "secondary-outline": string;
49
47
  ghost: string;
50
- subtle: string;
48
+ "ghost-inverse": string;
51
49
  themed: string;
52
50
  };
53
- colorScheme: {
54
- dark: string;
55
- light: string;
56
- };
57
51
  size: {
58
52
  lg: string;
59
- default: string;
53
+ md: string;
60
54
  sm: string;
61
55
  };
62
56
  }, {
63
57
  variant: {
64
- solid: string;
65
- outline: string;
58
+ primary: string;
59
+ "primary-outline": string;
60
+ secondary: string;
61
+ "secondary-outline": string;
66
62
  ghost: string;
67
- subtle: string;
63
+ "ghost-inverse": string;
68
64
  themed: string;
69
65
  };
70
- colorScheme: {
71
- dark: string;
72
- light: string;
73
- };
74
66
  size: {
75
67
  lg: string;
76
- default: string;
68
+ md: string;
77
69
  sm: string;
78
70
  };
79
71
  }>, {
80
72
  variant: {
81
- solid: string;
82
- outline: string;
73
+ primary: string;
74
+ "primary-outline": string;
75
+ secondary: string;
76
+ "secondary-outline": string;
83
77
  ghost: string;
84
- subtle: string;
78
+ "ghost-inverse": string;
85
79
  themed: string;
86
80
  };
87
- colorScheme: {
88
- dark: string;
89
- light: string;
90
- };
91
81
  size: {
92
82
  lg: string;
93
- default: string;
83
+ md: string;
94
84
  sm: string;
95
85
  };
96
86
  }, undefined, import('tailwind-variants').TVReturnType<{
97
87
  variant: {
98
- solid: string;
99
- outline: string;
88
+ primary: string;
89
+ "primary-outline": string;
90
+ secondary: string;
91
+ "secondary-outline": string;
100
92
  ghost: string;
101
- subtle: string;
93
+ "ghost-inverse": string;
102
94
  themed: string;
103
95
  };
104
- colorScheme: {
105
- dark: string;
106
- light: string;
107
- };
108
96
  size: {
109
97
  lg: string;
110
- default: string;
98
+ md: string;
111
99
  sm: string;
112
100
  };
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<{
101
+ }, undefined, "inline-flex items-center justify-center gap-6 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 border-solid", import('tailwind-variants/dist/config.js').TVConfig<{
114
102
  variant: {
115
- solid: string;
116
- outline: string;
103
+ primary: string;
104
+ "primary-outline": string;
105
+ secondary: string;
106
+ "secondary-outline": string;
117
107
  ghost: string;
118
- subtle: string;
108
+ "ghost-inverse": string;
119
109
  themed: string;
120
110
  };
121
- colorScheme: {
122
- dark: string;
123
- light: string;
124
- };
125
111
  size: {
126
112
  lg: string;
127
- default: string;
113
+ md: string;
128
114
  sm: string;
129
115
  };
130
116
  }, {
131
117
  variant: {
132
- solid: string;
133
- outline: string;
118
+ primary: string;
119
+ "primary-outline": string;
120
+ secondary: string;
121
+ "secondary-outline": string;
134
122
  ghost: string;
135
- subtle: string;
123
+ "ghost-inverse": string;
136
124
  themed: string;
137
125
  };
138
- colorScheme: {
139
- dark: string;
140
- light: string;
141
- };
142
126
  size: {
143
127
  lg: string;
144
- default: string;
128
+ md: string;
145
129
  sm: string;
146
130
  };
147
131
  }>, unknown, unknown, undefined>>;
@@ -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 };