@layers-app/shared 0.4.1 → 0.4.3

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/dist/components/AnimatedFigurePage/AnimatedFigurePage.module.css.js +13 -13
  2. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.d.ts.map +1 -1
  3. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.js +15 -16
  4. package/dist/components/AttachmentsGalleryModal/components/ModalHeader.d.ts.map +1 -1
  5. package/dist/components/AttachmentsGalleryModal/components/ModalHeader.js +55 -59
  6. package/dist/components/AttachmentsGalleryModal/styles.module.css.js +24 -22
  7. package/dist/components/ColorPicker/ColorPicker.d.ts.map +1 -1
  8. package/dist/components/ColorPicker/ColorPicker.js +109 -83
  9. package/dist/components/ColorPicker/ColorPickerList.d.ts.map +1 -1
  10. package/dist/components/ColorPicker/ColorPickerList.js +62 -63
  11. package/dist/components/ColorPicker/ColorPickerToolbar.d.ts.map +1 -1
  12. package/dist/components/ColorPicker/ColorPickerToolbar.js +128 -120
  13. package/dist/components/ColorPicker/icons.js +3 -3
  14. package/dist/components/ColorPicker/types.d.ts +3 -1
  15. package/dist/components/ColorPicker/types.d.ts.map +1 -1
  16. package/dist/components/ColorPicker/types.js +11 -5
  17. package/dist/components/CommentComposer/CommentEditorHotkeys.d.ts.map +1 -1
  18. package/dist/components/CommentComposer/CommentEditorHotkeys.js +55 -45
  19. package/dist/components/EmojiPicker/EmojiPanel.js +6 -6
  20. package/dist/components/EmojiPicker/IconsPanel.js +11 -11
  21. package/dist/components/FilePicker/FilePicker.d.ts +3 -1
  22. package/dist/components/FilePicker/FilePicker.d.ts.map +1 -1
  23. package/dist/components/FilePicker/FilePicker.js +44 -42
  24. package/dist/components/FilePicker/FilePickerUpload.d.ts +3 -1
  25. package/dist/components/FilePicker/FilePickerUpload.d.ts.map +1 -1
  26. package/dist/components/FilePicker/FilePickerUpload.js +28 -28
  27. package/dist/components/FormViewer/helpers/steps.d.ts.map +1 -1
  28. package/dist/components/FormViewer/helpers/steps.js +11 -11
  29. package/dist/components/LanguagePicker/LanguagePicker.d.ts +13 -3
  30. package/dist/components/LanguagePicker/LanguagePicker.d.ts.map +1 -1
  31. package/dist/components/LanguagePicker/LanguagePicker.js +65 -43
  32. package/dist/components/MusicPlayerBar/MusicPlayerBar.d.ts +3 -0
  33. package/dist/components/MusicPlayerBar/MusicPlayerBar.d.ts.map +1 -0
  34. package/dist/components/MusicPlayerBar/MusicPlayerBar.js +239 -0
  35. package/dist/components/MusicPlayerBar/MusicPlayerBar.module.css.js +49 -0
  36. package/dist/components/MusicPlayerBar/components/HiddenAudio.d.ts +10 -0
  37. package/dist/components/MusicPlayerBar/components/HiddenAudio.d.ts.map +1 -0
  38. package/dist/components/MusicPlayerBar/components/HiddenAudio.js +35 -0
  39. package/dist/components/MusicPlayerBar/components/HoverActions.d.ts +20 -0
  40. package/dist/components/MusicPlayerBar/components/HoverActions.d.ts.map +1 -0
  41. package/dist/components/MusicPlayerBar/components/HoverActions.js +88 -0
  42. package/dist/components/MusicPlayerBar/components/MobileActionsDrawer.d.ts +18 -0
  43. package/dist/components/MusicPlayerBar/components/MobileActionsDrawer.d.ts.map +1 -0
  44. package/dist/components/MusicPlayerBar/components/MobileActionsDrawer.js +91 -0
  45. package/dist/components/MusicPlayerBar/components/MobileSpeedDrawer.d.ts +11 -0
  46. package/dist/components/MusicPlayerBar/components/MobileSpeedDrawer.d.ts.map +1 -0
  47. package/dist/components/MusicPlayerBar/components/MobileSpeedDrawer.js +38 -0
  48. package/dist/components/MusicPlayerBar/components/MobileTailControls.d.ts +11 -0
  49. package/dist/components/MusicPlayerBar/components/MobileTailControls.d.ts.map +1 -0
  50. package/dist/components/MusicPlayerBar/components/MobileTailControls.js +50 -0
  51. package/dist/components/MusicPlayerBar/components/PlayButton.d.ts +9 -0
  52. package/dist/components/MusicPlayerBar/components/PlayButton.d.ts.map +1 -0
  53. package/dist/components/MusicPlayerBar/components/PlayButton.js +28 -0
  54. package/dist/components/MusicPlayerBar/components/SpeedPopover.d.ts +11 -0
  55. package/dist/components/MusicPlayerBar/components/SpeedPopover.d.ts.map +1 -0
  56. package/dist/components/MusicPlayerBar/components/SpeedPopover.js +90 -0
  57. package/dist/components/MusicPlayerBar/components/Timer.d.ts +8 -0
  58. package/dist/components/MusicPlayerBar/components/Timer.d.ts.map +1 -0
  59. package/dist/components/MusicPlayerBar/components/Timer.js +25 -0
  60. package/dist/components/MusicPlayerBar/components/VolumePopover.d.ts +15 -0
  61. package/dist/components/MusicPlayerBar/components/VolumePopover.d.ts.map +1 -0
  62. package/dist/components/MusicPlayerBar/components/VolumePopover.js +86 -0
  63. package/dist/components/MusicPlayerBar/components/Waveform.d.ts +12 -0
  64. package/dist/components/MusicPlayerBar/components/Waveform.d.ts.map +1 -0
  65. package/dist/components/MusicPlayerBar/components/Waveform.js +47 -0
  66. package/dist/components/MusicPlayerBar/constants.d.ts +19 -0
  67. package/dist/components/MusicPlayerBar/constants.d.ts.map +1 -0
  68. package/dist/components/MusicPlayerBar/constants.js +21 -0
  69. package/dist/components/MusicPlayerBar/helpers.d.ts +11 -0
  70. package/dist/components/MusicPlayerBar/helpers.d.ts.map +1 -0
  71. package/dist/components/MusicPlayerBar/helpers.js +44 -0
  72. package/dist/components/MusicPlayerBar/hooks/useAudioPlayback.d.ts +23 -0
  73. package/dist/components/MusicPlayerBar/hooks/useAudioPlayback.d.ts.map +1 -0
  74. package/dist/components/MusicPlayerBar/hooks/useAudioPlayback.js +49 -0
  75. package/dist/components/MusicPlayerBar/hooks/useCopyFeedback.d.ts +6 -0
  76. package/dist/components/MusicPlayerBar/hooks/useCopyFeedback.d.ts.map +1 -0
  77. package/dist/components/MusicPlayerBar/hooks/useCopyFeedback.js +17 -0
  78. package/dist/components/MusicPlayerBar/hooks/useHoverPopover.d.ts +9 -0
  79. package/dist/components/MusicPlayerBar/hooks/useHoverPopover.d.ts.map +1 -0
  80. package/dist/components/MusicPlayerBar/hooks/useHoverPopover.js +18 -0
  81. package/dist/components/MusicPlayerBar/hooks/useMusicPlayerLabels.d.ts +3 -0
  82. package/dist/components/MusicPlayerBar/hooks/useMusicPlayerLabels.d.ts.map +1 -0
  83. package/dist/components/MusicPlayerBar/hooks/useMusicPlayerLabels.js +26 -0
  84. package/dist/components/MusicPlayerBar/hooks/useWaveform.d.ts +7 -0
  85. package/dist/components/MusicPlayerBar/hooks/useWaveform.d.ts.map +1 -0
  86. package/dist/components/MusicPlayerBar/hooks/useWaveform.js +28 -0
  87. package/dist/components/MusicPlayerBar/index.d.ts +3 -0
  88. package/dist/components/MusicPlayerBar/index.d.ts.map +1 -0
  89. package/dist/components/MusicPlayerBar/types.d.ts +33 -0
  90. package/dist/components/MusicPlayerBar/types.d.ts.map +1 -0
  91. package/dist/components/NavbarResizer/NavbarResizer.js +1 -1
  92. package/dist/components/OnboardingTour/OnboardingTourFooter.d.ts +6 -1
  93. package/dist/components/OnboardingTour/OnboardingTourFooter.d.ts.map +1 -1
  94. package/dist/components/OnboardingTour/OnboardingTourFooter.js +39 -21
  95. package/dist/components/OnboardingTour/OnboardingTourWrapper.d.ts +4 -5
  96. package/dist/components/OnboardingTour/OnboardingTourWrapper.d.ts.map +1 -1
  97. package/dist/components/OnboardingTour/OnboardingTourWrapper.js +86 -118
  98. package/dist/components/OnboardingTour/index.d.ts +1 -1
  99. package/dist/components/OnboardingTour/index.d.ts.map +1 -1
  100. package/dist/components/OnboardingTour/useOnboardingTour.d.ts +4 -0
  101. package/dist/components/OnboardingTour/useOnboardingTour.d.ts.map +1 -1
  102. package/dist/components/OnboardingTour/useOnboardingTour.js +65 -36
  103. package/dist/components/UserAvatar/index.d.ts.map +1 -1
  104. package/dist/components/UserAvatar/index.js +38 -31
  105. package/dist/components/table/hooks/useColumnsResizing.d.ts.map +1 -1
  106. package/dist/components/table/hooks/useColumnsResizing.js +1 -1
  107. package/dist/config/brand.d.ts +2 -0
  108. package/dist/config/brand.d.ts.map +1 -1
  109. package/dist/config/brand.js +28 -22
  110. package/dist/config/envConfig.d.ts +4 -0
  111. package/dist/config/envConfig.d.ts.map +1 -1
  112. package/dist/helpers/isNoAccessError.d.ts +2 -0
  113. package/dist/helpers/isNoAccessError.d.ts.map +1 -0
  114. package/dist/helpers/isNoAccessError.js +7 -0
  115. package/dist/index.css +1 -1
  116. package/dist/index.d.ts +2 -2
  117. package/dist/index.d.ts.map +1 -1
  118. package/dist/index.js +454 -448
  119. package/dist/lang/locales/ui_en.json.js +6 -4
  120. package/dist/lang/locales/ui_es.json.js +8 -6
  121. package/dist/lang/locales/ui_ru.json.js +9 -7
  122. package/dist/store/featureProgress.d.ts +3 -6
  123. package/dist/store/featureProgress.d.ts.map +1 -1
  124. package/dist/store/featureProgress.js +56 -22
  125. package/dist/store/plansModal.d.ts.map +1 -1
  126. package/dist/store/plansModal.js +10 -10
  127. package/package.json +3 -3
  128. package/dist/assets/images/person.png.js +0 -4
  129. package/dist/assets/images/person2.png.js +0 -4
  130. package/dist/assets/images/person3.png.js +0 -4
  131. package/dist/assets/images/person4.png.js +0 -4
  132. package/dist/components/OnBoarding/OnBoardingPage.d.ts +0 -2
  133. package/dist/components/OnBoarding/OnBoardingPage.d.ts.map +0 -1
  134. package/dist/components/OnBoarding/OnBoardingPage.js +0 -80
  135. package/dist/components/OnBoarding/ProjectBoard.d.ts +0 -5
  136. package/dist/components/OnBoarding/ProjectBoard.d.ts.map +0 -1
  137. package/dist/components/OnBoarding/ProjectBoard.js +0 -141
  138. package/dist/components/OnBoarding/StepsNavBar.d.ts +0 -5
  139. package/dist/components/OnBoarding/StepsNavBar.d.ts.map +0 -1
  140. package/dist/components/OnBoarding/StepsNavBar.js +0 -21
  141. package/dist/components/OnBoarding/index.d.ts +0 -2
  142. package/dist/components/OnBoarding/index.d.ts.map +0 -1
  143. package/dist/components/OnBoarding/steps/AddTasks/AddTasksNav.d.ts +0 -3
  144. package/dist/components/OnBoarding/steps/AddTasks/AddTasksNav.d.ts.map +0 -1
  145. package/dist/components/OnBoarding/steps/AddTasks/AddTasksNav.js +0 -42
  146. package/dist/components/OnBoarding/steps/AddTasks/TasksListBoard.d.ts +0 -3
  147. package/dist/components/OnBoarding/steps/AddTasks/TasksListBoard.d.ts.map +0 -1
  148. package/dist/components/OnBoarding/steps/AddTasks/TasksListBoard.js +0 -51
  149. package/dist/components/OnBoarding/steps/CreateFirstProject.d.ts +0 -3
  150. package/dist/components/OnBoarding/steps/CreateFirstProject.d.ts.map +0 -1
  151. package/dist/components/OnBoarding/steps/CreateFirstProject.js +0 -45
  152. package/dist/components/OnBoarding/steps/DefineStatuses/DefineStatusesNav.d.ts +0 -3
  153. package/dist/components/OnBoarding/steps/DefineStatuses/DefineStatusesNav.d.ts.map +0 -1
  154. package/dist/components/OnBoarding/steps/DefineStatuses/DefineStatusesNav.js +0 -42
  155. package/dist/components/OnBoarding/steps/DefineStatuses/StatusBadge.d.ts +0 -9
  156. package/dist/components/OnBoarding/steps/DefineStatuses/StatusBadge.d.ts.map +0 -1
  157. package/dist/components/OnBoarding/steps/DefineStatuses/StatusBadge.js +0 -22
  158. package/dist/components/OnBoarding/steps/DefineStatuses/StatusesListBoard.d.ts +0 -3
  159. package/dist/components/OnBoarding/steps/DefineStatuses/StatusesListBoard.d.ts.map +0 -1
  160. package/dist/components/OnBoarding/steps/DefineStatuses/StatusesListBoard.js +0 -217
  161. package/dist/components/OnBoarding/steps/DifferentLayouts/DifferentLayoutsBoard.d.ts +0 -3
  162. package/dist/components/OnBoarding/steps/DifferentLayouts/DifferentLayoutsBoard.d.ts.map +0 -1
  163. package/dist/components/OnBoarding/steps/DifferentLayouts/DifferentLayoutsBoard.js +0 -16
  164. package/dist/components/OnBoarding/steps/DifferentLayouts/DifferentLayoutsNav.d.ts +0 -3
  165. package/dist/components/OnBoarding/steps/DifferentLayouts/DifferentLayoutsNav.d.ts.map +0 -1
  166. package/dist/components/OnBoarding/steps/DifferentLayouts/DifferentLayoutsNav.js +0 -56
  167. package/dist/components/OnBoarding/steps/DifferentLayouts/KanbanLayout.d.ts +0 -3
  168. package/dist/components/OnBoarding/steps/DifferentLayouts/KanbanLayout.d.ts.map +0 -1
  169. package/dist/components/OnBoarding/steps/DifferentLayouts/KanbanLayout.js +0 -272
  170. package/dist/components/OnBoarding/steps/DifferentLayouts/styles.module.css.js +0 -9
  171. package/dist/components/OnBoarding/steps/InviteUsers/BoardModal.d.ts +0 -3
  172. package/dist/components/OnBoarding/steps/InviteUsers/BoardModal.d.ts.map +0 -1
  173. package/dist/components/OnBoarding/steps/InviteUsers/BoardModal.js +0 -86
  174. package/dist/components/OnBoarding/steps/InviteUsers/InviteUsers.d.ts +0 -3
  175. package/dist/components/OnBoarding/steps/InviteUsers/InviteUsers.d.ts.map +0 -1
  176. package/dist/components/OnBoarding/steps/InviteUsers/InviteUsers.js +0 -26
  177. package/dist/components/OnBoarding/steps/SelectCategory/CategorySelect.d.ts +0 -9
  178. package/dist/components/OnBoarding/steps/SelectCategory/CategorySelect.d.ts.map +0 -1
  179. package/dist/components/OnBoarding/steps/SelectCategory/CategorySelect.js +0 -61
  180. package/dist/components/OnBoarding/steps/SelectCategory/SelectCategoryNav.d.ts +0 -3
  181. package/dist/components/OnBoarding/steps/SelectCategory/SelectCategoryNav.d.ts.map +0 -1
  182. package/dist/components/OnBoarding/steps/SelectCategory/SelectCategoryNav.js +0 -42
  183. package/dist/components/OnBoarding/steps/StartedStep.d.ts +0 -3
  184. package/dist/components/OnBoarding/steps/StartedStep.d.ts.map +0 -1
  185. package/dist/components/OnBoarding/steps/StartedStep.js +0 -71
  186. package/dist/components/OnBoarding/steps/Wrapper.d.ts +0 -15
  187. package/dist/components/OnBoarding/steps/Wrapper.d.ts.map +0 -1
  188. package/dist/components/OnBoarding/steps/Wrapper.js +0 -49
  189. package/dist/components/OnBoarding/steps/styles.module.css.js +0 -17
  190. package/dist/components/OnBoarding/styles.module.css.js +0 -15
  191. package/dist/store/onboarding.d.ts +0 -30
  192. package/dist/store/onboarding.d.ts.map +0 -1
  193. package/dist/store/onboarding.js +0 -53
