@tanishraj/ui-kit 1.1.1 → 2.0.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.
- package/dist/index.cjs.js +2 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +145 -1
- package/dist/index.es.js +32 -13
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
- package/readme.md +86 -23
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { AnchorHTMLAttributes } from 'react';
|
|
1
2
|
import { ClassProp } from 'class-variance-authority/types';
|
|
2
3
|
import { ClassValue } from 'clsx';
|
|
3
4
|
import { ComponentPropsWithoutRef } from 'react';
|
|
4
5
|
import { ComponentPropsWithRef } from 'react';
|
|
5
6
|
import { FC } from 'react';
|
|
7
|
+
import { FieldsetHTMLAttributes } from 'react';
|
|
6
8
|
import { ForwardRefExoticComponent } from 'react';
|
|
7
9
|
import { HTMLAttributes } from 'react';
|
|
8
10
|
import { ReactNode } from 'react';
|
|
@@ -11,6 +13,32 @@ import { RemoveNull as RemoveNull_2 } from '../../../utils';
|
|
|
11
13
|
import { SVGProps } from 'react';
|
|
12
14
|
import { VariantProps } from 'class-variance-authority';
|
|
13
15
|
|
|
16
|
+
export declare const Accordion: FC<AccordionProps>;
|
|
17
|
+
|
|
18
|
+
export declare interface AccordionItem {
|
|
19
|
+
value: string;
|
|
20
|
+
title: ReactNode;
|
|
21
|
+
content: ReactNode;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export declare interface AccordionProps extends ComponentPropsWithRef<'div'>, RemoveNull_2<VariantProps<typeof accordionRootStyles>> {
|
|
26
|
+
items: AccordionItem[];
|
|
27
|
+
type?: AccordionType;
|
|
28
|
+
value?: string | string[];
|
|
29
|
+
defaultValue?: string | string[];
|
|
30
|
+
onValueChange?: (value: string | string[] | undefined) => void;
|
|
31
|
+
collapsible?: boolean;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
declare const accordionRootStyles: (props?: ({
|
|
35
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
36
|
+
} & ClassProp) | undefined) => string;
|
|
37
|
+
|
|
38
|
+
export declare type AccordionSizes = RemoveNull_2<VariantProps<typeof accordionRootStyles>>['size'];
|
|
39
|
+
|
|
40
|
+
export declare type AccordionType = 'single' | 'multiple';
|
|
41
|
+
|
|
14
42
|
export declare const Alert: FC<AlertProps>;
|
|
15
43
|
|
|
16
44
|
export declare type AlertAppearances = RemoveNull_2<VariantProps<typeof alertWrapperStyles>>['appearance'];
|
|
@@ -114,13 +142,37 @@ export declare type BadgeVariants = RemoveNull_2<VariantProps<typeof badgeVarian
|
|
|
114
142
|
|
|
115
143
|
declare const badgeVariants: (props?: ({
|
|
116
144
|
variant?: "default" | "primary" | "info" | "success" | "warning" | "danger" | null | undefined;
|
|
117
|
-
appearance?: "icon" | "
|
|
145
|
+
appearance?: "icon" | "text" | "dots" | null | undefined;
|
|
118
146
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
119
147
|
shape?: "circle" | "square" | null | undefined;
|
|
120
148
|
inverted?: boolean | null | undefined;
|
|
121
149
|
hasIcon?: boolean | null | undefined;
|
|
122
150
|
} & ClassProp) | undefined) => string;
|
|
123
151
|
|
|
152
|
+
export declare const Breadcrumb: FC<BreadcrumbProps>;
|
|
153
|
+
|
|
154
|
+
export declare type BreadcrumbAppearances = RemoveNull_2<VariantProps<typeof breadcrumbStyles>>['appearance'];
|
|
155
|
+
|
|
156
|
+
export declare interface BreadcrumbItem extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'children'> {
|
|
157
|
+
id?: string;
|
|
158
|
+
label: ReactNode;
|
|
159
|
+
icon?: FC<SVGProps<SVGSVGElement>>;
|
|
160
|
+
current?: boolean;
|
|
161
|
+
disabled?: boolean;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export declare interface BreadcrumbProps extends HTMLAttributes<HTMLElement> {
|
|
165
|
+
items: BreadcrumbItem[];
|
|
166
|
+
appearance?: BreadcrumbAppearances;
|
|
167
|
+
separator?: BreadcrumbSeparators;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export declare type BreadcrumbSeparators = '/' | '>';
|
|
171
|
+
|
|
172
|
+
declare const breadcrumbStyles: (props?: ({
|
|
173
|
+
appearance?: "outline" | "ghost" | null | undefined;
|
|
174
|
+
} & ClassProp) | undefined) => string;
|
|
175
|
+
|
|
124
176
|
export declare const Button: FC<ButtonProps>;
|
|
125
177
|
|
|
126
178
|
export declare type ButtonAppearances = RemoveNull_2<VariantProps<typeof buttonStyles>>['appearance'];
|
|
@@ -164,8 +216,100 @@ declare const buttonStyles: (props?: ({
|
|
|
164
216
|
|
|
165
217
|
export declare type ButtonVariants = RemoveNull_2<VariantProps<typeof buttonStyles>>['variant'];
|
|
166
218
|
|
|
219
|
+
export declare const Checkbox: FC<CheckboxProps>;
|
|
220
|
+
|
|
221
|
+
declare const checkboxControlStyles: (props?: ({
|
|
222
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
223
|
+
shape?: "circle" | "square" | null | undefined;
|
|
224
|
+
invalid?: boolean | null | undefined;
|
|
225
|
+
indeterminate?: boolean | null | undefined;
|
|
226
|
+
} & ClassProp) | undefined) => string;
|
|
227
|
+
|
|
228
|
+
export declare const CheckboxGroup: FC<CheckboxGroupProps>;
|
|
229
|
+
|
|
230
|
+
export declare interface CheckboxGroupOption extends Omit<CheckboxProps, 'checked' | 'defaultChecked' | 'children' | 'error' | 'name' | 'ref' | 'size' | 'type' | 'value'> {
|
|
231
|
+
value: string;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export declare type CheckboxGroupOrientation = 'horizontal' | 'vertical';
|
|
235
|
+
|
|
236
|
+
export declare interface CheckboxGroupProps extends Omit<FieldsetHTMLAttributes<HTMLFieldSetElement>, 'children' | 'defaultValue' | 'onChange' | 'value'> {
|
|
237
|
+
options: CheckboxGroupOption[];
|
|
238
|
+
value?: string[];
|
|
239
|
+
defaultValue?: string[];
|
|
240
|
+
onValueChange?: (value: string[]) => void;
|
|
241
|
+
name?: string;
|
|
242
|
+
label?: ReactNode;
|
|
243
|
+
description?: ReactNode;
|
|
244
|
+
error?: ReactNode;
|
|
245
|
+
size?: CheckboxGroupSizes;
|
|
246
|
+
shape?: CheckboxGroupShapes;
|
|
247
|
+
orientation?: CheckboxGroupOrientation;
|
|
248
|
+
required?: boolean;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
export declare type CheckboxGroupShapes = CheckboxShapes;
|
|
252
|
+
|
|
253
|
+
export declare type CheckboxGroupSizes = CheckboxSizes;
|
|
254
|
+
|
|
255
|
+
export declare interface CheckboxProps extends Omit<ComponentPropsWithRef<'input'>, 'children' | 'size' | 'type'> {
|
|
256
|
+
label?: ReactNode;
|
|
257
|
+
description?: ReactNode;
|
|
258
|
+
error?: ReactNode;
|
|
259
|
+
size?: CheckboxSizes;
|
|
260
|
+
shape?: CheckboxShapes;
|
|
261
|
+
indeterminate?: boolean;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
export declare type CheckboxShapes = RemoveNull_2<VariantProps<typeof checkboxControlStyles>>['shape'];
|
|
265
|
+
|
|
266
|
+
export declare type CheckboxSizes = RemoveNull_2<VariantProps<typeof checkboxControlStyles>>['size'];
|
|
267
|
+
|
|
268
|
+
export declare const Chip: FC<ChipProps>;
|
|
269
|
+
|
|
270
|
+
export declare type ChipIcon = FC<SVGProps<SVGSVGElement>>;
|
|
271
|
+
|
|
272
|
+
export declare interface ChipProps extends Omit<ComponentPropsWithoutRef<'span'>, 'children'>, RemoveNull_2<Omit<VariantProps<typeof chipStyles>, 'disabled' | 'hasLeadingVisual' | 'removable'>> {
|
|
273
|
+
children: string | number;
|
|
274
|
+
icon?: ChipIcon;
|
|
275
|
+
disabled?: boolean;
|
|
276
|
+
onClose?: () => void;
|
|
277
|
+
closeLabel?: string;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
export declare type ChipShapes = RemoveNull_2<VariantProps<typeof chipStyles>>['shape'];
|
|
281
|
+
|
|
282
|
+
export declare type ChipSizes = RemoveNull_2<VariantProps<typeof chipStyles>>['size'];
|
|
283
|
+
|
|
284
|
+
declare const chipStyles: (props?: ({
|
|
285
|
+
variant?: "default" | "primary" | "info" | "success" | "warning" | "danger" | null | undefined;
|
|
286
|
+
appearance?: "filled" | "outline" | null | undefined;
|
|
287
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
288
|
+
shape?: "circle" | "square" | null | undefined;
|
|
289
|
+
disabled?: boolean | null | undefined;
|
|
290
|
+
hasLeadingVisual?: boolean | null | undefined;
|
|
291
|
+
removable?: boolean | null | undefined;
|
|
292
|
+
inverted?: boolean | null | undefined;
|
|
293
|
+
} & ClassProp) | undefined) => string;
|
|
294
|
+
|
|
295
|
+
export declare type ChipVariants = RemoveNull_2<VariantProps<typeof chipStyles>>['variant'];
|
|
296
|
+
|
|
167
297
|
export declare const cn: (...inputs: ClassValue[]) => string;
|
|
168
298
|
|
|
299
|
+
export declare const Divider: FC<DividerProps>;
|
|
300
|
+
|
|
301
|
+
export declare type DividerOrientations = RemoveNull_2<VariantProps<typeof dividerRootStyles>>['orientation'];
|
|
302
|
+
|
|
303
|
+
export declare interface DividerProps extends HTMLAttributes<HTMLDivElement> {
|
|
304
|
+
children?: ReactNode;
|
|
305
|
+
orientation?: DividerOrientations;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
declare const dividerRootStyles: (props?: ({
|
|
309
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
310
|
+
hasContent?: boolean | null | undefined;
|
|
311
|
+
} & ClassProp) | undefined) => string;
|
|
312
|
+
|
|
169
313
|
declare enum EThemeOptions {
|
|
170
314
|
LIGHT = "light",
|
|
171
315
|
DARK = "dark"
|