@epam/ai-dial-ui-kit 0.15.0-dev.1 → 0.15.0-dev.11

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 (85) hide show
  1. package/README.md +147 -0
  2. package/dist/CHANGELOG.md +17 -0
  3. package/dist/DateCellRenderer-Ba9tlNbk.cjs +1 -0
  4. package/dist/{DateCellRenderer-BVM-Q8yx.cjs → DateCellRenderer-S5QJV-Wp.cjs} +26 -26
  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 +15 -13
  8. package/dist/components/DropdownIcon/DropdownIcon.js +43 -32
  9. package/dist/components/New/Accordion/Accordion.js +40 -38
  10. package/dist/components/New/Breadcrumbs/Breadcrumbs.js +159 -0
  11. package/dist/components/New/Breadcrumbs/constants.js +41 -0
  12. package/dist/components/New/ButtonDropdown/ButtonDropdown.js +7 -6
  13. package/dist/components/New/Calendar/Calendar.js +337 -289
  14. package/dist/components/New/CaptionText/CaptionText.js +18 -15
  15. package/dist/components/New/CardShell/CardShell.js +5 -3
  16. package/dist/components/New/Checkbox/Checkbox.js +67 -56
  17. package/dist/components/New/Checkbox/CheckboxBox.js +5 -3
  18. package/dist/components/New/CloseButton/CloseButton.js +18 -16
  19. package/dist/components/New/CollapsibleSidebar/CollapsibleSidebar.js +39 -34
  20. package/dist/components/New/ConfirmationPopup/ConfirmationPopup.js +44 -39
  21. package/dist/components/New/Dropdown/Dropdown.js +101 -95
  22. package/dist/components/New/EllipsisTooltip/EllipsisTooltip.js +20 -18
  23. package/dist/components/New/FileDropzone/FileDropzone.js +27 -25
  24. package/dist/components/New/FilterChips/FilterChips.js +43 -0
  25. package/dist/components/New/FilterChips/constants.js +5 -0
  26. package/dist/components/New/FolderPath/FolderPath.js +29 -28
  27. package/dist/components/New/Highlight/Highlight.js +23 -30
  28. package/dist/components/New/InfoButton/InfoButton.js +13 -11
  29. package/dist/components/New/InlineSelect/InlineSelect.js +43 -41
  30. package/dist/components/New/InteractiveTooltip/InteractiveTooltip.js +41 -39
  31. package/dist/components/New/Label/Label.js +13 -8
  32. package/dist/components/New/MenuItem/MenuItem.js +29 -27
  33. package/dist/components/New/MenuItem/constants.js +9 -8
  34. package/dist/components/New/NoDataContent/NoDataContent.js +21 -19
  35. package/dist/components/New/Notification/Notification.js +29 -27
  36. package/dist/components/New/NumberInput/NumberInput.js +42 -33
  37. package/dist/components/New/PasswordInput/PasswordInput.js +41 -34
  38. package/dist/components/New/Popup/Popup.js +46 -44
  39. package/dist/components/New/Radio/Radio.js +75 -64
  40. package/dist/components/New/RadioGroup/RadioGroup.js +76 -65
  41. package/dist/components/New/RadioGroupPopupField/RadioGroupPopupField.js +117 -106
  42. package/dist/components/New/ResizableContainer/ResizableContainer.js +42 -40
  43. package/dist/components/New/Search/Search.js +29 -27
  44. package/dist/components/New/SegmentedControl/SegmentedControl.js +29 -23
  45. package/dist/components/New/Select/Select.js +120 -109
  46. package/dist/components/New/Switch/Switch.js +69 -58
  47. package/dist/components/New/Tabs/Tabs.js +125 -61
  48. package/dist/components/New/Tag/Tag.js +42 -40
  49. package/dist/components/New/TagInput/TagInput.js +45 -43
  50. package/dist/components/New/ToggleIconButton/ToggleIconButton.js +26 -24
  51. package/dist/components/New/Tooltip/TooltipContent.js +11 -9
  52. package/dist/components/ProgressBar/ProgressBar.js +45 -33
  53. package/dist/components/SchemaRenderer/components/SchemaAdditionalPropertiesEditor.js +46 -31
  54. package/dist/components/SchemaRenderer/components/SchemaKeyValueEditor.js +223 -135
  55. package/dist/components/SchemaRenderer/types.js +19 -8
  56. package/dist/components/SchemaRenderer/utils.js +121 -96
  57. package/dist/components/Skeleton/Skeleton.js +25 -19
  58. package/dist/components/Spinner/Spinner.js +7 -5
  59. package/dist/components-manifest.json +248 -6
  60. package/dist/constants/public-class-names.js +182 -0
  61. package/dist/dial-ui-kit.cjs +2 -2
  62. package/dist/dial-ui-kit.js +227 -217
  63. package/dist/file-manager.cjs +1 -1
  64. package/dist/grid.cjs +1 -1
  65. package/dist/index.css +1 -1
  66. package/dist/src/components/New/Breadcrumbs/Breadcrumbs.d.ts +94 -0
  67. package/dist/src/components/New/Breadcrumbs/constants.d.ts +60 -0
  68. package/dist/src/components/New/Calendar/Calendar.d.ts +14 -1
  69. package/dist/src/components/New/FilterChips/FilterChips.d.ts +69 -0
  70. package/dist/src/components/New/FilterChips/constants.d.ts +13 -0
  71. package/dist/src/components/New/PasswordInput/PasswordInput.d.ts +4 -1
  72. package/dist/src/components/New/Tabs/Tabs.d.ts +54 -6
  73. package/dist/src/components/SchemaRenderer/types.d.ts +11 -0
  74. package/dist/src/components/SchemaRenderer/utils.d.ts +5 -1
  75. package/dist/src/constants/public-class-names.d.ts +173 -0
  76. package/dist/src/index.d.ts +8 -0
  77. package/dist/src/types/breadcrumbs.d.ts +9 -0
  78. package/dist/src/utils/__tests__/timezone.spec.d.ts +1 -0
  79. package/dist/src/utils/timezone.d.ts +24 -0
  80. package/dist/types/breadcrumbs.js +4 -0
  81. package/dist/use-file-manager-tabs-Ff6KIQOF.cjs +3 -0
  82. package/dist/utils/timezone.js +19 -0
  83. package/package.json +2 -2
  84. package/dist/DateCellRenderer-ssp7eaZY.cjs +0 -1
  85. package/dist/use-file-manager-tabs-DjdR_mYM.cjs +0 -3
