@lax-wp/design-system 0.3.65 → 0.3.67

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.
@@ -0,0 +1,64 @@
1
+ import { FC } from "react";
2
+ import type { LabelType } from "../../data-display/label/Label";
3
+ /**
4
+ * Props for the DynamicDataInput component
5
+ * Drop-in replacement matching the lax-web-portal API
6
+ */
7
+ export type DynamicDataInputProps = {
8
+ /** Unique identifier for the input */
9
+ id: string;
10
+ /** Label text to display above the input */
11
+ label?: string;
12
+ /** Input type (text, email, password, number, etc.) */
13
+ type?: string;
14
+ /** Placeholder text for the input */
15
+ placeholder?: string;
16
+ /** Current value of the input (JSON string for dynamic data) */
17
+ value: string;
18
+ /** Callback function called when value changes */
19
+ onChange: (value: string) => void;
20
+ /** Error message to display below the input */
21
+ errorMessage?: string;
22
+ /** Whether to preserve original case in the label */
23
+ originalCase?: boolean;
24
+ /** Whether the field is required */
25
+ required?: boolean;
26
+ /** Background color class */
27
+ bg?: string;
28
+ /** Tags/labels to display next to the label */
29
+ tags?: (string | LabelType)[];
30
+ /** Index prop used for resetting input state */
31
+ index?: number;
32
+ /** Additional CSS classes for the wrapper */
33
+ className?: string;
34
+ /** Tooltip text for the help icon */
35
+ tooltip?: string;
36
+ /** Whether to use simple mode (no label, just input with edit button) */
37
+ simpleMode?: boolean;
38
+ /** Additional CSS classes for the input field in simple mode */
39
+ inputFieldClassName?: string;
40
+ /** Whether the value was AI extracted */
41
+ isAiExtracted?: boolean;
42
+ /** Whether the input is disabled */
43
+ disabled?: boolean;
44
+ } & Record<string, any>;
45
+ /**
46
+ * A dynamic data input component that displays a text input with a button to open
47
+ * a modal for editing JSON data. The input shows "{DYNAMIC}" when there's a value.
48
+ *
49
+ * This is a drop-in replacement for the lax-web-portal DynamicDataInput component.
50
+ *
51
+ * @example
52
+ * ```tsx
53
+ * <DynamicDataInput
54
+ * id="dynamic-field"
55
+ * label="Dynamic Field"
56
+ * type="text"
57
+ * placeholder="Enter value..."
58
+ * value={jsonData}
59
+ * onChange={(value) => setJsonData(value)}
60
+ * errorMessage=""
61
+ * />
62
+ * ```
63
+ */
64
+ export declare const DynamicDataInput: FC<DynamicDataInputProps>;
@@ -0,0 +1,7 @@
1
+ import React, { SVGAttributes } from 'react';
2
+ export interface EditIconProps extends SVGAttributes<SVGElement> {
3
+ fill?: string;
4
+ size?: string | number;
5
+ className?: string;
6
+ }
7
+ export declare const EditIcon: React.FC<EditIconProps>;
package/dist/index.d.ts CHANGED
@@ -34,6 +34,8 @@ export { DebounceInputField } from "./components/forms/debounce-input/DebounceIn
34
34
  export type { DebounceInputFieldProps } from "./components/forms/debounce-input/DebounceInputField";
35
35
  export { DynamicDataInputField } from "./components/forms/dynamic-data-input/DynamicDataInputField";
36
36
  export type { DynamicDataInputFieldProps, DynamicDataModalProps as DynamicDataInputModalProps, RiskDetails as DynamicDataInputFieldRiskDetails, RiskDetailsCardProps as DynamicDataInputFieldRiskDetailsCardProps, } from "./components/forms/dynamic-data-input/DynamicDataInputField";
37
+ export { DynamicDataInput } from "./components/forms/dynamic-data-input/DynamicDataInput";
38
+ export type { DynamicDataInputProps } from "./components/forms/dynamic-data-input/DynamicDataInput";
37
39
  export { PercentageInputField } from "./components/forms/percentage-input/PercentageInputField";
38
40
  export type { PercentageInputFieldProps, RiskDetails as PercentageInputFieldRiskDetails, RiskDetailsCardProps as PercentageInputFieldRiskDetailsCardProps, } from "./components/forms/percentage-input/PercentageInputField";
39
41
  export { Toggle } from "./components/forms/toggle/Toggle";
@@ -90,7 +92,9 @@ export { getFlagComponent, getFlagComponentSm, getFlagComponentRectangle, getFla
90
92
  export { LaxIcon } from "./components/icons/LaxIcon";
91
93
  export { ComingSoonIcon } from "./components/icons/ComingSoonIcon";
92
94
  export { CheckSmallIcon } from "./components/icons/CheckSmallIcon";
95
+ export { EditIcon } from "./components/icons/EditIcon";
93
96
  export type { IconProps } from "./components/icons/LaxIcon";
97
+ export type { EditIconProps } from "./components/icons/EditIcon";
94
98
  export { AccessDeniedModal } from "./components/data-display/access-denied-modal/AccessDeniedModal";
95
99
  export type { AccessDeniedModalProps } from "./components/data-display/access-denied-modal/AccessDeniedModal";
96
100
  export { InProgress } from "./components/data-display/in-progress/InProgress";