@mindlogic-ai/logician-ui 2.0.0-alpha.21 → 2.0.0-alpha.22
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.d.mts +37 -4
- package/dist/index.d.ts +37 -4
- package/dist/index.js +20 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/SegmentedControl/SegmentedControl.stories.tsx +35 -0
- package/src/components/SegmentedControl/SegmentedControl.types.ts +2 -1
- package/src/components/Toast/Toast.stories.tsx +16 -6
- package/src/components/Toast/Toast.styles.ts +14 -7
- package/src/components/Toast/Toast.types.ts +1 -1
- package/src/components/Toast/ToastIcon/ToastIcon.tsx +8 -2
- package/src/components/Toast/useToast.tsx +7 -1
package/dist/index.d.mts
CHANGED
|
@@ -12,6 +12,8 @@ import { DataKey as DataKey$1 } from 'recharts/types/util/types.d';
|
|
|
12
12
|
import { Options } from 'react-markdown';
|
|
13
13
|
import { MDXEditorProps as MDXEditorProps$1, MDXEditorMethods } from '@mdxeditor/editor';
|
|
14
14
|
import { GroupBase, Props } from 'react-select';
|
|
15
|
+
import * as _chakra_ui_react_dist_types_toast_toast from '@chakra-ui/react/dist/types/toast/toast';
|
|
16
|
+
import * as _chakra_ui_react_dist_types_toast_toast_types from '@chakra-ui/react/dist/types/toast/toast.types';
|
|
15
17
|
|
|
16
18
|
declare const Accordion: (props: AccordionProps) => react_jsx_runtime.JSX.Element;
|
|
17
19
|
|
|
@@ -835,7 +837,7 @@ interface SeeMoreButtonProps extends ButtonProps$1 {
|
|
|
835
837
|
declare const SeeMoreButton: ({ currentCount, maxCount, ...rest }: SeeMoreButtonProps) => react_jsx_runtime.JSX.Element;
|
|
836
838
|
|
|
837
839
|
type SegmentedControlOption = {
|
|
838
|
-
label:
|
|
840
|
+
label: ReactNode;
|
|
839
841
|
value: string;
|
|
840
842
|
};
|
|
841
843
|
type SegmentedControlProps = Omit<FlexProps, 'onSelect'> & {
|
|
@@ -1017,7 +1019,7 @@ declare const Textarea: _chakra_ui_react.ComponentWithAs<"textarea", TextareaPro
|
|
|
1017
1019
|
interface MLToastOptions {
|
|
1018
1020
|
title?: ReactNode;
|
|
1019
1021
|
description: ReactNode;
|
|
1020
|
-
status?: Extract<UseToastOptions$1['status'], '
|
|
1022
|
+
status?: Extract<UseToastOptions$1['status'], 'info' | 'warning' | 'success' | 'error'>;
|
|
1021
1023
|
}
|
|
1022
1024
|
interface ToastProps extends Omit<BoxProps, 'title'>, MLToastOptions {
|
|
1023
1025
|
}
|
|
@@ -1029,9 +1031,40 @@ declare const Toast: ({ title, description, status, onClose, ...rest }: ToastPro
|
|
|
1029
1031
|
onClose?: () => void;
|
|
1030
1032
|
}) => react_jsx_runtime.JSX.Element;
|
|
1031
1033
|
|
|
1032
|
-
declare const toastStyles:
|
|
1034
|
+
declare const toastStyles: {
|
|
1035
|
+
info: {
|
|
1036
|
+
bg: "primary.light";
|
|
1037
|
+
color: "primary.dark";
|
|
1038
|
+
borderColor: "primary.lighter";
|
|
1039
|
+
};
|
|
1040
|
+
warning: {
|
|
1041
|
+
bg: "warning.lighter";
|
|
1042
|
+
color: "warning.dark";
|
|
1043
|
+
borderColor: "warning.light";
|
|
1044
|
+
};
|
|
1045
|
+
success: {
|
|
1046
|
+
bg: "success.lighter";
|
|
1047
|
+
color: "success.dark";
|
|
1048
|
+
borderColor: "success.light";
|
|
1049
|
+
};
|
|
1050
|
+
error: {
|
|
1051
|
+
bg: "danger.lighter";
|
|
1052
|
+
color: "danger.dark";
|
|
1053
|
+
borderColor: "danger.light";
|
|
1054
|
+
};
|
|
1055
|
+
};
|
|
1033
1056
|
|
|
1034
|
-
declare const useToast: (props?: UseToastOptions) => ({ status, title, description, position, styles: stylesProp, ...rest }: UseToastOptions) => ToastId
|
|
1057
|
+
declare const useToast: (props?: UseToastOptions) => (({ status, title, description, position, styles: stylesProp, ...rest }: UseToastOptions) => ToastId) & {
|
|
1058
|
+
close: (id: ToastId) => void;
|
|
1059
|
+
closeAll: (options?: _chakra_ui_react_dist_types_toast_toast_types.CloseAllToastsOptions | undefined) => void;
|
|
1060
|
+
update: (id: ToastId, options: Omit<_chakra_ui_react.UseToastOptions, "id">) => void;
|
|
1061
|
+
isActive: (id: ToastId) => boolean;
|
|
1062
|
+
promise: <Result extends unknown, Err extends Error = Error>(promise: Promise<Result>, options: {
|
|
1063
|
+
success: _chakra_ui_react_dist_types_toast_toast.MaybeFunction<_chakra_ui_react_dist_types_toast_toast.UseToastPromiseOption, [Result]>;
|
|
1064
|
+
error: _chakra_ui_react_dist_types_toast_toast.MaybeFunction<_chakra_ui_react_dist_types_toast_toast.UseToastPromiseOption, [Err]>;
|
|
1065
|
+
loading: _chakra_ui_react_dist_types_toast_toast.UseToastPromiseOption;
|
|
1066
|
+
}) => void;
|
|
1067
|
+
};
|
|
1035
1068
|
|
|
1036
1069
|
interface TooltipProps extends TooltipProps$1 {
|
|
1037
1070
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,8 @@ import { DataKey as DataKey$1 } from 'recharts/types/util/types.d';
|
|
|
12
12
|
import { Options } from 'react-markdown';
|
|
13
13
|
import { MDXEditorProps as MDXEditorProps$1, MDXEditorMethods } from '@mdxeditor/editor';
|
|
14
14
|
import { GroupBase, Props } from 'react-select';
|
|
15
|
+
import * as _chakra_ui_react_dist_types_toast_toast from '@chakra-ui/react/dist/types/toast/toast';
|
|
16
|
+
import * as _chakra_ui_react_dist_types_toast_toast_types from '@chakra-ui/react/dist/types/toast/toast.types';
|
|
15
17
|
|
|
16
18
|
declare const Accordion: (props: AccordionProps) => react_jsx_runtime.JSX.Element;
|
|
17
19
|
|
|
@@ -835,7 +837,7 @@ interface SeeMoreButtonProps extends ButtonProps$1 {
|
|
|
835
837
|
declare const SeeMoreButton: ({ currentCount, maxCount, ...rest }: SeeMoreButtonProps) => react_jsx_runtime.JSX.Element;
|
|
836
838
|
|
|
837
839
|
type SegmentedControlOption = {
|
|
838
|
-
label:
|
|
840
|
+
label: ReactNode;
|
|
839
841
|
value: string;
|
|
840
842
|
};
|
|
841
843
|
type SegmentedControlProps = Omit<FlexProps, 'onSelect'> & {
|
|
@@ -1017,7 +1019,7 @@ declare const Textarea: _chakra_ui_react.ComponentWithAs<"textarea", TextareaPro
|
|
|
1017
1019
|
interface MLToastOptions {
|
|
1018
1020
|
title?: ReactNode;
|
|
1019
1021
|
description: ReactNode;
|
|
1020
|
-
status?: Extract<UseToastOptions$1['status'], '
|
|
1022
|
+
status?: Extract<UseToastOptions$1['status'], 'info' | 'warning' | 'success' | 'error'>;
|
|
1021
1023
|
}
|
|
1022
1024
|
interface ToastProps extends Omit<BoxProps, 'title'>, MLToastOptions {
|
|
1023
1025
|
}
|
|
@@ -1029,9 +1031,40 @@ declare const Toast: ({ title, description, status, onClose, ...rest }: ToastPro
|
|
|
1029
1031
|
onClose?: () => void;
|
|
1030
1032
|
}) => react_jsx_runtime.JSX.Element;
|
|
1031
1033
|
|
|
1032
|
-
declare const toastStyles:
|
|
1034
|
+
declare const toastStyles: {
|
|
1035
|
+
info: {
|
|
1036
|
+
bg: "primary.light";
|
|
1037
|
+
color: "primary.dark";
|
|
1038
|
+
borderColor: "primary.lighter";
|
|
1039
|
+
};
|
|
1040
|
+
warning: {
|
|
1041
|
+
bg: "warning.lighter";
|
|
1042
|
+
color: "warning.dark";
|
|
1043
|
+
borderColor: "warning.light";
|
|
1044
|
+
};
|
|
1045
|
+
success: {
|
|
1046
|
+
bg: "success.lighter";
|
|
1047
|
+
color: "success.dark";
|
|
1048
|
+
borderColor: "success.light";
|
|
1049
|
+
};
|
|
1050
|
+
error: {
|
|
1051
|
+
bg: "danger.lighter";
|
|
1052
|
+
color: "danger.dark";
|
|
1053
|
+
borderColor: "danger.light";
|
|
1054
|
+
};
|
|
1055
|
+
};
|
|
1033
1056
|
|
|
1034
|
-
declare const useToast: (props?: UseToastOptions) => ({ status, title, description, position, styles: stylesProp, ...rest }: UseToastOptions) => ToastId
|
|
1057
|
+
declare const useToast: (props?: UseToastOptions) => (({ status, title, description, position, styles: stylesProp, ...rest }: UseToastOptions) => ToastId) & {
|
|
1058
|
+
close: (id: ToastId) => void;
|
|
1059
|
+
closeAll: (options?: _chakra_ui_react_dist_types_toast_toast_types.CloseAllToastsOptions | undefined) => void;
|
|
1060
|
+
update: (id: ToastId, options: Omit<_chakra_ui_react.UseToastOptions, "id">) => void;
|
|
1061
|
+
isActive: (id: ToastId) => boolean;
|
|
1062
|
+
promise: <Result extends unknown, Err extends Error = Error>(promise: Promise<Result>, options: {
|
|
1063
|
+
success: _chakra_ui_react_dist_types_toast_toast.MaybeFunction<_chakra_ui_react_dist_types_toast_toast.UseToastPromiseOption, [Result]>;
|
|
1064
|
+
error: _chakra_ui_react_dist_types_toast_toast.MaybeFunction<_chakra_ui_react_dist_types_toast_toast.UseToastPromiseOption, [Err]>;
|
|
1065
|
+
loading: _chakra_ui_react_dist_types_toast_toast.UseToastPromiseOption;
|
|
1066
|
+
}) => void;
|
|
1067
|
+
};
|
|
1035
1068
|
|
|
1036
1069
|
interface TooltipProps extends TooltipProps$1 {
|
|
1037
1070
|
}
|
package/dist/index.js
CHANGED
|
@@ -2260,9 +2260,10 @@ var CopyableCode = ({
|
|
|
2260
2260
|
};
|
|
2261
2261
|
var ToastIcon = ({ status }) => {
|
|
2262
2262
|
const iconProps = {
|
|
2263
|
+
info: /* @__PURE__ */ jsxRuntime.jsx(chunkELL2BUC7_js.LuInfo, { boxSize: "md", color: "primary.main" }),
|
|
2264
|
+
warning: /* @__PURE__ */ jsxRuntime.jsx(chunkELL2BUC7_js.IoWarning, { boxSize: "lg", color: "warning.main" }),
|
|
2263
2265
|
success: /* @__PURE__ */ jsxRuntime.jsx(chunkELL2BUC7_js.IoIosCheckmarkCircle, { boxSize: "lg", color: "success.main" }),
|
|
2264
|
-
error: /* @__PURE__ */ jsxRuntime.jsx(chunkELL2BUC7_js.MdError, { boxSize: "lg", color: "danger.main" })
|
|
2265
|
-
info: /* @__PURE__ */ jsxRuntime.jsx(chunkELL2BUC7_js.LuInfo, { boxSize: "md", color: "primary.main" })
|
|
2266
|
+
error: /* @__PURE__ */ jsxRuntime.jsx(chunkELL2BUC7_js.MdError, { boxSize: "lg", color: "danger.main" })
|
|
2266
2267
|
};
|
|
2267
2268
|
return iconProps[status];
|
|
2268
2269
|
};
|
|
@@ -2303,16 +2304,21 @@ var Toast = ({
|
|
|
2303
2304
|
|
|
2304
2305
|
// src/components/Toast/Toast.styles.ts
|
|
2305
2306
|
var toastStyles = {
|
|
2306
|
-
success: {
|
|
2307
|
-
bg: "success.lighter",
|
|
2308
|
-
color: "success.dark",
|
|
2309
|
-
borderColor: "success.light"
|
|
2310
|
-
},
|
|
2311
2307
|
info: {
|
|
2312
2308
|
bg: "primary.light",
|
|
2313
2309
|
color: "primary.dark",
|
|
2314
2310
|
borderColor: "primary.lighter"
|
|
2315
2311
|
},
|
|
2312
|
+
warning: {
|
|
2313
|
+
bg: "warning.lighter",
|
|
2314
|
+
color: "warning.dark",
|
|
2315
|
+
borderColor: "warning.light"
|
|
2316
|
+
},
|
|
2317
|
+
success: {
|
|
2318
|
+
bg: "success.lighter",
|
|
2319
|
+
color: "success.dark",
|
|
2320
|
+
borderColor: "success.light"
|
|
2321
|
+
},
|
|
2316
2322
|
error: {
|
|
2317
2323
|
bg: "danger.lighter",
|
|
2318
2324
|
color: "danger.dark",
|
|
@@ -2367,7 +2373,13 @@ var useToast = (props) => {
|
|
|
2367
2373
|
activeToasts.current.push(toastId);
|
|
2368
2374
|
return toastId;
|
|
2369
2375
|
};
|
|
2370
|
-
return showToast
|
|
2376
|
+
return Object.assign(showToast, {
|
|
2377
|
+
close: toast.close,
|
|
2378
|
+
closeAll: toast.closeAll,
|
|
2379
|
+
update: toast.update,
|
|
2380
|
+
isActive: toast.isActive,
|
|
2381
|
+
promise: toast.promise
|
|
2382
|
+
});
|
|
2371
2383
|
};
|
|
2372
2384
|
|
|
2373
2385
|
// src/components/CrossPageToasts/CrossPageToasts.tsx
|