@epam/ai-dial-ui-kit 0.15.0-dev.3 → 0.15.0-dev.31
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 +48 -0
- package/dist/{DateCellRenderer-BVM-Q8yx.cjs → DateCellRenderer-BFEh4rXZ.cjs} +26 -26
- package/dist/DateCellRenderer-J1V3xwF7.cjs +1 -0
- package/dist/IconButton-DHOFapLo.cjs +1 -0
- package/dist/{JsonEditor-qv1Z0dLX.cjs → JsonEditor-BDe6elKO.cjs} +1 -1
- package/dist/{MarkdownEditor-DHn2pYOJ.cjs → MarkdownEditor-C7BONfsl.cjs} +1 -1
- package/dist/{MarkdownEditor-jQ8nDJfx.cjs → MarkdownEditor-FVzYMdkC.cjs} +1 -1
- package/dist/{MarkdownEditorContainer-Bzcnoemw.cjs → MarkdownEditorContainer-GvlxX6kx.cjs} +1 -1
- package/dist/{Switch-CUKClcEz.cjs → Switch-DE6MrcqJ.cjs} +1 -1
- package/dist/components/Button/constants.js +9 -8
- 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 +373 -372
- package/dist/components/FileManager/FileManagerProvider.js +266 -264
- package/dist/components/FileManager/hooks/use-grid-context-menu.js +59 -59
- package/dist/components/New/Accordion/Accordion.js +87 -71
- package/dist/components/New/Breadcrumbs/Breadcrumbs.js +159 -0
- package/dist/components/New/Breadcrumbs/constants.js +41 -0
- package/dist/components/New/Button/Button.js +32 -32
- package/dist/components/New/Button/ButtonWrappers.js +93 -37
- package/dist/components/New/Button/constants.js +3 -0
- package/dist/components/New/Button/utils.js +18 -8
- package/dist/components/New/ButtonDropdown/ButtonDropdown.js +26 -16
- 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/IconButton/IconButton.js +30 -28
- package/dist/components/New/InfoButton/InfoButton.js +13 -11
- package/dist/components/New/InlineSelect/InlineSelect.js +74 -56
- 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 +48 -44
- 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/SchemaField.js +19 -19
- package/dist/components/SchemaRenderer/components/SchemaFieldContent.js +18 -18
- package/dist/components/SchemaRenderer/components/SchemaKeyValueEditor.js +223 -135
- package/dist/components/SchemaRenderer/types.js +19 -8
- package/dist/components/SchemaRenderer/utils.js +122 -95
- 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 +830 -31
- package/dist/constants/public-class-names.js +198 -0
- package/dist/dial-ui-kit.cjs +2 -2
- package/dist/dial-ui-kit.js +330 -302
- 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-BEsZqouS.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/FileManager/FileManager.d.ts +2 -0
- package/dist/src/components/FileManager/FileManagerContext.d.ts +1 -0
- package/dist/src/components/FileManager/hooks/use-grid-context-menu.d.ts +2 -1
- package/dist/src/components/New/Accordion/Accordion.d.ts +6 -1
- 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/Button/Button.d.ts +4 -1
- package/dist/src/components/New/Button/ButtonWrappers.d.ts +20 -0
- package/dist/src/components/New/Button/utils.d.ts +15 -0
- package/dist/src/components/New/ButtonDropdown/ButtonDropdown.d.ts +4 -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/InlineSelect/InlineSelect.d.ts +16 -1
- 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 +10 -1
- package/dist/src/constants/public-class-names.d.ts +189 -0
- package/dist/src/index.d.ts +22 -1
- package/dist/src/types/accordion.d.ts +7 -0
- package/dist/src/types/breadcrumbs.d.ts +9 -0
- package/dist/src/types/button.d.ts +1 -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/accordion.js +4 -0
- package/dist/types/breadcrumbs.js +4 -0
- package/dist/types/button.js +3 -3
- package/dist/types/transfer-queue.js +4 -0
- package/dist/use-file-manager-tabs-C0h1Sq5T.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 +3 -3
- package/dist/DateCellRenderer-ssp7eaZY.cjs +0 -1
- package/dist/IconButton-DWqoaBWf.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,45 +1,46 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { IconFolder as
|
|
3
|
-
import { DialBreadcrumb as
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { IconFolder as I, IconChevronRight as f } from "@tabler/icons-react";
|
|
3
|
+
import { DialBreadcrumb as h } from "../../Breadcrumb/Breadcrumb.js";
|
|
4
4
|
import { DialIcon as t } from "../../Icon/Icon.js";
|
|
5
5
|
import { DIAL_KIT_ICON_STROKE as s } from "../constants/icon.js";
|
|
6
|
-
import { DIAL_ICON_SIZE as
|
|
7
|
-
import { mergeClasses as
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
import { DIAL_ICON_SIZE as x } from "../../../constants/icon.js";
|
|
7
|
+
import { mergeClasses as l } from "../../../utils/merge-classes.js";
|
|
8
|
+
import { DIAL_KIT_CLASS as N } from "../../../constants/public-class-names.js";
|
|
9
|
+
const y = ({
|
|
10
|
+
segments: e,
|
|
11
|
+
labelClassName: m = "dial-small-text",
|
|
12
|
+
leafClassName: i = "dial-small-semi-text",
|
|
13
|
+
className: c,
|
|
14
|
+
ariaLabel: d = "Folder path"
|
|
14
15
|
}) => {
|
|
15
|
-
const n = /* @__PURE__ */
|
|
16
|
+
const n = /* @__PURE__ */ r(
|
|
16
17
|
t,
|
|
17
18
|
{
|
|
18
|
-
icon: /* @__PURE__ */
|
|
19
|
-
|
|
19
|
+
icon: /* @__PURE__ */ r(
|
|
20
|
+
I,
|
|
20
21
|
{
|
|
21
|
-
size:
|
|
22
|
+
size: x.SM,
|
|
22
23
|
stroke: s,
|
|
23
24
|
"aria-hidden": "true"
|
|
24
25
|
}
|
|
25
26
|
),
|
|
26
27
|
className: "text-secondary"
|
|
27
28
|
}
|
|
28
|
-
),
|
|
29
|
-
label: a ===
|
|
29
|
+
), p = e.map((o, a) => ({
|
|
30
|
+
label: a === e.length - 1 ? /* @__PURE__ */ r("span", { className: i, children: o }) : o,
|
|
30
31
|
disabled: !0,
|
|
31
32
|
...a === 0 ? { iconBefore: n } : {}
|
|
32
33
|
}));
|
|
33
|
-
return /* @__PURE__ */
|
|
34
|
-
|
|
34
|
+
return /* @__PURE__ */ r(
|
|
35
|
+
h,
|
|
35
36
|
{
|
|
36
|
-
className:
|
|
37
|
-
ariaLabel:
|
|
38
|
-
separator: /* @__PURE__ */
|
|
37
|
+
className: l(c, N.folderPath),
|
|
38
|
+
ariaLabel: d,
|
|
39
|
+
separator: /* @__PURE__ */ r(
|
|
39
40
|
t,
|
|
40
41
|
{
|
|
41
|
-
icon: /* @__PURE__ */
|
|
42
|
-
|
|
42
|
+
icon: /* @__PURE__ */ r(
|
|
43
|
+
f,
|
|
43
44
|
{
|
|
44
45
|
size: 14,
|
|
45
46
|
stroke: s,
|
|
@@ -50,9 +51,9 @@ const F = ({
|
|
|
50
51
|
className: "text-secondary"
|
|
51
52
|
}
|
|
52
53
|
),
|
|
53
|
-
pathItems:
|
|
54
|
-
labelClassName:
|
|
55
|
-
|
|
54
|
+
pathItems: p,
|
|
55
|
+
labelClassName: l(
|
|
56
|
+
m,
|
|
56
57
|
"text-secondary",
|
|
57
58
|
"!cursor-default"
|
|
58
59
|
)
|
|
@@ -60,5 +61,5 @@ const F = ({
|
|
|
60
61
|
);
|
|
61
62
|
};
|
|
62
63
|
export {
|
|
63
|
-
|
|
64
|
+
y as FolderPath
|
|
64
65
|
};
|
|
@@ -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
|
+
N(r),
|
|
20
|
+
m,
|
|
21
|
+
C.highlight
|
|
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,46 +1,48 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { ButtonAppearance as
|
|
3
|
-
import { mergeClasses as
|
|
4
|
-
import { resolveAccessibleName as
|
|
5
|
-
import { ElementSize as
|
|
6
|
-
import { Tooltip as
|
|
7
|
-
import { getButtonClassNames as
|
|
8
|
-
const
|
|
9
|
-
[
|
|
10
|
-
[
|
|
11
|
-
[
|
|
12
|
-
},
|
|
13
|
-
variant:
|
|
14
|
-
appearance:
|
|
15
|
-
size: l =
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { ButtonAppearance as u } from "../../../types/button.js";
|
|
3
|
+
import { mergeClasses as S } from "../../../utils/merge-classes.js";
|
|
4
|
+
import { resolveAccessibleName as f } from "../../../utils/accessible-name.js";
|
|
5
|
+
import { ElementSize as e } from "../../../types/size.js";
|
|
6
|
+
import { Tooltip as g } from "../Tooltip/Tooltip.js";
|
|
7
|
+
import { getButtonClassNames as p, getDisabledButtonProps as C } from "../Button/utils.js";
|
|
8
|
+
const h = {
|
|
9
|
+
[e.Small]: "size-[24px]",
|
|
10
|
+
[e.Standard]: "size-[40px] dial-kit-enhanced-target",
|
|
11
|
+
[e.Large]: "size-[48px] dial-kit-enhanced-target"
|
|
12
|
+
}, I = ({
|
|
13
|
+
variant: i,
|
|
14
|
+
appearance: r = u.Solid,
|
|
15
|
+
size: l = e.Standard,
|
|
16
16
|
className: m,
|
|
17
17
|
icon: s,
|
|
18
|
-
tooltipProps:
|
|
18
|
+
tooltipProps: t,
|
|
19
19
|
type: c = "button",
|
|
20
|
-
|
|
20
|
+
disabled: d,
|
|
21
|
+
...a
|
|
21
22
|
}) => {
|
|
22
|
-
const
|
|
23
|
+
const b = S(
|
|
23
24
|
"dial-kit-base-icon-button dial-kit-base-button",
|
|
24
|
-
|
|
25
|
+
i && p(i, r),
|
|
25
26
|
// 24px is below the AAA target size, so only the larger tiers get the
|
|
26
27
|
// enhanced pointer target — see the accessibility rules in AGENTS.md.
|
|
27
|
-
|
|
28
|
+
h[l],
|
|
28
29
|
m
|
|
29
|
-
),
|
|
30
|
+
), n = /* @__PURE__ */ o(
|
|
30
31
|
"button",
|
|
31
32
|
{
|
|
32
|
-
...
|
|
33
|
+
...a,
|
|
34
|
+
...C(d, t, a.onClick),
|
|
33
35
|
type: c,
|
|
34
|
-
className:
|
|
35
|
-
"aria-label":
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
className: b,
|
|
37
|
+
"aria-label": f(
|
|
38
|
+
a["aria-label"],
|
|
39
|
+
t?.tooltip
|
|
38
40
|
),
|
|
39
41
|
children: s
|
|
40
42
|
}
|
|
41
43
|
);
|
|
42
|
-
return
|
|
44
|
+
return t ? /* @__PURE__ */ o(g, { asChild: !0, ...t, children: n }) : n;
|
|
43
45
|
};
|
|
44
46
|
export {
|
|
45
|
-
|
|
47
|
+
I as IconButton
|
|
46
48
|
};
|
|
@@ -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(
|
|
15
16
|
"text-secondary hover:text-control-accent-hover active:text-control-accent-active",
|
|
16
|
-
"focus-visible:outline focus-visible:outline-focus"
|
|
17
|
+
"focus-visible:outline focus-visible:outline-focus",
|
|
18
|
+
f.infoButton
|
|
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,96 +1,114 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { IconChevronDown as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { Dropdown as
|
|
5
|
-
import { DIAL_KIT_ICON_STROKE as
|
|
6
|
-
import { DIAL_ICON_SIZE as
|
|
7
|
-
import { mergeClasses as
|
|
8
|
-
import { ElementSize as
|
|
9
|
-
|
|
1
|
+
import { jsx as s, jsxs as E } from "react/jsx-runtime";
|
|
2
|
+
import { IconChevronDown as j } from "@tabler/icons-react";
|
|
3
|
+
import { useState as b, useCallback as v, useMemo as w } from "react";
|
|
4
|
+
import { Dropdown as z } from "../Dropdown/Dropdown.js";
|
|
5
|
+
import { DIAL_KIT_ICON_STROKE as M } from "../constants/icon.js";
|
|
6
|
+
import { DIAL_ICON_SIZE as U } from "../../../constants/icon.js";
|
|
7
|
+
import { mergeClasses as I } from "../../../utils/merge-classes.js";
|
|
8
|
+
import { ElementSize as $ } from "../../../types/size.js";
|
|
9
|
+
import { DIAL_KIT_CLASS as R } from "../../../constants/public-class-names.js";
|
|
10
|
+
const Z = ({
|
|
10
11
|
label: e,
|
|
11
|
-
size:
|
|
12
|
+
size: l,
|
|
12
13
|
isOpen: n = !1,
|
|
14
|
+
labelClassName: a,
|
|
15
|
+
className: c,
|
|
13
16
|
"aria-label": t,
|
|
14
|
-
...
|
|
17
|
+
...m
|
|
15
18
|
}) => {
|
|
16
|
-
const
|
|
17
|
-
return /* @__PURE__ */
|
|
19
|
+
const d = l === $.Small ? "h-[32px]" : "h-[40px] dial-kit-enhanced-target";
|
|
20
|
+
return /* @__PURE__ */ E(
|
|
18
21
|
"button",
|
|
19
22
|
{
|
|
20
23
|
type: "button",
|
|
24
|
+
...m,
|
|
21
25
|
"aria-haspopup": "menu",
|
|
22
26
|
"aria-expanded": n,
|
|
23
27
|
"aria-label": t ? `${t} ${e}` : void 0,
|
|
24
|
-
className:
|
|
28
|
+
className: I(
|
|
25
29
|
"dial-small-paragraph-text px-3 focus-visible:outline focus-visible:outline-focus",
|
|
26
30
|
"flex items-center gap-1 rounded-full text-primary disabled:text-control-disable-primary",
|
|
27
31
|
"hover:bg-control-accent-alpha-hover focus-visible:outline-offset-2 active:bg-control-accent-alpha-active",
|
|
28
|
-
|
|
29
|
-
|
|
32
|
+
d,
|
|
33
|
+
c,
|
|
34
|
+
R.inlineSelect
|
|
30
35
|
),
|
|
31
|
-
...r,
|
|
32
36
|
children: [
|
|
33
|
-
e,
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
|
|
37
|
+
/* @__PURE__ */ s("span", { className: a, children: e }),
|
|
38
|
+
/* @__PURE__ */ s(
|
|
39
|
+
j,
|
|
36
40
|
{
|
|
37
|
-
size:
|
|
38
|
-
stroke:
|
|
41
|
+
size: U.MD,
|
|
42
|
+
stroke: M,
|
|
39
43
|
"aria-hidden": !0,
|
|
40
|
-
className:
|
|
44
|
+
className: I("transition-transform", n && "rotate-180")
|
|
41
45
|
}
|
|
42
46
|
)
|
|
43
47
|
]
|
|
44
48
|
}
|
|
45
49
|
);
|
|
46
|
-
},
|
|
50
|
+
}, W = ({
|
|
47
51
|
items: e,
|
|
48
|
-
selectedKey:
|
|
52
|
+
selectedKey: l,
|
|
49
53
|
defaultSelectedKey: n,
|
|
50
|
-
onSelect:
|
|
51
|
-
size:
|
|
52
|
-
disabled:
|
|
53
|
-
placement:
|
|
54
|
-
matchReferenceWidth:
|
|
55
|
-
listClassName:
|
|
56
|
-
|
|
54
|
+
onSelect: a,
|
|
55
|
+
size: c,
|
|
56
|
+
disabled: t,
|
|
57
|
+
placement: m = "bottom-end",
|
|
58
|
+
matchReferenceWidth: d = !1,
|
|
59
|
+
listClassName: C,
|
|
60
|
+
listStyle: S,
|
|
61
|
+
ariaLabel: g,
|
|
62
|
+
triggerClassName: x,
|
|
63
|
+
triggerLabelClassName: N,
|
|
64
|
+
open: p,
|
|
65
|
+
onOpenChange: u
|
|
57
66
|
}) => {
|
|
58
|
-
const [
|
|
67
|
+
const [k, y] = b(!1), r = p !== void 0, O = r ? p : k, _ = v(
|
|
68
|
+
(o) => {
|
|
69
|
+
r || y(o), u?.(o);
|
|
70
|
+
},
|
|
71
|
+
[r, u]
|
|
72
|
+
), [D, K] = b(
|
|
59
73
|
n ?? e[0]?.key
|
|
60
|
-
),
|
|
61
|
-
const o = e.find((i) => i.key ===
|
|
74
|
+
), f = l !== void 0, h = f ? l : D, A = w(() => {
|
|
75
|
+
const o = e.find((i) => i.key === h);
|
|
62
76
|
return o?.label ? String(o.label) : "";
|
|
63
|
-
}, [e,
|
|
77
|
+
}, [e, h]), L = v(
|
|
64
78
|
({ key: o }) => {
|
|
65
|
-
const i = e.find((
|
|
66
|
-
i && (
|
|
79
|
+
const i = e.find((T) => T.key === o);
|
|
80
|
+
i && (f || K(o), a?.(i));
|
|
67
81
|
},
|
|
68
|
-
[e,
|
|
82
|
+
[e, f, a]
|
|
69
83
|
);
|
|
70
|
-
return /* @__PURE__ */
|
|
71
|
-
|
|
84
|
+
return /* @__PURE__ */ s(
|
|
85
|
+
z,
|
|
72
86
|
{
|
|
73
87
|
items: e,
|
|
74
|
-
placement:
|
|
75
|
-
matchReferenceWidth:
|
|
76
|
-
listClassName:
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
88
|
+
placement: m,
|
|
89
|
+
matchReferenceWidth: d,
|
|
90
|
+
listClassName: C,
|
|
91
|
+
listStyle: S,
|
|
92
|
+
disabled: t,
|
|
93
|
+
open: r ? p : void 0,
|
|
94
|
+
onOpenChange: _,
|
|
95
|
+
onItemClick: L,
|
|
96
|
+
children: /* @__PURE__ */ s(
|
|
97
|
+
Z,
|
|
82
98
|
{
|
|
83
|
-
label:
|
|
84
|
-
size:
|
|
85
|
-
isOpen:
|
|
86
|
-
disabled:
|
|
87
|
-
"aria-label":
|
|
99
|
+
label: A,
|
|
100
|
+
size: c,
|
|
101
|
+
isOpen: O,
|
|
102
|
+
disabled: t,
|
|
103
|
+
"aria-label": g,
|
|
104
|
+
className: x,
|
|
105
|
+
labelClassName: N
|
|
88
106
|
}
|
|
89
107
|
)
|
|
90
108
|
}
|
|
91
109
|
);
|
|
92
110
|
};
|
|
93
111
|
export {
|
|
94
|
-
|
|
95
|
-
|
|
112
|
+
W as InlineSelect,
|
|
113
|
+
Z as InlineSelectTrigger
|
|
96
114
|
};
|
|
@@ -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,14 +84,15 @@ 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(
|
|
91
92
|
re,
|
|
92
93
|
C,
|
|
93
|
-
E
|
|
94
|
+
E,
|
|
95
|
+
ie.interactiveTooltip
|
|
94
96
|
),
|
|
95
97
|
children: a
|
|
96
98
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const t = 8, a = 400,
|
|
1
|
+
const t = 8, a = 400, e = "z-interactive-tooltip max-w-[320px] rounded-xl bg-layer-0 p-4 dial-small-text text-primary shadow-md";
|
|
2
2
|
export {
|
|
3
3
|
t as INTERACTIVE_TOOLTIP_GAP,
|
|
4
4
|
a as INTERACTIVE_TOOLTIP_HOVER_OPEN_DELAY,
|
|
5
|
-
|
|
5
|
+
e as interactiveTooltipClassName
|
|
6
6
|
};
|
|
@@ -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
|
+
"flex items-center gap-0.5",
|
|
19
|
+
l,
|
|
20
|
+
f.label
|
|
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
|
};
|