@stokelp/ui 2.16.0 → 2.18.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.
- package/dist/components/select/Select.d.ts +9 -6
- package/dist/style.css +1 -1
- package/dist/ui.cjs +16 -16
- package/dist/ui.cjs.map +1 -1
- package/dist/ui.js +1686 -1655
- package/dist/ui.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import { SelectRootProps } from '@ark-ui/react';
|
|
2
|
-
import {
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
3
|
import { select } from '@stokelp/styled-system/recipes';
|
|
4
4
|
import { HTMLStyledProps, RecipeVariantProps } from '@stokelp/styled-system/types';
|
|
5
5
|
|
|
6
|
-
export
|
|
6
|
+
export interface SelectItem {
|
|
7
7
|
value: string | number;
|
|
8
8
|
label: string;
|
|
9
9
|
disabled?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export type SelectProps = Omit<SelectRootProps<
|
|
12
|
-
items:
|
|
10
|
+
}
|
|
11
|
+
export type SelectProps<Item extends SelectItem> = Omit<SelectRootProps<Item>, 'collection'> & {
|
|
12
|
+
items: Item[] | readonly Item[];
|
|
13
|
+
renderItem?: (item: Item) => ReactNode;
|
|
14
|
+
renderTrigger?: (item: Item) => ReactNode;
|
|
13
15
|
emptyLabel?: string;
|
|
14
16
|
placeholder?: string;
|
|
15
17
|
usePortal?: boolean;
|
|
18
|
+
hideClearTrigger?: boolean;
|
|
16
19
|
} & HTMLStyledProps<'div'> & RecipeVariantProps<typeof select>;
|
|
17
|
-
export declare
|
|
20
|
+
export declare function Select<Item extends SelectItem>({ items, placeholder, emptyLabel, usePortal, positioning, renderItem, renderTrigger, hideClearTrigger, ...props }: SelectProps<Item>): import("react/jsx-runtime").JSX.Element;
|