@qodo/design-system 0.15.2 → 0.16.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/design-system.css +1 -1
- package/dist/index.cjs.js +87 -77
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +71 -5
- package/dist/index.esm.js +5859 -5375
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ import { ReactNode } from 'react';
|
|
|
28
28
|
import { RefAttributes } from 'react';
|
|
29
29
|
import { RowData } from '@tanstack/react-table';
|
|
30
30
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
31
|
-
import { SelectProps } from './types';
|
|
31
|
+
import { SelectProps as SelectProps_2 } from './types';
|
|
32
32
|
import { SetStateAction } from 'react';
|
|
33
33
|
import { Steps as Steps_2 } from '@ark-ui/react/steps';
|
|
34
34
|
import { SubmitHandler } from 'react-hook-form';
|
|
@@ -85,17 +85,19 @@ export declare type ActionsCellProps = OmittedDropdownProps & {
|
|
|
85
85
|
triggerProps?: TriggerProps;
|
|
86
86
|
};
|
|
87
87
|
|
|
88
|
-
export declare function Badge({ className, variant, size, ...props }: BadgeProps): JSX_2.Element;
|
|
88
|
+
export declare function Badge({ className, variant, size, disabled, active, ...props }: BadgeProps): JSX_2.Element;
|
|
89
89
|
|
|
90
90
|
export declare const BadgeCell: (props: BadgeCellProps) => JSX_2.Element;
|
|
91
91
|
|
|
92
92
|
export declare type BadgeCellProps = BaseCellProps & BadgeProps;
|
|
93
93
|
|
|
94
94
|
declare interface BadgeProps extends React_2.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
95
|
+
disabled?: boolean;
|
|
96
|
+
active?: boolean;
|
|
95
97
|
}
|
|
96
98
|
|
|
97
99
|
declare const badgeVariants: (props?: ({
|
|
98
|
-
variant?: "default" | "secondary" | "outline" | "text" | "success" | "
|
|
100
|
+
variant?: "default" | "secondary" | "outline" | "text" | "success" | "warning" | "destructive" | "error" | "primary" | "pending" | null | undefined;
|
|
99
101
|
size?: "sm" | "lg" | "xs" | "md" | null | undefined;
|
|
100
102
|
} & ClassProp) | undefined) => string;
|
|
101
103
|
|
|
@@ -111,6 +113,22 @@ declare type BaseMenuItemType = {
|
|
|
111
113
|
disabled?: boolean;
|
|
112
114
|
};
|
|
113
115
|
|
|
116
|
+
declare type BaseSelectProps = {
|
|
117
|
+
disabled?: boolean;
|
|
118
|
+
options: Option_2[];
|
|
119
|
+
placeholder?: string;
|
|
120
|
+
triggerClassName?: string;
|
|
121
|
+
triggerWrapperClassName?: string;
|
|
122
|
+
badgeClassName?: string;
|
|
123
|
+
inputPlaceholder?: string;
|
|
124
|
+
badgeVariant?: BadgeProps["variant"];
|
|
125
|
+
searchable?: boolean;
|
|
126
|
+
toggleIcon?: ReactNode;
|
|
127
|
+
emptyState?: ReactNode;
|
|
128
|
+
dir?: string;
|
|
129
|
+
mode?: (typeof SELECT_MODE)[keyof typeof SELECT_MODE];
|
|
130
|
+
} & Omit<default_2.HTMLAttributes<HTMLDivElement>, "onSelect">;
|
|
131
|
+
|
|
114
132
|
export declare const borderRadius: {
|
|
115
133
|
readonly sm: "0.25rem";
|
|
116
134
|
readonly md: "0.375rem";
|
|
@@ -121,6 +139,7 @@ export declare const borderRadius: {
|
|
|
121
139
|
export declare const Button: React_2.ForwardRefExoticComponent<ButtonProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
122
140
|
|
|
123
141
|
export declare interface ButtonProps extends React_2.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
142
|
+
loading?: boolean;
|
|
124
143
|
}
|
|
125
144
|
|
|
126
145
|
declare const buttonVariants: (props?: ({
|
|
@@ -128,7 +147,9 @@ declare const buttonVariants: (props?: ({
|
|
|
128
147
|
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
129
148
|
} & ClassProp) | undefined) => string;
|
|
130
149
|
|
|
131
|
-
export declare function Card({ className, ...props }: React_2.ComponentProps<"div">
|
|
150
|
+
export declare function Card({ className, ...props }: React_2.ComponentProps<"div"> & {
|
|
151
|
+
variant?: string;
|
|
152
|
+
}): JSX_2.Element;
|
|
132
153
|
|
|
133
154
|
export declare function CardAction({ className, ...props }: React_2.ComponentProps<"div">): JSX_2.Element;
|
|
134
155
|
|
|
@@ -312,7 +333,7 @@ export declare const Form: {
|
|
|
312
333
|
<T extends FieldValues>(props: FormProps<T>): JSX_2.Element;
|
|
313
334
|
Button: ({ type, ...rest }: ButtonProps_2) => JSX_2.Element;
|
|
314
335
|
Input: ForwardRefExoticComponent<Omit<InputProps_2, "ref"> & RefAttributes<HTMLInputElement>>;
|
|
315
|
-
Select: (props: PropsWithChildren<
|
|
336
|
+
Select: (props: PropsWithChildren<SelectProps_2>) => JSX_2.Element;
|
|
316
337
|
Combobox: (props: PropsWithChildren<ComboboxProps_2>) => JSX_2.Element;
|
|
317
338
|
RadioGroup: (props: PropsWithChildren<RadioGroupProps_2>) => JSX_2.Element;
|
|
318
339
|
RadioGroupItem: {
|
|
@@ -364,6 +385,25 @@ declare const inputVariants: (props?: ({
|
|
|
364
385
|
variant?: "default" | "secondary" | "accent" | "success" | "warning" | "destructive" | null | undefined;
|
|
365
386
|
} & ClassProp) | undefined) => string;
|
|
366
387
|
|
|
388
|
+
declare const INSIGHT_VARIANTS: {
|
|
389
|
+
DEFAULT: string;
|
|
390
|
+
PRIMARY: string;
|
|
391
|
+
ACTIVE: string;
|
|
392
|
+
};
|
|
393
|
+
|
|
394
|
+
export declare function InsightCard({ title, description, caption, additionalContent, titleClassName: propTitleClassName, descriptionClassName: propDescriptionClassName, variant, className, }: InsightCardProps): JSX_2.Element;
|
|
395
|
+
|
|
396
|
+
export declare type InsightCardProps = {
|
|
397
|
+
title: ReactNode;
|
|
398
|
+
description?: ReactNode;
|
|
399
|
+
variant?: (typeof INSIGHT_VARIANTS)[keyof typeof INSIGHT_VARIANTS];
|
|
400
|
+
caption?: ReactNode;
|
|
401
|
+
descriptionClassName?: string;
|
|
402
|
+
titleClassName?: string;
|
|
403
|
+
additionalContent?: ReactNode;
|
|
404
|
+
className?: string;
|
|
405
|
+
};
|
|
406
|
+
|
|
367
407
|
export declare type LoadingSkeletonProps = {
|
|
368
408
|
columnsCount: number;
|
|
369
409
|
rowsCount?: number;
|
|
@@ -373,6 +413,11 @@ declare interface MenuLabelType extends TypeGuard<"MenuLabel"> {
|
|
|
373
413
|
label: ReactNode;
|
|
374
414
|
}
|
|
375
415
|
|
|
416
|
+
declare type MultipleSelectProps = BaseSelectProps & {
|
|
417
|
+
value?: string[];
|
|
418
|
+
onSelect?: (value: string[]) => void;
|
|
419
|
+
};
|
|
420
|
+
|
|
376
421
|
export declare type NoResultProps = {
|
|
377
422
|
title?: string;
|
|
378
423
|
};
|
|
@@ -381,6 +426,15 @@ export declare const NumberCell: (props: BaseCellProps) => JSX_2.Element;
|
|
|
381
426
|
|
|
382
427
|
declare type OmittedDropdownProps = Omit<DropdownProps, "triggerElement">;
|
|
383
428
|
|
|
429
|
+
declare type Option_2 = {
|
|
430
|
+
label: ReactNode;
|
|
431
|
+
value: string;
|
|
432
|
+
icon?: ReactNode;
|
|
433
|
+
children?: Option_2[];
|
|
434
|
+
disabled?: boolean;
|
|
435
|
+
};
|
|
436
|
+
export { Option_2 as Option }
|
|
437
|
+
|
|
384
438
|
export declare type PaginationProps<T extends RowData> = {
|
|
385
439
|
table: Table_2<T>;
|
|
386
440
|
};
|
|
@@ -460,6 +514,11 @@ declare const SearchSize: {
|
|
|
460
514
|
|
|
461
515
|
export declare const Select: React_2.FC<SelectPrimitive.SelectProps>;
|
|
462
516
|
|
|
517
|
+
declare const SELECT_MODE: {
|
|
518
|
+
SINGLE: string;
|
|
519
|
+
MULTIPLE: string;
|
|
520
|
+
};
|
|
521
|
+
|
|
463
522
|
export declare const SelectContent: React_2.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
464
523
|
container?: HTMLElement | null;
|
|
465
524
|
} & React_2.RefAttributes<HTMLDivElement>>;
|
|
@@ -470,6 +529,8 @@ export declare const SelectItem: React_2.ForwardRefExoticComponent<Omit<SelectPr
|
|
|
470
529
|
|
|
471
530
|
export declare const SelectLabel: React_2.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
472
531
|
|
|
532
|
+
export declare type SelectProps = SingleSelectProps | MultipleSelectProps;
|
|
533
|
+
|
|
473
534
|
export declare const SelectScrollDownButton: React_2.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
474
535
|
|
|
475
536
|
export declare const SelectScrollUpButton: React_2.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
@@ -489,6 +550,11 @@ declare type SeparatorProps = React.ComponentProps<typeof Steps_2.Separator> & {
|
|
|
489
550
|
declare interface SeparatorType extends TypeGuard<"Separator"> {
|
|
490
551
|
}
|
|
491
552
|
|
|
553
|
+
declare type SingleSelectProps = BaseSelectProps & {
|
|
554
|
+
value?: string;
|
|
555
|
+
onSelect?: (value: string) => void;
|
|
556
|
+
};
|
|
557
|
+
|
|
492
558
|
export declare function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): JSX_2.Element;
|
|
493
559
|
|
|
494
560
|
export declare const SortableHeaderCell: <T extends RowData>({ column, children, tooltipContent, }: SortableHeaderCellProps<T>) => JSX_2.Element;
|