@epam/ai-dial-ui-kit 0.15.0-dev.9 → 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.
Files changed (250) hide show
  1. package/README.md +55 -2
  2. package/dist/CHANGELOG.md +84 -0
  3. package/dist/DateCellRenderer-BdUMSg-E.cjs +1 -0
  4. package/dist/{DateCellRenderer-Bu40QyHE.cjs → DateCellRenderer-CZNa4jVJ.cjs} +30 -30
  5. package/dist/IconButton-DHOFapLo.cjs +1 -0
  6. package/dist/{JsonEditor-qv1Z0dLX.cjs → JsonEditor-Bxui5wJH.cjs} +1 -1
  7. package/dist/{MarkdownEditor-DHn2pYOJ.cjs → MarkdownEditor-BKtFs714.cjs} +1 -1
  8. package/dist/MarkdownEditor-Bapd1ycU.cjs +1 -0
  9. package/dist/MarkdownEditorContainer-B5aHwoYF.cjs +1 -0
  10. package/dist/{Switch-CUKClcEz.cjs → Switch-DE6MrcqJ.cjs} +1 -1
  11. package/dist/components/Button/constants.js +9 -8
  12. package/dist/components/Dropdown/Dropdown.js +2 -2
  13. package/dist/components/Dropdown/DropdownSubMenuItem.js +1 -1
  14. package/dist/components/Dropdown/constants.js +7 -7
  15. package/dist/components/DropdownIcon/DropdownIcon.js +4 -4
  16. package/dist/components/FileManager/FileManager.js +373 -372
  17. package/dist/components/FileManager/FileManagerProvider.js +266 -264
  18. package/dist/components/FileManager/hooks/use-grid-context-menu.js +59 -59
  19. package/dist/components/MarkdownEditor/MarkdownEditor.js +23 -21
  20. package/dist/components/MarkdownEditor/MarkdownEditorContainer.js +27 -25
  21. package/dist/components/New/Accordion/Accordion.js +86 -72
  22. package/dist/components/New/AutocompleteTagInput/AutocompleteTagInput.js +214 -0
  23. package/dist/components/New/AutocompleteTagInput/utils.js +11 -0
  24. package/dist/components/New/Avatar/Avatar.js +70 -0
  25. package/dist/components/New/Badge/Badge.js +45 -0
  26. package/dist/components/New/BottomSheet/BottomSheet.js +128 -0
  27. package/dist/components/New/Breadcrumbs/Breadcrumbs.js +159 -0
  28. package/dist/components/New/Breadcrumbs/constants.js +41 -0
  29. package/dist/components/New/Button/Button.js +32 -32
  30. package/dist/components/New/Button/ButtonWrappers.js +103 -37
  31. package/dist/components/New/Button/constants.js +3 -0
  32. package/dist/components/New/Button/utils.js +18 -8
  33. package/dist/components/New/ButtonDropdown/ButtonDropdown.js +27 -18
  34. package/dist/components/New/Calendar/Calendar.js +6 -6
  35. package/dist/components/New/Calendar/constants.js +5 -5
  36. package/dist/components/New/CaptionText/CaptionText.js +3 -3
  37. package/dist/components/New/CardShell/CardShell.js +2 -2
  38. package/dist/components/New/Checkbox/Checkbox.js +2 -2
  39. package/dist/components/New/Checkbox/CheckboxBox.js +2 -2
  40. package/dist/components/New/CloseButton/CloseButton.js +1 -1
  41. package/dist/components/New/CollapsibleSidebar/CollapsibleSidebar.js +2 -2
  42. package/dist/components/New/ConfirmationPopup/ConfirmationPopup.js +21 -25
  43. package/dist/components/New/ConfirmationPopup/constants.js +8 -11
  44. package/dist/components/New/Dropdown/Dropdown.js +99 -98
  45. package/dist/components/New/Dropdown/DropdownSubMenuItem.js +17 -17
  46. package/dist/components/New/Dropdown/constants.js +22 -17
  47. package/dist/components/New/EllipsisTooltip/EllipsisTooltip.js +2 -2
  48. package/dist/components/New/EntityIdentity/EntityIdentity.js +135 -0
  49. package/dist/components/New/FileDropzone/FileDropzone.js +2 -2
  50. package/dist/components/New/FileIcon/FileIcon.js +55 -0
  51. package/dist/components/New/FileIcon/constants.js +134 -0
  52. package/dist/components/New/FileIcon/icons/FileGlyph.js +150 -0
  53. package/dist/components/New/FileIcon/icons/FolderGlyph.js +50 -0
  54. package/dist/components/New/FileName/FileName.js +78 -0
  55. package/dist/components/New/FilterChips/FilterChips.js +2 -2
  56. package/dist/components/New/FolderName/FolderName.js +16 -0
  57. package/dist/components/New/FolderPath/FolderPath.js +1 -1
  58. package/dist/components/New/Grid/constants.js +14 -5
  59. package/dist/components/New/Highlight/Highlight.js +2 -2
  60. package/dist/components/New/IconButton/IconButton.js +30 -28
  61. package/dist/components/New/InfoButton/InfoButton.js +2 -2
  62. package/dist/components/New/InlineSelect/InlineSelect.js +75 -59
  63. package/dist/components/New/InteractiveTooltip/InteractiveTooltip.js +70 -66
  64. package/dist/components/New/InteractiveTooltip/constants.js +2 -2
  65. package/dist/components/New/Label/Label.js +2 -2
  66. package/dist/components/New/MarkdownEditor/MarkdownEditor.js +29 -27
  67. package/dist/components/New/MenuItem/MenuItem.js +2 -2
  68. package/dist/components/New/MenuItem/constants.js +1 -1
  69. package/dist/components/New/NoDataContent/NoDataContent.js +2 -2
  70. package/dist/components/New/Notification/Notification.js +37 -35
  71. package/dist/components/New/NumberInput/NumberInput.js +2 -2
  72. package/dist/components/New/PasswordInput/PasswordInput.js +2 -2
  73. package/dist/components/New/Popup/Popup.js +59 -57
  74. package/dist/components/New/Popup/constants.js +3 -3
  75. package/dist/components/New/Radio/Radio.js +2 -2
  76. package/dist/components/New/RadioGroup/RadioGroup.js +2 -2
  77. package/dist/components/New/RadioGroupPopupField/RadioGroupPopupField.js +2 -2
  78. package/dist/components/New/ResizableContainer/ResizableContainer.js +2 -2
  79. package/dist/components/New/SchemaRenderer/SchemaRenderer.js +164 -0
  80. package/dist/components/New/SchemaRenderer/components/SchemaAnyOfEditor.js +65 -0
  81. package/dist/components/New/SchemaRenderer/components/SchemaArrayEditor.js +109 -0
  82. package/dist/components/New/SchemaRenderer/components/SchemaField.js +83 -0
  83. package/dist/components/New/SchemaRenderer/components/SchemaFieldContent.js +72 -0
  84. package/dist/components/New/SchemaRenderer/components/SchemaJsonEditor.js +41 -0
  85. package/dist/components/New/SchemaRenderer/components/SchemaKeyValueEditor.js +250 -0
  86. package/dist/components/New/SchemaRenderer/components/SchemaObjectEditor.js +36 -0
  87. package/dist/components/New/SchemaRenderer/components/SchemaOneOfEditor.js +163 -0
  88. package/dist/components/New/SchemaRenderer/components/SchemaPrimitiveField.js +150 -0
  89. package/dist/components/New/SchemaRenderer/components/SchemaSection.js +135 -0
  90. package/dist/components/New/SchemaRenderer/context.js +17 -0
  91. package/dist/components/New/Search/Search.js +2 -2
  92. package/dist/components/New/SegmentedControl/SegmentedControl.js +4 -4
  93. package/dist/components/New/Select/CollapsedSelectTags.js +127 -0
  94. package/dist/components/New/Select/MultiSelectTags.js +18 -15
  95. package/dist/components/New/Select/Select.js +184 -173
  96. package/dist/components/New/Select/constants.js +23 -20
  97. package/dist/components/New/SharedEntityIndicator/SharedEntityIndicator.js +34 -0
  98. package/dist/components/New/SideDrawer/SideDrawer.js +148 -0
  99. package/dist/components/New/Slider/Slider.js +184 -91
  100. package/dist/components/New/Slider/utils.js +20 -0
  101. package/dist/components/New/Switch/Switch.js +2 -2
  102. package/dist/components/New/Tabs/Tabs.js +124 -66
  103. package/dist/components/New/Tag/Tag.js +2 -2
  104. package/dist/components/New/TagInput/TagInput.js +5 -3
  105. package/dist/components/New/Textarea/Textarea.js +21 -20
  106. package/dist/components/New/ToggleIconButton/ToggleIconButton.js +2 -2
  107. package/dist/components/New/Tooltip/TooltipContent.js +2 -2
  108. package/dist/components/New/Tooltip/constants.js +1 -1
  109. package/dist/components/New/TransferQueue/TransferQueue.js +124 -0
  110. package/dist/components/New/TransferQueue/TransferQueueHeader.js +71 -0
  111. package/dist/components/New/TransferQueue/TransferQueueRow.js +119 -0
  112. package/dist/components/New/TransferQueue/constants.js +24 -0
  113. package/dist/components/New/constants/overlay.js +17 -9
  114. package/dist/components/Popup/constants.js +8 -8
  115. package/dist/components/ProgressBar/ProgressBar.js +6 -6
  116. package/dist/components/SchemaRenderer/SchemaRenderer.js +16 -15
  117. package/dist/components/SchemaRenderer/components/SchemaAnyOfEditor.js +2 -2
  118. package/dist/components/SchemaRenderer/components/SchemaArrayEditor.js +1 -1
  119. package/dist/components/SchemaRenderer/components/SchemaField.js +23 -23
  120. package/dist/components/SchemaRenderer/components/SchemaFieldContent.js +19 -19
  121. package/dist/components/SchemaRenderer/components/SchemaKeyValueEditor.js +2 -2
  122. package/dist/components/SchemaRenderer/components/SchemaObjectEditor.js +1 -1
  123. package/dist/components/SchemaRenderer/components/SchemaOneOfEditor.js +13 -13
  124. package/dist/components/SchemaRenderer/components/SchemaPrimitiveField.js +5 -5
  125. package/dist/components/Skeleton/Skeleton.js +2 -2
  126. package/dist/components/Spinner/Spinner.js +2 -2
  127. package/dist/components/Tooltip/TooltipContent.js +11 -11
  128. package/dist/components-manifest.json +1826 -109
  129. package/dist/constants/public-class-names.js +64 -3
  130. package/dist/{components/SchemaRenderer/types.js → constants/schema-renderer.js} +2 -7
  131. package/dist/dial-ui-kit.cjs +2 -2
  132. package/dist/dial-ui-kit.js +357 -311
  133. package/dist/editors.cjs +1 -1
  134. package/dist/file-manager.cjs +1 -1
  135. package/dist/grid.cjs +1 -1
  136. package/dist/index.css +2 -2
  137. package/dist/lazy-_W6FYhKg.cjs +1 -0
  138. package/dist/merge-classes-BEJXjzkx.cjs +1 -0
  139. package/dist/migration-guides/0.15.0/legacy-theme-variable-fallbacks-removal.md +69 -0
  140. package/dist/migration-guides/0.15.0/slider-redesign.md +110 -0
  141. package/dist/migration-guides/README.md +2 -0
  142. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +419 -399
  143. package/dist/src/components/FileManager/FileManager.d.ts +2 -0
  144. package/dist/src/components/FileManager/FileManagerContext.d.ts +1 -0
  145. package/dist/src/components/FileManager/hooks/use-grid-context-menu.d.ts +2 -1
  146. package/dist/src/components/MarkdownEditor/MarkdownEditor.d.ts +2 -0
  147. package/dist/src/components/MarkdownEditor/MarkdownEditorContainer.d.ts +2 -0
  148. package/dist/src/components/New/Accordion/Accordion.d.ts +6 -1
  149. package/dist/src/components/New/AutocompleteTagInput/AutocompleteTagInput.d.ts +108 -0
  150. package/dist/src/components/New/AutocompleteTagInput/utils.d.ts +17 -0
  151. package/dist/src/components/New/AutocompleteTagInput/utils.spec.d.ts +1 -0
  152. package/dist/src/components/New/Avatar/Avatar.d.ts +55 -0
  153. package/dist/src/components/New/Badge/Badge.d.ts +47 -0
  154. package/dist/src/components/New/BottomSheet/BottomSheet.d.ts +84 -0
  155. package/dist/src/components/New/Breadcrumbs/Breadcrumbs.d.ts +94 -0
  156. package/dist/src/components/New/Breadcrumbs/constants.d.ts +60 -0
  157. package/dist/src/components/New/Button/Button.d.ts +4 -1
  158. package/dist/src/components/New/Button/ButtonWrappers.d.ts +21 -0
  159. package/dist/src/components/New/Button/utils.d.ts +15 -0
  160. package/dist/src/components/New/ButtonDropdown/ButtonDropdown.d.ts +4 -0
  161. package/dist/src/components/New/Calendar/constants.d.ts +1 -1
  162. package/dist/src/components/New/ConfirmationPopup/constants.d.ts +0 -1
  163. package/dist/src/components/New/Dropdown/Dropdown.d.ts +9 -1
  164. package/dist/src/components/New/Dropdown/constants.d.ts +3 -0
  165. package/dist/src/components/New/EntityIdentity/EntityIdentity.d.ts +85 -0
  166. package/dist/src/components/New/FileIcon/FileIcon.d.ts +61 -0
  167. package/dist/src/components/New/FileIcon/constants.d.ts +16 -0
  168. package/dist/src/components/New/FileIcon/icons/FileGlyph.d.ts +18 -0
  169. package/dist/src/components/New/FileIcon/icons/FolderGlyph.d.ts +17 -0
  170. package/dist/src/components/New/FileName/FileName.d.ts +79 -0
  171. package/dist/src/components/New/FolderName/FolderName.d.ts +37 -0
  172. package/dist/src/components/New/Grid/constants.d.ts +6 -4
  173. package/dist/src/components/New/InlineSelect/InlineSelect.d.ts +16 -1
  174. package/dist/src/components/New/InteractiveTooltip/InteractiveTooltip.d.ts +13 -2
  175. package/dist/src/components/New/InteractiveTooltip/constants.d.ts +5 -4
  176. package/dist/src/components/New/MarkdownEditor/MarkdownEditor.d.ts +3 -0
  177. package/dist/src/components/New/Notification/Notification.d.ts +18 -0
  178. package/dist/src/components/New/Popup/Popup.d.ts +8 -1
  179. package/dist/src/components/New/Popup/constants.d.ts +1 -1
  180. package/dist/src/components/New/SchemaRenderer/SchemaRenderer.d.ts +38 -0
  181. package/dist/src/components/New/SchemaRenderer/components/SchemaAnyOfEditor.d.ts +37 -0
  182. package/dist/src/components/New/SchemaRenderer/components/SchemaArrayEditor.d.ts +35 -0
  183. package/dist/src/components/New/SchemaRenderer/components/SchemaField.d.ts +33 -0
  184. package/dist/src/components/New/SchemaRenderer/components/SchemaFieldContent.d.ts +30 -0
  185. package/dist/src/components/New/SchemaRenderer/components/SchemaJsonEditor.d.ts +29 -0
  186. package/dist/src/components/New/SchemaRenderer/components/SchemaKeyValueEditor.d.ts +37 -0
  187. package/dist/src/components/New/SchemaRenderer/components/SchemaObjectEditor.d.ts +32 -0
  188. package/dist/src/components/New/SchemaRenderer/components/SchemaOneOfEditor.d.ts +39 -0
  189. package/dist/src/components/New/SchemaRenderer/components/SchemaPrimitiveField.d.ts +38 -0
  190. package/dist/src/components/New/SchemaRenderer/components/SchemaSection.d.ts +39 -0
  191. package/dist/src/components/New/SchemaRenderer/context.d.ts +8 -0
  192. package/dist/src/components/New/SchemaRenderer/types.d.ts +76 -0
  193. package/dist/src/components/New/Select/CollapsedSelectTags.d.ts +22 -0
  194. package/dist/src/components/New/Select/MultiSelectTags.d.ts +5 -0
  195. package/dist/src/components/New/Select/Select.d.ts +9 -0
  196. package/dist/src/components/New/Select/constants.d.ts +3 -2
  197. package/dist/src/components/New/SharedEntityIndicator/SharedEntityIndicator.d.ts +35 -0
  198. package/dist/src/components/New/SideDrawer/SideDrawer.d.ts +100 -0
  199. package/dist/src/components/New/Slider/Slider.d.ts +29 -1
  200. package/dist/src/components/New/Slider/utils.d.ts +14 -0
  201. package/dist/src/components/New/Slider/utils.spec.d.ts +1 -0
  202. package/dist/src/components/New/Tabs/Tabs.d.ts +54 -6
  203. package/dist/src/components/New/Tooltip/constants.d.ts +5 -3
  204. package/dist/src/components/New/TransferQueue/TransferQueue.d.ts +139 -0
  205. package/dist/src/components/New/TransferQueue/TransferQueueHeader.d.ts +16 -0
  206. package/dist/src/components/New/TransferQueue/TransferQueueRow.d.ts +10 -0
  207. package/dist/src/components/New/TransferQueue/constants.d.ts +6 -0
  208. package/dist/src/components/New/constants/overlay.d.ts +13 -0
  209. package/dist/src/components/Popup/constants.d.ts +1 -1
  210. package/dist/src/components/SchemaRenderer/types.d.ts +5 -93
  211. package/dist/src/components/SchemaRenderer/utils.d.ts +1 -17
  212. package/dist/src/constants/public-class-names.d.ts +64 -3
  213. package/dist/src/constants/schema-renderer.d.ts +2 -0
  214. package/dist/src/index.d.ts +37 -3
  215. package/dist/src/models/json-schema.d.ts +71 -0
  216. package/dist/src/types/accordion.d.ts +7 -0
  217. package/dist/src/types/avatar.d.ts +7 -0
  218. package/dist/src/types/badge.d.ts +16 -0
  219. package/dist/src/types/breadcrumbs.d.ts +9 -0
  220. package/dist/src/types/button.d.ts +1 -0
  221. package/dist/src/types/entity-type.d.ts +9 -0
  222. package/dist/src/types/json-schema.d.ts +22 -0
  223. package/dist/src/types/tooltip.d.ts +4 -0
  224. package/dist/src/types/transfer-queue.d.ts +10 -0
  225. package/dist/src/utils/__tests__/avatar.spec.d.ts +1 -0
  226. package/dist/src/utils/avatar.d.ts +12 -0
  227. package/dist/src/utils/json-schema.d.ts +23 -0
  228. package/dist/src/utils/sub-menu-floating.d.ts +7 -4
  229. package/dist/types/accordion.js +4 -0
  230. package/dist/types/avatar.js +4 -0
  231. package/dist/types/badge.js +5 -0
  232. package/dist/types/breadcrumbs.js +4 -0
  233. package/dist/types/button.js +3 -3
  234. package/dist/types/entity-type.js +4 -0
  235. package/dist/types/json-schema.js +7 -0
  236. package/dist/types/tooltip.js +3 -2
  237. package/dist/types/transfer-queue.js +4 -0
  238. package/dist/use-file-manager-tabs-Bzzwwcgk.cjs +3 -0
  239. package/dist/utils/avatar.js +22 -0
  240. package/dist/{components/SchemaRenderer/utils.js → utils/json-schema.js} +22 -20
  241. package/dist/utils/merge-classes.js +12 -5
  242. package/dist/utils/sub-menu-floating.js +99 -54
  243. package/package.json +4 -9
  244. package/dist/DateCellRenderer-C3e61i75.cjs +0 -1
  245. package/dist/IconButton-DWqoaBWf.cjs +0 -1
  246. package/dist/MarkdownEditor-jQ8nDJfx.cjs +0 -1
  247. package/dist/MarkdownEditorContainer-Bzcnoemw.cjs +0 -1
  248. package/dist/lazy-tfN4sKhq.cjs +0 -1
  249. package/dist/merge-classes-Dipy1Ih1.cjs +0 -1
  250. package/dist/use-file-manager-tabs-9DWkp9IJ.cjs +0 -3