@@ -1,82 +1,84 @@
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(
49
50
  "flex flex-col gap-3 py-3 overflow-hidden bg-transparent ",
50
- g
51
+ g,
52
+ k.accordion
51
53
  ),
52
54
  children: [
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
  };
@@ -0,0 +1,159 @@
1
+ import { jsx as a, jsxs as c, Fragment as x } from "react/jsx-runtime";
2
+ import { IconDots as A } from "@tabler/icons-react";
3
+ import { useMemo as u, useCallback as B } from "react";
4
+ import { Dropdown as D } from "../Dropdown/Dropdown.js";
5
+ import { EllipsisTooltip as w } from "../EllipsisTooltip/EllipsisTooltip.js";
6
+ import { DIAL_KIT_ICON_STROKE as F } from "../constants/icon.js";
7
+ import { DIAL_ICON_SIZE as y } from "../../../constants/icon.js";
8
+ import { DIAL_KIT_CLASS as b } from "../../../constants/public-class-names.js";
9
+ import { BreadcrumbsSize as K } from "../../../types/breadcrumbs.js";
10
+ import { mergeClasses as o } from "../../../utils/merge-classes.js";
11
+ import { listClassName as O, overflowButtonClassName as j, defaultSeparator as z, separatorClassName as g, sizeClassName as I, itemClassName as S, navClassName as R, DEFAULT_MAX_VISIBLE_ITEMS as V, MIN_VISIBLE_ITEMS as W, linkSegmentClassName as P, staticSegmentClassName as U, currentSegmentClassName as X, currentSizeClassName as Z, segmentClassName as $, segmentWidthClassName as q } from "./constants.js";
12
+ const te = ({
13
+ items: s,
14
+ maxVisibleItems: k = V,
15
+ size: i = K.Small,
16
+ separator: f = z,
17
+ ariaLabel: _ = "Breadcrumb",
18
+ overflowAriaLabel: M = "Show hidden path segments",
19
+ className: E,
20
+ itemClassName: L
21
+ }) => {
22
+ const m = Math.max(k, W), n = u(
23
+ () => s.length > m ? s.slice(1, -(m - 2)) : [],
24
+ [s, m]
25
+ ), T = u(
26
+ () => n.map((e, l) => ({
27
+ key: String(l),
28
+ label: e.label,
29
+ icon: e.icon
30
+ })),
31
+ [n]
32
+ ), v = B(
33
+ ({ key: e, domEvent: l }) => {
34
+ const r = n[Number(e)];
35
+ r && (r.onClick?.(l), !r.onClick && r.href && !l.defaultPrevented && (window.location.href = r.href));
36
+ },
37
+ [n]
38
+ );
39
+ if (s.length === 0) return null;
40
+ const d = s.slice(n.length + 1), C = (e, {
41
+ index: l,
42
+ isFirst: r,
43
+ isCurrent: t
44
+ }) => {
45
+ const N = !t && (!!e.href || !!e.onClick), h = o(
46
+ $,
47
+ N ? P : t ? o(X, Z[i]) : U,
48
+ L,
49
+ b.breadcrumbsItem
50
+ ), p = /* @__PURE__ */ c(x, { children: [
51
+ e.icon,
52
+ /* @__PURE__ */ a(w, { text: e.label })
53
+ ] });
54
+ return /* @__PURE__ */ c(
55
+ "li",
56
+ {
57
+ className: o(
58
+ S,
59
+ I[i],
60
+ q[t ? "last" : r ? "first" : "middle"]
61
+ ),
62
+ children: [
63
+ N ? e.href ? /* @__PURE__ */ a(
64
+ "a",
65
+ {
66
+ href: e.href,
67
+ onClick: e.onClick,
68
+ className: h,
69
+ children: p
70
+ }
71
+ ) : /* @__PURE__ */ a(
72
+ "button",
73
+ {
74
+ type: "button",
75
+ onClick: e.onClick,
76
+ className: h,
77
+ children: p
78
+ }
79
+ ) : /* @__PURE__ */ a(
80
+ "span",
81
+ {
82
+ className: h,
83
+ "aria-current": t ? "page" : void 0,
84
+ children: p
85
+ }
86
+ ),
87
+ !t && /* @__PURE__ */ a("span", { className: g, "aria-hidden": "true", children: f })
88
+ ]
89
+ },
90
+ `segment-${l}`
91
+ );
92
+ };
93
+ return /* @__PURE__ */ a(
94
+ "nav",
95
+ {
96
+ "aria-label": _,
97
+ className: o(
98
+ R,
99
+ E,
100
+ b.breadcrumbs
101
+ ),
102
+ children: /* @__PURE__ */ c("ol", { className: O, children: [
103
+ C(s[0], {
104
+ index: 0,
105
+ isFirst: !0,
106
+ isCurrent: s.length === 1
107
+ }),
108
+ n.length > 0 && /* @__PURE__ */ c(
109
+ "li",
110
+ {
111
+ className: o(
112
+ S,
113
+ I[i],
114
+ "shrink-0"
115
+ ),
116
+ children: [
117
+ /* @__PURE__ */ a(
118
+ D,
119
+ {
120
+ items: T,
121
+ onItemClick: v,
122
+ placement: "bottom-start",
123
+ matchReferenceWidth: !1,
124
+ children: /* @__PURE__ */ a(
125
+ "button",
126
+ {
127
+ type: "button",
128
+ "aria-label": M,
129
+ className: j,
130
+ children: /* @__PURE__ */ a(
131
+ A,
132
+ {
133
+ size: y.SM,
134
+ stroke: F,
135
+ "aria-hidden": "true"
136
+ }
137
+ )
138
+ }
139
+ )
140
+ }
141
+ ),
142
+ /* @__PURE__ */ a("span", { className: g, "aria-hidden": "true", children: f })
143
+ ]
144
+ }
145
+ ),
146
+ d.map(
147
+ (e, l) => C(e, {
148
+ index: s.length - d.length + l,
149
+ isFirst: !1,
150
+ isCurrent: l === d.length - 1
151
+ })
152
+ )
153
+ ] })
154
+ }
155
+ );
156
+ };
157
+ export {
158
+ te as Breadcrumbs
159
+ };
@@ -0,0 +1,41 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { IconChevronRight as s } from "@tabler/icons-react";
3
+ import { DIAL_KIT_ICON_STROKE as n } from "../constants/icon.js";
4
+ import { DIAL_ICON_SIZE as i } from "../../../constants/icon.js";
5
+ import { BreadcrumbsSize as e } from "../../../types/breadcrumbs.js";
6
+ const c = "w-full overflow-hidden", f = "flex min-w-0 flex-nowrap items-center gap-2 whitespace-nowrap", u = "flex min-w-0 items-center gap-2", d = {
7
+ [e.Small]: "dial-small-text",
8
+ [e.Heading]: "dial-h2-text"
9
+ }, x = {
10
+ [e.Small]: "dial-small-semi-text",
11
+ [e.Heading]: "dial-h2-text"
12
+ }, N = {
13
+ first: "shrink-0",
14
+ middle: "min-w-0 max-w-[30%] shrink",
15
+ last: "min-w-0 max-w-[51%] shrink"
16
+ }, p = "flex min-w-0 flex-1 items-center gap-1 rounded-sm transition-colors", C = "text-secondary hover:text-accent focus-visible:outline focus-visible:outline-offset-2 focus-visible:outline-focus", S = "cursor-default text-primary", h = "cursor-default text-secondary", I = "inline-flex flex-none items-center leading-none text-secondary", g = "dial-kit-minimum-target flex shrink-0 items-center rounded-sm text-secondary transition-colors hover:text-accent focus-visible:outline focus-visible:outline-offset-2 focus-visible:outline-focus", w = 3, v = 4, _ = /* @__PURE__ */ t(
17
+ s,
18
+ {
19
+ size: i.SM,
20
+ stroke: n,
21
+ "aria-hidden": "true",
22
+ className: "rtl:scale-x-[-1]"
23
+ }
24
+ );
25
+ export {
26
+ v as DEFAULT_MAX_VISIBLE_ITEMS,
27
+ w as MIN_VISIBLE_ITEMS,
28
+ S as currentSegmentClassName,
29
+ x as currentSizeClassName,
30
+ _ as defaultSeparator,
31
+ u as itemClassName,
32
+ C as linkSegmentClassName,
33
+ f as listClassName,
34
+ c as navClassName,
35
+ g as overflowButtonClassName,
36
+ p as segmentClassName,
37
+ N as segmentWidthClassName,
38
+ I as separatorClassName,
39
+ d as sizeClassName,
40
+ h as staticSegmentClassName
41
+ };
@@ -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
  };