@mindlogic-ai/logician-ui 2.0.0-alpha.21 → 2.0.0-alpha.23

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 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: string;
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'], 'success' | 'error' | 'info'>;
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: Record<string, BoxProps>;
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: string;
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'], 'success' | 'error' | 'info'>;
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: Record<string, BoxProps>;
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
@@ -2543,7 +2555,6 @@ var RangeDatePicker = ({
2543
2555
  dateFormat: configs?.dateFormat ?? "MMM dd, yyyy"
2544
2556
  },
2545
2557
  propsConfigs: {
2546
- // Manually make it look like an Input
2547
2558
  triggerBtnProps: {
2548
2559
  justifyContent: "left",
2549
2560
  pl: 2,
@@ -2562,9 +2573,80 @@ var RangeDatePicker = ({
2562
2573
  color: "primary.dark",
2563
2574
  ...propsConfigs?.inputProps
2564
2575
  },
2576
+ popoverCompProps: {
2577
+ popoverContentProps: {
2578
+ p: 2,
2579
+ borderRadius: 16,
2580
+ border: "1px solid",
2581
+ borderColor: "blue.300",
2582
+ boxShadow: "lg",
2583
+ bg: "blue.100",
2584
+ sx: {
2585
+ '.chakra-button[aria-pressed="true"]': {
2586
+ borderRadius: "full"
2587
+ },
2588
+ // pressed="true" 직전의 pressed="false" 요소에 borderRight
2589
+ '.chakra-button[aria-pressed="false"]:has(+ .chakra-button[aria-pressed="true"])': {
2590
+ borderRightRadius: "sm"
2591
+ },
2592
+ // pressed="true" 직후의 pressed="false" 요소에 borderLeft
2593
+ '.chakra-button[aria-pressed="true"] + .chakra-button[aria-pressed="false"]': {
2594
+ borderLeftRadius: "sm"
2595
+ },
2596
+ // week row의 왼쪽 테두리
2597
+ '.chakra-button[aria-pressed="false"]:nth-child(7n + 1)': {
2598
+ borderLeftRadius: "sm"
2599
+ },
2600
+ // week row 오른쪽 테두리
2601
+ '.chakra-button[aria-pressed="false"]:nth-child(7n)': {
2602
+ borderRightRadius: "sm"
2603
+ }
2604
+ },
2605
+ ...propsConfigs?.popoverCompProps?.popoverContentProps
2606
+ },
2607
+ ...propsConfigs?.popoverCompProps
2608
+ },
2609
+ calendarPanelProps: {
2610
+ wrapperProps: {
2611
+ gap: 4,
2612
+ ...propsConfigs?.calendarPanelProps?.wrapperProps
2613
+ },
2614
+ dividerProps: {
2615
+ borderStyle: "none",
2616
+ ...propsConfigs?.calendarPanelProps?.dividerProps
2617
+ },
2618
+ contentProps: {
2619
+ px: 6,
2620
+ py: 4,
2621
+ border: "1px solid",
2622
+ borderColor: "blue.300",
2623
+ borderRadius: 16,
2624
+ bg: "white",
2625
+ ...propsConfigs?.calendarPanelProps?.contentProps
2626
+ },
2627
+ bodyProps: {
2628
+ gap: 0,
2629
+ spacingY: 1,
2630
+ ...propsConfigs?.calendarPanelProps?.bodyProps
2631
+ },
2632
+ ...propsConfigs?.calendarPanelProps
2633
+ },
2634
+ dateNavBtnProps: {
2635
+ color: "primary.main",
2636
+ ...propsConfigs?.dateNavBtnProps
2637
+ },
2638
+ weekdayLabelProps: {
2639
+ mb: 2,
2640
+ color: "gray.1000",
2641
+ fontSize: "xs",
2642
+ fontWeight: "regular",
2643
+ ...propsConfigs?.weekdayLabelProps
2644
+ },
2565
2645
  dayOfMonthBtnProps: {
2566
- // Regular day
2567
2646
  defaultBtnProps: {
2647
+ width: 34,
2648
+ height: 34,
2649
+ color: "gray.1500",
2568
2650
  fontWeight: "regular",
2569
2651
  _hover: {
2570
2652
  background: "primary.light",
@@ -2574,18 +2656,36 @@ var RangeDatePicker = ({
2574
2656
  },
2575
2657
  // Today
2576
2658
  todayBtnProps: {
2577
- color: "gray.1200",
2578
2659
  fontWeight: "semibold",
2579
2660
  ...propsConfigs?.dayOfMonthBtnProps?.todayBtnProps
2580
2661
  },
2581
2662
  selectedBtnProps: {
2582
- color: "primary.dark",
2663
+ color: "white",
2583
2664
  background: "primary.light",
2665
+ fontWeight: "semibold",
2666
+ position: "relative",
2667
+ zIndex: 1,
2668
+ borderRadius: 0,
2669
+ _hover: {
2670
+ background: "primary.light"
2671
+ },
2672
+ _before: {
2673
+ content: '""',
2674
+ position: "absolute",
2675
+ top: 0,
2676
+ bottom: 0,
2677
+ left: 0,
2678
+ right: 0,
2679
+ background: "primary.main",
2680
+ borderRadius: "full",
2681
+ zIndex: -1
2682
+ },
2584
2683
  ...propsConfigs?.dayOfMonthBtnProps?.selectedBtnProps
2585
2684
  },
2586
2685
  isInRangeBtnProps: {
2587
2686
  color: "primary.dark",
2588
2687
  background: "primary.light",
2688
+ borderRadius: 0,
2589
2689
  ...propsConfigs?.dayOfMonthBtnProps?.isInRangeBtnProps
2590
2690
  },
2591
2691
  ...propsConfigs?.dayOfMonthBtnProps
@@ -2611,14 +2711,12 @@ var SingleDatePicker = ({
2611
2711
  dateFormat: configs?.dateFormat ?? "MM/dd/yyyy"
2612
2712
  },
2613
2713
  propsConfigs: {
2614
- // Manually make it look like an Input
2615
2714
  triggerBtnProps: {
2616
2715
  justifyContent: "left",
2617
2716
  pl: 2,
2618
2717
  fontWeight: "regular",
2619
2718
  color: "gray.1500",
2620
2719
  fontSize: "md",
2621
- height: "100%",
2622
2720
  leftIcon: /* @__PURE__ */ jsxRuntime.jsx(
2623
2721
  chunkELL2BUC7_js.MdOutlineCalendarToday,
2624
2722
  {
@@ -2631,9 +2729,53 @@ var SingleDatePicker = ({
2631
2729
  color: "primary.dark",
2632
2730
  ...propsConfigs?.inputProps
2633
2731
  },
2732
+ popoverCompProps: {
2733
+ popoverContentProps: {
2734
+ borderRadius: 16,
2735
+ border: "1px solid",
2736
+ borderColor: "blue.300",
2737
+ boxShadow: "lg",
2738
+ ...propsConfigs?.popoverCompProps?.popoverContentProps
2739
+ },
2740
+ ...propsConfigs?.popoverCompProps
2741
+ },
2742
+ calendarPanelProps: {
2743
+ wrapperProps: {
2744
+ gap: 4,
2745
+ ...propsConfigs?.calendarPanelProps?.wrapperProps
2746
+ },
2747
+ dividerProps: {
2748
+ borderStyle: "none",
2749
+ ...propsConfigs?.calendarPanelProps?.dividerProps
2750
+ },
2751
+ contentProps: {
2752
+ p: 4,
2753
+ border: "none",
2754
+ ...propsConfigs?.calendarPanelProps?.contentProps
2755
+ },
2756
+ bodyProps: {
2757
+ gap: 0,
2758
+ spacingY: 1,
2759
+ ...propsConfigs?.calendarPanelProps?.bodyProps
2760
+ },
2761
+ ...propsConfigs?.calendarPanelProps
2762
+ },
2763
+ dateNavBtnProps: {
2764
+ color: "primary.main",
2765
+ ...propsConfigs?.dateNavBtnProps
2766
+ },
2767
+ weekdayLabelProps: {
2768
+ mb: 2,
2769
+ color: "gray.1000",
2770
+ fontSize: "xs",
2771
+ fontWeight: "regular",
2772
+ ...propsConfigs?.weekdayLabelProps
2773
+ },
2634
2774
  dayOfMonthBtnProps: {
2635
- // Regular day
2636
2775
  defaultBtnProps: {
2776
+ width: 34,
2777
+ height: 34,
2778
+ color: "gray.1500",
2637
2779
  fontWeight: "regular",
2638
2780
  _hover: {
2639
2781
  background: "primary.light",
@@ -2643,13 +2785,13 @@ var SingleDatePicker = ({
2643
2785
  },
2644
2786
  // Today
2645
2787
  todayBtnProps: {
2646
- color: "gray.1200",
2647
2788
  fontWeight: "semibold",
2648
2789
  ...propsConfigs?.dayOfMonthBtnProps?.todayBtnProps
2649
2790
  },
2650
2791
  selectedBtnProps: {
2651
- color: "primary.dark",
2652
- background: "primary.light",
2792
+ color: "white",
2793
+ background: "primary.main",
2794
+ borderRadius: "full",
2653
2795
  ...propsConfigs?.dayOfMonthBtnProps?.selectedBtnProps
2654
2796
  },
2655
2797
  ...propsConfigs?.dayOfMonthBtnProps