@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,41 @@
1
+ import type { FC, ReactNode } from "react";
2
+ type TSVG = FC<React.SVGProps<SVGSVGElement>>;
3
+ /**
4
+ * Props for the Text component
5
+ */
6
+ export interface TextProps {
7
+ /** Text content to display (will be passed through i18n translation) */
8
+ text: string;
9
+ /** Whether to render without a wrapper tag */
10
+ emptyTag?: boolean;
11
+ /** Additional CSS classes */
12
+ className?: string;
13
+ /** Click handler for the text element */
14
+ onClick?: () => void;
15
+ /** Icon component to display on the left */
16
+ LeftIcon?: TSVG | null;
17
+ /** Role attribute for accessibility */
18
+ role?: "row" | "button";
19
+ /** Text to prepend before main text */
20
+ LText?: string;
21
+ /** Text to append after main text */
22
+ RText?: string;
23
+ /** Icon component to display on the right */
24
+ RightIcon?: TSVG | null;
25
+ /** HTML tag to render */
26
+ tagName?: "p" | "span" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "li" | "button";
27
+ /** Additional children to render */
28
+ children?: ReactNode;
29
+ }
30
+ /**
31
+ * Text component displays translated text with optional icons and customizable tag
32
+ *
33
+ * @example
34
+ * ```tsx
35
+ * <Text text="Hello World" />
36
+ * <Text text="Click me" tagName="button" onClick={handleClick} />
37
+ * <Text text="Title" tagName="h1" LeftIcon={StarIcon} />
38
+ * ```
39
+ */
40
+ declare const Text: FC<TextProps>;
41
+ export default Text;
@@ -0,0 +1,19 @@
1
+ import type { FC } from "react";
2
+ /**
3
+ * Props for the TextWithStrike component
4
+ */
5
+ export interface TextWithStrikeProps {
6
+ /** Text content that may contain <um></um> tags for highlighting */
7
+ text: string;
8
+ }
9
+ /**
10
+ * TextWithStrike component parses text with <um></um> tags and displays
11
+ * the content between those tags with a highlighted background.
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * <TextWithStrike text="This is <um>highlighted</um> text" />
16
+ * ```
17
+ */
18
+ declare const TextWithStrike: FC<TextWithStrikeProps>;
19
+ export default TextWithStrike;
@@ -0,0 +1,15 @@
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
+ };
@@ -0,0 +1,30 @@
1
+ import type { FC } from 'react';
2
+ export interface UnsavedChangesModalProps {
3
+ visible: boolean;
4
+ onClose: () => void;
5
+ onSaveAndExit: () => void;
6
+ onDiscardChanges: () => void;
7
+ onCancel: () => void;
8
+ isLoading?: boolean;
9
+ title?: string;
10
+ content?: string;
11
+ cancelText?: string;
12
+ discardText?: string;
13
+ saveText?: string;
14
+ }
15
+ /**
16
+ * UnsavedChangesModal component for prompting users about unsaved changes
17
+ *
18
+ * @example
19
+ * ```tsx
20
+ * <UnsavedChangesModal
21
+ * visible={isOpen}
22
+ * onClose={() => setIsOpen(false)}
23
+ * onSaveAndExit={handleSave}
24
+ * onDiscardChanges={handleDiscard}
25
+ * onCancel={handleCancel}
26
+ * isLoading={isSaving}
27
+ * />
28
+ * ```
29
+ */
30
+ export declare const UnsavedChangesModal: FC<UnsavedChangesModalProps>;
@@ -0,0 +1,25 @@
1
+ import { ReactNode } from 'react';
2
+ export type DragOverlayProps = {
3
+ children: ReactNode;
4
+ /** ID of the container to portal the overlay into. Defaults to 'full-screen-container' then document.body */
5
+ containerId?: string;
6
+ };
7
+ /**
8
+ * DragOverlay component for rendering dragged item preview
9
+ *
10
+ * @example
11
+ * ```tsx
12
+ * <DraggableContainer onDragEnd={handleDragEnd}>
13
+ * <SortableContext items={items}>
14
+ * {items.map((item) => <SortableItem key={item.id} {...item} />)}
15
+ * </SortableContext>
16
+ * <DragOverlay>
17
+ * {activeItem ? <ItemPreview {...activeItem} /> : null}
18
+ * </DragOverlay>
19
+ * </DraggableContainer>
20
+ * ```
21
+ */
22
+ export declare const DragOverlay: {
23
+ ({ children, containerId }: DragOverlayProps): import("react").ReactPortal;
24
+ displayName: string;
25
+ };
@@ -0,0 +1,2 @@
1
+ export { DragOverlay } from './DragOverlay';
2
+ export type { DragOverlayProps } from './DragOverlay';
@@ -0,0 +1,29 @@
1
+ import { DragEndEvent, DragOverEvent, DragStartEvent } from '@dnd-kit/core';
2
+ import { ReactNode } from 'react';
3
+ export type DraggableContainerProps = {
4
+ onDragEnd: (event: DragEndEvent) => void;
5
+ onDragStart?: (event: DragStartEvent) => void;
6
+ onDragOver?: (event: DragOverEvent) => void;
7
+ children: ReactNode;
8
+ };
9
+ /**
10
+ * DraggableContainer component wraps dnd-kit DndContext with sensible defaults
11
+ *
12
+ * @example
13
+ * ```tsx
14
+ * <DraggableContainer
15
+ * onDragEnd={(event) => handleDragEnd(event)}
16
+ * onDragStart={(event) => handleDragStart(event)}
17
+ * >
18
+ * <SortableContext items={items}>
19
+ * {items.map((item) => (
20
+ * <SortableItem key={item.id} id={item.id} />
21
+ * ))}
22
+ * </SortableContext>
23
+ * </DraggableContainer>
24
+ * ```
25
+ */
26
+ export declare const DraggableContainer: {
27
+ ({ onDragEnd, onDragStart, onDragOver, children }: DraggableContainerProps): import("react/jsx-runtime").JSX.Element;
28
+ displayName: string;
29
+ };
@@ -0,0 +1,2 @@
1
+ export { DraggableContainer } from './DraggableContainer';
2
+ export type { DraggableContainerProps } from './DraggableContainer';
@@ -0,0 +1,38 @@
1
+ import { type FC } from 'react';
2
+ export interface IConfirmationModalProps {
3
+ /** Whether the modal is visible */
4
+ visible: boolean;
5
+ /** Callback when modal is closed */
6
+ onClose: (value: any) => void;
7
+ /** Content/message of the confirmation popup */
8
+ content: React.ReactNode;
9
+ /** Title of the confirmation popup */
10
+ title: React.ReactNode;
11
+ /** Callback when confirmed */
12
+ onConfirm: () => void;
13
+ /** Whether the action is in loading state */
14
+ isLoading?: boolean;
15
+ /** Variant of the modal ('destructive' for delete actions) */
16
+ variant?: 'destructive' | 'default';
17
+ /** Text for the cancel button (default: 'Cancel') */
18
+ cancelText?: string;
19
+ /** Text for the confirm button (default: 'Confirm' or 'Delete' based on variant) */
20
+ confirmText?: string;
21
+ }
22
+ /**
23
+ * ConfirmationModal component for displaying confirmation dialogs
24
+ *
25
+ * @example
26
+ * ```tsx
27
+ * <ConfirmationModal
28
+ * visible={isOpen}
29
+ * title="Delete Item"
30
+ * content="Are you sure you want to delete this item?"
31
+ * onConfirm={() => handleDelete()}
32
+ * onClose={() => setIsOpen(false)}
33
+ * variant="destructive"
34
+ * />
35
+ * ```
36
+ */
37
+ export declare const ConfirmationModal: FC<IConfirmationModalProps>;
38
+ export default ConfirmationModal;
@@ -0,0 +1,29 @@
1
+ import React, { type 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;
@@ -0,0 +1,91 @@
1
+ import { type FC, type ReactNode } from "react";
2
+ /**
3
+ * Configuration for action buttons in the floating bar
4
+ */
5
+ export type ButtonConfig = {
6
+ /** Button label text */
7
+ label?: string;
8
+ /** Icon element to display */
9
+ icon: ReactNode;
10
+ /** Click handler for the action */
11
+ onClick?: () => void;
12
+ /** Icon for dropdown mode */
13
+ dropdownIcon?: ReactNode;
14
+ /** Whether the action is visible */
15
+ visible?: boolean;
16
+ /** Whether the action is disabled */
17
+ disabled?: boolean;
18
+ /** Tooltip text */
19
+ tooltip?: string;
20
+ /** Whether to hide the label text */
21
+ hideLabel?: boolean;
22
+ /** Action type */
23
+ type?: "button" | "dropdown";
24
+ /** Dropdown trigger mode */
25
+ dropdownTrigger?: "click" | "hover";
26
+ /** Dropdown menu items */
27
+ dropdownItems?: Array<{
28
+ label: ReactNode;
29
+ key: string;
30
+ disabled?: boolean;
31
+ }>;
32
+ };
33
+ /**
34
+ * Props for the FloatingBar component
35
+ */
36
+ export type TFloatingBar = {
37
+ /** Whether the floating bar is visible */
38
+ show?: boolean;
39
+ /** Close handler */
40
+ onClose: () => void;
41
+ /** Whether this is used in flow dashboard layout */
42
+ isFlowDashboard?: boolean;
43
+ /** Array of action configurations */
44
+ actionItems: ButtonConfig[];
45
+ /** Number of selected items */
46
+ selectedItemsCount?: number;
47
+ /** Delete action configuration */
48
+ deleteConfig?: {
49
+ label?: string;
50
+ disabled?: boolean;
51
+ onClick?: () => void;
52
+ };
53
+ /** Whether to show action background */
54
+ showActionBg?: boolean;
55
+ };
56
+ /**
57
+ * FloatingBar component provides a floating action bar for bulk operations.
58
+ * Drop-in replacement matching the lax-web-portal implementation.
59
+ *
60
+ * @example
61
+ * ```tsx
62
+ * <FloatingBar
63
+ * show={selectedItems.length > 0}
64
+ * onClose={() => setSelectedItems([])}
65
+ * selectedItemsCount={selectedItems.length}
66
+ * actionItems={[
67
+ * {
68
+ * label: "Edit",
69
+ * icon: <EditIcon size={16} />,
70
+ * onClick: handleEdit,
71
+ * },
72
+ * {
73
+ * label: "Archive",
74
+ * icon: <ArchiveIcon size={16} />,
75
+ * onClick: handleArchive,
76
+ * },
77
+ * ]}
78
+ * deleteConfig={{
79
+ * label: "Delete",
80
+ * onClick: handleDelete,
81
+ * }}
82
+ * />
83
+ * ```
84
+ */
85
+ export declare const FloatingBar: FC<TFloatingBar>;
86
+ export type { ButtonConfig as FloatingBarActionConfig };
87
+ export type FloatingBarDeleteConfig = TFloatingBar["deleteConfig"];
88
+ export type FloatingBarProps = TFloatingBar;
89
+ export type FloatingBarSize = "small" | "medium" | "large";
90
+ export type FloatingBarPosition = "top" | "bottom";
91
+ export type FloatingBarTheme = "primary" | "dark" | "light";
@@ -0,0 +1,128 @@
1
+ import React 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
15
+ */
16
+ export interface RiskDetailsCardProps {
17
+ riskDetails: RiskDetails;
18
+ maxWidth?: string;
19
+ showAllRisksSuggestions?: boolean;
20
+ }
21
+ /**
22
+ * Props for the BaseInputField component
23
+ */
24
+ export type TBaseInputFieldProps = any & {
25
+ /** Current value of the input */
26
+ value: string;
27
+ /** Callback function called when the input value changes */
28
+ onChange(data: any): void;
29
+ /** Callback function for key down events */
30
+ onKeyDown?: void;
31
+ /** Error message to display */
32
+ errorMessage: string;
33
+ /** Default value for the input */
34
+ defaultValue?: string;
35
+ /** Whether the input is disabled */
36
+ disabled?: boolean;
37
+ /** Maximum value for number inputs */
38
+ max?: number;
39
+ /** Minimum value for number inputs */
40
+ min?: number;
41
+ /** Whether the field is required */
42
+ required?: boolean;
43
+ /** Whether the required indicator shows as conditional */
44
+ isRequiredConditional?: boolean;
45
+ /** Background color class */
46
+ bg?: string;
47
+ /** Tags to display with the label */
48
+ tags?: (string | LabelType)[];
49
+ /** Text color class */
50
+ color?: string;
51
+ /** Unique identifier for the input */
52
+ id: string;
53
+ /** Label text for the input */
54
+ label?: string;
55
+ /** Input type (text, email, password, number, etc.) */
56
+ type?: string;
57
+ /** Value to revert back to */
58
+ revertBackValue?: any;
59
+ /** Placeholder text */
60
+ placeholder?: string;
61
+ /** Whether this is a password field with visibility toggle */
62
+ isPasswordField?: boolean;
63
+ /** Callback to set password visibility */
64
+ setIsPasswordVisible?: any;
65
+ /** Tooltip text */
66
+ tooltip?: string;
67
+ /** Whether to preserve original case in the label */
68
+ originalCase?: boolean;
69
+ /** Icon or element to display at the end of the input */
70
+ suffixIcon?: React.ReactNode;
71
+ /** Text size class */
72
+ textSize?: string;
73
+ /** Whether the value was AI extracted */
74
+ isAiExtracted?: boolean;
75
+ /** Whether this is a GTN field */
76
+ isGTN?: boolean;
77
+ /** GTN name for document integration */
78
+ gtnName?: any;
79
+ /** Success message to display */
80
+ successMessage?: string;
81
+ /** Additional CSS classes for the input element */
82
+ inputClassName?: string;
83
+ /** Inline styles for the input element */
84
+ inputStyle?: React.CSSProperties;
85
+ /** Additional CSS classes for the label */
86
+ labelClassName?: string;
87
+ /** Whether this is a live field */
88
+ isLiveField?: boolean;
89
+ /** Callback function for blur events */
90
+ onBlur?: () => void;
91
+ /** Whether the input is clearable */
92
+ isClearable?: boolean;
93
+ /** Additional CSS classes for the wrapper */
94
+ className?: string;
95
+ /** Ref for the input element */
96
+ inputRef?: React.RefObject<HTMLInputElement>;
97
+ /** Risk details data */
98
+ riskDetails?: RiskDetails;
99
+ /** Whether risk analysis is open */
100
+ isRiskAnalysisOpen?: boolean;
101
+ /** Custom risk details card component */
102
+ RiskDetailsCard?: React.ComponentType<RiskDetailsCardProps>;
103
+ /** Handler for adding GTN to document */
104
+ onAddGTNToDocument?: (keyValuePair: {
105
+ key: string;
106
+ value: string;
107
+ }) => void;
108
+ };
109
+ /**
110
+ * A feature-rich input field component with label, validation, GTN integration,
111
+ * risk analysis support, and comprehensive styling options.
112
+ *
113
+ * @example
114
+ * ```tsx
115
+ * <BaseInputField
116
+ * id="email"
117
+ * label="Email Address"
118
+ * type="email"
119
+ * value={email}
120
+ * onChange={setEmail}
121
+ * placeholder="Enter your email"
122
+ * required
123
+ * errorMessage={emailError}
124
+ * />
125
+ * ```
126
+ */
127
+ export declare const BaseInputField: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<HTMLInputElement>>;
128
+ export default BaseInputField;
@@ -0,0 +1,55 @@
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;
@@ -0,0 +1,9 @@
1
+ import { type CheckboxChangeEvent, type CheckboxProps } from "antd";
2
+ type TCheckboxComponentProps = {
3
+ label?: string;
4
+ isChecked: boolean;
5
+ onChange: (e: CheckboxChangeEvent) => void;
6
+ id: string;
7
+ } & CheckboxProps;
8
+ export declare const CheckboxComponent: ({ label, isChecked, onChange, id, ...props }: TCheckboxComponentProps) => import("react/jsx-runtime").JSX.Element;
9
+ export type { TCheckboxComponentProps };
@@ -0,0 +1,60 @@
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;
@@ -0,0 +1,86 @@
1
+ import CreatableSelect from "react-select/creatable";
2
+ import type { LabelType } from "../../data-display/label/Label";
3
+ import type { ComponentProps } from "react";
4
+ /**
5
+ * Option type for the CreatableSelect component
6
+ */
7
+ export interface SelectOption {
8
+ /** The value of the option */
9
+ value: string | number;
10
+ /** The label displayed for the option */
11
+ label: string;
12
+ /** Whether the option is disabled */
13
+ isDisabled?: boolean;
14
+ /** Additional data for the option */
15
+ data?: Record<string, unknown>;
16
+ }
17
+ /**
18
+ * Props for the CreatableSelectField component
19
+ * Matches the lax-web-portal implementation for drop-in replacement
20
+ */
21
+ export type TProps = {
22
+ /** Unique identifier for the select */
23
+ id: string;
24
+ /** Label text to display above the select */
25
+ label: string;
26
+ /** Placeholder text for the select */
27
+ placeholder?: string;
28
+ /** Current value for single select */
29
+ value?: any;
30
+ /** Callback function called when selection changes */
31
+ onChange(data: any): void;
32
+ /** Error message to display below the select */
33
+ errorMessage?: string;
34
+ /** Array of available options */
35
+ selectOptions: any[];
36
+ /** Whether the select is in loading state */
37
+ loading?: boolean;
38
+ /** Whether multiple selections are allowed */
39
+ multiSelect?: boolean;
40
+ /** Current values for multi select */
41
+ selectedValues?: any[];
42
+ /** Custom filter function for options */
43
+ filterOption?: any;
44
+ /** Whether to preserve original case in the label */
45
+ originalCase?: boolean;
46
+ /** Whether the select is disabled */
47
+ disabled?: boolean;
48
+ /** Whether the select is clearable */
49
+ isClearable?: boolean;
50
+ /** Whether the field is required */
51
+ required?: boolean;
52
+ /** Tags/labels to display next to the label */
53
+ tags?: (string | LabelType)[];
54
+ /** Tooltip text for the help icon */
55
+ tooltip?: string;
56
+ /** Additional CSS classes for the wrapper */
57
+ className?: string;
58
+ /** Whether the component is in dark mode */
59
+ isDarkMode?: boolean;
60
+ };
61
+ export type CreatableSelectProps = TProps & ComponentProps<typeof CreatableSelect>;
62
+ /**
63
+ * A creatable select component with label, validation, and styling support.
64
+ * Features dark mode support, accessibility enhancements, and comprehensive prop support.
65
+ * Built on top of react-select/creatable for advanced functionality.
66
+ *
67
+ * This component is designed as a drop-in replacement for the lax-web-portal
68
+ * CreatableSelectField component.
69
+ *
70
+ * @example
71
+ * ```tsx
72
+ * <CreatableSelectField
73
+ * id="tags"
74
+ * label="Tags"
75
+ * selectOptions={tagOptions}
76
+ * value={selectedTag}
77
+ * onChange={(newValue) => setSelectedTag(newValue)}
78
+ * placeholder="Select or create tags..."
79
+ * multiSelect
80
+ * />
81
+ * ```
82
+ */
83
+ export declare const CreatableSelectField: {
84
+ ({ id, label, errorMessage, selectOptions, loading, isClearable, multiSelect, selectedValues, disabled, required, value, className, tooltip, tags, originalCase, onChange, filterOption, placeholder, isDarkMode, ...props }: TProps & ComponentProps<typeof CreatableSelect>): import("react/jsx-runtime").JSX.Element;
85
+ displayName: string;
86
+ };