@empreint/ui 1.0.2 → 1.0.3

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 (79) hide show
  1. package/dist/empreint.css +1 -1
  2. package/dist/empreint.js +50 -52
  3. package/dist/index.d.ts +662 -0
  4. package/package.json +4 -4
  5. package/dist/src/components/breadcrumb/breadcrumb.d.ts +0 -15
  6. package/dist/src/components/breadcrumb/index.d.ts +0 -1
  7. package/dist/src/components/button/button.d.ts +0 -8
  8. package/dist/src/components/button/index.d.ts +0 -1
  9. package/dist/src/components/card/card.d.ts +0 -7
  10. package/dist/src/components/card/index.d.ts +0 -1
  11. package/dist/src/components/checkbox/checkbox.d.ts +0 -8
  12. package/dist/src/components/checkbox/index.d.ts +0 -1
  13. package/dist/src/components/chip/chip.d.ts +0 -8
  14. package/dist/src/components/chip/index.d.ts +0 -1
  15. package/dist/src/components/collapsible/collapsible.d.ts +0 -25
  16. package/dist/src/components/collapsible/index.d.ts +0 -1
  17. package/dist/src/components/dropdown-menu/dropdown-menu.d.ts +0 -25
  18. package/dist/src/components/dropdown-menu/index.d.ts +0 -1
  19. package/dist/src/components/dropzone/dropzone.d.ts +0 -33
  20. package/dist/src/components/dropzone/index.d.ts +0 -1
  21. package/dist/src/components/flex/flex.d.ts +0 -10
  22. package/dist/src/components/flex/index.d.ts +0 -1
  23. package/dist/src/components/index.d.ts +0 -24
  24. package/dist/src/components/input/index.d.ts +0 -1
  25. package/dist/src/components/input/input.d.ts +0 -21
  26. package/dist/src/components/language-selector/index.d.ts +0 -1
  27. package/dist/src/components/language-selector/language-selector.d.ts +0 -5
  28. package/dist/src/components/list/index.d.ts +0 -1
  29. package/dist/src/components/list/list.d.ts +0 -13
  30. package/dist/src/components/loader/index.d.ts +0 -1
  31. package/dist/src/components/loader/loader.d.ts +0 -8
  32. package/dist/src/components/modal/index.d.ts +0 -1
  33. package/dist/src/components/modal/modal.d.ts +0 -43
  34. package/dist/src/components/pagination/index.d.ts +0 -1
  35. package/dist/src/components/pagination/pagination.d.ts +0 -20
  36. package/dist/src/components/popover/index.d.ts +0 -1
  37. package/dist/src/components/popover/popover.d.ts +0 -17
  38. package/dist/src/components/radio-group/index.d.ts +0 -1
  39. package/dist/src/components/radio-group/radio-group.d.ts +0 -18
  40. package/dist/src/components/select/index.d.ts +0 -1
  41. package/dist/src/components/select/select.d.ts +0 -30
  42. package/dist/src/components/sidebar/index.d.ts +0 -1
  43. package/dist/src/components/sidebar/sidebar.d.ts +0 -30
  44. package/dist/src/components/slot/index.d.ts +0 -1
  45. package/dist/src/components/slot/slot.d.ts +0 -8
  46. package/dist/src/components/table/index.d.ts +0 -2
  47. package/dist/src/components/table/table.d.ts +0 -20
  48. package/dist/src/components/table/table.types.d.ts +0 -8
  49. package/dist/src/components/text/index.d.ts +0 -1
  50. package/dist/src/components/text/text.d.ts +0 -8
  51. package/dist/src/components/title/index.d.ts +0 -1
  52. package/dist/src/components/title/title.d.ts +0 -8
  53. package/dist/src/components/wizard/index.d.ts +0 -1
  54. package/dist/src/components/wizard/wizard.d.ts +0 -46
  55. package/dist/src/hooks/index.d.ts +0 -9
  56. package/dist/src/hooks/use-breadcrumb/index.d.ts +0 -2
  57. package/dist/src/hooks/use-breadcrumb/use-breadcrumb.d.ts +0 -9
  58. package/dist/src/hooks/use-breadcrumb/use-breadcrumb.types.d.ts +0 -4
  59. package/dist/src/hooks/use-disclosure/index.d.ts +0 -1
  60. package/dist/src/hooks/use-disclosure/use-disclosure.d.ts +0 -9
  61. package/dist/src/hooks/use-match-device/index.d.ts +0 -2
  62. package/dist/src/hooks/use-match-device/use-match-device.d.ts +0 -2
  63. package/dist/src/hooks/use-match-device/use-match-device.types.d.ts +0 -6
  64. package/dist/src/hooks/use-match-resolution/index.d.ts +0 -2
  65. package/dist/src/hooks/use-match-resolution/use-match-resolution.d.ts +0 -3
  66. package/dist/src/hooks/use-match-resolution/use-match-resolution.types.d.ts +0 -35
  67. package/dist/src/hooks/use-outside-alerter/index.d.ts +0 -1
  68. package/dist/src/hooks/use-outside-alerter/use-outside-alerter.d.ts +0 -6
  69. package/dist/src/hooks/use-pagination/index.d.ts +0 -2
  70. package/dist/src/hooks/use-pagination/use-pagination.d.ts +0 -19
  71. package/dist/src/hooks/use-pagination/use-pagination.types.d.ts +0 -11
  72. package/dist/src/hooks/use-scroll-to/index.d.ts +0 -2
  73. package/dist/src/hooks/use-scroll-to/use-scroll-to.d.ts +0 -3
  74. package/dist/src/hooks/use-scroll-to/use-scroll-to.types.d.ts +0 -3
  75. package/dist/src/hooks/use-visible/index.d.ts +0 -1
  76. package/dist/src/hooks/use-visible/use-visible.d.ts +0 -2
  77. package/dist/src/hooks/use-wizard/index.d.ts +0 -1
  78. package/dist/src/hooks/use-wizard/use-wizard.d.ts +0 -11
  79. package/dist/src/index.d.ts +0 -2
