@bbki.ng/components 1.5.5 → 1.5.8
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 +36 -3
- package/dist/index.js +163 -10
- package/dist/index.mjs +163 -10
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { EventHandler, ReactElement, CSSProperties, FunctionComponent } from 'react';
|
|
1
|
+
import React, { EventHandler, ReactElement, CSSProperties, Ref, ReactNode, FunctionComponent } from 'react';
|
|
2
2
|
import { LinkProps as LinkProps$1 } from 'react-router-dom';
|
|
3
3
|
|
|
4
4
|
declare type ArticleProps = {
|
|
@@ -123,8 +123,18 @@ declare type SkeletonProps = {
|
|
|
123
123
|
};
|
|
124
124
|
declare const Skeleton: (props: SkeletonProps) => JSX.Element;
|
|
125
125
|
|
|
126
|
+
interface ImagePreviewerProps {
|
|
127
|
+
className?: string;
|
|
128
|
+
visible: boolean;
|
|
129
|
+
imageRef: Ref<HTMLImageElement>;
|
|
130
|
+
imageSrc: string;
|
|
131
|
+
imageSize: {
|
|
132
|
+
width: number;
|
|
133
|
+
height: number;
|
|
134
|
+
};
|
|
135
|
+
}
|
|
126
136
|
interface ImageDropProps<T> {
|
|
127
|
-
uploader: (file: File, img
|
|
137
|
+
uploader: (file: File, img?: HTMLImageElement) => Promise<T>;
|
|
128
138
|
onDrop?: (events: Event, file: File) => void;
|
|
129
139
|
onUploadFinish?: (result: T) => void;
|
|
130
140
|
waitTimeAfterFinish?: number;
|
|
@@ -133,7 +143,30 @@ interface ImageDropProps<T> {
|
|
|
133
143
|
dropAreaStyle?: CSSStyleDeclaration;
|
|
134
144
|
placeholder?: any;
|
|
135
145
|
className?: string;
|
|
146
|
+
ghost?: boolean;
|
|
147
|
+
children?: (props: ImagePreviewerProps) => ReactNode;
|
|
136
148
|
}
|
|
137
149
|
declare const DropImage: FunctionComponent<ImageDropProps<any>>;
|
|
138
150
|
|
|
139
|
-
|
|
151
|
+
declare type BLinkDotProps = {
|
|
152
|
+
className?: string;
|
|
153
|
+
};
|
|
154
|
+
declare const BlinkDot: (props: BLinkDotProps) => JSX.Element;
|
|
155
|
+
|
|
156
|
+
declare type threeColLayoutProps = {
|
|
157
|
+
leftRenderer?: () => ReactElement | null;
|
|
158
|
+
rightRenderer?: () => ReactElement | null;
|
|
159
|
+
middleRenderer?: () => ReactElement | null;
|
|
160
|
+
};
|
|
161
|
+
declare const ThreeColLayout: (props: threeColLayoutProps) => JSX.Element;
|
|
162
|
+
|
|
163
|
+
interface listProps {
|
|
164
|
+
className?: string;
|
|
165
|
+
compact?: boolean;
|
|
166
|
+
items: any[];
|
|
167
|
+
itemRenderer: (itemProps: any, index: number) => ReactElement;
|
|
168
|
+
horizontal?: boolean;
|
|
169
|
+
}
|
|
170
|
+
declare const List: FunctionComponent<listProps>;
|
|
171
|
+
|
|
172
|
+
export { Article, ArticleProps, BLinkDotProps, BlinkDot, Breadcrumb, BreadcrumbProps, Button, ButtonProps, ButtonType, DropImage, ImageDropProps, ImagePreviewerProps, Link, LinkColor, LinkProps, List, Logo, LogoProps, Nav, NavProps, Page, Panel, PanelProps, PathObj, PopConfirm, PopConfirmProps, Skeleton, SkeletonColor, SkeletonProps, Table, TableProps, Tag, TagProps, Tags, ThreeColLayout, listProps, threeColLayoutProps };
|
package/dist/index.js
CHANGED
|
@@ -59,12 +59,14 @@ var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
|
59
59
|
var src_exports = {};
|
|
60
60
|
__export(src_exports, {
|
|
61
61
|
Article: () => Article,
|
|
62
|
+
BlinkDot: () => BlinkDot,
|
|
62
63
|
Breadcrumb: () => Breadcrumb,
|
|
63
64
|
Button: () => Button,
|
|
64
65
|
ButtonType: () => ButtonType,
|
|
65
66
|
DropImage: () => DropImage,
|
|
66
67
|
Link: () => Link,
|
|
67
68
|
LinkColor: () => LinkColor,
|
|
69
|
+
List: () => List,
|
|
68
70
|
Logo: () => Logo,
|
|
69
71
|
Nav: () => Nav,
|
|
70
72
|
Page: () => Page,
|
|
@@ -74,7 +76,8 @@ __export(src_exports, {
|
|
|
74
76
|
SkeletonColor: () => SkeletonColor,
|
|
75
77
|
Table: () => Table,
|
|
76
78
|
Tag: () => Tag,
|
|
77
|
-
Tags: () => Tags
|
|
79
|
+
Tags: () => Tags,
|
|
80
|
+
ThreeColLayout: () => ThreeColLayout
|
|
78
81
|
});
|
|
79
82
|
|
|
80
83
|
// src/article/Article.tsx
|
|
@@ -455,6 +458,96 @@ var useDropImage = (params) => {
|
|
|
455
458
|
};
|
|
456
459
|
|
|
457
460
|
// src/drop-image/DropImage.tsx
|
|
461
|
+
var ImagePreviewer = (props) => {
|
|
462
|
+
const {
|
|
463
|
+
visible: showImagePreviewer,
|
|
464
|
+
imageRef,
|
|
465
|
+
imageSize,
|
|
466
|
+
imageSrc,
|
|
467
|
+
className
|
|
468
|
+
} = props;
|
|
469
|
+
return /* @__PURE__ */ import_react13.default.createElement("img", {
|
|
470
|
+
className: (0, import_classnames6.default)(className, "max-w-[100%]", "h-[auto]", "duration-300", "transition-opacity", "opacity-100", {
|
|
471
|
+
"opacity-0": !showImagePreviewer,
|
|
472
|
+
"!m-0": !showImagePreviewer,
|
|
473
|
+
"!p-0": !showImagePreviewer
|
|
474
|
+
}),
|
|
475
|
+
ref: imageRef,
|
|
476
|
+
src: imageSrc,
|
|
477
|
+
width: imageSize.width,
|
|
478
|
+
height: imageSize.height
|
|
479
|
+
});
|
|
480
|
+
};
|
|
481
|
+
var GhostDropImage = (props) => {
|
|
482
|
+
const {
|
|
483
|
+
onDrop = noop,
|
|
484
|
+
onUploadFinish = noop,
|
|
485
|
+
uploader,
|
|
486
|
+
waitTimeAfterFinish = 2e3,
|
|
487
|
+
className = "",
|
|
488
|
+
children,
|
|
489
|
+
placeholder
|
|
490
|
+
} = props;
|
|
491
|
+
const [coverVisible, setCoverVisible] = (0, import_react14.useState)(false);
|
|
492
|
+
const [imageVisible, setImageVisible] = (0, import_react14.useState)(false);
|
|
493
|
+
const handleDocDragEnter = (0, import_react13.useCallback)(() => {
|
|
494
|
+
setCoverVisible(true);
|
|
495
|
+
}, []);
|
|
496
|
+
const {
|
|
497
|
+
handleDragLeave,
|
|
498
|
+
handleDragOver,
|
|
499
|
+
handleDrop,
|
|
500
|
+
imageRef,
|
|
501
|
+
imageSize,
|
|
502
|
+
imageSrc,
|
|
503
|
+
reset
|
|
504
|
+
} = useDropImage({
|
|
505
|
+
onImageLoad: () => {
|
|
506
|
+
setImageVisible(true);
|
|
507
|
+
},
|
|
508
|
+
onDrop: async (e, file) => {
|
|
509
|
+
onDrop(e, file);
|
|
510
|
+
setCoverVisible(false);
|
|
511
|
+
const result = await uploader(file);
|
|
512
|
+
await wait(waitTimeAfterFinish);
|
|
513
|
+
onUploadFinish(result);
|
|
514
|
+
setImageVisible(false);
|
|
515
|
+
reset();
|
|
516
|
+
}
|
|
517
|
+
});
|
|
518
|
+
(0, import_react13.useEffect)(() => {
|
|
519
|
+
document.addEventListener("dragenter", handleDocDragEnter);
|
|
520
|
+
return () => {
|
|
521
|
+
document.removeEventListener("dragenter", handleDocDragEnter);
|
|
522
|
+
};
|
|
523
|
+
}, []);
|
|
524
|
+
const coverCls = (0, import_classnames6.default)("fixed", "top-0", "left-0", "h-full", "w-full", {
|
|
525
|
+
"lqip-blur": coverVisible,
|
|
526
|
+
"z-[999]": coverVisible,
|
|
527
|
+
block: coverVisible,
|
|
528
|
+
hidden: !coverVisible
|
|
529
|
+
});
|
|
530
|
+
return /* @__PURE__ */ import_react13.default.createElement(import_react13.default.Fragment, null, /* @__PURE__ */ import_react13.default.createElement("div", {
|
|
531
|
+
className: coverCls,
|
|
532
|
+
onDragLeave: () => {
|
|
533
|
+
handleDragLeave();
|
|
534
|
+
setCoverVisible(false);
|
|
535
|
+
},
|
|
536
|
+
onDragOver: handleDragOver,
|
|
537
|
+
onDrop: handleDrop
|
|
538
|
+
}), !imageVisible && placeholder, children ? children({
|
|
539
|
+
visible: imageVisible,
|
|
540
|
+
imageRef,
|
|
541
|
+
imageSize,
|
|
542
|
+
imageSrc
|
|
543
|
+
}) : /* @__PURE__ */ import_react13.default.createElement(ImagePreviewer, {
|
|
544
|
+
className,
|
|
545
|
+
visible: imageVisible,
|
|
546
|
+
imageRef,
|
|
547
|
+
imageSrc,
|
|
548
|
+
imageSize
|
|
549
|
+
}));
|
|
550
|
+
};
|
|
458
551
|
var DropImage = (props) => {
|
|
459
552
|
const {
|
|
460
553
|
uploader,
|
|
@@ -465,11 +558,16 @@ var DropImage = (props) => {
|
|
|
465
558
|
placeholder = "",
|
|
466
559
|
className = "",
|
|
467
560
|
onUploadFinish = noop,
|
|
561
|
+
ghost,
|
|
562
|
+
children,
|
|
468
563
|
dropAreaStyle = {
|
|
469
564
|
width: 300,
|
|
470
565
|
height: 300
|
|
471
566
|
}
|
|
472
567
|
} = props;
|
|
568
|
+
if (ghost) {
|
|
569
|
+
return /* @__PURE__ */ import_react13.default.createElement(GhostDropImage, __spreadValues({}, props));
|
|
570
|
+
}
|
|
473
571
|
const [showImagePreviewer, setShowImagePreviewer] = (0, import_react14.useState)(false);
|
|
474
572
|
const {
|
|
475
573
|
handleDragLeave,
|
|
@@ -508,26 +606,80 @@ var DropImage = (props) => {
|
|
|
508
606
|
onDragOver: handleDragOver,
|
|
509
607
|
onDrop: handleDrop,
|
|
510
608
|
style: getDropAreaStyle()
|
|
511
|
-
},
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
609
|
+
}, children ? children({
|
|
610
|
+
visible: showImagePreviewer,
|
|
611
|
+
imageRef,
|
|
612
|
+
imageSize,
|
|
613
|
+
imageSrc
|
|
614
|
+
}) : /* @__PURE__ */ import_react13.default.createElement(ImagePreviewer, {
|
|
615
|
+
visible: showImagePreviewer,
|
|
616
|
+
imageRef,
|
|
617
|
+
imageSrc,
|
|
618
|
+
imageSize
|
|
519
619
|
}), !imageSrc && placeholder);
|
|
520
620
|
};
|
|
621
|
+
|
|
622
|
+
// src/blink-dot/BlinkDot.tsx
|
|
623
|
+
var import_classnames7 = __toESM(require("classnames"));
|
|
624
|
+
var import_react15 = __toESM(require("react"));
|
|
625
|
+
var BlinkDot = (props) => {
|
|
626
|
+
const { className } = props;
|
|
627
|
+
return /* @__PURE__ */ import_react15.default.createElement("span", {
|
|
628
|
+
className: (0, import_classnames7.default)("inline-flex h-1 w-1 justify-center items-center relative", className)
|
|
629
|
+
}, /* @__PURE__ */ import_react15.default.createElement("span", {
|
|
630
|
+
className: "animate-ping-fast absolute inline-flex h-full w-full rounded-full bg-red-600"
|
|
631
|
+
}));
|
|
632
|
+
};
|
|
633
|
+
|
|
634
|
+
// src/layout/layout.tsx
|
|
635
|
+
var import_classnames8 = __toESM(require("classnames"));
|
|
636
|
+
var import_react16 = __toESM(require("react"));
|
|
637
|
+
var ThreeColLayout = (props) => {
|
|
638
|
+
const { leftRenderer, middleRenderer, rightRenderer } = props;
|
|
639
|
+
const colCls = (0, import_classnames8.default)("max-h-full overflow-auto md:block py-64");
|
|
640
|
+
return /* @__PURE__ */ import_react16.default.createElement("div", {
|
|
641
|
+
className: "grid grid-cols-1 xl:grid-cols-3 gap-4 h-full w-full"
|
|
642
|
+
}, /* @__PURE__ */ import_react16.default.createElement("div", {
|
|
643
|
+
className: (0, import_classnames8.default)("hidden", colCls)
|
|
644
|
+
}, leftRenderer && leftRenderer()), /* @__PURE__ */ import_react16.default.createElement("div", {
|
|
645
|
+
className: (0, import_classnames8.default)(colCls, "sm:px-128 xl:px-0 no-scrollbar", "relative", {
|
|
646
|
+
hidden: !middleRenderer
|
|
647
|
+
})
|
|
648
|
+
}, middleRenderer && middleRenderer()), /* @__PURE__ */ import_react16.default.createElement("div", {
|
|
649
|
+
className: (0, import_classnames8.default)("hidden", colCls)
|
|
650
|
+
}, rightRenderer && rightRenderer()));
|
|
651
|
+
};
|
|
652
|
+
|
|
653
|
+
// src/list/list.tsx
|
|
654
|
+
var import_classnames9 = __toESM(require("classnames"));
|
|
655
|
+
var import_react17 = __toESM(require("react"));
|
|
656
|
+
var List = (props) => {
|
|
657
|
+
const { items, itemRenderer, className, horizontal, compact } = props;
|
|
658
|
+
const spaceCls = compact ? "" : horizontal ? "mr-3" : "mb-4";
|
|
659
|
+
return /* @__PURE__ */ import_react17.default.createElement("ul", {
|
|
660
|
+
className: (0, import_classnames9.default)(className, "list-style-none", {
|
|
661
|
+
flex: horizontal,
|
|
662
|
+
"align-center": horizontal
|
|
663
|
+
})
|
|
664
|
+
}, items.map((item, index) => {
|
|
665
|
+
return /* @__PURE__ */ import_react17.default.createElement("li", {
|
|
666
|
+
key: item.id || index,
|
|
667
|
+
className: (0, import_classnames9.default)(spaceCls, "flex-shrink-0")
|
|
668
|
+
}, itemRenderer(item, index));
|
|
669
|
+
}));
|
|
670
|
+
};
|
|
521
671
|
module.exports = __toCommonJS(src_exports);
|
|
522
672
|
// Annotate the CommonJS export names for ESM import in node:
|
|
523
673
|
0 && (module.exports = {
|
|
524
674
|
Article,
|
|
675
|
+
BlinkDot,
|
|
525
676
|
Breadcrumb,
|
|
526
677
|
Button,
|
|
527
678
|
ButtonType,
|
|
528
679
|
DropImage,
|
|
529
680
|
Link,
|
|
530
681
|
LinkColor,
|
|
682
|
+
List,
|
|
531
683
|
Logo,
|
|
532
684
|
Nav,
|
|
533
685
|
Page,
|
|
@@ -537,5 +689,6 @@ module.exports = __toCommonJS(src_exports);
|
|
|
537
689
|
SkeletonColor,
|
|
538
690
|
Table,
|
|
539
691
|
Tag,
|
|
540
|
-
Tags
|
|
692
|
+
Tags,
|
|
693
|
+
ThreeColLayout
|
|
541
694
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -305,7 +305,10 @@ var Skeleton = (props) => {
|
|
|
305
305
|
|
|
306
306
|
// src/drop-image/DropImage.tsx
|
|
307
307
|
import cls from "classnames";
|
|
308
|
-
import React13
|
|
308
|
+
import React13, {
|
|
309
|
+
useEffect as useEffect2,
|
|
310
|
+
useCallback as useCallback2
|
|
311
|
+
} from "react";
|
|
309
312
|
import { useState as useState3 } from "react";
|
|
310
313
|
|
|
311
314
|
// src/drop-image/utils.ts
|
|
@@ -408,6 +411,96 @@ var useDropImage = (params) => {
|
|
|
408
411
|
};
|
|
409
412
|
|
|
410
413
|
// src/drop-image/DropImage.tsx
|
|
414
|
+
var ImagePreviewer = (props) => {
|
|
415
|
+
const {
|
|
416
|
+
visible: showImagePreviewer,
|
|
417
|
+
imageRef,
|
|
418
|
+
imageSize,
|
|
419
|
+
imageSrc,
|
|
420
|
+
className
|
|
421
|
+
} = props;
|
|
422
|
+
return /* @__PURE__ */ React13.createElement("img", {
|
|
423
|
+
className: cls(className, "max-w-[100%]", "h-[auto]", "duration-300", "transition-opacity", "opacity-100", {
|
|
424
|
+
"opacity-0": !showImagePreviewer,
|
|
425
|
+
"!m-0": !showImagePreviewer,
|
|
426
|
+
"!p-0": !showImagePreviewer
|
|
427
|
+
}),
|
|
428
|
+
ref: imageRef,
|
|
429
|
+
src: imageSrc,
|
|
430
|
+
width: imageSize.width,
|
|
431
|
+
height: imageSize.height
|
|
432
|
+
});
|
|
433
|
+
};
|
|
434
|
+
var GhostDropImage = (props) => {
|
|
435
|
+
const {
|
|
436
|
+
onDrop = noop,
|
|
437
|
+
onUploadFinish = noop,
|
|
438
|
+
uploader,
|
|
439
|
+
waitTimeAfterFinish = 2e3,
|
|
440
|
+
className = "",
|
|
441
|
+
children,
|
|
442
|
+
placeholder
|
|
443
|
+
} = props;
|
|
444
|
+
const [coverVisible, setCoverVisible] = useState3(false);
|
|
445
|
+
const [imageVisible, setImageVisible] = useState3(false);
|
|
446
|
+
const handleDocDragEnter = useCallback2(() => {
|
|
447
|
+
setCoverVisible(true);
|
|
448
|
+
}, []);
|
|
449
|
+
const {
|
|
450
|
+
handleDragLeave,
|
|
451
|
+
handleDragOver,
|
|
452
|
+
handleDrop,
|
|
453
|
+
imageRef,
|
|
454
|
+
imageSize,
|
|
455
|
+
imageSrc,
|
|
456
|
+
reset
|
|
457
|
+
} = useDropImage({
|
|
458
|
+
onImageLoad: () => {
|
|
459
|
+
setImageVisible(true);
|
|
460
|
+
},
|
|
461
|
+
onDrop: async (e, file) => {
|
|
462
|
+
onDrop(e, file);
|
|
463
|
+
setCoverVisible(false);
|
|
464
|
+
const result = await uploader(file);
|
|
465
|
+
await wait(waitTimeAfterFinish);
|
|
466
|
+
onUploadFinish(result);
|
|
467
|
+
setImageVisible(false);
|
|
468
|
+
reset();
|
|
469
|
+
}
|
|
470
|
+
});
|
|
471
|
+
useEffect2(() => {
|
|
472
|
+
document.addEventListener("dragenter", handleDocDragEnter);
|
|
473
|
+
return () => {
|
|
474
|
+
document.removeEventListener("dragenter", handleDocDragEnter);
|
|
475
|
+
};
|
|
476
|
+
}, []);
|
|
477
|
+
const coverCls = cls("fixed", "top-0", "left-0", "h-full", "w-full", {
|
|
478
|
+
"lqip-blur": coverVisible,
|
|
479
|
+
"z-[999]": coverVisible,
|
|
480
|
+
block: coverVisible,
|
|
481
|
+
hidden: !coverVisible
|
|
482
|
+
});
|
|
483
|
+
return /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement("div", {
|
|
484
|
+
className: coverCls,
|
|
485
|
+
onDragLeave: () => {
|
|
486
|
+
handleDragLeave();
|
|
487
|
+
setCoverVisible(false);
|
|
488
|
+
},
|
|
489
|
+
onDragOver: handleDragOver,
|
|
490
|
+
onDrop: handleDrop
|
|
491
|
+
}), !imageVisible && placeholder, children ? children({
|
|
492
|
+
visible: imageVisible,
|
|
493
|
+
imageRef,
|
|
494
|
+
imageSize,
|
|
495
|
+
imageSrc
|
|
496
|
+
}) : /* @__PURE__ */ React13.createElement(ImagePreviewer, {
|
|
497
|
+
className,
|
|
498
|
+
visible: imageVisible,
|
|
499
|
+
imageRef,
|
|
500
|
+
imageSrc,
|
|
501
|
+
imageSize
|
|
502
|
+
}));
|
|
503
|
+
};
|
|
411
504
|
var DropImage = (props) => {
|
|
412
505
|
const {
|
|
413
506
|
uploader,
|
|
@@ -418,11 +511,16 @@ var DropImage = (props) => {
|
|
|
418
511
|
placeholder = "",
|
|
419
512
|
className = "",
|
|
420
513
|
onUploadFinish = noop,
|
|
514
|
+
ghost,
|
|
515
|
+
children,
|
|
421
516
|
dropAreaStyle = {
|
|
422
517
|
width: 300,
|
|
423
518
|
height: 300
|
|
424
519
|
}
|
|
425
520
|
} = props;
|
|
521
|
+
if (ghost) {
|
|
522
|
+
return /* @__PURE__ */ React13.createElement(GhostDropImage, __spreadValues({}, props));
|
|
523
|
+
}
|
|
426
524
|
const [showImagePreviewer, setShowImagePreviewer] = useState3(false);
|
|
427
525
|
const {
|
|
428
526
|
handleDragLeave,
|
|
@@ -461,24 +559,78 @@ var DropImage = (props) => {
|
|
|
461
559
|
onDragOver: handleDragOver,
|
|
462
560
|
onDrop: handleDrop,
|
|
463
561
|
style: getDropAreaStyle()
|
|
464
|
-
},
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
562
|
+
}, children ? children({
|
|
563
|
+
visible: showImagePreviewer,
|
|
564
|
+
imageRef,
|
|
565
|
+
imageSize,
|
|
566
|
+
imageSrc
|
|
567
|
+
}) : /* @__PURE__ */ React13.createElement(ImagePreviewer, {
|
|
568
|
+
visible: showImagePreviewer,
|
|
569
|
+
imageRef,
|
|
570
|
+
imageSrc,
|
|
571
|
+
imageSize
|
|
472
572
|
}), !imageSrc && placeholder);
|
|
473
573
|
};
|
|
574
|
+
|
|
575
|
+
// src/blink-dot/BlinkDot.tsx
|
|
576
|
+
import classNames6 from "classnames";
|
|
577
|
+
import React14 from "react";
|
|
578
|
+
var BlinkDot = (props) => {
|
|
579
|
+
const { className } = props;
|
|
580
|
+
return /* @__PURE__ */ React14.createElement("span", {
|
|
581
|
+
className: classNames6("inline-flex h-1 w-1 justify-center items-center relative", className)
|
|
582
|
+
}, /* @__PURE__ */ React14.createElement("span", {
|
|
583
|
+
className: "animate-ping-fast absolute inline-flex h-full w-full rounded-full bg-red-600"
|
|
584
|
+
}));
|
|
585
|
+
};
|
|
586
|
+
|
|
587
|
+
// src/layout/layout.tsx
|
|
588
|
+
import cls2 from "classnames";
|
|
589
|
+
import React15 from "react";
|
|
590
|
+
var ThreeColLayout = (props) => {
|
|
591
|
+
const { leftRenderer, middleRenderer, rightRenderer } = props;
|
|
592
|
+
const colCls = cls2("max-h-full overflow-auto md:block py-64");
|
|
593
|
+
return /* @__PURE__ */ React15.createElement("div", {
|
|
594
|
+
className: "grid grid-cols-1 xl:grid-cols-3 gap-4 h-full w-full"
|
|
595
|
+
}, /* @__PURE__ */ React15.createElement("div", {
|
|
596
|
+
className: cls2("hidden", colCls)
|
|
597
|
+
}, leftRenderer && leftRenderer()), /* @__PURE__ */ React15.createElement("div", {
|
|
598
|
+
className: cls2(colCls, "sm:px-128 xl:px-0 no-scrollbar", "relative", {
|
|
599
|
+
hidden: !middleRenderer
|
|
600
|
+
})
|
|
601
|
+
}, middleRenderer && middleRenderer()), /* @__PURE__ */ React15.createElement("div", {
|
|
602
|
+
className: cls2("hidden", colCls)
|
|
603
|
+
}, rightRenderer && rightRenderer()));
|
|
604
|
+
};
|
|
605
|
+
|
|
606
|
+
// src/list/list.tsx
|
|
607
|
+
import cls3 from "classnames";
|
|
608
|
+
import React16 from "react";
|
|
609
|
+
var List = (props) => {
|
|
610
|
+
const { items, itemRenderer, className, horizontal, compact } = props;
|
|
611
|
+
const spaceCls = compact ? "" : horizontal ? "mr-3" : "mb-4";
|
|
612
|
+
return /* @__PURE__ */ React16.createElement("ul", {
|
|
613
|
+
className: cls3(className, "list-style-none", {
|
|
614
|
+
flex: horizontal,
|
|
615
|
+
"align-center": horizontal
|
|
616
|
+
})
|
|
617
|
+
}, items.map((item, index) => {
|
|
618
|
+
return /* @__PURE__ */ React16.createElement("li", {
|
|
619
|
+
key: item.id || index,
|
|
620
|
+
className: cls3(spaceCls, "flex-shrink-0")
|
|
621
|
+
}, itemRenderer(item, index));
|
|
622
|
+
}));
|
|
623
|
+
};
|
|
474
624
|
export {
|
|
475
625
|
Article,
|
|
626
|
+
BlinkDot,
|
|
476
627
|
Breadcrumb,
|
|
477
628
|
Button,
|
|
478
629
|
ButtonType,
|
|
479
630
|
DropImage,
|
|
480
631
|
Link,
|
|
481
632
|
LinkColor,
|
|
633
|
+
List,
|
|
482
634
|
Logo,
|
|
483
635
|
Nav,
|
|
484
636
|
Page,
|
|
@@ -488,5 +640,6 @@ export {
|
|
|
488
640
|
SkeletonColor,
|
|
489
641
|
Table,
|
|
490
642
|
Tag,
|
|
491
|
-
Tags
|
|
643
|
+
Tags,
|
|
644
|
+
ThreeColLayout
|
|
492
645
|
};
|