@nationaldesignstudio/react 0.1.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 (74) hide show
  1. package/dist/component-registry.md +46 -19
  2. package/dist/components/atoms/accordion/accordion.d.ts +7 -7
  3. package/dist/components/atoms/background/background.d.ts +13 -27
  4. package/dist/components/atoms/button/button.d.ts +55 -71
  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/select/select.d.ts +131 -0
  9. package/dist/components/organisms/card/card.d.ts +2 -2
  10. package/dist/components/sections/banner/banner.d.ts +9 -9
  11. package/dist/components/sections/faq-section/faq-section.d.ts +1 -1
  12. package/dist/components/sections/hero/hero.d.ts +115 -18
  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 +9 -9
  16. package/dist/components/sections/two-column-section/two-column-section.d.ts +7 -21
  17. package/dist/index.d.ts +4 -0
  18. package/dist/index.js +11075 -7841
  19. package/dist/index.js.map +1 -1
  20. package/dist/lib/form-control.d.ts +105 -0
  21. package/dist/tokens.css +2144 -17341
  22. package/package.json +1 -1
  23. package/src/components/atoms/accordion/accordion.test.tsx +18 -20
  24. package/src/components/atoms/accordion/accordion.tsx +19 -17
  25. package/src/components/atoms/background/background.test.tsx +2 -2
  26. package/src/components/atoms/background/background.tsx +77 -96
  27. package/src/components/atoms/button/button.stories.tsx +42 -0
  28. package/src/components/atoms/button/button.test.tsx +1 -1
  29. package/src/components/atoms/button/button.tsx +38 -103
  30. package/src/components/atoms/button/button.visual.test.tsx +70 -24
  31. package/src/components/atoms/button/icon-button.tsx +80 -188
  32. package/src/components/atoms/input/index.ts +17 -0
  33. package/src/components/atoms/input/input-group.stories.tsx +650 -0
  34. package/src/components/atoms/input/input-group.test.tsx +376 -0
  35. package/src/components/atoms/input/input-group.tsx +384 -0
  36. package/src/components/atoms/input/input.stories.tsx +232 -0
  37. package/src/components/atoms/input/input.test.tsx +183 -0
  38. package/src/components/atoms/input/input.tsx +97 -0
  39. package/src/components/atoms/select/index.ts +18 -0
  40. package/src/components/atoms/select/select.stories.tsx +455 -0
  41. package/src/components/atoms/select/select.tsx +320 -0
  42. package/src/components/dev-tools/dev-toolbar/dev-toolbar.stories.tsx +2 -6
  43. package/src/components/foundation/typography/typography.stories.tsx +401 -0
  44. package/src/components/organisms/card/card.stories.tsx +11 -11
  45. package/src/components/organisms/card/card.test.tsx +5 -3
  46. package/src/components/organisms/card/card.tsx +2 -2
  47. package/src/components/organisms/card/card.visual.test.tsx +6 -6
  48. package/src/components/organisms/navbar/navbar.tsx +2 -2
  49. package/src/components/organisms/navbar/navbar.visual.test.tsx +2 -2
  50. package/src/components/sections/banner/banner.stories.tsx +5 -1
  51. package/src/components/sections/banner/banner.tsx +10 -10
  52. package/src/components/sections/card-grid/card-grid.tsx +1 -1
  53. package/src/components/sections/faq-section/faq-section.stories.tsx +7 -7
  54. package/src/components/sections/faq-section/faq-section.tsx +5 -5
  55. package/src/components/sections/hero/hero.test.tsx +5 -5
  56. package/src/components/sections/hero/hero.tsx +33 -51
  57. package/src/components/sections/prose/prose.test.tsx +2 -2
  58. package/src/components/sections/prose/prose.tsx +4 -5
  59. package/src/components/sections/river/river.stories.tsx +8 -8
  60. package/src/components/sections/river/river.test.tsx +1 -1
  61. package/src/components/sections/river/river.tsx +2 -4
  62. package/src/components/sections/tout/tout.stories.tsx +31 -7
  63. package/src/components/sections/tout/tout.test.tsx +1 -1
  64. package/src/components/sections/tout/tout.tsx +8 -10
  65. package/src/components/sections/two-column-section/two-column-section.stories.tsx +11 -11
  66. package/src/components/sections/two-column-section/two-column-section.tsx +16 -10
  67. package/src/index.ts +41 -0
  68. package/src/lib/form-control.ts +69 -0
  69. package/src/stories/Introduction.mdx +29 -15
  70. package/src/stories/ThemeProvider.stories.tsx +1 -3
  71. package/src/stories/TokenShowcase.stories.tsx +0 -19
  72. package/src/stories/TokenShowcase.tsx +714 -1366
  73. package/src/styles.css +3 -0
  74. package/src/tests/token-resolution.test.tsx +301 -0
