@epam/ai-dial-ui-kit 0.15.0-dev.6 → 0.15.0-dev.7

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 +139 -0
  2. package/dist/CHANGELOG.md +10 -0
  3. package/dist/{DateCellRenderer-BVM-Q8yx.cjs → DateCellRenderer-4iMidqal.cjs} +26 -26
  4. package/dist/DateCellRenderer-CTTAnQjB.cjs +1 -0
  5. package/dist/JsonEditor-D2jSlRFi.cjs +1 -0
  6. package/dist/{MarkdownEditor-jQ8nDJfx.cjs → MarkdownEditor-BzEbdj7R.cjs} +1 -1
  7. package/dist/{MarkdownEditor-DHn2pYOJ.cjs → MarkdownEditor-C9-ZMRVi.cjs} +1 -1
  8. package/dist/MarkdownEditorContainer-BvwJjkiZ.cjs +1 -0
  9. package/dist/components/Dropdown/Dropdown.js +70 -65
  10. package/dist/components/Dropdown/DropdownSubMenuItem.js +63 -55
  11. package/dist/components/Dropdown/constants.js +14 -12
  12. package/dist/components/DropdownIcon/DropdownIcon.js +43 -32
  13. package/dist/components/MarkdownEditor/MarkdownEditorContainer.js +18 -16
  14. package/dist/components/New/Accordion/Accordion.js +39 -37
  15. package/dist/components/New/ButtonDropdown/ButtonDropdown.js +7 -6
  16. package/dist/components/New/Calendar/Calendar.js +253 -222
  17. package/dist/components/New/CaptionText/CaptionText.js +18 -15
  18. package/dist/components/New/CardShell/CardShell.js +4 -2
  19. package/dist/components/New/Checkbox/Checkbox.js +67 -56
  20. package/dist/components/New/Checkbox/CheckboxBox.js +4 -2
  21. package/dist/components/New/CloseButton/CloseButton.js +18 -16
  22. package/dist/components/New/CollapsibleSidebar/CollapsibleSidebar.js +39 -34
  23. package/dist/components/New/ConfirmationPopup/ConfirmationPopup.js +44 -39
  24. package/dist/components/New/Dropdown/Dropdown.js +101 -95
  25. package/dist/components/New/EllipsisTooltip/EllipsisTooltip.js +19 -17
  26. package/dist/components/New/FileDropzone/FileDropzone.js +27 -25
  27. package/dist/components/New/FolderPath/FolderPath.js +29 -28
  28. package/dist/components/New/Highlight/Highlight.js +23 -30
  29. package/dist/components/New/InfoButton/InfoButton.js +12 -10
  30. package/dist/components/New/InlineSelect/InlineSelect.js +43 -41
  31. package/dist/components/New/InteractiveTooltip/InteractiveTooltip.js +40 -38
  32. package/dist/components/New/Label/Label.js +13 -8
  33. package/dist/components/New/MenuItem/MenuItem.js +29 -27
  34. package/dist/components/New/MenuItem/constants.js +9 -8
  35. package/dist/components/New/NoDataContent/NoDataContent.js +20 -18
  36. package/dist/components/New/Notification/Notification.js +18 -16
  37. package/dist/components/New/NumberInput/NumberInput.js +42 -33
  38. package/dist/components/New/PasswordInput/PasswordInput.js +41 -35
  39. package/dist/components/New/Popup/Popup.js +45 -43
  40. package/dist/components/New/Radio/Radio.js +75 -64
  41. package/dist/components/New/RadioGroup/RadioGroup.js +76 -65
  42. package/dist/components/New/RadioGroupPopupField/RadioGroupPopupField.js +117 -106
  43. package/dist/components/New/ResizableContainer/ResizableContainer.js +42 -40
  44. package/dist/components/New/Search/Search.js +28 -26
  45. package/dist/components/New/SegmentedControl/SegmentedControl.js +29 -23
  46. package/dist/components/New/Select/Select.js +120 -109
  47. package/dist/components/New/Switch/Switch.js +69 -58
  48. package/dist/components/New/Tabs/Tabs.js +28 -22
  49. package/dist/components/New/Tag/Tag.js +42 -40
  50. package/dist/components/New/TagInput/TagInput.js +44 -42
  51. package/dist/components/New/ToggleIconButton/ToggleIconButton.js +25 -23
  52. package/dist/components/New/Tooltip/TooltipContent.js +10 -8
  53. package/dist/components/ProgressBar/ProgressBar.js +45 -31
  54. package/dist/components/Skeleton/Skeleton.js +25 -19
  55. package/dist/components/Spinner/Spinner.js +6 -4
  56. package/dist/components-manifest.json +7 -2
  57. package/dist/constants/public-class-names.js +152 -0
  58. package/dist/dial-ui-kit.cjs +2 -2
  59. package/dist/dial-ui-kit.js +203 -201
  60. package/dist/editor-_174x-qy.cjs +1 -0
  61. package/dist/editors.cjs +1 -1
  62. package/dist/file-manager.cjs +1 -1
  63. package/dist/grid.cjs +1 -1
  64. package/dist/lazy-DM-7dL0Y.cjs +1 -0
  65. package/dist/src/constants/public-class-names.d.ts +143 -0
  66. package/dist/src/index.d.ts +1 -0
  67. package/dist/use-file-manager-tabs-DKmWaOlC.cjs +3 -0
  68. package/package.json +1 -1
  69. package/dist/DateCellRenderer-ssp7eaZY.cjs +0 -1
  70. package/dist/JsonEditor-qv1Z0dLX.cjs +0 -1
  71. package/dist/MarkdownEditorContainer-Bzcnoemw.cjs +0 -1
  72. package/dist/lazy-tfN4sKhq.cjs +0 -1
  73. package/dist/use-file-manager-tabs-DjdR_mYM.cjs +0 -3
