@segmentify/ui 0.0.56 → 0.0.58
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/components/atoms/autocomplete.d.ts +13 -0
- package/dist/components/molecules/async-combobox.d.ts +15 -0
- package/dist/components/molecules/autocomplete-field.d.ts +17 -0
- package/dist/hooks/use-data-table.d.ts +5 -1
- package/dist/index.d.ts +1 -0
- package/dist/segmentify-ui.cjs +254 -92
- package/dist/segmentify-ui.js +65472 -22476
- package/package.json +2 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Autocomplete as AutocompletePrimitive } from '@base-ui/react';
|
|
2
|
+
declare const Autocomplete: typeof AutocompletePrimitive.Root;
|
|
3
|
+
declare function AutocompleteValue({ ...props }: AutocompletePrimitive.Value.Props): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function AutocompleteTrigger({ className, children, ...props }: AutocompletePrimitive.Trigger.Props): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function AutocompleteInput({ className, children, disabled, showTrigger, showClear, ...props }: AutocompletePrimitive.Input.Props & {
|
|
6
|
+
showTrigger?: boolean;
|
|
7
|
+
showClear?: boolean;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function AutocompleteContent({ className, side, sideOffset, align, alignOffset, ...props }: AutocompletePrimitive.Popup.Props & Pick<AutocompletePrimitive.Positioner.Props, 'side' | 'align' | 'sideOffset' | 'alignOffset'>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function AutocompleteList({ className, ...props }: AutocompletePrimitive.List.Props): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function AutocompleteItem({ className, children, ...props }: AutocompletePrimitive.Item.Props): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function AutocompleteEmpty({ className, ...props }: AutocompletePrimitive.Empty.Props): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export { Autocomplete, AutocompleteInput, AutocompleteContent, AutocompleteList, AutocompleteItem, AutocompleteEmpty, AutocompleteTrigger, AutocompleteValue, };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type AsyncComboboxItem = {
|
|
2
|
+
value: string;
|
|
3
|
+
label: string;
|
|
4
|
+
};
|
|
5
|
+
export type AsyncComboboxProps = {
|
|
6
|
+
selectedItem: AsyncComboboxItem;
|
|
7
|
+
fetchItems: (search: string) => Promise<AsyncComboboxItem[]>;
|
|
8
|
+
onSelect: (item: AsyncComboboxItem) => void;
|
|
9
|
+
searchPlaceholder?: string;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
align?: 'start' | 'center' | 'end';
|
|
14
|
+
};
|
|
15
|
+
export declare function AsyncCombobox({ selectedItem, fetchItems: fetchItemsProp, searchPlaceholder, placeholder, className, disabled, align, onSelect, }: AsyncComboboxProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type AutocompleteFieldItem = {
|
|
2
|
+
value: string;
|
|
3
|
+
label: string;
|
|
4
|
+
};
|
|
5
|
+
type Props = {
|
|
6
|
+
items: AutocompleteFieldItem[];
|
|
7
|
+
value: string;
|
|
8
|
+
onValueChange: (value: string) => void;
|
|
9
|
+
label?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
containerClassName?: string;
|
|
13
|
+
emptyMessage?: string;
|
|
14
|
+
onInputChange?: (value: string) => void;
|
|
15
|
+
};
|
|
16
|
+
export declare const AutocompleteField: ({ items, label, disabled, placeholder, containerClassName, emptyMessage, onInputChange, value, onValueChange, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -79,6 +79,10 @@ export interface UseDataTableOptions<TData> {
|
|
|
79
79
|
* Allows customizing staleTime, gcTime, refetchInterval, etc.
|
|
80
80
|
*/
|
|
81
81
|
queryOptions?: Omit<UseQueryOptions<FetcherResponse<TData>, Error>, 'queryKey' | 'queryFn'>;
|
|
82
|
+
/**
|
|
83
|
+
* Additional metadata to pass to the table instance (accessible via table.options.meta)
|
|
84
|
+
*/
|
|
85
|
+
meta?: Record<string, unknown>;
|
|
82
86
|
}
|
|
83
87
|
export interface UseDataTableReturn<TData> {
|
|
84
88
|
/**
|
|
@@ -158,4 +162,4 @@ export interface UseDataTableReturn<TData> {
|
|
|
158
162
|
*/
|
|
159
163
|
isError: boolean;
|
|
160
164
|
}
|
|
161
|
-
export declare function useDataTable<TData>({ queryKey, columns, fetcher, initialPageSize, initialSorting, initialColumnVisibility, initialColumnPinning, manualPagination, manualSorting, manualFiltering, getSubRows, getRowCanExpand, queryOptions, }: UseDataTableOptions<TData>): UseDataTableReturn<TData>;
|
|
165
|
+
export declare function useDataTable<TData>({ queryKey, columns, fetcher, initialPageSize, initialSorting, initialColumnVisibility, initialColumnPinning, manualPagination, manualSorting, manualFiltering, getSubRows, getRowCanExpand, queryOptions, meta, }: UseDataTableOptions<TData>): UseDataTableReturn<TData>;
|
package/dist/index.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export { ContentWrapper } from './components/atoms/content-wrapper';
|
|
|
19
19
|
export { CreatableActionIcons } from './components/molecules/creatable-action-icons';
|
|
20
20
|
export { CheckboxField } from './components/molecules/checkbox-field';
|
|
21
21
|
export { ComboboxField, type ComboboxFieldItem, type ComboboxFieldInputMode, } from './components/molecules/combobox-field';
|
|
22
|
+
export { AsyncCombobox, type AsyncComboboxItem } from './components/molecules/async-combobox';
|
|
22
23
|
export { FormattedDate } from './components/atoms/date';
|
|
23
24
|
export { DateRangePicker } from './components/molecules/date-range-picker';
|
|
24
25
|
export { DebouncedInput } from './components/molecules/debounced-input';
|