qlu-20-ui-library 1.3.48 → 1.3.49

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,10 +1,8 @@
1
1
  /// <reference types="react" />
2
- export interface Option {
2
+ interface ChatDropDownProps<T extends {
3
3
  label: string;
4
- [key: string]: any;
5
- }
6
- interface ChatDropDownProps {
7
- filteredOptions: Option[];
4
+ }> {
5
+ filteredOptions: T[];
8
6
  showSearchIcon?: boolean;
9
7
  value?: string;
10
8
  createShownText?: string;
@@ -15,9 +13,11 @@ interface ChatDropDownProps {
15
13
  isReadOnly?: boolean;
16
14
  showNoResults?: boolean;
17
15
  handleCreateClick?: (value: string) => void;
18
- handleOptionClick: (option: Option) => void;
16
+ handleOptionClick: (option: T) => void;
19
17
  handleInputChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
20
- renderProps?: (props: Option) => React.ReactElement;
18
+ renderProps?: (props: T) => React.ReactElement;
21
19
  }
22
- declare const ChatDropDown: ({ value, createShownText, isCreateShown, zIndex, placeholder, showSearchIcon, filteredOptions, isLoading, isReadOnly, showNoResults, handleCreateClick, handleOptionClick, handleInputChange, renderProps, }: ChatDropDownProps) => import("react/jsx-runtime").JSX.Element;
20
+ declare const ChatDropDown: <T extends {
21
+ label: string;
22
+ }>({ value, createShownText, isCreateShown, zIndex, placeholder, showSearchIcon, filteredOptions, isLoading, isReadOnly, showNoResults, handleCreateClick, handleOptionClick, handleInputChange, renderProps, }: ChatDropDownProps<T>) => import("react/jsx-runtime").JSX.Element;
23
23
  export default ChatDropDown;
@@ -1,11 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  import "./style.scss";
3
- export interface Option {
3
+ interface ChatDropDownProps<T extends {
4
4
  label: string;
5
- [key: string]: any;
6
- }
7
- interface ChatDropDownProps {
8
- filteredOptions: Option[];
5
+ }> {
6
+ filteredOptions: T[];
9
7
  showSearchIcon?: boolean;
10
8
  value?: string;
11
9
  createShownText?: string;
@@ -16,9 +14,11 @@ interface ChatDropDownProps {
16
14
  isReadOnly?: boolean;
17
15
  showNoResults?: boolean;
18
16
  handleCreateClick?: (value: string) => void;
19
- handleOptionClick: (option: Option) => void;
17
+ handleOptionClick: (option: T) => void;
20
18
  handleInputChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
21
- renderProps?: (props: Option) => React.ReactElement;
19
+ renderProps?: (props: T) => React.ReactElement;
22
20
  }
23
- declare const ChatDropDown: ({ value, createShownText, isCreateShown, zIndex, placeholder, showSearchIcon, filteredOptions, isLoading, isReadOnly, showNoResults, handleCreateClick, handleOptionClick, handleInputChange, renderProps, }: ChatDropDownProps) => import("react/jsx-runtime").JSX.Element;
21
+ declare const ChatDropDown: <T extends {
22
+ label: string;
23
+ }>({ value, createShownText, isCreateShown, zIndex, placeholder, showSearchIcon, filteredOptions, isLoading, isReadOnly, showNoResults, handleCreateClick, handleOptionClick, handleInputChange, renderProps, }: ChatDropDownProps<T>) => import("react/jsx-runtime").JSX.Element;
24
24
  export default ChatDropDown;
@@ -1,6 +1,6 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import ChatDropDown from "../components/ChatDropDown";
3
- import CircularIcon from "../components/CircularIcon";
3
+ // import CircularIcon from "../components/CircularIcon";
4
4
  const meta = {
5
5
  title: "DropDown/ChatDropDown",
6
6
  component: ChatDropDown,
@@ -34,9 +34,9 @@ export const Card = {
34
34
  filteredOptions: searchOption,
35
35
  handleOptionClick: handleOptionClick,
36
36
  handleInputChange: handleInputChange,
37
- renderProps: (props) => (_jsxs("div", { style: {
37
+ renderProps: (props) => (_jsx("div", { style: {
38
38
  display: "flex",
39
39
  alignItems: "center",
40
- }, onClick: () => handleOptionClick(props), children: [props.iconUrl !== undefined && (_jsx(CircularIcon, { iconPath: props.iconUrl, iconSize: "40" })), _jsx("span", { children: props.label })] }, props.label)),
40
+ }, onClick: () => handleOptionClick(props), children: _jsx("span", { children: props.label }) }, props.label)),
41
41
  },
42
42
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qlu-20-ui-library",
3
- "version": "1.3.48",
3
+ "version": "1.3.49",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite",