@epam/ai-dial-ui-kit 0.16.0-dev.67 → 0.16.0-dev.69
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/dist/CHANGELOG.md +7 -0
- package/dist/{DateCellRenderer-DMq0adkA.cjs → DateCellRenderer-VFKHZI-J.cjs} +23 -23
- package/dist/components/New/Breadcrumbs/Breadcrumbs.js +65 -61
- package/dist/components/New/Breadcrumbs/constants.js +40 -21
- package/dist/components/New/Grid/Grid.js +201 -182
- package/dist/components/New/Grid/components/GridEmptyState.js +13 -0
- package/dist/components/New/Select/Select.js +112 -109
- package/dist/components-manifest.json +57 -13
- package/dist/dial-ui-kit.cjs +3 -3
- package/dist/grid.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/migration-guides/0.16.0/grid-empty-state-pattern.md +100 -0
- package/dist/migration-guides/README.md +1 -0
- package/dist/src/components/New/Breadcrumbs/Breadcrumbs.d.ts +8 -5
- package/dist/src/components/New/Breadcrumbs/constants.d.ts +17 -10
- package/dist/src/components/New/Grid/Grid.d.ts +42 -7
- package/dist/src/components/New/Grid/components/GridEmptyState.d.ts +21 -0
- package/dist/src/components/New/NoDataContent/NoDataContent.d.ts +8 -0
- package/dist/src/components/New/Select/Select.d.ts +6 -0
- package/dist/src/components/New/constants/icon.d.ts +2 -2
- package/dist/src/types/breadcrumbs.d.ts +6 -0
- package/dist/types/breadcrumbs.js +1 -1
- package/package.json +1 -1
|
@@ -1,63 +1,64 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
2
|
-
import { IconDots as
|
|
3
|
-
import { useMemo as u, useCallback as
|
|
4
|
-
import { Dropdown as
|
|
5
|
-
import { EllipsisTooltip as
|
|
6
|
-
import { DIAL_KIT_ICON_STROKE as
|
|
7
|
-
import { DIAL_ICON_SIZE as
|
|
8
|
-
import { DIAL_KIT_CLASS as
|
|
9
|
-
import { BreadcrumbsSize as
|
|
1
|
+
import { jsx as a, jsxs as i, Fragment as A } from "react/jsx-runtime";
|
|
2
|
+
import { IconDots as B } from "@tabler/icons-react";
|
|
3
|
+
import { useMemo as u, useCallback as D } from "react";
|
|
4
|
+
import { Dropdown as w } from "../Dropdown/Dropdown.js";
|
|
5
|
+
import { EllipsisTooltip as F } from "../EllipsisTooltip/EllipsisTooltip.js";
|
|
6
|
+
import { DIAL_KIT_ICON_STROKE as y } from "../constants/icon.js";
|
|
7
|
+
import { DIAL_ICON_SIZE as K } from "../../../constants/icon.js";
|
|
8
|
+
import { DIAL_KIT_CLASS as g } from "../../../constants/public-class-names.js";
|
|
9
|
+
import { BreadcrumbsSize as O } from "../../../types/breadcrumbs.js";
|
|
10
10
|
import { mergeClasses as o } from "../../../utils/merge-classes.js";
|
|
11
|
-
import { listClassName as
|
|
12
|
-
const
|
|
11
|
+
import { listClassName as R, focusRingClassName as b, overflowButtonClassName as j, defaultSeparator as V, separatorClassName as I, sizeClassName as S, itemClassName as k, navClassName as W, DEFAULT_MAX_VISIBLE_ITEMS as P, MIN_VISIBLE_ITEMS as U, linkSegmentClassName as X, staticSegmentClassName as Z, currentSegmentClassName as $, currentSizeClassName as q, segmentClassName as G, segmentWidthClassName as H } from "./constants.js";
|
|
12
|
+
const oe = ({
|
|
13
13
|
items: s,
|
|
14
|
-
maxVisibleItems:
|
|
15
|
-
size:
|
|
16
|
-
separator:
|
|
17
|
-
ariaLabel:
|
|
18
|
-
overflowAriaLabel:
|
|
19
|
-
className:
|
|
20
|
-
itemClassName:
|
|
14
|
+
maxVisibleItems: _ = P,
|
|
15
|
+
size: n = O.Small,
|
|
16
|
+
separator: p = V,
|
|
17
|
+
ariaLabel: M = "Breadcrumb",
|
|
18
|
+
overflowAriaLabel: E = "Show hidden path segments",
|
|
19
|
+
className: L,
|
|
20
|
+
itemClassName: T
|
|
21
21
|
}) => {
|
|
22
|
-
const m = Math.max(
|
|
22
|
+
const m = Math.max(_, U), t = u(
|
|
23
23
|
() => s.length > m ? s.slice(1, -(m - 2)) : [],
|
|
24
24
|
[s, m]
|
|
25
|
-
),
|
|
26
|
-
() =>
|
|
25
|
+
), v = u(
|
|
26
|
+
() => t.map((e, l) => ({
|
|
27
27
|
key: String(l),
|
|
28
28
|
label: e.label,
|
|
29
29
|
icon: e.icon
|
|
30
30
|
})),
|
|
31
|
-
[
|
|
32
|
-
),
|
|
31
|
+
[t]
|
|
32
|
+
), x = D(
|
|
33
33
|
({ key: e, domEvent: l }) => {
|
|
34
|
-
const r =
|
|
34
|
+
const r = t[Number(e)];
|
|
35
35
|
r && (r.onClick?.(l), !r.onClick && r.href && !l.defaultPrevented && (window.location.href = r.href));
|
|
36
36
|
},
|
|
37
|
-
[
|
|
37
|
+
[t]
|
|
38
38
|
);
|
|
39
39
|
if (s.length === 0) return null;
|
|
40
|
-
const d = s.slice(
|
|
40
|
+
const d = s.slice(t.length + 1), C = (e, {
|
|
41
41
|
index: l,
|
|
42
42
|
isFirst: r,
|
|
43
|
-
isCurrent:
|
|
43
|
+
isCurrent: c
|
|
44
44
|
}) => {
|
|
45
|
-
const N = !
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
const N = !c && (!!e.href || !!e.onClick), h = o(
|
|
46
|
+
G,
|
|
47
|
+
b[n],
|
|
48
|
+
N ? X : c ? o($, q[n]) : Z,
|
|
49
|
+
T,
|
|
50
|
+
g.breadcrumbsItem
|
|
51
|
+
), f = /* @__PURE__ */ i(A, { children: [
|
|
51
52
|
e.icon,
|
|
52
|
-
/* @__PURE__ */ a(
|
|
53
|
+
/* @__PURE__ */ a(F, { text: e.label })
|
|
53
54
|
] });
|
|
54
|
-
return /* @__PURE__ */
|
|
55
|
+
return /* @__PURE__ */ i(
|
|
55
56
|
"li",
|
|
56
57
|
{
|
|
57
58
|
className: o(
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
k,
|
|
60
|
+
S[n],
|
|
61
|
+
H[n][c ? "last" : r ? "first" : "middle"]
|
|
61
62
|
),
|
|
62
63
|
children: [
|
|
63
64
|
N ? e.href ? /* @__PURE__ */ a(
|
|
@@ -66,7 +67,7 @@ const te = ({
|
|
|
66
67
|
href: e.href,
|
|
67
68
|
onClick: e.onClick,
|
|
68
69
|
className: h,
|
|
69
|
-
children:
|
|
70
|
+
children: f
|
|
70
71
|
}
|
|
71
72
|
) : /* @__PURE__ */ a(
|
|
72
73
|
"button",
|
|
@@ -74,17 +75,17 @@ const te = ({
|
|
|
74
75
|
type: "button",
|
|
75
76
|
onClick: e.onClick,
|
|
76
77
|
className: h,
|
|
77
|
-
children:
|
|
78
|
+
children: f
|
|
78
79
|
}
|
|
79
80
|
) : /* @__PURE__ */ a(
|
|
80
81
|
"span",
|
|
81
82
|
{
|
|
82
83
|
className: h,
|
|
83
|
-
"aria-current":
|
|
84
|
-
children:
|
|
84
|
+
"aria-current": c ? "page" : void 0,
|
|
85
|
+
children: f
|
|
85
86
|
}
|
|
86
87
|
),
|
|
87
|
-
!
|
|
88
|
+
!c && /* @__PURE__ */ a("span", { className: I, "aria-hidden": "true", children: p })
|
|
88
89
|
]
|
|
89
90
|
},
|
|
90
91
|
`segment-${l}`
|
|
@@ -93,45 +94,48 @@ const te = ({
|
|
|
93
94
|
return /* @__PURE__ */ a(
|
|
94
95
|
"nav",
|
|
95
96
|
{
|
|
96
|
-
"aria-label":
|
|
97
|
+
"aria-label": M,
|
|
97
98
|
className: o(
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
W[n],
|
|
100
|
+
L,
|
|
101
|
+
g.breadcrumbs
|
|
101
102
|
),
|
|
102
|
-
children: /* @__PURE__ */
|
|
103
|
+
children: /* @__PURE__ */ i("ol", { className: R, children: [
|
|
103
104
|
C(s[0], {
|
|
104
105
|
index: 0,
|
|
105
106
|
isFirst: !0,
|
|
106
107
|
isCurrent: s.length === 1
|
|
107
108
|
}),
|
|
108
|
-
|
|
109
|
+
t.length > 0 && /* @__PURE__ */ i(
|
|
109
110
|
"li",
|
|
110
111
|
{
|
|
111
112
|
className: o(
|
|
112
|
-
|
|
113
|
-
|
|
113
|
+
k,
|
|
114
|
+
S[n],
|
|
114
115
|
"shrink-0"
|
|
115
116
|
),
|
|
116
117
|
children: [
|
|
117
118
|
/* @__PURE__ */ a(
|
|
118
|
-
|
|
119
|
+
w,
|
|
119
120
|
{
|
|
120
|
-
items:
|
|
121
|
-
onItemClick:
|
|
121
|
+
items: v,
|
|
122
|
+
onItemClick: x,
|
|
122
123
|
placement: "bottom-start",
|
|
123
124
|
matchReferenceWidth: !1,
|
|
124
125
|
children: /* @__PURE__ */ a(
|
|
125
126
|
"button",
|
|
126
127
|
{
|
|
127
128
|
type: "button",
|
|
128
|
-
"aria-label":
|
|
129
|
-
className:
|
|
129
|
+
"aria-label": E,
|
|
130
|
+
className: o(
|
|
131
|
+
j,
|
|
132
|
+
b[n]
|
|
133
|
+
),
|
|
130
134
|
children: /* @__PURE__ */ a(
|
|
131
|
-
|
|
135
|
+
B,
|
|
132
136
|
{
|
|
133
|
-
size:
|
|
134
|
-
stroke:
|
|
137
|
+
size: K.SM,
|
|
138
|
+
stroke: y,
|
|
135
139
|
"aria-hidden": "true"
|
|
136
140
|
}
|
|
137
141
|
)
|
|
@@ -139,7 +143,7 @@ const te = ({
|
|
|
139
143
|
)
|
|
140
144
|
}
|
|
141
145
|
),
|
|
142
|
-
/* @__PURE__ */ a("span", { className:
|
|
146
|
+
/* @__PURE__ */ a("span", { className: I, "aria-hidden": "true", children: p })
|
|
143
147
|
]
|
|
144
148
|
}
|
|
145
149
|
),
|
|
@@ -155,5 +159,5 @@ const te = ({
|
|
|
155
159
|
);
|
|
156
160
|
};
|
|
157
161
|
export {
|
|
158
|
-
|
|
162
|
+
oe as Breadcrumbs
|
|
159
163
|
};
|
|
@@ -1,41 +1,60 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { IconChevronRight as
|
|
2
|
+
import { IconChevronRight as i } from "@tabler/icons-react";
|
|
3
3
|
import { DIAL_KIT_ICON_STROKE as n } from "../constants/icon.js";
|
|
4
|
-
import { DIAL_ICON_SIZE as
|
|
4
|
+
import { DIAL_ICON_SIZE as a } from "../../../constants/icon.js";
|
|
5
5
|
import { BreadcrumbsSize as e } from "../../../types/breadcrumbs.js";
|
|
6
|
-
const
|
|
6
|
+
const d = {
|
|
7
|
+
[e.Small]: "w-full overflow-hidden",
|
|
8
|
+
[e.Tiny]: "w-full",
|
|
9
|
+
[e.Heading]: "w-full overflow-hidden"
|
|
10
|
+
}, f = "flex min-w-0 flex-nowrap items-center gap-2 whitespace-nowrap", u = "flex min-w-0 items-center gap-2", x = {
|
|
7
11
|
[e.Small]: "dial-small-text",
|
|
12
|
+
[e.Tiny]: "dial-tiny-text",
|
|
8
13
|
[e.Heading]: "dial-h2-text"
|
|
9
|
-
},
|
|
14
|
+
}, h = {
|
|
10
15
|
[e.Small]: "dial-small-semi-text",
|
|
16
|
+
[e.Tiny]: "dial-tiny-semi-text",
|
|
11
17
|
[e.Heading]: "dial-h2-text"
|
|
12
|
-
},
|
|
18
|
+
}, s = {
|
|
13
19
|
first: "shrink-0",
|
|
14
20
|
middle: "min-w-0 max-w-[30%] shrink",
|
|
15
21
|
last: "min-w-0 max-w-[51%] shrink"
|
|
16
|
-
},
|
|
17
|
-
s,
|
|
22
|
+
}, S = {
|
|
23
|
+
[e.Small]: s,
|
|
24
|
+
[e.Tiny]: {
|
|
25
|
+
first: "shrink-0",
|
|
26
|
+
middle: "min-w-12 shrink-[1000]",
|
|
27
|
+
last: "min-w-0 shrink"
|
|
28
|
+
},
|
|
29
|
+
[e.Heading]: s
|
|
30
|
+
}, g = {
|
|
31
|
+
[e.Small]: "rounded-xs focus-visible:outline-offset-2",
|
|
32
|
+
[e.Tiny]: "rounded focus-visible:outline-offset-1",
|
|
33
|
+
[e.Heading]: "rounded-xs focus-visible:outline-offset-2"
|
|
34
|
+
}, w = "flex min-w-0 flex-1 items-center gap-1 transition-colors", N = "text-secondary hover:text-accent focus-visible:outline focus-visible:outline-focus", p = "cursor-default text-primary", C = "cursor-default text-secondary", v = "inline-flex flex-none items-center leading-none text-secondary", I = "dial-kit-minimum-target flex shrink-0 items-center text-secondary transition-colors hover:text-accent focus-visible:outline focus-visible:outline-focus", y = 3, k = 4, T = /* @__PURE__ */ t(
|
|
35
|
+
i,
|
|
18
36
|
{
|
|
19
|
-
size:
|
|
37
|
+
size: a.SM,
|
|
20
38
|
stroke: n,
|
|
21
39
|
"aria-hidden": "true",
|
|
22
40
|
className: "rtl:scale-x-[-1]"
|
|
23
41
|
}
|
|
24
42
|
);
|
|
25
43
|
export {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
44
|
+
k as DEFAULT_MAX_VISIBLE_ITEMS,
|
|
45
|
+
y as MIN_VISIBLE_ITEMS,
|
|
46
|
+
p as currentSegmentClassName,
|
|
47
|
+
h as currentSizeClassName,
|
|
48
|
+
T as defaultSeparator,
|
|
49
|
+
g as focusRingClassName,
|
|
31
50
|
u as itemClassName,
|
|
32
|
-
|
|
51
|
+
N as linkSegmentClassName,
|
|
33
52
|
f as listClassName,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
53
|
+
d as navClassName,
|
|
54
|
+
I as overflowButtonClassName,
|
|
55
|
+
w as segmentClassName,
|
|
56
|
+
S as segmentWidthClassName,
|
|
57
|
+
v as separatorClassName,
|
|
58
|
+
x as sizeClassName,
|
|
59
|
+
C as staticSegmentClassName
|
|
41
60
|
};
|