@bbki.ng/components 1.5.1 → 1.5.2

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 CHANGED
@@ -111,4 +111,16 @@ declare const Table: {
111
111
  }): JSX.Element;
112
112
  };
113
113
 
114
- 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 };
114
+ declare enum SkeletonColor {
115
+ BLUE = "blue",
116
+ RED = "red",
117
+ GRAY = "gray"
118
+ }
119
+ declare type SkeletonProps = {
120
+ width?: number;
121
+ height?: number;
122
+ bgColor?: SkeletonColor;
123
+ };
124
+ declare const Skeleton: (props: SkeletonProps) => JSX.Element;
125
+
126
+ export { Article, ArticleProps, Breadcrumb, BreadcrumbProps, Button, ButtonProps, ButtonType, Link, LinkColor, LinkProps, Logo, LogoProps, Nav, NavProps, Page, Panel, PanelProps, PathObj, PopConfirm, PopConfirmProps, Skeleton, SkeletonColor, SkeletonProps, Table, TableProps, Tag, TagProps, Tags };
package/dist/index.js CHANGED
@@ -69,6 +69,8 @@ __export(src_exports, {
69
69
  Page: () => Page,
70
70
  Panel: () => Panel,
71
71
  PopConfirm: () => PopConfirm,
72
+ Skeleton: () => Skeleton,
73
+ SkeletonColor: () => SkeletonColor,
72
74
  Table: () => Table,
73
75
  Tag: () => Tag,
74
76
  Tags: () => Tags
@@ -324,6 +326,28 @@ var Table = (props) => {
324
326
  };
325
327
  Table.HCell = (props) => /* @__PURE__ */ import_react10.default.createElement("th", __spreadValues({}, props), props.children);
326
328
  Table.Cell = (props) => /* @__PURE__ */ import_react10.default.createElement("td", __spreadValues({}, props), props.children);
329
+
330
+ // src/skeleton/Seleton.tsx
331
+ var import_classnames5 = __toESM(require("classnames"));
332
+ var import_react11 = __toESM(require("react"));
333
+ var SkeletonColor = /* @__PURE__ */ ((SkeletonColor2) => {
334
+ SkeletonColor2["BLUE"] = "blue";
335
+ SkeletonColor2["RED"] = "red";
336
+ SkeletonColor2["GRAY"] = "gray";
337
+ return SkeletonColor2;
338
+ })(SkeletonColor || {});
339
+ var COLOR_MAPPING2 = {
340
+ ["blue" /* BLUE */]: "bg-blue-100",
341
+ ["red" /* RED */]: "bg-red-100",
342
+ ["gray" /* GRAY */]: "bg-gray-100"
343
+ };
344
+ var Skeleton = (props) => {
345
+ const { bgColor = "gray" /* GRAY */, width = 26, height = 24 } = props;
346
+ return /* @__PURE__ */ import_react11.default.createElement("div", {
347
+ className: (0, import_classnames5.default)(COLOR_MAPPING2[bgColor], "animate-pulse", "rounded"),
348
+ style: { width, height }
349
+ });
350
+ };
327
351
  module.exports = __toCommonJS(src_exports);
328
352
  // Annotate the CommonJS export names for ESM import in node:
329
353
  0 && (module.exports = {
@@ -338,6 +362,8 @@ module.exports = __toCommonJS(src_exports);
338
362
  Page,
339
363
  Panel,
340
364
  PopConfirm,
365
+ Skeleton,
366
+ SkeletonColor,
341
367
  Table,
342
368
  Tag,
343
369
  Tags
package/dist/index.mjs CHANGED
@@ -280,6 +280,28 @@ var Table = (props) => {
280
280
  };
281
281
  Table.HCell = (props) => /* @__PURE__ */ React11.createElement("th", __spreadValues({}, props), props.children);
282
282
  Table.Cell = (props) => /* @__PURE__ */ React11.createElement("td", __spreadValues({}, props), props.children);
283
+
284
+ // src/skeleton/Seleton.tsx
285
+ import classNames5 from "classnames";
286
+ import React12 from "react";
287
+ var SkeletonColor = /* @__PURE__ */ ((SkeletonColor2) => {
288
+ SkeletonColor2["BLUE"] = "blue";
289
+ SkeletonColor2["RED"] = "red";
290
+ SkeletonColor2["GRAY"] = "gray";
291
+ return SkeletonColor2;
292
+ })(SkeletonColor || {});
293
+ var COLOR_MAPPING2 = {
294
+ ["blue" /* BLUE */]: "bg-blue-100",
295
+ ["red" /* RED */]: "bg-red-100",
296
+ ["gray" /* GRAY */]: "bg-gray-100"
297
+ };
298
+ var Skeleton = (props) => {
299
+ const { bgColor = "gray" /* GRAY */, width = 26, height = 24 } = props;
300
+ return /* @__PURE__ */ React12.createElement("div", {
301
+ className: classNames5(COLOR_MAPPING2[bgColor], "animate-pulse", "rounded"),
302
+ style: { width, height }
303
+ });
304
+ };
283
305
  export {
284
306
  Article,
285
307
  Breadcrumb,
@@ -292,6 +314,8 @@ export {
292
314
  Page,
293
315
  Panel,
294
316
  PopConfirm,
317
+ Skeleton,
318
+ SkeletonColor,
295
319
  Table,
296
320
  Tag,
297
321
  Tags
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbki.ng/components",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",