@intelligencebank/connectingib 5.0.0 → 5.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.
- package/README.md +123 -0
- package/dist/components/Box/Box.d.ts +35 -0
- package/dist/components/Box/Box.d.ts.map +1 -0
- package/dist/components/Box/Box.types.d.ts +79 -0
- package/dist/components/Box/Box.types.d.ts.map +1 -0
- package/dist/components/Box/index.d.ts +3 -0
- package/dist/components/Box/index.d.ts.map +1 -0
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.types.d.ts +5 -1
- package/dist/components/Button/Button.types.d.ts.map +1 -1
- package/dist/components/CategoryFilters/CategoryFilters.d.ts +23 -0
- package/dist/components/CategoryFilters/CategoryFilters.d.ts.map +1 -0
- package/dist/components/CategoryFilters/CategoryFilters.types.d.ts +61 -0
- package/dist/components/CategoryFilters/CategoryFilters.types.d.ts.map +1 -0
- package/dist/components/CategoryFilters/index.d.ts +22 -0
- package/dist/components/CategoryFilters/index.d.ts.map +1 -0
- package/dist/components/Center/Center.d.ts +25 -0
- package/dist/components/Center/Center.d.ts.map +1 -0
- package/dist/components/Center/Center.types.d.ts +53 -0
- package/dist/components/Center/Center.types.d.ts.map +1 -0
- package/dist/components/Center/index.d.ts +3 -0
- package/dist/components/Center/index.d.ts.map +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts +4 -0
- package/dist/components/Checkbox/Checkbox.d.ts.map +1 -0
- package/dist/components/Checkbox/Checkbox.types.d.ts +168 -0
- package/dist/components/Checkbox/Checkbox.types.d.ts.map +1 -0
- package/dist/components/Checkbox/CheckboxGroup.d.ts +7 -0
- package/dist/components/Checkbox/CheckboxGroup.d.ts.map +1 -0
- package/dist/components/Checkbox/index.d.ts +4 -0
- package/dist/components/Checkbox/index.d.ts.map +1 -0
- package/dist/components/Chip/Chip.d.ts.map +1 -1
- package/dist/components/Chip/Chip.types.d.ts +2 -0
- package/dist/components/Chip/Chip.types.d.ts.map +1 -1
- package/dist/components/ConnectedAppCard/ConnectedAppCard.d.ts +5 -0
- package/dist/components/ConnectedAppCard/ConnectedAppCard.d.ts.map +1 -0
- package/dist/components/ConnectedAppCard/ConnectedAppCard.types.d.ts +136 -0
- package/dist/components/ConnectedAppCard/ConnectedAppCard.types.d.ts.map +1 -0
- package/dist/components/ConnectedAppCard/index.d.ts +3 -0
- package/dist/components/ConnectedAppCard/index.d.ts.map +1 -0
- package/dist/components/CreateReview/CreateReview.d.ts +44 -0
- package/dist/components/CreateReview/CreateReview.d.ts.map +1 -0
- package/dist/components/CreateReview/CreateReview.types.d.ts +180 -0
- package/dist/components/CreateReview/CreateReview.types.d.ts.map +1 -0
- package/dist/components/CreateReview/index.d.ts +3 -0
- package/dist/components/CreateReview/index.d.ts.map +1 -0
- package/dist/components/Divider/Divider.d.ts +7 -0
- package/dist/components/Divider/Divider.d.ts.map +1 -0
- package/dist/components/Divider/Divider.types.d.ts +37 -0
- package/dist/components/Divider/Divider.types.d.ts.map +1 -0
- package/dist/components/Divider/index.d.ts +3 -0
- package/dist/components/Divider/index.d.ts.map +1 -0
- package/dist/components/EmptyState/EmptyState.d.ts +7 -0
- package/dist/components/EmptyState/EmptyState.d.ts.map +1 -0
- package/dist/components/EmptyState/EmptyState.types.d.ts +40 -0
- package/dist/components/EmptyState/EmptyState.types.d.ts.map +1 -0
- package/dist/components/EmptyState/index.d.ts +3 -0
- package/dist/components/EmptyState/index.d.ts.map +1 -0
- package/dist/components/HStack/HStack.d.ts +24 -0
- package/dist/components/HStack/HStack.d.ts.map +1 -0
- package/dist/components/HStack/HStack.types.d.ts +19 -0
- package/dist/components/HStack/HStack.types.d.ts.map +1 -0
- package/dist/components/HStack/index.d.ts +3 -0
- package/dist/components/HStack/index.d.ts.map +1 -0
- package/dist/components/Input/Input.d.ts.map +1 -1
- package/dist/components/Input/Input.types.d.ts +7 -1
- package/dist/components/Input/Input.types.d.ts.map +1 -1
- package/dist/components/LatestReview/FieldSelectionDialog.d.ts +22 -0
- package/dist/components/LatestReview/FieldSelectionDialog.d.ts.map +1 -0
- package/dist/components/LatestReview/LatestReview.d.ts +37 -0
- package/dist/components/LatestReview/LatestReview.d.ts.map +1 -0
- package/dist/components/LatestReview/LatestReview.types.d.ts +169 -0
- package/dist/components/LatestReview/LatestReview.types.d.ts.map +1 -0
- package/dist/components/LatestReview/index.d.ts +4 -0
- package/dist/components/LatestReview/index.d.ts.map +1 -0
- package/dist/components/LoginForm/LoginForm.d.ts.map +1 -1
- package/dist/components/Message/Message.d.ts.map +1 -1
- package/dist/components/Message/Message.types.d.ts +5 -1
- package/dist/components/Message/Message.types.d.ts.map +1 -1
- package/dist/components/ReviewDetails/ReviewDetails.d.ts +34 -0
- package/dist/components/ReviewDetails/ReviewDetails.d.ts.map +1 -0
- package/dist/components/ReviewDetails/ReviewDetails.types.d.ts +77 -0
- package/dist/components/ReviewDetails/ReviewDetails.types.d.ts.map +1 -0
- package/dist/components/ReviewDetails/index.d.ts +9 -0
- package/dist/components/ReviewDetails/index.d.ts.map +1 -0
- package/dist/components/ReviewFiles/ReviewFiles.d.ts +16 -0
- package/dist/components/ReviewFiles/ReviewFiles.d.ts.map +1 -0
- package/dist/components/ReviewFiles/ReviewFiles.types.d.ts +91 -0
- package/dist/components/ReviewFiles/ReviewFiles.types.d.ts.map +1 -0
- package/dist/components/ReviewFiles/index.d.ts +33 -0
- package/dist/components/ReviewFiles/index.d.ts.map +1 -0
- package/dist/components/ReviewProcessing/ReviewProcessing.d.ts +37 -0
- package/dist/components/ReviewProcessing/ReviewProcessing.d.ts.map +1 -0
- package/dist/components/ReviewProcessing/ReviewProcessing.types.d.ts +52 -0
- package/dist/components/ReviewProcessing/ReviewProcessing.types.d.ts.map +1 -0
- package/dist/components/ReviewProcessing/index.d.ts +3 -0
- package/dist/components/ReviewProcessing/index.d.ts.map +1 -0
- package/dist/components/ReviewResults/ReviewResults.d.ts +33 -0
- package/dist/components/ReviewResults/ReviewResults.d.ts.map +1 -0
- package/dist/components/ReviewResults/ReviewResults.types.d.ts +56 -0
- package/dist/components/ReviewResults/ReviewResults.types.d.ts.map +1 -0
- package/dist/components/ReviewResults/index.d.ts +9 -0
- package/dist/components/ReviewResults/index.d.ts.map +1 -0
- package/dist/components/RiskCard/RiskCard.d.ts.map +1 -1
- package/dist/components/RiskCard/RiskCard.types.d.ts +0 -2
- package/dist/components/RiskCard/RiskCard.types.d.ts.map +1 -1
- package/dist/components/RiskItemCard/RiskItemCard.d.ts +42 -0
- package/dist/components/RiskItemCard/RiskItemCard.d.ts.map +1 -0
- package/dist/components/RiskItemCard/RiskItemCard.types.d.ts +111 -0
- package/dist/components/RiskItemCard/RiskItemCard.types.d.ts.map +1 -0
- package/dist/components/RiskItemCard/index.d.ts +3 -0
- package/dist/components/RiskItemCard/index.d.ts.map +1 -0
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/Select.types.d.ts +6 -0
- package/dist/components/Select/Select.types.d.ts.map +1 -1
- package/dist/components/SelectableItem/SelectableItem.d.ts +23 -0
- package/dist/components/SelectableItem/SelectableItem.d.ts.map +1 -0
- package/dist/components/SelectableItem/SelectableItem.types.d.ts +53 -0
- package/dist/components/SelectableItem/SelectableItem.types.d.ts.map +1 -0
- package/dist/components/SelectableItem/index.d.ts +3 -0
- package/dist/components/SelectableItem/index.d.ts.map +1 -0
- package/dist/components/Stack/Stack.d.ts +39 -0
- package/dist/components/Stack/Stack.d.ts.map +1 -0
- package/dist/components/Stack/Stack.types.d.ts +45 -0
- package/dist/components/Stack/Stack.types.d.ts.map +1 -0
- package/dist/components/Stack/index.d.ts +3 -0
- package/dist/components/Stack/index.d.ts.map +1 -0
- package/dist/components/Status/Status.d.ts.map +1 -1
- package/dist/components/Switch/Switch.d.ts.map +1 -1
- package/dist/components/Switch/Switch.types.d.ts +6 -0
- package/dist/components/Switch/Switch.types.d.ts.map +1 -1
- package/dist/components/TextArea/TextArea.d.ts.map +1 -1
- package/dist/components/TextArea/TextArea.types.d.ts +22 -0
- package/dist/components/TextArea/TextArea.types.d.ts.map +1 -1
- package/dist/components/Typography/Typography.d.ts +45 -0
- package/dist/components/Typography/Typography.d.ts.map +1 -0
- package/dist/components/Typography/Typography.types.d.ts +140 -0
- package/dist/components/Typography/Typography.types.d.ts.map +1 -0
- package/dist/components/Typography/index.d.ts +4 -0
- package/dist/components/Typography/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +33 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/connectingib.css +1 -1
- package/dist/index.js +1792 -770
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9436 -6761
- package/dist/index.mjs.map +1 -1
- package/dist/tokens/index.d.ts +1 -156
- package/dist/tokens/index.d.ts.map +1 -1
- package/dist/tokens/index.js +1 -1
- package/dist/tokens/index.js.map +1 -1
- package/dist/tokens/index.mjs +23 -96
- package/dist/tokens/index.mjs.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/riskReview.d.ts +258 -0
- package/dist/types/riskReview.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { ReviewFileItem } from '../../types/riskReview';
|
|
3
|
+
/**
|
|
4
|
+
* Props for ReviewFiles component
|
|
5
|
+
*/
|
|
6
|
+
export interface ReviewFilesProps {
|
|
7
|
+
/**
|
|
8
|
+
* List of files to display
|
|
9
|
+
*/
|
|
10
|
+
files: ReviewFileItem[];
|
|
11
|
+
/**
|
|
12
|
+
* Whether selection is enabled
|
|
13
|
+
* When false, files are display-only
|
|
14
|
+
*/
|
|
15
|
+
selectionEnabled?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Selection mode when selectionEnabled is true
|
|
18
|
+
* - 'single': Radio button selection (one file)
|
|
19
|
+
* - 'multiple': Checkbox selection (multiple files)
|
|
20
|
+
*/
|
|
21
|
+
selectionMode?: 'single' | 'multiple';
|
|
22
|
+
/**
|
|
23
|
+
* Currently selected file ID(s)
|
|
24
|
+
* For single mode: string | undefined
|
|
25
|
+
* For multiple mode: string[]
|
|
26
|
+
*/
|
|
27
|
+
selectedIds?: string | string[];
|
|
28
|
+
/**
|
|
29
|
+
* Maximum files that can be selected (multiple mode only)
|
|
30
|
+
*/
|
|
31
|
+
maxSelection?: number;
|
|
32
|
+
/**
|
|
33
|
+
* Callback when selection changes
|
|
34
|
+
*/
|
|
35
|
+
onSelectionChange?: (selectedIds: string[]) => void;
|
|
36
|
+
/**
|
|
37
|
+
* Callback when a file is removed
|
|
38
|
+
*/
|
|
39
|
+
onRemove?: (fileId: string) => void;
|
|
40
|
+
/**
|
|
41
|
+
* Whether to show remove buttons
|
|
42
|
+
* @default true when onRemove is provided
|
|
43
|
+
*/
|
|
44
|
+
showRemove?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Whether to show file size
|
|
47
|
+
* @default true
|
|
48
|
+
*/
|
|
49
|
+
showSize?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Whether to show file source
|
|
52
|
+
* @default false
|
|
53
|
+
*/
|
|
54
|
+
showSource?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Whether to show validation errors
|
|
57
|
+
* @default true
|
|
58
|
+
*/
|
|
59
|
+
showErrors?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Custom empty state when no files
|
|
62
|
+
*/
|
|
63
|
+
emptyState?: ReactNode;
|
|
64
|
+
/**
|
|
65
|
+
* Maximum height before scrolling
|
|
66
|
+
*/
|
|
67
|
+
maxHeight?: number | string;
|
|
68
|
+
/**
|
|
69
|
+
* Format function for file size display
|
|
70
|
+
* @default Uses built-in formatter (KB, MB, GB)
|
|
71
|
+
*/
|
|
72
|
+
formatSize?: (bytes: number) => string;
|
|
73
|
+
/**
|
|
74
|
+
* Data attribute for testing
|
|
75
|
+
*/
|
|
76
|
+
dataTestId?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Data attribute for analytics
|
|
79
|
+
*/
|
|
80
|
+
dataId?: string;
|
|
81
|
+
/**
|
|
82
|
+
* Additional CSS class
|
|
83
|
+
*/
|
|
84
|
+
className?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Inline styles
|
|
87
|
+
*/
|
|
88
|
+
style?: CSSProperties;
|
|
89
|
+
}
|
|
90
|
+
export type { ReviewFileItem };
|
|
91
|
+
//# sourceMappingURL=ReviewFiles.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReviewFiles.types.d.ts","sourceRoot":"","sources":["../../../src/components/ReviewFiles/ReviewFiles.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,KAAK,EAAE,cAAc,EAAE,CAAC;IAExB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;;;OAIG;IACH,aAAa,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAC;IAEtC;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAEhC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,iBAAiB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAEpD;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAEpC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IAEvB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAE5B;;;OAGG;IACH,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAEvC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAGD,YAAY,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ReviewFiles Component
|
|
3
|
+
*
|
|
4
|
+
* Display and manage file list for review with selection support.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* import { ReviewFiles } from '@intelligencebank/connectingib';
|
|
9
|
+
*
|
|
10
|
+
* // Display only
|
|
11
|
+
* <ReviewFiles
|
|
12
|
+
* files={files}
|
|
13
|
+
* selectionEnabled={false}
|
|
14
|
+
* showSize
|
|
15
|
+
* dataTestId="file-list"
|
|
16
|
+
* />
|
|
17
|
+
*
|
|
18
|
+
* // With selection
|
|
19
|
+
* <ReviewFiles
|
|
20
|
+
* files={files}
|
|
21
|
+
* selectionEnabled
|
|
22
|
+
* selectionMode="single"
|
|
23
|
+
* selectedIds={selectedFileId}
|
|
24
|
+
* onSelectionChange={(ids) => setSelectedFileId(ids[0])}
|
|
25
|
+
* onRemove={handleRemove}
|
|
26
|
+
* dataTestId="file-list-select"
|
|
27
|
+
* />
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export { ReviewFiles } from './ReviewFiles';
|
|
31
|
+
export type { ReviewFilesProps } from './ReviewFiles.types';
|
|
32
|
+
export type { ReviewFileItem, FileSource, FileValidationError, } from '../../types/riskReview';
|
|
33
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ReviewFiles/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAG5D,YAAY,EACV,cAAc,EACd,UAAU,EACV,mBAAmB,GACpB,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ReviewProcessingProps } from './ReviewProcessing.types';
|
|
2
|
+
/**
|
|
3
|
+
* ReviewProcessing Component
|
|
4
|
+
*
|
|
5
|
+
* Display processing/loading state during review with support for single and multi-file modes.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* // Single file mode
|
|
10
|
+
* <ReviewProcessing
|
|
11
|
+
* mode="single"
|
|
12
|
+
* isVisible={isProcessing}
|
|
13
|
+
* message="Uploading file..."
|
|
14
|
+
* dataTestId="review-processing"
|
|
15
|
+
* />
|
|
16
|
+
*
|
|
17
|
+
* // Multi-file mode
|
|
18
|
+
* <ReviewProcessing
|
|
19
|
+
* mode="multiple"
|
|
20
|
+
* isVisible={isProcessing}
|
|
21
|
+
* progress={{
|
|
22
|
+
* totalFiles: 3,
|
|
23
|
+
* completedFiles: 1,
|
|
24
|
+
* failedFiles: 0,
|
|
25
|
+
* files: [
|
|
26
|
+
* { fileId: '1', fileName: 'doc.pdf', status: 'completed' },
|
|
27
|
+
* { fileId: '2', fileName: 'report.pdf', status: 'processing' },
|
|
28
|
+
* { fileId: '3', fileName: 'image.png', status: 'pending' }
|
|
29
|
+
* ]
|
|
30
|
+
* }}
|
|
31
|
+
* dataTestId="multi-file-processing"
|
|
32
|
+
* />
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export declare const ReviewProcessing: React.FC<ReviewProcessingProps>;
|
|
36
|
+
export default ReviewProcessing;
|
|
37
|
+
//# sourceMappingURL=ReviewProcessing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReviewProcessing.d.ts","sourceRoot":"","sources":["../../../src/components/ReviewProcessing/ReviewProcessing.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AA4OtE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA4F5D,CAAC;AAIF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { MultiFileProgressData } from '../../types/riskReview';
|
|
2
|
+
import { CSSProperties } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Props for ReviewProcessing component
|
|
5
|
+
*/
|
|
6
|
+
export interface ReviewProcessingProps {
|
|
7
|
+
/**
|
|
8
|
+
* Processing mode
|
|
9
|
+
* - 'single': Shows single spinner with message
|
|
10
|
+
* - 'multiple': Shows progress list with per-file status
|
|
11
|
+
*/
|
|
12
|
+
mode: 'single' | 'multiple';
|
|
13
|
+
/**
|
|
14
|
+
* Multi-file progress data (required when mode='multiple')
|
|
15
|
+
*/
|
|
16
|
+
progress?: MultiFileProgressData;
|
|
17
|
+
/**
|
|
18
|
+
* Processing message for single mode
|
|
19
|
+
* @default 'Processing Risk Review...'
|
|
20
|
+
*/
|
|
21
|
+
message?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Secondary helper text
|
|
24
|
+
* @default 'This may take a few moments'
|
|
25
|
+
*/
|
|
26
|
+
helperText?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Custom title text
|
|
29
|
+
*/
|
|
30
|
+
title?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Whether the overlay is visible
|
|
33
|
+
*/
|
|
34
|
+
isVisible: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Data attribute for testing
|
|
37
|
+
*/
|
|
38
|
+
dataTestId?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Data attribute for analytics
|
|
41
|
+
*/
|
|
42
|
+
dataId?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Additional CSS class
|
|
45
|
+
*/
|
|
46
|
+
className?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Inline styles
|
|
49
|
+
*/
|
|
50
|
+
style?: CSSProperties;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=ReviewProcessing.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReviewProcessing.types.d.ts","sourceRoot":"","sources":["../../../src/components/ReviewProcessing/ReviewProcessing.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,IAAI,EAAE,QAAQ,GAAG,UAAU,CAAC;IAE5B;;OAEG;IACH,QAAQ,CAAC,EAAE,qBAAqB,CAAC;IAEjC;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ReviewProcessing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC/D,YAAY,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ReviewResultsProps } from './ReviewResults.types';
|
|
2
|
+
/**
|
|
3
|
+
* ReviewResults component - Combined ResultsSummary + ResultActions
|
|
4
|
+
*
|
|
5
|
+
* EXACT copy of styling from web-app-risk-reviews
|
|
6
|
+
*
|
|
7
|
+
* Displays a summary of the compliance review including:
|
|
8
|
+
* - Overall status with color-coded badge (pass/fail/warning)
|
|
9
|
+
* - Review timestamp
|
|
10
|
+
* - File name (for file reviews)
|
|
11
|
+
* - Number of risks with visual indicator
|
|
12
|
+
* - Action buttons (Send to IntelligenceBank)
|
|
13
|
+
*
|
|
14
|
+
* Status colors:
|
|
15
|
+
* - Green: Completed with no risks detected
|
|
16
|
+
* - Orange/Yellow: Completed with risks detected
|
|
17
|
+
* - Orange: Processing
|
|
18
|
+
* - Red: Failed
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```tsx
|
|
22
|
+
* <ReviewResults
|
|
23
|
+
* results={reviewResult}
|
|
24
|
+
* reviewType="file"
|
|
25
|
+
* onSendToIB={handleSendToIB}
|
|
26
|
+
* canSendToIB={true}
|
|
27
|
+
* showActions
|
|
28
|
+
* />
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export declare const ReviewResults: React.FC<ReviewResultsProps>;
|
|
32
|
+
export default ReviewResults;
|
|
33
|
+
//# sourceMappingURL=ReviewResults.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReviewResults.d.ts","sourceRoot":"","sources":["../../../src/components/ReviewResults/ReviewResults.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAgB,MAAM,uBAAuB,CAAC;AA0L9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA0FtD,CAAC;AAIF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Review status from the API
|
|
4
|
+
*/
|
|
5
|
+
export type ReviewStatus = 'processing' | 'completed' | 'failed';
|
|
6
|
+
/**
|
|
7
|
+
* Risk finding in a review
|
|
8
|
+
*/
|
|
9
|
+
export interface RiskFinding {
|
|
10
|
+
id: string;
|
|
11
|
+
category: string;
|
|
12
|
+
description: string;
|
|
13
|
+
location?: string;
|
|
14
|
+
severity?: 'low' | 'medium' | 'high';
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Review result data - matches web-app-risk-reviews ReviewResult type
|
|
18
|
+
*/
|
|
19
|
+
export interface ReviewResultData {
|
|
20
|
+
reviewId: string;
|
|
21
|
+
status: ReviewStatus;
|
|
22
|
+
type: 'file' | 'text' | 'weburl';
|
|
23
|
+
fileName?: string;
|
|
24
|
+
pageUrl?: string;
|
|
25
|
+
inputText?: string;
|
|
26
|
+
timestamp: string;
|
|
27
|
+
risks?: RiskFinding[];
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Props for ReviewResults component
|
|
31
|
+
*
|
|
32
|
+
* EXACT match of ResultsSummary + ResultActions props from web-app-risk-reviews
|
|
33
|
+
*/
|
|
34
|
+
export interface ReviewResultsProps {
|
|
35
|
+
/** The review results data */
|
|
36
|
+
results: ReviewResultData;
|
|
37
|
+
/** Type of review - determines which buttons to show */
|
|
38
|
+
reviewType: 'file' | 'text';
|
|
39
|
+
/** Handler for Send to IntelligenceBank action (file reviews only) */
|
|
40
|
+
onSendToIB?: () => void;
|
|
41
|
+
/** Whether Send to IB is available (file exists) */
|
|
42
|
+
canSendToIB?: boolean;
|
|
43
|
+
/** Loading state to disable buttons */
|
|
44
|
+
isLoading?: boolean;
|
|
45
|
+
/** Whether to show action buttons */
|
|
46
|
+
showActions?: boolean;
|
|
47
|
+
/** Additional CSS class */
|
|
48
|
+
className?: string;
|
|
49
|
+
/** Data test ID for testing */
|
|
50
|
+
dataTestId?: string;
|
|
51
|
+
/** Data ID for analytics */
|
|
52
|
+
dataId?: string;
|
|
53
|
+
/** Inline styles */
|
|
54
|
+
style?: CSSProperties;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=ReviewResults.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReviewResults.types.d.ts","sourceRoot":"","sources":["../../../src/components/ReviewResults/ReviewResults.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,YAAY,GAAG,WAAW,GAAG,QAAQ,CAAC;AAEjE;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;CACtC;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,YAAY,CAAC;IACrB,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,WAAW,EAAE,CAAC;CACvB;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,8BAA8B;IAC9B,OAAO,EAAE,gBAAgB,CAAC;IAC1B,wDAAwD;IACxD,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,sEAAsE;IACtE,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,oDAAoD;IACpD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,uCAAuC;IACvC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,qCAAqC;IACrC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+BAA+B;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4BAA4B;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oBAAoB;IACpB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ReviewResults Component
|
|
3
|
+
*
|
|
4
|
+
* Display review results summary and actions.
|
|
5
|
+
* EXACT match of ResultsSummary + ResultActions from web-app-risk-reviews.
|
|
6
|
+
*/
|
|
7
|
+
export { ReviewResults, default } from './ReviewResults';
|
|
8
|
+
export type { ReviewResultsProps, ReviewResultData, ReviewStatus, RiskFinding, } from './ReviewResults.types';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ReviewResults/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AACzD,YAAY,EACV,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACZ,WAAW,GACZ,MAAM,uBAAuB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RiskCard.d.ts","sourceRoot":"","sources":["../../../src/components/RiskCard/RiskCard.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RiskCard.d.ts","sourceRoot":"","sources":["../../../src/components/RiskCard/RiskCard.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AA8GtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,QAAQ,0GAkIpB,CAAC;AAIF,eAAe,QAAQ,CAAC"}
|
|
@@ -67,8 +67,6 @@ export interface RiskCardProps {
|
|
|
67
67
|
showRecommendationText?: string;
|
|
68
68
|
/** Text for hide recommendation button (default: "Hide recommendation") */
|
|
69
69
|
hideRecommendationText?: string;
|
|
70
|
-
/** Text label shown above recommendation (default: "Recommendation") */
|
|
71
|
-
recommendationLabel?: string;
|
|
72
70
|
/**
|
|
73
71
|
* Event handlers
|
|
74
72
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RiskCard.types.d.ts","sourceRoot":"","sources":["../../../src/components/RiskCard/RiskCard.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtD;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;AAErD;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACvB,qCAAqC;IACrC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,2BAA2B;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,+BAA+B;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,6CAA6C;IAC7C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,yBAAyB;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sDAAsD;IACtD,QAAQ,CAAC,EAAE,MAAM,CAA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E,aAAa,CAAC,EAAE,SAAS,CAAC;IAE1B;;OAEG;IAEH,2CAA2C;IAC3C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,4CAA4C;IAC5C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8CAA8C;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { RiskItemCardProps } from './RiskItemCard.types';
|
|
2
|
+
/**
|
|
3
|
+
* RiskItemCard - A selectable card for file/page items in Risk Reviews
|
|
4
|
+
*
|
|
5
|
+
* A versatile card component that supports:
|
|
6
|
+
* - Selected, error, and disabled states
|
|
7
|
+
* - Single (radio) or multi (checkbox) selection modes
|
|
8
|
+
* - Custom icon with background/foreground colors
|
|
9
|
+
* - Title and subtitle with text truncation
|
|
10
|
+
* - Optional badge (Chip with tn font size applied automatically)
|
|
11
|
+
* - Remove button
|
|
12
|
+
* - Custom accent color for selection highlighting
|
|
13
|
+
*
|
|
14
|
+
* Used for displaying files in the review queue and pages for URL capture.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* // File card with badge
|
|
19
|
+
* <RiskItemCard
|
|
20
|
+
* icon={{ content: 'PDF', bgColor: '#FFEBEE', fgColor: '#C62828' }}
|
|
21
|
+
* title="document.pdf"
|
|
22
|
+
* badge={<Chip size="small" label="1.2 MB" />}
|
|
23
|
+
* selected={selectedIndex === 0}
|
|
24
|
+
* onClick={() => setSelectedIndex(0)}
|
|
25
|
+
* onRemove={() => removeFile(0)}
|
|
26
|
+
* />
|
|
27
|
+
*
|
|
28
|
+
* // Page card with multi selection
|
|
29
|
+
* <RiskItemCard
|
|
30
|
+
* icon={{ content: <FavIcon src={url} />, bgColor: 'transparent' }}
|
|
31
|
+
* title="Page Title"
|
|
32
|
+
* subtitle="https://example.com/page"
|
|
33
|
+
* selectionMode="multi"
|
|
34
|
+
* selected={selectedIds.has(id)}
|
|
35
|
+
* disabled={isMaxSelected && !selectedIds.has(id)}
|
|
36
|
+
* onClick={() => toggleSelection(id)}
|
|
37
|
+
* />
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
export declare const RiskItemCard: import('react').ForwardRefExoticComponent<RiskItemCardProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
41
|
+
export default RiskItemCard;
|
|
42
|
+
//# sourceMappingURL=RiskItemCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RiskItemCard.d.ts","sourceRoot":"","sources":["../../../src/components/RiskItemCard/RiskItemCard.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AA0L9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,eAAO,MAAM,YAAY,8GA+JxB,CAAC;AAIF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { ReactNode, CSSProperties } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Selection mode for the RiskItemCard
|
|
4
|
+
* - 'single': Radio button selection (one item at a time)
|
|
5
|
+
* - 'multi': Checkbox selection (multiple items)
|
|
6
|
+
*/
|
|
7
|
+
export type RiskItemCardSelectionMode = 'single' | 'multi';
|
|
8
|
+
/**
|
|
9
|
+
* Icon configuration for the RiskItemCard
|
|
10
|
+
*/
|
|
11
|
+
export interface RiskItemCardIcon {
|
|
12
|
+
/**
|
|
13
|
+
* Icon content - can be text (e.g., "PDF"), emoji, or ReactNode
|
|
14
|
+
*/
|
|
15
|
+
content: ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Background color for the icon container
|
|
18
|
+
*/
|
|
19
|
+
bgColor?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Foreground/text color for the icon
|
|
22
|
+
*/
|
|
23
|
+
fgColor?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Props for the RiskItemCard component
|
|
27
|
+
*/
|
|
28
|
+
export interface RiskItemCardProps {
|
|
29
|
+
/**
|
|
30
|
+
* Whether the item is currently selected
|
|
31
|
+
*/
|
|
32
|
+
selected?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Whether the item has an error state
|
|
35
|
+
*/
|
|
36
|
+
error?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Whether the item is disabled
|
|
39
|
+
*/
|
|
40
|
+
disabled?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Icon configuration with content, background and foreground colors
|
|
43
|
+
*/
|
|
44
|
+
icon?: RiskItemCardIcon;
|
|
45
|
+
/**
|
|
46
|
+
* Main title text (e.g., filename, page title)
|
|
47
|
+
*/
|
|
48
|
+
title: string;
|
|
49
|
+
/**
|
|
50
|
+
* Subtitle text (e.g., file size, URL)
|
|
51
|
+
* Can be a string or a ReactNode for custom formatting
|
|
52
|
+
*/
|
|
53
|
+
subtitle?: ReactNode;
|
|
54
|
+
/**
|
|
55
|
+
* Optional badge or tag content (e.g., file size badge, status chip)
|
|
56
|
+
* When passing a Chip component, it will automatically use the tn font size
|
|
57
|
+
*/
|
|
58
|
+
badge?: ReactNode;
|
|
59
|
+
/**
|
|
60
|
+
* Error message to display instead of subtitle
|
|
61
|
+
*/
|
|
62
|
+
errorMessage?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Callback when remove button is clicked (shows remove button if provided)
|
|
65
|
+
*/
|
|
66
|
+
onRemove?: () => void;
|
|
67
|
+
/**
|
|
68
|
+
* Callback when the card is clicked for selection
|
|
69
|
+
*/
|
|
70
|
+
onClick?: () => void;
|
|
71
|
+
/**
|
|
72
|
+
* Selection mode: 'single' for radio, 'multi' for checkbox
|
|
73
|
+
* @default 'single'
|
|
74
|
+
*/
|
|
75
|
+
selectionMode?: RiskItemCardSelectionMode;
|
|
76
|
+
/**
|
|
77
|
+
* Whether to show the selection control (radio/checkbox)
|
|
78
|
+
* @default true
|
|
79
|
+
*/
|
|
80
|
+
showSelectionControl?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Radio group name (for single selection mode)
|
|
83
|
+
*/
|
|
84
|
+
name?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Value for the selection control
|
|
87
|
+
*/
|
|
88
|
+
value?: string | number;
|
|
89
|
+
/**
|
|
90
|
+
* Custom accent color for selection highlighting
|
|
91
|
+
* Defaults to theme.colors.highlight
|
|
92
|
+
*/
|
|
93
|
+
accentColor?: string;
|
|
94
|
+
/**
|
|
95
|
+
* Additional CSS class name
|
|
96
|
+
*/
|
|
97
|
+
className?: string;
|
|
98
|
+
/**
|
|
99
|
+
* Inline styles applied to the container
|
|
100
|
+
*/
|
|
101
|
+
style?: CSSProperties;
|
|
102
|
+
/**
|
|
103
|
+
* data-testid attribute for testing purposes
|
|
104
|
+
*/
|
|
105
|
+
dataTestId?: string;
|
|
106
|
+
/**
|
|
107
|
+
* aria-label for the card
|
|
108
|
+
*/
|
|
109
|
+
ariaLabel?: string;
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=RiskItemCard.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RiskItemCard.types.d.ts","sourceRoot":"","sources":["../../../src/components/RiskItemCard/RiskItemCard.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtD;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,OAAO,EAAE,SAAS,CAAC;IAEnB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IAExB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IAEtB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;;OAGG;IACH,aAAa,CAAC,EAAE,yBAAyB,CAAC;IAE1C;;;OAGG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAExB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC;IAEtB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/RiskItemCard/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EACV,iBAAiB,EACjB,gBAAgB,EAChB,yBAAyB,GAC1B,MAAM,sBAAsB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,WAAW,EAA+B,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,WAAW,EAA+B,MAAM,gBAAgB,CAAC;AAiX/E;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,MAAM,wGAgYjB,CAAC;AAIH,eAAe,MAAM,CAAC"}
|
|
@@ -136,5 +136,11 @@ export interface SelectProps {
|
|
|
136
136
|
* Can be a theme token key ('xs', 'sm', 'base', 'md', 'lg', 'xl') or CSS value
|
|
137
137
|
*/
|
|
138
138
|
optionFontSize?: FontSizeValue;
|
|
139
|
+
/**
|
|
140
|
+
* Custom focus color for the select border and box-shadow
|
|
141
|
+
* When provided, overrides the default theme-based focus styling
|
|
142
|
+
* Accepts any valid CSS color value (hex, rgb, hsl, etc.)
|
|
143
|
+
*/
|
|
144
|
+
focusColor?: string;
|
|
139
145
|
}
|
|
140
146
|
//# sourceMappingURL=Select.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.types.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEjE;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,aAAa,CAAC,UAAU,CAAC,CAAC;AAElG;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,+CAA+C;IA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io button and custom accent color
|
|
4
|
+
*
|
|
5
|
+
* Used for creating selectable lists where items can be selected with custom
|
|
6
|
+
* brand/app colors. Commonly used for document selection in connected apps.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <SelectableItem
|
|
11
|
+
* selected={selectedId === item.id}
|
|
12
|
+
* accentColor="#6161FF"
|
|
13
|
+
* name="documents"
|
|
14
|
+
* value={item.id}
|
|
15
|
+
* onChange={(value) => setSelectedId(value)}
|
|
16
|
+
* >
|
|
17
|
+
* <ItemContent title={item.name} subtitle={item.type} />
|
|
18
|
+
* </SelectableItem>
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export declare const SelectableItem: import('react').ForwardRefExoticComponent<SelectableItemProps & import('react').RefAttributes<HTMLLabelElement>>;
|
|
22
|
+
export default SelectableItem;
|
|
23
|
+
//# sourceMappingURL=SelectableItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectableItem.d.ts","sourceRoot":"","sources":["../../../src/components/SelectableItem/SelectableItem.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAiDlE;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,cAAc,kHAmD1B,CAAC;AAIF,eAAe,cAAc,CAAC"}
|