@epam/ai-dial-ui-kit 0.15.0-dev.4 → 0.15.0-dev.42

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 (202) hide show
  1. package/README.md +191 -0
  2. package/dist/CHANGELOG.md +75 -0
  3. package/dist/DateCellRenderer-ChqbDlQ2.cjs +1 -0
  4. package/dist/{DateCellRenderer-BVM-Q8yx.cjs → DateCellRenderer-Cl_mNbi1.cjs} +31 -31
  5. package/dist/IconButton-DHOFapLo.cjs +1 -0
  6. package/dist/JsonEditor-CpSpVa0v.cjs +1 -0
  7. package/dist/{MarkdownEditor-jQ8nDJfx.cjs → MarkdownEditor-CPzMv3lE.cjs} +1 -1
  8. package/dist/{MarkdownEditor-DHn2pYOJ.cjs → MarkdownEditor-NYMcKLJy.cjs} +1 -1
  9. package/dist/MarkdownEditorContainer-DVPRplYf.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 +70 -65
  13. package/dist/components/Dropdown/DropdownSubMenuItem.js +63 -55
  14. package/dist/components/Dropdown/constants.js +16 -14
  15. package/dist/components/DropdownIcon/DropdownIcon.js +43 -32
  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/MarkdownEditorContainer.js +18 -16
  20. package/dist/components/New/Accordion/Accordion.js +87 -71
  21. package/dist/components/New/AutocompleteTagInput/AutocompleteTagInput.js +206 -0
  22. package/dist/components/New/AutocompleteTagInput/utils.js +11 -0
  23. package/dist/components/New/Avatar/Avatar.js +70 -0
  24. package/dist/components/New/Badge/Badge.js +45 -0
  25. package/dist/components/New/BottomSheet/BottomSheet.js +128 -0
  26. package/dist/components/New/Breadcrumbs/Breadcrumbs.js +159 -0
  27. package/dist/components/New/Breadcrumbs/constants.js +41 -0
  28. package/dist/components/New/Button/Button.js +32 -32
  29. package/dist/components/New/Button/ButtonWrappers.js +93 -37
  30. package/dist/components/New/Button/constants.js +3 -0
  31. package/dist/components/New/Button/utils.js +18 -8
  32. package/dist/components/New/ButtonDropdown/ButtonDropdown.js +26 -16
  33. package/dist/components/New/Calendar/Calendar.js +301 -265
  34. package/dist/components/New/Calendar/constants.js +5 -5
  35. package/dist/components/New/CaptionText/CaptionText.js +18 -15
  36. package/dist/components/New/CardShell/CardShell.js +5 -3
  37. package/dist/components/New/Checkbox/Checkbox.js +67 -56
  38. package/dist/components/New/Checkbox/CheckboxBox.js +5 -3
  39. package/dist/components/New/CloseButton/CloseButton.js +18 -16
  40. package/dist/components/New/CollapsibleSidebar/CollapsibleSidebar.js +39 -34
  41. package/dist/components/New/ConfirmationPopup/ConfirmationPopup.js +38 -37
  42. package/dist/components/New/ConfirmationPopup/constants.js +8 -11
  43. package/dist/components/New/Dropdown/Dropdown.js +112 -105
  44. package/dist/components/New/Dropdown/DropdownSubMenuItem.js +17 -17
  45. package/dist/components/New/Dropdown/constants.js +22 -17
  46. package/dist/components/New/EllipsisTooltip/EllipsisTooltip.js +20 -18
  47. package/dist/components/New/EntityIdentity/EntityIdentity.js +135 -0
  48. package/dist/components/New/FileDropzone/FileDropzone.js +27 -25
  49. package/dist/components/New/FileIcon/FileIcon.js +55 -0
  50. package/dist/components/New/FileIcon/constants.js +134 -0
  51. package/dist/components/New/FileIcon/icons/FileGlyph.js +150 -0
  52. package/dist/components/New/FileIcon/icons/FolderGlyph.js +50 -0
  53. package/dist/components/New/FileName/FileName.js +78 -0
  54. package/dist/components/New/FilterChips/FilterChips.js +43 -0
  55. package/dist/components/New/FilterChips/constants.js +5 -0
  56. package/dist/components/New/FolderName/FolderName.js +16 -0
  57. package/dist/components/New/FolderPath/FolderPath.js +29 -28
  58. package/dist/components/New/Highlight/Highlight.js +23 -30
  59. package/dist/components/New/IconButton/IconButton.js +30 -28
  60. package/dist/components/New/InfoButton/InfoButton.js +13 -11
  61. package/dist/components/New/InlineSelect/InlineSelect.js +74 -56
  62. package/dist/components/New/InteractiveTooltip/InteractiveTooltip.js +41 -39
  63. package/dist/components/New/InteractiveTooltip/constants.js +2 -2
  64. package/dist/components/New/Label/Label.js +13 -8
  65. package/dist/components/New/MenuItem/MenuItem.js +29 -27
  66. package/dist/components/New/MenuItem/constants.js +9 -8
  67. package/dist/components/New/NoDataContent/NoDataContent.js +21 -19
  68. package/dist/components/New/Notification/Notification.js +33 -29
  69. package/dist/components/New/NumberInput/NumberInput.js +42 -33
  70. package/dist/components/New/PasswordInput/PasswordInput.js +41 -35
  71. package/dist/components/New/Popup/Popup.js +46 -44
  72. package/dist/components/New/Popup/constants.js +3 -3
  73. package/dist/components/New/Radio/Radio.js +75 -64
  74. package/dist/components/New/RadioGroup/RadioGroup.js +76 -65
  75. package/dist/components/New/RadioGroupPopupField/RadioGroupPopupField.js +117 -106
  76. package/dist/components/New/ResizableContainer/ResizableContainer.js +42 -40
  77. package/dist/components/New/Search/Search.js +29 -27
  78. package/dist/components/New/SegmentedControl/SegmentedControl.js +29 -23
  79. package/dist/components/New/Select/CollapsedSelectTags.js +127 -0
  80. package/dist/components/New/Select/MultiSelectTags.js +18 -15
  81. package/dist/components/New/Select/Select.js +219 -197
  82. package/dist/components/New/Select/constants.js +23 -20
  83. package/dist/components/New/SharedEntityIndicator/SharedEntityIndicator.js +34 -0
  84. package/dist/components/New/SideDrawer/SideDrawer.js +148 -0
  85. package/dist/components/New/Switch/Switch.js +69 -58
  86. package/dist/components/New/Tabs/Tabs.js +125 -61
  87. package/dist/components/New/Tag/Tag.js +42 -40
  88. package/dist/components/New/TagInput/TagInput.js +48 -44
  89. package/dist/components/New/ToggleIconButton/ToggleIconButton.js +26 -24
  90. package/dist/components/New/Tooltip/TooltipContent.js +11 -9
  91. package/dist/components/New/Tooltip/constants.js +1 -1
  92. package/dist/components/New/TransferQueue/TransferQueue.js +124 -0
  93. package/dist/components/New/TransferQueue/TransferQueueHeader.js +71 -0
  94. package/dist/components/New/TransferQueue/TransferQueueRow.js +119 -0
  95. package/dist/components/New/TransferQueue/constants.js +24 -0
  96. package/dist/components/New/constants/overlay.js +17 -9
  97. package/dist/components/Popup/constants.js +8 -8
  98. package/dist/components/ProgressBar/ProgressBar.js +45 -33
  99. package/dist/components/SchemaRenderer/components/SchemaAdditionalPropertiesEditor.js +46 -31
  100. package/dist/components/SchemaRenderer/components/SchemaField.js +19 -19
  101. package/dist/components/SchemaRenderer/components/SchemaFieldContent.js +18 -18
  102. package/dist/components/SchemaRenderer/components/SchemaKeyValueEditor.js +223 -135
  103. package/dist/components/SchemaRenderer/types.js +19 -8
  104. package/dist/components/SchemaRenderer/utils.js +122 -95
  105. package/dist/components/Skeleton/Skeleton.js +25 -19
  106. package/dist/components/Spinner/Spinner.js +7 -5
  107. package/dist/components/Tooltip/TooltipContent.js +11 -11
  108. package/dist/components-manifest.json +1653 -71
  109. package/dist/constants/public-class-names.js +210 -0
  110. package/dist/dial-ui-kit.cjs +2 -2
  111. package/dist/dial-ui-kit.js +346 -299
  112. package/dist/editor-Bc9xzKuR.cjs +1 -0
  113. package/dist/editors.cjs +1 -1
  114. package/dist/file-manager.cjs +1 -1
  115. package/dist/grid.cjs +1 -1
  116. package/dist/index.css +2 -2
  117. package/dist/lazy-Cy9WobJf.cjs +1 -0
  118. package/dist/merge-classes-BEJXjzkx.cjs +1 -0
  119. package/dist/migration-guides/0.15.0/legacy-theme-variable-fallbacks-removal.md +69 -0
  120. package/dist/migration-guides/README.md +1 -0
  121. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +419 -399
  122. package/dist/src/components/FileManager/FileManager.d.ts +2 -0
  123. package/dist/src/components/FileManager/FileManagerContext.d.ts +1 -0
  124. package/dist/src/components/FileManager/hooks/use-grid-context-menu.d.ts +2 -1
  125. package/dist/src/components/New/Accordion/Accordion.d.ts +6 -1
  126. package/dist/src/components/New/AutocompleteTagInput/AutocompleteTagInput.d.ts +97 -0
  127. package/dist/src/components/New/AutocompleteTagInput/utils.d.ts +17 -0
  128. package/dist/src/components/New/AutocompleteTagInput/utils.spec.d.ts +1 -0
  129. package/dist/src/components/New/Avatar/Avatar.d.ts +55 -0
  130. package/dist/src/components/New/Badge/Badge.d.ts +47 -0
  131. package/dist/src/components/New/BottomSheet/BottomSheet.d.ts +84 -0
  132. package/dist/src/components/New/Breadcrumbs/Breadcrumbs.d.ts +94 -0
  133. package/dist/src/components/New/Breadcrumbs/constants.d.ts +60 -0
  134. package/dist/src/components/New/Button/Button.d.ts +4 -1
  135. package/dist/src/components/New/Button/ButtonWrappers.d.ts +20 -0
  136. package/dist/src/components/New/Button/utils.d.ts +15 -0
  137. package/dist/src/components/New/ButtonDropdown/ButtonDropdown.d.ts +4 -0
  138. package/dist/src/components/New/Calendar/Calendar.d.ts +7 -1
  139. package/dist/src/components/New/Calendar/constants.d.ts +1 -1
  140. package/dist/src/components/New/ConfirmationPopup/constants.d.ts +0 -1
  141. package/dist/src/components/New/Dropdown/Dropdown.d.ts +9 -1
  142. package/dist/src/components/New/Dropdown/constants.d.ts +3 -0
  143. package/dist/src/components/New/EntityIdentity/EntityIdentity.d.ts +85 -0
  144. package/dist/src/components/New/FileIcon/FileIcon.d.ts +61 -0
  145. package/dist/src/components/New/FileIcon/constants.d.ts +16 -0
  146. package/dist/src/components/New/FileIcon/icons/FileGlyph.d.ts +18 -0
  147. package/dist/src/components/New/FileIcon/icons/FolderGlyph.d.ts +17 -0
  148. package/dist/src/components/New/FileName/FileName.d.ts +79 -0
  149. package/dist/src/components/New/FilterChips/FilterChips.d.ts +69 -0
  150. package/dist/src/components/New/FilterChips/constants.d.ts +13 -0
  151. package/dist/src/components/New/FolderName/FolderName.d.ts +37 -0
  152. package/dist/src/components/New/InlineSelect/InlineSelect.d.ts +16 -1
  153. package/dist/src/components/New/InteractiveTooltip/constants.d.ts +5 -4
  154. package/dist/src/components/New/Notification/Notification.d.ts +18 -0
  155. package/dist/src/components/New/Popup/constants.d.ts +1 -1
  156. package/dist/src/components/New/Select/CollapsedSelectTags.d.ts +22 -0
  157. package/dist/src/components/New/Select/MultiSelectTags.d.ts +5 -0
  158. package/dist/src/components/New/Select/Select.d.ts +9 -0
  159. package/dist/src/components/New/Select/constants.d.ts +3 -2
  160. package/dist/src/components/New/SharedEntityIndicator/SharedEntityIndicator.d.ts +35 -0
  161. package/dist/src/components/New/SideDrawer/SideDrawer.d.ts +100 -0
  162. package/dist/src/components/New/Tabs/Tabs.d.ts +54 -6
  163. package/dist/src/components/New/Tooltip/constants.d.ts +5 -3
  164. package/dist/src/components/New/TransferQueue/TransferQueue.d.ts +139 -0
  165. package/dist/src/components/New/TransferQueue/TransferQueueHeader.d.ts +16 -0
  166. package/dist/src/components/New/TransferQueue/TransferQueueRow.d.ts +10 -0
  167. package/dist/src/components/New/TransferQueue/constants.d.ts +6 -0
  168. package/dist/src/components/New/constants/overlay.d.ts +13 -0
  169. package/dist/src/components/Popup/constants.d.ts +1 -1
  170. package/dist/src/components/SchemaRenderer/types.d.ts +11 -0
  171. package/dist/src/components/SchemaRenderer/utils.d.ts +10 -1
  172. package/dist/src/constants/public-class-names.d.ts +201 -0
  173. package/dist/src/index.d.ts +36 -1
  174. package/dist/src/types/accordion.d.ts +7 -0
  175. package/dist/src/types/avatar.d.ts +7 -0
  176. package/dist/src/types/badge.d.ts +16 -0
  177. package/dist/src/types/breadcrumbs.d.ts +9 -0
  178. package/dist/src/types/button.d.ts +1 -0
  179. package/dist/src/types/entity-type.d.ts +9 -0
  180. package/dist/src/types/transfer-queue.d.ts +10 -0
  181. package/dist/src/utils/__tests__/avatar.spec.d.ts +1 -0
  182. package/dist/src/utils/avatar.d.ts +12 -0
  183. package/dist/src/utils/sub-menu-floating.d.ts +7 -4
  184. package/dist/types/accordion.js +4 -0
  185. package/dist/types/avatar.js +4 -0
  186. package/dist/types/badge.js +5 -0
  187. package/dist/types/breadcrumbs.js +4 -0
  188. package/dist/types/button.js +3 -3
  189. package/dist/types/entity-type.js +4 -0
  190. package/dist/types/transfer-queue.js +4 -0
  191. package/dist/use-file-manager-tabs-C-dMqEFy.cjs +3 -0
  192. package/dist/utils/avatar.js +22 -0
  193. package/dist/utils/merge-classes.js +12 -5
  194. package/dist/utils/sub-menu-floating.js +99 -54
  195. package/package.json +4 -7
  196. package/dist/DateCellRenderer-ssp7eaZY.cjs +0 -1
  197. package/dist/IconButton-DWqoaBWf.cjs +0 -1
  198. package/dist/JsonEditor-qv1Z0dLX.cjs +0 -1
  199. package/dist/MarkdownEditorContainer-Bzcnoemw.cjs +0 -1
  200. package/dist/lazy-tfN4sKhq.cjs +0 -1
  201. package/dist/merge-classes-Dipy1Ih1.cjs +0 -1
  202. package/dist/use-file-manager-tabs-DjdR_mYM.cjs +0 -3
