@konstructio/ui 0.1.2-alpha.3 → 0.1.2-alpha.31

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 (163) hide show
  1. package/dist/DatePicker.css +1 -1
  2. package/dist/Modal-5xSxFoaD.js +99 -0
  3. package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
  4. package/dist/chevron-down-DgT-uSF9.js +5 -0
  5. package/dist/chevron-right-DYvXLeql.js +7 -0
  6. package/dist/chevron-up-DrQr2Fwd.js +5 -0
  7. package/dist/components/Alert/Alert.js +2 -2
  8. package/dist/components/AlertDialog/AlertDialog.js +1 -1
  9. package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
  10. package/dist/components/AlertDialog/components/index.js +1 -1
  11. package/dist/components/Badge/Badge.js +30 -33
  12. package/dist/components/Badge/Badge.variants.js +8 -6
  13. package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
  14. package/dist/components/Breadcrumb/components/Item/Item.js +24 -23
  15. package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
  16. package/dist/components/Button/Button.js +1 -1
  17. package/dist/components/Button/Button.variants.js +1 -1
  18. package/dist/components/Card/Card.variants.js +5 -9
  19. package/dist/components/Checkbox/Checkbox.js +6 -6
  20. package/dist/components/Command/Command.js +2 -2
  21. package/dist/components/Command/components/Command.js +1 -1
  22. package/dist/components/Command/components/CommandEmpty.js +1 -1
  23. package/dist/components/Command/components/CommandGroup.js +1 -1
  24. package/dist/components/Command/components/CommandInput.js +2 -2
  25. package/dist/components/Command/components/CommandItem.js +1 -1
  26. package/dist/components/Command/components/CommandList.js +1 -1
  27. package/dist/components/Command/components/CommandSeparator.js +1 -1
  28. package/dist/components/Command/components/DialogContent.js +2 -2
  29. package/dist/components/Command/components/DialogOverlay.js +1 -1
  30. package/dist/components/Datepicker/DatePicker.js +1209 -1147
  31. package/dist/components/Divider/Divider.variants.js +1 -1
  32. package/dist/components/Dropdown/Dropdown.js +46 -28
  33. package/dist/components/Dropdown/Dropdown.variants.js +32 -9
  34. package/dist/components/Dropdown/components/List/List.js +133 -54
  35. package/dist/components/Dropdown/components/List/List.variants.js +9 -7
  36. package/dist/components/Dropdown/components/ListItem/ListItem.js +74 -24
  37. package/dist/components/Dropdown/components/ListItem/ListItem.variants.js +9 -7
  38. package/dist/components/Dropdown/components/Wrapper.js +144 -109
  39. package/dist/components/Dropdown/constants/index.js +4 -0
  40. package/dist/components/Dropdown/constants/pagination.js +4 -0
  41. package/dist/components/Dropdown/contexts/dropdown.context.js +26 -8
  42. package/dist/components/Dropdown/contexts/dropdown.provider.js +48 -19
  43. package/dist/components/Dropdown/hooks/useDropdown.js +83 -39
  44. package/dist/components/Dropdown/hooks/useNavigationList.js +28 -36
  45. package/dist/components/DropdownButton/DropdownButton.js +1 -1
  46. package/dist/components/Filter/Filter.variants.js +2 -2
  47. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +1 -1
  48. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +1 -1
  49. package/dist/components/Input/Input.js +1 -1
  50. package/dist/components/Input/Input.variants.js +1 -1
  51. package/dist/components/Loading/Loading.js +1 -7
  52. package/dist/components/Modal/Modal.js +2 -2
  53. package/dist/components/Modal/components/Body/Body.js +1 -1
  54. package/dist/components/Modal/components/Footer/Footer.js +1 -1
  55. package/dist/components/Modal/components/Header/Header.js +1 -1
  56. package/dist/components/Modal/components/Wrapper/Wrapper.js +3 -3
  57. package/dist/components/Modal/components/index.js +1 -1
  58. package/dist/components/NumberInput/NumberInput.js +2 -2
  59. package/dist/components/PhoneNumberInput/PhoneNumberInput.js +8 -0
  60. package/dist/components/PhoneNumberInput/PhoneNumberInput.variants.js +45 -0
  61. package/dist/components/PhoneNumberInput/components/FlagContent/FlagContent.js +27 -0
  62. package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +629 -0
  63. package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +36 -0
  64. package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +45 -0
  65. package/dist/components/PhoneNumberInput/components/Wrapper.js +625 -0
  66. package/dist/components/PhoneNumberInput/components/index.js +6 -0
  67. package/dist/components/PhoneNumberInput/contexts/index.js +8 -0
  68. package/dist/components/PhoneNumberInput/contexts/phone-number.context.js +28 -0
  69. package/dist/components/PhoneNumberInput/contexts/phone-number.hook.js +13 -0
  70. package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +6139 -0
  71. package/dist/components/PhoneNumberInput/utils/index.js +11 -0
  72. package/dist/components/PieChart/PieChart.js +647 -664
  73. package/dist/components/RadioCard/RadioCard.variants.js +1 -6
  74. package/dist/components/RadioGroup/RadioGroup.js +1 -1
  75. package/dist/components/Range/Range.js +1 -1
  76. package/dist/components/Sidebar/Sidebar.variants.js +2 -2
  77. package/dist/components/Sidebar/components/Wrapper/Wrapper.js +29 -28
  78. package/dist/components/Slider/Slider.js +1 -1
  79. package/dist/components/Switch/Switch.js +8 -8
  80. package/dist/components/Switch/Switch.variants.js +4 -4
  81. package/dist/components/Tabs/Tabs.js +1 -1
  82. package/dist/components/Tabs/Tabs.variants.js +45 -24
  83. package/dist/components/Tabs/components/Content.js +1 -1
  84. package/dist/components/Tabs/components/List.js +1 -1
  85. package/dist/components/Tabs/components/Trigger.js +9 -8
  86. package/dist/components/Tag/Tag.js +1 -1
  87. package/dist/components/TagSelect/components/Wrapper/Wrapper.js +98 -49
  88. package/dist/components/TimePicker/TimePicker.variants.js +2 -2
  89. package/dist/components/TimePicker/components/Wrapper/Wrapper.js +2 -2
  90. package/dist/components/Toast/Toast.js +206 -181
  91. package/dist/components/Tooltip/Tooltip.js +1 -1
  92. package/dist/components/Typography/Typography.variants.js +18 -23
  93. package/dist/components/VirtualizedTable/VirtualizedTable.js +119 -0
  94. package/dist/components/VirtualizedTable/VirtualizedTable.variants.js +5 -0
  95. package/dist/components/VirtualizedTable/assets/chevron-down.js +25 -0
  96. package/dist/components/VirtualizedTable/assets/chevron-up.js +25 -0
  97. package/dist/components/VirtualizedTable/assets/index.js +6 -0
  98. package/dist/components/VirtualizedTable/components/Actions/Actions.js +72 -0
  99. package/dist/components/VirtualizedTable/components/Body/Body.js +51 -0
  100. package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.js +165 -0
  101. package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +34 -0
  102. package/dist/components/VirtualizedTable/components/Filter/Filter.js +88 -0
  103. package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +48 -0
  104. package/dist/components/VirtualizedTable/components/Header/Header.js +84 -0
  105. package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +53 -0
  106. package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +67 -0
  107. package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +34 -0
  108. package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.js +27 -0
  109. package/dist/components/VirtualizedTable/components/index.js +16 -0
  110. package/dist/components/VirtualizedTable/constants/index.js +5 -0
  111. package/dist/components/VirtualizedTable/constants/pagination.js +5 -0
  112. package/dist/components/VirtualizedTable/contexts/index.js +8 -0
  113. package/dist/components/VirtualizedTable/contexts/table.context.js +32 -0
  114. package/dist/components/VirtualizedTable/contexts/table.hook.js +11 -0
  115. package/dist/components/VirtualizedTable/contexts/table.provider.js +85 -0
  116. package/dist/components/index.js +79 -73
  117. package/dist/contexts/theme.provider.js +0 -1
  118. package/dist/{createLucideIcon-DbC6TvM5.js → createLucideIcon-D4r5Phnh.js} +0 -24
  119. package/dist/debounce-BFejQm9P.js +200 -0
  120. package/dist/ellipsis-vertical-BVPtjl5f.js +9 -0
  121. package/dist/{index-h-Ul0anl.js → index--V_ZsiQe.js} +1 -22
  122. package/dist/index-2hB40Iuc.js +1873 -0
  123. package/dist/index-BZPx6jYI.js +8 -0
  124. package/dist/{index-bwWKd82e.js → index-BbQkJE5L.js} +1 -1
  125. package/dist/index-BtQfgaSF.js +60 -0
  126. package/dist/index-C3tHPg8y.js +662 -0
  127. package/dist/index-CIAmiWcw.js +200 -0
  128. package/dist/index-CSFe9uC5.js +14 -0
  129. package/dist/index-CSWGJT-v.js +1722 -0
  130. package/dist/index-CigKKiZS.js +91 -0
  131. package/dist/index-DDByhzds.js +137 -0
  132. package/dist/{index-BAraV3ai.js → index-DH2Fnov1.js} +11 -12
  133. package/dist/index-DLcqcWxM.js +29 -0
  134. package/dist/index-Dbt2vBmS.js +136 -0
  135. package/dist/{index-DB2XhXHn.js → index-DpW9ExsS.js} +7 -7
  136. package/dist/index-DrWQH0QF.js +55 -0
  137. package/dist/{index-D3xzCzcO.js → index-X4k_cU8k.js} +4 -4
  138. package/dist/index-kyuBfLcN.js +479 -0
  139. package/dist/{index-C1g_chDT.js → index-mPY_8Y5v.js} +2 -2
  140. package/dist/index-ohdbKsws.js +27 -0
  141. package/dist/index.d.ts +184 -18
  142. package/dist/index.js +106 -98
  143. package/dist/libphonenumber-_7ZyKWA7.js +11549 -0
  144. package/dist/package.json +46 -32
  145. package/dist/styles.css +1 -1
  146. package/dist/ui/civo-theme.css +191 -167
  147. package/dist/{useBreadcrumb-B8DnuqkR.js → useBreadcrumb-BAHbGQ_O.js} +0 -10
  148. package/dist/utils/index.js +534 -501
  149. package/dist/{x-BPcqkRZd.js → x-DPU9OdYH.js} +1 -1
  150. package/package.json +46 -32
  151. package/dist/Modal-V67Uz78z.js +0 -98
  152. package/dist/_commonjsHelpers-C6fGbg64.js +0 -6
  153. package/dist/chevron-down-BLZPftpV.js +0 -11
  154. package/dist/chevron-up-RLP4nX7V.js +0 -54
  155. package/dist/index-BXuxPoz7.js +0 -435
  156. package/dist/index-BfXxHr_2.js +0 -125
  157. package/dist/index-C9T9HQaa.js +0 -423
  158. package/dist/index-CZnD2QxM.js +0 -32
  159. package/dist/index-CrBonFvu.js +0 -144
  160. package/dist/index-Cvx4lqTq.js +0 -47
  161. package/dist/index-DQH6odE9.js +0 -82
  162. package/dist/index-Oq5GlCHP.js +0 -131
  163. package/dist/index-iXyXtdgP.js +0 -31
