@nationaldesignstudio/react 0.0.19 → 0.2.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/component-registry.md +46 -19
- package/dist/components/atoms/accordion/accordion.d.ts +9 -9
- package/dist/components/atoms/background/background.d.ts +23 -0
- package/dist/components/atoms/button/icon-button.d.ts +44 -16
- package/dist/components/sections/banner/banner.d.ts +9 -9
- package/dist/components/sections/faq-section/faq-section.d.ts +1 -1
- package/dist/components/sections/hero/hero.d.ts +115 -18
- package/dist/components/sections/tout/tout.d.ts +8 -8
- package/dist/components/sections/two-column-section/two-column-section.d.ts +7 -21
- package/dist/index.js +2177 -2027
- package/dist/index.js.map +1 -1
- package/dist/tokens.css +16 -16
- package/package.json +1 -1
- package/src/components/atoms/accordion/accordion.test.tsx +231 -0
- package/src/components/atoms/accordion/accordion.tsx +21 -19
- package/src/components/atoms/background/background.test.tsx +213 -0
- package/src/components/atoms/background/background.tsx +104 -27
- package/src/components/atoms/button/button.tsx +11 -1
- package/src/components/atoms/button/icon-button.test.tsx +254 -0
- package/src/components/atoms/button/icon-button.tsx +108 -16
- package/src/components/atoms/pager-control/pager-control.tsx +32 -3
- package/src/components/dev-tools/dev-toolbar/dev-toolbar.tsx +2 -0
- package/src/components/organisms/card/card.test.tsx +4 -2
- package/src/components/organisms/navbar/navbar.tsx +2 -0
- package/src/components/sections/banner/banner.stories.tsx +5 -1
- package/src/components/sections/banner/banner.tsx +10 -10
- package/src/components/sections/faq-section/faq-section.stories.tsx +7 -7
- package/src/components/sections/faq-section/faq-section.tsx +3 -3
- package/src/components/sections/hero/hero.tsx +33 -51
- package/src/components/sections/tout/tout.stories.tsx +31 -7
- package/src/components/sections/tout/tout.tsx +6 -8
- package/src/components/sections/two-column-section/two-column-section.stories.tsx +11 -11
- package/src/components/sections/two-column-section/two-column-section.tsx +16 -10
- package/src/stories/ThemeProvider.stories.tsx +9 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Component Registry
|
|
2
2
|
|
|
3
3
|
> Auto-generated component metadata for AI/agent consumption.
|
|
4
|
-
> Generated: 2026-01-
|
|
4
|
+
> Generated: 2026-01-13T20:09:44.586Z
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -484,6 +484,9 @@ className="font-semibold" // Font weight 600
|
|
|
484
484
|
The title text displayed in the hero.
|
|
485
485
|
- `titleClassName`: string
|
|
486
486
|
Custom typography class for the title using primitive tokens.
|
|
487
|
+
- `colorScheme`: "dark" | "light"
|
|
488
|
+
Color scheme for text content.
|
|
489
|
+
Values: `dark`, `light`
|
|
487
490
|
- `top`: React.ReactNode
|
|
488
491
|
Content for the top slot (full-width, no padding).
|
|
489
492
|
- `background`: React.ReactNode | string
|
|
@@ -1203,7 +1206,11 @@ className="font-semibold" // Font weight 600
|
|
|
1203
1206
|
<Banner
|
|
1204
1207
|
heading="Custom Styled Banner"
|
|
1205
1208
|
description="This banner has a custom background color applied via className."
|
|
1206
|
-
action={
|
|
1209
|
+
action={
|
|
1210
|
+
<Button variant="outline" colorScheme="light">
|
|
1211
|
+
Action
|
|
1212
|
+
</Button>
|
|
1213
|
+
}
|
|
1207
1214
|
className="bg-gray-1000 text-gray-50 [&_h2]:text-gray-50 [&_p]:text-gray-200"
|
|
1208
1215
|
/>
|
|
1209
1216
|
```
|
|
@@ -1503,8 +1510,8 @@ className="font-semibold" // Font weight 600
|
|
|
1503
1510
|
```
|
|
1504
1511
|
|
|
1505
1512
|
```tsx
|
|
1506
|
-
<FaqSection
|
|
1507
|
-
<Accordion defaultExpanded="faq-1">
|
|
1513
|
+
<FaqSection colorScheme="dark">
|
|
1514
|
+
<Accordion colorScheme="dark" defaultExpanded="faq-1">
|
|
1508
1515
|
<AccordionItem
|
|
1509
1516
|
id="faq-1"
|
|
1510
1517
|
title="What is the US Tech Force (Tech Force)?"
|
|
@@ -1531,7 +1538,7 @@ className="font-semibold" // Font weight 600
|
|
|
1531
1538
|
```
|
|
1532
1539
|
|
|
1533
1540
|
```tsx
|
|
1534
|
-
<FaqSection
|
|
1541
|
+
<FaqSection colorScheme="light">
|
|
1535
1542
|
<Accordion defaultExpanded="faq-1">
|
|
1536
1543
|
<AccordionItem
|
|
1537
1544
|
id="faq-1"
|
|
@@ -2177,7 +2184,11 @@ className="font-semibold" // Font weight 600
|
|
|
2177
2184
|
headline="Brand-Large/Headline/Small"
|
|
2178
2185
|
body="A river pattern stacks content in a simple vertical flow: one clear heading, a short block of copy, then the next step. It's ideal for guiding citizens through a process or story, keeping focus moving straight down the page with minimal choices and well-timed calls to action."
|
|
2179
2186
|
primaryAction={<Button>Primary</Button>}
|
|
2180
|
-
secondaryAction={
|
|
2187
|
+
secondaryAction={
|
|
2188
|
+
<Button variant="outline" colorScheme="light">
|
|
2189
|
+
Secondary
|
|
2190
|
+
</Button>
|
|
2191
|
+
}
|
|
2181
2192
|
backgroundMedia={<PlaceholderBackground />}
|
|
2182
2193
|
/>
|
|
2183
2194
|
```
|
|
@@ -2187,7 +2198,11 @@ className="font-semibold" // Font weight 600
|
|
|
2187
2198
|
headline="Brand-Large/Headline/Small"
|
|
2188
2199
|
body="A river pattern stacks content in a simple vertical flow: one clear heading, a short block of copy, then the next step. It's ideal for guiding citizens through a process or story, keeping focus moving straight down the page with minimal choices and well-timed calls to action."
|
|
2189
2200
|
primaryAction={<Button>Primary</Button>}
|
|
2190
|
-
secondaryAction={
|
|
2201
|
+
secondaryAction={
|
|
2202
|
+
<Button variant="outline" colorScheme="light">
|
|
2203
|
+
Secondary
|
|
2204
|
+
</Button>
|
|
2205
|
+
}
|
|
2191
2206
|
backgroundMedia={<PlaceholderBackground />}
|
|
2192
2207
|
/>
|
|
2193
2208
|
```
|
|
@@ -2198,7 +2213,7 @@ className="font-semibold" // Font weight 600
|
|
|
2198
2213
|
body="A river pattern stacks content in a simple vertical flow: one clear heading, a short block of copy, then the next step. It's ideal for guiding citizens through a process or story, keeping focus moving straight down the page with minimal choices and well-timed calls to action."
|
|
2199
2214
|
primaryAction={<Button size="sm">Primary</Button>}
|
|
2200
2215
|
secondaryAction={
|
|
2201
|
-
<Button size="sm" variant="
|
|
2216
|
+
<Button size="sm" variant="outline" colorScheme="light">
|
|
2202
2217
|
Secondary
|
|
2203
2218
|
</Button>
|
|
2204
2219
|
}
|
|
@@ -2211,7 +2226,11 @@ className="font-semibold" // Font weight 600
|
|
|
2211
2226
|
headline="Work with Purpose"
|
|
2212
2227
|
body="Join a team that's building the future of government services. We're looking for passionate individuals who want to make a difference."
|
|
2213
2228
|
primaryAction={<Button>View Careers</Button>}
|
|
2214
|
-
secondaryAction={
|
|
2229
|
+
secondaryAction={
|
|
2230
|
+
<Button variant="outline" colorScheme="light">
|
|
2231
|
+
Learn More
|
|
2232
|
+
</Button>
|
|
2233
|
+
}
|
|
2215
2234
|
backgroundMedia={<ImageBackground />}
|
|
2216
2235
|
/>
|
|
2217
2236
|
```
|
|
@@ -2230,7 +2249,11 @@ className="font-semibold" // Font weight 600
|
|
|
2230
2249
|
headline="Experience Innovation"
|
|
2231
2250
|
body="See how modern technology is transforming the way government serves its citizens."
|
|
2232
2251
|
primaryAction={<Button>Watch Video</Button>}
|
|
2233
|
-
secondaryAction={
|
|
2252
|
+
secondaryAction={
|
|
2253
|
+
<Button variant="outline" colorScheme="light">
|
|
2254
|
+
Learn More
|
|
2255
|
+
</Button>
|
|
2256
|
+
}
|
|
2234
2257
|
backgroundMedia={
|
|
2235
2258
|
<div className="absolute inset-0 bg-gray-800 flex items-center justify-center">
|
|
2236
2259
|
<span className="text-gray-400 typography-body-small">
|
|
@@ -2246,7 +2269,11 @@ className="font-semibold" // Font weight 600
|
|
|
2246
2269
|
headline="Work with Purpose"
|
|
2247
2270
|
body="Join a team that's building the future of government services. We're looking for passionate individuals who want to make a difference."
|
|
2248
2271
|
primaryAction={<Button>View Careers</Button>}
|
|
2249
|
-
secondaryAction={
|
|
2272
|
+
secondaryAction={
|
|
2273
|
+
<Button variant="outline" colorScheme="light">
|
|
2274
|
+
Learn More
|
|
2275
|
+
</Button>
|
|
2276
|
+
}
|
|
2250
2277
|
backgroundMedia={<ImageBackground />}
|
|
2251
2278
|
footer={<NdstudioFooter />}
|
|
2252
2279
|
/>
|
|
@@ -2279,7 +2306,7 @@ className="font-semibold" // Font weight 600
|
|
|
2279
2306
|
|
|
2280
2307
|
```tsx
|
|
2281
2308
|
<TwoColumnSection
|
|
2282
|
-
|
|
2309
|
+
colorScheme="dark"
|
|
2283
2310
|
title="US Tech Force"
|
|
2284
2311
|
lead="The US Tech Force is recruiting an elite corps of engineers to build the next generation of government technology."
|
|
2285
2312
|
>
|
|
@@ -2296,7 +2323,7 @@ className="font-semibold" // Font weight 600
|
|
|
2296
2323
|
|
|
2297
2324
|
```tsx
|
|
2298
2325
|
<TwoColumnSection
|
|
2299
|
-
|
|
2326
|
+
colorScheme="light"
|
|
2300
2327
|
title="US Tech Force"
|
|
2301
2328
|
lead="The US Tech Force is recruiting an elite corps of engineers to build the next generation of government technology."
|
|
2302
2329
|
>
|
|
@@ -2313,7 +2340,7 @@ className="font-semibold" // Font weight 600
|
|
|
2313
2340
|
|
|
2314
2341
|
```tsx
|
|
2315
2342
|
<TwoColumnSection
|
|
2316
|
-
|
|
2343
|
+
colorScheme="dark"
|
|
2317
2344
|
title="US Tech Force"
|
|
2318
2345
|
lead="The US Tech Force is recruiting an elite corps of engineers to build the next generation of government technology. Backed by the White House, Tech Force will tackle the most complex and large-scale civic and defense challenges of our era."
|
|
2319
2346
|
>
|
|
@@ -2341,7 +2368,7 @@ className="font-semibold" // Font weight 600
|
|
|
2341
2368
|
|
|
2342
2369
|
```tsx
|
|
2343
2370
|
<TwoColumnSection
|
|
2344
|
-
|
|
2371
|
+
colorScheme="dark"
|
|
2345
2372
|
title="US Tech Force"
|
|
2346
2373
|
lead="The US Tech Force is recruiting an elite corps of engineers to build the next generation of government technology. Backed by the White House, Tech Force will tackle the most complex and large-scale civic and defense challenges of our era."
|
|
2347
2374
|
>
|
|
@@ -2369,7 +2396,7 @@ className="font-semibold" // Font weight 600
|
|
|
2369
2396
|
|
|
2370
2397
|
```tsx
|
|
2371
2398
|
<TwoColumnSection
|
|
2372
|
-
|
|
2399
|
+
colorScheme="dark"
|
|
2373
2400
|
title="US Tech Force"
|
|
2374
2401
|
lead="The US Tech Force is recruiting an elite corps of engineers to build the next generation of government technology. Backed by the White House, Tech Force will tackle the most complex and large-scale civic and defense challenges of our era."
|
|
2375
2402
|
>
|
|
@@ -2396,7 +2423,7 @@ className="font-semibold" // Font weight 600
|
|
|
2396
2423
|
```
|
|
2397
2424
|
|
|
2398
2425
|
```tsx
|
|
2399
|
-
<TwoColumnSection
|
|
2426
|
+
<TwoColumnSection colorScheme="dark" title="About the Program">
|
|
2400
2427
|
<p>
|
|
2401
2428
|
Through a two-year program, participants will work in teams reporting
|
|
2402
2429
|
directly to agency leadership. In collaboration with leading technology
|
|
@@ -2413,7 +2440,7 @@ className="font-semibold" // Font weight 600
|
|
|
2413
2440
|
|
|
2414
2441
|
```tsx
|
|
2415
2442
|
<TwoColumnSection
|
|
2416
|
-
|
|
2443
|
+
colorScheme="dark"
|
|
2417
2444
|
title="Our Mission"
|
|
2418
2445
|
lead={
|
|
2419
2446
|
<>
|
|
@@ -2438,7 +2465,7 @@ className="font-semibold" // Font weight 600
|
|
|
2438
2465
|
|
|
2439
2466
|
```tsx
|
|
2440
2467
|
<TwoColumnSection
|
|
2441
|
-
|
|
2468
|
+
colorScheme="dark"
|
|
2442
2469
|
title="Join Us"
|
|
2443
2470
|
lead="Build the future of American government technology."
|
|
2444
2471
|
>
|
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { VariantProps } from 'tailwind-variants';
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const accordionVariants: import('tailwind-variants').TVReturnType<{
|
|
4
|
-
|
|
4
|
+
colorScheme: {
|
|
5
5
|
dark: string;
|
|
6
6
|
light: string;
|
|
7
7
|
};
|
|
8
8
|
}, undefined, "flex flex-col", import('tailwind-variants/dist/config.js').TVConfig<{
|
|
9
|
-
|
|
9
|
+
colorScheme: {
|
|
10
10
|
dark: string;
|
|
11
11
|
light: string;
|
|
12
12
|
};
|
|
13
13
|
}, {
|
|
14
|
-
|
|
14
|
+
colorScheme: {
|
|
15
15
|
dark: string;
|
|
16
16
|
light: string;
|
|
17
17
|
};
|
|
18
18
|
}>, {
|
|
19
|
-
|
|
19
|
+
colorScheme: {
|
|
20
20
|
dark: string;
|
|
21
21
|
light: string;
|
|
22
22
|
};
|
|
23
23
|
}, undefined, import('tailwind-variants').TVReturnType<{
|
|
24
|
-
|
|
24
|
+
colorScheme: {
|
|
25
25
|
dark: string;
|
|
26
26
|
light: string;
|
|
27
27
|
};
|
|
28
28
|
}, undefined, "flex flex-col", import('tailwind-variants/dist/config.js').TVConfig<{
|
|
29
|
-
|
|
29
|
+
colorScheme: {
|
|
30
30
|
dark: string;
|
|
31
31
|
light: string;
|
|
32
32
|
};
|
|
33
33
|
}, {
|
|
34
|
-
|
|
34
|
+
colorScheme: {
|
|
35
35
|
dark: string;
|
|
36
36
|
light: string;
|
|
37
37
|
};
|
|
@@ -53,8 +53,8 @@ export interface AccordionProps extends React.HTMLAttributes<HTMLDivElement>, Va
|
|
|
53
53
|
* Built on Base UI's Accordion primitive.
|
|
54
54
|
*
|
|
55
55
|
* Variants:
|
|
56
|
-
* -
|
|
57
|
-
* -
|
|
56
|
+
* - light: Light theme styling (default)
|
|
57
|
+
* - dark: Dark theme styling
|
|
58
58
|
*
|
|
59
59
|
* @example
|
|
60
60
|
* ```tsx
|
|
@@ -25,10 +25,24 @@ export interface BackgroundImageProps extends Omit<React.ImgHTMLAttributes<HTMLI
|
|
|
25
25
|
* Object position (default: "center")
|
|
26
26
|
*/
|
|
27
27
|
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);
|
|
28
41
|
}
|
|
29
42
|
/**
|
|
30
43
|
* Background image layer using an actual img element with object-cover.
|
|
31
44
|
* Supports native lazy loading, srcset, and better accessibility.
|
|
45
|
+
* Supports render prop for element composition.
|
|
32
46
|
*/
|
|
33
47
|
declare const BackgroundImage: React.ForwardRefExoticComponent<BackgroundImageProps & React.RefAttributes<HTMLImageElement>>;
|
|
34
48
|
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>>;
|
|
@@ -45,9 +59,18 @@ export interface BackgroundVideoProps extends Omit<React.VideoHTMLAttributes<HTM
|
|
|
45
59
|
* Poster image URL shown before video loads
|
|
46
60
|
*/
|
|
47
61
|
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);
|
|
48
70
|
}
|
|
49
71
|
/**
|
|
50
72
|
* Background video layer using HTML5 video element.
|
|
73
|
+
* Supports render prop for element composition.
|
|
51
74
|
*/
|
|
52
75
|
declare const BackgroundVideo: React.ForwardRefExoticComponent<BackgroundVideoProps & React.RefAttributes<HTMLVideoElement>>;
|
|
53
76
|
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>>;
|
|
@@ -28,9 +28,9 @@ import * as React from "react";
|
|
|
28
28
|
* - light: Light colors for use on dark backgrounds
|
|
29
29
|
*
|
|
30
30
|
* Sizes:
|
|
31
|
-
* - lg: Large (48x48)
|
|
32
|
-
* - default: Medium (40x40)
|
|
33
31
|
* - sm: Small (32x32)
|
|
32
|
+
* - default: Medium (40x40)
|
|
33
|
+
* - lg: Large (48x48)
|
|
34
34
|
*
|
|
35
35
|
* Rounded:
|
|
36
36
|
* - default: Standard border radius
|
|
@@ -49,9 +49,9 @@ declare const iconButtonVariants: import('tailwind-variants').TVReturnType<{
|
|
|
49
49
|
light: string;
|
|
50
50
|
};
|
|
51
51
|
size: {
|
|
52
|
-
lg: string;
|
|
53
|
-
default: string;
|
|
54
52
|
sm: string;
|
|
53
|
+
default: string;
|
|
54
|
+
lg: string;
|
|
55
55
|
};
|
|
56
56
|
rounded: {
|
|
57
57
|
default: string;
|
|
@@ -70,9 +70,9 @@ declare const iconButtonVariants: import('tailwind-variants').TVReturnType<{
|
|
|
70
70
|
light: string;
|
|
71
71
|
};
|
|
72
72
|
size: {
|
|
73
|
-
lg: string;
|
|
74
|
-
default: string;
|
|
75
73
|
sm: string;
|
|
74
|
+
default: string;
|
|
75
|
+
lg: string;
|
|
76
76
|
};
|
|
77
77
|
rounded: {
|
|
78
78
|
default: string;
|
|
@@ -91,9 +91,9 @@ declare const iconButtonVariants: import('tailwind-variants').TVReturnType<{
|
|
|
91
91
|
light: string;
|
|
92
92
|
};
|
|
93
93
|
size: {
|
|
94
|
-
lg: string;
|
|
95
|
-
default: string;
|
|
96
94
|
sm: string;
|
|
95
|
+
default: string;
|
|
96
|
+
lg: string;
|
|
97
97
|
};
|
|
98
98
|
rounded: {
|
|
99
99
|
default: string;
|
|
@@ -112,9 +112,9 @@ declare const iconButtonVariants: import('tailwind-variants').TVReturnType<{
|
|
|
112
112
|
light: string;
|
|
113
113
|
};
|
|
114
114
|
size: {
|
|
115
|
-
lg: string;
|
|
116
|
-
default: string;
|
|
117
115
|
sm: string;
|
|
116
|
+
default: string;
|
|
117
|
+
lg: string;
|
|
118
118
|
};
|
|
119
119
|
rounded: {
|
|
120
120
|
default: string;
|
|
@@ -133,9 +133,9 @@ declare const iconButtonVariants: import('tailwind-variants').TVReturnType<{
|
|
|
133
133
|
light: string;
|
|
134
134
|
};
|
|
135
135
|
size: {
|
|
136
|
-
lg: string;
|
|
137
|
-
default: string;
|
|
138
136
|
sm: string;
|
|
137
|
+
default: string;
|
|
138
|
+
lg: string;
|
|
139
139
|
};
|
|
140
140
|
rounded: {
|
|
141
141
|
default: string;
|
|
@@ -154,9 +154,9 @@ declare const iconButtonVariants: import('tailwind-variants').TVReturnType<{
|
|
|
154
154
|
light: string;
|
|
155
155
|
};
|
|
156
156
|
size: {
|
|
157
|
-
lg: string;
|
|
158
|
-
default: string;
|
|
159
157
|
sm: string;
|
|
158
|
+
default: string;
|
|
159
|
+
lg: string;
|
|
160
160
|
};
|
|
161
161
|
rounded: {
|
|
162
162
|
default: string;
|
|
@@ -175,9 +175,9 @@ declare const iconButtonVariants: import('tailwind-variants').TVReturnType<{
|
|
|
175
175
|
light: string;
|
|
176
176
|
};
|
|
177
177
|
size: {
|
|
178
|
-
lg: string;
|
|
179
|
-
default: string;
|
|
180
178
|
sm: string;
|
|
179
|
+
default: string;
|
|
180
|
+
lg: string;
|
|
181
181
|
};
|
|
182
182
|
rounded: {
|
|
183
183
|
default: string;
|
|
@@ -186,6 +186,34 @@ declare const iconButtonVariants: import('tailwind-variants').TVReturnType<{
|
|
|
186
186
|
};
|
|
187
187
|
}>, unknown, unknown, undefined>>;
|
|
188
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
|
+
*/
|
|
189
217
|
asChild?: boolean;
|
|
190
218
|
}
|
|
191
219
|
declare const IconButton: React.ForwardRefExoticComponent<IconButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -14,37 +14,37 @@ import * as React from "react";
|
|
|
14
14
|
* Must be placed inside a `grid-container`. Uses `col-full` to span all columns.
|
|
15
15
|
*/
|
|
16
16
|
declare const bannerVariants: import('tailwind-variants').TVReturnType<{
|
|
17
|
-
|
|
17
|
+
colorScheme: {
|
|
18
18
|
light: string;
|
|
19
19
|
dark: string;
|
|
20
20
|
};
|
|
21
21
|
}, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<{
|
|
22
|
-
|
|
22
|
+
colorScheme: {
|
|
23
23
|
light: string;
|
|
24
24
|
dark: string;
|
|
25
25
|
};
|
|
26
26
|
}, {
|
|
27
|
-
|
|
27
|
+
colorScheme: {
|
|
28
28
|
light: string;
|
|
29
29
|
dark: string;
|
|
30
30
|
};
|
|
31
31
|
}>, {
|
|
32
|
-
|
|
32
|
+
colorScheme: {
|
|
33
33
|
light: string;
|
|
34
34
|
dark: string;
|
|
35
35
|
};
|
|
36
36
|
}, undefined, import('tailwind-variants').TVReturnType<{
|
|
37
|
-
|
|
37
|
+
colorScheme: {
|
|
38
38
|
light: string;
|
|
39
39
|
dark: string;
|
|
40
40
|
};
|
|
41
41
|
}, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<{
|
|
42
|
-
|
|
42
|
+
colorScheme: {
|
|
43
43
|
light: string;
|
|
44
44
|
dark: string;
|
|
45
45
|
};
|
|
46
46
|
}, {
|
|
47
|
-
|
|
47
|
+
colorScheme: {
|
|
48
48
|
light: string;
|
|
49
49
|
dark: string;
|
|
50
50
|
};
|
|
@@ -84,9 +84,9 @@ export interface BannerProps extends React.HTMLAttributes<HTMLElement>, VariantP
|
|
|
84
84
|
* />
|
|
85
85
|
* </div>
|
|
86
86
|
*
|
|
87
|
-
* // Dark
|
|
87
|
+
* // Dark colorScheme
|
|
88
88
|
* <Banner
|
|
89
|
-
*
|
|
89
|
+
* colorScheme="dark"
|
|
90
90
|
* heading="Still Have Questions?"
|
|
91
91
|
* description="Contact us at support@example.com"
|
|
92
92
|
* action={<Button variant="secondary">Email Us</Button>}
|
|
@@ -35,7 +35,7 @@ export interface FaqSectionProps extends Omit<React.HTMLAttributes<HTMLElement>,
|
|
|
35
35
|
* </FaqSection>
|
|
36
36
|
*
|
|
37
37
|
* // With custom title
|
|
38
|
-
* <FaqSection title="Common Questions"
|
|
38
|
+
* <FaqSection title="Common Questions" colorScheme="light">
|
|
39
39
|
* ...
|
|
40
40
|
* </FaqSection>
|
|
41
41
|
* ```
|