@6thbridge/hexa 0.0.96 → 0.0.98
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/index.d.mts +100 -26
- package/dist/index.d.ts +100 -26
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/dist/output.css +46 -0
- package/package.json +5 -4
- package/tailwind.config.js +14 -0
package/dist/index.d.mts
CHANGED
|
@@ -12,6 +12,7 @@ import { OTPInputProps as OTPInputProps$1 } from 'react-otp-input';
|
|
|
12
12
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
13
13
|
import { Drawer as Drawer$1 } from 'vaul';
|
|
14
14
|
import { RowData, Row, Table as Table$1 } from '@tanstack/react-table';
|
|
15
|
+
import { UseFormReturn } from 'react-hook-form';
|
|
15
16
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
16
17
|
import * as zustand from 'zustand';
|
|
17
18
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
@@ -264,6 +265,20 @@ type OTPInputProps = DefailtInputProps & VariantProps<typeof otpInputVariants> &
|
|
|
264
265
|
};
|
|
265
266
|
declare const OTPInput: ({ numInputs, inputStyle, containerStyle, placeholder, status, inputMode, inputType, ...props }: OTPInputProps) => React$1.JSX.Element;
|
|
266
267
|
|
|
268
|
+
type AccordionItemType = {
|
|
269
|
+
key: string;
|
|
270
|
+
title: React.ReactNode;
|
|
271
|
+
content: React.ReactNode;
|
|
272
|
+
};
|
|
273
|
+
type AccordionProps = {
|
|
274
|
+
items: AccordionItemType[];
|
|
275
|
+
type?: "single" | "multiple";
|
|
276
|
+
defaultValue?: string | string[];
|
|
277
|
+
onChange?: (value: string | string[]) => void;
|
|
278
|
+
className?: string;
|
|
279
|
+
};
|
|
280
|
+
declare function Accordion({ items, type, defaultValue, onChange, className, }: AccordionProps): React$1.JSX.Element;
|
|
281
|
+
|
|
267
282
|
declare const PopoverRoot: React$1.FC<PopoverPrimitive.PopoverProps>;
|
|
268
283
|
declare const PopoverTrigger: React$1.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
269
284
|
declare const PopoverContent: React$1.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
@@ -474,37 +489,83 @@ type TableBulkRowActionsProps = {
|
|
|
474
489
|
id?: string;
|
|
475
490
|
};
|
|
476
491
|
|
|
477
|
-
type
|
|
492
|
+
type FilterSelectOption = {
|
|
478
493
|
value: string;
|
|
479
494
|
label: string;
|
|
480
495
|
};
|
|
481
|
-
type
|
|
482
|
-
|
|
496
|
+
type FilterType = "input" | "drop-down" | "date-range" | "multi" | "date" | "radio";
|
|
497
|
+
/**
|
|
498
|
+
* Base properties shared by all filter types.
|
|
499
|
+
*/
|
|
500
|
+
interface FilterBase {
|
|
483
501
|
key: string;
|
|
484
502
|
label: string;
|
|
503
|
+
type: FilterType;
|
|
485
504
|
placeholder?: string;
|
|
486
|
-
}
|
|
487
|
-
|
|
505
|
+
}
|
|
506
|
+
/**
|
|
507
|
+
* Input-specific filter properties.
|
|
508
|
+
*/
|
|
509
|
+
interface FilterInput extends FilterBase, Omit<InputProps, "value" | "onChange" | "type" | "label"> {
|
|
488
510
|
type: "input";
|
|
489
|
-
}
|
|
490
|
-
|
|
511
|
+
}
|
|
512
|
+
/**
|
|
513
|
+
* Drop-down (Select) specific filter properties.
|
|
514
|
+
*/
|
|
515
|
+
interface FilterDropDown extends FilterBase {
|
|
516
|
+
type: "drop-down";
|
|
517
|
+
options: FilterSelectOption[];
|
|
518
|
+
hideSearch?: boolean;
|
|
519
|
+
}
|
|
520
|
+
/**
|
|
521
|
+
* Radio specific filter properties.
|
|
522
|
+
*/
|
|
523
|
+
interface FilterRadio extends FilterBase {
|
|
524
|
+
type: "radio";
|
|
525
|
+
options: FilterSelectOption[];
|
|
526
|
+
}
|
|
527
|
+
/**
|
|
528
|
+
* Date specific filter properties.
|
|
529
|
+
*/
|
|
530
|
+
interface FilterDate extends FilterBase {
|
|
491
531
|
type: "date";
|
|
492
532
|
date?: string | Date;
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
533
|
+
}
|
|
534
|
+
/**
|
|
535
|
+
* Multi-select specific filter properties.
|
|
536
|
+
*/
|
|
537
|
+
interface FilterMultiSelect extends FilterBase {
|
|
538
|
+
type: "multi";
|
|
539
|
+
options: FilterSelectOption[];
|
|
497
540
|
hideSearch?: boolean;
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
541
|
+
}
|
|
542
|
+
/**
|
|
543
|
+
* Date range specific filter properties.
|
|
544
|
+
*/
|
|
545
|
+
interface FilterDateRange extends FilterBase {
|
|
546
|
+
type: "date-range";
|
|
547
|
+
}
|
|
548
|
+
/**
|
|
549
|
+
* Discriminated union of all supported filter item configurations.
|
|
550
|
+
*/
|
|
551
|
+
type FilterListItem = FilterInput | FilterDropDown | FilterRadio | FilterDate | FilterMultiSelect | FilterDateRange;
|
|
552
|
+
/**
|
|
553
|
+
* Alias for backward compatibility.
|
|
554
|
+
*/
|
|
507
555
|
type FilterListOptions = FilterListItem[];
|
|
556
|
+
/**
|
|
557
|
+
* Type alias for filter values, used to avoid 'any' in filter state management.
|
|
558
|
+
*/
|
|
559
|
+
type FilterValues = Record<string, string>;
|
|
560
|
+
/**
|
|
561
|
+
* Shared props for individual filter fields to eliminate 'any'.
|
|
562
|
+
*/
|
|
563
|
+
type FilterFieldProps<T extends FilterListItem = FilterListItem> = {
|
|
564
|
+
filter: T;
|
|
565
|
+
id: string;
|
|
566
|
+
form: UseFormReturn<FilterValues>;
|
|
567
|
+
onClear?: (fieldKey: string) => void;
|
|
568
|
+
};
|
|
508
569
|
|
|
509
570
|
type PaginationProps = {
|
|
510
571
|
currentPage?: number;
|
|
@@ -552,6 +613,7 @@ type TableProps<T extends RowData> = {
|
|
|
552
613
|
FilterMenu?: ReactNode;
|
|
553
614
|
setAppliedFilters?: (values: Record<string, any>) => void;
|
|
554
615
|
filterListOptions?: FilterListItem[];
|
|
616
|
+
filterValues?: Record<string, any>;
|
|
555
617
|
buttonClassName?: string;
|
|
556
618
|
download?: TableDownloadProps;
|
|
557
619
|
id?: string;
|
|
@@ -571,7 +633,7 @@ type TableProps<T extends RowData> = {
|
|
|
571
633
|
};
|
|
572
634
|
emptyDataMessage?: ReactNode;
|
|
573
635
|
};
|
|
574
|
-
declare const Table: <T extends RowData>({ table, isMobile, onRowClick, id, onRefetch, isRefetching, FilterMenu, ExtraNode, onExport, search, download, isLoading, pagination, filterListOptions, setAppliedFilters, onFilterChange, tableBulkActions, emptyDataMessage, }: TableProps<T>) => React$1.JSX.Element;
|
|
636
|
+
declare const Table: <T extends RowData>({ table, isMobile, onRowClick, id, onRefetch, isRefetching, FilterMenu, ExtraNode, onExport, search, download, isLoading, pagination, filterListOptions, filterValues, setAppliedFilters, onFilterChange, tableBulkActions, emptyDataMessage, }: TableProps<T>) => React$1.JSX.Element;
|
|
575
637
|
|
|
576
638
|
type PageDataToolbarProps = {
|
|
577
639
|
onRefetch?: () => void;
|
|
@@ -583,10 +645,11 @@ type PageDataToolbarProps = {
|
|
|
583
645
|
isRefetching?: boolean;
|
|
584
646
|
setAppliedFilters?: (values: Record<string, any>) => void;
|
|
585
647
|
onFilterChange?: (values: Record<string, any>) => void;
|
|
648
|
+
filterValues?: Record<string, any>;
|
|
586
649
|
filterListOptions?: FilterListItem[];
|
|
587
650
|
id?: string;
|
|
588
651
|
};
|
|
589
|
-
declare const PageDataToolbar: ({ onRefetch, search, FilterMenu, ExtraNode, onExport, download, isRefetching, filterListOptions, setAppliedFilters, onFilterChange, id, }: PageDataToolbarProps) => React$1.JSX.Element;
|
|
652
|
+
declare const PageDataToolbar: ({ onRefetch, search, FilterMenu, ExtraNode, onExport, download, isRefetching, filterListOptions, filterValues, setAppliedFilters, onFilterChange, id, }: PageDataToolbarProps) => React$1.JSX.Element;
|
|
590
653
|
|
|
591
654
|
declare const PermissionsContext: React$1.Context<ResourcePermissions | undefined>;
|
|
592
655
|
declare const PermissionsProvider: ({ permissions, children, }: {
|
|
@@ -631,13 +694,24 @@ declare const RadioGroupItem: React$1.ForwardRefExoticComponent<Omit<RadioGroupP
|
|
|
631
694
|
className?: string;
|
|
632
695
|
} & React$1.RefAttributes<HTMLButtonElement>>;
|
|
633
696
|
|
|
634
|
-
type
|
|
697
|
+
type FilterContentProps = {
|
|
698
|
+
filters: FilterListItem[];
|
|
699
|
+
values?: FilterValues;
|
|
700
|
+
onChange?: (values: FilterValues) => void;
|
|
701
|
+
onApply?: (values: FilterValues) => void;
|
|
702
|
+
onReset?: () => void;
|
|
703
|
+
/** Called when a single field is cleared, so the parent can update applied state + URL for that key only. */
|
|
704
|
+
onClearApplied?: (fieldKey: string) => void;
|
|
705
|
+
id?: string;
|
|
706
|
+
setAppliedFilters?: (values: FilterValues) => void;
|
|
707
|
+
};
|
|
708
|
+
|
|
709
|
+
type FilterPopoverProps = Omit<FilterContentProps, "onApply"> & {
|
|
635
710
|
isOpen?: boolean;
|
|
636
711
|
trigger?: ReactNode;
|
|
637
712
|
id?: string;
|
|
638
|
-
onChange?: (values: Record<string, any>) => void;
|
|
639
713
|
};
|
|
640
|
-
declare const FilterPopover: ({ filters, setAppliedFilters, isOpen, onChange, id, }: FilterPopoverProps) => React$1.JSX.Element | null;
|
|
714
|
+
declare const FilterPopover: ({ filters, setAppliedFilters, isOpen, onChange, values, id, }: FilterPopoverProps) => React$1.JSX.Element | null;
|
|
641
715
|
|
|
642
716
|
interface FilterSliceType {
|
|
643
717
|
filters: Record<string, any> | null;
|
|
@@ -865,4 +939,4 @@ declare const TagsInput: ({ value, onChange, options, label, error, placeholder,
|
|
|
865
939
|
|
|
866
940
|
declare function cn(...inputs: ClassValue[]): string;
|
|
867
941
|
|
|
868
|
-
export { AmountAction, Banner, Button, CalendarInput, CopyableLabel, Country, CurrencySymbolMap, DateAction, DebouncedInput, DevBanner, Dialog, Drawer, DrawerClose, type DrawerPropsType, DrawerRoot, FeatureBanner, type FilterListItem, type FilterListOptions, FilterPopover, FlagComponent, FormLabel, type FormatCurrencyOptions, HasResourcePermission, Input, Loader, LocaleSelector, MultiSelect, type MultiSelectDataType, MultiSelectTrigger, OTPInput, PageDataToolbar, Pagination, PasswordInput, PermissionsContext, PermissionsProvider, PhoneInput, Popover, PopoverContent, PopoverRoot, PopoverTrigger, RadioGroup, RadioGroupItem, type ResourcePermission, type ResourcePermissionProps, type ResourcePermissions, RichTextEditor, ScrollArea, Select, Sidebar, Status, StringAction, Table, type TableBulkRowActionsProps, type TablePaginationProps, Tabs, type TagOption, TagsInput, type TagsInputProps, TextOverflow, type TextOverflowProps, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipRoot, TooltipTrigger, buttonVariants, cn, useFilterStore, useHasPermission, usePermissions };
|
|
942
|
+
export { Accordion, type AccordionItemType, type AccordionProps, AmountAction, Banner, Button, CalendarInput, CopyableLabel, Country, CurrencySymbolMap, DateAction, DebouncedInput, DevBanner, Dialog, Drawer, DrawerClose, type DrawerPropsType, DrawerRoot, FeatureBanner, type FilterFieldProps, type FilterListItem, type FilterListOptions, FilterPopover, FlagComponent, FormLabel, type FormatCurrencyOptions, HasResourcePermission, Input, Loader, LocaleSelector, MultiSelect, type MultiSelectDataType, MultiSelectTrigger, OTPInput, PageDataToolbar, Pagination, PasswordInput, PermissionsContext, PermissionsProvider, PhoneInput, Popover, PopoverContent, PopoverRoot, PopoverTrigger, RadioGroup, RadioGroupItem, type ResourcePermission, type ResourcePermissionProps, type ResourcePermissions, RichTextEditor, ScrollArea, Select, Sidebar, Status, StringAction, Table, type TableBulkRowActionsProps, type TablePaginationProps, Tabs, type TagOption, TagsInput, type TagsInputProps, TextOverflow, type TextOverflowProps, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipRoot, TooltipTrigger, buttonVariants, cn, useFilterStore, useHasPermission, usePermissions };
|
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ import { OTPInputProps as OTPInputProps$1 } from 'react-otp-input';
|
|
|
12
12
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
13
13
|
import { Drawer as Drawer$1 } from 'vaul';
|
|
14
14
|
import { RowData, Row, Table as Table$1 } from '@tanstack/react-table';
|
|
15
|
+
import { UseFormReturn } from 'react-hook-form';
|
|
15
16
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
16
17
|
import * as zustand from 'zustand';
|
|
17
18
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
@@ -264,6 +265,20 @@ type OTPInputProps = DefailtInputProps & VariantProps<typeof otpInputVariants> &
|
|
|
264
265
|
};
|
|
265
266
|
declare const OTPInput: ({ numInputs, inputStyle, containerStyle, placeholder, status, inputMode, inputType, ...props }: OTPInputProps) => React$1.JSX.Element;
|
|
266
267
|
|
|
268
|
+
type AccordionItemType = {
|
|
269
|
+
key: string;
|
|
270
|
+
title: React.ReactNode;
|
|
271
|
+
content: React.ReactNode;
|
|
272
|
+
};
|
|
273
|
+
type AccordionProps = {
|
|
274
|
+
items: AccordionItemType[];
|
|
275
|
+
type?: "single" | "multiple";
|
|
276
|
+
defaultValue?: string | string[];
|
|
277
|
+
onChange?: (value: string | string[]) => void;
|
|
278
|
+
className?: string;
|
|
279
|
+
};
|
|
280
|
+
declare function Accordion({ items, type, defaultValue, onChange, className, }: AccordionProps): React$1.JSX.Element;
|
|
281
|
+
|
|
267
282
|
declare const PopoverRoot: React$1.FC<PopoverPrimitive.PopoverProps>;
|
|
268
283
|
declare const PopoverTrigger: React$1.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
269
284
|
declare const PopoverContent: React$1.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
@@ -474,37 +489,83 @@ type TableBulkRowActionsProps = {
|
|
|
474
489
|
id?: string;
|
|
475
490
|
};
|
|
476
491
|
|
|
477
|
-
type
|
|
492
|
+
type FilterSelectOption = {
|
|
478
493
|
value: string;
|
|
479
494
|
label: string;
|
|
480
495
|
};
|
|
481
|
-
type
|
|
482
|
-
|
|
496
|
+
type FilterType = "input" | "drop-down" | "date-range" | "multi" | "date" | "radio";
|
|
497
|
+
/**
|
|
498
|
+
* Base properties shared by all filter types.
|
|
499
|
+
*/
|
|
500
|
+
interface FilterBase {
|
|
483
501
|
key: string;
|
|
484
502
|
label: string;
|
|
503
|
+
type: FilterType;
|
|
485
504
|
placeholder?: string;
|
|
486
|
-
}
|
|
487
|
-
|
|
505
|
+
}
|
|
506
|
+
/**
|
|
507
|
+
* Input-specific filter properties.
|
|
508
|
+
*/
|
|
509
|
+
interface FilterInput extends FilterBase, Omit<InputProps, "value" | "onChange" | "type" | "label"> {
|
|
488
510
|
type: "input";
|
|
489
|
-
}
|
|
490
|
-
|
|
511
|
+
}
|
|
512
|
+
/**
|
|
513
|
+
* Drop-down (Select) specific filter properties.
|
|
514
|
+
*/
|
|
515
|
+
interface FilterDropDown extends FilterBase {
|
|
516
|
+
type: "drop-down";
|
|
517
|
+
options: FilterSelectOption[];
|
|
518
|
+
hideSearch?: boolean;
|
|
519
|
+
}
|
|
520
|
+
/**
|
|
521
|
+
* Radio specific filter properties.
|
|
522
|
+
*/
|
|
523
|
+
interface FilterRadio extends FilterBase {
|
|
524
|
+
type: "radio";
|
|
525
|
+
options: FilterSelectOption[];
|
|
526
|
+
}
|
|
527
|
+
/**
|
|
528
|
+
* Date specific filter properties.
|
|
529
|
+
*/
|
|
530
|
+
interface FilterDate extends FilterBase {
|
|
491
531
|
type: "date";
|
|
492
532
|
date?: string | Date;
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
533
|
+
}
|
|
534
|
+
/**
|
|
535
|
+
* Multi-select specific filter properties.
|
|
536
|
+
*/
|
|
537
|
+
interface FilterMultiSelect extends FilterBase {
|
|
538
|
+
type: "multi";
|
|
539
|
+
options: FilterSelectOption[];
|
|
497
540
|
hideSearch?: boolean;
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
541
|
+
}
|
|
542
|
+
/**
|
|
543
|
+
* Date range specific filter properties.
|
|
544
|
+
*/
|
|
545
|
+
interface FilterDateRange extends FilterBase {
|
|
546
|
+
type: "date-range";
|
|
547
|
+
}
|
|
548
|
+
/**
|
|
549
|
+
* Discriminated union of all supported filter item configurations.
|
|
550
|
+
*/
|
|
551
|
+
type FilterListItem = FilterInput | FilterDropDown | FilterRadio | FilterDate | FilterMultiSelect | FilterDateRange;
|
|
552
|
+
/**
|
|
553
|
+
* Alias for backward compatibility.
|
|
554
|
+
*/
|
|
507
555
|
type FilterListOptions = FilterListItem[];
|
|
556
|
+
/**
|
|
557
|
+
* Type alias for filter values, used to avoid 'any' in filter state management.
|
|
558
|
+
*/
|
|
559
|
+
type FilterValues = Record<string, string>;
|
|
560
|
+
/**
|
|
561
|
+
* Shared props for individual filter fields to eliminate 'any'.
|
|
562
|
+
*/
|
|
563
|
+
type FilterFieldProps<T extends FilterListItem = FilterListItem> = {
|
|
564
|
+
filter: T;
|
|
565
|
+
id: string;
|
|
566
|
+
form: UseFormReturn<FilterValues>;
|
|
567
|
+
onClear?: (fieldKey: string) => void;
|
|
568
|
+
};
|
|
508
569
|
|
|
509
570
|
type PaginationProps = {
|
|
510
571
|
currentPage?: number;
|
|
@@ -552,6 +613,7 @@ type TableProps<T extends RowData> = {
|
|
|
552
613
|
FilterMenu?: ReactNode;
|
|
553
614
|
setAppliedFilters?: (values: Record<string, any>) => void;
|
|
554
615
|
filterListOptions?: FilterListItem[];
|
|
616
|
+
filterValues?: Record<string, any>;
|
|
555
617
|
buttonClassName?: string;
|
|
556
618
|
download?: TableDownloadProps;
|
|
557
619
|
id?: string;
|
|
@@ -571,7 +633,7 @@ type TableProps<T extends RowData> = {
|
|
|
571
633
|
};
|
|
572
634
|
emptyDataMessage?: ReactNode;
|
|
573
635
|
};
|
|
574
|
-
declare const Table: <T extends RowData>({ table, isMobile, onRowClick, id, onRefetch, isRefetching, FilterMenu, ExtraNode, onExport, search, download, isLoading, pagination, filterListOptions, setAppliedFilters, onFilterChange, tableBulkActions, emptyDataMessage, }: TableProps<T>) => React$1.JSX.Element;
|
|
636
|
+
declare const Table: <T extends RowData>({ table, isMobile, onRowClick, id, onRefetch, isRefetching, FilterMenu, ExtraNode, onExport, search, download, isLoading, pagination, filterListOptions, filterValues, setAppliedFilters, onFilterChange, tableBulkActions, emptyDataMessage, }: TableProps<T>) => React$1.JSX.Element;
|
|
575
637
|
|
|
576
638
|
type PageDataToolbarProps = {
|
|
577
639
|
onRefetch?: () => void;
|
|
@@ -583,10 +645,11 @@ type PageDataToolbarProps = {
|
|
|
583
645
|
isRefetching?: boolean;
|
|
584
646
|
setAppliedFilters?: (values: Record<string, any>) => void;
|
|
585
647
|
onFilterChange?: (values: Record<string, any>) => void;
|
|
648
|
+
filterValues?: Record<string, any>;
|
|
586
649
|
filterListOptions?: FilterListItem[];
|
|
587
650
|
id?: string;
|
|
588
651
|
};
|
|
589
|
-
declare const PageDataToolbar: ({ onRefetch, search, FilterMenu, ExtraNode, onExport, download, isRefetching, filterListOptions, setAppliedFilters, onFilterChange, id, }: PageDataToolbarProps) => React$1.JSX.Element;
|
|
652
|
+
declare const PageDataToolbar: ({ onRefetch, search, FilterMenu, ExtraNode, onExport, download, isRefetching, filterListOptions, filterValues, setAppliedFilters, onFilterChange, id, }: PageDataToolbarProps) => React$1.JSX.Element;
|
|
590
653
|
|
|
591
654
|
declare const PermissionsContext: React$1.Context<ResourcePermissions | undefined>;
|
|
592
655
|
declare const PermissionsProvider: ({ permissions, children, }: {
|
|
@@ -631,13 +694,24 @@ declare const RadioGroupItem: React$1.ForwardRefExoticComponent<Omit<RadioGroupP
|
|
|
631
694
|
className?: string;
|
|
632
695
|
} & React$1.RefAttributes<HTMLButtonElement>>;
|
|
633
696
|
|
|
634
|
-
type
|
|
697
|
+
type FilterContentProps = {
|
|
698
|
+
filters: FilterListItem[];
|
|
699
|
+
values?: FilterValues;
|
|
700
|
+
onChange?: (values: FilterValues) => void;
|
|
701
|
+
onApply?: (values: FilterValues) => void;
|
|
702
|
+
onReset?: () => void;
|
|
703
|
+
/** Called when a single field is cleared, so the parent can update applied state + URL for that key only. */
|
|
704
|
+
onClearApplied?: (fieldKey: string) => void;
|
|
705
|
+
id?: string;
|
|
706
|
+
setAppliedFilters?: (values: FilterValues) => void;
|
|
707
|
+
};
|
|
708
|
+
|
|
709
|
+
type FilterPopoverProps = Omit<FilterContentProps, "onApply"> & {
|
|
635
710
|
isOpen?: boolean;
|
|
636
711
|
trigger?: ReactNode;
|
|
637
712
|
id?: string;
|
|
638
|
-
onChange?: (values: Record<string, any>) => void;
|
|
639
713
|
};
|
|
640
|
-
declare const FilterPopover: ({ filters, setAppliedFilters, isOpen, onChange, id, }: FilterPopoverProps) => React$1.JSX.Element | null;
|
|
714
|
+
declare const FilterPopover: ({ filters, setAppliedFilters, isOpen, onChange, values, id, }: FilterPopoverProps) => React$1.JSX.Element | null;
|
|
641
715
|
|
|
642
716
|
interface FilterSliceType {
|
|
643
717
|
filters: Record<string, any> | null;
|
|
@@ -865,4 +939,4 @@ declare const TagsInput: ({ value, onChange, options, label, error, placeholder,
|
|
|
865
939
|
|
|
866
940
|
declare function cn(...inputs: ClassValue[]): string;
|
|
867
941
|
|
|
868
|
-
export { AmountAction, Banner, Button, CalendarInput, CopyableLabel, Country, CurrencySymbolMap, DateAction, DebouncedInput, DevBanner, Dialog, Drawer, DrawerClose, type DrawerPropsType, DrawerRoot, FeatureBanner, type FilterListItem, type FilterListOptions, FilterPopover, FlagComponent, FormLabel, type FormatCurrencyOptions, HasResourcePermission, Input, Loader, LocaleSelector, MultiSelect, type MultiSelectDataType, MultiSelectTrigger, OTPInput, PageDataToolbar, Pagination, PasswordInput, PermissionsContext, PermissionsProvider, PhoneInput, Popover, PopoverContent, PopoverRoot, PopoverTrigger, RadioGroup, RadioGroupItem, type ResourcePermission, type ResourcePermissionProps, type ResourcePermissions, RichTextEditor, ScrollArea, Select, Sidebar, Status, StringAction, Table, type TableBulkRowActionsProps, type TablePaginationProps, Tabs, type TagOption, TagsInput, type TagsInputProps, TextOverflow, type TextOverflowProps, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipRoot, TooltipTrigger, buttonVariants, cn, useFilterStore, useHasPermission, usePermissions };
|
|
942
|
+
export { Accordion, type AccordionItemType, type AccordionProps, AmountAction, Banner, Button, CalendarInput, CopyableLabel, Country, CurrencySymbolMap, DateAction, DebouncedInput, DevBanner, Dialog, Drawer, DrawerClose, type DrawerPropsType, DrawerRoot, FeatureBanner, type FilterFieldProps, type FilterListItem, type FilterListOptions, FilterPopover, FlagComponent, FormLabel, type FormatCurrencyOptions, HasResourcePermission, Input, Loader, LocaleSelector, MultiSelect, type MultiSelectDataType, MultiSelectTrigger, OTPInput, PageDataToolbar, Pagination, PasswordInput, PermissionsContext, PermissionsProvider, PhoneInput, Popover, PopoverContent, PopoverRoot, PopoverTrigger, RadioGroup, RadioGroupItem, type ResourcePermission, type ResourcePermissionProps, type ResourcePermissions, RichTextEditor, ScrollArea, Select, Sidebar, Status, StringAction, Table, type TableBulkRowActionsProps, type TablePaginationProps, Tabs, type TagOption, TagsInput, type TagsInputProps, TextOverflow, type TextOverflowProps, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipRoot, TooltipTrigger, buttonVariants, cn, useFilterStore, useHasPermission, usePermissions };
|