@epam/ai-dial-ui-kit 0.6.0-rc.8 → 0.6.0-rc.9

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.
@@ -46694,17 +46694,17 @@ const L8 = {
46694
46694
  }, W7 = ({
46695
46695
  placeholder: e = "",
46696
46696
  selectedItems: t = [],
46697
- updateSelected: s,
46698
- listClassName: i,
46699
- listElementClassName: o,
46700
- containerClassName: n,
46701
- inputClassName: r
46697
+ listClassName: s,
46698
+ listElementClassName: i,
46699
+ containerClassName: o,
46700
+ inputClassName: n,
46701
+ onChange: r
46702
46702
  }) => {
46703
46703
  const [a, l] = I(""), c = D(
46704
46704
  (u) => {
46705
- u.key === "Enter" && (s([...t, u.currentTarget.value]), l("")), (u.key === "Backspace" || u.key === "Delete") && t.length && !a && s(t.slice(0, -1));
46705
+ u.key === "Enter" && (r([...t, u.currentTarget.value]), l("")), (u.key === "Backspace" || u.key === "Delete") && t.length && !a && r(t.slice(0, -1));
46706
46706
  },
46707
- [t, s, a]
46707
+ [t, r, a]
46708
46708
  ), d = D(
46709
46709
  (u) => {
46710
46710
  l(u.target.value);
@@ -46716,15 +46716,15 @@ const L8 = {
46716
46716
  {
46717
46717
  className: ee([
46718
46718
  "dial-input px-3 py-2 flex flex-row items-center flex-wrap w-fit gap-2",
46719
- n
46719
+ o
46720
46720
  ]),
46721
46721
  children: [
46722
46722
  /* @__PURE__ */ m(
46723
46723
  ev,
46724
46724
  {
46725
46725
  selectedItems: t,
46726
- listClassName: i,
46727
- listElementClassName: o
46726
+ listClassName: s,
46727
+ listElementClassName: i
46728
46728
  }
46729
46729
  ),
46730
46730
  /* @__PURE__ */ m(
@@ -46732,7 +46732,7 @@ const L8 = {
46732
46732
  {
46733
46733
  type: "text",
46734
46734
  value: a,
46735
- className: ee(["border-0 bg-transparent p-0", r]),
46735
+ className: ee(["border-0 bg-transparent p-0", n]),
46736
46736
  placeholder: t?.length ? "" : e,
46737
46737
  onKeyDown: c,
46738
46738
  onChange: d
@@ -1,10 +1,9 @@
1
1
  import { FC } from 'react';
2
2
  import { DialAutocompleteInputValueProps } from './AutocompleteInputValue';
3
3
  export interface DialAutocompleteInputProps extends DialAutocompleteInputValueProps {
4
- placeholder?: string;
5
- updateSelected: (items: string[]) => void;
6
4
  containerClassName?: string;
7
5
  inputClassName?: string;
6
+ onChange: (items: string[]) => void;
8
7
  }
9
8
  /**
10
9
  * A component that provides an interactive input field with autocomplete functionality. Users can
@@ -17,7 +16,7 @@ export interface DialAutocompleteInputProps extends DialAutocompleteInputValuePr
17
16
  * <DialAutocompleteInput
18
17
  * placeholder="Type to add items"
19
18
  * selectedItems={['Item 1', 'Item 2']}
20
- * updateSelected={(items) => console.log(items)}
19
+ * onChange={(items) => console.log(items)}
21
20
  * containerClassName="custom-container-class"
22
21
  * inputClassName="custom-input-class"
23
22
  * listClassName="custom-list-class"
@@ -27,7 +26,7 @@ export interface DialAutocompleteInputProps extends DialAutocompleteInputValuePr
27
26
  *
28
27
  * @param [placeholder] - The placeholder text displayed in the input field when no items are selected.
29
28
  * @param [selectedItems=[]] - An array of strings representing the currently selected items.
30
- * @param updateSelected - A callback function that updates the list of selected items. Called when items are added or removed.
29
+ * @param onChange - A callback function that updates the list of selected items. Called when items are added or removed.
31
30
  * @param [listClassName] - Additional CSS classes applied to the `<ul>` element containing the list of selected items.
32
31
  * @param [listElementClassName] - Additional CSS classes applied to each `<li>` element representing an individual selected item.
33
32
  * @param [containerClassName] - Additional CSS classes applied to the container `<div>` element wrapping the input and list.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-ui-kit",
3
- "version": "0.6.0-rc.8",
3
+ "version": "0.6.0-rc.9",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "description": "A modern UI kit for building AI DIAL interfaces with React",