package/dist/index.d.ts CHANGED
@@ -1,7 +1,10 @@
1
1
  import { AlertDialogProps as AlertDialogProps_2 } from '@radix-ui/react-alert-dialog';
2
2
  import { ButtonHTMLAttributes } from 'react';
3
+ import { CellContext } from '@tanstack/react-table';
3
4
  import { CheckboxProps as CheckboxProps_2 } from '@radix-ui/react-checkbox';
4
5
  import { ClassProp } from 'class-variance-authority/types';
6
+ import { ClassValue } from 'clsx';
7
+ import { ColumnDef as ColumnDef_2 } from '@tanstack/react-table';
5
8
  import { ComponentRef } from 'react';
6
9
  import { Context } from 'react';
7
10
  import { DayPickerProps } from 'react-day-picker';
@@ -11,15 +14,26 @@ import { getAllTimezones } from 'countries-and-timezones';
11
14
  import { HTMLAttributes } from 'react';
12
15
  import { HtmlHTMLAttributes } from 'react';
13
16
  import { InputHTMLAttributes } from 'react';
17
+ import { JSX } from 'react/jsx-runtime';
18
+ import { JSX as JSX_2 } from 'react';
14
19
  import { PropsWithChildren } from 'react';
15
20
  import { ReactNode } from 'react';