@@ -1,149 +1,157 @@
1
- import { jsxs as S, jsx as r } from "react/jsx-runtime";
2
- import { forwardRef as T, useState as y, useCallback as w, useMemo as H } from "react";
3
- import { useMantineColorScheme as j, Box as h, Flex as B, Tooltip as P, UnstyledButton as U } from "@mantine/core";
4
- import { TextColorIcon as K, HighlightSwatch as z } from "./icons.js";
5
- import { normalizeColorItem as $, isDefaultColor as q } from "./types.js";
6
- import { useRecentColors as E } from "./useRecentColors.js";
7
- import c from "./ColorPicker.module.css.js";
8
- function k({
9
- isActive: s,
10
- round: m,
1
+ import { jsxs as g, jsx as r } from "react/jsx-runtime";
2
+ import { forwardRef as H, useState as j, useCallback as S, useMemo as P } from "react";
3
+ import { useTranslation as U } from "react-i18next";
4
+ import { useMantineColorScheme as q, Box as h, Flex as B, Tooltip as E, UnstyledButton as G } from "@mantine/core";
5
+ import { TextColorIcon as K, HighlightSwatch as T } from "./icons.js";
6
+ import { normalizeColorItem as w, resolveColorLabel as z, isDefaultColor as J } from "./types.js";
7
+ import { useRecentColors as O } from "./useRecentColors.js";
8
+ import n from "./ColorPicker.module.css.js";
9
+ function v({
10
+ isActive: a,
11
+ round: d,
11
12
  disabled: u,
12
- onClick: d,
13
+ onClick: f,
13
14
  children: i,
14
- tooltipLabel: f
15
+ tooltipLabel: p
15
16
  }) {
16
- const v = /* @__PURE__ */ r(
17
- U,
17
+ const b = /* @__PURE__ */ r(
18
+ G,
18
19
  {
19
20
  type: "button",
20
- className: `${c.inlineSwatch}${m ? ` ${c.inlineSwatchRound}` : ""}${s ? ` ${c.inlineSwatchActive}` : ""}`,
21
- onMouseDown: (C) => C.preventDefault(),
22
- onClick: d,
21
+ className: `${n.inlineSwatch}${d ? ` ${n.inlineSwatchRound}` : ""}${a ? ` ${n.inlineSwatchActive}` : ""}`,
22
+ onMouseDown: (m) => m.preventDefault(),
23
+ onClick: f,
23
24
  disabled: u,
24
25
  children: i
25
26
  }
26
27
  );
27
- return f ? /* @__PURE__ */ r(P, { label: f, withArrow: !0, zIndex: 300, children: v }) : v;
28
+ return p ? /* @__PURE__ */ r(E, { label: p, withArrow: !0, zIndex: 300, children: b }) : b;
28
29
  }
29
- const Y = T(({ sections: s, onChange: m, withRecentColors: u, maxRecentColors: d = 9, disabled: i, recentColorsLabel: f = "Recently used" }, v) => {
30
- const { colorScheme: C } = j(), x = C === "dark", { recentColors: D, addRecent: F } = E({ maxItems: d }), [L, I] = y(D), p = w(
31
- (e, o, t) => {
32
- u && (F(e, o, t), I((l) => {
33
- const n = l.filter(
34
- (a) => !(a.value === e && a.sectionKey === o)
35
- );
36
- return [{ value: e, sectionKey: o, border: t }, ...n].slice(0, d);
37
- })), m(e, o);
38
- },
39
- [m, u, F]
40
- ), g = H(() => {
41
- const e = {};
42
- for (const o of s) e[o.key] = o;
43
- return e;
44
- }, [s]), M = w(
45
- (e, o) => {
46
- if (!o) return;
47
- const t = g[o];
48
- if (!t) return;
49
- const l = t.colors.find((b) => $(b).value === e);
50
- if (!l) return;
51
- const { label: n, value: a } = $(l);
52
- return n || a;
53
- },
54
- [g]
55
- ), N = w(
56
- (e) => q(e) ? x ? "#FFFFFF" : "#000000" : e,
57
- [x]
58
- );
59
- return /* @__PURE__ */ S(h, { ref: v, children: [
60
- u && L.length > 0 && /* @__PURE__ */ S(h, { className: c.inlineSection, children: [
61
- /* @__PURE__ */ r(h, { className: c.inlineSectionLabel, children: f }),
62
- /* @__PURE__ */ r(B, { className: c.inlineRow, gap: 2, children: L.map((e, o) => {
63
- const t = e.sectionKey ? g[e.sectionKey] : void 0, l = t?.key === "textColor" || t?.key === "color" || e.sectionKey === "color", n = M(e.value, e.sectionKey);
64
- return l ? /* @__PURE__ */ r(
65
- k,
66
- {
67
- isActive: !1,
68
- disabled: i,
69
- tooltipLabel: n,
70
- onClick: () => p(e.value, e.sectionKey ?? ""),
71
- children: /* @__PURE__ */ r(
72
- K,
73
- {
74
- size: 20,
75
- color: N(e.value),
76
- showBorder: !0
77
- }
78
- )
79
- },
80
- `${e.sectionKey}-${e.value}-${o}`
81
- ) : /* @__PURE__ */ r(
82
- k,
83
- {
84
- isActive: !1,
85
- round: !0,
86
- disabled: i,
87
- tooltipLabel: n,
88
- onClick: () => p(e.value, e.sectionKey ?? ""),
89
- children: /* @__PURE__ */ r(
90
- z,
91
- {
92
- bgColor: e.value,
93
- borderColor: e.border || "var(--mantine-color-default-border)"
94
- }
95
- )
96
- },
97
- `${e.sectionKey}-${e.value}-${o}`
98
- );
99
- }) })
100
- ] }),
101
- s.map((e) => {
102
- const o = e.key === "highlight" || e.key === "background" || e.key === "textHighlight";
103
- return /* @__PURE__ */ S(h, { className: c.inlineSection, children: [
104
- e.label && /* @__PURE__ */ r(h, { className: c.inlineSectionLabel, children: e.label }),
105
- /* @__PURE__ */ r(B, { className: c.inlineRow, gap: 2, children: e.colors.map((t) => {
106
- const { value: l, border: n, label: a } = $(t), b = l === e.value, R = N(l), A = a || l;
107
- return o ? /* @__PURE__ */ r(
108
- k,
30
+ const oe = H(
31
+ ({
32
+ sections: a,
33
+ onChange: d,
34
+ withRecentColors: u,
35
+ maxRecentColors: f = 9,
36
+ disabled: i,
37
+ recentColorsLabel: p = "Recently used"
38
+ }, b) => {
39
+ const { t: m } = U("ui"), { colorScheme: D } = q(), x = D === "dark", { recentColors: I, addRecent: $ } = O({
40
+ maxItems: f
41
+ }), [L, M] = j(I), k = S(
42
+ (e, o, c) => {
43
+ u && ($(e, o, c), M((l) => {
44
+ const t = l.filter(
45
+ (s) => !(s.value === e && s.sectionKey === o)
46
+ );
47
+ return [{ value: e, sectionKey: o, border: c }, ...t].slice(
48
+ 0,
49
+ f
50
+ );
51
+ })), d(e, o);
52
+ },
53
+ [d, u, $]
54
+ ), C = P(() => {
55
+ const e = {};
56
+ for (const o of a) e[o.key] = o;
57
+ return e;
58
+ }, [a]), y = S(
59
+ (e, o) => {
60
+ const l = (o ? C[o] : void 0)?.colors.find(
61
+ (s) => w(s).value === e
62
+ ), t = l ? w(l).label : void 0;
63
+ return z(m, e, t);
64
+ },
65
+ [C, m]
66
+ ), F = S(
67
+ (e) => J(e) ? x ? "#FFFFFF" : "#000000" : e,
68
+ [x]
69
+ );
70
+ return /* @__PURE__ */ g(h, { ref: b, children: [
71
+ u && L.length > 0 && /* @__PURE__ */ g(h, { className: n.inlineSection, children: [
72
+ /* @__PURE__ */ r(h, { className: n.inlineSectionLabel, children: p }),
73
+ /* @__PURE__ */ r(B, { className: n.inlineRow, gap: 2, children: L.map((e, o) => {
74
+ const c = e.sectionKey ? C[e.sectionKey] : void 0, l = c?.key === "textColor" || c?.key === "color" || e.sectionKey === "color", t = y(
75
+ e.value,
76
+ e.sectionKey
77
+ );
78
+ return l ? /* @__PURE__ */ r(
79
+ v,
109
80
  {
110
- isActive: b,
111
- round: !0,
81
+ isActive: !1,
112
82
  disabled: i,
113
- tooltipLabel: A,
114
- onClick: () => p(l, e.key, n),
83
+ tooltipLabel: t,
84
+ onClick: () => k(e.value, e.sectionKey ?? ""),
115
85
  children: /* @__PURE__ */ r(
116
- z,
86
+ K,
117
87
  {
118
- bgColor: l,
119
- borderColor: n || R
88
+ size: 20,
89
+ color: F(e.value),
90
+ showBorder: !0
120
91
  }
121
92
  )
122
93
  },
123
- l
94
+ `${e.sectionKey}-${e.value}-${o}`
124
95
  ) : /* @__PURE__ */ r(
125
- k,
96
+ v,
126
97
  {
127
- isActive: b,
98
+ isActive: !1,
99
+ round: !0,
128
100
  disabled: i,
129
- tooltipLabel: A,
130
- onClick: () => p(l, e.key),
101
+ tooltipLabel: t,
102
+ onClick: () => k(e.value, e.sectionKey ?? ""),
131
103
  children: /* @__PURE__ */ r(
132
- K,
104
+ T,
133
105
  {
134
- size: 20,
135
- color: R,
136
- showBorder: !0
106
+ bgColor: e.value,
107
+ borderColor: e.border || "var(--mantine-color-default-border)"
137
108
  }
138
109
  )
139
110
  },
140
- l
111
+ `${e.sectionKey}-${e.value}-${o}`
141
112
  );
142
113
  }) })
143
- ] }, e.key);
144
- })
145
- ] });
146
- });
114
+ ] }),
115
+ a.map((e) => {
116
+ const o = e.key === "highlight" || e.key === "background" || e.key === "textHighlight";
117
+ return /* @__PURE__ */ g(h, { className: n.inlineSection, children: [
118
+ e.label && /* @__PURE__ */ r(h, { className: n.inlineSectionLabel, children: e.label }),
119
+ /* @__PURE__ */ r(B, { className: n.inlineRow, gap: 2, children: e.colors.map((c) => {
120
+ const { value: l, border: t, label: s } = w(c), N = l === e.value, R = F(l), A = z(m, l, s);
121
+ return o ? /* @__PURE__ */ r(
122
+ v,
123
+ {
124
+ isActive: N,
125
+ round: !0,
126
+ disabled: i,
127
+ tooltipLabel: A,
128
+ onClick: () => k(l, e.key, t),
129
+ children: /* @__PURE__ */ r(
130
+ T,
131
+ {
132
+ bgColor: l,
133
+ borderColor: t || R
134
+ }
135
+ )
136
+ },
137
+ l
138
+ ) : /* @__PURE__ */ r(
139
+ v,
140
+ {
141
+ isActive: N,
142
+ disabled: i,
143
+ tooltipLabel: A,
144
+ onClick: () => k(l, e.key),
145
+ children: /* @__PURE__ */ r(K, { size: 20, color: R, showBorder: !0 })
146
+ },
147
+ l
148
+ );
149
+ }) })
150
+ ] }, e.key);
151
+ })
152
+ ] });
153
+ }
154
+ );
147
155
  export {
148
- Y as ColorPickerToolbar
156
+ oe as ColorPickerToolbar
149
157
  };
@@ -21,7 +21,7 @@ function s({
21
21
  width: "19",
22
22
  height: "19",
23
23
  rx: "5.5",
24
- stroke: "var(--mantine-color-default-border)",
24
+ stroke: "var(--mantine-color-gray-4)",
25
25
  strokeWidth: "1",
26
26
  fill: "none"
27
27
  }
@@ -37,7 +37,7 @@ function s({
37
37
  }
38
38
  );
39
39
  }
40
- function d({
40
+ function w({
41
41
  size: t = 24,
42
42
  bgColor: r,
43
43
  borderColor: e
@@ -66,6 +66,6 @@ function d({
66
66
  );
67
67
  }
68
68
  export {
69
- d as HighlightSwatch,
69
+ w as HighlightSwatch,
70
70
  s as TextColorIcon
71
71
  };
@@ -1,4 +1,5 @@
1
1
  import type { FlexProps } from '@mantine/core';
2
+ import type { TFunction } from 'i18next';
2
3
  export type ColorItem = string | {
3
4
  value: string;
4
5
  label?: string;
@@ -41,9 +42,10 @@ export interface ColorPickerCompactProps extends Omit<ColorPickerBaseProps, 'sec
41
42
  }
42
43
  export declare function normalizeColorItem(item: ColorItem): {
43
44
  value: string;
44
- label: string;
45
+ label?: string;
45
46
  border?: string;
46
47
  bg?: string;
47
48
  };
48
49
  export declare function isDefaultColor(value: string): boolean;
50
+ export declare const resolveColorLabel: (t: TFunction, value: string | null | undefined, explicitLabel?: string) => string;
49
51
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/ColorPicker/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjG,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC;CAC7B;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,mBAAmB,GAAG,CAChC,KAAK,EAAE,MAAM,EACb,UAAU,CAAC,EAAE,MAAM,KAChB,IAAI,CAAC;AAEV,MAAM,WAA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M,WAAW,oBAAqB,SAAQ,oBAAoB;IAChE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,uBACf,SAAQ,IAAI,CAAC,oBAAoB,EAAE,UAAU,GAAG,kBAAkB,CAAC,EACjE,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;IAC7B,WAAW,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;CACnC;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,SAAS,GAAG;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,CAEA;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAErD;AAED,eAAO,MAAM,iBAAiB,GAC5B,GAAG,SAAS,EACZ,OAAO,MAAM,GAAG,IAAI,GAAG,SAAS,EAChC,gBAAgB,MAAM,KACrB,MAIF,CAAC"}
@@ -1,10 +1,16 @@
1
- function n(r) {
2
- return typeof r == "string" ? { value: r, label: r } : { label: r.value, ...r };
1
+ function f(r) {
2
+ return typeof r == "string" ? { value: r } : r;
3
3
  }
4
- function l(r) {
4
+ function e(r) {
5
5
  return r === "inherit" || r === "" || r === "default";
6
6
  }
7
+ const s = (r, o, n) => {
8
+ if (n) return n;
9
+ const t = !o || e(o) ? "standard" : o;
10
+ return r(`colorPicker.colors.${t}`, { defaultValue: o || "" });
11
+ };
7
12
  export {
8
- l as isDefaultColor,
9
- n as normalizeColorItem
13
+ e as isDefaultColor,
14
+ f as normalizeColorItem,
15
+ s as resolveColorLabel
10
16
  };
@@ -1 +1 @@
1
- {"version":3,"file":"CommentEditorHotkeys.d.ts","sourceRoot":"","sources":["../../../src/components/CommentComposer/CommentEditorHotkeys.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAIjD,OAAO,EAAE,oBAA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IAChB,UAAU,EAAE,OAAO,CAAC;IACpB,EAAE,EAAE,MAAM,CAAC;CACZ,4CA2KA,CAAC"}
@@ -1,63 +1,72 @@
1
1
  import { jsx as S } from "react/jsx-runtime";
2
- import { useRef as x, useEffect as m } from "react";
3
- import { useTranslation as D } from "react-i18next";
4
- import { openRemoveConfirmModal as g } from "../modals/RemoveConfirmModal.js";
2
+ import { useRef as C, useEffect as u } from "react";
3
+ import { useTranslation as k } from "react-i18next";
4
+ import { openRemoveConfirmModal as P } from "../modals/RemoveConfirmModal.js";
5
5
  import w from "./CommentComposer.module.css.js";
6
- const W = ({
7
- children: y,
8
- onSubmit: v,
9
- editorRef: a,
10
- commentDraft: l,
6
+ const M = ({
7
+ children: b,
8
+ onSubmit: E,
9
+ editorRef: m,
10
+ commentDraft: f,
11
11
  onBlur: c,
12
- inputContainerRef: C,
13
- isFloat: f,
12
+ inputContainerRef: p,
13
+ isFloat: v,
14
14
  isEdit: i,
15
15
  hasChanges: s,
16
- ns: P
16
+ ns: y
17
17
  }) => {
18
- const p = x(null), L = i || f, { t: r } = D(P);
19
- return m(() => {
20
- const o = (e) => {
18
+ const d = C(null), L = i || v, { t: r } = k(y);
19
+ return u(() => {
20
+ const t = (e) => {
21
21
  if (e.code === "Enter" && !e.shiftKey) {
22
22
  if (e.stopPropagation(), i ? s : !s) return;
23
- p.current && p.current.contains(document.activeElement) && (e.preventDefault(), v());
23
+ d.current && d.current.contains(document.activeElement) && (e.preventDefault(), E());
24
24
  }
25
25
  };
26
- return document.addEventListener("keydown", o), () => document.removeEventListener("keydown", o);
27
- }, [v, i, s]), m(() => {
26
+ return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
27
+ }, [E, i, s]), u(() => {
28
28
  if (!L) return;
29
- const o = a.current;
30
- o && setTimeout(() => {
31
- o.focus(() => ({ defaultSelection: "rootEnd" }));
29
+ const t = m.current;
30
+ t && setTimeout(() => {
31
+ t.focus(() => ({ defaultSelection: "rootEnd" }));
32
32
  }, 100);
33
- }, []), m(() => {
34
- const o = a.current;
35
- if (!o) return;
33
+ }, []), u(() => {
34
+ const t = m.current;
35
+ if (!t) return;
36
36
  const e = () => setTimeout(() => {
37
- o.focus(() => ({ defaultSelection: "rootEnd" }));
38
- }, 0), t = (u) => {
39
- const n = u.target;
37
+ t.focus(() => ({ defaultSelection: "rootEnd" }));
38
+ }, 0), o = (a) => {
39
+ const n = a.target;
40
40
  if (!n || n.closest("button") || n.closest("[data-no-focus]")) return;
41
41
  if (n.closest("[data-editor-spacer='true']")) {
42
42
  e();
43
43
  return;
44
44
  }
45
- const d = n.closest(`.${w.commentComposerWrapper}`);
46
- if (!d) return;
47
- const E = d.querySelector("[data-comment-footer]");
48
- if (!E || !E.contains(n)) return;
49
- d.querySelector(`.${w.imagePreviewWrapper}`) || d.querySelector(`.${w.filePreviewWrapper}`) || e();
45
+ const l = n.closest(`.${w.commentComposerWrapper}`);
46
+ if (!l) return;
47
+ const g = l.querySelector("[data-comment-footer]");
48
+ if (!g || !g.contains(n)) return;
49
+ l.querySelector(`.${w.imagePreviewWrapper}`) || l.querySelector(`.${w.filePreviewWrapper}`) || e();
50
50
  };
51
- return document.addEventListener("mousedown", t), () => document.removeEventListener("mousedown", t);
52
- }, [a]), m(() => {
53
- const o = (e) => {
54
- const t = e.target;
55
- if (!t) return;
56
- const u = C.current;
57
- if (u && !u.contains(t) && !(t.closest(".mantine-Modal-root") || t.closest(".floating-text-format-popup") || t.closest('[data-test-id="floating-link-dropdown"]'))) {
51
+ return document.addEventListener("mousedown", o), () => document.removeEventListener("mousedown", o);
52
+ }, [m]), u(() => {
53
+ const t = d.current;
54
+ if (!t) return;
55
+ const e = () => {
56
+ requestAnimationFrame(() => {
57
+ p.current?.scrollIntoView({ block: "nearest" });
58
+ });
59
+ };
60
+ return t.addEventListener("paste", e), () => t.removeEventListener("paste", e);
61
+ }, [p]), u(() => {
62
+ const t = (e) => {
63
+ const o = e.target;
64
+ if (!o) return;
65
+ const a = p.current;
66
+ if (a && !a.contains(o) && !(o.closest(".mantine-Modal-root") || o.closest(".floating-text-format-popup") || o.closest('[data-test-id="floating-link-dropdown"]'))) {
58
67
  if (i) {
59
68
  if (!s) {
60
- e.stopPropagation(), e.preventDefault(), g({
69
+ e.stopPropagation(), e.preventDefault(), P({
61
70
  title: r("composer.discardTitle"),
62
71
  children: r("composer.discardDescription"),
63
72
  labels: {
@@ -75,9 +84,9 @@ const W = ({
75
84
  c?.();
76
85
  return;
77
86
  }
78
- if (f) {
79
- if (l.text.trim() !== "" || (l.files?.length ?? 0) > 0) {
80
- e.stopPropagation(), e.preventDefault(), g({
87
+ if (v) {
88
+ if (f.text.trim() !== "" || (f.files?.length ?? 0) > 0) {
89
+ e.stopPropagation(), e.preventDefault(), P({
81
90
  title: r("editor.composer.discardCommentTitle"),
82
91
  children: r("editor.composer.discardCommentDescription"),
83
92
  labels: {
@@ -93,11 +102,12 @@ const W = ({
93
102
  c?.();
94
103
  return;
95
104
  }
105
+ o.closest('button, [role="button"]') && (window.getSelection()?.removeAllRanges(), document.activeElement?.blur());
96
106
  }
97
107
  };
98
- return document.addEventListener("mousedown", o), () => document.removeEventListener("mousedown", o);
99
- }, [i, f, s, l, c]), /* @__PURE__ */ S("div", { ref: p, children: y });
108
+ return document.addEventListener("mousedown", t), () => document.removeEventListener("mousedown", t);
109
+ }, [i, v, s, f, c]), /* @__PURE__ */ S("div", { ref: d, children: b });
100
110
  };
101
111
  export {
102
- W as CommentEditorHandler
112
+ M as CommentEditorHandler
103
113
  };
@@ -3,8 +3,8 @@ import { useState as d, useRef as p, useEffect as R, useCallback as K } from "re
3
3
  import { useTranslation as L } from "react-i18next";
4
4
  import { Search01Icon as U, ShuffleIcon as V, Clock01Icon as W, SmileIcon as X, Pizza01Icon as Z, FootballIcon as _, Airplane01Icon as ee, BulbIcon as te, Asterisk02Icon as oe, Flag02Icon as re } from "@hugeicons/core-free-icons";
5
5
  import { HugeiconsIcon as c } from "@hugeicons/react";
6
- import { Stack as v, FocusTrap as ne, Flex as z, TextInput as ie, Tooltip as ce, ActionIcon as A, Paper as F, Text as q, SimpleGrid as N } from "@mantine/core";
7
- import { useEvent as se } from "draggable-ui";
6
+ import { useEvent as ne } from "@layers-app/draggable-ui";
7
+ import { Stack as v, FocusTrap as ie, Flex as z, TextInput as ce, Tooltip as se, ActionIcon as A, Paper as F, Text as q, SimpleGrid as N } from "@mantine/core";
8
8
  import ae from "fuse.js";
9
9
  import le from "../../assets/svg/dog.svg.js";
10
10
  import { pickRandomEmoji as fe } from "../../helpers/pickRandomEmoji.js";
@@ -80,7 +80,7 @@ const he = [
80
80
  }
81
81
  },
82
82
  [a]
83
- ), D = se((e) => {
83
+ ), D = ne((e) => {
84
84
  const o = e.currentTarget.getAttribute("data-icon");
85
85
  o && (C?.(
86
86
  de.stringify({
@@ -114,7 +114,7 @@ const he = [
114
114
  }), r !== x.current && (x.current = r, k(r));
115
115
  }, J = typeof m == "string";
116
116
  return /* @__PURE__ */ y(v, { gap: 0, h: "100%", children: [
117
- /* @__PURE__ */ t(ne, { active: !0, children: /* @__PURE__ */ y(
117
+ /* @__PURE__ */ t(ie, { active: !0, children: /* @__PURE__ */ y(
118
118
  z,
119
119
  {
120
120
  my: "sm",
@@ -125,7 +125,7 @@ const he = [
125
125
  h: 38,
126
126
  children: [
127
127
  /* @__PURE__ */ t(
128
- ie,
128
+ ce,
129
129
  {
130
130
  leftSection: /* @__PURE__ */ t(c, { size: 16, icon: U }),
131
131
  value: S,
@@ -142,7 +142,7 @@ const he = [
142
142
  radius: "var(--mantine-radius-default)"
143
143
  }
144
144
  ),
145
- /* @__PURE__ */ t(ce, { withArrow: !0, label: u?.random || G("random"), children: /* @__PURE__ */ t(
145
+ /* @__PURE__ */ t(se, { withArrow: !0, label: u?.random || G("random"), children: /* @__PURE__ */ t(
146
146
  A,
147
147
  {
148
148
  h: 36,
@@ -3,8 +3,8 @@ import { memo as M, useState as x, useEffect as U, useCallback as V, useMemo as
3
3
  import { useTranslation as G } from "react-i18next";
4
4
  import { Search01Icon as Q, ShuffleIcon as Y } from "@hugeicons/core-free-icons";
5
5
  import { HugeiconsIcon as L } from "@hugeicons/react";
6
- import { useMantineTheme as _, parseThemeColor as J, darken as K, Stack as y, Text as b, Flex as z, FocusTrap as W, TextInput as X, Tooltip as Z, ActionIcon as ee, Box as oe, Paper as E, SimpleGrid as N } from "@mantine/core";
7
- import { useEvent as te } from "draggable-ui";
6
+ import { useEvent as _ } from "@layers-app/draggable-ui";
7
+ import { useMantineTheme as J, parseThemeColor as K, darken as W, Stack as y, Text as b, Flex as z, FocusTrap as X, TextInput as Z, Tooltip as ee, ActionIcon as oe, Box as te, Paper as E, SimpleGrid as N } from "@mantine/core";
8
8
  import { groupBy as re } from "lodash-es";
9
9
  import { DEFAULT_VALUES as ie } from "../../constants.js";
10
10
  import { ColorPicker as ne } from "../ColorPicker/ColorPicker.js";
@@ -31,7 +31,7 @@ const Ce = M(
31
31
  project: r,
32
32
  keepOpenOnRandom: C = !1
33
33
  }) => {
34
- const w = _(), [f, R] = x(""), { t: k } = G("ui"), [P, $] = x(
34
+ const w = J(), [f, R] = x(""), { t: k } = G("ui"), [P, $] = x(
35
35
  []
36
36
  );
37
37
  U(() => {
@@ -57,7 +57,7 @@ const Ce = M(
57
57
  S(v.map((d) => d.n));
58
58
  },
59
59
  [r]
60
- ), i = I.parse(u), g = te((o) => {
60
+ ), i = I.parse(u), g = _((o) => {
61
61
  const t = o.currentTarget.getAttribute("data-icon");
62
62
  t && (l?.(
63
63
  I.stringify({
@@ -66,7 +66,7 @@ const Ce = M(
66
66
  type: i?.type || A.FILLED
67
67
  })
68
68
  ), a || p());
69
- }), n = J({
69
+ }), n = K({
70
70
  color: i?.color || ie.COLORS[0],
71
71
  theme: w
72
72
  }), O = j(() => n.isThemeColor ? {
@@ -74,7 +74,7 @@ const Ce = M(
74
74
  "--icon-color-hover": `var(--mantine-color-${n.color}-filled-hover)`
75
75
  } : {
76
76
  "--icon-color": n.value,
77
- "--icon-color-hover": K(n.value, 0.2)
77
+ "--icon-color-hover": W(n.value, 0.2)
78
78
  }, [n]), q = async () => {
79
79
  const o = await ae(r);
80
80
  S([]), l?.(I.stringify({ icon: o, color: i?.color })), !a && !C && p();
@@ -112,8 +112,8 @@ const Ce = M(
112
112
  )
113
113
  ] }),
114
114
  /* @__PURE__ */ m(z, { w: "100%", justify: "space-between", gap: 4, px: 8, h: 38, children: [
115
- /* @__PURE__ */ e(W, { active: !0, children: /* @__PURE__ */ e(
116
- X,
115
+ /* @__PURE__ */ e(X, { active: !0, children: /* @__PURE__ */ e(
116
+ Z,
117
117
  {
118
118
  leftSection: /* @__PURE__ */ e(L, { size: 16, icon: Q }),
119
119
  value: f,
@@ -130,8 +130,8 @@ const Ce = M(
130
130
  radius: "var(--mantine-radius-default)"
131
131
  }
132
132
  ) }),
133
- /* @__PURE__ */ e(Z, { withArrow: !0, label: c?.random || k("random"), children: /* @__PURE__ */ e(
134
- ee,
133
+ /* @__PURE__ */ e(ee, { withArrow: !0, label: c?.random || k("random"), children: /* @__PURE__ */ e(
134
+ oe,
135
135
  {
136
136
  h: 36,
137
137
  w: 36,
@@ -150,7 +150,7 @@ const Ce = M(
150
150
  }
151
151
  ) })
152
152
  ] }),
153
- /* @__PURE__ */ e(oe, { h: "100%", pl: 8, pt: 4, style: O, children: /* @__PURE__ */ e(
153
+ /* @__PURE__ */ e(te, { h: "100%", pl: 8, pt: 4, style: O, children: /* @__PURE__ */ e(
154
154
  y,
155
155
  {
156
156
  mah: "210px",
@@ -1,4 +1,5 @@
1
1
  import { PropsWithChildren } from 'react';
2
+ import { type IconSvgElement } from '@hugeicons/react';
2
3
  import { FlexProps, FloatingPosition, PopoverProps } from '@mantine/core';
3
4
  import { DropzoneProps, FileWithPath } from '@mantine/dropzone';
4
5
  import type { BreadcrumbItem, MediaFile } from '../MediaLibrary/types';
@@ -56,7 +57,8 @@ export type FilePickerProps = PropsWithChildren<{
56
57
  };
57
58
  inline?: boolean;
58
59
  tab?: TabType | string;
60
+ uploadIcon?: IconSvgElement;
59
61
  }>;
60
- export declare const FilePicker: ({ onChange, onRemove, onUpload, uploading, showTabs, children, width, position, readOnly, hasImage, giphyToken: _giphyToken, unsplashClientId: _unsplashClientId, type, galleryCollection, isValidMediaUrl, popoverProps, dropZoneProps, targetProps, onOpenedChange, googleDrive, mediaLibrary, inline, tab: tabProp, }: PropsWithChildren<FilePickerProps>) => import("react/jsx-runtime").JSX.Element;
62
+ export declare const FilePicker: ({ onChange, onRemove, onUpload, uploading, showTabs, children, width, position, readOnly, hasImage, giphyToken: _giphyToken, unsplashClientId: _unsplashClientId, type, galleryCollection, isValidMediaUrl, popoverProps, dropZoneProps, targetProps, onOpenedChange, googleDrive, mediaLibrary, inline, tab: tabProp, uploadIcon, }: PropsWithChildren<FilePickerProps>) => import("react/jsx-runtime").JSX.Element;
61
63
  export {};
62
64
  //# sourceMappingURL=FilePicker.d.ts.map