@epam/ai-dial-ui-kit 0.16.0-dev.25 → 0.16.0-dev.32

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.
Files changed (32) hide show
  1. package/dist/CHANGELOG.md +9 -0
  2. package/dist/{DateCellRenderer-BmgQYPuv.cjs → DateCellRenderer-ZFBZsJdH.cjs} +24 -24
  3. package/dist/{IconButton-B1Hx0Y3y.cjs → IconButton-CsePS6PY.cjs} +1 -1
  4. package/dist/{JsonEditor-Bxui5wJH.cjs → JsonEditor-DQhHSm93.cjs} +1 -1
  5. package/dist/{MarkdownEditor-BKtFs714.cjs → MarkdownEditor-CvIPIbPq.cjs} +1 -1
  6. package/dist/{MarkdownEditor-Bapd1ycU.cjs → MarkdownEditor-TR6X_gdl.cjs} +1 -1
  7. package/dist/{MarkdownEditorContainer-DLPODjar.cjs → MarkdownEditorContainer-JIn_VNUX.cjs} +1 -1
  8. package/dist/{Switch-DAaAOaIu.cjs → Switch-HEL_aq23.cjs} +1 -1
  9. package/dist/components/New/CaptionText/CaptionText.js +3 -4
  10. package/dist/components/New/Dropdown/Dropdown.js +208 -197
  11. package/dist/components/New/Input/Input.js +121 -107
  12. package/dist/components/New/SchemaRenderer/components/SchemaField.js +45 -44
  13. package/dist/components/New/SchemaRenderer/components/SchemaFieldContent.js +41 -38
  14. package/dist/components/New/SchemaRenderer/components/SchemaPrimitiveField.js +45 -39
  15. package/dist/components/New/Select/Select.js +201 -198
  16. package/dist/components/New/Textarea/Textarea.js +37 -33
  17. package/dist/components-manifest.json +10 -4
  18. package/dist/dial-ui-kit.cjs +3 -3
  19. package/dist/editors.cjs +1 -1
  20. package/dist/grid.cjs +1 -1
  21. package/dist/lazy-kq-xfXXv.cjs +1 -0
  22. package/dist/{merge-classes-BEJXjzkx.cjs → merge-classes-B0SnCG4i.cjs} +1 -1
  23. package/dist/migration-guides/0.16.0/caption-text-no-alert-role.md +90 -0
  24. package/dist/migration-guides/README.md +1 -0
  25. package/dist/src/components/New/CaptionText/CaptionText.d.ts +8 -1
  26. package/dist/src/components/New/SchemaRenderer/components/SchemaFieldContent.d.ts +1 -0
  27. package/dist/src/components/New/SchemaRenderer/components/SchemaPrimitiveField.d.ts +2 -0
  28. package/dist/src/components/New/SchemaRenderer/types.d.ts +3 -1
  29. package/dist/src/components/New/Select/Select.d.ts +2 -0
  30. package/dist/utils/merge-classes.js +36 -7
  31. package/package.json +1 -1
  32. package/dist/lazy-_W6FYhKg.cjs +0 -1
