@epam/ai-dial-ui-kit 0.15.0-dev.5 → 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 (63) 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/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/FolderPath/FolderPath.js +29 -28
  23. package/dist/components/New/Highlight/Highlight.js +23 -30
  24. package/dist/components/New/InfoButton/InfoButton.js +12 -10
  25. package/dist/components/New/InlineSelect/InlineSelect.js +43 -41
  26. package/dist/components/New/InteractiveTooltip/InteractiveTooltip.js +40 -38
  27. package/dist/components/New/Label/Label.js +13 -8
  28. package/dist/components/New/MenuItem/MenuItem.js +29 -27
  29. package/dist/components/New/MenuItem/constants.js +9 -8
  30. package/dist/components/New/NoDataContent/NoDataContent.js +20 -18
  31. package/dist/components/New/Notification/Notification.js +28 -26
  32. package/dist/components/New/NumberInput/NumberInput.js +42 -33
  33. package/dist/components/New/PasswordInput/PasswordInput.js +41 -35
  34. package/dist/components/New/Popup/Popup.js +45 -43
  35. package/dist/components/New/Radio/Radio.js +75 -64
  36. package/dist/components/New/RadioGroup/RadioGroup.js +76 -65
  37. package/dist/components/New/RadioGroupPopupField/RadioGroupPopupField.js +117 -106
  38. package/dist/components/New/ResizableContainer/ResizableContainer.js +42 -40
  39. package/dist/components/New/Search/Search.js +28 -26
  40. package/dist/components/New/SegmentedControl/SegmentedControl.js +29 -23
  41. package/dist/components/New/Select/Select.js +120 -109
  42. package/dist/components/New/Switch/Switch.js +69 -58
  43. package/dist/components/New/Tabs/Tabs.js +28 -22
  44. package/dist/components/New/Tag/Tag.js +42 -40
  45. package/dist/components/New/TagInput/TagInput.js +44 -42
  46. package/dist/components/New/ToggleIconButton/ToggleIconButton.js +25 -23
  47. package/dist/components/New/Tooltip/TooltipContent.js +10 -8
  48. package/dist/components/ProgressBar/ProgressBar.js +45 -33
  49. package/dist/components/Skeleton/Skeleton.js +25 -19
  50. package/dist/components/Spinner/Spinner.js +6 -4
  51. package/dist/components-manifest.json +7 -2
  52. package/dist/constants/public-class-names.js +152 -0
  53. package/dist/dial-ui-kit.cjs +2 -2
  54. package/dist/dial-ui-kit.js +203 -201
  55. package/dist/file-manager.cjs +1 -1
  56. package/dist/grid.cjs +1 -1
  57. package/dist/index.css +1 -1
  58. package/dist/src/constants/public-class-names.d.ts +143 -0
  59. package/dist/src/index.d.ts +1 -0
  60. package/dist/use-file-manager-tabs-DKmWaOlC.cjs +3 -0
  61. package/package.json +1 -1
  62. package/dist/DateCellRenderer-ssp7eaZY.cjs +0 -1
  63. package/dist/use-file-manager-tabs-DjdR_mYM.cjs +0 -3
@@ -3,26 +3,27 @@ import { useId as u, useCallback as x } from "react";
3
3
  import { ElementSize as v } from "../../../types/size.js";
4
4
  import { mergeClasses as f } from "../../../utils/merge-classes.js";
5
5
  import { resolveAccessibleName as C } from "../../../utils/accessible-name.js";
