@lax-wp/design-system 0.1.5 → 0.1.7

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 (31) hide show
  1. package/package.json +1 -1
  2. package/dist/components/data-display/badge/Badge.d.ts +0 -44
  3. package/dist/components/data-display/banner/Banner.d.ts +0 -41
  4. package/dist/components/data-display/code-editor/CodeEditor.d.ts +0 -4
  5. package/dist/components/data-display/code-editor/JsonGrid.d.ts +0 -14
  6. package/dist/components/data-display/code-editor/Tabs.d.ts +0 -12
  7. package/dist/components/data-display/pdf-viewer/PdfViewer.d.ts +0 -45
  8. package/dist/components/data-display/popper/Popper.d.ts +0 -57
  9. package/dist/components/data-display/status-color-mapping/StatusColorMapping.d.ts +0 -29
  10. package/dist/components/data-display/typography/Typography.d.ts +0 -15
  11. package/dist/components/feedback/toast/Toast.d.ts +0 -29
  12. package/dist/components/forms/checkbox/Checkbox.d.ts +0 -55
  13. package/dist/components/forms/color-picker/ColorPicker.d.ts +0 -60
  14. package/dist/components/forms/creatable-select/CreatableSelect.d.ts +0 -92
  15. package/dist/components/forms/currency-input/CurrencyInputField.d.ts +0 -73
  16. package/dist/components/forms/currency-input/currency.constant.d.ts +0 -6
  17. package/dist/components/forms/date-range/DateRange.d.ts +0 -72
  18. package/dist/components/forms/debounce-input/DebounceInputField.d.ts +0 -76
  19. package/dist/components/forms/input-field/InputField.d.ts +0 -62
  20. package/dist/components/forms/percentage-input/PercentageInputField.d.ts +0 -75
  21. package/dist/components/forms/text-field/TextField.d.ts +0 -48
  22. package/dist/components/forms/toggle/Toggle.d.ts +0 -71
  23. package/dist/components/tooltip/Tooltip.d.ts +0 -13
  24. package/dist/hooks/useOutsideClick.d.ts +0 -28
  25. package/dist/hooks/usePythonSyntax.d.ts +0 -28
  26. package/dist/hooks/useTheme.d.ts +0 -6
  27. package/dist/index.d.ts +0 -48
  28. package/dist/services/monacoManager.d.ts +0 -28
  29. package/dist/types/index.d.ts +0 -66
  30. package/dist/utils/messageConstants.d.ts +0 -16
  31. package/dist/utils/utilities.d.ts +0 -13
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lax-wp/design-system",
3
3
  "private": false,
4
- "version": "0.1.5",
4
+ "version": "0.1.7",
5
5
  "type": "module",
6
6
  "main": "dist/index.umd.js",
7
7
  "module": "dist/index.es.js",
