@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.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import react__default, { FC,
|
|
2
|
+
import react__default, { FC, ReactNode, SVGProps, MutableRefObject, ReactElement, CSSProperties } from 'react';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import { LoaderHeightWidthProps } from 'react-spinners/helpers/props';
|
|
5
5
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
@@ -12,7 +12,7 @@ export { LuSquareX as CloseSquareO, LuEye as EyeO, LuSquareMinus as MinusSquareO
|
|
|
12
12
|
import { ColumnDef, ColumnResizeMode, Row, Cell, TableState } from '@tanstack/react-table';
|
|
13
13
|
import BigDecimal from '@sentio/bigdecimal';
|
|
14
14
|
|
|
15
|
-
interface Props$
|
|
15
|
+
interface Props$b {
|
|
16
16
|
hint?: React.ReactNode;
|
|
17
17
|
loading?: boolean;
|
|
18
18
|
className?: string;
|
|
@@ -20,10 +20,10 @@ interface Props$c {
|
|
|
20
20
|
width?: LoaderHeightWidthProps['width'];
|
|
21
21
|
gray?: boolean;
|
|
22
22
|
}
|
|
23
|
-
declare function _BarLoading({ hint, loading, className, iconClassName, width, gray }: Props$
|
|
23
|
+
declare function _BarLoading({ hint, loading, className, iconClassName, width, gray }: Props$b): react_jsx_runtime.JSX.Element | null;
|
|
24
24
|
declare const BarLoading: react.MemoExoticComponent<typeof _BarLoading>;
|
|
25
25
|
|
|
26
|
-
interface Props$
|
|
26
|
+
interface Props$a {
|
|
27
27
|
loading?: boolean;
|
|
28
28
|
children?: react__default.ReactNode;
|
|
29
29
|
className?: string;
|
|
@@ -31,11 +31,11 @@ interface Props$b {
|
|
|
31
31
|
showMask?: boolean;
|
|
32
32
|
maskOpacity?: number;
|
|
33
33
|
}
|
|
34
|
-
declare const SpinLoading: (args: Props$
|
|
34
|
+
declare const SpinLoading: (args: Props$a) => react_jsx_runtime.JSX.Element;
|
|
35
35
|
|
|
36
36
|
declare const CopyIcon: (props: SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
37
37
|
declare const CopySuccessIcon: (props: SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
38
|
-
interface Props$
|
|
38
|
+
interface Props$9 {
|
|
39
39
|
text?: string | Function;
|
|
40
40
|
size?: number;
|
|
41
41
|
ml?: number;
|
|
@@ -43,8 +43,9 @@ interface Props$a {
|
|
|
43
43
|
hover?: boolean;
|
|
44
44
|
placement?: 'left' | 'right';
|
|
45
45
|
className?: string;
|
|
46
|
+
children?: ReactNode;
|
|
46
47
|
}
|
|
47
|
-
declare const CopyButton: FC<
|
|
48
|
+
declare const CopyButton: FC<Props$9>;
|
|
48
49
|
|
|
49
50
|
declare const buttonClass: (props?: ({
|
|
50
51
|
role?: "link" | "text" | "dashed" | "primary" | "secondary" | "tertiary" | "tertiarytext" | "custom" | null | undefined;
|
|
@@ -67,13 +68,18 @@ interface ButtonProps extends VariantProps<typeof buttonClass> {
|
|
|
67
68
|
value?: string;
|
|
68
69
|
id?: string;
|
|
69
70
|
}
|
|
71
|
+
declare function Proccessing({ className, light }: {
|
|
72
|
+
className?: string;
|
|
73
|
+
light?: boolean;
|
|
74
|
+
}): react_jsx_runtime.JSX.Element;
|
|
70
75
|
declare const NewButton: react.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & react.RefAttributes<unknown>>;
|
|
71
76
|
|
|
72
|
-
|
|
77
|
+
declare const BaseZIndexContext: react.Context<number>;
|
|
78
|
+
interface Props$8 {
|
|
73
79
|
title?: string | ReactElement;
|
|
74
80
|
titleBorder?: boolean;
|
|
75
81
|
footerBorder?: boolean;
|
|
76
|
-
children
|
|
82
|
+
children?: ReactElement;
|
|
77
83
|
open: boolean;
|
|
78
84
|
onClose: () => void;
|
|
79
85
|
cancelText?: string;
|
|
@@ -91,10 +97,13 @@ interface Props$9 {
|
|
|
91
97
|
zIndex?: number;
|
|
92
98
|
mask?: 'normal' | 'light';
|
|
93
99
|
}
|
|
94
|
-
declare
|
|
95
|
-
declare const BaseDialog: react.MemoExoticComponent<typeof _BaseDialog>;
|
|
100
|
+
declare const BaseDialog: react.NamedExoticComponent<Props$8>;
|
|
96
101
|
|
|
97
|
-
|
|
102
|
+
/**
|
|
103
|
+
* The differece between this and the PopoverTooltip.tsx is that this one pass mouse click event to the parent
|
|
104
|
+
*/
|
|
105
|
+
|
|
106
|
+
interface Props$7 {
|
|
98
107
|
text?: string | react__default.ReactNode;
|
|
99
108
|
className?: string;
|
|
100
109
|
buttonClassName?: string;
|
|
@@ -110,28 +119,28 @@ interface Props$8 {
|
|
|
110
119
|
enableFadeAnimation?: boolean;
|
|
111
120
|
animationDuration?: number;
|
|
112
121
|
}
|
|
113
|
-
declare const PopoverTooltip:
|
|
122
|
+
declare const PopoverTooltip: FC<Props$7>;
|
|
114
123
|
|
|
115
|
-
interface Props$
|
|
124
|
+
interface Props$6 {
|
|
116
125
|
defaultOpen?: boolean;
|
|
117
|
-
children
|
|
126
|
+
children?: ReactNode;
|
|
118
127
|
title: string | ReactNode | ((open: boolean) => ReactNode);
|
|
119
128
|
titleClassName?: string;
|
|
120
129
|
containerClassName?: string;
|
|
121
130
|
iconClassName?: string;
|
|
122
131
|
className?: string;
|
|
123
132
|
}
|
|
124
|
-
declare
|
|
133
|
+
declare const DisclosurePanel: FC<Props$6>;
|
|
125
134
|
|
|
126
135
|
interface CollapseProps {
|
|
127
136
|
title: ReactNode | string;
|
|
128
|
-
children
|
|
137
|
+
children?: ReactNode;
|
|
129
138
|
className?: string;
|
|
130
139
|
titleClassName?: string;
|
|
131
140
|
defaultOpen?: boolean;
|
|
132
141
|
iconClassName?: string;
|
|
133
142
|
}
|
|
134
|
-
declare const Collapse:
|
|
143
|
+
declare const Collapse: FC<CollapseProps>;
|
|
135
144
|
|
|
136
145
|
type InputProps = UseFormRegisterReturn & {
|
|
137
146
|
error?: FieldError;
|
|
@@ -143,7 +152,7 @@ type InputProps = UseFormRegisterReturn & {
|
|
|
143
152
|
} & React.InputHTMLAttributes<HTMLInputElement>;
|
|
144
153
|
declare const Input: react.ForwardRefExoticComponent<Omit<InputProps, "ref"> & react.RefAttributes<HTMLInputElement>>;
|
|
145
154
|
|
|
146
|
-
interface Props$
|
|
155
|
+
interface Props$5<T> {
|
|
147
156
|
value?: T;
|
|
148
157
|
onChange?: (v: T) => void;
|
|
149
158
|
label?: string;
|
|
@@ -155,17 +164,17 @@ interface Props$6<T> {
|
|
|
155
164
|
}[];
|
|
156
165
|
vertical?: boolean;
|
|
157
166
|
}
|
|
158
|
-
declare function RadioSelect<T>({ value, onChange, label, labelClassName, options, vertical, containerClassName }: Props$
|
|
167
|
+
declare function RadioSelect<T>({ value, onChange, label, labelClassName, options, vertical, containerClassName }: Props$5<T>): react_jsx_runtime.JSX.Element;
|
|
159
168
|
|
|
160
|
-
interface
|
|
169
|
+
interface SwitchProps {
|
|
161
170
|
checked?: boolean;
|
|
162
171
|
onChange?: (checked: boolean) => void;
|
|
163
172
|
srText?: string;
|
|
164
|
-
size
|
|
173
|
+
size?: 'lg' | 'default' | 'sm';
|
|
165
174
|
disabled?: boolean;
|
|
166
175
|
label?: string;
|
|
167
176
|
}
|
|
168
|
-
declare function Switch({ checked, onChange: _onChange, srText, size, disabled, label }:
|
|
177
|
+
declare function Switch({ checked, onChange: _onChange, srText, size, disabled, label }: SwitchProps): react_jsx_runtime.JSX.Element;
|
|
169
178
|
|
|
170
179
|
type labelProps = {
|
|
171
180
|
selected?: boolean;
|
|
@@ -243,7 +252,7 @@ interface EmptyProps {
|
|
|
243
252
|
src?: string;
|
|
244
253
|
title?: react__default.ReactNode;
|
|
245
254
|
}
|
|
246
|
-
declare const Empty:
|
|
255
|
+
declare const Empty: react__default.FC<EmptyProps>;
|
|
247
256
|
|
|
248
257
|
declare enum StatusRole {
|
|
249
258
|
Success = "success",
|
|
@@ -267,13 +276,13 @@ interface HeaderToolsToggleButtonProps {
|
|
|
267
276
|
onClick: () => void;
|
|
268
277
|
className?: string;
|
|
269
278
|
}
|
|
270
|
-
declare const HeaderToolsToggleButton:
|
|
279
|
+
declare const HeaderToolsToggleButton: FC<HeaderToolsToggleButtonProps>;
|
|
271
280
|
interface HeaderToolsContentProps {
|
|
272
281
|
isOpen: boolean;
|
|
273
|
-
children
|
|
282
|
+
children?: ReactNode;
|
|
274
283
|
className?: string;
|
|
275
284
|
}
|
|
276
|
-
declare const HeaderToolsContent:
|
|
285
|
+
declare const HeaderToolsContent: FC<HeaderToolsContentProps>;
|
|
277
286
|
|
|
278
287
|
interface Props$2 {
|
|
279
288
|
data: any;
|
|
@@ -394,4 +403,4 @@ declare const NavSizeContext: react.Context<{
|
|
|
394
403
|
setShowLabel: (showLabel: boolean) => void;
|
|
395
404
|
}>;
|
|
396
405
|
|
|
397
|
-
export { BD, BarLoading, BaseDialog, NewButton as Button, COLOR_MAP, Collapse, CopyButton, CopyIcon, CopySuccessIcon, DarkModeContext, type DataNode, DeleteIcon, DisclosurePanel, Empty, FlatTree, HeaderToolsContent, HeaderToolsToggleButton, type IMenuItem, Input, LinkifyText, MenuContext, MenuItem, MoveLeftIcon, MoveRightIcon, NavSizeContext, type OnSelectMenuItem, PopoverTooltip, PopupMenuButton, ROOT_KEY, RadioSelect, RenameIcon, ResizeTable, SUFFIX_NODE_KEY, Select, type SelectProps, SpinLoading, StatusBadge, StatusRole, SubMenuButton, SvgFolderContext, Switch, getNumberWithDecimal, parseHex, useBoolean, useDarkMode, useDetectExtenstion, useMobile };
|
|
406
|
+
export { BD, BarLoading, BaseDialog, BaseZIndexContext, NewButton as Button, type ButtonProps, COLOR_MAP, Collapse, CopyButton, CopyIcon, CopySuccessIcon, DarkModeContext, type DataNode, DeleteIcon, DisclosurePanel, Empty, FlatTree, HeaderToolsContent, HeaderToolsToggleButton, type IMenuItem, Input, LinkifyText, MenuContext, MenuItem, MoveLeftIcon, MoveRightIcon, NavSizeContext, type OnSelectMenuItem, PopoverTooltip, PopupMenuButton, Proccessing, ROOT_KEY, RadioSelect, RenameIcon, ResizeTable, SUFFIX_NODE_KEY, Select, type SelectProps, SpinLoading, StatusBadge, StatusRole, SubMenuButton, SvgFolderContext, Switch, type SwitchProps, buttonClass, getNumberWithDecimal, parseHex, useBoolean, useDarkMode, useDetectExtenstion, useMobile };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import react__default, { FC,
|
|
2
|
+
import react__default, { FC, ReactNode, SVGProps, MutableRefObject, ReactElement, CSSProperties } from 'react';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import { LoaderHeightWidthProps } from 'react-spinners/helpers/props';
|
|
5
5
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
@@ -12,7 +12,7 @@ export { LuSquareX as CloseSquareO, LuEye as EyeO, LuSquareMinus as MinusSquareO
|
|
|
12
12
|
import { ColumnDef, ColumnResizeMode, Row, Cell, TableState } from '@tanstack/react-table';
|
|
13
13
|
import BigDecimal from '@sentio/bigdecimal';
|
|
14
14
|
|
|
15
|
-
interface Props$
|
|
15
|
+
interface Props$b {
|
|
16
16
|
hint?: React.ReactNode;
|
|
17
17
|
loading?: boolean;
|
|
18
18
|
className?: string;
|
|
@@ -20,10 +20,10 @@ interface Props$c {
|
|
|
20
20
|
width?: LoaderHeightWidthProps['width'];
|
|
21
21
|
gray?: boolean;
|
|
22
22
|
}
|
|
23
|
-
declare function _BarLoading({ hint, loading, className, iconClassName, width, gray }: Props$
|
|
23
|
+
declare function _BarLoading({ hint, loading, className, iconClassName, width, gray }: Props$b): react_jsx_runtime.JSX.Element | null;
|
|
24
24
|
declare const BarLoading: react.MemoExoticComponent<typeof _BarLoading>;
|
|
25
25
|
|
|
26
|
-
interface Props$
|
|
26
|
+
interface Props$a {
|
|
27
27
|
loading?: boolean;
|
|
28
28
|
children?: react__default.ReactNode;
|
|
29
29
|
className?: string;
|
|
@@ -31,11 +31,11 @@ interface Props$b {
|
|
|
31
31
|
showMask?: boolean;
|
|
32
32
|
maskOpacity?: number;
|
|
33
33
|
}
|
|
34
|
-
declare const SpinLoading: (args: Props$
|
|
34
|
+
declare const SpinLoading: (args: Props$a) => react_jsx_runtime.JSX.Element;
|
|
35
35
|
|
|
36
36
|
declare const CopyIcon: (props: SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
37
37
|
declare const CopySuccessIcon: (props: SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
38
|
-
interface Props$
|
|
38
|
+
interface Props$9 {
|
|
39
39
|
text?: string | Function;
|
|
40
40
|
size?: number;
|
|
41
41
|
ml?: number;
|
|
@@ -43,8 +43,9 @@ interface Props$a {
|
|
|
43
43
|
hover?: boolean;
|
|
44
44
|
placement?: 'left' | 'right';
|
|
45
45
|
className?: string;
|
|
46
|
+
children?: ReactNode;
|
|
46
47
|
}
|
|
47
|
-
declare const CopyButton: FC<
|
|
48
|
+
declare const CopyButton: FC<Props$9>;
|
|
48
49
|
|
|
49
50
|
declare const buttonClass: (props?: ({
|
|
50
51
|
role?: "link" | "text" | "dashed" | "primary" | "secondary" | "tertiary" | "tertiarytext" | "custom" | null | undefined;
|
|
@@ -67,13 +68,18 @@ interface ButtonProps extends VariantProps<typeof buttonClass> {
|
|
|
67
68
|
value?: string;
|
|
68
69
|
id?: string;
|
|
69
70
|
}
|
|
71
|
+
declare function Proccessing({ className, light }: {
|
|
72
|
+
className?: string;
|
|
73
|
+
light?: boolean;
|
|
74
|
+
}): react_jsx_runtime.JSX.Element;
|
|
70
75
|
declare const NewButton: react.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & react.RefAttributes<unknown>>;
|
|
71
76
|
|
|
72
|
-
|
|
77
|
+
declare const BaseZIndexContext: react.Context<number>;
|
|
78
|
+
interface Props$8 {
|
|
73
79
|
title?: string | ReactElement;
|
|
74
80
|
titleBorder?: boolean;
|
|
75
81
|
footerBorder?: boolean;
|
|
76
|
-
children
|
|
82
|
+
children?: ReactElement;
|
|
77
83
|
open: boolean;
|
|
78
84
|
onClose: () => void;
|
|
79
85
|
cancelText?: string;
|
|
@@ -91,10 +97,13 @@ interface Props$9 {
|
|
|
91
97
|
zIndex?: number;
|
|
92
98
|
mask?: 'normal' | 'light';
|
|
93
99
|
}
|
|
94
|
-
declare
|
|
95
|
-
declare const BaseDialog: react.MemoExoticComponent<typeof _BaseDialog>;
|
|
100
|
+
declare const BaseDialog: react.NamedExoticComponent<Props$8>;
|
|
96
101
|
|
|
97
|
-
|
|
102
|
+
/**
|
|
103
|
+
* The differece between this and the PopoverTooltip.tsx is that this one pass mouse click event to the parent
|
|
104
|
+
*/
|
|
105
|
+
|
|
106
|
+
interface Props$7 {
|
|
98
107
|
text?: string | react__default.ReactNode;
|
|
99
108
|
className?: string;
|
|
100
109
|
buttonClassName?: string;
|
|
@@ -110,28 +119,28 @@ interface Props$8 {
|
|
|
110
119
|
enableFadeAnimation?: boolean;
|
|
111
120
|
animationDuration?: number;
|
|
112
121
|
}
|
|
113
|
-
declare const PopoverTooltip:
|
|
122
|
+
declare const PopoverTooltip: FC<Props$7>;
|
|
114
123
|
|
|
115
|
-
interface Props$
|
|
124
|
+
interface Props$6 {
|
|
116
125
|
defaultOpen?: boolean;
|
|
117
|
-
children
|
|
126
|
+
children?: ReactNode;
|
|
118
127
|
title: string | ReactNode | ((open: boolean) => ReactNode);
|
|
119
128
|
titleClassName?: string;
|
|
120
129
|
containerClassName?: string;
|
|
121
130
|
iconClassName?: string;
|
|
122
131
|
className?: string;
|
|
123
132
|
}
|
|
124
|
-
declare
|
|
133
|
+
declare const DisclosurePanel: FC<Props$6>;
|
|
125
134
|
|
|
126
135
|
interface CollapseProps {
|
|
127
136
|
title: ReactNode | string;
|
|
128
|
-
children
|
|
137
|
+
children?: ReactNode;
|
|
129
138
|
className?: string;
|
|
130
139
|
titleClassName?: string;
|
|
131
140
|
defaultOpen?: boolean;
|
|
132
141
|
iconClassName?: string;
|
|
133
142
|
}
|
|
134
|
-
declare const Collapse:
|
|
143
|
+
declare const Collapse: FC<CollapseProps>;
|
|
135
144
|
|
|
136
145
|
type InputProps = UseFormRegisterReturn & {
|
|
137
146
|
error?: FieldError;
|
|
@@ -143,7 +152,7 @@ type InputProps = UseFormRegisterReturn & {
|
|
|
143
152
|
} & React.InputHTMLAttributes<HTMLInputElement>;
|
|
144
153
|
declare const Input: react.ForwardRefExoticComponent<Omit<InputProps, "ref"> & react.RefAttributes<HTMLInputElement>>;
|
|
145
154
|
|
|
146
|
-
interface Props$
|
|
155
|
+
interface Props$5<T> {
|
|
147
156
|
value?: T;
|
|
148
157
|
onChange?: (v: T) => void;
|
|
149
158
|
label?: string;
|
|
@@ -155,17 +164,17 @@ interface Props$6<T> {
|
|
|
155
164
|
}[];
|
|
156
165
|
vertical?: boolean;
|
|
157
166
|
}
|
|
158
|
-
declare function RadioSelect<T>({ value, onChange, label, labelClassName, options, vertical, containerClassName }: Props$
|
|
167
|
+
declare function RadioSelect<T>({ value, onChange, label, labelClassName, options, vertical, containerClassName }: Props$5<T>): react_jsx_runtime.JSX.Element;
|
|
159
168
|
|
|
160
|
-
interface
|
|
169
|
+
interface SwitchProps {
|
|
161
170
|
checked?: boolean;
|
|
162
171
|
onChange?: (checked: boolean) => void;
|
|
163
172
|
srText?: string;
|
|
164
|
-
size
|
|
173
|
+
size?: 'lg' | 'default' | 'sm';
|
|
165
174
|
disabled?: boolean;
|
|
166
175
|
label?: string;
|
|
167
176
|
}
|
|
168
|
-
declare function Switch({ checked, onChange: _onChange, srText, size, disabled, label }:
|
|
177
|
+
declare function Switch({ checked, onChange: _onChange, srText, size, disabled, label }: SwitchProps): react_jsx_runtime.JSX.Element;
|
|
169
178
|
|
|
170
179
|
type labelProps = {
|
|
171
180
|
selected?: boolean;
|
|
@@ -243,7 +252,7 @@ interface EmptyProps {
|
|
|
243
252
|
src?: string;
|
|
244
253
|
title?: react__default.ReactNode;
|
|
245
254
|
}
|
|
246
|
-
declare const Empty:
|
|
255
|
+
declare const Empty: react__default.FC<EmptyProps>;
|
|
247
256
|
|
|
248
257
|
declare enum StatusRole {
|
|
249
258
|
Success = "success",
|
|
@@ -267,13 +276,13 @@ interface HeaderToolsToggleButtonProps {
|
|
|
267
276
|
onClick: () => void;
|
|
268
277
|
className?: string;
|
|
269
278
|
}
|
|
270
|
-
declare const HeaderToolsToggleButton:
|
|
279
|
+
declare const HeaderToolsToggleButton: FC<HeaderToolsToggleButtonProps>;
|
|
271
280
|
interface HeaderToolsContentProps {
|
|
272
281
|
isOpen: boolean;
|
|
273
|
-
children
|
|
282
|
+
children?: ReactNode;
|
|
274
283
|
className?: string;
|
|
275
284
|
}
|
|
276
|
-
declare const HeaderToolsContent:
|
|
285
|
+
declare const HeaderToolsContent: FC<HeaderToolsContentProps>;
|
|
277
286
|
|
|
278
287
|
interface Props$2 {
|
|
279
288
|
data: any;
|
|
@@ -394,4 +403,4 @@ declare const NavSizeContext: react.Context<{
|
|
|
394
403
|
setShowLabel: (showLabel: boolean) => void;
|
|
395
404
|
}>;
|
|
396
405
|
|
|
397
|
-
export { BD, BarLoading, BaseDialog, NewButton as Button, COLOR_MAP, Collapse, CopyButton, CopyIcon, CopySuccessIcon, DarkModeContext, type DataNode, DeleteIcon, DisclosurePanel, Empty, FlatTree, HeaderToolsContent, HeaderToolsToggleButton, type IMenuItem, Input, LinkifyText, MenuContext, MenuItem, MoveLeftIcon, MoveRightIcon, NavSizeContext, type OnSelectMenuItem, PopoverTooltip, PopupMenuButton, ROOT_KEY, RadioSelect, RenameIcon, ResizeTable, SUFFIX_NODE_KEY, Select, type SelectProps, SpinLoading, StatusBadge, StatusRole, SubMenuButton, SvgFolderContext, Switch, getNumberWithDecimal, parseHex, useBoolean, useDarkMode, useDetectExtenstion, useMobile };
|
|
406
|
+
export { BD, BarLoading, BaseDialog, BaseZIndexContext, NewButton as Button, type ButtonProps, COLOR_MAP, Collapse, CopyButton, CopyIcon, CopySuccessIcon, DarkModeContext, type DataNode, DeleteIcon, DisclosurePanel, Empty, FlatTree, HeaderToolsContent, HeaderToolsToggleButton, type IMenuItem, Input, LinkifyText, MenuContext, MenuItem, MoveLeftIcon, MoveRightIcon, NavSizeContext, type OnSelectMenuItem, PopoverTooltip, PopupMenuButton, Proccessing, ROOT_KEY, RadioSelect, RenameIcon, ResizeTable, SUFFIX_NODE_KEY, Select, type SelectProps, SpinLoading, StatusBadge, StatusRole, SubMenuButton, SvgFolderContext, Switch, type SwitchProps, buttonClass, getNumberWithDecimal, parseHex, useBoolean, useDarkMode, useDetectExtenstion, useMobile };
|
package/dist/index.js
CHANGED
|
@@ -33,6 +33,7 @@ __export(index_exports, {
|
|
|
33
33
|
BD: () => BD,
|
|
34
34
|
BarLoading: () => BarLoading,
|
|
35
35
|
BaseDialog: () => BaseDialog,
|
|
36
|
+
BaseZIndexContext: () => BaseZIndexContext,
|
|
36
37
|
Button: () => NewButton,
|
|
37
38
|
COLOR_MAP: () => COLOR_MAP,
|
|
38
39
|
CloseSquareO: () => import_lu2.LuSquareX,
|
|
@@ -59,6 +60,7 @@ __export(index_exports, {
|
|
|
59
60
|
PlusSquareO: () => import_lu2.LuSquarePlus,
|
|
60
61
|
PopoverTooltip: () => PopoverTooltip,
|
|
61
62
|
PopupMenuButton: () => PopupMenuButton,
|
|
63
|
+
Proccessing: () => Proccessing,
|
|
62
64
|
ROOT_KEY: () => ROOT_KEY,
|
|
63
65
|
RadioSelect: () => RadioSelect,
|
|
64
66
|
RenameIcon: () => RenameIcon,
|
|
@@ -71,6 +73,7 @@ __export(index_exports, {
|
|
|
71
73
|
SubMenuButton: () => SubMenuButton,
|
|
72
74
|
SvgFolderContext: () => SvgFolderContext,
|
|
73
75
|
Switch: () => Switch,
|
|
76
|
+
buttonClass: () => buttonClass,
|
|
74
77
|
classNames: () => import_class_variance_authority10.cx,
|
|
75
78
|
getNumberWithDecimal: () => getNumberWithDecimal,
|
|
76
79
|
parseHex: () => parseHex,
|
|
@@ -471,7 +474,7 @@ var PopoverTooltip = ({
|
|
|
471
474
|
!hideArrow && placement === "bottom" && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
472
475
|
"div",
|
|
473
476
|
{
|
|
474
|
-
className: "arrow -translate-y-[5px] before:absolute before:h-2 before:w-2 before:rotate-45 before:
|
|
477
|
+
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",
|
|
475
478
|
ref: arrowRef,
|
|
476
479
|
style: {
|
|
477
480
|
left: arrowX ?? 0,
|
|
@@ -486,16 +489,7 @@ var PopoverTooltip = ({
|
|
|
486
489
|
className: (0, import_class_variance_authority4.cx)("w-max whitespace-pre-wrap", maxWidth),
|
|
487
490
|
children: text
|
|
488
491
|
}
|
|
489
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
490
|
-
"div",
|
|
491
|
-
{
|
|
492
|
-
className: (0, import_class_variance_authority4.cx)(
|
|
493
|
-
"w-max overflow-auto",
|
|
494
|
-
maxWidth
|
|
495
|
-
),
|
|
496
|
-
children: text
|
|
497
|
-
}
|
|
498
|
-
)
|
|
492
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: (0, import_class_variance_authority4.cx)("w-max overflow-auto", maxWidth), children: text })
|
|
499
493
|
]
|
|
500
494
|
}
|
|
501
495
|
) }) })
|
|
@@ -754,7 +748,7 @@ var import_react7 = require("@headlessui/react");
|
|
|
754
748
|
var import_class_variance_authority6 = require("class-variance-authority");
|
|
755
749
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
756
750
|
var BaseZIndexContext = (0, import_react6.createContext)(10);
|
|
757
|
-
|
|
751
|
+
var _BaseDialog = ({
|
|
758
752
|
title,
|
|
759
753
|
open,
|
|
760
754
|
onClose,
|
|
@@ -775,8 +769,8 @@ function _BaseDialog({
|
|
|
775
769
|
footer,
|
|
776
770
|
zIndex = 10,
|
|
777
771
|
mask = "normal"
|
|
778
|
-
}) {
|
|
779
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react7.Transition, { appear: true, as: import_react6.Fragment, show: open, children: /* @__PURE__ */ (0, import_jsx_runtime6.
|
|
772
|
+
}) => {
|
|
773
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react7.Transition, { appear: true, as: import_react6.Fragment, show: open, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
780
774
|
import_react7.Dialog,
|
|
781
775
|
{
|
|
782
776
|
className: (0, import_class_variance_authority6.cx)("relative", "_sentio_"),
|
|
@@ -786,7 +780,7 @@ function _BaseDialog({
|
|
|
786
780
|
style: {
|
|
787
781
|
zIndex
|
|
788
782
|
},
|
|
789
|
-
children: [
|
|
783
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(BaseZIndexContext.Provider, { value: zIndex, children: [
|
|
790
784
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
791
785
|
import_react7.Transition.Child,
|
|
792
786
|
{
|
|
@@ -877,19 +871,19 @@ function _BaseDialog({
|
|
|
877
871
|
)
|
|
878
872
|
}
|
|
879
873
|
) }) })
|
|
880
|
-
]
|
|
874
|
+
] })
|
|
881
875
|
}
|
|
882
876
|
) });
|
|
883
|
-
}
|
|
877
|
+
};
|
|
884
878
|
var BaseDialog = (0, import_react6.memo)(_BaseDialog);
|
|
885
879
|
|
|
886
880
|
// src/common/DisclosurePanel.tsx
|
|
881
|
+
var import_react8 = require("react");
|
|
887
882
|
var import_class_variance_authority7 = require("class-variance-authority");
|
|
888
883
|
var import_isFunction = __toESM(require("lodash/isFunction"));
|
|
889
|
-
var import_react8 = require("react");
|
|
890
884
|
var import_lu = require("react-icons/lu");
|
|
891
885
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
892
|
-
|
|
886
|
+
var DisclosurePanel = ({
|
|
893
887
|
title,
|
|
894
888
|
children,
|
|
895
889
|
defaultOpen,
|
|
@@ -897,7 +891,7 @@ function DisclosurePanel({
|
|
|
897
891
|
containerClassName,
|
|
898
892
|
iconClassName = "h-5 w-5",
|
|
899
893
|
titleClassName
|
|
900
|
-
}) {
|
|
894
|
+
}) => {
|
|
901
895
|
const [open, setOpen] = (0, import_react8.useState)(defaultOpen || false);
|
|
902
896
|
const toggle = (0, import_react8.useCallback)(() => {
|
|
903
897
|
setOpen((prev) => !prev);
|
|
@@ -916,6 +910,7 @@ function DisclosurePanel({
|
|
|
916
910
|
titleClassName
|
|
917
911
|
),
|
|
918
912
|
onClick: toggle,
|
|
913
|
+
type: "button",
|
|
919
914
|
children: [
|
|
920
915
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
921
916
|
import_lu.LuChevronRight,
|
|
@@ -935,7 +930,7 @@ function DisclosurePanel({
|
|
|
935
930
|
]
|
|
936
931
|
}
|
|
937
932
|
);
|
|
938
|
-
}
|
|
933
|
+
};
|
|
939
934
|
|
|
940
935
|
// src/common/Collapse.tsx
|
|
941
936
|
var import_solid = require("@heroicons/react/20/solid");
|
|
@@ -1005,8 +1000,11 @@ var Collapse = ({
|
|
|
1005
1000
|
{
|
|
1006
1001
|
className: (0, import_class_variance_authority8.cx)(
|
|
1007
1002
|
"overflow-hidden transition-all duration-200",
|
|
1008
|
-
visible ? "
|
|
1003
|
+
visible ? "opacity-100" : "opacity-0"
|
|
1009
1004
|
),
|
|
1005
|
+
style: {
|
|
1006
|
+
maxHeight: visible ? "2000px" : "0px"
|
|
1007
|
+
},
|
|
1010
1008
|
children
|
|
1011
1009
|
}
|
|
1012
1010
|
)
|
|
@@ -1718,8 +1716,8 @@ var Tree_default = (0, import_react17.forwardRef)(function Tree({
|
|
|
1718
1716
|
onOpenClick,
|
|
1719
1717
|
showToggle,
|
|
1720
1718
|
className,
|
|
1721
|
-
expandIcon = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lu2.LuSquarePlus, { className: "h-
|
|
1722
|
-
collapseIcon = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lu2.LuSquareMinus, { className: "h-
|
|
1719
|
+
expandIcon = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lu2.LuSquarePlus, { className: "h-4 w-4 align-middle" }),
|
|
1720
|
+
collapseIcon = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lu2.LuSquareMinus, { className: "h-4 w-4 align-middle" })
|
|
1723
1721
|
}, ref) {
|
|
1724
1722
|
const [open, setOpen] = (0, import_react17.useState)(defaultOpen);
|
|
1725
1723
|
(0, import_react18.useEffect)(() => {
|
|
@@ -1767,7 +1765,7 @@ var Tree_default = (0, import_react17.forwardRef)(function Tree({
|
|
|
1767
1765
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "inline-flex shrink-0 items-center", children: children || showToggle ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1768
1766
|
"button",
|
|
1769
1767
|
{
|
|
1770
|
-
className: "
|
|
1768
|
+
className: "text-gray hover:text-primary-500 dark:hover:text-primary-700 mr-1.5 cursor-pointer",
|
|
1771
1769
|
onClick: toggle,
|
|
1772
1770
|
children: open ? collapseIcon : expandIcon
|
|
1773
1771
|
}
|
|
@@ -3199,6 +3197,7 @@ function useMobile(breakpoint = 768, defaultValue = false) {
|
|
|
3199
3197
|
BD,
|
|
3200
3198
|
BarLoading,
|
|
3201
3199
|
BaseDialog,
|
|
3200
|
+
BaseZIndexContext,
|
|
3202
3201
|
Button,
|
|
3203
3202
|
COLOR_MAP,
|
|
3204
3203
|
CloseSquareO,
|
|
@@ -3225,6 +3224,7 @@ function useMobile(breakpoint = 768, defaultValue = false) {
|
|
|
3225
3224
|
PlusSquareO,
|
|
3226
3225
|
PopoverTooltip,
|
|
3227
3226
|
PopupMenuButton,
|
|
3227
|
+
Proccessing,
|
|
3228
3228
|
ROOT_KEY,
|
|
3229
3229
|
RadioSelect,
|
|
3230
3230
|
RenameIcon,
|
|
@@ -3237,6 +3237,7 @@ function useMobile(breakpoint = 768, defaultValue = false) {
|
|
|
3237
3237
|
SubMenuButton,
|
|
3238
3238
|
SvgFolderContext,
|
|
3239
3239
|
Switch,
|
|
3240
|
+
buttonClass,
|
|
3240
3241
|
classNames,
|
|
3241
3242
|
getNumberWithDecimal,
|
|
3242
3243
|
parseHex,
|