@lax-wp/design-system 0.3.114 → 0.4.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 (205) hide show
  1. package/dist/components/button/Button.d.ts +25 -0
  2. package/dist/components/button/ButtonGroup.d.ts +6 -0
  3. package/dist/components/button/ButtonThreeDots.d.ts +3 -0
  4. package/dist/components/button/IconButton.d.ts +14 -0
  5. package/dist/components/button/Radio.d.ts +8 -0
  6. package/dist/components/buttons/option-button/OptionButton.d.ts +60 -0
  7. package/dist/components/cards/card-header-view/CardHeaderView.d.ts +33 -0
  8. package/dist/components/cards/card-header-view/index.d.ts +2 -0
  9. package/dist/components/cards/card-main/CardMain.d.ts +25 -0
  10. package/dist/components/cards/card-main/index.d.ts +2 -0
  11. package/dist/components/cards/tab-content/TabContent.d.ts +30 -0
  12. package/dist/components/cards/tab-content/index.d.ts +2 -0
  13. package/dist/components/data-display/access-denied-modal/AccessDeniedModal.d.ts +21 -0
  14. package/dist/components/data-display/badge/Badge.d.ts +44 -0
  15. package/dist/components/data-display/banner/Banner.d.ts +37 -0
  16. package/dist/components/data-display/card/Card.d.ts +31 -0
  17. package/dist/components/data-display/code-editor/CodeEditor.d.ts +6 -0
  18. package/dist/components/data-display/code-editor/JsonGrid.d.ts +37 -0
  19. package/dist/components/data-display/code-editor/Tabs.d.ts +12 -0
  20. package/dist/components/data-display/comparison/Comparison.d.ts +34 -0
  21. package/dist/components/data-display/comparison/ComparisonContext.d.ts +36 -0
  22. package/dist/components/data-display/comparison/components/GridItemHandle.d.ts +7 -0
  23. package/dist/components/data-display/comparison/components/GridLayout.d.ts +3 -0
  24. package/dist/components/data-display/comparison/components/Header.d.ts +9 -0
  25. package/dist/components/data-display/comparison/components/NoAvailableContent.d.ts +2 -0
  26. package/dist/components/data-display/comparison/components/SortableItem.d.ts +7 -0
  27. package/dist/components/data-display/comparison/constants.d.ts +15 -0
  28. package/dist/components/data-display/comparison/icons/CloseIcon.d.ts +7 -0
  29. package/dist/components/data-display/comparison/icons/ExitIcon.d.ts +6 -0
  30. package/dist/components/data-display/comparison/icons/LayoutOneIcon.d.ts +6 -0
  31. package/dist/components/data-display/comparison/icons/LayoutThreeIcon.d.ts +6 -0
  32. package/dist/components/data-display/comparison/icons/LayoutTwoIcon.d.ts +6 -0
  33. package/dist/components/data-display/comparison/icons/SearchIcon.d.ts +8 -0
  34. package/dist/components/data-display/comparison/icons/index.d.ts +12 -0
  35. package/dist/components/data-display/comparison/index.d.ts +9 -0
  36. package/dist/components/data-display/comparison/utils.d.ts +15 -0
  37. package/dist/components/data-display/context-menu/ContextMenu.d.ts +42 -0
  38. package/dist/components/data-display/datatype-icon/DataTypeIcon.d.ts +104 -0
  39. package/dist/components/data-display/delete-modal/DeleteModal.d.ts +40 -0
  40. package/dist/components/data-display/diff-viewer/DiffViewer.d.ts +64 -0
  41. package/dist/components/data-display/divider/Divider.d.ts +21 -0
  42. package/dist/components/data-display/dynamic-data-modal/DynamicDataModal.d.ts +26 -0
  43. package/dist/components/data-display/dynamic-items-cell/DynamicItemsCell.d.ts +50 -0
  44. package/dist/components/data-display/empty-state/EmptyEvent.d.ts +5 -0
  45. package/dist/components/data-display/empty-state/NoDataFound.d.ts +27 -0
  46. package/dist/components/data-display/empty-state/NoDataFoundWidgets.d.ts +20 -0
  47. package/dist/components/data-display/empty-state/PageNotFound.d.ts +33 -0
  48. package/dist/components/data-display/empty-state/UserNotFound.d.ts +28 -0
  49. package/dist/components/data-display/empty-state/empty-widget/EmptyBarChartData.d.ts +1 -0
  50. package/dist/components/data-display/empty-state/empty-widget/EmptyCardChartData.d.ts +1 -0
  51. package/dist/components/data-display/empty-state/empty-widget/EmptyContentChart.d.ts +1 -0
  52. package/dist/components/data-display/empty-state/empty-widget/EmptyCountWidgetData.d.ts +1 -0
  53. package/dist/components/data-display/empty-state/empty-widget/EmptyDonutChartData.d.ts +1 -0
  54. package/dist/components/data-display/empty-state/empty-widget/EmptyPieChatData.d.ts +1 -0
  55. package/dist/components/data-display/empty-state/empty-widget/EmptyTableWidgetData.d.ts +1 -0
  56. package/dist/components/data-display/empty-state/empty-widget/EmptyTimelineChartData.d.ts +1 -0
  57. package/dist/components/data-display/empty-state/empty-widget/index.d.ts +8 -0
  58. package/dist/components/data-display/empty-state/index.d.ts +11 -0
  59. package/dist/components/data-display/error-modal/ErrorModal.d.ts +22 -0
  60. package/dist/components/data-display/floating-element-wrapper/floating-element-dragger.d.ts +1 -0
  61. package/dist/components/data-display/in-progress/InProgress.d.ts +13 -0
  62. package/dist/components/data-display/json-grid-viewer/AddKeyModal.d.ts +7 -0
  63. package/dist/components/data-display/json-grid-viewer/JsonGridBulkFloatingBar.d.ts +2 -0
  64. package/dist/components/data-display/json-grid-viewer/JsonGridCore.d.ts +3 -0
  65. package/dist/components/data-display/json-grid-viewer/JsonGridViewer.d.ts +47 -0
  66. package/dist/components/data-display/json-grid-viewer/JsonGridViewerContext.d.ts +4 -0
  67. package/dist/components/data-display/json-grid-viewer/JsonValueDisplay.d.ts +8 -0
  68. package/dist/components/data-display/json-grid-viewer/NestedJsonGrid.d.ts +7 -0
  69. package/dist/components/data-display/json-grid-viewer/hooks.d.ts +6 -0
  70. package/dist/components/data-display/json-grid-viewer/index.d.ts +12 -0
  71. package/dist/components/data-display/json-grid-viewer/types.d.ts +64 -0
  72. package/dist/components/data-display/json-grid-viewer/utils.d.ts +4 -0
  73. package/dist/components/data-display/label/Label.d.ts +10 -0
  74. package/dist/components/data-display/label-value/LabelValue.d.ts +139 -0
  75. package/dist/components/data-display/lottie-animation/LottieAnimation.d.ts +34 -0
  76. package/dist/components/data-display/modal/Modal.d.ts +41 -0
  77. package/dist/components/data-display/pdf-viewer/PdfViewer.d.ts +45 -0
  78. package/dist/components/data-display/permission-wrapper/PermissionWrapper.d.ts +28 -0
  79. package/dist/components/data-display/popper/Popper.d.ts +57 -0
  80. package/dist/components/data-display/progress-bar/CircularProgressBar.d.ts +23 -0
  81. package/dist/components/data-display/progress-bar/LinearProgressBar.d.ts +27 -0
  82. package/dist/components/data-display/progress-bar/index.d.ts +4 -0
  83. package/dist/components/data-display/resizable-sidebar/ResizableSidebar.d.ts +48 -0
  84. package/dist/components/data-display/skeleton/Skeleton.d.ts +18 -0
  85. package/dist/components/data-display/status-color-mapping/StatusColorMapping.d.ts +29 -0
  86. package/dist/components/data-display/tag/Tag.d.ts +53 -0
  87. package/dist/components/data-display/text/Text.d.ts +41 -0
  88. package/dist/components/data-display/text-with-strike/TextWithStrike.d.ts +19 -0
  89. package/dist/components/data-display/typography/Typography.d.ts +15 -0
  90. package/dist/components/data-display/unsaved-changes-modal/UnsavedChangesModal.d.ts +30 -0
  91. package/dist/components/drag-and-drop/drag-overlay/DragOverlay.d.ts +25 -0
  92. package/dist/components/drag-and-drop/drag-overlay/index.d.ts +2 -0
  93. package/dist/components/drag-and-drop/draggable-container/DraggableContainer.d.ts +29 -0
  94. package/dist/components/drag-and-drop/draggable-container/index.d.ts +2 -0
  95. package/dist/components/feedback/confirmation-modal/ConfirmationModal.d.ts +38 -0
  96. package/dist/components/feedback/toast/Toast.d.ts +29 -0
  97. package/dist/components/floating-bar/FloatingBar.d.ts +91 -0
  98. package/dist/components/forms/base-input-field/BaseInputField.d.ts +128 -0
  99. package/dist/components/forms/checkbox/Checkbox.d.ts +55 -0
  100. package/dist/components/forms/checkbox/CheckboxComponent.d.ts +9 -0
  101. package/dist/components/forms/color-picker/ColorPicker.d.ts +60 -0
  102. package/dist/components/forms/creatable-select/CreatableSelect.d.ts +86 -0
  103. package/dist/components/forms/currency-input/CurrencyInputField.d.ts +110 -0
  104. package/dist/components/forms/currency-input/currency.constant.d.ts +13 -0
  105. package/dist/components/forms/customizable-select-field/CustomizableSelectField.d.ts +126 -0
  106. package/dist/components/forms/date-range/DateRange.d.ts +73 -0
  107. package/dist/components/forms/date-range/DateRange2.d.ts +72 -0
  108. package/dist/components/forms/date-time-field/DateTimeField.d.ts +129 -0
  109. package/dist/components/forms/debounce-input/DebounceInputField.d.ts +66 -0
  110. package/dist/components/forms/dynamic-data-input/DynamicDataInput.d.ts +64 -0
  111. package/dist/components/forms/dynamic-data-input/DynamicDataInputField.d.ts +118 -0
  112. package/dist/components/forms/field-options/FieldOptions.d.ts +5 -0
  113. package/dist/components/forms/field-options/Header.d.ts +7 -0
  114. package/dist/components/forms/field-options/Icon.d.ts +6 -0
  115. package/dist/components/forms/field-options/Item.d.ts +7 -0
  116. package/dist/components/forms/field-options/index.d.ts +2 -0
  117. package/dist/components/forms/field-options/types.d.ts +11 -0
  118. package/dist/components/forms/file-upload-dragger/FileUpload.d.ts +83 -0
  119. package/dist/components/forms/file-upload-dragger/icons.d.ts +12 -0
  120. package/dist/components/forms/formula-input/FormulaInput.d.ts +33 -0
  121. package/dist/components/forms/formula-input/index.d.ts +3 -0
  122. package/dist/components/forms/formula-input/utils.d.ts +31 -0
  123. package/dist/components/forms/icon-picker/IconPicker.d.ts +20 -0
  124. package/dist/components/forms/input-field/InputField.d.ts +62 -0
  125. package/dist/components/forms/master-data-input/MasterDataInputField.d.ts +135 -0
  126. package/dist/components/forms/md-input/MdInput.d.ts +46 -0
  127. package/dist/components/forms/multi-file-upload/MultiFileUpload.d.ts +78 -0
  128. package/dist/components/forms/number-input-field/NumberInputField.d.ts +47 -0
  129. package/dist/components/forms/percentage-input/PercentageInputField.d.ts +107 -0
  130. package/dist/components/forms/search-bar/SearchBar.d.ts +28 -0
  131. package/dist/components/forms/select-field/SelectField.d.ts +162 -0
  132. package/dist/components/forms/text-area-field/TextAreaField.d.ts +114 -0
  133. package/dist/components/forms/text-field/TextField.d.ts +48 -0
  134. package/dist/components/forms/toggle/Toggle.d.ts +108 -0
  135. package/dist/components/icons/AIExtractedIndicator.d.ts +7 -0
  136. package/dist/components/icons/AIStarIcon.d.ts +8 -0
  137. package/dist/components/icons/ArchivedIcon.d.ts +7 -0
  138. package/dist/components/icons/CheckCircle.d.ts +7 -0
  139. package/dist/components/icons/CheckSmallIcon.d.ts +7 -0
  140. package/dist/components/icons/CloseIcon.d.ts +16 -0
  141. package/dist/components/icons/CloseRounded.d.ts +9 -0
  142. package/dist/components/icons/ComingSoonIcon.d.ts +7 -0
  143. package/dist/components/icons/EditIcon.d.ts +7 -0
  144. package/dist/components/icons/HelpIcon.d.ts +6 -0
  145. package/dist/components/icons/InfoAlert.d.ts +7 -0
  146. package/dist/components/icons/InfoCircleIcon.d.ts +7 -0
  147. package/dist/components/icons/LaxIcon.d.ts +6 -0
  148. package/dist/components/icons/Required.d.ts +3 -0
  149. package/dist/components/icons/SearchIcon.d.ts +9 -0
  150. package/dist/components/layout/ComponentLoader.d.ts +20 -0
  151. package/dist/components/layout/CustomScrollbar.d.ts +46 -0
  152. package/dist/components/layout/Helmet.d.ts +29 -0
  153. package/dist/components/layout/HelmetTitle.d.ts +23 -0
  154. package/dist/components/layout/LogoLoader.d.ts +22 -0
  155. package/dist/components/layout/PageContainer.d.ts +51 -0
  156. package/dist/components/layout/index.d.ts +12 -0
  157. package/dist/components/modal/confirm-popup/ConfirmPopUp.d.ts +26 -0
  158. package/dist/components/modal/confirm-popup/index.d.ts +2 -0
  159. package/dist/components/modal/drawer/Drawer.d.ts +35 -0
  160. package/dist/components/modal/drawer/index.d.ts +2 -0
  161. package/dist/components/navigation/accordion/Accordion.d.ts +39 -0
  162. package/dist/components/navigation/accordion/index.d.ts +2 -0
  163. package/dist/components/navigation/breadcrumbs/BreadCrumb.d.ts +52 -0
  164. package/dist/components/navigation/breadcrumbs/BreadCrumbItem.d.ts +39 -0
  165. package/dist/components/navigation/breadcrumbs/index.d.ts +4 -0
  166. package/dist/components/navigation/stepper/Stepper.d.ts +45 -0
  167. package/dist/components/navigation/stepper/index.d.ts +2 -0
  168. package/dist/components/shortcut-kbd/ShortcutKbd.d.ts +26 -0
  169. package/dist/components/shortcut-kbd/index.d.ts +2 -0
  170. package/dist/components/sidebar/Sidebar.d.ts +15 -0
  171. package/dist/components/sidebar/index.d.ts +2 -0
  172. package/dist/components/tooltip/Tooltip.d.ts +16 -0
  173. package/dist/components/user-avatar/NameInitialLogo.d.ts +15 -0
  174. package/dist/components/user-avatar/PersonIcon.d.ts +7 -0
  175. package/dist/components/user-avatar/StatusInfoRow.d.ts +5 -0
  176. package/dist/components/user-avatar/UserAvatar.d.ts +53 -0
  177. package/dist/components/user-avatar/UserAvatarPopper.d.ts +11 -0
  178. package/dist/components/user-avatar/UserProfilePic.d.ts +15 -0
  179. package/dist/components/user-avatar/constants.d.ts +8 -0
  180. package/dist/components/user-avatar/index.d.ts +13 -0
  181. package/dist/components/user-avatar/useDynamicPosition.d.ts +13 -0
  182. package/dist/constants/colors.d.ts +263 -0
  183. package/dist/constants/layout.d.ts +15 -0
  184. package/dist/constants/toggle.d.ts +12 -0
  185. package/dist/hooks/useEventListener.d.ts +4 -0
  186. package/dist/hooks/useIsomorphicLayoutEffect.d.ts +2 -0
  187. package/dist/hooks/useModalContainer.d.ts +23 -0
  188. package/dist/hooks/useOS.d.ts +32 -0
  189. package/dist/hooks/useOutsideClick.d.ts +28 -0
  190. package/dist/hooks/usePythonSyntax.d.ts +28 -0
  191. package/dist/hooks/useScrollToTop.d.ts +5 -0
  192. package/dist/hooks/useTheme.d.ts +6 -0
  193. package/dist/index.d.ts +214 -0
  194. package/dist/index.es.js +25 -1
  195. package/dist/index.umd.js +1 -1
  196. package/dist/lib/utils.d.ts +2 -0
  197. package/dist/services/monacoManager.d.ts +28 -0
  198. package/dist/types/icon-picker.d.ts +2 -0
  199. package/dist/types/index.d.ts +70 -0
  200. package/dist/utils/countryFlags.d.ts +5 -0
  201. package/dist/utils/formatters.d.ts +24 -0
  202. package/dist/utils/messageConstants.d.ts +88 -0
  203. package/dist/utils/tagUtils.d.ts +12 -0
  204. package/dist/utils/utilities.d.ts +24 -0
  205. package/package.json +1 -1
