@nimblegiant/stilts 0.2.0-alpha.3 → 0.2.0-alpha.4
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/README.md +734 -107
- package/dist/index.cjs +125 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +56 -5
- package/dist/index.d.ts +56 -5
- package/dist/index.js +124 -13
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/components/layout/MainNav.tsx +39 -18
- package/src/components/patterns/ContentPage.tsx +15 -6
- package/src/components/patterns/ListCard.tsx +134 -0
- package/src/components/patterns/index.ts +26 -20
- package/src/components/ui/AuthorMeta.tsx +44 -0
- package/src/components/ui/index.ts +3 -1
package/dist/index.cjs
CHANGED
|
@@ -16,7 +16,11 @@ __export(layout_exports, {
|
|
|
16
16
|
MainNav: () => MainNav,
|
|
17
17
|
TopBanner: () => TopBanner
|
|
18
18
|
});
|
|
19
|
-
function MainNav({
|
|
19
|
+
function MainNav({
|
|
20
|
+
currentPath,
|
|
21
|
+
isPortfolioPage = false,
|
|
22
|
+
navLinks = []
|
|
23
|
+
}) {
|
|
20
24
|
const [theme, setTheme] = react.useState(() => {
|
|
21
25
|
if (typeof document !== "undefined") {
|
|
22
26
|
return document.documentElement.getAttribute("data-theme") || "light";
|
|
@@ -64,13 +68,6 @@ function MainNav({ currentPath, isPortfolioPage = false }) {
|
|
|
64
68
|
document.documentElement.setAttribute("data-theme", newTheme);
|
|
65
69
|
localStorage.setItem("theme", newTheme);
|
|
66
70
|
}, [theme]);
|
|
67
|
-
const navLinks = [
|
|
68
|
-
{ href: "/", label: "HOME" },
|
|
69
|
-
{ href: "/about", label: "ABOUT" },
|
|
70
|
-
{ href: "/services", label: "SERVICES" },
|
|
71
|
-
{ href: "/products", label: "PRODUCTS" },
|
|
72
|
-
{ href: "/contact", label: "CONTACT" }
|
|
73
|
-
];
|
|
74
71
|
const isActive = (href) => {
|
|
75
72
|
if (href === "/") return currentPath === "/";
|
|
76
73
|
return currentPath.startsWith(href);
|
|
@@ -172,7 +169,9 @@ function MainNav({ currentPath, isPortfolioPage = false }) {
|
|
|
172
169
|
"li",
|
|
173
170
|
{
|
|
174
171
|
className: `transition-all duration-300 ${isMenuOpen ? "translate-x-0 opacity-100" : "translate-x-8 opacity-0"} `,
|
|
175
|
-
style: {
|
|
172
|
+
style: {
|
|
173
|
+
transitionDelay: isMenuOpen ? `${index * 50 + 100}ms` : "0ms"
|
|
174
|
+
},
|
|
176
175
|
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
177
176
|
"a",
|
|
178
177
|
{
|
|
@@ -298,6 +297,7 @@ function TopBanner() {
|
|
|
298
297
|
// src/components/ui/index.ts
|
|
299
298
|
var ui_exports = {};
|
|
300
299
|
__export(ui_exports, {
|
|
300
|
+
AuthorMeta: () => AuthorMeta,
|
|
301
301
|
Toast: () => ToastContainer
|
|
302
302
|
});
|
|
303
303
|
var icons = {
|
|
@@ -399,6 +399,30 @@ function ToastContainer() {
|
|
|
399
399
|
}
|
|
400
400
|
);
|
|
401
401
|
}
|
|
402
|
+
function AuthorMeta({ author, linkable = false }) {
|
|
403
|
+
const content = /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-1", children: [
|
|
404
|
+
author.avatar && /* @__PURE__ */ jsxRuntime.jsx(
|
|
405
|
+
"img",
|
|
406
|
+
{
|
|
407
|
+
src: author.avatar,
|
|
408
|
+
alt: author.name,
|
|
409
|
+
className: "h-4 w-4 rounded-full object-cover"
|
|
410
|
+
}
|
|
411
|
+
),
|
|
412
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: author.name })
|
|
413
|
+
] });
|
|
414
|
+
if (linkable && author.url) {
|
|
415
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
416
|
+
"a",
|
|
417
|
+
{
|
|
418
|
+
href: author.url,
|
|
419
|
+
className: "flex items-center gap-1 transition-colors hover:text-[var(--color-primary)]",
|
|
420
|
+
children: content
|
|
421
|
+
}
|
|
422
|
+
);
|
|
423
|
+
}
|
|
424
|
+
return content;
|
|
425
|
+
}
|
|
402
426
|
|
|
403
427
|
// src/components/patterns/index.ts
|
|
404
428
|
var patterns_exports = {};
|
|
@@ -408,6 +432,7 @@ __export(patterns_exports, {
|
|
|
408
432
|
ContentPage: () => ContentPage,
|
|
409
433
|
FeatureShowcase: () => FeatureShowcase,
|
|
410
434
|
IndustryGrid: () => IndustryGrid,
|
|
435
|
+
ListCard: () => ListCard,
|
|
411
436
|
PageHero: () => PageHero,
|
|
412
437
|
ProcessSteps: () => ProcessSteps,
|
|
413
438
|
ProductCard: () => ProductCard,
|
|
@@ -819,9 +844,14 @@ function IndustryGrid({ industries, title, cols = 3 }) {
|
|
|
819
844
|
)) })
|
|
820
845
|
] }) });
|
|
821
846
|
}
|
|
822
|
-
function ContentPage({
|
|
847
|
+
function ContentPage({
|
|
848
|
+
title,
|
|
849
|
+
subtitle,
|
|
850
|
+
lastUpdated,
|
|
851
|
+
children
|
|
852
|
+
}) {
|
|
823
853
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
824
|
-
/* @__PURE__ */ jsxRuntime.jsx("section", { className: "pt-32 pb-12", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "container-
|
|
854
|
+
/* @__PURE__ */ jsxRuntime.jsx("section", { className: "pt-32 pb-12", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "container-md container", children: [
|
|
825
855
|
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: "mb-4 text-4xl font-bold text-[var(--color-text-primary)] md:text-5xl", children: title }),
|
|
826
856
|
subtitle && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "mb-2 text-xl text-[var(--color-text-secondary)]", children: subtitle }),
|
|
827
857
|
lastUpdated && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-[var(--color-text-muted)]", children: [
|
|
@@ -829,7 +859,7 @@ function ContentPage({ title, subtitle, lastUpdated, children }) {
|
|
|
829
859
|
lastUpdated
|
|
830
860
|
] })
|
|
831
861
|
] }) }),
|
|
832
|
-
/* @__PURE__ */ jsxRuntime.jsx("section", { className: "py-12", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "container-
|
|
862
|
+
/* @__PURE__ */ jsxRuntime.jsx("section", { className: "py-12", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "container-md container", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "prose max-w-full", children }) }) })
|
|
833
863
|
] });
|
|
834
864
|
}
|
|
835
865
|
function useMultiLineTypewriter(lines, typingSpeed = 20, initialDelay = 800, isVisible = true) {
|
|
@@ -1363,6 +1393,87 @@ var FeatureShowcase = ({
|
|
|
1363
1393
|
)) })
|
|
1364
1394
|
] }) });
|
|
1365
1395
|
};
|
|
1396
|
+
function ListCard({
|
|
1397
|
+
href,
|
|
1398
|
+
title,
|
|
1399
|
+
description,
|
|
1400
|
+
tagline,
|
|
1401
|
+
thumbnail,
|
|
1402
|
+
tags,
|
|
1403
|
+
meta,
|
|
1404
|
+
imageAlt = "Card image",
|
|
1405
|
+
animationDelay,
|
|
1406
|
+
specialImageComponent = false,
|
|
1407
|
+
imageBgClass = "bg-[var(--color-surface-muted)]",
|
|
1408
|
+
children,
|
|
1409
|
+
imageDark,
|
|
1410
|
+
imageLight,
|
|
1411
|
+
footerSlot
|
|
1412
|
+
}) {
|
|
1413
|
+
const animationStyle = animationDelay ? { animationDelay: `${animationDelay}s` } : void 0;
|
|
1414
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1415
|
+
"a",
|
|
1416
|
+
{
|
|
1417
|
+
href,
|
|
1418
|
+
className: "hero-animate group flex flex-col overflow-hidden rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] opacity-0 shadow-sm transition-all duration-300 hover:border-[var(--color-primary)] hover:shadow-lg",
|
|
1419
|
+
style: animationStyle,
|
|
1420
|
+
children: [
|
|
1421
|
+
thumbnail && !specialImageComponent && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1422
|
+
"div",
|
|
1423
|
+
{
|
|
1424
|
+
className: `relative aspect-video w-full overflow-hidden rounded-t-lg ${imageBgClass}`,
|
|
1425
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1426
|
+
"img",
|
|
1427
|
+
{
|
|
1428
|
+
src: thumbnail,
|
|
1429
|
+
alt: imageAlt,
|
|
1430
|
+
className: "h-full w-full object-cover transition-transform duration-300 group-hover:scale-105"
|
|
1431
|
+
}
|
|
1432
|
+
)
|
|
1433
|
+
}
|
|
1434
|
+
),
|
|
1435
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex aspect-video w-full items-center justify-center overflow-hidden rounded-t-lg bg-gradient-to-br from-[var(--color-dot-magenta)] via-[var(--color-dot-purple)] to-[var(--color-dot-turquoise)] p-12", children: [
|
|
1436
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1437
|
+
"img",
|
|
1438
|
+
{
|
|
1439
|
+
src: imageDark,
|
|
1440
|
+
alt: title,
|
|
1441
|
+
className: "dark-mode-hidden h-full w-full object-contain transition-transform duration-300 group-hover:scale-105"
|
|
1442
|
+
}
|
|
1443
|
+
),
|
|
1444
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1445
|
+
"img",
|
|
1446
|
+
{
|
|
1447
|
+
src: imageLight,
|
|
1448
|
+
alt: title,
|
|
1449
|
+
className: "dark-mode-visible h-full w-full object-contain transition-transform duration-300 group-hover:scale-105"
|
|
1450
|
+
}
|
|
1451
|
+
)
|
|
1452
|
+
] }),
|
|
1453
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-1 flex-col p-6", children: [
|
|
1454
|
+
meta && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2 flex items-center gap-2 text-xs text-[var(--color-text-muted)]", children: [
|
|
1455
|
+
meta.author && /* @__PURE__ */ jsxRuntime.jsx(AuthorMeta, { author: meta.author }),
|
|
1456
|
+
meta.date && meta.author && /* @__PURE__ */ jsxRuntime.jsx("span", { children: "\u2022" }),
|
|
1457
|
+
meta.date && /* @__PURE__ */ jsxRuntime.jsx("span", { children: meta.date })
|
|
1458
|
+
] }),
|
|
1459
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-heading mb-2 text-xl font-semibold text-[var(--color-text-primary)]", children: title }),
|
|
1460
|
+
tagline && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-3 text-sm font-medium text-[var(--color-primary)]", children: tagline }),
|
|
1461
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-4 flex-1 text-sm leading-relaxed text-[var(--color-text-secondary)]", children: description }),
|
|
1462
|
+
tags && tags.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-auto flex flex-wrap gap-2 pt-4", children: tags.map((tag) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1463
|
+
"span",
|
|
1464
|
+
{
|
|
1465
|
+
className: "rounded-full border border-[var(--color-border)] bg-[var(--color-surface-muted)] px-3 py-1 text-xs font-medium text-[var(--color-text-secondary)]",
|
|
1466
|
+
children: tag
|
|
1467
|
+
},
|
|
1468
|
+
tag
|
|
1469
|
+
)) }),
|
|
1470
|
+
children
|
|
1471
|
+
] }),
|
|
1472
|
+
footerSlot
|
|
1473
|
+
]
|
|
1474
|
+
}
|
|
1475
|
+
);
|
|
1476
|
+
}
|
|
1366
1477
|
function BeforeAfter({ data }) {
|
|
1367
1478
|
const [sliderPosition, setSliderPosition] = react.useState(data.default_offset || 0.5);
|
|
1368
1479
|
const [isDragging, setIsDragging] = react.useState(false);
|
|
@@ -3043,6 +3154,7 @@ var easings = {
|
|
|
3043
3154
|
exit: "cubic-bezier(0.4, 0, 1, 1)"
|
|
3044
3155
|
};
|
|
3045
3156
|
|
|
3157
|
+
exports.AuthorMeta = AuthorMeta;
|
|
3046
3158
|
exports.BeforeAfter = BeforeAfter;
|
|
3047
3159
|
exports.CTAButton = CTAButton;
|
|
3048
3160
|
exports.CaseStudyBreakdown = CaseStudyBreakdown;
|
|
@@ -3056,6 +3168,7 @@ exports.ImageGrid = ImageGrid;
|
|
|
3056
3168
|
exports.ImageGridModal = ImageGridModal;
|
|
3057
3169
|
exports.IndustryGrid = IndustryGrid;
|
|
3058
3170
|
exports.Layout = layout_exports;
|
|
3171
|
+
exports.ListCard = ListCard;
|
|
3059
3172
|
exports.MainNav = MainNav;
|
|
3060
3173
|
exports.PageHero = PageHero;
|
|
3061
3174
|
exports.Patterns = patterns_exports;
|