@clickhouse/click-ui 0.0.230 → 0.0.231
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/click-ui.bundled.es.js +49 -3
- package/dist/click-ui.bundled.es.js.map +1 -1
- package/dist/click-ui.bundled.umd.js +49 -3
- package/dist/click-ui.bundled.umd.js.map +1 -1
- package/dist/click-ui.es.js +49 -3
- package/dist/click-ui.es.js.map +1 -1
- package/dist/click-ui.umd.js +49 -3
- package/dist/click-ui.umd.js.map +1 -1
- package/dist/components/Select/common/InternalSelect.d.ts +5 -1
- package/dist/components/Select/common/types.d.ts +8 -0
- package/package.json +1 -1
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { SelectContainerProps, SelectGroupProps, SelectItemProps } from './types';
|
|
2
2
|
import { CheckboxVariants, TextProps } from '../..';
|
|
3
3
|
|
|
4
|
-
export
|
|
4
|
+
export interface NoAvailableOptionsFactoryProps {
|
|
5
|
+
search: string;
|
|
6
|
+
close: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const InternalSelect: ({ label, children, orientation, dir, disabled, id, error, value: selectedValues, onChange, onSelect, open, onOpenChange, name, form, allowCreateOption, customText, options, sortable, placeholder, multiple, checkbox, selectLabel, showSearch, container, useFullWidthItems, itemCharacterLimit, noAvailableOptions, ...props }: SelectContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
9
|
export declare const SelectGroup: import('react').ForwardRefExoticComponent<SelectGroupProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
6
10
|
export declare const SelectItem: import('react').ForwardRefExoticComponent<SelectItemProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
7
11
|
export type MultiSelectCheckboxItemProps = SelectItemProps & {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { HTMLAttributes, KeyboardEvent, MouseEvent, ReactNode } from 'react';
|
|
2
2
|
import { HorizontalDirection, IconName } from '../..';
|
|
3
3
|
import { PopoverProps } from '@radix-ui/react-popover';
|
|
4
|
+
import { NoAvailableOptionsFactoryProps } from './InternalSelect';
|
|
4
5
|
|
|
5
6
|
declare type DivProps = HTMLAttributes<HTMLDivElement>;
|
|
6
7
|
interface SelectItemComponentProps extends Omit<DivProps, "disabled" | "onSelect" | "value" | "children"> {
|
|
@@ -72,6 +73,13 @@ interface InternalSelectProps extends PopoverProps, Omit<HTMLAttributes<HTMLDivE
|
|
|
72
73
|
container?: HTMLElement;
|
|
73
74
|
useFullWidthItems?: boolean;
|
|
74
75
|
itemCharacterLimit?: string;
|
|
76
|
+
/**
|
|
77
|
+
* Controls rendering when no options are available.
|
|
78
|
+
* - false: renders nothing
|
|
79
|
+
* - true: renders default message 'No Options found' with search term if present
|
|
80
|
+
* - ({ search: string, onClose: () => void }) => ReactNode: renders the returned node allowing dynamic content based on current search string
|
|
81
|
+
*/
|
|
82
|
+
noAvailableOptions?: boolean | ((props: NoAvailableOptionsFactoryProps) => ReactNode);
|
|
75
83
|
}
|
|
76
84
|
export type SelectOptionProp = SelectOptionType | SelectChildrenType;
|
|
77
85
|
export type SelectContainerProps = SelectOptionProp & InternalSelectProps;
|