@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,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
|
|
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
|
|
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:
|
|
11
|
+
icon: f,
|
|
11
12
|
ariaLabel: b,
|
|
12
13
|
size: n = r.Standard,
|
|
13
14
|
disabled: a = !1,
|
|
14
|
-
className:
|
|
15
|
-
buttonClassName:
|
|
16
|
-
iconClassName:
|
|
17
|
-
caretIcon:
|
|
15
|
+
className: u,
|
|
16
|
+
buttonClassName: x,
|
|
17
|
+
iconClassName: h,
|
|
18
|
+
caretIcon: y = /* @__PURE__ */ e(O, { size: _.SM }),
|
|
18
19
|
showCaret: t = !0,
|
|
19
|
-
placement:
|
|
20
|
-
matchReferenceWidth:
|
|
20
|
+
placement: g = "bottom-start",
|
|
21
|
+
matchReferenceWidth: S = !1,
|
|
21
22
|
open: v,
|
|
22
|
-
onOpenChange:
|
|
23
|
+
onOpenChange: I,
|
|
23
24
|
defaultOpen: s = !1,
|
|
24
25
|
...z
|
|
25
26
|
}) => {
|
|
26
|
-
const i = n === r.Small, [
|
|
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
|
-
|
|
33
|
+
L,
|
|
33
34
|
{
|
|
34
35
|
...z,
|
|
35
36
|
disabled: a,
|
|
36
|
-
placement:
|
|
37
|
-
matchReferenceWidth:
|
|
38
|
-
className:
|
|
37
|
+
placement: g,
|
|
38
|
+
matchReferenceWidth: S,
|
|
39
|
+
className: u,
|
|
39
40
|
open: l,
|
|
40
41
|
onOpenChange: (c) => {
|
|
41
|
-
|
|
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 :
|
|
56
|
-
|
|
56
|
+
t ? void 0 : w,
|
|
57
|
+
x
|
|
57
58
|
),
|
|
58
59
|
children: [
|
|
59
60
|
/* @__PURE__ */ e(
|
|
60
61
|
m,
|
|
61
62
|
{
|
|
62
|
-
icon:
|
|
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
|
-
|
|
69
|
+
h
|
|
68
70
|
)
|
|
69
71
|
}
|
|
70
72
|
),
|
|
71
|
-
t && /* @__PURE__ */ d(
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
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,51 +1,53 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { IconChevronRight as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { DIAL_KIT_ICON_STROKE as
|
|
5
|
-
import { DIAL_ICON_SIZE as
|
|
6
|
-
import { resolveAccessibleName as
|
|
7
|
-
import { mergeClasses as
|
|
8
|
-
|
|
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:
|
|
13
|
+
expanded: c,
|
|
13
14
|
defaultExpanded: y = !1,
|
|
14
|
-
disabled:
|
|
15
|
+
disabled: n,
|
|
15
16
|
nonCollapsible: o,
|
|
16
|
-
ariaLabel:
|
|
17
|
-
onToggle:
|
|
17
|
+
ariaLabel: I,
|
|
18
|
+
onToggle: v,
|
|
18
19
|
className: g,
|
|
19
|
-
headerClassName:
|
|
20
|
+
headerClassName: l,
|
|
20
21
|
contentClassName: N
|
|
21
22
|
}) => {
|
|
22
|
-
const d =
|
|
23
|
-
if (
|
|
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),
|
|
26
|
-
}, f = /* @__PURE__ */
|
|
27
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
34
|
+
S,
|
|
34
35
|
{
|
|
35
|
-
size:
|
|
36
|
-
stroke:
|
|
36
|
+
size: L.SM,
|
|
37
|
+
stroke: j,
|
|
37
38
|
"aria-hidden": "true",
|
|
38
|
-
className:
|
|
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__ */
|
|
46
|
+
return /* @__PURE__ */ a(
|
|
46
47
|
"div",
|
|
47
48
|
{
|
|
48
|
-
className:
|
|
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:
|
|
57
|
-
className:
|
|
58
|
+
id: i,
|
|
59
|
+
className: r(
|
|
58
60
|
"flex w-full px-4 rounded-xl items-center justify-between dial-tiny-text",
|
|
59
|
-
|
|
61
|
+
l
|
|
60
62
|
),
|
|
61
63
|
children: f
|
|
62
64
|
}
|
|
63
65
|
) : /* @__PURE__ */ e(
|
|
64
66
|
"button",
|
|
65
67
|
{
|
|
66
|
-
id:
|
|
68
|
+
id: i,
|
|
67
69
|
type: "button",
|
|
68
70
|
"aria-expanded": t,
|
|
69
71
|
"aria-controls": t ? x : void 0,
|
|
70
|
-
"aria-label":
|
|
71
|
-
disabled:
|
|
72
|
-
onClick:
|
|
73
|
-
className:
|
|
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
|
-
|
|
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
|
-
|
|
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":
|
|
90
|
-
className:
|
|
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
|
-
|
|
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
|
|
6
|
-
import { getButtonChevron as
|
|
7
|
-
|
|
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(() =>
|
|
14
|
-
return /* @__PURE__ */ r("div", { 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
|
-
|
|
28
|
+
I as ButtonDropdown
|
|
28
29
|
};
|