@nebutra/ui 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/index.d.ts +380 -0
- package/dist/components/index.js +2398 -0
- package/dist/components/index.js.map +1 -0
- package/dist/hooks/index.d.ts +106 -0
- package/dist/hooks/index.js +182 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/icons/index.d.ts +3 -0
- package/dist/icons/index.js +5 -0
- package/dist/icons/index.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +31 -0
- package/dist/index.js.map +1 -0
- package/dist/layout/index.d.ts +296 -0
- package/dist/layout/index.js +1303 -0
- package/dist/layout/index.js.map +1 -0
- package/dist/layouts/index.d.ts +161 -0
- package/dist/layouts/index.js +611 -0
- package/dist/layouts/index.js.map +1 -0
- package/dist/patterns/index.d.ts +363 -0
- package/dist/patterns/index.js +3004 -0
- package/dist/patterns/index.js.map +1 -0
- package/dist/primitives/index.d.ts +9588 -0
- package/dist/primitives/index.js +26779 -0
- package/dist/primitives/index.js.map +1 -0
- package/dist/styles/brand-override.css +61 -0
- package/dist/tailwind.preset.d.ts +251 -0
- package/dist/tailwind.preset.js +273 -0
- package/dist/tailwind.preset.js.map +1 -0
- package/dist/theme/index.d.ts +150 -0
- package/dist/theme/index.js +28 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/typography/fonts.css +110 -0
- package/dist/typography/index.d.ts +425 -0
- package/dist/typography/index.js +374 -0
- package/dist/typography/index.js.map +1 -0
- package/dist/utils/index.d.ts +61 -0
- package/dist/utils/index.js +55 -0
- package/dist/utils/index.js.map +1 -0
- package/package.json +16 -6
|
@@ -0,0 +1,611 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
|
+
import { twMerge } from 'tailwind-merge';
|
|
4
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import { motion } from 'framer-motion';
|
|
7
|
+
|
|
8
|
+
// src/utils/cn.ts
|
|
9
|
+
function cn(...inputs) {
|
|
10
|
+
return twMerge(clsx(inputs));
|
|
11
|
+
}
|
|
12
|
+
function BentoGrid({ items, className }) {
|
|
13
|
+
return /* @__PURE__ */ jsx("div", { className: cn("grid grid-cols-1 md:grid-cols-3 gap-3 p-4 max-w-7xl mx-auto", className), children: items.map((item, index) => /* @__PURE__ */ jsx(BentoCard, { item }, index)) });
|
|
14
|
+
}
|
|
15
|
+
BentoGrid.displayName = "BentoGrid";
|
|
16
|
+
function BentoCard({ item }) {
|
|
17
|
+
return /* @__PURE__ */ jsxs(
|
|
18
|
+
"div",
|
|
19
|
+
{
|
|
20
|
+
className: cn(
|
|
21
|
+
"group relative p-4 rounded-[var(--radius-xl)] overflow-hidden transition-all duration-300",
|
|
22
|
+
"border border-[var(--neutral-6)] dark:border-white/10 bg-white dark:bg-black",
|
|
23
|
+
"hover:shadow-[0_2px_12px_rgba(0,0,0,0.03)] dark:hover:shadow-[0_2px_12px_rgba(255,255,255,0.03)]",
|
|
24
|
+
"hover:-translate-y-0.5 will-change-transform",
|
|
25
|
+
item.colSpan === 2 ? "md:col-span-2" : "col-span-1",
|
|
26
|
+
item.hasPersistentHover && [
|
|
27
|
+
"shadow-[0_2px_12px_rgba(0,0,0,0.03)] -translate-y-0.5",
|
|
28
|
+
"dark:shadow-[0_2px_12px_rgba(255,255,255,0.03)]"
|
|
29
|
+
]
|
|
30
|
+
),
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ jsx(
|
|
33
|
+
"div",
|
|
34
|
+
{
|
|
35
|
+
className: cn(
|
|
36
|
+
"absolute inset-0 transition-opacity duration-300",
|
|
37
|
+
item.hasPersistentHover ? "opacity-100" : "opacity-0 group-hover:opacity-100"
|
|
38
|
+
),
|
|
39
|
+
children: /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-[radial-gradient(circle_at_center,rgba(0,0,0,0.02)_1px,transparent_1px)] dark:bg-[radial-gradient(circle_at_center,rgba(255,255,255,0.02)_1px,transparent_1px)] bg-[length:4px_4px]" })
|
|
40
|
+
}
|
|
41
|
+
),
|
|
42
|
+
/* @__PURE__ */ jsxs("div", { className: "relative flex flex-col space-y-3", children: [
|
|
43
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
44
|
+
/* @__PURE__ */ jsx("div", { className: "w-8 h-8 rounded-[var(--radius-lg)] flex items-center justify-center bg-black/5 dark:bg-white/10 group-hover:bg-gradient-to-br transition-all duration-300", children: item.icon }),
|
|
45
|
+
/* @__PURE__ */ jsx(
|
|
46
|
+
"span",
|
|
47
|
+
{
|
|
48
|
+
className: cn(
|
|
49
|
+
"text-xs font-medium px-2 py-1 rounded-[var(--radius-lg)] backdrop-blur-sm",
|
|
50
|
+
"bg-black/5 dark:bg-white/10 text-[var(--neutral-10)]",
|
|
51
|
+
"transition-colors duration-300 group-hover:bg-black/10 dark:group-hover:bg-white/20"
|
|
52
|
+
),
|
|
53
|
+
children: item.status || "Active"
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
] }),
|
|
57
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
58
|
+
/* @__PURE__ */ jsxs("h3", { className: "font-medium text-[var(--neutral-12)] tracking-tight text-[15px]", children: [
|
|
59
|
+
item.title,
|
|
60
|
+
item.meta && /* @__PURE__ */ jsx("span", { className: "ml-2 text-xs text-[var(--neutral-9)] font-normal", children: item.meta })
|
|
61
|
+
] }),
|
|
62
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-[var(--neutral-10)] leading-snug font-[425]", children: item.description })
|
|
63
|
+
] }),
|
|
64
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mt-2", children: [
|
|
65
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center space-x-2 text-xs text-[var(--neutral-9)]", children: item.tags?.map((tag, i) => /* @__PURE__ */ jsxs(
|
|
66
|
+
"span",
|
|
67
|
+
{
|
|
68
|
+
className: "px-2 py-1 rounded-[var(--radius-md)] bg-black/5 dark:bg-white/10 backdrop-blur-sm transition-all duration-200 hover:bg-black/10 dark:hover:bg-white/20",
|
|
69
|
+
children: [
|
|
70
|
+
"#",
|
|
71
|
+
tag
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
i
|
|
75
|
+
)) }),
|
|
76
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs text-[var(--neutral-9)] opacity-0 group-hover:opacity-100 transition-opacity", children: item.cta || "Explore \u2192" })
|
|
77
|
+
] })
|
|
78
|
+
] }),
|
|
79
|
+
/* @__PURE__ */ jsx(
|
|
80
|
+
"div",
|
|
81
|
+
{
|
|
82
|
+
className: cn(
|
|
83
|
+
"absolute inset-0 -z-10 rounded-[var(--radius-xl)] p-px bg-gradient-to-br from-transparent via-gray-100/50 to-transparent dark:via-white/10 transition-opacity duration-300",
|
|
84
|
+
item.hasPersistentHover ? "opacity-100" : "opacity-0 group-hover:opacity-100"
|
|
85
|
+
)
|
|
86
|
+
}
|
|
87
|
+
)
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
var maxWidthMap = {
|
|
93
|
+
sm: "max-w-3xl",
|
|
94
|
+
md: "max-w-5xl",
|
|
95
|
+
lg: "max-w-6xl",
|
|
96
|
+
xl: "max-w-7xl",
|
|
97
|
+
full: "max-w-none"
|
|
98
|
+
};
|
|
99
|
+
var verticalSpacingMap = {
|
|
100
|
+
sm: "py-12 md:py-16",
|
|
101
|
+
md: "py-16 md:py-24",
|
|
102
|
+
lg: "py-24 md:py-32",
|
|
103
|
+
xl: "py-32 md:py-48"
|
|
104
|
+
};
|
|
105
|
+
var SectionContainerRoot = React.forwardRef(
|
|
106
|
+
({
|
|
107
|
+
className,
|
|
108
|
+
as: Component = "section",
|
|
109
|
+
size = "lg",
|
|
110
|
+
spacing: verticalSpacing = "md",
|
|
111
|
+
centered = true,
|
|
112
|
+
noPadding = false,
|
|
113
|
+
children,
|
|
114
|
+
...props
|
|
115
|
+
}, ref) => {
|
|
116
|
+
return /* @__PURE__ */ jsx(
|
|
117
|
+
Component,
|
|
118
|
+
{
|
|
119
|
+
ref,
|
|
120
|
+
className: cn(
|
|
121
|
+
"relative w-full",
|
|
122
|
+
!noPadding && "px-4 sm:px-6 lg:px-8",
|
|
123
|
+
verticalSpacingMap[verticalSpacing],
|
|
124
|
+
className
|
|
125
|
+
),
|
|
126
|
+
...props,
|
|
127
|
+
children: /* @__PURE__ */ jsx("div", { className: cn("w-full", maxWidthMap[size], centered && "mx-auto"), children })
|
|
128
|
+
}
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
);
|
|
132
|
+
SectionContainerRoot.displayName = "SectionContainer";
|
|
133
|
+
var SectionHeader = React.forwardRef(
|
|
134
|
+
({ className, centered = true, spacing = "md", children, ...props }, ref) => {
|
|
135
|
+
const spacingMap = {
|
|
136
|
+
sm: "mb-8",
|
|
137
|
+
md: "mb-12",
|
|
138
|
+
lg: "mb-16"
|
|
139
|
+
};
|
|
140
|
+
return /* @__PURE__ */ jsx(
|
|
141
|
+
"div",
|
|
142
|
+
{
|
|
143
|
+
ref,
|
|
144
|
+
className: cn(spacingMap[spacing], centered && "text-center", className),
|
|
145
|
+
...props,
|
|
146
|
+
children
|
|
147
|
+
}
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
);
|
|
151
|
+
SectionHeader.displayName = "SectionContainer.Header";
|
|
152
|
+
var SectionContent = React.forwardRef(
|
|
153
|
+
({ className, children, ...props }, ref) => {
|
|
154
|
+
return /* @__PURE__ */ jsx("div", { ref, className: cn("relative", className), ...props, children });
|
|
155
|
+
}
|
|
156
|
+
);
|
|
157
|
+
SectionContent.displayName = "SectionContainer.Content";
|
|
158
|
+
var SectionFooter = React.forwardRef(
|
|
159
|
+
({ className, centered = true, spacing = "md", children, ...props }, ref) => {
|
|
160
|
+
const spacingMap = {
|
|
161
|
+
sm: "mt-8",
|
|
162
|
+
md: "mt-12",
|
|
163
|
+
lg: "mt-16"
|
|
164
|
+
};
|
|
165
|
+
return /* @__PURE__ */ jsx(
|
|
166
|
+
"div",
|
|
167
|
+
{
|
|
168
|
+
ref,
|
|
169
|
+
className: cn(spacingMap[spacing], centered && "text-center", className),
|
|
170
|
+
...props,
|
|
171
|
+
children
|
|
172
|
+
}
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
);
|
|
176
|
+
SectionFooter.displayName = "SectionContainer.Footer";
|
|
177
|
+
var SectionContainer = Object.assign(SectionContainerRoot, {
|
|
178
|
+
Header: SectionHeader,
|
|
179
|
+
Content: SectionContent,
|
|
180
|
+
Footer: SectionFooter
|
|
181
|
+
});
|
|
182
|
+
var GridPattern = React.forwardRef(
|
|
183
|
+
({
|
|
184
|
+
className,
|
|
185
|
+
variant = "lines",
|
|
186
|
+
size = 32,
|
|
187
|
+
strokeWidth = 1,
|
|
188
|
+
fade = "none",
|
|
189
|
+
color = "currentColor",
|
|
190
|
+
...props
|
|
191
|
+
}, ref) => {
|
|
192
|
+
const patternId = React.useId();
|
|
193
|
+
const maskId = React.useId();
|
|
194
|
+
const renderPattern = () => {
|
|
195
|
+
switch (variant) {
|
|
196
|
+
case "dots":
|
|
197
|
+
return /* @__PURE__ */ jsx("circle", { cx: size / 2, cy: size / 2, r: strokeWidth, fill: color });
|
|
198
|
+
case "crosses": {
|
|
199
|
+
const crossSize = 6;
|
|
200
|
+
const cx = size / 2;
|
|
201
|
+
const cy = size / 2;
|
|
202
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
203
|
+
/* @__PURE__ */ jsx(
|
|
204
|
+
"line",
|
|
205
|
+
{
|
|
206
|
+
x1: cx - crossSize / 2,
|
|
207
|
+
y1: cy,
|
|
208
|
+
x2: cx + crossSize / 2,
|
|
209
|
+
y2: cy,
|
|
210
|
+
stroke: color,
|
|
211
|
+
strokeWidth
|
|
212
|
+
}
|
|
213
|
+
),
|
|
214
|
+
/* @__PURE__ */ jsx(
|
|
215
|
+
"line",
|
|
216
|
+
{
|
|
217
|
+
x1: cx,
|
|
218
|
+
y1: cy - crossSize / 2,
|
|
219
|
+
x2: cx,
|
|
220
|
+
y2: cy + crossSize / 2,
|
|
221
|
+
stroke: color,
|
|
222
|
+
strokeWidth
|
|
223
|
+
}
|
|
224
|
+
)
|
|
225
|
+
] });
|
|
226
|
+
}
|
|
227
|
+
default:
|
|
228
|
+
return /* @__PURE__ */ jsx(
|
|
229
|
+
"path",
|
|
230
|
+
{
|
|
231
|
+
d: `M ${size} 0 L 0 0 0 ${size}`,
|
|
232
|
+
fill: "none",
|
|
233
|
+
stroke: color,
|
|
234
|
+
strokeWidth
|
|
235
|
+
}
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
const getMaskGradient = () => {
|
|
240
|
+
switch (fade) {
|
|
241
|
+
case "top":
|
|
242
|
+
return /* @__PURE__ */ jsxs("linearGradient", { id: maskId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
243
|
+
/* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: "white", stopOpacity: "0" }),
|
|
244
|
+
/* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: "white", stopOpacity: "1" })
|
|
245
|
+
] });
|
|
246
|
+
case "bottom":
|
|
247
|
+
return /* @__PURE__ */ jsxs("linearGradient", { id: maskId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
248
|
+
/* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: "white", stopOpacity: "1" }),
|
|
249
|
+
/* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: "white", stopOpacity: "0" })
|
|
250
|
+
] });
|
|
251
|
+
case "both":
|
|
252
|
+
return /* @__PURE__ */ jsxs("linearGradient", { id: maskId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
253
|
+
/* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: "white", stopOpacity: "0" }),
|
|
254
|
+
/* @__PURE__ */ jsx("stop", { offset: "50%", stopColor: "white", stopOpacity: "1" }),
|
|
255
|
+
/* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: "white", stopOpacity: "0" })
|
|
256
|
+
] });
|
|
257
|
+
case "radial":
|
|
258
|
+
return /* @__PURE__ */ jsxs("radialGradient", { id: maskId, cx: "50%", cy: "50%", r: "50%", children: [
|
|
259
|
+
/* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: "white", stopOpacity: "1" }),
|
|
260
|
+
/* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: "white", stopOpacity: "0" })
|
|
261
|
+
] });
|
|
262
|
+
default:
|
|
263
|
+
return null;
|
|
264
|
+
}
|
|
265
|
+
};
|
|
266
|
+
const maskGradient = getMaskGradient();
|
|
267
|
+
return /* @__PURE__ */ jsx(
|
|
268
|
+
"div",
|
|
269
|
+
{
|
|
270
|
+
ref,
|
|
271
|
+
className: cn(
|
|
272
|
+
"pointer-events-none absolute inset-0 overflow-hidden text-border/40",
|
|
273
|
+
className
|
|
274
|
+
),
|
|
275
|
+
"aria-hidden": "true",
|
|
276
|
+
...props,
|
|
277
|
+
children: /* @__PURE__ */ jsxs("svg", { "aria-hidden": "true", className: "absolute inset-0 h-full w-full", children: [
|
|
278
|
+
/* @__PURE__ */ jsxs("defs", { children: [
|
|
279
|
+
/* @__PURE__ */ jsx(
|
|
280
|
+
"pattern",
|
|
281
|
+
{
|
|
282
|
+
id: patternId,
|
|
283
|
+
x: "0",
|
|
284
|
+
y: "0",
|
|
285
|
+
width: size,
|
|
286
|
+
height: size,
|
|
287
|
+
patternUnits: "userSpaceOnUse",
|
|
288
|
+
children: renderPattern()
|
|
289
|
+
}
|
|
290
|
+
),
|
|
291
|
+
maskGradient
|
|
292
|
+
] }),
|
|
293
|
+
fade !== "none" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
294
|
+
/* @__PURE__ */ jsx("mask", { id: `${maskId}-mask`, children: /* @__PURE__ */ jsx("rect", { width: "100%", height: "100%", fill: `url(#${maskId})` }) }),
|
|
295
|
+
/* @__PURE__ */ jsx(
|
|
296
|
+
"rect",
|
|
297
|
+
{
|
|
298
|
+
width: "100%",
|
|
299
|
+
height: "100%",
|
|
300
|
+
fill: `url(#${patternId})`,
|
|
301
|
+
mask: `url(#${maskId}-mask)`
|
|
302
|
+
}
|
|
303
|
+
)
|
|
304
|
+
] }) : /* @__PURE__ */ jsx("rect", { width: "100%", height: "100%", fill: `url(#${patternId})` })
|
|
305
|
+
] })
|
|
306
|
+
}
|
|
307
|
+
);
|
|
308
|
+
}
|
|
309
|
+
);
|
|
310
|
+
GridPattern.displayName = "GridPattern";
|
|
311
|
+
var CrossPattern = React.forwardRef(
|
|
312
|
+
({
|
|
313
|
+
crossSize = 6,
|
|
314
|
+
gap = 32,
|
|
315
|
+
strokeWidth = 1,
|
|
316
|
+
color = "currentColor",
|
|
317
|
+
opacity = 0.03,
|
|
318
|
+
className,
|
|
319
|
+
...props
|
|
320
|
+
}, ref) => {
|
|
321
|
+
const patternSize = crossSize + gap;
|
|
322
|
+
const halfCross = crossSize / 2;
|
|
323
|
+
const halfStroke = strokeWidth / 2;
|
|
324
|
+
const svgPattern = `
|
|
325
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="${patternSize}" height="${patternSize}" viewBox="0 0 ${patternSize} ${patternSize}">
|
|
326
|
+
<rect
|
|
327
|
+
x="${halfCross - halfStroke}"
|
|
328
|
+
y="0"
|
|
329
|
+
width="${strokeWidth}"
|
|
330
|
+
height="${crossSize}"
|
|
331
|
+
fill="${color}"
|
|
332
|
+
/>
|
|
333
|
+
<rect
|
|
334
|
+
x="0"
|
|
335
|
+
y="${halfCross - halfStroke}"
|
|
336
|
+
width="${crossSize}"
|
|
337
|
+
height="${strokeWidth}"
|
|
338
|
+
fill="${color}"
|
|
339
|
+
/>
|
|
340
|
+
</svg>
|
|
341
|
+
`.trim();
|
|
342
|
+
const encodedSvg = encodeURIComponent(svgPattern);
|
|
343
|
+
return /* @__PURE__ */ jsx(
|
|
344
|
+
"div",
|
|
345
|
+
{
|
|
346
|
+
ref,
|
|
347
|
+
className: cn("absolute inset-0 pointer-events-none", className),
|
|
348
|
+
style: {
|
|
349
|
+
backgroundImage: `url("data:image/svg+xml,${encodedSvg}")`,
|
|
350
|
+
backgroundSize: `${patternSize}px ${patternSize}px`,
|
|
351
|
+
opacity
|
|
352
|
+
},
|
|
353
|
+
"aria-hidden": "true",
|
|
354
|
+
...props
|
|
355
|
+
}
|
|
356
|
+
);
|
|
357
|
+
}
|
|
358
|
+
);
|
|
359
|
+
CrossPattern.displayName = "CrossPattern";
|
|
360
|
+
var DotMatrix = React.forwardRef(
|
|
361
|
+
({ dotSize = 2, gap = 16, color = "currentColor", opacity = 0.04, className, ...props }, ref) => {
|
|
362
|
+
const patternSize = dotSize + gap;
|
|
363
|
+
return /* @__PURE__ */ jsx(
|
|
364
|
+
"div",
|
|
365
|
+
{
|
|
366
|
+
ref,
|
|
367
|
+
className: cn("absolute inset-0 pointer-events-none", className),
|
|
368
|
+
style: {
|
|
369
|
+
backgroundImage: `radial-gradient(circle, ${color} ${dotSize / 2}px, transparent ${dotSize / 2}px)`,
|
|
370
|
+
backgroundSize: `${patternSize}px ${patternSize}px`,
|
|
371
|
+
backgroundPosition: `${gap / 2}px ${gap / 2}px`,
|
|
372
|
+
opacity
|
|
373
|
+
},
|
|
374
|
+
"aria-hidden": "true",
|
|
375
|
+
...props
|
|
376
|
+
}
|
|
377
|
+
);
|
|
378
|
+
}
|
|
379
|
+
);
|
|
380
|
+
DotMatrix.displayName = "DotMatrix";
|
|
381
|
+
var FloatingSpots = React.forwardRef(
|
|
382
|
+
({
|
|
383
|
+
count = 12,
|
|
384
|
+
minSize = 40,
|
|
385
|
+
maxSize = 120,
|
|
386
|
+
color = "hsl(var(--accent))",
|
|
387
|
+
minOpacity = 0.05,
|
|
388
|
+
maxOpacity = 0.15,
|
|
389
|
+
cycleDuration = 20,
|
|
390
|
+
blur = 40,
|
|
391
|
+
className,
|
|
392
|
+
...props
|
|
393
|
+
}, ref) => {
|
|
394
|
+
const spots = React.useMemo(() => {
|
|
395
|
+
return Array.from({ length: count }, (_, i) => ({
|
|
396
|
+
id: i,
|
|
397
|
+
x: Math.random() * 100,
|
|
398
|
+
y: Math.random() * 100,
|
|
399
|
+
size: minSize + Math.random() * (maxSize - minSize),
|
|
400
|
+
opacity: minOpacity + Math.random() * (maxOpacity - minOpacity),
|
|
401
|
+
duration: cycleDuration * (0.8 + Math.random() * 0.4),
|
|
402
|
+
delay: Math.random() * -cycleDuration,
|
|
403
|
+
driftX: (Math.random() - 0.5) * 30,
|
|
404
|
+
driftY: (Math.random() - 0.5) * 30
|
|
405
|
+
}));
|
|
406
|
+
}, [count, minSize, maxSize, minOpacity, maxOpacity, cycleDuration]);
|
|
407
|
+
return /* @__PURE__ */ jsx(
|
|
408
|
+
"div",
|
|
409
|
+
{
|
|
410
|
+
ref,
|
|
411
|
+
className: cn("absolute inset-0 overflow-hidden pointer-events-none", className),
|
|
412
|
+
"aria-hidden": "true",
|
|
413
|
+
...props,
|
|
414
|
+
children: spots.map((spot) => /* @__PURE__ */ jsx(
|
|
415
|
+
motion.div,
|
|
416
|
+
{
|
|
417
|
+
className: "absolute rounded-full",
|
|
418
|
+
style: {
|
|
419
|
+
left: `${spot.x}%`,
|
|
420
|
+
top: `${spot.y}%`,
|
|
421
|
+
width: spot.size,
|
|
422
|
+
height: spot.size,
|
|
423
|
+
backgroundColor: color,
|
|
424
|
+
filter: `blur(${blur}px)`,
|
|
425
|
+
transform: "translate(-50%, -50%)"
|
|
426
|
+
},
|
|
427
|
+
animate: {
|
|
428
|
+
x: [0, spot.driftX, 0, -spot.driftX / 2, 0],
|
|
429
|
+
y: [0, spot.driftY / 2, spot.driftY, 0],
|
|
430
|
+
opacity: [spot.opacity, spot.opacity * 1.3, spot.opacity],
|
|
431
|
+
scale: [1, 1.1, 1]
|
|
432
|
+
},
|
|
433
|
+
transition: {
|
|
434
|
+
duration: spot.duration,
|
|
435
|
+
repeat: Infinity,
|
|
436
|
+
ease: "easeInOut",
|
|
437
|
+
delay: spot.delay
|
|
438
|
+
}
|
|
439
|
+
},
|
|
440
|
+
spot.id
|
|
441
|
+
))
|
|
442
|
+
}
|
|
443
|
+
);
|
|
444
|
+
}
|
|
445
|
+
);
|
|
446
|
+
FloatingSpots.displayName = "FloatingSpots";
|
|
447
|
+
var sectionThemes = {
|
|
448
|
+
// Hero: "Cosmic Launch" - Deep blue gradient with floating particles
|
|
449
|
+
hero: {
|
|
450
|
+
backgroundColor: "bg-background",
|
|
451
|
+
pattern: "floating",
|
|
452
|
+
patternColor: "hsl(var(--accent))",
|
|
453
|
+
patternOpacity: 0.1,
|
|
454
|
+
gradient: "bg-gradient-to-b from-primary/5 via-transparent to-transparent"
|
|
455
|
+
},
|
|
456
|
+
// Architecture: "Terminal Matrix" - Monochrome with subtle pattern
|
|
457
|
+
architecture: {
|
|
458
|
+
backgroundColor: "bg-[var(--neutral-1)]",
|
|
459
|
+
pattern: "dots",
|
|
460
|
+
patternColor: "currentColor",
|
|
461
|
+
patternOpacity: 0.03
|
|
462
|
+
},
|
|
463
|
+
// AI-Native: "Neon Network" - Dark with neon accents
|
|
464
|
+
aiNative: {
|
|
465
|
+
backgroundColor: "bg-background",
|
|
466
|
+
pattern: "dots",
|
|
467
|
+
patternColor: "hsl(var(--accent))",
|
|
468
|
+
patternOpacity: 0.04,
|
|
469
|
+
accentColor: "hsl(var(--accent))",
|
|
470
|
+
gradient: "bg-gradient-to-br from-cyan-500/5 via-transparent to-fuchsia-500/5"
|
|
471
|
+
},
|
|
472
|
+
// Features: "Capability Map" - Subtle tech pattern
|
|
473
|
+
features: {
|
|
474
|
+
backgroundColor: "bg-background",
|
|
475
|
+
pattern: "crosses",
|
|
476
|
+
patternColor: "currentColor",
|
|
477
|
+
patternOpacity: 0.03
|
|
478
|
+
},
|
|
479
|
+
// Multi-tenant: "Access Graph" - Amber isolation lines
|
|
480
|
+
// Note: Uses specific amber for visual territory (exempt)
|
|
481
|
+
multiTenant: {
|
|
482
|
+
backgroundColor: "bg-background",
|
|
483
|
+
pattern: "grid",
|
|
484
|
+
patternColor: "hsl(var(--warning, 43 96% 56%))",
|
|
485
|
+
// Warning/amber semantic
|
|
486
|
+
patternOpacity: 0.03,
|
|
487
|
+
accentColor: "hsl(var(--warning, 43 96% 56%))"
|
|
488
|
+
},
|
|
489
|
+
// Testimonials: "Depth Gallery" - Warm neutrals with vignette
|
|
490
|
+
testimonials: {
|
|
491
|
+
backgroundColor: "bg-background",
|
|
492
|
+
pattern: "floating",
|
|
493
|
+
patternColor: "hsl(var(--warning, 48 96% 58%))",
|
|
494
|
+
// Warm yellow
|
|
495
|
+
patternOpacity: 0.05,
|
|
496
|
+
gradient: "bg-[radial-gradient(ellipse_at_center,transparent_0%,hsl(var(--background)/0.4)_100%)]"
|
|
497
|
+
},
|
|
498
|
+
// Vision: "Contemplation Space" - Maximum whitespace
|
|
499
|
+
vision: {
|
|
500
|
+
backgroundColor: "bg-background",
|
|
501
|
+
pattern: "none",
|
|
502
|
+
gradient: "bg-gradient-to-b from-transparent via-primary/[0.02] to-transparent"
|
|
503
|
+
},
|
|
504
|
+
// Pricing: "Symmetry Order" - Clean, minimal
|
|
505
|
+
pricing: {
|
|
506
|
+
backgroundColor: "bg-background",
|
|
507
|
+
pattern: "dots",
|
|
508
|
+
patternColor: "currentColor",
|
|
509
|
+
patternOpacity: 0.02
|
|
510
|
+
},
|
|
511
|
+
// CTA: "Action Climax" - Emphasis with gradient
|
|
512
|
+
cta: {
|
|
513
|
+
backgroundColor: "bg-background",
|
|
514
|
+
pattern: "dots",
|
|
515
|
+
patternColor: "hsl(var(--primary))",
|
|
516
|
+
patternOpacity: 0.04,
|
|
517
|
+
gradient: "bg-gradient-to-t from-primary/10 via-transparent to-transparent"
|
|
518
|
+
},
|
|
519
|
+
// Stats: "Data Visualization" - Clean with subtle pattern
|
|
520
|
+
stats: {
|
|
521
|
+
backgroundColor: "bg-muted/30",
|
|
522
|
+
pattern: "crosses",
|
|
523
|
+
patternColor: "currentColor",
|
|
524
|
+
patternOpacity: 0.02
|
|
525
|
+
},
|
|
526
|
+
// Terminal: "Developer Immersion" - Code environment feel
|
|
527
|
+
terminal: {
|
|
528
|
+
backgroundColor: "bg-[var(--neutral-1)]",
|
|
529
|
+
pattern: "none"
|
|
530
|
+
}
|
|
531
|
+
};
|
|
532
|
+
var ThemedSection = React.forwardRef(
|
|
533
|
+
({ theme, children, className, cssVars, showPattern = true, ...props }, ref) => {
|
|
534
|
+
const config = typeof theme === "string" ? sectionThemes[theme] : theme;
|
|
535
|
+
const renderPattern = () => {
|
|
536
|
+
if (!showPattern || config.pattern === "none") return null;
|
|
537
|
+
const baseProps = {
|
|
538
|
+
className: "absolute inset-0 z-0"
|
|
539
|
+
};
|
|
540
|
+
switch (config.pattern) {
|
|
541
|
+
case "dots":
|
|
542
|
+
return /* @__PURE__ */ jsx(
|
|
543
|
+
DotMatrix,
|
|
544
|
+
{
|
|
545
|
+
...baseProps,
|
|
546
|
+
color: config.patternColor,
|
|
547
|
+
opacity: config.patternOpacity,
|
|
548
|
+
...config.patternProps
|
|
549
|
+
}
|
|
550
|
+
);
|
|
551
|
+
case "crosses":
|
|
552
|
+
return /* @__PURE__ */ jsx(
|
|
553
|
+
CrossPattern,
|
|
554
|
+
{
|
|
555
|
+
...baseProps,
|
|
556
|
+
color: config.patternColor,
|
|
557
|
+
opacity: config.patternOpacity,
|
|
558
|
+
...config.patternProps
|
|
559
|
+
}
|
|
560
|
+
);
|
|
561
|
+
case "grid":
|
|
562
|
+
return /* @__PURE__ */ jsx(
|
|
563
|
+
GridPattern,
|
|
564
|
+
{
|
|
565
|
+
...baseProps,
|
|
566
|
+
color: config.patternColor,
|
|
567
|
+
className: cn(baseProps.className, `opacity-[${config.patternOpacity}]`),
|
|
568
|
+
...config.patternProps
|
|
569
|
+
}
|
|
570
|
+
);
|
|
571
|
+
case "floating":
|
|
572
|
+
return /* @__PURE__ */ jsx(
|
|
573
|
+
FloatingSpots,
|
|
574
|
+
{
|
|
575
|
+
...baseProps,
|
|
576
|
+
color: config.patternColor,
|
|
577
|
+
maxOpacity: config.patternOpacity,
|
|
578
|
+
...config.patternProps
|
|
579
|
+
}
|
|
580
|
+
);
|
|
581
|
+
default:
|
|
582
|
+
return null;
|
|
583
|
+
}
|
|
584
|
+
};
|
|
585
|
+
return /* @__PURE__ */ jsxs(
|
|
586
|
+
"section",
|
|
587
|
+
{
|
|
588
|
+
ref,
|
|
589
|
+
className: cn("relative overflow-hidden", config.backgroundColor, className),
|
|
590
|
+
style: cssVars,
|
|
591
|
+
...props,
|
|
592
|
+
children: [
|
|
593
|
+
renderPattern(),
|
|
594
|
+
config.gradient && /* @__PURE__ */ jsx(
|
|
595
|
+
"div",
|
|
596
|
+
{
|
|
597
|
+
className: cn("absolute inset-0 z-0 pointer-events-none", config.gradient),
|
|
598
|
+
"aria-hidden": "true"
|
|
599
|
+
}
|
|
600
|
+
),
|
|
601
|
+
/* @__PURE__ */ jsx("div", { className: "relative z-10", children })
|
|
602
|
+
]
|
|
603
|
+
}
|
|
604
|
+
);
|
|
605
|
+
}
|
|
606
|
+
);
|
|
607
|
+
ThemedSection.displayName = "ThemedSection";
|
|
608
|
+
|
|
609
|
+
export { BentoGrid, SectionContainer, SectionContainerRoot, SectionContent, SectionFooter, SectionHeader, ThemedSection, sectionThemes };
|
|
610
|
+
//# sourceMappingURL=index.js.map
|
|
611
|
+
//# sourceMappingURL=index.js.map
|