@epam/ai-dial-ui-kit 0.4.0-rc.49 → 0.4.0-rc.50

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.
@@ -6911,20 +6911,21 @@ const _1 = {
6911
6911
  cssClass: r,
6912
6912
  containerCssClass: a,
6913
6913
  onChange: l,
6914
- size: c = fn.Base
6914
+ size: c = fn.Base,
6915
+ allowClear: d = !0
6915
6916
  }) => {
6916
- const [d, u] = M(t || "");
6917
+ const [u, h] = M(t || "");
6917
6918
  Ce(() => {
6918
- u(t || "");
6919
+ h(t || "");
6919
6920
  }, [t]);
6920
- const h = B(
6921
- (f) => {
6922
- u(f), l?.(f);
6921
+ const g = B(
6922
+ (m) => {
6923
+ h(m), l?.(m);
6923
6924
  },
6924
6925
  [l]
6925
- ), g = _1[c], p = B(() => {
6926
- h("");
6927
- }, [h]);
6926
+ ), p = _1[c], f = B(() => {
6927
+ g("");
6928
+ }, [g]);
6928
6929
  return /* @__PURE__ */ $(
6929
6930
  "div",
6930
6931
  {
@@ -6933,7 +6934,7 @@ const _1 = {
6933
6934
  n && "dial-input-error",
6934
6935
  o && "dial-input-disable",
6935
6936
  i && "dial-input-readonly",
6936
- g.containerClass,
6937
+ p.containerClass,
6937
6938
  a
6938
6939
  ),
6939
6940
  children: [
@@ -6944,8 +6945,8 @@ const _1 = {
6944
6945
  icon: /* @__PURE__ */ v(
6945
6946
  Om,
6946
6947
  {
6947
- size: g.iconSize,
6948
- stroke: g.iconStroke
6948
+ size: p.iconSize,
6949
+ stroke: p.iconStroke
6949
6950
  }
6950
6951
  )
6951
6952
  }
@@ -6957,27 +6958,27 @@ const _1 = {
6957
6958
  type: "text",
6958
6959
  autoComplete: "off",
6959
6960
  placeholder: s,
6960
- value: d ?? "",
6961
+ value: u ?? "",
6961
6962
  disabled: o,
6962
6963
  readOnly: i,
6963
6964
  className: Z(
6964
6965
  "border-0 bg-transparent w-full",
6965
6966
  r,
6966
- g.textClass
6967
+ p.textClass
6967
6968
  ),
6968
- onChange: (f) => !i && h(f.currentTarget.value)
6969
+ onChange: (m) => !i && g(m.currentTarget.value)
6969
6970
  }
6970
6971
  ),
6971
- d && !i && !o && /* @__PURE__ */ v(
6972
+ u && !i && !o && d && /* @__PURE__ */ v(
6972
6973
  Ie,
6973
6974
  {
6974
6975
  className: "text-primary cursor-pointer",
6975
6976
  icon: /* @__PURE__ */ v(
6976
6977
  ko,
6977
6978
  {
6978
- size: g.iconSize,
6979
- stroke: g.iconStroke,
6980
- onClick: p,
6979
+ size: p.iconSize,
6980
+ stroke: p.iconStroke,
6981
+ onClick: f,
6981
6982
  "aria-label": "Clear search",
6982
6983
  role: "button"
6983
6984
  }
@@ -11,6 +11,7 @@ export interface DialSearchProps {
11
11
  containerCssClass?: string;
12
12
  onChange?: (value: string) => void;
13
13
  size?: SearchSize;
14
+ allowClear?: boolean;
14
15
  }
15
16
  /**
16
17
  * A search input component with a customizable placeholder, icons, flexible props, and the ability
@@ -38,5 +39,6 @@ export interface DialSearchProps {
38
39
  * @param [containerCssClass] - Additional CSS classes applied to the container
39
40
  * @param [onChange] - Callback fired when the input value changes
40
41
  * @param [size=SearchSize.Base] - The size of the search input. Uses the {@link SearchSize} enum.
42
+ * @param [allowClear=true] - Whether to show a clear button when there is a value
41
43
  */
42
44
  export declare const DialSearch: FC<DialSearchProps>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-ui-kit",
3
- "version": "0.4.0-rc.49",
3
+ "version": "0.4.0-rc.50",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "description": "A modern UI kit for building AI DIAL interfaces with React",