@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,290 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Popover as Popover$1 } from '@base-ui-components/react/popover';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { tv, cnBase } from 'tailwind-variants';
|
|
5
|
+
import { clsx } from 'clsx';
|
|
6
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
// src/components/atoms/popover/popover.tsx
|
|
9
|
+
function cn(...inputs) {
|
|
10
|
+
return cnBase(clsx(inputs));
|
|
11
|
+
}
|
|
12
|
+
var floatingArrowVariants = tv({
|
|
13
|
+
base: [
|
|
14
|
+
// Display flex to properly size the arrow container
|
|
15
|
+
"flex",
|
|
16
|
+
// Positioning based on floating side (uses spacing tokens since --spacing: 1px)
|
|
17
|
+
"data-[side=bottom]:-top-7",
|
|
18
|
+
"data-[side=left]:-right-12 data-[side=left]:rotate-90",
|
|
19
|
+
"data-[side=right]:-left-12 data-[side=right]:-rotate-90",
|
|
20
|
+
"data-[side=top]:-bottom-7 data-[side=top]:rotate-180",
|
|
21
|
+
// Animation - follows popup
|
|
22
|
+
"data-[starting-style]:opacity-0",
|
|
23
|
+
"data-[ending-style]:opacity-0"
|
|
24
|
+
]
|
|
25
|
+
});
|
|
26
|
+
var FloatingArrowSvg = ({
|
|
27
|
+
fillClassName,
|
|
28
|
+
borderClassName,
|
|
29
|
+
className
|
|
30
|
+
}) => /* @__PURE__ */ jsxs(
|
|
31
|
+
"svg",
|
|
32
|
+
{
|
|
33
|
+
width: "20",
|
|
34
|
+
height: "10",
|
|
35
|
+
viewBox: "0 0 20 10",
|
|
36
|
+
fill: "none",
|
|
37
|
+
className: cn("block", className),
|
|
38
|
+
"aria-hidden": "true",
|
|
39
|
+
children: [
|
|
40
|
+
/* @__PURE__ */ jsx(
|
|
41
|
+
"path",
|
|
42
|
+
{
|
|
43
|
+
d: "M9.66437 2.60207L4.80758 6.97318C4.07308 7.63423 3.11989 8 2.13172 8H0V10H20V8H18.5349C17.5468 8 16.5936 7.63423 15.8591 6.97318L11.0023 2.60207C10.622 2.2598 10.0447 2.25979 9.66437 2.60207Z",
|
|
44
|
+
className: fillClassName
|
|
45
|
+
}
|
|
46
|
+
),
|
|
47
|
+
borderClassName && /* @__PURE__ */ jsx(
|
|
48
|
+
"path",
|
|
49
|
+
{
|
|
50
|
+
d: "M8.99542 1.85876C9.75604 1.17425 10.9106 1.17422 11.6713 1.85878L16.5281 6.22989C17.0789 6.72568 17.7938 7.00001 18.5349 7.00001L15.89 7L11.0023 2.60207C10.622 2.2598 10.0447 2.2598 9.66436 2.60207L4.77734 7L2.13171 7.00001C2.87284 7.00001 3.58774 6.72568 4.13861 6.22989L8.99542 1.85876Z",
|
|
51
|
+
className: borderClassName
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
var popoverPopupVariants = tv({
|
|
58
|
+
base: [
|
|
59
|
+
// Layout - uses component overlay tokens
|
|
60
|
+
"p-spatial-component-overlay-padding",
|
|
61
|
+
// Background - uses overlay background token
|
|
62
|
+
"bg-overlay-background",
|
|
63
|
+
// Border - uses overlay border token
|
|
64
|
+
"border border-overlay-border",
|
|
65
|
+
// Text - uses overlay text token
|
|
66
|
+
"text-overlay-text",
|
|
67
|
+
// Border radius - uses surface overlay token
|
|
68
|
+
"rounded-surface-overlay",
|
|
69
|
+
// Shadow for elevation
|
|
70
|
+
"shadow-lg",
|
|
71
|
+
// Allow arrow to extend outside popup bounds
|
|
72
|
+
"overflow-visible",
|
|
73
|
+
// Animation
|
|
74
|
+
"origin-[var(--transform-origin)]",
|
|
75
|
+
"transition-[transform,scale,opacity] duration-150",
|
|
76
|
+
"data-[starting-style]:scale-95 data-[starting-style]:opacity-0",
|
|
77
|
+
"data-[ending-style]:scale-95 data-[ending-style]:opacity-0",
|
|
78
|
+
// Ensure it's above other content (higher than backdrop z-40)
|
|
79
|
+
"z-50",
|
|
80
|
+
// Max width for reasonable content display
|
|
81
|
+
"max-w-[320px]"
|
|
82
|
+
],
|
|
83
|
+
variants: {
|
|
84
|
+
variant: {
|
|
85
|
+
default: ""
|
|
86
|
+
// Future variants can be added here
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
defaultVariants: {
|
|
90
|
+
variant: "default"
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
var popoverArrowVariants = floatingArrowVariants;
|
|
94
|
+
var PopoverRoot = ({ children, ...props }) => {
|
|
95
|
+
return /* @__PURE__ */ jsx(Popover$1.Root, { ...props, children });
|
|
96
|
+
};
|
|
97
|
+
var PopoverTrigger = React.forwardRef(
|
|
98
|
+
({ className, children, ...props }, ref) => {
|
|
99
|
+
const isSingleElement = React.isValidElement(children);
|
|
100
|
+
if (isSingleElement) {
|
|
101
|
+
return /* @__PURE__ */ jsx(
|
|
102
|
+
Popover$1.Trigger,
|
|
103
|
+
{
|
|
104
|
+
ref,
|
|
105
|
+
className,
|
|
106
|
+
render: children,
|
|
107
|
+
...props
|
|
108
|
+
}
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
return /* @__PURE__ */ jsx(Popover$1.Trigger, { ref, className, ...props, children });
|
|
112
|
+
}
|
|
113
|
+
);
|
|
114
|
+
PopoverTrigger.displayName = "PopoverTrigger";
|
|
115
|
+
var PopoverPortal = ({ children, ...props }) => {
|
|
116
|
+
return /* @__PURE__ */ jsx(Popover$1.Portal, { ...props, children });
|
|
117
|
+
};
|
|
118
|
+
var PopoverBackdrop = React.forwardRef(
|
|
119
|
+
({ className, ...props }, ref) => {
|
|
120
|
+
return /* @__PURE__ */ jsx(
|
|
121
|
+
Popover$1.Backdrop,
|
|
122
|
+
{
|
|
123
|
+
ref,
|
|
124
|
+
className: cn("fixed inset-0 z-40", className),
|
|
125
|
+
...props
|
|
126
|
+
}
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
);
|
|
130
|
+
PopoverBackdrop.displayName = "PopoverBackdrop";
|
|
131
|
+
var PopoverPositioner = React.forwardRef(({ className, side = "bottom", sideOffset = 8, ...props }, ref) => {
|
|
132
|
+
return /* @__PURE__ */ jsx(
|
|
133
|
+
Popover$1.Positioner,
|
|
134
|
+
{
|
|
135
|
+
ref,
|
|
136
|
+
side,
|
|
137
|
+
sideOffset,
|
|
138
|
+
className: cn("z-50", className),
|
|
139
|
+
...props
|
|
140
|
+
}
|
|
141
|
+
);
|
|
142
|
+
});
|
|
143
|
+
PopoverPositioner.displayName = "PopoverPositioner";
|
|
144
|
+
var PopoverPopup = React.forwardRef(
|
|
145
|
+
({ className, variant, ...props }, ref) => {
|
|
146
|
+
return /* @__PURE__ */ jsx(
|
|
147
|
+
Popover$1.Popup,
|
|
148
|
+
{
|
|
149
|
+
ref,
|
|
150
|
+
className: cn(popoverPopupVariants({ variant }), className),
|
|
151
|
+
...props
|
|
152
|
+
}
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
);
|
|
156
|
+
PopoverPopup.displayName = "PopoverPopup";
|
|
157
|
+
var PopoverArrow = React.forwardRef(
|
|
158
|
+
({ className, ...props }, ref) => {
|
|
159
|
+
return /* @__PURE__ */ jsx(
|
|
160
|
+
Popover$1.Arrow,
|
|
161
|
+
{
|
|
162
|
+
ref,
|
|
163
|
+
className: cn(popoverArrowVariants(), className),
|
|
164
|
+
...props,
|
|
165
|
+
children: /* @__PURE__ */ jsx(
|
|
166
|
+
FloatingArrowSvg,
|
|
167
|
+
{
|
|
168
|
+
fillClassName: "fill-overlay-background",
|
|
169
|
+
borderClassName: "fill-overlay-border"
|
|
170
|
+
}
|
|
171
|
+
)
|
|
172
|
+
}
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
);
|
|
176
|
+
PopoverArrow.displayName = "PopoverArrow";
|
|
177
|
+
var PopoverTitle = React.forwardRef(
|
|
178
|
+
({ className, ...props }, ref) => {
|
|
179
|
+
return /* @__PURE__ */ jsx(
|
|
180
|
+
Popover$1.Title,
|
|
181
|
+
{
|
|
182
|
+
ref,
|
|
183
|
+
className: cn("typography-body-md-md font-semibold", className),
|
|
184
|
+
...props
|
|
185
|
+
}
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
);
|
|
189
|
+
PopoverTitle.displayName = "PopoverTitle";
|
|
190
|
+
var PopoverDescription = React.forwardRef(({ className, ...props }, ref) => {
|
|
191
|
+
return /* @__PURE__ */ jsx(
|
|
192
|
+
Popover$1.Description,
|
|
193
|
+
{
|
|
194
|
+
ref,
|
|
195
|
+
className: cn(
|
|
196
|
+
"typography-body-sm-md text-overlay-text-muted mt-8",
|
|
197
|
+
className
|
|
198
|
+
),
|
|
199
|
+
...props
|
|
200
|
+
}
|
|
201
|
+
);
|
|
202
|
+
});
|
|
203
|
+
PopoverDescription.displayName = "PopoverDescription";
|
|
204
|
+
var PopoverClose = React.forwardRef(
|
|
205
|
+
({ className, ...props }, ref) => {
|
|
206
|
+
return /* @__PURE__ */ jsx(
|
|
207
|
+
Popover$1.Close,
|
|
208
|
+
{
|
|
209
|
+
ref,
|
|
210
|
+
className: cn(
|
|
211
|
+
"absolute right-8 top-8 rounded-surface-ui-small p-4",
|
|
212
|
+
"text-overlay-text-muted hover:text-overlay-text",
|
|
213
|
+
"hover:bg-bg-section focus:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
|
|
214
|
+
className
|
|
215
|
+
),
|
|
216
|
+
...props
|
|
217
|
+
}
|
|
218
|
+
);
|
|
219
|
+
}
|
|
220
|
+
);
|
|
221
|
+
PopoverClose.displayName = "PopoverClose";
|
|
222
|
+
var Popover = ({
|
|
223
|
+
children,
|
|
224
|
+
trigger,
|
|
225
|
+
title,
|
|
226
|
+
side = "bottom",
|
|
227
|
+
sideOffset = 8,
|
|
228
|
+
align = "center",
|
|
229
|
+
showArrow = true,
|
|
230
|
+
showClose = false,
|
|
231
|
+
open,
|
|
232
|
+
defaultOpen,
|
|
233
|
+
onOpenChange,
|
|
234
|
+
className
|
|
235
|
+
}) => {
|
|
236
|
+
return /* @__PURE__ */ jsxs(
|
|
237
|
+
PopoverRoot,
|
|
238
|
+
{
|
|
239
|
+
open,
|
|
240
|
+
defaultOpen,
|
|
241
|
+
onOpenChange,
|
|
242
|
+
children: [
|
|
243
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { children: trigger }),
|
|
244
|
+
/* @__PURE__ */ jsx(PopoverPortal, { children: /* @__PURE__ */ jsx(PopoverPositioner, { side, sideOffset, align, children: /* @__PURE__ */ jsxs(PopoverPopup, { className, children: [
|
|
245
|
+
showArrow && /* @__PURE__ */ jsx(PopoverArrow, {}),
|
|
246
|
+
showClose && /* @__PURE__ */ jsxs(PopoverClose, { children: [
|
|
247
|
+
/* @__PURE__ */ jsx(
|
|
248
|
+
"svg",
|
|
249
|
+
{
|
|
250
|
+
width: "12",
|
|
251
|
+
height: "12",
|
|
252
|
+
viewBox: "0 0 12 12",
|
|
253
|
+
fill: "none",
|
|
254
|
+
"aria-hidden": "true",
|
|
255
|
+
children: /* @__PURE__ */ jsx(
|
|
256
|
+
"path",
|
|
257
|
+
{
|
|
258
|
+
d: "M1.5 1.5L10.5 10.5M1.5 10.5L10.5 1.5",
|
|
259
|
+
stroke: "currentColor",
|
|
260
|
+
strokeWidth: "1.5",
|
|
261
|
+
strokeLinecap: "round"
|
|
262
|
+
}
|
|
263
|
+
)
|
|
264
|
+
}
|
|
265
|
+
),
|
|
266
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
267
|
+
] }),
|
|
268
|
+
title && /* @__PURE__ */ jsx(PopoverTitle, { children: title }),
|
|
269
|
+
title ? /* @__PURE__ */ jsx(PopoverDescription, { children }) : children
|
|
270
|
+
] }) }) })
|
|
271
|
+
]
|
|
272
|
+
}
|
|
273
|
+
);
|
|
274
|
+
};
|
|
275
|
+
var PopoverParts = Object.assign(PopoverRoot, {
|
|
276
|
+
Root: PopoverRoot,
|
|
277
|
+
Trigger: PopoverTrigger,
|
|
278
|
+
Portal: PopoverPortal,
|
|
279
|
+
Backdrop: PopoverBackdrop,
|
|
280
|
+
Positioner: PopoverPositioner,
|
|
281
|
+
Popup: PopoverPopup,
|
|
282
|
+
Arrow: PopoverArrow,
|
|
283
|
+
Title: PopoverTitle,
|
|
284
|
+
Description: PopoverDescription,
|
|
285
|
+
Close: PopoverClose
|
|
286
|
+
});
|
|
287
|
+
|
|
288
|
+
export { Popover, PopoverArrow, PopoverBackdrop, PopoverClose, PopoverDescription, PopoverParts, PopoverPopup, PopoverPortal, PopoverPositioner, PopoverRoot, PopoverTitle, PopoverTrigger, popoverArrowVariants, popoverPopupVariants };
|
|
289
|
+
//# sourceMappingURL=index.js.map
|
|
290
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/utils.ts","../../src/components/shared/floating-arrow.tsx","../../src/components/atoms/popover/popover.tsx"],"names":["twMerge","tv","jsx","BasePopover","jsxs"],"mappings":";;;;;;;AAKO,SAAS,MAAM,MAAA,EAAsB;AAC3C,EAAA,OAAOA,MAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC5B;ACEO,IAAM,wBAAwB,EAAA,CAAG;AAAA,EACvC,IAAA,EAAM;AAAA;AAAA,IAEL,MAAA;AAAA;AAAA,IAEA,2BAAA;AAAA,IACA,uDAAA;AAAA,IACA,yDAAA;AAAA,IACA,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A,OAAA,EAAK;AAAA,WAAA,EAChC,CAAA;AAAA,UAEA,KAAA,oBAASA,GAAAA,CAAC,YAAA,EAAA,EAAc,QAAA,EAAA,KAAA,EAAM,CAAA;AAAA,UAC9B,KAAA,mBACAA,GAAAA,CAAC,kBAAA,EAAA,EAAoB,UAAS,CAAA,GAE9B;AAAA,SAAA,EAEF,GACD,CAAA,EACD;AAAA;AAAA;AAAA,GACD;AAEF;AAMO,IAAM,YAAA,GAAe,MAAA,CAAO,MAAA,CAAO,WAAA,EAAa;AAAA,EACtD,IAAA,EAAM,WAAA;AAAA,EACN,OAAA,EAAS,cAAA;AAAA,EACT,MAAA,EAAQ,aAAA;AAAA,EACR,QAAA,EAAU,eAAA;AAAA,EACV,UAAA,EAAY,iBAAA;AAAA,EACZ,KAAA,EAAO,YAAA;AAAA,EACP,KAAA,EAAO,YAAA;AAAA,EACP,KAAA,EAAO,YAAA;AAAA,EACP,WAAA,EAAa,kBAAA;AAAA,EACb,KAAA,EAAO;AACR,CAAC","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 { tv } from \"tailwind-variants\";\nimport { cn } from \"@/lib/utils\";\n\n/**\n * Shared arrow variants for floating UI components\n *\n * Used by Tooltip, Popover, and other floating components.\n * Handles positioning based on the side attribute.\n */\nexport const floatingArrowVariants = tv({\n\tbase: [\n\t\t// Display flex to properly size the arrow container\n\t\t\"flex\",\n\t\t// Positioning based on floating side (uses spacing tokens since --spacing: 1px)\n\t\t\"data-[side=bottom]:-top-7\",\n\t\t\"data-[side=left]:-right-12 data-[side=left]:rotate-90\",\n\t\t\"data-[side=right]:-left-12 data-[side=right]:-rotate-90\",\n\t\t\"data-[side=top]:-bottom-7 data-[side=top]:rotate-180\",\n\t\t// Animation - follows popup\n\t\t\"data-[starting-style]:opacity-0\",\n\t\t\"data-[ending-style]:opacity-0\",\n\t],\n});\n\nexport interface FloatingArrowSvgProps {\n\t/** CSS class for the main fill color (e.g., \"fill-tooltip-bg\" or \"fill-overlay-background\") */\n\tfillClassName: string;\n\t/** CSS class for the border color using fill-* (e.g., \"fill-overlay-border\") - renders as outline behind main fill */\n\tborderClassName?: string;\n\t/** Additional className for the SVG element */\n\tclassName?: string;\n}\n\n/**\n * FloatingArrowSvg\n *\n * A shared arrow SVG component for floating UI elements.\n * Use with Tooltip, Popover, Dropdown, and other floating components.\n *\n * @example\n * ```tsx\n * // For dark tooltip (no border)\n * <FloatingArrowSvg fillClassName=\"fill-tooltip-bg\" />\n *\n * // For light popover with border\n * <FloatingArrowSvg\n * fillClassName=\"fill-overlay-background\"\n * borderClassName=\"fill-overlay-border\"\n * />\n * ```\n */\nexport const FloatingArrowSvg = ({\n\tfillClassName,\n\tborderClassName,\n\tclassName,\n}: FloatingArrowSvgProps) => (\n\t<svg\n\t\twidth=\"20\"\n\t\theight=\"10\"\n\t\tviewBox=\"0 0 20 10\"\n\t\tfill=\"none\"\n\t\tclassName={cn(\"block\", className)}\n\t\taria-hidden=\"true\"\n\t>\n\t\t{/* Main fill shape */}\n\t\t<path\n\t\t\td=\"M9.66437 2.60207L4.80758 6.97318C4.07308 7.63423 3.11989 8 2.13172 8H0V10H20V8H18.5349C17.5468 8 16.5936 7.63423 15.8591 6.97318L11.0023 2.60207C10.622 2.2598 10.0447 2.25979 9.66437 2.60207Z\"\n\t\t\tclassName={fillClassName}\n\t\t/>\n\t\t{/* Border stroke (rendered on top for outline effect) */}\n\t\t{borderClassName && (\n\t\t\t<path\n\t\t\t\td=\"M8.99542 1.85876C9.75604 1.17425 10.9106 1.17422 11.6713 1.85878L16.5281 6.22989C17.0789 6.72568 17.7938 7.00001 18.5349 7.00001L15.89 7L11.0023 2.60207C10.622 2.2598 10.0447 2.2598 9.66436 2.60207L4.77734 7L2.13171 7.00001C2.87284 7.00001 3.58774 6.72568 4.13861 6.22989L8.99542 1.85876Z\"\n\t\t\t\tclassName={borderClassName}\n\t\t\t/>\n\t\t)}\n\t</svg>\n);\n","\"use client\";\n\nimport { Popover as BasePopover } from \"@base-ui-components/react/popover\";\nimport * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\nimport { cn } from \"@/lib/utils\";\nimport {\n\tFloatingArrowSvg,\n\tfloatingArrowVariants,\n} from \"../../shared/floating-arrow\";\n\n/**\n * Popover popup variants\n *\n * Uses semantic overlay tokens for themeable styling:\n * - color.overlay.background - Light background\n * - color.overlay.border - Subtle border\n * - color.overlay.text - Primary text\n * - surface.overlay.radius - Rounded corners\n * - spatial.component.overlay.padding/gap - Consistent spacing\n */\nconst popoverPopupVariants = tv({\n\tbase: [\n\t\t// Layout - uses component overlay tokens\n\t\t\"p-spatial-component-overlay-padding\",\n\t\t// Background - uses overlay background token\n\t\t\"bg-overlay-background\",\n\t\t// Border - uses overlay border token\n\t\t\"border border-overlay-border\",\n\t\t// Text - uses overlay text token\n\t\t\"text-overlay-text\",\n\t\t// Border radius - uses surface overlay token\n\t\t\"rounded-surface-overlay\",\n\t\t// Shadow for elevation\n\t\t\"shadow-lg\",\n\t\t// Allow arrow to extend outside popup bounds\n\t\t\"overflow-visible\",\n\t\t// Animation\n\t\t\"origin-[var(--transform-origin)]\",\n\t\t\"transition-[transform,scale,opacity] duration-150\",\n\t\t\"data-[starting-style]:scale-95 data-[starting-style]:opacity-0\",\n\t\t\"data-[ending-style]:scale-95 data-[ending-style]:opacity-0\",\n\t\t// Ensure it's above other content (higher than backdrop z-40)\n\t\t\"z-50\",\n\t\t// Max width for reasonable content display\n\t\t\"max-w-[320px]\",\n\t],\n\tvariants: {\n\t\tvariant: {\n\t\t\tdefault: \"\",\n\t\t\t// Future variants can be added here\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tvariant: \"default\",\n\t},\n});\n\n/**\n * Popover arrow variants - uses shared floating arrow variants\n */\nconst popoverArrowVariants = floatingArrowVariants;\n\n// ============================================================================\n// Popover Root\n// ============================================================================\n\nexport interface PopoverRootProps extends BasePopover.Root.Props {\n\tchildren: React.ReactNode;\n}\n\n/**\n * Popover Root\n *\n * Groups all popover parts. Does not render an element.\n */\nconst PopoverRoot = ({ children, ...props }: PopoverRootProps) => {\n\treturn <BasePopover.Root {...props}>{children}</BasePopover.Root>;\n};\n\n// ============================================================================\n// Popover Trigger\n// ============================================================================\n\nexport interface PopoverTriggerProps\n\textends React.ComponentProps<typeof BasePopover.Trigger> {\n\tclassName?: string;\n}\n\n/**\n * Popover Trigger\n *\n * The element that triggers the popover on click.\n * Renders as the child element with popover behavior attached.\n * When children is a single React element, uses `render` prop to avoid wrapper element.\n */\nconst PopoverTrigger = React.forwardRef<HTMLButtonElement, PopoverTriggerProps>(\n\t({ className, children, ...props }, ref) => {\n\t\t// If children is a single React element, use render prop to avoid wrapper\n\t\tconst isSingleElement = React.isValidElement(children);\n\n\t\tif (isSingleElement) {\n\t\t\treturn (\n\t\t\t\t<BasePopover.Trigger\n\t\t\t\t\tref={ref}\n\t\t\t\t\tclassName={className}\n\t\t\t\t\trender={children as React.ReactElement<Record<string, unknown>>}\n\t\t\t\t\t{...props}\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<BasePopover.Trigger ref={ref} className={className} {...props}>\n\t\t\t\t{children}\n\t\t\t</BasePopover.Trigger>\n\t\t);\n\t},\n);\nPopoverTrigger.displayName = \"PopoverTrigger\";\n\n// ============================================================================\n// Popover Portal\n// ============================================================================\n\nexport interface PopoverPortalProps extends BasePopover.Portal.Props {\n\tchildren: React.ReactNode;\n}\n\n/**\n * Popover Portal\n *\n * Renders the popover popup in a portal outside the DOM hierarchy.\n */\nconst PopoverPortal = ({ children, ...props }: PopoverPortalProps) => {\n\treturn <BasePopover.Portal {...props}>{children}</BasePopover.Portal>;\n};\n\n// ============================================================================\n// Popover Backdrop\n// ============================================================================\n\nexport interface PopoverBackdropProps\n\textends Omit<React.ComponentProps<typeof BasePopover.Backdrop>, \"className\"> {\n\tclassName?: string;\n}\n\n/**\n * Popover Backdrop\n *\n * Optional backdrop element that can be used to close the popover on click.\n */\nconst PopoverBackdrop = React.forwardRef<HTMLDivElement, PopoverBackdropProps>(\n\t({ className, ...props }, ref) => {\n\t\treturn (\n\t\t\t<BasePopover.Backdrop\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cn(\"fixed inset-0 z-40\", className)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nPopoverBackdrop.displayName = \"PopoverBackdrop\";\n\n// ============================================================================\n// Popover Positioner\n// ============================================================================\n\nexport interface PopoverPositionerProps\n\textends Omit<\n\t\tReact.ComponentProps<typeof BasePopover.Positioner>,\n\t\t\"className\"\n\t> {\n\tclassName?: string;\n}\n\n/**\n * Popover Positioner\n *\n * Positions the popover popup relative to the trigger.\n */\nconst PopoverPositioner = React.forwardRef<\n\tHTMLDivElement,\n\tPopoverPositionerProps\n>(({ className, side = \"bottom\", sideOffset = 8, ...props }, ref) => {\n\treturn (\n\t\t<BasePopover.Positioner\n\t\t\tref={ref}\n\t\t\tside={side}\n\t\t\tsideOffset={sideOffset}\n\t\t\tclassName={cn(\"z-50\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nPopoverPositioner.displayName = \"PopoverPositioner\";\n\n// ============================================================================\n// Popover Popup\n// ============================================================================\n\nexport interface PopoverPopupProps\n\textends Omit<React.ComponentProps<typeof BasePopover.Popup>, \"className\">,\n\t\tVariantProps<typeof popoverPopupVariants> {\n\tclassName?: string;\n}\n\n/**\n * Popover Popup\n *\n * The popover content container with styled appearance.\n */\nconst PopoverPopup = React.forwardRef<HTMLDivElement, PopoverPopupProps>(\n\t({ className, variant, ...props }, ref) => {\n\t\treturn (\n\t\t\t<BasePopover.Popup\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cn(popoverPopupVariants({ variant }), className)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nPopoverPopup.displayName = \"PopoverPopup\";\n\n// ============================================================================\n// Popover Arrow\n// ============================================================================\n\nexport interface PopoverArrowProps\n\textends Omit<React.ComponentProps<typeof BasePopover.Arrow>, \"className\"> {\n\tclassName?: string;\n}\n\n/**\n * Popover Arrow\n *\n * Visual pointer element for the popover.\n * Uses shared FloatingArrowSvg with overlay color tokens for fill and border.\n */\nconst PopoverArrow = React.forwardRef<HTMLDivElement, PopoverArrowProps>(\n\t({ className, ...props }, ref) => {\n\t\treturn (\n\t\t\t<BasePopover.Arrow\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cn(popoverArrowVariants(), className)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t<FloatingArrowSvg\n\t\t\t\t\tfillClassName=\"fill-overlay-background\"\n\t\t\t\t\tborderClassName=\"fill-overlay-border\"\n\t\t\t\t/>\n\t\t\t</BasePopover.Arrow>\n\t\t);\n\t},\n);\nPopoverArrow.displayName = \"PopoverArrow\";\n\n// ============================================================================\n// Popover Title\n// ============================================================================\n\nexport interface PopoverTitleProps\n\textends Omit<React.ComponentProps<typeof BasePopover.Title>, \"className\"> {\n\tclassName?: string;\n}\n\n/**\n * Popover Title\n *\n * Title element for the popover content.\n */\nconst PopoverTitle = React.forwardRef<HTMLHeadingElement, PopoverTitleProps>(\n\t({ className, ...props }, ref) => {\n\t\treturn (\n\t\t\t<BasePopover.Title\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cn(\"typography-body-md-md font-semibold\", className)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nPopoverTitle.displayName = \"PopoverTitle\";\n\n// ============================================================================\n// Popover Description\n// ============================================================================\n\nexport interface PopoverDescriptionProps\n\textends Omit<\n\t\tReact.ComponentProps<typeof BasePopover.Description>,\n\t\t\"className\"\n\t> {\n\tclassName?: string;\n}\n\n/**\n * Popover Description\n *\n * Description element for the popover content.\n */\nconst PopoverDescription = React.forwardRef<\n\tHTMLParagraphElement,\n\tPopoverDescriptionProps\n>(({ className, ...props }, ref) => {\n\treturn (\n\t\t<BasePopover.Description\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"typography-body-sm-md text-overlay-text-muted mt-8\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nPopoverDescription.displayName = \"PopoverDescription\";\n\n// ============================================================================\n// Popover Close\n// ============================================================================\n\nexport interface PopoverCloseProps\n\textends Omit<React.ComponentProps<typeof BasePopover.Close>, \"className\"> {\n\tclassName?: string;\n}\n\n/**\n * Popover Close\n *\n * Close button for the popover.\n */\nconst PopoverClose = React.forwardRef<HTMLButtonElement, PopoverCloseProps>(\n\t({ className, ...props }, ref) => {\n\t\treturn (\n\t\t\t<BasePopover.Close\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"absolute right-8 top-8 rounded-surface-ui-small p-4\",\n\t\t\t\t\t\"text-overlay-text-muted hover:text-overlay-text\",\n\t\t\t\t\t\"hover:bg-bg-section focus:outline-none focus-visible:ring-2 focus-visible:ring-border-focus\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nPopoverClose.displayName = \"PopoverClose\";\n\n// ============================================================================\n// Simple Popover Component\n// ============================================================================\n\nexport interface PopoverProps {\n\t/** The content to show in the popover */\n\tchildren: React.ReactNode;\n\t/** The element that triggers the popover */\n\ttrigger: React.ReactNode;\n\t/** Title for the popover (optional) */\n\ttitle?: React.ReactNode;\n\t/** Side of the trigger to show the popover */\n\tside?: \"top\" | \"bottom\" | \"left\" | \"right\";\n\t/** Offset from the trigger */\n\tsideOffset?: number;\n\t/** Alignment along the side */\n\talign?: \"start\" | \"center\" | \"end\";\n\t/** Whether to show an arrow */\n\tshowArrow?: boolean;\n\t/** Whether to show a close button */\n\tshowClose?: boolean;\n\t/** Controlled open state */\n\topen?: boolean;\n\t/** Default open state */\n\tdefaultOpen?: boolean;\n\t/** Callback when open state changes */\n\tonOpenChange?: (open: boolean) => void;\n\t/** Additional className for the popup */\n\tclassName?: string;\n}\n\n/**\n * Popover\n *\n * A simple, pre-composed popover component for common use cases.\n * For more complex needs, use the compound components directly.\n *\n * @example\n * ```tsx\n * <Popover\n * trigger={<Button>Click me</Button>}\n * title=\"Popover Title\"\n * >\n * <p>This is the popover content.</p>\n * </Popover>\n * ```\n */\nconst Popover = ({\n\tchildren,\n\ttrigger,\n\ttitle,\n\tside = \"bottom\",\n\tsideOffset = 8,\n\talign = \"center\",\n\tshowArrow = true,\n\tshowClose = false,\n\topen,\n\tdefaultOpen,\n\tonOpenChange,\n\tclassName,\n}: PopoverProps) => {\n\treturn (\n\t\t<PopoverRoot\n\t\t\topen={open}\n\t\t\tdefaultOpen={defaultOpen}\n\t\t\tonOpenChange={onOpenChange}\n\t\t>\n\t\t\t<PopoverTrigger>{trigger}</PopoverTrigger>\n\t\t\t<PopoverPortal>\n\t\t\t\t<PopoverPositioner side={side} sideOffset={sideOffset} align={align}>\n\t\t\t\t\t<PopoverPopup className={className}>\n\t\t\t\t\t\t{showArrow && <PopoverArrow />}\n\t\t\t\t\t\t{showClose && (\n\t\t\t\t\t\t\t<PopoverClose>\n\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\twidth=\"12\"\n\t\t\t\t\t\t\t\t\theight=\"12\"\n\t\t\t\t\t\t\t\t\tviewBox=\"0 0 12 12\"\n\t\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\t\td=\"M1.5 1.5L10.5 10.5M1.5 10.5L10.5 1.5\"\n\t\t\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\t\t\tstrokeWidth=\"1.5\"\n\t\t\t\t\t\t\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t\t<span className=\"sr-only\">Close</span>\n\t\t\t\t\t\t\t</PopoverClose>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{title && <PopoverTitle>{title}</PopoverTitle>}\n\t\t\t\t\t\t{title ? (\n\t\t\t\t\t\t\t<PopoverDescription>{children}</PopoverDescription>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\tchildren\n\t\t\t\t\t\t)}\n\t\t\t\t\t</PopoverPopup>\n\t\t\t\t</PopoverPositioner>\n\t\t\t</PopoverPortal>\n\t\t</PopoverRoot>\n\t);\n};\n\n// ============================================================================\n// Compound Component Export\n// ============================================================================\n\nexport const PopoverParts = Object.assign(PopoverRoot, {\n\tRoot: PopoverRoot,\n\tTrigger: PopoverTrigger,\n\tPortal: PopoverPortal,\n\tBackdrop: PopoverBackdrop,\n\tPositioner: PopoverPositioner,\n\tPopup: PopoverPopup,\n\tArrow: PopoverArrow,\n\tTitle: PopoverTitle,\n\tDescription: PopoverDescription,\n\tClose: PopoverClose,\n});\n\nexport {\n\tPopover,\n\tPopoverRoot,\n\tPopoverTrigger,\n\tPopoverPortal,\n\tPopoverBackdrop,\n\tPopoverPositioner,\n\tPopoverPopup,\n\tPopoverArrow,\n\tPopoverTitle,\n\tPopoverDescription,\n\tPopoverClose,\n\tpopoverPopupVariants,\n\tpopoverArrowVariants,\n};\n"]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface ProseProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Prose container for long-form content with proper typography and spacing.
|
|
8
|
+
*
|
|
9
|
+
* Provides responsive spacing between content blocks:
|
|
10
|
+
* - Desktop (1440px+): 96px gap
|
|
11
|
+
* - Tablet (768px+): 72px gap
|
|
12
|
+
* - Mobile: 56px gap
|
|
13
|
+
*
|
|
14
|
+
* Use with ProseSection components for proper content structure.
|
|
15
|
+
*/
|
|
16
|
+
declare const Prose: React.ForwardRefExoticComponent<ProseProps & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
interface ProseSectionProps extends React.HTMLAttributes<HTMLElement> {
|
|
18
|
+
/**
|
|
19
|
+
* The heading text for this section
|
|
20
|
+
*/
|
|
21
|
+
heading: string;
|
|
22
|
+
/**
|
|
23
|
+
* The heading level to render (h2 or h3)
|
|
24
|
+
* @default "h2"
|
|
25
|
+
*/
|
|
26
|
+
as?: "h2" | "h3";
|
|
27
|
+
children: React.ReactNode;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* A section within Prose content, containing a heading and body text.
|
|
31
|
+
*
|
|
32
|
+
* Responsive typography:
|
|
33
|
+
* - h2: Uses typography-h3
|
|
34
|
+
* - h3: Uses typography-h4
|
|
35
|
+
* - Body: Uses typography-body-medium
|
|
36
|
+
*/
|
|
37
|
+
declare const ProseSection: React.ForwardRefExoticComponent<ProseSectionProps & React.RefAttributes<HTMLElement>>;
|
|
38
|
+
|
|
39
|
+
export { Prose, type ProseProps, ProseSection, type ProseSectionProps };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
|
+
import { cnBase } from 'tailwind-variants';
|
|
4
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
// src/components/sections/prose/prose.tsx
|
|
7
|
+
function cn(...inputs) {
|
|
8
|
+
return cnBase(clsx(inputs));
|
|
9
|
+
}
|
|
10
|
+
var Prose = React.forwardRef(
|
|
11
|
+
({ className, children, ...props }, ref) => {
|
|
12
|
+
return /* @__PURE__ */ jsx(
|
|
13
|
+
"div",
|
|
14
|
+
{
|
|
15
|
+
ref,
|
|
16
|
+
className: cn(
|
|
17
|
+
"flex w-full max-w-[700px] flex-col overflow-hidden",
|
|
18
|
+
// Responsive gap between sections
|
|
19
|
+
"gap-56 md:gap-72 xl:gap-96",
|
|
20
|
+
className
|
|
21
|
+
),
|
|
22
|
+
...props,
|
|
23
|
+
children
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
Prose.displayName = "Prose";
|
|
29
|
+
var ProseSection = React.forwardRef(
|
|
30
|
+
({ className, heading, as = "h2", children, ...props }, ref) => {
|
|
31
|
+
const Heading = as;
|
|
32
|
+
const headingClass = as === "h2" ? "typography-h3" : "typography-h4";
|
|
33
|
+
return /* @__PURE__ */ jsxs(
|
|
34
|
+
"section",
|
|
35
|
+
{
|
|
36
|
+
ref,
|
|
37
|
+
className: cn(
|
|
38
|
+
"flex w-full flex-col",
|
|
39
|
+
// Responsive gap between heading and body
|
|
40
|
+
"gap-24 md:gap-40",
|
|
41
|
+
className
|
|
42
|
+
),
|
|
43
|
+
...props,
|
|
44
|
+
children: [
|
|
45
|
+
/* @__PURE__ */ jsx(Heading, { className: cn(headingClass, "text-gray-900"), children: heading }),
|
|
46
|
+
/* @__PURE__ */ jsx("div", { className: "typography-body-medium flex flex-col gap-[1em] text-gray-800 break-words", children })
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
ProseSection.displayName = "ProseSection";
|
|
53
|
+
|
|
54
|
+
export { Prose, ProseSection };
|
|
55
|
+
//# sourceMappingURL=index.js.map
|
|
56
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/utils.ts","../../src/components/sections/prose/prose.tsx"],"names":["twMerge"],"mappings":";;;;;;AAKO,SAAS,MAAM,MAAA,EAAsB;AAC3C,EAAA,OAAOA,MAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC5B;ACUA,IAAM,KAAA,GAAc,KAAA,CAAA,UAAA;AAAA,EACnB,CAAC,EAAE,SAAA,EAAW,UAAU,GAAG,KAAA,IAAS,GAAA,KAAQ;AAC3C,IAAA,uBACC,GAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACA,GAAA;AAAA,QACA,SAAA,EAAW,EAAA;AAAA,UACV,oDAAA;AAAA;AAAA,UAEA,4BAAA;AAAA,UACA;AAAA,SACD;AAAA,QACC,GAAG,KAAA;AAAA,QAEH;AAAA;AAAA,KACF;AAAA,EAEF;AACD;AACA,KAAA,CAAM,WAAA,GAAc,OAAA;AAuBpB,IAAM,YAAA,GAAqB,KAAA,CAAA,UAAA;AAAA,EAC1B,CAAC,EAAE,SAAA,EAAW,OAAA,EAAS,EAAA,GAAK,MAAM,QAAA,EAAU,GAAG,KAAA,EAAM,EAAG,GAAA,KAAQ;AAC/D,IAAA,MAAM,OAAA,GAAU,EAAA;AAChB,IAAA,MAAM,YAAA,GAAe,EAAA,KAAO,IAAA,GAAO,eAAA,GAAkB,eAAA;AAErD,IAAA,uBACC,IAAA;AAAA,MAAC,SAAA;AAAA,MAAA;AAAA,QACA,GAAA;AAAA,QACA,SAAA,EAAW,EAAA;AAAA,UACV,sBAAA;AAAA;AAAA,UAEA,kBAAA;AAAA,UACA;AAAA,SACD;AAAA,QACC,GAAG,KAAA;AAAA,QAEJ,QAAA,EAAA;AAAA,0BAAA,GAAA,CAAC,WAAQ,SAAA,EAAW,EAAA,CAAG,YAAA,EAAc,eAAe,GAClD,QAAA,EAAA,OAAA,EACF,CAAA;AAAA,0BACA,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,0EAAA,EACb,QAAA,EACF;AAAA;AAAA;AAAA,KACD;AAAA,EAEF;AACD;AACA,YAAA,CAAa,WAAA,GAAc,cAAA","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 { cn } from \"@/lib/utils\";\n\nexport interface ProseProps extends React.HTMLAttributes<HTMLDivElement> {\n\tchildren: React.ReactNode;\n}\n\n/**\n * Prose container for long-form content with proper typography and spacing.\n *\n * Provides responsive spacing between content blocks:\n * - Desktop (1440px+): 96px gap\n * - Tablet (768px+): 72px gap\n * - Mobile: 56px gap\n *\n * Use with ProseSection components for proper content structure.\n */\nconst Prose = React.forwardRef<HTMLDivElement, ProseProps>(\n\t({ className, children, ...props }, ref) => {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"flex w-full max-w-[700px] flex-col overflow-hidden\",\n\t\t\t\t\t// Responsive gap between sections\n\t\t\t\t\t\"gap-56 md:gap-72 xl:gap-96\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t);\n\t},\n);\nProse.displayName = \"Prose\";\n\nexport interface ProseSectionProps extends React.HTMLAttributes<HTMLElement> {\n\t/**\n\t * The heading text for this section\n\t */\n\theading: string;\n\t/**\n\t * The heading level to render (h2 or h3)\n\t * @default \"h2\"\n\t */\n\tas?: \"h2\" | \"h3\";\n\tchildren: React.ReactNode;\n}\n\n/**\n * A section within Prose content, containing a heading and body text.\n *\n * Responsive typography:\n * - h2: Uses typography-h3\n * - h3: Uses typography-h4\n * - Body: Uses typography-body-medium\n */\nconst ProseSection = React.forwardRef<HTMLElement, ProseSectionProps>(\n\t({ className, heading, as = \"h2\", children, ...props }, ref) => {\n\t\tconst Heading = as;\n\t\tconst headingClass = as === \"h2\" ? \"typography-h3\" : \"typography-h4\";\n\n\t\treturn (\n\t\t\t<section\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"flex w-full flex-col\",\n\t\t\t\t\t// Responsive gap between heading and body\n\t\t\t\t\t\"gap-24 md:gap-40\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t<Heading className={cn(headingClass, \"text-gray-900\")}>\n\t\t\t\t\t{heading}\n\t\t\t\t</Heading>\n\t\t\t\t<div className=\"typography-body-medium flex flex-col gap-[1em] text-gray-800 break-words\">\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t</section>\n\t\t);\n\t},\n);\nProseSection.displayName = \"ProseSection\";\n\nexport { Prose, ProseSection };\n"]}
|
|
@@ -0,0 +1,156 @@
|
|
|
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
|
+
declare const quoteBlockVariants: tailwind_variants.TVReturnType<{
|
|
7
|
+
size: {
|
|
8
|
+
default: {
|
|
9
|
+
root: string;
|
|
10
|
+
};
|
|
11
|
+
compact: {
|
|
12
|
+
root: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
}, {
|
|
16
|
+
root: string;
|
|
17
|
+
content: string[];
|
|
18
|
+
quoteWrapper: string;
|
|
19
|
+
quote: string[];
|
|
20
|
+
openQuote: string[];
|
|
21
|
+
attribution: string;
|
|
22
|
+
signature: string;
|
|
23
|
+
byline: string;
|
|
24
|
+
bylineName: string;
|
|
25
|
+
bylineTitle: string;
|
|
26
|
+
}, undefined, tailwind_variants_dist_config_js.TVConfig<{
|
|
27
|
+
size: {
|
|
28
|
+
default: {
|
|
29
|
+
root: string;
|
|
30
|
+
};
|
|
31
|
+
compact: {
|
|
32
|
+
root: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
}, {
|
|
36
|
+
size: {
|
|
37
|
+
default: {
|
|
38
|
+
root: string;
|
|
39
|
+
};
|
|
40
|
+
compact: {
|
|
41
|
+
root: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
}>, {
|
|
45
|
+
size: {
|
|
46
|
+
default: {
|
|
47
|
+
root: string;
|
|
48
|
+
};
|
|
49
|
+
compact: {
|
|
50
|
+
root: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
}, {
|
|
54
|
+
root: string;
|
|
55
|
+
content: string[];
|
|
56
|
+
quoteWrapper: string;
|
|
57
|
+
quote: string[];
|
|
58
|
+
openQuote: string[];
|
|
59
|
+
attribution: string;
|
|
60
|
+
signature: string;
|
|
61
|
+
byline: string;
|
|
62
|
+
bylineName: string;
|
|
63
|
+
bylineTitle: string;
|
|
64
|
+
}, tailwind_variants.TVReturnType<{
|
|
65
|
+
size: {
|
|
66
|
+
default: {
|
|
67
|
+
root: string;
|
|
68
|
+
};
|
|
69
|
+
compact: {
|
|
70
|
+
root: string;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
}, {
|
|
74
|
+
root: string;
|
|
75
|
+
content: string[];
|
|
76
|
+
quoteWrapper: string;
|
|
77
|
+
quote: string[];
|
|
78
|
+
openQuote: string[];
|
|
79
|
+
attribution: string;
|
|
80
|
+
signature: string;
|
|
81
|
+
byline: string;
|
|
82
|
+
bylineName: string;
|
|
83
|
+
bylineTitle: string;
|
|
84
|
+
}, undefined, tailwind_variants_dist_config_js.TVConfig<{
|
|
85
|
+
size: {
|
|
86
|
+
default: {
|
|
87
|
+
root: string;
|
|
88
|
+
};
|
|
89
|
+
compact: {
|
|
90
|
+
root: string;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
}, {
|
|
94
|
+
size: {
|
|
95
|
+
default: {
|
|
96
|
+
root: string;
|
|
97
|
+
};
|
|
98
|
+
compact: {
|
|
99
|
+
root: string;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
}>, unknown, unknown, undefined>>;
|
|
103
|
+
interface QuoteBlockProps extends Omit<React.HTMLAttributes<HTMLElement>, "children">, VariantProps<typeof quoteBlockVariants> {
|
|
104
|
+
/**
|
|
105
|
+
* The quote text to display
|
|
106
|
+
*/
|
|
107
|
+
quote: string;
|
|
108
|
+
/**
|
|
109
|
+
* Whether to show decorative quote marks
|
|
110
|
+
* @default true
|
|
111
|
+
*/
|
|
112
|
+
showQuoteMarks?: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Signature image URL (optional)
|
|
115
|
+
*/
|
|
116
|
+
signatureImage?: string;
|
|
117
|
+
/**
|
|
118
|
+
* Alt text for signature image
|
|
119
|
+
*/
|
|
120
|
+
signatureAlt?: string;
|
|
121
|
+
/**
|
|
122
|
+
* Attribution name (e.g., "Donald J. Trump")
|
|
123
|
+
*/
|
|
124
|
+
attributionName?: string;
|
|
125
|
+
/**
|
|
126
|
+
* Attribution title (e.g., "45 & 47 President of the United States")
|
|
127
|
+
*/
|
|
128
|
+
attributionTitle?: string;
|
|
129
|
+
/**
|
|
130
|
+
* Background element - use BackgroundImage or similar
|
|
131
|
+
*/
|
|
132
|
+
background?: React.ReactNode;
|
|
133
|
+
/**
|
|
134
|
+
* Overlay opacity (0-1)
|
|
135
|
+
*/
|
|
136
|
+
overlayOpacity?: number;
|
|
137
|
+
/**
|
|
138
|
+
* Overlay color
|
|
139
|
+
*/
|
|
140
|
+
overlayColor?: string;
|
|
141
|
+
/**
|
|
142
|
+
* Custom class for the quote text
|
|
143
|
+
*/
|
|
144
|
+
quoteClassName?: string;
|
|
145
|
+
/**
|
|
146
|
+
* Custom class for the byline name
|
|
147
|
+
*/
|
|
148
|
+
bylineNameClassName?: string;
|
|
149
|
+
/**
|
|
150
|
+
* Custom class for the byline title
|
|
151
|
+
*/
|
|
152
|
+
bylineTitleClassName?: string;
|
|
153
|
+
}
|
|
154
|
+
declare const QuoteBlock: React.ForwardRefExoticComponent<QuoteBlockProps & React.RefAttributes<HTMLElement>>;
|
|
155
|
+
|
|
156
|
+
export { QuoteBlock, type QuoteBlockProps, quoteBlockVariants };
|