groovinads-ui 1.9.95 → 1.9.96

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.
Files changed (3) hide show
  1. package/README.md +43 -0
  2. package/index.d.ts +136 -99
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -34,6 +34,7 @@ The library includes the following components:
34
34
 
35
35
  - [Labels](#labels):
36
36
  - [Alert](#alert): For displaying alerts.
37
+ - [Card](#card): For containing and grouping related content.
37
38
  - [EditableContent](#editablecontent): For inline editing of text content.
38
39
  - [Icon](#icon): For displaying icons.
39
40
  - [LoginSource](#loginsource): For show icons of login sources.
@@ -1037,6 +1038,48 @@ import { BlockIcon } from 'groovinads-ui';
1037
1038
  | `name` | String | No | n/a | `font-awesome` | FontAwesome icon name. |
1038
1039
  | `size` | String | No | `sm` `md` `lg` | `md` | Size of the block icon container. |
1039
1040
 
1041
+ ### Card
1042
+
1043
+ ```jsx
1044
+ import React from 'react';
1045
+ import { Card } from 'groovinads-ui';
1046
+
1047
+ const ExampleCard = () => (
1048
+ <div>
1049
+ <Card className='p-4' depth={1} size='md'>
1050
+ <h3>Card Title</h3>
1051
+ <p>This is a simple card component that can contain any content.</p>
1052
+ </Card>
1053
+
1054
+ <Card className='mt-3 p-4' depth={2} size='lg'>
1055
+ <h4>User Profile</h4>
1056
+ <p>Name: John Doe</p>
1057
+ <p>Email: john@example.com</p>
1058
+ <button className='btn btn-primary'>Edit Profile</button>
1059
+ </Card>
1060
+
1061
+ <Card className='mt-3 p-4' depth={0} size='sm'>
1062
+ <h4>Small card without shadow</h4>
1063
+ <p>This card has no shadow depth and is small size.</p>
1064
+ </Card>
1065
+
1066
+ <Card className='mt-3 p-4' depth={3} size='full'>
1067
+ <h4>Full width card</h4>
1068
+ <p>This card takes the full width of its container.</p>
1069
+ </Card>
1070
+ </div>
1071
+ );
1072
+
1073
+ export default ExampleCard;
1074
+ ```
1075
+
1076
+ | Property | Type | Required | Options | Default | Description |
1077
+ | ----------- | ------ | -------- | ------------------------- | ------- | ---------------------------------------------------------------------------------------- |
1078
+ | `children` | Node | No | n/a | n/a | Content to be displayed inside the card. |
1079
+ | `className` | String | No | n/a | n/a | Additional CSS class names that can be applied to the card. |
1080
+ | `depth` | Number | No | `0` `1` `2` `3` `4` | `1` | Shadow depth level. Adds `.shadow-{depth}` class. Use `0` for no shadow. |
1081
+ | `size` | String | No | `sm` `md` `lg` `full` | `md` | Card size. Adds `.card-{size}` class. Use `md` for default size (no additional class). |
1082
+
1040
1083
  ### EditableContent
1041
1084
 
1042
1085
  ```jsx
package/index.d.ts CHANGED
@@ -22,6 +22,19 @@ export interface ButtonProps {
22
22
 
23
23
  export const Button: React.FC<ButtonProps>;
24
24
 
25
+ // ============================================================================
26
+ // CARD COMPONENTS
27
+ // ============================================================================
28
+
29
+ export interface CardProps {
30
+ children?: ReactNode;
31
+ className?: string;
32
+ depth?: 0 | 1 | 2 | 3 | 4;
33
+ size?: 'sm' | 'md' | 'lg' | 'full';
34
+ }
35
+
36
+ export const Card: React.FC<CardProps>;
37
+
25
38
  // ============================================================================
26
39
  // DROPDOWN COMPONENTS
27
40
  // ============================================================================
@@ -53,76 +66,100 @@ export interface DropdownComponentProps {
53
66
  export const DropdownComponent: React.FC<DropdownComponentProps>;
54
67
 
55
68
  export interface DropdownFilterProps {
56
- align?: 'start' | 'end';
57
- autoClose?: boolean | 'inside' | 'outside';
69
+ autoClose?: boolean | 'outside';
58
70
  className?: string;
59
- data: Array<{ id: string | number; name: string; [key: string]: any }>;
60
71
  disabled?: boolean;
61
- dropDirection?: 'up' | 'down' | 'start' | 'end';
62
- fullWidth?: boolean;
63
- iconName?: string;
64
- label: string;
65
- maxHeight?: string;
66
- onFilter: (selectedItems: any[]) => void;
67
- search?: boolean;
68
- selectedItems?: Array<{ id: string | number; name: string; [key: string]: any }>;
72
+ locked?: boolean;
73
+ menuType?: 'simple' | 'selection';
74
+ onRemoveFilter?: () => void;
75
+ onToggle?: (show: boolean) => void;
76
+ overflow?: boolean;
77
+ requiredText?: string;
78
+ searchLabel?: string;
79
+ setShow?: Dispatch<SetStateAction<boolean>>;
80
+ setValuesSelected?: Dispatch<SetStateAction<any[]>>;
81
+ show?: boolean;
82
+ showError?: boolean;
83
+ title?: string;
84
+ values?: any[];
85
+ valuesSelected?: any[];
69
86
  }
70
87
 
71
88
  export const DropdownFilter: React.FC<DropdownFilterProps>;
72
89
 
73
90
  export interface DropdownMultiSelectProps {
74
- align?: 'start' | 'end';
75
- autoClose?: boolean | 'inside' | 'outside';
91
+ autoClose?: boolean | string;
92
+ buttonVariant?: 'input' | 'primary' | 'secondary' | 'terciary' | 'outline';
76
93
  className?: string;
77
- data: Array<{ id: string | number; name: string; [key: string]: any }>;
94
+ customKey?: string;
78
95
  disabled?: boolean;
79
- dropDirection?: 'up' | 'down' | 'start' | 'end';
80
- fullWidth?: boolean;
81
- iconName?: string;
82
- label: string;
83
- maxHeight?: string;
84
- onChange: (selectedItems: any[]) => void;
85
- search?: boolean;
86
- selectedItems?: Array<{ id: string | number; name: string; [key: string]: any }>;
96
+ drop?: 'up' | 'down';
97
+ focus?: boolean;
98
+ hasId?: boolean;
99
+ idInPill?: boolean;
100
+ idKey?: string;
101
+ label?: string;
102
+ nameKey?: string;
103
+ notMatchedText?: string;
104
+ nowrap?: boolean;
105
+ object?: boolean;
106
+ onToggle?: (show: boolean) => void;
107
+ overflow?: boolean;
108
+ requiredText?: string;
109
+ searchLabel?: string;
110
+ setValuesSelected?: Dispatch<SetStateAction<any[]>>;
111
+ setShow?: Dispatch<SetStateAction<boolean>>;
112
+ show?: boolean;
113
+ showError?: boolean;
114
+ showStatus?: string;
87
115
  size?: 'sm' | 'md' | 'lg';
116
+ values?: any[];
117
+ valuesSelected?: any[];
88
118
  }
89
119
 
90
120
  export const DropdownMultiSelect: React.FC<DropdownMultiSelectProps>;
91
121
 
92
122
  export interface DropdownDatePickerProps {
93
- align?: 'start' | 'end';
94
123
  className?: string;
95
- defaultSelected?: string;
124
+ dateFrom?: string;
125
+ dateTo?: string;
96
126
  disabled?: boolean;
97
- dropDirection?: 'up' | 'down' | 'start' | 'end';
98
- fullWidth?: boolean;
99
- iconName?: string;
100
127
  label?: string;
128
+ locked?: boolean;
101
129
  maxDate?: Date;
102
130
  minDate?: Date;
103
- onDateChange: (date: Date | null) => void;
104
- selectedDate?: Date | null;
131
+ onRemoveFilter?: () => void;
132
+ onToggle?: (show: boolean) => void;
133
+ overflow?: boolean;
134
+ requiredText?: string;
135
+ setDateFrom?: Dispatch<SetStateAction<string>>;
136
+ setDateTo?: Dispatch<SetStateAction<string>>;
137
+ setShow?: Dispatch<SetStateAction<boolean>>;
138
+ show?: boolean;
139
+ showError?: boolean;
105
140
  size?: 'sm' | 'md' | 'lg';
141
+ variant?: 'input' | 'filter';
106
142
  }
107
143
 
108
144
  export const DropdownDatePicker: React.FC<DropdownDatePickerProps>;
109
145
 
110
146
  export interface DropdownSimpleDatePickerProps {
111
- align?: 'start' | 'end';
112
147
  className?: string;
113
- dateFormat?: string;
148
+ clearDate?: () => void;
149
+ date?: string;
114
150
  disabled?: boolean;
115
- dropDirection?: 'up' | 'down' | 'start' | 'end';
116
- endDate?: Date | null;
117
- fullWidth?: boolean;
118
- iconName?: string;
151
+ handleClear?: () => void;
119
152
  label?: string;
120
- maxDate?: Date;
121
- minDate?: Date;
122
- onChange: (dates: [Date | null, Date | null]) => void;
123
- selectsRange?: boolean;
153
+ maxDate?: string | Date;
154
+ minDate?: string | Date;
155
+ onToggle?: (show: boolean) => void;
156
+ overflow?: boolean;
157
+ requiredText?: string;
158
+ setDate?: Dispatch<SetStateAction<string>>;
159
+ setShow?: Dispatch<SetStateAction<boolean>>;
160
+ show?: boolean;
161
+ showError?: boolean;
124
162
  size?: 'sm' | 'md' | 'lg';
125
- startDate?: Date | null;
126
163
  }
127
164
 
128
165
  export const DropdownSimpleDatePicker: React.FC<DropdownSimpleDatePickerProps>;
@@ -132,14 +169,13 @@ export const DropdownSimpleDatePicker: React.FC<DropdownSimpleDatePickerProps>;
132
169
  // ============================================================================
133
170
 
134
171
  export interface CheckboxProps {
135
- checked?: boolean;
136
172
  className?: string;
137
173
  disabled?: boolean;
138
174
  id?: string;
139
- label?: string;
140
175
  name?: string;
141
- onChange?: ChangeEventHandler<HTMLInputElement>;
142
- required?: boolean;
176
+ setStatus?: Dispatch<SetStateAction<boolean>>;
177
+ size?: 'sm' | 'md' | 'lg';
178
+ status?: boolean;
143
179
  }
144
180
 
145
181
  export const Checkbox: React.FC<CheckboxProps>;
@@ -170,44 +206,42 @@ export interface InputProps {
170
206
  export const Input: React.FC<InputProps>;
171
207
 
172
208
  export interface RadioProps {
173
- checked?: boolean;
174
209
  className?: string;
175
210
  disabled?: boolean;
211
+ fullWidth?: boolean;
176
212
  id?: string;
177
- label?: string;
178
213
  name?: string;
179
- onChange?: ChangeEventHandler<HTMLInputElement>;
180
- required?: boolean;
181
- value?: string | number;
214
+ setStatus?: Dispatch<SetStateAction<boolean>>;
215
+ size?: 'sm' | 'md' | 'lg';
216
+ status?: boolean;
182
217
  }
183
218
 
184
219
  export const Radio: React.FC<RadioProps>;
185
220
 
186
221
  export interface SwitchProps {
187
- checked?: boolean;
188
222
  className?: string;
189
223
  disabled?: boolean;
224
+ icon?: boolean;
190
225
  id?: string;
191
- label?: string;
192
226
  name?: string;
193
- onChange?: ChangeEventHandler<HTMLInputElement>;
227
+ setStatus?: Dispatch<SetStateAction<number | boolean>>;
228
+ status?: number | boolean;
229
+ size?: 'sm' | 'md' | 'lg';
230
+ switchPosition?: 'start' | 'end';
194
231
  }
195
232
 
196
233
  export const Switch: React.FC<SwitchProps>;
197
234
 
198
235
  export interface TextareaProps {
199
- autoFocus?: boolean;
200
236
  className?: string;
201
237
  disabled?: boolean;
202
238
  helpText?: string;
203
239
  label?: string;
204
- maxLength?: number;
205
240
  name?: string;
206
241
  onChange?: ChangeEventHandler<HTMLTextAreaElement>;
207
- placeholder?: string;
208
242
  requiredText?: string;
209
- rows?: number;
210
243
  showError?: boolean;
244
+ setShowError?: Dispatch<SetStateAction<boolean>>;
211
245
  size?: 'sm' | 'md' | 'lg';
212
246
  value?: string;
213
247
  }
@@ -215,15 +249,14 @@ export interface TextareaProps {
215
249
  export const Textarea: React.FC<TextareaProps>;
216
250
 
217
251
  export interface InputEmailProps {
218
- className?: string;
252
+ apiGetEmail: string;
253
+ apiPostEmail: string;
219
254
  disabled?: boolean;
220
- helpText?: string;
221
255
  label?: string;
222
- name?: string;
223
- onChange?: ChangeEventHandler<HTMLInputElement>;
224
- required?: boolean;
225
- size?: 'sm' | 'md' | 'lg';
226
- value?: string;
256
+ showModal?: boolean;
257
+ textButton?: string;
258
+ textError?: string;
259
+ titleList?: string;
227
260
  }
228
261
 
229
262
  export const InputEmail: React.FC<InputEmailProps>;
@@ -271,13 +304,13 @@ export const Slider: React.FC<SliderProps>;
271
304
  // ============================================================================
272
305
 
273
306
  export interface AlertProps {
274
- children?: ReactNode;
307
+ animation?: boolean;
308
+ children: ReactNode;
275
309
  className?: string;
276
- dismissible?: boolean;
277
- icon?: string;
310
+ icon?: boolean;
278
311
  onClose?: () => void;
279
- show?: boolean;
280
- style?: 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'light' | 'dark';
312
+ size?: 'sm' | 'md' | 'lg';
313
+ type: 'warning' | 'danger' | 'success' | 'info';
281
314
  }
282
315
 
283
316
  export const Alert: React.FC<AlertProps>;
@@ -313,7 +346,7 @@ export const Icon: React.FC<IconProps>;
313
346
 
314
347
  export interface LoginSourceProps {
315
348
  className?: string;
316
- source: string;
349
+ logo?: 'groovinads' | 'google' | 'microsoft' | 'linkedin' | 'slack';
317
350
  }
318
351
 
319
352
  export const LoginSource: React.FC<LoginSourceProps>;
@@ -331,8 +364,7 @@ export const PillComponent: React.FC<PillComponentProps>;
331
364
 
332
365
  export interface SpinnerProps {
333
366
  className?: string;
334
- scale?: number;
335
- variant?: 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'light' | 'dark';
367
+ scale?: 0.7 | 1 | 2 | 3 | 4;
336
368
  }
337
369
 
338
370
  export const Spinner: React.FC<SpinnerProps>;
@@ -351,10 +383,9 @@ export interface ProgressBarProps {
351
383
  export const ProgressBar: React.FC<ProgressBarProps>;
352
384
 
353
385
  export interface StatusIconProps {
386
+ animated?: boolean;
354
387
  className?: string;
355
- icon?: string;
356
- label?: string;
357
- status: 'success' | 'warning' | 'danger' | 'info' | 'disabled';
388
+ status: number;
358
389
  }
359
390
 
360
391
  export const StatusIcon: React.FC<StatusIconProps>;
@@ -364,30 +395,21 @@ export const StatusIcon: React.FC<StatusIconProps>;
364
395
  // ============================================================================
365
396
 
366
397
  export interface ToastComponentProps {
367
- autohide?: boolean;
368
398
  className?: string;
369
- delay?: number;
370
- icon?: string;
371
- message: string;
372
- onClose?: () => void;
373
- show?: boolean;
374
- style?: 'success' | 'danger' | 'warning' | 'info';
375
- title?: string;
399
+ position?: 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end';
400
+ toast?: object;
376
401
  }
377
402
 
378
403
  export const ToastComponent: React.FC<ToastComponentProps>;
379
404
 
380
405
  export interface ToastProgressProps {
381
- autohide?: boolean;
406
+ cancelButton?: boolean;
382
407
  className?: string;
383
- delay?: number;
384
- icon?: string;
385
- message: string;
386
- onClose?: () => void;
387
- progress?: number;
388
- show?: boolean;
389
- style?: 'success' | 'danger' | 'warning' | 'info';
390
- title?: string;
408
+ currentProgress?: number;
409
+ onCancel?: () => void;
410
+ position?: 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end';
411
+ status?: 'in-progress' | 'error';
412
+ variant: 'upload' | 'processing';
391
413
  }
392
414
 
393
415
  export const ToastProgress: React.FC<ToastProgressProps>;
@@ -439,18 +461,22 @@ export interface AsideProps {
439
461
  export const Aside: React.FC<AsideProps>;
440
462
 
441
463
  export interface StepperProps {
442
- activeStep?: number;
443
464
  className?: string;
444
- steps: Array<{ label: string; [key: string]: any }>;
465
+ current: number;
466
+ list: any[];
467
+ orientation?: 'horizontal' | 'vertical';
445
468
  }
446
469
 
447
470
  export const Stepper: React.FC<StepperProps>;
448
471
 
449
472
  export interface TabnavProps {
450
- activeTab?: string | number;
473
+ activeTab?: number;
451
474
  className?: string;
452
- onTabChange?: (tabId: string | number) => void;
453
- tabs: Array<{ id: string | number; label: string; content?: ReactNode; [key: string]: any }>;
475
+ disabledTabs?: number[];
476
+ navigateTab?: boolean;
477
+ onNavigate?: (tab: number) => void;
478
+ setActiveTab?: Dispatch<SetStateAction<number>>;
479
+ tabs: any[];
454
480
  }
455
481
 
456
482
  export const Tabnav: React.FC<TabnavProps>;
@@ -472,11 +498,22 @@ export interface PaginationProps {
472
498
  export const Pagination: React.FC<PaginationProps>;
473
499
 
474
500
  export interface SidebarProps {
475
- children?: ReactNode;
476
- className?: string;
477
- header?: ReactNode;
501
+ api?: string;
502
+ clientLogoUrl?: string;
503
+ clientNotFoundTitle?: string;
504
+ clientNotFoundText?: string;
505
+ clientSearchLabel?: string;
506
+ customLinks: any[];
507
+ customUrl?: string;
508
+ defaultOpened?: boolean;
509
+ inModal?: boolean;
510
+ onNavigate: (path: string) => void;
511
+ pendingType?: 'warning' | 'badge';
512
+ selectedClient?: object;
513
+ setGroovinProfile?: Dispatch<SetStateAction<any>>;
478
514
  setShow?: Dispatch<SetStateAction<boolean>>;
479
515
  show?: boolean;
516
+ showClients?: true | false | 'single';
480
517
  }
481
518
 
482
519
  export const Sidebar: React.FC<SidebarProps>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "groovinads-ui",
3
3
  "description": "Groovinads UI is a React component library designed exclusively for Groovinads applications. It provides ready-to-use UI elements styled according to Groovinads design guidelines to facilitate rapid development.",
4
- "version": "1.9.95",
4
+ "version": "1.9.96",
5
5
  "type": "module",
6
6
  "keywords": [
7
7
  "css",