16
21
  import * as ReactTabs from '@radix-ui/react-tabs';
17
22
  import { Ref } from 'react';
18
23
  import { RefAttributes } from 'react';
24
+ import { RegionCode } from 'google-libphonenumber';
25
+ import { RowData as RowData_2 } from '@tanstack/react-table';
19
26
  import { SliderProps } from '@radix-ui/react-slider';
20
27
  import { TabsContentProps } from '@radix-ui/react-tabs';
28
+ import { UseQueryOptions } from '@tanstack/react-query';
21
29
  import { VariantProps } from 'class-variance-authority';
22
30
 
31
+ declare type Action<TData> = {
32
+ label: string | React.ReactNode;
33
+ onClick: (rowData: TData) => void;
34
+ className?: string;
35
+ };
36
+
23
37
  export declare const Alert: FC<AlertProps>;
24
38
 
25
39
  export declare const AlertDialog: FC<AlertDialogProps>;
@@ -81,16 +95,17 @@ declare type BadgeMultiSelectProps = {
81
95
  };
82
96
 
83
97
  declare type BadgeProps = VariantProps<typeof badgeVariants> & {
84
- label: string;
85
98
  className?: string;
86
- loading?: boolean;
87
99
  dismissible?: true;
100
+ label: string;
101
+ leftIcon?: ReactNode;
102
+ loading?: boolean;
88
103
  onClick?: VoidFunction;
89
104
  onDismiss?: VoidFunction;
90
105
  };
91
106
 
92
107
  declare const badgeVariants: (props?: ({
93
- variant?: "info" | "warning" | "danger" | "default" | "success" | null | undefined;
108
+ variant?: "info" | "warning" | "danger" | "default" | "success" | "violet" | null | undefined;
94
109
  size?: "default" | null | undefined;
95
110
  } & ClassProp) | undefined) => string;
96
111
 
@@ -170,8 +185,14 @@ declare const checkboxVariants: (props?: ({
170
185
  checked?: boolean | null | undefined;
171
186
  } & ClassProp) | undefined) => string;
172
187
 
188
+ export declare const cn: (...inputs: ClassValue[]) => string;
189
+
190
+ export declare type ColumnDef<TData extends RowData> = ColumnDef_2<TData, string>;
191
+
173
192
  export declare const Content: FC<TabsContentProps>;
174
193
 
194
+ declare type CSSColor = `var(--${string})` | `rgb(${number}, ${number}, ${number})` | `rgba(${number}, ${number}, ${number}, ${number})` | `hsl(${number}, ${number}%, ${number}%)` | `hsla(${number}, ${number}%, ${number}%, ${number})`;
195
+
175
196
  export declare const DateFilterDropdown: FC<DateFilterDropdownProps>;
