@epam/ai-dial-ui-kit 0.15.0-dev.7 → 0.15.0
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 +56 -2
- package/dist/CHANGELOG.md +86 -0
- package/dist/DateCellRenderer-BdUMSg-E.cjs +1 -0
- package/dist/{DateCellRenderer-4iMidqal.cjs → DateCellRenderer-CZNa4jVJ.cjs} +30 -30
- package/dist/IconButton-DHOFapLo.cjs +1 -0
- package/dist/JsonEditor-Bxui5wJH.cjs +1 -0
- package/dist/{MarkdownEditor-C9-ZMRVi.cjs → MarkdownEditor-BKtFs714.cjs} +1 -1
- package/dist/MarkdownEditor-Bapd1ycU.cjs +1 -0
- package/dist/MarkdownEditorContainer-B5aHwoYF.cjs +1 -0
- package/dist/{Switch-CUKClcEz.cjs → Switch-DE6MrcqJ.cjs} +1 -1
- package/dist/components/Button/constants.js +9 -8
- package/dist/components/Dropdown/Dropdown.js +2 -2
- package/dist/components/Dropdown/DropdownSubMenuItem.js +1 -1
- package/dist/components/Dropdown/constants.js +7 -7
- package/dist/components/DropdownIcon/DropdownIcon.js +4 -4
- 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/MarkdownEditor/MarkdownEditor.js +23 -21
- package/dist/components/MarkdownEditor/MarkdownEditorContainer.js +27 -27
- package/dist/components/New/Accordion/Accordion.js +86 -72
- package/dist/components/New/AutocompleteTagInput/AutocompleteTagInput.js +214 -0
- package/dist/components/New/AutocompleteTagInput/utils.js +11 -0
- package/dist/components/New/Avatar/Avatar.js +70 -0
- package/dist/components/New/Badge/Badge.js +45 -0
- package/dist/components/New/BottomSheet/BottomSheet.js +128 -0
- 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 +103 -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 +27 -18
- package/dist/components/New/Calendar/Calendar.js +6 -6
- package/dist/components/New/Calendar/constants.js +5 -5
- package/dist/components/New/CaptionText/CaptionText.js +3 -3
- package/dist/components/New/CardShell/CardShell.js +2 -2
- package/dist/components/New/Checkbox/Checkbox.js +2 -2
- package/dist/components/New/Checkbox/CheckboxBox.js +2 -2
- package/dist/components/New/CloseButton/CloseButton.js +1 -1
- package/dist/components/New/CollapsibleSidebar/CollapsibleSidebar.js +2 -2
- package/dist/components/New/ConfirmationPopup/ConfirmationPopup.js +21 -25
- package/dist/components/New/ConfirmationPopup/constants.js +8 -11
- package/dist/components/New/Dropdown/Dropdown.js +99 -98
- 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 +2 -2
- package/dist/components/New/EntityIdentity/EntityIdentity.js +135 -0
- package/dist/components/New/FileDropzone/FileDropzone.js +2 -2
- 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 +1 -1
- package/dist/components/New/Grid/constants.js +14 -5
- package/dist/components/New/Highlight/Highlight.js +2 -2
- package/dist/components/New/IconButton/IconButton.js +30 -28
- package/dist/components/New/InfoButton/InfoButton.js +2 -2
- package/dist/components/New/InlineSelect/InlineSelect.js +75 -59
- package/dist/components/New/InteractiveTooltip/InteractiveTooltip.js +70 -66
- package/dist/components/New/InteractiveTooltip/constants.js +2 -2
- package/dist/components/New/Label/Label.js +2 -2
- package/dist/components/New/MarkdownEditor/MarkdownEditor.js +29 -27
- package/dist/components/New/MenuItem/MenuItem.js +2 -2
- package/dist/components/New/MenuItem/constants.js +1 -1
- package/dist/components/New/NoDataContent/NoDataContent.js +2 -2
- package/dist/components/New/Notification/Notification.js +37 -35
- package/dist/components/New/NumberInput/NumberInput.js +2 -2
- package/dist/components/New/PasswordInput/PasswordInput.js +2 -2
- package/dist/components/New/Popup/Popup.js +59 -57
- package/dist/components/New/Popup/constants.js +3 -3
- package/dist/components/New/Radio/Radio.js +2 -2
- package/dist/components/New/RadioGroup/RadioGroup.js +2 -2
- package/dist/components/New/RadioGroupPopupField/RadioGroupPopupField.js +2 -2
- package/dist/components/New/ResizableContainer/ResizableContainer.js +2 -2
- package/dist/components/New/SchemaRenderer/SchemaRenderer.js +164 -0
- package/dist/components/New/SchemaRenderer/components/SchemaAnyOfEditor.js +65 -0
- package/dist/components/New/SchemaRenderer/components/SchemaArrayEditor.js +109 -0
- package/dist/components/New/SchemaRenderer/components/SchemaField.js +83 -0
- package/dist/components/New/SchemaRenderer/components/SchemaFieldContent.js +72 -0
- package/dist/components/New/SchemaRenderer/components/SchemaJsonEditor.js +41 -0
- package/dist/components/New/SchemaRenderer/components/SchemaKeyValueEditor.js +250 -0
- package/dist/components/New/SchemaRenderer/components/SchemaObjectEditor.js +36 -0
- package/dist/components/New/SchemaRenderer/components/SchemaOneOfEditor.js +163 -0
- package/dist/components/New/SchemaRenderer/components/SchemaPrimitiveField.js +150 -0
- package/dist/components/New/SchemaRenderer/components/SchemaSection.js +135 -0
- package/dist/components/New/SchemaRenderer/context.js +17 -0
- package/dist/components/New/Search/Search.js +2 -2
- package/dist/components/New/SegmentedControl/SegmentedControl.js +4 -4
- package/dist/components/New/Select/CollapsedSelectTags.js +127 -0
- package/dist/components/New/Select/MultiSelectTags.js +18 -15
- package/dist/components/New/Select/Select.js +184 -173
- package/dist/components/New/Select/constants.js +23 -20
- package/dist/components/New/SharedEntityIndicator/SharedEntityIndicator.js +34 -0
- package/dist/components/New/SideDrawer/SideDrawer.js +148 -0
- package/dist/components/New/Slider/Slider.js +184 -91
- package/dist/components/New/Slider/utils.js +20 -0
- package/dist/components/New/Switch/Switch.js +2 -2
- package/dist/components/New/Tabs/Tabs.js +124 -66
- package/dist/components/New/Tag/Tag.js +2 -2
- package/dist/components/New/TagInput/TagInput.js +5 -3
- package/dist/components/New/Textarea/Textarea.js +21 -20
- package/dist/components/New/ToggleIconButton/ToggleIconButton.js +2 -2
- package/dist/components/New/Tooltip/TooltipContent.js +2 -2
- 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 +17 -9
- package/dist/components/Popup/constants.js +8 -8
- package/dist/components/ProgressBar/ProgressBar.js +6 -6
- package/dist/components/SchemaRenderer/SchemaRenderer.js +16 -15
- package/dist/components/SchemaRenderer/components/SchemaAdditionalPropertiesEditor.js +46 -31
- package/dist/components/SchemaRenderer/components/SchemaAnyOfEditor.js +2 -2
- package/dist/components/SchemaRenderer/components/SchemaArrayEditor.js +1 -1
- package/dist/components/SchemaRenderer/components/SchemaField.js +23 -23
- package/dist/components/SchemaRenderer/components/SchemaFieldContent.js +19 -19
- package/dist/components/SchemaRenderer/components/SchemaKeyValueEditor.js +223 -135
- package/dist/components/SchemaRenderer/components/SchemaObjectEditor.js +1 -1
- package/dist/components/SchemaRenderer/components/SchemaOneOfEditor.js +13 -13
- package/dist/components/SchemaRenderer/components/SchemaPrimitiveField.js +5 -5
- package/dist/components/Skeleton/Skeleton.js +2 -2
- package/dist/components/Spinner/Spinner.js +2 -2
- package/dist/components/Tooltip/TooltipContent.js +11 -11
- package/dist/components-manifest.json +1873 -78
- package/dist/constants/public-class-names.js +69 -3
- package/dist/constants/schema-renderer.js +33 -0
- package/dist/dial-ui-kit.cjs +2 -2
- package/dist/dial-ui-kit.js +358 -310
- 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-_W6FYhKg.cjs +1 -0
- package/dist/merge-classes-BEJXjzkx.cjs +1 -0
- package/dist/migration-guides/0.15.0/legacy-theme-variable-fallbacks-removal.md +69 -0
- package/dist/migration-guides/0.15.0/slider-redesign.md +110 -0
- package/dist/migration-guides/README.md +2 -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/MarkdownEditor/MarkdownEditor.d.ts +2 -0
- package/dist/src/components/MarkdownEditor/MarkdownEditorContainer.d.ts +2 -0
- package/dist/src/components/New/Accordion/Accordion.d.ts +6 -1
- package/dist/src/components/New/AutocompleteTagInput/AutocompleteTagInput.d.ts +108 -0
- package/dist/src/components/New/AutocompleteTagInput/utils.d.ts +17 -0
- package/dist/src/components/New/AutocompleteTagInput/utils.spec.d.ts +1 -0
- package/dist/src/components/New/Avatar/Avatar.d.ts +55 -0
- package/dist/src/components/New/Badge/Badge.d.ts +47 -0
- package/dist/src/components/New/BottomSheet/BottomSheet.d.ts +84 -0
- 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 +21 -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/constants.d.ts +1 -1
- package/dist/src/components/New/ConfirmationPopup/constants.d.ts +0 -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/EntityIdentity/EntityIdentity.d.ts +85 -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/Grid/constants.d.ts +6 -4
- package/dist/src/components/New/InlineSelect/InlineSelect.d.ts +16 -1
- package/dist/src/components/New/InteractiveTooltip/InteractiveTooltip.d.ts +13 -2
- package/dist/src/components/New/InteractiveTooltip/constants.d.ts +5 -4
- package/dist/src/components/New/MarkdownEditor/MarkdownEditor.d.ts +3 -0
- package/dist/src/components/New/Notification/Notification.d.ts +18 -0
- package/dist/src/components/New/Popup/Popup.d.ts +8 -1
- package/dist/src/components/New/Popup/constants.d.ts +1 -1
- package/dist/src/components/New/SchemaRenderer/SchemaRenderer.d.ts +38 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaAnyOfEditor.d.ts +37 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaArrayEditor.d.ts +35 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaField.d.ts +33 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaFieldContent.d.ts +30 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaJsonEditor.d.ts +29 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaKeyValueEditor.d.ts +37 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaObjectEditor.d.ts +32 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaOneOfEditor.d.ts +39 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaPrimitiveField.d.ts +38 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaSection.d.ts +39 -0
- package/dist/src/components/New/SchemaRenderer/context.d.ts +8 -0
- package/dist/src/components/New/SchemaRenderer/types.d.ts +76 -0
- package/dist/src/components/New/Select/CollapsedSelectTags.d.ts +22 -0
- package/dist/src/components/New/Select/MultiSelectTags.d.ts +5 -0
- package/dist/src/components/New/Select/Select.d.ts +9 -0
- 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/SideDrawer/SideDrawer.d.ts +100 -0
- package/dist/src/components/New/Slider/Slider.d.ts +29 -1
- package/dist/src/components/New/Slider/utils.d.ts +14 -0
- package/dist/src/components/New/Slider/utils.spec.d.ts +1 -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 +5 -82
- package/dist/src/components/SchemaRenderer/utils.d.ts +1 -13
- package/dist/src/constants/public-class-names.d.ts +69 -3
- package/dist/src/constants/schema-renderer.d.ts +2 -0
- package/dist/src/index.d.ts +39 -3
- package/dist/src/models/json-schema.d.ts +71 -0
- package/dist/src/types/accordion.d.ts +7 -0
- package/dist/src/types/avatar.d.ts +7 -0
- package/dist/src/types/badge.d.ts +16 -0
- package/dist/src/types/breadcrumbs.d.ts +9 -0
- package/dist/src/types/button.d.ts +1 -0
- package/dist/src/types/entity-type.d.ts +9 -0
- package/dist/src/types/json-schema.d.ts +22 -0
- package/dist/src/types/tooltip.d.ts +4 -0
- package/dist/src/types/transfer-queue.d.ts +10 -0
- package/dist/src/utils/__tests__/avatar.spec.d.ts +1 -0
- package/dist/src/utils/avatar.d.ts +12 -0
- package/dist/src/utils/json-schema.d.ts +23 -0
- package/dist/src/utils/sub-menu-floating.d.ts +7 -4
- package/dist/types/accordion.js +4 -0
- package/dist/types/avatar.js +4 -0
- package/dist/types/badge.js +5 -0
- package/dist/types/breadcrumbs.js +4 -0
- package/dist/types/button.js +3 -3
- package/dist/types/entity-type.js +4 -0
- package/dist/types/json-schema.js +7 -0
- package/dist/types/tooltip.js +3 -2
- package/dist/types/transfer-queue.js +4 -0
- package/dist/use-file-manager-tabs-Bzzwwcgk.cjs +3 -0
- package/dist/utils/avatar.js +22 -0
- package/dist/{components/SchemaRenderer/utils.js → utils/json-schema.js} +122 -95
- package/dist/utils/merge-classes.js +12 -5
- package/dist/utils/sub-menu-floating.js +99 -54
- package/package.json +4 -9
- package/dist/DateCellRenderer-CTTAnQjB.cjs +0 -1
- package/dist/IconButton-DWqoaBWf.cjs +0 -1
- package/dist/JsonEditor-D2jSlRFi.cjs +0 -1
- package/dist/MarkdownEditor-BzEbdj7R.cjs +0 -1
- package/dist/MarkdownEditorContainer-BvwJjkiZ.cjs +0 -1
- package/dist/components/SchemaRenderer/types.js +0 -27
- package/dist/editor-_174x-qy.cjs +0 -1
- package/dist/lazy-DM-7dL0Y.cjs +0 -1
- package/dist/merge-classes-Dipy1Ih1.cjs +0 -1
- package/dist/use-file-manager-tabs-DKmWaOlC.cjs +0 -3
|
@@ -1,89 +1,113 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { mergeClasses as
|
|
4
|
-
import { DIAL_KIT_CLASS as
|
|
5
|
-
|
|
1
|
+
import { jsx as s, jsxs as I } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as j, useId as R, useCallback as _ } from "react";
|
|
3
|
+
import { mergeClasses as l } from "../../../utils/merge-classes.js";
|
|
4
|
+
import { DIAL_KIT_CLASS as a } from "../../../constants/public-class-names.js";
|
|
5
|
+
import { TabOrientation as u } from "../../../types/tab.js";
|
|
6
|
+
const z = {
|
|
7
|
+
[u.Horizontal]: { next: "ArrowRight", previous: "ArrowLeft" },
|
|
8
|
+
[u.Vertical]: { next: "ArrowDown", previous: "ArrowUp" }
|
|
9
|
+
}, M = ({
|
|
6
10
|
tabs: n,
|
|
7
|
-
activeTabId:
|
|
8
|
-
onTabChange:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
activeTabId: c,
|
|
12
|
+
onTabChange: f,
|
|
13
|
+
orientation: m = u.Horizontal,
|
|
14
|
+
sectionLabel: d,
|
|
15
|
+
ariaLabel: k,
|
|
16
|
+
className: v,
|
|
17
|
+
tabListClassName: D,
|
|
18
|
+
tabClassName: S,
|
|
19
|
+
sectionLabelClassName: H
|
|
12
20
|
}) => {
|
|
13
|
-
const
|
|
21
|
+
const w = j({}), A = R(), i = m === u.Vertical, h = n.find((e) => e.id === c), K = h && !h.disabled ? h.id : n.find((e) => !e.disabled)?.id, V = _(
|
|
14
22
|
(e) => {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
|
|
23
|
+
const { next: t, previous: r } = z[m];
|
|
24
|
+
if (![t, r, "Home", "End"].includes(e.key) || n.length === 0)
|
|
25
|
+
return;
|
|
26
|
+
const o = n.filter((g) => !g.disabled);
|
|
27
|
+
if (o.length === 0) return;
|
|
28
|
+
const p = Math.max(
|
|
29
|
+
o.findIndex((g) => g.id === c),
|
|
20
30
|
0
|
|
21
|
-
),
|
|
22
|
-
let
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
break;
|
|
27
|
-
case "ArrowLeft":
|
|
28
|
-
o = t === 0 ? s : t - 1;
|
|
29
|
-
break;
|
|
30
|
-
case "Home":
|
|
31
|
-
o = 0;
|
|
32
|
-
break;
|
|
33
|
-
case "End":
|
|
34
|
-
o = s;
|
|
35
|
-
break;
|
|
36
|
-
}
|
|
37
|
-
e.preventDefault();
|
|
38
|
-
const d = r[o];
|
|
39
|
-
p.current[d.id]?.focus(), d.id !== i && l(d.id);
|
|
31
|
+
), b = o.length - 1;
|
|
32
|
+
let x = p;
|
|
33
|
+
e.key === t ? x = p === b ? 0 : p + 1 : e.key === r ? x = p === 0 ? b : p - 1 : e.key === "Home" ? x = 0 : x = b, e.preventDefault();
|
|
34
|
+
const y = o[x];
|
|
35
|
+
w.current[y.id]?.focus(), y.id !== c && f(y.id);
|
|
40
36
|
},
|
|
41
|
-
[n,
|
|
42
|
-
)
|
|
43
|
-
return /* @__PURE__ */ u(
|
|
37
|
+
[n, c, f, m]
|
|
38
|
+
), N = /* @__PURE__ */ s(
|
|
44
39
|
"div",
|
|
45
40
|
{
|
|
46
41
|
role: "tablist",
|
|
47
|
-
"aria-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
42
|
+
"aria-orientation": i ? "vertical" : void 0,
|
|
43
|
+
"aria-label": k,
|
|
44
|
+
"aria-labelledby": !k && d ? A : void 0,
|
|
45
|
+
onKeyDown: V,
|
|
46
|
+
className: l(
|
|
47
|
+
i ? "flex flex-col gap-1 px-2" : "flex justify-start gap-1",
|
|
48
|
+
// Without a heading the list is the root, so it takes the caller's
|
|
49
|
+
// classes — and the root kit class below — itself.
|
|
50
|
+
!d && v,
|
|
51
|
+
D,
|
|
52
|
+
a.tabList,
|
|
53
|
+
!d && a.tabs
|
|
53
54
|
),
|
|
54
55
|
children: n.map((e) => {
|
|
55
|
-
const
|
|
56
|
-
return /* @__PURE__ */
|
|
56
|
+
const t = c === e.id, r = !!e.disabled;
|
|
57
|
+
return /* @__PURE__ */ I(
|
|
57
58
|
"button",
|
|
58
59
|
{
|
|
59
|
-
ref: (
|
|
60
|
-
|
|
60
|
+
ref: (o) => {
|
|
61
|
+
w.current[e.id] = o;
|
|
61
62
|
},
|
|
62
63
|
type: "button",
|
|
63
64
|
role: "tab",
|
|
64
|
-
"aria-selected":
|
|
65
|
-
disabled:
|
|
66
|
-
tabIndex: e.id ===
|
|
67
|
-
onClick: () =>
|
|
68
|
-
className:
|
|
69
|
-
|
|
70
|
-
"dial-small-paragraph-semi-text dial-kit-enhanced-target",
|
|
71
|
-
"border-b-2 border-transparent flex items-center gap-2 px-3 py-2 text-start",
|
|
65
|
+
"aria-selected": t,
|
|
66
|
+
disabled: r,
|
|
67
|
+
tabIndex: e.id === K ? 0 : -1,
|
|
68
|
+
onClick: () => f(e.id),
|
|
69
|
+
className: l(
|
|
70
|
+
"dial-kit-enhanced-target flex items-center gap-2 text-start",
|
|
72
71
|
"transition-colors motion-reduce:transition-none",
|
|
73
|
-
"focus-visible:outline focus-visible:outline-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
72
|
+
"focus-visible:outline focus-visible:outline-focus",
|
|
73
|
+
i ? [
|
|
74
|
+
"h-11 w-full rounded-lg px-3 desktop:h-10",
|
|
75
|
+
"focus-visible:-outline-offset-1",
|
|
76
|
+
t ? "dial-small-semi-text" : "dial-small-text text-secondary"
|
|
77
|
+
] : [
|
|
78
|
+
"dial-small-paragraph-semi-text border-b-2 border-transparent px-3 py-2",
|
|
79
|
+
"focus-visible:outline-offset-2"
|
|
80
|
+
],
|
|
81
|
+
r && (i ? "cursor-not-allowed text-control-disable-primary" : "cursor-not-allowed border-control-disable-primary text-control-disable-primary"),
|
|
82
|
+
!r && (i ? t ? "bg-control-accent-alpha text-accent hover:bg-control-accent-alpha-hover" : "hover:bg-control-accent-alpha-hover" : t ? "dial-kit-tab-selected-underline text-primary" : "border-transparent text-secondary"),
|
|
83
|
+
S,
|
|
84
|
+
a.tab,
|
|
85
|
+
t && a.tabSelected
|
|
77
86
|
),
|
|
78
87
|
children: [
|
|
79
|
-
|
|
80
|
-
|
|
88
|
+
e.icon && // The label names the tab, so the icon beside it is decorative —
|
|
89
|
+
// and a Tabler icon is a bare `<svg>` that would otherwise be
|
|
90
|
+
// announced as an unnamed graphic.
|
|
91
|
+
/* @__PURE__ */ s("span", { "aria-hidden": "true", className: "flex shrink-0", children: e.icon }),
|
|
92
|
+
/* @__PURE__ */ s(
|
|
93
|
+
"span",
|
|
94
|
+
{
|
|
95
|
+
className: l(
|
|
96
|
+
i && !t && !r && "text-primary"
|
|
97
|
+
),
|
|
98
|
+
children: e.label
|
|
99
|
+
}
|
|
100
|
+
),
|
|
101
|
+
e.count != null && /* @__PURE__ */ s(
|
|
81
102
|
"span",
|
|
82
103
|
{
|
|
83
|
-
className:
|
|
104
|
+
className: l(
|
|
84
105
|
"dial-tiny-semi-text rounded-full px-1.5 py-0.5",
|
|
85
|
-
|
|
86
|
-
|
|
106
|
+
// In a rail the badge belongs at the far end of the row, not
|
|
107
|
+
// hanging off the label.
|
|
108
|
+
i && "ms-auto",
|
|
109
|
+
r && "bg-layer-sunken text-control-disable-primary",
|
|
110
|
+
!r && (t ? "bg-control-accent-alpha text-accent" : "bg-layer-sunken text-secondary")
|
|
87
111
|
),
|
|
88
112
|
children: e.count
|
|
89
113
|
}
|
|
@@ -95,7 +119,41 @@ const I = ["ArrowRight", "ArrowLeft", "Home", "End"], R = ({
|
|
|
95
119
|
})
|
|
96
120
|
}
|
|
97
121
|
);
|
|
122
|
+
return d ? /* @__PURE__ */ I(
|
|
123
|
+
"div",
|
|
124
|
+
{
|
|
125
|
+
className: l(
|
|
126
|
+
"flex flex-col gap-3",
|
|
127
|
+
v,
|
|
128
|
+
a.tabs
|
|
129
|
+
),
|
|
130
|
+
children: [
|
|
131
|
+
/* @__PURE__ */ s(
|
|
132
|
+
"div",
|
|
133
|
+
{
|
|
134
|
+
className: l(
|
|
135
|
+
"flex h-16 shrink-0 items-center",
|
|
136
|
+
i ? "px-4" : "px-3"
|
|
137
|
+
),
|
|
138
|
+
children: /* @__PURE__ */ s(
|
|
139
|
+
"span",
|
|
140
|
+
{
|
|
141
|
+
id: A,
|
|
142
|
+
className: l(
|
|
143
|
+
"dial-h1-text text-primary",
|
|
144
|
+
H,
|
|
145
|
+
a.tabsSectionLabel
|
|
146
|
+
),
|
|
147
|
+
children: d
|
|
148
|
+
}
|
|
149
|
+
)
|
|
150
|
+
}
|
|
151
|
+
),
|
|
152
|
+
N
|
|
153
|
+
]
|
|
154
|
+
}
|
|
155
|
+
) : N;
|
|
98
156
|
};
|
|
99
157
|
export {
|
|
100
|
-
|
|
158
|
+
M as Tabs
|
|
101
159
|
};
|
|
@@ -37,7 +37,6 @@ const X = ({
|
|
|
37
37
|
onClick: t ? void 0 : n,
|
|
38
38
|
onKeyDown: k,
|
|
39
39
|
className: T(
|
|
40
|
-
E.tag,
|
|
41
40
|
z,
|
|
42
41
|
S ? "dial-tiny-semi-text" : "dial-tiny-text",
|
|
43
42
|
w[l][i ? "selected" : "default"],
|
|
@@ -45,7 +44,8 @@ const X = ({
|
|
|
45
44
|
// colours and only stops responding.
|
|
46
45
|
t && "cursor-not-allowed",
|
|
47
46
|
a && [K, L],
|
|
48
|
-
I
|
|
47
|
+
I,
|
|
48
|
+
E.tag
|
|
49
49
|
),
|
|
50
50
|
children: [
|
|
51
51
|
m && /* @__PURE__ */ r("span", { className: "flex shrink-0 items-center", "aria-hidden": "true", children: m }),
|
|
@@ -177,13 +177,15 @@ const pe = 4, ue = 24, A = (r) => parseFloat(r) || 0, fe = (r) => {
|
|
|
177
177
|
onBlur: te,
|
|
178
178
|
containerClassName: c("w-full", X),
|
|
179
179
|
wrapperClassName: c(
|
|
180
|
-
me.tagInput,
|
|
181
180
|
i > 0 && [
|
|
182
181
|
"!h-auto",
|
|
183
|
-
|
|
182
|
+
// 1px border + 3px + 32px tag + 3px + 1px keeps a one-row field at
|
|
183
|
+
// the 40px of the empty one.
|
|
184
|
+
q ? "min-h-[24px] py-0.5" : "min-h-[40px] py-[3px]",
|
|
184
185
|
s ? "flex-nowrap overflow-hidden" : "flex-wrap"
|
|
185
186
|
],
|
|
186
|
-
|
|
187
|
+
$,
|
|
188
|
+
me.tagInput
|
|
187
189
|
),
|
|
188
190
|
className: c(
|
|
189
191
|
"w-auto flex-1",
|
|
@@ -1,55 +1,56 @@
|
|
|
1
1
|
import { jsxs as i, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import { mergeClasses as n } from "../../../utils/merge-classes.js";
|
|
4
|
-
import { ErrorText as
|
|
5
|
-
import { Label as
|
|
6
|
-
var
|
|
4
|
+
import { ErrorText as v, CaptionText as N } from "../CaptionText/CaptionText.js";
|
|
5
|
+
import { Label as b } from "../Label/Label.js";
|
|
6
|
+
var C = /* @__PURE__ */ ((e) => (e.None = "none", e.Both = "both", e.Horizontal = "horizontal", e.Vertical = "vertical", e))(C || {});
|
|
7
7
|
const s = {
|
|
8
8
|
none: "resize-none",
|
|
9
9
|
both: "resize",
|
|
10
10
|
horizontal: "resize-x",
|
|
11
11
|
vertical: "resize-y"
|
|
12
|
-
},
|
|
12
|
+
}, g = (e) => typeof e == "boolean" ? s[
|
|
13
13
|
e ? "both" : "none"
|
|
14
14
|
/* None */
|
|
15
|
-
] : s[e],
|
|
15
|
+
] : s[e], E = ({
|
|
16
16
|
className: e = "",
|
|
17
17
|
value: m,
|
|
18
18
|
onChange: c,
|
|
19
19
|
error: r,
|
|
20
20
|
containerClassName: x,
|
|
21
|
-
resize:
|
|
22
|
-
labelProps:
|
|
21
|
+
resize: p = !1,
|
|
22
|
+
labelProps: a,
|
|
23
23
|
caption: f,
|
|
24
|
-
id:
|
|
25
|
-
|
|
24
|
+
id: o,
|
|
25
|
+
invalid: d,
|
|
26
|
+
...l
|
|
26
27
|
}) => {
|
|
27
28
|
const h = n(
|
|
28
29
|
"dial-kit-textarea dial-kit-input px-3 py-2",
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
d && "dial-kit-input-error",
|
|
31
|
+
l.disabled && "dial-kit-input-disable",
|
|
32
|
+
g(p),
|
|
32
33
|
e
|
|
33
34
|
);
|
|
34
35
|
return /* @__PURE__ */ i("div", { className: n("flex flex-col gap-2", x), children: [
|
|
35
|
-
|
|
36
|
+
a && /* @__PURE__ */ t(b, { ...a, htmlFor: o }),
|
|
36
37
|
/* @__PURE__ */ i("div", { className: "flex flex-col gap-1", children: [
|
|
37
38
|
/* @__PURE__ */ t(
|
|
38
39
|
"textarea",
|
|
39
40
|
{
|
|
40
|
-
id:
|
|
41
|
+
id: o,
|
|
41
42
|
value: m || "",
|
|
42
43
|
className: h,
|
|
43
|
-
onChange: (
|
|
44
|
-
...
|
|
44
|
+
onChange: (u) => c?.(u.currentTarget.value),
|
|
45
|
+
...l
|
|
45
46
|
}
|
|
46
47
|
),
|
|
47
|
-
/* @__PURE__ */ t(
|
|
48
|
-
!r && /* @__PURE__ */ t(
|
|
48
|
+
/* @__PURE__ */ t(v, { text: r }),
|
|
49
|
+
!r && /* @__PURE__ */ t(N, { text: f })
|
|
49
50
|
] })
|
|
50
51
|
] });
|
|
51
52
|
};
|
|
52
53
|
export {
|
|
53
|
-
|
|
54
|
-
|
|
54
|
+
E as Textarea,
|
|
55
|
+
C as TextareaResize
|
|
55
56
|
};
|
|
@@ -38,14 +38,14 @@ const y = ({
|
|
|
38
38
|
),
|
|
39
39
|
onClick: p,
|
|
40
40
|
className: I(
|
|
41
|
-
v.toggleIconButton,
|
|
42
41
|
"!rounded",
|
|
43
42
|
// The glyph stays 16px at every size tier — only the tint square grows.
|
|
44
43
|
// CSS outranks the width/height attributes Tabler renders, so callers
|
|
45
44
|
// need not pass a size and the two icons can never disagree.
|
|
46
45
|
"[&_svg]:size-4",
|
|
47
46
|
o && "!text-accent",
|
|
48
|
-
c
|
|
47
|
+
c,
|
|
48
|
+
v.toggleIconButton
|
|
49
49
|
)
|
|
50
50
|
}
|
|
51
51
|
);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const t = 7, o = 2, e = 500, r = "fill-control-inverted", s = "z-
|
|
1
|
+
const t = 7, o = 2, e = 500, r = "fill-control-inverted", s = "z-tooltip max-w-[376px] whitespace-pre-wrap break-words rounded-lg bg-control-inverted px-3 py-2 dial-small-text text-control-inverted shadow-xs";
|
|
2
2
|
export {
|
|
3
3
|
o as ARROW_GAP,
|
|
4
4
|
t as ARROW_HEIGHT,
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { jsxs as b, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useState as h, useId as Q, useCallback as m, useEffect as w } from "react";
|
|
3
|
+
import { ConfirmationPopup as D } from "../ConfirmationPopup/ConfirmationPopup.js";
|
|
4
|
+
import { ProgressBar as U } from "../../ProgressBar/ProgressBar.js";
|
|
5
|
+
import { DIAL_KIT_CLASS as F } from "../../../constants/public-class-names.js";
|
|
6
|
+
import { ConfirmationPopupVariant as R } from "../../../types/confirmation-popup.js";
|
|
7
|
+
import { ElementSize as N } from "../../../types/size.js";
|
|
8
|
+
import { TransferQueueItemStatus as l } from "../../../types/transfer-queue.js";
|
|
9
|
+
import { mergeClasses as T } from "../../../utils/merge-classes.js";
|
|
10
|
+
import { DEFAULT_TRANSFER_QUEUE_LABELS as O, TRANSFER_QUEUE_AUTO_CLOSE_DELAY_MS as y } from "./constants.js";
|
|
11
|
+
import { TransferQueueHeader as M } from "./TransferQueueHeader.js";
|
|
12
|
+
import { TransferQueueRow as j } from "./TransferQueueRow.js";
|
|
13
|
+
const q = (n) => Math.round(
|
|
14
|
+
n.reduce(
|
|
15
|
+
(e, r) => e + (r.percent ?? (r.status === l.InProgress ? 0 : 100)),
|
|
16
|
+
0
|
|
17
|
+
) / n.length
|
|
18
|
+
), z = (n, e, r) => n && e ? r.closeConfirmDescriptionMixed : e ? r.closeConfirmDescriptionFailed : r.closeConfirmDescriptionInProgress, ee = ({
|
|
19
|
+
title: n,
|
|
20
|
+
items: e,
|
|
21
|
+
onClose: r,
|
|
22
|
+
onCancelItem: E,
|
|
23
|
+
labels: S,
|
|
24
|
+
autoCloseDelay: i = y,
|
|
25
|
+
className: v,
|
|
26
|
+
bodyClassName: x
|
|
27
|
+
}) => {
|
|
28
|
+
const [c, I] = h(!1), [L, f] = h(!1), p = Q(), s = { ...O, ...S }, d = e.filter(
|
|
29
|
+
(o) => o.status === l.InProgress
|
|
30
|
+
).length, a = d > 0, g = e.filter(
|
|
31
|
+
(o) => o.status === l.Failed
|
|
32
|
+
).length, u = g > 0, C = e.length > 0 && e.every((o) => o.status === l.Success), P = m(() => {
|
|
33
|
+
a || u ? f(!0) : r();
|
|
34
|
+
}, [a, u, r]), A = m(() => {
|
|
35
|
+
f(!1), r();
|
|
36
|
+
}, [r]), _ = m(() => {
|
|
37
|
+
I((o) => !o);
|
|
38
|
+
}, []);
|
|
39
|
+
return w(() => {
|
|
40
|
+
if (!C || i <= 0) return;
|
|
41
|
+
const o = setTimeout(r, i);
|
|
42
|
+
return () => clearTimeout(o);
|
|
43
|
+
}, [C, i, r]), e.length === 0 ? null : /* @__PURE__ */ b(
|
|
44
|
+
"div",
|
|
45
|
+
{
|
|
46
|
+
role: "status",
|
|
47
|
+
"aria-live": "polite",
|
|
48
|
+
className: T(
|
|
49
|
+
"w-[370px] max-w-[calc(100vw-2rem)] rounded-xl bg-layer-raised shadow-md",
|
|
50
|
+
v,
|
|
51
|
+
F.transferQueue
|
|
52
|
+
),
|
|
53
|
+
children: [
|
|
54
|
+
/* @__PURE__ */ t(
|
|
55
|
+
M,
|
|
56
|
+
{
|
|
57
|
+
title: n,
|
|
58
|
+
failedCount: g,
|
|
59
|
+
isCollapsed: c,
|
|
60
|
+
itemsId: p,
|
|
61
|
+
labels: s,
|
|
62
|
+
onToggleCollapse: _,
|
|
63
|
+
onClose: P
|
|
64
|
+
}
|
|
65
|
+
),
|
|
66
|
+
c && a && /*
|
|
67
|
+
* Only while collapsed: expanded, every running row already shows its
|
|
68
|
+
* own spinner, so an aggregate bar would restate what is on screen.
|
|
69
|
+
*/
|
|
70
|
+
/* @__PURE__ */ t(
|
|
71
|
+
U,
|
|
72
|
+
{
|
|
73
|
+
value: q(e),
|
|
74
|
+
size: N.Small,
|
|
75
|
+
"aria-label": s.queueProgressAriaLabel,
|
|
76
|
+
"aria-valuetext": s.queueProgressValueText(
|
|
77
|
+
e.length - d,
|
|
78
|
+
e.length
|
|
79
|
+
)
|
|
80
|
+
}
|
|
81
|
+
),
|
|
82
|
+
!c && /* @__PURE__ */ t(
|
|
83
|
+
"div",
|
|
84
|
+
{
|
|
85
|
+
id: p,
|
|
86
|
+
className: T(
|
|
87
|
+
"flex max-h-[40vh] flex-col overflow-y-auto py-1",
|
|
88
|
+
x
|
|
89
|
+
),
|
|
90
|
+
children: e.map((o) => /* @__PURE__ */ t(
|
|
91
|
+
j,
|
|
92
|
+
{
|
|
93
|
+
item: o,
|
|
94
|
+
labels: s,
|
|
95
|
+
onCancel: E
|
|
96
|
+
},
|
|
97
|
+
o.id
|
|
98
|
+
))
|
|
99
|
+
}
|
|
100
|
+
),
|
|
101
|
+
/* @__PURE__ */ t(
|
|
102
|
+
D,
|
|
103
|
+
{
|
|
104
|
+
open: L,
|
|
105
|
+
header: s.closeConfirmHeader,
|
|
106
|
+
description: z(
|
|
107
|
+
a,
|
|
108
|
+
u,
|
|
109
|
+
s
|
|
110
|
+
),
|
|
111
|
+
confirmLabel: s.closeConfirmLabel,
|
|
112
|
+
cancelLabel: s.closeCancelLabel,
|
|
113
|
+
variant: R.Danger,
|
|
114
|
+
onConfirm: A,
|
|
115
|
+
onClose: () => f(!1)
|
|
116
|
+
}
|
|
117
|
+
)
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
);
|
|
121
|
+
};
|
|
122
|
+
export {
|
|
123
|
+
ee as TransferQueue
|
|
124
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { IconChevronUp as f, IconChevronDown as S, IconX as I } from "@tabler/icons-react";
|
|
3
|
+
import { GhostIconButton as t } from "../IconButton/IconButtonWrappers.js";
|
|
4
|
+
import { DIAL_KIT_ICON_STROKE as o } from "../constants/icon.js";
|
|
5
|
+
import { DIAL_ICON_SIZE as s } from "../../../constants/icon.js";
|
|
6
|
+
import { ElementSize as m } from "../../../types/size.js";
|
|
7
|
+
import { STATUS_SLOT_CLASS as c } from "./constants.js";
|
|
8
|
+
const k = ({
|
|
9
|
+
title: l,
|
|
10
|
+
failedCount: n,
|
|
11
|
+
isCollapsed: r,
|
|
12
|
+
itemsId: p,
|
|
13
|
+
labels: a,
|
|
14
|
+
onToggleCollapse: d,
|
|
15
|
+
onClose: x
|
|
16
|
+
}) => {
|
|
17
|
+
const h = r ? f : S;
|
|
18
|
+
return /* @__PURE__ */ i("div", { className: "mx-4 flex items-center justify-between border-b border-tertiary py-3", children: [
|
|
19
|
+
/* @__PURE__ */ i("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
20
|
+
/* @__PURE__ */ e("span", { className: "dial-small-paragraph-semi-text truncate text-primary", children: l }),
|
|
21
|
+
n > 0 && /*
|
|
22
|
+
* On the filled --bg-control-error swatch, so it takes the on-control
|
|
23
|
+
* token; --text-tertiary would contrast at under 2:1 over that fill.
|
|
24
|
+
*/
|
|
25
|
+
/* @__PURE__ */ e("span", { className: "dial-small-paragraph-semi-text inline-flex h-4 min-w-4 shrink-0 items-center justify-center rounded-full bg-control-error px-1 text-control-permanent", children: n })
|
|
26
|
+
] }),
|
|
27
|
+
/* @__PURE__ */ i("div", { className: "flex shrink-0 items-center gap-1", children: [
|
|
28
|
+
/* @__PURE__ */ e(
|
|
29
|
+
t,
|
|
30
|
+
{
|
|
31
|
+
"aria-label": r ? a.expandAriaLabel : a.collapseAriaLabel,
|
|
32
|
+
"aria-expanded": !r,
|
|
33
|
+
"aria-controls": p,
|
|
34
|
+
size: m.Small,
|
|
35
|
+
icon: /* @__PURE__ */ e(
|
|
36
|
+
h,
|
|
37
|
+
{
|
|
38
|
+
size: s.SM,
|
|
39
|
+
stroke: o,
|
|
40
|
+
className: "text-secondary",
|
|
41
|
+
"aria-hidden": !0
|
|
42
|
+
}
|
|
43
|
+
),
|
|
44
|
+
onClick: d,
|
|
45
|
+
className: c
|
|
46
|
+
}
|
|
47
|
+
),
|
|
48
|
+
/* @__PURE__ */ e(
|
|
49
|
+
t,
|
|
50
|
+
{
|
|
51
|
+
"aria-label": a.closeAriaLabel,
|
|
52
|
+
size: m.Small,
|
|
53
|
+
icon: /* @__PURE__ */ e(
|
|
54
|
+
I,
|
|
55
|
+
{
|
|
56
|
+
size: s.SM,
|
|
57
|
+
stroke: o,
|
|
58
|
+
className: "text-secondary",
|
|
59
|
+
"aria-hidden": !0
|
|
60
|
+
}
|
|
61
|
+
),
|
|
62
|
+
onClick: x,
|
|
63
|
+
className: c
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
] })
|
|
67
|
+
] });
|
|
68
|
+
};
|
|
69
|
+
export {
|
|
70
|
+
k as TransferQueueHeader
|
|
71
|
+
};
|