@sentio/ui-core 0.1.3 → 0.1.4
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.css +18 -42
- package/dist/index.css.map +1 -1
- package/dist/index.js +44 -38
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +44 -38
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +5 -5
package/dist/index.mjs
CHANGED
|
@@ -46,39 +46,41 @@ import React from "react";
|
|
|
46
46
|
import { ClipLoader } from "react-spinners";
|
|
47
47
|
import { cx as classNames2 } from "class-variance-authority";
|
|
48
48
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
49
|
-
var SpinLoading = React.forwardRef(
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
),
|
|
68
|
-
/* @__PURE__ */ jsx2("div", { className: "absolute left-[50%] top-[50%] z-[1] -translate-y-6", children: /* @__PURE__ */ jsx2(
|
|
69
|
-
ClipLoader,
|
|
70
|
-
{
|
|
71
|
-
loading,
|
|
72
|
-
color: "#3B82F6",
|
|
73
|
-
size,
|
|
74
|
-
cssOverride: {
|
|
75
|
-
borderWidth: 3
|
|
49
|
+
var SpinLoading = React.forwardRef(
|
|
50
|
+
function Spinner(args, ref) {
|
|
51
|
+
const {
|
|
52
|
+
loading = false,
|
|
53
|
+
children,
|
|
54
|
+
className,
|
|
55
|
+
size = 48,
|
|
56
|
+
showMask,
|
|
57
|
+
maskOpacity = 80
|
|
58
|
+
} = args;
|
|
59
|
+
return /* @__PURE__ */ jsxs2("div", { ref, className: classNames2("relative", className), children: [
|
|
60
|
+
showMask && loading && /* @__PURE__ */ jsx2(
|
|
61
|
+
"div",
|
|
62
|
+
{
|
|
63
|
+
className: classNames2(
|
|
64
|
+
"absolute bottom-0 left-0 right-0 top-0 z-[1]",
|
|
65
|
+
maskOpacity ? `bg-white dark:bg-sentio-gray-100/${maskOpacity}` : "dark:bg-sentio-gray-100 bg-white"
|
|
66
|
+
)
|
|
76
67
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
68
|
+
),
|
|
69
|
+
/* @__PURE__ */ jsx2("div", { className: "absolute left-[50%] top-[50%] z-[1] -translate-y-6", children: /* @__PURE__ */ jsx2(
|
|
70
|
+
ClipLoader,
|
|
71
|
+
{
|
|
72
|
+
loading,
|
|
73
|
+
color: "#3B82F6",
|
|
74
|
+
size,
|
|
75
|
+
cssOverride: {
|
|
76
|
+
borderWidth: 3
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
) }),
|
|
80
|
+
children
|
|
81
|
+
] });
|
|
82
|
+
}
|
|
83
|
+
);
|
|
82
84
|
|
|
83
85
|
// src/common/CopyButton.tsx
|
|
84
86
|
import {
|
|
@@ -406,7 +408,7 @@ var PopoverTooltip = ({
|
|
|
406
408
|
!hideArrow && placement === "bottom" && /* @__PURE__ */ jsx4(
|
|
407
409
|
"div",
|
|
408
410
|
{
|
|
409
|
-
className: "arrow dark:
|
|
411
|
+
className: "arrow dark:bg-sentio-gray-100 before:border-border-color -translate-y-[7px] bg-white before:visible before:border before:border-b-0 before:border-r-0",
|
|
410
412
|
ref: arrowRef,
|
|
411
413
|
style: {
|
|
412
414
|
left: arrowX ?? 0,
|
|
@@ -545,18 +547,22 @@ function Proccessing({ className, light }) {
|
|
|
545
547
|
/* @__PURE__ */ jsx5(
|
|
546
548
|
"circle",
|
|
547
549
|
{
|
|
548
|
-
className: light ? "opacity-5" : "opacity-10",
|
|
549
550
|
cx: "12",
|
|
550
551
|
cy: "12",
|
|
551
552
|
r: "10",
|
|
552
553
|
stroke: "currentColor",
|
|
553
|
-
strokeWidth: "4"
|
|
554
|
+
strokeWidth: "4",
|
|
555
|
+
style: {
|
|
556
|
+
opacity: light ? 0.05 : 0.1
|
|
557
|
+
}
|
|
554
558
|
}
|
|
555
559
|
),
|
|
556
560
|
/* @__PURE__ */ jsx5(
|
|
557
561
|
"path",
|
|
558
562
|
{
|
|
559
|
-
|
|
563
|
+
style: {
|
|
564
|
+
opacity: light ? 0.5 : 0.75
|
|
565
|
+
},
|
|
560
566
|
fill: "currentColor",
|
|
561
567
|
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
562
568
|
}
|
|
@@ -2046,7 +2052,7 @@ if (DOMPurify?.addHook) {
|
|
|
2046
2052
|
});
|
|
2047
2053
|
}
|
|
2048
2054
|
var renderTextWithColoredNumbers = (text) => {
|
|
2049
|
-
const numberRegex = /\b(\d+(?:\.\d+)?)\b/g;
|
|
2055
|
+
const numberRegex = /\b(\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)\b/g;
|
|
2050
2056
|
return text.replace(numberRegex, (match, number, offset2) => {
|
|
2051
2057
|
const before = text.charAt(offset2 - 1);
|
|
2052
2058
|
const after = text.charAt(offset2 + match.length);
|
|
@@ -2475,7 +2481,7 @@ function PopupMenuButton({
|
|
|
2475
2481
|
}, [menuOpen]);
|
|
2476
2482
|
let menuItems = null;
|
|
2477
2483
|
if (menuOpen && items.length > 0) {
|
|
2478
|
-
menuItems = /* @__PURE__ */ jsx20(MenuContext.Provider, { value: { selectedKey }, children: /* @__PURE__ */ jsx20("div", { ref: refs.setFloating, style: floatingStyles, children: /* @__PURE__ */ jsx20(
|
|
2484
|
+
menuItems = /* @__PURE__ */ jsx20(MenuContext.Provider, { value: { selectedKey }, children: /* @__PURE__ */ jsx20("div", { ref: refs.setFloating, style: floatingStyles, className: small ? "z-10" : "z-[100]", children: /* @__PURE__ */ jsx20(
|
|
2479
2485
|
Transition2,
|
|
2480
2486
|
{
|
|
2481
2487
|
as: Fragment5,
|