@lax-wp/design-system 0.1.8 → 0.2.0

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 (34) hide show
  1. package/dist/design-system.css +1 -1
  2. package/dist/index.es.js +23279 -14720
  3. package/dist/index.umd.js +183 -61
  4. package/package.json +3 -1
  5. package/dist/components/data-display/badge/Badge.d.ts +0 -44
  6. package/dist/components/data-display/banner/Banner.d.ts +0 -41
  7. package/dist/components/data-display/code-editor/CodeEditor.d.ts +0 -4
  8. package/dist/components/data-display/code-editor/JsonGrid.d.ts +0 -14
  9. package/dist/components/data-display/code-editor/Tabs.d.ts +0 -12
  10. package/dist/components/data-display/pdf-viewer/PdfViewer.d.ts +0 -45
  11. package/dist/components/data-display/popper/Popper.d.ts +0 -57
  12. package/dist/components/data-display/status-color-mapping/StatusColorMapping.d.ts +0 -29
  13. package/dist/components/data-display/typography/Typography.d.ts +0 -15
  14. package/dist/components/feedback/toast/Toast.d.ts +0 -29
  15. package/dist/components/forms/checkbox/Checkbox.d.ts +0 -55
  16. package/dist/components/forms/color-picker/ColorPicker.d.ts +0 -60
  17. package/dist/components/forms/creatable-select/CreatableSelect.d.ts +0 -92
  18. package/dist/components/forms/currency-input/CurrencyInputField.d.ts +0 -73
  19. package/dist/components/forms/currency-input/currency.constant.d.ts +0 -6
  20. package/dist/components/forms/date-range/DateRange.d.ts +0 -72
  21. package/dist/components/forms/debounce-input/DebounceInputField.d.ts +0 -76
  22. package/dist/components/forms/input-field/InputField.d.ts +0 -62
  23. package/dist/components/forms/percentage-input/PercentageInputField.d.ts +0 -75
  24. package/dist/components/forms/text-field/TextField.d.ts +0 -48
  25. package/dist/components/forms/toggle/Toggle.d.ts +0 -71
  26. package/dist/components/tooltip/Tooltip.d.ts +0 -13
  27. package/dist/hooks/useOutsideClick.d.ts +0 -28
  28. package/dist/hooks/usePythonSyntax.d.ts +0 -28
  29. package/dist/hooks/useTheme.d.ts +0 -6
  30. package/dist/index.d.ts +0 -48
  31. package/dist/services/monacoManager.d.ts +0 -28
  32. package/dist/types/index.d.ts +0 -66
  33. package/dist/utils/messageConstants.d.ts +0 -16
  34. 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.8",
4
+ "version": "0.2.0",
5
5
  "type": "module",
6
6
  "main": "dist/index.umd.js",
7
7
  "module": "dist/index.es.js",
@@ -39,8 +39,10 @@
39
39
  "@storybook/addon-actions": "^9.0.8",
40
40
  "antd": "^5.27.0",
41
41
  "classnames": "^2.5.1",
42
+ "diff": "^8.0.2",
42
43
  "immer": "^10.1.1",
43
44
  "lodash.debounce": "^4.0.8",
45
+ "re-resizable": "^6.11.2",
44
46
  "react-full-screen": "^1.1.1",
45
47
  "react-icons": "^5.5.0",
46
48
  "react-popper-tooltip": "^4.4.2",
@@ -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>;