@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.
- package/dist/DatePicker.css +1 -1
- package/dist/Modal-5xSxFoaD.js +99 -0
- package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/dist/chevron-down-DgT-uSF9.js +5 -0
- package/dist/chevron-right-DYvXLeql.js +7 -0
- package/dist/chevron-up-DrQr2Fwd.js +5 -0
- package/dist/components/Alert/Alert.js +2 -2
- package/dist/components/AlertDialog/AlertDialog.js +1 -1
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/Badge/Badge.js +30 -33
- package/dist/components/Badge/Badge.variants.js +8 -6
- package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/components/Breadcrumb/components/Item/Item.js +24 -23
- package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Button/Button.variants.js +1 -1
- package/dist/components/Card/Card.variants.js +5 -9
- package/dist/components/Checkbox/Checkbox.js +6 -6
- package/dist/components/Command/Command.js +2 -2
- package/dist/components/Command/components/Command.js +1 -1
- package/dist/components/Command/components/CommandEmpty.js +1 -1
- package/dist/components/Command/components/CommandGroup.js +1 -1
- package/dist/components/Command/components/CommandInput.js +2 -2
- package/dist/components/Command/components/CommandItem.js +1 -1
- package/dist/components/Command/components/CommandList.js +1 -1
- package/dist/components/Command/components/CommandSeparator.js +1 -1
- package/dist/components/Command/components/DialogContent.js +2 -2
- package/dist/components/Command/components/DialogOverlay.js +1 -1
- package/dist/components/Datepicker/DatePicker.js +1209 -1147
- package/dist/components/Divider/Divider.variants.js +1 -1
- package/dist/components/Dropdown/Dropdown.js +46 -28
- package/dist/components/Dropdown/Dropdown.variants.js +32 -9
- package/dist/components/Dropdown/components/List/List.js +133 -54
- package/dist/components/Dropdown/components/List/List.variants.js +9 -7
- package/dist/components/Dropdown/components/ListItem/ListItem.js +74 -24
- package/dist/components/Dropdown/components/ListItem/ListItem.variants.js +9 -7
- package/dist/components/Dropdown/components/Wrapper.js +144 -109
- package/dist/components/Dropdown/constants/index.js +4 -0
- package/dist/components/Dropdown/constants/pagination.js +4 -0
- package/dist/components/Dropdown/contexts/dropdown.context.js +26 -8
- package/dist/components/Dropdown/contexts/dropdown.provider.js +48 -19
- package/dist/components/Dropdown/hooks/useDropdown.js +83 -39
- package/dist/components/Dropdown/hooks/useNavigationList.js +28 -36
- package/dist/components/DropdownButton/DropdownButton.js +1 -1
- package/dist/components/Filter/Filter.variants.js +2 -2
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +1 -1
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +1 -1
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Input/Input.variants.js +1 -1
- package/dist/components/Loading/Loading.js +1 -7
- package/dist/components/Modal/Modal.js +2 -2
- package/dist/components/Modal/components/Body/Body.js +1 -1
- package/dist/components/Modal/components/Footer/Footer.js +1 -1
- package/dist/components/Modal/components/Header/Header.js +1 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.js +3 -3
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/NumberInput/NumberInput.js +2 -2
- package/dist/components/PhoneNumberInput/PhoneNumberInput.js +8 -0
- package/dist/components/PhoneNumberInput/PhoneNumberInput.variants.js +45 -0
- package/dist/components/PhoneNumberInput/components/FlagContent/FlagContent.js +27 -0
- package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +629 -0
- package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +36 -0
- package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +45 -0
- package/dist/components/PhoneNumberInput/components/Wrapper.js +625 -0
- package/dist/components/PhoneNumberInput/components/index.js +6 -0
- package/dist/components/PhoneNumberInput/contexts/index.js +8 -0
- package/dist/components/PhoneNumberInput/contexts/phone-number.context.js +28 -0
- package/dist/components/PhoneNumberInput/contexts/phone-number.hook.js +13 -0
- package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +6139 -0
- package/dist/components/PhoneNumberInput/utils/index.js +11 -0
- package/dist/components/PieChart/PieChart.js +647 -664
- package/dist/components/RadioCard/RadioCard.variants.js +1 -6
- package/dist/components/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/Range/Range.js +1 -1
- package/dist/components/Sidebar/Sidebar.variants.js +2 -2
- package/dist/components/Sidebar/components/Wrapper/Wrapper.js +29 -28
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Switch/Switch.js +8 -8
- package/dist/components/Switch/Switch.variants.js +4 -4
- package/dist/components/Tabs/Tabs.js +1 -1
- package/dist/components/Tabs/Tabs.variants.js +45 -24
- package/dist/components/Tabs/components/Content.js +1 -1
- package/dist/components/Tabs/components/List.js +1 -1
- package/dist/components/Tabs/components/Trigger.js +9 -8
- package/dist/components/Tag/Tag.js +1 -1
- package/dist/components/TagSelect/components/Wrapper/Wrapper.js +98 -49
- package/dist/components/TimePicker/TimePicker.variants.js +2 -2
- package/dist/components/TimePicker/components/Wrapper/Wrapper.js +2 -2
- package/dist/components/Toast/Toast.js +206 -181
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/Typography/Typography.variants.js +18 -23
- package/dist/components/VirtualizedTable/VirtualizedTable.js +119 -0
- package/dist/components/VirtualizedTable/VirtualizedTable.variants.js +5 -0
- package/dist/components/VirtualizedTable/assets/chevron-down.js +25 -0
- package/dist/components/VirtualizedTable/assets/chevron-up.js +25 -0
- package/dist/components/VirtualizedTable/assets/index.js +6 -0
- package/dist/components/VirtualizedTable/components/Actions/Actions.js +72 -0
- package/dist/components/VirtualizedTable/components/Body/Body.js +51 -0
- package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.js +165 -0
- package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +34 -0
- package/dist/components/VirtualizedTable/components/Filter/Filter.js +88 -0
- package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +48 -0
- package/dist/components/VirtualizedTable/components/Header/Header.js +84 -0
- package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +53 -0
- package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +67 -0
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +34 -0
- package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.js +27 -0
- package/dist/components/VirtualizedTable/components/index.js +16 -0
- package/dist/components/VirtualizedTable/constants/index.js +5 -0
- package/dist/components/VirtualizedTable/constants/pagination.js +5 -0
- package/dist/components/VirtualizedTable/contexts/index.js +8 -0
- package/dist/components/VirtualizedTable/contexts/table.context.js +32 -0
- package/dist/components/VirtualizedTable/contexts/table.hook.js +11 -0
- package/dist/components/VirtualizedTable/contexts/table.provider.js +85 -0
- package/dist/components/index.js +79 -73
- package/dist/contexts/theme.provider.js +0 -1
- package/dist/{createLucideIcon-DbC6TvM5.js → createLucideIcon-D4r5Phnh.js} +0 -24
- package/dist/debounce-BFejQm9P.js +200 -0
- package/dist/ellipsis-vertical-BVPtjl5f.js +9 -0
- package/dist/{index-h-Ul0anl.js → index--V_ZsiQe.js} +1 -22
- package/dist/index-2hB40Iuc.js +1873 -0
- package/dist/index-BZPx6jYI.js +8 -0
- package/dist/{index-bwWKd82e.js → index-BbQkJE5L.js} +1 -1
- package/dist/index-BtQfgaSF.js +60 -0
- package/dist/index-C3tHPg8y.js +662 -0
- package/dist/index-CIAmiWcw.js +200 -0
- package/dist/index-CSFe9uC5.js +14 -0
- package/dist/index-CSWGJT-v.js +1722 -0
- package/dist/index-CigKKiZS.js +91 -0
- package/dist/index-DDByhzds.js +137 -0
- package/dist/{index-BAraV3ai.js → index-DH2Fnov1.js} +11 -12
- package/dist/index-DLcqcWxM.js +29 -0
- package/dist/index-Dbt2vBmS.js +136 -0
- package/dist/{index-DB2XhXHn.js → index-DpW9ExsS.js} +7 -7
- package/dist/index-DrWQH0QF.js +55 -0
- package/dist/{index-D3xzCzcO.js → index-X4k_cU8k.js} +4 -4
- package/dist/index-kyuBfLcN.js +479 -0
- package/dist/{index-C1g_chDT.js → index-mPY_8Y5v.js} +2 -2
- package/dist/index-ohdbKsws.js +27 -0
- package/dist/index.d.ts +184 -18
- package/dist/index.js +106 -98
- package/dist/libphonenumber-_7ZyKWA7.js +11549 -0
- package/dist/package.json +46 -32
- package/dist/styles.css +1 -1
- package/dist/ui/civo-theme.css +191 -167
- package/dist/{useBreadcrumb-B8DnuqkR.js → useBreadcrumb-BAHbGQ_O.js} +0 -10
- package/dist/utils/index.js +534 -501
- package/dist/{x-BPcqkRZd.js → x-DPU9OdYH.js} +1 -1
- package/package.json +46 -32
- package/dist/Modal-V67Uz78z.js +0 -98
- package/dist/_commonjsHelpers-C6fGbg64.js +0 -6
- package/dist/chevron-down-BLZPftpV.js +0 -11
- package/dist/chevron-up-RLP4nX7V.js +0 -54
- package/dist/index-BXuxPoz7.js +0 -435
- package/dist/index-BfXxHr_2.js +0 -125
- package/dist/index-C9T9HQaa.js +0 -423
- package/dist/index-CZnD2QxM.js +0 -32
- package/dist/index-CrBonFvu.js +0 -144
- package/dist/index-Cvx4lqTq.js +0 -47
- package/dist/index-DQH6odE9.js +0 -82
- package/dist/index-Oq5GlCHP.js +0 -131
- 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
|
|
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
|
|
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
|
|
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
|
|
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" | "
|
|
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 {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
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
|
|
14
|
-
import { BadgeMultiSelect as
|
|
15
|
-
import { DateFilterDropdown as
|
|
16
|
-
import { Input as
|
|
17
|
-
import { Loading as
|
|
18
|
-
import { M as
|
|
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 {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
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
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
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
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
so as
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
Ao as
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
qo as
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
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
|
};
|