@@ -0,0 +1,662 @@
1
+ import { ComponentProps } from 'react';
2
+ import { ElementType } from 'react';
3
+ import { HTMLAttributes } from 'react';
4
+ import { JSX } from 'react/jsx-runtime';
5
+ import { JSXElementConstructor } from 'react';
6
+ import { PropsWithChildren } from 'react';
7
+ import { ReactElement } from 'react';
8
+ import { ReactNode } from 'react';
9
+ import { Ref } from 'react';
10
+ import { RefObject } from 'react';
11
+
12
+ declare type AnyProps = Record<string, unknown>;
13
+
14
+ export declare const Breadcrumb: {
15
+ ({ children, className, ...rest }: ComponentProps<"nav">): JSX.Element;
16
+ Item: ({ children, current, className }: BreadcrumbItemProps) => JSX.Element;
17
+ Separator: ({ children, className }: BreadcrumbSeparatorProps) => JSX.Element;
18
+ };
19
+
20
+ export declare type BreadcrumbItem = {
21
+ label: string;
22
+ url: string;
23
+ };
24
+
25
+ export declare type BreadcrumbItemProps = {
26
+ children: ReactElement;
27
+ current?: boolean;
28
+ className?: string;
29
+ };
30
+
31
+ export declare type BreadcrumbSeparatorProps = {
32
+ children?: ReactNode;
33
+ className?: string;
34
+ };
35
+
36
+ export declare type Breakpoints = {
37
+ desktop: string;
38
+ laptop: string;
39
+ laptopOrUpper: string;
40
+ laptopOrLower: string;
41
+ tablet: string;
42
+ tabletOrUpper: string;
43
+ tabletOrLower: string;
44
+ largeMobile: string;
45
+ largeMobileOrUpper: string;
46
+ largeMobileOrLower: string;
47
+ mobile: string;
48
+ portrait: string;
49
+ landscape: string;
50
+ };
51
+
52
+ export declare const Button: ({ children, type, variant, size, className, ...rest }: ButtonProps) => JSX.Element;
53
+
54
+ export declare type ButtonProps = ComponentProps<"button"> & {
55
+ variant?: ButtonVariant;
56
+ size?: ButtonSize;
57
+ };
58
+
59
+ export declare type ButtonSize = "sm" | "md" | "lg";
60
+
61
+ export declare type ButtonVariant = "primary" | "secondary" | "ghost" | "danger";
62
+
63
+ export declare const Card: {
64
+ ({ children, className, ...rest }: ComponentProps<"div">): JSX.Element;
65
+ Header: ({ children, className, ...rest }: ComponentProps<"div">) => JSX.Element;
66
+ Body: ({ children, className, ...rest }: ComponentProps<"div">) => JSX.Element;
67
+ Footer: ({ children, className, ...rest }: ComponentProps<"div">) => JSX.Element;
68
+ };
69
+
70
+ export declare const Checkbox: ({ children, size, className, ...rest }: CheckboxProps) => JSX.Element;
71
+
72
+ export declare type CheckboxProps = Omit<ComponentProps<"input">, "type" | "size"> & {
73
+ children: ReactNode;
74
+ size?: CheckboxSize;
75
+ className?: string;
76
+ };
77
+
78
+ export declare type CheckboxSize = "sm" | "md" | "lg";
79
+
80
+ export declare const Chip: ({ children, size, onRemove, closeAriaLabel, className, ...rest }: ChipProps) => JSX.Element;
81
+
82
+ export declare type ChipProps = ComponentProps<"div"> & {
83
+ size?: ChipSize;
84
+ onRemove?: () => void;
85
+ closeAriaLabel?: string;
86
+ };
87
+
88
+ export declare type ChipSize = "sm" | "md" | "lg";
89
+
90
+ export declare const Collapsible: {
91
+ ({ children, className }: CollapsibleProps): JSX.Element;
92
+ Trigger: ({ children, icon: Icon, className, }: CollapsibleTriggerProps) => JSX.Element;
93
+ Content: ({ children, className }: CollapsibleContentProps) => false | JSX.Element | undefined;
94
+ Item: ({ children, className }: CollapsibleItemProps) => JSX.Element;
95
+ };
96
+
97
+ export declare type CollapsibleContentProps = {
98
+ children: ReactNode;
99
+ className?: string;
100
+ };
101
+
102
+ export declare type CollapsibleItemProps = {
103
+ children: ReactNode;
104
+ className?: string;
105
+ };
106
+
107
+ declare type CollapsibleProps = {
108
+ children: ReactNode;
109
+ className?: string;
110
+ };
111
+
112
+ export declare type CollapsibleTriggerProps = {
113
+ children: ReactNode;
114
+ icon?: ElementType;
115
+ className?: string;
116
+ };
117
+
118
+ export declare type Column = {
119
+ name: string;
120
+ label: string;
121
+ };
122
+
123
+ export declare const defaultBreakpoints: Breakpoints;
124
+
125
+ export declare type Device = {
126
+ isMobile: boolean;
127
+ isTablet: boolean;
128
+ isMobileOrTablet: boolean;
129
+ isDesktop: boolean;
130
+ };
131
+
132
+ export declare const DropdownMenu: {
133
+ ({ children, className }: DropdownMenuProps): JSX.Element;
134
+ Trigger: ({ children, icon: Icon, className, }: DropdownMenuTrigger) => JSX.Element;
135
+ Content: ({ children, className }: DropdownMenuContent) => false | JSX.Element | undefined;
136
+ Item: ({ children, onClick, className }: DropdownMenuItemProps) => JSX.Element;
137
+ };
138
+
139
+ export declare type DropdownMenuContent = {
140
+ children: ReactNode;
141
+ className?: string;
142
+ };
143
+
144
+ export declare type DropdownMenuItemProps = {
145
+ children: ReactNode;
146
+ onClick: () => void;
147
+ className?: string;
148
+ };
149
+
150
+ export declare type DropdownMenuProps = {
151
+ children: ReactNode;
152
+ className?: string;
153
+ };
154
+
155
+ export declare type DropdownMenuTrigger = {
156
+ children: ReactNode;
157
+ icon?: ElementType;
158
+ className?: string;
159
+ };
160
+
161
+ export declare const Dropzone: {
162
+ ({ children, onChange, className }: DropzoneProps): JSX.Element;
163
+ Label: ({ children, className }: DropzoneLabelProps) => JSX.Element;
164
+ Area: ({ children, className }: DropzoneAreaProps) => JSX.Element;
165
+ Empty: ({ children, className }: DropzoneEmptyProps) => JSX.Element | null;
166
+ Preview: ({ className }: DropzonePreviewProps) => JSX.Element | null;
167
+ Remove: ({ children, className }: DropzoneRemoveProps) => JSX.Element | null;
168
+ };
169
+
170
+ export declare type DropzoneAreaProps = {
171
+ children: ReactNode;
172
+ className?: string;
173
+ };
174
+
175
+ export declare type DropzoneEmptyProps = {
176
+ children: ReactNode;
177
+ className?: string;
178
+ };
179
+
180
+ export declare type DropzoneLabelProps = {
181
+ children: ReactNode;
182
+ className?: string;
183
+ };
184
+
185
+ export declare type DropzonePreviewProps = {
186
+ className?: string;
187
+ };
188
+
189
+ export declare type DropzoneProps = {
190
+ children: ReactNode;
191
+ onChange: (file: File | undefined) => void;
192
+ className?: string;
193
+ };
194
+
195
+ export declare type DropzoneRemoveProps = {
196
+ children: ReactElement;
197
+ className?: string;
198
+ };
199
+
200
+ export declare const Flex: ({ children, direction, justify, align, wrap, gap, inline, className, ...rest }: FlexProps) => JSX.Element;
201
+
202
+ export declare type FlexProps = ComponentProps<"div"> & {
203
+ direction?: "row" | "column" | "row-reverse" | "column-reverse";
204
+ justify?: "start" | "center" | "end" | "between" | "around" | "evenly" | "stretch";
205
+ align?: "start" | "center" | "end" | "stretch" | "baseline";
206
+ wrap?: "nowrap" | "wrap" | "wrap-reverse";
207
+ gap?: "none" | "xs" | "sm" | "md" | "lg" | "xl";
208
+ inline?: boolean;
209
+ };
210
+
211
+ export declare const Input: {
212
+ ({ children, status, className }: InputProps): JSX.Element;
213
+ Field: ({ className, ...rest }: ComponentProps<"input">) => JSX.Element;
214
+ Label: ({ children, className }: InputLabelProps) => JSX.Element;
215
+ Message: ({ children, className }: InputMessageProps) => JSX.Element;
216
+ };
217
+
218
+ export declare type InputLabelProps = {
219
+ children: ReactNode;
220
+ className?: string;
221
+ };
222
+
223
+ export declare type InputMessageProps = {
224
+ children: ReactNode;
225
+ className?: string;
226
+ };
227
+
228
+ export declare type InputProps = {
229
+ children: ReactNode;
230
+ status?: InputStatus;
231
+ className?: string;
232
+ };
233
+
234
+ export declare type InputStatus = "default" | "success" | "warning" | "error";
235
+
236
+ export declare const LanguageSelector: ({ languages, ...rest }: LanguageSelectorProps & Omit<SelectProps, "children">) => JSX.Element;
237
+
238
+ export declare type LanguageSelectorProps = {
239
+ languages: string[];
240
+ };
241
+
242
+ export declare const List: {
243
+ ({ className, children }: ListProps): JSX.Element;
244
+ Item: ({ children, className }: ListItemProps) => JSX.Element;
245
+ };
246
+
247
+ export declare type ListItemProps = {
248
+ children: ReactNode;
249
+ className?: string;
250
+ };
251
+
252
+ export declare type ListProps = {
253
+ children: ReactNode;
254
+ className?: string;
255
+ };
256
+
257
+ export declare const Loader: {
258
+ ({ children, className, ...rest }: ComponentProps<"div">): JSX.Element;
259
+ Spinner: ({ size, className, ...rest }: SpinnerProps) => JSX.Element;
260
+ };
261
+
262
+ export declare type MatchResolution = {
263
+ resolution: Resolution;
264
+ breakpoints: Breakpoints;
265
+ match: (query: string) => boolean;
266
+ };
267
+
268
+ export declare const Modal: {
269
+ ({ children, className }: ModalProps): JSX.Element;
270
+ Trigger: ({ children, className }: ModalTriggerProps) => JSX.Element;
271
+ Content: ({ children, className }: ModalContentProps) => JSX.Element | null;
272
+ Overlay: ({ className }: ModalOverlayProps) => false | JSX.Element | undefined;
273
+ Close: ({ children, className }: ModalCloseProps) => JSX.Element;
274
+ Body: ({ children, className }: ModalBodyProps) => JSX.Element;
275
+ Header: ({ children, className }: ModalHeaderProps) => JSX.Element;
276
+ Footer: ({ children, className }: ModalFooterProps) => JSX.Element;
277
+ };
278
+
279
+ export declare type ModalBodyProps = {
280
+ children: ReactNode;
281
+ className?: string;
282
+ };
283
+
284
+ export declare type ModalCloseProps = {
285
+ children: ReactElement;
286
+ className?: string;
287
+ };
288
+
289
+ export declare type ModalContentProps = {
290
+ children: ReactNode;
291
+ className?: string;
292
+ };
293
+
294
+ export declare type ModalFooterProps = {
295
+ children: ReactNode;
296
+ className?: string;
297
+ };
298
+
299
+ export declare type ModalHeaderProps = {
300
+ children: ReactNode;
301
+ className?: string;
302
+ };
303
+
304
+ export declare type ModalOverlayProps = {
305
+ className?: string;
306
+ };
307
+
308
+ export declare type ModalProps = {
309
+ children: ReactNode;
310
+ className?: string;
311
+ };
312
+
313
+ export declare const ModalTrigger: ({ children, className }: ModalTriggerProps) => JSX.Element;
314
+
315
+ export declare type ModalTriggerProps = {
316
+ children: ReactElement;
317
+ className?: string;
318
+ };
319
+
320
+ export declare type ObjectLiteral<T = Primitive> = {
321
+ [field: string]: T;
322
+ };
323
+
324
+ declare type Option_2 = {
325
+ label: ReactNode;
326
+ value: string;
327
+ };
328
+ export { Option_2 as Option }
329
+
330
+ export declare type OutsideAlerter = {
331
+ hasClickedOutside: boolean;
332
+ onReset: () => void;
333
+ };
334
+
335
+ export declare const Pagination: {
336
+ ({ children, className, ...rest }: PaginationProps): JSX.Element;
337
+ First: ({ children, className }: PaginationButtonProps) => JSX.Element | null;
338
+ Previous: ({ children, className }: PaginationButtonProps) => JSX.Element | null;
339
+ Items: ({ className }: {
340
+ className?: string;
341
+ }) => JSX.Element[] | undefined;
342
+ Next: ({ children, className }: PaginationButtonProps) => JSX.Element | null;
343
+ Last: ({ children, className }: PaginationButtonProps) => JSX.Element | null;
344
+ };
345
+
346
+ export declare type PaginationButtonProps = {
347
+ children: ReactElement;
348
+ className?: string;
349
+ };
350
+
351
+ export declare type PaginationData = {
352
+ page: number;
353
+ total: number;
354
+ items: number[];
355
+ maxRecordsPerPage: number;
356
+ goToPage: (page: number) => void;
357
+ goToFirst: () => void;
358
+ goToLeft: () => void;
359
+ goToRight: () => void;
360
+ goToLast: () => void;
361
+ };
362
+
363
+ export declare type PaginationProps = usePaginationProps & {
364
+ children: ReactNode;
365
+ className?: string;
366
+ };
367
+
368
+ export declare const Popover: {
369
+ ({ children }: PopoverProps): JSX.Element;
370
+ Trigger: ({ children }: PopoverTriggerProps) => JSX.Element;
371
+ Content: ({ children, className }: PopoverContentProps) => JSX.Element | null;
372
+ };
373
+
374
+ declare type PopoverContentProps = {
375
+ children: ReactNode;
376
+ className?: string;
377
+ };
378
+
379
+ export declare type PopoverProps = {
380
+ children: ReactNode;
381
+ };
382
+
383
+ declare type PopoverTriggerProps = {
384
+ children: ReactElement;
385
+ };
386
+
387
+ export declare type Primitive = string | number | boolean | undefined | null;
388
+
389
+ export declare const RadioGroup: {
390
+ ({ children, onChange, defaultValue, className }: RadioGroupProps): JSX.Element;
391
+ Item: ({ children, value, className, ...rest }: RadioItemProps) => JSX.Element;
392
+ };
393
+
394
+ declare type RadioGroupProps = {
395
+ children: ReactNode;
396
+ defaultValue: string;
397
+ value?: string;
398
+ onChange?: (value: string) => void;
399
+ className?: string;
400
+ };
401
+
402
+ export declare type RadioItemProps = Omit<ComponentProps<"input">, "type" | "name" | "checked" | "onChange"> & {
403
+ children: ReactNode;
404
+ value: string;
405
+ className?: string;
406
+ };
407
+
408
+ export declare type Resolution = {
409
+ isDesktop: boolean;
410
+ isLaptop: boolean;
411
+ isLaptopOrUpper: boolean;
412
+ isLaptopOrLower: boolean;
413
+ isTablet: boolean;
414
+ isTabletOrUpper: boolean;
415
+ isTabletOrLower: boolean;
416
+ isLargeMobile: boolean;
417
+ isLargeMobileOrUpper: boolean;
418
+ isLargeMobileOrLower: boolean;
419
+ isMobile: boolean;
420
+ isPortrait: boolean;
421
+ isLandscape: boolean;
422
+ };
423
+
424
+ export declare type ScrollEvents = {
425
+ scrollToTop: () => void;
426
+ };
427
+
428
+ export declare const Select: {
429
+ ({ children, defaultValue, onChange, className }: SelectProps): JSX.Element;
430
+ Trigger: ({ icon: Icon, className }: SelectTriggerProps) => JSX.Element;
431
+ Content: ({ children, className }: SelectContentProps) => JSX.Element;
432
+ Item: ({ children, value, className }: SelectItemProps) => JSX.Element;
433
+ };
434
+
435
+ export declare type SelectContentProps = {
436
+ children: ReactNode;
437
+ className?: string;
438
+ };
439
+
440
+ export declare type SelectItemProps = {
441
+ children: ReactNode;
442
+ value: string;
443
+ className?: string;
444
+ };
445
+
446
+ export declare type SelectProps = {
447
+ children: ReactNode;
448
+ defaultValue: string;
449
+ onChange?: (option: Option_2) => void;
450
+ className?: string;
451
+ };
452
+
453
+ export declare type SelectTriggerProps = {
454
+ icon?: ElementType;
455
+ className?: string;
456
+ };
457
+
458
+ export declare const Sidebar: {
459
+ ({ children, className }: SidebarProps): JSX.Element;
460
+ Header: ({ children, className }: SidebarHeaderProps) => JSX.Element;
461
+ Group: ({ children, className }: SidebarGroupProps) => JSX.Element;
462
+ Link: ({ children, isActive, className }: SidebarLinkProps) => JSX.Element;
463
+ Item: ({ children, onClick, className }: SidebarItemProps) => JSX.Element;
464
+ };
465
+
466
+ export declare type SidebarGroupProps = {
467
+ children: ReactNode;
468
+ className?: string;
469
+ };
470
+
471
+ export declare type SidebarHeaderProps = {
472
+ children: ReactNode;
473
+ className?: string;
474
+ };
475
+
476
+ export declare type SidebarItemProps = {
477
+ children: ReactNode;
478
+ onClick?: () => void;
479
+ className?: string;
480
+ };
481
+
482
+ export declare type SidebarLinkProps = {
483
+ children: ReactElement;
484
+ isActive?: boolean;
485
+ className?: string;
486
+ };
487
+
488
+ export declare type SidebarProps = {
489
+ children: ReactNode;
490
+ className?: string;
491
+ };
492
+
493
+ export declare const Slot: ({ children, ref, ...slotProps }: SlotProps) => ReactElement<AnyProps, string | JSXElementConstructor<any>> | null;
494
+
495
+ export declare type SlotProps = HTMLAttributes<HTMLElement> & {
496
+ children: ReactElement;
497
+ ref?: Ref<HTMLElement>;
498
+ };
499
+
500
+ export declare type SpinnerProps = ComponentProps<"svg"> & {
501
+ size?: "sm" | "md" | "lg";
502
+ };
503
+
504
+ export declare type Step = {
505
+ name: string;
506
+ title: string;
507
+ };
508
+
509
+ export declare const Table: {
510
+ <T extends ObjectLiteral>({ className, columns, records, uniqueKey, renderHeader, renderFooter, renderColumnsCell, renderRecordsCell, renderRecordsEmptyCell, renderNoRecords, }: TableProps<T>): JSX.Element;
511
+ Th: ({ children }: PropsWithChildren) => JSX.Element;
512
+ Tr: ({ children }: PropsWithChildren) => JSX.Element;
513
+ Td: ({ children }: PropsWithChildren) => JSX.Element;
514
+ };
515
+
516
+ export declare type TableProps<T extends ObjectLiteral> = {
517
+ columns: Column[];
518
+ records: T[];
519
+ uniqueKey?: string;
520
+ renderHeader?: () => ReactNode;
521
+ renderFooter?: () => ReactNode;
522
+ renderColumnsCell?: (column: Column, key: string) => ReactNode;
523
+ renderRecordsCell?: (cell: Primitive, key: string) => ReactNode;
524
+ renderRecordsEmptyCell?: (key: string) => ReactNode;
525
+ renderNoRecords?: () => ReactNode;
526
+ className?: string;
527
+ };
528
+
529
+ declare const Text_2: ({ children, as: TextAs, size, align, weight, className, ...rest }: TextProps) => JSX.Element;
530
+ export { Text_2 as Text }
531
+
532
+ export declare type TextProps = HTMLAttributes<HTMLElement> & {
533
+ as?: "span" | "p";
534
+ size?: "sm" | "md" | "lg";
535
+ align?: "start" | "center" | "end" | "justify";
536
+ weight?: "normal" | "medium" | "semibold" | "bold";
537
+ };
538
+
539
+ export declare const Title: ({ children, as: TitleAs, size, align, weight, className, ...rest }: TitleProps) => JSX.Element;
540
+
541
+ export declare type TitleProps = HTMLAttributes<HTMLHeadingElement> & {
542
+ as?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
543
+ size?: "sm" | "md" | "lg" | "xl";
544
+ align?: "start" | "center" | "end";
545
+ weight?: "normal" | "medium" | "semibold" | "bold";
546
+ };
547
+
548
+ export declare const useBreadcrumb: ({ url, mapping, }: useBreadcrumbProps) => BreadcrumbItem[];
549
+
550
+ export declare type useBreadcrumbProps = {
551
+ url?: URL;
552
+ mapping?: {
553
+ path: string;
554
+ label: string;
555
+ }[];
556
+ };
557
+
558
+ export declare const useDisclosure: ({ closeOnOutsideClick }?: useDisclosureOptions) => {
559
+ isOpen: boolean;
560
+ onClose: () => void;
561
+ onToggle: () => void;
562
+ ref: RefObject<HTMLDivElement | null>;
563
+ };
564
+
565
+ export declare type useDisclosureOptions = {
566
+ closeOnOutsideClick?: boolean;
567
+ };
568
+
569
+ export declare const useMatchDevice: (UA: string) => Device;
570
+
571
+ export declare const useMatchResolution: (UA: string, breakpoints?: Breakpoints) => MatchResolution;
572
+
573
+ export declare const useOutsideAlerter: (ref: RefObject<HTMLElement | null>) => OutsideAlerter;
574
+
575
+ export declare const usePagination: ({ page, totalRecords, maxRecordsPerPage, itemNeighbours, minItems, }: usePaginationProps) => {
576
+ currentPage: number;
577
+ total: number;
578
+ items: number[];
579
+ goToPage: (page: number) => void;
580
+ goToFirst: () => void;
581
+ goToPrevious: () => void;
582
+ goToNext: () => void;
583
+ goToLast: () => void;
584
+ isFirst: boolean;
585
+ isLast: boolean;
586
+ };
587
+
588
+ export declare type usePaginationProps = {
589
+ page: number;
590
+ totalRecords: number;
591
+ maxRecordsPerPage?: number;
592
+ itemNeighbours?: number;
593
+ minItems?: number;
594
+ };
595
+
596
+ export declare const useScrollTo: (target: RefObject<HTMLElement | null>) => ScrollEvents;
597
+
598
+ export declare const useVisible: (target: RefObject<HTMLElement | null>) => boolean;
599
+
600
+ export declare const useWizard: ({ totalSteps, step }: useWizardOptions) => {
601
+ currentIndex: number;
602
+ nextStep: () => void;
603
+ previousStep: () => void;
604
+ isFirstStep: boolean;
605
+ isLastStep: boolean;
606
+ };
607
+
608
+ export declare type useWizardOptions = {
609
+ totalSteps: number;
610
+ step?: number;
611
+ };
612
+
613
+ export declare const Wizard: {
614
+ ({ children, initialStep, className }: WizardProps): JSX.Element;
615
+ Header: ({ children, className }: WizardHeaderProps) => JSX.Element;
616
+ Title: ({ className }: WizardTitleProps) => JSX.Element;
617
+ Indicator: () => JSX.Element | null;
618
+ Step: ({ children, name, title, className }: WizardStepProps) => JSX.Element | null;
619
+ Footer: ({ children, className }: WizardFooterProps) => JSX.Element;
620
+ Next: ({ children, onClick, className }: WizardButtonProps) => JSX.Element | null;
621
+ Previous: ({ children, onClick, className }: WizardButtonProps) => JSX.Element | null;
622
+ Finalize: ({ children, onClick, className }: WizardButtonProps) => JSX.Element | null;
623
+ };
624
+
625
+ export declare type WizardButtonProps = {
626
+ children: ReactElement;
627
+ onClick?: () => void;
628
+ className?: string;
629
+ };
630
+
631
+ export declare type WizardFooterProps = {
632
+ children: ReactNode;
633
+ className?: string;
634
+ };
635
+
636
+ export declare type WizardHeaderProps = {
637
+ children: ReactNode;
638
+ className?: string;
639
+ };
640
+
641
+ export declare type WizardIndicatorProps = {
642
+ className?: string;
643
+ };
644
+
645
+ export declare type WizardProps = {
646
+ children: ReactNode;
647
+ initialStep?: number;
648
+ className?: string;
649
+ };
650
+
651
+ export declare type WizardStepProps = {
652
+ children: ReactNode;
653
+ name: string;
654
+ title: string;
655
+ className?: string;
656
+ };
657
+
658
+ export declare type WizardTitleProps = {
659
+ className?: string;
660
+ };
661
+
662
+ export { }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@empreint/ui",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
7
- "types": "./dist/src/index.d.ts",
7
+ "types": "./dist/index.d.ts",
8
8
  "import": "./dist/empreint.js"
