@bbki.ng/components 2.4.6 → 2.4.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.cjs +11 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +11 -7
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -294,7 +294,7 @@ var Nav = (props) => {
|
|
|
294
294
|
const nav = (0, import_react_router_dom2.useNavigate)();
|
|
295
295
|
return /* @__PURE__ */ import_react6.default.createElement("div", {
|
|
296
296
|
className: `p-8 w-full flex items-center ${props.className}`
|
|
297
|
-
}, /* @__PURE__ */ import_react6.default.createElement(Logo, {
|
|
297
|
+
}, props.customLogo || /* @__PURE__ */ import_react6.default.createElement(Logo, {
|
|
298
298
|
className: "mr-8",
|
|
299
299
|
onClick: () => {
|
|
300
300
|
nav("/");
|
|
@@ -1082,6 +1082,13 @@ var generateRandomColNum = (total) => {
|
|
|
1082
1082
|
}
|
|
1083
1083
|
return colNumArr;
|
|
1084
1084
|
};
|
|
1085
|
+
var sumColNumByIdx = (colNums, idx) => {
|
|
1086
|
+
let sum = 0;
|
|
1087
|
+
for (let i = 0; i < idx; i++) {
|
|
1088
|
+
sum += colNums[i];
|
|
1089
|
+
}
|
|
1090
|
+
return sum;
|
|
1091
|
+
};
|
|
1085
1092
|
var RandomRowsLayout = import_react20.default.memo(
|
|
1086
1093
|
(props) => {
|
|
1087
1094
|
const {
|
|
@@ -1091,10 +1098,6 @@ var RandomRowsLayout = import_react20.default.memo(
|
|
|
1091
1098
|
cellWrapperClsGenerator = defaultCellClsGenerator
|
|
1092
1099
|
} = props;
|
|
1093
1100
|
const colNums = generateRandomColNum(cellsCount);
|
|
1094
|
-
const indexRef = import_react20.default.useRef(0);
|
|
1095
|
-
import_react20.default.useEffect(() => {
|
|
1096
|
-
indexRef.current = 0;
|
|
1097
|
-
}, []);
|
|
1098
1101
|
return /* @__PURE__ */ import_react20.default.createElement("div", {
|
|
1099
1102
|
className: classNames8
|
|
1100
1103
|
}, colNums.map((colNum, row) => {
|
|
@@ -1106,11 +1109,12 @@ var RandomRowsLayout = import_react20.default.memo(
|
|
|
1106
1109
|
className: "flex items-center flex-wrap",
|
|
1107
1110
|
key: row
|
|
1108
1111
|
}, new Array(colNum).fill(null).map((_, col) => {
|
|
1109
|
-
indexRef.current += 1;
|
|
1110
1112
|
const generatedCls = cellWrapperClsGenerator(
|
|
1111
1113
|
colNum,
|
|
1112
1114
|
generateRandomBoolean()
|
|
1113
1115
|
);
|
|
1116
|
+
const currentIdx = sumColNumByIdx(colNums, row) + col;
|
|
1117
|
+
console.log("\u5F53\u524D\u4E0B\u6807" + currentIdx);
|
|
1114
1118
|
const cls5 = (0, import_classnames11.default)(
|
|
1115
1119
|
"flex items-center justify-center flex-shrink-0 flex-grow-0",
|
|
1116
1120
|
"basis-full",
|
|
@@ -1119,7 +1123,7 @@ var RandomRowsLayout = import_react20.default.memo(
|
|
|
1119
1123
|
return /* @__PURE__ */ import_react20.default.createElement("div", {
|
|
1120
1124
|
className: cls5,
|
|
1121
1125
|
key: col
|
|
1122
|
-
}, cellRenderer(
|
|
1126
|
+
}, cellRenderer(currentIdx, randBoolArr[col], col));
|
|
1123
1127
|
}));
|
|
1124
1128
|
}));
|
|
1125
1129
|
},
|