@getsoren/design-system 4.84.0 → 4.85.1
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.
|
@@ -1,20 +1,33 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
export interface CheckboxCardProps {
|
|
3
|
+
/** Main line — one line in a horizontal card, up to three in a vertical one */
|
|
4
|
+
label: string;
|
|
3
5
|
/** Secondary line under the label — one line, ellipsized */
|
|
4
6
|
description?: string;
|
|
5
7
|
/** Leading visual, rendered in a 40px tile — an outlined icon, an avatar, an illustration */
|
|
6
|
-
icon
|
|
7
|
-
/**
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
|
|
8
|
+
icon?: ReactNode;
|
|
9
|
+
/** Content before the texts, rendered as is (an avatar, a badge) */
|
|
10
|
+
leading?: ReactNode;
|
|
11
|
+
/** Content after the texts of a horizontal card (an icon) */
|
|
12
|
+
trailing?: ReactNode;
|
|
13
|
+
/** Picture: above the texts of a vertical card, after them in a 56×48 box of a horizontal one */
|
|
14
|
+
picture?: ReactNode;
|
|
15
|
+
/** Shows a skeleton over the picture box */
|
|
16
|
+
isPictureLoading?: boolean;
|
|
17
|
+
/** `horizontal`: texts in a row; `vertical`: picture on top, for a catalog */
|
|
18
|
+
layout?: "horizontal" | "vertical";
|
|
19
|
+
/** Selection indicator; `none` for a plain choice. The group logic (single or multi select) belongs to the consumer */
|
|
20
|
+
control?: "checkbox" | "radio" | "none";
|
|
21
|
+
/** `end`: a check (or a dot) fading in after the texts; `start`: a circled indicator before them */
|
|
22
|
+
controlPlacement?: "start" | "end";
|
|
23
|
+
selected: boolean;
|
|
24
|
+
disabled?: boolean;
|
|
13
25
|
onClick: () => void;
|
|
26
|
+
testId?: string;
|
|
14
27
|
}
|
|
15
28
|
/**
|
|
16
|
-
* Large tap-target selection card: icon tile, label,
|
|
17
|
-
* Sized for tablet use in the field.
|
|
29
|
+
* Large tap-target selection card: optional icon tile or picture, label, description and a selection
|
|
30
|
+
* indicator. Sized for tablet use in the field.
|
|
18
31
|
*/
|
|
19
|
-
declare const CheckboxCard: ({ description, icon,
|
|
32
|
+
declare const CheckboxCard: ({ label, description, icon, leading, trailing, picture, isPictureLoading, layout, control, controlPlacement, selected, disabled, onClick, testId, }: CheckboxCardProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
20
33
|
export default CheckboxCard;
|
|
@@ -8,7 +8,7 @@ export interface PillOption {
|
|
|
8
8
|
}
|
|
9
9
|
interface PillGroupBaseProps {
|
|
10
10
|
options: PillOption[];
|
|
11
|
-
/** Draws the pills in the invalid colour */
|
|
11
|
+
/** Draws the pills in the invalid colour and marks the group invalid for assistive technologies */
|
|
12
12
|
error?: boolean;
|
|
13
13
|
/** Palette of the invalid state and of the helper text */
|
|
14
14
|
errorColor?: InvalidColor;
|