176
197
 
177
198
  declare type DateFilterDropdownProps = {
@@ -198,32 +219,62 @@ export declare const Dropdown: FC<DropdownProps>;
198
219
 
199
220
  export declare const DropdownButton: FC<Props>;
200
221
 
201
- declare interface DropdownProps extends VariantProps<typeof dropdownVariants>, Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange'> {
222
+ declare type DropdownProps = VariantProps<typeof dropdownVariants> & Omit<InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange'> & {
223
+ additionalOptions?: ReactNode[] | string[];
202
224
  className?: string;
225
+ disabled?: boolean;
203
226
  error?: string;
204
227
  helperText?: string;
228
+ highlightSearch?: boolean;
205
229
  iconClassName?: string;
230
+ inputClassName?: string;
206
231
  isLoading?: boolean;
207
232
  isRequired?: boolean;
208
233
  label?: string;
209
234
  labelClassName?: string;
210
235
  listClassName?: string;
211
236
  listItemClassName?: string;
237
+ listItemSecondRowClassName?: string;
238
+ mainWrapperClassName?: string;
212
239
  options: Option_3[];
213
240
  searchable?: boolean;
241
+ showSearchIcon?: boolean;
214
242
  theme?: Theme;
215
243
  value?: string;
216
244
  wrapperClassName?: string;
245
+ errorClassName?: string;
246
+ helperTextClassName?: string;
217
247
  onBlur?: VoidFunction;
218
248
  onChange?: OnChangeFn;
219
- }
249
+ onSearchChange?: (searchTerm: string) => void;
250
+ } & ({
251
+ isInfiniteScrollEnabled: true;
252
+ onFetchMoreOptions: (params: {
253
+ page: number;
254
+ pageSize: number;
255
+ termOfSearch?: string;
256
+ }) => Promise<{
257
+ data: Option_3[];
258
+ hasMore: boolean;
259
+ }>;
260
+ } | {
261
+ isInfiniteScrollEnabled?: false | undefined;
262
+ onFetchMoreOptions?: never;
263
+ });
220
264
 
221
265
  declare const dropdownVariants: (props?: ({
222
266
  hasError?: boolean | null | undefined;
267
+ disabled?: boolean | null | undefined;
223
268
  } & ClassProp) | undefined) => string;
224
269
 
225
270
  export declare const Filter: FilterComponentProps;
226
271
 
