@epam/ai-dial-ui-kit 0.15.0-dev.6 → 0.15.0-dev.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.
Files changed (73) hide show
  1. package/README.md +140 -0
  2. package/dist/CHANGELOG.md +12 -0
  3. package/dist/{DateCellRenderer-BVM-Q8yx.cjs → DateCellRenderer-Bu40QyHE.cjs} +26 -26
  4. package/dist/DateCellRenderer-C3e61i75.cjs +1 -0
  5. package/dist/components/Dropdown/Dropdown.js +70 -65
  6. package/dist/components/Dropdown/DropdownSubMenuItem.js +63 -55
  7. package/dist/components/Dropdown/constants.js +14 -12
  8. package/dist/components/DropdownIcon/DropdownIcon.js +43 -32
  9. package/dist/components/New/Accordion/Accordion.js +39 -37
  10. package/dist/components/New/ButtonDropdown/ButtonDropdown.js +7 -6
  11. package/dist/components/New/Calendar/Calendar.js +253 -222
  12. package/dist/components/New/CaptionText/CaptionText.js +18 -15
  13. package/dist/components/New/CardShell/CardShell.js +4 -2
  14. package/dist/components/New/Checkbox/Checkbox.js +67 -56
  15. package/dist/components/New/Checkbox/CheckboxBox.js +4 -2
  16. package/dist/components/New/CloseButton/CloseButton.js +18 -16
  17. package/dist/components/New/CollapsibleSidebar/CollapsibleSidebar.js +39 -34
  18. package/dist/components/New/ConfirmationPopup/ConfirmationPopup.js +44 -39
  19. package/dist/components/New/Dropdown/Dropdown.js +101 -95
  20. package/dist/components/New/EllipsisTooltip/EllipsisTooltip.js +19 -17
  21. package/dist/components/New/FileDropzone/FileDropzone.js +27 -25
  22. package/dist/components/New/FilterChips/FilterChips.js +43 -0
  23. package/dist/components/New/FilterChips/constants.js +5 -0
  24. package/dist/components/New/FolderPath/FolderPath.js +29 -28
  25. package/dist/components/New/Highlight/Highlight.js +23 -30
  26. package/dist/components/New/InfoButton/InfoButton.js +12 -10
  27. package/dist/components/New/InlineSelect/InlineSelect.js +43 -41
  28. package/dist/components/New/InteractiveTooltip/InteractiveTooltip.js +40 -38
  29. package/dist/components/New/Label/Label.js +13 -8
  30. package/dist/components/New/MenuItem/MenuItem.js +29 -27
  31. package/dist/components/New/MenuItem/constants.js +9 -8
  32. package/dist/components/New/NoDataContent/NoDataContent.js +20 -18
  33. package/dist/components/New/Notification/Notification.js +18 -16
  34. package/dist/components/New/NumberInput/NumberInput.js +42 -33
  35. package/dist/components/New/PasswordInput/PasswordInput.js +41 -35
  36. package/dist/components/New/Popup/Popup.js +45 -43
  37. package/dist/components/New/Radio/Radio.js +75 -64
  38. package/dist/components/New/RadioGroup/RadioGroup.js +76 -65
  39. package/dist/components/New/RadioGroupPopupField/RadioGroupPopupField.js +117 -106
  40. package/dist/components/New/ResizableContainer/ResizableContainer.js +42 -40
  41. package/dist/components/New/Search/Search.js +28 -26
  42. package/dist/components/New/SegmentedControl/SegmentedControl.js +29 -23
  43. package/dist/components/New/Select/Select.js +120 -109
  44. package/dist/components/New/Switch/Switch.js +69 -58
  45. package/dist/components/New/Tabs/Tabs.js +28 -22
  46. package/dist/components/New/Tag/Tag.js +42 -40
  47. package/dist/components/New/TagInput/TagInput.js +44 -42
  48. package/dist/components/New/ToggleIconButton/ToggleIconButton.js +25 -23
  49. package/dist/components/New/Tooltip/TooltipContent.js +10 -8
  50. package/dist/components/ProgressBar/ProgressBar.js +45 -31
  51. package/dist/components/SchemaRenderer/components/SchemaAdditionalPropertiesEditor.js +46 -31
  52. package/dist/components/SchemaRenderer/components/SchemaKeyValueEditor.js +223 -135
  53. package/dist/components/SchemaRenderer/types.js +19 -8
  54. package/dist/components/SchemaRenderer/utils.js +121 -96
  55. package/dist/components/Skeleton/Skeleton.js +25 -19
  56. package/dist/components/Spinner/Spinner.js +6 -4
  57. package/dist/components-manifest.json +85 -2
  58. package/dist/constants/public-class-names.js +157 -0
  59. package/dist/dial-ui-kit.cjs +2 -2
  60. package/dist/dial-ui-kit.js +214 -210
  61. package/dist/file-manager.cjs +1 -1
  62. package/dist/grid.cjs +1 -1
  63. package/dist/index.css +1 -1
  64. package/dist/src/components/New/FilterChips/FilterChips.d.ts +69 -0
  65. package/dist/src/components/New/FilterChips/constants.d.ts +13 -0
  66. package/dist/src/components/SchemaRenderer/types.d.ts +11 -0
  67. package/dist/src/components/SchemaRenderer/utils.d.ts +5 -1
  68. package/dist/src/constants/public-class-names.d.ts +148 -0
  69. package/dist/src/index.d.ts +3 -0
  70. package/dist/use-file-manager-tabs-9DWkp9IJ.cjs +3 -0
  71. package/package.json +1 -1
  72. package/dist/DateCellRenderer-ssp7eaZY.cjs +0 -1
  73. package/dist/use-file-manager-tabs-DjdR_mYM.cjs +0 -3
