@lax-wp/design-system 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.
Files changed (35) hide show
  1. package/README.md +526 -16
  2. package/dist/components/data-display/badge/Badge.d.ts +44 -0
  3. package/dist/components/data-display/banner/Banner.d.ts +41 -0
  4. package/dist/components/data-display/code-editor/CodeEditor.d.ts +4 -0
  5. package/dist/components/data-display/code-editor/JsonGrid.d.ts +14 -0
  6. package/dist/components/data-display/code-editor/Tabs.d.ts +12 -0
  7. package/dist/components/data-display/pdf-viewer/PdfViewer.d.ts +45 -0
  8. package/dist/components/data-display/popper/Popper.d.ts +57 -0
  9. package/dist/components/data-display/status-color-mapping/StatusColorMapping.d.ts +29 -0
  10. package/dist/components/data-display/typography/Typography.d.ts +15 -0
  11. package/dist/components/feedback/toast/Toast.d.ts +29 -0
  12. package/dist/components/forms/checkbox/Checkbox.d.ts +55 -0
  13. package/dist/components/forms/color-picker/ColorPicker.d.ts +60 -0
  14. package/dist/components/forms/creatable-select/CreatableSelect.d.ts +92 -0
  15. package/dist/components/forms/currency-input/CurrencyInputField.d.ts +73 -0
  16. package/dist/components/forms/currency-input/currency.constant.d.ts +6 -0
  17. package/dist/components/forms/date-range/DateRange.d.ts +72 -0
  18. package/dist/components/forms/debounce-input/DebounceInputField.d.ts +76 -0
  19. package/dist/components/forms/input-field/InputField.d.ts +62 -0
  20. package/dist/components/forms/percentage-input/PercentageInputField.d.ts +75 -0
  21. package/dist/components/forms/text-field/TextField.d.ts +48 -0
  22. package/dist/components/forms/toggle/Toggle.d.ts +71 -0
  23. package/dist/components/tooltip/Tooltip.d.ts +13 -0
  24. package/dist/design-system.css +1 -0
  25. package/dist/hooks/useOutsideClick.d.ts +28 -0
  26. package/dist/hooks/usePythonSyntax.d.ts +28 -0
  27. package/dist/hooks/useTheme.d.ts +6 -0
  28. package/dist/index.d.ts +48 -0
  29. package/dist/index.es.js +25703 -4806
  30. package/dist/index.umd.js +225 -31
  31. package/dist/services/monacoManager.d.ts +28 -0
  32. package/dist/types/index.d.ts +66 -0
  33. package/dist/utils/messageConstants.d.ts +16 -0
  34. package/dist/utils/utilities.d.ts +13 -0
  35. package/package.json +40 -13
