dga-ui-react 1.2.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.
@@ -0,0 +1,604 @@
1
+ import React, { HTMLAttributes, SyntheticEvent } from 'react';
2
+ import * as react_jsx_runtime from 'react/jsx-runtime';
3
+ import { DateObject } from 'react-multi-date-picker';
4
+
5
+ declare const withRtl: (Component: React.FC<any>) => React.FC<React.ReactNode>;
6
+
7
+ declare const useTheme: () => Theme;
8
+
9
+ type Props$3 = {
10
+ theme: ThemeProps;
11
+ children: React.ReactNode;
12
+ };
13
+ declare const ThemeProvider: React.FC<Props$3>;
14
+
15
+ interface DGA_AccordionProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onChange" | "title"> {
16
+ title: React.ReactNode;
17
+ children: React.ReactNode;
18
+ size?: Size;
19
+ expanded?: boolean;
20
+ onChange?: (event: React.SyntheticEvent, isExpanded: boolean) => void;
21
+ defaultExpanded?: boolean;
22
+ iconAlignment?: "leading" | "trailing";
23
+ flush?: boolean;
24
+ }
25
+ declare const Accordion: React.FC<DGA_AccordionProps>;
26
+
27
+ type Variant = "default" | "darker" | "lighter";
28
+ declare const Autocomplete: <T>({ label, className, size, variant, error, onChange, value, placeholder, options, getOptionLabel, disabled, multiple, maxTagsToShow, maxTagsLabel, }: {
29
+ label: React.ReactNode;
30
+ className?: string;
31
+ placeholder?: string;
32
+ size?: "large" | "medium";
33
+ variant?: Variant;
34
+ error?: boolean;
35
+ disabled?: boolean;
36
+ multiple?: boolean;
37
+ maxTagsToShow?: number;
38
+ maxTagsLabel?: string;
39
+ value?: T | T[];
40
+ options: T[];
41
+ getOptionLabel?: (option: T) => string;
42
+ onChange?: (e: React.SyntheticEvent, value: T | T[]) => void;
43
+ }) => react_jsx_runtime.JSX.Element;
44
+
45
+ type DGA_AvatarSize = "xxSmall" | "xSmall" | "small" | "medium" | "large" | "xLarge" | "xxLarge";
46
+ type DGA_AvatarProps = {
47
+ size?: DGA_AvatarSize;
48
+ text?: React.ReactNode;
49
+ icon?: React.ReactNode;
50
+ imageSrc?: string;
51
+ className?: string;
52
+ square?: boolean;
53
+ index?: number;
54
+ border?: boolean;
55
+ borderColor?: string;
56
+ };
57
+ declare const Avatar: React.FC<DGA_AvatarProps>;
58
+
59
+ type DGA_BreadcrumbProps = {
60
+ items: {
61
+ label: React.ReactNode;
62
+ onClick?: Function;
63
+ }[];
64
+ className?: string;
65
+ };
66
+ declare const Breadcrumb: React.FC<DGA_BreadcrumbProps>;
67
+
68
+ interface DGA_ButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "style"> {
69
+ children?: React.ReactNode;
70
+ size?: Size;
71
+ style?: "primary" | "neutral" | "secondary-solid" | "secondary-outline" | "subtle" | "transparent";
72
+ buttonStyle?: React.CSSProperties;
73
+ destructive?: boolean;
74
+ iconOnly?: boolean;
75
+ onColor?: boolean;
76
+ leadIcon?: React.ReactNode;
77
+ trailIcon?: React.ReactNode;
78
+ }
79
+ declare const Button: React.ForwardRefExoticComponent<DGA_ButtonProps & React.RefAttributes<HTMLButtonElement>>;
80
+
81
+ interface DGA_CardProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "title"> {
82
+ title?: React.ReactNode;
83
+ description?: React.ReactNode;
84
+ icon?: React.ReactNode;
85
+ type?: "default" | "expandable" | "selectable";
86
+ state?: "default" | "disabled" | "focused" | "hover";
87
+ effect?: "withShadow" | "noShadow" | "stroke";
88
+ expandableContent?: React.ReactNode;
89
+ actionsButtons?: React.ReactElement<typeof Button>[];
90
+ expanded?: boolean;
91
+ selected?: boolean;
92
+ onChange?: (event: React.SyntheticEvent, value: boolean) => void;
93
+ }
94
+ declare const Card: React.FC<DGA_CardProps>;
95
+
96
+ interface DGA_CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "size" | "style"> {
97
+ label?: React.ReactNode;
98
+ description?: React.ReactNode;
99
+ error?: React.ReactNode;
100
+ onChange?: (e: React.SyntheticEvent, value: boolean) => void;
101
+ value?: any;
102
+ size?: "xSmall" | "small" | "medium";
103
+ indeterminate?: boolean;
104
+ style?: "primary" | "neutral";
105
+ }
106
+ declare const Checkbox: React.FC<DGA_CheckboxProps>;
107
+
108
+ type Style$3 = "default" | "filledDarker" | "filledLighter";
109
+ interface DGA_TextInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "prefix" | "style"> {
110
+ label?: React.ReactNode;
111
+ size?: "large" | "medium";
112
+ style?: Style$3;
113
+ error?: boolean;
114
+ prefix?: React.ReactNode;
115
+ prefixStyle?: "solid" | "subtle";
116
+ suffix?: React.ReactNode;
117
+ suffixStyle?: "solid" | "subtle";
118
+ icon?: React.ReactNode;
119
+ }
120
+ declare const TextInput: React.ForwardRefExoticComponent<DGA_TextInputProps & React.RefAttributes<HTMLInputElement>>;
121
+
122
+ type Props$2 = {
123
+ hijri?: boolean;
124
+ range?: boolean;
125
+ minYear?: number;
126
+ maxYear?: number;
127
+ onChange?: (dateObject: DateObject) => void;
128
+ onRangeChange?: (datesObject: DateObject[]) => void;
129
+ value?: DateObject | DateObject[];
130
+ withTextInput?: boolean;
131
+ textInputProps?: DGA_TextInputProps;
132
+ closeOnSelect?: boolean;
133
+ rangeSeparator?: string;
134
+ minDate?: DateObject;
135
+ maxDate?: DateObject;
136
+ };
137
+ declare const DatePicker: React.FC<Props$2>;
138
+
139
+ type FileCardStatus = "loading" | "success" | "error";
140
+ type Props$1 = {
141
+ status?: FileCardStatus;
142
+ filename: React.ReactNode;
143
+ helperText?: React.ReactNode;
144
+ onDelete: Function;
145
+ theme: Theme;
146
+ };
147
+ declare const FileCard: React.FC<Props$1>;
148
+
149
+ type FilesListItem = {
150
+ file: File;
151
+ id: string;
152
+ status?: FileCardStatus;
153
+ helperText?: React.ReactNode;
154
+ };
155
+ interface DGA_FileUploadProps$1 extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "onDrop" | "title"> {
156
+ title?: React.ReactNode;
157
+ helperText?: React.ReactNode;
158
+ uploadText?: React.ReactNode;
159
+ onDrop: (fileList: FilesListItem[]) => void;
160
+ filesList?: FilesListItem[];
161
+ onFileListItemDeleted?: (file: FilesListItem) => void;
162
+ submitButton?: React.ReactElement<typeof Button>;
163
+ }
164
+ declare const FileUpload: React.FC<DGA_FileUploadProps$1>;
165
+
166
+ interface DGA_FileUploadProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "onDrop" | "title"> {
167
+ title?: React.ReactNode;
168
+ helperText?: React.ReactNode;
169
+ uploadText?: React.ReactNode;
170
+ onDrop: (fileList: FilesListItem[]) => void;
171
+ filesList?: FilesListItem[];
172
+ onFileListItemDeleted?: (file: FilesListItem) => void;
173
+ submitButton?: React.ReactElement<typeof Button>;
174
+ }
175
+ declare const DropZone: React.FC<DGA_FileUploadProps>;
176
+
177
+ interface DGA_DropdownItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onClick"> {
178
+ selected?: boolean;
179
+ multiple?: boolean;
180
+ value?: any;
181
+ onClick?: (e: React.SyntheticEvent, value: any) => void;
182
+ children: React.ReactNode;
183
+ }
184
+ declare const DropdownItem: React.FC<DGA_DropdownItemProps>;
185
+
186
+ type State = "default" | "hovered" | "pressed" | "focused" | "read-only" | "disabled";
187
+ type Style$2 = "default" | "filled" | "filled-darker" | "filled-lighter";
188
+ interface DGA_DropdownProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange" | "style"> {
189
+ label?: React.ReactNode;
190
+ className?: string;
191
+ name?: string;
192
+ placeholder?: string;
193
+ size?: "large" | "medium";
194
+ state?: State;
195
+ error?: boolean;
196
+ filled?: boolean;
197
+ style?: Style$2;
198
+ dropdownStyle?: React.CSSProperties;
199
+ value?: any;
200
+ valueDisplay?: any;
201
+ onChange?: (e: React.SyntheticEvent, value: any) => void;
202
+ onOpen?: Function;
203
+ multiple?: boolean;
204
+ children: (React.ReactElement<typeof DropdownItem> | null | false)[];
205
+ }
206
+ declare const Dropdown: React.FC<DGA_DropdownProps>;
207
+
208
+ interface DGA_GridProps extends HTMLAttributes<HTMLDivElement> {
209
+ container?: boolean;
210
+ sm?: number;
211
+ md?: number;
212
+ lg?: number;
213
+ rowSpacing?: number;
214
+ columnSpacing?: number;
215
+ children: React.ReactNode;
216
+ }
217
+ declare const Grid: React.FC<DGA_GridProps>;
218
+
219
+ interface DGA_InlineAlertProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
220
+ leadText: React.ReactNode;
221
+ helpText?: React.ReactNode;
222
+ type?: ThemeColorName;
223
+ closeButton?: boolean;
224
+ actions?: React.ReactNode;
225
+ onClose?: Function;
226
+ background?: "white" | "color";
227
+ }
228
+ declare const InlineAlert: React.FC<DGA_InlineAlertProps>;
229
+
230
+ interface DGA_LinkProps$1 extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "style"> {
231
+ size?: "medium" | "small";
232
+ style?: "primary" | "neutral" | "on-color";
233
+ inline?: boolean;
234
+ disabled?: boolean;
235
+ children: React.ReactNode;
236
+ }
237
+ declare const Link: React.FC<DGA_LinkProps$1>;
238
+
239
+ interface DGA_LinkProps extends Omit<React.OlHTMLAttributes<HTMLOListElement>, "style" | "type"> {
240
+ style?: "primary" | "neutral" | "on-color";
241
+ type?: "ordered-list" | "unordered-list" | "with-icon";
242
+ level?: 1 | 2 | "1" | "2";
243
+ iconUrl?: string;
244
+ children: React.ReactNode;
245
+ }
246
+ declare const List: React.FC<DGA_LinkProps>;
247
+
248
+ type DGA_LoadingSize = "xxSmall" | "xSmall" | "small" | "medium" | "large" | "xLarge" | "xxLarge";
249
+ interface FGA_LoadingProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "style"> {
250
+ style?: "primary" | "neutral" | "on-color";
251
+ size?: DGA_LoadingSize;
252
+ className?: string;
253
+ loadingStyle?: React.CSSProperties;
254
+ }
255
+ declare const Loading: React.FC<FGA_LoadingProps>;
256
+
257
+ interface DGA_MenuProps extends React.HTMLAttributes<HTMLDivElement> {
258
+ disabled?: boolean;
259
+ menuItems: React.ReactNode;
260
+ children: React.ReactNode;
261
+ keepOpenOnItemsClicked?: boolean;
262
+ onOpen?: (e: SyntheticEvent) => void;
263
+ onClose?: (e: SyntheticEvent) => void;
264
+ }
265
+ declare const Menu: React.FC<DGA_MenuProps>;
266
+
267
+ interface DGA_MenuItemProps$1 extends React.HTMLAttributes<HTMLDivElement> {
268
+ disabled?: boolean;
269
+ icon?: React.ReactNode;
270
+ trailIcon?: React.ReactNode;
271
+ children: React.ReactNode;
272
+ }
273
+ declare const MenuItem: React.FC<DGA_MenuItemProps$1>;
274
+
275
+ interface DGA_MenuItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
276
+ title: React.ReactNode;
277
+ children: React.ReactNode;
278
+ }
279
+ declare const MenuItemGroup: React.FC<DGA_MenuItemProps>;
280
+
281
+ interface DGA_ModalProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
282
+ icon?: React.ReactNode;
283
+ title?: React.ReactNode;
284
+ body?: React.ReactNode;
285
+ align?: "start" | "center";
286
+ size?: "auto" | 600;
287
+ open: boolean;
288
+ onClose?: Function;
289
+ footerStartButtons?: React.ReactElement<typeof Button>[];
290
+ footerEndButtons?: React.ReactElement<typeof Button>[];
291
+ }
292
+ declare const Modal: React.FC<DGA_ModalProps>;
293
+
294
+ interface DGA_NotificationProps {
295
+ style: 'success' | 'info' | 'neutral' | 'warning' | 'critical';
296
+ className?: string;
297
+ icon?: boolean;
298
+ leadText?: string;
299
+ link?: React.ReactNode;
300
+ dismissible?: boolean;
301
+ button?: React.ReactNode;
302
+ helpText?: string;
303
+ onClose?: Function;
304
+ }
305
+ declare const Notification: React.FC<DGA_NotificationProps>;
306
+
307
+ interface DGA_PaginationProps extends React.HTMLAttributes<HTMLDivElement> {
308
+ count: number;
309
+ currentPage: number;
310
+ size?: Size;
311
+ siblingCount?: number;
312
+ onPageChange?: (pageNumber: number) => void;
313
+ }
314
+ declare const Pagination: React.FC<DGA_PaginationProps>;
315
+
316
+ interface DGA_ProgressIndicatorProps extends React.HTMLAttributes<HTMLDivElement> {
317
+ steps: {
318
+ title: React.ReactNode;
319
+ description?: React.ReactNode;
320
+ }[];
321
+ activeStepIndex: number;
322
+ alignment?: "vertical" | "horizontal";
323
+ dot?: boolean;
324
+ onStepClick?: (stepIndex: number) => void;
325
+ }
326
+ declare const ProgressIndicator: React.FC<DGA_ProgressIndicatorProps>;
327
+
328
+ interface DGA_RadioProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "style"> {
329
+ label: React.ReactNode;
330
+ description?: React.ReactNode;
331
+ error?: React.ReactNode;
332
+ style?: "primary" | "neutral";
333
+ onChange?: (e: React.SyntheticEvent, value: any) => void;
334
+ value?: any;
335
+ groupValue?: any;
336
+ }
337
+ declare const Radio: React.FC<DGA_RadioProps>;
338
+
339
+ interface DGA_RadioGroupProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {
340
+ onChange?: (event: React.SyntheticEvent, value: any) => void;
341
+ children: React.ReactElement<typeof Radio> | React.ReactElement<typeof Radio>[];
342
+ name?: string;
343
+ value?: any;
344
+ layout?: "vertiaval" | "horizontal";
345
+ }
346
+ declare const RadioGroup: React.FC<DGA_RadioGroupProps>;
347
+
348
+ interface DGA_SwitchProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "checked" | "onChange"> {
349
+ label?: React.ReactNode;
350
+ helperText?: React.ReactNode;
351
+ alertMessage?: React.ReactNode;
352
+ color?: ColorName;
353
+ checked?: boolean;
354
+ trailSwitch?: boolean;
355
+ icon?: React.ReactNode;
356
+ onChange?: (event: React.SyntheticEvent, isChecked: boolean) => void;
357
+ }
358
+ declare const Switch: React.FC<DGA_SwitchProps>;
359
+
360
+ type TagStatusVariantColors = {
361
+ bg: string;
362
+ iconBg: string;
363
+ font: string;
364
+ };
365
+ type TagStatusVariantDetails = {
366
+ subtle: TagStatusVariantColors;
367
+ inverted: TagStatusVariantColors;
368
+ ghost: TagStatusVariantColors;
369
+ };
370
+ type TagStatusVariant = keyof TagStatusVariantDetails;
371
+ type TagStatusColorName = "neutral" | "green" | "blue" | "yellow" | "red";
372
+
373
+ interface DGA_TagProps$2 extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "style"> {
374
+ children: React.ReactNode;
375
+ status?: TagStatusVariant;
376
+ size?: "xsmall" | "small" | "medium";
377
+ style?: TagStatusColorName;
378
+ }
379
+ declare const StatusTag: React.FC<DGA_TagProps$2>;
380
+
381
+ declare const Table: <T>({ contained, compact, alternatingRows, selectable, className, labels, values, onRowClick, onCheck, responsiveThreshold, columnDivider, headerColumnDivider, lastColumnWidthMultiply, }: {
382
+ contained?: boolean;
383
+ compact?: boolean;
384
+ alternatingRows?: boolean;
385
+ selectable?: boolean;
386
+ className?: string;
387
+ labels: Record<string, any>;
388
+ values: T[];
389
+ onRowClick?: (row: T) => void;
390
+ onCheck?: (rows: T[]) => void;
391
+ responsiveThreshold?: number;
392
+ columnDivider?: boolean;
393
+ headerColumnDivider?: boolean;
394
+ lastColumnWidthMultiply?: number;
395
+ }) => react_jsx_runtime.JSX.Element;
396
+
397
+ interface DGA_TabProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
398
+ children: React.ReactNode;
399
+ size?: Size;
400
+ selected?: boolean;
401
+ vertical?: boolean;
402
+ }
403
+ declare const Tab: React.FC<DGA_TabProps>;
404
+
405
+ interface DGA_TagProps$1 extends React.HTMLAttributes<HTMLDivElement> {
406
+ children: (React.ReactNode | React.ReactElement<typeof Tab>)[];
407
+ size?: Size;
408
+ flush?: boolean;
409
+ vertical?: boolean;
410
+ }
411
+ declare const TabList: React.FC<DGA_TagProps$1>;
412
+
413
+ interface DGA_TagProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "style"> {
414
+ children: React.ReactNode;
415
+ style?: "neutral" | "success" | "error" | "warning" | "info" | "onColor";
416
+ size?: "xsmall" | "small" | "medium";
417
+ outLine?: boolean;
418
+ rounded?: boolean;
419
+ iconOnly?: boolean;
420
+ leadIcon?: React.ReactNode;
421
+ trailIcon?: React.ReactNode;
422
+ }
423
+ declare const Tag: React.FC<DGA_TagProps>;
424
+
425
+ type Style$1 = "default" | "filledDarker" | "filledLighter";
426
+ interface DGA_TextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "size" | "style"> {
427
+ label: React.ReactNode;
428
+ style?: Style$1;
429
+ error?: boolean;
430
+ scrollBar?: boolean;
431
+ resize?: boolean;
432
+ ref?: React.Ref<HTMLTextAreaElement>;
433
+ }
434
+ declare const Textarea: React.ForwardRefExoticComponent<Omit<DGA_TextareaProps, "ref"> & React.RefAttributes<HTMLTextAreaElement>>;
435
+
436
+ type Position = "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right";
437
+ interface NotificationToastProps {
438
+ leadText: React.ReactNode;
439
+ helpText?: string;
440
+ type?: "success" | "critical" | "warning" | "info";
441
+ closeButton?: boolean;
442
+ actions?: React.ReactNode;
443
+ onClose?: Function;
444
+ style?: React.CSSProperties;
445
+ }
446
+ interface Props extends NotificationToastProps {
447
+ position?: Position;
448
+ duration?: number;
449
+ rtl?: boolean;
450
+ }
451
+ declare const toast: (props: Props) => void;
452
+
453
+ interface DGA_TooltipProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title" | "content"> {
454
+ children: React.ReactNode;
455
+ title?: React.ReactNode;
456
+ content?: React.ReactNode;
457
+ jsxContents?: React.ReactNode;
458
+ beakPlacement?: "top" | "bottom" | "left" | "right";
459
+ beakAlignment?: "start" | "end" | "center";
460
+ noBeak?: boolean;
461
+ inverted?: boolean;
462
+ backgroundColor?: string;
463
+ icon?: boolean;
464
+ }
465
+ declare const Tooltip: React.FC<DGA_TooltipProps>;
466
+
467
+ interface DGA_HeaderMenuItemProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
468
+ children: React.ReactNode;
469
+ selected?: boolean;
470
+ }
471
+ declare const HeaderMenuItem: React.FC<DGA_HeaderMenuItemProps>;
472
+
473
+ interface DGA_NavigationDrawerItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
474
+ children?: React.ReactNode;
475
+ title: React.ReactNode;
476
+ selected?: boolean;
477
+ disabled?: boolean;
478
+ expanded?: boolean;
479
+ defaultExpanded?: boolean;
480
+ type?: "divider" | "parent" | "link";
481
+ level?: 1 | 2;
482
+ }
483
+ declare const NavigationDrawerItem: React.FC<DGA_NavigationDrawerItemProps>;
484
+
485
+ type Style = "default" | "filledDarker" | "filledLighter";
486
+ interface DGA_SeachBoxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "style"> {
487
+ label?: React.ReactNode;
488
+ size?: "large" | "medium";
489
+ style?: Style;
490
+ icon?: React.ReactNode;
491
+ showTrailingIcon?: boolean;
492
+ showLabel?: boolean;
493
+ helperText?: React.ReactNode;
494
+ onSearchByVoiceClicked?: Function;
495
+ }
496
+ declare const SearchBox: React.FC<DGA_SeachBoxProps>;
497
+
498
+ interface DGA_ContentSwitcherProps extends React.ButtonHTMLAttributes<HTMLDivElement> {
499
+ size?: Size;
500
+ onColor?: boolean;
501
+ data: {
502
+ text: React.ReactNode;
503
+ active?: boolean;
504
+ onClick?: Function;
505
+ }[];
506
+ onItemClicked?: (item: any, index: number) => void;
507
+ }
508
+ declare const ContentSwitcher: React.FC<DGA_ContentSwitcherProps>;
509
+
510
+ type DividerColor = "neutral" | "alphaWhite" | "white" | "primary";
511
+ interface DGA_DividerProps extends React.HTMLAttributes<HTMLHRElement> {
512
+ color?: DividerColor;
513
+ lineType?: "horizontal" | "vertical";
514
+ }
515
+ declare const Divider: React.FC<DGA_DividerProps>;
516
+
517
+ interface DGA_SkeletonProps extends React.HTMLAttributes<HTMLDivElement> {
518
+ children?: React.ReactNode;
519
+ type?: "imageButtonAndText" | "iconAndList" | "imageContentAndButton" | "chartAndContent" | "imageProfileContentAndButton";
520
+ }
521
+ declare const Skeleton: React.FC<DGA_SkeletonProps>;
522
+
523
+ type Size$2 = "24px" | "48px" | "64px" | "80px" | "120px" | "170px" | "240px";
524
+ interface DGA_SkeletonCircleProps extends React.HTMLAttributes<HTMLDivElement> {
525
+ size?: Size$2;
526
+ }
527
+ declare const SkeletonCircle: React.FC<DGA_SkeletonCircleProps>;
528
+
529
+ type Size$1 = "24px" | "48px" | "64px" | "80px" | "120px" | "170px" | "240px";
530
+ interface DGA_SkeletonSquareProps extends React.HTMLAttributes<HTMLDivElement> {
531
+ size?: Size$1;
532
+ }
533
+ declare const SkeletonSquare: React.FC<DGA_SkeletonSquareProps>;
534
+
535
+ interface DGA_SkeletonRectangleProps extends React.HTMLAttributes<HTMLDivElement> {
536
+ size?: "large" | "medium" | "small";
537
+ }
538
+ declare const SkeletonRectangle: React.FC<DGA_SkeletonRectangleProps>;
539
+
540
+ interface DGA_SkeletonLineProps extends React.HTMLAttributes<HTMLDivElement> {
541
+ size?: "large" | "small";
542
+ }
543
+ declare const SkeletonLine: React.FC<DGA_SkeletonLineProps>;
544
+
545
+ interface DGA_RatingProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {
546
+ size?: Size;
547
+ brand?: boolean;
548
+ value?: number;
549
+ onChange?: (value: number) => void;
550
+ }
551
+ declare const Rating: React.FC<DGA_RatingProps>;
552
+
553
+ interface DGA_ChipProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "style"> {
554
+ size?: Size;
555
+ style?: "primary" | "neutral";
556
+ rounded?: boolean;
557
+ selected?: boolean;
558
+ disabled?: boolean;
559
+ onColor?: boolean;
560
+ children?: React.ReactNode;
561
+ leadIcon?: React.ReactNode;
562
+ trailIcon?: React.ReactNode;
563
+ }
564
+ declare const Chip: React.FC<DGA_ChipProps>;
565
+
566
+ interface DGA_FloatingButtonProps extends Omit<React.HTMLAttributes<HTMLButtonElement>, "style"> {
567
+ style?: "Primary-Neutral" | "Primary-Brand" | "Secondary-Solid";
568
+ iconOnly?: boolean;
569
+ size?: "small" | "large";
570
+ selected?: boolean;
571
+ onColor?: boolean;
572
+ disabled?: boolean;
573
+ children?: React.ReactNode;
574
+ leadIcon?: React.ReactNode;
575
+ }
576
+ declare const FloatingButton: React.FC<DGA_FloatingButtonProps>;
577
+
578
+ type RadialStepperSize = "40px" | "48px" | "64px" | "80px" | "120px";
579
+ interface DGA_RadialStepperProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "style"> {
580
+ size?: RadialStepperSize;
581
+ style?: "primary" | "neutral";
582
+ onColor?: boolean;
583
+ stepsCount: number;
584
+ activeStep: number;
585
+ innerCircleText?: React.ReactNode;
586
+ description?: React.ReactNode;
587
+ preStepName?: React.ReactNode;
588
+ stepName?: React.ReactNode;
589
+ nextStepName?: React.ReactNode;
590
+ }
591
+ declare const RadialStepper: React.FC<DGA_RadialStepperProps>;
592
+
593
+ interface DGA_ProgressBarProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "style"> {
594
+ label?: React.ReactNode;
595
+ helperText?: React.ReactNode;
596
+ size?: Size;
597
+ percentage?: number;
598
+ error?: boolean;
599
+ success?: boolean;
600
+ style?: "primary" | "neutral";
601
+ }
602
+ declare const ProgressBar: React.FC<DGA_ProgressBarProps>;
603
+
604
+ export { Accordion, Autocomplete, Avatar, Breadcrumb, Button, Card, Checkbox, Chip, ContentSwitcher, DatePicker, Divider, DropZone, Dropdown, DropdownItem, FileCard, FileUpload, FloatingButton, Grid, HeaderMenuItem, InlineAlert, Link, List, Loading, Menu, MenuItem, MenuItemGroup, Modal, NavigationDrawerItem, Notification, Pagination, ProgressBar, ProgressIndicator, RadialStepper, Radio, RadioGroup, Rating, SearchBox, Skeleton, SkeletonCircle, SkeletonLine, SkeletonRectangle, SkeletonSquare, StatusTag, Switch, Tab, TabList, Table, Tag, TextInput, Textarea, ThemeProvider, Tooltip, toast, useTheme, withRtl };
package/package.json ADDED
@@ -0,0 +1,80 @@
1
+ {
2
+ "name": "dga-ui-react",
3
+ "version": "1.2.1",
4
+ "description": "DGA ui library",
5
+ "author": "Ashraf Ainia",
6
+ "license": "MIT",
7
+ "main": "dist/cjs/index.js",
8
+ "module": "dist/esm/index.js",
9
+ "types": "dist/index.d.ts",
10
+ "scripts": {
11
+ "test": "jest",
12
+ "build": "rm -rf dist && rm -rf charts && rollup -c --bundleConfigAsCjs && cp src/components/charts/package.json charts/package.json",
13
+ "release": "npm run build && npm publish",
14
+ "storybook": "storybook dev -p 6006",
15
+ "dev": "storybook dev -p 6006"
16
+ },
17
+ "homepage": "https://dgaui.vercel.app/?path=/docs/docs--docs",
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "https://github.com/ashraf-ainia/dga-ui-react"
21
+ },
22
+ "keywords": [
23
+ "component",
24
+ "components",
25
+ "dga",
26
+ "dgaui",
27
+ "dga-ui",
28
+ "uikit",
29
+ "frontend",
30
+ "react",
31
+ "react-component",
32
+ "ui",
33
+ "styled-components",
34
+ "react-multi-date-picker",
35
+ "d3"
36
+ ],
37
+ "peerDependencies": {
38
+ "d3": ">=7.9.0",
39
+ "react": ">=18.2.0",
40
+ "react-dom": ">=18.2.0",
41
+ "react-multi-date-picker": ">=4.5.2"
42
+ },
43
+ "devDependencies": {
44
+ "@babel/core": "^7.24.4",
45
+ "@babel/preset-env": "^7.24.4",
46
+ "@babel/preset-react": "^7.24.1",
47
+ "@babel/preset-typescript": "^7.24.1",
48
+ "@rollup/plugin-commonjs": "^25.0.7",
49
+ "@rollup/plugin-image": "^3.0.3",
50
+ "@rollup/plugin-node-resolve": "^15.2.3",
51
+ "@rollup/plugin-terser": "^0.4.4",
52
+ "@rollup/plugin-typescript": "^11.1.6",
53
+ "@storybook/addon-essentials": "^8.0.9",
54
+ "@storybook/addon-interactions": "^8.0.9",
55
+ "@storybook/addon-links": "^8.0.9",
56
+ "@storybook/addon-onboarding": "^8.0.9",
57
+ "@storybook/blocks": "^8.0.9",
58
+ "@storybook/react": "^8.0.9",
59
+ "@storybook/react-vite": "^8.2.6",
60
+ "@storybook/test": "^8.0.9",
61
+ "@testing-library/react": "^15.0.5",
62
+ "@types/d3": "^7.4.3",
63
+ "@types/jest": "^29.5.12",
64
+ "@types/react": "^18.2.79",
65
+ "babel-jest": "^29.7.0",
66
+ "identity-obj-proxy": "^3.0.0",
67
+ "jest": "^29.7.0",
68
+ "jest-environment-jsdom": "^29.7.0",
69
+ "rollup": "^4.16.1",
70
+ "rollup-plugin-dts": "^6.1.0",
71
+ "rollup-plugin-peer-deps-external": "^2.2.4",
72
+ "rollup-plugin-postcss": "^4.0.2",
73
+ "rollup-plugin-scss": "^4.0.0",
74
+ "sass": "^1.77.8",
75
+ "storybook": "^8.0.9",
76
+ "styled-components": "^6.1.12",
77
+ "tslib": "^2.6.2",
78
+ "typescript": "^5.4.5"
79
+ }
80
+ }
package/types/app.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ declare module "*.png" {
2
+ const value: any;
3
+ export = value;
4
+ }
5
+ declare module "*.svg" {
6
+ const value: any;
7
+ export = value;
8
+ }