@nimblegiant/stilts 0.2.0-alpha.1 → 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 -11
- 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 -12
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/components/layout/MainNav.tsx +39 -17
- 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/styles/{styles/animations.css → animations.css} +0 -0
- /package/dist/styles/{styles/base.css → base.css} +0 -0
- /package/dist/styles/{styles/index.css → index.css} +0 -0
- /package/dist/styles/{styles/tokens.css → tokens.css} +0 -0
- /package/dist/styles/{styles/utilities.css → utilities.css} +0 -0
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,12 +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: "/contact", label: "CONTACT" }
|
|
72
|
-
];
|
|
73
71
|
const isActive = (href) => {
|
|
74
72
|
if (href === "/") return currentPath === "/";
|
|
75
73
|
return currentPath.startsWith(href);
|
|
@@ -171,7 +169,9 @@ function MainNav({ currentPath, isPortfolioPage = false }) {
|
|
|
171
169
|
"li",
|
|
172
170
|
{
|
|
173
171
|
className: `transition-all duration-300 ${isMenuOpen ? "translate-x-0 opacity-100" : "translate-x-8 opacity-0"} `,
|
|
174
|
-
style: {
|
|
172
|
+
style: {
|
|
173
|
+
transitionDelay: isMenuOpen ? `${index * 50 + 100}ms` : "0ms"
|
|
174
|
+
},
|
|
175
175
|
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
176
176
|
"a",
|
|
177
177
|
{
|
|
@@ -297,6 +297,7 @@ function TopBanner() {
|
|
|
297
297
|
// src/components/ui/index.ts
|
|
298
298
|
var ui_exports = {};
|
|
299
299
|
__export(ui_exports, {
|
|
300
|
+
AuthorMeta: () => AuthorMeta,
|
|
300
301
|
Toast: () => ToastContainer
|
|
301
302
|
});
|
|
302
303
|
var icons = {
|
|
@@ -398,6 +399,30 @@ function ToastContainer() {
|
|
|
398
399
|
}
|
|
399
400
|
);
|
|
400
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
|
+
}
|
|
401
426
|
|
|
402
427
|
// src/components/patterns/index.ts
|
|
403
428
|
var patterns_exports = {};
|
|
@@ -407,6 +432,7 @@ __export(patterns_exports, {
|
|
|
407
432
|
ContentPage: () => ContentPage,
|
|
408
433
|
FeatureShowcase: () => FeatureShowcase,
|
|
409
434
|
IndustryGrid: () => IndustryGrid,
|
|
435
|
+
ListCard: () => ListCard,
|
|
410
436
|
PageHero: () => PageHero,
|
|
411
437
|
ProcessSteps: () => ProcessSteps,
|
|
412
438
|
ProductCard: () => ProductCard,
|
|
@@ -818,9 +844,14 @@ function IndustryGrid({ industries, title, cols = 3 }) {
|
|
|
818
844
|
)) })
|
|
819
845
|
] }) });
|
|
820
846
|
}
|
|
821
|
-
function ContentPage({
|
|
847
|
+
function ContentPage({
|
|
848
|
+
title,
|
|
849
|
+
subtitle,
|
|
850
|
+
lastUpdated,
|
|
851
|
+
children
|
|
852
|
+
}) {
|
|
822
853
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
823
|
-
/* @__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: [
|
|
824
855
|
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: "mb-4 text-4xl font-bold text-[var(--color-text-primary)] md:text-5xl", children: title }),
|
|
825
856
|
subtitle && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "mb-2 text-xl text-[var(--color-text-secondary)]", children: subtitle }),
|
|
826
857
|
lastUpdated && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-[var(--color-text-muted)]", children: [
|
|
@@ -828,7 +859,7 @@ function ContentPage({ title, subtitle, lastUpdated, children }) {
|
|
|
828
859
|
lastUpdated
|
|
829
860
|
] })
|
|
830
861
|
] }) }),
|
|
831
|
-
/* @__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 }) }) })
|
|
832
863
|
] });
|
|
833
864
|
}
|
|
834
865
|
function useMultiLineTypewriter(lines, typingSpeed = 20, initialDelay = 800, isVisible = true) {
|
|
@@ -1362,6 +1393,87 @@ var FeatureShowcase = ({
|
|
|
1362
1393
|
)) })
|
|
1363
1394
|
] }) });
|
|
1364
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
|
+
}
|
|
1365
1477
|
function BeforeAfter({ data }) {
|
|
1366
1478
|
const [sliderPosition, setSliderPosition] = react.useState(data.default_offset || 0.5);
|
|
1367
1479
|
const [isDragging, setIsDragging] = react.useState(false);
|
|
@@ -3042,6 +3154,7 @@ var easings = {
|
|
|
3042
3154
|
exit: "cubic-bezier(0.4, 0, 1, 1)"
|
|
3043
3155
|
};
|
|
3044
3156
|
|
|
3157
|
+
exports.AuthorMeta = AuthorMeta;
|
|
3045
3158
|
exports.BeforeAfter = BeforeAfter;
|
|
3046
3159
|
exports.CTAButton = CTAButton;
|
|
3047
3160
|
exports.CaseStudyBreakdown = CaseStudyBreakdown;
|
|
@@ -3055,6 +3168,7 @@ exports.ImageGrid = ImageGrid;
|
|
|
3055
3168
|
exports.ImageGridModal = ImageGridModal;
|
|
3056
3169
|
exports.IndustryGrid = IndustryGrid;
|
|
3057
3170
|
exports.Layout = layout_exports;
|
|
3171
|
+
exports.ListCard = ListCard;
|
|
3058
3172
|
exports.MainNav = MainNav;
|
|
3059
3173
|
exports.PageHero = PageHero;
|
|
3060
3174
|
exports.Patterns = patterns_exports;
|