@factoringplus/pl-components-pack-v3 1.9.15-pre-icons → 1.20.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.
@@ -0,0 +1,42 @@
1
+ import { TIcon } from '../../pl-icon';
2
+
3
+ type TStatusIconStatuses = 'successful' | 'attention' | 'delete' | 'info' | 'neutral' | 'custom';
4
+ /**
5
+ * Базовые свойства для компонента StatusIcon.
6
+ *
7
+ * @property {('successful' | 'attention' | 'delete' | 'info' | 'neutral')} [status] - Вариант статуса эллипса. Определяет стиль в зависимости от состояния.
8
+ */
9
+ export interface TStatusIconBaseProps {
10
+ status: Exclude<TStatusIconStatuses, 'custom'>;
11
+ customColors?: never;
12
+ }
13
+ /**
14
+ * Объект с настройками иконки и цветовыми значениями для кастомного статуса.
15
+ *
16
+ * @property {TIcon} customColors.icon - Иконка для кастомного статуса.
17
+ * @property {string} customColors.colorIcon - Цвет иконки для кастомного статуса.
18
+ * @property {string} customColors.colorIconOverlay - Цвет наложения для иконки в кастомном статусе.
19
+ */
20
+ export interface TStatusIconCustomColors {
21
+ icon: TIcon;
22
+ colorIcon: string;
23
+ colorIconOverlay: string;
24
+ }
25
+ /**
26
+ * Свойства для кастомного статуса.
27
+ *
28
+ * @property {'custom'} status - Кастомный статус.
29
+ * @property {{ icon: TIcon, colorIcon: string, colorIconOverlay: string }} customColors - Объект с настройками иконки и цветовыми значениями для кастомного статуса.
30
+ * @property {TIcon} customColors.icon - Иконка для кастомного статуса.
31
+ * @property {string} customColors.colorIcon - Цвет иконки для кастомного статуса.
32
+ * @property {string} customColors.colorIconOverlay - Цвет наложения для иконки в кастомном статусе.
33
+ */
34
+ export interface TStatusIconCustomProps {
35
+ status: 'custom';
36
+ customColors: TStatusIconCustomColors;
37
+ }
38
+ /**
39
+ * Итоговый тип: либо базовый статус (с необязательными полями), либо кастомный (с обязательными).
40
+ */
41
+ export type TStatusIconProps = TStatusIconBaseProps | TStatusIconCustomProps;
42
+ export {};