@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.
- package/README.md +140 -0
- package/dist/CHANGELOG.md +12 -0
- package/dist/{DateCellRenderer-BVM-Q8yx.cjs → DateCellRenderer-Bu40QyHE.cjs} +26 -26
- package/dist/DateCellRenderer-C3e61i75.cjs +1 -0
- package/dist/components/Dropdown/Dropdown.js +70 -65
- package/dist/components/Dropdown/DropdownSubMenuItem.js +63 -55
- package/dist/components/Dropdown/constants.js +14 -12
- package/dist/components/DropdownIcon/DropdownIcon.js +43 -32
- package/dist/components/New/Accordion/Accordion.js +39 -37
- package/dist/components/New/ButtonDropdown/ButtonDropdown.js +7 -6
- package/dist/components/New/Calendar/Calendar.js +253 -222
- package/dist/components/New/CaptionText/CaptionText.js +18 -15
- package/dist/components/New/CardShell/CardShell.js +4 -2
- package/dist/components/New/Checkbox/Checkbox.js +67 -56
- package/dist/components/New/Checkbox/CheckboxBox.js +4 -2
- package/dist/components/New/CloseButton/CloseButton.js +18 -16
- package/dist/components/New/CollapsibleSidebar/CollapsibleSidebar.js +39 -34
- package/dist/components/New/ConfirmationPopup/ConfirmationPopup.js +44 -39
- package/dist/components/New/Dropdown/Dropdown.js +101 -95
- package/dist/components/New/EllipsisTooltip/EllipsisTooltip.js +19 -17
- package/dist/components/New/FileDropzone/FileDropzone.js +27 -25
- package/dist/components/New/FilterChips/FilterChips.js +43 -0
- package/dist/components/New/FilterChips/constants.js +5 -0
- package/dist/components/New/FolderPath/FolderPath.js +29 -28
- package/dist/components/New/Highlight/Highlight.js +23 -30
- package/dist/components/New/InfoButton/InfoButton.js +12 -10
- package/dist/components/New/InlineSelect/InlineSelect.js +43 -41
- package/dist/components/New/InteractiveTooltip/InteractiveTooltip.js +40 -38
- package/dist/components/New/Label/Label.js +13 -8
- package/dist/components/New/MenuItem/MenuItem.js +29 -27
- package/dist/components/New/MenuItem/constants.js +9 -8
- package/dist/components/New/NoDataContent/NoDataContent.js +20 -18
- package/dist/components/New/Notification/Notification.js +18 -16
- package/dist/components/New/NumberInput/NumberInput.js +42 -33
- package/dist/components/New/PasswordInput/PasswordInput.js +41 -35
- package/dist/components/New/Popup/Popup.js +45 -43
- package/dist/components/New/Radio/Radio.js +75 -64
- package/dist/components/New/RadioGroup/RadioGroup.js +76 -65
- package/dist/components/New/RadioGroupPopupField/RadioGroupPopupField.js +117 -106
- package/dist/components/New/ResizableContainer/ResizableContainer.js +42 -40
- package/dist/components/New/Search/Search.js +28 -26
- package/dist/components/New/SegmentedControl/SegmentedControl.js +29 -23
- package/dist/components/New/Select/Select.js +120 -109
- package/dist/components/New/Switch/Switch.js +69 -58
- package/dist/components/New/Tabs/Tabs.js +28 -22
- package/dist/components/New/Tag/Tag.js +42 -40
- package/dist/components/New/TagInput/TagInput.js +44 -42
- package/dist/components/New/ToggleIconButton/ToggleIconButton.js +25 -23
- package/dist/components/New/Tooltip/TooltipContent.js +10 -8
- package/dist/components/ProgressBar/ProgressBar.js +45 -31
- package/dist/components/SchemaRenderer/components/SchemaAdditionalPropertiesEditor.js +46 -31
- package/dist/components/SchemaRenderer/components/SchemaKeyValueEditor.js +223 -135
- package/dist/components/SchemaRenderer/types.js +19 -8
- package/dist/components/SchemaRenderer/utils.js +121 -96
- package/dist/components/Skeleton/Skeleton.js +25 -19
- package/dist/components/Spinner/Spinner.js +6 -4
- package/dist/components-manifest.json +85 -2
- package/dist/constants/public-class-names.js +157 -0
- package/dist/dial-ui-kit.cjs +2 -2
- package/dist/dial-ui-kit.js +214 -210
- package/dist/file-manager.cjs +1 -1
- package/dist/grid.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/src/components/New/FilterChips/FilterChips.d.ts +69 -0
- package/dist/src/components/New/FilterChips/constants.d.ts +13 -0
- package/dist/src/components/SchemaRenderer/types.d.ts +11 -0
- package/dist/src/components/SchemaRenderer/utils.d.ts +5 -1
- package/dist/src/constants/public-class-names.d.ts +148 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/use-file-manager-tabs-9DWkp9IJ.cjs +3 -0
- package/package.json +1 -1
- package/dist/DateCellRenderer-ssp7eaZY.cjs +0 -1
- 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
|
|
3
|
-
import { useState as
|
|
4
|
-
import { ResizableContainerSide as
|
|
5
|
-
import { mergeClasses as
|
|
6
|
-
import { ResizeHandle as
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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:
|
|
13
|
+
defaultWidth: w,
|
|
13
14
|
onResizeStop: i,
|
|
14
15
|
onResize: l,
|
|
15
|
-
side: a =
|
|
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] =
|
|
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
|
-
}, []),
|
|
25
|
+
}, []), b = d(() => {
|
|
25
26
|
C(!1);
|
|
26
|
-
const t = f.current?.resizable?.getBoundingClientRect(), e = t ? Math.round(t.width) :
|
|
27
|
-
|
|
28
|
-
}, [i,
|
|
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(
|
|
31
|
-
e !== o && (
|
|
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,
|
|
34
|
-
),
|
|
35
|
-
const t = a ===
|
|
36
|
-
|
|
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:
|
|
42
|
+
minWidth: r,
|
|
42
43
|
maxWidth: s,
|
|
43
44
|
step: u,
|
|
44
45
|
ariaLabel: g,
|
|
45
|
-
onWidthChange:
|
|
46
|
+
onWidthChange: v,
|
|
46
47
|
customHandler: z,
|
|
47
48
|
handlerClassName: p
|
|
48
49
|
}
|
|
49
50
|
);
|
|
50
51
|
return {
|
|
51
|
-
size:
|
|
52
|
-
defaultSize:
|
|
53
|
-
minWidth:
|
|
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:
|
|
72
|
-
onResize: (k, F,
|
|
73
|
-
l?.(Math.round(
|
|
72
|
+
onResizeStart: S,
|
|
73
|
+
onResize: (k, F, D) => {
|
|
74
|
+
l?.(Math.round(D.offsetWidth));
|
|
74
75
|
},
|
|
75
|
-
onResizeStop:
|
|
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
|
-
|
|
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(
|
|
94
|
+
return /* @__PURE__ */ c(E, { ref: f, ...L, children: /* @__PURE__ */ c(
|
|
94
95
|
"div",
|
|
95
96
|
{
|
|
96
|
-
className:
|
|
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:
|
|
102
|
+
children: M
|
|
101
103
|
}
|
|
102
104
|
) });
|
|
103
105
|
};
|
|
104
106
|
export {
|
|
105
|
-
|
|
107
|
+
J as ResizableContainer
|
|
106
108
|
};
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { jsx as
|
|
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
|
|
4
|
-
import { useMergeRefs as
|
|
5
|
-
import { GhostIconButton as
|
|
6
|
-
import { Input as
|
|
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
|
|
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
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
[r.
|
|
14
|
-
[r.
|
|
15
|
-
|
|
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
|
-
...
|
|
26
|
+
...I
|
|
26
27
|
}) => {
|
|
27
|
-
const m =
|
|
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__ */
|
|
31
|
-
|
|
31
|
+
return /* @__PURE__ */ o(
|
|
32
|
+
E,
|
|
32
33
|
{
|
|
33
|
-
...
|
|
34
|
+
...I,
|
|
34
35
|
size: s,
|
|
35
36
|
value: i,
|
|
36
37
|
disabled: a,
|
|
37
38
|
onChange: t,
|
|
38
39
|
placeholder: c,
|
|
39
|
-
inputRef:
|
|
40
|
-
wrapperClassName:
|
|
40
|
+
inputRef: u,
|
|
41
|
+
wrapperClassName: L(
|
|
42
|
+
M.search,
|
|
41
43
|
f && "dial-kit-input-borderless",
|
|
42
44
|
p
|
|
43
45
|
),
|
|
44
|
-
iconBefore: /* @__PURE__ */
|
|
46
|
+
iconBefore: /* @__PURE__ */ o(
|
|
45
47
|
h,
|
|
46
48
|
{
|
|
47
|
-
size:
|
|
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__ */
|
|
54
|
-
|
|
55
|
+
iconAfter: d ? /* @__PURE__ */ o(
|
|
56
|
+
D,
|
|
55
57
|
{
|
|
56
58
|
size: r.Small,
|
|
57
59
|
"aria-label": l,
|
|
58
|
-
icon: /* @__PURE__ */
|
|
60
|
+
icon: /* @__PURE__ */ o(
|
|
59
61
|
_,
|
|
60
62
|
{
|
|
61
|
-
size:
|
|
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
|
-
|
|
75
|
+
v as Search
|
|
74
76
|
};
|
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useRef as
|
|
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
|
|
5
|
-
import { NAVIGATION_KEYS as
|
|
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:
|
|
12
|
-
segmentClassName:
|
|
13
|
-
"aria-label":
|
|
12
|
+
className: g,
|
|
13
|
+
segmentClassName: p,
|
|
14
|
+
"aria-label": C
|
|
14
15
|
}) => {
|
|
15
|
-
const
|
|
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 || !
|
|
18
|
-
const a = l.filter((
|
|
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((
|
|
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
|
-
|
|
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__ */
|
|
48
|
+
return /* @__PURE__ */ v(
|
|
48
49
|
"div",
|
|
49
50
|
{
|
|
50
51
|
role: "radiogroup",
|
|
51
|
-
"aria-label":
|
|
52
|
+
"aria-label": C,
|
|
52
53
|
"aria-disabled": o || void 0,
|
|
53
|
-
onKeyDown:
|
|
54
|
-
className: u(
|
|
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__ */
|
|
62
|
+
return /* @__PURE__ */ x(
|
|
58
63
|
"button",
|
|
59
64
|
{
|
|
60
65
|
ref: (t) => {
|
|
61
|
-
|
|
66
|
+
b.current[e.value] = t;
|
|
62
67
|
},
|
|
63
68
|
type: "button",
|
|
64
69
|
role: "radio",
|
|
65
70
|
"aria-checked": a,
|
|
66
|
-
"aria-label":
|
|
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 ===
|
|
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 :
|
|
76
|
-
s ? a ?
|
|
77
|
-
|
|
81
|
+
a ? U : L,
|
|
82
|
+
s ? a ? D : h : a ? y : K,
|
|
83
|
+
p
|
|
78
84
|
),
|
|
79
85
|
children: [
|
|
80
86
|
e.icon,
|