@l3mpire/ui 2.5.4 → 2.7.1

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/USAGE.md CHANGED
@@ -286,6 +286,66 @@ import { faMagnifyingGlassSolid, faEnvelopeSolid } from "@l3mpire/icons";
286
286
 
287
287
  ---
288
288
 
289
+ ### ChipInput
290
+
291
+ ```tsx
292
+ import { ChipInput } from "@l3mpire/ui";
293
+
294
+ const [values, setValues] = useState<string[]>([]);
295
+
296
+ <ChipInput values={values} onChange={setValues} label="Does contain" placeholder="Write your value and press Enter" />
297
+ <ChipInput values={values} onChange={setValues} label="Tags" error errorMessage="At least one value required" />
298
+ <ChipInput values={values} onChange={setValues} label="Filter" size="sm" />
299
+ ```
300
+
301
+ | Prop | Values |
302
+ |---|---|
303
+ | `size` | `"sm"`, `"md"` |
304
+ | `values` | `string[]` (controlled) |
305
+ | `onChange` | `(values: string[]) => void` |
306
+ | `placeholder` | `string` |
307
+ | `label` | `string` |
308
+ | `error` | `boolean` |
309
+ | `errorMessage` | `string` |
310
+ | `disabled` | `boolean` |
311
+ | `iconLeft` | `IconDefinition` |
312
+ | `max` | `number` (max chips, 0 = unlimited) |
313
+
314
+ Type a value and press Enter to create a chip. Backspace on empty input removes the last chip. Duplicate values are ignored.
315
+
316
+ ---
317
+
318
+ ### NumberInput
319
+
320
+ ```tsx
321
+ import { NumberInput } from "@l3mpire/ui";
322
+
323
+ const [value, setValue] = useState(1);
324
+
325
+ <NumberInput value={value} onChange={setValue} label="Quantity" />
326
+ <NumberInput value={value} onChange={setValue} label="Quantity" min={0} max={100} step={5} />
327
+ <NumberInput value={value} onChange={setValue} label="Quantity" size="sm" />
328
+ <NumberInput value={value} onChange={setValue} label="Quantity" error errorMessage="Value out of range" />
329
+ ```
330
+
331
+ | Prop | Values |
332
+ |---|---|
333
+ | `size` | `"sm"`, `"md"` |
334
+ | `value` | `number` (controlled) |
335
+ | `defaultValue` | `number` (uncontrolled, default `0`) |
336
+ | `onChange` | `(value: number) => void` |
337
+ | `min` | `number` |
338
+ | `max` | `number` |
339
+ | `step` | `number` (default `1`) |
340
+ | `label` | `string` |
341
+ | `error` | `boolean` |
342
+ | `errorMessage` | `string` |
343
+ | `disabled` | `boolean` |
344
+
345
+ Buttons disable automatically at min/max. Input auto-resizes for large numbers (>3 digits).
346
+
347
+ ---
348
+
289
349
  ### TextArea
290
350
 