@@ -1,44 +1,45 @@
1
1
  import { jsx as e, jsxs as d } from "react/jsx-runtime";
2
2
  import { IconChevronDown as O } from "@tabler/icons-react";
3
3
  import { useState as j } from "react";
4
- import { DialDropdown as w } from "../Dropdown/Dropdown.js";
4
+ import { DialDropdown as L } from "../Dropdown/Dropdown.js";
5
5
  import { DialIcon as m } from "../Icon/Icon.js";
6
- import { DIAL_ICON_SIZE as E } from "../../constants/icon.js";
6
+ import { DIAL_ICON_SIZE as _ } from "../../constants/icon.js";
7
+ import { DIAL_KIT_CLASS as p } from "../../constants/public-class-names.js";
7
8
  import { ElementSize as r } from "../../types/size.js";
8
9
  import { mergeClasses as o } from "../../utils/merge-classes.js";
9
10
  const F = ({
10
- icon: p,
11
+ icon: f,
11
12
  ariaLabel: b,
12
13
  size: n = r.Standard,
13
14
  disabled: a = !1,
14
- className: f,
15
- buttonClassName: u,
16
- iconClassName: x,
17
- caretIcon: h = /* @__PURE__ */ e(O, { size: E.SM }),
15
+ className: u,
16
+ buttonClassName: x,
17
+ iconClassName: h,
18
+ caretIcon: y = /* @__PURE__ */ e(O, { size: _.SM }),
18
19
  showCaret: t = !0,
19
- placement: y = "bottom-start",
20
- matchReferenceWidth: g = !1,
20
+ placement: g = "bottom-start",
21
+ matchReferenceWidth: S = !1,
21
22
  open: v,
22
- onOpenChange: S,
23
+ onOpenChange: I,
23
24
  defaultOpen: s = !1,
24
25
  ...z
25
26
  }) => {
26
- const i = n === r.Small, [D, C] = j(s), l = v ?? D, I = i ? "w-8 px-0" : "w-10 px-0", N = {
27
+ const i = n === r.Small, [C, D] = j(s), l = v ?? C, w = i ? "w-8 px-0" : "w-10 px-0", N = {
27
28
  [r.Small]: "size-5",
28
29
  [r.Standard]: "size-6",
29
30
  [r.Large]: "size-7"
30
31
  };
31
32
  return /* @__PURE__ */ e(
32
- w,
33
+ L,
33
34
  {
34
35
  ...z,
35
36
  disabled: a,
36
- placement: y,
37
- matchReferenceWidth: g,
38
- className: f,
37
+ placement: g,
38
+ matchReferenceWidth: S,
39
+ className: u,
39
40
  open: l,
40
41
  onOpenChange: (c) => {
41
- C(c), S?.(c);
42
+ D(c), I?.(c);
42
43
  },
43
44
  defaultOpen: s,
44
45
  children: /* @__PURE__ */ d(
@@ -52,35 +53,45 @@ const F = ({
52
53
  "enabled:hover:bg-accent-primary-alpha enabled:active:bg-controls-accent-primary-alpha-active",
53
54
  "focus-visible:border-focus focus-visible:outline-none disabled:cursor-not-allowed disabled:text-controls-secondary-disable disabled:opacity-75",
54
55
  i ? "h-8 px-2" : "h-10 px-2",
55
- t ? void 0 : I,
56
- u
56
+ t ? void 0 : w,
57
+ x
57
58
  ),
58
59
  children: [
59
60
  /* @__PURE__ */ e(
60
61
  m,
61
62
  {
62
- icon: p,
63
+ icon: f,
63
64
  className: o(
65
+ p.dropdownIcon,
64
66
  "flex items-center justify-center text-inherit",
65
67
  N[n],
66
68
  t && "-mr-2",
67
- x
69
+ h
68
70
  )
69
71
  }
70
72
  ),
71
- t && /* @__PURE__ */ d("div", { className: "relative z-10 inline-grid size-5 shrink-0 place-items-center", children: [
72
- /* @__PURE__ */ e("div", { className: "absolute inset-0 rounded-full bg-layer-2" }),
73
- /* @__PURE__ */ e(
74
- m,
75
- {
76
- icon: h,
77
- className: o(
78
- "relative flex items-center justify-center text-secondary transition-transform group-hover:text-primary group-disabled:text-controls-secondary-disable",
79
- l && "rotate-180"
73
+ t && /* @__PURE__ */ d(
74
+ "div",
75
+ {
76
+ className: o(
77
+ p.dropdownIconCaret,
78
+ "relative z-10 inline-grid size-5 shrink-0 place-items-center"
79
+ ),
80
+ children: [
81
+ /* @__PURE__ */ e("div", { className: "absolute inset-0 rounded-full bg-layer-2" }),
82
+ /* @__PURE__ */ e(
83
+ m,
84
+ {
85
+ icon: y,
86
+ className: o(
87
+ "relative flex items-center justify-center text-secondary transition-transform group-hover:text-primary group-disabled:text-controls-secondary-disable",
88
+ l && "rotate-180"
89
+ )
90
+ }
80
91
  )
81
- }
82
- )
83
- ] })
92
+ ]
93
+ }
94
+ )
84
95
  ]
85
96
  }
86
97
  )
@@ -1,26 +1,28 @@
1
1
  import { jsx as e, jsxs as r } from "react/jsx-runtime";
2
2
  import { useId as g, useState as x, useEffect as J, useCallback as u } from "react";
3
- import { DialSwitch as S } from "../Switch/Switch.js";
4
- import { EditorThemes as b } from "../../types/editor.js";
3
+ import "../../constants/editor.js";
4
+ import { EditorThemes as S } from "../../types/editor.js";
5
+ import "@monaco-editor/react";
6
+ import { DialSwitch as b } from "../Switch/Switch.js";
5
7
  import { DialMarkdownEditor as v } from "./MarkdownEditor.js";
6
8
  import { DialLabel as y } from "../Label/Label.js";
7
- const z = ({
9
+ const $ = ({
8
10
  value: s,
9
11
  onChangeValue: l,
10
- label: i,
12
+ label: t,
11
13
  headerContent: d,
12
14
  switcherLabel: a,
13
15
  height: c = 300,
14
- theme: m = b.dark,
16
+ theme: m = S.dark,
15
17
  onValidateJSON: f,
16
18
  preview: C = "edit"
17
19
  }) => {
18
- const N = g(), [n, w] = x(!1), [p, D] = x(null);
20
+ const N = g(), [i, w] = x(!1), [p, D] = x(null);
19
21
  J(() => {
20
- n && typeof window < "u" && import("../JsonEditor/JsonEditor.js").then((o) => {
22
+ i && typeof window < "u" && import("../JsonEditor/JsonEditor.js").then((o) => {
21
23
  D(() => o.DialJsonEditor);
22
24
  });
23
- }, [n]);
25
+ }, [i]);
24
26
  const h = u(
25
27
  (o) => {
26
28
  l?.(o);
@@ -31,16 +33,16 @@ const z = ({
31
33
  f?.(o);
32
34
  },
33
35
  [f]
34
- ), t = !!a;
36
+ ), n = !!a;
35
37
  return /* @__PURE__ */ e("div", { className: "size-full flex flex-col", children: /* @__PURE__ */ e("div", { className: "flex flex-col gap-8", children: /* @__PURE__ */ r("div", { children: [
36
- (i || d || t) && /* @__PURE__ */ r("div", { className: "flex justify-between items-center mb-2", children: [
37
- i && /* @__PURE__ */ e(y, { label: i }),
38
+ (t || d || n) && /* @__PURE__ */ r("div", { className: "flex justify-between items-center mb-2", children: [
39
+ t && /* @__PURE__ */ e(y, { label: t }),
38
40
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2 flex-1 justify-end", children: [
39
41
  d,
40
- t && /* @__PURE__ */ e("label", { className: "flex items-center gap-2 cursor-pointer", children: /* @__PURE__ */ e(
41
- S,
42
+ n && /* @__PURE__ */ e("label", { className: "flex items-center gap-2 cursor-pointer", children: /* @__PURE__ */ e(
43
+ b,
42
44
  {
43
- isOn: n,
45
+ isOn: i,
44
46
  label: a,
45
47
  switchId: N,
46
48
  onChange: (o) => w(o)
@@ -48,7 +50,7 @@ const z = ({
48
50
  ) })
49
51
  ] })
50
52
  ] }),
51
- t && n ? /* @__PURE__ */ e(
53
+ n && i ? /* @__PURE__ */ e(
52
54
  "div",
53
55
  {
54
56
  className: "border border-primary rounded",
@@ -76,5 +78,5 @@ const z = ({
76
78
  ] }) }) });
77
79
  };
78
80
  export {
79
- z as DialMarkdownEditorContainer
81
+ $ as DialMarkdownEditorContainer
80
82
  };
@@ -1,51 +1,53 @@
1
- import { jsxs as i, Fragment as _, jsx as e } from "react/jsx-runtime";
2
- import { IconChevronRight as j } from "@tabler/icons-react";
3
- import { useState as A, useId as C } from "react";
4
- import { DIAL_KIT_ICON_STROKE as S } from "../constants/icon.js";
5
- import { DIAL_ICON_SIZE as k } from "../../../constants/icon.js";
6
- import { resolveAccessibleName as O } from "../../../utils/accessible-name.js";
7
- import { mergeClasses as n } from "../../../utils/merge-classes.js";
8
- const F = ({
1
+ import { jsxs as a, Fragment as A, jsx as e } from "react/jsx-runtime";
2
+ import { IconChevronRight as S } from "@tabler/icons-react";
3
+ import { useState as C, useId as E } from "react";
4
+ import { DIAL_KIT_ICON_STROKE as j } from "../constants/icon.js";
5
+ import { DIAL_ICON_SIZE as L } from "../../../constants/icon.js";
6
+ import { resolveAccessibleName as T } from "../../../utils/accessible-name.js";
7
+ import { mergeClasses as r } from "../../../utils/merge-classes.js";
8
+ import { DIAL_KIT_CLASS as k } from "../../../constants/public-class-names.js";
9
+ const Z = ({
9
10
  title: p,
10
11
  description: s,
11
12
  children: h,
12
- expanded: l,
13
+ expanded: c,
13
14
  defaultExpanded: y = !1,
14
- disabled: r,
15
+ disabled: n,
15
16
  nonCollapsible: o,
16
- ariaLabel: v,
17
- onToggle: I,
17
+ ariaLabel: I,
18
+ onToggle: v,
18
19
  className: g,
19
- headerClassName: c,
20
+ headerClassName: l,
20
21
  contentClassName: N
21
22
  }) => {
22
- const d = l !== void 0, [b, w] = A(y), t = o ? !0 : d ? l : b, m = C(), a = `accordion-header-${m}`, x = `accordion-content-${m}`, E = () => {
23
- if (r) return;
23
+ const d = c !== void 0, [b, w] = C(y), t = o ? !0 : d ? c : b, m = E(), i = `accordion-header-${m}`, x = `accordion-content-${m}`, _ = () => {
24
+ if (n) return;
24
25
  const u = !t;
25
- d || w(u), I?.(u);
26
- }, f = /* @__PURE__ */ i(_, { children: [
27
- /* @__PURE__ */ i("span", { className: "flex min-w-0 flex-col", children: [
26
+ d || w(u), v?.(u);
27
+ }, f = /* @__PURE__ */ a(A, { children: [
28
+ /* @__PURE__ */ a("span", { className: "flex min-w-0 flex-col", children: [
28
29
  /* @__PURE__ */ e("span", { className: "truncate dial-body-text text-primary", children: p }),
29
30
  s ? /* @__PURE__ */ e("span", { className: "truncate dial-tiny-text text-secondary", children: s }) : null
30
31
  ] }),
31
32
  !o && // Caret at the leading edge; it turns a quarter turn to point down when open.
32
33
  /* @__PURE__ */ e(
33
- j,
34
+ S,
34
35
  {
35
- size: k.SM,
36
- stroke: S,
36
+ size: L.SM,
37
+ stroke: j,
37
38
  "aria-hidden": "true",
38
- className: n(
39
+ className: r(
39
40
  "shrink-0 text-secondary transition-transform motion-reduce:transition-none",
40
41
  t && "rotate-90"
41
42
  )
42
43
  }
43
44
  )
44
45
  ] });
45
- return /* @__PURE__ */ i(
46
+ return /* @__PURE__ */ a(
46
47
  "div",
47
48
  {
48
- className: n(
49
+ className: r(
50
+ k.accordion,
49
51
  "flex flex-col gap-3 py-3 overflow-hidden bg-transparent ",
50
52
  g
51
53
  ),
@@ -53,30 +55,30 @@ const F = ({
53
55
  o ? /* @__PURE__ */ e(
54
56
  "div",
55
57
  {
56
- id: a,
57
- className: n(
58
+ id: i,
59
+ className: r(
58
60
  "flex w-full px-4 rounded-xl items-center justify-between dial-tiny-text",
59
- c
61
+ l
60
62
  ),
61
63
  children: f
62
64
  }
63
65
  ) : /* @__PURE__ */ e(
64
66
  "button",
65
67
  {
66
- id: a,
68
+ id: i,
67
69
  type: "button",
68
70
  "aria-expanded": t,
69
71
  "aria-controls": t ? x : void 0,
70
- "aria-label": O(v),
71
- disabled: r,
72
- onClick: E,
73
- className: n(
72
+ "aria-label": T(I),
73
+ disabled: n,
74
+ onClick: _,
75
+ className: r(
74
76
  "flex w-full px-4 rounded-xl items-center justify-between dial-tiny-text",
75
- r ? "cursor-not-allowed opacity-75" : (
77
+ n ? "cursor-not-allowed opacity-75" : (
76
78
  // Applied only to a header that can actually be operated.
77
79
  "cursor-pointer hover:bg-control-accent-alpha-hover focus-visible:outline focus-visible:outline-focus"
78
80
  ),
79
- c
81
+ l
80
82
  ),
81
83
  children: f
82
84
  }
@@ -86,8 +88,8 @@ const F = ({
86
88
  {
87
89
  id: x,
88
90
  role: "region",
89
- "aria-labelledby": a,
90
- className: n(
91
+ "aria-labelledby": i,
92
+ className: r(
91
93
  "px-4 dial-small-text text-primary",
92
94
  N
93
95
  ),
@@ -99,5 +101,5 @@ const F = ({
99
101
  );
100
102
  };
101
103
  export {
102
- F as Accordion
104
+ Z as Accordion
103
105
  };
@@ -2,16 +2,17 @@ import { jsx as r } from "react/jsx-runtime";
2
2
  import { useState as s, useMemo as u } from "react";
3
3
  import { ButtonAppearance as d, ButtonVariant as c } from "../../../types/button.js";
4
4
  import { Button as f } from "../Button/Button.js";
5
- import { Dropdown as h } from "../Dropdown/Dropdown.js";
6
- import { getButtonChevron as B } from "./constants.js";
7
- const g = ({
5
+ import { Dropdown as D } from "../Dropdown/Dropdown.js";
6
+ import { getButtonChevron as h } from "./constants.js";
7
+ import { DIAL_KIT_CLASS as l } from "../../../constants/public-class-names.js";
8
+ const I = ({
8
9
  variant: n,
9
10
  appearance: t,
10
11
  items: e,
11
12
  ...p
12
13
  }) => {
13
- const [o, a] = s(!1), i = u(() => B(o), [o]);
14
- return /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(h, { items: e, onOpenChange: (m) => a(m), children: /* @__PURE__ */ r(
14
+ const [o, a] = s(!1), i = u(() => h(o), [o]);
15
+ return /* @__PURE__ */ r("div", { className: l.buttonDropdown, children: /* @__PURE__ */ r(D, { items: e, onOpenChange: (m) => a(m), children: /* @__PURE__ */ r(
15
16
  f,
16
17
  {
17
18
  ...p,
@@ -24,5 +25,5 @@ const g = ({
24
25
  ) }) });
25
26
  };
26
27
  export {
27
- g as ButtonDropdown
28
+ I as ButtonDropdown
28
29
  };