@layers-app/shared 0.3.0 → 0.3.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/assets/default-workspace-avatar.jpg.js +4 -0
- package/dist/assets/layers-logo-full.svg.js +2 -3
- package/dist/assets/layers-logo-full.svg2.js +3 -2
- package/dist/assets/layers-logo-icon.svg.js +2 -3
- package/dist/assets/layers-logo-icon.svg2.js +3 -2
- package/dist/assets/projects/figureA.svg.js +4 -0
- package/dist/assets/projects/figureB.svg.js +4 -0
- package/dist/assets/qwebchannel.d.ts +15 -0
- package/dist/assets/qwebchannel.d.ts.map +1 -0
- package/dist/assets/taskPriorities/high.svg.js +5 -0
- package/dist/assets/taskPriorities/low.svg.js +5 -0
- package/dist/assets/taskPriorities/none.svg.js +5 -0
- package/dist/assets/taskPriorities/normal.svg.js +5 -0
- package/dist/assets/taskPriorities/urgent.svg.js +5 -0
- package/dist/components/AnimatedFigurePage/AnimatedFigurePage.d.ts +3 -0
- package/dist/components/AnimatedFigurePage/AnimatedFigurePage.d.ts.map +1 -0
- package/dist/components/AnimatedFigurePage/AnimatedFigurePage.js +69 -0
- package/dist/components/AnimatedFigurePage/AnimatedFigurePage.module.css.js +27 -0
- package/dist/components/AnimatedFigurePage/types.d.ts +15 -0
- package/dist/components/AnimatedFigurePage/types.d.ts.map +1 -0
- package/dist/components/AnimatedFigurePage/useParallax.d.ts +6 -0
- package/dist/components/AnimatedFigurePage/useParallax.d.ts.map +1 -0
- package/dist/components/AnimatedFigurePage/useParallax.js +29 -0
- package/dist/components/AppContainer/AppContainer.d.ts +1 -1
- package/dist/components/AppContainer/AppContainer.d.ts.map +1 -1
- package/dist/components/AppContainer/AppContainer.js +37 -36
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +80 -45
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.d.ts.map +1 -1
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.js +60 -69
- package/dist/components/AppContainer/hooks/useAppContainer.d.ts +1 -1
- package/dist/components/AppContainer/hooks/useAppContainer.d.ts.map +1 -1
- package/dist/components/AppContainer/hooks/useAppContainer.js +57 -51
- package/dist/components/AppContainer/hooks/useAppContainerDataStore.d.ts.map +1 -1
- package/dist/components/AppContainer/hooks/useAppContainerDataStore.js +3 -1
- package/dist/components/AppContainer/types.d.ts +3 -0
- package/dist/components/AppContainer/types.d.ts.map +1 -1
- package/dist/components/ColorPicker/ColorPicker.d.ts +9 -1
- package/dist/components/ColorPicker/ColorPicker.d.ts.map +1 -1
- package/dist/components/ColorPicker/ColorPicker.js +88 -74
- package/dist/components/ColorPicker/ColorPicker.module.css.js +31 -0
- package/dist/components/ColorPicker/ColorPickerList.d.ts +6 -0
- package/dist/components/ColorPicker/ColorPickerList.d.ts.map +1 -0
- package/dist/components/ColorPicker/ColorPickerList.js +134 -0
- package/dist/components/ColorPicker/ColorPickerPopover.d.ts +6 -6
- package/dist/components/ColorPicker/ColorPickerPopover.d.ts.map +1 -1
- package/dist/components/ColorPicker/ColorPickerPopover.js +29 -31
- package/dist/components/ColorPicker/ColorPickerToolbar.d.ts +13 -0
- package/dist/components/ColorPicker/ColorPickerToolbar.d.ts.map +1 -0
- package/dist/components/ColorPicker/ColorPickerToolbar.js +132 -0
- package/dist/components/ColorPicker/icons.d.ts +11 -0
- package/dist/components/ColorPicker/icons.d.ts.map +1 -0
- package/dist/components/ColorPicker/icons.js +71 -0
- package/dist/components/ColorPicker/types.d.ts +49 -0
- package/dist/components/ColorPicker/types.d.ts.map +1 -0
- package/dist/components/ColorPicker/types.js +10 -0
- package/dist/components/ColorPicker/useRecentColors.d.ts +13 -0
- package/dist/components/ColorPicker/useRecentColors.d.ts.map +1 -0
- package/dist/components/ColorPicker/useRecentColors.js +39 -0
- package/dist/components/CommentComposer/index.d.ts.map +1 -1
- package/dist/components/CommentComposer/index.js +115 -111
- package/dist/components/EmojiPicker/EmojiPanel.d.ts.map +1 -1
- package/dist/components/EmojiPicker/EmojiPanel.js +12 -10
- package/dist/components/EmojiPicker/EmojiPicker.d.ts +3 -1
- package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
- package/dist/components/EmojiPicker/EmojiPicker.js +49 -46
- package/dist/components/EmojiPicker/IconsPanel.d.ts +2 -1
- package/dist/components/EmojiPicker/IconsPanel.d.ts.map +1 -1
- package/dist/components/EmojiPicker/IconsPanel.js +47 -45
- package/dist/components/EmojiPicker/custom-icons/customIcons.d.ts.map +1 -1
- package/dist/components/EmojiPicker/custom-icons/customIcons.js +66 -31
- package/dist/components/EntityIcon.d.ts +3 -3
- package/dist/components/EntityIcon.d.ts.map +1 -1
- package/dist/components/EntityIcon.js +59 -35
- package/dist/components/EntityTitle/EntityTitle.d.ts +1 -1
- package/dist/components/EntityTitle/EntityTitle.d.ts.map +1 -1
- package/dist/components/EntityTitle/EntityTitle.js +34 -34
- package/dist/components/EntityTitle/EntityTitle.module.css.js +1 -1
- package/dist/components/FilePicker/FilePicker.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePicker.js +111 -123
- package/dist/components/FilePicker/FilePickerUpload.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerUpload.js +41 -39
- package/dist/components/FormViewer/components/fields/UploadField/UploadField.d.ts.map +1 -1
- package/dist/components/FormViewer/components/fields/UploadField/UploadField.js +34 -33
- package/dist/components/FormViewer/hooks/useFormGlobalTheme.d.ts +3 -3
- package/dist/components/Logotype.d.ts +2 -1
- package/dist/components/Logotype.d.ts.map +1 -1
- package/dist/components/Logotype.js +58 -49
- package/dist/components/NavMenu/components/NavMenuItem.d.ts.map +1 -1
- package/dist/components/NavMenu/components/NavMenuItem.js +122 -107
- package/dist/components/NavMenu/types.d.ts +1 -0
- package/dist/components/NavMenu/types.d.ts.map +1 -1
- package/dist/components/ProjectIcon/ProjectIcon.js +13 -13
- package/dist/components/TreeIndent/TreeIndent.d.ts +9 -0
- package/dist/components/TreeIndent/TreeIndent.d.ts.map +1 -0
- package/dist/components/TreeIndent/TreeIndent.js +15 -0
- package/dist/components/TreeIndent/TreeIndent.module.css.js +11 -0
- package/dist/components/TreeIndent/index.d.ts +2 -0
- package/dist/components/TreeIndent/index.d.ts.map +1 -0
- package/dist/components/WorkspaceAvatar/WorkspaceAvatar.js +11 -11
- package/dist/components/WorkspaceMenu/WorkspaceMenu.d.ts.map +1 -1
- package/dist/components/WorkspaceMenu/WorkspaceMenu.js +97 -101
- package/dist/components/modals/RemoveConfirmModal.d.ts.map +1 -1
- package/dist/config/brand.d.ts +1 -0
- package/dist/config/brand.d.ts.map +1 -1
- package/dist/config/brand.js +42 -34
- package/dist/config/envConfig.d.ts +40 -0
- package/dist/config/envConfig.d.ts.map +1 -1
- package/dist/config/envConfig.js +29 -10
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +15 -4
- package/dist/helpers/getFileIcons.d.ts.map +1 -1
- package/dist/helpers/getFileIcons.js +34 -29
- package/dist/helpers/getFileType.d.ts +1 -1
- package/dist/helpers/getFileType.d.ts.map +1 -1
- package/dist/helpers/getFileType.js +3 -3
- package/dist/helpers/hotjar.d.ts.map +1 -1
- package/dist/helpers/hotjar.js +11 -7
- package/dist/helpers/platform.js +4 -4
- package/dist/helpers/showNotifications.d.ts +3 -0
- package/dist/helpers/showNotifications.d.ts.map +1 -1
- package/dist/helpers/showNotifications.js +79 -44
- package/dist/hooks/useDateFnsLocale.d.ts +2 -0
- package/dist/hooks/useDateFnsLocale.d.ts.map +1 -1
- package/dist/hooks/useDateFnsLocale.js +9 -8
- package/dist/hooks/useDateUtils.d.ts.map +1 -1
- package/dist/hooks/useDateUtils.js +19 -19
- package/dist/hooks/useFormatDistance.d.ts.map +1 -1
- package/dist/hooks/useFormatDistance.js +6 -6
- package/dist/hooks/useNumberQueryParam.d.ts +1 -1
- package/dist/hooks/useNumberQueryParam.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +516 -494
- package/dist/lang/locales/ui_en.json.js +7 -7
- package/dist/lang/locales/ui_es.json.js +1 -1
- package/dist/lang/locales/ui_ru.json.js +11 -11
- package/dist/utils/formatStorage.d.ts +9 -0
- package/dist/utils/formatStorage.d.ts.map +1 -1
- package/dist/utils/formatStorage.js +14 -10
- package/package.json +1 -1
|
@@ -16,14 +16,14 @@ export declare const useFormGlobalTheme: ({ innerId }: {
|
|
|
16
16
|
grape?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
17
17
|
green?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
18
18
|
orange?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
19
|
-
|
|
20
|
-
cyan?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
19
|
+
teal?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
21
20
|
yellow?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
22
21
|
red?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
23
22
|
dark?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
23
|
+
gray?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
24
24
|
pink?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
25
|
+
cyan?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
25
26
|
lime?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
26
|
-
teal?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
27
27
|
} | undefined;
|
|
28
28
|
primaryShade?: import("@mantine/core").MantineColorShade | {
|
|
29
29
|
light?: import("@mantine/core").MantineColorShade | undefined;
|
|
@@ -3,11 +3,12 @@ export declare const LayersLogoIcon: ({ color: _color, fontSize: _fontSize, widt
|
|
|
3
3
|
alt?: string;
|
|
4
4
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export declare const LayersLogoCopyright: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export declare const Logotype: ({ minified, isLink, to, variant, isDesktop, ...props }: FlexProps & {
|
|
6
|
+
export declare const Logotype: ({ minified, isLink, to, variant, isDesktop, forceDark, ...props }: FlexProps & {
|
|
7
7
|
minified?: boolean;
|
|
8
8
|
isLink?: boolean;
|
|
9
9
|
to?: string;
|
|
10
10
|
variant?: "default" | "copyright";
|
|
11
11
|
isDesktop?: boolean;
|
|
12
|
+
forceDark?: boolean;
|
|
12
13
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
13
14
|
//# sourceMappingURL=Logotype.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Logotype.d.ts","sourceRoot":"","sources":["../../src/components/Logotype.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAQ,SAAS,EAAQ,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"Logotype.d.ts","sourceRoot":"","sources":["../../src/components/Logotype.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAQ,SAAS,EAAQ,MAAM,eAAe,CAAC;AAmCtD,eAAO,MAAM,cAAc,GAAI,iEAM5B,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,4CAelD,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,OAAO,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,4CAavE,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,mEAQtB,SAAS,GAAG;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;IAClC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,4CAsDA,CAAC"}
|
|
@@ -1,64 +1,73 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Link as
|
|
3
|
-
import { Flex as
|
|
4
|
-
import { brand as
|
|
1
|
+
import { jsx as t, jsxs as k } from "react/jsx-runtime";
|
|
2
|
+
import { Link as b } from "react-router-dom";
|
|
3
|
+
import { Flex as g, Text as I } from "@mantine/core";
|
|
4
|
+
import { brand as o } from "../config/brand.js";
|
|
5
5
|
import { useIsDarkTheme as L } from "../helpers/themeUtils.js";
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
width: n,
|
|
18
|
-
height: n,
|
|
19
|
-
objectFit: "contain",
|
|
20
|
-
display: "block",
|
|
21
|
-
...e
|
|
6
|
+
const u = o.LogoIcon, w = o.LogoCopyright, h = ({
|
|
7
|
+
size: r = 24,
|
|
8
|
+
isDark: i
|
|
9
|
+
}) => {
|
|
10
|
+
const n = o.customIconDarkUrl, c = o.customIconUrl, e = i && n ? n : c;
|
|
11
|
+
return /* @__PURE__ */ t("span", { style: { display: "block", width: r, height: r, flexShrink: 0 }, children: e ? /* @__PURE__ */ t(
|
|
12
|
+
"img",
|
|
13
|
+
{
|
|
14
|
+
src: e,
|
|
15
|
+
alt: o.name,
|
|
16
|
+
style: { width: "100%", height: "100%", objectFit: "contain", display: "block" }
|
|
22
17
|
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const n = t.customIconDarkUrl, e = t.customIconUrl, c = s && n ? n : e;
|
|
26
|
-
return c ? /* @__PURE__ */ o(u, { src: c, alt: t.name, size: r }) : /* @__PURE__ */ o(f, { width: r, height: r });
|
|
27
|
-
}, S = ({
|
|
18
|
+
) : /* @__PURE__ */ t(u, { width: "100%", height: "100%" }) });
|
|
19
|
+
}, F = ({
|
|
28
20
|
color: r,
|
|
29
|
-
fontSize:
|
|
21
|
+
fontSize: i,
|
|
30
22
|
width: n,
|
|
31
|
-
height:
|
|
32
|
-
...
|
|
23
|
+
height: c,
|
|
24
|
+
...e
|
|
33
25
|
}) => {
|
|
34
|
-
const l = typeof n == "number" ? n : typeof
|
|
35
|
-
return
|
|
36
|
-
|
|
26
|
+
const l = typeof n == "number" ? n : typeof c == "number" ? c : 24;
|
|
27
|
+
return o.customIconUrl ? /* @__PURE__ */ t("span", { style: { display: "block", width: l, height: l, flexShrink: 0, ...e.style }, children: /* @__PURE__ */ t(
|
|
28
|
+
"img",
|
|
29
|
+
{
|
|
30
|
+
src: o.customIconUrl,
|
|
31
|
+
alt: o.name,
|
|
32
|
+
style: { width: "100%", height: "100%", objectFit: "contain", display: "block" }
|
|
33
|
+
}
|
|
34
|
+
) }) : /* @__PURE__ */ t(u, { width: n, height: c, ...e });
|
|
35
|
+
}, C = (r) => o.customIconUrl ? /* @__PURE__ */ t("span", { style: { display: "block", width: 18, height: 18, flexShrink: 0 }, children: /* @__PURE__ */ t(
|
|
36
|
+
"img",
|
|
37
|
+
{
|
|
38
|
+
src: o.customIconUrl,
|
|
39
|
+
alt: o.name,
|
|
40
|
+
style: { width: "100%", height: "100%", objectFit: "contain", display: "block" }
|
|
41
|
+
}
|
|
42
|
+
) }) : /* @__PURE__ */ t(w, { ...r }), v = ({
|
|
37
43
|
minified: r,
|
|
38
|
-
isLink:
|
|
44
|
+
isLink: i = !0,
|
|
39
45
|
to: n = "/",
|
|
40
|
-
variant:
|
|
41
|
-
isDesktop:
|
|
42
|
-
|
|
46
|
+
variant: c = "default",
|
|
47
|
+
isDesktop: e,
|
|
48
|
+
forceDark: l,
|
|
49
|
+
...m
|
|
43
50
|
}) => {
|
|
44
|
-
const
|
|
45
|
-
|
|
51
|
+
const y = L(), s = l ?? y, d = () => r ? /* @__PURE__ */ t(h, { size: e ? "100%" : 40, isDark: s }) : c === "copyright" ? /* @__PURE__ */ t(h, { size: 18, isDark: s }) : /* @__PURE__ */ k(g, { align: "center", gap: 4, children: [
|
|
52
|
+
/* @__PURE__ */ t(h, { size: 24, isDark: s }),
|
|
53
|
+
/* @__PURE__ */ t(I, { fw: 600, fz: 16, lh: 1, style: { whiteSpace: "nowrap" }, children: o.name })
|
|
54
|
+
] }), p = () => r ? e ? "100%" : 40 : c === "copyright" ? 18 : "auto", f = () => {
|
|
55
|
+
if (r && e) return "100%";
|
|
56
|
+
}, a = /* @__PURE__ */ t(
|
|
57
|
+
g,
|
|
46
58
|
{
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
c:
|
|
59
|
+
w: p(),
|
|
60
|
+
h: f(),
|
|
61
|
+
c: s ? "white" : "black",
|
|
50
62
|
align: "center",
|
|
51
|
-
...
|
|
52
|
-
children:
|
|
53
|
-
/* @__PURE__ */ o(g, { size: 24, isDark: i }),
|
|
54
|
-
/* @__PURE__ */ o(y, { fw: 600, fz: 16, lh: 1, style: { whiteSpace: "nowrap" }, children: t.name })
|
|
55
|
-
] })
|
|
63
|
+
...m,
|
|
64
|
+
children: d()
|
|
56
65
|
}
|
|
57
66
|
);
|
|
58
|
-
return
|
|
67
|
+
return i ? /* @__PURE__ */ t(b, { to: n, children: a }) : a;
|
|
59
68
|
};
|
|
60
69
|
export {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
70
|
+
C as LayersLogoCopyright,
|
|
71
|
+
F as LayersLogoIcon,
|
|
72
|
+
v as Logotype
|
|
64
73
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavMenuItem.d.ts","sourceRoot":"","sources":["../../../../src/components/NavMenu/components/NavMenuItem.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NavMenuItem.d.ts","sourceRoot":"","sources":["../../../../src/components/NavMenu/components/NavMenuItem.tsx"],"names":[],"mappings":"AAuBA,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAKhD,KAAK,gBAAgB,GAAG;IACtB,IAAI,EAAE,oBAAoB,CAAC;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC;AAEF,eAAO,MAAM,WAAW,oFACwB,gBAAgB,6CAgB/D,CAAC;AA8RF,eAAO,MAAM,eAAe,GAAI,0CAI7B;IACD,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,oBAAoB,EAAE,MAAM,CAAC;CAC9B,4CAiCA,CAAC"}
|
|
@@ -1,103 +1,105 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import { NavLink as
|
|
5
|
-
import { MoreHorizontalIcon as
|
|
6
|
-
import { HugeiconsIcon as
|
|
7
|
-
import { Flex as
|
|
8
|
-
import { useForm as
|
|
9
|
-
import { useClickOutside as
|
|
10
|
-
import { useAsyncStatus as
|
|
11
|
-
import { useMenu as
|
|
12
|
-
import { appContainerStore as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
import { jsx as o, jsxs as h } from "react/jsx-runtime";
|
|
2
|
+
import { memo as m, useRef as k, useEffect as E, useState as M, useMemo as P } from "react";
|
|
3
|
+
import { useTranslation as y } from "react-i18next";
|
|
4
|
+
import { NavLink as A } from "react-router-dom";
|
|
5
|
+
import { MoreHorizontalIcon as D, ArrowRight01Icon as z } from "@hugeicons/core-free-icons";
|
|
6
|
+
import { HugeiconsIcon as N } from "@hugeicons/react";
|
|
7
|
+
import { Flex as f, Loader as x, Text as O, FocusTrap as R, Tooltip as S, Center as j } from "@mantine/core";
|
|
8
|
+
import { useForm as F } from "@mantine/form";
|
|
9
|
+
import { useClickOutside as L } from "@mantine/hooks";
|
|
10
|
+
import { useAsyncStatus as T } from "../../../hooks/useAsyncStatus.js";
|
|
11
|
+
import { useMenu as V } from "../../../hooks/useMenu.js";
|
|
12
|
+
import { appContainerStore as $ } from "../../AppContainer/hooks/useAppContainerStore.js";
|
|
13
|
+
import { ColorPickerPopover as B } from "../../ColorPicker/ColorPickerPopover.js";
|
|
14
|
+
import { EmojiPicker as H } from "../../EmojiPicker/EmojiPicker.js";
|
|
15
|
+
import { EntityIcon as v } from "../../EntityIcon.js";
|
|
16
|
+
import { IconEntity as C } from "../../ProjectIcon/ProjectIcon.js";
|
|
17
|
+
import { NavMenu as I } from "../NavMenu.js";
|
|
18
|
+
import { useNavMenuStore as g } from "../store.js";
|
|
19
|
+
import { NavMenuActionIcon as W } from "./NavMenuActionIcon.js";
|
|
20
|
+
import c from "../NavMenu.module.css.js";
|
|
21
|
+
const ue = m(
|
|
22
|
+
({ item: e, ignoreDepth: i, disableToggleOnClick: r }) => {
|
|
23
|
+
const { useStore: s } = g(), n = s((l) => l.editId === e.id);
|
|
24
|
+
return /* @__PURE__ */ o(
|
|
25
|
+
b,
|
|
24
26
|
{
|
|
25
27
|
depth: i ? void 0 : e.depth,
|
|
26
28
|
testId: e.testId,
|
|
27
|
-
children:
|
|
29
|
+
children: n ? /* @__PURE__ */ o(q, { item: e }) : /* @__PURE__ */ o(_, { item: e, disableToggleOnClick: r })
|
|
28
30
|
}
|
|
29
31
|
);
|
|
30
32
|
}
|
|
31
|
-
),
|
|
33
|
+
), _ = m(
|
|
32
34
|
({
|
|
33
35
|
item: e,
|
|
34
36
|
disableToggleOnClick: i
|
|
35
37
|
}) => {
|
|
36
|
-
const { api:
|
|
37
|
-
i || (
|
|
38
|
-
}, d = e.data?.isReadOnly,
|
|
39
|
-
|
|
38
|
+
const { api: r, useStore: s } = g(), n = s((a) => a.props.onClick), { isMobile: l } = V(), { t: p } = y("appContainer"), u = () => {
|
|
39
|
+
i || (n ? n(e) : e.hasChildren && r.toggleOpened(e));
|
|
40
|
+
}, d = e.data?.isReadOnly, t = e.href ? /* @__PURE__ */ o(
|
|
41
|
+
A,
|
|
40
42
|
{
|
|
41
43
|
to: e.href,
|
|
42
|
-
className:
|
|
44
|
+
className: c.item,
|
|
43
45
|
"data-active": e.active,
|
|
44
46
|
"data-has-children": e.hasChildren,
|
|
45
47
|
"data-read-only": d,
|
|
46
48
|
onClick: d ? void 0 : () => {
|
|
47
|
-
|
|
49
|
+
l && !e.hasChildren && $.api.closeToolbar();
|
|
48
50
|
},
|
|
49
|
-
children: /* @__PURE__ */
|
|
51
|
+
children: /* @__PURE__ */ o(w, { item: e })
|
|
50
52
|
}
|
|
51
|
-
) : /* @__PURE__ */
|
|
53
|
+
) : /* @__PURE__ */ o(
|
|
52
54
|
"div",
|
|
53
55
|
{
|
|
54
|
-
className:
|
|
56
|
+
className: c.item,
|
|
55
57
|
"data-active": e.active,
|
|
56
58
|
"data-has-children": e.hasChildren,
|
|
57
59
|
"data-read-only": d,
|
|
58
|
-
onClick: d ? void 0 :
|
|
59
|
-
children: /* @__PURE__ */
|
|
60
|
+
onClick: d ? void 0 : u,
|
|
61
|
+
children: /* @__PURE__ */ o(w, { item: e })
|
|
60
62
|
}
|
|
61
63
|
);
|
|
62
|
-
return d ? /* @__PURE__ */
|
|
64
|
+
return d ? /* @__PURE__ */ o(S, { label: p("readOnlyAccess"), position: "right", withArrow: !0, children: t }) : t;
|
|
63
65
|
}
|
|
64
|
-
),
|
|
65
|
-
const { t: i } =
|
|
66
|
-
() => ({ ...e.data, isOpen:
|
|
67
|
-
[
|
|
68
|
-
),
|
|
69
|
-
return /* @__PURE__ */
|
|
70
|
-
/* @__PURE__ */
|
|
71
|
-
|
|
72
|
-
|
|
66
|
+
), w = m(({ item: e }) => {
|
|
67
|
+
const { t: i } = y(), { useStore: r, api: s } = g(), n = r((t) => t.opened.includes(e.id)), l = r((t) => t.loading[e.id]), p = P(
|
|
68
|
+
() => ({ ...e.data, isOpen: n }),
|
|
69
|
+
[n, e.data]
|
|
70
|
+
), u = e.data?.isReadOnly, d = u ? 0.3 : void 0;
|
|
71
|
+
return /* @__PURE__ */ h(f, { gap: 4, h: "100%", flex: 1, miw: 0, justify: "space-between", children: [
|
|
72
|
+
/* @__PURE__ */ h(f, { gap: 4, miw: 0, flex: 1, children: [
|
|
73
|
+
l ? /* @__PURE__ */ o(j, { w: 20, h: 20, children: /* @__PURE__ */ o(x, { size: 16 }) }) : e.hasChildren && !u && /* @__PURE__ */ o(
|
|
74
|
+
W,
|
|
73
75
|
{
|
|
74
|
-
className:
|
|
76
|
+
className: c.chevron,
|
|
75
77
|
"data-cy": e.testId ? `${e.testId}-expand` : void 0,
|
|
76
|
-
onClick: (
|
|
77
|
-
|
|
78
|
+
onClick: (t) => {
|
|
79
|
+
t.preventDefault(), t.stopPropagation(), s.toggleOpened(e);
|
|
78
80
|
},
|
|
79
|
-
children: /* @__PURE__ */
|
|
80
|
-
|
|
81
|
+
children: /* @__PURE__ */ o(
|
|
82
|
+
N,
|
|
81
83
|
{
|
|
82
|
-
icon:
|
|
84
|
+
icon: z,
|
|
83
85
|
size: 16,
|
|
84
86
|
style: {
|
|
85
|
-
transform: `rotate(${
|
|
87
|
+
transform: `rotate(${n ? 90 : 0}deg)`,
|
|
86
88
|
transition: "transform 0.1s ease-in-out"
|
|
87
89
|
}
|
|
88
90
|
}
|
|
89
91
|
)
|
|
90
92
|
}
|
|
91
93
|
),
|
|
92
|
-
/* @__PURE__ */
|
|
93
|
-
/* @__PURE__ */
|
|
94
|
-
|
|
94
|
+
/* @__PURE__ */ o("div", { className: c.icon, style: { opacity: d }, children: /* @__PURE__ */ o(v, { item: p }) }),
|
|
95
|
+
/* @__PURE__ */ o(
|
|
96
|
+
S,
|
|
95
97
|
{
|
|
96
98
|
disabled: e.title.length < 25,
|
|
97
99
|
label: e.title || i("noName"),
|
|
98
100
|
openDelay: 400,
|
|
99
|
-
children: /* @__PURE__ */
|
|
100
|
-
|
|
101
|
+
children: /* @__PURE__ */ o(
|
|
102
|
+
O,
|
|
101
103
|
{
|
|
102
104
|
flex: 1,
|
|
103
105
|
truncate: !0,
|
|
@@ -107,8 +109,8 @@ const se = f(
|
|
|
107
109
|
miw: 0,
|
|
108
110
|
c: "var(--mantine-color-text)",
|
|
109
111
|
"data-cy": e.testId ? `${e.testId}-title` : void 0,
|
|
110
|
-
onDoubleClick: (
|
|
111
|
-
|
|
112
|
+
onDoubleClick: (t) => {
|
|
113
|
+
r.getState().props.onEdit && !e?.isDisabledEditByDoubleClick && (t.preventDefault(), t.stopPropagation(), s.startEditing(e.id));
|
|
112
114
|
},
|
|
113
115
|
children: e.title || i("noName")
|
|
114
116
|
}
|
|
@@ -118,38 +120,51 @@ const se = f(
|
|
|
118
120
|
] }),
|
|
119
121
|
e.rightSection
|
|
120
122
|
] });
|
|
121
|
-
}),
|
|
122
|
-
const { api: i, useStore:
|
|
123
|
+
}), q = m(({ item: e }) => {
|
|
124
|
+
const { api: i, useStore: r } = g(), s = k(null), n = F({
|
|
123
125
|
initialValues: {
|
|
124
126
|
name: e.title,
|
|
125
127
|
icon: e.data?.icon || ""
|
|
126
128
|
}
|
|
127
|
-
}),
|
|
129
|
+
}), l = (a) => {
|
|
128
130
|
i.handleEdit({
|
|
129
131
|
id: e.id,
|
|
130
|
-
name:
|
|
131
|
-
icon:
|
|
132
|
+
name: a.name ?? "",
|
|
133
|
+
icon: a.icon ?? ""
|
|
132
134
|
}), i.stopEditing();
|
|
133
|
-
},
|
|
134
|
-
|
|
135
|
+
}, p = L(() => {
|
|
136
|
+
n.isDirty() ? l(n.getValues()) : i.stopEditing();
|
|
135
137
|
});
|
|
136
|
-
|
|
137
|
-
|
|
138
|
+
E(() => {
|
|
139
|
+
s.current && s.current.select();
|
|
138
140
|
}, []);
|
|
139
|
-
const
|
|
140
|
-
|
|
141
|
-
[e.data?.type]
|
|
142
|
-
), d = a((n) => n.opened.includes(e.id));
|
|
143
|
-
return /* @__PURE__ */ t(
|
|
141
|
+
const u = r((a) => a.opened.includes(e.id)), [d, t] = M(!1);
|
|
142
|
+
return /* @__PURE__ */ o(
|
|
144
143
|
"form",
|
|
145
144
|
{
|
|
146
|
-
onSubmit:
|
|
147
|
-
className:
|
|
148
|
-
ref:
|
|
145
|
+
onSubmit: n.onSubmit(l),
|
|
146
|
+
className: c.item,
|
|
147
|
+
ref: p,
|
|
149
148
|
"data-editing": !0,
|
|
150
|
-
children: /* @__PURE__ */
|
|
151
|
-
/* @__PURE__ */
|
|
152
|
-
|
|
149
|
+
children: /* @__PURE__ */ h(f, { gap: 4, h: "100%", flex: 1, miw: 0, justify: "space-between", children: [
|
|
150
|
+
/* @__PURE__ */ o("div", { className: c.icon, children: e.colorPickerOnly ? /* @__PURE__ */ o(
|
|
151
|
+
B,
|
|
152
|
+
{
|
|
153
|
+
value: C.parse(n.values.icon)?.color,
|
|
154
|
+
onChange: (a) => n.setFieldValue("icon", C.stringify({ color: a })),
|
|
155
|
+
withinPortal: !1,
|
|
156
|
+
floatingStrategy: "fixed",
|
|
157
|
+
opened: d,
|
|
158
|
+
setOpened: t,
|
|
159
|
+
children: /* @__PURE__ */ o(I.ActionIcon, { onClick: () => t((a) => !a), children: /* @__PURE__ */ o(
|
|
160
|
+
v,
|
|
161
|
+
{
|
|
162
|
+
item: { ...e.data, isOpen: u, icon: n.values.icon }
|
|
163
|
+
}
|
|
164
|
+
) })
|
|
165
|
+
}
|
|
166
|
+
) : /* @__PURE__ */ o(
|
|
167
|
+
H,
|
|
153
168
|
{
|
|
154
169
|
showIcons: !0,
|
|
155
170
|
showColors: !0,
|
|
@@ -157,68 +172,68 @@ const se = f(
|
|
|
157
172
|
popoverProps: {
|
|
158
173
|
floatingStrategy: "fixed"
|
|
159
174
|
},
|
|
160
|
-
value:
|
|
161
|
-
onChange: (
|
|
162
|
-
children: /* @__PURE__ */
|
|
163
|
-
|
|
175
|
+
value: n.values.icon,
|
|
176
|
+
onChange: (a) => n.setFieldValue("icon", a),
|
|
177
|
+
children: /* @__PURE__ */ o(I.ActionIcon, { children: /* @__PURE__ */ o(
|
|
178
|
+
v,
|
|
164
179
|
{
|
|
165
|
-
item: { ...e.data, isOpen:
|
|
180
|
+
item: { ...e.data, isOpen: u, icon: n.values.icon }
|
|
166
181
|
}
|
|
167
182
|
) })
|
|
168
183
|
}
|
|
169
184
|
) }),
|
|
170
|
-
/* @__PURE__ */
|
|
185
|
+
/* @__PURE__ */ o(R, { children: /* @__PURE__ */ o(
|
|
171
186
|
"input",
|
|
172
187
|
{
|
|
173
|
-
ref:
|
|
174
|
-
className:
|
|
188
|
+
ref: s,
|
|
189
|
+
className: c.editInput,
|
|
175
190
|
"data-cy": e.testId ? `${e.testId}-rename-input` : void 0,
|
|
176
|
-
...
|
|
191
|
+
...n.getInputProps("name"),
|
|
177
192
|
maxLength: 255,
|
|
178
|
-
onFocus: (
|
|
193
|
+
onFocus: (a) => a.target.select()
|
|
179
194
|
}
|
|
180
195
|
) })
|
|
181
196
|
] })
|
|
182
197
|
}
|
|
183
198
|
);
|
|
184
|
-
}),
|
|
199
|
+
}), b = m(
|
|
185
200
|
({
|
|
186
201
|
depth: e = 0,
|
|
187
202
|
children: i,
|
|
188
|
-
testId:
|
|
189
|
-
}) => /* @__PURE__ */
|
|
203
|
+
testId: r
|
|
204
|
+
}) => /* @__PURE__ */ h(
|
|
190
205
|
"div",
|
|
191
206
|
{
|
|
192
|
-
className:
|
|
193
|
-
"data-cy":
|
|
207
|
+
className: c.itemContainer,
|
|
208
|
+
"data-cy": r,
|
|
194
209
|
style: {
|
|
195
210
|
"--depth": e
|
|
196
211
|
},
|
|
197
212
|
children: [
|
|
198
|
-
Array.from({ length: e }).map((
|
|
213
|
+
Array.from({ length: e }).map((s, n) => /* @__PURE__ */ o("div", { className: c.depthBox }, n)),
|
|
199
214
|
i
|
|
200
215
|
]
|
|
201
216
|
}
|
|
202
217
|
)
|
|
203
|
-
),
|
|
218
|
+
), he = ({
|
|
204
219
|
depth: e,
|
|
205
220
|
itemId: i,
|
|
206
|
-
currentChildrenCount:
|
|
221
|
+
currentChildrenCount: r
|
|
207
222
|
}) => {
|
|
208
|
-
const { t:
|
|
209
|
-
return /* @__PURE__ */
|
|
223
|
+
const { t: s } = y("appContainer"), { api: n } = g(), { isLoading: l, onSubmit: p } = T();
|
|
224
|
+
return /* @__PURE__ */ o(b, { depth: e, children: /* @__PURE__ */ o(
|
|
210
225
|
"div",
|
|
211
226
|
{
|
|
212
|
-
className:
|
|
213
|
-
onClick: () =>
|
|
214
|
-
children: /* @__PURE__ */
|
|
215
|
-
/* @__PURE__ */
|
|
216
|
-
/* @__PURE__ */
|
|
227
|
+
className: c.item,
|
|
228
|
+
onClick: () => p(() => n.loadMore({ itemId: i, currentChildrenCount: r })),
|
|
229
|
+
children: /* @__PURE__ */ o(f, { gap: 4, h: "100%", flex: 1, miw: 0, justify: "space-between", children: /* @__PURE__ */ h(f, { gap: 4, miw: 0, flex: 1, c: "gray", children: [
|
|
230
|
+
/* @__PURE__ */ o("div", { className: c.icon, children: l ? /* @__PURE__ */ o(x, { size: 16 }) : /* @__PURE__ */ o(N, { icon: D, size: 16 }) }),
|
|
231
|
+
/* @__PURE__ */ o(O, { flex: 1, truncate: !0, size: "sm", fw: 500, miw: 0, children: s("loadMore") })
|
|
217
232
|
] }) })
|
|
218
233
|
}
|
|
219
234
|
) });
|
|
220
235
|
};
|
|
221
236
|
export {
|
|
222
|
-
|
|
223
|
-
|
|
237
|
+
ue as NavMenuItem,
|
|
238
|
+
he as NavMenuLoadMore
|
|
224
239
|
};
|
|
@@ -20,6 +20,7 @@ export type NavMenuItemDef<DATA = NavMenuItemData> = {
|
|
|
20
20
|
data?: DATA;
|
|
21
21
|
isDisabledEditByDoubleClick?: boolean;
|
|
22
22
|
testId?: string;
|
|
23
|
+
colorPickerOnly?: boolean;
|
|
23
24
|
};
|
|
24
25
|
export type ExpandNavMenuItemDef<DATA = NavMenuItemData> = NavMenuItemDef<DATA> & {
|
|
25
26
|
depth: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/NavMenu/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,cAAc,CAAC,IAAI,GAAG,eAAe,IAAI;IACnD,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC;IACjC,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/NavMenu/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,cAAc,CAAC,IAAI,GAAG,eAAe,IAAI;IACnD,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC;IACjC,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,oBAAoB,CAAC,IAAI,GAAG,eAAe,IACrD,cAAc,CAAC,IAAI,CAAC,GAAG;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,mBAAmB,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEJ,MAAM,MAAM,kBAAkB,CAAC,IAAI,GAAG,eAAe,IAAI,CAAC,CAAC,EAAE;IAC3D,IAAI,EAAE,oBAAoB,CAAC,IAAI,CAAC,CAAC;IACjC,IAAI,EAAE,oBAAoB,CAAC,IAAI,CAAC,CAAC;IACjC,QAAQ,EAAE,0BAA0B,CAAC;CACtC,KAAK,IAAI,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,EAAE;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,oBAAoB,EAAE,MAAM,CAAC;CAC9B,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAEpB,MAAM,MAAM,0BAA0B,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { Avatar as
|
|
4
|
-
import { omit as
|
|
5
|
-
import
|
|
6
|
-
import { DEFAULT_VALUES as
|
|
2
|
+
import { forwardRef as u } from "react";
|
|
3
|
+
import { Avatar as d, Text as y } from "@mantine/core";
|
|
4
|
+
import { omit as x, isString as S, isNil as j } from "lodash-es";
|
|
5
|
+
import L from "query-string";
|
|
6
|
+
import { DEFAULT_VALUES as w } from "../../constants.js";
|
|
7
7
|
import { customIcons as v } from "../EmojiPicker/custom-icons/customIcons.js";
|
|
8
8
|
var I = /* @__PURE__ */ ((r) => (r.OUTLINED = "o", r.FILLED = "f", r))(I || {}), c;
|
|
9
9
|
((r) => {
|
|
10
10
|
r.parse = (t) => {
|
|
11
|
-
if (!
|
|
11
|
+
if (!S(t) || t.trim() === "") return null;
|
|
12
12
|
const e = new URLSearchParams(t);
|
|
13
13
|
return {
|
|
14
14
|
icon: e.get("i") || "",
|
|
@@ -17,7 +17,7 @@ var I = /* @__PURE__ */ ((r) => (r.OUTLINED = "o", r.FILLED = "f", r))(I || {}),
|
|
|
17
17
|
type: e.get("t") || "o"
|
|
18
18
|
/* OUTLINED */
|
|
19
19
|
};
|
|
20
|
-
}, r.stringify = (t) =>
|
|
20
|
+
}, r.stringify = (t) => j(t) ? "" : L.stringify({
|
|
21
21
|
i: t.icon || void 0,
|
|
22
22
|
c: t.color || void 0,
|
|
23
23
|
e: t.emoji || void 0,
|
|
@@ -25,7 +25,7 @@ var I = /* @__PURE__ */ ((r) => (r.OUTLINED = "o", r.FILLED = "f", r))(I || {}),
|
|
|
25
25
|
/* OUTLINED */
|
|
26
26
|
});
|
|
27
27
|
})(c || (c = {}));
|
|
28
|
-
const O =
|
|
28
|
+
const O = u(
|
|
29
29
|
({
|
|
30
30
|
icon: r,
|
|
31
31
|
name: t,
|
|
@@ -39,20 +39,20 @@ const O = d(
|
|
|
39
39
|
}, p) => {
|
|
40
40
|
const m = c.parse(r);
|
|
41
41
|
if (!m && !e) return null;
|
|
42
|
-
const
|
|
42
|
+
const h = m?.color || (f ? "initials" : g) || w.COLORS[0];
|
|
43
43
|
return /* @__PURE__ */ o(
|
|
44
|
-
|
|
44
|
+
d,
|
|
45
45
|
{
|
|
46
46
|
ref: p,
|
|
47
47
|
variant: "transparent",
|
|
48
|
-
color:
|
|
48
|
+
color: h,
|
|
49
49
|
name: f,
|
|
50
50
|
size: i || 20,
|
|
51
51
|
style: {
|
|
52
52
|
overflow: s.radius ? "hidden" : "visible",
|
|
53
53
|
...s.style
|
|
54
54
|
},
|
|
55
|
-
...
|
|
55
|
+
...x(s, ["style"]),
|
|
56
56
|
children: /* @__PURE__ */ o(
|
|
57
57
|
y,
|
|
58
58
|
{
|
|
@@ -73,7 +73,7 @@ const O = d(
|
|
|
73
73
|
}
|
|
74
74
|
), A = (r, t, e, i) => {
|
|
75
75
|
const n = v?.[r?.icon || ""];
|
|
76
|
-
return n ? /* @__PURE__ */ o(n, { width: "1em", height: "1em" }) : r?.icon ? /* @__PURE__ */ o("svg", { width: "1em", height: "1em", children: /* @__PURE__ */ o(
|
|
76
|
+
return n ? /* @__PURE__ */ o(n, { width: "1em", height: "1em", style: { flexShrink: 0 } }) : r?.icon ? /* @__PURE__ */ o("svg", { width: "1em", height: "1em", style: { flexShrink: 0 }, children: /* @__PURE__ */ o(
|
|
77
77
|
"use",
|
|
78
78
|
{
|
|
79
79
|
xlinkHref: `/tabler-sprite${r.type === "f" ? "-filled" : ""}.svg#tabler-${r.type === "f" ? "filled-" : ""}${r.icon}`
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export declare const TreeIndentContainer: import("react").MemoExoticComponent<({ children }: {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element>;
|
|
5
|
+
export declare const TreeIndentItem: import("react").MemoExoticComponent<({ depth, children }: {
|
|
6
|
+
depth?: number;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element>;
|
|
9
|
+
//# sourceMappingURL=TreeIndent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TreeIndent.d.ts","sourceRoot":"","sources":["../../../src/components/TreeIndent/TreeIndent.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAQ,MAAM,OAAO,CAAC;AAI7C,eAAO,MAAM,mBAAmB,qDACf;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,6CAGvC,CAAC;AAEF,eAAO,MAAM,cAAc,4DACC;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,6CAUlE,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as t, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { memo as m } from "react";
|
|
3
|
+
import r from "./TreeIndent.module.css.js";
|
|
4
|
+
const l = m(
|
|
5
|
+
({ children: e }) => /* @__PURE__ */ t("div", { className: r.container, children: e })
|
|
6
|
+
), p = m(
|
|
7
|
+
({ depth: e = 0, children: n }) => /* @__PURE__ */ s("div", { className: r.item, children: [
|
|
8
|
+
Array.from({ length: e }).map((a, o) => /* @__PURE__ */ t("div", { className: r.depthBox }, o)),
|
|
9
|
+
n
|
|
10
|
+
] })
|
|
11
|
+
);
|
|
12
|
+
export {
|
|
13
|
+
l as TreeIndentContainer,
|
|
14
|
+
p as TreeIndentItem
|
|
15
|
+
};
|