@bbki.ng/components 1.4.9 → 1.5.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/index.d.ts +17 -1
- package/dist/index.js +19 -0
- package/dist/index.mjs +18 -0
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -93,4 +93,20 @@ declare type PopConfirmProps = {
|
|
|
93
93
|
};
|
|
94
94
|
declare const PopConfirm: (props: PopConfirmProps) => JSX.Element;
|
|
95
95
|
|
|
96
|
-
|
|
96
|
+
declare type TableProps = {
|
|
97
|
+
rowCount: number;
|
|
98
|
+
rowRenderer: (index: number) => any;
|
|
99
|
+
headerRenderer?: () => any;
|
|
100
|
+
className?: string;
|
|
101
|
+
};
|
|
102
|
+
declare const Table: {
|
|
103
|
+
(props: TableProps): JSX.Element;
|
|
104
|
+
HCell(props: {
|
|
105
|
+
children: any;
|
|
106
|
+
}): JSX.Element;
|
|
107
|
+
Cell(props: {
|
|
108
|
+
children: any;
|
|
109
|
+
}): JSX.Element;
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export { Article, ArticleProps, Breadcrumb, BreadcrumbProps, Button, ButtonProps, ButtonType, Link, LinkColor, LinkProps, Logo, LogoProps, Nav, NavProps, Page, Panel, PanelProps, PathObj, PopConfirm, PopConfirmProps, Table, TableProps, Tag, TagProps, Tags };
|
package/dist/index.js
CHANGED
|
@@ -69,6 +69,7 @@ __export(src_exports, {
|
|
|
69
69
|
Page: () => Page,
|
|
70
70
|
Panel: () => Panel,
|
|
71
71
|
PopConfirm: () => PopConfirm,
|
|
72
|
+
Table: () => Table,
|
|
72
73
|
Tag: () => Tag,
|
|
73
74
|
Tags: () => Tags
|
|
74
75
|
});
|
|
@@ -306,6 +307,23 @@ var PopConfirm = (props) => {
|
|
|
306
307
|
type: "primary" /* PRIMARY */
|
|
307
308
|
}, "OK")));
|
|
308
309
|
};
|
|
310
|
+
|
|
311
|
+
// src/table/Table.tsx
|
|
312
|
+
var import_react10 = __toESM(require("react"));
|
|
313
|
+
var Table = (props) => {
|
|
314
|
+
const { rowCount, rowRenderer, headerRenderer, className } = props;
|
|
315
|
+
const rows = [];
|
|
316
|
+
for (let i = 0; i < rowCount; i++) {
|
|
317
|
+
rows.push(/* @__PURE__ */ import_react10.default.createElement("tr", {
|
|
318
|
+
key: i
|
|
319
|
+
}, rowRenderer(i)));
|
|
320
|
+
}
|
|
321
|
+
return /* @__PURE__ */ import_react10.default.createElement("table", {
|
|
322
|
+
className
|
|
323
|
+
}, headerRenderer && /* @__PURE__ */ import_react10.default.createElement("thead", null, /* @__PURE__ */ import_react10.default.createElement("tr", null, headerRenderer())), /* @__PURE__ */ import_react10.default.createElement("tbody", null, rows));
|
|
324
|
+
};
|
|
325
|
+
Table.HCell = (props) => /* @__PURE__ */ import_react10.default.createElement("th", null, props.children);
|
|
326
|
+
Table.Cell = (props) => /* @__PURE__ */ import_react10.default.createElement("td", null, props.children);
|
|
309
327
|
module.exports = __toCommonJS(src_exports);
|
|
310
328
|
// Annotate the CommonJS export names for ESM import in node:
|
|
311
329
|
0 && (module.exports = {
|
|
@@ -320,6 +338,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
320
338
|
Page,
|
|
321
339
|
Panel,
|
|
322
340
|
PopConfirm,
|
|
341
|
+
Table,
|
|
323
342
|
Tag,
|
|
324
343
|
Tags
|
|
325
344
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -263,6 +263,23 @@ var PopConfirm = (props) => {
|
|
|
263
263
|
type: "primary" /* PRIMARY */
|
|
264
264
|
}, "OK")));
|
|
265
265
|
};
|
|
266
|
+
|
|
267
|
+
// src/table/Table.tsx
|
|
268
|
+
import React11 from "react";
|
|
269
|
+
var Table = (props) => {
|
|
270
|
+
const { rowCount, rowRenderer, headerRenderer, className } = props;
|
|
271
|
+
const rows = [];
|
|
272
|
+
for (let i = 0; i < rowCount; i++) {
|
|
273
|
+
rows.push(/* @__PURE__ */ React11.createElement("tr", {
|
|
274
|
+
key: i
|
|
275
|
+
}, rowRenderer(i)));
|
|
276
|
+
}
|
|
277
|
+
return /* @__PURE__ */ React11.createElement("table", {
|
|
278
|
+
className
|
|
279
|
+
}, headerRenderer && /* @__PURE__ */ React11.createElement("thead", null, /* @__PURE__ */ React11.createElement("tr", null, headerRenderer())), /* @__PURE__ */ React11.createElement("tbody", null, rows));
|
|
280
|
+
};
|
|
281
|
+
Table.HCell = (props) => /* @__PURE__ */ React11.createElement("th", null, props.children);
|
|
282
|
+
Table.Cell = (props) => /* @__PURE__ */ React11.createElement("td", null, props.children);
|
|
266
283
|
export {
|
|
267
284
|
Article,
|
|
268
285
|
Breadcrumb,
|
|
@@ -275,6 +292,7 @@ export {
|
|
|
275
292
|
Page,
|
|
276
293
|
Panel,
|
|
277
294
|
PopConfirm,
|
|
295
|
+
Table,
|
|
278
296
|
Tag,
|
|
279
297
|
Tags
|
|
280
298
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bbki.ng/components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"classnames": "^2.3.1",
|
|
37
|
-
"react-router-dom": "5.3.0"
|
|
37
|
+
"react-router-dom": "5.3.0",
|
|
38
|
+
"@tailwindcss/typography": "^0.5.0"
|
|
38
39
|
}
|
|
39
40
|
}
|