@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.
- package/dist/components/atoms/background/background.d.ts +13 -27
- package/dist/components/atoms/button/button.d.ts +55 -71
- package/dist/components/atoms/button/icon-button.d.ts +62 -110
- package/dist/components/atoms/input/input-group.d.ts +278 -0
- package/dist/components/atoms/input/input.d.ts +121 -0
- package/dist/components/atoms/select/select.d.ts +131 -0
- package/dist/components/organisms/card/card.d.ts +2 -2
- package/dist/components/sections/prose/prose.d.ts +3 -3
- package/dist/components/sections/river/river.d.ts +1 -1
- package/dist/components/sections/tout/tout.d.ts +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +11034 -7824
- package/dist/index.js.map +1 -1
- package/dist/lib/form-control.d.ts +105 -0
- package/dist/tokens.css +2132 -17329
- package/package.json +1 -1
- package/src/components/atoms/background/background.tsx +71 -109
- package/src/components/atoms/button/button.stories.tsx +42 -0
- package/src/components/atoms/button/button.test.tsx +1 -1
- package/src/components/atoms/button/button.tsx +38 -103
- package/src/components/atoms/button/button.visual.test.tsx +70 -24
- package/src/components/atoms/button/icon-button.tsx +81 -224
- package/src/components/atoms/input/index.ts +17 -0
- package/src/components/atoms/input/input-group.stories.tsx +650 -0
- package/src/components/atoms/input/input-group.test.tsx +376 -0
- package/src/components/atoms/input/input-group.tsx +384 -0
- package/src/components/atoms/input/input.stories.tsx +232 -0
- package/src/components/atoms/input/input.test.tsx +183 -0
- package/src/components/atoms/input/input.tsx +97 -0
- package/src/components/atoms/select/index.ts +18 -0
- package/src/components/atoms/select/select.stories.tsx +455 -0
- package/src/components/atoms/select/select.tsx +320 -0
- package/src/components/dev-tools/dev-toolbar/dev-toolbar.stories.tsx +2 -6
- package/src/components/foundation/typography/typography.stories.tsx +401 -0
- package/src/components/organisms/card/card.stories.tsx +11 -11
- package/src/components/organisms/card/card.test.tsx +1 -1
- package/src/components/organisms/card/card.tsx +2 -2
- package/src/components/organisms/card/card.visual.test.tsx +6 -6
- package/src/components/organisms/navbar/navbar.tsx +2 -2
- package/src/components/organisms/navbar/navbar.visual.test.tsx +2 -2
- package/src/components/sections/card-grid/card-grid.tsx +1 -1
- package/src/components/sections/faq-section/faq-section.tsx +2 -2
- package/src/components/sections/hero/hero.test.tsx +5 -5
- package/src/components/sections/prose/prose.test.tsx +2 -2
- package/src/components/sections/prose/prose.tsx +4 -5
- package/src/components/sections/river/river.stories.tsx +8 -8
- package/src/components/sections/river/river.test.tsx +1 -1
- package/src/components/sections/river/river.tsx +2 -4
- package/src/components/sections/tout/tout.test.tsx +1 -1
- package/src/components/sections/tout/tout.tsx +2 -2
- package/src/index.ts +41 -0
- package/src/lib/form-control.ts +69 -0
- package/src/stories/Introduction.mdx +29 -15
- package/src/stories/ThemeProvider.stories.tsx +1 -3
- package/src/stories/TokenShowcase.stories.tsx +0 -19
- package/src/stories/TokenShowcase.tsx +714 -1366
- package/src/styles.css +3 -0
- package/src/tests/token-resolution.test.tsx +301 -0
|
@@ -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 };
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { Select as BaseSelect } from '@base-ui-components/react/select';
|
|
2
|
+
import { VariantProps } from 'tailwind-variants';
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
/**
|
|
5
|
+
* Select trigger variants based on Figma BaseKit / Interface / Dropdown
|
|
6
|
+
*
|
|
7
|
+
* States:
|
|
8
|
+
* - Default: White background, subtle border
|
|
9
|
+
* - Hover: Light gray background
|
|
10
|
+
* - Focus/Open: Accent border with focus ring
|
|
11
|
+
* - Selected: Has a value selected (darker text)
|
|
12
|
+
* - Disabled: Reduced opacity, not interactive
|
|
13
|
+
*/
|
|
14
|
+
declare const selectTriggerVariants: import('tailwind-variants').TVReturnType<{
|
|
15
|
+
size: {
|
|
16
|
+
readonly sm: "h-36 px-12 py-8 text-14";
|
|
17
|
+
readonly default: "h-48 px-16 py-10";
|
|
18
|
+
readonly lg: "h-56 px-20 py-12 text-18";
|
|
19
|
+
};
|
|
20
|
+
error: {
|
|
21
|
+
readonly true: "border-ui-error-color focus-visible:border-ui-error-color focus-visible:ring-ui-error-color/20 text-ui-error-color";
|
|
22
|
+
readonly false: "";
|
|
23
|
+
};
|
|
24
|
+
}, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<{
|
|
25
|
+
size: {
|
|
26
|
+
readonly sm: "h-36 px-12 py-8 text-14";
|
|
27
|
+
readonly default: "h-48 px-16 py-10";
|
|
28
|
+
readonly lg: "h-56 px-20 py-12 text-18";
|
|
29
|
+
};
|
|
30
|
+
error: {
|
|
31
|
+
readonly true: "border-ui-error-color focus-visible:border-ui-error-color focus-visible:ring-ui-error-color/20 text-ui-error-color";
|
|
32
|
+
readonly false: "";
|
|
33
|
+
};
|
|
34
|
+
}, {
|
|
35
|
+
size: {
|
|
36
|
+
readonly sm: "h-36 px-12 py-8 text-14";
|
|
37
|
+
readonly default: "h-48 px-16 py-10";
|
|
38
|
+
readonly lg: "h-56 px-20 py-12 text-18";
|
|
39
|
+
};
|
|
40
|
+
error: {
|
|
41
|
+
readonly true: "border-ui-error-color focus-visible:border-ui-error-color focus-visible:ring-ui-error-color/20 text-ui-error-color";
|
|
42
|
+
readonly false: "";
|
|
43
|
+
};
|
|
44
|
+
}>, {
|
|
45
|
+
size: {
|
|
46
|
+
readonly sm: "h-36 px-12 py-8 text-14";
|
|
47
|
+
readonly default: "h-48 px-16 py-10";
|
|
48
|
+
readonly lg: "h-56 px-20 py-12 text-18";
|
|
49
|
+
};
|
|
50
|
+
error: {
|
|
51
|
+
readonly true: "border-ui-error-color focus-visible:border-ui-error-color focus-visible:ring-ui-error-color/20 text-ui-error-color";
|
|
52
|
+
readonly false: "";
|
|
53
|
+
};
|
|
54
|
+
}, undefined, import('tailwind-variants').TVReturnType<{
|
|
55
|
+
size: {
|
|
56
|
+
readonly sm: "h-36 px-12 py-8 text-14";
|
|
57
|
+
readonly default: "h-48 px-16 py-10";
|
|
58
|
+
readonly lg: "h-56 px-20 py-12 text-18";
|
|
59
|
+
};
|
|
60
|
+
error: {
|
|
61
|
+
readonly true: "border-ui-error-color focus-visible:border-ui-error-color focus-visible:ring-ui-error-color/20 text-ui-error-color";
|
|
62
|
+
readonly false: "";
|
|
63
|
+
};
|
|
64
|
+
}, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<{
|
|
65
|
+
size: {
|
|
66
|
+
readonly sm: "h-36 px-12 py-8 text-14";
|
|
67
|
+
readonly default: "h-48 px-16 py-10";
|
|
68
|
+
readonly lg: "h-56 px-20 py-12 text-18";
|
|
69
|
+
};
|
|
70
|
+
error: {
|
|
71
|
+
readonly true: "border-ui-error-color focus-visible:border-ui-error-color focus-visible:ring-ui-error-color/20 text-ui-error-color";
|
|
72
|
+
readonly false: "";
|
|
73
|
+
};
|
|
74
|
+
}, {
|
|
75
|
+
size: {
|
|
76
|
+
readonly sm: "h-36 px-12 py-8 text-14";
|
|
77
|
+
readonly default: "h-48 px-16 py-10";
|
|
78
|
+
readonly lg: "h-56 px-20 py-12 text-18";
|
|
79
|
+
};
|
|
80
|
+
error: {
|
|
81
|
+
readonly true: "border-ui-error-color focus-visible:border-ui-error-color focus-visible:ring-ui-error-color/20 text-ui-error-color";
|
|
82
|
+
readonly false: "";
|
|
83
|
+
};
|
|
84
|
+
}>, unknown, unknown, undefined>>;
|
|
85
|
+
/**
|
|
86
|
+
* Select popup/menu variants
|
|
87
|
+
*/
|
|
88
|
+
declare const selectPopupVariants: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
|
|
89
|
+
/**
|
|
90
|
+
* Select option/item variants based on Figma Menu Items
|
|
91
|
+
*
|
|
92
|
+
* States:
|
|
93
|
+
* - Default: White background
|
|
94
|
+
* - Hover/Highlighted: Light indigo tint background
|
|
95
|
+
* - Selected: Stronger indigo tint with blue text and checkmark
|
|
96
|
+
* - Disabled: Reduced opacity
|
|
97
|
+
*/
|
|
98
|
+
declare const selectOptionVariants: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
|
|
99
|
+
export interface SelectProps extends BaseSelect.Root.Props {
|
|
100
|
+
children: React.ReactNode;
|
|
101
|
+
}
|
|
102
|
+
declare const SelectRoot: ({ children, ...props }: SelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
103
|
+
export interface SelectTriggerProps extends Omit<React.ComponentProps<typeof BaseSelect.Trigger>, "className">, VariantProps<typeof selectTriggerVariants> {
|
|
104
|
+
className?: string;
|
|
105
|
+
placeholder?: string;
|
|
106
|
+
}
|
|
107
|
+
declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectTriggerProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
108
|
+
export interface SelectPopupProps extends Omit<React.ComponentProps<typeof BaseSelect.Popup>, "className"> {
|
|
109
|
+
className?: string;
|
|
110
|
+
}
|
|
111
|
+
declare const SelectPopup: React.ForwardRefExoticComponent<Omit<SelectPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
112
|
+
export interface SelectOptionProps extends Omit<React.ComponentProps<typeof BaseSelect.Item>, "className"> {
|
|
113
|
+
className?: string;
|
|
114
|
+
}
|
|
115
|
+
declare const SelectOption: React.ForwardRefExoticComponent<Omit<SelectOptionProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
116
|
+
export interface SelectGroupProps extends Omit<React.ComponentProps<typeof BaseSelect.Group>, "className"> {
|
|
117
|
+
className?: string;
|
|
118
|
+
}
|
|
119
|
+
declare const SelectGroup: React.ForwardRefExoticComponent<Omit<SelectGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
120
|
+
export interface SelectGroupLabelProps extends Omit<React.ComponentProps<typeof BaseSelect.GroupLabel>, "className"> {
|
|
121
|
+
className?: string;
|
|
122
|
+
}
|
|
123
|
+
declare const SelectGroupLabel: React.ForwardRefExoticComponent<Omit<SelectGroupLabelProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
124
|
+
export declare const Select: (({ children, ...props }: SelectProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
125
|
+
Trigger: React.ForwardRefExoticComponent<Omit<SelectTriggerProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
126
|
+
Popup: React.ForwardRefExoticComponent<Omit<SelectPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
127
|
+
Option: React.ForwardRefExoticComponent<Omit<SelectOptionProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
128
|
+
Group: React.ForwardRefExoticComponent<Omit<SelectGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
129
|
+
GroupLabel: React.ForwardRefExoticComponent<Omit<SelectGroupLabelProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
130
|
+
};
|
|
131
|
+
export { SelectRoot, SelectTrigger, SelectPopup, SelectOption, SelectGroup, SelectGroupLabel, selectTriggerVariants, selectPopupVariants, selectOptionVariants, };
|
|
@@ -191,14 +191,14 @@ export interface CardContentProps extends React.HTMLAttributes<HTMLDivElement>,
|
|
|
191
191
|
* ```
|
|
192
192
|
*/
|
|
193
193
|
declare const CardContent: React.ForwardRefExoticComponent<CardContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
194
|
-
declare const cardEyebrowVariants: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "typography-
|
|
194
|
+
declare const cardEyebrowVariants: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "typography-overline text-text-muted uppercase tracking-wider", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "typography-overline text-text-muted uppercase tracking-wider", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
|
|
195
195
|
export interface CardEyebrowProps extends React.HTMLAttributes<HTMLParagraphElement> {
|
|
196
196
|
}
|
|
197
197
|
/**
|
|
198
198
|
* Optional eyebrow text above the card title.
|
|
199
199
|
*/
|
|
200
200
|
declare const CardEyebrow: React.ForwardRefExoticComponent<CardEyebrowProps & React.RefAttributes<HTMLParagraphElement>>;
|
|
201
|
-
declare const cardTitleVariants: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "typography-
|
|
201
|
+
declare const cardTitleVariants: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "typography-h5 text-text-primary", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "typography-h5 text-text-primary", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
|
|
202
202
|
export interface CardTitleProps extends React.HTMLAttributes<HTMLHeadingElement> {
|
|
203
203
|
/**
|
|
204
204
|
* The heading level to render (h1-h6). Defaults to h3.
|
|
@@ -29,9 +29,9 @@ export interface ProseSectionProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
29
29
|
* A section within Prose content, containing a heading and body text.
|
|
30
30
|
*
|
|
31
31
|
* Responsive typography:
|
|
32
|
-
* - h2: Uses typography-
|
|
33
|
-
* - h3: Uses typography-
|
|
34
|
-
* - Body: Uses typography-body-medium
|
|
32
|
+
* - h2: Uses typography-h3
|
|
33
|
+
* - h3: Uses typography-h4
|
|
34
|
+
* - Body: Uses typography-body-medium
|
|
35
35
|
*/
|
|
36
36
|
declare const ProseSection: React.ForwardRefExoticComponent<ProseSectionProps & React.RefAttributes<HTMLElement>>;
|
|
37
37
|
export { Prose, ProseSection };
|
|
@@ -86,7 +86,7 @@ export interface RiverProps extends React.HTMLAttributes<HTMLElement>, VariantPr
|
|
|
86
86
|
* headline="Feature Headline"
|
|
87
87
|
* body="Description of the feature..."
|
|
88
88
|
* primaryAction={<Button>Primary</Button>}
|
|
89
|
-
* secondaryAction={<Button variant="
|
|
89
|
+
* secondaryAction={<Button variant="outline">Secondary</Button>}
|
|
90
90
|
* media={<img src="..." alt="Feature" />}
|
|
91
91
|
* />
|
|
92
92
|
* </div>
|
|
@@ -137,7 +137,7 @@ export interface ToutProps extends React.HTMLAttributes<HTMLElement>, VariantPro
|
|
|
137
137
|
* headline="Feature Headline"
|
|
138
138
|
* body="Description of the feature..."
|
|
139
139
|
* primaryAction={<Button>Primary</Button>}
|
|
140
|
-
* secondaryAction={<Button variant="
|
|
140
|
+
* secondaryAction={<Button variant="outline" colorScheme="light">Secondary</Button>}
|
|
141
141
|
* backgroundMedia={
|
|
142
142
|
* <img
|
|
143
143
|
* src="/background.jpg"
|
package/dist/index.d.ts
CHANGED
|
@@ -4,10 +4,14 @@ export type { BackgroundGradientProps, BackgroundImageProps, BackgroundOverlayPr
|
|
|
4
4
|
export { Background, BackgroundGradient, BackgroundImage, BackgroundOverlay, BackgroundStream, BackgroundVideo, backgroundGradientVariants, backgroundImageVariants, backgroundOverlayVariants, backgroundStreamVariants, backgroundVariants, backgroundVideoVariants, } from './components/atoms/background';
|
|
5
5
|
export type { ButtonProps, IconButtonProps } from './components/atoms/button';
|
|
6
6
|
export { Button, buttonVariants, IconButton, iconButtonVariants, } from './components/atoms/button';
|
|
7
|
+
export type { InputGroupAddonProps, InputGroupButtonProps, InputGroupInputProps, InputGroupProps, InputGroupTextareaProps, InputGroupTextProps, InputProps, } from './components/atoms/input';
|
|
8
|
+
export { Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, inputGroupAddonVariants, inputGroupVariants, inputVariants, } from './components/atoms/input';
|
|
7
9
|
export type { NdstudioFooterProps } from './components/atoms/ndstudio-footer';
|
|
8
10
|
export { NdstudioFooter } from './components/atoms/ndstudio-footer';
|
|
9
11
|
export type { PagerControlProps } from './components/atoms/pager-control';
|
|
10
12
|
export { PagerControl, pagerControlVariants, } from './components/atoms/pager-control';
|
|
13
|
+
export type { SelectGroupLabelProps, SelectGroupProps, SelectOptionProps, SelectPopupProps, SelectProps, SelectTriggerProps, } from './components/atoms/select';
|
|
14
|
+
export { Select, SelectGroup, SelectGroupLabel, SelectOption, SelectPopup, SelectRoot, SelectTrigger, selectOptionVariants, selectPopupVariants, selectTriggerVariants, } from './components/atoms/select';
|
|
11
15
|
export type { DevToolbarProps, GridOverlayProps } from './components/dev-tools';
|
|
12
16
|
export { DevToolbar, GridOverlay } from './components/dev-tools';
|
|
13
17
|
export type { CardActionsProps, CardBodyProps, CardContentProps, CardDescriptionProps, CardEyebrowProps, CardImageProps, CardProps, CardTitleProps, } from './components/organisms/card';
|