@nationaldesignstudio/react 0.6.0 → 0.7.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/accordion/index.d.ts +95 -0
- package/dist/accordion/index.js +143 -0
- package/dist/accordion/index.js.map +1 -0
- package/dist/background/index.d.ts +149 -0
- package/dist/background/index.js +200 -0
- package/dist/background/index.js.map +1 -0
- package/dist/banner/index.d.ts +101 -0
- package/dist/banner/index.js +81 -0
- package/dist/banner/index.js.map +1 -0
- package/dist/blurred-video-backdrop/index.d.ts +233 -0
- package/dist/blurred-video-backdrop/index.js +266 -0
- package/dist/blurred-video-backdrop/index.js.map +1 -0
- package/dist/button/index.d.ts +180 -0
- package/dist/button/index.js +169 -0
- package/dist/button/index.js.map +1 -0
- package/dist/button-B2g5fH9b.d.ts +152 -0
- package/dist/card/index.d.ts +406 -0
- package/dist/card/index.js +219 -0
- package/dist/card/index.js.map +1 -0
- package/dist/card-grid/index.d.ts +90 -0
- package/dist/card-grid/index.js +74 -0
- package/dist/card-grid/index.js.map +1 -0
- package/dist/component-registry.md +136 -2
- package/dist/dev-toolbar/index.d.ts +8 -0
- package/dist/dev-toolbar/index.js +206 -0
- package/dist/dev-toolbar/index.js.map +1 -0
- package/dist/dialog/index.d.ts +268 -0
- package/dist/dialog/index.js +288 -0
- package/dist/dialog/index.js.map +1 -0
- package/dist/faq-section/index.d.ts +47 -0
- package/dist/faq-section/index.js +152 -0
- package/dist/faq-section/index.js.map +1 -0
- package/dist/grid-overlay/index.d.ts +10 -0
- package/dist/grid-overlay/index.js +38 -0
- package/dist/grid-overlay/index.js.map +1 -0
- package/dist/hero/index.d.ts +462 -0
- package/dist/hero/index.js +494 -0
- package/dist/hero/index.js.map +1 -0
- package/dist/hooks/index.d.ts +150 -0
- package/dist/hooks/index.js +339 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/index.d.ts +46 -5339
- package/dist/index.js +157 -4080
- package/dist/index.js.map +1 -1
- package/dist/input/index.d.ts +404 -0
- package/dist/input/index.js +393 -0
- package/dist/input/index.js.map +1 -0
- package/dist/navbar/index.d.ts +68 -0
- package/dist/navbar/index.js +227 -0
- package/dist/navbar/index.js.map +1 -0
- package/dist/ndstudio-footer/index.d.ts +32 -0
- package/dist/ndstudio-footer/index.js +35 -0
- package/dist/ndstudio-footer/index.js.map +1 -0
- package/dist/pager-control/index.d.ts +173 -0
- package/dist/pager-control/index.js +267 -0
- package/dist/pager-control/index.js.map +1 -0
- package/dist/popover/index.d.ts +200 -0
- package/dist/popover/index.js +290 -0
- package/dist/popover/index.js.map +1 -0
- package/dist/prose/index.d.ts +39 -0
- package/dist/prose/index.js +56 -0
- package/dist/prose/index.js.map +1 -0
- package/dist/quote-block/index.d.ts +156 -0
- package/dist/quote-block/index.js +321 -0
- package/dist/quote-block/index.js.map +1 -0
- package/dist/river/index.d.ts +100 -0
- package/dist/river/index.js +107 -0
- package/dist/river/index.js.map +1 -0
- package/dist/select/index.d.ts +188 -0
- package/dist/select/index.js +295 -0
- package/dist/select/index.js.map +1 -0
- package/dist/theme/index.d.ts +149 -0
- package/dist/theme/index.js +211 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/theme-CzBPUlh_.d.ts +332 -0
- package/dist/tooltip/index.d.ts +166 -0
- package/dist/tooltip/index.js +200 -0
- package/dist/tooltip/index.js.map +1 -0
- package/dist/tout/index.d.ts +157 -0
- package/dist/tout/index.js +315 -0
- package/dist/tout/index.js.map +1 -0
- package/dist/two-column-section/index.d.ts +122 -0
- package/dist/two-column-section/index.js +121 -0
- package/dist/two-column-section/index.js.map +1 -0
- package/dist/us-gov-banner/index.d.ts +141 -0
- package/dist/us-gov-banner/index.js +74 -0
- package/dist/us-gov-banner/index.js.map +1 -0
- package/dist/use-captions-AkKlJhov.d.ts +71 -0
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/index.js +12 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/video-dialog/index.d.ts +106 -0
- package/dist/video-dialog/index.js +1305 -0
- package/dist/video-dialog/index.js.map +1 -0
- package/dist/video-player/index.d.ts +115 -0
- package/dist/video-player/index.js +879 -0
- package/dist/video-player/index.js.map +1 -0
- package/dist/video-player-qxf-BURH.d.ts +236 -0
- package/dist/video-with-backdrop/index.d.ts +267 -0
- package/dist/video-with-backdrop/index.js +1284 -0
- package/dist/video-with-backdrop/index.js.map +1 -0
- package/package.json +13 -2
- package/src/components/organisms/us-gov-banner/us-gov-banner.tsx +5 -27
- package/src/theme/hooks.ts +2 -0
- package/src/theme/index.ts +2 -0
- package/src/theme/theme-provider.tsx +2 -0
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { tv } from 'tailwind-variants';
|
|
3
|
+
import { useRender } from '@base-ui-components/react/use-render';
|
|
4
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
// src/components/sections/quote-block/quote-block.tsx
|
|
7
|
+
var backgroundVariants = tv({
|
|
8
|
+
base: "absolute inset-0"
|
|
9
|
+
});
|
|
10
|
+
var Background = React.forwardRef(
|
|
11
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
12
|
+
"div",
|
|
13
|
+
{
|
|
14
|
+
ref,
|
|
15
|
+
"aria-hidden": "true",
|
|
16
|
+
className: backgroundVariants({ class: className }),
|
|
17
|
+
...props,
|
|
18
|
+
children
|
|
19
|
+
}
|
|
20
|
+
)
|
|
21
|
+
);
|
|
22
|
+
Background.displayName = "Background";
|
|
23
|
+
var backgroundImageVariants = tv({
|
|
24
|
+
base: "absolute inset-0 size-full object-cover"
|
|
25
|
+
});
|
|
26
|
+
function BackgroundImage(props) {
|
|
27
|
+
const {
|
|
28
|
+
className,
|
|
29
|
+
src,
|
|
30
|
+
position = "center",
|
|
31
|
+
alt = "",
|
|
32
|
+
style,
|
|
33
|
+
render,
|
|
34
|
+
...otherProps
|
|
35
|
+
} = props;
|
|
36
|
+
const imgClassName = backgroundImageVariants({ class: className });
|
|
37
|
+
const imgStyle = { objectPosition: position, ...style };
|
|
38
|
+
return useRender({
|
|
39
|
+
render,
|
|
40
|
+
props: {
|
|
41
|
+
src,
|
|
42
|
+
alt,
|
|
43
|
+
className: imgClassName,
|
|
44
|
+
style: imgStyle,
|
|
45
|
+
...otherProps
|
|
46
|
+
},
|
|
47
|
+
defaultTagName: "img"
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
BackgroundImage.displayName = "Background.Image";
|
|
51
|
+
var backgroundVideoVariants = tv({
|
|
52
|
+
base: "absolute inset-0 size-full object-cover"
|
|
53
|
+
});
|
|
54
|
+
function BackgroundVideo(props) {
|
|
55
|
+
const {
|
|
56
|
+
className,
|
|
57
|
+
src,
|
|
58
|
+
type,
|
|
59
|
+
poster,
|
|
60
|
+
autoPlay = true,
|
|
61
|
+
loop = true,
|
|
62
|
+
muted = true,
|
|
63
|
+
playsInline = true,
|
|
64
|
+
render,
|
|
65
|
+
children,
|
|
66
|
+
...otherProps
|
|
67
|
+
} = props;
|
|
68
|
+
const videoClassName = backgroundVideoVariants({ class: className });
|
|
69
|
+
const rendered = useRender({
|
|
70
|
+
render,
|
|
71
|
+
props: {
|
|
72
|
+
autoPlay,
|
|
73
|
+
loop,
|
|
74
|
+
muted,
|
|
75
|
+
playsInline,
|
|
76
|
+
poster,
|
|
77
|
+
className: videoClassName,
|
|
78
|
+
...otherProps
|
|
79
|
+
},
|
|
80
|
+
defaultTagName: "video"
|
|
81
|
+
});
|
|
82
|
+
if (!render) {
|
|
83
|
+
return /* @__PURE__ */ jsx(
|
|
84
|
+
"video",
|
|
85
|
+
{
|
|
86
|
+
autoPlay,
|
|
87
|
+
loop,
|
|
88
|
+
muted,
|
|
89
|
+
playsInline,
|
|
90
|
+
poster,
|
|
91
|
+
className: videoClassName,
|
|
92
|
+
...otherProps,
|
|
93
|
+
children: /* @__PURE__ */ jsx("source", { src, type })
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
return rendered;
|
|
98
|
+
}
|
|
99
|
+
BackgroundVideo.displayName = "Background.Video";
|
|
100
|
+
var backgroundStreamVariants = tv({
|
|
101
|
+
base: "absolute inset-0 size-full border-0 scale-[1.5] object-cover"
|
|
102
|
+
});
|
|
103
|
+
var BackgroundStream = React.forwardRef(
|
|
104
|
+
({
|
|
105
|
+
className,
|
|
106
|
+
videoId,
|
|
107
|
+
poster,
|
|
108
|
+
autoplay = true,
|
|
109
|
+
loop = true,
|
|
110
|
+
muted = true,
|
|
111
|
+
controls = false,
|
|
112
|
+
customerSubdomain,
|
|
113
|
+
title = "Background video",
|
|
114
|
+
...props
|
|
115
|
+
}, ref) => {
|
|
116
|
+
const baseUrl = customerSubdomain ? `https://${customerSubdomain}.cloudflarestream.com` : "https://iframe.videodelivery.net";
|
|
117
|
+
const params = new URLSearchParams();
|
|
118
|
+
if (autoplay) params.set("autoplay", "true");
|
|
119
|
+
if (loop) params.set("loop", "true");
|
|
120
|
+
if (muted) params.set("muted", "true");
|
|
121
|
+
if (!controls) params.set("controls", "false");
|
|
122
|
+
if (poster) params.set("poster", poster);
|
|
123
|
+
params.set("preload", "auto");
|
|
124
|
+
const streamUrl = `${baseUrl}/${videoId}?${params.toString()}`;
|
|
125
|
+
return /* @__PURE__ */ jsx(
|
|
126
|
+
"iframe",
|
|
127
|
+
{
|
|
128
|
+
ref,
|
|
129
|
+
src: streamUrl,
|
|
130
|
+
title,
|
|
131
|
+
allow: "accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",
|
|
132
|
+
allowFullScreen: true,
|
|
133
|
+
className: backgroundStreamVariants({ class: className }),
|
|
134
|
+
...props
|
|
135
|
+
}
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
);
|
|
139
|
+
BackgroundStream.displayName = "Background.Stream";
|
|
140
|
+
var backgroundOverlayVariants = tv({
|
|
141
|
+
base: "absolute inset-0 bg-bg-overlay"
|
|
142
|
+
});
|
|
143
|
+
var BackgroundOverlay = React.forwardRef(({ className, opacity = 0.4, style, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
144
|
+
"div",
|
|
145
|
+
{
|
|
146
|
+
ref,
|
|
147
|
+
"aria-hidden": "true",
|
|
148
|
+
className: backgroundOverlayVariants({ class: className }),
|
|
149
|
+
style: {
|
|
150
|
+
opacity,
|
|
151
|
+
...style
|
|
152
|
+
},
|
|
153
|
+
...props
|
|
154
|
+
}
|
|
155
|
+
));
|
|
156
|
+
BackgroundOverlay.displayName = "Background.Overlay";
|
|
157
|
+
var backgroundGradientVariants = tv({
|
|
158
|
+
base: "absolute inset-0"
|
|
159
|
+
});
|
|
160
|
+
var BackgroundGradient = React.forwardRef(
|
|
161
|
+
({
|
|
162
|
+
className,
|
|
163
|
+
direction = "to-b",
|
|
164
|
+
from = "transparent",
|
|
165
|
+
via,
|
|
166
|
+
to = "black",
|
|
167
|
+
gradient,
|
|
168
|
+
style,
|
|
169
|
+
...props
|
|
170
|
+
}, ref) => {
|
|
171
|
+
const cssDirection = direction.startsWith("to-") ? direction.replace("to-", "to ") : direction;
|
|
172
|
+
const gradientValue = gradient || (via ? `linear-gradient(${cssDirection}, ${from}, ${via}, ${to})` : `linear-gradient(${cssDirection}, ${from}, ${to})`);
|
|
173
|
+
return /* @__PURE__ */ jsx(
|
|
174
|
+
"div",
|
|
175
|
+
{
|
|
176
|
+
ref,
|
|
177
|
+
"aria-hidden": "true",
|
|
178
|
+
className: backgroundGradientVariants({ class: className }),
|
|
179
|
+
style: {
|
|
180
|
+
backgroundImage: gradientValue,
|
|
181
|
+
...style
|
|
182
|
+
},
|
|
183
|
+
...props
|
|
184
|
+
}
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
);
|
|
188
|
+
BackgroundGradient.displayName = "Background.Gradient";
|
|
189
|
+
Object.assign(Background, {
|
|
190
|
+
Image: BackgroundImage,
|
|
191
|
+
Video: BackgroundVideo,
|
|
192
|
+
Stream: BackgroundStream,
|
|
193
|
+
Overlay: BackgroundOverlay,
|
|
194
|
+
Gradient: BackgroundGradient
|
|
195
|
+
});
|
|
196
|
+
var quoteBlockVariants = tv({
|
|
197
|
+
slots: {
|
|
198
|
+
root: "relative flex min-h-[500px] w-full flex-col overflow-hidden rounded-radius-8",
|
|
199
|
+
content: [
|
|
200
|
+
"relative z-10 flex max-w-[1440px] flex-1 flex-col items-start justify-end",
|
|
201
|
+
"p-40",
|
|
202
|
+
"md:p-80",
|
|
203
|
+
"lg:p-112"
|
|
204
|
+
],
|
|
205
|
+
quoteWrapper: "relative flex flex-col gap-40 md:gap-48",
|
|
206
|
+
quote: [
|
|
207
|
+
"relative text-text-inverted",
|
|
208
|
+
"typography-small-headline-small",
|
|
209
|
+
"md:typography-medium-headline-small",
|
|
210
|
+
"lg:typography-large-headline-small",
|
|
211
|
+
"font-serif md:font-serif lg:font-serif"
|
|
212
|
+
],
|
|
213
|
+
openQuote: [
|
|
214
|
+
"absolute text-text-inverted",
|
|
215
|
+
"typography-small-headline-small",
|
|
216
|
+
"md:typography-medium-headline-small",
|
|
217
|
+
"lg:typography-large-headline-small",
|
|
218
|
+
"font-serif md:font-serif lg:font-serif",
|
|
219
|
+
"-left-[0.5em] -top-[0.1em]"
|
|
220
|
+
],
|
|
221
|
+
attribution: "flex flex-col items-start gap-4",
|
|
222
|
+
signature: "h-auto w-[120px] md:w-[153px]",
|
|
223
|
+
byline: "flex flex-col text-text-inverted",
|
|
224
|
+
bylineName: "typography-body-medium text-text-inverted",
|
|
225
|
+
bylineTitle: "typography-body-medium text-text-inverted opacity-80"
|
|
226
|
+
},
|
|
227
|
+
variants: {
|
|
228
|
+
size: {
|
|
229
|
+
default: {
|
|
230
|
+
root: ""
|
|
231
|
+
},
|
|
232
|
+
compact: {
|
|
233
|
+
root: "min-h-[400px] lg:min-h-[600px]"
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
defaultVariants: {
|
|
238
|
+
size: "default"
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
var QuoteBlock = React.forwardRef(
|
|
242
|
+
({
|
|
243
|
+
className,
|
|
244
|
+
quote,
|
|
245
|
+
showQuoteMarks = true,
|
|
246
|
+
signatureImage,
|
|
247
|
+
signatureAlt = "Signature",
|
|
248
|
+
attributionName,
|
|
249
|
+
attributionTitle,
|
|
250
|
+
background,
|
|
251
|
+
overlayOpacity = 0,
|
|
252
|
+
overlayColor = "black",
|
|
253
|
+
quoteClassName,
|
|
254
|
+
bylineNameClassName,
|
|
255
|
+
bylineTitleClassName,
|
|
256
|
+
size,
|
|
257
|
+
...props
|
|
258
|
+
}, ref) => {
|
|
259
|
+
const styles = quoteBlockVariants({ size });
|
|
260
|
+
return /* @__PURE__ */ jsxs(
|
|
261
|
+
"section",
|
|
262
|
+
{
|
|
263
|
+
ref,
|
|
264
|
+
className: styles.root({ class: className }),
|
|
265
|
+
...props,
|
|
266
|
+
children: [
|
|
267
|
+
background,
|
|
268
|
+
overlayOpacity > 0 && /* @__PURE__ */ jsx(
|
|
269
|
+
BackgroundOverlay,
|
|
270
|
+
{
|
|
271
|
+
opacity: overlayOpacity,
|
|
272
|
+
className: overlayColor !== "black" ? void 0 : "bg-black",
|
|
273
|
+
style: overlayColor !== "black" ? { backgroundColor: overlayColor } : void 0
|
|
274
|
+
}
|
|
275
|
+
),
|
|
276
|
+
/* @__PURE__ */ jsx("div", { className: styles.content(), children: /* @__PURE__ */ jsxs("div", { className: styles.quoteWrapper(), children: [
|
|
277
|
+
/* @__PURE__ */ jsxs("blockquote", { className: styles.quote({ class: quoteClassName }), children: [
|
|
278
|
+
showQuoteMarks && /* @__PURE__ */ jsx("span", { className: styles.openQuote(), "aria-hidden": "true", children: '"' }),
|
|
279
|
+
/* @__PURE__ */ jsx("span", { className: "relative", children: showQuoteMarks ? `${quote}"` : quote })
|
|
280
|
+
] }),
|
|
281
|
+
(signatureImage || attributionName || attributionTitle) && /* @__PURE__ */ jsxs("div", { className: styles.attribution(), children: [
|
|
282
|
+
signatureImage && /* @__PURE__ */ jsx(
|
|
283
|
+
"img",
|
|
284
|
+
{
|
|
285
|
+
src: signatureImage,
|
|
286
|
+
alt: signatureAlt,
|
|
287
|
+
className: styles.signature()
|
|
288
|
+
}
|
|
289
|
+
),
|
|
290
|
+
(attributionName || attributionTitle) && /* @__PURE__ */ jsxs("div", { className: styles.byline(), children: [
|
|
291
|
+
attributionName && /* @__PURE__ */ jsx(
|
|
292
|
+
"span",
|
|
293
|
+
{
|
|
294
|
+
className: styles.bylineName({
|
|
295
|
+
class: bylineNameClassName
|
|
296
|
+
}),
|
|
297
|
+
children: attributionName
|
|
298
|
+
}
|
|
299
|
+
),
|
|
300
|
+
attributionTitle && /* @__PURE__ */ jsx(
|
|
301
|
+
"span",
|
|
302
|
+
{
|
|
303
|
+
className: styles.bylineTitle({
|
|
304
|
+
class: bylineTitleClassName
|
|
305
|
+
}),
|
|
306
|
+
children: attributionTitle
|
|
307
|
+
}
|
|
308
|
+
)
|
|
309
|
+
] })
|
|
310
|
+
] })
|
|
311
|
+
] }) })
|
|
312
|
+
]
|
|
313
|
+
}
|
|
314
|
+
);
|
|
315
|
+
}
|
|
316
|
+
);
|
|
317
|
+
QuoteBlock.displayName = "QuoteBlock";
|
|
318
|
+
|
|
319
|
+
export { QuoteBlock, quoteBlockVariants };
|
|
320
|
+
//# sourceMappingURL=index.js.map
|
|
321
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/atoms/background/background.tsx","../../src/components/sections/quote-block/quote-block.tsx"],"names":["tv","React2","jsx"],"mappings":";;;;;;AAUA,IAAM,qBAAqB,EAAA,CAAG;AAAA,EAC7B,IAAA,EAAM;AACP,CAAC,CAAA;AAiBD,IAAM,UAAA,GAAmB,KAAA,CAAA,UAAA;AAAA,EACxB,CAAC,EAAE,SAAA,EAAW,UAAU,GAAG,KAAA,IAAS,GAAA,qBACnC,GAAA;AAAA,IAAC,KAAA;AAAA,I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c,YAAA","file":"index.js","sourcesContent":["\"use client\";\n\nimport { useRender } from \"@base-ui-components/react/use-render\";\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\n// =============================================================================\n// Background Atomic Component\n// =============================================================================\n\nconst backgroundVariants = tv({\n\tbase: \"absolute inset-0\",\n});\n\n/**\n * Base container for background composition.\n * Use as a wrapper to compose multiple background layers (image, video, overlay, gradient).\n *\n * @example\n * ```tsx\n * <Background>\n * <Background.Image src=\"/hero.jpg\" />\n * <Background.Overlay opacity={0.4} />\n * <Background.Gradient direction=\"to-t\" from=\"black\" to=\"transparent\" />\n * </Background>\n * ```\n */\nexport interface BackgroundProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nconst Background = React.forwardRef<HTMLDivElement, BackgroundProps>(\n\t({ className, children, ...props }, ref) => (\n\t\t<div\n\t\t\tref={ref}\n\t\t\taria-hidden=\"true\"\n\t\t\tclassName={backgroundVariants({ class: className })}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t),\n);\nBackground.displayName = \"Background\";\n\n// =============================================================================\n// Background.Image\n// =============================================================================\n\nconst backgroundImageVariants = tv({\n\tbase: \"absolute inset-0 size-full object-cover\",\n});\n\nexport interface BackgroundImageProps\n\textends useRender.ComponentProps<\"img\">,\n\t\tOmit<React.ImgHTMLAttributes<HTMLImageElement>, \"src\" | \"render\"> {\n\t/**\n\t * URL for the background image\n\t */\n\tsrc: string;\n\t/**\n\t * Object position (default: \"center\")\n\t */\n\tposition?: string;\n}\n\n/**\n * Background image layer using an actual img element with object-cover.\n * Supports native lazy loading, srcset, and better accessibility.\n * Supports render prop for element composition.\n */\nfunction BackgroundImage(props: BackgroundImageProps) {\n\tconst {\n\t\tclassName,\n\t\tsrc,\n\t\tposition = \"center\",\n\t\talt = \"\",\n\t\tstyle,\n\t\trender,\n\t\t...otherProps\n\t} = props;\n\n\tconst imgClassName = backgroundImageVariants({ class: className });\n\tconst imgStyle = { objectPosition: position, ...style };\n\n\treturn useRender({\n\t\trender,\n\t\tprops: {\n\t\t\tsrc,\n\t\t\talt,\n\t\t\tclassName: imgClassName,\n\t\t\tstyle: imgStyle,\n\t\t\t...otherProps,\n\t\t},\n\t\tdefaultTagName: \"img\",\n\t});\n}\nBackgroundImage.displayName = \"Background.Image\";\n\n// =============================================================================\n// Background.Video\n// =============================================================================\n\nconst backgroundVideoVariants = tv({\n\tbase: \"absolute inset-0 size-full object-cover\",\n});\n\nexport interface BackgroundVideoProps\n\textends useRender.ComponentProps<\"video\">,\n\t\tOmit<\n\t\t\tReact.VideoHTMLAttributes<HTMLVideoElement>,\n\t\t\t\"children\" | \"render\" | \"src\"\n\t\t> {\n\t/**\n\t * URL for the video source\n\t */\n\tsrc: string;\n\t/**\n\t * Video MIME type (default: auto-detected from src)\n\t */\n\ttype?: string;\n\t/**\n\t * Poster image URL shown before video loads\n\t */\n\tposter?: string;\n}\n\n/**\n * Background video layer using HTML5 video element.\n * Supports render prop for element composition.\n */\nfunction BackgroundVideo(props: BackgroundVideoProps) {\n\tconst {\n\t\tclassName,\n\t\tsrc,\n\t\ttype,\n\t\tposter,\n\t\tautoPlay = true,\n\t\tloop = true,\n\t\tmuted = true,\n\t\tplaysInline = true,\n\t\trender,\n\t\tchildren,\n\t\t...otherProps\n\t} = props;\n\n\tconst videoClassName = backgroundVideoVariants({ class: className });\n\n\t// useRender must be called unconditionally\n\tconst rendered = useRender({\n\t\trender,\n\t\tprops: {\n\t\t\tautoPlay,\n\t\t\tloop,\n\t\t\tmuted,\n\t\t\tplaysInline,\n\t\t\tposter,\n\t\t\tclassName: videoClassName,\n\t\t\t...otherProps,\n\t\t},\n\t\tdefaultTagName: \"video\",\n\t});\n\n\t// If no render prop, return video with source child\n\tif (!render) {\n\t\treturn (\n\t\t\t<video\n\t\t\t\tautoPlay={autoPlay}\n\t\t\t\tloop={loop}\n\t\t\t\tmuted={muted}\n\t\t\t\tplaysInline={playsInline}\n\t\t\t\tposter={poster}\n\t\t\t\tclassName={videoClassName}\n\t\t\t\t{...otherProps}\n\t\t\t>\n\t\t\t\t<source src={src} type={type} />\n\t\t\t</video>\n\t\t);\n\t}\n\n\treturn rendered;\n}\nBackgroundVideo.displayName = \"Background.Video\";\n\n// =============================================================================\n// Background.Stream\n// =============================================================================\n\nconst backgroundStreamVariants = tv({\n\tbase: \"absolute inset-0 size-full border-0 scale-[1.5] object-cover\",\n});\n\nexport interface BackgroundStreamProps\n\textends React.IframeHTMLAttributes<HTMLIFrameElement> {\n\t/**\n\t * Cloudflare Stream video ID\n\t */\n\tvideoId: string;\n\t/**\n\t * Poster image URL (Cloudflare Stream thumbnail or custom)\n\t */\n\tposter?: string;\n\t/**\n\t * Whether the video should autoplay (default: true)\n\t */\n\tautoplay?: boolean;\n\t/**\n\t * Whether the video should loop (default: true)\n\t */\n\tloop?: boolean;\n\t/**\n\t * Whether the video should be muted (default: true)\n\t */\n\tmuted?: boolean;\n\t/**\n\t * Whether to show playback controls (default: false)\n\t */\n\tcontrols?: boolean;\n\t/**\n\t * Custom Cloudflare customer subdomain (if using custom domains)\n\t */\n\tcustomerSubdomain?: string;\n}\n\n/**\n * Background video layer using Cloudflare Stream.\n */\nconst BackgroundStream = React.forwardRef<\n\tHTMLIFrameElement,\n\tBackgroundStreamProps\n>(\n\t(\n\t\t{\n\t\t\tclassName,\n\t\t\tvideoId,\n\t\t\tposter,\n\t\t\tautoplay = true,\n\t\t\tloop = true,\n\t\t\tmuted = true,\n\t\t\tcontrols = false,\n\t\t\tcustomerSubdomain,\n\t\t\ttitle = \"Background video\",\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst baseUrl = customerSubdomain\n\t\t\t? `https://${customerSubdomain}.cloudflarestream.com`\n\t\t\t: \"https://iframe.videodelivery.net\";\n\n\t\tconst params = new URLSearchParams();\n\t\tif (autoplay) params.set(\"autoplay\", \"true\");\n\t\tif (loop) params.set(\"loop\", \"true\");\n\t\tif (muted) params.set(\"muted\", \"true\");\n\t\tif (!controls) params.set(\"controls\", \"false\");\n\t\tif (poster) params.set(\"poster\", poster);\n\t\tparams.set(\"preload\", \"auto\");\n\n\t\tconst streamUrl = `${baseUrl}/${videoId}?${params.toString()}`;\n\n\t\treturn (\n\t\t\t<iframe\n\t\t\t\tref={ref}\n\t\t\t\tsrc={streamUrl}\n\t\t\t\ttitle={title}\n\t\t\t\tallow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\"\n\t\t\t\tallowFullScreen\n\t\t\t\tclassName={backgroundStreamVariants({ class: className })}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nBackgroundStream.displayName = \"Background.Stream\";\n\n// =============================================================================\n// Background.Overlay\n// =============================================================================\n\nconst backgroundOverlayVariants = tv({\n\tbase: \"absolute inset-0 bg-bg-overlay\",\n});\n\nexport interface BackgroundOverlayProps\n\textends React.HTMLAttributes<HTMLDivElement> {\n\t/**\n\t * Overlay opacity (0-1)\n\t */\n\topacity?: number;\n}\n\n/**\n * Solid color overlay layer. Uses semantic bg-overlay token by default.\n * Override with className for different colors.\n */\nconst BackgroundOverlay = React.forwardRef<\n\tHTMLDivElement,\n\tBackgroundOverlayProps\n>(({ className, opacity = 0.4, style, ...props }, ref) => (\n\t<div\n\t\tref={ref}\n\t\taria-hidden=\"true\"\n\t\tclassName={backgroundOverlayVariants({ class: className })}\n\t\tstyle={{\n\t\t\topacity,\n\t\t\t...style,\n\t\t}}\n\t\t{...props}\n\t/>\n));\nBackgroundOverlay.displayName = \"Background.Overlay\";\n\n// =============================================================================\n// Background.Gradient\n// =============================================================================\n\nconst backgroundGradientVariants = tv({\n\tbase: \"absolute inset-0\",\n});\n\nexport interface BackgroundGradientProps\n\textends React.HTMLAttributes<HTMLDivElement> {\n\t/**\n\t * Gradient direction (Tailwind convention: to-t, to-b, to-l, to-r, etc.)\n\t * Or CSS gradient direction (to top, to bottom, 45deg, etc.)\n\t */\n\tdirection?: string;\n\t/**\n\t * Starting color (from)\n\t */\n\tfrom?: string;\n\t/**\n\t * Optional middle color (via)\n\t */\n\tvia?: string;\n\t/**\n\t * Ending color (to)\n\t */\n\tto?: string;\n\t/**\n\t * Full custom gradient string (overrides from/via/to)\n\t */\n\tgradient?: string;\n}\n\n/**\n * Gradient overlay layer. Use for fading backgrounds or creating depth.\n */\nconst BackgroundGradient = React.forwardRef<\n\tHTMLDivElement,\n\tBackgroundGradientProps\n>(\n\t(\n\t\t{\n\t\t\tclassName,\n\t\t\tdirection = \"to-b\",\n\t\t\tfrom = \"transparent\",\n\t\t\tvia,\n\t\t\tto = \"black\",\n\t\t\tgradient,\n\t\t\tstyle,\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => {\n\t\t// Convert Tailwind-style direction to CSS\n\t\tconst cssDirection = direction.startsWith(\"to-\")\n\t\t\t? direction.replace(\"to-\", \"to \")\n\t\t\t: direction;\n\n\t\tconst gradientValue =\n\t\t\tgradient ||\n\t\t\t(via\n\t\t\t\t? `linear-gradient(${cssDirection}, ${from}, ${via}, ${to})`\n\t\t\t\t: `linear-gradient(${cssDirection}, ${from}, ${to})`);\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref={ref}\n\t\t\t\taria-hidden=\"true\"\n\t\t\t\tclassName={backgroundGradientVariants({ class: className })}\n\t\t\t\tstyle={{\n\t\t\t\t\tbackgroundImage: gradientValue,\n\t\t\t\t\t...style,\n\t\t\t\t}}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nBackgroundGradient.displayName = \"Background.Gradient\";\n\n// =============================================================================\n// Compound Export\n// =============================================================================\n\nconst BackgroundCompound = Object.assign(Background, {\n\tImage: BackgroundImage,\n\tVideo: BackgroundVideo,\n\tStream: BackgroundStream,\n\tOverlay: BackgroundOverlay,\n\tGradient: BackgroundGradient,\n});\n\nexport {\n\tBackgroundCompound as Background,\n\tBackgroundImage,\n\tBackgroundVideo,\n\tBackgroundStream,\n\tBackgroundOverlay,\n\tBackgroundGradient,\n\tbackgroundVariants,\n\tbackgroundImageVariants,\n\tbackgroundVideoVariants,\n\tbackgroundStreamVariants,\n\tbackgroundOverlayVariants,\n\tbackgroundGradientVariants,\n};\n","import * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\nimport { BackgroundOverlay } from \"@/components/atoms/background\";\n\n// =============================================================================\n// QuoteBlock Variants\n// =============================================================================\n\nconst quoteBlockVariants = tv({\n\tslots: {\n\t\troot: \"relative flex min-h-[500px] w-full flex-col overflow-hidden rounded-radius-8\",\n\t\tcontent: [\n\t\t\t\"relative z-10 flex max-w-[1440px] flex-1 flex-col items-start justify-end\",\n\t\t\t\"p-40\",\n\t\t\t\"md:p-80\",\n\t\t\t\"lg:p-112\",\n\t\t],\n\t\tquoteWrapper: \"relative flex flex-col gap-40 md:gap-48\",\n\t\tquote: [\n\t\t\t\"relative text-text-inverted\",\n\t\t\t\"typography-small-headline-small\",\n\t\t\t\"md:typography-medium-headline-small\",\n\t\t\t\"lg:typography-large-headline-small\",\n\t\t\t\"font-serif md:font-serif lg:font-serif\",\n\t\t],\n\t\topenQuote: [\n\t\t\t\"absolute text-text-inverted\",\n\t\t\t\"typography-small-headline-small\",\n\t\t\t\"md:typography-medium-headline-small\",\n\t\t\t\"lg:typography-large-headline-small\",\n\t\t\t\"font-serif md:font-serif lg:font-serif\",\n\t\t\t\"-left-[0.5em] -top-[0.1em]\",\n\t\t],\n\t\tattribution: \"flex flex-col items-start gap-4\",\n\t\tsignature: \"h-auto w-[120px] md:w-[153px]\",\n\t\tbyline: \"flex flex-col text-text-inverted\",\n\t\tbylineName: \"typography-body-medium text-text-inverted\",\n\t\tbylineTitle: \"typography-body-medium text-text-inverted opacity-80\",\n\t},\n\tvariants: {\n\t\tsize: {\n\t\t\tdefault: {\n\t\t\t\troot: \"\",\n\t\t\t},\n\t\t\tcompact: {\n\t\t\t\troot: \"min-h-[400px] lg:min-h-[600px]\",\n\t\t\t},\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tsize: \"default\",\n\t},\n});\n\n// =============================================================================\n// QuoteBlock Component\n// =============================================================================\n\nexport interface QuoteBlockProps\n\textends Omit<React.HTMLAttributes<HTMLElement>, \"children\">,\n\t\tVariantProps<typeof quoteBlockVariants> {\n\t/**\n\t * The quote text to display\n\t */\n\tquote: string;\n\t/**\n\t * Whether to show decorative quote marks\n\t * @default true\n\t */\n\tshowQuoteMarks?: boolean;\n\t/**\n\t * Signature image URL (optional)\n\t */\n\tsignatureImage?: string;\n\t/**\n\t * Alt text for signature image\n\t */\n\tsignatureAlt?: string;\n\t/**\n\t * Attribution name (e.g., \"Donald J. Trump\")\n\t */\n\tattributionName?: string;\n\t/**\n\t * Attribution title (e.g., \"45 & 47 President of the United States\")\n\t */\n\tattributionTitle?: string;\n\t/**\n\t * Background element - use BackgroundImage or similar\n\t */\n\tbackground?: React.ReactNode;\n\t/**\n\t * Overlay opacity (0-1)\n\t */\n\toverlayOpacity?: number;\n\t/**\n\t * Overlay color\n\t */\n\toverlayColor?: string;\n\t/**\n\t * Custom class for the quote text\n\t */\n\tquoteClassName?: string;\n\t/**\n\t * Custom class for the byline name\n\t */\n\tbylineNameClassName?: string;\n\t/**\n\t * Custom class for the byline title\n\t */\n\tbylineTitleClassName?: string;\n}\n\nconst QuoteBlock = React.forwardRef<HTMLElement, QuoteBlockProps>(\n\t(\n\t\t{\n\t\t\tclassName,\n\t\t\tquote,\n\t\t\tshowQuoteMarks = true,\n\t\t\tsignatureImage,\n\t\t\tsignatureAlt = \"Signature\",\n\t\t\tattributionName,\n\t\t\tattributionTitle,\n\t\t\tbackground,\n\t\t\toverlayOpacity = 0,\n\t\t\toverlayColor = \"black\",\n\t\t\tquoteClassName,\n\t\t\tbylineNameClassName,\n\t\t\tbylineTitleClassName,\n\t\t\tsize,\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst styles = quoteBlockVariants({ size });\n\n\t\treturn (\n\t\t\t<section\n\t\t\t\tref={ref}\n\t\t\t\tclassName={styles.root({ class: className })}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{/* Background */}\n\t\t\t\t{background}\n\n\t\t\t\t{/* Overlay */}\n\t\t\t\t{overlayOpacity > 0 && (\n\t\t\t\t\t<BackgroundOverlay\n\t\t\t\t\t\topacity={overlayOpacity}\n\t\t\t\t\t\tclassName={overlayColor !== \"black\" ? undefined : \"bg-black\"}\n\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\toverlayColor !== \"black\"\n\t\t\t\t\t\t\t\t? { backgroundColor: overlayColor }\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\n\t\t\t\t{/* Content */}\n\t\t\t\t<div className={styles.content()}>\n\t\t\t\t\t<div className={styles.quoteWrapper()}>\n\t\t\t\t\t\t{/* Quote */}\n\t\t\t\t\t\t<blockquote className={styles.quote({ class: quoteClassName })}>\n\t\t\t\t\t\t\t{showQuoteMarks && (\n\t\t\t\t\t\t\t\t<span className={styles.openQuote()} aria-hidden=\"true\">\n\t\t\t\t\t\t\t\t\t\"\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<span className=\"relative\">\n\t\t\t\t\t\t\t\t{showQuoteMarks ? `${quote}\"` : quote}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</blockquote>\n\n\t\t\t\t\t\t{/* Attribution */}\n\t\t\t\t\t\t{(signatureImage || attributionName || attributionTitle) && (\n\t\t\t\t\t\t\t<div className={styles.attribution()}>\n\t\t\t\t\t\t\t\t{signatureImage && (\n\t\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\t\tsrc={signatureImage}\n\t\t\t\t\t\t\t\t\t\talt={signatureAlt}\n\t\t\t\t\t\t\t\t\t\tclassName={styles.signature()}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{(attributionName || attributionTitle) && (\n\t\t\t\t\t\t\t\t\t<div className={styles.byline()}>\n\t\t\t\t\t\t\t\t\t\t{attributionName && (\n\t\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\t\tclassName={styles.bylineName({\n\t\t\t\t\t\t\t\t\t\t\t\t\tclass: bylineNameClassName,\n\t\t\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{attributionName}\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t{attributionTitle && (\n\t\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\t\tclassName={styles.bylineTitle({\n\t\t\t\t\t\t\t\t\t\t\t\t\tclass: bylineTitleClassName,\n\t\t\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{attributionTitle}\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</section>\n\t\t);\n\t},\n);\n\nQuoteBlock.displayName = \"QuoteBlock\";\n\nexport { QuoteBlock, quoteBlockVariants };\n"]}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import * as tailwind_variants from 'tailwind-variants';
|
|
2
|
+
import { VariantProps } from 'tailwind-variants';
|
|
3
|
+
import * as tailwind_variants_dist_config_js from 'tailwind-variants/dist/config.js';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* River component for content sections with text and media
|
|
8
|
+
*
|
|
9
|
+
* Variants:
|
|
10
|
+
* - A: Text on left (9 cols), media on right (15 cols) on desktop
|
|
11
|
+
* - B: Media on left (15 cols), text on right (9 cols) on desktop
|
|
12
|
+
*
|
|
13
|
+
* Uses the 24-column grid system. Must be placed inside a `grid-container`.
|
|
14
|
+
*/
|
|
15
|
+
declare const riverVariants: tailwind_variants.TVReturnType<{
|
|
16
|
+
variant: {
|
|
17
|
+
A: string;
|
|
18
|
+
B: string;
|
|
19
|
+
};
|
|
20
|
+
}, undefined, string[], tailwind_variants_dist_config_js.TVConfig<{
|
|
21
|
+
variant: {
|
|
22
|
+
A: string;
|
|
23
|
+
B: string;
|
|
24
|
+
};
|
|
25
|
+
}, {
|
|
26
|
+
variant: {
|
|
27
|
+
A: string;
|
|
28
|
+
B: string;
|
|
29
|
+
};
|
|
30
|
+
}>, {
|
|
31
|
+
variant: {
|
|
32
|
+
A: string;
|
|
33
|
+
B: string;
|
|
34
|
+
};
|
|
35
|
+
}, undefined, tailwind_variants.TVReturnType<{
|
|
36
|
+
variant: {
|
|
37
|
+
A: string;
|
|
38
|
+
B: string;
|
|
39
|
+
};
|
|
40
|
+
}, undefined, string[], tailwind_variants_dist_config_js.TVConfig<{
|
|
41
|
+
variant: {
|
|
42
|
+
A: string;
|
|
43
|
+
B: string;
|
|
44
|
+
};
|
|
45
|
+
}, {
|
|
46
|
+
variant: {
|
|
47
|
+
A: string;
|
|
48
|
+
B: string;
|
|
49
|
+
};
|
|
50
|
+
}>, unknown, unknown, undefined>>;
|
|
51
|
+
interface RiverProps extends React.HTMLAttributes<HTMLElement>, VariantProps<typeof riverVariants> {
|
|
52
|
+
/**
|
|
53
|
+
* The headline text
|
|
54
|
+
*/
|
|
55
|
+
headline: string;
|
|
56
|
+
/**
|
|
57
|
+
* The body text
|
|
58
|
+
*/
|
|
59
|
+
body: string;
|
|
60
|
+
/**
|
|
61
|
+
* Primary action button (required)
|
|
62
|
+
*/
|
|
63
|
+
primaryAction: React.ReactNode;
|
|
64
|
+
/**
|
|
65
|
+
* Secondary action button (optional)
|
|
66
|
+
*/
|
|
67
|
+
secondaryAction?: React.ReactNode;
|
|
68
|
+
/**
|
|
69
|
+
* Media content (image, video, etc.)
|
|
70
|
+
*/
|
|
71
|
+
media: React.ReactNode;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* River component for content sections with text and media.
|
|
75
|
+
*
|
|
76
|
+
* Uses the 24-column grid system - must be placed inside a `grid-container`.
|
|
77
|
+
*
|
|
78
|
+
* Layout:
|
|
79
|
+
* - Mobile/Tablet: Stacked (text above media)
|
|
80
|
+
* - Desktop (lg+):
|
|
81
|
+
* - Variant A: Text (9 cols) | Media (15 cols)
|
|
82
|
+
* - Variant B: Media (15 cols) | Text (9 cols)
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* ```tsx
|
|
86
|
+
* <div className="grid-container">
|
|
87
|
+
* <River
|
|
88
|
+
* variant="A"
|
|
89
|
+
* headline="Feature Headline"
|
|
90
|
+
* body="Description of the feature..."
|
|
91
|
+
* primaryAction={<Button>Primary</Button>}
|
|
92
|
+
* secondaryAction={<Button variant="outline">Secondary</Button>}
|
|
93
|
+
* media={<img src="..." alt="Feature" />}
|
|
94
|
+
* />
|
|
95
|
+
* </div>
|
|
96
|
+
* ```
|
|
97
|
+
*/
|
|
98
|
+
declare const River: React.ForwardRefExoticComponent<RiverProps & React.RefAttributes<HTMLElement>>;
|
|
99
|
+
|
|
100
|
+
export { River, type RiverProps, riverVariants };
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { tv, cnBase } from 'tailwind-variants';
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
// src/components/sections/river/river.tsx
|
|
7
|
+
function cn(...inputs) {
|
|
8
|
+
return cnBase(clsx(inputs));
|
|
9
|
+
}
|
|
10
|
+
var riverVariants = tv({
|
|
11
|
+
// Base styles - col-full within parent grid, responsive padding using primitive spacing tokens
|
|
12
|
+
base: [
|
|
13
|
+
"col-full",
|
|
14
|
+
// Small (mobile): 20px x, 72px top, 20px bottom
|
|
15
|
+
"px-20 pt-72 pb-20",
|
|
16
|
+
// Medium (tablet): 56px x, 96px y
|
|
17
|
+
"md:px-56 md:py-96",
|
|
18
|
+
// Large (desktop): 72px x, 128px y
|
|
19
|
+
"lg:px-72 lg:py-128"
|
|
20
|
+
],
|
|
21
|
+
variants: {
|
|
22
|
+
variant: {
|
|
23
|
+
A: "",
|
|
24
|
+
B: ""
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
defaultVariants: {
|
|
28
|
+
variant: "A"
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
var River = React.forwardRef(
|
|
32
|
+
({
|
|
33
|
+
className,
|
|
34
|
+
variant,
|
|
35
|
+
headline,
|
|
36
|
+
body,
|
|
37
|
+
primaryAction,
|
|
38
|
+
secondaryAction,
|
|
39
|
+
media,
|
|
40
|
+
...props
|
|
41
|
+
}, ref) => {
|
|
42
|
+
const contentColumn = /* @__PURE__ */ jsxs(
|
|
43
|
+
"div",
|
|
44
|
+
{
|
|
45
|
+
className: cn(
|
|
46
|
+
"flex flex-col",
|
|
47
|
+
// Full width on mobile/tablet, 9 cols on desktop
|
|
48
|
+
"lg:col-span-9"
|
|
49
|
+
),
|
|
50
|
+
children: [
|
|
51
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-16", children: [
|
|
52
|
+
/* @__PURE__ */ jsx("h2", { className: "typography-h4 text-gray-900", children: headline }),
|
|
53
|
+
/* @__PURE__ */ jsx("p", { className: "typography-body-small text-gray-800", children: body })
|
|
54
|
+
] }),
|
|
55
|
+
/* @__PURE__ */ jsxs(
|
|
56
|
+
"div",
|
|
57
|
+
{
|
|
58
|
+
className: cn("flex flex-row gap-16 mt-36", "[&>*]:flex-shrink-0"),
|
|
59
|
+
children: [
|
|
60
|
+
primaryAction,
|
|
61
|
+
secondaryAction
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
const mediaColumn = /* @__PURE__ */ jsx(
|
|
69
|
+
"div",
|
|
70
|
+
{
|
|
71
|
+
className: cn(
|
|
72
|
+
// Full width on mobile/tablet, 15 cols on desktop
|
|
73
|
+
"lg:col-span-15",
|
|
74
|
+
// Ensure media fills the container
|
|
75
|
+
"[&>*]:w-full [&>*]:h-auto"
|
|
76
|
+
),
|
|
77
|
+
children: media
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
return /* @__PURE__ */ jsx(
|
|
81
|
+
"section",
|
|
82
|
+
{
|
|
83
|
+
ref,
|
|
84
|
+
className: riverVariants({ variant, class: className }),
|
|
85
|
+
...props,
|
|
86
|
+
children: /* @__PURE__ */ jsx(
|
|
87
|
+
"div",
|
|
88
|
+
{
|
|
89
|
+
className: cn("grid grid-cols-1 gap-36", "lg:grid-cols-24 lg:gap-36"),
|
|
90
|
+
children: variant === "B" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
91
|
+
mediaColumn,
|
|
92
|
+
contentColumn
|
|
93
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
94
|
+
contentColumn,
|
|
95
|
+
mediaColumn
|
|
96
|
+
] })
|
|
97
|
+
}
|
|
98
|
+
)
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
River.displayName = "River";
|
|
104
|
+
|
|
105
|
+
export { River, riverVariants };
|
|
106
|
+
//# sourceMappingURL=index.js.map
|
|
107
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/utils.ts","../../src/components/sections/river/river.tsx"],"names":["twMerge"],"mappings":";;;;;;AAKO,SAAS,MAAM,MAAA,EAAsB;AAC3C,EAAA,OAAOA,MAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC5B;ACMA,IAAM,gBAAgB,EAAA,CA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AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACA,SAAA,EAAW,EAAA;AAAA;AAAA,UAEV,gBAAA;AAAA;AAAA,UAEA;AAAA,SACD;AAAA,QAEC,QAAA,EAAA;AAAA;AAAA,KACF;AAGD,IAAA,uBACC,GAAA;AAAA,MAAC,SAAA;AAAA,MAAA;AAAA,QACA,GAAA;AAAA,QACA,WAAW,aAAA,CAAc,EAAE,OAAA,EAAS,KAAA,EAAO,WAAW,CAAA;AAAA,QACrD,GAAG,KAAA;AAAA,QAGJ,QAAA,kBAAA,GAAA;AAAA,UAAC,KAAA;AAAA,UAAA;AAAA,YACA,SAAA,EAAW,EAAA,CAAG,yBAAA,EAA2B,2BAA2B,CAAA;AAAA,YAEnE,QAAA,EAAA,OAAA,KAAY,sBACZ,IAAA,CAAA,QAAA,EAAA,EACE,QAAA,EAAA;AAAA,cAAA,WAAA;AAAA,cACA;AAAA,aAAA,EACF,oBAEA,IAAA,CAAA,QAAA,EAAA,EACE,QAAA,EAAA;AAAA,cAAA,aAAA;AAAA,cACA;AAAA,aAAA,EACF;AAAA;AAAA;AAEF;AAAA,KACD;AAAA,EAEF;AACD;AACA,KAAA,CAAM,WAAA,GAAc,OAAA","file":"index.js","sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\nimport { cnBase as twMerge } from \"tailwind-variants\";\n\nexport { twMerge };\n\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n","import * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\nimport { cn } from \"@/lib/utils\";\n\n/**\n * River component for content sections with text and media\n *\n * Variants:\n * - A: Text on left (9 cols), media on right (15 cols) on desktop\n * - B: Media on left (15 cols), text on right (9 cols) on desktop\n *\n * Uses the 24-column grid system. Must be placed inside a `grid-container`.\n */\nconst riverVariants = tv({\n\t// Base styles - col-full within parent grid, responsive padding using primitive spacing tokens\n\tbase: [\n\t\t\"col-full\",\n\t\t// Small (mobile): 20px x, 72px top, 20px bottom\n\t\t\"px-20 pt-72 pb-20\",\n\t\t// Medium (tablet): 56px x, 96px y\n\t\t\"md:px-56 md:py-96\",\n\t\t// Large (desktop): 72px x, 128px y\n\t\t\"lg:px-72 lg:py-128\",\n\t],\n\tvariants: {\n\t\tvariant: {\n\t\t\tA: \"\",\n\t\t\tB: \"\",\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tvariant: \"A\",\n\t},\n});\n\nexport interface RiverProps\n\textends React.HTMLAttributes<HTMLElement>,\n\t\tVariantProps<typeof riverVariants> {\n\t/**\n\t * The headline text\n\t */\n\theadline: string;\n\t/**\n\t * The body text\n\t */\n\tbody: string;\n\t/**\n\t * Primary action button (required)\n\t */\n\tprimaryAction: React.ReactNode;\n\t/**\n\t * Secondary action button (optional)\n\t */\n\tsecondaryAction?: React.ReactNode;\n\t/**\n\t * Media content (image, video, etc.)\n\t */\n\tmedia: React.ReactNode;\n}\n\n/**\n * River component for content sections with text and media.\n *\n * Uses the 24-column grid system - must be placed inside a `grid-container`.\n *\n * Layout:\n * - Mobile/Tablet: Stacked (text above media)\n * - Desktop (lg+):\n * - Variant A: Text (9 cols) | Media (15 cols)\n * - Variant B: Media (15 cols) | Text (9 cols)\n *\n * @example\n * ```tsx\n * <div className=\"grid-container\">\n * <River\n * variant=\"A\"\n * headline=\"Feature Headline\"\n * body=\"Description of the feature...\"\n * primaryAction={<Button>Primary</Button>}\n * secondaryAction={<Button variant=\"outline\">Secondary</Button>}\n * media={<img src=\"...\" alt=\"Feature\" />}\n * />\n * </div>\n * ```\n */\nconst River = React.forwardRef<HTMLElement, RiverProps>(\n\t(\n\t\t{\n\t\t\tclassName,\n\t\t\tvariant,\n\t\t\theadline,\n\t\t\tbody,\n\t\t\tprimaryAction,\n\t\t\tsecondaryAction,\n\t\t\tmedia,\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst contentColumn = (\n\t\t\t<div\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"flex flex-col\",\n\t\t\t\t\t// Full width on mobile/tablet, 9 cols on desktop\n\t\t\t\t\t\"lg:col-span-9\",\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{/* Text content with 16px gap - uses primitive spacing tokens */}\n\t\t\t\t<div className=\"flex flex-col gap-16\">\n\t\t\t\t\t<h2 className=\"typography-h4 text-gray-900\">{headline}</h2>\n\t\t\t\t\t<p className=\"typography-body-small text-gray-800\">{body}</p>\n\t\t\t\t</div>\n\n\t\t\t\t{/* Buttons with 36px gap from text, responsive sizes - uses primitive spacing tokens */}\n\t\t\t\t<div\n\t\t\t\t\tclassName={cn(\"flex flex-row gap-16 mt-36\", \"[&>*]:flex-shrink-0\")}\n\t\t\t\t>\n\t\t\t\t\t{primaryAction}\n\t\t\t\t\t{secondaryAction}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\n\t\tconst mediaColumn = (\n\t\t\t<div\n\t\t\t\tclassName={cn(\n\t\t\t\t\t// Full width on mobile/tablet, 15 cols on desktop\n\t\t\t\t\t\"lg:col-span-15\",\n\t\t\t\t\t// Ensure media fills the container\n\t\t\t\t\t\"[&>*]:w-full [&>*]:h-auto\",\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{media}\n\t\t\t</div>\n\t\t);\n\n\t\treturn (\n\t\t\t<section\n\t\t\t\tref={ref}\n\t\t\t\tclassName={riverVariants({ variant, class: className })}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{/* Inner grid container for 24-col layout - uses primitive spacing tokens */}\n\t\t\t\t<div\n\t\t\t\t\tclassName={cn(\"grid grid-cols-1 gap-36\", \"lg:grid-cols-24 lg:gap-36\")}\n\t\t\t\t>\n\t\t\t\t\t{variant === \"B\" ? (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{mediaColumn}\n\t\t\t\t\t\t\t{contentColumn}\n\t\t\t\t\t\t</>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{contentColumn}\n\t\t\t\t\t\t\t{mediaColumn}\n\t\t\t\t\t\t</>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</section>\n\t\t);\n\t},\n);\nRiver.displayName = \"River\";\n\nexport { River, riverVariants };\n"]}
|