@@ -1,24 +1,24 @@
1
- import { jsx as i } from "react/jsx-runtime";
1
+ import { jsx as r } from "react/jsx-runtime";
2
2
  import { useMemo as F } from "react";
3
- import { DialFileNodeType as r, DialFilePermission as U } from "../../../models/file.js";
3
+ import { DialFileNodeType as i, DialFilePermission as X } from "../../../models/file.js";
4
4
  import { DialFileManagerActions as e } from "../../../types/file-manager.js";
5
- import { IconExternalLink as A, IconCopy as X, IconDownload as _, IconEye as j, IconTrashX as W, IconPencilMinus as $, IconInfoCircle as q, IconUserX as B } from "@tabler/icons-react";
6
- import H from "../../../assets/icons/copy-to.svg.js";
7
- import J from "../../../assets/icons/move-to.svg.js";
8
- import K from "../../../assets/icons/unshare.svg.js";
9
- import Q from "../../../assets/icons/add-child.svg.js";
10
- import V from "../../../assets/icons/add-sibling.svg.js";
5
+ import { IconExternalLink as O, IconCopy as _, IconDownload as j, IconEye as W, IconTrashX as $, IconPencilMinus as q, IconInfoCircle as B, IconUserX as H } from "@tabler/icons-react";
6
+ import J from "../../../assets/icons/copy-to.svg.js";
7
+ import K from "../../../assets/icons/move-to.svg.js";
8
+ import Q from "../../../assets/icons/unshare.svg.js";
9
+ import V from "../../../assets/icons/add-child.svg.js";
10
+ import Y from "../../../assets/icons/add-sibling.svg.js";
11
11
  import { BASE_ICON_PROPS as n } from "../../../constants/icon.js";