9
9
  },
10
10
  "./styles": "./dist/empreint.css"
@@ -58,12 +58,12 @@
58
58
  "@changesets/cli": "^2.31.0",
59
59
  "@commitlint/cli": "^20.5.3",
60
60
  "@commitlint/config-conventional": "^20.5.3",
61
+ "@microsoft/api-extractor": "^7.58.7",
61
62
  "@storybook/addon-a11y": "^10.3.6",
62
63
  "@storybook/addon-docs": "^10.3.6",
63
64
  "@storybook/addon-vitest": "^10.3.6",
64
65
  "@storybook/react": "^10.3.6",
65
66
  "@storybook/react-vite": "^10.3.6",
66
- "@storybook/test": "^8.6.15",
67
67
  "@types/node": "^25.6.0",
68
68
  "@types/react": "^19.2.14",
69
69
  "@types/react-dom": "^19.2.3",
@@ -77,8 +77,8 @@
77
77
  "remark-gfm": "^4.0.1",
78
78
  "storybook": "^10.3.6",
79
79
  "typescript": "^6.0.3",
80
+ "unplugin-dts": "^1.0.0",
80
81
  "vite": "^8.0.10",
81
- "vite-plugin-dts": "^5.0.0",
82
82
  "vitest": "^4.1.5"
83
83
  }
84
84
  }
@@ -1,15 +0,0 @@
1
- import { ComponentProps, ReactElement, ReactNode } from 'react';
2
- export declare const Breadcrumb: {
3
- ({ children, className, ...rest }: ComponentProps<"nav">): import("react/jsx-runtime").JSX.Element;
4
- Item: ({ children, current, className }: BreadcrumbItemProps) => import("react/jsx-runtime").JSX.Element;
5
- Separator: ({ children, className }: BreadcrumbSeparatorProps) => import("react/jsx-runtime").JSX.Element;
6
- };
7
- export type BreadcrumbItemProps = {
8
- children: ReactElement;
9
- current?: boolean;
10
- className?: string;
11
- };
12
- export type BreadcrumbSeparatorProps = {
13
- children?: ReactNode;
14
- className?: string;
15
- };
@@ -1 +0,0 @@
1
- export * from './breadcrumb';