tcce-design-system 0.1.20 → 0.1.22
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/README.md +25 -11
- package/dist/tcce-design-system-components.css +1 -1
- package/dist/tcce-design-system-components.d.ts +316 -106
- package/dist/tcce-design-system-components.js +4318 -3709
- package/dist/tcce-design-system-components.umd.cjs +550 -403
- package/package.json +8 -7
|
@@ -1,24 +1,35 @@
|
|
|
1
1
|
import { AnchorHTMLAttributes } from 'react';
|
|
2
2
|
import { ButtonHTMLAttributes } from 'react';
|
|
3
|
+
import { ChangeEvent } from 'react';
|
|
4
|
+
import { ClipboardEvent as ClipboardEvent_2 } from 'react';
|
|
3
5
|
import { Component } from 'react';
|
|
4
6
|
import { Context } from 'react';
|
|
7
|
+
import { CSSProperties } from 'react';
|
|
5
8
|
import { default as default_2 } from 'react';
|
|
6
9
|
import { DetailedHTMLProps } from 'react';
|
|
10
|
+
import { Dispatch } from 'react';
|
|
7
11
|
import { FastOmit } from 'styled-components';
|
|
8
12
|
import { ForwardRefComponent } from 'motion/react';
|
|
9
13
|
import { ForwardRefExoticComponent } from 'react';
|
|
10
14
|
import { HTMLAttributeAnchorTarget } from 'react';
|
|
11
15
|
import { HTMLAttributes } from 'react';
|
|
12
16
|
import { HTMLMotionProps } from 'motion/react';
|
|
17
|
+
import { InputHTMLAttributes } from 'react';
|
|
13
18
|
import { IStyledComponentBase } from 'styled-components/dist/types';
|
|
14
19
|
import { JSX } from 'react/jsx-runtime';
|
|
20
|
+
import { KeyboardEvent as KeyboardEvent_2 } from 'react';
|
|
21
|
+
import { LabelHTMLAttributes } from 'react';
|
|
15
22
|
import { MouseEventHandler } from 'react';
|
|
16
23
|
import { PropsWithChildren } from 'react';
|
|
17
24
|
import { ReactNode } from 'react';
|
|
18
25
|
import { RefAttributes } from 'react';
|
|
26
|
+
import { RefObject } from 'react';
|
|
19
27
|
import { RemixiconComponentType } from '@remixicon/react';
|
|
20
28
|
import { RuleSet } from 'styled-components';
|
|
29
|
+
import { SelectHTMLAttributes } from 'react';
|
|
30
|
+
import { SetStateAction } from 'react';
|
|
21
31
|
import { Substitute } from 'styled-components/dist/types';
|
|
32
|
+
import { TextareaHTMLAttributes } from 'react';
|
|
22
33
|
import { toast } from 'sonner';
|
|
23
34
|
import { ToasterProps } from 'sonner';
|
|
24
35
|
|
|
@@ -44,7 +55,7 @@ $open: boolean;
|
|
|
44
55
|
* @param param0 - Props for the Badge component.
|
|
45
56
|
* @returns The Badge component.
|
|
46
57
|
*/
|
|
47
|
-
export declare const Badge:
|
|
58
|
+
export declare const Badge: ({ children, variant, size, color, leftIcon, rightIcon, iconColor, iconSize, ...props }: BadgeProps) => JSX.Element;
|
|
48
59
|
|
|
49
60
|
/**
|
|
50
61
|
* Props for the Badge component.
|
|
@@ -56,7 +67,7 @@ export declare const Badge: default_2.FC<BadgeProps>;
|
|
|
56
67
|
* @param iconColor - Color of the icons. Default is 'currentColor'.
|
|
57
68
|
* @param iconSize - Size of the icons. Default is 'sm'.
|
|
58
69
|
*/
|
|
59
|
-
declare interface BadgeProps extends
|
|
70
|
+
declare interface BadgeProps extends HTMLAttributes<HTMLSpanElement>, WithIconsProps {
|
|
60
71
|
variant?: BadgeVariant;
|
|
61
72
|
size?: BadgeSize;
|
|
62
73
|
color?: string;
|
|
@@ -83,7 +94,7 @@ export declare const baseContentTableStyles: RuleSet<object>;
|
|
|
83
94
|
|
|
84
95
|
export declare const baseFieldStyles: RuleSet<object>;
|
|
85
96
|
|
|
86
|
-
export declare interface BaseFormFieldProps extends Omit<
|
|
97
|
+
export declare interface BaseFormFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
87
98
|
size?: FormFieldSize;
|
|
88
99
|
hasError?: boolean;
|
|
89
100
|
disabled?: boolean;
|
|
@@ -99,13 +110,32 @@ export declare interface BaseInputProps extends Omit<BaseFormFieldProps, 'type'>
|
|
|
99
110
|
|
|
100
111
|
export declare const baseInputStyles: RuleSet<object>;
|
|
101
112
|
|
|
102
|
-
export declare interface BaseLabelProps extends
|
|
113
|
+
export declare interface BaseLabelProps extends LabelHTMLAttributes<HTMLLabelElement> {
|
|
103
114
|
size?: LabelSize;
|
|
104
115
|
disabled?: boolean;
|
|
105
116
|
required?: boolean;
|
|
106
117
|
className?: string;
|
|
107
118
|
}
|
|
108
119
|
|
|
120
|
+
/**
|
|
121
|
+
* Base props for the Spinner component.
|
|
122
|
+
* @interface BaseSpinnerProps
|
|
123
|
+
* @property {Size} [size] - Size of the spinner.
|
|
124
|
+
* @property {ColorKey} [color] - Color variant of the spinner.
|
|
125
|
+
* @property {boolean} [centered] - Whether to center the spinner in a container.
|
|
126
|
+
* @property {string} [message] - Optional message to display with the spinner.
|
|
127
|
+
* @property {string} [title] - Optional title for accessibility.
|
|
128
|
+
* @property {Variant} [variant] - Animation variant of the spinner.
|
|
129
|
+
*/
|
|
130
|
+
declare interface BaseSpinnerProps {
|
|
131
|
+
size?: Size;
|
|
132
|
+
color?: ColorKey;
|
|
133
|
+
centered?: boolean;
|
|
134
|
+
message?: string;
|
|
135
|
+
title?: string;
|
|
136
|
+
variant?: Variant;
|
|
137
|
+
}
|
|
138
|
+
|
|
109
139
|
export declare const baseTableCellsSizes: {
|
|
110
140
|
sm: RuleSet<object>;
|
|
111
141
|
md: RuleSet<object>;
|
|
@@ -127,9 +157,9 @@ export declare const bodyTextStyles: {
|
|
|
127
157
|
|
|
128
158
|
export declare const BrandLogo: IStyledComponentBase<"web", FastOmit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
129
159
|
|
|
130
|
-
export declare const Button:
|
|
160
|
+
export declare const Button: ({ children, variant, size, isLoading, disabled, leftIcon, rightIcon, iconSize, iconColor, ...props }: ButtonProps) => JSX.Element;
|
|
131
161
|
|
|
132
|
-
declare interface ButtonProps extends
|
|
162
|
+
declare interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, WithIconsProps {
|
|
133
163
|
variant?: ButtonVariant;
|
|
134
164
|
size?: ButtonSize;
|
|
135
165
|
isLoading?: boolean;
|
|
@@ -137,49 +167,52 @@ declare interface ButtonProps extends default_2.ButtonHTMLAttributes<HTMLButtonE
|
|
|
137
167
|
|
|
138
168
|
declare type ButtonSize = 'sm' | 'md' | 'lg';
|
|
139
169
|
|
|
140
|
-
|
|
141
|
-
color?: ColorKey;
|
|
142
|
-
variant?: Variant;
|
|
143
|
-
}>;
|
|
170
|
+
declare type ButtonVariant = 'primary' | 'secondary' | 'cancel' | 'outline';
|
|
144
171
|
|
|
145
|
-
declare
|
|
172
|
+
export declare const Card: ({ variant, size, disabled, onClick, children, ...props }: CardProps) => JSX.Element;
|
|
146
173
|
|
|
147
|
-
export declare const
|
|
174
|
+
export declare const CardBody: ({ children, showDivider, ...props }: CardBodyProps) => JSX.Element;
|
|
148
175
|
|
|
149
|
-
|
|
176
|
+
declare interface CardBodyProps extends HTMLAttributes<HTMLDivElement> {
|
|
177
|
+
showDivider?: boolean;
|
|
178
|
+
}
|
|
150
179
|
|
|
151
|
-
export declare const CardFooter:
|
|
180
|
+
export declare const CardFooter: ({ children, ...props }: HTMLAttributes<HTMLDivElement>) => JSX.Element;
|
|
152
181
|
|
|
153
|
-
export declare const CardHeader:
|
|
182
|
+
export declare const CardHeader: ({ children, showDivider, ...props }: CardHeaderProps) => JSX.Element;
|
|
183
|
+
|
|
184
|
+
declare interface CardHeaderProps extends HTMLAttributes<HTMLDivElement> {
|
|
185
|
+
showDivider?: boolean;
|
|
186
|
+
}
|
|
154
187
|
|
|
155
|
-
export declare interface CardProps extends
|
|
188
|
+
export declare interface CardProps extends HTMLAttributes<HTMLDivElement> {
|
|
156
189
|
variant?: CardVariant;
|
|
157
190
|
size?: CardSize;
|
|
158
191
|
disabled?: boolean;
|
|
159
192
|
}
|
|
160
193
|
|
|
161
|
-
declare type CardSize = 'sm' | 'md' | 'lg';
|
|
194
|
+
export declare type CardSize = 'sm' | 'md' | 'lg';
|
|
162
195
|
|
|
163
|
-
declare type CardVariant = 'elevated' | 'flat' | 'info';
|
|
196
|
+
export declare type CardVariant = 'elevated' | 'flat' | 'info';
|
|
164
197
|
|
|
165
198
|
export declare const Checkbox: ForwardRefExoticComponent<CheckboxProps & RefAttributes<HTMLInputElement>>;
|
|
166
199
|
|
|
167
|
-
export declare const CheckboxInput:
|
|
200
|
+
export declare const CheckboxInput: ForwardRefExoticComponent<CheckboxInputProps & RefAttributes<HTMLInputElement>>;
|
|
168
201
|
|
|
169
|
-
declare interface CheckboxInputProps extends Omit<
|
|
202
|
+
declare interface CheckboxInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
170
203
|
size?: FormFieldSize;
|
|
171
204
|
hasError?: boolean;
|
|
172
205
|
indeterminate?: boolean;
|
|
173
206
|
checkboxClassName?: string;
|
|
174
207
|
}
|
|
175
208
|
|
|
176
|
-
export declare const CheckboxLabel:
|
|
209
|
+
export declare const CheckboxLabel: ({ children, size, disabled, htmlFor, onLabelClick, className, onClick, ...props }: CheckboxLabelProps) => JSX.Element;
|
|
177
210
|
|
|
178
211
|
declare interface CheckboxLabelProps extends BaseLabelProps {
|
|
179
212
|
onLabelClick?: () => void;
|
|
180
213
|
}
|
|
181
214
|
|
|
182
|
-
export declare interface CheckboxProps extends Omit<
|
|
215
|
+
export declare interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
183
216
|
size?: FormFieldSize;
|
|
184
217
|
label?: string;
|
|
185
218
|
hasError?: boolean;
|
|
@@ -234,36 +267,79 @@ export declare const createInputRefs: (length: number) => InputRef[];
|
|
|
234
267
|
*/
|
|
235
268
|
export declare function deleteCookie(name: string): void;
|
|
236
269
|
|
|
237
|
-
|
|
270
|
+
/**
|
|
271
|
+
* Dialog component for displaying modal dialogs.
|
|
272
|
+
* @params props - DialogProps
|
|
273
|
+
* @return JSX.Element
|
|
274
|
+
*/
|
|
275
|
+
export declare const Dialog: ({ isOpen, onClose, children, className, closeOnBackdropClick, showCloseButton, size, fullScreen, closeOnEsc, ariaLabel, ariaLabelledBy, ariaDescribedBy, }: DialogProps) => JSX.Element;
|
|
238
276
|
|
|
239
|
-
|
|
277
|
+
/**
|
|
278
|
+
* DialogBody component for displaying the main content of a dialog.
|
|
279
|
+
* @params props - DialogBodyProps
|
|
280
|
+
* @return JSX.Element
|
|
281
|
+
*/
|
|
282
|
+
export declare const DialogBody: ({ children, padded, showTopDivider, showBottomDivider, className, ...props }: DialogBodyProps) => JSX.Element;
|
|
240
283
|
|
|
241
|
-
|
|
284
|
+
/**
|
|
285
|
+
* Props for the DialogBody component.
|
|
286
|
+
* @param padded: Whether to apply padding to the body content.
|
|
287
|
+
* @param showTopDivider: Whether to show a divider at the top of the body.
|
|
288
|
+
* @param showBottomDivider: Whether to show a divider at the bottom of the body.
|
|
289
|
+
*/
|
|
290
|
+
export declare interface DialogBodyProps extends HTMLAttributes<HTMLDivElement> {
|
|
242
291
|
padded?: boolean;
|
|
243
292
|
showTopDivider?: boolean;
|
|
244
293
|
showBottomDivider?: boolean;
|
|
245
294
|
}
|
|
246
295
|
|
|
247
|
-
|
|
296
|
+
/**
|
|
297
|
+
* DialogFooter component for displaying footer content in a dialog.
|
|
298
|
+
* @params props - DialogFooterProps
|
|
299
|
+
* @return JSX.Element
|
|
300
|
+
*/
|
|
301
|
+
export declare const DialogFooter: ({ align, showDivider, gap, sticky, children, className, ...props }: DialogFooterProps) => JSX.Element;
|
|
248
302
|
|
|
249
|
-
|
|
303
|
+
/**
|
|
304
|
+
* Props for the DialogFooter component.
|
|
305
|
+
* @param align: Alignment of the footer content.
|
|
306
|
+
* @param showDivider: Whether to show a divider at the top of the footer.
|
|
307
|
+
* @param gap: Gap between footer items in pixels.
|
|
308
|
+
* @param sticky: Whether the footer should be sticky at the bottom.
|
|
309
|
+
*/
|
|
310
|
+
export declare interface DialogFooterProps extends HTMLAttributes<HTMLDivElement> {
|
|
250
311
|
align?: 'start' | 'center' | 'end' | 'space-between';
|
|
251
312
|
showDivider?: boolean;
|
|
252
313
|
gap?: number;
|
|
253
314
|
sticky?: boolean;
|
|
254
315
|
}
|
|
255
316
|
|
|
256
|
-
export declare const DialogHeader:
|
|
317
|
+
export declare const DialogHeader: ({ showDivider, variant, children, className, ...props }: DialogHeaderProps) => JSX.Element;
|
|
257
318
|
|
|
258
|
-
declare interface DialogHeaderProps extends
|
|
319
|
+
export declare interface DialogHeaderProps extends HTMLAttributes<HTMLDivElement> {
|
|
259
320
|
showDivider?: boolean;
|
|
260
321
|
variant?: 'default' | 'compact';
|
|
261
322
|
}
|
|
262
323
|
|
|
263
|
-
|
|
324
|
+
/**
|
|
325
|
+
* 'Props for the Dialog component.
|
|
326
|
+
* @param isOpen: Whether the dialog is open.
|
|
327
|
+
* @param onClose: Callback function to close the dialog.
|
|
328
|
+
* @param children: Content of the dialog.
|
|
329
|
+
* @param className: Optional additional class name for styling.
|
|
330
|
+
* @param closeOnBackdropClick: Whether clicking the backdrop closes the dialog.
|
|
331
|
+
* @param showCloseButton: Whether to show a close button in the dialog.
|
|
332
|
+
* @param size: Size of the dialog ('sm', 'md', 'lg').
|
|
333
|
+
* @param fullScreen: Whether the dialog should be full screen.
|
|
334
|
+
* @param closeOnEsc: Whether pressing the Escape key closes the dialog.
|
|
335
|
+
* @param ariaLabel: ARIA label for accessibility.
|
|
336
|
+
* @param ariaLabelledBy: ID of the element that labels the dialog for accessibility.
|
|
337
|
+
* @param ariaDescribedBy: ID of the element that describes the dialog for accessibility.
|
|
338
|
+
*/
|
|
339
|
+
export declare interface DialogProps {
|
|
264
340
|
isOpen: boolean;
|
|
265
341
|
onClose: () => void;
|
|
266
|
-
children:
|
|
342
|
+
children: ReactNode;
|
|
267
343
|
className?: string;
|
|
268
344
|
closeOnBackdropClick?: boolean;
|
|
269
345
|
showCloseButton?: boolean;
|
|
@@ -282,7 +358,7 @@ export declare const disabledStyles: RuleSet<object>;
|
|
|
282
358
|
* @param param0 - Props for the Divider component.
|
|
283
359
|
* @returns The Divider component.
|
|
284
360
|
*/
|
|
285
|
-
export declare const Divider:
|
|
361
|
+
export declare const Divider: ({ orientation, color, length, thickness, className, }: DividerProps) => JSX.Element;
|
|
286
362
|
|
|
287
363
|
/**
|
|
288
364
|
* Divider component to separate content either horizontally or vertically.
|
|
@@ -300,9 +376,9 @@ export declare interface DividerProps {
|
|
|
300
376
|
className?: string;
|
|
301
377
|
}
|
|
302
378
|
|
|
303
|
-
export declare const ErrorMessage:
|
|
379
|
+
export declare const ErrorMessage: ({ children, className, size, ...props }: ErrorMessageProps) => JSX.Element;
|
|
304
380
|
|
|
305
|
-
declare interface ErrorMessageProps extends
|
|
381
|
+
declare interface ErrorMessageProps extends HTMLAttributes<HTMLDivElement> {
|
|
306
382
|
size?: ErrorMessageSize;
|
|
307
383
|
className?: string;
|
|
308
384
|
}
|
|
@@ -343,15 +419,67 @@ export declare interface FieldConfig {
|
|
|
343
419
|
messageErrorClassName?: string;
|
|
344
420
|
}
|
|
345
421
|
|
|
422
|
+
declare type FieldType = 'text' | 'email' | 'password' | 'number' | 'tel' | 'url' | 'date' | 'datetime-local' | 'time' | 'search' | 'textarea' | 'select' | 'checkbox' | 'radio' | 'pin';
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
*
|
|
426
|
+
* @param files - Array of files to display
|
|
427
|
+
* @param onRemove - Callback fired when a file is removed
|
|
428
|
+
* @param disabled - Whether the component is disabled
|
|
429
|
+
* @returns FileList component
|
|
430
|
+
*/
|
|
431
|
+
declare const FileList_2: ({ files, onRemove, disabled }: FileListProps) => JSX.Element | null;
|
|
432
|
+
export { FileList_2 as FileList }
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* Props for the FileList component
|
|
436
|
+
* @param files - Array of files to display
|
|
437
|
+
* @param onRemove - Callback fired when a file is removed
|
|
438
|
+
* @param disabled - Whether the component is disabled
|
|
439
|
+
*/
|
|
440
|
+
declare interface FileListProps {
|
|
441
|
+
files: File[];
|
|
442
|
+
onRemove: (index: number) => void;
|
|
443
|
+
disabled?: boolean;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* FileUpload component that supports both controlled and unc *
|
|
448
|
+
* Controlled mode: Provide `value` prop and handle `onChange`
|
|
449
|
+
* Uncontrolled mode: Optionally provide `defaultValue` for initial files
|
|
450
|
+
*/
|
|
451
|
+
export declare const FileUpload: ({ variant, multiple, maxFileSize, accept, helperText, value, defaultValue, onChange, onError, onFileRemove, disabled, hasError, errorMessage, className, dropZoneContainerClassName, size, }: FileUploadProps) => JSX.Element;
|
|
452
|
+
|
|
453
|
+
export declare interface FileUploadProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'onChange' | 'value' | 'defaultValue' | 'onError'> {
|
|
454
|
+
variant?: FileUploadVariant;
|
|
455
|
+
size?: FormFieldSize;
|
|
456
|
+
multiple?: boolean;
|
|
457
|
+
maxFileSize?: number;
|
|
458
|
+
accept?: string;
|
|
459
|
+
helperText?: string;
|
|
460
|
+
value?: File[];
|
|
461
|
+
defaultValue?: File[];
|
|
462
|
+
onChange?: (files: File[], event?: Event) => void;
|
|
463
|
+
onError?: (error: string) => void;
|
|
464
|
+
onFileRemove?: (file: File, index: number) => void;
|
|
465
|
+
disabled?: boolean;
|
|
466
|
+
hasError?: boolean;
|
|
467
|
+
errorMessage?: string;
|
|
468
|
+
className?: string;
|
|
469
|
+
dropZoneContainerClassName?: string;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
export declare type FileUploadVariant = 'default' | 'compact';
|
|
473
|
+
|
|
346
474
|
export declare const flushedStyles: RuleSet<object>;
|
|
347
475
|
|
|
348
|
-
export declare const FormField:
|
|
476
|
+
export declare const FormField: ({ id, name, label, type, size, placeholder, disabled, required, options, checkboxLabel, radioName, pinLength, pinType, rows, className, inputClassName, labelClassName, messageErrorClassName, leftIcon, rightIcon, iconSize, iconColor, onOptionSelect, onRadioChange, onPinComplete, onChange, ...props }: FormFieldComponentProps) => JSX.Element;
|
|
349
477
|
|
|
350
478
|
export declare interface FormFieldComponentProps extends WithIconsProps {
|
|
351
479
|
id?: string | number;
|
|
352
480
|
name: string;
|
|
353
481
|
label?: string;
|
|
354
|
-
type?:
|
|
482
|
+
type?: FieldType;
|
|
355
483
|
size?: FormFieldSize;
|
|
356
484
|
placeholder?: string;
|
|
357
485
|
disabled?: boolean;
|
|
@@ -360,19 +488,19 @@ export declare interface FormFieldComponentProps extends WithIconsProps {
|
|
|
360
488
|
value: string | number;
|
|
361
489
|
label: string;
|
|
362
490
|
}>;
|
|
363
|
-
checkboxValue?: boolean;
|
|
364
491
|
checkboxLabel?: string;
|
|
365
492
|
radioName?: string;
|
|
366
493
|
pinLength?: number;
|
|
367
494
|
pinType?: 'text' | 'number';
|
|
495
|
+
rows?: number;
|
|
368
496
|
className?: string;
|
|
369
497
|
inputClassName?: string;
|
|
370
498
|
labelClassName?: string;
|
|
371
499
|
messageErrorClassName?: string;
|
|
372
500
|
onOptionSelect?: (option: SelectOption) => void;
|
|
373
|
-
onRadioChange?: (event:
|
|
501
|
+
onRadioChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
374
502
|
onPinComplete?: (value: string) => void;
|
|
375
|
-
onChange?: (event:
|
|
503
|
+
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
376
504
|
[key: string]: any;
|
|
377
505
|
}
|
|
378
506
|
|
|
@@ -387,12 +515,6 @@ export declare type FormFieldSize = 'sm' | 'md' | 'lg';
|
|
|
387
515
|
|
|
388
516
|
export declare type FormFieldState = 'default' | 'hover' | 'focus' | 'error' | 'disabled';
|
|
389
517
|
|
|
390
|
-
export declare const FullScreenSpinner: default_2.FC<{
|
|
391
|
-
message?: string;
|
|
392
|
-
color?: ColorKey;
|
|
393
|
-
variant?: Variant;
|
|
394
|
-
}>;
|
|
395
|
-
|
|
396
518
|
/**
|
|
397
519
|
* Retrieves the value of a cookie by name
|
|
398
520
|
* @param name - The name of the cookie to retrieve
|
|
@@ -437,7 +559,7 @@ export declare const getPropsForInputType: (type: string | null | undefined, bas
|
|
|
437
559
|
* />
|
|
438
560
|
* ```
|
|
439
561
|
*/
|
|
440
|
-
export declare const handleDigitChange: (e:
|
|
562
|
+
export declare const handleDigitChange: (e: ChangeEvent<HTMLInputElement>, index: number, digits: string[], setDigits: SetDigits, inputRefs: InputRefs, length: number, type?: "text" | "number", onChange?: (value: string) => void, onComplete?: (value: string) => void) => void;
|
|
441
563
|
|
|
442
564
|
/**
|
|
443
565
|
* Handles keyboard navigation in verification code input fields.
|
|
@@ -461,7 +583,7 @@ export declare const handleDigitChange: (e: default_2.ChangeEvent<HTMLInputEleme
|
|
|
461
583
|
* />
|
|
462
584
|
* ```
|
|
463
585
|
*/
|
|
464
|
-
export declare const handleKeyDown: (e:
|
|
586
|
+
export declare const handleKeyDown: (e: KeyboardEvent_2<HTMLInputElement>, index: number, digits: string[], inputRefs: InputRefs, setDigits: SetDigits, onChange?: (value: string) => void) => void;
|
|
465
587
|
|
|
466
588
|
/**
|
|
467
589
|
* Handles paste operations for verification code input fields.
|
|
@@ -497,7 +619,7 @@ export declare const handleKeyDown: (e: default_2.KeyboardEvent<HTMLInputElement
|
|
|
497
619
|
* />
|
|
498
620
|
* ```
|
|
499
621
|
*/
|
|
500
|
-
export declare const handlePaste: (e:
|
|
622
|
+
export declare const handlePaste: (e: ClipboardEvent_2<HTMLInputElement>, index: number, digits: string[], setDigits: SetDigits, inputRefs: InputRefs, length: number, type?: "text" | "number", onChange?: (value: string) => void, onComplete?: (value: string) => void) => void;
|
|
501
623
|
|
|
502
624
|
/**
|
|
503
625
|
* Tipo helper para determinar si un componente tiene iconos
|
|
@@ -525,9 +647,12 @@ export declare const hasPermission: (userRoles?: string[], permissions?: string[
|
|
|
525
647
|
* Displays notifications, user profile, and optional children.
|
|
526
648
|
*
|
|
527
649
|
* @param {HeaderProps} props - Header component props.
|
|
528
|
-
* @returns
|
|
650
|
+
* @returns JSX.Element The rendered header.
|
|
529
651
|
*/
|
|
530
|
-
export declare const Header:
|
|
652
|
+
export declare const Header: {
|
|
653
|
+
({ user, hasNotifications, notificationCount, onNotificationClick, onUserProfileClick, onLogout, userMenuItems, children, }: HeaderProps): JSX.Element;
|
|
654
|
+
displayName: string;
|
|
655
|
+
};
|
|
531
656
|
|
|
532
657
|
/**
|
|
533
658
|
* Props for the Header component.
|
|
@@ -540,7 +665,7 @@ export declare const Header: default_2.FC<HeaderProps>;
|
|
|
540
665
|
* @param userMenuItems: Additional menu items for the user dropdown.
|
|
541
666
|
* @param children: Any additional elements to render in the left section.
|
|
542
667
|
*/
|
|
543
|
-
declare interface HeaderProps {
|
|
668
|
+
export declare interface HeaderProps {
|
|
544
669
|
user?: User;
|
|
545
670
|
hasNotifications?: boolean;
|
|
546
671
|
notificationCount?: number;
|
|
@@ -548,7 +673,7 @@ declare interface HeaderProps {
|
|
|
548
673
|
onUserProfileClick?: () => void;
|
|
549
674
|
onLogout?: () => void;
|
|
550
675
|
userMenuItems?: UserMenuItem[];
|
|
551
|
-
children?:
|
|
676
|
+
children?: ReactNode;
|
|
552
677
|
}
|
|
553
678
|
|
|
554
679
|
export declare const HeadingBold: IStyledComponentBase<"web", Substitute<DetailedHTMLProps<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, {
|
|
@@ -581,10 +706,10 @@ export declare const headingRegularStyles: {
|
|
|
581
706
|
16: RuleSet<object>;
|
|
582
707
|
};
|
|
583
708
|
|
|
584
|
-
export declare const Icon:
|
|
709
|
+
export declare const Icon: ({ component: Component, size, color, className, iconProps, }: IconProps) => JSX.Element;
|
|
585
710
|
|
|
586
711
|
declare interface IconProps {
|
|
587
|
-
component:
|
|
712
|
+
component: ReactNode | RemixiconComponentType;
|
|
588
713
|
size?: IconSizes | string | number;
|
|
589
714
|
color?: string;
|
|
590
715
|
className?: string;
|
|
@@ -600,7 +725,7 @@ export declare const IconWrapperStyles: RuleSet<object>;
|
|
|
600
725
|
* @param param0 - Props for the InfoLabel component.
|
|
601
726
|
* @returns The InfoLabel component.
|
|
602
727
|
*/
|
|
603
|
-
export declare const InfoLabel:
|
|
728
|
+
export declare const InfoLabel: ({ children, size, color, className, style }: InfoLabelProps) => JSX.Element;
|
|
604
729
|
|
|
605
730
|
/**
|
|
606
731
|
* Props for the InfoLabel component
|
|
@@ -614,8 +739,8 @@ export declare interface InfoLabelProps {
|
|
|
614
739
|
size?: keyof typeof bodyTextStyles;
|
|
615
740
|
color?: string;
|
|
616
741
|
className?: string;
|
|
617
|
-
style?:
|
|
618
|
-
children:
|
|
742
|
+
style?: CSSProperties;
|
|
743
|
+
children: ReactNode;
|
|
619
744
|
}
|
|
620
745
|
|
|
621
746
|
/**
|
|
@@ -631,7 +756,7 @@ export declare interface InputComponentProps {
|
|
|
631
756
|
size: FormFieldSize;
|
|
632
757
|
placeholder?: string;
|
|
633
758
|
type?: string;
|
|
634
|
-
onChange?: (event:
|
|
759
|
+
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
635
760
|
[key: string]: any;
|
|
636
761
|
}
|
|
637
762
|
|
|
@@ -649,9 +774,9 @@ export declare interface InputComponentProps {
|
|
|
649
774
|
*
|
|
650
775
|
* Used by: PinInputGroup component for PIN/verification code workflows
|
|
651
776
|
*/
|
|
652
|
-
export declare type InputRef =
|
|
777
|
+
export declare type InputRef = RefObject<HTMLInputElement | null>;
|
|
653
778
|
|
|
654
|
-
export declare type InputRefs =
|
|
779
|
+
export declare type InputRefs = RefObject<HTMLInputElement | null>[];
|
|
655
780
|
|
|
656
781
|
/**
|
|
657
782
|
* Interfaz específica para componentes de input que necesitan iconos
|
|
@@ -667,7 +792,7 @@ export declare interface InputWithIconsProps extends WithIconsProps {
|
|
|
667
792
|
*/
|
|
668
793
|
export declare const isAllowedInputType: (t: string) => t is AllowedInputType;
|
|
669
794
|
|
|
670
|
-
export declare const Label:
|
|
795
|
+
export declare const Label: ({ children, htmlFor, className, required, disabled, size, ...props }: BaseLabelProps) => JSX.Element;
|
|
671
796
|
|
|
672
797
|
export declare type LabelSize = 'sm' | 'md' | 'lg';
|
|
673
798
|
|
|
@@ -676,7 +801,24 @@ export declare type LabelSize = 'sm' | 'md' | 'lg';
|
|
|
676
801
|
* Wraps the layout in a SidebarProvider context.
|
|
677
802
|
* @param props - Layout properties
|
|
678
803
|
*/
|
|
679
|
-
export declare const Layout:
|
|
804
|
+
export declare const Layout: (props: LayoutProps) => JSX.Element;
|
|
805
|
+
|
|
806
|
+
/**
|
|
807
|
+
* LayoutMainContent component for the layout.
|
|
808
|
+
* Provides the main content area with responsive spacing and scrolling.
|
|
809
|
+
*/
|
|
810
|
+
export declare const LayoutMainContent: {
|
|
811
|
+
({ children, className }: LayoutMainContentProps): JSX.Element;
|
|
812
|
+
displayName: string;
|
|
813
|
+
};
|
|
814
|
+
|
|
815
|
+
/**
|
|
816
|
+
* Props for the LayoutMainContent component.
|
|
817
|
+
*/
|
|
818
|
+
export declare interface LayoutMainContentProps {
|
|
819
|
+
children: ReactNode;
|
|
820
|
+
className?: string;
|
|
821
|
+
}
|
|
680
822
|
|
|
681
823
|
/**
|
|
682
824
|
* Props for the Layout component.
|
|
@@ -692,7 +834,7 @@ export declare const Layout: default_2.FC<LayoutProps>;
|
|
|
692
834
|
* @contentClassName - Optional class name for main content area.
|
|
693
835
|
*/
|
|
694
836
|
export declare interface LayoutProps extends SidebarProps {
|
|
695
|
-
children:
|
|
837
|
+
children: ReactNode;
|
|
696
838
|
user?: User;
|
|
697
839
|
hasNotifications?: boolean;
|
|
698
840
|
notificationCount?: number;
|
|
@@ -711,7 +853,7 @@ export declare interface LayoutProps extends SidebarProps {
|
|
|
711
853
|
* @param ref - Ref to the anchor element
|
|
712
854
|
* @return JSX.Element
|
|
713
855
|
*/
|
|
714
|
-
export declare const Link:
|
|
856
|
+
export declare const Link: ForwardRefExoticComponent<LinkProps & RefAttributes<HTMLAnchorElement>>;
|
|
715
857
|
|
|
716
858
|
/**
|
|
717
859
|
* CSS styles applied when the Link is disabled.
|
|
@@ -797,7 +939,7 @@ export declare const Nav: IStyledComponentBase<"web", FastOmit<DetailedHTMLProps
|
|
|
797
939
|
export declare interface NavigationItem {
|
|
798
940
|
id: string;
|
|
799
941
|
label: string;
|
|
800
|
-
icon?:
|
|
942
|
+
icon?: ReactNode | RemixiconComponentType;
|
|
801
943
|
iconSize?: IconSizes | string | number;
|
|
802
944
|
iconColor?: string;
|
|
803
945
|
href?: string;
|
|
@@ -823,6 +965,24 @@ export declare const normalizeSelectOptions: (options: Array<{
|
|
|
823
965
|
label: string;
|
|
824
966
|
}> | SelectOption[]) => SelectOption[];
|
|
825
967
|
|
|
968
|
+
/**
|
|
969
|
+
* NotificationButton component with badge and count display.
|
|
970
|
+
* Handles notification state and provides accessible interaction.
|
|
971
|
+
*/
|
|
972
|
+
export declare const NotificationButton: {
|
|
973
|
+
({ hasNotifications, notificationCount, onNotificationClick, }: NotificationButtonProps): JSX.Element;
|
|
974
|
+
displayName: string;
|
|
975
|
+
};
|
|
976
|
+
|
|
977
|
+
/**
|
|
978
|
+
* Props for the NotificationButton component.
|
|
979
|
+
*/
|
|
980
|
+
export declare interface NotificationButtonProps {
|
|
981
|
+
hasNotifications?: boolean;
|
|
982
|
+
notificationCount?: number;
|
|
983
|
+
onNotificationClick?: () => void;
|
|
984
|
+
}
|
|
985
|
+
|
|
826
986
|
/**
|
|
827
987
|
* Overlay component for mobile sidebar.
|
|
828
988
|
*/
|
|
@@ -848,7 +1008,7 @@ export declare const overlayAnimation: {
|
|
|
848
1008
|
};
|
|
849
1009
|
};
|
|
850
1010
|
|
|
851
|
-
export declare const PasswordInput:
|
|
1011
|
+
export declare const PasswordInput: ({ size, leftIcon, iconSize, iconColor, placeholder, hasError, disabled, className, ...props }: PasswordInputProps) => JSX.Element;
|
|
852
1012
|
|
|
853
1013
|
export declare interface PasswordInputProps extends BaseFormFieldProps, Omit<WithIconsProps, 'rightIcon'> {
|
|
854
1014
|
}
|
|
@@ -857,7 +1017,10 @@ export declare type Permission = string;
|
|
|
857
1017
|
|
|
858
1018
|
export declare const PinInput: ForwardRefExoticComponent<PinInputProps & RefAttributes<HTMLInputElement>>;
|
|
859
1019
|
|
|
860
|
-
export declare const PinInputGroup:
|
|
1020
|
+
export declare const PinInputGroup: {
|
|
1021
|
+
({ length, size, variant, hasError, type, onChange, onComplete, className, pinInputClassName, }: PinInputGroupProps): JSX.Element;
|
|
1022
|
+
displayName: string;
|
|
1023
|
+
};
|
|
861
1024
|
|
|
862
1025
|
export declare interface PinInputGroupProps {
|
|
863
1026
|
length?: number;
|
|
@@ -883,17 +1046,20 @@ export declare interface PinSpecificProps {
|
|
|
883
1046
|
|
|
884
1047
|
export declare const RadioInput: ForwardRefExoticComponent<RadioInputProps & RefAttributes<HTMLInputElement>>;
|
|
885
1048
|
|
|
886
|
-
export declare const RadioInputDot:
|
|
1049
|
+
export declare const RadioInputDot: ForwardRefExoticComponent<RadioInputDotProps & RefAttributes<HTMLInputElement>>;
|
|
887
1050
|
|
|
888
|
-
declare interface RadioInputDotProps extends Omit<
|
|
1051
|
+
declare interface RadioInputDotProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'> {
|
|
889
1052
|
size?: FormFieldSize;
|
|
890
1053
|
hasError?: boolean;
|
|
891
1054
|
dotClassName?: string;
|
|
892
1055
|
}
|
|
893
1056
|
|
|
894
|
-
export declare const RadioInputLabel:
|
|
1057
|
+
export declare const RadioInputLabel: {
|
|
1058
|
+
({ children, htmlFor, className, disabled, size, ...props }: BaseLabelProps): JSX.Element;
|
|
1059
|
+
displayName: string;
|
|
1060
|
+
};
|
|
895
1061
|
|
|
896
|
-
export declare interface RadioInputProps extends Omit<
|
|
1062
|
+
export declare interface RadioInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'> {
|
|
897
1063
|
size?: FormFieldSize;
|
|
898
1064
|
label?: string;
|
|
899
1065
|
hasError?: boolean;
|
|
@@ -907,10 +1073,10 @@ export declare interface RadioSpecificProps {
|
|
|
907
1073
|
label: string;
|
|
908
1074
|
}>;
|
|
909
1075
|
radioName?: string;
|
|
910
|
-
onRadioChange?: (event:
|
|
1076
|
+
onRadioChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
911
1077
|
}
|
|
912
1078
|
|
|
913
|
-
export declare const SearchInput:
|
|
1079
|
+
export declare const SearchInput: ({ size, leftIcon, rightIcon, iconSize, iconColor, placeholder, onSearch, className, ...props }: SearchInputProps) => JSX.Element;
|
|
914
1080
|
|
|
915
1081
|
export declare interface SearchInputProps extends BaseInputProps {
|
|
916
1082
|
size?: FormFieldSize;
|
|
@@ -923,15 +1089,9 @@ export declare interface SearchSpecificProps {
|
|
|
923
1089
|
onSearch?: (value: string) => void;
|
|
924
1090
|
}
|
|
925
1091
|
|
|
926
|
-
export declare const
|
|
927
|
-
message?: string;
|
|
928
|
-
color?: ColorKey;
|
|
929
|
-
variant?: Variant;
|
|
930
|
-
}>;
|
|
931
|
-
|
|
932
|
-
export declare const SelectInput: default_2.ForwardRefExoticComponent<SelectInputProps & default_2.RefAttributes<HTMLButtonElement>>;
|
|
1092
|
+
export declare const SelectInput: ForwardRefExoticComponent<SelectInputProps & RefAttributes<HTMLButtonElement>>;
|
|
933
1093
|
|
|
934
|
-
export declare interface SelectInputProps extends Omit<
|
|
1094
|
+
export declare interface SelectInputProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, 'size'> {
|
|
935
1095
|
size?: FormFieldSize;
|
|
936
1096
|
hasError?: boolean;
|
|
937
1097
|
disabled?: boolean;
|
|
@@ -966,7 +1126,7 @@ export declare interface SelectSpecificProps {
|
|
|
966
1126
|
*/
|
|
967
1127
|
export declare function setCookie(name: string, value: string, days?: number): void;
|
|
968
1128
|
|
|
969
|
-
export declare type SetDigits =
|
|
1129
|
+
export declare type SetDigits = Dispatch<SetStateAction<string[]>>;
|
|
970
1130
|
|
|
971
1131
|
/**
|
|
972
1132
|
* Sidebar component for navigation.
|
|
@@ -976,7 +1136,10 @@ export declare type SetDigits = default_2.Dispatch<default_2.SetStateAction<stri
|
|
|
976
1136
|
* @param logoImgExpanded - Logo when sidebar is expanded.
|
|
977
1137
|
* @param logoImgCollapsed - Logo when sidebar is collapsed.
|
|
978
1138
|
*/
|
|
979
|
-
export declare const Sidebar:
|
|
1139
|
+
export declare const Sidebar: {
|
|
1140
|
+
({ navigationConfig, userRoles, activePath, logoImgExpanded, logoImgCollapsed, onNavigate, }: SidebarProps): JSX.Element;
|
|
1141
|
+
displayName: string;
|
|
1142
|
+
};
|
|
980
1143
|
|
|
981
1144
|
export declare const SidebarContext: Context<SidebarContextValue | undefined>;
|
|
982
1145
|
|
|
@@ -1016,13 +1179,23 @@ export declare interface SidebarProps {
|
|
|
1016
1179
|
navigationConfig: NavigationItem[];
|
|
1017
1180
|
userRoles?: string[];
|
|
1018
1181
|
activePath?: string;
|
|
1019
|
-
logoImgExpanded?:
|
|
1020
|
-
logoImgCollapsed?:
|
|
1182
|
+
logoImgExpanded?: ReactNode;
|
|
1183
|
+
logoImgCollapsed?: ReactNode;
|
|
1021
1184
|
onNavigate?: (href: string) => void;
|
|
1022
1185
|
}
|
|
1023
1186
|
|
|
1024
1187
|
export declare const SidebarProvider: ({ children }: PropsWithChildren) => JSX.Element;
|
|
1025
1188
|
|
|
1189
|
+
/**
|
|
1190
|
+
* Size options for the Spinner component.
|
|
1191
|
+
* typedef {('sm' | 'md' | 'lg' | 'xl')} Size
|
|
1192
|
+
*
|
|
1193
|
+
* Color key options for the Spinner component.
|
|
1194
|
+
* typedef {('primary' | 'orange' | 'white' | 'gray')} ColorKey
|
|
1195
|
+
*
|
|
1196
|
+
* Animation variant options for the Spinner component.
|
|
1197
|
+
* typedef {('rotate' | 'sweep')} Variant
|
|
1198
|
+
*/
|
|
1026
1199
|
declare type Size = 'sm' | 'md' | 'lg' | 'xl';
|
|
1027
1200
|
|
|
1028
1201
|
export declare const sizeStyles: {
|
|
@@ -1153,16 +1326,13 @@ export declare interface SortState {
|
|
|
1153
1326
|
direction: SortDirection;
|
|
1154
1327
|
}
|
|
1155
1328
|
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
title?: string;
|
|
1164
|
-
variant?: Variant;
|
|
1165
|
-
}
|
|
1329
|
+
/**
|
|
1330
|
+
* Spinner Component
|
|
1331
|
+
* Renders a customizable spinner with optional message and centering.
|
|
1332
|
+
* @param {BaseSpinnerProps} props - Props for the Spinner component see in Spinner.types.ts .
|
|
1333
|
+
* @returns JSX.Element The rendered Spinner component.
|
|
1334
|
+
*/
|
|
1335
|
+
export declare const Spinner: ({ size, color, centered, message, title, variant, }: BaseSpinnerProps) => JSX.Element;
|
|
1166
1336
|
|
|
1167
1337
|
/**
|
|
1168
1338
|
* Represents a single step in the Stepper.
|
|
@@ -1170,14 +1340,14 @@ declare interface SpinnerProps {
|
|
|
1170
1340
|
export declare interface Step {
|
|
1171
1341
|
id: string | number;
|
|
1172
1342
|
label?: string;
|
|
1173
|
-
content?:
|
|
1343
|
+
content?: ReactNode | string;
|
|
1174
1344
|
}
|
|
1175
1345
|
|
|
1176
1346
|
/**
|
|
1177
1347
|
* Stepper component for displaying multi-step navigation UI.
|
|
1178
1348
|
* Simple and functional with hover labels.
|
|
1179
1349
|
*/
|
|
1180
|
-
export declare const Stepper:
|
|
1350
|
+
export declare const Stepper: ({ steps, currentStep, orientation, size, onStepClick, className, }: StepperProps) => JSX.Element;
|
|
1181
1351
|
|
|
1182
1352
|
/**
|
|
1183
1353
|
* Orientation options for the Stepper component.
|
|
@@ -1345,7 +1515,7 @@ export declare const tableVariants: {
|
|
|
1345
1515
|
striped: RuleSet<object>;
|
|
1346
1516
|
};
|
|
1347
1517
|
|
|
1348
|
-
export declare const TermsAndConditions:
|
|
1518
|
+
export declare const TermsAndConditions: ({ isOpen, onAccept, onCancel, title, subtitle, content, bodyFooter, confirmationLabel, acceptLabel, cancelLabel, size, fullScreen, showCloseButton, closeOnBackdropClick, containerClassName, headerClassName, bodyClassName, footerClassName, initiallyConfirmed, onConfirmChange, }: TermsAndConditionsProps) => JSX.Element;
|
|
1349
1519
|
|
|
1350
1520
|
export declare interface TermsAndConditionsProps {
|
|
1351
1521
|
isOpen: boolean;
|
|
@@ -1353,8 +1523,8 @@ export declare interface TermsAndConditionsProps {
|
|
|
1353
1523
|
onCancel: () => void;
|
|
1354
1524
|
title: string;
|
|
1355
1525
|
subtitle?: string;
|
|
1356
|
-
content:
|
|
1357
|
-
bodyFooter?:
|
|
1526
|
+
content: ReactNode;
|
|
1527
|
+
bodyFooter?: ReactNode;
|
|
1358
1528
|
confirmationLabel?: string;
|
|
1359
1529
|
acceptLabel?: string;
|
|
1360
1530
|
cancelLabel?: string;
|
|
@@ -1378,7 +1548,7 @@ export { Text_2 as Text }
|
|
|
1378
1548
|
|
|
1379
1549
|
export declare const TextAreaInput: ForwardRefExoticComponent<TextAreaInputProps & RefAttributes<HTMLTextAreaElement>>;
|
|
1380
1550
|
|
|
1381
|
-
export declare interface TextAreaInputProps extends Omit<
|
|
1551
|
+
export declare interface TextAreaInputProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'size'> {
|
|
1382
1552
|
size?: FormFieldSize;
|
|
1383
1553
|
hasError?: boolean;
|
|
1384
1554
|
disabled?: boolean;
|
|
@@ -1408,6 +1578,17 @@ declare type ToastProviderProps = ToasterProps & {
|
|
|
1408
1578
|
spinnerColor?: ColorKey_2;
|
|
1409
1579
|
};
|
|
1410
1580
|
|
|
1581
|
+
/**
|
|
1582
|
+
* Custom hook to handle notification logic and state.
|
|
1583
|
+
* Returns computed values for notification display.
|
|
1584
|
+
*/
|
|
1585
|
+
export declare const useNotifications: ({ hasNotifications, notificationCount, }: Pick<NotificationButtonProps, "hasNotifications" | "notificationCount">) => {
|
|
1586
|
+
effectiveHasNotifications: boolean;
|
|
1587
|
+
displayCount: number | undefined;
|
|
1588
|
+
badgeLabel: string;
|
|
1589
|
+
bellAriaLabel: string;
|
|
1590
|
+
};
|
|
1591
|
+
|
|
1411
1592
|
/**
|
|
1412
1593
|
* User interface for the UserProfile component
|
|
1413
1594
|
*/
|
|
@@ -1419,15 +1600,44 @@ export declare interface User {
|
|
|
1419
1600
|
|
|
1420
1601
|
/**
|
|
1421
1602
|
* User menu item configuration
|
|
1422
|
-
|
|
1423
|
-
|
|
1603
|
+
* Defines a single item in the user profile dropdown menu.
|
|
1604
|
+
* @param id Unique identifier for the menu item
|
|
1605
|
+
* @param label Display text for the menu item
|
|
1606
|
+
* @param icon Icon component to display next to the label
|
|
1607
|
+
* @param onClick Function to call when the item is clicked
|
|
1608
|
+
* @param variant Optional styling variant ('default' or 'danger')
|
|
1609
|
+
*/
|
|
1610
|
+
export declare interface UserMenuItem {
|
|
1424
1611
|
id: string;
|
|
1425
1612
|
label: string;
|
|
1426
|
-
icon:
|
|
1613
|
+
icon: ReactNode | RemixiconComponentType;
|
|
1427
1614
|
onClick: () => void;
|
|
1428
1615
|
variant?: 'default' | 'danger';
|
|
1429
1616
|
}
|
|
1430
1617
|
|
|
1618
|
+
/**
|
|
1619
|
+
* UserProfile component with dropdown menu functionality.
|
|
1620
|
+
* Displays user avatar, name, role, and provides a dropdown menu with configurable actions.
|
|
1621
|
+
*/
|
|
1622
|
+
export declare const UserProfile: {
|
|
1623
|
+
({ user, onProfileClick, onLogout, menuItems, }: UserProfileProps): JSX.Element;
|
|
1624
|
+
displayName: string;
|
|
1625
|
+
};
|
|
1626
|
+
|
|
1627
|
+
/**
|
|
1628
|
+
* Props for the UserProfile component.
|
|
1629
|
+
* @param user The user object containing name and role information
|
|
1630
|
+
* @param onProfileClick Optional function to call when profile is clicked
|
|
1631
|
+
* @param onLogout Optional function to call when logout is selected
|
|
1632
|
+
* @param menuItems Optional array of custom menu items to display
|
|
1633
|
+
*/
|
|
1634
|
+
export declare interface UserProfileProps {
|
|
1635
|
+
user: User;
|
|
1636
|
+
onProfileClick?: () => void;
|
|
1637
|
+
onLogout?: () => void;
|
|
1638
|
+
menuItems?: UserMenuItem[];
|
|
1639
|
+
}
|
|
1640
|
+
|
|
1431
1641
|
export declare const useSidebar: () => SidebarContextValue;
|
|
1432
1642
|
|
|
1433
1643
|
/**
|
|
@@ -1447,8 +1657,8 @@ declare type Variant = 'rotate' | 'sweep';
|
|
|
1447
1657
|
* Puede ser extendida por cualquier componente que necesite funcionalidad de iconos
|
|
1448
1658
|
*/
|
|
1449
1659
|
export declare interface WithIconsProps {
|
|
1450
|
-
leftIcon?:
|
|
1451
|
-
rightIcon?:
|
|
1660
|
+
leftIcon?: ReactNode | RemixiconComponentType;
|
|
1661
|
+
rightIcon?: ReactNode | RemixiconComponentType;
|
|
1452
1662
|
iconSize?: IconSizes | string | number;
|
|
1453
1663
|
iconColor?: string;
|
|
1454
1664
|
}
|