@epam/ai-dial-ui-kit 0.15.0-dev.3 → 0.15.0-dev.30
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 +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/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,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
|
+
j,
|
|
31
32
|
// A row that opens a panel stays tinted while that panel is up, so the
|
|
32
33
|
// trail back to it is visible once the pointer has moved into it.
|
|
33
34
|
"aria-expanded:bg-control-accent-alpha-hover",
|
|
34
|
-
y &&
|
|
35
|
-
b &&
|
|
36
|
-
a &&
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
y && M,
|
|
36
|
+
b && H,
|
|
37
|
+
a && D,
|
|
38
|
+
u && "text-error",
|
|
39
|
+
d,
|
|
40
|
+
A.menuItem
|
|
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: `shrink-0 ${I.menuItemCheck}`,
|
|
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(
|
|
17
18
|
"flex size-full flex-col items-center justify-center gap-2 text-tertiary",
|
|
18
|
-
n
|
|
19
|
+
n,
|
|
20
|
+
x.noDataContent
|
|
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
|
};
|
|
@@ -1,46 +1,49 @@
|
|
|
1
1
|
import { jsxs as r, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import { DialIcon as
|
|
4
|
-
import { NotificationVariant as
|
|
5
|
-
import { mergeClasses as
|
|
6
|
-
import { CloseButton as
|
|
7
|
-
import { variantIcons as
|
|
2
|
+
import { useMemo as k } from "react";
|
|
3
|
+
import { DialIcon as u } from "../../Icon/Icon.js";
|
|
4
|
+
import { NotificationVariant as c, NotificationType as s } from "../../../types/notification.js";
|
|
5
|
+
import { mergeClasses as d } from "../../../utils/merge-classes.js";
|
|
6
|
+
import { CloseButton as v } from "../CloseButton/CloseButton.js";
|
|
7
|
+
import { variantIcons as I, notificationVariantRoleMap as M, notificationVariantClassNameMap as T, alertBaseClassName as L } from "./constants.js";
|
|
8
|
+
import { DIAL_KIT_CLASS as V } from "../../../constants/public-class-names.js";
|
|
8
9
|
const R = ({
|
|
9
|
-
variant: e =
|
|
10
|
+
variant: e = c.Info,
|
|
10
11
|
type: i = s.Toast,
|
|
11
12
|
title: o,
|
|
12
13
|
message: l,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
action: t,
|
|
15
|
+
className: f,
|
|
16
|
+
iconSize: m = 24,
|
|
17
|
+
iconStroke: n = 2,
|
|
16
18
|
closable: p = !1,
|
|
17
|
-
onClose:
|
|
18
|
-
children:
|
|
19
|
-
textClassName:
|
|
20
|
-
...
|
|
19
|
+
onClose: x,
|
|
20
|
+
children: h,
|
|
21
|
+
textClassName: N,
|
|
22
|
+
...w
|
|
21
23
|
}) => {
|
|
22
|
-
const
|
|
24
|
+
const g = k(() => I({ size: m, stroke: n })[e], [e, m, n]), C = N ?? (i === s.SectionMessage ? "flex-row flex-wrap items-baseline gap-x-1" : "flex-col");
|
|
23
25
|
return /* @__PURE__ */ r(
|
|
24
26
|
"div",
|
|
25
27
|
{
|
|
26
28
|
role: M[e],
|
|
27
|
-
...
|
|
28
|
-
className:
|
|
29
|
-
|
|
29
|
+
...w,
|
|
30
|
+
className: d(
|
|
31
|
+
L,
|
|
30
32
|
T[e],
|
|
31
33
|
i === s.Toast && "min-w-[200px] max-w-[600px] shadow-lg",
|
|
32
|
-
i === s.SectionMessage && e ===
|
|
33
|
-
|
|
34
|
+
i === s.SectionMessage && e === c.Loading && "border-secondary",
|
|
35
|
+
f,
|
|
36
|
+
V.notification
|
|
34
37
|
),
|
|
35
38
|
children: [
|
|
36
39
|
/* @__PURE__ */ r("div", { className: "flex items-start gap-3 flex-1 min-w-0", children: [
|
|
37
|
-
/* @__PURE__ */ a("span", { "aria-hidden": "true", className: "flex shrink-0", children: /* @__PURE__ */ a(
|
|
40
|
+
/* @__PURE__ */ a("span", { "aria-hidden": "true", className: "flex shrink-0", children: /* @__PURE__ */ a(u, { icon: g }) }),
|
|
38
41
|
o ? /* @__PURE__ */ r(
|
|
39
42
|
"div",
|
|
40
43
|
{
|
|
41
|
-
className:
|
|
44
|
+
className: d(
|
|
42
45
|
"flex min-w-0 text-primary break-words",
|
|
43
|
-
|
|
46
|
+
C
|
|
44
47
|
),
|
|
45
48
|
children: [
|
|
46
49
|
/* @__PURE__ */ a("div", { className: "dial-small-paragraph-semi-text min-w-0 break-words", children: o }),
|
|
@@ -49,15 +52,16 @@ const R = ({
|
|
|
49
52
|
}
|
|
50
53
|
) : /* @__PURE__ */ a("div", { className: "dial-small-paragraph-text min-w-0 text-primary break-words", children: l })
|
|
51
54
|
] }),
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
+
t != null && /* @__PURE__ */ a("div", { className: "flex shrink-0 items-center", children: t }),
|
|
56
|
+
h,
|
|
57
|
+
p && /* @__PURE__ */ a(
|
|
58
|
+
v,
|
|
55
59
|
{
|
|
56
|
-
className: "
|
|
60
|
+
className: "shrink-0 self-start",
|
|
57
61
|
ariaLabel: "Close notification",
|
|
58
|
-
onClose: (b) =>
|
|
62
|
+
onClose: (b) => x?.(b)
|
|
59
63
|
}
|
|
60
|
-
)
|
|
64
|
+
)
|
|
61
65
|
]
|
|
62
66
|
}
|
|
63
67
|
);
|
|
@@ -1,41 +1,50 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Input as
|
|
3
|
-
import { handleKeyDown as
|
|
4
|
-
|
|
1
|
+
import { jsx as g } from "react/jsx-runtime";
|
|
2
|
+
import { Input as y } from "../Input/Input.js";
|
|
3
|
+
import { handleKeyDown as N } from "../Input/utils.js";
|
|
4
|
+
import { DIAL_KIT_CLASS as w } from "../../../constants/public-class-names.js";
|
|
5
|
+
import { mergeClasses as h } from "../../../utils/merge-classes.js";
|
|
6
|
+
const I = /^0+\.(\d+)?$/, K = /^0+/, S = [".", "-", "+", "e", "E"], l = (t) => !t || t === "-" ? t : String(t).match(I) ? String(t).replace(K, "0") : Number(t), k = ({
|
|
5
7
|
integer: t,
|
|
6
8
|
onChange: o,
|
|
7
9
|
min: s,
|
|
8
10
|
max: a,
|
|
9
|
-
onKeyDown:
|
|
10
|
-
onPaste:
|
|
11
|
-
...
|
|
12
|
-
}) =>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
y(e, "number", s, a), d?.(e);
|
|
26
|
-
},
|
|
27
|
-
onPaste: (e) => {
|
|
28
|
-
if (t) {
|
|
29
|
-
const c = e.clipboardData.getData("text"), r = c.replace(/\D/g, "");
|
|
30
|
-
if (r !== c && (e.preventDefault(), r)) {
|
|
31
|
-
const n = e.currentTarget, u = n.selectionStart ?? 0, b = n.selectionEnd ?? 0, f = n.value.slice(0, u) + r + n.value.slice(b);
|
|
32
|
-
o?.(l(f));
|
|
33
|
-
}
|
|
11
|
+
onKeyDown: i,
|
|
12
|
+
onPaste: p,
|
|
13
|
+
...c
|
|
14
|
+
}) => {
|
|
15
|
+
const u = (e) => {
|
|
16
|
+
if (t && S.includes(e.key)) {
|
|
17
|
+
e.preventDefault();
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
N(e, "number", s, a), i?.(e);
|
|
21
|
+
}, d = (e) => {
|
|
22
|
+
if (t) {
|
|
23
|
+
const m = e.clipboardData.getData("text"), n = m.replace(/\D/g, "");
|
|
24
|
+
if (n !== m && (e.preventDefault(), n)) {
|
|
25
|
+
const r = e.currentTarget, f = r.selectionStart ?? 0, b = r.selectionEnd ?? 0, D = r.value.slice(0, f) + n + r.value.slice(b);
|
|
26
|
+
o?.(l(D));
|
|
34
27
|
}
|
|
35
|
-
i?.(e);
|
|
36
28
|
}
|
|
37
|
-
|
|
38
|
-
|
|
29
|
+
p?.(e);
|
|
30
|
+
};
|
|
31
|
+
return /* @__PURE__ */ g(
|
|
32
|
+
y,
|
|
33
|
+
{
|
|
34
|
+
...c,
|
|
35
|
+
wrapperClassName: h(
|
|
36
|
+
c.wrapperClassName,
|
|
37
|
+
w.numberInput
|
|
38
|
+
),
|
|
39
|
+
type: "number",
|
|
40
|
+
min: s,
|
|
41
|
+
max: a,
|
|
42
|
+
onChange: (e) => o?.(l(e)),
|
|
43
|
+
onKeyDown: u,
|
|
44
|
+
onPaste: d
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
};
|
|
39
48
|
export {
|
|
40
|
-
|
|
49
|
+
k as NumberInput
|
|
41
50
|
};
|
|
@@ -1,55 +1,61 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { IconEyeOff as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { GhostIconButton as
|
|
5
|
-
import { Input as
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { IconEyeOff as c, IconEye as l } from "@tabler/icons-react";
|
|
3
|
+
import { useState as u, useEffect as w } from "react";
|
|
4
|
+
import { GhostIconButton as d } from "../IconButton/IconButtonWrappers.js";
|
|
5
|
+
import { Input as C } from "../Input/Input.js";
|
|
6
6
|
import { DIAL_KIT_ICON_STROKE as i } from "../constants/icon.js";
|
|
7
|
-
import { DIAL_ICON_SIZE as
|
|
8
|
-
import { ElementSize as
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
import { DIAL_ICON_SIZE as m } from "../../../constants/icon.js";
|
|
8
|
+
import { ElementSize as a } from "../../../types/size.js";
|
|
9
|
+
import { DIAL_KIT_CLASS as _ } from "../../../constants/public-class-names.js";
|
|
10
|
+
import { mergeClasses as E } from "../../../utils/merge-classes.js";
|
|
11
|
+
const K = ({
|
|
12
|
+
showPasswordLabel: p = "Show password",
|
|
13
|
+
hidePasswordLabel: f = "Hide password",
|
|
14
|
+
disabled: r,
|
|
15
|
+
size: n = a.Standard,
|
|
16
|
+
...t
|
|
15
17
|
}) => {
|
|
16
|
-
const [I,
|
|
17
|
-
return
|
|
18
|
-
|
|
19
|
-
}, [
|
|
20
|
-
|
|
18
|
+
const [I, s] = u(!1), o = I && !r;
|
|
19
|
+
return w(() => {
|
|
20
|
+
r && s(!1);
|
|
21
|
+
}, [r]), /* @__PURE__ */ e(
|
|
22
|
+
C,
|
|
21
23
|
{
|
|
22
|
-
...
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
...t,
|
|
25
|
+
wrapperClassName: E(
|
|
26
|
+
t.wrapperClassName,
|
|
27
|
+
_.passwordInput
|
|
28
|
+
),
|
|
29
|
+
size: n,
|
|
30
|
+
disabled: r,
|
|
31
|
+
type: o ? "text" : "password",
|
|
32
|
+
iconAfter: r ? void 0 : /* @__PURE__ */ e(
|
|
33
|
+
d,
|
|
28
34
|
{
|
|
29
|
-
size:
|
|
30
|
-
"aria-label":
|
|
31
|
-
"aria-pressed":
|
|
32
|
-
icon:
|
|
33
|
-
|
|
35
|
+
size: a.Small,
|
|
36
|
+
"aria-label": o ? f : p,
|
|
37
|
+
"aria-pressed": o,
|
|
38
|
+
icon: o ? /* @__PURE__ */ e(
|
|
39
|
+
c,
|
|
34
40
|
{
|
|
35
|
-
size:
|
|
41
|
+
size: m.SM,
|
|
36
42
|
stroke: i,
|
|
37
43
|
"aria-hidden": "true"
|
|
38
44
|
}
|
|
39
|
-
) : /* @__PURE__ */
|
|
40
|
-
|
|
45
|
+
) : /* @__PURE__ */ e(
|
|
46
|
+
l,
|
|
41
47
|
{
|
|
42
|
-
size:
|
|
48
|
+
size: m.SM,
|
|
43
49
|
stroke: i,
|
|
44
50
|
"aria-hidden": "true"
|
|
45
51
|
}
|
|
46
52
|
),
|
|
47
|
-
onClick: () =>
|
|
53
|
+
onClick: () => s((S) => !S)
|
|
48
54
|
}
|
|
49
55
|
)
|
|
50
56
|
}
|
|
51
57
|
);
|
|
52
58
|
};
|
|
53
59
|
export {
|
|
54
|
-
|
|
60
|
+
K as PasswordInput
|
|
55
61
|
};
|
|
@@ -7,57 +7,58 @@ import { GhostIconButton as ie } from "../IconButton/IconButtonWrappers.js";
|
|
|
7
7
|
import { Tooltip as le } from "../Tooltip/Tooltip.js";
|
|
8
8
|
import { DIAL_KIT_ICON_STROKE as te } from "../constants/icon.js";
|
|
9
9
|
import { DIAL_ICON_SIZE as ne } from "../../../constants/icon.js";
|
|
10
|
-
import { ButtonVariant as
|
|
11
|
-
import { PopupSize as
|
|
10
|
+
import { ButtonVariant as pe } from "../../../types/button.js";
|
|
11
|
+
import { PopupSize as me } from "../../../types/popup.js";
|
|
12
12
|
import { ElementSize as ce } from "../../../types/size.js";
|
|
13
13
|
import { useThemeScope as de } from "../ThemeScope/ThemeScope.js";
|
|
14
14
|
import { mergeClasses as r } from "../../../utils/merge-classes.js";
|
|
15
15
|
import { IconChevronLeft as ue } from "@tabler/icons-react";
|
|
16
|
-
import { popupActionsGroupClassName as l, popupHeaderDividerClassName as fe, popupHeaderClassName as ge, popupSizeClassMap as he, popupBaseClassName as Ne, popupOverlayBaseClassName as
|
|
17
|
-
|
|
16
|
+
import { popupActionsGroupClassName as l, popupHeaderDividerClassName as fe, popupHeaderClassName as ge, popupSizeClassMap as he, popupBaseClassName as Ne, popupOverlayBaseClassName as Ce, popupTitleClassName as ve, popupFooterDividerClassName as Ie, popupFooterClassName as Fe } from "./constants.js";
|
|
17
|
+
import { DIAL_KIT_CLASS as Se } from "../../../constants/public-class-names.js";
|
|
18
|
+
const $e = ({
|
|
18
19
|
open: t = !1,
|
|
19
20
|
header: n,
|
|
20
21
|
ariaLabel: F,
|
|
21
22
|
portalId: S,
|
|
22
23
|
className: x,
|
|
23
|
-
overlayClassName:
|
|
24
|
-
titleClassName:
|
|
25
|
-
headerClassName:
|
|
26
|
-
bodyClassName:
|
|
27
|
-
children:
|
|
28
|
-
footer:
|
|
29
|
-
footerClassName:
|
|
30
|
-
onClose:
|
|
24
|
+
overlayClassName: T,
|
|
25
|
+
titleClassName: _,
|
|
26
|
+
headerClassName: b,
|
|
27
|
+
bodyClassName: z,
|
|
28
|
+
children: D,
|
|
29
|
+
footer: p,
|
|
30
|
+
footerClassName: y,
|
|
31
|
+
onClose: m,
|
|
31
32
|
onBack: c,
|
|
32
|
-
backAriaLabel:
|
|
33
|
+
backAriaLabel: B = "Back",
|
|
33
34
|
headerActions: d,
|
|
34
|
-
headerDivider:
|
|
35
|
+
headerDivider: L = !1,
|
|
35
36
|
mainButtons: u,
|
|
36
37
|
additionalButtons: f,
|
|
37
38
|
additionalButtonsOnLeft: g = !1,
|
|
38
|
-
footerDivider:
|
|
39
|
-
size:
|
|
40
|
-
hideClose:
|
|
41
|
-
closeAriaLabel:
|
|
42
|
-
closeOnOutsideClick:
|
|
39
|
+
footerDivider: P = !1,
|
|
40
|
+
size: A = me.Md,
|
|
41
|
+
hideClose: M = !1,
|
|
42
|
+
closeAriaLabel: R = "Close dialog",
|
|
43
|
+
closeOnOutsideClick: w = !0,
|
|
43
44
|
preventKeyboardOnOpen: h = !1
|
|
44
45
|
}) => {
|
|
45
|
-
const
|
|
46
|
+
const E = de(), N = oe(null), G = re(), { refs: C, context: a } = J({
|
|
46
47
|
open: t,
|
|
47
48
|
onOpenChange: (e) => {
|
|
48
|
-
e ||
|
|
49
|
+
e || m?.(null);
|
|
49
50
|
}
|
|
50
|
-
}),
|
|
51
|
+
}), O = Q(a, { role: "dialog" }), $ = U(a, { outsidePress: w }), { getFloatingProps: j } = W([O, $]);
|
|
51
52
|
if (!t) return null;
|
|
52
|
-
const i = typeof n == "string" ? `popup-heading-${
|
|
53
|
+
const i = typeof n == "string" ? `popup-heading-${G}` : void 0, k = (e) => e ? typeof e == "string" ? /* @__PURE__ */ o(
|
|
53
54
|
"h2",
|
|
54
55
|
{
|
|
55
56
|
id: i,
|
|
56
|
-
className: r(
|
|
57
|
+
className: r(ve, _),
|
|
57
58
|
children: /* @__PURE__ */ o(le, { tooltip: e, triggerClassName: "truncate", children: e })
|
|
58
59
|
}
|
|
59
|
-
) : e : /* @__PURE__ */ o("span", {}),
|
|
60
|
-
if (
|
|
60
|
+
) : e : /* @__PURE__ */ o("span", {}), v = M ? null : /* @__PURE__ */ o(ae, { ariaLabel: R, onClose: (e) => m?.(e) }), I = (e, K = []) => K.map(({ variant: V = pe.Neutral, ...Z }, q) => /* @__PURE__ */ o(se, { variant: V, ...Z }, `${e}-${q}`)), H = () => {
|
|
61
|
+
if (p !== void 0) return p;
|
|
61
62
|
if (!u?.length && !f?.length) return null;
|
|
62
63
|
const e = I("additional", f);
|
|
63
64
|
return /* @__PURE__ */ s(
|
|
@@ -65,8 +66,8 @@ const Oe = ({
|
|
|
65
66
|
{
|
|
66
67
|
className: r(
|
|
67
68
|
Fe,
|
|
68
|
-
|
|
69
|
-
|
|
69
|
+
P && Ie,
|
|
70
|
+
y
|
|
70
71
|
),
|
|
71
72
|
children: [
|
|
72
73
|
g && e.length > 0 && /* @__PURE__ */ o("div", { className: l, children: e }),
|
|
@@ -82,28 +83,29 @@ const Oe = ({
|
|
|
82
83
|
Y,
|
|
83
84
|
{
|
|
84
85
|
className: r(
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
Ce,
|
|
87
|
+
E,
|
|
88
|
+
T
|
|
88
89
|
),
|
|
89
90
|
children: /* @__PURE__ */ o(
|
|
90
91
|
ee,
|
|
91
92
|
{
|
|
92
93
|
context: a,
|
|
93
|
-
initialFocus: h ? N :
|
|
94
|
+
initialFocus: h ? N : C.floating,
|
|
94
95
|
children: /* @__PURE__ */ s(
|
|
95
96
|
"div",
|
|
96
97
|
{
|
|
97
|
-
ref:
|
|
98
|
-
...
|
|
98
|
+
ref: C.setFloating,
|
|
99
|
+
...j(),
|
|
99
100
|
role: "dialog",
|
|
100
101
|
"aria-modal": "true",
|
|
101
102
|
"aria-labelledby": i,
|
|
102
103
|
"aria-label": i ? void 0 : F,
|
|
103
104
|
className: r(
|
|
104
105
|
Ne,
|
|
105
|
-
he[
|
|
106
|
-
x
|
|
106
|
+
he[A],
|
|
107
|
+
x,
|
|
108
|
+
Se.popup
|
|
107
109
|
),
|
|
108
110
|
children: [
|
|
109
111
|
h && /* @__PURE__ */ o(
|
|
@@ -120,14 +122,14 @@ const Oe = ({
|
|
|
120
122
|
{
|
|
121
123
|
className: r(
|
|
122
124
|
ge,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
+
L && fe,
|
|
126
|
+
b
|
|
125
127
|
),
|
|
126
128
|
children: [
|
|
127
129
|
c && /* @__PURE__ */ o(
|
|
128
130
|
ie,
|
|
129
131
|
{
|
|
130
|
-
"aria-label":
|
|
132
|
+
"aria-label": B,
|
|
131
133
|
size: ce.Small,
|
|
132
134
|
className: "mr-2",
|
|
133
135
|
onClick: c,
|
|
@@ -141,15 +143,15 @@ const Oe = ({
|
|
|
141
143
|
)
|
|
142
144
|
}
|
|
143
145
|
),
|
|
144
|
-
|
|
146
|
+
k(n),
|
|
145
147
|
d ? /* @__PURE__ */ s("div", { className: l, children: [
|
|
146
148
|
d,
|
|
147
|
-
|
|
148
|
-
] }) :
|
|
149
|
+
v
|
|
150
|
+
] }) : v
|
|
149
151
|
]
|
|
150
152
|
}
|
|
151
153
|
),
|
|
152
|
-
/* @__PURE__ */ o("div", { className: r("grow overflow-auto",
|
|
154
|
+
/* @__PURE__ */ o("div", { className: r("grow overflow-auto", z), children: D }),
|
|
153
155
|
H()
|
|
154
156
|
]
|
|
155
157
|
}
|
|
@@ -160,5 +162,5 @@ const Oe = ({
|
|
|
160
162
|
) });
|
|
161
163
|
};
|
|
162
164
|
export {
|
|
163
|
-
|
|
165
|
+
$e as Popup
|
|
164
166
|
};
|