@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.
- package/dist/components/AnimatedFigurePage/AnimatedFigurePage.module.css.js +13 -13
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.d.ts.map +1 -1
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.js +15 -16
- package/dist/components/AttachmentsGalleryModal/components/ModalHeader.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ModalHeader.js +55 -59
- package/dist/components/AttachmentsGalleryModal/styles.module.css.js +24 -22
- package/dist/components/ColorPicker/ColorPicker.d.ts.map +1 -1
- package/dist/components/ColorPicker/ColorPicker.js +109 -83
- package/dist/components/ColorPicker/ColorPickerList.d.ts.map +1 -1
- package/dist/components/ColorPicker/ColorPickerList.js +62 -63
- package/dist/components/ColorPicker/ColorPickerToolbar.d.ts.map +1 -1
- package/dist/components/ColorPicker/ColorPickerToolbar.js +128 -120
- package/dist/components/ColorPicker/icons.js +3 -3
- package/dist/components/ColorPicker/types.d.ts +3 -1
- package/dist/components/ColorPicker/types.d.ts.map +1 -1
- package/dist/components/ColorPicker/types.js +11 -5
- package/dist/components/CommentComposer/CommentEditorHotkeys.d.ts.map +1 -1
- package/dist/components/CommentComposer/CommentEditorHotkeys.js +55 -45
- package/dist/components/EmojiPicker/EmojiPanel.js +6 -6
- package/dist/components/EmojiPicker/IconsPanel.js +11 -11
- package/dist/components/FilePicker/FilePicker.d.ts +3 -1
- package/dist/components/FilePicker/FilePicker.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePicker.js +44 -42
- package/dist/components/FilePicker/FilePickerUpload.d.ts +3 -1
- package/dist/components/FilePicker/FilePickerUpload.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerUpload.js +28 -28
- package/dist/components/FormViewer/helpers/steps.d.ts.map +1 -1
- package/dist/components/FormViewer/helpers/steps.js +11 -11
- package/dist/components/LanguagePicker/LanguagePicker.d.ts +13 -3
- package/dist/components/LanguagePicker/LanguagePicker.d.ts.map +1 -1
- package/dist/components/LanguagePicker/LanguagePicker.js +65 -43
- package/dist/components/MusicPlayerBar/MusicPlayerBar.d.ts +3 -0
- package/dist/components/MusicPlayerBar/MusicPlayerBar.d.ts.map +1 -0
- package/dist/components/MusicPlayerBar/MusicPlayerBar.js +239 -0
- package/dist/components/MusicPlayerBar/MusicPlayerBar.module.css.js +49 -0
- package/dist/components/MusicPlayerBar/components/HiddenAudio.d.ts +10 -0
- package/dist/components/MusicPlayerBar/components/HiddenAudio.d.ts.map +1 -0
- package/dist/components/MusicPlayerBar/components/HiddenAudio.js +35 -0
- package/dist/components/MusicPlayerBar/components/HoverActions.d.ts +20 -0
- package/dist/components/MusicPlayerBar/components/HoverActions.d.ts.map +1 -0
- package/dist/components/MusicPlayerBar/components/HoverActions.js +88 -0
- package/dist/components/MusicPlayerBar/components/MobileActionsDrawer.d.ts +18 -0
- package/dist/components/MusicPlayerBar/components/MobileActionsDrawer.d.ts.map +1 -0
- package/dist/components/MusicPlayerBar/components/MobileActionsDrawer.js +91 -0
- package/dist/components/MusicPlayerBar/components/MobileSpeedDrawer.d.ts +11 -0
- package/dist/components/MusicPlayerBar/components/MobileSpeedDrawer.d.ts.map +1 -0
- package/dist/components/MusicPlayerBar/components/MobileSpeedDrawer.js +38 -0
- package/dist/components/MusicPlayerBar/components/MobileTailControls.d.ts +11 -0
- package/dist/components/MusicPlayerBar/components/MobileTailControls.d.ts.map +1 -0
- package/dist/components/MusicPlayerBar/components/MobileTailControls.js +50 -0
- package/dist/components/MusicPlayerBar/components/PlayButton.d.ts +9 -0
- package/dist/components/MusicPlayerBar/components/PlayButton.d.ts.map +1 -0
- package/dist/components/MusicPlayerBar/components/PlayButton.js +28 -0
- package/dist/components/MusicPlayerBar/components/SpeedPopover.d.ts +11 -0
- package/dist/components/MusicPlayerBar/components/SpeedPopover.d.ts.map +1 -0
- package/dist/components/MusicPlayerBar/components/SpeedPopover.js +90 -0
- package/dist/components/MusicPlayerBar/components/Timer.d.ts +8 -0
- package/dist/components/MusicPlayerBar/components/Timer.d.ts.map +1 -0
- package/dist/components/MusicPlayerBar/components/Timer.js +25 -0
- package/dist/components/MusicPlayerBar/components/VolumePopover.d.ts +15 -0
- package/dist/components/MusicPlayerBar/components/VolumePopover.d.ts.map +1 -0
- package/dist/components/MusicPlayerBar/components/VolumePopover.js +86 -0
- package/dist/components/MusicPlayerBar/components/Waveform.d.ts +12 -0
- package/dist/components/MusicPlayerBar/components/Waveform.d.ts.map +1 -0
- package/dist/components/MusicPlayerBar/components/Waveform.js +47 -0
- package/dist/components/MusicPlayerBar/constants.d.ts +19 -0
- package/dist/components/MusicPlayerBar/constants.d.ts.map +1 -0
- package/dist/components/MusicPlayerBar/constants.js +21 -0
- package/dist/components/MusicPlayerBar/helpers.d.ts +11 -0
- package/dist/components/MusicPlayerBar/helpers.d.ts.map +1 -0
- package/dist/components/MusicPlayerBar/helpers.js +44 -0
- package/dist/components/MusicPlayerBar/hooks/useAudioPlayback.d.ts +23 -0
- package/dist/components/MusicPlayerBar/hooks/useAudioPlayback.d.ts.map +1 -0
- package/dist/components/MusicPlayerBar/hooks/useAudioPlayback.js +49 -0
- package/dist/components/MusicPlayerBar/hooks/useCopyFeedback.d.ts +6 -0
- package/dist/components/MusicPlayerBar/hooks/useCopyFeedback.d.ts.map +1 -0
- package/dist/components/MusicPlayerBar/hooks/useCopyFeedback.js +17 -0
- package/dist/components/MusicPlayerBar/hooks/useHoverPopover.d.ts +9 -0
- package/dist/components/MusicPlayerBar/hooks/useHoverPopover.d.ts.map +1 -0
- package/dist/components/MusicPlayerBar/hooks/useHoverPopover.js +18 -0
- package/dist/components/MusicPlayerBar/hooks/useMusicPlayerLabels.d.ts +3 -0
- package/dist/components/MusicPlayerBar/hooks/useMusicPlayerLabels.d.ts.map +1 -0
- package/dist/components/MusicPlayerBar/hooks/useMusicPlayerLabels.js +26 -0
- package/dist/components/MusicPlayerBar/hooks/useWaveform.d.ts +7 -0
- package/dist/components/MusicPlayerBar/hooks/useWaveform.d.ts.map +1 -0
- package/dist/components/MusicPlayerBar/hooks/useWaveform.js +28 -0
- package/dist/components/MusicPlayerBar/index.d.ts +3 -0
- package/dist/components/MusicPlayerBar/index.d.ts.map +1 -0
- package/dist/components/MusicPlayerBar/types.d.ts +33 -0
- package/dist/components/MusicPlayerBar/types.d.ts.map +1 -0
- package/dist/components/NavbarResizer/NavbarResizer.js +1 -1
- package/dist/components/OnboardingTour/OnboardingTourFooter.d.ts +6 -1
- package/dist/components/OnboardingTour/OnboardingTourFooter.d.ts.map +1 -1
- package/dist/components/OnboardingTour/OnboardingTourFooter.js +39 -21
- package/dist/components/OnboardingTour/OnboardingTourWrapper.d.ts +4 -5
- package/dist/components/OnboardingTour/OnboardingTourWrapper.d.ts.map +1 -1
- package/dist/components/OnboardingTour/OnboardingTourWrapper.js +86 -118
- package/dist/components/OnboardingTour/index.d.ts +1 -1
- package/dist/components/OnboardingTour/index.d.ts.map +1 -1
- package/dist/components/OnboardingTour/useOnboardingTour.d.ts +4 -0
- package/dist/components/OnboardingTour/useOnboardingTour.d.ts.map +1 -1
- package/dist/components/OnboardingTour/useOnboardingTour.js +65 -36
- package/dist/components/UserAvatar/index.d.ts.map +1 -1
- package/dist/components/UserAvatar/index.js +38 -31
- package/dist/components/table/hooks/useColumnsResizing.d.ts.map +1 -1
- package/dist/components/table/hooks/useColumnsResizing.js +1 -1
- package/dist/config/brand.d.ts +2 -0
- package/dist/config/brand.d.ts.map +1 -1
- package/dist/config/brand.js +28 -22
- package/dist/config/envConfig.d.ts +4 -0
- package/dist/config/envConfig.d.ts.map +1 -1
- package/dist/helpers/isNoAccessError.d.ts +2 -0
- package/dist/helpers/isNoAccessError.d.ts.map +1 -0
- package/dist/helpers/isNoAccessError.js +7 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +454 -448
- package/dist/lang/locales/ui_en.json.js +6 -4
- package/dist/lang/locales/ui_es.json.js +8 -6
- package/dist/lang/locales/ui_ru.json.js +9 -7
- package/dist/store/featureProgress.d.ts +3 -6
- package/dist/store/featureProgress.d.ts.map +1 -1
- package/dist/store/featureProgress.js +56 -22
- package/dist/store/plansModal.d.ts.map +1 -1
- package/dist/store/plansModal.js +10 -10
- package/package.json +3 -3
- package/dist/assets/images/person.png.js +0 -4
- package/dist/assets/images/person2.png.js +0 -4
- package/dist/assets/images/person3.png.js +0 -4
- package/dist/assets/images/person4.png.js +0 -4
- package/dist/components/OnBoarding/OnBoardingPage.d.ts +0 -2
- package/dist/components/OnBoarding/OnBoardingPage.d.ts.map +0 -1
- package/dist/components/OnBoarding/OnBoardingPage.js +0 -80
- package/dist/components/OnBoarding/ProjectBoard.d.ts +0 -5
- package/dist/components/OnBoarding/ProjectBoard.d.ts.map +0 -1
- package/dist/components/OnBoarding/ProjectBoard.js +0 -141
- package/dist/components/OnBoarding/StepsNavBar.d.ts +0 -5
- package/dist/components/OnBoarding/StepsNavBar.d.ts.map +0 -1
- package/dist/components/OnBoarding/StepsNavBar.js +0 -21
- package/dist/components/OnBoarding/index.d.ts +0 -2
- package/dist/components/OnBoarding/index.d.ts.map +0 -1
- package/dist/components/OnBoarding/steps/AddTasks/AddTasksNav.d.ts +0 -3
- package/dist/components/OnBoarding/steps/AddTasks/AddTasksNav.d.ts.map +0 -1
- package/dist/components/OnBoarding/steps/AddTasks/AddTasksNav.js +0 -42
- package/dist/components/OnBoarding/steps/AddTasks/TasksListBoard.d.ts +0 -3
- package/dist/components/OnBoarding/steps/AddTasks/TasksListBoard.d.ts.map +0 -1
- package/dist/components/OnBoarding/steps/AddTasks/TasksListBoard.js +0 -51
- package/dist/components/OnBoarding/steps/CreateFirstProject.d.ts +0 -3
- package/dist/components/OnBoarding/steps/CreateFirstProject.d.ts.map +0 -1
- package/dist/components/OnBoarding/steps/CreateFirstProject.js +0 -45
- package/dist/components/OnBoarding/steps/DefineStatuses/DefineStatusesNav.d.ts +0 -3
- package/dist/components/OnBoarding/steps/DefineStatuses/DefineStatusesNav.d.ts.map +0 -1
- package/dist/components/OnBoarding/steps/DefineStatuses/DefineStatusesNav.js +0 -42
- package/dist/components/OnBoarding/steps/DefineStatuses/StatusBadge.d.ts +0 -9
- package/dist/components/OnBoarding/steps/DefineStatuses/StatusBadge.d.ts.map +0 -1
- package/dist/components/OnBoarding/steps/DefineStatuses/StatusBadge.js +0 -22
- package/dist/components/OnBoarding/steps/DefineStatuses/StatusesListBoard.d.ts +0 -3
- package/dist/components/OnBoarding/steps/DefineStatuses/StatusesListBoard.d.ts.map +0 -1
- package/dist/components/OnBoarding/steps/DefineStatuses/StatusesListBoard.js +0 -217
- package/dist/components/OnBoarding/steps/DifferentLayouts/DifferentLayoutsBoard.d.ts +0 -3
- package/dist/components/OnBoarding/steps/DifferentLayouts/DifferentLayoutsBoard.d.ts.map +0 -1
- package/dist/components/OnBoarding/steps/DifferentLayouts/DifferentLayoutsBoard.js +0 -16
- package/dist/components/OnBoarding/steps/DifferentLayouts/DifferentLayoutsNav.d.ts +0 -3
- package/dist/components/OnBoarding/steps/DifferentLayouts/DifferentLayoutsNav.d.ts.map +0 -1
- package/dist/components/OnBoarding/steps/DifferentLayouts/DifferentLayoutsNav.js +0 -56
- package/dist/components/OnBoarding/steps/DifferentLayouts/KanbanLayout.d.ts +0 -3
- package/dist/components/OnBoarding/steps/DifferentLayouts/KanbanLayout.d.ts.map +0 -1
- package/dist/components/OnBoarding/steps/DifferentLayouts/KanbanLayout.js +0 -272
- package/dist/components/OnBoarding/steps/DifferentLayouts/styles.module.css.js +0 -9
- package/dist/components/OnBoarding/steps/InviteUsers/BoardModal.d.ts +0 -3
- package/dist/components/OnBoarding/steps/InviteUsers/BoardModal.d.ts.map +0 -1
- package/dist/components/OnBoarding/steps/InviteUsers/BoardModal.js +0 -86
- package/dist/components/OnBoarding/steps/InviteUsers/InviteUsers.d.ts +0 -3
- package/dist/components/OnBoarding/steps/InviteUsers/InviteUsers.d.ts.map +0 -1
- package/dist/components/OnBoarding/steps/InviteUsers/InviteUsers.js +0 -26
- package/dist/components/OnBoarding/steps/SelectCategory/CategorySelect.d.ts +0 -9
- package/dist/components/OnBoarding/steps/SelectCategory/CategorySelect.d.ts.map +0 -1
- package/dist/components/OnBoarding/steps/SelectCategory/CategorySelect.js +0 -61
- package/dist/components/OnBoarding/steps/SelectCategory/SelectCategoryNav.d.ts +0 -3
- package/dist/components/OnBoarding/steps/SelectCategory/SelectCategoryNav.d.ts.map +0 -1
- package/dist/components/OnBoarding/steps/SelectCategory/SelectCategoryNav.js +0 -42
- package/dist/components/OnBoarding/steps/StartedStep.d.ts +0 -3
- package/dist/components/OnBoarding/steps/StartedStep.d.ts.map +0 -1
- package/dist/components/OnBoarding/steps/StartedStep.js +0 -71
- package/dist/components/OnBoarding/steps/Wrapper.d.ts +0 -15
- package/dist/components/OnBoarding/steps/Wrapper.d.ts.map +0 -1
- package/dist/components/OnBoarding/steps/Wrapper.js +0 -49
- package/dist/components/OnBoarding/steps/styles.module.css.js +0 -17
- package/dist/components/OnBoarding/styles.module.css.js +0 -15
- package/dist/store/onboarding.d.ts +0 -30
- package/dist/store/onboarding.d.ts.map +0 -1
- package/dist/store/onboarding.js +0 -53
|
@@ -1,149 +1,157 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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:
|
|
13
|
+
onClick: f,
|
|
13
14
|
children: i,
|
|
14
|
-
tooltipLabel:
|
|
15
|
+
tooltipLabel: p
|
|
15
16
|
}) {
|
|
16
|
-
const
|
|
17
|
-
|
|
17
|
+
const b = /* @__PURE__ */ r(
|
|
18
|
+
G,
|
|
18
19
|
{
|
|
19
20
|
type: "button",
|
|
20
|
-
className: `${
|
|
21
|
-
onMouseDown: (
|
|
22
|
-
onClick:
|
|
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
|
|
28
|
+
return p ? /* @__PURE__ */ r(E, { label: p, withArrow: !0, zIndex: 300, children: b }) : b;
|
|
28
29
|
}
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
[
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
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:
|
|
111
|
-
round: !0,
|
|
81
|
+
isActive: !1,
|
|
112
82
|
disabled: i,
|
|
113
|
-
tooltipLabel:
|
|
114
|
-
onClick: () =>
|
|
83
|
+
tooltipLabel: t,
|
|
84
|
+
onClick: () => k(e.value, e.sectionKey ?? ""),
|
|
115
85
|
children: /* @__PURE__ */ r(
|
|
116
|
-
|
|
86
|
+
K,
|
|
117
87
|
{
|
|
118
|
-
|
|
119
|
-
|
|
88
|
+
size: 20,
|
|
89
|
+
color: F(e.value),
|
|
90
|
+
showBorder: !0
|
|
120
91
|
}
|
|
121
92
|
)
|
|
122
93
|
},
|
|
123
|
-
|
|
94
|
+
`${e.sectionKey}-${e.value}-${o}`
|
|
124
95
|
) : /* @__PURE__ */ r(
|
|
125
|
-
|
|
96
|
+
v,
|
|
126
97
|
{
|
|
127
|
-
isActive:
|
|
98
|
+
isActive: !1,
|
|
99
|
+
round: !0,
|
|
128
100
|
disabled: i,
|
|
129
|
-
tooltipLabel:
|
|
130
|
-
onClick: () =>
|
|
101
|
+
tooltipLabel: t,
|
|
102
|
+
onClick: () => k(e.value, e.sectionKey ?? ""),
|
|
131
103
|
children: /* @__PURE__ */ r(
|
|
132
|
-
|
|
104
|
+
T,
|
|
133
105
|
{
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
showBorder: !0
|
|
106
|
+
bgColor: e.value,
|
|
107
|
+
borderColor: e.border || "var(--mantine-color-default-border)"
|
|
137
108
|
}
|
|
138
109
|
)
|
|
139
110
|
},
|
|
140
|
-
|
|
111
|
+
`${e.sectionKey}-${e.value}-${o}`
|
|
141
112
|
);
|
|
142
113
|
}) })
|
|
143
|
-
] },
|
|
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
|
-
|
|
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-
|
|
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
|
|
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
|
-
|
|
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
|
|
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;
|
|
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;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,MAAM,MAAM,SAAS,GACjB,MAAM,GACN;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;AAEpE,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,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;AAE/E,MAAM,WAAW,oBAAoB;IACnC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC;IACrB,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,mBAAmB,CAAC;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,sBACf,SAAQ,oBAAoB,EAC1B,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;IAC7B,WAAW,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAClC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,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
|
|
2
|
-
return typeof r == "string" ? { value: r
|
|
1
|
+
function f(r) {
|
|
2
|
+
return typeof r == "string" ? { value: r } : r;
|
|
3
3
|
}
|
|
4
|
-
function
|
|
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
|
-
|
|
9
|
-
|
|
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,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAI/C,eAAO,MAAM,oBAAoB,GAAI,8GAWlC;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IACvC,iBAAiB,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAC/C,YAAY,EAAE;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,oBAAoB,CAAC,iBAAiB,EAAE,CAAC;KACjD,CAAC;IACF,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,OAAO,CAAC;IACpB,EAAE,EAAE,MAAM,CAAC;CACZ,
|
|
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,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAI/C,eAAO,MAAM,oBAAoB,GAAI,8GAWlC;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IACvC,iBAAiB,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAC/C,YAAY,EAAE;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,oBAAoB,CAAC,iBAAiB,EAAE,CAAC;KACjD,CAAC;IACF,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;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
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import { openRemoveConfirmModal as
|
|
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
|
|
7
|
-
children:
|
|
8
|
-
onSubmit:
|
|
9
|
-
editorRef:
|
|
10
|
-
commentDraft:
|
|
6
|
+
const M = ({
|
|
7
|
+
children: b,
|
|
8
|
+
onSubmit: E,
|
|
9
|
+
editorRef: m,
|
|
10
|
+
commentDraft: f,
|
|
11
11
|
onBlur: c,
|
|
12
|
-
inputContainerRef:
|
|
13
|
-
isFloat:
|
|
12
|
+
inputContainerRef: p,
|
|
13
|
+
isFloat: v,
|
|
14
14
|
isEdit: i,
|
|
15
15
|
hasChanges: s,
|
|
16
|
-
ns:
|
|
16
|
+
ns: y
|
|
17
17
|
}) => {
|
|
18
|
-
const
|
|
19
|
-
return
|
|
20
|
-
const
|
|
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
|
-
|
|
23
|
+
d.current && d.current.contains(document.activeElement) && (e.preventDefault(), E());
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
|
-
return document.addEventListener("keydown",
|
|
27
|
-
}, [
|
|
26
|
+
return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
|
|
27
|
+
}, [E, i, s]), u(() => {
|
|
28
28
|
if (!L) return;
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
const t = m.current;
|
|
30
|
+
t && setTimeout(() => {
|
|
31
|
+
t.focus(() => ({ defaultSelection: "rootEnd" }));
|
|
32
32
|
}, 100);
|
|
33
|
-
}, []),
|
|
34
|
-
const
|
|
35
|
-
if (!
|
|
33
|
+
}, []), u(() => {
|
|
34
|
+
const t = m.current;
|
|
35
|
+
if (!t) return;
|
|
36
36
|
const e = () => setTimeout(() => {
|
|
37
|
-
|
|
38
|
-
}, 0),
|
|
39
|
-
const n =
|
|
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
|
|
46
|
-
if (!
|
|
47
|
-
const
|
|
48
|
-
if (!
|
|
49
|
-
|
|
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",
|
|
52
|
-
}, [
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
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(),
|
|
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 (
|
|
79
|
-
if (
|
|
80
|
-
e.stopPropagation(), e.preventDefault(),
|
|
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",
|
|
99
|
-
}, [i,
|
|
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
|
-
|
|
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 {
|
|
7
|
-
import {
|
|
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 =
|
|
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(
|
|
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
|
-
|
|
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(
|
|
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 {
|
|
7
|
-
import {
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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":
|
|
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(
|
|
116
|
-
|
|
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(
|
|
134
|
-
|
|
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(
|
|
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
|