6
- import { Label as j } from "../Label/Label.js";
7
- import { CheckboxBox as z } from "./CheckboxBox.js";
8
- const T = ({
6
+ import { Label as I } from "../Label/Label.js";
7
+ import { CheckboxBox as A } from "./CheckboxBox.js";
8
+ import { DIAL_KIT_CLASS as L } from "../../../constants/public-class-names.js";
9
+ const D = ({
9
10
  id: h,
10
11
  labelProps: e,
11
12
  isSelected: t = !1,
12
13
  isIndeterminate: r = !1,
13
14
  invalid: i = !1,
14
15
  disabled: s,
15
- onChange: m,
16
- caption: l,
16
+ onChange: l,
17
+ caption: m,
17
18
  className: y,
18
19
  boxClassName: b,
19
20
  ...n
20
21
  }) => {
21
- const g = u(), a = h ?? g, d = l ? `${a}-caption` : void 0, k = x(
22
+ const k = u(), a = h ?? k, d = m ? `${a}-caption` : void 0, g = x(
22
23
  (o) => {
23
- m?.(o.target.checked);
24
+ l?.(o.target.checked);
24
25
  },
25
- [m]
26
+ [l]
26
27
  ), N = x(
27
28
  (o) => {
28
29
  o && (o.indeterminate = r);
@@ -30,63 +31,73 @@ const T = ({
30
31
  [r]
31
32
  );
32
33
  return /* @__PURE__ */ p("div", { className: "flex flex-col gap-1", children: [
33
- /* @__PURE__ */ p("div", { className: f("flex items-center gap-2", y), children: [
34
- /* @__PURE__ */ c(
35
- "input",
36
- {
37
- ...n,
38
- ref: N,
39
- type: "checkbox",
40
- id: a,
41
- checked: t,
42
- disabled: s,
43
- onChange: k,
44
- "aria-checked": r ? "mixed" : t,
45
- "aria-invalid": i || void 0,
46
- "aria-label": C(
47
- typeof e?.label != "string" ? n["aria-label"] : void 0
34
+ /* @__PURE__ */ p(
35
+ "div",
36
+ {
37
+ className: f(
38
+ L.checkbox,
39
+ "flex items-center gap-2",
40
+ y
41
+ ),
42
+ children: [
43
+ /* @__PURE__ */ c(
44
+ "input",
45
+ {
46
+ ...n,
47
+ ref: N,
48
+ type: "checkbox",
49
+ id: a,
50
+ checked: t,
51
+ disabled: s,
52
+ onChange: g,
53
+ "aria-checked": r ? "mixed" : t,
54
+ "aria-invalid": i || void 0,
55
+ "aria-label": C(
56
+ typeof e?.label != "string" ? n["aria-label"] : void 0
57
+ ),
58
+ "aria-describedby": d,
59
+ className: "peer sr-only"
60
+ }
61
+ ),
62
+ /* @__PURE__ */ c(
63
+ A,
64
+ {
65
+ htmlFor: a,
66
+ isSelected: t,
67
+ isIndeterminate: r,
68
+ invalid: i,
69
+ disabled: s,
70
+ className: b
71
+ }
48
72
  ),
49
- "aria-describedby": d,
50
- className: "peer sr-only"
51
- }
52
- ),
53
- /* @__PURE__ */ c(
54
- z,
55
- {
56
- htmlFor: a,
57
- isSelected: t,
58
- isIndeterminate: r,
59
- invalid: i,
60
- disabled: s,
61
- className: b
62
- }
63
- ),
64
- e && /* @__PURE__ */ c(
65
- j,
66
- {
67
- size: v.Standard,
68
- ...e,
69
- htmlFor: a,
70
- className: f(
71
- // `Label` defaults to the secondary colour; a checkbox's own label
72
- // is primary while the control is usable.
73
- "py-[1px]",
74
- s ? "cursor-not-allowed text-control-disable-primary" : "cursor-pointer text-primary",
75
- e.className
73
+ e && /* @__PURE__ */ c(
74
+ I,
75
+ {
76
+ size: v.Standard,
77
+ ...e,
78
+ htmlFor: a,
79
+ className: f(
80
+ // `Label` defaults to the secondary colour; a checkbox's own label
81
+ // is primary while the control is usable.
82
+ "py-[1px]",
83
+ s ? "cursor-not-allowed text-control-disable-primary" : "cursor-pointer text-primary",
84
+ e.className
85
+ )
86
+ }
76
87
  )
77
- }
78
- )
79
- ] }),
80
- l && /* @__PURE__ */ c(
88
+ ]
89
+ }
90
+ ),
91
+ m && /* @__PURE__ */ c(
81
92
  "span",
82
93
  {
83
94
  id: d,
84
95
  className: "dial-tiny-text text-secondary ml-[28px]",
85
- children: l
96
+ children: m
86
97
  }
87
98
  )
88
99
  ] });
89
100
  };
90
101
  export {
91
- T as Checkbox
102
+ D as Checkbox
92
103
  };
@@ -2,7 +2,8 @@ import { jsx as t } from "react/jsx-runtime";
2
2
  import { IconMinus as u, IconCheck as d } from "@tabler/icons-react";
3
3
  import { mergeClasses as b } from "../../../utils/merge-classes.js";
4
4
  import { CHECKBOX_ICON_PROPS as p } from "./constants.js";
5
- const C = ({
5
+ import { DIAL_KIT_CLASS as f } from "../../../constants/public-class-names.js";
6
+ const v = ({
6
7
  isSelected: n = !1,
7
8
  isIndeterminate: c = !1,
8
9
  invalid: r = !1,
@@ -11,6 +12,7 @@ const C = ({
11
12
  className: m
12
13
  }) => {
13
14
  const o = c || n, e = !!s, l = b(
15
+ f.checkboxBox,
14
16
  "grid size-[20px] shrink-0 place-items-center rounded border transition-colors duration-200",
15
17
  // 20px is below the 24x24 minimum target, so grow the pointer target
16
18
  // without touching the rendered size. The 44px enhanced target would
@@ -30,5 +32,5 @@ const C = ({
30
32
  return e ? /* @__PURE__ */ t("label", { htmlFor: s, className: l, children: i }) : /* @__PURE__ */ t("span", { "aria-hidden": "true", className: l, children: i });
31
33
  };
32
34
  export {
33
- C as CheckboxBox
35
+ v as CheckboxBox
34
36
  };
@@ -1,27 +1,29 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { IconX as I } from "@tabler/icons-react";
2
+ import { IconX as n } from "@tabler/icons-react";
3
3
  import { DIAL_KIT_ICON_STROKE as a } from "../constants/icon.js";
4
- import { DIAL_ICON_SIZE as t } from "../../../constants/icon.js";
5
- import { ElementSize as m } from "../../../types/size.js";
6
- import { GhostIconButton as p } from "../IconButton/IconButtonWrappers.js";
7
- const u = ({
8
- ariaLabel: i = "Close",
9
- className: e,
10
- size: o = m.Small,
4
+ import { DIAL_ICON_SIZE as m } from "../../../constants/icon.js";
5
+ import { ElementSize as t } from "../../../types/size.js";
6
+ import { GhostIconButton as I } from "../IconButton/IconButtonWrappers.js";
7
+ import { DIAL_KIT_CLASS as p } from "../../../constants/public-class-names.js";
8
+ import { mergeClasses as f } from "../../../utils/merge-classes.js";
9
+ const B = ({
10
+ ariaLabel: e = "Close",
11
+ className: i,
12
+ size: o = t.Small,
11
13
  onClose: l,
12
- ...n
14
+ ...s
13
15
  }) => /* @__PURE__ */ r(
14
- p,
16
+ I,
15
17
  {
16
- ...n,
18
+ ...s,
17
19
  size: o,
18
- "aria-label": i,
19
- className: e,
20
+ "aria-label": e,
21
+ className: f(p.closeButton, i),
20
22
  onClick: l,
21
23
  icon: /* @__PURE__ */ r(
22
- I,
24
+ n,
23
25
  {
24
- size: o === m.Small ? t.SM : t.MD,
26
+ size: o === t.Small ? m.SM : m.MD,
25
27
  stroke: a,
26
28
  "aria-hidden": "true"
27
29
  }
@@ -29,5 +31,5 @@ const u = ({
29
31
  }
30
32
  );
31
33
  export {
32
- u as CloseButton
34
+ B as CloseButton
33
35
  };
@@ -1,39 +1,44 @@
1
1
  import { jsxs as l, jsx as t } from "react/jsx-runtime";
2
- import { useState as w, useId as E } from "react";
3
- import { IconChevronsLeft as O, IconChevronsRight as k } from "@tabler/icons-react";
2
+ import { useState as j, useId as w } from "react";
3
+ import { IconChevronsLeft as E, IconChevronsRight as O } from "@tabler/icons-react";
4
4
  import { DIAL_KIT_ICON_STROKE as d } from "../constants/icon.js";
5
5
  import { DIAL_ICON_SIZE as p } from "../../../constants/icon.js";
6
- import { ButtonAppearance as z, ButtonVariant as A } from "../../../types/button.js";
7
- import { ElementSize as B } from "../../../types/size.js";
6
+ import { ButtonAppearance as k, ButtonVariant as z } from "../../../types/button.js";
7
+ import { ElementSize as T } from "../../../types/size.js";
8
8
  import { mergeClasses as r } from "../../../utils/merge-classes.js";
9
- import { IconButton as P } from "../IconButton/IconButton.js";
10
- const T = 48, q = ({
9
+ import { IconButton as B } from "../IconButton/IconButton.js";
10
+ import { DIAL_KIT_CLASS as K } from "../../../constants/public-class-names.js";
11
+ const P = 48, J = ({
11
12
  children: c,
12
13
  title: m,
13
14
  width: f = 280,
14
- collapsedWidth: h = T,
15
+ collapsedWidth: b = P,
15
16
  isOpened: o,
16
- defaultOpened: x = !0,
17
- onToggle: b,
18
- additionalButtons: u,
19
- ariaLabel: I = "Sidebar",
20
- collapseLabel: y = "Collapse sidebar",
21
- expandLabel: C = "Expand sidebar",
22
- className: v,
23
- titleClassName: S,
24
- contentClassName: g,
25
- footerClassName: D
17
+ defaultOpened: h = !0,
18
+ onToggle: x,
19
+ additionalButtons: I,
20
+ ariaLabel: u = "Sidebar",
21
+ collapseLabel: C = "Collapse sidebar",
22
+ expandLabel: S = "Expand sidebar",
23
+ className: y,
24
+ titleClassName: v,
25
+ contentClassName: L,
26
+ footerClassName: _
26
27
  }) => {
27
- const i = o !== void 0, [L, N] = w(x), e = i ? o : L, a = `collapsible-sidebar-content-${E()}`, n = e ? y : C, _ = (j) => {
28
+ const i = o !== void 0, [g, D] = j(h), e = i ? o : g, a = `collapsible-sidebar-content-${w()}`, n = e ? C : S, A = (N) => {
28
29
  const s = !e;
29
- i || N(s), b?.(s, j);
30
+ i || D(s), x?.(s, N);
30
31
  };
31
32
  return /* @__PURE__ */ l(
32
33
  "aside",
33
34
  {
34
- "aria-label": I,
35
- style: { width: `${e ? f : h}px` },
36
- className: r("flex flex-col justify-between", v),
35
+ "aria-label": u,
36
+ style: { width: `${e ? f : b}px` },
37
+ className: r(
38
+ K.collapsibleSidebar,
39
+ "flex flex-col justify-between",
40
+ y
41
+ ),
37
42
  children: [
38
43
  /* @__PURE__ */ t(
39
44
  "div",
@@ -42,7 +47,7 @@ const T = 48, q = ({
42
47
  hidden: !e,
43
48
  className: r(
44
49
  "min-h-0 flex-1 overflow-auto p-4",
45
- g
50
+ L
46
51
  ),
47
52
  children: c
48
53
  }
@@ -53,7 +58,7 @@ const T = 48, q = ({
53
58
  hidden: e,
54
59
  className: r(
55
60
  "rotate-180 px-3 py-4 [writing-mode:tb-rl] dial-small-text text-primary",
56
- S
61
+ v
57
62
  ),
58
63
  children: m
59
64
  }
@@ -64,30 +69,30 @@ const T = 48, q = ({
64
69
  className: r(
65
70
  "flex h-12 shrink-0 flex-row items-center gap-2 border-t border-tertiary py-1",
66
71
  e ? "justify-end px-2" : "justify-center",
67
- D
72
+ _
68
73
  ),
69
74
  children: [
70
- e && u,
75
+ e && I,
71
76
  /* @__PURE__ */ t(
72
- P,
77
+ B,
73
78
  {
74
- variant: A.Primary,
75
- appearance: z.Ghost,
76
- size: B.Standard,
77
- onClick: _,
79
+ variant: z.Primary,
80
+ appearance: k.Ghost,
81
+ size: T.Standard,
82
+ onClick: A,
78
83
  "aria-label": n,
79
84
  "aria-expanded": e,
80
85
  "aria-controls": a,
81
86
  tooltipProps: { tooltip: n },
82
87
  icon: e ? /* @__PURE__ */ t(
83
- O,
88
+ E,
84
89
  {
85
90
  size: p.MD,
86
91
  stroke: d,
87
92
  "aria-hidden": "true"
88
93
  }
89
94
  ) : /* @__PURE__ */ t(
90
- k,
95
+ O,
91
96
  {
92
97
  size: p.MD,
93
98
  stroke: d,
@@ -104,5 +109,5 @@ const T = 48, q = ({
104
109
  );
105
110
  };
106
111
  export {
107
- q as CollapsibleSidebar
112
+ J as CollapsibleSidebar
108
113
  };
@@ -1,75 +1,80 @@
1
- import { jsxs as S, jsx as r } from "react/jsx-runtime";
2
- import { useCallback as j } from "react";
3
- import { Button as z } from "../Button/Button.js";
4
- import { NeutralButton as F } from "../Button/ButtonWrappers.js";
5
- import { Popup as I } from "../Popup/Popup.js";
6
- import { Spinner as V } from "../../Spinner/Spinner.js";
7
- import { ConfirmationPopupVariant as q } from "../../../types/confirmation-popup.js";
8
- import { PopupSize as w } from "../../../types/popup.js";
9
- import { mergeClasses as f } from "../../../utils/merge-classes.js";
10
- import { actionsBaseClassName as y, defaultCancelLabel as A, defaultConfirmLabel as D, variantConfig as t, loaderContainerClassName as E, descriptionBaseClassName as G } from "./constants.js";
1
+ import { jsxs as x, jsx as r } from "react/jsx-runtime";
2
+ import { useCallback as I } from "react";
3
+ import { Button as j } from "../Button/Button.js";
4
+ import { NeutralButton as z } from "../Button/ButtonWrappers.js";
5
+ import { Popup as A } from "../Popup/Popup.js";
6
+ import { Spinner as _ } from "../../Spinner/Spinner.js";
7
+ import { ConfirmationPopupVariant as D } from "../../../types/confirmation-popup.js";
8
+ import { PopupSize as F } from "../../../types/popup.js";
9
+ import { mergeClasses as s } from "../../../utils/merge-classes.js";
10
+ import { actionsBaseClassName as K, defaultCancelLabel as L, defaultConfirmLabel as T, variantConfig as t, loaderContainerClassName as V, descriptionBaseClassName as q } from "./constants.js";
11
+ import { DIAL_KIT_CLASS as w } from "../../../constants/public-class-names.js";
11
12
  const X = ({
12
13
  header: p,
13
- description: a,
14
- descriptionClassName: m,
14
+ description: e,
15
+ descriptionClassName: l,
15
16
  open: u = !1,
16
- confirmLabel: c = D,
17
- cancelLabel: C = A,
18
- isLoading: e = !1,
17
+ confirmLabel: c = T,
18
+ cancelLabel: C = L,
19
+ isLoading: o = !1,
19
20
  disableConfirmButton: d = !1,
20
21
  className: N,
21
22
  confirmClassName: b,
22
23
  onClose: n,
23
24
  onConfirm: v,
24
25
  onCancel: i,
25
- children: o,
26
- variant: l = q.Info,
27
- size: B = w.Sm,
28
- footer: s,
29
- hideClose: P,
30
- ...h
26
+ children: a,
27
+ variant: m = D.Info,
28
+ size: P = F.Sm,
29
+ footer: f,
30
+ hideClose: S,
31
+ ...B
31
32
  }) => {
32
- const k = e ? null : /* @__PURE__ */ S("div", { className: y, children: [
33
+ const h = o ? null : /* @__PURE__ */ x("div", { className: K, children: [
33
34
  /* @__PURE__ */ r(
34
- F,
35
+ z,
35
36
  {
36
37
  label: C,
37
38
  onClick: () => i ? i() : n?.()
38
39
  }
39
40
  ),
40
41
  /* @__PURE__ */ r(
41
- z,
42
+ j,
42
43
  {
43
- variant: t[l].confirm.variant,
44
- appearance: t[l].confirm.appearance,
44
+ variant: t[m].confirm.variant,
45
+ appearance: t[m].confirm.appearance,
45
46
  className: b,
46
47
  label: c,
47
48
  disabled: d,
48
49
  onClick: v
49
50
  }
50
51
  )
51
- ] }), x = j(() => e ? /* @__PURE__ */ r("div", { className: E, children: /* @__PURE__ */ r(V, { size: 40 }) }) : o ?? (a ? /* @__PURE__ */ r(
52
+ ] }), k = I(() => o ? /* @__PURE__ */ r("div", { className: V, children: /* @__PURE__ */ r(_, { size: 40 }) }) : a ?? (e ? /* @__PURE__ */ r(
52
53
  "div",
53
54
  {
54
- className: f(
55
- G,
56
- m
55
+ className: s(
56
+ q,
57
+ l
57
58
  ),
58
- children: a
59
+ children: e
59
60
  }
60
- ) : null), [o, a, e, m]);
61
+ ) : null), [a, e, o, l]);
61
62
  return /* @__PURE__ */ r(
62
- I,
63
+ A,
63
64
  {
64
- ...h,
65
+ ...B,
65
66
  open: u,
66
67
  header: p,
67
- className: f(t[l].container, N),
68
+ className: s(
69
+ w.confirmationPopup,
70
+ t[m].container,
71
+ N
72
+ ),
68
73
  onClose: () => n?.(),
69
- footer: s ?? k,
70
- size: B,
71
- hideClose: P ?? (!e && s === void 0),
72
- children: x()
74
+ footer: f ?? h,
75
+ size: P,
76
+ hideClose: S ?? (!o && f === void 0),
77
+ children: k()
73
78
  }
74
79
  );
75
80
  };