@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.
- package/README.md +139 -0
- package/dist/CHANGELOG.md +10 -0
- package/dist/{DateCellRenderer-BVM-Q8yx.cjs → DateCellRenderer-4iMidqal.cjs} +26 -26
- package/dist/DateCellRenderer-CTTAnQjB.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/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 +28 -26
- 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 -33
- package/dist/components/Skeleton/Skeleton.js +25 -19
- package/dist/components/Spinner/Spinner.js +6 -4
- package/dist/components-manifest.json +7 -2
- package/dist/constants/public-class-names.js +152 -0
- package/dist/dial-ui-kit.cjs +2 -2
- package/dist/dial-ui-kit.js +203 -201
- package/dist/file-manager.cjs +1 -1
- package/dist/grid.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/src/constants/public-class-names.d.ts +143 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/use-file-manager-tabs-DKmWaOlC.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,50 +1,43 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { mergeClasses as
|
|
3
|
-
import { EllipsisTooltip as
|
|
1
|
+
import { jsx as a, jsxs as h, Fragment as g } from "react/jsx-runtime";
|
|
2
|
+
import { mergeClasses as t } from "../../../utils/merge-classes.js";
|
|
3
|
+
import { EllipsisTooltip as o } from "../EllipsisTooltip/EllipsisTooltip.js";
|
|
4
|
+
import { DIAL_KIT_CLASS as C } from "../../../constants/public-class-names.js";
|
|
4
5
|
const i = {
|
|
5
6
|
2: "line-clamp-2",
|
|
6
7
|
3: "line-clamp-3",
|
|
7
8
|
4: "line-clamp-4",
|
|
8
9
|
5: "line-clamp-5",
|
|
9
10
|
6: "line-clamp-6"
|
|
10
|
-
},
|
|
11
|
+
}, N = (e) => e === 1 ? "!truncate !whitespace-nowrap" : `${i[e] ?? i[2]} !whitespace-normal`, S = ({
|
|
11
12
|
text: e,
|
|
12
|
-
query:
|
|
13
|
-
markClassName:
|
|
14
|
-
className:
|
|
13
|
+
query: s,
|
|
14
|
+
markClassName: n,
|
|
15
|
+
className: m,
|
|
15
16
|
maxLines: r = 2
|
|
16
17
|
}) => {
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
);
|
|
26
|
-
const l = e.toLowerCase().indexOf(a.toLowerCase()), p = l === -1 ? e : /* @__PURE__ */ h(g, { children: [
|
|
18
|
+
const c = t(
|
|
19
|
+
C.highlight,
|
|
20
|
+
N(r),
|
|
21
|
+
m
|
|
22
|
+
);
|
|
23
|
+
if (!s.trim())
|
|
24
|
+
return /* @__PURE__ */ a(o, { className: c, text: e });
|
|
25
|
+
const l = e.toLowerCase().indexOf(s.toLowerCase()), p = l === -1 ? e : /* @__PURE__ */ h(g, { children: [
|
|
27
26
|
e.slice(0, l),
|
|
28
|
-
/* @__PURE__ */
|
|
27
|
+
/* @__PURE__ */ a(
|
|
29
28
|
"mark",
|
|
30
29
|
{
|
|
31
|
-
className:
|
|
30
|
+
className: t(
|
|
32
31
|
"text-accent bg-control-accent-alpha-hover",
|
|
33
|
-
|
|
32
|
+
n
|
|
34
33
|
),
|
|
35
|
-
children: e.slice(l, l +
|
|
34
|
+
children: e.slice(l, l + s.length)
|
|
36
35
|
}
|
|
37
36
|
),
|
|
38
|
-
e.slice(l +
|
|
37
|
+
e.slice(l + s.length)
|
|
39
38
|
] });
|
|
40
|
-
return /* @__PURE__ */ c
|
|
41
|
-
t,
|
|
42
|
-
{
|
|
43
|
-
className: s(o, n),
|
|
44
|
-
text: p
|
|
45
|
-
}
|
|
46
|
-
);
|
|
39
|
+
return /* @__PURE__ */ a(o, { className: c, text: p });
|
|
47
40
|
};
|
|
48
41
|
export {
|
|
49
|
-
|
|
42
|
+
S as Highlight
|
|
50
43
|
};
|
|
@@ -1,39 +1,41 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { IconInfoCircle as n } from "@tabler/icons-react";
|
|
3
3
|
import { DIAL_KIT_ICON_STROKE as l } from "../constants/icon.js";
|
|
4
|
-
import { DIAL_ICON_SIZE as
|
|
5
|
-
import { ElementSize as
|
|
4
|
+
import { DIAL_ICON_SIZE as m } from "../../../constants/icon.js";
|
|
5
|
+
import { ElementSize as s } from "../../../types/size.js";
|
|
6
6
|
import { mergeClasses as a } from "../../../utils/merge-classes.js";
|
|
7
7
|
import { IconButton as c } from "../IconButton/IconButton.js";
|
|
8
|
-
|
|
8
|
+
import { DIAL_KIT_CLASS as f } from "../../../constants/public-class-names.js";
|
|
9
|
+
const b = ({
|
|
9
10
|
caption: o,
|
|
10
|
-
onClick:
|
|
11
|
-
"aria-label":
|
|
11
|
+
onClick: r,
|
|
12
|
+
"aria-label": e
|
|
12
13
|
}) => {
|
|
13
14
|
if (!o) return null;
|
|
14
15
|
const i = a(
|
|
16
|
+
f.infoButton,
|
|
15
17
|
"text-secondary hover:text-control-accent-hover active:text-control-accent-active",
|
|
16
18
|
"focus-visible:outline focus-visible:outline-focus"
|
|
17
19
|
);
|
|
18
20
|
return /* @__PURE__ */ t(
|
|
19
21
|
c,
|
|
20
22
|
{
|
|
21
|
-
"aria-label":
|
|
23
|
+
"aria-label": e,
|
|
22
24
|
className: i,
|
|
23
25
|
icon: /* @__PURE__ */ t(
|
|
24
26
|
n,
|
|
25
27
|
{
|
|
26
|
-
size:
|
|
28
|
+
size: m.SM,
|
|
27
29
|
stroke: l,
|
|
28
30
|
"aria-hidden": "true"
|
|
29
31
|
}
|
|
30
32
|
),
|
|
31
|
-
onClick:
|
|
32
|
-
size:
|
|
33
|
+
onClick: r,
|
|
34
|
+
size: s.Small,
|
|
33
35
|
tooltipProps: { tooltip: o }
|
|
34
36
|
}
|
|
35
37
|
);
|
|
36
38
|
};
|
|
37
39
|
export {
|
|
38
|
-
|
|
40
|
+
b as InfoButton
|
|
39
41
|
};
|
|
@@ -1,88 +1,90 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { IconChevronDown as
|
|
3
|
-
import { useState as p, useMemo as D, useCallback as
|
|
4
|
-
import { Dropdown as
|
|
5
|
-
import { DIAL_KIT_ICON_STROKE as
|
|
6
|
-
import { DIAL_ICON_SIZE as
|
|
1
|
+
import { jsx as s, jsxs as y } from "react/jsx-runtime";
|
|
2
|
+
import { IconChevronDown as _ } from "@tabler/icons-react";
|
|
3
|
+
import { useState as p, useMemo as D, useCallback as N } from "react";
|
|
4
|
+
import { Dropdown as K } from "../Dropdown/Dropdown.js";
|
|
5
|
+
import { DIAL_KIT_ICON_STROKE as O } from "../constants/icon.js";
|
|
6
|
+
import { DIAL_ICON_SIZE as A } from "../../../constants/icon.js";
|
|
7
7
|
import { mergeClasses as f } from "../../../utils/merge-classes.js";
|
|
8
|
-
import { ElementSize as
|
|
9
|
-
|
|
8
|
+
import { ElementSize as L } from "../../../types/size.js";
|
|
9
|
+
import { DIAL_KIT_CLASS as T } from "../../../constants/public-class-names.js";
|
|
10
|
+
const E = ({
|
|
10
11
|
label: e,
|
|
11
|
-
size:
|
|
12
|
-
isOpen:
|
|
12
|
+
size: n,
|
|
13
|
+
isOpen: r = !1,
|
|
13
14
|
"aria-label": t,
|
|
14
|
-
...
|
|
15
|
+
...a
|
|
15
16
|
}) => {
|
|
16
|
-
const l =
|
|
17
|
+
const l = n === L.Small ? "h-[32px]" : "h-[40px] dial-kit-enhanced-target";
|
|
17
18
|
return /* @__PURE__ */ y(
|
|
18
19
|
"button",
|
|
19
20
|
{
|
|
20
21
|
type: "button",
|
|
21
22
|
"aria-haspopup": "menu",
|
|
22
|
-
"aria-expanded":
|
|
23
|
+
"aria-expanded": r,
|
|
23
24
|
"aria-label": t ? `${t} ${e}` : void 0,
|
|
24
25
|
className: f(
|
|
26
|
+
T.inlineSelect,
|
|
25
27
|
"dial-small-paragraph-text px-3 focus-visible:outline focus-visible:outline-focus",
|
|
26
28
|
"flex items-center gap-1 rounded-full text-primary disabled:text-control-disable-primary",
|
|
27
29
|
"hover:bg-control-accent-alpha-hover focus-visible:outline-offset-2 active:bg-control-accent-alpha-active",
|
|
28
30
|
l,
|
|
29
|
-
|
|
31
|
+
a.className
|
|
30
32
|
),
|
|
31
|
-
...
|
|
33
|
+
...a,
|
|
32
34
|
children: [
|
|
33
35
|
e,
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
|
|
36
|
+
/* @__PURE__ */ s(
|
|
37
|
+
_,
|
|
36
38
|
{
|
|
37
|
-
size:
|
|
38
|
-
stroke:
|
|
39
|
+
size: A.MD,
|
|
40
|
+
stroke: O,
|
|
39
41
|
"aria-hidden": !0,
|
|
40
|
-
className: f("transition-transform",
|
|
42
|
+
className: f("transition-transform", r && "rotate-180")
|
|
41
43
|
}
|
|
42
44
|
)
|
|
43
45
|
]
|
|
44
46
|
}
|
|
45
47
|
);
|
|
46
|
-
},
|
|
48
|
+
}, B = ({
|
|
47
49
|
items: e,
|
|
48
|
-
selectedKey:
|
|
49
|
-
defaultSelectedKey:
|
|
50
|
+
selectedKey: n,
|
|
51
|
+
defaultSelectedKey: r,
|
|
50
52
|
onSelect: t,
|
|
51
|
-
size:
|
|
53
|
+
size: a,
|
|
52
54
|
disabled: l,
|
|
53
55
|
placement: d = "bottom-end",
|
|
54
56
|
matchReferenceWidth: u = !1,
|
|
55
57
|
listClassName: b,
|
|
56
58
|
ariaLabel: h
|
|
57
59
|
}) => {
|
|
58
|
-
const [
|
|
59
|
-
|
|
60
|
-
),
|
|
60
|
+
const [I, v] = p(!1), [S, x] = p(
|
|
61
|
+
r ?? e[0]?.key
|
|
62
|
+
), c = n !== void 0, m = c ? n : S, g = D(() => {
|
|
61
63
|
const o = e.find((i) => i.key === m);
|
|
62
64
|
return o?.label ? String(o.label) : "";
|
|
63
|
-
}, [e, m]),
|
|
65
|
+
}, [e, m]), C = N(
|
|
64
66
|
({ key: o }) => {
|
|
65
67
|
const i = e.find((k) => k.key === o);
|
|
66
|
-
i && (
|
|
68
|
+
i && (c || x(o), t?.(i));
|
|
67
69
|
},
|
|
68
|
-
[e,
|
|
70
|
+
[e, c, t]
|
|
69
71
|
);
|
|
70
|
-
return /* @__PURE__ */
|
|
71
|
-
|
|
72
|
+
return /* @__PURE__ */ s(
|
|
73
|
+
K,
|
|
72
74
|
{
|
|
73
75
|
items: e,
|
|
74
76
|
placement: d,
|
|
75
77
|
matchReferenceWidth: u,
|
|
76
78
|
listClassName: b,
|
|
77
79
|
disabled: l,
|
|
78
|
-
onOpenChange:
|
|
79
|
-
onItemClick:
|
|
80
|
-
children: /* @__PURE__ */
|
|
81
|
-
|
|
80
|
+
onOpenChange: v,
|
|
81
|
+
onItemClick: C,
|
|
82
|
+
children: /* @__PURE__ */ s(
|
|
83
|
+
E,
|
|
82
84
|
{
|
|
83
|
-
label:
|
|
84
|
-
size:
|
|
85
|
-
isOpen:
|
|
85
|
+
label: g,
|
|
86
|
+
size: a,
|
|
87
|
+
isOpen: I,
|
|
86
88
|
disabled: l,
|
|
87
89
|
"aria-label": h
|
|
88
90
|
}
|
|
@@ -91,6 +93,6 @@ const j = ({
|
|
|
91
93
|
);
|
|
92
94
|
};
|
|
93
95
|
export {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
+
B as InlineSelect,
|
|
97
|
+
E as InlineSelectTrigger
|
|
96
98
|
};
|
|
@@ -1,57 +1,58 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
2
|
-
import { useFloatingNodeId as H, useFloating as U, autoUpdate as G, offset as
|
|
1
|
+
import { jsx as n, jsxs as j, Fragment as w } from "react/jsx-runtime";
|
|
2
|
+
import { useFloatingNodeId as H, useFloating as U, autoUpdate as G, offset as K, flip as Y, shift as k, useHover as q, safePolygon as z, useFocus as B, useDismiss as J, useInteractions as Q, useMergeRefs as u, FloatingPortal as W, FloatingFocusManager as X } from "@floating-ui/react";
|
|
3
3
|
import { useState as Z, useRef as $, useMemo as d, isValidElement as ee, cloneElement as oe } from "react";
|
|
4
|
-
import { useThemeScope as
|
|
5
|
-
import { useIsMobileScreen as
|
|
4
|
+
import { useThemeScope as te } from "../ThemeScope/ThemeScope.js";
|
|
5
|
+
import { useIsMobileScreen as se } from "../../../hooks/use-is-mobile-screen.js";
|
|
6
6
|
import { TooltipPlacement as ne } from "../../../types/tooltip.js";
|
|
7
7
|
import { mergeClasses as g } from "../../../utils/merge-classes.js";
|
|
8
8
|
import { INTERACTIVE_TOOLTIP_GAP as le, INTERACTIVE_TOOLTIP_HOVER_OPEN_DELAY as ae, interactiveTooltipClassName as re } from "./constants.js";
|
|
9
|
+
import { DIAL_KIT_CLASS as ie } from "../../../constants/public-class-names.js";
|
|
9
10
|
const Re = ({
|
|
10
11
|
content: a,
|
|
11
|
-
placement:
|
|
12
|
+
placement: T = ne.Right,
|
|
12
13
|
children: e,
|
|
13
|
-
asChild:
|
|
14
|
-
hideTooltip:
|
|
15
|
-
initialOpen:
|
|
16
|
-
open:
|
|
17
|
-
onOpenChange:
|
|
14
|
+
asChild: I = !1,
|
|
15
|
+
hideTooltip: R = !1,
|
|
16
|
+
initialOpen: F = !1,
|
|
17
|
+
open: t,
|
|
18
|
+
onOpenChange: h,
|
|
18
19
|
triggerClassName: r,
|
|
19
20
|
contentClassName: E
|
|
20
21
|
}) => {
|
|
21
|
-
const P =
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
nodeId:
|
|
25
|
-
placement:
|
|
22
|
+
const P = se(), C = te(), [v, N] = Z(F), i = t ?? v, O = (m) => {
|
|
23
|
+
h?.(m), t == null && N(m);
|
|
24
|
+
}, _ = H(), { refs: s, floatingStyles: S, context: o } = U({
|
|
25
|
+
nodeId: _,
|
|
26
|
+
placement: T,
|
|
26
27
|
open: i,
|
|
27
|
-
onOpenChange:
|
|
28
|
+
onOpenChange: O,
|
|
28
29
|
whileElementsMounted: G,
|
|
29
30
|
middleware: [
|
|
30
|
-
|
|
31
|
+
K(le),
|
|
31
32
|
/* No `fallbackAxisSideDirection`: a panel placed to the right should
|
|
32
33
|
flip to the left when it does not fit, not drop to the perpendicular
|
|
33
34
|
top/bottom axis, which reads as the panel landing in the wrong place.*/
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
Y({ padding: 5 }),
|
|
36
|
+
k({ padding: 5 })
|
|
36
37
|
]
|
|
37
|
-
}),
|
|
38
|
-
enabled:
|
|
38
|
+
}), A = q(o, {
|
|
39
|
+
enabled: t == null,
|
|
39
40
|
/* Lets the pointer cross the gap between the trigger and the panel
|
|
40
41
|
without closing it, so it can actually be reached and used. */
|
|
41
|
-
handleClose:
|
|
42
|
+
handleClose: z(),
|
|
42
43
|
delay: { open: ae, close: 0 }
|
|
43
|
-
}),
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
]),
|
|
48
|
-
d(() => [
|
|
49
|
-
), f =
|
|
44
|
+
}), M = B(o, { enabled: t == null }), L = J(o), { getReferenceProps: c, getFloatingProps: V } = Q([
|
|
45
|
+
A,
|
|
46
|
+
M,
|
|
47
|
+
L
|
|
48
|
+
]), b = $(null), x = u(
|
|
49
|
+
d(() => [s.setFloating, b], [s.setFloating])
|
|
50
|
+
), f = I && ee(e), l = f ? e.props?.ref : null, p = u(
|
|
50
51
|
d(
|
|
51
|
-
() => [
|
|
52
|
-
[
|
|
52
|
+
() => [s.setReference, ...l ? [l] : []],
|
|
53
|
+
[s.setReference, l]
|
|
53
54
|
)
|
|
54
|
-
),
|
|
55
|
+
), y = !R && !P && !!a, D = f ? oe(
|
|
55
56
|
e,
|
|
56
57
|
c({
|
|
57
58
|
...e.props,
|
|
@@ -70,9 +71,9 @@ const Re = ({
|
|
|
70
71
|
children: e
|
|
71
72
|
}
|
|
72
73
|
);
|
|
73
|
-
return /* @__PURE__ */ w
|
|
74
|
-
|
|
75
|
-
i &&
|
|
74
|
+
return /* @__PURE__ */ j(w, { children: [
|
|
75
|
+
D,
|
|
76
|
+
i && y && /* @__PURE__ */ n(W, { id: "interactive-tooltip-portal", children: /* @__PURE__ */ n(
|
|
76
77
|
X,
|
|
77
78
|
{
|
|
78
79
|
context: o,
|
|
@@ -83,11 +84,12 @@ const Re = ({
|
|
|
83
84
|
children: /* @__PURE__ */ n(
|
|
84
85
|
"div",
|
|
85
86
|
{
|
|
86
|
-
ref:
|
|
87
|
+
ref: x,
|
|
87
88
|
"data-placement": o.placement,
|
|
88
|
-
style:
|
|
89
|
-
...
|
|
89
|
+
style: S,
|
|
90
|
+
...V(),
|
|
90
91
|
className: g(
|
|
92
|
+
ie.interactiveTooltip,
|
|
91
93
|
re,
|
|
92
94
|
C,
|
|
93
95
|
E
|
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
import { jsxs as t, jsx as r, Fragment as d } from "react/jsx-runtime";
|
|
2
2
|
import { mergeClasses as s } from "../../../utils/merge-classes.js";
|
|
3
|
-
import { ElementSize as
|
|
3
|
+
import { ElementSize as a } from "../../../types/size.js";
|
|
4
4
|
import { InfoButton as p } from "../InfoButton/InfoButton.js";
|
|
5
|
-
|
|
5
|
+
import { DIAL_KIT_CLASS as f } from "../../../constants/public-class-names.js";
|
|
6
|
+
const N = ({
|
|
6
7
|
label: e,
|
|
7
|
-
required:
|
|
8
|
+
required: n,
|
|
8
9
|
className: i,
|
|
9
10
|
containerClassName: l,
|
|
10
11
|
caption: m,
|
|
11
|
-
size: o =
|
|
12
|
+
size: o = a.Small,
|
|
12
13
|
...c
|
|
13
14
|
}) => e ? /* @__PURE__ */ t(
|
|
14
15
|
"span",
|
|
15
16
|
{
|
|
16
|
-
className: s(
|
|
17
|
+
className: s(
|
|
18
|
+
f.label,
|
|
19
|
+
"flex items-center gap-0.5",
|
|
20
|
+
l
|
|
21
|
+
),
|
|
17
22
|
children: [
|
|
18
23
|
/* @__PURE__ */ t(
|
|
19
24
|
"label",
|
|
@@ -21,12 +26,12 @@ const g = ({
|
|
|
21
26
|
...c,
|
|
22
27
|
className: s(
|
|
23
28
|
"text-secondary flex items-center gap-0.5",
|
|
24
|
-
o ===
|
|
29
|
+
o === a.Small ? "dial-tiny-semi-text" : "dial-small-text",
|
|
25
30
|
i
|
|
26
31
|
),
|
|
27
32
|
children: [
|
|
28
33
|
typeof e == "string" ? /* @__PURE__ */ r("span", { className: "min-h-4", children: e }) : e,
|
|
29
|
-
|
|
34
|
+
n && /* @__PURE__ */ t(d, { children: [
|
|
30
35
|
/* @__PURE__ */ r("span", { "aria-hidden": "true", className: "text-error dial-tiny-text", children: "*" }),
|
|
31
36
|
/* @__PURE__ */ r("span", { className: "sr-only", children: "(required)" })
|
|
32
37
|
] })
|
|
@@ -38,5 +43,5 @@ const g = ({
|
|
|
38
43
|
}
|
|
39
44
|
) : null;
|
|
40
45
|
export {
|
|
41
|
-
|
|
46
|
+
N as Label
|
|
42
47
|
};
|
|
@@ -1,41 +1,43 @@
|
|
|
1
1
|
import { jsxs as i, Fragment as g, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { DialIcon as k } from "../../Icon/Icon.js";
|
|
3
|
-
import { CheckboxBox as
|
|
4
|
-
import { EllipsisTooltip as
|
|
5
|
-
import { overlayItemDisabledClassName as
|
|
6
|
-
import {
|
|
3
|
+
import { CheckboxBox as S } from "../Checkbox/CheckboxBox.js";
|
|
4
|
+
import { EllipsisTooltip as T } from "../EllipsisTooltip/EllipsisTooltip.js";
|
|
5
|
+
import { overlayItemDisabledClassName as D, overlayItemSelectedClassName as H, overlayItemHighlightClassName as M, overlayItemClassName as j } from "../constants/overlay.js";
|
|
6
|
+
import { DIAL_KIT_CLASS as A } from "../../../constants/public-class-names.js";
|
|
7
|
+
import { MenuItemMark as o } from "../../../types/menu-item.js";
|
|
7
8
|
import { mergeClasses as e } from "../../../utils/merge-classes.js";
|
|
8
|
-
import { menuItemCheckIcon as
|
|
9
|
-
const
|
|
9
|
+
import { menuItemCheckIcon as L } from "./constants.js";
|
|
10
|
+
const O = ({
|
|
10
11
|
label: l,
|
|
11
12
|
icon: c,
|
|
12
13
|
description: f,
|
|
13
|
-
mark:
|
|
14
|
+
mark: s = o.None,
|
|
14
15
|
selected: r = !1,
|
|
15
|
-
danger:
|
|
16
|
-
trailing:
|
|
16
|
+
danger: u = !1,
|
|
17
|
+
trailing: h,
|
|
17
18
|
rightControl: m,
|
|
18
|
-
ellipsisLabel:
|
|
19
|
+
ellipsisLabel: I = !1,
|
|
19
20
|
labelClassName: x,
|
|
20
|
-
children:
|
|
21
|
-
className:
|
|
21
|
+
children: v,
|
|
22
|
+
className: d,
|
|
22
23
|
disabled: a = !1,
|
|
23
24
|
type: C = "button",
|
|
24
25
|
...w
|
|
25
26
|
}) => {
|
|
26
|
-
const y = r &&
|
|
27
|
-
|
|
27
|
+
const y = r && s === o.Highlight, b = r && (s === o.Checkbox || s === o.Tint), n = e(
|
|
28
|
+
u && "text-error",
|
|
28
29
|
a && "text-control-disable-primary"
|
|
29
30
|
), p = e(
|
|
30
|
-
|
|
31
|
+
A.menuItem,
|
|
32
|
+
j,
|
|
31
33
|
// A row that opens a panel stays tinted while that panel is up, so the
|
|
32
34
|
// trail back to it is visible once the pointer has moved into it.
|
|
33
35
|
"aria-expanded:bg-control-accent-alpha-hover",
|
|
34
|
-
y &&
|
|
35
|
-
b &&
|
|
36
|
-
a &&
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
y && M,
|
|
37
|
+
b && H,
|
|
38
|
+
a && D,
|
|
39
|
+
u && "text-error",
|
|
40
|
+
d
|
|
39
41
|
), N = /* @__PURE__ */ i(
|
|
40
42
|
"button",
|
|
41
43
|
{
|
|
@@ -45,11 +47,11 @@ const L = ({
|
|
|
45
47
|
className: m ? "flex h-full min-w-0 flex-1 items-center gap-2 truncate text-start focus-visible:outline-none" : p,
|
|
46
48
|
...w,
|
|
47
49
|
children: [
|
|
48
|
-
|
|
49
|
-
|
|
50
|
+
v ?? /* @__PURE__ */ i(g, { children: [
|
|
51
|
+
s === o.Checkbox && /* @__PURE__ */ t(S, { isSelected: r, disabled: a }),
|
|
50
52
|
c && /* @__PURE__ */ t(k, { icon: c, className: n }),
|
|
51
|
-
|
|
52
|
-
|
|
53
|
+
I ? /* @__PURE__ */ t(
|
|
54
|
+
T,
|
|
53
55
|
{
|
|
54
56
|
text: l,
|
|
55
57
|
className: e(n, x)
|
|
@@ -75,9 +77,9 @@ const L = ({
|
|
|
75
77
|
children: f
|
|
76
78
|
}
|
|
77
79
|
),
|
|
78
|
-
r &&
|
|
80
|
+
r && s === o.Check && L
|
|
79
81
|
] }),
|
|
80
|
-
|
|
82
|
+
h && /* @__PURE__ */ t("span", { className: e("ml-auto shrink-0", n), children: h })
|
|
81
83
|
]
|
|
82
84
|
}
|
|
83
85
|
);
|
|
@@ -104,5 +106,5 @@ const L = ({
|
|
|
104
106
|
) : N;
|
|
105
107
|
};
|
|
106
108
|
export {
|
|
107
|
-
|
|
109
|
+
O as MenuItem
|
|
108
110
|
};
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { IconCheck as
|
|
3
|
-
import { DIAL_KIT_ICON_STROKE as
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { IconCheck as o } from "@tabler/icons-react";
|
|
3
|
+
import { DIAL_KIT_ICON_STROKE as r } from "../constants/icon.js";
|
|
4
4
|
import { DIAL_ICON_SIZE as e } from "../../../constants/icon.js";
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
import { DIAL_KIT_CLASS as I } from "../../../constants/public-class-names.js";
|
|
6
|
+
const _ = /* @__PURE__ */ m(
|
|
7
|
+
o,
|
|
7
8
|
{
|
|
8
9
|
size: e.SM,
|
|
9
|
-
stroke:
|
|
10
|
-
className:
|
|
10
|
+
stroke: r,
|
|
11
|
+
className: `${I.menuItemCheck} shrink-0`,
|
|
11
12
|
"aria-hidden": !0
|
|
12
13
|
}
|
|
13
14
|
);
|
|
14
15
|
export {
|
|
15
|
-
|
|
16
|
+
_ as menuItemCheckIcon
|
|
16
17
|
};
|
|
@@ -1,28 +1,30 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as c, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import d from "../../../assets/icons/no-data.svg.js";
|
|
3
3
|
import { mergeClasses as e } from "../../../utils/merge-classes.js";
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
import { DIAL_KIT_CLASS as x } from "../../../constants/public-class-names.js";
|
|
5
|
+
const r = 32, N = ({
|
|
6
|
+
title: s,
|
|
6
7
|
description: a,
|
|
7
|
-
icon:
|
|
8
|
-
live:
|
|
8
|
+
icon: o,
|
|
9
|
+
live: i = !1,
|
|
9
10
|
className: n,
|
|
10
|
-
titleClassName:
|
|
11
|
-
descriptionClassName:
|
|
12
|
-
}) => /* @__PURE__ */
|
|
11
|
+
titleClassName: l,
|
|
12
|
+
descriptionClassName: m
|
|
13
|
+
}) => /* @__PURE__ */ c(
|
|
13
14
|
"div",
|
|
14
15
|
{
|
|
15
|
-
role:
|
|
16
|
+
role: i ? "status" : void 0,
|
|
16
17
|
className: e(
|
|
18
|
+
x.noDataContent,
|
|
17
19
|
"flex size-full flex-col items-center justify-center gap-2 text-tertiary",
|
|
18
20
|
n
|
|
19
21
|
),
|
|
20
22
|
children: [
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
o ?? /* @__PURE__ */ t(
|
|
24
|
+
d,
|
|
23
25
|
{
|
|
24
|
-
width:
|
|
25
|
-
height:
|
|
26
|
+
width: r,
|
|
27
|
+
height: r,
|
|
26
28
|
"aria-hidden": "true"
|
|
27
29
|
}
|
|
28
30
|
),
|
|
@@ -31,9 +33,9 @@ const s = 32, p = ({
|
|
|
31
33
|
{
|
|
32
34
|
className: e(
|
|
33
35
|
"dial-tiny-text text-secondary",
|
|
34
|
-
|
|
36
|
+
l
|
|
35
37
|
),
|
|
36
|
-
children:
|
|
38
|
+
children: s
|
|
37
39
|
}
|
|
38
40
|
),
|
|
39
41
|
a && /* @__PURE__ */ t(
|
|
@@ -41,7 +43,7 @@ const s = 32, p = ({
|
|
|
41
43
|
{
|
|
42
44
|
className: e(
|
|
43
45
|
"dial-tiny-text text-secondary",
|
|
44
|
-
|
|
46
|
+
m
|
|
45
47
|
),
|
|
46
48
|
children: a
|
|
47
49
|
}
|
|
@@ -50,5 +52,5 @@ const s = 32, p = ({
|
|
|
50
52
|
}
|
|
51
53
|
);
|
|
52
54
|
export {
|
|
53
|
-
|
|
55
|
+
N as NoDataContent
|
|
54
56
|
};
|