@epam/ai-dial-ui-kit 0.16.0-dev.35 → 0.16.0-dev.37

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/CHANGELOG.md CHANGED
@@ -25,6 +25,8 @@ Versions match the git tags on the `development` branch.
25
25
 
26
26
  ### Added
27
27
 
28
+ - **`PasswordInput` (2.0) — `isToggleHidden`** — the reveal toggle could only be removed by disabling the field, so a host with nothing to reveal (a stored secret the server never returns) had to hide the button with a CSS selector on the kit's markup. `isToggleHidden` draws no toggle and keeps the value masked while the field stays editable; a reveal switched on before the toggle went away comes back masked. Additive.
29
+
28
30
  - **`Select` (2.0) — `ariaDescribedBy`** — ids of elements that describe the field from outside it, such as an error a form renders under its own label; the field's own `error` / `caption` are linked automatically. Additive.
29
31
 
30
32
  - **`mergeClasses` — the `dial-*-text` type scale is one conflict group** — a caller's `dial-small-text` passed to a component whose default is `dial-tiny-text` kept both classes, and the step declared later in `typography.scss` won whatever the caller asked for. A later type-scale class now replaces an earlier one, as `w-*` or `px-*` do. The public `dial-kit-*-text` classes are not part of the group. Reported from `ai-dial-chat`.
@@ -1,58 +1,59 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { IconEyeOff as c, IconEye as l } from "@tabler/icons-react";
3
- import { useState as u, useEffect as w } from "react";
4
- import { GhostIconButton as d } from "../IconButton/IconButtonWrappers.js";
5
- import { Input as C } from "../Input/Input.js";
6
- import { DIAL_KIT_ICON_STROKE as i } from "../constants/icon.js";
2
+ import { IconEyeOff as c, IconEye as u } from "@tabler/icons-react";
3
+ import { useState as w, useEffect as C } from "react";
4
+ import { GhostIconButton as _ } from "../IconButton/IconButtonWrappers.js";
5
+ import { Input as E } from "../Input/Input.js";
6
+ import { DIAL_KIT_ICON_STROKE as a } from "../constants/icon.js";
7
7
  import { DIAL_ICON_SIZE as m } from "../../../constants/icon.js";
8
- import { ElementSize as a } from "../../../types/size.js";
9
- import { DIAL_KIT_CLASS as _ } from "../../../constants/public-class-names.js";
10
- import { mergeClasses as E } from "../../../utils/merge-classes.js";
8
+ import { ElementSize as p } from "../../../types/size.js";
9
+ import { DIAL_KIT_CLASS as h } from "../../../constants/public-class-names.js";
10
+ import { mergeClasses as A } from "../../../utils/merge-classes.js";
11
11
  const K = ({
12
- showPasswordLabel: p = "Show password",
12
+ showPasswordLabel: n = "Show password",
13
13
  hidePasswordLabel: f = "Hide password",
14
- disabled: r,
15
- size: n = a.Standard,
14
+ disabled: s,
15
+ isToggleHidden: I,
16
+ size: l = p.Standard,
16
17
  ...t
17
18
  }) => {
18
- const [I, s] = u(!1), o = I && !r;
19
- return w(() => {
20
- r && s(!1);
21
- }, [r]), /* @__PURE__ */ e(
22
- C,
19
+ const [d, i] = w(!1), o = !s && !I, r = d && o;
20
+ return C(() => {
21
+ o || i(!1);
22
+ }, [o]), /* @__PURE__ */ e(
23
+ E,
23
24
  {
24
25
  ...t,
25
- wrapperClassName: E(
26
+ wrapperClassName: A(
26
27
  t.wrapperClassName,
27
- _.passwordInput
28
+ h.passwordInput
28
29
  ),
29
- size: n,
30
- disabled: r,
31
- type: o ? "text" : "password",
32
- iconAfter: r ? void 0 : /* @__PURE__ */ e(
33
- d,
30
+ size: l,
31
+ disabled: s,
32
+ type: r ? "text" : "password",
33
+ iconAfter: o ? /* @__PURE__ */ e(
34
+ _,
34
35
  {
35
- size: a.Small,
36
- "aria-label": o ? f : p,
37
- "aria-pressed": o,
38
- icon: o ? /* @__PURE__ */ e(
36
+ size: p.Small,
37
+ "aria-label": r ? f : n,
38
+ "aria-pressed": r,
39
+ icon: r ? /* @__PURE__ */ e(
39
40
  c,
40
41
  {
41
42
  size: m.SM,
42
- stroke: i,
43
+ stroke: a,
43
44
  "aria-hidden": "true"
44
45
  }
45
46
  ) : /* @__PURE__ */ e(
46
- l,
47
+ u,
47
48
  {
48
49
  size: m.SM,
49
- stroke: i,
50
+ stroke: a,
50
51
  "aria-hidden": "true"
51
52
  }
52
53
  ),
53
- onClick: () => s((S) => !S)
54
+ onClick: () => i((S) => !S)
54
55
  }
55
- )
56
+ ) : void 0
56
57
  }
57
58
  );
58
59
  };
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "0.16.0-dev.35",
3
- "generatedAt": "2026-10-22T14:39:18.409Z",
2
+ "version": "0.16.0-dev.37",
3
+ "generatedAt": "2026-10-23T14:29:15.666Z",
4
4
  "kit": {
5
5
  "name": "@epam/ai-dial-ui-kit",
6
6
  "description": "A modern UI kit for building AI DIAL interfaces with React",
@@ -1692,7 +1692,7 @@
1692
1692
  "name": "PasswordInput",
1693
1693
  "category": "Components_2_0",
1694
1694
  "generation": "2.0",
1695
- "description": "A password field with a reveal toggle, built on .\naliases: SecureInput|ToggleablePassword\nDesign system 2.0\n\nThe toggle is a real `<button>`, so it is reachable by keyboard and announces\nboth its purpose and its state. `type` and `iconAfter` are owned by this\ncomponent; every other prop is passed through.\n\nA disabled field is masked with no toggle at all, and comes back masked if it\nis enabled again.",
1695
+ "description": "A password field with a reveal toggle, built on .\naliases: SecureInput|ToggleablePassword\nDesign system 2.0\n\nThe toggle is a real `<button>`, so it is reachable by keyboard and announces\nboth its purpose and its state. `type` and `iconAfter` are owned by this\ncomponent; every other prop is passed through.\n\nA disabled field is masked with no toggle at all, and comes back masked if it\nis enabled again.\n\n`isToggleHidden` does the same without disabling the field: use it when there\nis nothing to reveal, such as a stored secret the server never returns.",
1696
1696
  "props": [
1697
1697
  {
1698
1698
  "name": "showPasswordLabel",
@@ -1707,6 +1707,12 @@
1707
1707
  "required": false,
1708
1708
  "defaultValue": "'Hide password'",
1709
1709
  "description": "Accessible name of the toggle while the value is visible"
1710
+ },
1711
+ {
1712
+ "name": "isToggleHidden",
1713
+ "type": "boolean",
1714
+ "required": false,
1715
+ "description": "Hides the reveal toggle and keeps the value masked, leaving the field editable"
1710
1716
  }
1711
1717
  ],
1712
1718
  "examples": [