@@ -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 };
@@ -0,0 +1,278 @@
1
+ import { VariantProps } from 'tailwind-variants';
2
+ import { ButtonProps } from '../button';
3
+ import type * as React from "react";
4
+ declare const inputGroupVariants: import('tailwind-variants').TVReturnType<{
5
+ size: {
6
+ sm: string;
7
+ default: string;
8
+ lg: string;
9
+ };
10
+ }, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<{
11
+ size: {
12
+ sm: string;
13
+ default: string;
14
+ lg: string;
15
+ };
16
+ }, {
17
+ size: {
18
+ sm: string;
19
+ default: string;
20
+ lg: string;
21
+ };
22
+ }>, {
23
+ size: {
24
+ sm: string;
25
+ default: string;
26
+ lg: string;
27
+ };
28
+ }, undefined, import('tailwind-variants').TVReturnType<{
29
+ size: {
30
+ sm: string;
31
+ default: string;
32
+ lg: string;
33
+ };
34
+ }, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<{
35
+ size: {
36
+ sm: string;
37
+ default: string;
38
+ lg: string;
39
+ };
40
+ }, {
41
+ size: {
42
+ sm: string;
43
+ default: string;
44
+ lg: string;
45
+ };
46
+ }>, unknown, unknown, undefined>>;
47
+ declare const inputGroupAddonVariants: import('tailwind-variants').TVReturnType<{
48
+ align: {
49
+ "inline-start": string[];
50
+ "inline-end": string[];
51
+ "block-start": string[];
52
+ "block-end": string[];
53
+ };
54
+ }, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<{
55
+ align: {
56
+ "inline-start": string[];
57
+ "inline-end": string[];
58
+ "block-start": string[];
59
+ "block-end": string[];
60
+ };
61
+ }, {
62
+ align: {
63
+ "inline-start": string[];
64
+ "inline-end": string[];
65
+ "block-start": string[];
66
+ "block-end": string[];
67
+ };
68
+ }>, {
69
+ align: {
70
+ "inline-start": string[];
71
+ "inline-end": string[];
72
+ "block-start": string[];
73
+ "block-end": string[];
74
+ };
75
+ }, undefined, import('tailwind-variants').TVReturnType<{
76
+ align: {
77
+ "inline-start": string[];
78
+ "inline-end": string[];
79
+ "block-start": string[];
80
+ "block-end": string[];
81
+ };
82
+ }, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<{
83
+ align: {
84
+ "inline-start": string[];
85
+ "inline-end": string[];
86
+ "block-start": string[];
87
+ "block-end": string[];
88
+ };
89
+ }, {
90
+ align: {
91
+ "inline-start": string[];
92
+ "inline-end": string[];
93
+ "block-start": string[];
94
+ "block-end": string[];
95
+ };
96
+ }>, unknown, unknown, undefined>>;
97
+ export interface InputGroupProps extends React.FieldsetHTMLAttributes<HTMLFieldSetElement>, VariantProps<typeof inputGroupVariants> {
98
+ }
99
+ /**
100
+ * InputGroup component for combining inputs with addons, buttons, and text.
101
+ *
102
+ * A container that groups an input with prefix/suffix addons, icons, or buttons.
103
+ * Supports inline (left/right) and block (top/bottom) addon positioning.
104
+ *
105
+ * Uses semantic UI tokens for theming support.
106
+ *
107
+ * @example
108
+ * ```tsx
109
+ * // With prefix icon
110
+ * <InputGroup>
111
+ * <InputGroupAddon>
112
+ * <SearchIcon />
113
+ * </InputGroupAddon>
114
+ * <InputGroupInput placeholder="Search..." />
115
+ * </InputGroup>
116
+ *
117
+ * // With suffix button
118
+ * <InputGroup>
119
+ * <InputGroupInput placeholder="Enter email" />
120
+ * <InputGroupAddon align="inline-end">
121
+ * <InputGroupButton>Subscribe</InputGroupButton>
122
+ * </InputGroupAddon>
123
+ * </InputGroup>
124
+ *
125
+ * // With text prefix
126
+ * <InputGroup>
127
+ * <InputGroupAddon>
128
+ * <InputGroupText>https://</InputGroupText>
129
+ * </InputGroupAddon>
130
+ * <InputGroupInput placeholder="example.com" />
131
+ * </InputGroup>
132
+ * ```
133
+ */
134
+ declare function InputGroup({ className, size, disabled, ...props }: InputGroupProps): import("react/jsx-runtime").JSX.Element;
135
+ export interface InputGroupAddonProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof inputGroupAddonVariants> {
136
+ }
137
+ /**
138
+ * InputGroupAddon component for positioning addons within an InputGroup.
139
+ *
140
+ * Can contain icons, text, or buttons. Clicking the addon focuses the input.
141
+ *
142
+ * @example
143
+ * ```tsx
144
+ * // Inline start (default - left side)
145
+ * <InputGroupAddon>
146
+ * <SearchIcon />
147
+ * </InputGroupAddon>
148
+ *
149
+ * // Inline end (right side)
150
+ * <InputGroupAddon align="inline-end">
151
+ * <InputGroupButton>Submit</InputGroupButton>
152
+ * </InputGroupAddon>
153
+ *
154
+ * // Block positions (top/bottom)
155
+ * <InputGroupAddon align="block-start">
156
+ * <label>Email Address</label>
157
+ * </InputGroupAddon>
158
+ * ```
159
+ */
160
+ declare function InputGroupAddon({ className, align, onClick, onKeyDown, ...props }: InputGroupAddonProps): import("react/jsx-runtime").JSX.Element;
161
+ declare const inputGroupButtonVariants: import('tailwind-variants').TVReturnType<{
162
+ size: {
163
+ xs: string;
164
+ sm: string;
165
+ "icon-xs": string;
166
+ "icon-sm": string;
167
+ };
168
+ }, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<{
169
+ size: {
170
+ xs: string;
171
+ sm: string;
172
+ "icon-xs": string;
173
+ "icon-sm": string;
174
+ };
175
+ }, {
176
+ size: {
177
+ xs: string;
178
+ sm: string;
179
+ "icon-xs": string;
180
+ "icon-sm": string;
181
+ };
182
+ }>, {
183
+ size: {
184
+ xs: string;
185
+ sm: string;
186
+ "icon-xs": string;
187
+ "icon-sm": string;
188
+ };
189
+ }, undefined, import('tailwind-variants').TVReturnType<{
190
+ size: {
191
+ xs: string;
192
+ sm: string;
193
+ "icon-xs": string;
194
+ "icon-sm": string;
195
+ };
196
+ }, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<{
197
+ size: {
198
+ xs: string;
199
+ sm: string;
200
+ "icon-xs": string;
201
+ "icon-sm": string;
202
+ };
203
+ }, {
204
+ size: {
205
+ xs: string;
206
+ sm: string;
207
+ "icon-xs": string;
208
+ "icon-sm": string;
209
+ };
210
+ }>, unknown, unknown, undefined>>;
211
+ export interface InputGroupButtonProps extends Omit<ButtonProps, "size">, VariantProps<typeof inputGroupButtonVariants> {
212
+ }
213
+ /**
214
+ * InputGroupButton component for inline buttons within an InputGroup.
215
+ *
216
+ * A small button variant designed to fit inside input groups.
217
+ *
218
+ * @example
219
+ * ```tsx
220
+ * <InputGroupAddon align="inline-end">
221
+ * <InputGroupButton>Submit</InputGroupButton>
222
+ * </InputGroupAddon>
223
+ *
224
+ * // Icon button
225
+ * <InputGroupAddon align="inline-end">
226
+ * <InputGroupButton size="icon-xs">
227
+ * <ClearIcon />
228
+ * </InputGroupButton>
229
+ * </InputGroupAddon>
230
+ * ```
231
+ */
232
+ declare function InputGroupButton({ className, type, variant, size, ...props }: InputGroupButtonProps): import("react/jsx-runtime").JSX.Element;
233
+ export interface InputGroupTextProps extends React.HTMLAttributes<HTMLSpanElement> {
234
+ }
235
+ /**
236
+ * InputGroupText component for static text within an InputGroup.
237
+ *
238
+ * Use for prefixes like "https://" or suffixes like ".com"
239
+ *
240
+ * @example
241
+ * ```tsx
242
+ * <InputGroupAddon>
243
+ * <InputGroupText>https://</InputGroupText>
244
+ * </InputGroupAddon>
245
+ * ```
246
+ */
247
+ declare function InputGroupText({ className, ...props }: InputGroupTextProps): import("react/jsx-runtime").JSX.Element;
248
+ export interface InputGroupInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
249
+ }
250
+ /**
251
+ * InputGroupInput component - the input element within an InputGroup.
252
+ *
253
+ * Styled to integrate seamlessly with the InputGroup container.
254
+ *
255
+ * @example
256
+ * ```tsx
257
+ * <InputGroup>
258
+ * <InputGroupInput placeholder="Enter text..." />
259
+ * </InputGroup>
260
+ * ```
261
+ */
262
+ declare function InputGroupInput({ className, ...props }: InputGroupInputProps): import("react/jsx-runtime").JSX.Element;
263
+ export interface InputGroupTextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
264
+ }
265
+ /**
266
+ * InputGroupTextarea component - a textarea element within an InputGroup.
267
+ *
268
+ * Styled to integrate seamlessly with the InputGroup container.
269
+ *
270
+ * @example
271
+ * ```tsx
272
+ * <InputGroup>
273
+ * <InputGroupTextarea placeholder="Enter long text..." rows={4} />
274
+ * </InputGroup>
275
+ * ```
276
+ */
277
+ declare function InputGroupTextarea({ className, ...props }: InputGroupTextareaProps): import("react/jsx-runtime").JSX.Element;
278
+ export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupText, InputGroupInput, InputGroupTextarea, inputGroupVariants, inputGroupAddonVariants, };
@@ -0,0 +1,121 @@
1
+ import { VariantProps } from 'tailwind-variants';
2
+ import * as React from "react";
3
+ /**
4
+ * Input variants for styling based on Figma BaseKit / Interface / Input
5
+ *
6
+ * States (handled via CSS pseudo-classes and props):
7
+ * - Default: White background, subtle border
8
+ * - Hover: Light gray background (via :hover)
9
+ * - Focus: Accent border with focus ring (via :focus-visible)
10
+ * - Error: Error border color (via error prop)
11
+ * - Disabled: Disabled background (via :disabled)
12
+ *
13
+ * Sizes:
14
+ * - sm: Smaller height and padding
15
+ * - default: Standard 48px height
16
+ * - lg: Larger height and padding
17
+ */
18
+ declare const inputVariants: import('tailwind-variants').TVReturnType<{
19
+ size: {
20
+ readonly sm: "h-36 px-12 py-8 text-14";
21
+ readonly default: "h-48 px-16 py-10";
22
+ readonly lg: "h-56 px-20 py-12 text-18";
23
+ };
24
+ error: {
25
+ true: string;
26
+ false: "";
27
+ };
28
+ }, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<{
29
+ size: {
30
+ readonly sm: "h-36 px-12 py-8 text-14";
31
+ readonly default: "h-48 px-16 py-10";
32
+ readonly lg: "h-56 px-20 py-12 text-18";
33
+ };
34
+ error: {
35
+ true: string;
36
+ false: "";
37
+ };
38
+ }, {
39
+ size: {
40
+ readonly sm: "h-36 px-12 py-8 text-14";
41
+ readonly default: "h-48 px-16 py-10";
42
+ readonly lg: "h-56 px-20 py-12 text-18";
43
+ };
44
+ error: {
45
+ true: string;
46
+ false: "";
47
+ };
48
+ }>, {
49
+ size: {
50
+ readonly sm: "h-36 px-12 py-8 text-14";
51
+ readonly default: "h-48 px-16 py-10";
52
+ readonly lg: "h-56 px-20 py-12 text-18";
53
+ };
54
+ error: {
55
+ true: string;
56
+ false: "";
57
+ };
58
+ }, undefined, import('tailwind-variants').TVReturnType<{
59
+ size: {
60
+ readonly sm: "h-36 px-12 py-8 text-14";
61
+ readonly default: "h-48 px-16 py-10";
62
+ readonly lg: "h-56 px-20 py-12 text-18";
63
+ };
64
+ error: {
65
+ true: string;
66
+ false: "";
67
+ };
68
+ }, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<{
69
+ size: {
70
+ readonly sm: "h-36 px-12 py-8 text-14";
71
+ readonly default: "h-48 px-16 py-10";
72
+ readonly lg: "h-56 px-20 py-12 text-18";
73
+ };
74
+ error: {
75
+ true: string;
76
+ false: "";
77
+ };
78
+ }, {
79
+ size: {
80
+ readonly sm: "h-36 px-12 py-8 text-14";
81
+ readonly default: "h-48 px-16 py-10";
82
+ readonly lg: "h-56 px-20 py-12 text-18";
83
+ };
84
+ error: {
85
+ true: string;
86
+ false: "";
87
+ };
88
+ }>, unknown, unknown, undefined>>;
89
+ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size">, VariantProps<typeof inputVariants> {
90
+ /**
91
+ * Whether the input is in an error state
92
+ */
93
+ error?: boolean;
94
+ }
95
+ /**
96
+ * Input component based on Figma BaseKit / Interface / Input
97
+ *
98
+ * A styled text input with support for various states:
99
+ * - Default, hover, focus, error, and disabled states
100
+ * - Three size variants: sm, default, lg
101
+ *
102
+ * Uses semantic UI tokens for theming support.
103
+ *
104
+ * @example
105
+ * ```tsx
106
+ * // Basic usage
107
+ * <Input placeholder="Enter your email" />
108
+ *
109
+ * // With error state
110
+ * <Input error placeholder="Invalid input" />
111
+ *
112
+ * // Different sizes
113
+ * <Input size="sm" placeholder="Small" />
114
+ * <Input size="lg" placeholder="Large" />
115
+ *
116
+ * // Disabled
117
+ * <Input disabled placeholder="Disabled input" />
118
+ * ```
119
+ */
120
+ declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
121
+ export { Input, inputVariants };