@@ -0,0 +1,62 @@
1
+ import React from "react";
2
+ /**
3
+ * Props for the InputField component
4
+ */
5
+ export interface InputFieldProps {
6
+ /** Unique identifier for the input field */
7
+ id: string;
8
+ /** The current value of the input field */
9
+ value?: string;
10
+ /** Callback function called when the input value changes */
11
+ onChange: (value: string) => void;
12
+ /** Callback function called on key down events */
13
+ onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
14
+ /** Error message to display below the input */
15
+ message?: string;
16
+ /** Success message to display below the input */
17
+ messageType?: "success" | "error" | "info" | "default";
18
+ /** Default value for the input field */
19
+ defaultValue?: string;
20
+ /** Whether the input field is disabled */
21
+ disabled?: boolean;
22
+ /** Maximum value for number inputs */
23
+ max?: number;
24
+ /** Minimum value for number inputs */
25
+ min?: number;
26
+ /** Whether the field is required */
27
+ required?: boolean;
28
+ /** Label text for the input field */
29
+ label?: string;
30
+ /** Input type (text, email, password, number, etc.) */
31
+ type?: string;
32
+ /** Placeholder text for the input */
33
+ placeholder?: string;
34
+ /** Icon or element to display at the end of the input */
35
+ fieldSuffix?: React.ReactNode;
36
+ /** Additional CSS classes for the wrapper container */
37
+ wrapperClassNames?: string;
38
+ /** Additional CSS classes for the input element */
39
+ inputClassNames?: string;
40
+ /** Inline styles for the input element */
41
+ inputStyle?: React.CSSProperties;
42
+ /** Additional props to pass to the input element */
43
+ inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
44
+ }
45
+ /**
46
+ * A highly customizable input field component with label, validation, and styling support.
47
+ *
48
+ * @example
49
+ * ```tsx
50
+ * <InputField
51
+ * id="email"
52
+ * label="Email Address"
53
+ * type="email"
54
+ * value={email}
55
+ * onChange={setEmail}
56
+ * placeholder="Enter your email"
57
+ * required
58
+ * errorMessage={emailError}
59
+ * />
60
+ * ```
61
+ */
62
+ export declare const InputField: React.ForwardRefExoticComponent<InputFieldProps & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,75 @@
1
+ /**
2
+ * Props for the PercentageInputField component
3
+ */
4
+ export interface PercentageInputFieldProps {
5
+ /** Unique identifier for the input */
6
+ id: string;
7
+ /** Label text to display above the input */
8
+ label?: string;
9
+ /** Current value of the input (number) */
10
+ value?: number | null;
11
+ /** Default value for the input */
12
+ defaultValue?: number | null;
13
+ /** Callback function called when value changes */
14
+ onChange: (value: number | null) => void;
15
+ /** Whether the input is disabled */
16
+ disabled?: boolean;
17
+ /** Whether the field is required */
18
+ required?: boolean;
19
+ /** Placeholder text for the input */
20
+ placeholder?: string;
21
+ /** Message to display below the input */
22
+ message?: string;
23
+ /** Type of message to display */
24
+ messageType?: "success" | "error" | "info" | "default";
25
+ /** Additional CSS classes for the wrapper container */
26
+ wrapperClassName?: string;
27
+ /** Additional CSS classes for the input */
28
+ inputClassName?: string;
29
+ /** Additional CSS classes for the label */
30
+ labelClassName?: string;
31
+ /** Help text to display below the label */
32
+ helpText?: string;
33
+ /** Size variant for the input */
34
+ size?: "small" | "medium" | "large";
35
+ /** Minimum value allowed */
36
+ min?: number;
37
+ /** Maximum value allowed */
38
+ max?: number;
39
+ /** Step value for incrementing */
40
+ step?: number;
41
+ /** Number of decimal places */
42
+ decimalPlaces?: number;
43
+ /** Whether to show percentage symbol */
44
+ showSymbol?: boolean;
45
+ /** Whether to allow negative values */
46
+ allowNegative?: boolean;
47
+ /** Additional props to pass to the input element */
48
+ inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
49
+ /** Inline styles for the input element */
50
+ inputStyle?: React.CSSProperties;
51
+ /** Callback for key down events */
52
+ onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
53
+ /** Callback for focus events */
54
+ onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;
55
+ /** Callback for blur events */
56
+ onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
57
+ }
58
+ /**
59
+ * A highly customizable percentage input component with label, validation, and styling support.
60
+ * Features percentage symbol, decimal control, and comprehensive validation.
61
+ *
62
+ * @example
63
+ * ```tsx
64
+ * <PercentageInputField
65
+ * id="discount"
66
+ * label="Discount Percentage"
67
+ * value={discount}
68
+ * onChange={(value) => setDiscount(value)}
69
+ * min={0}
70
+ * max={100}
71
+ * required
72
+ * />
73
+ * ```
74
+ */
75
+ export declare const PercentageInputField: import("react").ForwardRefExoticComponent<PercentageInputFieldProps & import("react").RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,48 @@
1
+ import type { RefObject } from "react";
2
+ /**
3
+ * Props for the TextAreaField component
4
+ */
5
+ export interface TextFieldProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "onChange"> {
6
+ /** The label text to display above the textarea */
7
+ label?: string;
8
+ /** Placeholder text for the textarea */
9
+ placeholder: string;
10
+ /** Current value of the textarea */
11
+ value?: string;
12
+ /** Callback function called when the textarea value changes */
13
+ onChange: (value: string) => void;
14
+ /** Number of visible text lines for the textarea */
15
+ rows?: number;
16
+ /** Message to display below the textarea */
17
+ message?: string;
18
+ /** Type of message to display */
19
+ messageType?: "success" | "error" | "info" | "default";
20
+ /** Default value for the textarea */
21
+ defaultValue?: string;
22
+ /** Whether the field is required */
23
+ required?: boolean;
24
+ /** Whether the textarea is disabled */
25
+ disabled?: boolean;
26
+ /** Additional CSS classes for the wrapper container */
27
+ className?: string;
28
+ /** Ref object for the textarea element */
29
+ inputRef?: RefObject<HTMLTextAreaElement>;
30
+ /** Maximum character length allowed */
31
+ maxLength?: number;
32
+ /** Whether to preserve original case in the label */
33
+ originalCase?: boolean;
34
+ /** Whether to remove border styling */
35
+ noBorder?: boolean;
36
+ /** Unique identifier for the textarea */
37
+ id?: string;
38
+ /** Custom inline styles for the textarea */
39
+ inputStyle?: React.CSSProperties;
40
+ }
41
+ /**
42
+ * A customizable textarea field component with label, validation, and styling support.
43
+ * Features dark mode support, accessibility enhancements, and character count display.
44
+ *
45
+ * @param props - The props for the TextAreaField component
46
+ * @returns The rendered TextAreaField component
47
+ */
48
+ export declare const TextField: import("react").ForwardRefExoticComponent<TextFieldProps & import("react").RefAttributes<HTMLTextAreaElement>>;
@@ -0,0 +1,71 @@
1
+ import { ReactNode } from "react";
2
+ /**
3
+ * Toggle label direction options
4
+ */
5
+ export type ToggleDirection = "top" | "left" | "right";
6
+ /**
7
+ * Props for the Toggle component
8
+ */
9
+ export interface ToggleProps {
10
+ /** Unique identifier for the toggle */
11
+ id?: string;
12
+ /** Whether the toggle is checked */
13
+ checked: boolean;
14
+ /** Callback function called when toggle state changes */
15
+ onChange: (checked: boolean) => void;
16
+ /** Label text or element to display */
17
+ label?: ReactNode;
18
+ /** Whether the field is required */
19
+ required?: boolean;
20
+ /** Whether the toggle is disabled */
21
+ disabled?: boolean;
22
+ /** Message to display below the toggle */
23
+ message?: string;
24
+ /** Type of message to display */
25
+ messageType?: "success" | "error" | "info" | "default";
26
+ /** Additional CSS classes for the wrapper container */
27
+ wrapperClassName?: string;
28
+ /** Additional CSS classes for the toggle */
29
+ toggleClassName?: string;
30
+ /** Additional CSS classes for the label */
31
+ labelClassName?: string;
32
+ /** Help text to display below the label */
33
+ helpText?: string;
34
+ /** Size variant for the toggle */
35
+ size?: "small" | "medium" | "large";
36
+ /** Label direction relative to toggle */
37
+ labelDirection?: ToggleDirection;
38
+ /** Whether to hide the status text (Yes/No) */
39
+ hideStatus?: boolean;
40
+ /** Custom status text instead of Yes/No */
41
+ statusText?: string;
42
+ /** Whether to show icons in the toggle */
43
+ withIcon?: boolean;
44
+ /** Custom icons for checked/unchecked states */
45
+ icon?: {
46
+ checkedIcon: ReactNode;
47
+ uncheckedIcon: ReactNode;
48
+ };
49
+ /** Visual variant for the toggle */
50
+ variant?: "primary" | "secondary";
51
+ /** Whether to preserve original case in the label */
52
+ originalCase?: boolean;
53
+ /** Whether to stop click propagation */
54
+ stopClickPropagation?: boolean;
55
+ }
56
+ /**
57
+ * A highly customizable toggle component with label, validation, and styling support.
58
+ * Features multiple sizes, variants, icon support, and comprehensive prop support.
59
+ *
60
+ * @example
61
+ * ```tsx
62
+ * <Toggle
63
+ * id="notifications"
64
+ * label="Enable Notifications"
65
+ * checked={notificationsEnabled}
66
+ * onChange={(checked) => setNotificationsEnabled(checked)}
67
+ * required
68
+ * />
69
+ * ```
70
+ */
71
+ export declare const Toggle: import("react").ForwardRefExoticComponent<ToggleProps & import("react").RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,13 @@
1
+ import './styles.css';
2
+ import type { ReactNode } from 'react';
3
+ export interface TooltipProps {
4
+ children: ReactNode;
5
+ title?: string | ReactNode;
6
+ hideTooltip?: boolean;
7
+ delayShow?: boolean;
8
+ whiteSpace?: 'normal' | 'nowrap' | 'pre' | 'pre-wrap' | 'pre-line' | 'initial' | 'inherit';
9
+ placement?: 'auto' | 'auto-start' | 'auto-end' | 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'right' | 'right-start' | 'right-end' | 'left' | 'left-start' | 'left-end';
10
+ className?: string;
11
+ }
12
+ declare const Tooltip: ({ children, title, hideTooltip, delayShow, whiteSpace, ...props }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
13
+ export default Tooltip;
@@ -0,0 +1 @@
1
+ :root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: #e74c3c;--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient( to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55 );--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;padding:4px;width:var(--toastify-toast-width);box-sizing:border-box;color:#fff}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%)}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right)}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%)}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right)}@media only screen and (max-width : 480px){.Toastify__toast-container{width:100vw;padding:0;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}}.Toastify__toast{--y: 0;position:relative;-ms-touch-action:none;touch-action:none;min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:8px;border-radius:var(--toastify-toast-bd-radius);box-shadow:0 4px 12px #0000001a;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);cursor:default;direction:ltr;z-index:0;overflow:hidden}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-body{margin:auto 0;-ms-flex:1 1 auto;flex:1 1 auto;padding:6px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.Toastify__toast-body>div:last-child{word-break:break-word;-ms-flex:1;flex:1}.Toastify__toast-icon{-webkit-margin-end:10px;margin-inline-end:10px;width:20px;-ms-flex-negative:0;flex-shrink:0;display:-ms-flexbox;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}@media only screen and (max-width : 480px){.Toastify__toast{margin-bottom:0;border-radius:0}}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;-ms-flex-item-align:start;align-self:flex-start;z-index:1}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:var(--toastify-z-index);opacity:.7;transform-origin:left;border-bottom-left-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial;border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp{position:absolute;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.Toastify__toast-container{z-index:100000}.Toastify__toast{min-height:64px;border-radius:4px;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f}.Toastify__toast--success,.Toastify__toast--error,.Toastify__toast--warning,.Toastify__toast--info{background:transparent}.Toastify__toast-body{padding:0;margin:0;color:inherit;font-size:14px;font-weight:500;line-height:1.5}.Toastify__close-button{color:inherit;opacity:.7;align-self:flex-start;background:transparent;border:none;padding:4px;margin:0;transition:opacity .2s ease}.Toastify__close-button:hover{opacity:1}.Toastify__progress-bar{background:linear-gradient(to right,#4caf50,#8bc34a,#cddc39,#ffeb3b,#ffc107,#ff9800,#ff5722)}.Toastify__progress-bar--success{background:#12b76a}.Toastify__progress-bar--error{background:#f04438}.Toastify__progress-bar--warning{background:#f79009}.Toastify__progress-bar--info{background:#016dcf}@media (prefers-color-scheme: dark){.Toastify__toast-container{background:transparent}.Toastify__toast{box-shadow:0 4px 6px -1px #0000004d,0 2px 4px -1px #0003}}@media screen and (max-width: 640px){.Toastify__toast-container{left:1rem;right:1rem;bottom:1rem;width:auto}.Toastify__toast{margin-bottom:.5rem}}.Toastify__slide-enter--bottom-right,.Toastify__slide-enter--bottom-left,.Toastify__slide-enter--bottom-center{animation-duration:.3s;animation-timing-function:cubic-bezier(.4,0,.2,1)}.Toastify__slide-exit--bottom-right,.Toastify__slide-exit--bottom-left,.Toastify__slide-exit--bottom-center{animation-duration:.2s;animation-timing-function:cubic-bezier(.4,0,1,1)}.tooltip-container{--tooltipBackground: #101828;--tooltipBorder: #252525;--tooltipColor: #fff;background-color:var(--tooltipBackground);border-radius:8px;border:1px solid var(--tooltipBorder);box-shadow:0 2px 4px #0000002e;color:var(--tooltipColor);display:flex;flex-direction:column;padding:4px 8px;transition:opacity .3s;z-index:9999;overflow-wrap:break-word;word-wrap:break-word;max-width:40ch;font-size:12px;font-weight:500}.tooltip-container[data-popper-interactive=false]{pointer-events:none}.tooltip-arrow{height:1rem;position:absolute;width:1rem;pointer-events:none}.tooltip-arrow:before{border-style:solid;content:"";display:block;height:0;margin:auto;width:0}.tooltip-arrow:after{border-style:solid;content:"";display:block;height:0;margin:auto;position:absolute;width:0}.tooltip-container[data-popper-placement*=bottom] .tooltip-arrow{left:0;margin-top:-.4rem;top:0}.tooltip-container[data-popper-placement*=bottom] .tooltip-arrow:before{border-color:transparent transparent var(--tooltipBorder) transparent;border-width:0 .5rem .4rem .5rem;position:absolute;top:-2px}.tooltip-container[data-popper-placement*=bottom] .tooltip-arrow:after{border-color:transparent transparent var(--tooltipBackground) transparent;border-width:0 .5rem .4rem .5rem}.tooltip-container[data-popper-placement*=top] .tooltip-arrow{bottom:0;left:0;margin-bottom:-1rem}.tooltip-container[data-popper-placement*=top] .tooltip-arrow:before{border-color:var(--tooltipBorder) transparent transparent transparent;border-width:.4rem .5rem 0 .5rem;position:absolute;top:1px}.tooltip-container[data-popper-placement*=top] .tooltip-arrow:after{border-color:var(--tooltipBackground) transparent transparent transparent;border-width:.4rem .5rem 0 .5rem}.tooltip-container[data-popper-placement*=right] .tooltip-arrow{left:0;margin-left:-.7rem}.tooltip-container[data-popper-placement*=right] .tooltip-arrow:before{border-color:transparent var(--tooltipBorder) transparent transparent}.tooltip-container[data-popper-placement*=right] .tooltip-arrow:after{border-color:transparent var(--tooltipBackground) transparent transparent;border-width:.5rem .4rem .5rem 0;left:6px;top:0}.tooltip-container[data-popper-placement*=left] .tooltip-arrow{margin-right:-.7rem;right:0}.tooltip-container[data-popper-placement*=left] .tooltip-arrow:before{border-color:transparent transparent transparent var(--tooltipBorder);border-width:.5rem 0 .5rem .4em}.tooltip-container[data-popper-placement*=left] .tooltip-arrow:after{border-color:transparent transparent transparent var(--tooltipBackground);border-width:.5rem 0 .5rem .4em;left:3px;top:0}
@@ -0,0 +1,28 @@
1
+ import { type RefObject } from "react";
2
+ /**
3
+ * Props for the useOutsideClick hook
4
+ */
5
+ export interface UseOutsideClickProps {
6
+ /** Reference to the element to detect outside clicks for */
7
+ ref: RefObject<HTMLElement>;
8
+ /** Handler function called when clicking outside the referenced element */
9
+ handler: () => void;
10
+ /** Whether the hook is active */
11
+ enabled?: boolean;
12
+ }
13
+ /**
14
+ * Custom hook to detect clicks outside a referenced element
15
+ *
16
+ * @example
17
+ * ```tsx
18
+ * const menuRef = useRef<HTMLDivElement>(null);
19
+ *
20
+ * useOutsideClick({
21
+ * ref: menuRef,
22
+ * handler: () => setIsOpen(false),
23
+ * enabled: isOpen
24
+ * });
25
+ * ```
26
+ */
27
+ export declare const useOutsideClick: ({ ref, handler, enabled, }: UseOutsideClickProps) => void;
28
+ export default useOutsideClick;
@@ -0,0 +1,28 @@
1
+ import { type Monaco } from '@monaco-editor/react';
2
+ export interface UsePythonSyntaxProps {
3
+ monacoEditor: Monaco | null;
4
+ currentEditorModel: any;
5
+ code: string;
6
+ setCode: (code: string) => void;
7
+ enable: boolean;
8
+ checkSyntaxAPI?: (code: string) => Promise<{
9
+ data: {
10
+ error?: {
11
+ message: string;
12
+ line?: number;
13
+ column?: number;
14
+ };
15
+ };
16
+ }>;
17
+ formatCodeAPI?: (code: string) => Promise<{
18
+ data: {
19
+ formatted_code?: string;
20
+ };
21
+ }>;
22
+ }
23
+ export declare const usePythonSyntax: ({ monacoEditor, currentEditorModel, code, setCode, enable, checkSyntaxAPI, formatCodeAPI }: UsePythonSyntaxProps) => {
24
+ pythonError: any;
25
+ pythonLoading: boolean;
26
+ handleCheckSyntax: () => Promise<void>;
27
+ handleFormatCode: () => Promise<void>;
28
+ };
@@ -0,0 +1,6 @@
1
+ import { type ThemeContextType } from '../types';
2
+ /**
3
+ * Simple theme hook for the CodeEditor component
4
+ * In a real application, this would be connected to a global theme context
5
+ */
6
+ export declare const useTheme: () => ThemeContextType;
@@ -0,0 +1,48 @@
1
+ export { InputField } from "./components/forms/input-field/InputField";
2
+ export type { InputFieldProps } from "./components/forms/input-field/InputField";
3
+ export * from "./components/data-display/typography/Typography";
4
+ export { TextField } from "./components/forms/text-field/TextField";
5
+ export type { TextFieldProps } from "./components/forms/text-field/TextField";
6
+ export { Checkbox } from "./components/forms/checkbox/Checkbox";
7
+ export type { CheckboxComponentProps, TCheckboxComponentProps, } from "./components/forms/checkbox/Checkbox";
8
+ export { ColorPicker } from "./components/forms/color-picker/ColorPicker";
9
+ export type { ColorPickerProps, ColorPickerComponentProps, } from "./components/forms/color-picker/ColorPicker";
10
+ export { CreatableSelectField } from "./components/forms/creatable-select/CreatableSelect";
11
+ export type { CreatableSelectProps, SelectOption, TProps, } from "./components/forms/creatable-select/CreatableSelect";
12
+ export { CurrencyInputField } from "./components/forms/currency-input/CurrencyInputField";
13
+ export type { CurrencyInputFieldProps } from "./components/forms/currency-input/CurrencyInputField";
14
+ export { CURRENCIES, CURRENCY_SYMBOLS } from "./components/forms/currency-input/currency.constant";
15
+ export { DateRange } from "./components/forms/date-range/DateRange";
16
+ export type { DateRangeProps, DateRangeValue, } from "./components/forms/date-range/DateRange";
17
+ export { DebounceInputField } from "./components/forms/debounce-input/DebounceInputField";
18
+ export type { DebounceInputFieldProps } from "./components/forms/debounce-input/DebounceInputField";
19
+ export { PercentageInputField } from "./components/forms/percentage-input/PercentageInputField";
20
+ export type { PercentageInputFieldProps } from "./components/forms/percentage-input/PercentageInputField";
21
+ export { Toggle } from "./components/forms/toggle/Toggle";
22
+ export type { ToggleProps, ToggleDirection, } from "./components/forms/toggle/Toggle";
23
+ export { StatusColorMapping } from "./components/data-display/status-color-mapping/StatusColorMapping";
24
+ export type { StatusColorMappingProps, StatusColor, } from "./components/data-display/status-color-mapping/StatusColorMapping";
25
+ export { Badge } from "./components/data-display/badge/Badge";
26
+ export type { BadgeProps, BadgeStatus, BadgeAppearance, BadgeSize, } from "./components/data-display/badge/Badge";
27
+ export { Banner } from "./components/data-display/banner/Banner";
28
+ export type { BannerProps, BannerStatus, } from "./components/data-display/banner/Banner";
29
+ export { PdfViewer } from "./components/data-display/pdf-viewer/PdfViewer";
30
+ export type { PdfViewerProps } from "./components/data-display/pdf-viewer/PdfViewer";
31
+ export { Popper } from "./components/data-display/popper/Popper";
32
+ export type { PopperProps, PopperPlacement, } from "./components/data-display/popper/Popper";
33
+ export { default as Toast, toast } from "./components/feedback/toast/Toast";
34
+ export type { ToastContainerProps, ToastType, ToastPosition, } from "./components/feedback/toast/Toast";
35
+ export { CodeEditor } from "./components/data-display/code-editor/CodeEditor";
36
+ export type { CodeEditorProps } from "./types";
37
+ export { JsonGrid } from "./components/data-display/code-editor/JsonGrid";
38
+ export { Tabs } from "./components/data-display/code-editor/Tabs";
39
+ export type { TabsProps } from "./components/data-display/code-editor/Tabs";
40
+ export { monacoManager } from "./services/monacoManager";
41
+ export { usePythonSyntax } from "./hooks/usePythonSyntax";
42
+ export type { UsePythonSyntaxProps } from "./hooks/usePythonSyntax";
43
+ export { useTheme } from "./hooks/useTheme";
44
+ export { parseJson, filterTopLevelPaths, randomHexString } from "./utils/utilities";
45
+ export { systemMessages } from "./utils/messageConstants";
46
+ export type { JsonValue, JsonObject, JsonArray, Tab, ThemeContextType, PythonError, JsonGridContextType } from "./types";
47
+ export { useOutsideClick } from "./hooks/useOutsideClick";
48
+ export type { UseOutsideClickProps } from "./hooks/useOutsideClick";