@@ -1,55 +1,57 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
- import { Input as b } from "../../Input/Input.js";
3
- import { NumberInput as A } from "../../NumberInput/NumberInput.js";
4
- import { PasswordInput as w } from "../../PasswordInput/PasswordInput.js";
5
- import { RadioGroup as O } from "../../RadioGroup/RadioGroup.js";
6
- import { Select as I } from "../../Select/Select.js";
7
- import { Switch as T } from "../../Switch/Switch.js";
8
- import { JsonSchemaType as p, SchemaDisplayMode as v, SchemaOrientation as V } from "../../../../types/json-schema.js";
9
- import { RadioGroupOrientation as N } from "../../../../types/radio-group.js";
10
- import { useSchemaContext as F } from "../context.js";
11
- const R = (e) => typeof e == "string" ? e : e[0], g = (e) => e != null ? String(e) : "", B = (e) => e !== void 0 ? Number(e) : void 0, K = ({
2
+ import { Input as I } from "../../Input/Input.js";
3
+ import { NumberInput as w } from "../../NumberInput/NumberInput.js";
4
+ import { PasswordInput as O } from "../../PasswordInput/PasswordInput.js";
5
+ import { RadioGroup as T } from "../../RadioGroup/RadioGroup.js";
6
+ import { Select as N } from "../../Select/Select.js";
7
+ import { Switch as v } from "../../Switch/Switch.js";
8
+ import { JsonSchemaType as p, SchemaDisplayMode as V, SchemaOrientation as F } from "../../../../types/json-schema.js";
9
+ import { RadioGroupOrientation as R } from "../../../../types/radio-group.js";
10
+ import { useSchemaContext as G } from "../context.js";
11
+ const C = (e) => typeof e == "string" ? e : e[0], S = (e) => e != null ? String(e) : "", M = (e) => e !== void 0 ? Number(e) : void 0, W = ({
12
12
  schema: e,
13
13
  value: t,
14
14
  onChange: i,
15
15
  invalid: c,
16
16
  id: o,
17
- ariaLabel: n
17
+ ariaLabel: n,
18
+ ariaDescribedBy: d
18
19
  }) => {
19
20
  const {
20
21
  texts: a,
21
22
  readonly: s = !1,
22
23
  inputClassName: u,
23
- acceptableResourceTypes: C
24
- } = F(), P = e.const !== void 0, d = Array.isArray(e.enum) ? e.enum : [], S = d.length > 0;
24
+ acceptableResourceTypes: P
25
+ } = G(), h = e.const !== void 0, m = Array.isArray(e.enum) ? e.enum : [], b = m.length > 0;
25
26
  if (e["dial:resource"] === !0 && Array.isArray(e.acceptableResourceTypes) && e.acceptableResourceTypes.length > 0 && (e.type === p.String || e.type === void 0)) {
26
27
  const r = (e.acceptableResourceTypes ?? []).flatMap(
27
- (m) => {
28
- const y = C?.[m];
29
- return Array.isArray(y) ? y.map((h) => {
30
- const f = String(h);
31
- return { value: f, label: f };
28
+ (g) => {
29
+ const f = P?.[g];
30
+ return Array.isArray(f) ? f.map((A) => {
31
+ const y = String(A);
32
+ return { value: y, label: y };
32
33
  }) : [];
33
34
  }
34
35
  );
35
36
  return /* @__PURE__ */ l(
36
- I,
37
+ N,
37
38
  {
38
39
  id: o,
39
40
  ariaLabel: n,
41
+ ariaDescribedBy: d,
40
42
  options: r,
41
43
  value: t != null ? String(t) : void 0,
42
44
  invalid: c,
43
45
  disabled: s,
44
- onChange: (m) => i(R(m)),
46
+ onChange: (g) => i(C(g)),
45
47
  placeholder: a.enumSelectPlaceholder,
46
48
  className: u
47
49
  }
48
50
  );
49
51
  }
50
- if (P)
52
+ if (h)
51
53
  return /* @__PURE__ */ l(
52
- b,
54
+ I,
53
55
  {
54
56
  id: o,
55
57
  "aria-label": n,
@@ -58,33 +60,34 @@ const R = (e) => typeof e == "string" ? e : e[0], g = (e) => e != null ? String(
58
60
  containerClassName: u
59
61
  }
60
62
  );
61
- if (S && e.enumDisplay === v.Radio)
63
+ if (b && e.enumDisplay === V.Radio)
62
64
  return /* @__PURE__ */ l(
63
- O,
65
+ T,
64
66
  {
65
67
  id: o,
66
68
  ariaLabel: n,
67
- items: d.map((r) => ({ value: String(r), label: String(r) })),
69
+ items: m.map((r) => ({ value: String(r), label: String(r) })),
68
70
  value: t != null ? String(t) : void 0,
69
- orientation: e.enumOrientation === V.Row ? N.Row : N.Column,
71
+ orientation: e.enumOrientation === F.Row ? R.Row : R.Column,
70
72
  disabled: s,
71
73
  onChange: (r) => i(r)
72
74
  }
73
75
  );
74
- if (S)
76
+ if (b)
75
77
  return /* @__PURE__ */ l(
76
- I,
78
+ N,
77
79
  {
78
80
  id: o,
79
81
  ariaLabel: n,
80
- options: d.map((r) => ({
82
+ ariaDescribedBy: d,
83
+ options: m.map((r) => ({
81
84
  value: String(r),
82
85
  label: String(r)
83
86
  })),
84
87
  value: t != null ? String(t) : void 0,
85
88
  invalid: c,
86
89
  disabled: s,
87
- onChange: (r) => i(R(r)),
90
+ onChange: (r) => i(C(r)),
88
91
  placeholder: a.enumSelectPlaceholder,
89
92
  className: u
90
93
  }
@@ -92,7 +95,7 @@ const R = (e) => typeof e == "string" ? e : e[0], g = (e) => e != null ? String(
92
95
  switch (e.type) {
93
96
  case p.Boolean:
94
97
  return /* @__PURE__ */ l(
95
- T,
98
+ v,
96
99
  {
97
100
  id: o,
98
101
  "aria-label": n,
@@ -104,26 +107,28 @@ const R = (e) => typeof e == "string" ? e : e[0], g = (e) => e != null ? String(
104
107
  case p.Integer:
105
108
  case p.Number:
106
109
  return /* @__PURE__ */ l(
107
- A,
110
+ w,
108
111
  {
109
112
  id: o,
110
113
  "aria-label": n,
114
+ "aria-describedby": d,
111
115
  integer: e.type === p.Integer,
112
- value: g(t),
116
+ value: S(t),
113
117
  invalid: c,
114
118
  disabled: s,
115
- onChange: (r) => i(B(r)),
119
+ onChange: (r) => i(M(r)),
116
120
  placeholder: e.type === p.Integer ? a.integerInputPlaceholder : a.numberInputPlaceholder,
117
121
  containerClassName: u
118
122
  }
119
123
  );
120
124
  default:
121
125
  return e.isProtected ? /* @__PURE__ */ l(
122
- w,
126
+ O,
123
127
  {
124
128
  id: o,
125
129
  "aria-label": n,
126
- value: g(t),
130
+ "aria-describedby": d,
131
+ value: S(t),
127
132
  invalid: c,
128
133
  disabled: s,
129
134
  onChange: (r) => i(r ?? void 0),
@@ -131,11 +136,12 @@ const R = (e) => typeof e == "string" ? e : e[0], g = (e) => e != null ? String(
131
136
  containerClassName: u
132
137
  }
133
138
  ) : /* @__PURE__ */ l(
134
- b,
139
+ I,
135
140
  {
136
141
  id: o,
137
142
  "aria-label": n,
138
- value: g(t),
143
+ "aria-describedby": d,
144
+ value: S(t),
139
145
  invalid: c,
140
146
  disabled: s,
141
147
  onChange: (r) => i(r ?? void 0),
@@ -146,5 +152,5 @@ const R = (e) => typeof e == "string" ? e : e[0], g = (e) => e != null ? String(
146
152
  }
147
153
  };
148
154
  export {
149
- K as SchemaPrimitiveField
155
+ W as SchemaPrimitiveField
150
156
  };