@@ -1,56 +1,57 @@
1
1
  import { jsx as c } from "react/jsx-runtime";
2
- import { Resizable as A } from "../../../node_modules/re-resizable/lib/index.js";
3
- import { useState as M, useRef as B, useCallback as d, useMemo as D } from "react";
4
- import { ResizableContainerSide as w } from "../../../types/resizable-container.js";
5
- import { mergeClasses as L } from "../../../utils/merge-classes.js";
6
- import { ResizeHandle as T } from "./components/ResizeHandle.js";
7
- const j = 16, q = ({
8
- children: x,
9
- minWidth: n,
2
+ import { Resizable as E } from "../../../node_modules/re-resizable/lib/index.js";
3
+ import { useState as I, useRef as H, useCallback as d, useMemo as T } from "react";
4
+ import { ResizableContainerSide as _ } from "../../../types/resizable-container.js";
5
+ import { mergeClasses as y } from "../../../utils/merge-classes.js";
6
+ import { ResizeHandle as B } from "./components/ResizeHandle.js";
7
+ import { DIAL_KIT_CLASS as K } from "../../../constants/public-class-names.js";
8
+ const j = 16, J = ({
9
+ children: M,
10
+ minWidth: r,
10
11
  maxWidth: s,
11
12
  width: h,
12
- defaultWidth: I,
13
+ defaultWidth: w,
13
14
  onResizeStop: i,
14
15
  onResize: l,
15
- side: a = w.Right,
16
+ side: a = _.Right,
16
17
  keyboardStep: u = j,
17
18
  ariaLabel: g = "Resize panel",
18
- className: _,
19
+ className: x,
19
20
  resizeHandlerClassName: p,
20
21
  resizeHandler: z
21
22
  }) => {
22
- const [m, C] = M(!1), [E, R] = M(I ?? n), r = h !== void 0, o = r ? h : E, f = B(null), b = d(() => {
23
+ const [m, C] = I(!1), [A, R] = I(w ?? r), n = h !== void 0, o = n ? h : A, f = H(null), S = d(() => {
23
24
  C(!0);
24
- }, []), v = d(() => {
25
+ }, []), b = d(() => {
25
26
  C(!1);
26
- const t = f.current?.resizable?.getBoundingClientRect(), e = t ? Math.round(t.width) : n;
27
- r || R(e), i?.(e);
28
- }, [i, r, n]), S = d(
27
+ const t = f.current?.resizable?.getBoundingClientRect(), e = t ? Math.round(t.width) : r;
28
+ n || R(e), i?.(e);
29
+ }, [i, n, r]), v = d(
29
30
  (t) => {
30
- const e = Math.min(s, Math.max(n, t));
31
- e !== o && (r || (R(e), f.current?.updateSize({ width: e, height: "100%" })), l?.(e), i?.(e));
31
+ const e = Math.min(s, Math.max(r, t));
32
+ e !== o && (n || (R(e), f.current?.updateSize({ width: e, height: "100%" })), l?.(e), i?.(e));
32
33
  },
33
- [s, n, o, r, l, i]
34
- ), H = D(() => {
35
- const t = a === w.Left, e = /* @__PURE__ */ c(
36
- T,
34
+ [s, r, o, n, l, i]
35
+ ), L = T(() => {
36
+ const t = a === _.Left, e = /* @__PURE__ */ c(
37
+ B,
37
38
  {
38
39
  side: a,
39
40
  isResizing: m,
40
41
  width: o,
41
- minWidth: n,
42
+ minWidth: r,
42
43
  maxWidth: s,
43
44
  step: u,
44
45
  ariaLabel: g,
45
- onWidthChange: S,
46
+ onWidthChange: v,
46
47
  customHandler: z,
47
48
  handlerClassName: p
48
49
  }
49
50
  );
50
51
  return {
51
- size: r ? { width: o, height: "100%" } : void 0,
52
- defaultSize: r ? void 0 : { width: o, height: "100%" },
53
- minWidth: n,
52
+ size: n ? { width: o, height: "100%" } : void 0,
53
+ defaultSize: n ? void 0 : { width: o, height: "100%" },
54
+ minWidth: r,
54
55
  maxWidth: s,
55
56
  enable: {
56
57
  left: t,
@@ -68,39 +69,40 @@ const j = 16, q = ({
68
69
  left: t ? e : void 0,
69
70
  right: t ? void 0 : e
70
71
  },
71
- onResizeStart: b,
72
- onResize: (k, F, y) => {
73
- l?.(Math.round(y.offsetWidth));
72
+ onResizeStart: S,
73
+ onResize: (k, F, D) => {
74
+ l?.(Math.round(D.offsetWidth));
74
75
  },
75
- onResizeStop: v
76
+ onResizeStop: b
76
77
  };
77
78
  }, [
78
79
  a,
79
- r,
80
- o,
81
80
  n,
81
+ o,
82
+ r,
82
83
  s,
83
84
  u,
84
85
  g,
85
- S,
86
+ v,
86
87
  z,
87
88
  p,
88
89
  m,
90
+ S,
89
91
  b,
90
- v,
91
92
  l
92
93
  ]);
93
- return /* @__PURE__ */ c(A, { ref: f, ...H, children: /* @__PURE__ */ c(
94
+ return /* @__PURE__ */ c(E, { ref: f, ...L, children: /* @__PURE__ */ c(
94
95
  "div",
95
96
  {
96
- className: L(
97
+ className: y(
98
+ K.resizableContainer,
97
99
  "group flex size-full flex-col bg-layer-raised transition-all motion-reduce:transition-none",
98
- _
100
+ x
99
101
  ),
100
- children: x
102
+ children: M
101
103
  }
102
104
  ) });
103
105
  };
104
106
  export {
105
- q as ResizableContainer
107
+ J as ResizableContainer
106
108
  };
@@ -1,18 +1,19 @@
1
- import { jsx as e } from "react/jsx-runtime";
1
+ import { jsx as o } from "react/jsx-runtime";
2
2
  import { IconX as _, IconSearch as h } from "@tabler/icons-react";
3
- import { useRef as R, useCallback as k } from "react";
4
- import { useMergeRefs as E } from "@floating-ui/react";
5
- import { GhostIconButton as M } from "../IconButton/IconButtonWrappers.js";
6
- import { Input as N } from "../Input/Input.js";
3
+ import { useRef as A, useCallback as R } from "react";
4
+ import { useMergeRefs as k } from "@floating-ui/react";
5
+ import { GhostIconButton as D } from "../IconButton/IconButtonWrappers.js";
6
+ import { Input as E } from "../Input/Input.js";
7
7
  import { DIAL_KIT_ICON_STROKE as n } from "../constants/icon.js";
8
- import { DIAL_ICON_SIZE as o } from "../../../constants/icon.js";
8
+ import { DIAL_ICON_SIZE as e } from "../../../constants/icon.js";
9
9
  import { ElementSize as r } from "../../../types/size.js";
10
- import { mergeClasses as A } from "../../../utils/merge-classes.js";
11
- const D = {
12
- [r.Small]: o.SM,
13
- [r.Standard]: o.MD,
14
- [r.Large]: o.MD
15
- }, g = ({
10
+ import { mergeClasses as L } from "../../../utils/merge-classes.js";
11
+ import { DIAL_KIT_CLASS as M } from "../../../constants/public-class-names.js";
12
+ const N = {
13
+ [r.Small]: e.SM,
14
+ [r.Standard]: e.MD,
15
+ [r.Large]: e.MD
16
+ }, v = ({
16
17
  size: s = r.Standard,
17
18
  placeholder: c = "Search...",
18
19
  withoutBorder: f = !1,
@@ -22,43 +23,44 @@ const D = {
22
23
  onChange: t,
23
24
  wrapperClassName: p,
24
25
  inputRef: S,
25
- ...u
26
+ ...I
26
27
  }) => {
27
- const m = R(null), I = E([S, m]), d = !!i && !a, C = k(() => {
28
+ const m = A(null), u = k([S, m]), d = !!i && !a, C = R(() => {
28
29
  t?.(void 0), m.current?.focus();
29
30
  }, [t]);
30
- return /* @__PURE__ */ e(
31
- N,
31
+ return /* @__PURE__ */ o(
32
+ E,
32
33
  {
33
- ...u,
34
+ ...I,
34
35
  size: s,
35
36
  value: i,
36
37
  disabled: a,
37
38
  onChange: t,
38
39
  placeholder: c,
39
- inputRef: I,
40
- wrapperClassName: A(
40
+ inputRef: u,
41
+ wrapperClassName: L(
42
+ M.search,
41
43
  f && "dial-kit-input-borderless",
42
44
  p
43
45
  ),
44
- iconBefore: /* @__PURE__ */ e(
46
+ iconBefore: /* @__PURE__ */ o(
45
47
  h,
46
48
  {
47
- size: D[s],
49
+ size: N[s],
48
50
  stroke: n,
49
51
  className: "text-secondary",
50
52
  "aria-hidden": "true"
51
53
  }
52
54
  ),
53
- iconAfter: d ? /* @__PURE__ */ e(
54
- M,
55
+ iconAfter: d ? /* @__PURE__ */ o(
56
+ D,
55
57
  {
56
58
  size: r.Small,
57
59
  "aria-label": l,
58
- icon: /* @__PURE__ */ e(
60
+ icon: /* @__PURE__ */ o(
59
61
  _,
60
62
  {
61
- size: o.SM,
63
+ size: e.SM,
62
64
  stroke: n,
63
65
  "aria-hidden": "true"
64
66
  }
@@ -70,5 +72,5 @@ const D = {
70
72
  );
71
73
  };
72
74
  export {
73
- g as Search
75
+ v as Search
74
76
  };
@@ -1,24 +1,25 @@
1
- import { jsx as x, jsxs as C } from "react/jsx-runtime";
2
- import { useRef as I, useCallback as k } from "react";
1
+ import { jsx as v, jsxs as x } from "react/jsx-runtime";
2
+ import { useRef as k, useCallback as A } from "react";
3
3
  import { mergeClasses as u } from "../../../utils/merge-classes.js";
4
- import { resolveAccessibleName as w } from "../../../utils/accessible-name.js";
5
- import { NAVIGATION_KEYS as h, segmentDisabledSelectedClassName as A, segmentDisabledUnselectedClassName as D, segmentSelectedInteractiveClassName as S, segmentUnselectedInteractiveClassName as y, segmentSelectedClassName as U, segmentUnselectedClassName as K, segmentClassName as R, containerClassName as j } from "./constants.js";
4
+ import { resolveAccessibleName as S } from "../../../utils/accessible-name.js";
5
+ import { NAVIGATION_KEYS as w, segmentDisabledSelectedClassName as D, segmentDisabledUnselectedClassName as h, segmentSelectedInteractiveClassName as y, segmentUnselectedInteractiveClassName as K, segmentSelectedClassName as U, segmentUnselectedClassName as L, segmentClassName as R, containerClassName as _ } from "./constants.js";
6
+ import { DIAL_KIT_CLASS as f } from "../../../constants/public-class-names.js";
6
7
  const M = ({
7
8
  items: l,
8
9
  value: r,
9
10
  onChange: c,
10
11
  disabled: o,
11
- className: f,
12
- segmentClassName: g,
13
- "aria-label": N
12
+ className: g,
13
+ segmentClassName: p,
14
+ "aria-label": C
14
15
  }) => {
15
- const m = I({}), d = l.find((e) => e.value === r), p = d && !d.disabled ? d.value : l.find((e) => !e.disabled)?.value, v = k(
16
+ const b = k({}), d = l.find((e) => e.value === r), I = d && !d.disabled ? d.value : l.find((e) => !e.disabled)?.value, N = A(
16
17
  (e) => {
17
- if (o || !h.includes(e.key)) return;
18
- const a = l.filter((b) => !b.disabled);
18
+ if (o || !w.includes(e.key)) return;
19
+ const a = l.filter((m) => !m.disabled);
19
20
  if (a.length === 0) return;
20
21
  const s = Math.max(
21
- a.findIndex((b) => b.value === r),
22
+ a.findIndex((m) => m.value === r),
22
23
  0
23
24
  ), t = a.length - 1;
24
25
  let n = s;
@@ -40,41 +41,46 @@ const M = ({
40
41
  }
41
42
  e.preventDefault();
42
43
  const i = a[n];
43
- m.current[i.value]?.focus(), i.value !== r && c(i.value);
44
+ b.current[i.value]?.focus(), i.value !== r && c(i.value);
44
45
  },
45
46
  [o, l, r, c]
46
47
  );
47
- return /* @__PURE__ */ x(
48
+ return /* @__PURE__ */ v(
48
49
  "div",
49
50
  {
50
51
  role: "radiogroup",
51
- "aria-label": N,
52
+ "aria-label": C,
52
53
  "aria-disabled": o || void 0,
53
- onKeyDown: v,
54
- className: u(j, f),
54
+ onKeyDown: N,
55
+ className: u(
56
+ f.segmentedControl,
57
+ _,
58
+ g
59
+ ),
55
60
  children: l.map((e) => {
56
61
  const a = e.value === r, s = o || e.disabled;
57
- return /* @__PURE__ */ C(
62
+ return /* @__PURE__ */ x(
58
63
  "button",
59
64
  {
60
65
  ref: (t) => {
61
- m.current[e.value] = t;
66
+ b.current[e.value] = t;
62
67
  },
63
68
  type: "button",
64
69
  role: "radio",
65
70
  "aria-checked": a,
66
- "aria-label": w(
71
+ "aria-label": S(
67
72
  e["aria-label"],
68
73
  typeof e.label == "string" ? e.label : void 0
69
74
  ),
70
- tabIndex: e.value === p ? 0 : -1,
75
+ tabIndex: e.value === I ? 0 : -1,
71
76
  disabled: s,
72
77
  onClick: () => c(e.value),
73
78
  className: u(
79
+ f.segmentedControlItem,
74
80
  R,
75
- a ? U : K,
76
- s ? a ? A : D : a ? S : y,
77
- g
81
+ a ? U : L,
82
+ s ? a ? D : h : a ? y : K,
83
+ p
78
84
  ),
79
85
  children: [
80
86
  e.icon,