@sentio/ui-core 0.1.0 → 0.1.1
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 +8 -113
- 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 +25 -25
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +27 -26
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +9 -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);
|
|
@@ -869,7 +864,7 @@ function DisclosurePanel({
|
|
|
869
864
|
]
|
|
870
865
|
}
|
|
871
866
|
);
|
|
872
|
-
}
|
|
867
|
+
};
|
|
873
868
|
|
|
874
869
|
// src/common/Collapse.tsx
|
|
875
870
|
import { ChevronDownIcon } from "@heroicons/react/20/solid";
|
|
@@ -939,8 +934,11 @@ var Collapse = ({
|
|
|
939
934
|
{
|
|
940
935
|
className: classNames7(
|
|
941
936
|
"overflow-hidden transition-all duration-200",
|
|
942
|
-
visible ? "
|
|
937
|
+
visible ? "opacity-100" : "opacity-0"
|
|
943
938
|
),
|
|
939
|
+
style: {
|
|
940
|
+
maxHeight: visible ? "2000px" : "0px"
|
|
941
|
+
},
|
|
944
942
|
children
|
|
945
943
|
}
|
|
946
944
|
)
|
|
@@ -1668,8 +1666,8 @@ var Tree_default = forwardRef3(function Tree({
|
|
|
1668
1666
|
onOpenClick,
|
|
1669
1667
|
showToggle,
|
|
1670
1668
|
className,
|
|
1671
|
-
expandIcon = /* @__PURE__ */ jsx13(LuSquarePlus, { className: "h-
|
|
1672
|
-
collapseIcon = /* @__PURE__ */ jsx13(LuSquareMinus, { className: "h-
|
|
1669
|
+
expandIcon = /* @__PURE__ */ jsx13(LuSquarePlus, { className: "h-4 w-4 align-middle" }),
|
|
1670
|
+
collapseIcon = /* @__PURE__ */ jsx13(LuSquareMinus, { className: "h-4 w-4 align-middle" })
|
|
1673
1671
|
}, ref) {
|
|
1674
1672
|
const [open, setOpen] = useState7(defaultOpen);
|
|
1675
1673
|
useEffect5(() => {
|
|
@@ -1717,7 +1715,7 @@ var Tree_default = forwardRef3(function Tree({
|
|
|
1717
1715
|
/* @__PURE__ */ jsx13("div", { className: "inline-flex shrink-0 items-center", children: children || showToggle ? /* @__PURE__ */ jsx13(
|
|
1718
1716
|
"button",
|
|
1719
1717
|
{
|
|
1720
|
-
className: "
|
|
1718
|
+
className: "text-gray hover:text-primary-500 dark:hover:text-primary-700 mr-1.5 cursor-pointer",
|
|
1721
1719
|
onClick: toggle,
|
|
1722
1720
|
children: open ? collapseIcon : expandIcon
|
|
1723
1721
|
}
|
|
@@ -3187,6 +3185,7 @@ export {
|
|
|
3187
3185
|
BD,
|
|
3188
3186
|
BarLoading,
|
|
3189
3187
|
BaseDialog,
|
|
3188
|
+
BaseZIndexContext,
|
|
3190
3189
|
NewButton as Button,
|
|
3191
3190
|
COLOR_MAP,
|
|
3192
3191
|
LuSquareX as CloseSquareO,
|
|
@@ -3213,6 +3212,7 @@ export {
|
|
|
3213
3212
|
LuSquarePlus as PlusSquareO,
|
|
3214
3213
|
PopoverTooltip,
|
|
3215
3214
|
PopupMenuButton,
|
|
3215
|
+
Proccessing,
|
|
3216
3216
|
ROOT_KEY,
|
|
3217
3217
|
RadioSelect,
|
|
3218
3218
|
RenameIcon,
|
|
@@ -3225,6 +3225,7 @@ export {
|
|
|
3225
3225
|
SubMenuButton,
|
|
3226
3226
|
SvgFolderContext,
|
|
3227
3227
|
Switch,
|
|
3228
|
+
buttonClass,
|
|
3228
3229
|
cx3 as classNames,
|
|
3229
3230
|
getNumberWithDecimal,
|
|
3230
3231
|
parseHex,
|