291
351
  ```tsx
@@ -368,6 +428,9 @@ import { Select } from "@l3mpire/ui";
368
428
  | `error` | `boolean` |
369
429
  | `errorMessage` | `string` |
370
430
  | `icon` | `IconDefinition` |
431
+ | `tags` | `string[]` (shows selected values as chips with overflow +X) |
432
+ | `onTagRemove` | `(tag: string) => void` (remove chip callback) |
433
+ | `multiCount` | `number` (shows "+N others" text, non-tags mode) |
371
434
  | `isOpen` | `boolean` (controlled) |
372
435
  | `onOpenChange` | `(open: boolean) => void` |
373
436
  | `disabled` | `boolean` |
@@ -733,6 +796,133 @@ const [open, setOpen] = React.useState(false);
733
796
 
734
797
  ---
735
798
 
799
+ ### DatePicker
800
+
801
+ Composable date picker with single and range selection modes. All sub-components are optional except `DatePickerCalendar`.
802
+
803
+ ```tsx
804
+ import {
805
+ DatePicker,
806
+ DatePickerCalendar,
807
+ DatePickerSelects,
808
+ DatePickerSuggestions,
809
+ DatePickerFooter,
810
+ DatePickerPanel,
811
+ DatePickerRoot,
812
+ DatePickerTrigger,
813
+ DatePickerPopover,
814
+ getDefaultSuggestions,
815
+ Button,
816
+ } from "@l3mpire/ui";
817
+
818
+ // Standalone range picker with all options
819
+ <DatePicker mode="range" value={range} onValueChange={setRange}>
820
+ <DatePickerPanel>
821
+ <DatePickerCalendar header={<DatePickerSelects />} />
822
+ <DatePickerSuggestions suggestions={getDefaultSuggestions()} />
823
+ </DatePickerPanel>
824
+ <DatePickerFooter>
825
+ <Button appearance="ghost" intent="brand" size="lg">Cancel</Button>
826
+ <Button appearance="solid" intent="brand" size="lg">Apply</Button>
827
+ </DatePickerFooter>
828
+ </DatePicker>
829
+
830
+ // Minimal single date in a popover
831
+ <DatePickerRoot>
832
+ <DatePickerTrigger asChild>
833
+ <Button>Pick date</Button>
834
+ </DatePickerTrigger>
835
+ <DatePickerPopover>
836
+ <DatePicker mode="single" value={date} onValueChange={setDate}>
837
+ <DatePickerCalendar />
838
+ </DatePicker>
839
+ </DatePickerPopover>
840
+ </DatePickerRoot>
841
+ ```
842
+
843
+ | Prop (DatePicker) | Type | Default |
844
+ |---|---|---|
845
+ | `mode` | `"single" \| "range"` | `"single"` |
846
+ | `value` | `Date \| DateRange \| undefined` | — |
847
+ | `onValueChange` | `(value: Date \| DateRange) => void` | — |
848
+ | `defaultMonth` | `number` (0–11) | Current month |
849
+ | `defaultYear` | `number` | Current year |
850
+
851
+ | Composable part | Purpose |
852
+ |---|---|
853
+ | `DatePickerCalendar` | Month grid with prev/next navigation |
854
+ | `DatePickerPanel` | Horizontal flex wrapper (calendar + suggestions) |
855
+ | `DatePickerSelects` | From/to date display (read-only) |
856
+ | `DatePickerSuggestions` | Preset period shortcuts (Today, This week, etc.) |
857
+ | `DatePickerFooter` | Action bar (Cancel/Apply) |
858
+ | `DatePickerRoot` / `DatePickerTrigger` / `DatePickerPopover` | Radix Popover wrappers |
859
+
860
+ ---
861
+
862
+ ### FilterSystem
863
+
864
+ Composable filter system with inline chips, sort, property selector, and advanced filter popover.
865
+
866
+ ```tsx
867
+ import {
868
+ FilterSystem,
869
+ FilterChip,
870
+ InteractiveFilterChip,
871
+ FilterBar, FilterBarLeft, FilterBarRight,
872
+ SortButton, FilterBarButton, SaveViewButton,
873
+ PropertySelector, AdvancedPopover, AdvancedChip,
874
+ getDefaultOperator, createFilterWithDefaults,
875
+ type FilterState, type PropertyDefinition, type SortField,
876
+ } from "@l3mpire/ui";
877
+
878
+ // Full interactive system (manages state internally)
879
+ <FilterSystem
880
+ properties={PROPERTIES}
881
+ filterState={filterState}
882
+ onFilterStateChange={setFilterState}
883
+ sortFields={SORT_FIELDS}
884
+ actions={<><Button>Discard</Button><SaveViewButton /></>}
885
+ >
886
+ <SearchBar size="sm" className="w-[200px]" />
887
+ </FilterSystem>
888
+
889
+ // Or compose manually with FilterBar
890
+ <FilterBar>
891
+ <FilterBarLeft>
892
+ <SearchBar size="sm" />
893
+ <SortButton fields={sortFields} activeField="date" direction="asc" onChange={...} />
894
+ <InteractiveFilterChip propertyDef={...} condition={...} onUpdate={...} onDelete={...} />
895
+ <FilterBarButton count={2} />
896
+ </FilterBarLeft>
897
+ <FilterBarRight>
898
+ <SaveViewButton onSave={...} />
899
+ </FilterBarRight>
900
+ </FilterBar>
901
+ ```
902
+
903
+ | Component | Purpose |
904
+ |---|---|
905
+ | `FilterSystem` | Top-level orchestrator (manages add/edit/delete/convert flows) |
906
+ | `FilterBar` / `FilterBarLeft` / `FilterBarRight` | Layout container |
907
+ | `SortButton` | Sort by dropdown (field list + asc/desc) |
908
+ | `FilterBarButton` | "Filters" trigger with optional badge count |
909
+ | `FilterChip` | Presentational segmented chip |
910
+ | `InteractiveFilterChip` | FilterChip with per-segment popovers (property, operator, value, kebab) |
911
+ | `PropertySelector` | 2-level popover: categories → properties with search |
912
+ | `AdvancedChip` | "Advanced filter (N)" pill with close button |
913
+ | `AdvancedPopover` | Wide popover with Where/And rows |
914
+ | `SaveViewButton` | Split button (Save view + dropdown chevron) |
915
+
916
+ | Utility | Purpose |
917
+ |---|---|
918
+ | `OPERATORS_BY_TYPE` | Operators for each DataType |
919
+ | `DEFAULT_OPERATOR_BY_TYPE` | Pre-selected operator per type |
920
+ | `createFilterWithDefaults(propertyId, type)` | Creates FilterCondition with default operator |
921
+ | `isNoValueOperator(op)` | True for is empty / is not empty / is true / is false |
922
+ | `getValueInputType(type, op)` | Returns the input component name for a type+operator combo |
923
+
924
+ ---
925
+
736
926
  ### SidePanel
737
927
 
738
928
  Full-height panel that slides in from the right. Reuses `ModalHeader`, `ModalBody`, `ModalFooter` for composition.
@@ -972,6 +1162,8 @@ import { faUsersSolid } from "@l3mpire/icons";
972
1162
  | Tag | x | x | | |
973
1163
  | Link | x | x | | |
974
1164
  | TextInput | x | x | | |
1165
+ | ChipInput | x | x | | |
1166
+ | NumberInput | x | x | | |
975
1167
  | Select | x | x | | |
976
1168
  | SearchBar | x | x | | |
977
1169
  | Avatar | x | x | x | x |
package/dist/index.d.mts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { ClassValue } from 'clsx';
2
2
  import * as React from 'react';
3
+ import * as _l3mpire_icons from '@l3mpire/icons';
3
4
  import { IconDefinition } from '@l3mpire/icons';
4
5
  import * as class_variance_authority_types from 'class-variance-authority/types';
5
6
  import { VariantProps } from 'class-variance-authority';
@@ -15,6 +16,7 @@ import * as DialogPrimitive from '@radix-ui/react-dialog';
15
16
  import * as react_jsx_runtime from 'react/jsx-runtime';
16
17
  import { ColumnDef, SortingState, OnChangeFn, ColumnFiltersState, PaginationState, RowSelectionState, VisibilityState, ColumnOrderState, ColumnPinningState, Table as Table$1 } from '@tanstack/react-table';
17
18
  export { ColumnDef, ColumnFiltersState, RowSelectionState, SortingState, flexRender } from '@tanstack/react-table';
19
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
18
20
 
19
21
  declare function cn(...inputs: ClassValue[]): string;
20
22
 
@@ -243,6 +245,8 @@ interface SelectProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>
243
245
  placeholder?: string;
244
246
  value?: string;
245
247
  multiCount?: number;
248
+ tags?: string[];
249
+ onTagRemove?: (tag: string) => void;
246
250
  icon?: IconDefinition;
247
251
  avatar?: React.ReactNode;
248
252
  flag?: React.ReactNode;
@@ -308,9 +312,44 @@ interface TextInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement
308
312
  }
309
313
  declare const TextInput: React.ForwardRefExoticComponent<TextInputProps & React.RefAttributes<HTMLInputElement>>;
310
314
 
315
+ declare const chipInputVariants: (props?: ({
316
+ size?: "sm" | "md" | null | undefined;
317
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
318
+ interface ChipInputProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange">, VariantProps<typeof chipInputVariants> {
319
+ values: string[];
320
+ onChange: (values: string[]) => void;
321
+ placeholder?: string;
322
+ label?: string;
323
+ labelType?: InputLabelProps["type"];
324
+ error?: boolean;
325
+ errorMessage?: string;
326
+ disabled?: boolean;
327
+ iconLeft?: IconDefinition;
328
+ /** Max number of chips (0 = unlimited) */
329
+ max?: number;
330
+ }
331
+ declare const ChipInput: React.ForwardRefExoticComponent<ChipInputProps & React.RefAttributes<HTMLDivElement>>;
332
+
333
+ declare const inputVariants: (props?: ({
334
+ size?: "sm" | "md" | null | undefined;
335
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
336
+ interface NumberInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "size" | "onChange">, VariantProps<typeof inputVariants> {
337
+ value?: number;
338
+ defaultValue?: number;
339
+ onChange?: (value: number) => void;
340
+ min?: number;
341
+ max?: number;
342
+ step?: number;
343
+ label?: string;
344
+ labelType?: InputLabelProps["type"];
345
+ error?: boolean;
346
+ errorMessage?: string;
347
+ }
348
+ declare const NumberInput: React.ForwardRefExoticComponent<NumberInputProps & React.RefAttributes<HTMLInputElement>>;
349
+
311
350
  declare const typographyVariants: (props?: ({
312
351
  variant?: "xs" | "sm" | "md" | "lg" | "h2" | "h3" | "h1" | null | undefined;
313
- weight?: "bold" | "regular" | "medium" | null | undefined;
352
+ weight?: "bold" | "medium" | "regular" | null | undefined;
314
353
  } & class_variance_authority_types.ClassProp) | undefined) => string;
315
354
  interface TypographyProps extends React.HTMLAttributes<HTMLElement>, VariantProps<typeof typographyVariants> {
316
355
  as?: React.ElementType;
@@ -581,4 +620,320 @@ interface SidePanelContentProps extends React.ComponentPropsWithoutRef<typeof Di
581
620
  }
582
621
  declare const SidePanelContent: React.ForwardRefExoticComponent<SidePanelContentProps & React.RefAttributes<HTMLDivElement>>;
583
622
 
584
- export { Avatar, AvatarCell, type AvatarCellProps, type AvatarProps, Badge, type BadgeProps, BrowserTab, BrowserTabItem, type BrowserTabItemProps, type BrowserTabProps, Button, ButtonCell, type ButtonCellProps, type ButtonProps, Checkbox, type CheckboxProps, DataTable, DataTablePagination, type DataTablePaginationProps, type DataTableProps, DateCell, type DateCellProps, Dialog, type DialogProps, DropdownMenu, DropdownMenuClear, type DropdownMenuClearProps, DropdownMenuContent, DropdownMenuHeading, type DropdownMenuHeadingProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuList, type DropdownMenuListProps, type DropdownMenuProps, DropdownMenuRadixItem, type DropdownMenuRadixItemProps, DropdownMenuRoot, DropdownMenuTrigger, EditableCell, type EditableCellProps, EmailCell, type EmailCellProps, EmptyState, type EmptyStateProps, type FilterOperator, InfoMessage, type InfoMessageProps, InputLabel, type InputLabelProps, Link, LinkCell, type LinkCellProps, type LinkProps, Modal, ModalBody, ModalClose, ModalContent, type ModalContentProps, ModalDescription, ModalFooter, type ModalFooterProps, ModalHeader, type ModalHeaderProps, ModalOverlay, ModalTitle, ModalTrigger, NumberCell, type NumberCellProps, type Product, ProductLogo, type ProductLogoProps, RowActions, type RowActionsProps, SearchBar, type SearchBarProps, Select, type SelectProps, SidePanel, SidePanelClose, SidePanelContent, type SidePanelContentProps, SidePanelTrigger, Sidebar, SidebarFooter, type SidebarFooterProps, SidebarHeader, SidebarHeadingItem, type SidebarHeadingItemProps, SidebarItem, type SidebarItemProps, type SidebarProps, SidebarSection, type SidebarSectionProps, StatusCell, type StatusCellProps, Switch, type SwitchProps, TabContent, type TabContentProps, TabList, type TabListProps, TabTrigger, type TabTriggerProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, type TabsProps, Tag, type TagProps, TextArea, type TextAreaProps, TextCell, type TextCellProps, TextInput, type TextInputProps, Toast, type ToastProps, ToastProvider, ToastViewport, Tooltip, TooltipContent, type TooltipContentProps, TooltipProvider, TooltipTrigger, Typography, type TypographyProps, UserMenu, UserMenuInfoRow, type UserMenuInfoRowProps, type UserMenuProps, UserMenuSection, type UserMenuSectionProps, avatarVariants, badgeVariants, buttonVariants, cn, emptyStateVariants, infoMessageVariants, linkVariants, modalVariants, productLogoVariants, searchBarVariants, selectVariants, sidebarItemVariants, tagVariants, textInputVariants, toastVariants, tooltipContentVariants, typographyVariants, useSidebarContext };
623
+ declare const filterChipSegmentVariants: (props?: ({
624
+ type?: "property" | "button" | "operator" | "value" | "placeholder" | null | undefined;
625
+ hasBorder?: boolean | null | undefined;
626
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
627
+ interface FilterChipSegmentProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "type">, VariantProps<typeof filterChipSegmentVariants> {
628
+ /** Segment type determines content layout and text styling. */
629
+ segmentType?: "property" | "operator" | "value" | "placeholder" | "button";
630
+ /** Icon definition for Property segments. */
631
+ icon?: IconDefinition;
632
+ /** Text label for the segment. */
633
+ label?: string;
634
+ /** Optional badge count (shown on Value segments). */
635
+ badgeCount?: number;
636
+ /** Custom content slot (e.g., avatar in Value segment). */
637
+ adornment?: React.ReactNode;
638
+ /** Called when the kebab button is clicked (Button segment). */
639
+ onKebabClick?: (e: React.MouseEvent) => void;
640
+ }
641
+ declare const FilterChipSegment: React.ForwardRefExoticComponent<FilterChipSegmentProps & React.RefAttributes<HTMLDivElement>>;
642
+
643
+ interface FilterChipProps extends React.HTMLAttributes<HTMLDivElement> {
644
+ /** Icon for the property segment. */
645
+ icon?: IconDefinition;
646
+ /** Property label. */
647
+ property: string;
648
+ /** Operator label (e.g., "Contains"). Omit for incomplete chips. */
649
+ operator?: string;
650
+ /** Value label. Omit if the filter has no value yet. */
651
+ value?: string;
652
+ /** Optional badge count on the value segment (e.g., multi-select count). */
653
+ badgeCount?: number;
654
+ /** Optional adornment in the value segment (e.g., avatar). */
655
+ valueAdornment?: React.ReactNode;
656
+ /** Called when the property segment is clicked. */
657
+ onPropertyClick?: () => void;
658
+ /** Called when the operator segment is clicked. */
659
+ onOperatorClick?: () => void;
660
+ /** Called when the value segment is clicked. */
661
+ onValueClick?: () => void;
662
+ /** Called when the kebab button is clicked. */
663
+ onKebabClick?: (e: React.MouseEvent) => void;
664
+ }
665
+ declare const FilterChip: React.ForwardRefExoticComponent<FilterChipProps & React.RefAttributes<HTMLDivElement>>;
666
+
667
+ type DataType = "text" | "number" | "date" | "enum" | "tags" | "boolean" | "relation";
668
+ type TextOperator = "contains" | "does not contain" | "is" | "is not" | "starts with" | "ends with" | "is empty" | "is not empty";
669
+ type NumberOperator = "=" | "≠" | ">" | "<" | "≥" | "≤" | "is between" | "is empty" | "is not empty";
670
+ type DateOperator = "is" | "is before" | "is after" | "is on or before" | "is on or after" | "is between" | "is relative" | "is empty" | "is not empty";
671
+ type EnumOperator = "is" | "is not" | "is any of" | "is none of" | "is empty" | "is not empty";
672
+ type TagsOperator = "contains" | "does not contain" | "contains any of" | "contains all of" | "is empty" | "is not empty";
673
+ type BooleanOperator = "is true" | "is false";
674
+ type RelationOperator = "is" | "is not" | "is any of" | "is none of" | "is empty" | "is not empty";
675
+ type OperatorType = TextOperator | NumberOperator | DateOperator | EnumOperator | TagsOperator | BooleanOperator | RelationOperator;
676
+ interface PropertyDefinition {
677
+ id: string;
678
+ label: string;
679
+ type: DataType;
680
+ icon: _l3mpire_icons.IconDefinition;
681
+ group: string;
682
+ groupLabel: string;
683
+ options?: string[];
684
+ relationConfig?: {
685
+ entity: string;
686
+ displayProperty: string;
687
+ searchable: boolean;
688
+ hasAvatar: boolean;
689
+ };
690
+ }
691
+ type FilterValue = string | number | boolean | Date | [number, number] | [Date, Date] | string[] | null;
692
+ interface FilterCondition {
693
+ id: string;
694
+ propertyId: string;
695
+ operator: OperatorType | null;
696
+ value: FilterValue;
697
+ }
698
+ interface FilterState {
699
+ basicFilters: FilterCondition[];
700
+ advancedFilters: FilterCondition[];
701
+ sort: {
702
+ field: string;
703
+ direction: "asc" | "desc";
704
+ } | null;
705
+ }
706
+
707
+ declare const OPERATORS_BY_TYPE: Record<DataType, OperatorType[]>;
708
+ declare const DEFAULT_OPERATOR_BY_TYPE: Record<DataType, OperatorType>;
709
+ declare function isNoValueOperator(operator: OperatorType): boolean;
710
+ declare function getDefaultOperator(type: DataType): OperatorType;
711
+ declare function createFilterWithDefaults(propertyId: string, type: DataType): FilterCondition;
712
+ declare function getValueInputType(type: DataType, operator: OperatorType): string | null;
713
+
714
+ interface FilterBarProps extends React.HTMLAttributes<HTMLDivElement> {
715
+ }
716
+ /**
717
+ * Composable filter bar layout. Splits into a left group (search, sort, chips,
718
+ * filters button) and a right group (discard, save). Pass children for the left
719
+ * side and use `actions` slot for the right side.
720
+ *
721
+ * ```tsx
722
+ * <FilterBar>
723
+ * <FilterBarLeft>
724
+ * <SearchBar ... />
725
+ * <SortButton ... />
726
+ * <FilterChip ... />
727
+ * <FilterBarButton ... />
728
+ * </FilterBarLeft>
729
+ * <FilterBarRight>
730
+ * <Button>Discard changes</Button>
731
+ * <SaveViewButton ... />
732
+ * </FilterBarRight>
733
+ * </FilterBar>
734
+ * ```
735
+ */
736
+ declare const FilterBar: React.ForwardRefExoticComponent<FilterBarProps & React.RefAttributes<HTMLDivElement>>;
737
+ interface FilterBarLeftProps extends React.HTMLAttributes<HTMLDivElement> {
738
+ }
739
+ declare const FilterBarLeft: React.ForwardRefExoticComponent<FilterBarLeftProps & React.RefAttributes<HTMLDivElement>>;
740
+ interface FilterBarRightProps extends React.HTMLAttributes<HTMLDivElement> {
741
+ }
742
+ declare const FilterBarRight: React.ForwardRefExoticComponent<FilterBarRightProps & React.RefAttributes<HTMLDivElement>>;
743
+
744
+ interface SortField {
745
+ id: string;
746
+ label: string;
747
+ icon: IconDefinition;
748
+ }
749
+ interface SortButtonProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {
750
+ fields: SortField[];
751
+ activeField: string;
752
+ direction: "asc" | "desc";
753
+ onChange?: (field: string, direction: "asc" | "desc") => void;
754
+ }
755
+ declare const SortButton: React.FC<SortButtonProps>;
756
+
757
+ interface FilterBarButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
758
+ /** Number of active filters (shown as badge if > 0). */
759
+ count?: number;
760
+ }
761
+ /**
762
+ * The "Filters" trigger button in the FilterBar.
763
+ * Outlined/secondary style matching the Figma spec.
764
+ */
765
+ declare const FilterBarButton: React.ForwardRefExoticComponent<FilterBarButtonProps & React.RefAttributes<HTMLButtonElement>>;
766
+
767
+ interface SaveViewButtonProps extends React.HTMLAttributes<HTMLDivElement> {
768
+ /** Label for the main action. */
769
+ label?: string;
770
+ /** Called when the main "Save view" button is clicked. */
771
+ onSave?: () => void;
772
+ /** Called when the chevron dropdown is clicked. */
773
+ onDropdown?: () => void;
774
+ }
775
+ /**
776
+ * Split button for saving filtered views.
777
+ * Left side: "Save view" (solid brand, rounded-left).
778
+ * Right side: chevron-down (solid brand, rounded-right).
779
+ */
780
+ declare const SaveViewButton: React.ForwardRefExoticComponent<SaveViewButtonProps & React.RefAttributes<HTMLDivElement>>;
781
+
782
+ interface OperatorSelectorProps {
783
+ dataType: DataType;
784
+ activeOperator: OperatorType | null;
785
+ onSelect: (operator: OperatorType) => void;
786
+ open?: boolean;
787
+ onOpenChange?: (open: boolean) => void;
788
+ children?: React.ReactNode;
789
+ }
790
+ declare const OperatorSelector: React.FC<OperatorSelectorProps>;
791
+ interface OperatorListProps {
792
+ dataType: DataType;
793
+ activeOperator: OperatorType | null;
794
+ onSelect: (operator: OperatorType) => void;
795
+ }
796
+ declare const OperatorList: React.FC<OperatorListProps>;
797
+
798
+ interface ValueInputProps {
799
+ dataType: DataType;
800
+ operator: OperatorType;
801
+ value: FilterValue;
802
+ onChange: (value: FilterValue) => void;
803
+ onSubmit?: () => void;
804
+ options?: string[];
805
+ className?: string;
806
+ }
807
+ declare const ValueInput: React.FC<ValueInputProps>;
808
+
809
+ interface PropertySelectorProps {
810
+ properties: PropertyDefinition[];
811
+ onSelect: (property: PropertyDefinition) => void;
812
+ open?: boolean;
813
+ onOpenChange?: (open: boolean) => void;
814
+ children?: React.ReactNode;
815
+ }
816
+ declare const PropertySelector: React.FC<PropertySelectorProps>;
817
+
818
+ interface KebabMenuProps {
819
+ onConvertToAdvanced?: () => void;
820
+ onDelete?: () => void;
821
+ open?: boolean;
822
+ onOpenChange?: (open: boolean) => void;
823
+ children?: React.ReactNode;
824
+ }
825
+ declare const KebabMenu: React.FC<KebabMenuProps>;
826
+
827
+ interface FilterEditorProps {
828
+ propertyDef: PropertyDefinition;
829
+ condition: FilterCondition;
830
+ mode: "add" | "edit";
831
+ onUpdate: (condition: FilterCondition) => void;
832
+ onClose: () => void;
833
+ open?: boolean;
834
+ onOpenChange?: (open: boolean) => void;
835
+ children?: React.ReactNode;
836
+ }
837
+ declare const FilterEditor: React.FC<FilterEditorProps>;
838
+
839
+ interface InteractiveFilterChipProps {
840
+ propertyDef: PropertyDefinition;
841
+ condition: FilterCondition;
842
+ /** All available properties (for the property segment popover). */
843
+ properties?: PropertyDefinition[];
844
+ /** "add" auto-opens the value popover. */
845
+ mode?: "add" | "edit";
846
+ autoOpen?: boolean;
847
+ onUpdate: (condition: FilterCondition) => void;
848
+ /** Called when the property is changed (e.g., pick a different property). */
849
+ onPropertyChange?: (property: PropertyDefinition) => void;
850
+ onDelete: () => void;
851
+ onConvertToAdvanced?: () => void;
852
+ className?: string;
853
+ }
854
+ declare const InteractiveFilterChip: React.FC<InteractiveFilterChipProps>;
855
+
856
+ interface FilterSystemProps {
857
+ properties: PropertyDefinition[];
858
+ filterState: FilterState;
859
+ onFilterStateChange: (state: FilterState) => void;
860
+ sortFields?: SortField[];
861
+ children?: React.ReactNode;
862
+ actions?: React.ReactNode;
863
+ className?: string;
864
+ }
865
+ declare const FilterSystem: React.FC<FilterSystemProps>;
866
+
867
+ interface AdvancedChipProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
868
+ /** Number of advanced filters. */
869
+ count: number;
870
+ /** Called when the close (×) button is clicked. */
871
+ onClear?: () => void;
872
+ }
873
+ declare const AdvancedChip: React.ForwardRefExoticComponent<AdvancedChipProps & React.RefAttributes<HTMLButtonElement>>;
874
+
875
+ interface AdvancedRowProps {
876
+ /** "Where" for the first row, "And" for subsequent. */
877
+ connector: "Where" | "And";
878
+ propertyDef: PropertyDefinition;
879
+ condition: FilterCondition;
880
+ properties: PropertyDefinition[];
881
+ onUpdate: (condition: FilterCondition) => void;
882
+ onPropertyChange: (property: PropertyDefinition) => void;
883
+ onDelete: () => void;
884
+ }
885
+ declare const AdvancedRow: React.FC<AdvancedRowProps>;
886
+
887
+ interface AdvancedPopoverProps {
888
+ filters: FilterCondition[];
889
+ properties: PropertyDefinition[];
890
+ onFiltersChange: (filters: FilterCondition[]) => void;
891
+ open?: boolean;
892
+ onOpenChange?: (open: boolean) => void;
893
+ children?: React.ReactNode;
894
+ }
895
+ declare const AdvancedPopover: React.FC<AdvancedPopoverProps>;
896
+
897
+ type DateRange = {
898
+ from: Date;
899
+ to?: Date;
900
+ };
901
+ type DatePickerMode = "single" | "range";
902
+ interface DatePickerSuggestion {
903
+ label: string;
904
+ getValue: () => Date | DateRange;
905
+ }
906
+ interface DatePickerProps extends React.HTMLAttributes<HTMLDivElement> {
907
+ mode?: DatePickerMode;
908
+ value?: Date | DateRange;
909
+ onValueChange?: (value: Date | DateRange) => void;
910
+ defaultMonth?: number;
911
+ defaultYear?: number;
912
+ }
913
+ declare const DatePicker: React.ForwardRefExoticComponent<DatePickerProps & React.RefAttributes<HTMLDivElement>>;
914
+ interface DatePickerSelectsProps extends React.HTMLAttributes<HTMLDivElement> {
915
+ formatDate?: (date: Date) => string;
916
+ }
917
+ declare const DatePickerSelects: React.ForwardRefExoticComponent<DatePickerSelectsProps & React.RefAttributes<HTMLDivElement>>;
918
+ interface DatePickerCalendarProps extends React.HTMLAttributes<HTMLDivElement> {
919
+ /** Content rendered above the calendar grid (e.g. DatePickerSelects). */
920
+ header?: React.ReactNode;
921
+ }
922
+ declare const DatePickerCalendar: React.ForwardRefExoticComponent<DatePickerCalendarProps & React.RefAttributes<HTMLDivElement>>;
923
+ interface DatePickerSuggestionsProps extends React.HTMLAttributes<HTMLDivElement> {
924
+ suggestions: DatePickerSuggestion[];
925
+ formatDate?: (date: Date) => string;
926
+ }
927
+ declare const DatePickerSuggestions: React.ForwardRefExoticComponent<DatePickerSuggestionsProps & React.RefAttributes<HTMLDivElement>>;
928
+ interface DatePickerFooterProps extends React.HTMLAttributes<HTMLDivElement> {
929
+ }
930
+ declare const DatePickerFooter: React.ForwardRefExoticComponent<DatePickerFooterProps & React.RefAttributes<HTMLDivElement>>;
931
+ interface DatePickerPanelProps extends React.HTMLAttributes<HTMLDivElement> {
932
+ }
933
+ declare const DatePickerPanel: React.ForwardRefExoticComponent<DatePickerPanelProps & React.RefAttributes<HTMLDivElement>>;
934
+ declare const DatePickerRoot: React.FC<PopoverPrimitive.PopoverProps>;
935
+ declare const DatePickerTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
936
+ declare const DatePickerPopover: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
937
+ declare function getDefaultSuggestions(referenceDate?: Date): DatePickerSuggestion[];
938
+
939
+ export { AdvancedChip, type AdvancedChipProps, AdvancedPopover, type AdvancedPopoverProps, AdvancedRow, type AdvancedRowProps, Avatar, AvatarCell, type AvatarCellProps, type AvatarProps, Badge, type BadgeProps, type BooleanOperator, BrowserTab, BrowserTabItem, type BrowserTabItemProps, type BrowserTabProps, Button, ButtonCell, type ButtonCellProps, type ButtonProps, Checkbox, type CheckboxProps, ChipInput, type ChipInputProps, DEFAULT_OPERATOR_BY_TYPE, DataTable, DataTablePagination, type DataTablePaginationProps, type DataTableProps, type DataType, DateCell, type DateCellProps, type DateOperator, DatePicker, DatePickerCalendar, type DatePickerCalendarProps, DatePickerFooter, type DatePickerFooterProps, type DatePickerMode, DatePickerPanel, type DatePickerPanelProps, DatePickerPopover, type DatePickerProps, DatePickerRoot, DatePickerSelects, type DatePickerSelectsProps, type DatePickerSuggestion, DatePickerSuggestions, type DatePickerSuggestionsProps, DatePickerTrigger, type DateRange, Dialog, type DialogProps, DropdownMenu, DropdownMenuClear, type DropdownMenuClearProps, DropdownMenuContent, DropdownMenuHeading, type DropdownMenuHeadingProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuList, type DropdownMenuListProps, type DropdownMenuProps, DropdownMenuRadixItem, type DropdownMenuRadixItemProps, DropdownMenuRoot, DropdownMenuTrigger, EditableCell, type EditableCellProps, EmailCell, type EmailCellProps, EmptyState, type EmptyStateProps, type EnumOperator, FilterBar, FilterBarButton, type FilterBarButtonProps, FilterBarLeft, type FilterBarLeftProps, type FilterBarProps, FilterBarRight, type FilterBarRightProps, FilterChip, type FilterChipProps, FilterChipSegment, type FilterChipSegmentProps, type FilterCondition, FilterEditor, type FilterEditorProps, type FilterOperator, type FilterState, FilterSystem, type FilterSystemProps, type FilterValue, InfoMessage, type InfoMessageProps, InputLabel, type InputLabelProps, InteractiveFilterChip, type InteractiveFilterChipProps, KebabMenu, type KebabMenuProps, Link, LinkCell, type LinkCellProps, type LinkProps, Modal, ModalBody, ModalClose, ModalContent, type ModalContentProps, ModalDescription, ModalFooter, type ModalFooterProps, ModalHeader, type ModalHeaderProps, ModalOverlay, ModalTitle, ModalTrigger, NumberCell, type NumberCellProps, NumberInput, type NumberInputProps, type NumberOperator, OPERATORS_BY_TYPE, OperatorList, type OperatorListProps, OperatorSelector, type OperatorSelectorProps, type OperatorType, type Product, ProductLogo, type ProductLogoProps, type PropertyDefinition, PropertySelector, type PropertySelectorProps, type RelationOperator, RowActions, type RowActionsProps, SaveViewButton, type SaveViewButtonProps, SearchBar, type SearchBarProps, Select, type SelectProps, SidePanel, SidePanelClose, SidePanelContent, type SidePanelContentProps, SidePanelTrigger, Sidebar, SidebarFooter, type SidebarFooterProps, SidebarHeader, SidebarHeadingItem, type SidebarHeadingItemProps, SidebarItem, type SidebarItemProps, type SidebarProps, SidebarSection, type SidebarSectionProps, SortButton, type SortButtonProps, type SortField, StatusCell, type StatusCellProps, Switch, type SwitchProps, TabContent, type TabContentProps, TabList, type TabListProps, TabTrigger, type TabTriggerProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, type TabsProps, Tag, type TagProps, type TagsOperator, TextArea, type TextAreaProps, TextCell, type TextCellProps, TextInput, type TextInputProps, type TextOperator, Toast, type ToastProps, ToastProvider, ToastViewport, Tooltip, TooltipContent, type TooltipContentProps, TooltipProvider, TooltipTrigger, Typography, type TypographyProps, UserMenu, UserMenuInfoRow, type UserMenuInfoRowProps, type UserMenuProps, UserMenuSection, type UserMenuSectionProps, ValueInput, type ValueInputProps, avatarVariants, badgeVariants, buttonVariants, chipInputVariants, cn, createFilterWithDefaults, emptyStateVariants, filterChipSegmentVariants, getDefaultOperator, getDefaultSuggestions, getValueInputType, infoMessageVariants, isNoValueOperator, linkVariants, modalVariants, productLogoVariants, searchBarVariants, selectVariants, sidebarItemVariants, tagVariants, textInputVariants, toastVariants, tooltipContentVariants, typographyVariants, useSidebarContext };