@layers-app/shared 0.2.6 → 0.2.8
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/svg/socials/instagram.svg.js +3 -3
- package/dist/components/AliasTextInput/AliasTextInput.d.ts.map +1 -1
- package/dist/components/AliasTextInput/AliasTextInput.js +21 -20
- package/dist/components/AppContainer/AppContainer.js +3 -3
- package/dist/components/AppContainer/AppContainer.module.css.js +1 -1
- package/dist/components/AppContainer/components/AppSidebarButton.d.ts +1 -1
- package/dist/components/AppContainer/components/AppSidebarButton.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppSidebarButton.js +4 -4
- package/dist/components/AppContainer/components/AppsSidebar/AppsSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/AppsSection.js +40 -32
- package/dist/components/AppContainer/components/AppsSidebar/TopSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/TopSection.js +41 -33
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +58 -49
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.d.ts.map +1 -1
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.js +151 -51
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.module.css.js +1 -1
- 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 +46 -43
- package/dist/components/AppContainer/hooks/useAppContainerDataStore.d.ts.map +1 -1
- package/dist/components/AppContainer/hooks/useAppContainerDataStore.js +4 -3
- package/dist/components/AppContainer/types.d.ts +2 -1
- package/dist/components/AppContainer/types.d.ts.map +1 -1
- package/dist/components/AppShell/AppShell.module.css.js +5 -5
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.module.css.js +4 -4
- package/dist/components/AttachmentsGalleryModal/styles.module.css.js +14 -14
- package/dist/components/AttachmentsPreview/AttachmentsPreview.module.css.js +1 -1
- package/dist/components/BouncingLogo/BouncingLogo.module.css.js +8 -8
- package/dist/components/CollapsibleContainer/CollapsibleContainer.module.css.js +1 -1
- package/dist/components/CommentComposer/CommentComposer.module.css.js +4 -4
- package/dist/components/CommunitiesDialog/styles.module.css.js +1 -1
- package/dist/components/Copyright/Copyright.module.css.js +1 -1
- package/dist/components/CustomKBD/CustomKBD.module.css.js +1 -1
- package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
- package/dist/components/EmojiPicker/EmojiPicker.js +28 -29
- package/dist/components/EmojiPicker/EmojiPicker.module.css.js +8 -8
- package/dist/components/EntityTitle/EntityTitle.module.css.js +1 -1
- package/dist/components/ErrorPage/components/Error404.d.ts.map +1 -1
- package/dist/components/FeatureProgress/FeatureProgress.d.ts +11 -0
- package/dist/components/FeatureProgress/FeatureProgress.d.ts.map +1 -0
- package/dist/components/FeatureProgress/FeatureProgress.js +148 -0
- package/dist/components/FeatureProgress/FeatureProgress.module.css.js +81 -0
- package/dist/components/FeatureProgress/FeatureProgressCelebrationIcon.d.ts +2 -0
- package/dist/components/FeatureProgress/FeatureProgressCelebrationIcon.d.ts.map +1 -0
- package/dist/components/FeatureProgress/FeatureProgressCelebrationIcon.js +88 -0
- package/dist/components/FeatureProgress/FeatureProgressCompleteModal.d.ts +9 -0
- package/dist/components/FeatureProgress/FeatureProgressCompleteModal.d.ts.map +1 -0
- package/dist/components/FeatureProgress/FeatureProgressCompleteModal.js +35 -0
- package/dist/components/FeatureProgress/constants.d.ts +4 -0
- package/dist/components/FeatureProgress/constants.d.ts.map +1 -0
- package/dist/components/FeatureProgress/constants.js +4 -0
- package/dist/components/FeatureProgress/index.d.ts +3 -0
- package/dist/components/FeatureProgress/index.d.ts.map +1 -0
- package/dist/components/FilePicker/FilePicker.d.ts +4 -2
- package/dist/components/FilePicker/FilePicker.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePicker.js +247 -229
- package/dist/components/FilePicker/FilePicker.module.css.js +12 -10
- package/dist/components/FilePicker/FilePickerGallery.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerGallery.js +59 -33
- package/dist/components/FilePicker/FilePickerGiphy.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerGiphy.js +38 -38
- package/dist/components/FilePicker/FilePickerLink.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerLink.js +18 -15
- package/dist/components/FilePicker/FilePickerUnsplash.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerUnsplash.js +39 -39
- package/dist/components/FilePicker/FilePickerUpload.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerUpload.js +51 -35
- package/dist/components/FilePicker/api/giphyApi.js +10 -10
- package/dist/components/FilePicker/coverCollections.d.ts +4 -0
- package/dist/components/FilePicker/coverCollections.d.ts.map +1 -0
- package/dist/components/FilePicker/coverCollections.js +164 -0
- package/dist/components/FilePicker/index.d.ts +1 -0
- package/dist/components/FilePicker/index.d.ts.map +1 -1
- package/dist/components/FormViewer/FormViewer.module.css.js +20 -20
- package/dist/components/FormViewer/components/OneSlideLayput.js +39 -37
- package/dist/components/FormViewer/components/fields/DragOptions/DragOptions.module.css.js +1 -1
- package/dist/components/FormViewer/components/fields/DropdownField/DropdownField.module.css.js +1 -1
- package/dist/components/FormViewer/components/fields/EditableContent/EditableContent.module.css.js +1 -1
- package/dist/components/FormViewer/components/fields/SelectableCard/PictureSelectableCard.js +42 -42
- package/dist/components/FormViewer/components/fields/SelectableCard/SelectableCard.module.css.js +8 -8
- package/dist/components/FormViewer/components/fields/UploadField/UploadFile/UploadFile.module.css.js +4 -4
- package/dist/components/FormViewer/hooks/useCreateFormContext.d.ts.map +1 -1
- package/dist/components/FormViewer/hooks/useCreateFormContext.js +10 -10
- package/dist/components/FormViewer/store/formStore.d.ts.map +1 -1
- package/dist/components/FormViewer/store/formStoreApi.js +13 -13
- package/dist/components/ImageCropper/ImageCropper.d.ts.map +1 -1
- package/dist/components/ImageCropper/ImageCropper.js +185 -183
- package/dist/components/ImageCropper/ImageCropper.module.css.js +38 -38
- package/dist/components/ImageCropper/index.d.ts +1 -1
- package/dist/components/ImageCropper/index.d.ts.map +1 -1
- package/dist/components/ImageCropper/useCropInteraction.d.ts.map +1 -1
- package/dist/components/ImageCropper/useCropInteraction.js +13 -2
- package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.d.ts.map +1 -1
- package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.module.css.js +7 -7
- package/dist/components/IntegrationFlowAnimation/icons/GoogleDriveIcon.d.ts +1 -1
- package/dist/components/IntegrationFlowAnimation/icons/GoogleDriveIcon.d.ts.map +1 -1
- package/dist/components/IntegrationFlowAnimation/icons/GoogleDriveIcon.js +3 -1
- package/dist/components/IntegrationFlowAnimation/icons/LayersCubeIcon.d.ts +1 -1
- package/dist/components/IntegrationFlowAnimation/icons/LayersCubeIcon.d.ts.map +1 -1
- package/dist/components/IntegrationFlowAnimation/icons/LayersCubeIcon.js +3 -1
- package/dist/components/LanguagePicker/LanguagePicker.d.ts.map +1 -1
- package/dist/components/LanguagePicker/LanguagePicker.js +45 -35
- package/dist/components/LanguagePicker/LanguagePicker.module.css.js +6 -4
- package/dist/components/Loaders/styles.module.css.js +6 -6
- package/dist/components/MediaLibrary/MediaLibrary.module.css.js +2 -2
- package/dist/components/MediaLibrary/MediaLibraryRow.d.ts.map +1 -1
- package/dist/components/MediaLibrary/MediaLibraryRow.js +16 -4
- package/dist/components/NavMenu/NavMenu.d.ts +2 -1
- package/dist/components/NavMenu/NavMenu.d.ts.map +1 -1
- package/dist/components/NavMenu/NavMenu.module.css.js +16 -16
- package/dist/components/NavMenu/components/NavMenuItem.d.ts +2 -1
- package/dist/components/NavMenu/components/NavMenuItem.d.ts.map +1 -1
- package/dist/components/NavMenu/components/NavMenuItem.js +128 -106
- 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/NotPublicPanel/NotPublicPanel.module.css.js +11 -11
- package/dist/components/Notification/Notification.module.css.js +1 -1
- package/dist/components/OnBoarding/steps/DifferentLayouts/styles.module.css.js +3 -3
- package/dist/components/OnBoarding/steps/styles.module.css.js +9 -9
- package/dist/components/OnBoarding/styles.module.css.js +7 -7
- package/dist/components/OnboardingTour/OnboardingTourFooter.d.ts +17 -0
- package/dist/components/OnboardingTour/OnboardingTourFooter.d.ts.map +1 -0
- package/dist/components/OnboardingTour/OnboardingTourFooter.js +40 -0
- package/dist/components/OnboardingTour/OnboardingTourWrapper.d.ts +13 -0
- package/dist/components/OnboardingTour/OnboardingTourWrapper.d.ts.map +1 -0
- package/dist/components/OnboardingTour/OnboardingTourWrapper.js +164 -0
- package/dist/components/OnboardingTour/index.d.ts +4 -0
- package/dist/components/OnboardingTour/index.d.ts.map +1 -0
- package/dist/components/OnboardingTour/useOnboardingTour.d.ts +14 -0
- package/dist/components/OnboardingTour/useOnboardingTour.d.ts.map +1 -0
- package/dist/components/OnboardingTour/useOnboardingTour.js +50 -0
- package/dist/components/SearchFilters/SearchFilters.module.css.js +1 -1
- package/dist/components/SettingsSection/styles.module.css.js +1 -1
- package/dist/components/SocialLinkRow/index.d.ts.map +1 -1
- package/dist/components/SocialLinkRow/index.js +80 -58
- package/dist/components/StorageUsageProgress/StorageUsageProgress.module.css.js +1 -1
- package/dist/components/TimezonePicker/index.d.ts.map +1 -1
- package/dist/components/TimezonePicker/index.js +42 -41
- package/dist/components/UserAvatar/index.d.ts.map +1 -1
- package/dist/components/UserAvatar/index.js +11 -10
- package/dist/components/WorkspaceMenu/WorkspaceItem.d.ts.map +1 -1
- package/dist/components/WorkspaceMenu/WorkspaceItem.js +21 -21
- package/dist/components/WorkspaceMenu/WorkspaceMenu.d.ts.map +1 -1
- package/dist/components/WorkspaceMenu/WorkspaceMenu.js +74 -74
- package/dist/components/table/FrontTable.d.ts.map +1 -1
- package/dist/components/table/hooks/useColumnsResizing.d.ts.map +1 -1
- package/dist/helpers/getFileIcons.js +1 -1
- package/dist/helpers/getFileType.d.ts +1 -1
- package/dist/helpers/getFileType.d.ts.map +1 -1
- package/dist/helpers/platform.d.ts +14 -0
- package/dist/helpers/platform.d.ts.map +1 -0
- package/dist/helpers/platform.js +33 -0
- package/dist/helpers/showFeatureFeedback.d.ts +16 -0
- package/dist/helpers/showFeatureFeedback.d.ts.map +1 -0
- package/dist/helpers/showFeatureFeedback.js +109 -0
- package/dist/helpers/showFeatureFeedback.module.css.js +9 -0
- package/dist/helpers/showNotifications.d.ts.map +1 -1
- package/dist/helpers/showNotifications.js +81 -113
- package/dist/helpers/showNotifications.module.css.js +10 -10
- package/dist/hooks/useFeatureFeedback.d.ts +23 -0
- package/dist/hooks/useFeatureFeedback.d.ts.map +1 -0
- package/dist/hooks/useFeatureFeedback.js +45 -0
- package/dist/hooks/usePlatform.d.ts +3 -0
- package/dist/hooks/usePlatform.d.ts.map +1 -0
- package/dist/hooks/usePlatform.js +10 -0
- 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 +373 -334
- package/dist/lang/locales/ui_en.json.js +15 -15
- package/dist/lang/locales/ui_es.json.js +13 -13
- package/dist/lang/locales/ui_ru.json.js +12 -12
- package/dist/lib/contentImport/lexicalSerializer.js +59 -47
- package/dist/lib/contentImport/utils.d.ts.map +1 -1
- package/dist/lib/layersVisitData.d.ts +13 -0
- package/dist/lib/layersVisitData.d.ts.map +1 -0
- package/dist/lib/layersVisitData.js +37 -0
- package/dist/store/featureProgress.d.ts +39 -0
- package/dist/store/featureProgress.d.ts.map +1 -0
- package/dist/store/featureProgress.js +68 -0
- package/dist/store/plansModal.d.ts.map +1 -1
- package/dist/store/plansModal.js +8 -6
- package/docs/README.md +499 -499
- package/package.json +78 -74
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { jsx as p, Fragment as q } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as x, useCallback as A, useMemo as R, useEffect as W } from "react";
|
|
3
|
+
import { useTranslation as M } from "react-i18next";
|
|
4
|
+
import { OnboardingTour as U } from "@gfazioli/mantine-onboarding-tour";
|
|
5
|
+
import { Text as D } from "@mantine/core";
|
|
6
|
+
import { DefaultSingleFooter as V, DefaultMultiFooter as G } from "./OnboardingTourFooter.js";
|
|
7
|
+
import { useOnboardingTour as H } from "./useOnboardingTour.js";
|
|
8
|
+
/* empty css */
|
|
9
|
+
const w = "onboarding-tour-popover-dropdown", T = "data-onboarding-tour-active-dropdown", J = (n) => typeof n == "string" ? /* @__PURE__ */ p(D, { fw: 500, size: "md", c: "white", mb: 4, children: n }) : n, K = (n) => typeof n == "string" ? /* @__PURE__ */ p(D, { size: "sm", c: "gray.3", children: n }) : n, nt = ({
|
|
10
|
+
featureKey: n,
|
|
11
|
+
tour: d,
|
|
12
|
+
children: P,
|
|
13
|
+
onComplete: m,
|
|
14
|
+
dependsOn: k,
|
|
15
|
+
withPopoverMoveAnimation: O = !1,
|
|
16
|
+
classNames: N = {},
|
|
17
|
+
focusRevealProps: g,
|
|
18
|
+
onOnboardingTourEnd: C,
|
|
19
|
+
onOnboardingTourClose: S,
|
|
20
|
+
onOnboardingTourChange: $,
|
|
21
|
+
onOnboardingTourStart: E,
|
|
22
|
+
...F
|
|
23
|
+
}) => {
|
|
24
|
+
const { t: l } = M("pages"), { started: y, complete: f } = H(n, { dependsOn: k }), c = x(null), b = x(null), B = A(() => {
|
|
25
|
+
f(), m?.(), C?.();
|
|
26
|
+
}, [f, m, C]), _ = A(() => {
|
|
27
|
+
f(), m?.(), S?.();
|
|
28
|
+
}, [f, m, S]), j = R(() => {
|
|
29
|
+
const o = d.length, e = o === 1;
|
|
30
|
+
return d.map((r, s) => {
|
|
31
|
+
const a = {
|
|
32
|
+
...r,
|
|
33
|
+
title: J(r.title),
|
|
34
|
+
content: K(r.content)
|
|
35
|
+
};
|
|
36
|
+
return r.footer === void 0 && (e ? a.footer = (u) => /* @__PURE__ */ p(
|
|
37
|
+
V,
|
|
38
|
+
{
|
|
39
|
+
controller: u,
|
|
40
|
+
label: l("onboarding.continue")
|
|
41
|
+
}
|
|
42
|
+
) : a.footer = (u) => /* @__PURE__ */ p(
|
|
43
|
+
G,
|
|
44
|
+
{
|
|
45
|
+
controller: u,
|
|
46
|
+
stepIndex: s,
|
|
47
|
+
totalSteps: o,
|
|
48
|
+
labels: {
|
|
49
|
+
stepOf: l("onboarding.stepOf", {
|
|
50
|
+
current: s + 1,
|
|
51
|
+
total: o
|
|
52
|
+
}),
|
|
53
|
+
back: l("onboarding.back"),
|
|
54
|
+
next: l("onboarding.next"),
|
|
55
|
+
done: l("onboarding.done")
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
)), a;
|
|
59
|
+
});
|
|
60
|
+
}, [d, l]), z = R(() => {
|
|
61
|
+
const o = typeof g == "object" ? g : void 0, e = o?.popoverProps ?? {}, r = e.classNames ?? {}, s = e.styles ?? {}, a = [w, r.dropdown].filter(Boolean).join(" ");
|
|
62
|
+
return {
|
|
63
|
+
...o,
|
|
64
|
+
disableTargetInteraction: o?.disableTargetInteraction ?? !0,
|
|
65
|
+
overlayProps: {
|
|
66
|
+
blur: 0,
|
|
67
|
+
...o?.overlayProps
|
|
68
|
+
},
|
|
69
|
+
popoverProps: {
|
|
70
|
+
position: "bottom",
|
|
71
|
+
offset: 10,
|
|
72
|
+
transitionProps: {
|
|
73
|
+
duration: 0,
|
|
74
|
+
...e.transitionProps ?? {}
|
|
75
|
+
},
|
|
76
|
+
...e,
|
|
77
|
+
classNames: {
|
|
78
|
+
...r,
|
|
79
|
+
dropdown: a
|
|
80
|
+
},
|
|
81
|
+
styles: {
|
|
82
|
+
...s,
|
|
83
|
+
dropdown: {
|
|
84
|
+
backgroundColor: "var(--mantine-color-dark-7)",
|
|
85
|
+
padding: 16,
|
|
86
|
+
color: "white",
|
|
87
|
+
border: "none",
|
|
88
|
+
width: 300,
|
|
89
|
+
...s.dropdown
|
|
90
|
+
},
|
|
91
|
+
arrow: {
|
|
92
|
+
backgroundColor: "var(--mantine-color-dark-7)",
|
|
93
|
+
border: "none",
|
|
94
|
+
...s.arrow
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
}, [g]);
|
|
100
|
+
return W(() => {
|
|
101
|
+
if (!y || !O) return;
|
|
102
|
+
let o = 0;
|
|
103
|
+
const e = document.createElement("style");
|
|
104
|
+
e.setAttribute("data-onboarding-tour-popover-animation", "true"), e.textContent = `.${w}:not([${T}]) { opacity: 0 !important; pointer-events: none !important; }`, document.head.appendChild(e);
|
|
105
|
+
const r = (t) => {
|
|
106
|
+
t.removeAttribute(T), t.style.removeProperty("position"), t.style.removeProperty("top"), t.style.removeProperty("left"), t.style.removeProperty("width"), t.style.removeProperty("transform"), t.style.removeProperty("opacity"), t.style.removeProperty("pointer-events"), t.style.removeProperty("will-change"), t.style.removeProperty("transition");
|
|
107
|
+
}, s = (t) => {
|
|
108
|
+
const i = t.getBoundingClientRect();
|
|
109
|
+
if (i.width === 0 || i.height === 0) return;
|
|
110
|
+
const v = i.top, h = i.left, I = b.current?.top ?? v, L = b.current?.left ?? h;
|
|
111
|
+
c.current && c.current !== t && r(c.current), c.current = t, t.setAttribute(T, "true"), Object.assign(t.style, {
|
|
112
|
+
position: "fixed",
|
|
113
|
+
top: `${I}px`,
|
|
114
|
+
left: `${L}px`,
|
|
115
|
+
width: `${i.width}px`,
|
|
116
|
+
transform: "none",
|
|
117
|
+
opacity: "1",
|
|
118
|
+
pointerEvents: "auto",
|
|
119
|
+
willChange: "top, left",
|
|
120
|
+
transition: "top 260ms cubic-bezier(0.2, 0, 0, 1), left 260ms cubic-bezier(0.2, 0, 0, 1)"
|
|
121
|
+
}), requestAnimationFrame(() => {
|
|
122
|
+
t.isConnected && (t.style.top = `${v}px`, t.style.left = `${h}px`);
|
|
123
|
+
}), b.current = { top: v, left: h };
|
|
124
|
+
}, a = () => {
|
|
125
|
+
const t = Array.from(
|
|
126
|
+
document.querySelectorAll(`.${w}`)
|
|
127
|
+
), i = t[t.length - 1];
|
|
128
|
+
i && s(i);
|
|
129
|
+
}, u = new MutationObserver(() => {
|
|
130
|
+
cancelAnimationFrame(o), o = requestAnimationFrame(a);
|
|
131
|
+
});
|
|
132
|
+
return a(), u.observe(document.body, { childList: !0, subtree: !0 }), () => {
|
|
133
|
+
u.disconnect(), cancelAnimationFrame(o), e.remove(), c.current && (r(c.current), c.current = null), b.current = null;
|
|
134
|
+
};
|
|
135
|
+
}, [y, O]), d.length === 0 ? /* @__PURE__ */ p(q, { children: P }) : /* @__PURE__ */ p(
|
|
136
|
+
U,
|
|
137
|
+
{
|
|
138
|
+
tour: j,
|
|
139
|
+
started: y,
|
|
140
|
+
onOnboardingTourStart: () => {
|
|
141
|
+
E?.();
|
|
142
|
+
},
|
|
143
|
+
onOnboardingTourChange: (o) => {
|
|
144
|
+
$?.(o);
|
|
145
|
+
},
|
|
146
|
+
onOnboardingTourEnd: B,
|
|
147
|
+
onOnboardingTourClose: _,
|
|
148
|
+
withPrevButton: !1,
|
|
149
|
+
withNextButton: !1,
|
|
150
|
+
withSkipButton: !1,
|
|
151
|
+
withStepper: !1,
|
|
152
|
+
maw: 300,
|
|
153
|
+
classNames: {
|
|
154
|
+
...N
|
|
155
|
+
},
|
|
156
|
+
focusRevealProps: z,
|
|
157
|
+
...F,
|
|
158
|
+
children: P
|
|
159
|
+
}
|
|
160
|
+
);
|
|
161
|
+
};
|
|
162
|
+
export {
|
|
163
|
+
nt as OnboardingTourWrapper
|
|
164
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { OnboardingTourWrapper } from './OnboardingTourWrapper';
|
|
2
|
+
export type { OnboardingTourWrapperProps } from './OnboardingTourWrapper';
|
|
3
|
+
export { useOnboardingTour, isOnboardingCompleted, resetOnboarding, } from './useOnboardingTour';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/OnboardingTour/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,YAAY,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,eAAe,GAChB,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const isOnboardingCompleted: (featureKey: string) => boolean;
|
|
2
|
+
export declare const resetOnboarding: (featureKey: string) => void;
|
|
3
|
+
interface UseOnboardingTourOptions {
|
|
4
|
+
dependsOn?: string;
|
|
5
|
+
}
|
|
6
|
+
interface UseOnboardingTourReturn {
|
|
7
|
+
started: boolean;
|
|
8
|
+
completed: boolean;
|
|
9
|
+
start: () => void;
|
|
10
|
+
complete: () => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const useOnboardingTour: (featureKey: string, options?: UseOnboardingTourOptions) => UseOnboardingTourReturn;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=useOnboardingTour.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOnboardingTour.d.ts","sourceRoot":"","sources":["../../../src/components/OnboardingTour/useOnboardingTour.ts"],"names":[],"mappings":"AAyBA,eAAO,MAAM,qBAAqB,GAAI,YAAY,MAAM,KAAG,OAE1D,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,YAAY,MAAM,KAAG,IAOpD,CAAC;AAEF,UAAU,wBAAwB;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,uBAAuB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,iBAAiB,GAC5B,YAAY,MAAM,EAClB,UAAU,wBAAwB,KACjC,uBAwDF,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { useState as p, useEffect as w, useCallback as O } from "react";
|
|
2
|
+
const g = "onboarding-completed", a = "onboarding-completed", l = "onboarding-reset", E = () => {
|
|
3
|
+
try {
|
|
4
|
+
return JSON.parse(localStorage.getItem(g) || "{}");
|
|
5
|
+
} catch {
|
|
6
|
+
return {};
|
|
7
|
+
}
|
|
8
|
+
}, u = (t) => {
|
|
9
|
+
try {
|
|
10
|
+
localStorage.setItem(g, JSON.stringify(t));
|
|
11
|
+
} catch {
|
|
12
|
+
}
|
|
13
|
+
}, d = (t) => !!E()[t], b = (t) => {
|
|
14
|
+
const o = E();
|
|
15
|
+
delete o[t], u(o), window.dispatchEvent(
|
|
16
|
+
new CustomEvent(l, { detail: t })
|
|
17
|
+
);
|
|
18
|
+
}, h = (t, o) => {
|
|
19
|
+
const { dependsOn: n } = o ?? {}, [r, m] = p(
|
|
20
|
+
() => d(t)
|
|
21
|
+
), [c, s] = p(
|
|
22
|
+
() => !d(t) && (n ? d(n) : !0)
|
|
23
|
+
);
|
|
24
|
+
w(() => {
|
|
25
|
+
if (r || !n || c) return;
|
|
26
|
+
const e = (i) => {
|
|
27
|
+
i.detail === n && !d(t) && s(!0);
|
|
28
|
+
};
|
|
29
|
+
return window.addEventListener(a, e), () => window.removeEventListener(a, e);
|
|
30
|
+
}, [n, r, c, t]), w(() => {
|
|
31
|
+
const e = (i) => {
|
|
32
|
+
i.detail === t && (m(!1), s(!0));
|
|
33
|
+
};
|
|
34
|
+
return window.addEventListener(l, e), () => window.removeEventListener(l, e);
|
|
35
|
+
}, [t]);
|
|
36
|
+
const v = O(() => {
|
|
37
|
+
const e = E();
|
|
38
|
+
e[t] = !0, u(e), m(!0), s(!1), window.dispatchEvent(
|
|
39
|
+
new CustomEvent(a, { detail: t })
|
|
40
|
+
);
|
|
41
|
+
}, [t]), C = O(() => {
|
|
42
|
+
s(!0);
|
|
43
|
+
}, []);
|
|
44
|
+
return { started: c, completed: r, start: C, complete: v };
|
|
45
|
+
};
|
|
46
|
+
export {
|
|
47
|
+
d as isOnboardingCompleted,
|
|
48
|
+
b as resetOnboarding,
|
|
49
|
+
h as useOnboardingTour
|
|
50
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SocialLinkRow/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SocialLinkRow/index.tsx"],"names":[],"mappings":"AAmBA,UAAU,kBAAkB;IAC1B,MAAM,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,eAAO,MAAM,aAAa,GAAI,8BAI3B,kBAAkB,4CAiIpB,CAAC"}
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as i, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import a from "react";
|
|
3
3
|
import { useTranslation as E } from "react-i18next";
|
|
4
|
-
import { Cancel01Icon as
|
|
5
|
-
import { HugeiconsIcon as
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
const
|
|
12
|
-
Instagram:
|
|
13
|
-
"X (Twitter)":
|
|
14
|
-
Youtube:
|
|
15
|
-
GitHub:
|
|
16
|
-
},
|
|
4
|
+
import { Cancel01Icon as h } from "@hugeicons/core-free-icons";
|
|
5
|
+
import { HugeiconsIcon as p } from "@hugeicons/react";
|
|
6
|
+
import { Flex as o, Text as d, ActionIcon as g, Button as x, TextInput as S } from "@mantine/core";
|
|
7
|
+
import b from "../../assets/svg/socials/github.svg.js";
|
|
8
|
+
import z from "../../assets/svg/socials/instagram.svg.js";
|
|
9
|
+
import T from "../../assets/svg/socials/x.svg.js";
|
|
10
|
+
import L from "../../assets/svg/socials/youtube.svg.js";
|
|
11
|
+
const _ = {
|
|
12
|
+
Instagram: z,
|
|
13
|
+
"X (Twitter)": T,
|
|
14
|
+
Youtube: L,
|
|
15
|
+
GitHub: b
|
|
16
|
+
}, N = ({
|
|
17
17
|
social: n,
|
|
18
18
|
onSave: v,
|
|
19
19
|
onClear: w
|
|
20
20
|
}) => {
|
|
21
|
-
const { t: r } = E(), [I, l] = a.useState(!1), [s, c] = a.useState(n.link || ""), [k,
|
|
22
|
-
c(e), u(
|
|
23
|
-
},
|
|
24
|
-
const e =
|
|
21
|
+
const { t: r } = E(), [I, l] = a.useState(!1), [s, c] = a.useState(n.link || ""), [k, m] = a.useState(null), u = (e) => e.length > 30 ? r("MAX_LENGTH_EXCEEDED", { max: 30, ns: "errors" }) : /[\u0400-\u04FF]/.test(e) ? r("CYRILLIC_NOT_ALLOWED", { ns: "errors" }) : null, C = (e) => {
|
|
22
|
+
c(e), m(u(e));
|
|
23
|
+
}, f = () => {
|
|
24
|
+
const e = u(s);
|
|
25
25
|
if (e) {
|
|
26
|
-
|
|
26
|
+
m(e);
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
29
29
|
v(s), l(!1);
|
|
30
30
|
};
|
|
31
|
-
return /* @__PURE__ */ o
|
|
32
|
-
/* @__PURE__ */ o
|
|
33
|
-
a.createElement(
|
|
31
|
+
return /* @__PURE__ */ i(o, { justify: "space-between", children: [
|
|
32
|
+
/* @__PURE__ */ i(o, { maw: 343, gap: 8, children: [
|
|
33
|
+
a.createElement(_[n.name], {
|
|
34
34
|
height: 16,
|
|
35
35
|
width: 16
|
|
36
36
|
}),
|
|
37
37
|
/* @__PURE__ */ t(d, { fw: 500, size: "sm", children: n.name })
|
|
38
38
|
] }),
|
|
39
|
-
n.link ? /* @__PURE__ */ o
|
|
39
|
+
n.link ? /* @__PURE__ */ i(o, { align: "center", gap: 16, children: [
|
|
40
40
|
/* @__PURE__ */ t(d, { size: "sm", c: "var(--mantine-color-text)", children: n.link }),
|
|
41
41
|
/* @__PURE__ */ t(
|
|
42
42
|
g,
|
|
@@ -45,17 +45,17 @@ const D = {
|
|
|
45
45
|
variant: "subtle",
|
|
46
46
|
size: "xs",
|
|
47
47
|
children: /* @__PURE__ */ t(
|
|
48
|
-
|
|
48
|
+
p,
|
|
49
49
|
{
|
|
50
50
|
onClick: () => {
|
|
51
51
|
w(), c("");
|
|
52
52
|
},
|
|
53
|
-
icon:
|
|
53
|
+
icon: h
|
|
54
54
|
}
|
|
55
55
|
)
|
|
56
56
|
}
|
|
57
57
|
)
|
|
58
|
-
] }) : !n.link && !I ? /* @__PURE__ */ t(
|
|
58
|
+
] }) : !n.link && !I ? /* @__PURE__ */ t(o, { children: /* @__PURE__ */ t(
|
|
59
59
|
x,
|
|
60
60
|
{
|
|
61
61
|
c: "var(--mantine-color-text)",
|
|
@@ -67,43 +67,65 @@ const D = {
|
|
|
67
67
|
},
|
|
68
68
|
children: r("addUsername")
|
|
69
69
|
}
|
|
70
|
-
) }) : /* @__PURE__ */
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
},
|
|
83
|
-
error: k
|
|
84
|
-
}
|
|
85
|
-
),
|
|
86
|
-
/* @__PURE__ */ t(x, { onClick: p, variant: "transparent", px: 0, size: "xs", children: r("send") }),
|
|
87
|
-
/* @__PURE__ */ t(
|
|
88
|
-
g,
|
|
89
|
-
{
|
|
90
|
-
color: "var(--mantine-color-text)",
|
|
91
|
-
variant: "subtle",
|
|
92
|
-
size: "xs",
|
|
93
|
-
children: /* @__PURE__ */ t(
|
|
94
|
-
h,
|
|
70
|
+
) }) : /* @__PURE__ */ i(
|
|
71
|
+
o,
|
|
72
|
+
{
|
|
73
|
+
align: "center",
|
|
74
|
+
justify: "end",
|
|
75
|
+
w: "100%",
|
|
76
|
+
maw: 335,
|
|
77
|
+
miw: 0,
|
|
78
|
+
gap: 16,
|
|
79
|
+
children: [
|
|
80
|
+
/* @__PURE__ */ t(
|
|
81
|
+
S,
|
|
95
82
|
{
|
|
96
|
-
|
|
97
|
-
|
|
83
|
+
flex: 1,
|
|
84
|
+
miw: 50,
|
|
85
|
+
placeholder: r("username"),
|
|
86
|
+
variant: "default",
|
|
87
|
+
size: "xs",
|
|
88
|
+
value: s,
|
|
89
|
+
onChange: (e) => C(e.currentTarget.value),
|
|
90
|
+
onKeyDown: (e) => {
|
|
91
|
+
e.key === "Enter" && (e.preventDefault(), e.stopPropagation(), f());
|
|
98
92
|
},
|
|
99
|
-
|
|
93
|
+
error: k
|
|
94
|
+
}
|
|
95
|
+
),
|
|
96
|
+
/* @__PURE__ */ t(
|
|
97
|
+
x,
|
|
98
|
+
{
|
|
99
|
+
w: 34,
|
|
100
|
+
onClick: f,
|
|
101
|
+
variant: "transparent",
|
|
102
|
+
px: 0,
|
|
103
|
+
size: "xs",
|
|
104
|
+
children: r("send")
|
|
105
|
+
}
|
|
106
|
+
),
|
|
107
|
+
/* @__PURE__ */ t(
|
|
108
|
+
g,
|
|
109
|
+
{
|
|
110
|
+
color: "var(--mantine-color-text)",
|
|
111
|
+
variant: "subtle",
|
|
112
|
+
size: "xs",
|
|
113
|
+
children: /* @__PURE__ */ t(
|
|
114
|
+
p,
|
|
115
|
+
{
|
|
116
|
+
onClick: () => {
|
|
117
|
+
c(""), l(!1), m(null);
|
|
118
|
+
},
|
|
119
|
+
icon: h
|
|
120
|
+
}
|
|
121
|
+
)
|
|
100
122
|
}
|
|
101
123
|
)
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
)
|
|
105
127
|
] });
|
|
106
128
|
};
|
|
107
129
|
export {
|
|
108
|
-
|
|
130
|
+
N as SocialLinkRow
|
|
109
131
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TimezonePicker/index.tsx"],"names":[],"mappings":"AAMA,OAAO,EAEL,aAAa,EAQd,MAAM,eAAe,CAAC;AAIvB,UAAU,mBAAoB,SAAQ,aAAa;IACjD,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED,eAAO,MAAM,cAAc,GAAI,wCAK5B,mBAAmB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TimezonePicker/index.tsx"],"names":[],"mappings":"AAMA,OAAO,EAEL,aAAa,EAQd,MAAM,eAAe,CAAC;AAIvB,UAAU,mBAAoB,SAAQ,aAAa;IACjD,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED,eAAO,MAAM,cAAc,GAAI,wCAK5B,mBAAmB,4CA6FrB,CAAC"}
|
|
@@ -1,44 +1,45 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import { Tick02Icon as
|
|
5
|
-
import { HugeiconsIcon as
|
|
6
|
-
import
|
|
7
|
-
import { useCombobox as
|
|
8
|
-
import { getTimeZones as
|
|
9
|
-
const
|
|
10
|
-
label:
|
|
11
|
-
timezone:
|
|
12
|
-
onChange:
|
|
13
|
-
...
|
|
1
|
+
import { jsx as o, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { useState as f, useMemo as g } from "react";
|
|
3
|
+
import { useTranslation as b } from "react-i18next";
|
|
4
|
+
import { Tick02Icon as v, Search01Icon as S } from "@hugeicons/core-free-icons";
|
|
5
|
+
import { HugeiconsIcon as p } from "@hugeicons/react";
|
|
6
|
+
import x from "../../assets/svg/globeIcon.svg.js";
|
|
7
|
+
import { useCombobox as w, Combobox as t, Flex as C, InputBase as I, Input as T, Stack as D, TextInput as k, ScrollArea as y } from "@mantine/core";
|
|
8
|
+
import { getTimeZones as O } from "../../helpers/timezones.js";
|
|
9
|
+
const F = ({
|
|
10
|
+
label: u,
|
|
11
|
+
timezone: r,
|
|
12
|
+
onChange: h,
|
|
13
|
+
...m
|
|
14
14
|
}) => {
|
|
15
|
-
const [c, a] =
|
|
15
|
+
const [c, a] = f(""), d = g(() => O(), []), { t: i } = b(), n = w({
|
|
16
16
|
onDropdownClose: () => {
|
|
17
17
|
n.resetSelectedOption(), n.focusTarget(), a("");
|
|
18
18
|
},
|
|
19
19
|
onDropdownOpen: () => {
|
|
20
20
|
n.focusSearchInput();
|
|
21
21
|
}
|
|
22
|
-
}),
|
|
23
|
-
(
|
|
24
|
-
).map((
|
|
22
|
+
}), s = d.filter(
|
|
23
|
+
(e) => e.label.toLowerCase().includes(c.toLowerCase().trim())
|
|
24
|
+
).map((e) => /* @__PURE__ */ o(
|
|
25
25
|
t.Option,
|
|
26
26
|
{
|
|
27
|
-
active: r ===
|
|
28
|
-
value:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
active: r === e.value,
|
|
28
|
+
value: e.value,
|
|
29
|
+
px: "xs",
|
|
30
|
+
children: /* @__PURE__ */ l(C, { justify: "space-between", align: "center", children: [
|
|
31
|
+
e.label,
|
|
32
|
+
r === e.value ? /* @__PURE__ */ o(
|
|
33
|
+
p,
|
|
33
34
|
{
|
|
34
35
|
color: "var(--mantine-primary-color-filled)",
|
|
35
36
|
size: 16,
|
|
36
|
-
icon:
|
|
37
|
+
icon: v
|
|
37
38
|
}
|
|
38
39
|
) : null
|
|
39
40
|
] })
|
|
40
41
|
},
|
|
41
|
-
|
|
42
|
+
e.value
|
|
42
43
|
));
|
|
43
44
|
return /* @__PURE__ */ l(
|
|
44
45
|
t,
|
|
@@ -46,45 +47,45 @@ const G = ({
|
|
|
46
47
|
position: "bottom",
|
|
47
48
|
store: n,
|
|
48
49
|
withinPortal: !1,
|
|
49
|
-
onOptionSubmit: (
|
|
50
|
-
|
|
50
|
+
onOptionSubmit: (e) => {
|
|
51
|
+
h(e), n.closeDropdown();
|
|
51
52
|
},
|
|
52
|
-
...
|
|
53
|
+
...m,
|
|
53
54
|
children: [
|
|
54
|
-
/* @__PURE__ */
|
|
55
|
-
|
|
55
|
+
/* @__PURE__ */ o(t.Target, { children: /* @__PURE__ */ o(
|
|
56
|
+
I,
|
|
56
57
|
{
|
|
57
|
-
label:
|
|
58
|
+
label: u,
|
|
58
59
|
value: r || "",
|
|
59
60
|
component: "button",
|
|
60
61
|
type: "button",
|
|
61
|
-
leftSection: /* @__PURE__ */
|
|
62
|
+
leftSection: /* @__PURE__ */ o(x, { width: 16, height: 16 }),
|
|
62
63
|
flex: 1,
|
|
63
64
|
pointer: !0,
|
|
64
|
-
rightSection: /* @__PURE__ */
|
|
65
|
+
rightSection: /* @__PURE__ */ o(t.Chevron, {}),
|
|
65
66
|
onClick: () => n.toggleDropdown(),
|
|
66
67
|
rightSectionPointerEvents: "none",
|
|
67
|
-
children: r || /* @__PURE__ */
|
|
68
|
+
children: r || /* @__PURE__ */ o(T.Placeholder, { children: i("pickValue") })
|
|
68
69
|
}
|
|
69
70
|
) }),
|
|
70
|
-
/* @__PURE__ */
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
-
|
|
71
|
+
/* @__PURE__ */ o(t.Dropdown, { children: /* @__PURE__ */ l(D, { gap: 12, children: [
|
|
72
|
+
/* @__PURE__ */ o(
|
|
73
|
+
k,
|
|
73
74
|
{
|
|
74
75
|
variant: "filled",
|
|
75
76
|
size: "sm",
|
|
76
77
|
placeholder: `${i("search")}...`,
|
|
77
78
|
value: c,
|
|
78
|
-
onChange: (
|
|
79
|
-
leftSection: /* @__PURE__ */
|
|
79
|
+
onChange: (e) => a(e.currentTarget.value),
|
|
80
|
+
leftSection: /* @__PURE__ */ o(p, { color: "dimmed", size: 16, icon: S })
|
|
80
81
|
}
|
|
81
82
|
),
|
|
82
|
-
/* @__PURE__ */
|
|
83
|
+
/* @__PURE__ */ o(t.Options, { children: /* @__PURE__ */ o(y.Autosize, { mah: 200, type: "scroll", children: s.length > 0 ? s : /* @__PURE__ */ o(t.Empty, { children: i("nothingData") }) }) })
|
|
83
84
|
] }) })
|
|
84
85
|
]
|
|
85
86
|
}
|
|
86
87
|
);
|
|
87
88
|
};
|
|
88
89
|
export {
|
|
89
|
-
|
|
90
|
+
F as TimezonePicker
|
|
90
91
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/UserAvatar/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAc,MAAM,OAAO,CAAC;AAErD,OAAO,EAAU,WAAW,EAAE,MAAM,eAAe,CAAC;AAGpD,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAGtF,MAAM,WAAW,eACf,SAAQ,WAAW,EACjB,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,MAAM,WAAW,CAAC;IAChE,IAAI,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;IAChC,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAED,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/UserAvatar/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAc,MAAM,OAAO,CAAC;AAErD,OAAO,EAAU,WAAW,EAAE,MAAM,eAAe,CAAC;AAGpD,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAGtF,MAAM,WAAW,eACf,SAAQ,WAAW,EACjB,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,MAAM,WAAW,CAAC;IAChE,IAAI,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;IAChC,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAED,eAAO,MAAM,UAAU,wFAuCtB,CAAC"}
|
|
@@ -1,34 +1,35 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsx as t, Fragment as c } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as m } 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 A =
|
|
7
|
-
({ user: r, size:
|
|
6
|
+
const A = m(
|
|
7
|
+
({ user: r, size: o = 24, emptyIcon: e, ...i }, n) => {
|
|
8
8
|
const a = r?.avatar || r?.avatarUrl;
|
|
9
|
-
return a && (a.includes("i=") || a.includes("e=")) ? /* @__PURE__ */
|
|
9
|
+
return a && (a.includes("i=") || a.includes("e=")) ? /* @__PURE__ */ t(
|
|
10
10
|
f,
|
|
11
11
|
{
|
|
12
12
|
icon: a,
|
|
13
13
|
name: r?.name,
|
|
14
14
|
fallbackColorById: r?.id,
|
|
15
|
-
size:
|
|
16
|
-
textSize: typeof
|
|
15
|
+
size: o,
|
|
16
|
+
textSize: typeof o == "number" ? o * 0.75 : void 0,
|
|
17
17
|
radius: i.radius,
|
|
18
18
|
...i,
|
|
19
19
|
ref: n
|
|
20
20
|
}
|
|
21
|
-
) : /* @__PURE__ */
|
|
21
|
+
) : /* @__PURE__ */ t(
|
|
22
22
|
d,
|
|
23
23
|
{
|
|
24
24
|
src: a,
|
|
25
25
|
color: "initials",
|
|
26
26
|
tt: "uppercase",
|
|
27
|
-
size:
|
|
27
|
+
size: o,
|
|
28
|
+
variant: "filled",
|
|
28
29
|
name: r?.id ?? "",
|
|
29
30
|
...i,
|
|
30
31
|
ref: n,
|
|
31
|
-
children: r ? /* @__PURE__ */
|
|
32
|
+
children: r ? /* @__PURE__ */ t(c, { children: r.name?.charAt(0) }) : /* @__PURE__ */ t(c, { children: e ?? /* @__PURE__ */ t(l, { size: "70%" }) })
|
|
32
33
|
}
|
|
33
34
|
);
|
|
34
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkspaceItem.d.ts","sourceRoot":"","sources":["../../../src/components/WorkspaceMenu/WorkspaceItem.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,UAAU,kBAAkB,CAAC,CAAC,SAAS,aAAa,GAAG,aAAa;IAClE,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC;IACzB,SAAS,EAAE,CAAC,CAAC;CACd;AAED,eAAO,MAAM,aAAa,GAAI,wBAAwB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"WorkspaceItem.d.ts","sourceRoot":"","sources":["../../../src/components/WorkspaceMenu/WorkspaceItem.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,UAAU,kBAAkB,CAAC,CAAC,SAAS,aAAa,GAAG,aAAa;IAClE,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC;IACzB,SAAS,EAAE,CAAC,CAAC;CACd;AAED,eAAO,MAAM,aAAa,GAAI,wBAAwB,kBAAkB,4CAwCvE,CAAC"}
|