@sentio/ui-core 0.1.0 → 0.1.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/README.md +35 -99
- package/dist/index.css +3 -21
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +37 -28
- package/dist/index.d.ts +37 -28
- package/dist/index.js +26 -25
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +28 -26
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +13 -1
package/dist/index.mjs
CHANGED
|
@@ -405,7 +405,7 @@ var PopoverTooltip = ({
|
|
|
405
405
|
!hideArrow && placement === "bottom" && /* @__PURE__ */ jsx4(
|
|
406
406
|
"div",
|
|
407
407
|
{
|
|
408
|
-
className: "arrow -translate-y-[5px] before:absolute before:h-2 before:w-2 before:rotate-45 before:
|
|
408
|
+
className: "arrow dark:before:bg-sentio-gray-200 -translate-y-[5px] before:absolute before:h-2 before:w-2 before:rotate-45 before:border-l before:border-t before:border-black/5 before:bg-white dark:before:border-gray-100",
|
|
409
409
|
ref: arrowRef,
|
|
410
410
|
style: {
|
|
411
411
|
left: arrowX ?? 0,
|
|
@@ -420,16 +420,7 @@ var PopoverTooltip = ({
|
|
|
420
420
|
className: classNames4("w-max whitespace-pre-wrap", maxWidth),
|
|
421
421
|
children: text
|
|
422
422
|
}
|
|
423
|
-
) : /* @__PURE__ */ jsx4(
|
|
424
|
-
"div",
|
|
425
|
-
{
|
|
426
|
-
className: classNames4(
|
|
427
|
-
"w-max overflow-auto",
|
|
428
|
-
maxWidth
|
|
429
|
-
),
|
|
430
|
-
children: text
|
|
431
|
-
}
|
|
432
|
-
)
|
|
423
|
+
) : /* @__PURE__ */ jsx4("div", { className: classNames4("w-max overflow-auto", maxWidth), children: text })
|
|
433
424
|
]
|
|
434
425
|
}
|
|
435
426
|
) }) })
|
|
@@ -683,12 +674,16 @@ var NewButton = forwardRef(Button);
|
|
|
683
674
|
var NewButton_default = NewButton;
|
|
684
675
|
|
|
685
676
|
// src/common/dialog/BaseDialog.tsx
|
|
686
|
-
import {
|
|
677
|
+
import {
|
|
678
|
+
Fragment as Fragment2,
|
|
679
|
+
memo as memo2,
|
|
680
|
+
createContext
|
|
681
|
+
} from "react";
|
|
687
682
|
import { Dialog, Transition } from "@headlessui/react";
|
|
688
683
|
import { cx as classNames5 } from "class-variance-authority";
|
|
689
684
|
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
690
685
|
var BaseZIndexContext = createContext(10);
|
|
691
|
-
|
|
686
|
+
var _BaseDialog = ({
|
|
692
687
|
title,
|
|
693
688
|
open,
|
|
694
689
|
onClose,
|
|
@@ -709,8 +704,8 @@ function _BaseDialog({
|
|
|
709
704
|
footer,
|
|
710
705
|
zIndex = 10,
|
|
711
706
|
mask = "normal"
|
|
712
|
-
}) {
|
|
713
|
-
return /* @__PURE__ */ jsx6(Transition, { appear: true, as: Fragment2, show: open, children: /* @__PURE__ */
|
|
707
|
+
}) => {
|
|
708
|
+
return /* @__PURE__ */ jsx6(Transition, { appear: true, as: Fragment2, show: open, children: /* @__PURE__ */ jsx6(
|
|
714
709
|
Dialog,
|
|
715
710
|
{
|
|
716
711
|
className: classNames5("relative", "_sentio_"),
|
|
@@ -720,7 +715,7 @@ function _BaseDialog({
|
|
|
720
715
|
style: {
|
|
721
716
|
zIndex
|
|
722
717
|
},
|
|
723
|
-
children: [
|
|
718
|
+
children: /* @__PURE__ */ jsxs6(BaseZIndexContext.Provider, { value: zIndex, children: [
|
|
724
719
|
/* @__PURE__ */ jsx6(
|
|
725
720
|
Transition.Child,
|
|
726
721
|
{
|
|
@@ -811,19 +806,19 @@ function _BaseDialog({
|
|
|
811
806
|
)
|
|
812
807
|
}
|
|
813
808
|
) }) })
|
|
814
|
-
]
|
|
809
|
+
] })
|
|
815
810
|
}
|
|
816
811
|
) });
|
|
817
|
-
}
|
|
812
|
+
};
|
|
818
813
|
var BaseDialog = memo2(_BaseDialog);
|
|
819
814
|
|
|
820
815
|
// src/common/DisclosurePanel.tsx
|
|
816
|
+
import { useState as useState3, useCallback as useCallback2 } from "react";
|
|
821
817
|
import { cx as classNames6 } from "class-variance-authority";
|
|
822
818
|
import isFunction from "lodash/isFunction";
|
|
823
|
-
import { useState as useState3, useCallback as useCallback2 } from "react";
|
|
824
819
|
import { LuChevronRight } from "react-icons/lu";
|
|
825
820
|
import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
826
|
-
|
|
821
|
+
var DisclosurePanel = ({
|
|
827
822
|
title,
|
|
828
823
|
children,
|
|
829
824
|
defaultOpen,
|
|
@@ -831,7 +826,7 @@ function DisclosurePanel({
|
|
|
831
826
|
containerClassName,
|
|
832
827
|
iconClassName = "h-5 w-5",
|
|
833
828
|
titleClassName
|
|
834
|
-
}) {
|
|
829
|
+
}) => {
|
|
835
830
|
const [open, setOpen] = useState3(defaultOpen || false);
|
|
836
831
|
const toggle = useCallback2(() => {
|
|
837
832
|
setOpen((prev) => !prev);
|
|
@@ -850,6 +845,7 @@ function DisclosurePanel({
|
|
|
850
845
|
titleClassName
|
|
851
846
|
),
|
|
852
847
|
onClick: toggle,
|
|
848
|
+
type: "button",
|
|
853
849
|
children: [
|
|
854
850
|
/* @__PURE__ */ jsx7(
|
|
855
851
|
LuChevronRight,
|
|
@@ -869,7 +865,7 @@ function DisclosurePanel({
|
|
|
869
865
|
]
|
|
870
866
|
}
|
|
871
867
|
);
|
|
872
|
-
}
|
|
868
|
+
};
|
|
873
869
|
|
|
874
870
|
// src/common/Collapse.tsx
|
|
875
871
|
import { ChevronDownIcon } from "@heroicons/react/20/solid";
|
|
@@ -939,8 +935,11 @@ var Collapse = ({
|
|
|
939
935
|
{
|
|
940
936
|
className: classNames7(
|
|
941
937
|
"overflow-hidden transition-all duration-200",
|
|
942
|
-
visible ? "
|
|
938
|
+
visible ? "opacity-100" : "opacity-0"
|
|
943
939
|
),
|
|
940
|
+
style: {
|
|
941
|
+
maxHeight: visible ? "2000px" : "0px"
|
|
942
|
+
},
|
|
944
943
|
children
|
|
945
944
|
}
|
|
946
945
|
)
|
|
@@ -1668,8 +1667,8 @@ var Tree_default = forwardRef3(function Tree({
|
|
|
1668
1667
|
onOpenClick,
|
|
1669
1668
|
showToggle,
|
|
1670
1669
|
className,
|
|
1671
|
-
expandIcon = /* @__PURE__ */ jsx13(LuSquarePlus, { className: "h-
|
|
1672
|
-
collapseIcon = /* @__PURE__ */ jsx13(LuSquareMinus, { className: "h-
|
|
1670
|
+
expandIcon = /* @__PURE__ */ jsx13(LuSquarePlus, { className: "h-4 w-4 align-middle" }),
|
|
1671
|
+
collapseIcon = /* @__PURE__ */ jsx13(LuSquareMinus, { className: "h-4 w-4 align-middle" })
|
|
1673
1672
|
}, ref) {
|
|
1674
1673
|
const [open, setOpen] = useState7(defaultOpen);
|
|
1675
1674
|
useEffect5(() => {
|
|
@@ -1717,7 +1716,7 @@ var Tree_default = forwardRef3(function Tree({
|
|
|
1717
1716
|
/* @__PURE__ */ jsx13("div", { className: "inline-flex shrink-0 items-center", children: children || showToggle ? /* @__PURE__ */ jsx13(
|
|
1718
1717
|
"button",
|
|
1719
1718
|
{
|
|
1720
|
-
className: "
|
|
1719
|
+
className: "text-gray hover:text-primary-500 dark:hover:text-primary-700 mr-1.5 cursor-pointer",
|
|
1721
1720
|
onClick: toggle,
|
|
1722
1721
|
children: open ? collapseIcon : expandIcon
|
|
1723
1722
|
}
|
|
@@ -3187,6 +3186,7 @@ export {
|
|
|
3187
3186
|
BD,
|
|
3188
3187
|
BarLoading,
|
|
3189
3188
|
BaseDialog,
|
|
3189
|
+
BaseZIndexContext,
|
|
3190
3190
|
NewButton as Button,
|
|
3191
3191
|
COLOR_MAP,
|
|
3192
3192
|
LuSquareX as CloseSquareO,
|
|
@@ -3213,6 +3213,7 @@ export {
|
|
|
3213
3213
|
LuSquarePlus as PlusSquareO,
|
|
3214
3214
|
PopoverTooltip,
|
|
3215
3215
|
PopupMenuButton,
|
|
3216
|
+
Proccessing,
|
|
3216
3217
|
ROOT_KEY,
|
|
3217
3218
|
RadioSelect,
|
|
3218
3219
|
RenameIcon,
|
|
@@ -3225,6 +3226,7 @@ export {
|
|
|
3225
3226
|
SubMenuButton,
|
|
3226
3227
|
SvgFolderContext,
|
|
3227
3228
|
Switch,
|
|
3229
|
+
buttonClass,
|
|
3228
3230
|
cx3 as classNames,
|
|
3229
3231
|
getNumberWithDecimal,
|
|
3230
3232
|
parseHex,
|