272
+ declare type FilterAction = {
273
+ label: string;
274
+ onClick: () => void;
275
+ variant?: ButtonProps['variant'];
276
+ };
277
+
227
278
  declare type FilterComponentProps = FC<FilterProps> & {
228
279
  BadgeMultiSelect: FC<BadgeMultiSelectProps>;
229
280
  DateFilterDropdown: FC<DateFilterDropdownProps>;
@@ -262,13 +313,13 @@ export declare const Input: ForwardRefExoticComponent<InputProps & RefAttributes
262
313
 
263
314
  declare interface InputProps extends InputHTMLAttributes<HTMLInputElement>, VariantProps<typeof inputVariants> {
264
315
  error?: string;
316
+ helperText?: string;
317
+ helperTextClassName?: string;
318
+ isRequired?: boolean;
319
+ isSearch?: boolean;
265
320
  label?: string | ReactNode;
266
321
  labelClassName?: string;
267
322
  theme?: Theme;
268
- isRequired?: boolean;
269
- isSearch?: boolean;
270
- helperText?: string;
271
- helperTextClassName?: string;
272
323
  }
273
324
 
274
325
  declare const inputVariants: (props?: ({
@@ -314,12 +365,20 @@ declare interface ModalProps extends PropsWithChildren, VariantProps<typeof moda
314
365
  className?: string;
315
366
  container?: Element | DocumentFragment;
316
367
  isOpen?: boolean;
368
+ showCloseButton?: boolean;
317
369
  theme?: Theme;
318
370
  onClose?: () => void;
319
371
  }
320
372
 
321
373
  declare const modalVariants: (props?: ClassProp | undefined) => string;
322
374
 
375
+ declare type MultiSelectFilter = {
376
+ key: string;
377
+ label: string;
378
+ position?: 'right' | 'left';
379
+ options: Option_5[];
380
+ };
381
+
323
382
  export declare const Navigation: FC<NavigationProps> & NavigationChildrenProps;
324
383
 
325
384
  declare type NavigationChildrenProps = {
@@ -413,7 +472,8 @@ declare type Option_2 = {
413
472
  };
414
473
 
415
474
  declare type Option_3 = {
416
- label: string | ReactNode;
475
+ label: string;
476
+ subLabel?: string | ReactNode;
417
477
  leftIcon?: ReactNode | string;
418
478
  value: string;
419
479
  };
@@ -429,7 +489,9 @@ declare type Option_5 = {
429
489
  variant?: BadgeProps['variant'];
430
490
  };
431
491
 
432
- export declare const PieChart: FC<Props_2>;
492
+ export declare const PhoneNumberInput: FC<Props_2>;
493
+
494
+ export declare const PieChart: FC<Props_3>;
433
495
 
434
496
  export declare const ProgressBar: FC<ProgressBarProps>;
435
497
 
@@ -457,15 +519,33 @@ declare type Props = {
457
519
  options: Option_4[];
458
520
  };
459
521
 
522
+ declare type Props_2 = InputHTMLAttributes<HTMLInputElement> & {
523
+ defaultCountryCode?: RegionCode;
524
+ disabled?: boolean;
525
+ error?: string;
526
+ helperText?: string;
527
+ helperTextClassName?: string;
528
+ isRequired?: boolean;
529
+ label?: string;
530
+ labelClassName?: string;
531
+ name?: string;
532
+ placeholder?: string;
533
+ showFlagOnSearch?: boolean;
534
+ showInputFilter?: boolean;
535
+ showNameOnSearch?: boolean;
536
+ showPlaceHolder?: boolean;
537
+ wrapperClassName?: string;
538
+ };
539
+
460
540
  /**
461
541
  * Props for the PieChart component
462
542
  */
463
- declare type Props_2 = {
543
+ declare type Props_3 = {
464
544
  /**
465
545
  * Array of hexadecimal colors for the borders of the pie chart segments
466
546
  * @default ['#FFFFFF', '#FFFFFF']
467
547
  */
468
- borderColors?: HexColor[];
548
+ borderColors?: HexColor[] | CSSColor[] | (HexColor | CSSColor)[];
469
549
  /**
470
550
  * Width of the border for pie chart segments in pixels
471
551
  * @default 0
@@ -475,7 +555,7 @@ declare type Props_2 = {
475
555
  * Array of hexadecimal colors for filling the pie chart segments
476
556
  * @default ['#525252', '#00D492']
477
557
  */
478
- colors?: HexColor[];
558
+ colors?: HexColor[] | CSSColor[] | (HexColor | CSSColor)[];
479
559
  /**
480
560
  * Percentage of the pie chart's center that should be cut out, creating a donut chart effect
481
561
  * @default 80
@@ -535,6 +615,68 @@ declare type Props_2 = {
535
615
  subtitle?: string;
536
616
  });
537
617
 
618
+ declare type Props_4<TData extends RowData> = CellContext<TData, string> & {
619
+ value?: string;
620
+ };
621
+
622
+ declare type Props_5<TData extends RowData_2> = VariantProps<typeof virtualizeTableVariants> & {
623
+ id: string | string[];
624
+ ariaLabel?: string;
625
+ columns: ColumnDef_2<TData, string>[];
626
+ data: TData[];
627
+ className?: string;
628
+ classNameHeaderActiveArrows?: string;
629
+ classNameHeaderArrows?: string;
630
+ classNameHeaderTable?: string;
631
+ classNameTable?: string;
632
+ classNameWrapperTable?: string;
633
+ queryOptions?: Omit<UseQueryOptions<any, any, any, any>, 'queryKey' | 'queryFn'>;
634
+ isLoading?: boolean;
635
+ fetchData?: (params: Record<string, string | number | string[] | number[] | undefined>) => Promise<{
636
+ data: TData[];
637
+ totalItemsCount?: number;
638
+ }>;
639
+ } & ({
640
+ showPagination: true;
641
+ showTotalItems?: boolean;
642
+ showDropdownPagination?: boolean;
643
+ showDotPagination?: boolean;
644
+ showFormPagination?: boolean;
645
+ pageSizes?: number[] | string[];
646
+ totalItems: number;
647
+ } | {
648
+ showPagination?: false | undefined;
649
+ showTotalItems?: never;
650
+ showDropdownPagination?: never;
651
+ showDotPagination?: never;
652
+ showFormPagination?: never;
653
+ pageSizes?: never;
654
+ totalItems?: never;
655
+ }) & ({
656
+ filterSearchPlaceholder?: string;
657
+ multiSelectFilter?: MultiSelectFilter[];
658
+ showFilter: true;
659
+ showFilterInput?: boolean;
660
+ filterActions?: FilterAction[];
661
+ showResetButton?: boolean;
662
+ } | {
663
+ filterSearchPlaceholder?: never;
664
+ multiSelectFilter?: never;
665
+ showFilter?: false | undefined;
666
+ showFilterInput?: never;
667
+ filterActions?: FilterAction[];
668
+ showResetButton?: never;
669
+ });
670
+
671
+ declare type Props_6<TData extends RowData> = CellContext<TData, unknown> & {
672
+ actions: Action<TData>[];
673
+ iconTriggerButtonClassName?: string;
674
+ triggerButtonClassName?: string;
675
+ wrapperActionsClassName?: string;
676
+ wrapperClassName?: string;
677
+ wrapperContentActionsClassName?: string;
678
+ };
679
+
538
680
  export declare const Radio: FC<RadioProps>;
539
681
 
540
682
  export declare const RadioCard: FC<RadioCardProps>;
@@ -615,6 +757,8 @@ declare type ResetButtonProps = ButtonProps & {
615
757
  onClick?: VoidFunction;
616
758
  };
617
759
 
760
+ export declare type RowData = RowData_2;
761
+
618
762
  declare interface RowProps extends React.HTMLAttributes<HTMLTableRowElement>, PropsWithChildren, VariantProps<typeof rowVariants> {
619
763
  width?: string;
620
764
  isSelected?: boolean;
@@ -637,11 +781,12 @@ declare type SidebarChildrenProps = {
637
781
  };
638
782
 
639
783
  declare interface SidebarProps extends VariantProps<typeof wrapperSiderbarVariants>, PropsWithChildren {
640
- wrapperClassName?: string;
641
- minWith?: number;
642
- maxWith?: number;
643
784
  canResize?: boolean;
785
+ dividerClassName?: string;
786
+ maxWith?: number;
787
+ minWith?: number;
644
788
  theme?: Theme;
789
+ wrapperClassName?: string;
645
790
  }
646
791
 
647
792
  export declare const Slider: FC<SliderProps_2>;
@@ -814,7 +959,7 @@ declare interface TooltipProps extends PropsWithChildren, VariantProps<typeof to
814
959
  }
815
960
 
816
961
  declare const tooltipVariants: (props?: ({
817
- position?: "left" | "right" | "bottom" | "top" | null | undefined;
962
+ position?: "left" | "right" | "top" | "bottom" | null | undefined;
818
963
  } & ClassProp) | undefined) => string;
819
964
 
820
965
  export declare const Trigger: FC<TriggerProps>;
@@ -829,6 +974,8 @@ declare const triggerVariants: (props?: ({
829
974
  variant?: "default" | "active" | "inactive" | null | undefined;
830
975
  } & ClassProp) | undefined) => string;
831
976
 
977
+ export declare const TruncateText: <TData>({ getValue, value }: Props_4<TData>) => JSX.Element;
978
+
832
979
  export declare const Typography: ForwardRefExoticComponent<Omit<TypographyProps, 'ref'> & RefAttributes<HTMLParagraphElement | HTMLHeadingElement>>;
833
980
 
834
981
  declare interface TypographyProps extends HTMLAttributes<ComponentRef<HeadingTag | 'p' | 'span'>>, VariantProps<typeof typographyVariants> {
@@ -846,6 +993,25 @@ export declare const useTheme: () => ThemeProps;
846
993
 
847
994
  export declare const useToggle: (initialState?: boolean) => [boolean, (value?: boolean) => void];
848
995
 
996
+ export declare const VirtualizedTable: VirtualizedTableCompound;
997
+
998
+ declare type VirtualizedTableCompound = (<TData extends RowData>(props: Props_5<TData>) => JSX_2.Element) & {
999
+ TruncateText: typeof TruncateText;
1000
+ Actions: <TData extends RowData>(props: Props_6<TData>) => JSX_2.Element | null;
1001
+ displayName?: string;
1002
+ };
1003
+
1004
+ declare const virtualizeTableVariants: (props?: ClassProp | undefined) => string;
1005
+
849
1006
  declare const wrapperSiderbarVariants: (props?: ClassProp | undefined) => string;
850
1007
 
851
1008
  export { }
1009
+
1010
+
1011
+ declare module '@tanstack/react-table' {
1012
+ interface ColumnMeta<TData extends RowData, TValue> {
1013
+ className?: string | ((row: TData) => string);
1014
+ attributes?: Record<string, string | number | boolean>;
1015
+ headerClassName?: string;
1016
+ }
1017
+ }
package/dist/index.js CHANGED
@@ -1,104 +1,112 @@
1
- import { Alert as e } from "./components/Alert/Alert.js";
2
- import { AlertDialog as p } from "./components/AlertDialog/AlertDialog.js";
3
- import { Autocomplete as x } from "./components/Autocomplete/Autocomplete.js";
4
- import { Badge as a } from "./components/Badge/Badge.js";
5
- import { Breadcrumb as d } from "./components/Breadcrumb/Breadcrumb.js";
6
- import { Button as n } from "./components/Button/Button.js";
7
- import { Card as T } from "./components/Card/Card.js";
8
- import { Checkbox as c } from "./components/Checkbox/Checkbox.js";
9
- import { DatePicker as h } from "./components/Datepicker/DatePicker.js";
10
- import { Divider as D } from "./components/Divider/Divider.js";
11
- import { Dropdown as v } from "./components/Dropdown/Dropdown.js";
1
+ import { cn as e } from "./utils/index.js";
2
+ import { Alert as p } from "./components/Alert/Alert.js";
3
+ import { AlertDialog as x } from "./components/AlertDialog/AlertDialog.js";
4
+ import { Autocomplete as a } from "./components/Autocomplete/Autocomplete.js";
5
+ import { Badge as n } from "./components/Badge/Badge.js";
6
+ import { Breadcrumb as g } from "./components/Breadcrumb/Breadcrumb.js";
7
+ import { Button as T } from "./components/Button/Button.js";
8
+ import { Card as c } from "./components/Card/Card.js";
9
+ import { Checkbox as h } from "./components/Checkbox/Checkbox.js";
10
+ import { DatePicker as C } from "./components/Datepicker/DatePicker.js";
11
+ import { Divider as v } from "./components/Divider/Divider.js";
12
+ import { Dropdown as N } from "./components/Dropdown/Dropdown.js";
12
13
  import { DropdownButton as S } from "./components/DropdownButton/DropdownButton.js";
13
- import { Filter as P } from "./components/Filter/Filter.js";
14
- import { BadgeMultiSelect as w } from "./components/Filter/components/BadgeDropdown/BadgeMultiSelect.js";
15
- import { DateFilterDropdown as k } from "./components/Filter/components/DateFilterDropdown/DateFilterDropdown.js";
16
- import { Input as G } from "./components/Input/Input.js";
17
- import { Loading as M } from "./components/Loading/Loading.js";
18
- import { M as I } from "./Modal-V67Uz78z.js";
14
+ import { Filter as w } from "./components/Filter/Filter.js";
15
+ import { BadgeMultiSelect as k } from "./components/Filter/components/BadgeDropdown/BadgeMultiSelect.js";
16
+ import { DateFilterDropdown as G } from "./components/Filter/components/DateFilterDropdown/DateFilterDropdown.js";
17
+ import { Input as L } from "./components/Input/Input.js";
18
+ import { Loading as y } from "./components/Loading/Loading.js";
19
+ import { M as O } from "./Modal-5xSxFoaD.js";
19
20
  import { NumberInput as j } from "./components/NumberInput/NumberInput.js";
20
- import { PieChart as z } from "./components/PieChart/PieChart.js";
21
- import { ProgressBar as H } from "./components/ProgressBar/ProgressBar.js";
22
- import { Radio as K } from "./components/Radio/Radio.js";
23
- import { RadioCard as U } from "./components/RadioCard/RadioCard.js";
24
- import { RadioCardGroup as W } from "./components/RadioCardGroup/RadioCardGroup.js";
25
- import { RadioGroup as Y } from "./components/RadioGroup/RadioGroup.js";
26
- import { Range as _ } from "./components/Range/Range.js";
27
- import { Footer as oo } from "./components/Sidebar/components/Footer/Footer.js";
28
- import { Logo as eo } from "./components/Sidebar/components/Logo/Logo.js";
29
- import { Navigation as po } from "./components/Sidebar/components/Navigation/Navigation.js";
30
- import { NavigationGroup as xo } from "./components/Sidebar/components/NavigationGroup/NavigationGroup.js";
31
- import { NavigationOption as ao } from "./components/Sidebar/components/NavigationOption/NavigationOption.js";
32
- import { NavigationSeparator as go } from "./components/Sidebar/components/NavigationSeparator/NavigationSeparator.js";
33
- import { Sidebar as lo } from "./components/Sidebar/Sidebar.js";
34
- import { Slider as uo } from "./components/Slider/Slider.js";
35
- import { Switch as so } from "./components/Switch/Switch.js";
36
- import { Table as Co } from "./components/Table/Table.js";
37
- import { Content as bo } from "./components/Tabs/components/Content.js";
38
- import { List as Bo } from "./components/Tabs/components/List.js";
39
- import { Tabs as No } from "./components/Tabs/Tabs.js";
40
- import { Trigger as Ro } from "./components/Tabs/components/Trigger.js";
41
- import { Tag as Ao } from "./components/Tag/Tag.js";
42
- import { TagSelect as Fo } from "./components/TagSelect/TagSelect.js";
43
- import { TextArea as Lo } from "./components/TextArea/TextArea.js";
44
- import { TimePicker as yo } from "./components/TimePicker/TimePicker.js";
45
- import { Toast as Oo } from "./components/Toast/Toast.js";
46
- import { Tooltip as qo } from "./components/Tooltip/Tooltip.js";
47
- import { Typography as Eo } from "./components/Typography/Typography.js";
48
- import { ThemeContext as Jo } from "./contexts/theme.context.js";
49
- import { useTheme as Qo } from "./contexts/theme.hook.js";
50
- import { ThemeProvider as Vo } from "./contexts/theme.provider.js";
51
- import { useToggle as Xo } from "./hooks/useToggle.js";
21
+ import { PhoneNumberInput as E } from "./components/PhoneNumberInput/PhoneNumberInput.js";
22
+ import { PieChart as J } from "./components/PieChart/PieChart.js";
23
+ import { ProgressBar as Q } from "./components/ProgressBar/ProgressBar.js";
24
+ import { Radio as W } from "./components/Radio/Radio.js";
25
+ import { RadioCard as Y } from "./components/RadioCard/RadioCard.js";
26
+ import { RadioCardGroup as _ } from "./components/RadioCardGroup/RadioCardGroup.js";
27
+ import { RadioGroup as oo } from "./components/RadioGroup/RadioGroup.js";
28
+ import { Range as eo } from "./components/Range/Range.js";
29
+ import { Footer as po } from "./components/Sidebar/components/Footer/Footer.js";
30
+ import { Logo as xo } from "./components/Sidebar/components/Logo/Logo.js";
31
+ import { Navigation as ao } from "./components/Sidebar/components/Navigation/Navigation.js";
32
+ import { NavigationGroup as no } from "./components/Sidebar/components/NavigationGroup/NavigationGroup.js";
33
+ import { NavigationOption as uo } from "./components/Sidebar/components/NavigationOption/NavigationOption.js";
34
+ import { NavigationSeparator as lo } from "./components/Sidebar/components/NavigationSeparator/NavigationSeparator.js";
35
+ import { Sidebar as bo } from "./components/Sidebar/Sidebar.js";
36
+ import { Slider as so } from "./components/Slider/Slider.js";
37
+ import { Switch as Do } from "./components/Switch/Switch.js";
38
+ import { Table as Bo } from "./components/Table/Table.js";
39
+ import { Content as Po } from "./components/Tabs/components/Content.js";
40
+ import { List as Ro } from "./components/Tabs/components/List.js";
41
+ import { Tabs as Ao } from "./components/Tabs/Tabs.js";
42
+ import { Trigger as Fo } from "./components/Tabs/components/Trigger.js";
43
+ import { Tag as Io } from "./components/Tag/Tag.js";
44
+ import { TagSelect as Mo } from "./components/TagSelect/TagSelect.js";
45
+ import { TextArea as zo } from "./components/TextArea/TextArea.js";
46
+ import { TimePicker as Vo } from "./components/TimePicker/TimePicker.js";
47
+ import { Toast as qo } from "./components/Toast/Toast.js";
48
+ import { Tooltip as Ho } from "./components/Tooltip/Tooltip.js";
49
+ import { Typography as Ko } from "./components/Typography/Typography.js";
50
+ import { TruncateText as Uo } from "./components/VirtualizedTable/components/TruncateText/TruncateText.js";
51
+ import { VirtualizedTable as Xo } from "./components/VirtualizedTable/VirtualizedTable.js";
52
+ import { ThemeContext as Zo } from "./contexts/theme.context.js";
53
+ import { useTheme as $o } from "./contexts/theme.hook.js";
54
+ import { ThemeProvider as rr } from "./contexts/theme.provider.js";
55
+ import { useToggle as tr } from "./hooks/useToggle.js";
52
56
  export {
53
- e as Alert,
54
- p as AlertDialog,
55
- x as Autocomplete,
56
- a as Badge,
57
- w as BadgeMultiSelect,
58
- d as Breadcrumb,
59
- n as Button,
60
- T as Card,
61
- c as Checkbox,
62
- bo as Content,
63
- k as DateFilterDropdown,
64
- h as DatePicker,
65
- D as Divider,
66
- v as Dropdown,
57
+ p as Alert,
58
+ x as AlertDialog,
59
+ a as Autocomplete,
60
+ n as Badge,
61
+ k as BadgeMultiSelect,
62
+ g as Breadcrumb,
63
+ T as Button,
64
+ c as Card,
65
+ h as Checkbox,
66
+ Po as Content,
67
+ G as DateFilterDropdown,
68
+ C as DatePicker,
69
+ v as Divider,
70
+ N as Dropdown,
67
71
  S as DropdownButton,
68
- P as Filter,
69
- oo as Footer,
70
- G as Input,
71
- Bo as List,
72
- M as Loading,
73
- eo as Logo,
74
- I as Modal,
75
- po as Navigation,
76
- xo as NavigationGroup,
77
- ao as NavigationOption,
78
- go as NavigationSeparator,
72
+ w as Filter,
73
+ po as Footer,
74
+ L as Input,
75
+ Ro as List,
76
+ y as Loading,
77
+ xo as Logo,
78
+ O as Modal,
79
+ ao as Navigation,
80
+ no as NavigationGroup,
81
+ uo as NavigationOption,
82
+ lo as NavigationSeparator,
79
83
  j as NumberInput,
80
- z as PieChart,
81
- H as ProgressBar,
82
- K as Radio,
83
- U as RadioCard,
84
- W as RadioCardGroup,
85
- Y as RadioGroup,
86
- _ as Range,
87
- lo as Sidebar,
88
- uo as Slider,
89
- so as Switch,
90
- Co as Table,
91
- No as Tabs,
92
- Ao as Tag,
93
- Fo as TagSelect,
94
- Lo as TextArea,
95
- Jo as ThemeContext,
96
- Vo as ThemeProvider,
97
- yo as TimePicker,
98
- Oo as Toast,
99
- qo as Tooltip,
100
- Ro as Trigger,
101
- Eo as Typography,
102
- Qo as useTheme,
103
- Xo as useToggle
84
+ E as PhoneNumberInput,
85
+ J as PieChart,
86
+ Q as ProgressBar,
87
+ W as Radio,
88
+ Y as RadioCard,
89
+ _ as RadioCardGroup,
90
+ oo as RadioGroup,
91
+ eo as Range,
92
+ bo as Sidebar,
93
+ so as Slider,
94
+ Do as Switch,
95
+ Bo as Table,
96
+ Ao as Tabs,
97
+ Io as Tag,
98
+ Mo as TagSelect,
99
+ zo as TextArea,
100
+ Zo as ThemeContext,
101
+ rr as ThemeProvider,
102
+ Vo as TimePicker,
103
+ qo as Toast,
104
+ Ho as Tooltip,
105
+ Fo as Trigger,
106
+ Uo as TruncateText,
107
+ Ko as Typography,
108
+ Xo as VirtualizedTable,
109
+ e as cn,
110
+ $o as useTheme,
111
+ tr as useToggle
104
112
  };