@layers-app/shared 0.4.0 → 0.4.2
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/AnimatedFigurePage/useParallax.d.ts +2 -2
- package/dist/components/AppContainer/AppContainer.d.ts +6 -1
- package/dist/components/AppContainer/AppContainer.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppSidebarButton.d.ts +4 -1
- package/dist/components/AppContainer/components/AppSidebarButton.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppSidebarButton.js +22 -15
- package/dist/components/AppContainer/components/AppsSidebar/AppsSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/AppsSection.js +22 -21
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +48 -91
- package/dist/components/AppContainer/components/ToolbarNewButton.d.ts +7 -2
- package/dist/components/AppContainer/components/ToolbarNewButton.d.ts.map +1 -1
- package/dist/components/AppContainer/components/ToolbarNewButton.js +14 -14
- package/dist/components/AttachmentsGalleryModal/components/GallerySlide.d.ts +3 -1
- package/dist/components/AttachmentsGalleryModal/components/GallerySlide.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/GallerySlide.js +96 -64
- package/dist/components/AttachmentsGalleryModal/components/ModalHeader.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ModalHeader.js +76 -67
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.d.ts +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.js +35 -26
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.d.ts +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.js +43 -36
- package/dist/components/AttachmentsGalleryModal/components/UnsupportedSection.d.ts +7 -0
- package/dist/components/AttachmentsGalleryModal/components/UnsupportedSection.d.ts.map +1 -0
- package/dist/components/AttachmentsGalleryModal/components/UnsupportedSection.js +17 -0
- package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.d.ts +4 -0
- package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.js +59 -20
- package/dist/components/AttachmentsGalleryModal/styles.module.css.js +34 -22
- package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts.map +1 -1
- package/dist/components/AttachmentsPreview/AttachmentsPreview.js +22 -18
- package/dist/components/ColorPicker/ColorPicker.d.ts +12 -11
- 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/CommentComposer/useVirtualAnchor.d.ts +1 -1
- package/dist/components/CommentComposer/useVirtualAnchor.d.ts.map +1 -1
- package/dist/components/EmojiPicker/EmojiPicker.d.ts +1 -1
- package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
- package/dist/components/EntityIcon.d.ts.map +1 -1
- package/dist/components/EntityIcon.js +43 -33
- 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/conditions.d.ts +38 -38
- package/dist/components/FormViewer/helpers/helpers.d.ts +38 -38
- package/dist/components/FormViewer/helpers/steps.d.ts +38 -38
- package/dist/components/FormViewer/hooks/useActiveControl.d.ts +19 -19
- package/dist/components/FormViewer/hooks/useActiveStep.d.ts +38 -38
- package/dist/components/FormViewer/hooks/useFormGlobalTheme.d.ts +6 -0
- package/dist/components/FormViewer/hooks/useFormGlobalTheme.d.ts.map +1 -1
- package/dist/components/FormViewer/hooks/useFormGlobalTheme.js +4 -3
- package/dist/components/FormViewer/hooks/useFormMobile.d.ts +1 -1
- package/dist/components/FormViewer/hooks/useFormMobile.d.ts.map +1 -1
- package/dist/components/FormViewer/store/formStore.d.ts +248 -248
- package/dist/components/FormViewer/store/formStoreApi.d.ts +124 -124
- package/dist/components/FormViewer/store/selectors.d.ts +11655 -11655
- package/dist/components/FormViewer/types/form.d.ts +1 -1
- package/dist/components/FormViewer/types/form.d.ts.map +1 -1
- package/dist/components/FormViewer/types/schemes.d.ts +381 -6358
- package/dist/components/FormViewer/types/schemes.d.ts.map +1 -1
- package/dist/components/FormViewer/types/schemes.js +1 -1
- package/dist/components/GroupAvatar/index.d.ts +3 -1
- package/dist/components/GroupAvatar/index.d.ts.map +1 -1
- package/dist/components/GroupAvatar/index.js +24 -21
- 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/MediaLibrary/MediaLibraryRow.js +7 -7
- package/dist/components/NavMenu/NavMenu.d.ts +3 -1
- package/dist/components/NavMenu/NavMenu.d.ts.map +1 -1
- package/dist/components/NavMenu/components/DnDProvider.d.ts +1 -1
- package/dist/components/NavMenu/components/DnDProvider.d.ts.map +1 -1
- package/dist/components/NavMenu/components/NavMenuActionIcon.d.ts +7 -1
- package/dist/components/NavMenu/components/NavMenuActionIcon.d.ts.map +1 -1
- package/dist/components/NavMenu/components/NavMenuActionIcon.js +21 -23
- package/dist/components/NewColorPicker/components/Target.d.ts +3 -1
- package/dist/components/NewColorPicker/components/Target.d.ts.map +1 -1
- package/dist/components/NewColorPicker/components/Target.js +48 -43
- package/dist/components/Notification/Notification.js +3 -1
- package/dist/components/Notification/NotificationCard.d.ts +3 -1
- package/dist/components/Notification/NotificationCard.d.ts.map +1 -1
- package/dist/components/Notification/NotificationCard.js +87 -86
- 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 +83 -119
- 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/ProjectIcon/ProjectIcon.d.ts +7 -12
- package/dist/components/ProjectIcon/ProjectIcon.d.ts.map +1 -1
- package/dist/components/ProjectIcon/ProjectIcon.js +58 -60
- package/dist/components/UserAvatar/index.d.ts +2 -1
- package/dist/components/UserAvatar/index.d.ts.map +1 -1
- package/dist/components/UserAvatar/index.js +42 -32
- package/dist/components/WorkspaceAvatar/WorkspaceAvatar.d.ts +3 -3
- package/dist/components/WorkspaceAvatar/WorkspaceAvatar.d.ts.map +1 -1
- package/dist/components/WorkspaceAvatar/WorkspaceAvatar.js +19 -18
- package/dist/components/WorkspaceMenu/WorkspaceItem.js +17 -17
- package/dist/components/WorkspaceMenu/WorkspaceMenu.js +7 -7
- 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 +12 -0
- package/dist/config/envConfig.d.ts.map +1 -1
- package/dist/config/envConfig.js +21 -13
- package/dist/helpers/getFileIcons.d.ts.map +1 -1
- package/dist/helpers/getFileIcons.js +63 -45
- package/dist/helpers/getFileType.d.ts +1 -1
- package/dist/helpers/getFileType.d.ts.map +1 -1
- package/dist/helpers/getFileType.js +29 -8
- package/dist/helpers/getPartOfTheDay.d.ts +1 -1
- package/dist/helpers/offlineSuppression.d.ts +3 -0
- package/dist/helpers/offlineSuppression.d.ts.map +1 -0
- package/dist/helpers/offlineSuppression.js +8 -0
- package/dist/helpers/platform.d.ts +1 -1
- package/dist/helpers/platform.d.ts.map +1 -1
- package/dist/helpers/platform.js +5 -4
- package/dist/helpers/showNotifications.d.ts.map +1 -1
- package/dist/helpers/showNotifications.js +30 -29
- package/dist/hooks/useOutsideClick.d.ts +1 -1
- package/dist/hooks/useOutsideClick.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +462 -451
- package/dist/lang/locales/ui_en.json.js +1 -1
- package/dist/lang/locales/ui_es.json.js +1 -1
- package/dist/lang/locales/ui_ru.json.js +1 -1
- package/dist/node_modules/countries-and-timezones/esm/index.js +281 -4011
- 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 +13 -13
|
@@ -1,38 +1,32 @@
|
|
|
1
1
|
import { jsxs as y, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
|
|
2
|
+
import { useTranslation as g } from "react-i18next";
|
|
3
|
+
import { Tick02Icon as k } from "@hugeicons/core-free-icons";
|
|
4
|
+
import { HugeiconsIcon as x } from "@hugeicons/react";
|
|
5
|
+
import { useMantineColorScheme as L, Box as F, useMantineTheme as N, getThemeColor as S, ColorSwatch as T } from "@mantine/core";
|
|
6
|
+
import { TextColorIcon as z } from "./icons.js";
|
|
7
|
+
import { resolveColorLabel as D, isDefaultColor as b, normalizeColorItem as $ } from "./types.js";
|
|
8
|
+
import { useRecentColors as w } from "./useRecentColors.js";
|
|
9
|
+
import a from "./ColorPicker.module.css.js";
|
|
10
|
+
function j({
|
|
10
11
|
type: e,
|
|
11
12
|
colorValue: l,
|
|
12
|
-
resolvedColor:
|
|
13
|
-
border:
|
|
13
|
+
resolvedColor: n,
|
|
14
|
+
border: i,
|
|
14
15
|
bg: c
|
|
15
16
|
}) {
|
|
16
17
|
if (e === "text")
|
|
17
|
-
return /* @__PURE__ */ t(
|
|
18
|
-
|
|
19
|
-
{
|
|
20
|
-
size: 16,
|
|
21
|
-
color: a,
|
|
22
|
-
showBorder: !0
|
|
23
|
-
}
|
|
24
|
-
);
|
|
25
|
-
const n = b(l);
|
|
18
|
+
return /* @__PURE__ */ t(z, { size: 16, color: n, showBorder: !0 });
|
|
19
|
+
const s = b(l);
|
|
26
20
|
return /* @__PURE__ */ t(
|
|
27
|
-
|
|
21
|
+
T,
|
|
28
22
|
{
|
|
29
|
-
color:
|
|
23
|
+
color: s ? "var(--mantine-color-body)" : c || i || l,
|
|
30
24
|
size: 16,
|
|
31
25
|
radius: "xl",
|
|
32
|
-
className:
|
|
26
|
+
className: a.listItemSwatch,
|
|
33
27
|
styles: {
|
|
34
28
|
root: {
|
|
35
|
-
border: `1.5px solid ${
|
|
29
|
+
border: `1.5px solid ${s ? "var(--mantine-color-default-border)" : i || n}`
|
|
36
30
|
},
|
|
37
31
|
alphaOverlay: { display: "none" },
|
|
38
32
|
shadowOverlay: { display: "none" }
|
|
@@ -43,92 +37,97 @@ function z({
|
|
|
43
37
|
function v({
|
|
44
38
|
section: e,
|
|
45
39
|
columns: l,
|
|
46
|
-
onChange:
|
|
47
|
-
isDark:
|
|
40
|
+
onChange: n,
|
|
41
|
+
isDark: i
|
|
48
42
|
}) {
|
|
49
|
-
const c =
|
|
50
|
-
return /* @__PURE__ */ y("div", { className:
|
|
51
|
-
e.label && /* @__PURE__ */ t("div", { className:
|
|
43
|
+
const c = N(), { t: s } = g("ui"), d = l > 1;
|
|
44
|
+
return /* @__PURE__ */ y("div", { className: a.section, children: [
|
|
45
|
+
e.label && /* @__PURE__ */ t("div", { className: a.sectionLabel, children: e.label }),
|
|
52
46
|
/* @__PURE__ */ t(
|
|
53
47
|
"div",
|
|
54
48
|
{
|
|
55
|
-
className:
|
|
56
|
-
style:
|
|
57
|
-
children: e.colors.map((
|
|
58
|
-
const {
|
|
49
|
+
className: d ? a.grid : void 0,
|
|
50
|
+
style: d ? { gridTemplateColumns: `repeat(${l}, minmax(0, 1fr))` } : void 0,
|
|
51
|
+
children: e.colors.map((u) => {
|
|
52
|
+
const {
|
|
53
|
+
value: o,
|
|
54
|
+
label: f,
|
|
55
|
+
border: p,
|
|
56
|
+
bg: h
|
|
57
|
+
} = $(u), r = b(o), m = o === e.value, C = r ? i ? "#FFFFFF" : "#000000" : S(o, c), I = D(s, o, f);
|
|
59
58
|
return /* @__PURE__ */ y(
|
|
60
59
|
"button",
|
|
61
60
|
{
|
|
62
61
|
type: "button",
|
|
63
|
-
className: `${
|
|
64
|
-
onClick: () =>
|
|
62
|
+
className: `${a.listItem} ${m ? a.listItemActive : ""}`,
|
|
63
|
+
onClick: () => n(o, e.key),
|
|
65
64
|
children: [
|
|
66
65
|
/* @__PURE__ */ t(
|
|
67
|
-
|
|
66
|
+
j,
|
|
68
67
|
{
|
|
69
68
|
type: e.type,
|
|
70
|
-
colorValue:
|
|
71
|
-
resolvedColor:
|
|
72
|
-
border:
|
|
73
|
-
bg:
|
|
69
|
+
colorValue: o,
|
|
70
|
+
resolvedColor: C,
|
|
71
|
+
border: p,
|
|
72
|
+
bg: h
|
|
74
73
|
}
|
|
75
74
|
),
|
|
76
|
-
/* @__PURE__ */ t("span", { className:
|
|
77
|
-
|
|
78
|
-
|
|
75
|
+
/* @__PURE__ */ t("span", { className: a.listItemLabel, children: I }),
|
|
76
|
+
m && /* @__PURE__ */ t(
|
|
77
|
+
x,
|
|
79
78
|
{
|
|
80
79
|
size: 16,
|
|
81
|
-
icon:
|
|
80
|
+
icon: k,
|
|
82
81
|
color: "var(--mantine-primary-color-filled)"
|
|
83
82
|
}
|
|
84
83
|
)
|
|
85
84
|
]
|
|
86
85
|
},
|
|
87
|
-
|
|
86
|
+
o
|
|
88
87
|
);
|
|
89
88
|
})
|
|
90
89
|
}
|
|
91
90
|
)
|
|
92
91
|
] });
|
|
93
92
|
}
|
|
94
|
-
function
|
|
93
|
+
function q({
|
|
95
94
|
sections: e,
|
|
96
95
|
colors: l,
|
|
97
|
-
value:
|
|
98
|
-
onChange:
|
|
96
|
+
value: n,
|
|
97
|
+
onChange: i,
|
|
99
98
|
columns: c = 1,
|
|
100
|
-
withRecentColors:
|
|
99
|
+
withRecentColors: s
|
|
101
100
|
}) {
|
|
102
|
-
const { colorScheme:
|
|
103
|
-
|
|
104
|
-
}, h = e || (l ? [{ key: "default", label: "", colors: l, value:
|
|
105
|
-
return /* @__PURE__ */ y(
|
|
106
|
-
|
|
101
|
+
const { colorScheme: d } = L(), u = d === "dark", { recentColors: o, addRecent: f } = w(), p = (r, m) => {
|
|
102
|
+
s && f(r, m), i?.(r, m);
|
|
103
|
+
}, h = e || (l ? [{ key: "default", label: "", colors: l, value: n }] : []);
|
|
104
|
+
return /* @__PURE__ */ y(F, { children: [
|
|
105
|
+
s && o.length > 0 && /* @__PURE__ */ t(
|
|
107
106
|
v,
|
|
108
107
|
{
|
|
109
108
|
section: {
|
|
110
109
|
key: "__recent",
|
|
111
110
|
label: "Recently used",
|
|
112
|
-
colors:
|
|
113
|
-
value:
|
|
111
|
+
colors: o.map((r) => r.value),
|
|
112
|
+
value: n
|
|
114
113
|
},
|
|
115
114
|
columns: 1,
|
|
116
|
-
onChange:
|
|
117
|
-
isDark:
|
|
115
|
+
onChange: p,
|
|
116
|
+
isDark: u
|
|
118
117
|
}
|
|
119
118
|
),
|
|
120
|
-
h.map((
|
|
119
|
+
h.map((r) => /* @__PURE__ */ t(
|
|
121
120
|
v,
|
|
122
121
|
{
|
|
123
|
-
section:
|
|
122
|
+
section: r,
|
|
124
123
|
columns: c,
|
|
125
|
-
onChange:
|
|
126
|
-
isDark:
|
|
124
|
+
onChange: p,
|
|
125
|
+
isDark: u
|
|
127
126
|
},
|
|
128
|
-
|
|
127
|
+
r.key
|
|
129
128
|
))
|
|
130
129
|
] });
|
|
131
130
|
}
|
|
132
131
|
export {
|
|
133
|
-
|
|
132
|
+
q as ColorPickerList
|
|
134
133
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPickerToolbar.d.ts","sourceRoot":"","sources":["../../../src/components/ColorPicker/ColorPickerToolbar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ColorPickerToolbar.d.ts","sourceRoot":"","sources":["../../../src/components/ColorPicker/ColorPickerToolbar.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAMjE;6DAC6D;AAC7D,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAsCD,eAAO,MAAM,kBAAkB,oHA+L9B,CAAC"}
|
|
@@ -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
|
-
D,
|
|
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"}
|