@layers-app/shared 0.2.3 → 0.2.5
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/jsons/emoji-categorized-windows.json.js +4 -0
- package/dist/assets/jsons/emoji-categorized-windows10.json.js +4 -0
- package/dist/assets/svg/users.svg.js +5 -0
- package/dist/assets/svg/whatsapp-icon.svg.js +5 -0
- package/dist/components/AliasTextInput/AliasTextInput.d.ts +3 -1
- package/dist/components/AliasTextInput/AliasTextInput.d.ts.map +1 -1
- package/dist/components/AliasTextInput/AliasTextInput.js +63 -54
- 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 +54 -43
- package/dist/components/AppContainer/AppContainer.module.css.js +1 -1
- package/dist/components/AppContainer/components/AppSidebarButton.js +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/AppsSection.js +5 -5
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +56 -43
- package/dist/components/AppContainer/components/Main.d.ts +5 -1
- package/dist/components/AppContainer/components/Main.d.ts.map +1 -1
- package/dist/components/AppContainer/components/Main.js +11 -8
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.d.ts.map +1 -1
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.js +34 -19
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.module.css.js +1 -1
- package/dist/components/AppContainer/components/menus/MoreMenu.js +8 -8
- package/dist/components/AppContainer/components/menus/UserMenu/MenuUserDropdown.d.ts +1 -0
- package/dist/components/AppContainer/components/menus/UserMenu/MenuUserDropdown.d.ts.map +1 -1
- package/dist/components/AppContainer/hooks/useAppContainerStore.d.ts.map +1 -1
- package/dist/components/AppContainer/hooks/useAppContainerStore.js +12 -9
- package/dist/components/AppContainer/types.d.ts +2 -0
- package/dist/components/AppContainer/types.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/AttachmentsGalleryModal.d.ts +1 -1
- package/dist/components/AttachmentsGalleryModal/AttachmentsGalleryModal.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/GallerySlide.d.ts +1 -1
- package/dist/components/AttachmentsGalleryModal/components/GallerySlide.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/GallerySlide.js +5 -5
- package/dist/components/AttachmentsGalleryModal/components/ModalFooter.d.ts +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ModalFooter.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ModalFooter.js +4 -4
- package/dist/components/AttachmentsGalleryModal/components/ModalHeader.d.ts +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ModalHeader.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/hooks/useDownloadFile.d.ts +1 -1
- package/dist/components/AttachmentsGalleryModal/hooks/useDownloadFile.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.d.ts +1 -1
- package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/styles.module.css.js +9 -9
- package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts.map +1 -1
- package/dist/components/AttachmentsPreview/AttachmentsPreview.js +114 -88
- package/dist/components/AttachmentsPreview/AttachmentsPreview.module.css.js +9 -9
- package/dist/components/BouncingLogo/BouncingLogo.d.ts +6 -2
- package/dist/components/BouncingLogo/BouncingLogo.d.ts.map +1 -1
- package/dist/components/BouncingLogo/BouncingLogo.js +13 -14
- package/dist/components/BouncingLogo/BouncingLogo.module.css.js +12 -10
- package/dist/components/ColorPicker/ColorPicker.d.ts +2 -0
- package/dist/components/ColorPicker/ColorPicker.d.ts.map +1 -1
- package/dist/components/ColorPicker/ColorPicker.js +66 -59
- package/dist/components/CommentComposer/CommentEditorHotkeys.js +1 -1
- package/dist/components/CommunitiesDialog/styles.module.css.js +1 -1
- package/dist/components/Copyright/index.d.ts.map +1 -1
- package/dist/components/Copyright/index.js +6 -6
- package/dist/components/EmojiPicker/EmojiPanel.d.ts.map +1 -1
- package/dist/components/EmojiPicker/EmojiPanel.js +47 -46
- package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
- package/dist/components/EmojiPicker/EmojiPicker.js +87 -95
- package/dist/components/EmojiPicker/IconsPanel.d.ts.map +1 -1
- package/dist/components/EmojiPicker/IconsPanel.js +72 -72
- package/dist/components/EmojiPicker/utils.d.ts +11 -0
- package/dist/components/EmojiPicker/utils.d.ts.map +1 -0
- package/dist/components/EmojiPicker/utils.js +46 -0
- package/dist/components/EntityIcon.d.ts +5 -2
- package/dist/components/EntityIcon.d.ts.map +1 -1
- package/dist/components/EntityIcon.js +44 -46
- package/dist/components/FilePicker/FilePicker.d.ts +2 -3
- package/dist/components/FilePicker/FilePicker.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePicker.js +95 -130
- package/dist/components/FilePicker/FilePickerGiphy.d.ts +1 -3
- package/dist/components/FilePicker/FilePickerGiphy.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerGiphy.js +43 -44
- package/dist/components/FilePicker/FilePickerLink.d.ts +2 -3
- package/dist/components/FilePicker/FilePickerLink.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerLink.js +21 -21
- package/dist/components/FilePicker/FilePickerUnsplash.d.ts +1 -3
- package/dist/components/FilePicker/FilePickerUnsplash.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerUnsplash.js +45 -46
- package/dist/components/FilePicker/FilePickerUpload.d.ts +3 -3
- package/dist/components/FilePicker/FilePickerUpload.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerUpload.js +49 -43
- package/dist/components/FilePicker/types.d.ts +1 -1
- package/dist/components/FilePicker/types.d.ts.map +1 -1
- package/dist/components/FormViewer/FormViewer.module.css.js +18 -18
- package/dist/components/FormViewer/components/fields/ChoiceField/PictureChoiceCard.d.ts +4 -2
- package/dist/components/FormViewer/components/fields/ChoiceField/PictureChoiceCard.d.ts.map +1 -1
- package/dist/components/FormViewer/components/fields/ChoiceField/PictureChoiceCard.js +51 -26
- package/dist/components/FormViewer/components/fields/ChoiceField/PictureChoiceField.d.ts.map +1 -1
- package/dist/components/FormViewer/components/fields/ChoiceField/PictureChoiceField.js +25 -23
- package/dist/components/FormViewer/components/fields/DragOptions/DragOptions.module.css.js +1 -1
- package/dist/components/FormViewer/components/fields/SelectableCard/PictureSelectableCard.d.ts +5 -2
- package/dist/components/FormViewer/components/fields/SelectableCard/PictureSelectableCard.d.ts.map +1 -1
- package/dist/components/FormViewer/components/fields/SelectableCard/PictureSelectableCard.js +105 -96
- package/dist/components/FormViewer/components/fields/SliderField.d.ts.map +1 -1
- package/dist/components/FormViewer/components/fields/SliderField.js +19 -18
- package/dist/components/FormViewer/components/fields/UploadField/UploadField.d.ts.map +1 -1
- package/dist/components/FormViewer/components/fields/UploadField/UploadFile/UploadFile.module.css.js +1 -1
- package/dist/components/FormViewer/helpers/cssScoping.d.ts.map +1 -1
- package/dist/components/FormViewer/helpers/staticClasses.d.ts.map +1 -1
- package/dist/components/FormViewer/store/formStore.d.ts +10 -3
- package/dist/components/FormViewer/store/formStore.d.ts.map +1 -1
- package/dist/components/LanguagePicker/LanguagePicker.js +13 -13
- package/dist/components/Loaders/styles.module.css.js +1 -1
- package/dist/components/NavMenu/NavMenu.d.ts +4 -1
- package/dist/components/NavMenu/NavMenu.d.ts.map +1 -1
- package/dist/components/NavMenu/NavMenu.js +96 -77
- package/dist/components/NavMenu/NavMenu.module.css.js +10 -10
- package/dist/components/NavMenu/components/DnDItem.d.ts +2 -1
- package/dist/components/NavMenu/components/DnDItem.d.ts.map +1 -1
- package/dist/components/NavMenu/components/DnDItem.js +32 -30
- package/dist/components/NavMenu/components/DnDProvider.d.ts.map +1 -1
- package/dist/components/NavMenu/components/DnDProvider.js +28 -26
- package/dist/components/NavMenu/components/DraggableOverlay.d.ts.map +1 -1
- package/dist/components/NavMenu/components/NavMenuItem.d.ts +1 -1
- package/dist/components/NavMenu/components/NavMenuItem.d.ts.map +1 -1
- package/dist/components/NavMenu/components/NavMenuItem.js +109 -94
- package/dist/components/NavMenu/store.d.ts +1 -0
- package/dist/components/NavMenu/store.d.ts.map +1 -1
- package/dist/components/NavMenu/types.d.ts +1 -0
- package/dist/components/NavMenu/types.d.ts.map +1 -1
- package/dist/components/NavbarResizer/NavbarResizer.module.css.js +2 -2
- package/dist/components/NoData/NoData.d.ts +32 -26
- package/dist/components/NoData/NoData.d.ts.map +1 -1
- package/dist/components/NoData/NoData.js +73 -73
- package/dist/components/OnBoarding/ProjectBoard.js +17 -17
- package/dist/components/OnBoarding/steps/AddTasks/AddTasksNav.js +7 -7
- package/dist/components/OnBoarding/steps/AddTasks/TasksListBoard.d.ts.map +1 -1
- package/dist/components/OnBoarding/steps/AddTasks/TasksListBoard.js +9 -9
- package/dist/components/OnBoarding/steps/CreateFirstProject.js +5 -5
- package/dist/components/OnBoarding/steps/DefineStatuses/DefineStatusesNav.js +7 -7
- package/dist/components/OnBoarding/steps/DefineStatuses/StatusesListBoard.js +6 -6
- package/dist/components/OnBoarding/steps/DifferentLayouts/DifferentLayoutsBoard.d.ts.map +1 -1
- package/dist/components/OnBoarding/steps/DifferentLayouts/DifferentLayoutsNav.js +10 -10
- package/dist/components/OnBoarding/steps/DifferentLayouts/KanbanLayout.js +5 -5
- package/dist/components/OnBoarding/steps/InviteUsers/BoardModal.js +10 -10
- package/dist/components/OnBoarding/steps/InviteUsers/InviteUsers.d.ts.map +1 -1
- package/dist/components/OnBoarding/steps/SelectCategory/CategorySelect.d.ts.map +1 -1
- package/dist/components/OnBoarding/steps/SelectCategory/CategorySelect.js +8 -8
- package/dist/components/OnBoarding/steps/SelectCategory/SelectCategoryNav.js +5 -5
- package/dist/components/OnBoarding/steps/StartedStep.js +5 -5
- package/dist/components/PaymentSuccess/PaymentSuccess.d.ts.map +1 -1
- package/dist/components/PaymentSuccess/PaymentSuccess.js +9 -9
- package/dist/components/SearchFilters/components/DateFilter.js +19 -19
- package/dist/components/SearchFilters/components/SearchHelp.d.ts.map +1 -1
- package/dist/components/SearchFilters/components/SearchHelp.js +7 -7
- package/dist/components/SortableList/SortableList.d.ts.map +1 -1
- package/dist/components/SortableList/components/SortableItem/SortableItem.d.ts.map +1 -1
- package/dist/components/SortableList/components/SortableItem/SortableItem.js +1 -9
- package/dist/components/SortableList/components/SortableItem/index.d.ts +1 -1
- package/dist/components/SortableList/components/SortableItem/index.d.ts.map +1 -1
- package/dist/components/StorageUsageEntityList/StorageEntityItem.d.ts +2 -6
- package/dist/components/StorageUsageEntityList/StorageEntityItem.d.ts.map +1 -1
- package/dist/components/StorageUsageEntityList/StorageEntityItem.js +19 -59
- package/dist/components/StorageUsageEntityList/StorageUsageEntityList.d.ts +1 -1
- package/dist/components/StorageUsageEntityList/StorageUsageEntityList.d.ts.map +1 -1
- package/dist/components/StorageUsageEntityList/StorageUsageEntityList.js +6 -24
- package/dist/components/StorageUsageProgress/StorageUsageProgress.module.css.js +7 -0
- package/dist/components/StorageUsageProgress/index.d.ts +2 -2
- package/dist/components/StorageUsageProgress/index.d.ts.map +1 -1
- package/dist/components/StorageUsageProgress/index.js +73 -40
- package/dist/components/ThemeIndicator/index.d.ts.map +1 -1
- package/dist/components/ThemeIndicator/index.js +4 -4
- package/dist/components/UserAvatar/index.js +14 -14
- package/dist/components/WorkspaceMenu/WorkspaceMenu.d.ts +2 -2
- package/dist/components/WorkspaceMenu/WorkspaceMenu.d.ts.map +1 -1
- package/dist/components/WorkspaceMenu/WorkspaceMenu.js +103 -103
- package/dist/components/modals/RemoveConfirmModal.d.ts.map +1 -1
- package/dist/components/modals/RemoveConfirmModal.js +31 -24
- package/dist/components/table/export.d.ts.map +1 -1
- package/dist/components/table/hooks/useSaveRowCount.d.ts.map +1 -1
- package/dist/components/table/hooks/useSaveRowCount.js +4 -4
- package/dist/components/table/hooks/useSorting.d.ts.map +1 -1
- package/dist/components/table/hooks/useSorting.js +3 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +8 -1
- package/dist/helpers/getFileIcons.js +12 -12
- package/dist/helpers/isAppMode.d.ts +1 -1
- package/dist/helpers/isAppMode.d.ts.map +1 -1
- package/dist/helpers/validateAliasFormat.d.ts +2 -0
- package/dist/helpers/validateAliasFormat.d.ts.map +1 -0
- package/dist/helpers/validateAliasFormat.js +4 -0
- package/dist/hooks/useOutsideClick.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +3 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +328 -329
- package/dist/lang/locales/ui_en.json.js +20 -12
- package/dist/lang/locales/ui_es.json.js +18 -10
- package/dist/lang/locales/ui_ru.json.js +26 -18
- package/dist/store/trashModal.d.ts +8 -0
- package/dist/store/trashModal.d.ts.map +1 -0
- package/dist/store/trashModal.js +13 -0
- package/dist/types/storageCategories.d.ts +4 -0
- package/dist/types/storageCategories.d.ts.map +1 -0
- package/dist/types/storageCategories.js +21 -0
- package/dist/utils/formatStorage.d.ts +1 -1
- package/dist/utils/formatStorage.d.ts.map +1 -1
- package/dist/utils/formatStorage.js +3 -3
- package/docs/README.md +17 -4
- package/package.json +1 -1
- package/dist/assets/fileTypes/archives.svg.js +0 -5
- package/dist/assets/fileTypes/audio.svg.js +0 -5
- package/dist/assets/fileTypes/code.svg.js +0 -5
- package/dist/assets/fileTypes/documentsStorage.svg.js +0 -5
- package/dist/assets/fileTypes/images.svg.js +0 -5
- package/dist/assets/fileTypes/other.svg.js +0 -5
- package/dist/assets/fileTypes/videos.svg.js +0 -5
- package/dist/components/AppContainer/hooks/useSetAppContainerLayout.d.ts +0 -3
- package/dist/components/AppContainer/hooks/useSetAppContainerLayout.d.ts.map +0 -1
- package/dist/components/AppContainer/hooks/useSetAppContainerLayout.js +0 -10
- package/dist/components/EmojiPicker/getIconsList.d.ts +0 -8
- package/dist/components/EmojiPicker/getIconsList.d.ts.map +0 -1
- package/dist/components/EmojiPicker/getIconsList.js +0 -32
- package/dist/components/EmojiPicker/getRandomIcon.d.ts +0 -2
- package/dist/components/EmojiPicker/getRandomIcon.d.ts.map +0 -1
- package/dist/components/EmojiPicker/getRandomIcon.js +0 -10
- package/dist/components/NoData/NoData.module.css.js +0 -7
- package/dist/components/PaymentCancel/PaymentCancel.d.ts +0 -2
- package/dist/components/PaymentCancel/PaymentCancel.d.ts.map +0 -1
- package/dist/components/PaymentCancel/PaymentCancel.js +0 -41
- package/dist/components/PaymentError/PaymentError.d.ts +0 -2
- package/dist/components/PaymentError/PaymentError.d.ts.map +0 -1
- package/dist/components/PaymentError/PaymentError.js +0 -41
- package/dist/node_modules/@layers-app/layers/src/api/common.js +0 -41
- package/dist/store/accessOptionsControl.d.ts +0 -17
- package/dist/store/accessOptionsControl.d.ts.map +0 -1
- package/dist/store/accessOptionsControl.js +0 -18
|
@@ -1,52 +1,85 @@
|
|
|
1
|
-
import { jsx as o } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as o, jsxs as i } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation as h } from "react-i18next";
|
|
3
|
-
import { Box as
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
3
|
+
import { Box as f, Progress as p, Tooltip as x, Stack as u, Text as n, Flex as T } from "@mantine/core";
|
|
4
|
+
import { storageCategoryColors as b } from "../../types/storageCategories.js";
|
|
5
|
+
import { formatStorage as z } from "../../utils/formatStorage.js";
|
|
6
|
+
import S from "./StorageUsageProgress.module.css.js";
|
|
7
|
+
const v = ({
|
|
8
|
+
type: c,
|
|
9
|
+
description: r,
|
|
10
|
+
usedKb: a,
|
|
11
|
+
percentage: t
|
|
12
|
+
}) => /* @__PURE__ */ i(u, { gap: 2, align: "center", children: [
|
|
13
|
+
/* @__PURE__ */ o(n, { size: "sm", children: c }),
|
|
14
|
+
/* @__PURE__ */ i(T, { gap: 5, children: [
|
|
15
|
+
/* @__PURE__ */ i(n, { size: "xl", children: [
|
|
16
|
+
t,
|
|
17
|
+
" %"
|
|
18
|
+
] }),
|
|
19
|
+
/* @__PURE__ */ i(n, { size: "sm", children: [
|
|
20
|
+
"(",
|
|
21
|
+
a,
|
|
22
|
+
")"
|
|
23
|
+
] })
|
|
24
|
+
] }),
|
|
25
|
+
/* @__PURE__ */ o(n, { size: "sm", c: "var(--mantine-color-gray-6)", children: r })
|
|
26
|
+
] }), N = ({
|
|
14
27
|
storageByCategory: c,
|
|
15
|
-
totalStorageKb:
|
|
16
|
-
size: a = 30
|
|
17
|
-
simple: m = !1,
|
|
18
|
-
color: p = "#1C7ED6"
|
|
28
|
+
totalStorageKb: r,
|
|
29
|
+
size: a = 30
|
|
19
30
|
}) => {
|
|
20
|
-
const { t
|
|
21
|
-
|
|
22
|
-
const e = c.reduce(
|
|
23
|
-
(s, { usedKb: f }) => s + f,
|
|
24
|
-
0
|
|
25
|
-
), r = e / n * 100;
|
|
26
|
-
return /* @__PURE__ */ o(i, { w: "100%", children: /* @__PURE__ */ o(t.Root, { size: a, children: /* @__PURE__ */ o(l, { label: `${d(e)}`, children: /* @__PURE__ */ o(t.Section, { value: r, color: p }) }) }) });
|
|
27
|
-
}
|
|
28
|
-
const u = c.filter(({ usedKb: e }) => e > 0).map((e) => {
|
|
29
|
-
const r = e.usedKb / n * 100;
|
|
31
|
+
const { t } = h("settingsPage"), g = 24, l = c.filter(({ usedKb: e }) => e > 0).map((e) => {
|
|
32
|
+
const s = e.usedKb / r * 100;
|
|
30
33
|
return {
|
|
31
34
|
...e,
|
|
32
|
-
percentage: parseFloat(
|
|
35
|
+
percentage: parseFloat(s.toFixed(4))
|
|
33
36
|
};
|
|
34
37
|
});
|
|
35
|
-
return /* @__PURE__ */ o(
|
|
36
|
-
|
|
38
|
+
return /* @__PURE__ */ o(f, { w: "100%", children: /* @__PURE__ */ o(
|
|
39
|
+
p.Root,
|
|
37
40
|
{
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
radius: "lg",
|
|
42
|
+
size: a,
|
|
43
|
+
styles: {
|
|
44
|
+
root: { overflow: "visible" }
|
|
45
|
+
},
|
|
46
|
+
children: l.map(({ type: e, usedKb: s, percentage: d }, m) => /* @__PURE__ */ o(
|
|
47
|
+
x,
|
|
41
48
|
{
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
+
position: "bottom",
|
|
50
|
+
label: /* @__PURE__ */ o(
|
|
51
|
+
v,
|
|
52
|
+
{
|
|
53
|
+
type: t(`workspace.categories.${e}`),
|
|
54
|
+
usedKb: z(s),
|
|
55
|
+
percentage: (Math.ceil(s / r * 100 * 10) / 10).toFixed(1),
|
|
56
|
+
description: t(`workspace.catDescriptions.${e}`)
|
|
57
|
+
}
|
|
58
|
+
),
|
|
59
|
+
children: /* @__PURE__ */ o(
|
|
60
|
+
p.Section,
|
|
61
|
+
{
|
|
62
|
+
value: d,
|
|
63
|
+
color: b[e],
|
|
64
|
+
className: S.section,
|
|
65
|
+
styles: {
|
|
66
|
+
section: {
|
|
67
|
+
borderRadius: 999,
|
|
68
|
+
minWidth: g
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
style: {
|
|
72
|
+
zIndex: l.length - m,
|
|
73
|
+
marginLeft: m === 0 ? 0 : -2
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
)
|
|
77
|
+
},
|
|
78
|
+
e
|
|
79
|
+
))
|
|
80
|
+
}
|
|
81
|
+
) });
|
|
49
82
|
};
|
|
50
83
|
export {
|
|
51
|
-
|
|
84
|
+
N as StorageUsageProgress
|
|
52
85
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ThemeIndicator/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ThemeIndicator/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,cAAc,EAAE,MAAM,eAAe,CAAC;AAI1D,eAAO,MAAM,cAAc,GAAI,uBAG5B,cAAc,GAAG;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,4CAYhD,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { Indicator as m } from "@mantine/core";
|
|
3
|
+
import { useIsDarkTheme as a } from "../../helpers/themeUtils.js";
|
|
4
4
|
const c = ({
|
|
5
5
|
children: r,
|
|
6
6
|
...o
|
|
7
7
|
}) => {
|
|
8
|
-
const t =
|
|
8
|
+
const t = a();
|
|
9
9
|
return /* @__PURE__ */ e(
|
|
10
|
-
|
|
10
|
+
m,
|
|
11
11
|
{
|
|
12
12
|
color: t ? "var(--mantine-color-gray-0)" : "dark",
|
|
13
13
|
size: 6,
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsx as o, Fragment as c } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as e } from "react";
|
|
3
3
|
import { Avatar as d } from "@mantine/core";
|
|
4
4
|
import { IconUser as l } from "@tabler/icons-react";
|
|
5
5
|
import { ProjectIcon as f } from "../ProjectIcon/ProjectIcon.js";
|
|
6
|
-
const
|
|
7
|
-
({ user: r, size:
|
|
8
|
-
const
|
|
9
|
-
return
|
|
6
|
+
const A = e(
|
|
7
|
+
({ user: r, size: t = 24, emptyIcon: m, ...i }, n) => {
|
|
8
|
+
const a = r?.avatar || r?.avatarUrl;
|
|
9
|
+
return a && (a.includes("i=") || a.includes("e=")) ? /* @__PURE__ */ o(
|
|
10
10
|
f,
|
|
11
11
|
{
|
|
12
|
-
icon:
|
|
12
|
+
icon: a,
|
|
13
13
|
name: r?.name,
|
|
14
14
|
fallbackColorById: r?.id,
|
|
15
|
-
size:
|
|
16
|
-
textSize: typeof
|
|
15
|
+
size: t,
|
|
16
|
+
textSize: typeof t == "number" ? t * 0.75 : void 0,
|
|
17
17
|
radius: i.radius,
|
|
18
18
|
...i,
|
|
19
19
|
ref: n
|
|
20
20
|
}
|
|
21
|
-
) : /* @__PURE__ */
|
|
21
|
+
) : /* @__PURE__ */ o(
|
|
22
22
|
d,
|
|
23
23
|
{
|
|
24
|
-
src:
|
|
24
|
+
src: a,
|
|
25
25
|
color: "initials",
|
|
26
26
|
tt: "uppercase",
|
|
27
|
-
size:
|
|
27
|
+
size: t,
|
|
28
28
|
name: r?.id ?? "",
|
|
29
29
|
...i,
|
|
30
30
|
ref: n,
|
|
31
|
-
children: r ? /* @__PURE__ */
|
|
31
|
+
children: r ? /* @__PURE__ */ o(c, { children: r.name?.charAt(0) }) : /* @__PURE__ */ o(c, { children: m ?? /* @__PURE__ */ o(l, { size: "70%" }) })
|
|
32
32
|
}
|
|
33
33
|
);
|
|
34
34
|
}
|
|
35
35
|
);
|
|
36
36
|
export {
|
|
37
|
-
|
|
37
|
+
A as UserAvatar
|
|
38
38
|
};
|
|
@@ -35,6 +35,6 @@ export type WorkspaceMenuProps<W extends MenuWorkspace = MenuWorkspace> = {
|
|
|
35
35
|
isAnonym?: boolean;
|
|
36
36
|
publicMode?: boolean;
|
|
37
37
|
};
|
|
38
|
-
export declare const WorkspaceMenu: <W extends MenuWorkspace>({ children, onCreate, onClick, active, items, workspaceLink, settingsLink, membersLink,
|
|
39
|
-
export declare const ActiveWorkspace: <W extends MenuWorkspace>({ active, workspaceLink, settingsLink, membersLink,
|
|
38
|
+
export declare const WorkspaceMenu: <W extends MenuWorkspace>({ children, onCreate, onClick, active, items, workspaceLink, settingsLink, membersLink, isAnonym, publicMode, }: PropsWithChildren<WorkspaceMenuProps<W>>) => import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export declare const ActiveWorkspace: <W extends MenuWorkspace>({ active, workspaceLink, settingsLink, membersLink, onClose, }: Pick<WorkspaceMenuProps<W>, "active" | "workspaceLink" | "settingsLink" | "membersLink" | "onClose">) => import("react/jsx-runtime").JSX.Element;
|
|
40
40
|
//# sourceMappingURL=WorkspaceMenu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkspaceMenu.d.ts","sourceRoot":"","sources":["../../../src/components/WorkspaceMenu/WorkspaceMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAY,MAAM,OAAO,CAAC;AA6BpD,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iBAAiB,CAAC,EAAE,KAAK,CAAC;QACxB,IAAI,EACA,QAAQ,GACR,WAAW,GACX,QAAQ,GACR,OAAO,GACP,OAAO,GACP,UAAU,GACV,MAAM,CAAC;QACX,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC,CAAC;IACH,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,aAAa,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,uBAAuB,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CAChD,CAAC;AAEF,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,aAAa,GAAG,aAAa,IAAI;IACxE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;IACrC,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,MAAM,EAAE,CAAC,CAAC;IACV,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,CAAC,SAAS,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"WorkspaceMenu.d.ts","sourceRoot":"","sources":["../../../src/components/WorkspaceMenu/WorkspaceMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAY,MAAM,OAAO,CAAC;AA6BpD,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iBAAiB,CAAC,EAAE,KAAK,CAAC;QACxB,IAAI,EACA,QAAQ,GACR,WAAW,GACX,QAAQ,GACR,OAAO,GACP,OAAO,GACP,UAAU,GACV,MAAM,CAAC;QACX,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC,CAAC;IACH,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,aAAa,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,uBAAuB,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CAChD,CAAC;AAEF,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,aAAa,GAAG,aAAa,IAAI;IACxE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;IACrC,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,MAAM,EAAE,CAAC,CAAC;IACV,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,CAAC,SAAS,aAAa,EAAE,iHAWpD,iBAAiB,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,4CAwE1C,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,CAAC,SAAS,aAAa,EAAE,gEAMtD,IAAI,CACL,kBAAkB,CAAC,CAAC,CAAC,EACrB,QAAQ,GAAG,eAAe,GAAG,cAAc,GAAG,aAAa,GAAG,SAAS,CACxE,4CA6DA,CAAC"}
|
|
@@ -1,98 +1,95 @@
|
|
|
1
|
-
import { jsx as e, Fragment as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import { Link as
|
|
5
|
-
import { Setting07Icon as
|
|
6
|
-
import { HugeiconsIcon as
|
|
7
|
-
import { Flex as
|
|
8
|
-
import { useMenu as
|
|
9
|
-
import { formatStorage as
|
|
10
|
-
import { Logotype as
|
|
11
|
-
import { WorkspaceAvatar as
|
|
12
|
-
import { Numbers as
|
|
13
|
-
import { WorkspaceItem as
|
|
14
|
-
const
|
|
1
|
+
import { jsx as e, Fragment as M, jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import { useState as j } from "react";
|
|
3
|
+
import { useTranslation as h } from "react-i18next";
|
|
4
|
+
import { Link as b } from "react-router-dom";
|
|
5
|
+
import { Setting07Icon as A, UserMultiple02Icon as L, Add01Icon as K } from "@hugeicons/core-free-icons";
|
|
6
|
+
import { HugeiconsIcon as g } from "@hugeicons/react";
|
|
7
|
+
import { Flex as l, Menu as p, Tooltip as T, Text as m, Stack as a, Box as f, Button as k, ScrollArea as P, Progress as U } from "@mantine/core";
|
|
8
|
+
import { useMenu as B } from "../../hooks/useMenu.js";
|
|
9
|
+
import { formatStorage as z } from "../../utils/formatStorage.js";
|
|
10
|
+
import { Logotype as D } from "../Logotype.js";
|
|
11
|
+
import { WorkspaceAvatar as S } from "../WorkspaceAvatar/WorkspaceAvatar.js";
|
|
12
|
+
import { Numbers as F } from "../table/helpers/formatters.js";
|
|
13
|
+
import { WorkspaceItem as O } from "./WorkspaceItem.js";
|
|
14
|
+
const ne = ({
|
|
15
15
|
children: r,
|
|
16
|
-
onCreate:
|
|
16
|
+
onCreate: i,
|
|
17
17
|
onClick: t,
|
|
18
18
|
active: o,
|
|
19
|
-
items:
|
|
20
|
-
workspaceLink:
|
|
21
|
-
settingsLink:
|
|
22
|
-
membersLink:
|
|
23
|
-
|
|
24
|
-
isAnonym: C,
|
|
19
|
+
items: c,
|
|
20
|
+
workspaceLink: s,
|
|
21
|
+
settingsLink: x,
|
|
22
|
+
membersLink: y,
|
|
23
|
+
isAnonym: I,
|
|
25
24
|
publicMode: W
|
|
26
25
|
}) => {
|
|
27
|
-
const { t:
|
|
28
|
-
return
|
|
29
|
-
|
|
26
|
+
const { t: C } = h("workspaceMenu"), { isMobile: u } = B(), [N, d] = j(!1);
|
|
27
|
+
return I || W ? /* @__PURE__ */ e(l, { w: "100%", justify: u ? "start" : "center", children: /* @__PURE__ */ e("a", { href: "/", children: /* @__PURE__ */ e(
|
|
28
|
+
D,
|
|
30
29
|
{
|
|
31
|
-
minified: !
|
|
32
|
-
w:
|
|
30
|
+
minified: !u,
|
|
31
|
+
w: u ? 65 : 24,
|
|
33
32
|
isLink: !1
|
|
34
33
|
}
|
|
35
|
-
) }) }) : /* @__PURE__ */ e(
|
|
36
|
-
|
|
34
|
+
) }) }) : /* @__PURE__ */ e(M, { children: /* @__PURE__ */ n(
|
|
35
|
+
p,
|
|
37
36
|
{
|
|
38
|
-
opened:
|
|
39
|
-
onChange:
|
|
37
|
+
opened: N,
|
|
38
|
+
onChange: d,
|
|
40
39
|
position: "right-start",
|
|
41
40
|
keepMounted: !1,
|
|
42
41
|
clickOutsideEvents: ["mousedown", "click"],
|
|
43
42
|
offset: 17,
|
|
44
43
|
children: [
|
|
45
|
-
/* @__PURE__ */ e(
|
|
46
|
-
/* @__PURE__ */ e(
|
|
47
|
-
/* @__PURE__ */ e(
|
|
44
|
+
/* @__PURE__ */ e(p.Target, { children: r ?? /* @__PURE__ */ n(l, { onClick: () => d((w) => !w), children: [
|
|
45
|
+
/* @__PURE__ */ e(S, { size: 30, workspace: o }),
|
|
46
|
+
/* @__PURE__ */ e(l, { justify: "space-between", align: "center", w: "100%", miw: 0, children: /* @__PURE__ */ e(T, { label: o.workspaceName, children: /* @__PURE__ */ e(m, { size: "md", truncate: !0, children: o?.workspaceName || C("noName") }) }) })
|
|
48
47
|
] }) }),
|
|
49
|
-
/* @__PURE__ */ e(
|
|
48
|
+
/* @__PURE__ */ e(p.Dropdown, { w: 338, children: /* @__PURE__ */ n(a, { gap: 6, children: [
|
|
50
49
|
/* @__PURE__ */ e(
|
|
51
|
-
|
|
50
|
+
E,
|
|
52
51
|
{
|
|
53
52
|
active: o,
|
|
54
|
-
workspaceLink:
|
|
55
|
-
settingsLink:
|
|
56
|
-
membersLink:
|
|
57
|
-
|
|
58
|
-
onClose: () => f(!1)
|
|
53
|
+
workspaceLink: s,
|
|
54
|
+
settingsLink: x,
|
|
55
|
+
membersLink: y,
|
|
56
|
+
onClose: () => d(!1)
|
|
59
57
|
}
|
|
60
58
|
),
|
|
61
|
-
/* @__PURE__ */ e(
|
|
59
|
+
/* @__PURE__ */ e(f, { px: 4, children: /* @__PURE__ */ e(p.Divider, {}) }),
|
|
62
60
|
/* @__PURE__ */ e(
|
|
63
|
-
|
|
61
|
+
R,
|
|
64
62
|
{
|
|
65
|
-
onCreate:
|
|
63
|
+
onCreate: i,
|
|
66
64
|
onClick: t,
|
|
67
|
-
items:
|
|
68
|
-
(
|
|
65
|
+
items: c.filter(
|
|
66
|
+
(w) => w.workspaceId !== o?.workspaceId
|
|
69
67
|
),
|
|
70
|
-
onClose: () =>
|
|
68
|
+
onClose: () => d(!1)
|
|
71
69
|
}
|
|
72
70
|
)
|
|
73
71
|
] }) })
|
|
74
72
|
]
|
|
75
73
|
}
|
|
76
74
|
) });
|
|
77
|
-
},
|
|
75
|
+
}, E = ({
|
|
78
76
|
active: r,
|
|
79
|
-
workspaceLink:
|
|
77
|
+
workspaceLink: i,
|
|
80
78
|
settingsLink: t,
|
|
81
79
|
membersLink: o,
|
|
82
|
-
canEditWorkspace: i,
|
|
83
80
|
onClose: c
|
|
84
81
|
}) => {
|
|
85
|
-
const { t:
|
|
86
|
-
return /* @__PURE__ */ n(
|
|
87
|
-
/* @__PURE__ */ n(
|
|
88
|
-
/* @__PURE__ */ e(
|
|
89
|
-
/* @__PURE__ */ n(
|
|
90
|
-
/* @__PURE__ */ e(
|
|
91
|
-
/* @__PURE__ */ e(
|
|
92
|
-
r.totalMembers ? /* @__PURE__ */ n(
|
|
93
|
-
|
|
82
|
+
const { t: s } = h("workspaceMenu");
|
|
83
|
+
return /* @__PURE__ */ n(a, { p: 4, pb: 5, gap: 12, children: [
|
|
84
|
+
/* @__PURE__ */ n(l, { gap: 10, children: [
|
|
85
|
+
/* @__PURE__ */ e(S, { size: 48, workspace: r }),
|
|
86
|
+
/* @__PURE__ */ n(a, { gap: 0, miw: 0, children: [
|
|
87
|
+
/* @__PURE__ */ e(m, { truncate: !0, size: "md", fw: 500, c: "var(--mantine-color-bright)", children: r.workspaceName || s("noName") }),
|
|
88
|
+
/* @__PURE__ */ e(m, { c: "gray", size: "sm", fw: 500, component: "span", children: /* @__PURE__ */ n(l, { gap: 6, component: "span", children: [
|
|
89
|
+
r.totalMembers ? /* @__PURE__ */ n(M, { children: [
|
|
90
|
+
s("member", { count: r.totalMembers }),
|
|
94
91
|
/* @__PURE__ */ e(
|
|
95
|
-
|
|
92
|
+
f,
|
|
96
93
|
{
|
|
97
94
|
w: 2,
|
|
98
95
|
h: 2,
|
|
@@ -102,73 +99,73 @@ const oe = ({
|
|
|
102
99
|
}
|
|
103
100
|
)
|
|
104
101
|
] }) : null,
|
|
105
|
-
|
|
102
|
+
s(`plans.${r.plan}`)
|
|
106
103
|
] }) })
|
|
107
104
|
] })
|
|
108
105
|
] }),
|
|
109
|
-
/* @__PURE__ */ e(
|
|
110
|
-
/* @__PURE__ */ n(
|
|
106
|
+
/* @__PURE__ */ e(H, { active: r }),
|
|
107
|
+
/* @__PURE__ */ n(l, { children: [
|
|
111
108
|
/* @__PURE__ */ e(
|
|
112
|
-
|
|
109
|
+
k,
|
|
113
110
|
{
|
|
114
111
|
flex: 1,
|
|
115
|
-
component:
|
|
112
|
+
component: b,
|
|
116
113
|
variant: "default",
|
|
117
114
|
size: "sm",
|
|
118
|
-
leftSection: /* @__PURE__ */ e(
|
|
119
|
-
to: i
|
|
115
|
+
leftSection: /* @__PURE__ */ e(g, { size: 16, icon: A }),
|
|
116
|
+
to: i ?? t ?? "",
|
|
120
117
|
onClick: c,
|
|
121
|
-
children:
|
|
118
|
+
children: s("settings")
|
|
122
119
|
}
|
|
123
120
|
),
|
|
124
|
-
/* @__PURE__ */ e(
|
|
125
|
-
|
|
121
|
+
o && /* @__PURE__ */ e(
|
|
122
|
+
k,
|
|
126
123
|
{
|
|
127
124
|
flex: 1,
|
|
128
|
-
component:
|
|
125
|
+
component: b,
|
|
129
126
|
variant: "default",
|
|
130
127
|
size: "sm",
|
|
131
|
-
leftSection: /* @__PURE__ */ e(
|
|
132
|
-
to: o
|
|
128
|
+
leftSection: /* @__PURE__ */ e(g, { size: 16, icon: L }),
|
|
129
|
+
to: o,
|
|
133
130
|
onClick: c,
|
|
134
|
-
children:
|
|
131
|
+
children: s("members")
|
|
135
132
|
}
|
|
136
133
|
)
|
|
137
134
|
] })
|
|
138
135
|
] });
|
|
139
|
-
},
|
|
136
|
+
}, H = ({
|
|
140
137
|
active: r
|
|
141
138
|
}) => {
|
|
142
|
-
const { t:
|
|
143
|
-
return /* @__PURE__ */ n(
|
|
144
|
-
/* @__PURE__ */ n(
|
|
145
|
-
/* @__PURE__ */ n(
|
|
146
|
-
|
|
139
|
+
const { t: i } = h("workspaceMenu"), t = (r?.storageUsedKb || 0) / (r?.storageLimitKb || 1), o = F.formatPercents(t);
|
|
140
|
+
return /* @__PURE__ */ n(a, { gap: 4, w: "100%", children: [
|
|
141
|
+
/* @__PURE__ */ n(l, { justify: "space-between", children: [
|
|
142
|
+
/* @__PURE__ */ n(m, { size: "sm", fw: 500, children: [
|
|
143
|
+
i("usedStorage"),
|
|
147
144
|
": ",
|
|
148
145
|
o
|
|
149
146
|
] }),
|
|
150
|
-
/* @__PURE__ */ n(
|
|
151
|
-
|
|
147
|
+
/* @__PURE__ */ n(m, { size: "sm", fw: 500, c: "gray", children: [
|
|
148
|
+
z(r?.storageUsedKb),
|
|
152
149
|
" ",
|
|
153
|
-
|
|
150
|
+
i("of"),
|
|
154
151
|
" ",
|
|
155
|
-
|
|
152
|
+
z(r?.storageLimitKb)
|
|
156
153
|
] })
|
|
157
154
|
] }),
|
|
158
|
-
/* @__PURE__ */ e(
|
|
155
|
+
/* @__PURE__ */ e(U, { h: 4, value: t * 100 })
|
|
159
156
|
] });
|
|
160
|
-
},
|
|
157
|
+
}, R = ({
|
|
161
158
|
onCreate: r,
|
|
162
|
-
onClick:
|
|
159
|
+
onClick: i,
|
|
163
160
|
items: t,
|
|
164
161
|
onClose: o
|
|
165
162
|
}) => {
|
|
166
|
-
const { t:
|
|
167
|
-
return /* @__PURE__ */ n(
|
|
168
|
-
t?.length > 0 && /* @__PURE__ */ n(
|
|
169
|
-
/* @__PURE__ */ e(
|
|
170
|
-
/* @__PURE__ */ e(
|
|
171
|
-
|
|
163
|
+
const { t: c } = h("workspaceMenu");
|
|
164
|
+
return /* @__PURE__ */ n(a, { gap: 12, children: [
|
|
165
|
+
t?.length > 0 && /* @__PURE__ */ n(a, { gap: 0, children: [
|
|
166
|
+
/* @__PURE__ */ e(p.Label, { fw: 600, px: 4, py: 5, fz: "sm", children: c("switchWorkspace") }),
|
|
167
|
+
/* @__PURE__ */ e(f, { w: "100%", px: 4, children: /* @__PURE__ */ e(
|
|
168
|
+
P.Autosize,
|
|
172
169
|
{
|
|
173
170
|
mah: 200,
|
|
174
171
|
w: "100%",
|
|
@@ -176,23 +173,26 @@ const oe = ({
|
|
|
176
173
|
scrollbars: "y",
|
|
177
174
|
type: "always",
|
|
178
175
|
styles: {
|
|
176
|
+
viewport: {
|
|
177
|
+
paddingRight: t.length > 4 ? 12 : 0
|
|
178
|
+
},
|
|
179
179
|
content: {
|
|
180
180
|
minWidth: 0
|
|
181
181
|
}
|
|
182
182
|
},
|
|
183
|
-
children: /* @__PURE__ */ e(
|
|
184
|
-
|
|
183
|
+
children: /* @__PURE__ */ e(a, { gap: 6, miw: 0, children: t.map((s) => /* @__PURE__ */ e(
|
|
184
|
+
O,
|
|
185
185
|
{
|
|
186
|
-
workspace:
|
|
187
|
-
onClick:
|
|
186
|
+
workspace: s,
|
|
187
|
+
onClick: i
|
|
188
188
|
},
|
|
189
|
-
|
|
189
|
+
s.workspaceId
|
|
190
190
|
)) })
|
|
191
191
|
}
|
|
192
192
|
) })
|
|
193
193
|
] }),
|
|
194
|
-
/* @__PURE__ */ e(
|
|
195
|
-
|
|
194
|
+
/* @__PURE__ */ e(f, { p: 4, pt: 0, children: /* @__PURE__ */ e(
|
|
195
|
+
k,
|
|
196
196
|
{
|
|
197
197
|
fullWidth: !0,
|
|
198
198
|
variant: "default",
|
|
@@ -200,13 +200,13 @@ const oe = ({
|
|
|
200
200
|
onClick: () => {
|
|
201
201
|
r?.(), o?.();
|
|
202
202
|
},
|
|
203
|
-
leftSection: /* @__PURE__ */ e(
|
|
204
|
-
children:
|
|
203
|
+
leftSection: /* @__PURE__ */ e(g, { icon: K, size: 16 }),
|
|
204
|
+
children: c("newWorkspace")
|
|
205
205
|
}
|
|
206
206
|
) })
|
|
207
207
|
] });
|
|
208
208
|
};
|
|
209
209
|
export {
|
|
210
|
-
|
|
211
|
-
|
|
210
|
+
E as ActiveWorkspace,
|
|
211
|
+
ne as WorkspaceMenu
|
|
212
212
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RemoveConfirmModal.d.ts","sourceRoot":"","sources":["../../../src/components/modals/RemoveConfirmModal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKlC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,eAAO,MAAM,sBAAsB,GACjC,OAAO,UAAU,CAAC,OAAO,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,GAAG;IACrD,MAAM,CAAC,EAAE;QACP,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;CACzB,
|
|
1
|
+
{"version":3,"file":"RemoveConfirmModal.d.ts","sourceRoot":"","sources":["../../../src/components/modals/RemoveConfirmModal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKlC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,eAAO,MAAM,sBAAsB,GACjC,OAAO,UAAU,CAAC,OAAO,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,GAAG;IACrD,MAAM,CAAC,EAAE;QACP,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;CACzB,SAuFF,CAAC"}
|
|
@@ -1,68 +1,75 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Delete03Icon as
|
|
3
|
-
import { HugeiconsIcon as
|
|
4
|
-
import { Stack as
|
|
5
|
-
import { modals as
|
|
6
|
-
const z = (
|
|
1
|
+
import { jsxs as g, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Delete03Icon as v } from "@hugeicons/core-free-icons";
|
|
3
|
+
import { HugeiconsIcon as y } from "@hugeicons/react";
|
|
4
|
+
import { Stack as C, Text as c } from "@mantine/core";
|
|
5
|
+
import { modals as a } from "@mantine/modals";
|
|
6
|
+
const z = (s) => {
|
|
7
7
|
const {
|
|
8
8
|
title: m,
|
|
9
9
|
children: d,
|
|
10
10
|
onConfirm: o,
|
|
11
11
|
onClose: p,
|
|
12
12
|
labels: n,
|
|
13
|
-
icon:
|
|
14
|
-
|
|
13
|
+
icon: t = /* @__PURE__ */ e(
|
|
14
|
+
y,
|
|
15
15
|
{
|
|
16
16
|
size: 20,
|
|
17
|
-
icon:
|
|
17
|
+
icon: v,
|
|
18
18
|
color: "var(--mantine-color-red-filled)"
|
|
19
19
|
}
|
|
20
20
|
),
|
|
21
21
|
confirmProps: f,
|
|
22
22
|
closeOnConfirm: u = !0,
|
|
23
23
|
...h
|
|
24
|
-
} =
|
|
24
|
+
} = s, w = a.openConfirmModal({
|
|
25
25
|
withCloseButton: !1,
|
|
26
26
|
keepMounted: !1,
|
|
27
27
|
centered: !0,
|
|
28
|
+
size: "auto",
|
|
29
|
+
styles: {
|
|
30
|
+
body: {
|
|
31
|
+
paddingTop: "var(--mantine-spacing-xl)"
|
|
32
|
+
},
|
|
33
|
+
content: {
|
|
34
|
+
minWidth: 320,
|
|
35
|
+
maxWidth: 480
|
|
36
|
+
}
|
|
37
|
+
},
|
|
28
38
|
confirmProps: {
|
|
29
39
|
color: f?.color ?? "red",
|
|
30
40
|
fullWidth: !0,
|
|
31
41
|
variant: "filled",
|
|
32
42
|
size: "sm",
|
|
33
|
-
children: n?.confirm ?? "Delete"
|
|
43
|
+
children: n?.confirm ?? "Delete",
|
|
44
|
+
style: { whiteSpace: "nowrap" }
|
|
34
45
|
},
|
|
35
46
|
cancelProps: {
|
|
36
47
|
variant: "default",
|
|
37
48
|
size: "sm",
|
|
38
49
|
fullWidth: !0,
|
|
39
|
-
children: n?.cancel ?? "Cancel"
|
|
50
|
+
children: n?.cancel ?? "Cancel",
|
|
51
|
+
style: { whiteSpace: "nowrap" }
|
|
40
52
|
},
|
|
41
53
|
groupProps: {
|
|
42
54
|
mt: 24,
|
|
43
55
|
wrap: "nowrap",
|
|
44
56
|
gap: 8
|
|
45
57
|
},
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
children: /* @__PURE__ */ w(y, { gap: 0, align: "center", mb: 0, children: [
|
|
52
|
-
r && r,
|
|
53
|
-
/* @__PURE__ */ e(c, { mt: "xs", fw: "700", ta: "center", children: m }),
|
|
58
|
+
children: /* @__PURE__ */ g(C, { gap: 0, align: "center", mb: 0, children: [
|
|
59
|
+
t && t,
|
|
60
|
+
/* @__PURE__ */ e(c, { c: "bright", mt: "xs", fw: "700", ta: "center", children: m }),
|
|
54
61
|
/* @__PURE__ */ e(c, { mt: 6, size: "sm", c: "gray", ta: "center", children: d })
|
|
55
62
|
] }),
|
|
56
63
|
onConfirm: o,
|
|
57
64
|
onClose: () => {
|
|
58
|
-
window.removeEventListener("keydown",
|
|
65
|
+
window.removeEventListener("keydown", r), p?.();
|
|
59
66
|
},
|
|
60
67
|
...h
|
|
61
|
-
}),
|
|
68
|
+
}), r = (i) => {
|
|
62
69
|
const l = document.activeElement?.tagName;
|
|
63
|
-
l === "TEXTAREA" || l === "INPUT" || i.key === "Enter" && (i.preventDefault(), o?.(), u &&
|
|
70
|
+
l === "TEXTAREA" || l === "INPUT" || i.key === "Enter" && (i.preventDefault(), o?.(), u && a.close(w));
|
|
64
71
|
};
|
|
65
|
-
window.addEventListener("keydown",
|
|
72
|
+
window.addEventListener("keydown", r);
|
|
66
73
|
};
|
|
67
74
|
export {
|
|
68
75
|
z as openRemoveConfirmModal
|