@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.js
CHANGED
|
@@ -132,39 +132,41 @@ var import_react2 = __toESM(require("react"));
|
|
|
132
132
|
var import_react_spinners2 = require("react-spinners");
|
|
133
133
|
var import_class_variance_authority2 = require("class-variance-authority");
|
|
134
134
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
135
|
-
var SpinLoading = import_react2.default.forwardRef(
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
),
|
|
154
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "absolute left-[50%] top-[50%] z-[1] -translate-y-6", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
155
|
-
import_react_spinners2.ClipLoader,
|
|
156
|
-
{
|
|
157
|
-
loading,
|
|
158
|
-
color: "#3B82F6",
|
|
159
|
-
size,
|
|
160
|
-
cssOverride: {
|
|
161
|
-
borderWidth: 3
|
|
135
|
+
var SpinLoading = import_react2.default.forwardRef(
|
|
136
|
+
function Spinner(args, ref) {
|
|
137
|
+
const {
|
|
138
|
+
loading = false,
|
|
139
|
+
children,
|
|
140
|
+
className,
|
|
141
|
+
size = 48,
|
|
142
|
+
showMask,
|
|
143
|
+
maskOpacity = 80
|
|
144
|
+
} = args;
|
|
145
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { ref, className: (0, import_class_variance_authority2.cx)("relative", className), children: [
|
|
146
|
+
showMask && loading && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
147
|
+
"div",
|
|
148
|
+
{
|
|
149
|
+
className: (0, import_class_variance_authority2.cx)(
|
|
150
|
+
"absolute bottom-0 left-0 right-0 top-0 z-[1]",
|
|
151
|
+
maskOpacity ? `bg-white dark:bg-sentio-gray-100/${maskOpacity}` : "dark:bg-sentio-gray-100 bg-white"
|
|
152
|
+
)
|
|
162
153
|
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
154
|
+
),
|
|
155
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "absolute left-[50%] top-[50%] z-[1] -translate-y-6", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
156
|
+
import_react_spinners2.ClipLoader,
|
|
157
|
+
{
|
|
158
|
+
loading,
|
|
159
|
+
color: "#3B82F6",
|
|
160
|
+
size,
|
|
161
|
+
cssOverride: {
|
|
162
|
+
borderWidth: 3
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
) }),
|
|
166
|
+
children
|
|
167
|
+
] });
|
|
168
|
+
}
|
|
169
|
+
);
|
|
168
170
|
|
|
169
171
|
// src/common/CopyButton.tsx
|
|
170
172
|
var import_react3 = require("react");
|
|
@@ -475,7 +477,7 @@ var PopoverTooltip = ({
|
|
|
475
477
|
!hideArrow && placement === "bottom" && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
476
478
|
"div",
|
|
477
479
|
{
|
|
478
|
-
className: "arrow dark:
|
|
480
|
+
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",
|
|
479
481
|
ref: arrowRef,
|
|
480
482
|
style: {
|
|
481
483
|
left: arrowX ?? 0,
|
|
@@ -614,18 +616,22 @@ function Proccessing({ className, light }) {
|
|
|
614
616
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
615
617
|
"circle",
|
|
616
618
|
{
|
|
617
|
-
className: light ? "opacity-5" : "opacity-10",
|
|
618
619
|
cx: "12",
|
|
619
620
|
cy: "12",
|
|
620
621
|
r: "10",
|
|
621
622
|
stroke: "currentColor",
|
|
622
|
-
strokeWidth: "4"
|
|
623
|
+
strokeWidth: "4",
|
|
624
|
+
style: {
|
|
625
|
+
opacity: light ? 0.05 : 0.1
|
|
626
|
+
}
|
|
623
627
|
}
|
|
624
628
|
),
|
|
625
629
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
626
630
|
"path",
|
|
627
631
|
{
|
|
628
|
-
|
|
632
|
+
style: {
|
|
633
|
+
opacity: light ? 0.5 : 0.75
|
|
634
|
+
},
|
|
629
635
|
fill: "currentColor",
|
|
630
636
|
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"
|
|
631
637
|
}
|
|
@@ -2095,7 +2101,7 @@ if (import_dompurify.default?.addHook) {
|
|
|
2095
2101
|
});
|
|
2096
2102
|
}
|
|
2097
2103
|
var renderTextWithColoredNumbers = (text) => {
|
|
2098
|
-
const numberRegex = /\b(\d+(?:\.\d+)?)\b/g;
|
|
2104
|
+
const numberRegex = /\b(\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)\b/g;
|
|
2099
2105
|
return text.replace(numberRegex, (match, number, offset2) => {
|
|
2100
2106
|
const before = text.charAt(offset2 - 1);
|
|
2101
2107
|
const after = text.charAt(offset2 + match.length);
|
|
@@ -2485,7 +2491,7 @@ function PopupMenuButton({
|
|
|
2485
2491
|
}, [menuOpen]);
|
|
2486
2492
|
let menuItems = null;
|
|
2487
2493
|
if (menuOpen && items.length > 0) {
|
|
2488
|
-
menuItems = /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(MenuContext.Provider, { value: { selectedKey }, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { ref: refs.setFloating, style: floatingStyles, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2494
|
+
menuItems = /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(MenuContext.Provider, { value: { selectedKey }, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { ref: refs.setFloating, style: floatingStyles, className: small ? "z-10" : "z-[100]", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2489
2495
|
import_react29.Transition,
|
|
2490
2496
|
{
|
|
2491
2497
|
as: import_react28.Fragment,
|