@web-my-money/blocks 1.0.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/app.d.mts +454 -0
- package/dist/app.d.ts +454 -0
- package/dist/app.js +1293 -0
- package/dist/app.mjs +53 -0
- package/dist/chunk-L6OIX4DG.mjs +70 -0
- package/dist/chunk-PJO7WJ4G.mjs +10 -0
- package/dist/chunk-UM2RDUPI.mjs +1183 -0
- package/dist/chunk-X6SF4TT2.mjs +2205 -0
- package/dist/funnel.d.mts +80 -0
- package/dist/funnel.d.ts +80 -0
- package/dist/funnel.js +281 -0
- package/dist/funnel.mjs +235 -0
- package/dist/fx.d.mts +314 -0
- package/dist/fx.d.ts +314 -0
- package/dist/fx.js +1142 -0
- package/dist/fx.mjs +1084 -0
- package/dist/index-D5sr_PKq.d.mts +29 -0
- package/dist/index-D5sr_PKq.d.ts +29 -0
- package/dist/index.d.mts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +3525 -0
- package/dist/index.mjs +121 -0
- package/dist/next.d.mts +32 -0
- package/dist/next.d.ts +32 -0
- package/dist/next.js +65 -0
- package/dist/next.mjs +28 -0
- package/dist/site.d.mts +532 -0
- package/dist/site.d.ts +532 -0
- package/dist/site.js +2338 -0
- package/dist/site.mjs +77 -0
- package/package.json +93 -0
package/dist/app.mjs
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ActivityFeed,
|
|
3
|
+
AppBrand,
|
|
4
|
+
AppShell,
|
|
5
|
+
AppearanceSettings,
|
|
6
|
+
BrandFrame,
|
|
7
|
+
DashboardHeader,
|
|
8
|
+
DataSummaryCards,
|
|
9
|
+
DataTable,
|
|
10
|
+
EmptyState,
|
|
11
|
+
GlassPanel,
|
|
12
|
+
KPIRow,
|
|
13
|
+
LayoutToggle,
|
|
14
|
+
NotificationBanner,
|
|
15
|
+
PageHeader,
|
|
16
|
+
PageHeaderBanner,
|
|
17
|
+
SidebarNavigation,
|
|
18
|
+
StatCard,
|
|
19
|
+
SubTabs,
|
|
20
|
+
useActionRunner,
|
|
21
|
+
useLayoutPreference,
|
|
22
|
+
useOptimisticAction
|
|
23
|
+
} from "./chunk-UM2RDUPI.mjs";
|
|
24
|
+
import {
|
|
25
|
+
LightboxGallery,
|
|
26
|
+
Thumbnail
|
|
27
|
+
} from "./chunk-L6OIX4DG.mjs";
|
|
28
|
+
import "./chunk-PJO7WJ4G.mjs";
|
|
29
|
+
export {
|
|
30
|
+
ActivityFeed,
|
|
31
|
+
AppBrand,
|
|
32
|
+
AppShell,
|
|
33
|
+
AppearanceSettings,
|
|
34
|
+
BrandFrame,
|
|
35
|
+
DashboardHeader,
|
|
36
|
+
DataSummaryCards,
|
|
37
|
+
DataTable,
|
|
38
|
+
EmptyState,
|
|
39
|
+
GlassPanel,
|
|
40
|
+
KPIRow,
|
|
41
|
+
LayoutToggle,
|
|
42
|
+
LightboxGallery,
|
|
43
|
+
NotificationBanner,
|
|
44
|
+
PageHeader,
|
|
45
|
+
PageHeaderBanner,
|
|
46
|
+
SidebarNavigation,
|
|
47
|
+
StatCard,
|
|
48
|
+
SubTabs,
|
|
49
|
+
Thumbnail,
|
|
50
|
+
useActionRunner,
|
|
51
|
+
useLayoutPreference,
|
|
52
|
+
useOptimisticAction
|
|
53
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-PJO7WJ4G.mjs";
|
|
4
|
+
|
|
5
|
+
// src/lightbox/index.tsx
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import {
|
|
8
|
+
Lightbox,
|
|
9
|
+
LightboxContent,
|
|
10
|
+
LightboxImage,
|
|
11
|
+
LightboxNavButton,
|
|
12
|
+
LightboxCaption
|
|
13
|
+
} from "@web-my-money/primitives/lightbox";
|
|
14
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
+
function Thumbnail({ image, onClick, className }) {
|
|
16
|
+
return /* @__PURE__ */ jsx(
|
|
17
|
+
"button",
|
|
18
|
+
{
|
|
19
|
+
type: "button",
|
|
20
|
+
"data-slot": "thumbnail",
|
|
21
|
+
onClick,
|
|
22
|
+
className: cn(
|
|
23
|
+
"group relative aspect-square overflow-hidden rounded-lg border border-border outline-none focus-visible:ring-3 focus-visible:ring-ring/50",
|
|
24
|
+
className
|
|
25
|
+
),
|
|
26
|
+
children: /* @__PURE__ */ jsx(
|
|
27
|
+
"img",
|
|
28
|
+
{
|
|
29
|
+
src: image.thumbnailSrc ?? image.src,
|
|
30
|
+
alt: image.alt ?? "",
|
|
31
|
+
className: "size-full object-cover transition-transform duration-200 group-hover:scale-105",
|
|
32
|
+
loading: "lazy"
|
|
33
|
+
}
|
|
34
|
+
)
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
function LightboxGallery({ images, className, gridClassName }) {
|
|
39
|
+
const [openIndex, setOpenIndex] = React.useState(null);
|
|
40
|
+
const hasImages = images.length > 0;
|
|
41
|
+
const active = openIndex !== null ? images[openIndex] : null;
|
|
42
|
+
const goTo = (dir) => {
|
|
43
|
+
setOpenIndex((i) => {
|
|
44
|
+
if (i === null) return i;
|
|
45
|
+
return (i + dir + images.length) % images.length;
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
if (!hasImages) return null;
|
|
49
|
+
return /* @__PURE__ */ jsxs("div", { "data-slot": "lightbox-gallery", className, children: [
|
|
50
|
+
/* @__PURE__ */ jsx("div", { className: cn("grid grid-cols-2 gap-3 sm:grid-cols-3 md:grid-cols-4", gridClassName), children: images.map((image, i) => /* @__PURE__ */ jsx(Thumbnail, { image, onClick: () => setOpenIndex(i) }, image.src)) }),
|
|
51
|
+
/* @__PURE__ */ jsx(Lightbox, { open: openIndex !== null, onOpenChange: (open) => !open && setOpenIndex(null), children: /* @__PURE__ */ jsx(LightboxContent, { children: active && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
52
|
+
images.length > 1 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
53
|
+
/* @__PURE__ */ jsx(LightboxNavButton, { direction: "prev", onClick: () => goTo(-1) }),
|
|
54
|
+
/* @__PURE__ */ jsx(LightboxNavButton, { direction: "next", onClick: () => goTo(1) })
|
|
55
|
+
] }),
|
|
56
|
+
/* @__PURE__ */ jsx(LightboxImage, { src: active.src, alt: active.alt ?? "" }),
|
|
57
|
+
active.caption && /* @__PURE__ */ jsx(LightboxCaption, { children: active.caption }),
|
|
58
|
+
images.length > 1 && /* @__PURE__ */ jsxs("p", { className: "text-xs text-white/60", "aria-live": "polite", children: [
|
|
59
|
+
(openIndex ?? 0) + 1,
|
|
60
|
+
" / ",
|
|
61
|
+
images.length
|
|
62
|
+
] })
|
|
63
|
+
] }) }) })
|
|
64
|
+
] });
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export {
|
|
68
|
+
Thumbnail,
|
|
69
|
+
LightboxGallery
|
|
70
|
+
};
|