@risalabs_frontend_org/oasis-ui-kit 0.47.0 → 0.48.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/dist/index.d.ts +3 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/src/components/criterion-card/criterion-card.d.ts +41 -0
- package/dist/src/components/feedback-card/feedback-card.d.ts +16 -0
- package/dist/src/components/variant-badge/variant-badge.d.ts +12 -0
- package/package.json +1 -1
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./criterion-card.scss";
|
|
3
|
+
export type CriterionStatus = "met" | "not-met";
|
|
4
|
+
export type ConfidenceColor = "low" | "medium" | "high" | "neutral";
|
|
5
|
+
export interface CriterionCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
|
|
6
|
+
variant?: "default";
|
|
7
|
+
id?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
text: string;
|
|
10
|
+
status: CriterionStatus;
|
|
11
|
+
textClassName?: string;
|
|
12
|
+
textStyle?: React.CSSProperties;
|
|
13
|
+
contentClassName?: string;
|
|
14
|
+
contentStyle?: React.CSSProperties;
|
|
15
|
+
children?: React.ReactNode;
|
|
16
|
+
statusBadge?: React.ReactNode;
|
|
17
|
+
documentIcon?: React.ReactNode;
|
|
18
|
+
thumbsUpIcon?: React.ReactNode;
|
|
19
|
+
thumbsDownIcon?: React.ReactNode;
|
|
20
|
+
thumbsDownIconFilled?: React.ReactNode;
|
|
21
|
+
showDocumentCount?: boolean;
|
|
22
|
+
documentCount?: number;
|
|
23
|
+
documentLabel?: string;
|
|
24
|
+
onDocumentClick?: () => void;
|
|
25
|
+
documentCountAriaLabel?: string;
|
|
26
|
+
showConfidence?: boolean;
|
|
27
|
+
confidence?: number;
|
|
28
|
+
confidenceLabel?: string;
|
|
29
|
+
confidenceColor?: ConfidenceColor;
|
|
30
|
+
showAiFeedback?: boolean;
|
|
31
|
+
aiFeedbackLabel?: string;
|
|
32
|
+
onThumbsUp?: () => void;
|
|
33
|
+
onThumbsDown?: () => void;
|
|
34
|
+
thumbsUpActive?: boolean;
|
|
35
|
+
thumbsDownActive?: boolean;
|
|
36
|
+
thumbsUpDisabled?: boolean;
|
|
37
|
+
thumbsDownDisabled?: boolean;
|
|
38
|
+
}
|
|
39
|
+
declare const CriterionCard: ({ variant: _variant, id, className, text, status, textClassName, textStyle, contentClassName, contentStyle, children, statusBadge, documentIcon, thumbsUpIcon, thumbsDownIcon, thumbsDownIconFilled, showDocumentCount, documentCount, documentLabel, onDocumentClick, documentCountAriaLabel, showConfidence, confidence, confidenceLabel, confidenceColor: confidenceColorProp, showAiFeedback, aiFeedbackLabel, onThumbsUp, onThumbsDown, thumbsUpActive, thumbsDownActive, thumbsUpDisabled, thumbsDownDisabled, ...rest }: CriterionCardProps) => React.JSX.Element;
|
|
40
|
+
export { CriterionCard };
|
|
41
|
+
export default CriterionCard;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
import "./feedback-card.scss";
|
|
4
|
+
export type FeedbackCondition = "met" | "not-met";
|
|
5
|
+
export interface FeedbackCardProps {
|
|
6
|
+
summaryText: string;
|
|
7
|
+
condition?: FeedbackCondition;
|
|
8
|
+
improvementText?: string;
|
|
9
|
+
onSave?: (improvementText: string, condition: FeedbackCondition) => void;
|
|
10
|
+
onCancel?: () => void;
|
|
11
|
+
defaultOpen?: boolean;
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
declare const FeedbackCard: ({ summaryText, condition, improvementText, onSave, onCancel, defaultOpen, children, }: FeedbackCardProps) => React.JSX.Element;
|
|
15
|
+
export { FeedbackCard };
|
|
16
|
+
export default FeedbackCard;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./variant-badge.scss";
|
|
3
|
+
export interface VariantBadgeProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
|
|
4
|
+
text: string;
|
|
5
|
+
backgroundColor: string;
|
|
6
|
+
borderColor: string;
|
|
7
|
+
textColor: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const VariantBadge: ({ text, backgroundColor, borderColor, textColor, className, style, ...rest }: VariantBadgeProps) => React.JSX.Element;
|
|
11
|
+
export { VariantBadge };
|
|
12
|
+
export default VariantBadge;
|