@bbki.ng/components 1.5.21 → 1.5.22
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/index.d.ts +3 -2
- package/dist/index.js +19 -8
- package/dist/index.mjs +19 -8
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -255,11 +255,12 @@ interface RandomRowsLayoutProps {
|
|
|
255
255
|
cellRenderer: (index: number, randomBool: boolean, col: number) => React.ReactNode;
|
|
256
256
|
}
|
|
257
257
|
|
|
258
|
+
declare type ImageRenderer = (Img: ReactElement, index: number, col: number, randBool: boolean) => ReactNode;
|
|
258
259
|
interface GalleryProps extends Omit<RandomRowsLayoutProps, "classNames" | "cellsCount" | "cellRenderer"> {
|
|
259
260
|
images: ImgProps[];
|
|
260
261
|
children?: ReactNode;
|
|
261
|
-
imageRenderer?:
|
|
262
|
+
imageRenderer?: ImageRenderer;
|
|
262
263
|
}
|
|
263
264
|
declare const Gallery: (props: GalleryProps) => JSX.Element;
|
|
264
265
|
|
|
265
|
-
export { Article, ArticleProps, ArticleSkeleton, ArticleSkeletonProps, BLinkDotProps, BlinkDot, Breadcrumb, BreadcrumbProps, Button, ButtonProps, ButtonType, DropImage, Error, ErrorBoundary, Gallery, GalleryProps, ImageDropProps, ImagePreviewerProps, Img, Link, LinkColor, LinkList, LinkListProps, LinkListSkeleton, LinkListSkeletonProps, LinkProps, List, Logo, LogoProps, Nav, NavProps, NoiseCover, NoiseCoverProps, NotFound, Page, Panel, PanelProps, PathObj, PopConfirm, PopConfirmProps, Skeleton, SkeletonColor, SkeletonProps, Table, TableProps, Tag, TagProps, Tags, ThreeColLayout, TitledList, TitledListProps, listProps, threeColLayoutProps };
|
|
266
|
+
export { Article, ArticleProps, ArticleSkeleton, ArticleSkeletonProps, BLinkDotProps, BlinkDot, Breadcrumb, BreadcrumbProps, Button, ButtonProps, ButtonType, DropImage, Error, ErrorBoundary, Gallery, GalleryProps, ImageDropProps, ImagePreviewerProps, ImageRenderer, Img, Link, LinkColor, LinkList, LinkListProps, LinkListSkeleton, LinkListSkeletonProps, LinkProps, List, Logo, LogoProps, Nav, NavProps, NoiseCover, NoiseCoverProps, NotFound, Page, Panel, PanelProps, PathObj, PopConfirm, PopConfirmProps, Skeleton, SkeletonColor, SkeletonProps, Table, TableProps, Tag, TagProps, Tags, ThreeColLayout, TitledList, TitledListProps, listProps, threeColLayoutProps };
|
package/dist/index.js
CHANGED
|
@@ -1004,21 +1004,32 @@ var RandomRowsLayout = (props) => {
|
|
|
1004
1004
|
};
|
|
1005
1005
|
|
|
1006
1006
|
// src/img/Gallery.tsx
|
|
1007
|
+
var defaultImageRenderer = (img, index, col) => {
|
|
1008
|
+
return /* @__PURE__ */ import_react21.default.createElement("div", {
|
|
1009
|
+
className: (0, import_classnames12.default)("mb-256", {
|
|
1010
|
+
"md:mr-64": col === 0,
|
|
1011
|
+
"md:ml-64": col !== 0
|
|
1012
|
+
})
|
|
1013
|
+
}, img);
|
|
1014
|
+
};
|
|
1007
1015
|
var Gallery = (props) => {
|
|
1008
|
-
const _a = props, {
|
|
1016
|
+
const _a = props, {
|
|
1017
|
+
images,
|
|
1018
|
+
children,
|
|
1019
|
+
imageRenderer = defaultImageRenderer
|
|
1020
|
+
} = _a, rest = __objRest(_a, [
|
|
1021
|
+
"images",
|
|
1022
|
+
"children",
|
|
1023
|
+
"imageRenderer"
|
|
1024
|
+
]);
|
|
1009
1025
|
const renderImage = (index, isLargeImage, col) => {
|
|
1010
1026
|
const image = images[index];
|
|
1011
1027
|
if (!image) {
|
|
1012
1028
|
return null;
|
|
1013
1029
|
}
|
|
1014
|
-
return /* @__PURE__ */ import_react21.default.createElement(
|
|
1015
|
-
className: (0, import_classnames12.default)("mb-256", {
|
|
1016
|
-
"md:mr-64": col === 0,
|
|
1017
|
-
"md:ml-64": col !== 0
|
|
1018
|
-
})
|
|
1019
|
-
}, imageRenderer(/* @__PURE__ */ import_react21.default.createElement(Img, __spreadProps(__spreadValues({}, image), {
|
|
1030
|
+
return imageRenderer(/* @__PURE__ */ import_react21.default.createElement(Img, __spreadProps(__spreadValues({}, image), {
|
|
1020
1031
|
size: isLargeImage ? "large" : "normal"
|
|
1021
|
-
})))
|
|
1032
|
+
})), index, col, isLargeImage);
|
|
1022
1033
|
};
|
|
1023
1034
|
return /* @__PURE__ */ import_react21.default.createElement("div", {
|
|
1024
1035
|
className: "w-full flex justify-center"
|
package/dist/index.mjs
CHANGED
|
@@ -947,21 +947,32 @@ var RandomRowsLayout = (props) => {
|
|
|
947
947
|
};
|
|
948
948
|
|
|
949
949
|
// src/img/Gallery.tsx
|
|
950
|
+
var defaultImageRenderer = (img, index, col) => {
|
|
951
|
+
return /* @__PURE__ */ React20.createElement("div", {
|
|
952
|
+
className: classnames3("mb-256", {
|
|
953
|
+
"md:mr-64": col === 0,
|
|
954
|
+
"md:ml-64": col !== 0
|
|
955
|
+
})
|
|
956
|
+
}, img);
|
|
957
|
+
};
|
|
950
958
|
var Gallery = (props) => {
|
|
951
|
-
const _a = props, {
|
|
959
|
+
const _a = props, {
|
|
960
|
+
images,
|
|
961
|
+
children,
|
|
962
|
+
imageRenderer = defaultImageRenderer
|
|
963
|
+
} = _a, rest = __objRest(_a, [
|
|
964
|
+
"images",
|
|
965
|
+
"children",
|
|
966
|
+
"imageRenderer"
|
|
967
|
+
]);
|
|
952
968
|
const renderImage = (index, isLargeImage, col) => {
|
|
953
969
|
const image = images[index];
|
|
954
970
|
if (!image) {
|
|
955
971
|
return null;
|
|
956
972
|
}
|
|
957
|
-
return /* @__PURE__ */ React20.createElement(
|
|
958
|
-
className: classnames3("mb-256", {
|
|
959
|
-
"md:mr-64": col === 0,
|
|
960
|
-
"md:ml-64": col !== 0
|
|
961
|
-
})
|
|
962
|
-
}, imageRenderer(/* @__PURE__ */ React20.createElement(Img, __spreadProps(__spreadValues({}, image), {
|
|
973
|
+
return imageRenderer(/* @__PURE__ */ React20.createElement(Img, __spreadProps(__spreadValues({}, image), {
|
|
963
974
|
size: isLargeImage ? "large" : "normal"
|
|
964
|
-
})))
|
|
975
|
+
})), index, col, isLargeImage);
|
|
965
976
|
};
|
|
966
977
|
return /* @__PURE__ */ React20.createElement("div", {
|
|
967
978
|
className: "w-full flex justify-center"
|