@@ -1,89 +1,113 @@
1
- import { jsx as u, jsxs as g } from "react/jsx-runtime";
2
- import { useRef as A, useCallback as w } from "react";
3
- import { mergeClasses as f } from "../../../utils/merge-classes.js";
4
- import { DIAL_KIT_CLASS as m } from "../../../constants/public-class-names.js";
5
- const I = ["ArrowRight", "ArrowLeft", "Home", "End"], R = ({
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: i,
8
- onTabChange: l,
9
- ariaLabel: x,
10
- className: b,
11
- tabClassName: y
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 p = A({}), a = n.find((e) => e.id === i), h = a && !a.disabled ? a.id : n.find((e) => !e.disabled)?.id, k = w(
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
- if (!I.includes(e.key) || n.length === 0) return;
16
- const r = n.filter((c) => !c.disabled);
17
- if (r.length === 0) return;
18
- const t = Math.max(
19
- r.findIndex((c) => c.id === i),
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
- ), s = r.length - 1;
22
- let o = t;
23
- switch (e.key) {
24
- case "ArrowRight":
25
- o = t === s ? 0 : t + 1;
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, i, l]
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-label": x,
48
- onKeyDown: k,
49
- className: f(
50
- m.tabs,
51
- "flex justify-start gap-1",
52
- b
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 r = i === e.id, t = !!e.disabled;
56
- return /* @__PURE__ */ g(
56
+ const t = c === e.id, r = !!e.disabled;
57
+ return /* @__PURE__ */ I(
57
58
  "button",
58
59
  {
59
- ref: (s) => {
60
- p.current[e.id] = s;
60
+ ref: (o) => {
61
+ w.current[e.id] = o;
61
62
  },
62
63
  type: "button",
63
64
  role: "tab",
64
- "aria-selected": r,
65
- disabled: t,
66
- tabIndex: e.id === h ? 0 : -1,
67
- onClick: () => l(e.id),
68
- className: f(
69
- m.tab,
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-offset-2 focus-visible:outline-focus",
74
- t && "cursor-not-allowed border-control-disable-primary text-control-disable-primary",
75
- !t && (r ? "dial-kit-tab-selected-underline text-primary" : "border-transparent text-secondary"),
76
- y
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
- /* @__PURE__ */ u("span", { children: e.label }),
80
- e.count != null && /* @__PURE__ */ u(
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: f(
104
+ className: l(
84
105
  "dial-tiny-semi-text rounded-full px-1.5 py-0.5",
85
- t && "bg-layer-sunken text-control-disable-primary",
86
- !t && (r ? "bg-control-accent-alpha text-accent" : "bg-layer-sunken text-secondary")
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
- R as Tabs
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
- q ? "min-h-[24px] py-0.5" : "min-h-[40px] py-1.5",
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 u, CaptionText as v } from "../CaptionText/CaptionText.js";
5
- import { Label as N } from "../Label/Label.js";
6
- var b = /* @__PURE__ */ ((e) => (e.None = "none", e.Both = "both", e.Horizontal = "horizontal", e.Vertical = "vertical", e))(b || {});
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
- }, C = (e) => typeof e == "boolean" ? s[
12
+ }, g = (e) => typeof e == "boolean" ? s[
13
13
  e ? "both" : "none"
14
14
  /* None */
15
- ] : s[e], B = ({
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: d = !1,
22
- labelProps: o,
21
+ resize: p = !1,
22
+ labelProps: a,
23
23
  caption: f,
24
- id: l,
25
- ...a
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
- a.invalid && "dial-kit-input-error",
30
- a.disabled && "dial-kit-input-disable",
31
- C(d),
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
- o && /* @__PURE__ */ t(N, { ...o, htmlFor: l }),
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: l,
41
+ id: o,
41
42
  value: m || "",
42
43
  className: h,
43
- onChange: (p) => c?.(p.currentTarget.value),
44
- ...a
44
+ onChange: (u) => c?.(u.currentTarget.value),
45
+ ...l
45
46
  }
46
47
  ),
47
- /* @__PURE__ */ t(u, { text: r }),
48
- !r && /* @__PURE__ */ t(v, { text: f })
48
+ /* @__PURE__ */ t(v, { text: r }),
49
+ !r && /* @__PURE__ */ t(N, { text: f })
49
50
  ] })
50
51
  ] });
51
52
  };
52
53
  export {
53
- B as Textarea,
54
- b as TextareaResize
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
  );
@@ -23,10 +23,10 @@ const j = ({
23
23
  },
24
24
  ...o.getFloatingProps(t),
25
25
  className: f(
26
- C.tooltip,
27
26
  h,
28
27
  l,
29
- o.getFloatingProps(t).className
28
+ o.getFloatingProps(t).className,
29
+ C.tooltip
30
30
  ),
31
31
  children: [
32
32
  t.children,
@@ -1,4 +1,4 @@
1
- const t = 7, o = 2, e = 500, r = "fill-control-inverted", s = "z-[55] 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";
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
+ };