@caffeinebounce/ui 0.62.2
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/LICENSE +21 -0
- package/README.md +39 -0
- package/dist/FinancialStatementTable-BNUrdTU4.d.cts +249 -0
- package/dist/FinancialStatementTable-BNUrdTU4.d.ts +249 -0
- package/dist/NewsletterSignup-BPreFi5W.d.cts +37 -0
- package/dist/NewsletterSignup-BPreFi5W.d.ts +37 -0
- package/dist/TestimonialsSection-DtPu2OeR.d.ts +736 -0
- package/dist/TestimonialsSection-z-yotRfv.d.cts +736 -0
- package/dist/UnifiedTableControls-CG299y9h.d.ts +1233 -0
- package/dist/UnifiedTableControls-CIjRpNhy.d.cts +1233 -0
- package/dist/blog.d.cts +99 -0
- package/dist/blog.d.ts +99 -0
- package/dist/blog.js +292 -0
- package/dist/blog.mjs +279 -0
- package/dist/button-BHnoRUkF.d.cts +34 -0
- package/dist/button-BHnoRUkF.d.ts +34 -0
- package/dist/charts.d.cts +80 -0
- package/dist/charts.d.ts +80 -0
- package/dist/charts.js +19 -0
- package/dist/charts.mjs +2 -0
- package/dist/chunk-33JR5SYE.js +44 -0
- package/dist/chunk-3NDB4YPC.js +247 -0
- package/dist/chunk-5RW4PYZ6.js +1504 -0
- package/dist/chunk-5THF4YP6.mjs +155 -0
- package/dist/chunk-6BUBNZPG.mjs +164 -0
- package/dist/chunk-6DVWMJ3H.mjs +7029 -0
- package/dist/chunk-6TGV2DNP.js +120 -0
- package/dist/chunk-72JGQ7IJ.mjs +1498 -0
- package/dist/chunk-7DHKQODW.mjs +2932 -0
- package/dist/chunk-7IKHZKAC.js +160 -0
- package/dist/chunk-ADIDI7AJ.js +11 -0
- package/dist/chunk-BFWX5GJZ.mjs +940 -0
- package/dist/chunk-BMFQG6RA.mjs +5537 -0
- package/dist/chunk-C4UT5V3P.js +65 -0
- package/dist/chunk-CC4KUIKC.js +2004 -0
- package/dist/chunk-D3QXPL47.mjs +1814 -0
- package/dist/chunk-DQWHYBV2.js +36 -0
- package/dist/chunk-E42B4GSB.js +993 -0
- package/dist/chunk-ESZ7CBA2.js +1007 -0
- package/dist/chunk-EYJJQVV4.js +111 -0
- package/dist/chunk-FRRS2YZH.mjs +129 -0
- package/dist/chunk-G5TQWWQA.mjs +37 -0
- package/dist/chunk-GAIQJCAZ.js +5612 -0
- package/dist/chunk-GMBGWOCR.mjs +48 -0
- package/dist/chunk-GUSTCU2W.mjs +105 -0
- package/dist/chunk-HBLKVQIQ.mjs +23 -0
- package/dist/chunk-HMAMMC72.js +26 -0
- package/dist/chunk-IMKLN273.mjs +9 -0
- package/dist/chunk-J6OLBSZR.js +250 -0
- package/dist/chunk-JAE45W2T.js +28 -0
- package/dist/chunk-JORVSG52.js +606 -0
- package/dist/chunk-KB7UXIQZ.mjs +984 -0
- package/dist/chunk-KGGQ5NZV.js +186 -0
- package/dist/chunk-KHCC5UKW.mjs +22 -0
- package/dist/chunk-KRRIRS6A.mjs +1945 -0
- package/dist/chunk-LQCVRWVF.js +48 -0
- package/dist/chunk-MHZXUOGN.mjs +168 -0
- package/dist/chunk-MPZFPU4X.js +349 -0
- package/dist/chunk-MVYRNJA6.js +74 -0
- package/dist/chunk-N6AFNFZR.mjs +565 -0
- package/dist/chunk-OFQLWSUR.mjs +214 -0
- package/dist/chunk-OLAAXLXY.mjs +219 -0
- package/dist/chunk-OZZWDIOY.js +1859 -0
- package/dist/chunk-PZRI43EZ.js +111 -0
- package/dist/chunk-Q256HRYD.js +176 -0
- package/dist/chunk-Q52ZEL62.mjs +223 -0
- package/dist/chunk-R26Y7LGJ.js +142 -0
- package/dist/chunk-RBUYW6QQ.js +39 -0
- package/dist/chunk-RVEFPVZF.mjs +43 -0
- package/dist/chunk-SORWLKOK.js +96 -0
- package/dist/chunk-STEP6C4C.mjs +33 -0
- package/dist/chunk-T5R6HUDG.mjs +22 -0
- package/dist/chunk-T6ZBA6VJ.js +7109 -0
- package/dist/chunk-UM7WMXIU.js +2995 -0
- package/dist/chunk-VBD4Q5LL.mjs +117 -0
- package/dist/chunk-WOITB4JL.js +195 -0
- package/dist/chunk-YKZEKJMZ.mjs +71 -0
- package/dist/chunk-YL7RZRHM.mjs +103 -0
- package/dist/chunk-YSLD2HLP.mjs +346 -0
- package/dist/chunk-ZFLZA7UP.mjs +140 -0
- package/dist/chunk-ZKUIUE7W.mjs +26 -0
- package/dist/chunk-ZOA7B32D.js +248 -0
- package/dist/data-table.d.cts +46 -0
- package/dist/data-table.d.ts +46 -0
- package/dist/data-table.js +270 -0
- package/dist/data-table.mjs +13 -0
- package/dist/editor.d.cts +89 -0
- package/dist/editor.d.ts +89 -0
- package/dist/editor.js +10 -0
- package/dist/editor.mjs +1 -0
- package/dist/forms.d.cts +142 -0
- package/dist/forms.d.ts +142 -0
- package/dist/forms.js +24 -0
- package/dist/forms.mjs +11 -0
- package/dist/hooks-8ORd7T1A.d.cts +751 -0
- package/dist/hooks-B2jU1GVT.d.ts +751 -0
- package/dist/hooks.d.cts +6 -0
- package/dist/hooks.d.ts +6 -0
- package/dist/hooks.js +99 -0
- package/dist/hooks.mjs +10 -0
- package/dist/index.d.cts +3141 -0
- package/dist/index.d.ts +3141 -0
- package/dist/index.js +7332 -0
- package/dist/index.mjs +5876 -0
- package/dist/layouts-DPfDDF53.d.cts +1001 -0
- package/dist/layouts-DPfDDF53.d.ts +1001 -0
- package/dist/layouts.d.cts +4 -0
- package/dist/layouts.d.ts +4 -0
- package/dist/layouts.js +100 -0
- package/dist/layouts.mjs +11 -0
- package/dist/marketing-3d.d.cts +51 -0
- package/dist/marketing-3d.d.ts +51 -0
- package/dist/marketing-3d.js +553 -0
- package/dist/marketing-3d.mjs +526 -0
- package/dist/marketing.d.cts +583 -0
- package/dist/marketing.d.ts +583 -0
- package/dist/marketing.js +299 -0
- package/dist/marketing.mjs +10 -0
- package/dist/media.d.cts +29 -0
- package/dist/media.d.ts +29 -0
- package/dist/media.js +189 -0
- package/dist/media.mjs +182 -0
- package/dist/navigation.d.cts +591 -0
- package/dist/navigation.d.ts +591 -0
- package/dist/navigation.js +108 -0
- package/dist/navigation.mjs +15 -0
- package/dist/portal.d.cts +58 -0
- package/dist/portal.d.ts +58 -0
- package/dist/portal.js +403 -0
- package/dist/portal.mjs +395 -0
- package/dist/primitives.d.cts +508 -0
- package/dist/primitives.d.ts +508 -0
- package/dist/primitives.js +295 -0
- package/dist/primitives.mjs +14 -0
- package/dist/settings.d.cts +216 -0
- package/dist/settings.d.ts +216 -0
- package/dist/settings.js +34 -0
- package/dist/settings.mjs +9 -0
- package/dist/shared-Dqn36QHZ.d.cts +4 -0
- package/dist/shared-Dqn36QHZ.d.ts +4 -0
- package/dist/styles.css +1213 -0
- package/package.json +189 -0
- package/styles.css +1 -0
package/dist/media.mjs
ADDED
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import './chunk-MHZXUOGN.mjs';
|
|
2
|
+
import { cn } from './chunk-IMKLN273.mjs';
|
|
3
|
+
import { formatDate } from '@caffeinebounce/shared-utils';
|
|
4
|
+
import { ExternalLink } from 'lucide-react';
|
|
5
|
+
import Image from 'next/image';
|
|
6
|
+
import { useState } from 'react';
|
|
7
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
function ClippingCard({ item, className }) {
|
|
10
|
+
const [expanded, setExpanded] = useState(false);
|
|
11
|
+
const formattedDate = formatDate(item.date, {
|
|
12
|
+
month: "long",
|
|
13
|
+
day: "numeric",
|
|
14
|
+
year: "numeric"
|
|
15
|
+
});
|
|
16
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
17
|
+
/* @__PURE__ */ jsxs(
|
|
18
|
+
"div",
|
|
19
|
+
{
|
|
20
|
+
className: cn(
|
|
21
|
+
"group relative flex flex-col gap-4 rounded-xl border border-zinc-200 bg-white/50 p-6 backdrop-blur transition-all duration-300",
|
|
22
|
+
"dark:border-white/10 dark:bg-white/[0.03]",
|
|
23
|
+
className
|
|
24
|
+
),
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-start justify-between gap-4", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
27
|
+
item.imageUrl ? /* @__PURE__ */ jsx("div", { className: "flex h-10 w-10 shrink-0 items-center justify-center overflow-hidden rounded-lg", children: /* @__PURE__ */ jsx(
|
|
28
|
+
Image,
|
|
29
|
+
{
|
|
30
|
+
src: item.imageUrl,
|
|
31
|
+
alt: item.publication,
|
|
32
|
+
width: 32,
|
|
33
|
+
height: 32,
|
|
34
|
+
className: "object-contain dark:brightness-150 dark:contrast-125"
|
|
35
|
+
}
|
|
36
|
+
) }) : null,
|
|
37
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
38
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-zinc-500 dark:text-zinc-300", children: item.publication }),
|
|
39
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-zinc-400 dark:text-zinc-400", children: formattedDate })
|
|
40
|
+
] })
|
|
41
|
+
] }) }),
|
|
42
|
+
/* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold leading-snug text-zinc-900 dark:text-zinc-100", children: item.title }),
|
|
43
|
+
item.clippingImageUrl && /* @__PURE__ */ jsx(
|
|
44
|
+
"button",
|
|
45
|
+
{
|
|
46
|
+
type: "button",
|
|
47
|
+
onClick: () => setExpanded(true),
|
|
48
|
+
className: "relative max-w-[180px] cursor-zoom-in overflow-hidden rounded-lg ring-1 ring-zinc-200 transition-transform hover:scale-[1.02] dark:ring-white/10",
|
|
49
|
+
children: /* @__PURE__ */ jsx("div", { className: "rotate-[-0.5deg] transform", children: /* @__PURE__ */ jsx(
|
|
50
|
+
Image,
|
|
51
|
+
{
|
|
52
|
+
src: item.clippingImageUrl,
|
|
53
|
+
alt: item.title,
|
|
54
|
+
width: 360,
|
|
55
|
+
height: 270,
|
|
56
|
+
className: "w-full rounded-lg object-cover",
|
|
57
|
+
style: { filter: "sepia(0.08) contrast(1.02)" }
|
|
58
|
+
}
|
|
59
|
+
) })
|
|
60
|
+
}
|
|
61
|
+
),
|
|
62
|
+
item.highlight ? /* @__PURE__ */ jsx("blockquote", { className: "border-l-2 border-indigo-400/50 pl-3 text-sm italic text-zinc-500 dark:border-indigo-400/40 dark:text-zinc-300", children: item.highlight }) : null
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
),
|
|
66
|
+
expanded && item.clippingImageUrl && /* @__PURE__ */ jsx(
|
|
67
|
+
"button",
|
|
68
|
+
{
|
|
69
|
+
type: "button",
|
|
70
|
+
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/80 p-4 backdrop-blur-sm",
|
|
71
|
+
onClick: () => setExpanded(false),
|
|
72
|
+
onKeyDown: (e) => e.key === "Escape" && setExpanded(false),
|
|
73
|
+
children: /* @__PURE__ */ jsxs("div", { className: "relative max-h-[90vh] max-w-[90vw]", children: [
|
|
74
|
+
/* @__PURE__ */ jsx(
|
|
75
|
+
Image,
|
|
76
|
+
{
|
|
77
|
+
src: item.clippingImageUrl,
|
|
78
|
+
alt: item.title,
|
|
79
|
+
width: 1200,
|
|
80
|
+
height: 900,
|
|
81
|
+
className: "max-h-[85vh] w-auto rounded-lg object-contain shadow-2xl",
|
|
82
|
+
style: { filter: "sepia(0.05) contrast(1.02)" }
|
|
83
|
+
}
|
|
84
|
+
),
|
|
85
|
+
/* @__PURE__ */ jsx(
|
|
86
|
+
"button",
|
|
87
|
+
{
|
|
88
|
+
type: "button",
|
|
89
|
+
onClick: (e) => {
|
|
90
|
+
e.stopPropagation();
|
|
91
|
+
setExpanded(false);
|
|
92
|
+
},
|
|
93
|
+
className: "absolute right-3 top-3 flex h-10 w-10 items-center justify-center rounded-full bg-black/60 text-white shadow-lg backdrop-blur transition-colors hover:bg-black/80",
|
|
94
|
+
children: /* @__PURE__ */ jsxs(
|
|
95
|
+
"svg",
|
|
96
|
+
{
|
|
97
|
+
width: "16",
|
|
98
|
+
height: "16",
|
|
99
|
+
viewBox: "0 0 16 16",
|
|
100
|
+
fill: "none",
|
|
101
|
+
stroke: "currentColor",
|
|
102
|
+
strokeWidth: "2",
|
|
103
|
+
strokeLinecap: "round",
|
|
104
|
+
role: "img",
|
|
105
|
+
"aria-label": "Close",
|
|
106
|
+
children: [
|
|
107
|
+
/* @__PURE__ */ jsx("title", { children: "Close" }),
|
|
108
|
+
/* @__PURE__ */ jsx("line", { x1: "3", y1: "3", x2: "13", y2: "13" }),
|
|
109
|
+
/* @__PURE__ */ jsx("line", { x1: "13", y1: "3", x2: "3", y2: "13" })
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
)
|
|
113
|
+
}
|
|
114
|
+
)
|
|
115
|
+
] })
|
|
116
|
+
}
|
|
117
|
+
)
|
|
118
|
+
] });
|
|
119
|
+
}
|
|
120
|
+
function MediaCard({ item, className }) {
|
|
121
|
+
if (item.type === "clipping") {
|
|
122
|
+
return /* @__PURE__ */ jsx(ClippingCard, { item, className });
|
|
123
|
+
}
|
|
124
|
+
const formattedDate = formatDate(item.date, {
|
|
125
|
+
month: "long",
|
|
126
|
+
day: "numeric",
|
|
127
|
+
year: "numeric"
|
|
128
|
+
});
|
|
129
|
+
return /* @__PURE__ */ jsxs(
|
|
130
|
+
"a",
|
|
131
|
+
{
|
|
132
|
+
href: item.url,
|
|
133
|
+
target: "_blank",
|
|
134
|
+
rel: "noopener noreferrer",
|
|
135
|
+
className: cn(
|
|
136
|
+
"group relative flex flex-col gap-4 rounded-xl border border-zinc-200 bg-white/50 p-6 backdrop-blur transition-all duration-300",
|
|
137
|
+
"hover:-translate-y-0.5 hover:border-zinc-300 hover:shadow-lg",
|
|
138
|
+
"dark:border-white/10 dark:bg-white/[0.03] dark:hover:border-white/20 dark:hover:shadow-2xl dark:hover:shadow-indigo-500/5",
|
|
139
|
+
className
|
|
140
|
+
),
|
|
141
|
+
children: [
|
|
142
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-4", children: [
|
|
143
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
144
|
+
item.imageUrl ? /* @__PURE__ */ jsx("div", { className: "flex h-10 w-10 shrink-0 items-center justify-center overflow-hidden rounded-lg", children: /* @__PURE__ */ jsx(
|
|
145
|
+
Image,
|
|
146
|
+
{
|
|
147
|
+
src: item.imageUrl,
|
|
148
|
+
alt: item.publication,
|
|
149
|
+
width: 32,
|
|
150
|
+
height: 32,
|
|
151
|
+
className: "object-contain dark:brightness-150 dark:contrast-125"
|
|
152
|
+
}
|
|
153
|
+
) }) : /* @__PURE__ */ jsx("div", { className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg text-xs font-semibold text-zinc-500 dark:text-zinc-300", children: item.publication.slice(0, 2).toUpperCase() }),
|
|
154
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
155
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-zinc-500 dark:text-zinc-300", children: item.publication }),
|
|
156
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-zinc-400 dark:text-zinc-400", children: formattedDate })
|
|
157
|
+
] })
|
|
158
|
+
] }),
|
|
159
|
+
/* @__PURE__ */ jsx(ExternalLink, { className: "h-4 w-4 shrink-0 text-zinc-300 transition-colors group-hover:text-zinc-500 dark:text-zinc-600 dark:group-hover:text-zinc-300" })
|
|
160
|
+
] }),
|
|
161
|
+
/* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold leading-snug text-zinc-900 dark:text-zinc-100", children: item.title }),
|
|
162
|
+
item.excerpt ? /* @__PURE__ */ jsx("p", { className: "text-sm leading-relaxed text-zinc-600 dark:text-zinc-300", children: item.excerpt }) : null,
|
|
163
|
+
item.highlight ? /* @__PURE__ */ jsx("blockquote", { className: "border-l-2 border-indigo-400/50 pl-3 text-sm italic text-zinc-500 dark:border-indigo-400/40 dark:text-zinc-300", children: item.highlight }) : null
|
|
164
|
+
]
|
|
165
|
+
}
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
function MediaGrid({ items, className, cardClassName }) {
|
|
169
|
+
return /* @__PURE__ */ jsx("div", { className: cn("grid gap-6 sm:grid-cols-2 lg:grid-cols-3", className), children: items.map((item, i) => {
|
|
170
|
+
const spanClass = item.span === 2 ? "sm:col-span-2" : item.span === 3 ? "sm:col-span-2 lg:col-span-3" : void 0;
|
|
171
|
+
return /* @__PURE__ */ jsx(
|
|
172
|
+
MediaCard,
|
|
173
|
+
{
|
|
174
|
+
item,
|
|
175
|
+
className: cn(spanClass, cardClassName)
|
|
176
|
+
},
|
|
177
|
+
item.url || `item-${i}`
|
|
178
|
+
);
|
|
179
|
+
}) });
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export { MediaCard, MediaGrid };
|