@livechat/design-system-react-components 2.22.1 → 2.24.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/components/Accordion/index.d.ts +1 -0
- package/dist/components/Button/Button.d.ts +2 -0
- package/dist/components/SegmentedControl/SegmentedControl.d.ts +1 -1
- package/dist/components/Table/TableHeader.d.ts +4 -1
- package/dist/components/Table/types.d.ts +29 -13
- package/dist/components/Tooltip/types.d.ts +24 -9
- package/dist/foundations/design-token.d.ts +157 -0
- package/dist/foundations/radius-token.d.ts +1 -0
- package/dist/index.cjs +1 -136
- package/dist/index.js +3801 -3657
- package/dist/style.css +1 -1
- package/package.json +3 -5
- package/dist/components/Accordion/components/AccordionAnimatedLabel/styles.d.ts +0 -2
- package/dist/components/Accordion/components/AccordionMultilineElement/styles.d.ts +0 -2
- package/dist/components/Accordion/styles.d.ts +0 -8
|
@@ -3,6 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
export type ButtonProps = {
|
|
4
4
|
/**
|
|
5
5
|
* Specify the button kind
|
|
6
|
+
* @note The 'basic' kind is deprecated and will be removed in a future release. Please use 'secondary' instead.
|
|
6
7
|
*/
|
|
7
8
|
kind?: ButtonKind;
|
|
8
9
|
/**
|
|
@@ -37,6 +38,7 @@ export type ButtonProps = {
|
|
|
37
38
|
export declare const Button: React.ForwardRefExoticComponent<{
|
|
38
39
|
/**
|
|
39
40
|
* Specify the button kind
|
|
41
|
+
* @note The 'basic' kind is deprecated and will be removed in a future release. Please use 'secondary' instead.
|
|
40
42
|
*/
|
|
41
43
|
kind?: ButtonKind;
|
|
42
44
|
/**
|
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
export type ButtonSize = 'compact' | 'medium' | 'large';
|
|
4
4
|
type ButtonElement = {
|
|
5
5
|
id: string;
|
|
6
|
-
label
|
|
6
|
+
label?: string;
|
|
7
7
|
} & Pick<ButtonProps, 'disabled' | 'loading' | 'icon'>;
|
|
8
8
|
export interface SegmentedControlProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
9
9
|
/**
|
|
@@ -13,6 +13,9 @@ interface TableHeaderProps<T> {
|
|
|
13
13
|
selectable?: boolean;
|
|
14
14
|
hoveredColumnIndex: number | null;
|
|
15
15
|
setHoveredColumnIndex: (index: number | null) => void;
|
|
16
|
+
selectedCount?: number;
|
|
17
|
+
dataLength?: number;
|
|
18
|
+
toggleSelectAll?: () => void;
|
|
16
19
|
}
|
|
17
|
-
export declare const TableHeader: <T>({ columns, sortConfig, handleSort, resizable, handleMouseDown, columnRefs, selectable, hoveredColumnIndex, setHoveredColumnIndex, }: TableHeaderProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare const TableHeader: <T>({ columns, sortConfig, handleSort, resizable, handleMouseDown, columnRefs, selectable, hoveredColumnIndex, setHoveredColumnIndex, selectedCount, dataLength, toggleSelectAll, }: TableHeaderProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
18
21
|
export {};
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export type
|
|
2
|
+
export type BaseColumn<T> = {
|
|
3
3
|
key: keyof T;
|
|
4
4
|
header: string;
|
|
5
5
|
sortable?: boolean;
|
|
6
|
-
sortValue?: (item: T) => string | number;
|
|
7
6
|
};
|
|
7
|
+
export type Column<T> = BaseColumn<T> & ({
|
|
8
|
+
sortable?: false;
|
|
9
|
+
} | {
|
|
10
|
+
sortable: true;
|
|
11
|
+
sortValue: (row: T) => string | number;
|
|
12
|
+
});
|
|
8
13
|
export type TableSize = 'small' | 'medium' | 'large';
|
|
9
14
|
export type PinOptions = 'header' | 'leftColumn';
|
|
10
15
|
export type StrippedOptions = 'rows' | 'columns';
|
|
@@ -13,7 +18,7 @@ export declare enum SortOrder {
|
|
|
13
18
|
Descending = "desc",
|
|
14
19
|
None = "none"
|
|
15
20
|
}
|
|
16
|
-
|
|
21
|
+
type BaseTableProps<T> = {
|
|
17
22
|
/**
|
|
18
23
|
* The data to be displayed in the table. Each item represents a row.
|
|
19
24
|
*/
|
|
@@ -21,7 +26,7 @@ export interface ITableProps<T> {
|
|
|
21
26
|
/**
|
|
22
27
|
* The configuration for table columns, including keys, headers, and optional sorting logic.
|
|
23
28
|
*/
|
|
24
|
-
columns: Column<T
|
|
29
|
+
columns: Array<Column<T>>;
|
|
25
30
|
/**
|
|
26
31
|
* The parameter allows you to customize alternating background colors for rows
|
|
27
32
|
* or columns in the table, enhancing readability and visual separation. Allowed values
|
|
@@ -48,35 +53,45 @@ export interface ITableProps<T> {
|
|
|
48
53
|
* Enables or disables the ability to resize columns by dragging the edges of headers.
|
|
49
54
|
*/
|
|
50
55
|
resizable?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Sets the `data-testid` attribute, allowing the table to be easily selected in automated tests.
|
|
58
|
+
*/
|
|
59
|
+
testId?: string;
|
|
60
|
+
};
|
|
61
|
+
type NonSelectableTableProps<T> = BaseTableProps<T> & {
|
|
62
|
+
selectable?: false;
|
|
63
|
+
selectedRows?: never;
|
|
64
|
+
onSelectionChange?: never;
|
|
65
|
+
rowSelectionMessage?: never;
|
|
66
|
+
rowActions?: never;
|
|
67
|
+
};
|
|
68
|
+
type SelectableTableProps<T> = BaseTableProps<T> & {
|
|
51
69
|
/**
|
|
52
70
|
* Enables row selection mode, adding checkboxes to each row and the header for selection.
|
|
53
71
|
*/
|
|
54
|
-
selectable
|
|
72
|
+
selectable: true;
|
|
55
73
|
/**
|
|
56
74
|
* A set of currently selected row IDs. Useful for controlling the selection state externally.
|
|
57
75
|
*/
|
|
58
|
-
selectedRows
|
|
76
|
+
selectedRows: Set<string | number>;
|
|
59
77
|
/**
|
|
60
78
|
* A callback function triggered when the selected rows change.
|
|
61
79
|
* @param selectedIds - A set of selected row IDs.
|
|
62
80
|
*/
|
|
63
|
-
onSelectionChange
|
|
81
|
+
onSelectionChange: (selectedIds: Set<string | number>) => void;
|
|
64
82
|
/**
|
|
65
83
|
* Defines a customizable message to display the count of selected rows in the table. By default,
|
|
66
84
|
* the message appears as "{count} selected items".
|
|
67
85
|
*/
|
|
68
|
-
rowSelectionMessage?:
|
|
86
|
+
rowSelectionMessage?: React.ReactNode;
|
|
69
87
|
/**
|
|
70
88
|
* Allows you to define a custom action bar that appears when rows are selected. The action bar
|
|
71
89
|
* can contain buttons or other UI elements for performing bulk operations on the selected rows,
|
|
72
90
|
* such as "Delete All" or "Export."
|
|
73
91
|
*/
|
|
74
92
|
rowActions?: React.ReactNode;
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
*/
|
|
78
|
-
testId?: string;
|
|
79
|
-
}
|
|
93
|
+
};
|
|
94
|
+
export type ITableProps<T> = NonSelectableTableProps<T> | SelectableTableProps<T>;
|
|
80
95
|
export interface SortConfig<T> {
|
|
81
96
|
key: keyof T | null;
|
|
82
97
|
direction: SortOrder;
|
|
@@ -100,3 +115,4 @@ export interface DataForPinningExample {
|
|
|
100
115
|
income: string;
|
|
101
116
|
controls: React.ReactNode;
|
|
102
117
|
}
|
|
118
|
+
export {};
|
|
@@ -174,7 +174,28 @@ export interface ITooltipInfoProps {
|
|
|
174
174
|
*/
|
|
175
175
|
handleCloseAction?: (ev: React.MouseEvent) => void;
|
|
176
176
|
}
|
|
177
|
-
|
|
177
|
+
type TooltipMediaImage = {
|
|
178
|
+
/**
|
|
179
|
+
* The Interactive tooltip image
|
|
180
|
+
*/
|
|
181
|
+
image: {
|
|
182
|
+
src: string;
|
|
183
|
+
alt: string;
|
|
184
|
+
};
|
|
185
|
+
video?: never;
|
|
186
|
+
};
|
|
187
|
+
type TooltipMediaVideo = {
|
|
188
|
+
/**
|
|
189
|
+
* The Interactive tooltip video. Renders with autoplay, loop, and muted by default
|
|
190
|
+
*/
|
|
191
|
+
video: string;
|
|
192
|
+
image?: never;
|
|
193
|
+
};
|
|
194
|
+
type TooltipMedia = TooltipMediaImage | TooltipMediaVideo | {
|
|
195
|
+
image?: never;
|
|
196
|
+
video?: never;
|
|
197
|
+
};
|
|
198
|
+
export type ITooltipInteractiveProps = {
|
|
178
199
|
/**
|
|
179
200
|
* The Interactive tooltip header
|
|
180
201
|
*/
|
|
@@ -183,13 +204,6 @@ export interface ITooltipInteractiveProps {
|
|
|
183
204
|
* The Interactive tooltip text
|
|
184
205
|
*/
|
|
185
206
|
text: string;
|
|
186
|
-
/**
|
|
187
|
-
* The Interactive tooltip image
|
|
188
|
-
*/
|
|
189
|
-
image?: {
|
|
190
|
-
src: string;
|
|
191
|
-
alt: string;
|
|
192
|
-
};
|
|
193
207
|
/**
|
|
194
208
|
* Set to show close button
|
|
195
209
|
* @deprecated Use `handleCloseAction` instead
|
|
@@ -211,4 +225,5 @@ export interface ITooltipInteractiveProps {
|
|
|
211
225
|
* The Interactive tooltip secondary button props
|
|
212
226
|
*/
|
|
213
227
|
secondaryButton?: TooltipButton | React.ReactNode;
|
|
214
|
-
}
|
|
228
|
+
} & TooltipMedia;
|
|
229
|
+
export {};
|
|
@@ -388,5 +388,162 @@ export declare const DesignToken: {
|
|
|
388
388
|
ContentAiCopilotBasic: string;
|
|
389
389
|
ContentAiCopilotInvert: string;
|
|
390
390
|
ContentAiOther1Default: string;
|
|
391
|
+
CategoricalMain1: string;
|
|
392
|
+
CategoricalMain2: string;
|
|
393
|
+
CategoricalMain3: string;
|
|
394
|
+
CategoricalMain4: string;
|
|
395
|
+
CategoricalMain5: string;
|
|
396
|
+
CategoricalMain6: string;
|
|
397
|
+
CategoricalMain7: string;
|
|
398
|
+
CategoricalMain8: string;
|
|
399
|
+
CategoricalMain9: string;
|
|
400
|
+
CategoricalMain10: string;
|
|
401
|
+
CategoricalMain11: string;
|
|
402
|
+
CategoricalMain12: string;
|
|
403
|
+
CategoricalMain13: string;
|
|
404
|
+
CategoricalMain14: string;
|
|
405
|
+
SequentialBlue25: string;
|
|
406
|
+
SequentialBlue50: string;
|
|
407
|
+
SequentialBlue100: string;
|
|
408
|
+
SequentialBlue200: string;
|
|
409
|
+
SequentialBlue300: string;
|
|
410
|
+
SequentialBlue400: string;
|
|
411
|
+
SequentialBlue500: string;
|
|
412
|
+
SequentialBlue600: string;
|
|
413
|
+
SequentialBlue700: string;
|
|
414
|
+
SequentialBlue800: string;
|
|
415
|
+
SequentialBlue900: string;
|
|
416
|
+
SequentialBlue950: string;
|
|
417
|
+
SequentialYellow25: string;
|
|
418
|
+
SequentialYellow50: string;
|
|
419
|
+
SequentialYellow100: string;
|
|
420
|
+
SequentialYellow200: string;
|
|
421
|
+
SequentialYellow300: string;
|
|
422
|
+
SequentialYellow400: string;
|
|
423
|
+
SequentialYellow500: string;
|
|
424
|
+
SequentialYellow600: string;
|
|
425
|
+
SequentialYellow700: string;
|
|
426
|
+
SequentialYellow800: string;
|
|
427
|
+
SequentialYellow900: string;
|
|
428
|
+
SequentialYellow950: string;
|
|
429
|
+
SequentialGreen25: string;
|
|
430
|
+
SequentialGreen50: string;
|
|
431
|
+
SequentialGreen100: string;
|
|
432
|
+
SequentialGreen200: string;
|
|
433
|
+
SequentialGreen300: string;
|
|
434
|
+
SequentialGreen400: string;
|
|
435
|
+
SequentialGreen500: string;
|
|
436
|
+
SequentialGreen600: string;
|
|
437
|
+
SequentialGreen700: string;
|
|
438
|
+
SequentialGreen800: string;
|
|
439
|
+
SequentialGreen900: string;
|
|
440
|
+
SequentialGreen950: string;
|
|
441
|
+
SequentialMagenta25: string;
|
|
442
|
+
SequentialMagenta50: string;
|
|
443
|
+
SequentialMagenta100: string;
|
|
444
|
+
SequentialMagenta200: string;
|
|
445
|
+
SequentialMagenta300: string;
|
|
446
|
+
SequentialMagenta400: string;
|
|
447
|
+
SequentialMagenta500: string;
|
|
448
|
+
SequentialMagenta600: string;
|
|
449
|
+
SequentialMagenta700: string;
|
|
450
|
+
SequentialMagenta800: string;
|
|
451
|
+
SequentialMagenta900: string;
|
|
452
|
+
SequentialMagenta950: string;
|
|
453
|
+
SequentialOrange25: string;
|
|
454
|
+
SequentialOrange50: string;
|
|
455
|
+
SequentialOrange100: string;
|
|
456
|
+
SequentialOrange200: string;
|
|
457
|
+
SequentialOrange300: string;
|
|
458
|
+
SequentialOrange400: string;
|
|
459
|
+
SequentialOrange500: string;
|
|
460
|
+
SequentialOrange600: string;
|
|
461
|
+
SequentialOrange700: string;
|
|
462
|
+
SequentialOrange800: string;
|
|
463
|
+
SequentialOrange900: string;
|
|
464
|
+
SequentialOrange950: string;
|
|
465
|
+
SequentialPurple25: string;
|
|
466
|
+
SequentialPurple50: string;
|
|
467
|
+
SequentialPurple100: string;
|
|
468
|
+
SequentialPurple200: string;
|
|
469
|
+
SequentialPurple300: string;
|
|
470
|
+
SequentialPurple400: string;
|
|
471
|
+
SequentialPurple500: string;
|
|
472
|
+
SequentialPurple600: string;
|
|
473
|
+
SequentialPurple700: string;
|
|
474
|
+
SequentialPurple800: string;
|
|
475
|
+
SequentialPurple900: string;
|
|
476
|
+
SequentialPurple950: string;
|
|
477
|
+
SequentialRed25: string;
|
|
478
|
+
SequentialRed50: string;
|
|
479
|
+
SequentialRed100: string;
|
|
480
|
+
SequentialRed200: string;
|
|
481
|
+
SequentialRed300: string;
|
|
482
|
+
SequentialRed400: string;
|
|
483
|
+
SequentialRed500: string;
|
|
484
|
+
SequentialRed600: string;
|
|
485
|
+
SequentialRed700: string;
|
|
486
|
+
SequentialRed800: string;
|
|
487
|
+
SequentialRed900: string;
|
|
488
|
+
SequentialRed950: string;
|
|
489
|
+
Categorical1colorColor1: string;
|
|
490
|
+
Categorical1colorColor2: string;
|
|
491
|
+
Categorical1colorColor3: string;
|
|
492
|
+
Categorical1colorColor4: string;
|
|
493
|
+
Categorical2colorsOption1Color1: string;
|
|
494
|
+
Categorical2colorsOption1Color2: string;
|
|
495
|
+
Categorical2colorsOption2Color1: string;
|
|
496
|
+
Categorical2colorsOption2Color2: string;
|
|
497
|
+
Categorical2colorsOption3Color1: string;
|
|
498
|
+
Categorical2colorsOption3Color2: string;
|
|
499
|
+
Categorical2colorsOption4Color1: string;
|
|
500
|
+
Categorical2colorsOption4Color2: string;
|
|
501
|
+
Categorical2colorsOption5Color1: string;
|
|
502
|
+
Categorical2colorsOption5Color2: string;
|
|
503
|
+
Categorical2colorsOption6Color1: string;
|
|
504
|
+
Categorical2colorsOption6Color2: string;
|
|
505
|
+
Categorical3colorsOption1Color1: string;
|
|
506
|
+
Categorical3colorsOption1Color2: string;
|
|
507
|
+
Categorical3colorsOption1Color3: string;
|
|
508
|
+
Categorical3colorsOption2Color1: string;
|
|
509
|
+
Categorical3colorsOption2Color2: string;
|
|
510
|
+
Categorical3colorsOption2Color3: string;
|
|
511
|
+
Categorical3colorsOption3Color1: string;
|
|
512
|
+
Categorical3colorsOption3Color2: string;
|
|
513
|
+
Categorical3colorsOption3Color3: string;
|
|
514
|
+
Categorical3colorsOption4Color1: string;
|
|
515
|
+
Categorical3colorsOption4Color2: string;
|
|
516
|
+
Categorical3colorsOption4Color3: string;
|
|
517
|
+
Categorical3colorsOption5Color1: string;
|
|
518
|
+
Categorical3colorsOption5Color2: string;
|
|
519
|
+
Categorical3colorsOption5Color3: string;
|
|
520
|
+
Categorical3colorsOption6Color1: string;
|
|
521
|
+
Categorical3colorsOption6Color2: string;
|
|
522
|
+
Categorical3colorsOption6Color3: string;
|
|
523
|
+
Categorical4colorsOption1Color1: string;
|
|
524
|
+
Categorical4colorsOption1Color2: string;
|
|
525
|
+
Categorical4colorsOption1Color3: string;
|
|
526
|
+
Categorical4colorsOption1Color4: string;
|
|
527
|
+
Categorical4colorsOption2Color1: string;
|
|
528
|
+
Categorical4colorsOption2Color2: string;
|
|
529
|
+
Categorical4colorsOption2Color3: string;
|
|
530
|
+
Categorical4colorsOption2Color4: string;
|
|
531
|
+
Categorical4colorsOption3Color1: string;
|
|
532
|
+
Categorical4colorsOption3Color2: string;
|
|
533
|
+
Categorical4colorsOption3Color3: string;
|
|
534
|
+
Categorical4colorsOption3Color4: string;
|
|
535
|
+
Categorical5colorsOption1Color1: string;
|
|
536
|
+
Categorical5colorsOption1Color2: string;
|
|
537
|
+
Categorical5colorsOption1Color3: string;
|
|
538
|
+
Categorical5colorsOption1Color4: string;
|
|
539
|
+
Categorical5colorsOption1Color5: string;
|
|
540
|
+
Categorical5colorsOption2Color1: string;
|
|
541
|
+
Categorical5colorsOption2Color2: string;
|
|
542
|
+
Categorical5colorsOption2Color3: string;
|
|
543
|
+
Categorical5colorsOption2Color4: string;
|
|
544
|
+
Categorical5colorsOption2Color5: string;
|
|
545
|
+
UifoundationSurfaceDefault: string;
|
|
546
|
+
UifoundationBorderGrid: string;
|
|
547
|
+
UifoundationBorderAxis: string;
|
|
391
548
|
};
|
|
392
549
|
export type DesignTokenKey = keyof typeof DesignToken;
|