@parasutcom/fds 0.1.29 → 0.1.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/index.d.ts +164 -0
- package/dist/index.js +10578 -9525
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -38,6 +38,16 @@ import { Tooltip as Tooltip_2 } from '@base-ui/react/tooltip';
|
|
|
38
38
|
import { useRender } from '@base-ui/react/use-render';
|
|
39
39
|
import { VariantProps } from 'class-variance-authority';
|
|
40
40
|
|
|
41
|
+
/**
|
|
42
|
+
* Active filter instance
|
|
43
|
+
* value varies by filter type: string (single), string[] (multi), DateRangeValue (date-range)
|
|
44
|
+
*/
|
|
45
|
+
export declare interface ActiveFilter {
|
|
46
|
+
id: string;
|
|
47
|
+
category: string;
|
|
48
|
+
value: string | string[] | DateRangeValue;
|
|
49
|
+
}
|
|
50
|
+
|
|
41
51
|
export declare function Alert({ className, variant, ...props }: React_2.ComponentProps<'div'> & VariantProps<typeof alertVariants>): JSX.Element;
|
|
42
52
|
|
|
43
53
|
export declare function AlertAction({ className, ...props }: React_2.ComponentProps<'div'>): JSX.Element;
|
|
@@ -485,6 +495,14 @@ declare interface DataTableToolbarProps {
|
|
|
485
495
|
sticky?: string;
|
|
486
496
|
}
|
|
487
497
|
|
|
498
|
+
/**
|
|
499
|
+
* Date range value for date-range filters
|
|
500
|
+
*/
|
|
501
|
+
export declare interface DateRangeValue {
|
|
502
|
+
from: string;
|
|
503
|
+
to: string;
|
|
504
|
+
}
|
|
505
|
+
|
|
488
506
|
export declare function DeleteDialog({ onConfirm, children, mode, count, open: controlledOpen, onOpenChange: controlledOnOpenChange, title, description, }: DeleteDialogProps): JSX.Element;
|
|
489
507
|
|
|
490
508
|
declare interface DeleteDialogProps {
|
|
@@ -633,6 +651,141 @@ declare const fieldVariants: (props?: ({
|
|
|
633
651
|
orientation?: "horizontal" | "vertical" | "responsive" | null | undefined;
|
|
634
652
|
} & ClassProp) | undefined) => string;
|
|
635
653
|
|
|
654
|
+
/**
|
|
655
|
+
* Config-only component — renders nothing.
|
|
656
|
+
* Declare inside <FilterDropdown> to define available filter categories.
|
|
657
|
+
*
|
|
658
|
+
* @example
|
|
659
|
+
* <FilterDropdown ...>
|
|
660
|
+
* <FilterDropdown.Category id="status" label="Status" options={statusOptions} />
|
|
661
|
+
* <FilterDropdown.Category id="type" label="Type" options={typeOptions} multiple />
|
|
662
|
+
* </FilterDropdown>
|
|
663
|
+
*/
|
|
664
|
+
declare function FilterCategory(_props: FilterCategoryProps): null;
|
|
665
|
+
|
|
666
|
+
/**
|
|
667
|
+
* Filter category configuration — discriminated by type
|
|
668
|
+
*/
|
|
669
|
+
declare interface FilterCategoryBase {
|
|
670
|
+
/** Unique category identifier */
|
|
671
|
+
id: string;
|
|
672
|
+
/** Display label for the category (shown in the "add filter" dropdown) */
|
|
673
|
+
label: string;
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
declare interface FilterCategoryDateRange extends FilterCategoryBase {
|
|
677
|
+
/** Date range filter — renders a calendar popover */
|
|
678
|
+
type: 'date-range';
|
|
679
|
+
/** Custom quick-select presets for the date range view */
|
|
680
|
+
quickPresets?: QuickPreset[];
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
export declare type FilterCategoryProps = FilterCategorySelect | FilterCategoryDateRange;
|
|
684
|
+
|
|
685
|
+
declare interface FilterCategorySelect extends FilterCategoryBase {
|
|
686
|
+
/** Select-based filter (default) */
|
|
687
|
+
type?: 'select';
|
|
688
|
+
/** Available options for this category */
|
|
689
|
+
options: FilterOption[];
|
|
690
|
+
/** Enable multi-select for this category */
|
|
691
|
+
multiple?: boolean;
|
|
692
|
+
/** Show search input for filtering options */
|
|
693
|
+
searchable?: boolean;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
export declare function FilterDatePill({ value, onValueChange, placeholder, onRemove, disabled, autoOpen, quickPresets: quickPresetsProp, }: FilterDatePillProps): JSX.Element;
|
|
697
|
+
|
|
698
|
+
export declare interface FilterDatePillProps {
|
|
699
|
+
/** Current date range value ({ from: 'YYYY-MM-DD', to: 'YYYY-MM-DD' }) */
|
|
700
|
+
value: DateRangeValue;
|
|
701
|
+
/** Callback when date range changes */
|
|
702
|
+
onValueChange: (value: DateRangeValue) => void;
|
|
703
|
+
/** Text shown when no value is selected (e.g., the category label) */
|
|
704
|
+
placeholder?: string;
|
|
705
|
+
/** Callback when remove button is clicked */
|
|
706
|
+
onRemove: () => void;
|
|
707
|
+
/** Disabled state */
|
|
708
|
+
disabled?: boolean;
|
|
709
|
+
/** Auto-open on mount */
|
|
710
|
+
autoOpen?: boolean;
|
|
711
|
+
/** Custom quick-select presets shown in the date range view. Defaults to standard month/quarter/year presets. */
|
|
712
|
+
quickPresets?: QuickPreset[];
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
export declare const FilterDropdown: typeof FilterDropdownRoot & {
|
|
716
|
+
Category: typeof FilterCategory;
|
|
717
|
+
};
|
|
718
|
+
|
|
719
|
+
/**
|
|
720
|
+
* Filter dropdown props
|
|
721
|
+
*/
|
|
722
|
+
export declare interface FilterDropdownProps {
|
|
723
|
+
/** FilterDropdown.Category children defining available filter categories */
|
|
724
|
+
children: ReactNode;
|
|
725
|
+
/** Current active filters */
|
|
726
|
+
activeFilters: ActiveFilter[];
|
|
727
|
+
/** Callback when filters change */
|
|
728
|
+
onFiltersChange: (filters: ActiveFilter[]) => void;
|
|
729
|
+
/** Label for add filter button */
|
|
730
|
+
addFilterLabel: string;
|
|
731
|
+
/** Label for remove all button */
|
|
732
|
+
removeAllLabel: string;
|
|
733
|
+
/** Disabled state */
|
|
734
|
+
disabled?: boolean;
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
/**
|
|
738
|
+
* Generic filter dropdown with dynamic categories
|
|
739
|
+
*/
|
|
740
|
+
declare function FilterDropdownRoot({ children, activeFilters, onFiltersChange, addFilterLabel, removeAllLabel, disabled, }: FilterDropdownProps): JSX.Element;
|
|
741
|
+
|
|
742
|
+
/**
|
|
743
|
+
* Single filter option
|
|
744
|
+
*/
|
|
745
|
+
export declare interface FilterOption {
|
|
746
|
+
value: string;
|
|
747
|
+
label: string;
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
export declare function FilterPill(props: FilterPillProps): JSX.Element;
|
|
751
|
+
|
|
752
|
+
declare interface FilterPillBaseProps {
|
|
753
|
+
/** Available options */
|
|
754
|
+
options: FilterOption[];
|
|
755
|
+
/** Callback when remove button is clicked */
|
|
756
|
+
onRemove: () => void;
|
|
757
|
+
/** Text shown when no value is selected (e.g., the category label) */
|
|
758
|
+
placeholder?: string;
|
|
759
|
+
/** Disabled state */
|
|
760
|
+
disabled?: boolean;
|
|
761
|
+
/** Auto-open on mount */
|
|
762
|
+
autoOpen?: boolean;
|
|
763
|
+
/** Show search input inside the dropdown for filtering options */
|
|
764
|
+
searchable?: boolean;
|
|
765
|
+
/** Placeholder for the search input */
|
|
766
|
+
searchPlaceholder?: string;
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
declare interface FilterPillMultipleProps extends FilterPillBaseProps {
|
|
770
|
+
/** Multi-select mode */
|
|
771
|
+
multiple: true;
|
|
772
|
+
/** Current selected values */
|
|
773
|
+
value: string[];
|
|
774
|
+
/** Callback when values change */
|
|
775
|
+
onValueChange: (value: string[]) => void;
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
export declare type FilterPillProps = FilterPillSingleProps | FilterPillMultipleProps;
|
|
779
|
+
|
|
780
|
+
declare interface FilterPillSingleProps extends FilterPillBaseProps {
|
|
781
|
+
/** Single-select mode (default) */
|
|
782
|
+
multiple?: false;
|
|
783
|
+
/** Current selected value */
|
|
784
|
+
value: string;
|
|
785
|
+
/** Callback when value changes */
|
|
786
|
+
onValueChange: (value: string) => void;
|
|
787
|
+
}
|
|
788
|
+
|
|
636
789
|
export declare function IbanField({ value, onChange, showPrefix, error, placeholder, ...props }: IbanFieldProps): JSX.Element;
|
|
637
790
|
|
|
638
791
|
export declare interface IbanFieldProps extends Omit<TextFieldProps, 'type' | 'value' | 'onChange' | 'prefix'> {
|
|
@@ -691,6 +844,11 @@ declare const inputVariants: (props?: ({
|
|
|
691
844
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
692
845
|
} & ClassProp) | undefined) => string;
|
|
693
846
|
|
|
847
|
+
/**
|
|
848
|
+
* Type guard for date range values
|
|
849
|
+
*/
|
|
850
|
+
export declare function isDateRangeValue(value: ActiveFilter['value']): value is DateRangeValue;
|
|
851
|
+
|
|
694
852
|
export declare function Item({ className, variant, size, render, ...props }: useRender.ComponentProps<"div"> & VariantProps<typeof itemVariants>): React_2.ReactElement<unknown, string | React_2.JSXElementConstructor<any>>;
|
|
695
853
|
|
|
696
854
|
export declare function ItemActions({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
|
|
@@ -821,6 +979,12 @@ export declare function ProgressTrack({ className, ...props }: Progress_2.Track.
|
|
|
821
979
|
|
|
822
980
|
export declare function ProgressValue({ className, ...props }: Progress_2.Value.Props): JSX.Element;
|
|
823
981
|
|
|
982
|
+
export declare interface QuickPreset {
|
|
983
|
+
label: string;
|
|
984
|
+
from: Date;
|
|
985
|
+
to: Date;
|
|
986
|
+
}
|
|
987
|
+
|
|
824
988
|
export declare function RadioGroup({ className, ...props }: RadioGroup_2.Props): JSX.Element;
|
|
825
989
|
|
|
826
990
|
export declare function RadioGroupItem({ className, ...props }: Radio.Root.Props): JSX.Element;
|