@epam/ai-dial-ui-kit 0.15.0-dev.2 → 0.15.0-dev.20
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 +185 -0
- package/dist/CHANGELOG.md +33 -0
- package/dist/DateCellRenderer-CkFOYZGc.cjs +1 -0
- package/dist/{DateCellRenderer-BVM-Q8yx.cjs → DateCellRenderer-ZLb4GAUV.cjs} +26 -26
- package/dist/IconButton-CVttu-k-.cjs +1 -0
- package/dist/JsonEditor-CpSpVa0v.cjs +1 -0
- package/dist/{MarkdownEditor-jQ8nDJfx.cjs → MarkdownEditor-CPzMv3lE.cjs} +1 -1
- package/dist/{MarkdownEditor-DHn2pYOJ.cjs → MarkdownEditor-NYMcKLJy.cjs} +1 -1
- package/dist/MarkdownEditorContainer-DSL5-_hG.cjs +1 -0
- package/dist/{Switch-CUKClcEz.cjs → Switch-CfxMs3AZ.cjs} +1 -1
- package/dist/components/Dropdown/Dropdown.js +70 -65
- package/dist/components/Dropdown/DropdownSubMenuItem.js +63 -55
- package/dist/components/Dropdown/constants.js +16 -14
- package/dist/components/DropdownIcon/DropdownIcon.js +43 -32
- package/dist/components/FileManager/FileManager.js +2 -2
- package/dist/components/MarkdownEditor/MarkdownEditorContainer.js +18 -16
- package/dist/components/New/Accordion/Accordion.js +40 -38
- package/dist/components/New/Breadcrumbs/Breadcrumbs.js +159 -0
- package/dist/components/New/Breadcrumbs/constants.js +41 -0
- package/dist/components/New/ButtonDropdown/ButtonDropdown.js +7 -6
- package/dist/components/New/Calendar/Calendar.js +337 -289
- package/dist/components/New/Calendar/constants.js +5 -5
- package/dist/components/New/CaptionText/CaptionText.js +18 -15
- package/dist/components/New/CardShell/CardShell.js +5 -3
- package/dist/components/New/Checkbox/Checkbox.js +67 -56
- package/dist/components/New/Checkbox/CheckboxBox.js +5 -3
- 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 +112 -105
- package/dist/components/New/Dropdown/DropdownSubMenuItem.js +17 -17
- package/dist/components/New/Dropdown/constants.js +22 -17
- package/dist/components/New/EllipsisTooltip/EllipsisTooltip.js +20 -18
- package/dist/components/New/FileDropzone/FileDropzone.js +27 -25
- package/dist/components/New/FileIcon/FileIcon.js +55 -0
- package/dist/components/New/FileIcon/constants.js +134 -0
- package/dist/components/New/FileIcon/icons/FileGlyph.js +150 -0
- package/dist/components/New/FileIcon/icons/FolderGlyph.js +50 -0
- package/dist/components/New/FileName/FileName.js +78 -0
- package/dist/components/New/FilterChips/FilterChips.js +43 -0
- package/dist/components/New/FilterChips/constants.js +5 -0
- package/dist/components/New/FolderName/FolderName.js +16 -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 +13 -11
- package/dist/components/New/InlineSelect/InlineSelect.js +43 -41
- package/dist/components/New/InteractiveTooltip/InteractiveTooltip.js +41 -39
- package/dist/components/New/InteractiveTooltip/constants.js +2 -2
- 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 +21 -19
- package/dist/components/New/Notification/Notification.js +33 -29
- 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 +46 -44
- package/dist/components/New/Popup/constants.js +3 -3
- 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 +29 -27
- package/dist/components/New/SegmentedControl/SegmentedControl.js +29 -23
- package/dist/components/New/Select/Select.js +120 -109
- package/dist/components/New/Select/constants.js +23 -20
- package/dist/components/New/SharedEntityIndicator/SharedEntityIndicator.js +34 -0
- package/dist/components/New/Switch/Switch.js +69 -58
- package/dist/components/New/Tabs/Tabs.js +125 -61
- package/dist/components/New/Tag/Tag.js +42 -40
- package/dist/components/New/TagInput/TagInput.js +45 -43
- package/dist/components/New/ToggleIconButton/ToggleIconButton.js +26 -24
- package/dist/components/New/Tooltip/TooltipContent.js +11 -9
- package/dist/components/New/Tooltip/constants.js +1 -1
- package/dist/components/New/TransferQueue/TransferQueue.js +124 -0
- package/dist/components/New/TransferQueue/TransferQueueHeader.js +71 -0
- package/dist/components/New/TransferQueue/TransferQueueRow.js +119 -0
- package/dist/components/New/TransferQueue/constants.js +24 -0
- package/dist/components/New/constants/overlay.js +15 -9
- package/dist/components/Popup/constants.js +8 -8
- package/dist/components/ProgressBar/ProgressBar.js +45 -33
- 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 +7 -5
- package/dist/components/Tooltip/TooltipContent.js +11 -11
- package/dist/components-manifest.json +756 -39
- package/dist/constants/public-class-names.js +198 -0
- package/dist/dial-ui-kit.cjs +2 -2
- package/dist/dial-ui-kit.js +335 -310
- package/dist/editor-Bc9xzKuR.cjs +1 -0
- package/dist/editors.cjs +1 -1
- package/dist/file-manager.cjs +1 -1
- package/dist/grid.cjs +1 -1
- package/dist/index.css +2 -2
- package/dist/lazy-Cy9WobJf.cjs +1 -0
- package/dist/merge-classes-BEJXjzkx.cjs +1 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +419 -399
- package/dist/src/components/New/Breadcrumbs/Breadcrumbs.d.ts +94 -0
- package/dist/src/components/New/Breadcrumbs/constants.d.ts +60 -0
- package/dist/src/components/New/Calendar/Calendar.d.ts +14 -1
- package/dist/src/components/New/Calendar/constants.d.ts +1 -1
- package/dist/src/components/New/Dropdown/Dropdown.d.ts +9 -1
- package/dist/src/components/New/Dropdown/constants.d.ts +3 -0
- package/dist/src/components/New/FileIcon/FileIcon.d.ts +61 -0
- package/dist/src/components/New/FileIcon/constants.d.ts +16 -0
- package/dist/src/components/New/FileIcon/icons/FileGlyph.d.ts +18 -0
- package/dist/src/components/New/FileIcon/icons/FolderGlyph.d.ts +17 -0
- package/dist/src/components/New/FileName/FileName.d.ts +79 -0
- 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/New/FolderName/FolderName.d.ts +37 -0
- package/dist/src/components/New/InteractiveTooltip/constants.d.ts +5 -4
- package/dist/src/components/New/Notification/Notification.d.ts +18 -0
- package/dist/src/components/New/Popup/constants.d.ts +1 -1
- package/dist/src/components/New/Select/constants.d.ts +3 -2
- package/dist/src/components/New/SharedEntityIndicator/SharedEntityIndicator.d.ts +35 -0
- package/dist/src/components/New/Tabs/Tabs.d.ts +54 -6
- package/dist/src/components/New/Tooltip/constants.d.ts +5 -3
- package/dist/src/components/New/TransferQueue/TransferQueue.d.ts +139 -0
- package/dist/src/components/New/TransferQueue/TransferQueueHeader.d.ts +16 -0
- package/dist/src/components/New/TransferQueue/TransferQueueRow.d.ts +10 -0
- package/dist/src/components/New/TransferQueue/constants.d.ts +6 -0
- package/dist/src/components/New/constants/overlay.d.ts +13 -0
- package/dist/src/components/Popup/constants.d.ts +1 -1
- 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 +189 -0
- package/dist/src/index.d.ts +20 -0
- package/dist/src/types/breadcrumbs.d.ts +9 -0
- package/dist/src/types/transfer-queue.d.ts +10 -0
- package/dist/src/utils/__tests__/timezone.spec.d.ts +1 -0
- package/dist/src/utils/sub-menu-floating.d.ts +7 -4
- package/dist/src/utils/timezone.d.ts +24 -0
- package/dist/types/breadcrumbs.js +4 -0
- package/dist/types/transfer-queue.js +4 -0
- package/dist/use-file-manager-tabs-4s-dbnmu.cjs +3 -0
- package/dist/utils/merge-classes.js +12 -5
- package/dist/utils/sub-menu-floating.js +98 -54
- package/dist/utils/timezone.js +19 -0
- package/package.json +2 -2
- package/dist/DateCellRenderer-ssp7eaZY.cjs +0 -1
- package/dist/IconButton-DWqoaBWf.cjs +0 -1
- package/dist/JsonEditor-qv1Z0dLX.cjs +0 -1
- package/dist/MarkdownEditorContainer-Bzcnoemw.cjs +0 -1
- package/dist/lazy-tfN4sKhq.cjs +0 -1
- package/dist/merge-classes-Dipy1Ih1.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(
|
|
64
65
|
"flex items-center justify-center text-inherit",
|
|
65
66
|
N[n],
|
|
66
67
|
t && "-mr-2",
|
|
67
|
-
|
|
68
|
+
h,
|
|
69
|
+
p.dropdownIcon
|
|
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
|
+
"relative z-10 inline-grid size-5 shrink-0 place-items-center",
|
|
78
|
+
p.dropdownIconCaret
|
|
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
|
)
|
|
@@ -620,10 +620,10 @@ const fn = (O) => /* @__PURE__ */ o(ni, { ...O, children: /* @__PURE__ */ o(Ai,
|
|
|
620
620
|
[I, K]
|
|
621
621
|
), mo = f(
|
|
622
622
|
() => ({
|
|
623
|
-
...M.additionalGridOptions,
|
|
624
|
-
onCellClicked: ro,
|
|
625
623
|
headerHeight: Co,
|
|
626
624
|
rowHeight: Co,
|
|
625
|
+
...M.additionalGridOptions,
|
|
626
|
+
onCellClicked: ro,
|
|
627
627
|
rowClass: "group/grid-row",
|
|
628
628
|
defaultColDef: {
|
|
629
629
|
...M.additionalGridOptions?.defaultColDef,
|
|
@@ -1,26 +1,28 @@
|
|
|
1
1
|
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
2
2
|
import { useId as g, useState as x, useEffect as J, useCallback as u } from "react";
|
|
3
|
-
import
|
|
4
|
-
import { EditorThemes as
|
|
3
|
+
import "../../constants/editor.js";
|
|
4
|
+
import { EditorThemes as S } from "../../types/editor.js";
|
|
5
|
+
import "@monaco-editor/react";
|
|
6
|
+
import { DialSwitch as b } from "../Switch/Switch.js";
|
|
5
7
|
import { DialMarkdownEditor as v } from "./MarkdownEditor.js";
|
|
6
8
|
import { DialLabel as y } from "../Label/Label.js";
|
|
7
|
-
const
|
|
9
|
+
const $ = ({
|
|
8
10
|
value: s,
|
|
9
11
|
onChangeValue: l,
|
|
10
|
-
label:
|
|
12
|
+
label: t,
|
|
11
13
|
headerContent: d,
|
|
12
14
|
switcherLabel: a,
|
|
13
15
|
height: c = 300,
|
|
14
|
-
theme: m =
|
|
16
|
+
theme: m = S.dark,
|
|
15
17
|
onValidateJSON: f,
|
|
16
18
|
preview: C = "edit"
|
|
17
19
|
}) => {
|
|
18
|
-
const N = g(), [
|
|
20
|
+
const N = g(), [i, w] = x(!1), [p, D] = x(null);
|
|
19
21
|
J(() => {
|
|
20
|
-
|
|
22
|
+
i && typeof window < "u" && import("../JsonEditor/JsonEditor.js").then((o) => {
|
|
21
23
|
D(() => o.DialJsonEditor);
|
|
22
24
|
});
|
|
23
|
-
}, [
|
|
25
|
+
}, [i]);
|
|
24
26
|
const h = u(
|
|
25
27
|
(o) => {
|
|
26
28
|
l?.(o);
|
|
@@ -31,16 +33,16 @@ const z = ({
|
|
|
31
33
|
f?.(o);
|
|
32
34
|
},
|
|
33
35
|
[f]
|
|
34
|
-
),
|
|
36
|
+
), n = !!a;
|
|
35
37
|
return /* @__PURE__ */ e("div", { className: "size-full flex flex-col", children: /* @__PURE__ */ e("div", { className: "flex flex-col gap-8", children: /* @__PURE__ */ r("div", { children: [
|
|
36
|
-
(
|
|
37
|
-
|
|
38
|
+
(t || d || n) && /* @__PURE__ */ r("div", { className: "flex justify-between items-center mb-2", children: [
|
|
39
|
+
t && /* @__PURE__ */ e(y, { label: t }),
|
|
38
40
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-2 flex-1 justify-end", children: [
|
|
39
41
|
d,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
n && /* @__PURE__ */ e("label", { className: "flex items-center gap-2 cursor-pointer", children: /* @__PURE__ */ e(
|
|
43
|
+
b,
|
|
42
44
|
{
|
|
43
|
-
isOn:
|
|
45
|
+
isOn: i,
|
|
44
46
|
label: a,
|
|
45
47
|
switchId: N,
|
|
46
48
|
onChange: (o) => w(o)
|
|
@@ -48,7 +50,7 @@ const z = ({
|
|
|
48
50
|
) })
|
|
49
51
|
] })
|
|
50
52
|
] }),
|
|
51
|
-
|
|
53
|
+
n && i ? /* @__PURE__ */ e(
|
|
52
54
|
"div",
|
|
53
55
|
{
|
|
54
56
|
className: "border border-primary rounded",
|
|
@@ -76,5 +78,5 @@ const z = ({
|
|
|
76
78
|
] }) }) });
|
|
77
79
|
};
|
|
78
80
|
export {
|
|
79
|
-
|
|
81
|
+
$ as DialMarkdownEditorContainer
|
|
80
82
|
};
|
|
@@ -1,82 +1,84 @@
|
|
|
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(
|
|
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:
|
|
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
|
};
|
|
@@ -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
|
|
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
|
};
|