@@ -0,0 +1,47 @@
1
+ import type { FC } from "react";
2
+ /**
3
+ * Props for the NumberInputField component
4
+ */
5
+ export interface NumberInputFieldProps {
6
+ /** Label text to display above the input */
7
+ label?: string;
8
+ /** Additional CSS classes for the input */
9
+ className?: string;
10
+ /** Whether the input is disabled */
11
+ disabled?: boolean;
12
+ /** Callback when the value changes */
13
+ onChange?: (value: string | number) => void;
14
+ /** Current value of the input */
15
+ value?: string | number;
16
+ /** Placeholder text */
17
+ placeholder?: string;
18
+ /** Minimum allowed value */
19
+ min?: number;
20
+ /** Maximum allowed value */
21
+ max?: number;
22
+ /** Step increment for number input */
23
+ step?: number;
24
+ /** Number format type: 'comma', 'currency', 'percent' */
25
+ numberFormat?: string;
26
+ /** Number of decimal places */
27
+ precision?: number;
28
+ /** Unique identifier for the input */
29
+ id?: string;
30
+ /** Custom inline styles */
31
+ style?: React.CSSProperties;
32
+ }
33
+ /**
34
+ * NumberInputField component provides a number input with optional formatting
35
+ *
36
+ * @example
37
+ * ```tsx
38
+ * <NumberInputField
39
+ * label="Amount"
40
+ * value={1000}
41
+ * onChange={setValue}
42
+ * numberFormat="comma"
43
+ * precision={2}
44
+ * />
45
+ * ```
46
+ */
47
+ export declare const NumberInputField: FC<NumberInputFieldProps>;
@@ -0,0 +1,107 @@
1
+ import type { LabelType } from "../../data-display/label/Label";
2
+ /**
3
+ * Risk details interface for risk analysis integration
4
+ */
5
+ export interface RiskDetails {
6
+ color?: string;
7
+ description?: string;
8
+ hexBgColor?: string;
9
+ hexBorderColor?: string;
10
+ [key: string]: any;
11
+ }
12
+ /**
13
+ * Risk details card component props - generic to allow consumer-specific risk types
14
+ */
15
+ export interface RiskDetailsCardProps<T = any> {
16
+ riskDetails: T;
17
+ maxWidth?: string;
18
+ showAllRisksSuggestions?: boolean;
19
+ }
20
+ /**
21
+ * Props for the PercentageInputField component
22
+ */
23
+ export interface PercentageInputFieldProps {
24
+ /** Unique identifier for the input */
25
+ id: string;
26
+ /** Label text to display above the input */
27
+ label?: string;
28
+ /** Current value of the input */
29
+ value: string;
30
+ /** Callback function called when value changes */
31
+ onChange: (data: any) => void;
32
+ /** Error message to display below the input */
33
+ errorMessage?: string;
34
+ /** Default value for the input */
35
+ defaultValue?: string;
36
+ /** Whether the input is disabled */
37
+ disabled?: boolean;
38
+ /** Maximum value allowed */
39
+ max?: number;
40
+ /** Minimum value allowed */
41
+ min?: number;
42
+ /** Whether the field is required */
43
+ required?: boolean;
44
+ /** Whether the required indicator shows as conditional (yellow instead of red) */
45
+ isRequiredConditional?: boolean;
46
+ /** Background color class */
47
+ bg?: string;
48
+ /** Tags/labels to display next to the label */
49
+ tags?: (string | LabelType)[];
50
+ /** Text color class */
51
+ color?: string;
52
+ /** Additional CSS classes for the wrapper */
53
+ className?: string;
54
+ /** Whether to preserve original case in the label */
55
+ originalCase?: boolean;
56
+ /** Tooltip text for the help icon */
57
+ tooltip?: string;
58
+ /** Whether to use simple mode (inline label style) */
59
+ simpleMode?: boolean;
60
+ /** Additional CSS classes for the input field */
61
+ inputFieldClassName?: string;
62
+ /** Whether the value was AI extracted */
63
+ isAiExtracted?: boolean;
64
+ /** Whether this is a GTN (Global Term Name) field */
65
+ isGTN?: boolean;
66
+ /** GTN field name for document integration */
67
+ gtnName?: any;
68
+ /** Inline styles for the input element */
69
+ inputStyle?: React.CSSProperties;
70
+ /** Whether to show dollar sign (for simpleMode) */
71
+ withDollarSign?: boolean;
72
+ /** Additional CSS classes for the label */
73
+ labelClassName?: string;
74
+ /** Whether this is a live field */
75
+ isLiveField?: boolean;
76
+ /** Callback function called when input loses focus */
77
+ onBlur?: () => void;
78
+ /** Handler for adding GTN to document */
79
+ onAddGTNToDocument?: (keyValuePair: {
80
+ key: string;
81
+ value: string;
82
+ }) => void;
83
+ /** Risk details data */
84
+ riskDetails?: RiskDetails;
85
+ /** Whether risk analysis is open */
86
+ isRiskAnalysisOpen?: boolean;
87
+ /** Custom risk details card component */
88
+ RiskDetailsCard?: React.ComponentType<RiskDetailsCardProps<any>>;
89
+ /** Input placeholder */
90
+ placeholder?: string;
91
+ }
92
+ /**
93
+ * A highly customizable percentage input component with label, validation, and styling support.
94
+ * Features GTN integration, risk analysis support, AI extraction indicator, and comprehensive prop support.
95
+ *
96
+ * @example
97
+ * ```tsx
98
+ * <PercentageInputField
99
+ * id="discount"
100
+ * label="Discount Percentage"
101
+ * value={discount}
102
+ * onChange={(value) => setDiscount(value)}
103
+ * required
104
+ * />
105
+ * ```
106
+ */
107
+ export declare const PercentageInputField: import("react").ForwardRefExoticComponent<PercentageInputFieldProps & import("react").RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,28 @@
1
+ import { type FC, type HTMLAttributes } from 'react';
2
+ export type TSearchConfig = {
3
+ searchCount?: number;
4
+ searchPointer?: number;
5
+ setSearchPointer?: React.Dispatch<React.SetStateAction<number | undefined>>;
6
+ };
7
+ export type TSearchBarProps = Omit<HTMLAttributes<HTMLInputElement>, 'onChange'> & {
8
+ value?: string;
9
+ onChange?(value: string): void;
10
+ debounceTimeout?: number;
11
+ classValues?: string;
12
+ handleKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
13
+ isClearable?: boolean;
14
+ id: string;
15
+ onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;
16
+ onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
17
+ isAnimated?: boolean;
18
+ onFocusText?: string;
19
+ autoComplete?: string;
20
+ searchRef?: React.RefObject<HTMLInputElement>;
21
+ placeholder?: string;
22
+ autoFocus?: boolean;
23
+ hasNavigation?: boolean;
24
+ searchConfig?: TSearchConfig;
25
+ hideSearchIcon?: boolean;
26
+ allowAStarSearch?: boolean;
27
+ };
28
+ export declare const SearchBar: FC<TSearchBarProps>;
@@ -0,0 +1,162 @@
1
+ import type { SelectProps } from 'antd';
2
+ import type { ReactNode } from 'react';
3
+ import type { LabelType } from '../../data-display/label/Label';
4
+ /**
5
+ * Label-value pair for select options
6
+ */
7
+ export type TLabelValue = {
8
+ label: string;
9
+ value: string;
10
+ icon?: JSX.Element;
11
+ };
12
+ /**
13
+ * Select option interface
14
+ */
15
+ export interface SelectOption {
16
+ label: string | any;
17
+ value: string | number;
18
+ color?: string;
19
+ }
20
+ type TagRender = SelectProps['tagRender'];
21
+ /**
22
+ * Risk details interface
23
+ */
24
+ export interface RiskDetails {
25
+ color?: string;
26
+ description?: string;
27
+ hexBgColor?: string;
28
+ hexBorderColor?: string;
29
+ [key: string]: any;
30
+ }
31
+ /**
32
+ * Risk details card component props - generic to allow consumer-specific risk types
33
+ */
34
+ export interface RiskDetailsCardProps<T = any> {
35
+ riskDetails: T;
36
+ maxWidth?: string;
37
+ showAllRisksSuggestions?: boolean;
38
+ }
39
+ /**
40
+ * Props for the SelectField component
41
+ */
42
+ export interface SelectFieldProps extends Omit<SelectProps, 'onChange'> {
43
+ /** Select mode - multiple or tags */
44
+ mode?: 'multiple' | 'tags';
45
+ /** The label text to display above the select */
46
+ label?: string | ReactNode;
47
+ /** Current value of the select */
48
+ value?: string | string[] | SelectOption | SelectOption[] | any;
49
+ /** Array of select options */
50
+ selectOptions?: SelectOption[];
51
+ /** Whether content is loading */
52
+ hasContentLoading?: boolean;
53
+ /** Callback function called when the select value changes */
54
+ onChange?: (value: any) => void;
55
+ /** Callback function for search */
56
+ onSearch?: (searchValue: string) => void;
57
+ /** Callback function for scroll */
58
+ onScroll?: (e: React.UIEvent<HTMLDivElement, UIEvent>) => void;
59
+ /** Callback function for input change */
60
+ onInputChange?: (newValue: string) => void;
61
+ /** Debounce timeout for search */
62
+ debounceTimeout?: number;
63
+ /** Error message to display */
64
+ errorMessage?: string;
65
+ /** Whether the field is required */
66
+ required?: boolean;
67
+ /** Tooltip text for the help icon */
68
+ tooltip?: string;
69
+ /** Tags to display with the label */
70
+ tags?: (string | LabelType)[];
71
+ /** Whether the value was AI extracted */
72
+ isAiExtracted?: boolean;
73
+ /** Whether to preserve original case in the label */
74
+ originalCase?: boolean;
75
+ /** Whether this is a GTN (Global Technical Name) field */
76
+ isGTN?: boolean;
77
+ /** GTN name for the field */
78
+ gtnName?: any;
79
+ /** Handler for adding GTN to document */
80
+ onAddGTNToDocument?: (keyValuePair: {
81
+ key: string;
82
+ value: string;
83
+ }) => void;
84
+ /** Whether the field is hovered */
85
+ isHovered?: boolean;
86
+ /** Whether to enable filter option */
87
+ filterOption?: boolean;
88
+ /** Whether the select is loading */
89
+ isLoading?: boolean;
90
+ /** Whether to auto clear search value */
91
+ autoClearSearchValue?: boolean;
92
+ /** Whether to show label with full opacity */
93
+ fullOpacityLabel?: boolean;
94
+ /** Color for the select */
95
+ color?: string;
96
+ /** Whether to show all tags */
97
+ showAllTags?: boolean;
98
+ /** Custom tag render function */
99
+ customTagRender?: TagRender;
100
+ /** Custom inline styles for the select */
101
+ inputStyles?: React.CSSProperties;
102
+ /** Whether the select is disabled */
103
+ disabled?: boolean;
104
+ /** Whether to show select all option */
105
+ showSelectAll?: boolean;
106
+ /** Additional CSS classes for the label */
107
+ labelClassName?: string;
108
+ /** Additional CSS classes for the wrapper */
109
+ className?: string;
110
+ /** Risk details data */
111
+ riskDetails?: RiskDetails;
112
+ /** Whether risk analysis is open */
113
+ isRiskAnalysisOpen?: boolean;
114
+ /** Custom risk details card component */
115
+ RiskDetailsCard?: React.ComponentType<RiskDetailsCardProps<any>>;
116
+ /** Add to document icon component */
117
+ AddToDocumentIcon?: React.ComponentType<{
118
+ fontSize?: number;
119
+ color?: string;
120
+ }>;
121
+ /** Primary color shades for styling */
122
+ primaryColorShades?: Record<number, string>;
123
+ /** User avatar component for option rendering */
124
+ UserAvatar?: React.ComponentType<{
125
+ firstName: string;
126
+ lastName: string;
127
+ profilePic: string;
128
+ size: string;
129
+ enablePopper: boolean;
130
+ userId: string;
131
+ }>;
132
+ /** Whether the required indicator shows as conditional (yellow instead of red) */
133
+ isRequiredConditional?: boolean;
134
+ /** Whether this is a live field */
135
+ isLiveField?: boolean;
136
+ }
137
+ /**
138
+ * SelectField component - A feature-rich select dropdown with multi-select, tags, search, and more
139
+ *
140
+ * @example
141
+ * ```tsx
142
+ * <SelectField
143
+ * label="Country"
144
+ * value="us"
145
+ * selectOptions={[
146
+ * { label: 'United States', value: 'us' },
147
+ * { label: 'Canada', value: 'ca' }
148
+ * ]}
149
+ * onChange={(value) => console.log(value)}
150
+ * />
151
+ *
152
+ * <SelectField
153
+ * label="Tags"
154
+ * mode="multiple"
155
+ * value={['tag1', 'tag2']}
156
+ * selectOptions={tagOptions}
157
+ * onChange={(values) => console.log(values)}
158
+ * />
159
+ * ```
160
+ */
161
+ export declare const SelectField: import("react").ForwardRefExoticComponent<SelectFieldProps & import("react").RefAttributes<HTMLDivElement>>;
162
+ export {};
@@ -0,0 +1,114 @@
1
+ import type { RefObject } from "react";
2
+ import type { LabelType } from "../../data-display/label/Label";
3
+ /**
4
+ * Risk details interface
5
+ */
6
+ export interface RiskDetails {
7
+ color?: string;
8
+ description?: string;
9
+ hexBgColor?: string;
10
+ hexBorderColor?: string;
11
+ [key: string]: any;
12
+ }
13
+ /**
14
+ * Risk details card component props - generic to allow consumer-specific risk types
15
+ */
16
+ export interface RiskDetailsCardProps<T = any> {
17
+ riskDetails: T;
18
+ maxWidth?: string;
19
+ showAllRisksSuggestions?: boolean;
20
+ }
21
+ /**
22
+ * Props for the TextAreaField component
23
+ */
24
+ export interface TextAreaFieldProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "onChange" | "maxLength"> {
25
+ /** The label text to display above the textarea */
26
+ label?: string;
27
+ /** Placeholder text for the textarea */
28
+ placeholder: string;
29
+ /** Current value of the textarea */
30
+ value?: string | any;
31
+ /** Callback function called when the textarea value changes */
32
+ onChange: (value: string) => void;
33
+ /** Number of visible text lines for the textarea (alias for rows) */
34
+ row?: number;
35
+ /** Error message to display below the textarea */
36
+ errorMessage?: string;
37
+ /** Default value for the textarea */
38
+ defaultValue?: string;
39
+ /** Whether the field is required */
40
+ required?: boolean;
41
+ /** Whether the required indicator shows as conditional (yellow instead of red) */
42
+ isRequiredConditional?: boolean;
43
+ /** Tags/labels to display next to the label */
44
+ tags?: (string | LabelType)[];
45
+ /** Whether the textarea is disabled */
46
+ disabled?: boolean;
47
+ /** Additional CSS classes for the textarea element */
48
+ className?: string;
49
+ /** Ref object for the textarea element */
50
+ inputRef?: RefObject<HTMLTextAreaElement>;
51
+ /** Maximum character length allowed */
52
+ maxLength?: number | null;
53
+ /** Tooltip text to display */
54
+ tooltip?: string;
55
+ /** Whether to preserve original case in the label */
56
+ originalCase?: boolean;
57
+ /** Whether the value was AI extracted */
58
+ isAiExtracted?: boolean;
59
+ /** Whether this is a GTN (Global Term Name) field */
60
+ isGTN?: boolean;
61
+ /** GTN field name for document integration */
62
+ gtnName?: any;
63
+ /** Whether to remove border styling */
64
+ noBorder?: boolean;
65
+ /** Unique identifier for the textarea */
66
+ id?: string;
67
+ /** Custom inline styles for the textarea */
68
+ inputStyle?: React.CSSProperties;
69
+ /** Additional CSS classes for the label */
70
+ labelClassName?: string;
71
+ /** Whether this is a live field */
72
+ isLiveField?: boolean;
73
+ /** Callback function called when the textarea loses focus */
74
+ onBlur?: () => void;
75
+ /** Risk details data */
76
+ riskDetails?: RiskDetails;
77
+ /** Whether risk analysis is open */
78
+ isRiskAnalysisOpen?: boolean;
79
+ /** Custom risk details card component */
80
+ RiskDetailsCard?: React.ComponentType<RiskDetailsCardProps<any>>;
81
+ /** Handler for adding GTN to document */
82
+ onAddGTNToDocument?: (keyValuePair: {
83
+ key: string;
84
+ value: string;
85
+ }) => void;
86
+ }
87
+ /**
88
+ * A customizable textarea field component with label, validation, GTN integration,
89
+ * risk analysis support, and styling support. Features dark mode support,
90
+ * accessibility enhancements, and character count display.
91
+ *
92
+ * @example
93
+ * ```tsx
94
+ * <TextAreaField
95
+ * label="Description"
96
+ * placeholder="Enter a description..."
97
+ * value={description}
98
+ * onChange={(value) => setDescription(value)}
99
+ * required
100
+ * />
101
+ *
102
+ * <TextAreaField
103
+ * label="Comments"
104
+ * placeholder="Enter comments..."
105
+ * value={comments}
106
+ * onChange={(value) => setComments(value)}
107
+ * maxLength={500}
108
+ * isGTN
109
+ * gtnName="comments_field"
110
+ * onAddGTNToDocument={(kv) => handleAddToDocument(kv)}
111
+ * />
112
+ * ```
113
+ */
114
+ export declare const TextAreaField: import("react").ForwardRefExoticComponent<TextAreaFieldProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -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,108 @@
1
+ import { type ReactNode } from "react";
2
+ import type { TToggleDirection } from "../../../constants/toggle";
3
+ import { type LabelType } from "../../data-display/label/Label";
4
+ export type { LabelType };
5
+ /**
6
+ * Props for the Toggle component
7
+ */
8
+ export interface ToggleProps {
9
+ /** Whether this is a GTN (Global Term Name) field */
10
+ isGTN?: boolean;
11
+ /** Unique identifier for the toggle */
12
+ id?: string;
13
+ /** Whether the toggle is checked */
14
+ isChecked: boolean;
15
+ /** Callback function called when toggle state changes */
16
+ onChange: (val: boolean) => void;
17
+ /** Label text or element to display */
18
+ label?: ReactNode;
19
+ /** Whether to preserve original case in the label */
20
+ originalCase?: boolean;
21
+ /** Whether the field is required */
22
+ required?: boolean;
23
+ /** Whether the required indicator shows as conditional (yellow instead of red) */
24
+ isRequiredConditional?: boolean;
25
+ /** Tags/labels to display next to the label */
26
+ tags?: (string | LabelType)[];
27
+ /** Whether to hide the status text (Yes/No) */
28
+ hideStatus?: boolean;
29
+ /** Label direction relative to toggle */
30
+ labelDirection?: TToggleDirection;
31
+ /** Custom status text instead of Yes/No */
32
+ statusText?: string;
33
+ /** Whether to show icons in the toggle */
34
+ withIcon?: boolean;
35
+ /** Whether the value was AI extracted */
36
+ isAiExtracted?: boolean;
37
+ /** Tooltip text to display */
38
+ tooltip?: string;
39
+ /** Additional CSS classes for the toggle input */
40
+ className?: string;
41
+ /** Whether the toggle is disabled */
42
+ isDisabled?: boolean;
43
+ /** Custom icons for checked/unchecked states */
44
+ icon?: {
45
+ checkedIcon: ReactNode;
46
+ uncheckedIcon: ReactNode;
47
+ };
48
+ /** Whether to stop click propagation */
49
+ stopClickPropagation?: boolean;
50
+ /** GTN field name for document integration */
51
+ gtnName?: any;
52
+ /** Visual variant for the toggle */
53
+ variant?: 'primary' | 'secondary';
54
+ /** Additional CSS classes for the label */
55
+ labelClassName?: string;
56
+ /** Whether this is a live field */
57
+ isLiveField?: boolean;
58
+ /** Message to display below the toggle */
59
+ message?: string;
60
+ /** Type of message to display */
61
+ messageType?: "success" | "error" | "info" | "default";
62
+ /** Additional CSS classes for the wrapper container */
63
+ wrapperClassName?: string;
64
+ /** Help text to display below the label */
65
+ helpText?: string;
66
+ /** Size variant for the toggle */
67
+ size?: "small" | "medium" | "large";
68
+ /** Custom render function for AI extracted indicator */
69
+ renderAiExtractedIndicator?: () => ReactNode;
70
+ /** Custom render function for labels/tags */
71
+ renderLabels?: (labels?: (string | LabelType)[]) => ReactNode;
72
+ /** Custom render function for required indicator */
73
+ renderRequired?: (isConditional: boolean) => ReactNode;
74
+ /** Custom render function for tooltip */
75
+ renderTooltip?: (tooltip: string) => ReactNode;
76
+ /** Custom render function for live field icon */
77
+ renderLiveFieldIcon?: () => ReactNode;
78
+ /** Custom render function for GTN add to document button */
79
+ renderGTNAddButton?: (onClick: () => void) => ReactNode;
80
+ /** Handler for adding GTN to document */
81
+ onAddGTNToDocument?: (keyValuePair: {
82
+ key: string;
83
+ value: string;
84
+ }) => void;
85
+ /** Add to document icon component */
86
+ AddToDocumentIcon?: React.ComponentType<{
87
+ fontSize?: number;
88
+ color?: string;
89
+ }>;
90
+ /** Primary color shades for styling */
91
+ primaryColorShades?: Record<number, string>;
92
+ }
93
+ /**
94
+ * A highly customizable toggle component with label, validation, and styling support.
95
+ * Features multiple sizes, variants, icon support, GTN integration, and comprehensive prop support.
96
+ *
97
+ * @example
98
+ * ```tsx
99
+ * <Toggle
100
+ * id="notifications"
101
+ * label="Enable Notifications"
102
+ * isChecked={notificationsEnabled}
103
+ * onChange={(checked) => setNotificationsEnabled(checked)}
104
+ * required
105
+ * />
106
+ * ```
107
+ */
108
+ export declare const Toggle: import("react").ForwardRefExoticComponent<ToggleProps & import("react").RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,7 @@
1
+ import { type TooltipPlacement } from "../tooltip/Tooltip";
2
+ type TProps = {
3
+ position?: TooltipPlacement;
4
+ title?: string;
5
+ };
6
+ export declare const AIExtractedIndicator: ({ position, title, }: TProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,8 @@
1
+ import { type FC, type SVGAttributes } from 'react';
2
+ type TProps = SVGAttributes<SVGElement> & {
3
+ size?: number;
4
+ fill?: string;
5
+ fillSecondary?: string;
6
+ };
7
+ export declare const AIStarIcon: FC<TProps>;
8
+ export {};
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ export interface ArchivedIconProps {
3
+ className?: string;
4
+ size?: string;
5
+ fill?: string;
6
+ }
7
+ export declare const ArchivedIcon: FC<ArchivedIconProps>;
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ export interface CheckCircleProps {
3
+ fill?: string;
4
+ size?: number;
5
+ className?: string;
6
+ }
7
+ export declare const CheckCircle: FC<CheckCircleProps>;
@@ -0,0 +1,7 @@
1
+ import type { FC } from 'react';
2
+ export interface IconProps {
3
+ className?: string;
4
+ fill?: string;
5
+ size?: number;
6
+ }
7
+ export declare const CheckSmallIcon: FC<IconProps>;
@@ -0,0 +1,16 @@
1
+ import { type SVGAttributes } from "react";
2
+ /**
3
+ * Props for the Close icon component
4
+ */
5
+ export interface CloseIconProps extends SVGAttributes<SVGElement> {
6
+ /** Size of the icon */
7
+ size?: number;
8
+ /** Fill color of the icon */
9
+ fill?: string;
10
+ /** Additional CSS classes */
11
+ className?: string;
12
+ }
13
+ /**
14
+ * Close icon component
15
+ */
16
+ export declare const CloseIcon: import("react").ForwardRefExoticComponent<CloseIconProps & import("react").RefAttributes<SVGSVGElement>>;