12
- import { DropdownItemType as Y } from "../../../types/dropdown.js";
13
- import { cleanForbiddenSymbolsRegExp as Z } from "../utils.js";
14
- const de = ({
12
+ import { DropdownItemType as Z } from "../../../types/dropdown.js";
13
+ import { cleanForbiddenSymbolsRegExp as G } from "../utils.js";
14
+ const ye = ({
15
15
  actionLabels: s,
16
16
  onDuplicate: u,
17
17
  onCopy: a,
18
18
  onMove: k,
19
19
  onDownload: l,
20
- onRename: C,
21
- onDelete: T,
20
+ onRename: T,
21
+ onDelete: C,
22
22
  onInfo: I,
23
23
  onUnshare: x,
24
24
  onRemoveAccess: c,
@@ -31,62 +31,61 @@ const de = ({
31
31
  isRenameFileAvailable: v = !0,
32
32
  isDuplicateFolderAvailable: E = !0,
33
33
  forbiddenSymbolsRegExp: z,
34
- onGridCreateSiblingFolder: w,
35
- onGridCreateChildFolder: M
34
+ skipForbiddenSymbolsCheckForActions: w,
35
+ onGridCreateSiblingFolder: M,
36
+ onGridCreateChildFolder: R
36
37
  }) => F(() => (o) => {
37
38
  const t = [];
38
39
  if (!s)
39
40
  return t;
40
- const p = Z(
41
- z
42
- )?.test(o.name);
43
- s[e.AddSibling] && o.nodeType === r.FOLDER && t.push({
41
+ const p = !w && G(z)?.test(o.name);
42
+ s[e.AddSibling] && o.nodeType === i.FOLDER && t.push({
44
43
  key: "addSibling",
45
44
  label: s[e.AddSibling],
46
- icon: /* @__PURE__ */ i(
47
- V,
45
+ icon: /* @__PURE__ */ r(
46
+ Y,
48
47
  {
49
48
  width: n.size,
50
49
  height: n.size,
51
50
  className: "text-secondary"
52
51
  }
53
52
  ),
54
- onClick: () => w([o])
55
- }), s[e.AddChild] && o.nodeType === r.FOLDER && !p && t.push(
53
+ onClick: () => M([o])
54
+ }), s[e.AddChild] && o.nodeType === i.FOLDER && !p && t.push(
56
55
  {
57
56
  key: "addChild",
58
57
  label: s[e.AddChild],
59
- icon: /* @__PURE__ */ i(
60
- Q,
58
+ icon: /* @__PURE__ */ r(
59
+ V,
61
60
  {
62
61
  width: n.size,
63
62
  height: n.size,
64
63
  className: "text-secondary"
65
64
  }
66
65
  ),
67
- onClick: () => M([o])
66
+ onClick: () => R([o])
68
67
  },
69
68
  {
70
69
  key: "divider",
71
- type: Y.Divider
70
+ type: Z.Divider
72
71
  }
73
- ), s[e.OpenInNewTab] && typeof y == "function" && o.nodeType === r.ITEM && !p && t.push({
72
+ ), s[e.OpenInNewTab] && typeof y == "function" && o.nodeType === i.ITEM && !p && t.push({
74
73
  key: e.OpenInNewTab,
75
74
  label: s[e.OpenInNewTab],
76
- icon: /* @__PURE__ */ i(A, { ...n, className: "text-secondary" }),
75
+ icon: /* @__PURE__ */ r(O, { ...n, className: "text-secondary" }),
77
76
  onClick: () => y?.(o)
78
77
  });
79
- const O = o.nodeType === r.ITEM || o.nodeType === r.FOLDER && E;
80
- s[e.Duplicate] && O && !p && t.push({
78
+ const P = o.nodeType === i.ITEM || o.nodeType === i.FOLDER && E;
79
+ s[e.Duplicate] && P && !p && t.push({
81
80
  key: e.Duplicate,
82
81
  label: s[e.Duplicate],
83
- icon: /* @__PURE__ */ i(X, { ...n, className: "text-secondary" }),
82
+ icon: /* @__PURE__ */ r(_, { ...n, className: "text-secondary" }),
84
83
  onClick: () => u(o)
85
84
  }), s[e.Copy] && !p && t.push({
86
85
  key: e.Copy,
87
86
  label: s[e.Copy],
88
- icon: /* @__PURE__ */ i(
89
- H,
87
+ icon: /* @__PURE__ */ r(
88
+ J,
90
89
  {
91
90
  width: n.size,
92
91
  height: n.size,
@@ -97,8 +96,8 @@ const de = ({
97
96
  }), s[e.Move] && !p && t.push({
98
97
  key: e.Move,
99
98
  label: s[e.Move],
100
- icon: /* @__PURE__ */ i(
101
- J,
99
+ icon: /* @__PURE__ */ r(
100
+ K,
102
101
  {
103
102
  width: n.size,
104
103
  height: n.size,
@@ -109,44 +108,44 @@ const de = ({
109
108
  }), s[e.Download] && !p && t.push({
110
109
  key: e.Download,
111
110
  label: s[e.Download],
112
- icon: /* @__PURE__ */ i(_, { ...n, className: "text-secondary" }),
111
+ icon: /* @__PURE__ */ r(j, { ...n, className: "text-secondary" }),
113
112
  onClick: () => l(o)
114
- }), s[e.ManagePermissions] && typeof m == "function" && o.nodeType === r.FOLDER && !p && t.push({
113
+ }), s[e.ManagePermissions] && typeof m == "function" && o.nodeType === i.FOLDER && !p && t.push({
115
114
  key: e.ManagePermissions,
116
115
  label: s[e.ManagePermissions],
117
- icon: /* @__PURE__ */ i(A, { ...n, className: "text-secondary" }),
116
+ icon: /* @__PURE__ */ r(O, { ...n, className: "text-secondary" }),
118
117
  onClick: () => m?.(o.path)
119
118
  });
120
- const h = o.name.split("."), R = h.length > 1 ? h[h.length - 1] : "", P = R && D?.includes(`.${R}`);
121
- s[e.Preview] && typeof d == "function" && o.nodeType === r.ITEM && P && !p && t.push({
119
+ const h = o.name.split("."), S = h.length > 1 ? h[h.length - 1] : "", f = S && D?.includes(`.${S}`);
120
+ s[e.Preview] && typeof d == "function" && o.nodeType === i.ITEM && f && !p && t.push({
122
121
  key: e.Preview,
123
122
  label: s[e.Preview],
124
- icon: /* @__PURE__ */ i(j, { ...n, className: "text-secondary" }),
123
+ icon: /* @__PURE__ */ r(W, { ...n, className: "text-secondary" }),
125
124
  onClick: () => d?.(o.path)
126
125
  });
127
- const S = !o.permissions || o.permissions.includes(U.WRITE);
128
- s[e.Delete] && S && t.push({
126
+ const A = !o.permissions || o.permissions.includes(X.WRITE);
127
+ s[e.Delete] && A && t.push({
129
128
  key: e.Delete,
130
129
  label: s[e.Delete],
131
- icon: /* @__PURE__ */ i(W, { ...n, className: "text-secondary" }),
132
- onClick: () => T(o, o.parentPath ?? "")
130
+ icon: /* @__PURE__ */ r($, { ...n, className: "text-secondary" }),
131
+ onClick: () => C(o, o.parentPath ?? "")
133
132
  });
134
- const f = o.nodeType === r.FOLDER || o.nodeType === r.ITEM && v;
135
- return s[e.Rename] && f && S && t.push({
133
+ const U = o.nodeType === i.FOLDER || o.nodeType === i.ITEM && v;
134
+ return s[e.Rename] && U && A && t.push({
136
135
  key: e.Rename,
137
136
  label: s[e.Rename],
138
- icon: /* @__PURE__ */ i($, { ...n, className: "text-secondary" }),
139
- onClick: () => C(o.path)
140
- }), s[e.Info] && o.nodeType === r.ITEM && !p && t.push({
137
+ icon: /* @__PURE__ */ r(q, { ...n, className: "text-secondary" }),
138
+ onClick: () => T(o.path)
139
+ }), s[e.Info] && o.nodeType === i.ITEM && !p && t.push({
141
140
  key: e.Info,
142
141
  label: s[e.Info],
143
- icon: /* @__PURE__ */ i(q, { ...n, className: "text-secondary" }),
142
+ icon: /* @__PURE__ */ r(B, { ...n, className: "text-secondary" }),
144
143
  onClick: () => I(o)
145
144
  }), s[e.Unshare] && N?.includes(o.path) && t.push({
146
145
  key: e.Unshare,
147
146
  label: s[e.Unshare],
148
- icon: /* @__PURE__ */ i(
149
- K,
147
+ icon: /* @__PURE__ */ r(
148
+ Q,
150
149
  {
151
150
  width: n.size,
152
151
  height: n.size,
@@ -157,7 +156,7 @@ const de = ({
157
156
  }), s[e.RemoveAccess] && g?.has(o.path) && c && t.push({
158
157
  key: e.RemoveAccess,
159
158
  label: s[e.RemoveAccess],
160
- icon: /* @__PURE__ */ i(B, { size: n.size, className: "text-secondary" }),
159
+ icon: /* @__PURE__ */ r(H, { size: n.size, className: "text-secondary" }),
161
160
  onClick: () => c(o)
162
161
  }), t;
163
162
  }, [
@@ -166,8 +165,8 @@ const de = ({
166
165
  a,
167
166
  k,
168
167
  l,
169
- T,
170
168
  C,
169
+ T,
171
170
  I,
172
171
  x,
173
172
  c,
@@ -180,9 +179,10 @@ const de = ({
180
179
  v,
181
180
  E,
182
181
  z,
183
- M,
184
- w
182
+ w,
183
+ R,
184
+ M
185
185
  ]);
186
186
  export {
187
- de as useGridContextMenu
187
+ ye as useGridContextMenu
188
188
  };
@@ -1,26 +1,28 @@
1
1
  import { jsx as e, jsxs as r } from "react/jsx-runtime";
2
2
  import { useId as g, useState as x, useEffect as J, useCallback as u } from "react";
3
- import { DialSwitch as S } from "../Switch/Switch.js";
4
- import { EditorThemes as b } from "../../types/editor.js";
3
+ import "../../constants/editor.js";
4
+ import { EditorThemes as S } from "../../types/editor.js";
5
+ import "@monaco-editor/react";
6
+ import { DialSwitch as b } from "../Switch/Switch.js";
5
7
  import { DialMarkdownEditor as v } from "./MarkdownEditor.js";
6
8
  import { DialLabel as y } from "../Label/Label.js";
7
- const z = ({
9
+ const $ = ({
8
10
  value: s,
9
11
  onChangeValue: l,
10
- label: i,
12
+ label: t,
11
13
  headerContent: d,
12
14
  switcherLabel: a,
13
15
  height: c = 300,
14
- theme: m = b.dark,
16
+ theme: m = S.dark,
15
17
  onValidateJSON: f,
16
18
  preview: C = "edit"
17
19
  }) => {
18
- const N = g(), [n, w] = x(!1), [p, D] = x(null);
20
+ const N = g(), [i, w] = x(!1), [p, D] = x(null);
19
21
  J(() => {
20
- n && typeof window < "u" && import("../JsonEditor/JsonEditor.js").then((o) => {
22
+ i && typeof window < "u" && import("../JsonEditor/JsonEditor.js").then((o) => {
21
23
  D(() => o.DialJsonEditor);
22
24
  });
23
- }, [n]);
25
+ }, [i]);
24
26
  const h = u(
25
27
  (o) => {
26
28
  l?.(o);
@@ -31,16 +33,16 @@ const z = ({
31
33
  f?.(o);
32
34
  },
33
35
  [f]
34
- ), t = !!a;
36
+ ), n = !!a;
35
37
  return /* @__PURE__ */ e("div", { className: "size-full flex flex-col", children: /* @__PURE__ */ e("div", { className: "flex flex-col gap-8", children: /* @__PURE__ */ r("div", { children: [
36
- (i || d || t) && /* @__PURE__ */ r("div", { className: "flex justify-between items-center mb-2", children: [
37
- i && /* @__PURE__ */ e(y, { label: i }),
38
+ (t || d || n) && /* @__PURE__ */ r("div", { className: "flex justify-between items-center mb-2", children: [
39
+ t && /* @__PURE__ */ e(y, { label: t }),
38
40
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2 flex-1 justify-end", children: [
39
41
  d,
40
- t && /* @__PURE__ */ e("label", { className: "flex items-center gap-2 cursor-pointer", children: /* @__PURE__ */ e(
41
- S,
42
+ n && /* @__PURE__ */ e("label", { className: "flex items-center gap-2 cursor-pointer", children: /* @__PURE__ */ e(
43
+ b,
42
44
  {
43
- isOn: n,
45
+ isOn: i,
44
46
  label: a,
45
47
  switchId: N,
46
48
  onChange: (o) => w(o)
@@ -48,7 +50,7 @@ const z = ({
48
50
  ) })
49
51
  ] })
50
52
  ] }),
51
- t && n ? /* @__PURE__ */ e(
53
+ n && i ? /* @__PURE__ */ e(
52
54
  "div",
53
55
  {
54
56
  className: "border border-primary rounded",
@@ -76,5 +78,5 @@ const z = ({
76
78
  ] }) }) });
77
79
  };
78
80
  export {
79
- z as DialMarkdownEditorContainer
81
+ $ as DialMarkdownEditorContainer
80
82
  };
@@ -1,97 +1,113 @@
1
- import { jsxs as i, Fragment as _, jsx as e } from "react/jsx-runtime";
2
- import { IconChevronRight as j } from "@tabler/icons-react";
3
- import { useState as A, useId as C } from "react";
4
- import { DIAL_KIT_ICON_STROKE as S } from "../constants/icon.js";
5
- import { DIAL_ICON_SIZE as k } from "../../../constants/icon.js";
6
- import { resolveAccessibleName as O } from "../../../utils/accessible-name.js";
7
- import { mergeClasses as n } from "../../../utils/merge-classes.js";
8
- const F = ({
9
- title: p,
10
- description: s,
11
- children: h,
1
+ import { jsx as e, jsxs as s, Fragment as j } from "react/jsx-runtime";
2
+ import { IconChevronRight as T } from "@tabler/icons-react";
3
+ import { useState as k, useId as D } from "react";
4
+ import { DIAL_KIT_ICON_STROKE as K } from "../constants/icon.js";
5
+ import { DIAL_ICON_SIZE as O } from "../../../constants/icon.js";
6
+ import { resolveAccessibleName as R } from "../../../utils/accessible-name.js";
7
+ import { mergeClasses as t } from "../../../utils/merge-classes.js";
8
+ import { DIAL_KIT_CLASS as $ } from "../../../constants/public-class-names.js";
9
+ import { AccordionCaretPosition as y } from "../../../types/accordion.js";
10
+ const J = ({
11
+ title: g,
12
+ description: c,
13
+ children: I,
12
14
  expanded: l,
13
- defaultExpanded: y = !1,
14
- disabled: r,
15
- nonCollapsible: o,
16
- ariaLabel: v,
17
- onToggle: I,
18
- className: g,
19
- headerClassName: c,
20
- contentClassName: N
15
+ defaultExpanded: N = !1,
16
+ disabled: o,
17
+ nonCollapsible: n,
18
+ ariaLabel: w,
19
+ onToggle: b,
20
+ caretPosition: A = y.End,
21
+ className: C,
22
+ headerClassName: d,
23
+ contentClassName: S
21
24
  }) => {
22
- const d = l !== void 0, [b, w] = A(y), t = o ? !0 : d ? l : b, m = C(), a = `accordion-header-${m}`, x = `accordion-content-${m}`, E = () => {
23
- if (r) return;
24
- const u = !t;
25
- d || w(u), I?.(u);
26
- }, f = /* @__PURE__ */ i(_, { children: [
27
- /* @__PURE__ */ i("span", { className: "flex min-w-0 flex-col", children: [
28
- /* @__PURE__ */ e("span", { className: "truncate dial-body-text text-primary", children: p }),
29
- s ? /* @__PURE__ */ e("span", { className: "truncate dial-tiny-text text-secondary", children: s }) : null
25
+ const m = l !== void 0, [_, E] = k(N), r = n ? !0 : m ? l : _, f = D(), i = `accordion-header-${f}`, u = `accordion-content-${f}`, L = () => {
26
+ if (o) return;
27
+ const v = !r;
28
+ m || E(v), b?.(v);
29
+ }, a = A === y.Start, p = n ? null : /* @__PURE__ */ e(
30
+ T,
31
+ {
32
+ size: O.SM,
33
+ stroke: K,
34
+ "aria-hidden": "true",
35
+ className: t(
36
+ "shrink-0 text-secondary transition-transform motion-reduce:transition-none",
37
+ r ? "rotate-90" : "rtl:rotate-180"
38
+ )
39
+ }
40
+ ), x = /* @__PURE__ */ s(j, { children: [
41
+ a && p,
42
+ /* @__PURE__ */ s("span", { className: "flex min-w-0 flex-col", children: [
43
+ /* @__PURE__ */ e("span", { className: "truncate dial-body-text text-primary", children: g }),
44
+ c ? /* @__PURE__ */ e("span", { className: "truncate dial-tiny-text text-secondary", children: c }) : null
30
45
  ] }),
31
- !o && // Caret at the leading edge; it turns a quarter turn to point down when open.
32
- /* @__PURE__ */ e(
33
- j,
34
- {
35
- size: k.SM,
36
- stroke: S,
37
- "aria-hidden": "true",
38
- className: n(
39
- "shrink-0 text-secondary transition-transform motion-reduce:transition-none",
40
- t && "rotate-90"
41
- )
42
- }
43
- )
44
- ] });
45
- return /* @__PURE__ */ i(
46
+ !a && p
47
+ ] }), h = a ? "justify-start gap-2" : "justify-between";
48
+ return /* @__PURE__ */ s(
46
49
  "div",
47
50
  {
48
- className: n(
49
- "flex flex-col gap-3 py-3 overflow-hidden bg-transparent ",
50
- g
51
+ className: t(
52
+ "flex flex-col py-3 overflow-hidden bg-transparent",
53
+ C,
54
+ $.accordion
51
55
  ),
52
56
  children: [
53
- o ? /* @__PURE__ */ e(
57
+ n ? /* @__PURE__ */ e(
54
58
  "div",
55
59
  {
56
- id: a,
57
- className: n(
58
- "flex w-full px-4 rounded-xl items-center justify-between dial-tiny-text",
59
- c
60
+ id: i,
61
+ className: t(
62
+ "flex w-full px-4 rounded-xl items-center dial-tiny-text",
63
+ h,
64
+ d
60
65
  ),
61
- children: f
66
+ children: x
62
67
  }
63
68
  ) : /* @__PURE__ */ e(
64
69
  "button",
65
70
  {
66
- id: a,
71
+ id: i,
67
72
  type: "button",
68
- "aria-expanded": t,
69
- "aria-controls": t ? x : void 0,
70
- "aria-label": O(v),
71
- disabled: r,
72
- onClick: E,
73
- className: n(
74
- "flex w-full px-4 rounded-xl items-center justify-between dial-tiny-text",
75
- r ? "cursor-not-allowed opacity-75" : (
73
+ "aria-expanded": r,
74
+ "aria-controls": u,
75
+ "aria-label": R(w),
76
+ disabled: o,
77
+ onClick: L,
78
+ className: t(
79
+ "flex w-full px-4 rounded-xl items-center dial-tiny-text",
80
+ h,
81
+ o ? "cursor-not-allowed opacity-75" : (
76
82
  // Applied only to a header that can actually be operated.
77
83
  "cursor-pointer hover:bg-control-accent-alpha-hover focus-visible:outline focus-visible:outline-focus"
78
84
  ),
79
- c
85
+ d
80
86
  ),
81
- children: f
87
+ children: x
82
88
  }
83
89
  ),
84
- t && /* @__PURE__ */ e(
90
+ /* @__PURE__ */ e(
85
91
  "div",
86
92
  {
87
- id: x,
88
- role: "region",
89
- "aria-labelledby": a,
90
- className: n(
91
- "px-4 dial-small-text text-primary",
92
- N
93
+ inert: !r,
94
+ className: t(
95
+ "grid transition-[grid-template-rows] duration-200 ease-out motion-reduce:transition-none",
96
+ r ? "grid-rows-[1fr]" : "grid-rows-[0fr]"
93
97
  ),
94
- children: h
98
+ children: /* @__PURE__ */ e("div", { className: "min-h-0 overflow-hidden", children: /* @__PURE__ */ e("div", { className: "pt-3", children: /* @__PURE__ */ e(
99
+ "div",
100
+ {
101
+ id: u,
102
+ role: "region",
103
+ "aria-labelledby": i,
104
+ className: t(
105
+ "px-4 dial-small-text text-primary",
106
+ S
107
+ ),
108
+ children: I
109
+ }
110
+ ) }) })
95
111
  }
96
112
  )
97
113
  ]
@@ -99,5 +115,5 @@ const F = ({
99
115
  );
100
116
  };
101
117
  export {
102
- F as Accordion
118
+ J as Accordion
103
119
  };