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

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 (193) hide show
  1. package/README.md +190 -0
  2. package/dist/CHANGELOG.md +73 -0
  3. package/dist/DateCellRenderer-DFknFcs1.cjs +1 -0
  4. package/dist/{DateCellRenderer-BVM-Q8yx.cjs → DateCellRenderer-J9A5gyDz.cjs} +31 -31
  5. package/dist/IconButton-DHOFapLo.cjs +1 -0
  6. package/dist/{JsonEditor-qv1Z0dLX.cjs → JsonEditor-BDe6elKO.cjs} +1 -1
  7. package/dist/{MarkdownEditor-DHn2pYOJ.cjs → MarkdownEditor-C7BONfsl.cjs} +1 -1
  8. package/dist/{MarkdownEditor-jQ8nDJfx.cjs → MarkdownEditor-FVzYMdkC.cjs} +1 -1
  9. package/dist/{MarkdownEditorContainer-Bzcnoemw.cjs → MarkdownEditorContainer-GvlxX6kx.cjs} +1 -1
  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/New/Accordion/Accordion.js +87 -71
  20. package/dist/components/New/Avatar/Avatar.js +70 -0
  21. package/dist/components/New/Badge/Badge.js +45 -0
  22. package/dist/components/New/BottomSheet/BottomSheet.js +128 -0
  23. package/dist/components/New/Breadcrumbs/Breadcrumbs.js +159 -0
  24. package/dist/components/New/Breadcrumbs/constants.js +41 -0
  25. package/dist/components/New/Button/Button.js +32 -32
  26. package/dist/components/New/Button/ButtonWrappers.js +93 -37
  27. package/dist/components/New/Button/constants.js +3 -0
  28. package/dist/components/New/Button/utils.js +18 -8
  29. package/dist/components/New/ButtonDropdown/ButtonDropdown.js +26 -16
  30. package/dist/components/New/Calendar/Calendar.js +301 -265
  31. package/dist/components/New/Calendar/constants.js +5 -5
  32. package/dist/components/New/CaptionText/CaptionText.js +18 -15
  33. package/dist/components/New/CardShell/CardShell.js +5 -3
  34. package/dist/components/New/Checkbox/Checkbox.js +67 -56
  35. package/dist/components/New/Checkbox/CheckboxBox.js +5 -3
  36. package/dist/components/New/CloseButton/CloseButton.js +18 -16
  37. package/dist/components/New/CollapsibleSidebar/CollapsibleSidebar.js +39 -34
  38. package/dist/components/New/ConfirmationPopup/ConfirmationPopup.js +38 -37
  39. package/dist/components/New/ConfirmationPopup/constants.js +8 -11
  40. package/dist/components/New/Dropdown/Dropdown.js +112 -105
  41. package/dist/components/New/Dropdown/DropdownSubMenuItem.js +17 -17
  42. package/dist/components/New/Dropdown/constants.js +22 -17
  43. package/dist/components/New/EllipsisTooltip/EllipsisTooltip.js +20 -18
  44. package/dist/components/New/EntityIdentity/EntityIdentity.js +135 -0
  45. package/dist/components/New/FileDropzone/FileDropzone.js +27 -25
  46. package/dist/components/New/FileIcon/FileIcon.js +55 -0
  47. package/dist/components/New/FileIcon/constants.js +134 -0
  48. package/dist/components/New/FileIcon/icons/FileGlyph.js +150 -0
  49. package/dist/components/New/FileIcon/icons/FolderGlyph.js +50 -0
  50. package/dist/components/New/FileName/FileName.js +78 -0
  51. package/dist/components/New/FilterChips/FilterChips.js +43 -0
  52. package/dist/components/New/FilterChips/constants.js +5 -0
  53. package/dist/components/New/FolderName/FolderName.js +16 -0
  54. package/dist/components/New/FolderPath/FolderPath.js +29 -28
  55. package/dist/components/New/Highlight/Highlight.js +23 -30
  56. package/dist/components/New/IconButton/IconButton.js +30 -28
  57. package/dist/components/New/InfoButton/InfoButton.js +13 -11
  58. package/dist/components/New/InlineSelect/InlineSelect.js +74 -56
  59. package/dist/components/New/InteractiveTooltip/InteractiveTooltip.js +41 -39
  60. package/dist/components/New/InteractiveTooltip/constants.js +2 -2
  61. package/dist/components/New/Label/Label.js +13 -8
  62. package/dist/components/New/MenuItem/MenuItem.js +29 -27
  63. package/dist/components/New/MenuItem/constants.js +9 -8
  64. package/dist/components/New/NoDataContent/NoDataContent.js +21 -19
  65. package/dist/components/New/Notification/Notification.js +33 -29
  66. package/dist/components/New/NumberInput/NumberInput.js +42 -33
  67. package/dist/components/New/PasswordInput/PasswordInput.js +41 -35
  68. package/dist/components/New/Popup/Popup.js +46 -44
  69. package/dist/components/New/Popup/constants.js +3 -3
  70. package/dist/components/New/Radio/Radio.js +75 -64
  71. package/dist/components/New/RadioGroup/RadioGroup.js +76 -65
  72. package/dist/components/New/RadioGroupPopupField/RadioGroupPopupField.js +117 -106
  73. package/dist/components/New/ResizableContainer/ResizableContainer.js +42 -40
  74. package/dist/components/New/Search/Search.js +29 -27
  75. package/dist/components/New/SegmentedControl/SegmentedControl.js +29 -23
  76. package/dist/components/New/Select/CollapsedSelectTags.js +127 -0
  77. package/dist/components/New/Select/MultiSelectTags.js +18 -15
  78. package/dist/components/New/Select/Select.js +219 -197
  79. package/dist/components/New/Select/constants.js +23 -20
  80. package/dist/components/New/SharedEntityIndicator/SharedEntityIndicator.js +34 -0
  81. package/dist/components/New/SideDrawer/SideDrawer.js +148 -0
  82. package/dist/components/New/Switch/Switch.js +69 -58
  83. package/dist/components/New/Tabs/Tabs.js +125 -61
  84. package/dist/components/New/Tag/Tag.js +42 -40
  85. package/dist/components/New/TagInput/TagInput.js +48 -44
  86. package/dist/components/New/ToggleIconButton/ToggleIconButton.js +26 -24
  87. package/dist/components/New/Tooltip/TooltipContent.js +11 -9
  88. package/dist/components/New/Tooltip/constants.js +1 -1
  89. package/dist/components/New/TransferQueue/TransferQueue.js +124 -0
  90. package/dist/components/New/TransferQueue/TransferQueueHeader.js +71 -0
  91. package/dist/components/New/TransferQueue/TransferQueueRow.js +119 -0
  92. package/dist/components/New/TransferQueue/constants.js +24 -0
  93. package/dist/components/New/constants/overlay.js +17 -9
  94. package/dist/components/Popup/constants.js +8 -8
  95. package/dist/components/ProgressBar/ProgressBar.js +45 -33
  96. package/dist/components/SchemaRenderer/components/SchemaAdditionalPropertiesEditor.js +46 -31
  97. package/dist/components/SchemaRenderer/components/SchemaField.js +19 -19
  98. package/dist/components/SchemaRenderer/components/SchemaFieldContent.js +18 -18
  99. package/dist/components/SchemaRenderer/components/SchemaKeyValueEditor.js +223 -135
  100. package/dist/components/SchemaRenderer/types.js +19 -8
  101. package/dist/components/SchemaRenderer/utils.js +122 -95
  102. package/dist/components/Skeleton/Skeleton.js +25 -19
  103. package/dist/components/Spinner/Spinner.js +7 -5
  104. package/dist/components/Tooltip/TooltipContent.js +11 -11
  105. package/dist/components-manifest.json +1478 -59
  106. package/dist/constants/public-class-names.js +208 -0
  107. package/dist/dial-ui-kit.cjs +2 -2
  108. package/dist/dial-ui-kit.js +337 -292
  109. package/dist/editors.cjs +1 -1
  110. package/dist/file-manager.cjs +1 -1
  111. package/dist/grid.cjs +1 -1
  112. package/dist/index.css +2 -2
  113. package/dist/lazy-BEsZqouS.cjs +1 -0
  114. package/dist/merge-classes-BEJXjzkx.cjs +1 -0
  115. package/dist/migration-guides/0.15.0/legacy-theme-variable-fallbacks-removal.md +69 -0
  116. package/dist/migration-guides/README.md +1 -0
  117. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +419 -399
  118. package/dist/src/components/FileManager/FileManager.d.ts +2 -0
  119. package/dist/src/components/FileManager/FileManagerContext.d.ts +1 -0
  120. package/dist/src/components/FileManager/hooks/use-grid-context-menu.d.ts +2 -1
  121. package/dist/src/components/New/Accordion/Accordion.d.ts +6 -1
  122. package/dist/src/components/New/Avatar/Avatar.d.ts +55 -0
  123. package/dist/src/components/New/Badge/Badge.d.ts +47 -0
  124. package/dist/src/components/New/BottomSheet/BottomSheet.d.ts +84 -0
  125. package/dist/src/components/New/Breadcrumbs/Breadcrumbs.d.ts +94 -0
  126. package/dist/src/components/New/Breadcrumbs/constants.d.ts +60 -0
  127. package/dist/src/components/New/Button/Button.d.ts +4 -1
  128. package/dist/src/components/New/Button/ButtonWrappers.d.ts +20 -0
  129. package/dist/src/components/New/Button/utils.d.ts +15 -0
  130. package/dist/src/components/New/ButtonDropdown/ButtonDropdown.d.ts +4 -0
  131. package/dist/src/components/New/Calendar/Calendar.d.ts +7 -1
  132. package/dist/src/components/New/Calendar/constants.d.ts +1 -1
  133. package/dist/src/components/New/ConfirmationPopup/constants.d.ts +0 -1
  134. package/dist/src/components/New/Dropdown/Dropdown.d.ts +9 -1
  135. package/dist/src/components/New/Dropdown/constants.d.ts +3 -0
  136. package/dist/src/components/New/EntityIdentity/EntityIdentity.d.ts +85 -0
  137. package/dist/src/components/New/FileIcon/FileIcon.d.ts +61 -0
  138. package/dist/src/components/New/FileIcon/constants.d.ts +16 -0
  139. package/dist/src/components/New/FileIcon/icons/FileGlyph.d.ts +18 -0
  140. package/dist/src/components/New/FileIcon/icons/FolderGlyph.d.ts +17 -0
  141. package/dist/src/components/New/FileName/FileName.d.ts +79 -0
  142. package/dist/src/components/New/FilterChips/FilterChips.d.ts +69 -0
  143. package/dist/src/components/New/FilterChips/constants.d.ts +13 -0
  144. package/dist/src/components/New/FolderName/FolderName.d.ts +37 -0
  145. package/dist/src/components/New/InlineSelect/InlineSelect.d.ts +16 -1
  146. package/dist/src/components/New/InteractiveTooltip/constants.d.ts +5 -4
  147. package/dist/src/components/New/Notification/Notification.d.ts +18 -0
  148. package/dist/src/components/New/Popup/constants.d.ts +1 -1
  149. package/dist/src/components/New/Select/CollapsedSelectTags.d.ts +22 -0
  150. package/dist/src/components/New/Select/MultiSelectTags.d.ts +5 -0
  151. package/dist/src/components/New/Select/Select.d.ts +9 -0
  152. package/dist/src/components/New/Select/constants.d.ts +3 -2
  153. package/dist/src/components/New/SharedEntityIndicator/SharedEntityIndicator.d.ts +35 -0
  154. package/dist/src/components/New/SideDrawer/SideDrawer.d.ts +100 -0
  155. package/dist/src/components/New/Tabs/Tabs.d.ts +54 -6
  156. package/dist/src/components/New/Tooltip/constants.d.ts +5 -3
  157. package/dist/src/components/New/TransferQueue/TransferQueue.d.ts +139 -0
  158. package/dist/src/components/New/TransferQueue/TransferQueueHeader.d.ts +16 -0
  159. package/dist/src/components/New/TransferQueue/TransferQueueRow.d.ts +10 -0
  160. package/dist/src/components/New/TransferQueue/constants.d.ts +6 -0
  161. package/dist/src/components/New/constants/overlay.d.ts +13 -0
  162. package/dist/src/components/Popup/constants.d.ts +1 -1
  163. package/dist/src/components/SchemaRenderer/types.d.ts +11 -0
  164. package/dist/src/components/SchemaRenderer/utils.d.ts +10 -1
  165. package/dist/src/constants/public-class-names.d.ts +199 -0
  166. package/dist/src/index.d.ts +34 -1
  167. package/dist/src/types/accordion.d.ts +7 -0
  168. package/dist/src/types/avatar.d.ts +7 -0
  169. package/dist/src/types/badge.d.ts +16 -0
  170. package/dist/src/types/breadcrumbs.d.ts +9 -0
  171. package/dist/src/types/button.d.ts +1 -0
  172. package/dist/src/types/entity-type.d.ts +9 -0
  173. package/dist/src/types/transfer-queue.d.ts +10 -0
  174. package/dist/src/utils/__tests__/avatar.spec.d.ts +1 -0
  175. package/dist/src/utils/avatar.d.ts +12 -0
  176. package/dist/src/utils/sub-menu-floating.d.ts +7 -4
  177. package/dist/types/accordion.js +4 -0
  178. package/dist/types/avatar.js +4 -0
  179. package/dist/types/badge.js +5 -0
  180. package/dist/types/breadcrumbs.js +4 -0
  181. package/dist/types/button.js +3 -3
  182. package/dist/types/entity-type.js +4 -0
  183. package/dist/types/transfer-queue.js +4 -0
  184. package/dist/use-file-manager-tabs-Bj_ENNKt.cjs +3 -0
  185. package/dist/utils/avatar.js +22 -0
  186. package/dist/utils/merge-classes.js +12 -5
  187. package/dist/utils/sub-menu-floating.js +99 -54
  188. package/package.json +4 -7
  189. package/dist/DateCellRenderer-ssp7eaZY.cjs +0 -1
  190. package/dist/IconButton-DWqoaBWf.cjs +0 -1
  191. package/dist/lazy-tfN4sKhq.cjs +0 -1
  192. package/dist/merge-classes-Dipy1Ih1.cjs +0 -1
  193. 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,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
  };
