@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.
@@ -1,7 +1,11 @@
1
1
  import { SelectContainerProps, SelectGroupProps, SelectItemProps } from './types';
2
2
  import { CheckboxVariants, TextProps } from '../..';
3
3
 
4
- 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, ...props }: SelectContainerProps) => import("react/jsx-runtime").JSX.Element;
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clickhouse/click-ui",
3
- "version": "0.0.230",
3
+ "version": "0.0.231",
4
4
  "description": "Official ClickHouse design system react library",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",