@paolojulian.dev/design-system 4.4.0 → 4.6.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/chevron-right-icon-CDCRryr1.js +60 -0
- package/dist/chevron-right-icon-CDCRryr1.js.map +1 -0
- package/dist/chevron-right-icon-CctWeN0d.cjs +2 -0
- package/dist/chevron-right-icon-CctWeN0d.cjs.map +1 -0
- package/dist/constants.cjs.js.map +1 -1
- package/dist/constants.d.ts +3 -3
- package/dist/constants.es.js.map +1 -1
- package/dist/icons.cjs.js +1 -1
- package/dist/icons.cjs.js.map +1 -1
- package/dist/icons.d.ts +17 -5
- package/dist/icons.es.js +15 -11
- package/dist/icons.es.js.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +305 -2
- package/dist/index.es.js +1850 -704
- package/dist/index.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/theme.css +4 -4
- package/dist/vite-config/vite.config.ts +41 -39
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import { AnchorHTMLAttributes } from 'react';
|
|
2
2
|
import { ButtonHTMLAttributes } from 'react';
|
|
3
|
+
import { ChangeEvent } from 'react';
|
|
3
4
|
import { ClassProp } from 'class-variance-authority/types';
|
|
4
5
|
import { CSSProperties } from 'react';
|
|
5
6
|
import { ElementType } from 'react';
|
|
6
7
|
import { FC } from 'react';
|
|
8
|
+
import { ForwardedRef } from 'react';
|
|
7
9
|
import { ForwardRefExoticComponent } from 'react';
|
|
8
10
|
import { HTMLAttributes } from 'react';
|
|
9
11
|
import { InputHTMLAttributes } from 'react';
|
|
10
12
|
import { JSX } from 'react/jsx-runtime';
|
|
13
|
+
import { KeyboardEvent as KeyboardEvent_2 } from 'react';
|
|
14
|
+
import { MouseEvent as MouseEvent_2 } from 'react';
|
|
11
15
|
import { ReactNode } from 'react';
|
|
12
16
|
import { RefAttributes } from 'react';
|
|
17
|
+
import { SelectHTMLAttributes } from 'react';
|
|
13
18
|
import { TextareaHTMLAttributes } from 'react';
|
|
14
19
|
import { VariantProps } from 'class-variance-authority';
|
|
15
20
|
|
|
@@ -18,6 +23,7 @@ as?: ElementType;
|
|
|
18
23
|
variant?: PBadgeVariant;
|
|
19
24
|
size?: PBadgeSize;
|
|
20
25
|
appearance?: PBadgeAppearance;
|
|
26
|
+
isPinging?: boolean;
|
|
21
27
|
leftIcon?: ReactNode;
|
|
22
28
|
rightIcon?: ReactNode;
|
|
23
29
|
children: ReactNode;
|
|
@@ -31,6 +37,7 @@ export declare type PBadgeProps = {
|
|
|
31
37
|
variant?: PBadgeVariant;
|
|
32
38
|
size?: PBadgeSize;
|
|
33
39
|
appearance?: PBadgeAppearance;
|
|
40
|
+
isPinging?: boolean;
|
|
34
41
|
leftIcon?: ReactNode;
|
|
35
42
|
rightIcon?: ReactNode;
|
|
36
43
|
children: ReactNode;
|
|
@@ -61,6 +68,7 @@ declare type PButtonBaseProps = {
|
|
|
61
68
|
fullWidth?: boolean;
|
|
62
69
|
isActive?: boolean;
|
|
63
70
|
isLoading?: boolean;
|
|
71
|
+
isPinging?: boolean;
|
|
64
72
|
leftIcon?: ReactNode;
|
|
65
73
|
rightIcon?: ReactNode;
|
|
66
74
|
children: ReactNode;
|
|
@@ -105,10 +113,134 @@ declare type PCardBaseProps = {
|
|
|
105
113
|
|
|
106
114
|
declare type PCardDensity = 'compact' | 'default' | 'spacious';
|
|
107
115
|
|
|
116
|
+
export declare const PCardGrid: ForwardRefExoticComponent< {
|
|
117
|
+
as?: ElementType;
|
|
118
|
+
columns?: PCardGridColumns | PCardGridResponsiveColumns;
|
|
119
|
+
minCardWidth?: CSSProperties["width"];
|
|
120
|
+
gap?: PCardGridGap;
|
|
121
|
+
align?: "stretch" | "start";
|
|
122
|
+
className?: string;
|
|
123
|
+
children: ReactNode;
|
|
124
|
+
} & Omit<HTMLAttributes<HTMLElement>, "children" | "className"> & RefAttributes<HTMLElement>>;
|
|
125
|
+
|
|
126
|
+
export declare type PCardGridColumns = 1 | 2 | 3 | 4;
|
|
127
|
+
|
|
128
|
+
export declare type PCardGridGap = 'none' | 'sm' | 'md' | 'lg';
|
|
129
|
+
|
|
130
|
+
export declare type PCardGridProps = {
|
|
131
|
+
as?: ElementType;
|
|
132
|
+
columns?: PCardGridColumns | PCardGridResponsiveColumns;
|
|
133
|
+
minCardWidth?: CSSProperties['width'];
|
|
134
|
+
gap?: PCardGridGap;
|
|
135
|
+
align?: 'stretch' | 'start';
|
|
136
|
+
className?: string;
|
|
137
|
+
children: ReactNode;
|
|
138
|
+
} & Omit<HTMLAttributes<HTMLElement>, 'className' | 'children'>;
|
|
139
|
+
|
|
140
|
+
export declare type PCardGridRef = HTMLElement;
|
|
141
|
+
|
|
142
|
+
export declare type PCardGridResponsiveColumns = {
|
|
143
|
+
mobile?: PCardGridColumns;
|
|
144
|
+
tablet?: PCardGridColumns;
|
|
145
|
+
desktop?: PCardGridColumns;
|
|
146
|
+
};
|
|
147
|
+
|
|
108
148
|
export declare type PCardProps = PCardArticleProps | PCardAnchorProps;
|
|
109
149
|
|
|
110
150
|
export declare type PCardRef = HTMLElement;
|
|
111
151
|
|
|
152
|
+
export declare const PCombobox: ForwardRefExoticComponent< {
|
|
153
|
+
label: string;
|
|
154
|
+
options: PComboboxOption[];
|
|
155
|
+
value?: string;
|
|
156
|
+
defaultValue?: string;
|
|
157
|
+
selectedOption?: PComboboxOption | null;
|
|
158
|
+
onValueChange?: (value: string, option: PComboboxOption | null) => void;
|
|
159
|
+
query?: string;
|
|
160
|
+
defaultQuery?: string;
|
|
161
|
+
onQueryChange?: (query: string, details: {
|
|
162
|
+
source: PComboboxQueryChangeSource;
|
|
163
|
+
}) => void;
|
|
164
|
+
filterMode?: PComboboxFilterMode;
|
|
165
|
+
isLoading?: boolean;
|
|
166
|
+
isLoadingMore?: boolean;
|
|
167
|
+
hasMore?: boolean;
|
|
168
|
+
onLoadMore?: (details: {
|
|
169
|
+
query: string;
|
|
170
|
+
optionCount: number;
|
|
171
|
+
}) => void;
|
|
172
|
+
placeholder?: string;
|
|
173
|
+
searchPlaceholder?: string;
|
|
174
|
+
emptyText?: string;
|
|
175
|
+
loadingText?: string;
|
|
176
|
+
loadingMoreText?: string;
|
|
177
|
+
loadMoreText?: string;
|
|
178
|
+
helperText?: string;
|
|
179
|
+
isError?: boolean;
|
|
180
|
+
errorMessage?: string;
|
|
181
|
+
name?: string;
|
|
182
|
+
disabled?: boolean;
|
|
183
|
+
readOnly?: boolean;
|
|
184
|
+
required?: boolean;
|
|
185
|
+
clearable?: boolean;
|
|
186
|
+
className?: string;
|
|
187
|
+
inputClassName?: string;
|
|
188
|
+
} & Omit<HTMLAttributes<HTMLDivElement>, "className" | "defaultValue" | "onChange"> & RefAttributes<HTMLDivElement>>;
|
|
189
|
+
|
|
190
|
+
export declare type PComboboxFilterMode = 'local' | 'none';
|
|
191
|
+
|
|
192
|
+
export declare type PComboboxOption = {
|
|
193
|
+
value: string;
|
|
194
|
+
label: string;
|
|
195
|
+
description?: string;
|
|
196
|
+
group?: string;
|
|
197
|
+
meta?: ReactNode;
|
|
198
|
+
keywords?: string[];
|
|
199
|
+
disabled?: boolean;
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
export declare type PComboboxProps = {
|
|
203
|
+
label: string;
|
|
204
|
+
options: PComboboxOption[];
|
|
205
|
+
value?: string;
|
|
206
|
+
defaultValue?: string;
|
|
207
|
+
selectedOption?: PComboboxOption | null;
|
|
208
|
+
onValueChange?: (value: string, option: PComboboxOption | null) => void;
|
|
209
|
+
query?: string;
|
|
210
|
+
defaultQuery?: string;
|
|
211
|
+
onQueryChange?: (query: string, details: {
|
|
212
|
+
source: PComboboxQueryChangeSource;
|
|
213
|
+
}) => void;
|
|
214
|
+
filterMode?: PComboboxFilterMode;
|
|
215
|
+
isLoading?: boolean;
|
|
216
|
+
isLoadingMore?: boolean;
|
|
217
|
+
hasMore?: boolean;
|
|
218
|
+
onLoadMore?: (details: {
|
|
219
|
+
query: string;
|
|
220
|
+
optionCount: number;
|
|
221
|
+
}) => void;
|
|
222
|
+
placeholder?: string;
|
|
223
|
+
searchPlaceholder?: string;
|
|
224
|
+
emptyText?: string;
|
|
225
|
+
loadingText?: string;
|
|
226
|
+
loadingMoreText?: string;
|
|
227
|
+
loadMoreText?: string;
|
|
228
|
+
helperText?: string;
|
|
229
|
+
isError?: boolean;
|
|
230
|
+
errorMessage?: string;
|
|
231
|
+
name?: string;
|
|
232
|
+
disabled?: boolean;
|
|
233
|
+
readOnly?: boolean;
|
|
234
|
+
required?: boolean;
|
|
235
|
+
clearable?: boolean;
|
|
236
|
+
className?: string;
|
|
237
|
+
inputClassName?: string;
|
|
238
|
+
} & Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'defaultValue' | 'onChange'>;
|
|
239
|
+
|
|
240
|
+
export declare type PComboboxQueryChangeSource = 'input' | 'open' | 'clear' | 'selection' | 'reset';
|
|
241
|
+
|
|
242
|
+
export declare type PComboboxRef = HTMLDivElement;
|
|
243
|
+
|
|
112
244
|
export declare const PDatePicker: ForwardRefExoticComponent< {
|
|
113
245
|
label: string;
|
|
114
246
|
value?: string;
|
|
@@ -396,11 +528,182 @@ export declare type PHorizontalSliderProps = {
|
|
|
396
528
|
|
|
397
529
|
export declare type PHorizontalSliderRef = HTMLDivElement;
|
|
398
530
|
|
|
399
|
-
declare
|
|
531
|
+
export declare const PPagination: ForwardRefExoticComponent< {
|
|
532
|
+
page: number;
|
|
533
|
+
pageCount?: number;
|
|
534
|
+
totalItems?: number;
|
|
535
|
+
pageSize?: number;
|
|
536
|
+
pageSizeOptions?: number[];
|
|
537
|
+
itemLabel?: string;
|
|
538
|
+
density?: PPaginationDensity;
|
|
539
|
+
siblingCount?: number;
|
|
540
|
+
boundaryCount?: number;
|
|
541
|
+
disabled?: boolean;
|
|
542
|
+
isLoading?: boolean;
|
|
543
|
+
hasPreviousPage?: boolean;
|
|
544
|
+
hasNextPage?: boolean;
|
|
545
|
+
showRowsPerPage?: boolean;
|
|
546
|
+
onPageChange?: (page: number) => void;
|
|
547
|
+
onPageSizeChange?: (pageSize: number) => void;
|
|
548
|
+
className?: string;
|
|
549
|
+
summary?: ReactNode;
|
|
550
|
+
} & Omit<HTMLAttributes<HTMLElement>, "children" | "className" | "onChange"> & RefAttributes<HTMLElement>>;
|
|
551
|
+
|
|
552
|
+
export declare type PPaginationDensity = 'standard' | 'compact';
|
|
553
|
+
|
|
554
|
+
export declare type PPaginationItem = number | 'ellipsis';
|
|
555
|
+
|
|
556
|
+
export declare type PPaginationProps = {
|
|
557
|
+
page: number;
|
|
558
|
+
pageCount?: number;
|
|
559
|
+
totalItems?: number;
|
|
560
|
+
pageSize?: number;
|
|
561
|
+
pageSizeOptions?: number[];
|
|
562
|
+
itemLabel?: string;
|
|
563
|
+
density?: PPaginationDensity;
|
|
564
|
+
siblingCount?: number;
|
|
565
|
+
boundaryCount?: number;
|
|
566
|
+
disabled?: boolean;
|
|
567
|
+
isLoading?: boolean;
|
|
568
|
+
hasPreviousPage?: boolean;
|
|
569
|
+
hasNextPage?: boolean;
|
|
570
|
+
showRowsPerPage?: boolean;
|
|
571
|
+
onPageChange?: (page: number) => void;
|
|
572
|
+
onPageSizeChange?: (pageSize: number) => void;
|
|
573
|
+
className?: string;
|
|
574
|
+
summary?: ReactNode;
|
|
575
|
+
} & Omit<HTMLAttributes<HTMLElement>, 'children' | 'className' | 'onChange'>;
|
|
576
|
+
|
|
577
|
+
export declare type PPaginationRef = HTMLElement;
|
|
578
|
+
|
|
579
|
+
export declare function PSectionHeader({ title, index, variant, className, }: PSectionHeaderProps): JSX.Element;
|
|
580
|
+
|
|
581
|
+
export declare interface PSectionHeaderProps {
|
|
400
582
|
title: string;
|
|
583
|
+
index?: string | number;
|
|
584
|
+
variant?: PSectionHeaderVariant;
|
|
585
|
+
className?: string;
|
|
401
586
|
}
|
|
402
587
|
|
|
403
|
-
export declare
|
|
588
|
+
export declare type PSectionHeaderVariant = "default" | "indexed";
|
|
589
|
+
|
|
590
|
+
export declare const PSelect: ForwardRefExoticComponent< {
|
|
591
|
+
className?: string;
|
|
592
|
+
selectClassName?: string;
|
|
593
|
+
label: string;
|
|
594
|
+
options: PSelectOption[];
|
|
595
|
+
placeholder?: string;
|
|
596
|
+
helperText?: string;
|
|
597
|
+
isError?: boolean;
|
|
598
|
+
errorMessage?: string;
|
|
599
|
+
density?: PSelectDensity;
|
|
600
|
+
variant?: PSelectVariant;
|
|
601
|
+
hideLabel?: boolean;
|
|
602
|
+
onValueChange?: (value: string, option: PSelectOption | null) => void;
|
|
603
|
+
} & Omit<SelectHTMLAttributes<HTMLSelectElement>, "children" | "className" | "aria-describedby" | "aria-label" | "onChange"> & {
|
|
604
|
+
onChange?: (event: ChangeEvent<HTMLSelectElement>) => void;
|
|
605
|
+
} & RefAttributes<HTMLSelectElement>>;
|
|
606
|
+
|
|
607
|
+
export declare type PSelectDensity = 'standard' | 'compact';
|
|
608
|
+
|
|
609
|
+
export declare type PSelectOption = {
|
|
610
|
+
value: string | number;
|
|
611
|
+
label: ReactNode;
|
|
612
|
+
disabled?: boolean;
|
|
613
|
+
group?: string;
|
|
614
|
+
};
|
|
615
|
+
|
|
616
|
+
export declare type PSelectProps = {
|
|
617
|
+
className?: string;
|
|
618
|
+
selectClassName?: string;
|
|
619
|
+
label: string;
|
|
620
|
+
options: PSelectOption[];
|
|
621
|
+
placeholder?: string;
|
|
622
|
+
helperText?: string;
|
|
623
|
+
isError?: boolean;
|
|
624
|
+
errorMessage?: string;
|
|
625
|
+
density?: PSelectDensity;
|
|
626
|
+
variant?: PSelectVariant;
|
|
627
|
+
hideLabel?: boolean;
|
|
628
|
+
onValueChange?: (value: string, option: PSelectOption | null) => void;
|
|
629
|
+
} & Omit<SelectHTMLAttributes<HTMLSelectElement>, 'aria-describedby' | 'aria-label' | 'children' | 'className' | 'onChange'> & {
|
|
630
|
+
onChange?: (event: ChangeEvent<HTMLSelectElement>) => void;
|
|
631
|
+
};
|
|
632
|
+
|
|
633
|
+
export declare type PSelectRef = HTMLSelectElement;
|
|
634
|
+
|
|
635
|
+
export declare type PSelectVariant = 'floating' | 'inline';
|
|
636
|
+
|
|
637
|
+
export declare const PTable: PTableComponentType;
|
|
638
|
+
|
|
639
|
+
export declare type PTableAlign = 'start' | 'center' | 'end';
|
|
640
|
+
|
|
641
|
+
export declare type PTableColumn<RowData extends PTableRecord = PTableRecord> = {
|
|
642
|
+
id: string;
|
|
643
|
+
header: ReactNode;
|
|
644
|
+
label?: string;
|
|
645
|
+
accessor?: keyof RowData | ((row: RowData) => ReactNode);
|
|
646
|
+
cell?: (row: RowData, rowIndex: number) => ReactNode;
|
|
647
|
+
mobileLabel?: string;
|
|
648
|
+
width?: string;
|
|
649
|
+
align?: PTableAlign;
|
|
650
|
+
priority?: PTableColumnPriority;
|
|
651
|
+
hideOnTablet?: boolean;
|
|
652
|
+
hideOnMobile?: boolean;
|
|
653
|
+
sortable?: boolean;
|
|
654
|
+
sortDirection?: PTableSortDirection | null;
|
|
655
|
+
};
|
|
656
|
+
|
|
657
|
+
export declare type PTableColumnPriority = 'primary' | 'secondary' | 'tertiary';
|
|
658
|
+
|
|
659
|
+
declare function PTableComponent<RowData extends PTableRecord>({ columns, rows, caption, captionHidden, summary, density, stickyHeader, stickyFirstColumn, isLoading, loadingLabel, emptyState, errorState, getRowId, getRowTone, onRowClick, renderRowActions, onSortChange, className, tableClassName, ...props }: PTableProps<RowData>, ref: ForwardedRef<PTableRef>): JSX.Element;
|
|
660
|
+
|
|
661
|
+
declare type PTableComponentType = (<RowData extends PTableRecord = PTableRecord>(props: PTableProps<RowData> & {
|
|
662
|
+
ref?: ForwardedRef<PTableRef>;
|
|
663
|
+
}) => ReturnType<typeof PTableComponent>) & {
|
|
664
|
+
displayName?: string;
|
|
665
|
+
};
|
|
666
|
+
|
|
667
|
+
export declare type PTableDensity = 'compact' | 'standard' | 'spacious';
|
|
668
|
+
|
|
669
|
+
export declare type PTableProps<RowData extends PTableRecord = PTableRecord> = {
|
|
670
|
+
columns: PTableColumn<RowData>[];
|
|
671
|
+
rows: RowData[];
|
|
672
|
+
caption: string;
|
|
673
|
+
captionHidden?: boolean;
|
|
674
|
+
summary?: ReactNode;
|
|
675
|
+
density?: PTableDensity;
|
|
676
|
+
stickyHeader?: boolean;
|
|
677
|
+
stickyFirstColumn?: boolean;
|
|
678
|
+
isLoading?: boolean;
|
|
679
|
+
loadingLabel?: ReactNode;
|
|
680
|
+
emptyState?: PTableState;
|
|
681
|
+
errorState?: PTableState;
|
|
682
|
+
getRowId?: (row: RowData, rowIndex: number) => string;
|
|
683
|
+
getRowTone?: (row: RowData, rowIndex: number) => PTableRowTone | undefined;
|
|
684
|
+
onRowClick?: (row: RowData, rowIndex: number, event: MouseEvent_2<HTMLTableRowElement | HTMLLIElement> | KeyboardEvent_2<HTMLTableRowElement | HTMLLIElement>) => void;
|
|
685
|
+
renderRowActions?: (row: RowData, rowIndex: number) => ReactNode;
|
|
686
|
+
onSortChange?: (columnId: string, direction: PTableSortDirection) => void;
|
|
687
|
+
className?: string;
|
|
688
|
+
tableClassName?: string;
|
|
689
|
+
} & Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'className'>;
|
|
690
|
+
|
|
691
|
+
export declare type PTableRecord = Record<string, unknown>;
|
|
692
|
+
|
|
693
|
+
export declare type PTableRef = HTMLDivElement;
|
|
694
|
+
|
|
695
|
+
export declare type PTableRowTone = 'neutral' | 'success' | 'warning' | 'danger' | 'info';
|
|
696
|
+
|
|
697
|
+
export declare type PTableSortDirection = 'ascending' | 'descending';
|
|
698
|
+
|
|
699
|
+
export declare type PTableState = {
|
|
700
|
+
title: ReactNode;
|
|
701
|
+
description?: ReactNode;
|
|
702
|
+
action?: ReactNode;
|
|
703
|
+
tone?: PTableStateTone;
|
|
704
|
+
};
|
|
705
|
+
|
|
706
|
+
export declare type PTableStateTone = 'neutral' | 'danger';
|
|
404
707
|
|
|
405
708
|
export declare const PTextArea: ForwardRefExoticComponent< {
|
|
406
709
|
/**
|