@@ -0,0 +1,70 @@
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { useState as C } from "react";
3
+ import { DIAL_KIT_CLASS as b } from "../../../constants/public-class-names.js";
4
+ import { AvatarShape as d } from "../../../types/avatar.js";
5
+ import { pickAvatarColor as w, extractInitials as I } from "../../../utils/avatar.js";
6
+ import { mergeClasses as e } from "../../../utils/merge-classes.js";
7
+ const N = {
8
+ [d.Circle]: "rounded-full",
9
+ [d.Square]: "rounded-md"
10
+ }, E = ({
11
+ name: s,
12
+ initials: c,
13
+ src: r,
14
+ alt: t = "",
15
+ size: o = 32,
16
+ shape: f = d.Circle,
17
+ className: h,
18
+ textClassName: l,
19
+ onImageError: u
20
+ }) => {
21
+ const [S, p] = C(), v = !!r && S !== r, i = t !== "", m = (n) => e(
22
+ "inline-flex shrink-0 select-none items-center justify-center overflow-hidden",
23
+ N[f],
24
+ n,
25
+ h,
26
+ b.avatar
27
+ );
28
+ if (v)
29
+ return /* @__PURE__ */ a(
30
+ "img",
31
+ {
32
+ src: r,
33
+ alt: t,
34
+ width: o,
35
+ height: o,
36
+ className: e(m(), "object-cover"),
37
+ onError: (n) => {
38
+ p(r), u?.(n);
39
+ }
40
+ }
41
+ );
42
+ const { background: g, foreground: A } = w(s);
43
+ return /* @__PURE__ */ a(
44
+ "span",
45
+ {
46
+ role: i ? "img" : void 0,
47
+ "aria-label": i ? t : void 0,
48
+ "aria-hidden": i ? void 0 : !0,
49
+ className: m(e(g, A)),
50
+ style: {
51
+ width: o,
52
+ height: o,
53
+ fontSize: l ? void 0 : Math.round(o * 0.4)
54
+ },
55
+ children: /* @__PURE__ */ a(
56
+ "span",
57
+ {
58
+ className: e(
59
+ "leading-none",
60
+ l ?? "font-semibold"
61
+ ),
62
+ children: c ?? I(s)
63
+ }
64
+ )
65
+ }
66
+ );
67
+ };
68
+ export {
69
+ E as Avatar
70
+ };
@@ -0,0 +1,45 @@
1
+ import { jsxs as g, jsx as i } from "react/jsx-runtime";
2
+ import { DIAL_KIT_CLASS as m } from "../../../constants/public-class-names.js";
3
+ import { BadgeVariant as t, BadgeColor as e } from "../../../types/badge.js";
4
+ import { mergeClasses as x } from "../../../utils/merge-classes.js";
5
+ const b = {
6
+ [e.Blue]: "bg-blue text-blue",
7
+ [e.Green]: "bg-green-2 text-green-1",
8
+ [e.Violet]: "bg-violet-2 text-violet-1",
9
+ [e.Indigo]: "bg-violet-1 text-violet-2",
10
+ [e.Brown]: "bg-brown text-brown-2",
11
+ [e.Red]: "bg-red text-red"
12
+ }, c = {
13
+ [t.Outlined]: "rounded-md border border-tertiary bg-layer-sunken text-secondary",
14
+ [t.Filled]: "rounded-full"
15
+ }, p = {
16
+ [t.Outlined]: "dial-tiny-text",
17
+ [t.Filled]: "dial-caption-lead-semi-text"
18
+ }, L = ({
19
+ label: n,
20
+ variant: r = t.Outlined,
21
+ color: d = e.Blue,
22
+ icon: l,
23
+ textClassName: o,
24
+ className: s,
25
+ ...a
26
+ }) => /* @__PURE__ */ g(
27
+ "span",
28
+ {
29
+ ...a,
30
+ className: x(
31
+ "inline-flex h-6 w-fit shrink-0 items-center gap-1 whitespace-nowrap px-2",
32
+ c[r],
33
+ r === t.Filled && b[d],
34
+ s,
35
+ m.badge
36
+ ),
37
+ children: [
38
+ l && /* @__PURE__ */ i("span", { className: "flex shrink-0 items-center", "aria-hidden": "true", children: l }),
39
+ /* @__PURE__ */ i("span", { className: o ?? p[r], children: n })
40
+ ]
41
+ }
42
+ );
43
+ export {
44
+ L as Badge
45
+ };
@@ -0,0 +1,128 @@
1
+ import { jsx as e, jsxs as m } from "react/jsx-runtime";
2
+ import { useFloating as k, useRole as A, useDismiss as O, useInteractions as w, FloatingPortal as z, FloatingOverlay as D, FloatingFocusManager as T } from "@floating-ui/react";
3
+ import { IconArrowLeft as j } from "@tabler/icons-react";
4
+ import { useId as B } from "react";
5
+ import { CloseButton as E } from "../CloseButton/CloseButton.js";
6
+ import { DIAL_KIT_ICON_STROKE as K } from "../constants/icon.js";
7
+ import { GhostIconButton as P } from "../IconButton/IconButtonWrappers.js";
8
+ import { useThemeScope as G } from "../ThemeScope/ThemeScope.js";
9
+ import { DIAL_ICON_SIZE as R } from "../../../constants/icon.js";
10
+ import { DIAL_KIT_CLASS as M } from "../../../constants/public-class-names.js";
11
+ import { ElementSize as U } from "../../../types/size.js";
12
+ import { mergeClasses as o } from "../../../utils/merge-classes.js";
13
+ const te = ({
14
+ open: i,
15
+ onClose: a,
16
+ title: t,
17
+ ariaLabel: c,
18
+ onBack: s,
19
+ backAriaLabel: d = "Back",
20
+ closeAriaLabel: u = "Close",
21
+ closeOnOutsideClick: f = !0,
22
+ children: p,
23
+ className: h,
24
+ overlayClassName: b,
25
+ headerClassName: g,
26
+ style: x,
27
+ overlayStyle: I,
28
+ bodyClassName: S,
29
+ titleClassName: N,
30
+ portalId: v
31
+ }) => {
32
+ const y = G(), l = `bottom-sheet-title-${B()}`, { refs: n, context: r } = k({
33
+ open: i,
34
+ onOpenChange: (_) => {
35
+ _ || a();
36
+ }
37
+ }), F = A(r, { role: "dialog" }), C = O(r, { outsidePress: f }), { getFloatingProps: L } = w([F, C]);
38
+ return i ? /* @__PURE__ */ e(z, { id: v, children: /* @__PURE__ */ e(
39
+ D,
40
+ {
41
+ lockScroll: !0,
42
+ style: I,
43
+ className: o(
44
+ "z-popup flex items-end bg-backdrop",
45
+ y,
46
+ b
47
+ ),
48
+ children: /* @__PURE__ */ e(T, { context: r, initialFocus: n.floating, children: /* @__PURE__ */ m(
49
+ "div",
50
+ {
51
+ ref: n.setFloating,
52
+ ...L(),
53
+ role: "dialog",
54
+ "aria-modal": "true",
55
+ "aria-labelledby": t ? l : void 0,
56
+ "aria-label": t ? void 0 : c,
57
+ style: x,
58
+ className: o(
59
+ "flex max-h-[85dvh] w-full flex-col rounded-t-lg bg-layer-raised outline-none",
60
+ "animate-slideUp motion-reduce:animate-none",
61
+ h,
62
+ M.bottomSheet
63
+ ),
64
+ children: [
65
+ t && /* @__PURE__ */ m(
66
+ "div",
67
+ {
68
+ className: o(
69
+ "relative flex h-[60px] shrink-0 items-center justify-center border-b border-tertiary px-14",
70
+ g
71
+ ),
72
+ children: [
73
+ s && /* @__PURE__ */ e(
74
+ P,
75
+ {
76
+ "aria-label": d,
77
+ className: "absolute start-4",
78
+ onClick: s,
79
+ icon: /* @__PURE__ */ e(
80
+ j,
81
+ {
82
+ size: R.LG,
83
+ stroke: K,
84
+ className: "rtl:-scale-x-100",
85
+ "aria-hidden": "true"
86
+ }
87
+ )
88
+ }
89
+ ),
90
+ /* @__PURE__ */ e(
91
+ "h2",
92
+ {
93
+ id: l,
94
+ className: o(
95
+ "min-w-0 truncate text-primary",
96
+ N ?? "dial-body-semi-text"
97
+ ),
98
+ children: t
99
+ }
100
+ ),
101
+ /* @__PURE__ */ e(
102
+ E,
103
+ {
104
+ ariaLabel: u,
105
+ onClose: a,
106
+ size: U.Standard,
107
+ className: "absolute end-4"
108
+ }
109
+ )
110
+ ]
111
+ }
112
+ ),
113
+ /* @__PURE__ */ e(
114
+ "div",
115
+ {
116
+ className: o("min-h-0 overflow-y-auto", S),
117
+ children: p
118
+ }
119
+ )
120
+ ]
121
+ }
122
+ ) })
123
+ }
124
+ ) }) : null;
125
+ };
126
+ export {
127
+ te as BottomSheet
128
+ };