@bbki.ng/components 2.6.14 → 3.0.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/Button.d.ts +1 -0
- package/dist/_virtual/_commonjsHelpers.mjs +6 -0
- package/dist/_virtual/index.mjs +4 -0
- package/dist/_virtual/jsx-runtime.mjs +7 -0
- package/dist/_virtual/jsx-runtime2.mjs +4 -0
- package/dist/_virtual/react-jsx-runtime.development.mjs +4 -0
- package/dist/_virtual/react-jsx-runtime.production.min.mjs +4 -0
- package/dist/article/Article.d.ts +11 -0
- package/dist/article/Article.mjs +43 -0
- package/dist/blink-dot/BlinkDot.d.ts +5 -0
- package/dist/blink-dot/BlinkDot.mjs +20 -0
- package/dist/blur-cover/BlurCover.d.ts +6 -0
- package/dist/blur-cover/BlurCover.mjs +28 -0
- package/dist/breadcrumb/Breadcrumb.d.ts +9 -0
- package/dist/breadcrumb/Breadcrumb.mjs +35 -0
- package/dist/button/Button.d.ts +18 -0
- package/dist/button/Button.mjs +35 -0
- package/dist/canvas/Canvas.d.ts +23 -0
- package/dist/canvas/Canvas.mjs +85 -0
- package/dist/canvas/useRenderer.d.ts +10 -0
- package/dist/canvas/useRenderer.mjs +31 -0
- package/dist/context-menu/index.d.ts +27 -0
- package/dist/context-menu/index.mjs +131 -0
- package/dist/drop-image/DropImage.d.ts +25 -0
- package/dist/drop-image/DropImage.mjs +151 -0
- package/dist/drop-image/useDropImage.d.ts +19 -0
- package/dist/drop-image/useDropImage.mjs +67 -0
- package/dist/drop-image/utils.d.ts +2 -0
- package/dist/drop-image/utils.mjs +4 -0
- package/dist/drop-zone/DropZone.d.ts +9 -0
- package/dist/drop-zone/DropZone.mjs +44 -0
- package/dist/img/Gallery.d.ts +11 -0
- package/dist/img/Gallery.mjs +37 -0
- package/dist/img/Img.d.ts +3 -0
- package/dist/img/Img.mjs +80 -0
- package/dist/img/RandomRowsLayout.d.ts +9 -0
- package/dist/img/RandomRowsLayout.mjs +49 -0
- package/dist/img/types.d.ts +21 -0
- package/dist/img/types.mjs +4 -0
- package/dist/img/utils.d.ts +7 -0
- package/dist/img/utils.mjs +15 -0
- package/dist/index.d.ts +25 -380
- package/dist/index.mjs +79 -0
- package/dist/input/index.d.ts +3 -0
- package/dist/input/index.mjs +17 -0
- package/dist/label/index.d.ts +5 -0
- package/dist/label/index.mjs +17 -0
- package/dist/layout/layout.d.ts +7 -0
- package/dist/layout/layout.mjs +27 -0
- package/dist/link/Link.d.ts +17 -0
- package/dist/link/Link.mjs +83 -0
- package/dist/list/list.d.ts +23 -0
- package/dist/list/list.mjs +76 -0
- package/dist/loading-spiral/LoadingSpiral.d.ts +5 -0
- package/dist/loading-spiral/LoadingSpiral.mjs +37 -0
- package/dist/loading-spiral/constants.d.ts +6 -0
- package/dist/loading-spiral/constants.mjs +61 -0
- package/dist/loading-spiral/createOptions.d.ts +17 -0
- package/dist/loading-spiral/createOptions.mjs +30 -0
- package/dist/loading-spiral/createSettings.d.ts +16 -0
- package/dist/loading-spiral/createSettings.mjs +21 -0
- package/dist/loading-spiral/useCanvasRef.d.ts +4 -0
- package/dist/loading-spiral/utils.d.ts +1 -0
- package/dist/logo/Logo.d.ts +6 -0
- package/dist/logo/Logo.mjs +36 -0
- package/dist/nav/Nav.d.ts +10 -0
- package/dist/nav/Nav.mjs +27 -0
- package/dist/node_modules/.pnpm/@babel_runtime@7.18.9/node_modules/@babel/runtime/helpers/esm/extends.mjs +13 -0
- package/dist/node_modules/.pnpm/@floating-ui_core@1.6.0/node_modules/@floating-ui/core/dist/floating-ui.core.mjs +519 -0
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.6.3/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs +373 -0
- package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.0.8_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs +182 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.1/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs +108 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.1/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs +120 -0
- package/dist/node_modules/.pnpm/@radix-ui_primitive@1.0.1/node_modules/@radix-ui/primitive/dist/index.mjs +9 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-arrow@1.0.3_@types_react-dom@18.0.6_@types_react@18.0.15_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-arrow/dist/index.mjs +19 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-collection@1.0.3_@types_react-dom@18.0.6_@types_react@18.0.15_react-dom_04e7d2b59cf7ec97f40d26a998d7601d/node_modules/@radix-ui/react-collection/dist/index.mjs +60 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-compose-refs@1.0.1_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.mjs +16 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-compose-refs@1.1.1_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.mjs +25 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-context-menu@2.1.5_@types_react-dom@18.0.6_@types_react@18.0.15_react-d_1ce4db5e792f73d797e22c043cc3d326/node_modules/@radix-ui/react-context-menu/dist/index.mjs +213 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-context@1.0.1_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-context/dist/index.mjs +88 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-direction@1.0.1_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-direction/dist/index.mjs +9 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.0.5_@types_react-dom@18.0.6_@types_react@18.0.15_re_0263a24376d55e4c2bb8fa2f75f1db3c/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs +136 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-focus-guards@1.0.1_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-focus-guards/dist/index.mjs +20 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-focus-scope@1.0.4_@types_react-dom@18.0.6_@types_react@18.0.15_react-do_a79d961df31bbecb3b2c94878dbb0724/node_modules/@radix-ui/react-focus-scope/dist/index.mjs +188 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-icons@1.3.0_react@18.2.0/node_modules/@radix-ui/react-icons/dist/react-icons.esm.mjs +61 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-id@1.0.1_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-id/dist/index.mjs +18 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-label@2.1.1_@types_react-dom@18.0.6_@types_react@18.0.15_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-label/dist/index.mjs +20 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-menu@2.0.6_@types_react-dom@18.0.6_@types_react@18.0.15_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-menu/dist/index.mjs +657 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-popper@1.1.3_@types_react-dom@18.0.6_@types_react@18.0.15_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-popper/dist/index.mjs +218 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-portal@1.0.4_@types_react-dom@18.0.6_@types_react@18.0.15_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-portal/dist/index.mjs +14 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-presence@1.0.1_@types_react-dom@18.0.6_@types_react@18.0.15_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-presence/dist/index.mjs +81 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-primitive@1.0.3_@types_react-dom@18.0.6_@types_react@18.0.15_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-primitive/dist/index.mjs +44 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.0.1_@types_react-dom@18.0.6_@types_react@18.0.15_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-primitive/dist/index.mjs +31 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-roving-focus@1.0.4_@types_react-dom@18.0.6_@types_react@18.0.15_react-d_69cf2e3e4b4e2c2fefdb8ea262543b5e/node_modules/@radix-ui/react-roving-focus/dist/index.mjs +199 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-slot@1.0.2_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-slot/dist/index.mjs +53 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-slot@1.1.1_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-slot/dist/index.mjs +48 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.0.1_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs +16 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.0.1_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs +37 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-escape-keydown@1.0.3_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs +17 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.0.1_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs +6 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-size@1.0.1_@types_react@18.0.15_react@18.2.0/node_modules/@radix-ui/react-use-size/dist/index.mjs +37 -0
- package/dist/node_modules/.pnpm/aria-hidden@1.2.3/node_modules/aria-hidden/dist/es2015/index.mjs +49 -0
- package/dist/node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.mjs +6 -0
- package/dist/node_modules/.pnpm/classnames@2.3.1/node_modules/classnames/index.mjs +40 -0
- package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs +23 -0
- package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.mjs +7 -0
- package/dist/node_modules/.pnpm/phenomenon@1.6.0/node_modules/phenomenon/dist/phenomenon.mjs +109 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.5_@types_react@18.0.15_react@18.2.0/node_modules/react-remove-scroll-bar/dist/es2015/component.mjs +61 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.5_@types_react@18.0.15_react@18.2.0/node_modules/react-remove-scroll-bar/dist/es2015/constants.mjs +7 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.5_@types_react@18.0.15_react@18.2.0/node_modules/react-remove-scroll-bar/dist/es2015/utils.mjs +25 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.5.5_@types_react@18.0.15_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/Combination.mjs +17 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.5.5_@types_react@18.0.15_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.mjs +116 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.5.5_@types_react@18.0.15_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/UI.mjs +46 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.5.5_@types_react@18.0.15_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.mjs +16 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.5.5_@types_react@18.0.15_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/handleScroll.mjs +62 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.5.5_@types_react@18.0.15_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/medium.mjs +5 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.5.5_@types_react@18.0.15_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/sidecar.mjs +7 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.1_@types_react@18.0.15_react@18.2.0/node_modules/react-style-singleton/dist/es2015/component.mjs +11 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.1_@types_react@18.0.15_react@18.2.0/node_modules/react-style-singleton/dist/es2015/hook.mjs +15 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.1_@types_react@18.0.15_react@18.2.0/node_modules/react-style-singleton/dist/es2015/singleton.mjs +30 -0
- package/dist/node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react-jsx-runtime.development.mjs +589 -0
- package/dist/node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react-jsx-runtime.production.min.mjs +32 -0
- package/dist/node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.mjs +8 -0
- package/dist/node_modules/.pnpm/tslib@2.4.1/node_modules/tslib/tslib.es6.mjs +29 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.1_@types_react@18.0.15_react@18.2.0/node_modules/use-callback-ref/dist/es2015/assignRef.mjs +6 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.1_@types_react@18.0.15_react@18.2.0/node_modules/use-callback-ref/dist/es2015/useMergeRef.mjs +26 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.1_@types_react@18.0.15_react@18.2.0/node_modules/use-callback-ref/dist/es2015/useRef.mjs +25 -0
- package/dist/node_modules/.pnpm/use-sidecar@1.1.2_@types_react@18.0.15_react@18.2.0/node_modules/use-sidecar/dist/es2015/exports.mjs +21 -0
- package/dist/node_modules/.pnpm/use-sidecar@1.1.2_@types_react@18.0.15_react@18.2.0/node_modules/use-sidecar/dist/es2015/medium.mjs +67 -0
- package/dist/page/Page.d.ts +28 -0
- package/dist/page/Page.mjs +67 -0
- package/dist/panel/Panel.d.ts +6 -0
- package/dist/panel/Panel.mjs +17 -0
- package/dist/pop-confirm/PopConfirm.d.ts +10 -0
- package/dist/pop-confirm/PopConfirm.mjs +40 -0
- package/dist/skeleton/Seleton.d.ts +23 -0
- package/dist/skeleton/Seleton.mjs +69 -0
- package/dist/spinner/Spinner.d.ts +7 -0
- package/dist/table/Table.d.ts +18 -0
- package/dist/table/Table.mjs +34 -0
- package/dist/tag/Tag.d.ts +10 -0
- package/dist/tag/Tag.mjs +33 -0
- package/package.json +22 -13
- package/dist/index.cjs +0 -1814
- package/dist/index.cjs.map +0 -1
- package/dist/index.css +0 -1816
- package/dist/index.css.map +0 -1
- package/dist/index.js +0 -1736
- package/dist/index.js.map +0 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { useState as u } from "react";
|
|
2
|
+
function n(c, r) {
|
|
3
|
+
var e = u(function() {
|
|
4
|
+
return {
|
|
5
|
+
// value
|
|
6
|
+
value: c,
|
|
7
|
+
// last callback
|
|
8
|
+
callback: r,
|
|
9
|
+
// "memoized" public interface
|
|
10
|
+
facade: {
|
|
11
|
+
get current() {
|
|
12
|
+
return e.value;
|
|
13
|
+
},
|
|
14
|
+
set current(a) {
|
|
15
|
+
var t = e.value;
|
|
16
|
+
t !== a && (e.value = a, e.callback(a, t));
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
})[0];
|
|
21
|
+
return e.callback = r, e.facade;
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
n as useCallbackRef
|
|
25
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { __rest as a, __assign as d } from "../../../../../tslib@2.4.1/node_modules/tslib/tslib.es6.mjs";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx as s } from "../../../../../../../_virtual/jsx-runtime.mjs";
|
|
4
|
+
var t = function(r) {
|
|
5
|
+
var e = r.sideCar, o = a(r, ["sideCar"]);
|
|
6
|
+
if (!e)
|
|
7
|
+
throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
8
|
+
var i = e.read();
|
|
9
|
+
if (!i)
|
|
10
|
+
throw new Error("Sidecar medium not found");
|
|
11
|
+
return /* @__PURE__ */ s(i, {
|
|
12
|
+
...d({}, o)
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
t.isSideCarExport = !0;
|
|
16
|
+
function u(r, e) {
|
|
17
|
+
return r.useMedium(e), t;
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
u as exportSidecar
|
|
21
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { __assign as d } from "../../../../../tslib@2.4.1/node_modules/tslib/tslib.es6.mjs";
|
|
2
|
+
function l(r) {
|
|
3
|
+
return r;
|
|
4
|
+
}
|
|
5
|
+
function h(r, t) {
|
|
6
|
+
t === void 0 && (t = l);
|
|
7
|
+
var e = [], o = !1, c = {
|
|
8
|
+
read: function() {
|
|
9
|
+
if (o)
|
|
10
|
+
throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
|
|
11
|
+
return e.length ? e[e.length - 1] : r;
|
|
12
|
+
},
|
|
13
|
+
useMedium: function(u) {
|
|
14
|
+
var n = t(u, o);
|
|
15
|
+
return e.push(n), function() {
|
|
16
|
+
e = e.filter(function(i) {
|
|
17
|
+
return i !== n;
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
},
|
|
21
|
+
assignSyncMedium: function(u) {
|
|
22
|
+
for (o = !0; e.length; ) {
|
|
23
|
+
var n = e;
|
|
24
|
+
e = [], n.forEach(u);
|
|
25
|
+
}
|
|
26
|
+
e = {
|
|
27
|
+
push: function(i) {
|
|
28
|
+
return u(i);
|
|
29
|
+
},
|
|
30
|
+
filter: function() {
|
|
31
|
+
return e;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
},
|
|
35
|
+
assignMedium: function(u) {
|
|
36
|
+
o = !0;
|
|
37
|
+
var n = [];
|
|
38
|
+
if (e.length) {
|
|
39
|
+
var i = e;
|
|
40
|
+
e = [], i.forEach(u), n = e;
|
|
41
|
+
}
|
|
42
|
+
var s = function() {
|
|
43
|
+
var f = n;
|
|
44
|
+
n = [], f.forEach(u);
|
|
45
|
+
}, a = function() {
|
|
46
|
+
return Promise.resolve().then(s);
|
|
47
|
+
};
|
|
48
|
+
a(), e = {
|
|
49
|
+
push: function(f) {
|
|
50
|
+
n.push(f), a();
|
|
51
|
+
},
|
|
52
|
+
filter: function(f) {
|
|
53
|
+
return n = n.filter(f), e;
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
return c;
|
|
59
|
+
}
|
|
60
|
+
function v(r) {
|
|
61
|
+
r === void 0 && (r = {});
|
|
62
|
+
var t = h(null);
|
|
63
|
+
return t.options = d({ async: !0, ssr: !1 }, r), t;
|
|
64
|
+
}
|
|
65
|
+
export {
|
|
66
|
+
v as createSidecarMedium
|
|
67
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { default as React, ReactElement } from 'react';
|
|
2
|
+
declare type PageProps = {
|
|
3
|
+
nav: ReactElement;
|
|
4
|
+
main: ReactElement;
|
|
5
|
+
};
|
|
6
|
+
export declare const Page: (props: PageProps) => JSX.Element;
|
|
7
|
+
export declare const NotFound: (props: {
|
|
8
|
+
children?: any;
|
|
9
|
+
}) => JSX.Element;
|
|
10
|
+
export declare const Error: (props: {
|
|
11
|
+
error: Error;
|
|
12
|
+
}) => JSX.Element;
|
|
13
|
+
export declare class ErrorBoundary extends React.Component<{
|
|
14
|
+
children: any;
|
|
15
|
+
}, {
|
|
16
|
+
error?: Error;
|
|
17
|
+
hasError: boolean;
|
|
18
|
+
}> {
|
|
19
|
+
constructor(props: {
|
|
20
|
+
children: any;
|
|
21
|
+
});
|
|
22
|
+
static getDerivedStateFromError(error: Error): {
|
|
23
|
+
hasError: boolean;
|
|
24
|
+
error: Error;
|
|
25
|
+
};
|
|
26
|
+
render(): any;
|
|
27
|
+
}
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import n from "react";
|
|
2
|
+
import { Article as i } from "../article/Article.mjs";
|
|
3
|
+
import { jsx as e, jsxs as t } from "../_virtual/jsx-runtime.mjs";
|
|
4
|
+
const h = (s) => {
|
|
5
|
+
const {
|
|
6
|
+
nav: r,
|
|
7
|
+
main: a
|
|
8
|
+
} = s;
|
|
9
|
+
return /* @__PURE__ */ t("main", {
|
|
10
|
+
className: "flex flex-col h-full",
|
|
11
|
+
children: [/* @__PURE__ */ e("div", {
|
|
12
|
+
className: "flx-grow-0 w-full fixed top-0 z-50",
|
|
13
|
+
children: r
|
|
14
|
+
}), /* @__PURE__ */ e("section", {
|
|
15
|
+
className: "grow shrink-0 px-6",
|
|
16
|
+
children: a
|
|
17
|
+
})]
|
|
18
|
+
});
|
|
19
|
+
}, m = (s) => /* @__PURE__ */ e(o, {
|
|
20
|
+
error: {
|
|
21
|
+
name: "404",
|
|
22
|
+
message: "Not Found"
|
|
23
|
+
}
|
|
24
|
+
}), o = (s) => {
|
|
25
|
+
const {
|
|
26
|
+
error: r
|
|
27
|
+
} = s;
|
|
28
|
+
return /* @__PURE__ */ e("div", {
|
|
29
|
+
className: "prose",
|
|
30
|
+
children: /* @__PURE__ */ e("pre", {
|
|
31
|
+
children: /* @__PURE__ */ t("code", {
|
|
32
|
+
className: "javascript language-javascript",
|
|
33
|
+
children: [r.name, ":", r.message]
|
|
34
|
+
})
|
|
35
|
+
})
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
class p extends n.Component {
|
|
39
|
+
constructor(r) {
|
|
40
|
+
super(r), this.state = {
|
|
41
|
+
hasError: !1
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
static getDerivedStateFromError(r) {
|
|
45
|
+
return {
|
|
46
|
+
hasError: !0,
|
|
47
|
+
error: r
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
render() {
|
|
51
|
+
return this.state.error && this.state.hasError ? /* @__PURE__ */ e(i, {
|
|
52
|
+
title: "出错",
|
|
53
|
+
children: /* @__PURE__ */ e("div", {
|
|
54
|
+
className: "relative h-256",
|
|
55
|
+
children: /* @__PURE__ */ e(o, {
|
|
56
|
+
error: this.state.error
|
|
57
|
+
})
|
|
58
|
+
})
|
|
59
|
+
}) : this.props.children;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
export {
|
|
63
|
+
o as Error,
|
|
64
|
+
p as ErrorBoundary,
|
|
65
|
+
m as NotFound,
|
|
66
|
+
h as Page
|
|
67
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { useState as n, useEffect as r } from "react";
|
|
2
|
+
import { jsx as i } from "../_virtual/jsx-runtime.mjs";
|
|
3
|
+
const m = (e) => {
|
|
4
|
+
const {
|
|
5
|
+
className: s = "",
|
|
6
|
+
children: t
|
|
7
|
+
} = e, [o, a] = n(!1);
|
|
8
|
+
return r(() => {
|
|
9
|
+
a(!0);
|
|
10
|
+
}, []), /* @__PURE__ */ i("div", {
|
|
11
|
+
className: `transition-all ease-in-out duration-900 ${s} ${o ? "shadow-panel" : "shadow-empty"} p-32`,
|
|
12
|
+
children: t
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
m as Panel
|
|
17
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React, EventHandler } from 'react';
|
|
2
|
+
export declare type PopConfirmProps = {
|
|
3
|
+
onOk?: EventHandler<React.MouseEvent<HTMLButtonElement>> | (() => Promise<void>);
|
|
4
|
+
onCancel?: EventHandler<React.MouseEvent<HTMLButtonElement>>;
|
|
5
|
+
className?: string;
|
|
6
|
+
content?: any;
|
|
7
|
+
children?: any;
|
|
8
|
+
width?: number;
|
|
9
|
+
};
|
|
10
|
+
export declare const PopConfirm: (props: PopConfirmProps) => JSX.Element;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { useState as f } from "react";
|
|
2
|
+
import { Button as r, ButtonType as e } from "../button/Button.mjs";
|
|
3
|
+
import { Panel as h } from "../panel/Panel.mjs";
|
|
4
|
+
import { BlinkDot as u } from "../blink-dot/BlinkDot.mjs";
|
|
5
|
+
import { jsxs as t, jsx as o } from "../_virtual/jsx-runtime.mjs";
|
|
6
|
+
const B = (s) => {
|
|
7
|
+
const [n, l] = f(!1), {
|
|
8
|
+
onOk: a,
|
|
9
|
+
onCancel: i,
|
|
10
|
+
children: c,
|
|
11
|
+
content: m,
|
|
12
|
+
className: d
|
|
13
|
+
} = s;
|
|
14
|
+
return /* @__PURE__ */ t(h, {
|
|
15
|
+
className: d,
|
|
16
|
+
children: [/* @__PURE__ */ o("div", {
|
|
17
|
+
className: "mb-32",
|
|
18
|
+
children: c || m
|
|
19
|
+
}), /* @__PURE__ */ t("div", {
|
|
20
|
+
className: "flex justify-end",
|
|
21
|
+
children: [i && /* @__PURE__ */ o(r, {
|
|
22
|
+
onClick: i,
|
|
23
|
+
type: e.NORMAL,
|
|
24
|
+
children: "Cancel"
|
|
25
|
+
}), a && /* @__PURE__ */ t(r, {
|
|
26
|
+
onClick: async (p) => {
|
|
27
|
+
l(!0), await a(p), l(!1);
|
|
28
|
+
},
|
|
29
|
+
className: "ml-16 relative",
|
|
30
|
+
type: n ? e.DISABLED : e.PRIMARY,
|
|
31
|
+
children: ["OK", n && /* @__PURE__ */ o(u, {
|
|
32
|
+
className: "absolute! top-2 right-2"
|
|
33
|
+
})]
|
|
34
|
+
})]
|
|
35
|
+
})]
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
export {
|
|
39
|
+
B as PopConfirm
|
|
40
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare enum SkeletonColor {
|
|
2
|
+
BLUE = "blue",
|
|
3
|
+
RED = "red",
|
|
4
|
+
GRAY = "gray",
|
|
5
|
+
BLACK = "black"
|
|
6
|
+
}
|
|
7
|
+
export interface SkeletonProps {
|
|
8
|
+
className?: string;
|
|
9
|
+
width?: number;
|
|
10
|
+
height?: number;
|
|
11
|
+
bgColor?: SkeletonColor;
|
|
12
|
+
}
|
|
13
|
+
export interface ArticleSkeletonProps extends SkeletonProps {
|
|
14
|
+
titleLength?: number;
|
|
15
|
+
descriptionLength?: number;
|
|
16
|
+
children?: any;
|
|
17
|
+
}
|
|
18
|
+
export interface LinkListSkeletonProps extends ArticleSkeletonProps {
|
|
19
|
+
linksLength: number[];
|
|
20
|
+
}
|
|
21
|
+
export declare const Skeleton: (props: SkeletonProps) => JSX.Element;
|
|
22
|
+
export declare const ArticleSkeleton: (props: ArticleSkeletonProps) => JSX.Element;
|
|
23
|
+
export declare const LinkListSkeleton: (props: LinkListSkeletonProps) => JSX.Element;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import o from "../node_modules/.pnpm/classnames@2.3.1/node_modules/classnames/index.mjs";
|
|
2
|
+
import { Article as d } from "../article/Article.mjs";
|
|
3
|
+
import { List as c } from "../list/list.mjs";
|
|
4
|
+
import { jsx as t } from "../_virtual/jsx-runtime.mjs";
|
|
5
|
+
var g = /* @__PURE__ */ ((e) => (e.BLUE = "blue", e.RED = "red", e.GRAY = "gray", e.BLACK = "black", e))(g || {});
|
|
6
|
+
const a = {
|
|
7
|
+
blue: "bg-blue-100",
|
|
8
|
+
red: "bg-red-100",
|
|
9
|
+
gray: "bg-gray-100",
|
|
10
|
+
black: "bg-gray-200"
|
|
11
|
+
}, l = (e) => {
|
|
12
|
+
const {
|
|
13
|
+
bgColor: i = "gray",
|
|
14
|
+
width: n = 26,
|
|
15
|
+
height: r = 24,
|
|
16
|
+
className: s
|
|
17
|
+
} = e;
|
|
18
|
+
return /* @__PURE__ */ t("div", {
|
|
19
|
+
className: o(a[i], "animate-pulse", "rounded-sm", s),
|
|
20
|
+
style: {
|
|
21
|
+
width: n,
|
|
22
|
+
height: r
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}, m = (e) => {
|
|
26
|
+
const {
|
|
27
|
+
children: i,
|
|
28
|
+
titleLength: n = 0,
|
|
29
|
+
descriptionLength: r
|
|
30
|
+
} = e;
|
|
31
|
+
return /* @__PURE__ */ t(d, {
|
|
32
|
+
title: /* @__PURE__ */ t(l, {
|
|
33
|
+
width: 36 * n,
|
|
34
|
+
height: 36,
|
|
35
|
+
bgColor: "black"
|
|
36
|
+
/* BLACK */
|
|
37
|
+
}),
|
|
38
|
+
description: r && /* @__PURE__ */ t(l, {
|
|
39
|
+
width: 16 * r
|
|
40
|
+
}),
|
|
41
|
+
children: i
|
|
42
|
+
});
|
|
43
|
+
}, p = (e) => {
|
|
44
|
+
const {
|
|
45
|
+
linksLength: i,
|
|
46
|
+
...n
|
|
47
|
+
} = e, r = (s) => /* @__PURE__ */ t(l, {
|
|
48
|
+
className: "inline-block align-middle",
|
|
49
|
+
width: s * 16,
|
|
50
|
+
bgColor: "blue"
|
|
51
|
+
/* BLUE */
|
|
52
|
+
});
|
|
53
|
+
return n.titleLength ? /* @__PURE__ */ t(m, {
|
|
54
|
+
...n,
|
|
55
|
+
children: /* @__PURE__ */ t(c, {
|
|
56
|
+
items: i,
|
|
57
|
+
itemRenderer: r
|
|
58
|
+
})
|
|
59
|
+
}) : /* @__PURE__ */ t(c, {
|
|
60
|
+
items: i,
|
|
61
|
+
itemRenderer: r
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
export {
|
|
65
|
+
m as ArticleSkeleton,
|
|
66
|
+
p as LinkListSkeleton,
|
|
67
|
+
l as Skeleton,
|
|
68
|
+
g as SkeletonColor
|
|
69
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
export declare type TableProps = {
|
|
3
|
+
rowCount: number;
|
|
4
|
+
rowRenderer: (index: number) => any;
|
|
5
|
+
headerRenderer?: () => any;
|
|
6
|
+
className?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const Table: {
|
|
9
|
+
(props: TableProps): JSX.Element;
|
|
10
|
+
HCell(props: {
|
|
11
|
+
children: any;
|
|
12
|
+
style?: CSSProperties;
|
|
13
|
+
}): JSX.Element;
|
|
14
|
+
Cell(props: {
|
|
15
|
+
children: any;
|
|
16
|
+
style?: CSSProperties;
|
|
17
|
+
}): JSX.Element;
|
|
18
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as r, jsxs as o } from "../_virtual/jsx-runtime.mjs";
|
|
2
|
+
const t = (e) => {
|
|
3
|
+
const {
|
|
4
|
+
rowCount: c,
|
|
5
|
+
rowRenderer: h,
|
|
6
|
+
headerRenderer: n,
|
|
7
|
+
className: i
|
|
8
|
+
} = e, d = [];
|
|
9
|
+
for (let l = 0; l < c; l++)
|
|
10
|
+
d.push(/* @__PURE__ */ r("tr", {
|
|
11
|
+
children: h(l)
|
|
12
|
+
}, l));
|
|
13
|
+
return /* @__PURE__ */ o("table", {
|
|
14
|
+
className: i,
|
|
15
|
+
children: [n && /* @__PURE__ */ r("thead", {
|
|
16
|
+
children: /* @__PURE__ */ r("tr", {
|
|
17
|
+
children: n()
|
|
18
|
+
})
|
|
19
|
+
}), /* @__PURE__ */ r("tbody", {
|
|
20
|
+
children: d
|
|
21
|
+
})]
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
t.HCell = (e) => /* @__PURE__ */ r("th", {
|
|
25
|
+
...e,
|
|
26
|
+
children: e.children
|
|
27
|
+
});
|
|
28
|
+
t.Cell = (e) => /* @__PURE__ */ r("td", {
|
|
29
|
+
...e,
|
|
30
|
+
children: e.children
|
|
31
|
+
});
|
|
32
|
+
export {
|
|
33
|
+
t as Table
|
|
34
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LinkProps } from '../link/Link';
|
|
2
|
+
export interface TagProps extends Pick<LinkProps, "to" | "children" | "className" | "external" | "status" | "readonly"> {
|
|
3
|
+
prefix?: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const Tag: (props: TagProps) => JSX.Element;
|
|
7
|
+
export declare const Tags: (props: {
|
|
8
|
+
tags: TagProps[];
|
|
9
|
+
className?: string;
|
|
10
|
+
}) => JSX.Element;
|
package/dist/tag/Tag.mjs
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import o from "../node_modules/.pnpm/classnames@2.3.1/node_modules/classnames/index.mjs";
|
|
2
|
+
import { Link as l, LinkColor as m } from "../link/Link.mjs";
|
|
3
|
+
import { jsx as t, jsxs as a } from "../_virtual/jsx-runtime.mjs";
|
|
4
|
+
import { createElement as d } from "react";
|
|
5
|
+
const f = (r) => /* @__PURE__ */ t(l, {
|
|
6
|
+
...r,
|
|
7
|
+
color: m.GRAY,
|
|
8
|
+
children: /* @__PURE__ */ a("small", {
|
|
9
|
+
children: [r.prefix || "#", r.children]
|
|
10
|
+
})
|
|
11
|
+
}), p = (r) => {
|
|
12
|
+
const {
|
|
13
|
+
tags: e,
|
|
14
|
+
className: s
|
|
15
|
+
} = r;
|
|
16
|
+
return /* @__PURE__ */ t("div", {
|
|
17
|
+
className: o(s, "inline-block"),
|
|
18
|
+
children: e.map((n, c) => {
|
|
19
|
+
const i = c === e.length - 1;
|
|
20
|
+
return /* @__PURE__ */ d(f, {
|
|
21
|
+
...n,
|
|
22
|
+
key: n.to,
|
|
23
|
+
className: o({
|
|
24
|
+
"mr-8": !i
|
|
25
|
+
})
|
|
26
|
+
});
|
|
27
|
+
})
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
f as Tag,
|
|
32
|
+
p as Tags
|
|
33
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bbki.ng/components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -10,12 +10,19 @@
|
|
|
10
10
|
"typings": "./dist/index.d.ts",
|
|
11
11
|
"exports": {
|
|
12
12
|
".": {
|
|
13
|
-
"
|
|
14
|
-
"
|
|
13
|
+
"development": "./lib/index.ts",
|
|
14
|
+
"production": "./dist/index.mjs",
|
|
15
|
+
"types": "./src/index.ts"
|
|
16
|
+
},
|
|
17
|
+
"./*": {
|
|
18
|
+
"development": "./lib/*/index.ts",
|
|
19
|
+
"production": "./dist/*.mjs",
|
|
20
|
+
"types": "./src/components/*/index.ts"
|
|
15
21
|
},
|
|
16
22
|
"./style": {
|
|
17
|
-
"
|
|
18
|
-
"
|
|
23
|
+
"development": "./lib/index.css",
|
|
24
|
+
"production": "./dist/styles/index.mjs",
|
|
25
|
+
"default": "./lib/index.css"
|
|
19
26
|
}
|
|
20
27
|
},
|
|
21
28
|
"dependencies": {
|
|
@@ -27,11 +34,8 @@
|
|
|
27
34
|
"class-variance-authority": "0.7.1",
|
|
28
35
|
"classnames": "2.3.1",
|
|
29
36
|
"phenomenon": "^1.6.0",
|
|
30
|
-
"react": "^18.2.0",
|
|
31
|
-
"react-dom": "^18.2.0",
|
|
32
37
|
"react-hook-form": "7.54.2",
|
|
33
|
-
"
|
|
34
|
-
"@bbki.ng/stylebase": "0.4.11"
|
|
38
|
+
"@bbki.ng/stylebase": "1.0.0"
|
|
35
39
|
},
|
|
36
40
|
"devDependencies": {
|
|
37
41
|
"@babel/core": "^7.18.9",
|
|
@@ -42,13 +46,18 @@
|
|
|
42
46
|
"autoprefixer": "10.4.7",
|
|
43
47
|
"babel-loader": "^8.2.5",
|
|
44
48
|
"postcss": "8.4.14",
|
|
45
|
-
"react-router-dom": "6.3.0",
|
|
46
49
|
"tailwindcss": "3.1.6",
|
|
47
50
|
"tsup": "6.2.0",
|
|
48
|
-
"typescript": "^4.6.4"
|
|
51
|
+
"typescript": "^4.6.4",
|
|
52
|
+
"vite-plugin-dts": "4.5.4"
|
|
53
|
+
},
|
|
54
|
+
"peerDependencies": {
|
|
55
|
+
"react": "^18.0.0",
|
|
56
|
+
"react-dom": "^18.0.0",
|
|
57
|
+
"react-router-dom": "6"
|
|
49
58
|
},
|
|
50
59
|
"scripts": {
|
|
51
|
-
"build": "
|
|
52
|
-
"dev": "
|
|
60
|
+
"build": "vite build",
|
|
61
|
+
"dev": "vite dev"
|
|
53
62
|
}
|
|
54
63
|
}
|