schummar-table 0.14.4 → 0.16.0

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.
@@ -1,3 +1,6 @@
1
- import React from 'react';
2
- export declare const FilterControlContext: React.Context<() => void>;
1
+ /// <reference types="react" />
2
+ export declare const FilterControlContext: import("react").Context<{
3
+ isActive: boolean;
4
+ close: () => void;
5
+ }>;
3
6
  export declare function FilterControl<T>(): JSX.Element | null;
@@ -1,8 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  import { CommonFilterProps } from '../types';
3
- export declare function TextFilter<T, V>({ compare, filterBy, ...props }: {
3
+ export declare function TextFilter<T, V>({ compare, filterBy, placeholder, ...props }: {
4
4
  /** Custom comparison function. Should return true if an item value matches the current filter value.
5
5
  * By default a fuzzy text comparison is used.
6
6
  */
7
7
  compare?: (itemValue: string, filterValue: string) => boolean;
8
+ placeholder?: string;
8
9
  } & CommonFilterProps<T, V, string, string>): JSX.Element;
@@ -1,7 +1,8 @@
1
1
  import { FilterImplementation, SerializableValue } from '../types';
2
2
  export declare function useFilter<T, V, F, S extends SerializableValue>(impl: FilterImplementation<T, V, F, S>): {
3
+ isActive: boolean;
4
+ close: () => void;
3
5
  value: S | undefined;
4
6
  onChange: (value?: S) => void;
5
- close: () => void;
6
7
  filterBy: (value: V, item: T) => F | F[];
7
8
  };
@@ -80,6 +80,7 @@ export interface TableTheme<T = unknown> {
80
80
  endIcon?: ReactNode;
81
81
  className?: string;
82
82
  inputRef?: Ref<HTMLInputElement>;
83
+ placeholder?: string;
83
84
  }>;
84
85
  Spinner: (props: {
85
86
  className?: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "schummar-table",
3
3
  "repository": "schummar/schummar-table",
4
- "version": "0.14.4",
4
+ "version": "0.16.0",
5
5
  "description": "",
6
6
  "type": "module",
7
7
  "sideEffects": false,