@@ -1,44 +0,0 @@
1
- /**
2
- * Available badge status options
3
- */
4
- export type BadgeStatus = "default" | "primary" | "warning" | "error" | "neutral" | "success" | "info";
5
- /**
6
- * Badge appearance variants
7
- */
8
- export type BadgeAppearance = "filled" | "outline";
9
- /**
10
- * Badge size variants
11
- */
12
- export type BadgeSize = "sm" | "md" | "lg";
13
- /**
14
- * Props for the Badge component
15
- */
16
- export interface BadgeProps {
17
- /** The badge status/color variant */
18
- status?: BadgeStatus;
19
- /** The text content to display */
20
- children: string;
21
- /** Visual appearance style */
22
- appearance?: BadgeAppearance;
23
- /** Size variant */
24
- size?: BadgeSize;
25
- /** Additional CSS classes for the wrapper */
26
- className?: string;
27
- /** Whether to use rounded pill shape */
28
- isRounded?: boolean;
29
- /** Whether to capitalize the text */
30
- capitalize?: boolean;
31
- /** Custom aria-label for accessibility */
32
- "aria-label"?: string;
33
- }
34
- /**
35
- * Badge component displays small status indicators or labels
36
- *
37
- * @example
38
- * ```tsx
39
- * <Badge status="success">Active</Badge>
40
- * <Badge status="error" appearance="filled">Error</Badge>
41
- * <Badge status="warning" size="sm" isRounded>Warning</Badge>
42
- * ```
43
- */
44
- export declare const Badge: import("react").ForwardRefExoticComponent<BadgeProps & import("react").RefAttributes<HTMLSpanElement>>;
@@ -1,41 +0,0 @@
1
- /**
2
- * Available banner status options
3
- */
4
- export type BannerStatus = "success" | "error" | "warning" | "info" | "archived" | "canceled" | "queued" | "paused" | "awaiting_action" | "skipped" | "pending";
5
- /**
6
- * Props for the Banner component
7
- */
8
- export interface BannerProps {
9
- /** The banner status/color variant */
10
- status: BannerStatus;
11
- /** The main content to display */
12
- children: React.ReactNode;
13
- /** Additional content to display on the right side */
14
- additionalChildren?: React.ReactNode;
15
- /** Component to render when expanded (for error status) */
16
- ExpandedComponent?: React.ComponentType<{
17
- children: React.ReactNode;
18
- }>;
19
- /** Whether the banner is expandable */
20
- expandable?: boolean;
21
- /** Custom icon to override default status icon */
22
- icon?: React.ReactNode;
23
- /** Additional CSS classes for the wrapper */
24
- className?: string;
25
- /** Callback when banner is clicked (if expandable) */
26
- onClick?: () => void;
27
- /** Custom aria-label for accessibility */
28
- "aria-label"?: string;
29
- }
30
- /**
31
- * Banner component displays important information with status-based styling
32
- *
33
- * @example
34
- * ```tsx
35
- * <Banner status="success">Operation completed successfully</Banner>
36
- * <Banner status="error" expandable ExpandedComponent={ErrorDetails}>
37
- * Error occurred
38
- * </Banner>
39
- * ```
40
- */
41
- export declare const Banner: import("react").ForwardRefExoticComponent<BannerProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,4 +0,0 @@
1
- import { type FC } from 'react';
2
- import { type CodeEditorProps } from '../../../types';
3
- export type TTabKey = 'JSON' | 'Grid';
4
- export declare const CodeEditor: FC<CodeEditorProps>;
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- export interface JsonGridProps {
3
- isFullScreen: boolean;
4
- allExpanded: boolean;
5
- toggleAll: () => void;
6
- isEditMode: boolean;
7
- isDarkMode: boolean;
8
- style: React.CSSProperties;
9
- value: string;
10
- onChange?: (value: string) => void;
11
- setIsAddKeyModalOpen: (open: boolean) => void;
12
- isAddKeyModalOpen: boolean;
13
- }
14
- export declare const JsonGrid: React.FC<JsonGridProps>;
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- export interface TabsProps<T extends string> {
3
- variant?: 'default' | 'switch';
4
- tabs: T[];
5
- activeTab: T;
6
- onTabClick: (tab: T) => void;
7
- size?: 'sm' | 'md' | 'lg';
8
- tabIcons?: Partial<Record<T, React.ReactNode>>;
9
- height?: string;
10
- className?: string;
11
- }
12
- export declare const Tabs: <T extends string>({ variant, tabs, activeTab, onTabClick, size, tabIcons, height, className }: TabsProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -1,45 +0,0 @@
1
- /**
2
- * Props for the PdfViewer component
3
- */
4
- export interface PdfViewerProps {
5
- /** URL of the PDF file to display */
6
- pdfUrl: string;
7
- /** Width of the viewer */
8
- width?: string | number;
9
- /** Height of the viewer */
10
- height?: string | number;
11
- /** Additional CSS classes for the wrapper */
12
- className?: string;
13
- /** Additional CSS classes for the iframe */
14
- iframeClassName?: string;
15
- /** Title for the PDF viewer iframe */
16
- title?: string;
17
- /** Whether to show loading state */
18
- showLoading?: boolean;
19
- /** Custom loading component */
20
- loadingComponent?: React.ReactNode;
21
- /** Custom error component */
22
- errorComponent?: React.ReactNode;
23
- /** Callback when PDF fails to load */
24
- onError?: () => void;
25
- /** Callback when PDF loads successfully */
26
- onLoad?: () => void;
27
- /** Whether to allow fullscreen */
28
- allowFullScreen?: boolean;
29
- /** Custom aria-label for accessibility */
30
- "aria-label"?: string;
31
- }
32
- /**
33
- * PdfViewer component displays PDF documents in an embedded iframe
34
- *
35
- * @example
36
- * ```tsx
37
- * <PdfViewer
38
- * pdfUrl="/documents/report.pdf"
39
- * width="100%"
40
- * height="600px"
41
- * title="Monthly Report"
42
- * />
43
- * ```
44
- */
45
- export declare const PdfViewer: import("react").ForwardRefExoticComponent<PdfViewerProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,57 +0,0 @@
1
- /**
2
- * Available placement options for the Popper
3
- */
4
- export type PopperPlacement = "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end";
5
- /**
6
- * Props for the Popper component
7
- */
8
- export interface PopperProps {
9
- /** The trigger element (button content) */
10
- children: React.ReactNode;
11
- /** The popper content to display */
12
- component: React.ReactNode;
13
- /** Placement position relative to trigger */
14
- placement?: PopperPlacement;
15
- /** Whether the popper is open */
16
- isOpen: boolean;
17
- /** Function to toggle the popper open/closed state */
18
- toggleMenu?: (event?: React.MouseEvent<HTMLButtonElement>) => void;
19
- /** Portal container ID (defaults to document.body) */
20
- parentContainer?: string;
21
- /** Whether to remove default spacing on trigger */
22
- noSpacing?: boolean;
23
- /** Additional CSS classes for the trigger button */
24
- triggerClassName?: string;
25
- /** Additional CSS classes for the popper container */
26
- containerClassName?: string;
27
- /** Additional CSS classes for the wrapper */
28
- className?: string;
29
- /** Whether to show arrow pointing to trigger */
30
- showArrow?: boolean;
31
- /** Custom offset from trigger element */
32
- offset?: number;
33
- /** Whether to disable outside click handling */
34
- disableOutsideClick?: boolean;
35
- /** Custom aria-label for accessibility */
36
- "aria-label"?: string;
37
- /** Whether trigger is disabled */
38
- disabled?: boolean;
39
- }
40
- /**
41
- * Popper component provides positioned floating content relative to a trigger element
42
- *
43
- * @example
44
- * ```tsx
45
- * const [isOpen, setIsOpen] = useState(false);
46
- *
47
- * <Popper
48
- * isOpen={isOpen}
49
- * toggleMenu={() => setIsOpen(!isOpen)}
50
- * placement="bottom-start"
51
- * component={<MenuContent />}
52
- * >
53
- * <button>Open Menu</button>
54
- * </Popper>
55
- * ```
56
- */
57
- export declare const Popper: import("react").ForwardRefExoticComponent<PopperProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,29 +0,0 @@
1
- /**
2
- * Available status color options for the StatusColorMapping component
3
- */
4
- export type StatusColor = "blue" | "green" | "yellow" | "orange" | "red" | "navy" | "grey" | "purple" | "teal" | "peach";
5
- /**
6
- * Props for the StatusColorMapping component
7
- */
8
- export interface StatusColorMappingProps {
9
- /** The status color variant to apply */
10
- status?: StatusColor;
11
- /** The text content to display */
12
- children: string;
13
- /** Additional CSS classes for the wrapper */
14
- className?: string;
15
- /** Whether to use small size variant */
16
- size?: "small" | "medium" | "large";
17
- /** Custom aria-label for accessibility */
18
- "aria-label"?: string;
19
- }
20
- /**
21
- * StatusColorMapping component displays text with status-based color styling
22
- *
23
- * @example
24
- * ```tsx
25
- * <StatusColorMapping status="green">Active</StatusColorMapping>
26
- * <StatusColorMapping status="red" size="small">Error</StatusColorMapping>
27
- * ```
28
- */
29
- export declare const StatusColorMapping: import("react").ForwardRefExoticComponent<StatusColorMappingProps & import("react").RefAttributes<HTMLSpanElement>>;
@@ -1,15 +0,0 @@
1
- import React from "react";
2
- export interface TypographyProps {
3
- children: React.ReactNode;
4
- variant?: "regular" | "medium" | "semibold" | "bold" | "extrablack";
5
- size?: "extra-small" | "small" | "display-small" | "medium" | "display-medium" | "large" | "extra-large";
6
- className?: string;
7
- onClick?(event: React.MouseEvent<HTMLDivElement>): void;
8
- highlight?: boolean;
9
- appearance?: "title" | "body" | "subtitle" | "custom";
10
- style?: React.CSSProperties;
11
- }
12
- export declare const Typography: {
13
- ({ children, variant, size, onClick, className, highlight, appearance, style, }: TypographyProps): import("react/jsx-runtime").JSX.Element;
14
- displayName: string;
15
- };
@@ -1,29 +0,0 @@
1
- import React, { ReactNode } from 'react';
2
- import 'react-toastify/dist/ReactToastify.css';
3
- import './styles.css';
4
- export type ToastType = 'success' | 'error' | 'warning' | 'info' | 'in-progress';
5
- export type ToastPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
6
- export interface ToastContainerProps {
7
- position?: ToastPosition;
8
- autoClose?: number | false;
9
- hideProgressBar?: boolean;
10
- newestOnTop?: boolean;
11
- closeOnClick?: boolean;
12
- pauseOnFocusLoss?: boolean;
13
- draggable?: boolean;
14
- pauseOnHover?: boolean;
15
- rtl?: boolean;
16
- className?: string;
17
- style?: React.CSSProperties;
18
- }
19
- export declare const Toast: React.FC<ToastContainerProps>;
20
- export declare const toast: {
21
- success: (message: ReactNode, options?: any) => import("react-toastify").Id;
22
- error: (message: ReactNode, options?: any) => import("react-toastify").Id;
23
- warning: (message: ReactNode, options?: any) => import("react-toastify").Id;
24
- info: (message: ReactNode, options?: any) => import("react-toastify").Id;
25
- inProgress: (message: ReactNode, options?: any) => import("react-toastify").Id;
26
- dismiss: (toastId?: string | number) => void;
27
- isActive: (toastId: string | number) => boolean;
28
- };
29
- export default Toast;
@@ -1,55 +0,0 @@
1
- import type { CheckboxChangeEvent, CheckboxProps, CheckboxRef } from "antd";
2
- /**
3
- * Props for the Checkbox component
4
- */
5
- export interface CheckboxComponentProps {
6
- /** Unique identifier for the checkbox */
7
- id: string;
8
- /** Label text to display next to the checkbox */
9
- label?: string;
10
- /** Whether the checkbox is checked */
11
- checked?: boolean;
12
- /** Whether the checkbox is checked (alias for checked) */
13
- isChecked?: boolean;
14
- /** Callback function called when checkbox state changes */
15
- onChange: (checked: boolean, event: CheckboxChangeEvent) => void;
16
- /** Whether the checkbox is disabled */
17
- disabled?: boolean;
18
- /** Whether the field is required */
19
- required?: boolean;
20
- /** Message to display below the checkbox */
21
- message?: string;
22
- /** Type of message to display */
23
- messageType?: "success" | "error" | "info" | "default";
24
- /** Additional CSS classes for the wrapper container */
25
- wrapperClassName?: string;
26
- /** Additional CSS classes for the checkbox input */
27
- checkboxClassName?: string;
28
- /** Additional CSS classes for the label */
29
- labelClassName?: string;
30
- /** Size variant for the checkbox */
31
- size?: "small" | "medium" | "large";
32
- /** Visual variant for the checkbox */
33
- variant?: "default" | "outline" | "solid";
34
- /** Whether to show the label on the left side */
35
- labelPosition?: "left" | "right";
36
- /** Additional props to pass to the Ant Design Checkbox */
37
- checkboxProps?: Omit<CheckboxProps, "checked" | "onChange" | "id" | "disabled">;
38
- }
39
- /**
40
- * A highly customizable checkbox component with label, validation, and styling support.
41
- * Features dark mode support, accessibility enhancements, and comprehensive prop support.
42
- *
43
- * @example
44
- * ```tsx
45
- * <Checkbox
46
- * id="terms"
47
- * label="I agree to the terms and conditions"
48
- * checked={agreedToTerms}
49
- * onChange={(checked) => setAgreedToTerms(checked)}
50
- * required
51
- * />
52
- * ```
53
- */
54
- export declare const Checkbox: import("react").ForwardRefExoticComponent<CheckboxComponentProps & import("react").RefAttributes<CheckboxRef>>;
55
- export type TCheckboxComponentProps = CheckboxComponentProps;
@@ -1,60 +0,0 @@
1
- import type { ChangeEvent } from "react";
2
- /**
3
- * Props for the ColorPicker component
4
- */
5
- export interface ColorPickerProps {
6
- /** Unique identifier for the color picker */
7
- id: string;
8
- /** Label text to display above the color picker */
9
- label?: string;
10
- /** Current color value (hex format) */
11
- value?: string;
12
- /** Default color value (hex format) */
13
- defaultValue?: string;
14
- /** Callback function called when color value changes */
15
- onChange: (color: string, event: ChangeEvent<HTMLInputElement>) => void;
16
- /** Callback function called when color value changes (legacy) */
17
- onColorChange?: (color: string) => void;
18
- /** Whether the color picker is disabled */
19
- disabled?: boolean;
20
- /** Whether the field is required */
21
- required?: boolean;
22
- /** Message to display below the color picker */
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 color input */
29
- inputClassName?: string;
30
- /** Additional CSS classes for the label */
31
- labelClassName?: string;
32
- /** Size variant for the color picker */
33
- size?: "small" | "medium" | "large";
34
- /** Whether to show the color value as text */
35
- showValue?: boolean;
36
- /** Format for displaying the color value */
37
- valueFormat?: "hex" | "rgb" | "hsl";
38
- /** Additional props to pass to the input element */
39
- inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
40
- /** Help text to display below the label */
41
- helpText?: string;
42
- }
43
- /**
44
- * A highly customizable color picker component with label, validation, and styling support.
45
- * Features dark mode support, accessibility enhancements, and comprehensive prop support.
46
- *
47
- * @example
48
- * ```tsx
49
- * <ColorPicker
50
- * id="theme-color"
51
- * label="Theme Color"
52
- * value={themeColor}
53
- * onChange={(color) => setThemeColor(color)}
54
- * showValue
55
- * required
56
- * />
57
- * ```
58
- */
59
- export declare const ColorPicker: import("react").ForwardRefExoticComponent<ColorPickerProps & import("react").RefAttributes<HTMLInputElement>>;
60
- export type ColorPickerComponentProps = ColorPickerProps;
@@ -1,92 +0,0 @@
1
- import type { GroupBase, SingleValue, MultiValue, ActionMeta, Props as ReactSelectProps, SelectInstance } from "react-select";
2
- import type { components } from "react-select";
3
- /**
4
- * Option type for the CreatableSelect component
5
- */
6
- export interface SelectOption {
7
- /** The value of the option */
8
- value: string | number;
9
- /** The label displayed for the option */
10
- label: string;
11
- /** Whether the option is disabled */
12
- isDisabled?: boolean;
13
- /** Additional data for the option */
14
- data?: Record<string, unknown>;
15
- }
16
- /**
17
- * Props for the CreatableSelect component
18
- */
19
- export interface CreatableSelectProps {
20
- /** Unique identifier for the select */
21
- id: string;
22
- /** Label text to display above the select */
23
- label?: string;
24
- /** Placeholder text for the select */
25
- placeholder?: string;
26
- /** Current value for single select */
27
- value?: SelectOption | null;
28
- /** Current values for multi select */
29
- selectedValues?: SelectOption[];
30
- /** Callback function called when selection changes */
31
- onChange: (value: SingleValue<SelectOption> | MultiValue<SelectOption>, actionMeta: ActionMeta<SelectOption>) => void;
32
- /** Callback function called when selection changes (legacy) */
33
- onColorChange?: (data: SelectOption | SelectOption[] | null) => void;
34
- /** Array of available options */
35
- selectOptions: SelectOption[];
36
- /** Whether the select is in loading state */
37
- loading?: boolean;
38
- /** Whether multiple selections are allowed */
39
- multiSelect?: boolean;
40
- /** Whether the select is disabled */
41
- disabled?: boolean;
42
- /** Whether the select is clearable */
43
- isClearable?: boolean;
44
- /** Whether the field is required */
45
- required?: boolean;
46
- /** Message to display below the select */
47
- message?: string;
48
- /** Type of message to display */
49
- messageType?: "success" | "error" | "info" | "default";
50
- /** Whether to preserve original case in the label */
51
- originalCase?: boolean;
52
- /** Additional CSS classes for the wrapper container */
53
- wrapperClassName?: string;
54
- /** Additional CSS classes for the select */
55
- selectClassName?: string;
56
- /** Additional CSS classes for the label */
57
- labelClassName?: string;
58
- /** Help text to display below the label */
59
- helpText?: string;
60
- /** Size variant for the select */
61
- size?: "small" | "medium" | "large";
62
- /** Custom filter function for options */
63
- filterOption?: ReactSelectProps<SelectOption, boolean, GroupBase<SelectOption>>["filterOption"];
64
- /** Additional props to pass to the react-select component */
65
- selectProps?: Partial<ReactSelectProps<SelectOption, boolean, GroupBase<SelectOption>>>;
66
- /** Custom components to override defaults */
67
- components?: Partial<typeof components>;
68
- /** Array of tags for categorization */
69
- tags?: string[];
70
- /** Tooltip text */
71
- tooltip?: string;
72
- }
73
- /**
74
- * A highly customizable creatable select component with label, validation, and styling support.
75
- * Features dark mode support, accessibility enhancements, and comprehensive prop support.
76
- * Built on top of react-select/creatable for advanced functionality.
77
- *
78
- * @example
79
- * ```tsx
80
- * <CreatableSelectField
81
- * id="tags"
82
- * label="Tags"
83
- * selectOptions={tagOptions}
84
- * value={selectedTag}
85
- * onChange={(newValue) => setSelectedTag(newValue)}
86
- * placeholder="Select or create tags..."
87
- * multiSelect
88
- * />
89
- * ```
90
- */
91
- export declare const CreatableSelectField: import("react").ForwardRefExoticComponent<CreatableSelectProps & import("react").RefAttributes<SelectInstance<SelectOption, boolean, GroupBase<SelectOption>>>>;
92
- export type TProps = CreatableSelectProps;
@@ -1,73 +0,0 @@
1
- /**
2
- * Props for the CurrencyInputField component
3
- */
4
- export interface CurrencyInputFieldProps {
5
- /** Unique identifier for the currency 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, currencyCode: string) => 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
- /** Current currency code */
36
- currencyCode?: string;
37
- /** Whether to allow currency selection */
38
- allowCurrencyChange?: boolean;
39
- /** Available currency options (defaults to all) */
40
- availableCurrencies?: string[];
41
- /** Whether to show currency symbol */
42
- showSymbol?: boolean;
43
- /** Whether to format value display */
44
- formatValue?: boolean;
45
- /** Minimum value allowed */
46
- min?: number;
47
- /** Maximum value allowed */
48
- max?: number;
49
- /** Number of decimal places */
50
- decimalPlaces?: number;
51
- /** Additional props to pass to the input element */
52
- inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
53
- /** Inline styles for the input element */
54
- inputStyle?: React.CSSProperties;
55
- }
56
- /**
57
- * A highly customizable currency input component with label, validation, and styling support.
58
- * Features currency selection, formatting, validation, and comprehensive prop support.
59
- *
60
- * @example
61
- * ```tsx
62
- * <CurrencyInputField
63
- * id="price"
64
- * label="Price"
65
- * value={price}
66
- * onChange={(value, currency) => setPrice(value)}
67
- * currencyCode="USD"
68
- * allowCurrencyChange
69
- * required
70
- * />
71
- * ```
72
- */
73
- export declare const CurrencyInputField: import("react").ForwardRefExoticComponent<CurrencyInputFieldProps & import("react").RefAttributes<HTMLInputElement>>;
@@ -1,6 +0,0 @@
1
- export declare const CURRENCIES: {
2
- value: string;
3
- label: string;
4
- symbol: string;
5
- }[];
6
- export declare const CURRENCY_SYMBOLS: Record<string, string>;
@@ -1,72 +0,0 @@
1
- /**
2
- * Date range value type
3
- */
4
- export interface DateRangeValue {
5
- /** Start date */
6
- startDate: Date | null;
7
- /** End date */
8
- endDate: Date | null;
9
- }
10
- /**
11
- * Props for the DateRange component
12
- */
13
- export interface DateRangeProps {
14
- /** Unique identifier for the date range */
15
- id: string;
16
- /** Label text to display above the date range */
17
- label?: string;
18
- /** Current date range value */
19
- value?: DateRangeValue;
20
- /** Default date range value */
21
- defaultValue?: DateRangeValue;
22
- /** Callback function called when date range changes */
23
- onChange: (value: DateRangeValue) => void;
24
- /** Whether the date range is disabled */
25
- disabled?: boolean;
26
- /** Whether the field is required */
27
- required?: boolean;
28
- /** Message to display below the date range */
29
- message?: string;
30
- /** Type of message to display */
31
- messageType?: "success" | "error" | "info" | "default";
32
- /** Additional CSS classes for the wrapper container */
33
- wrapperClassName?: string;
34
- /** Additional CSS classes for the input containers */
35
- inputClassName?: string;
36
- /** Additional CSS classes for the label */
37
- labelClassName?: string;
38
- /** Help text to display below the label */
39
- helpText?: string;
40
- /** Size variant for the inputs */
41
- size?: "small" | "medium" | "large";
42
- /** Date format for display */
43
- dateFormat?: string;
44
- /** Minimum date allowed */
45
- minDate?: Date;
46
- /** Maximum date allowed */
47
- maxDate?: Date;
48
- /** Placeholder text for start date */
49
- startPlaceholder?: string;
50
- /** Placeholder text for end date */
51
- endPlaceholder?: string;
52
- /** Whether to allow clearing the selection */
53
- allowClear?: boolean;
54
- /** Additional props to pass to the input elements */
55
- inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
56
- }
57
- /**
58
- * A highly customizable date range component with label, validation, and styling support.
59
- * Features proper date handling, validation, and comprehensive prop support.
60
- *
61
- * @example
62
- * ```tsx
63
- * <DateRange
64
- * id="event-dates"
65
- * label="Event Duration"
66
- * value={dateRange}
67
- * onChange={(range) => setDateRange(range)}
68
- * required
69
- * />
70
- * ```
71
- */
72
- export declare const DateRange: import("react").ForwardRefExoticComponent<DateRangeProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,76 +0,0 @@
1
- /**
2
- * Props for the DebounceInputField component
3
- */
4
- export interface DebounceInputFieldProps {
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 */
10
- value?: string;
11
- /** Default value for the input */
12
- defaultValue?: string;
13
- /** Callback function called when value changes (debounced) */
14
- onChange: (value: string) => void;
15
- /** Callback function called on every keystroke (immediate) */
16
- onImmediateChange?: (value: string) => void;
17
- /** Whether the input is disabled */
18
- disabled?: boolean;
19
- /** Whether the field is required */
20
- required?: boolean;
21
- /** Placeholder text for the input */
22
- placeholder?: string;
23
- /** Message to display below the input */
24
- message?: string;
25
- /** Type of message to display */
26
- messageType?: "success" | "error" | "info" | "default";
27
- /** Additional CSS classes for the wrapper container */
28
- wrapperClassName?: string;
29
- /** Additional CSS classes for the input */
30
- inputClassName?: string;
31
- /** Additional CSS classes for the label */
32
- labelClassName?: string;
33
- /** Help text to display below the label */
34
- helpText?: string;
35
- /** Size variant for the input */
36
- size?: "small" | "medium" | "large";
37
- /** Input type */
38
- type?: "text" | "email" | "url" | "search" | "tel" | "password";
39
- /** Debounce timeout in milliseconds */
40
- debounceTimeout?: number;
41
- /** Minimum value for number inputs */
42
- min?: number;
43
- /** Maximum value for number inputs */
44
- max?: number;
45
- /** Maximum length for text inputs */
46
- maxLength?: number;
47
- /** Pattern for input validation */
48
- pattern?: string;
49
- /** Additional props to pass to the input element */
50
- inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
51
- /** Inline styles for the input element */
52
- inputStyle?: React.CSSProperties;
53
- /** Callback for key down events */
54
- onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
55
- /** Callback for focus events */
56
- onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;
57
- /** Callback for blur events */
58
- onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
59
- }
60
- /**
61
- * A highly customizable debounced input component with label, validation, and styling support.
62
- * Features configurable debounce timing, immediate change callbacks, and comprehensive prop support.
63
- *
64
- * @example
65
- * ```tsx
66
- * <DebounceInputField
67
- * id="search"
68
- * label="Search"
69
- * value={searchTerm}
70
- * onChange={(value) => setSearchTerm(value)}
71
- * debounceTimeout={300}
72
- * placeholder="Type to search..."
73
- * />
74
- * ```
75
- */
76
- export declare const DebounceInputField: import("react").ForwardRefExoticComponent<DebounceInputFieldProps & import("react").RefAttributes<HTMLInputElement>>;
@@ -1,62 +0,0 @@
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>>;
@@ -1,75 +0,0 @@
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>>;
@@ -1,48 +0,0 @@
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>>;
@@ -1,71 +0,0 @@
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>>;
@@ -1,13 +0,0 @@
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;
@@ -1,28 +0,0 @@
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;
@@ -1,28 +0,0 @@
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
- };
@@ -1,6 +0,0 @@
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;
package/dist/index.d.ts DELETED
@@ -1,48 +0,0 @@
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";
@@ -1,28 +0,0 @@
1
- import { type Monaco } from '@monaco-editor/react';
2
- declare class MonacoManager {
3
- private static instance;
4
- private monaco;
5
- private initialized;
6
- private initializationPromise;
7
- static getInstance(): MonacoManager;
8
- initialize(): Promise<Monaco>;
9
- private performInitialization;
10
- getMonaco(): Monaco | null;
11
- isInitialized(): boolean;
12
- /**
13
- * Safely get an editor instance by index
14
- */
15
- getEditorInstance(index?: number): any;
16
- /**
17
- * Get the first available editor instance
18
- */
19
- getFirstEditorInstance(): Monaco | null;
20
- /**
21
- * Safely dispose of disposables with error handling
22
- */
23
- static safeDispose(disposables: Array<{
24
- dispose: () => void;
25
- } | null | undefined>): void;
26
- }
27
- export declare const monacoManager: MonacoManager;
28
- export type { Monaco };
@@ -1,66 +0,0 @@
1
- export type JsonValue = string | number | boolean | null | JsonObject | JsonArray;
2
- export type JsonObject = {
3
- [key: string]: JsonValue;
4
- };
5
- export type JsonArray = JsonValue[];
6
- export interface Tab<T extends string> {
7
- name: T;
8
- is_default: boolean;
9
- is_hidden: boolean;
10
- is_pinned: boolean;
11
- }
12
- export interface CodeEditorProps {
13
- value: string;
14
- onChange?: (value: string) => void;
15
- withFullScreen?: boolean;
16
- withTheme?: boolean;
17
- isEditMode?: boolean;
18
- height?: string;
19
- language?: 'json' | 'python';
20
- monacoEditor?: any;
21
- setIsDisableSave?: (flag: boolean) => void;
22
- isShowCopy?: boolean;
23
- isShowDownload?: boolean;
24
- withJsonGrid?: boolean;
25
- }
26
- export interface ThemeContextType {
27
- theme: 'light' | 'dark';
28
- editorTheme: 'vs' | 'vs-dark';
29
- setEditorTheme: (theme: 'vs' | 'vs-dark') => void;
30
- }
31
- export interface UsePythonSyntaxProps {
32
- monacoEditor: any;
33
- currentEditorModel: any;
34
- code: string;
35
- setCode: (code: string) => void;
36
- enable: boolean;
37
- }
38
- export interface PythonError {
39
- message: string;
40
- line?: number;
41
- column?: number;
42
- }
43
- export interface JsonGridContextType {
44
- allExpanded: boolean;
45
- toggleAll: () => void;
46
- isEditMode: boolean;
47
- isDarkMode: boolean;
48
- selectedPaths: string[];
49
- setSelectedPaths: (paths: string[]) => void;
50
- selectedTopLevelPaths: string[];
51
- setSelectedTopLevelPaths: (paths: string[]) => void;
52
- selectedPathModification: string | null;
53
- setSelectedPathModification: (path: string | null) => void;
54
- selectedPathForEdit: string | null;
55
- setSelectedPathForEdit: (path: string | null) => void;
56
- jsonData: JsonObject | JsonArray;
57
- setJsonData: (data: JsonObject | JsonArray) => void;
58
- error: string | null;
59
- setError: (error: string | null) => void;
60
- handleDelete: (paths: string[]) => void;
61
- handleDuplicate: (paths: string[]) => void;
62
- handleCopy: (paths: string[]) => Promise<boolean>;
63
- handleAddKey: (path: string, key: string, value: JsonValue | undefined) => Promise<void>;
64
- setIsAddKeyModalOpen: (open: boolean) => void;
65
- isAddKeyModalOpen: boolean;
66
- }
@@ -1,16 +0,0 @@
1
- export declare const systemMessages: {
2
- createSuccess: (value: string) => string;
3
- createFailure: (value: string) => string;
4
- updateSuccess: (value: string) => string;
5
- updateFailure: (value: string) => string;
6
- copySuccess: (value: string) => string;
7
- copyFailure: (value: string) => string;
8
- copyToClipboard: (value: string) => string;
9
- deleteSuccess: (value: string) => string;
10
- deleteFailure: (value: string) => string;
11
- errorMessage: string;
12
- requiredFieldError: string;
13
- noItemSelected: string;
14
- invalidFileType: string;
15
- formatFailed: string;
16
- };
@@ -1,13 +0,0 @@
1
- import { type JsonValue } from '../types';
2
- /**
3
- * Parse JSON string safely
4
- */
5
- export declare const parseJson: (value: string) => JsonValue;
6
- /**
7
- * Filter top level paths from an array of paths
8
- */
9
- export declare const filterTopLevelPaths: (paths: string[]) => string[];
10
- /**
11
- * Generate a random hex string
12
- */
13
- export declare const randomHexString: (length: number) => string;