organify-ui 0.3.11 → 0.3.13
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/{chunk-HFX2XZKZ.js → chunk-UMUOHUGU.js} +8 -115
- package/dist/chunk-UMUOHUGU.js.map +1 -0
- package/dist/{chunk-SAYB3NN2.js → chunk-W2Z7VRCR.js} +71 -28
- package/dist/chunk-W2Z7VRCR.js.map +1 -0
- package/dist/{chunk-VHQZS77G.js → chunk-XTMS6DXV.js} +138 -30
- package/dist/chunk-XTMS6DXV.js.map +1 -0
- package/dist/components/chat/index.js +2 -2
- package/dist/components/notifications/index.js +2 -2
- package/dist/index.d.ts +10 -3
- package/dist/index.js +336 -145
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-HFX2XZKZ.js.map +0 -1
- package/dist/chunk-SAYB3NN2.js.map +0 -1
- package/dist/chunk-VHQZS77G.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { Popover, PopoverTrigger, PopoverContent } from './chunk-
|
|
2
|
-
export { NotificationBell, NotificationItem, NotificationList, OrganifyNotifications, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PresenceAvatarStack, PresenceIndicator, useNotifications, usePresence } from './chunk-
|
|
1
|
+
import { Popover, PopoverTrigger, PopoverContent } from './chunk-W2Z7VRCR.js';
|
|
2
|
+
export { NotificationBell, NotificationItem, NotificationList, OrganifyNotifications, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PresenceAvatarStack, PresenceIndicator, useNotifications, usePresence } from './chunk-W2Z7VRCR.js';
|
|
3
3
|
export { createAiClient, useAiChat, useAiCommand, useAiSuggest, useAiUsage } from './chunk-NV4RWAQ2.js';
|
|
4
4
|
export { I18nProvider, createTranslator, useI18n } from './chunk-FQA33MF4.js';
|
|
5
5
|
export { ThemeProvider, useTheme } from './chunk-RFOKENE3.js';
|
|
6
|
-
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription,
|
|
7
|
-
export { AiChatSidebar, Alert, Button, ChatMessages, ChatSidebar, CommandBar, CreateRoomDialog, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger,
|
|
8
|
-
import { cn, Avatar, AvatarImage, AvatarFallback, TooltipProvider, Tooltip, TooltipTrigger, TooltipContent, Skeleton, useOrganify, useOrganifyGql,
|
|
9
|
-
export { Avatar, AvatarFallback, AvatarImage, Badge, OrganifyContext, OrganifyProvider, ScrollArea, ScrollBar, Skeleton, SkeletonCard, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, avatarVariants, badgeVariants, cn, useOrganify, useOrganifyApi, useOrganifyGql, useOrganifyNavigation, useOrganifyProject, useOrganifyRest, useOrganifyUser, useOrganifyWorkspace } from './chunk-
|
|
10
|
-
import { OrgDiamond, OrgPlus, OrgComment, OrgEdit, OrgTrash, OrgCheckCircle, OrgAttachment, OrgCalendar, OrgMail, OrgBoard,
|
|
6
|
+
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, ResponsiveDialog, Separator, Label, Input, Textarea, Button, Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from './chunk-UMUOHUGU.js';
|
|
7
|
+
export { AiChatSidebar, Alert, Button, ChatMessages, ChatSidebar, CommandBar, CreateRoomDialog, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, InlineAiButton, Input, Label, MOCK_PROJECTS, MOCK_USERS, OrgLoader, OrgLoaderInline, OrganifyChat, ResponsiveDialog, RoomManagementPanel, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, TypingIndicatorMock, alertVariants, buttonVariants, generateAutoReplies, getMockMentionOptions, getRoomPermissions, inputVariants, orgLoaderVariants, typingIndicator, useAiInline, useChat } from './chunk-UMUOHUGU.js';
|
|
8
|
+
import { cn, Avatar, AvatarImage, AvatarFallback, TooltipProvider, Tooltip, TooltipTrigger, TooltipContent, Drawer, DrawerContent, DrawerHeader, DrawerTitle, DrawerDescription, Skeleton, useOrganify, useOrganifyGql, useOrganifyUser, useOrganifyApi, Badge, ScrollArea, useOrganifyWorkspace, useOrganifyNavigation, useOrganifyProject } from './chunk-XTMS6DXV.js';
|
|
9
|
+
export { Avatar, AvatarFallback, AvatarImage, Badge, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, OrganifyContext, OrganifyProvider, ScrollArea, ScrollBar, Skeleton, SkeletonCard, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, avatarVariants, badgeVariants, cn, useOrganify, useOrganifyApi, useOrganifyGql, useOrganifyNavigation, useOrganifyProject, useOrganifyRest, useOrganifyUser, useOrganifyWorkspace } from './chunk-XTMS6DXV.js';
|
|
10
|
+
import { OrgDiamond, OrgPlus, OrgComment, OrgEdit, OrgTrash, OrgSprint, OrgCheckCircle, OrgAttachment, OrgCalendar, OrgMail, OrgBoard, OrgRocket, OrgWarning, OrgFlag, OrgShield, OrgZap, OrgStar } from './chunk-MZKEDV5W.js';
|
|
11
11
|
export { OrgAI, OrgActivity, OrgArrowLeft, OrgArrowRight, OrgAttachment, OrgBell, OrgBoard, OrgCalendar, OrgCelebrate, OrgChart, OrgChat, OrgCheck, OrgCheckCircle, OrgChevronDown, OrgChevronLeft, OrgChevronRight, OrgChevronUp, OrgClock, OrgClose, OrgComment, OrgCopy, OrgCreditCard, OrgDeveloper, OrgDiamond, OrgDoor, OrgDownload, OrgEdit, OrgError, OrgExecutive, OrgEye, OrgEyeOff, OrgFile, OrgFilter, OrgFlag, OrgFolder, OrgGauge, OrgGlobe, OrgGrid, OrgHeart, OrgHome, OrgInfo, OrgIntegration, OrgLink, OrgList, OrgLock, OrgLogo, OrgLogout, OrgMail, OrgMention, OrgMenu, OrgMoon, OrgPMO, OrgPause, OrgPlay, OrgPlus, OrgProjectManager, OrgReport, OrgRocket, OrgSearch, OrgSettings, OrgShield, OrgSort, OrgSprint, OrgStakeholder, OrgStar, OrgSun, OrgTag, OrgTarget, OrgTeam, OrgTrash, OrgTutorial, OrgUnlock, OrgUpload, OrgUser, OrgWarning, OrgWave, OrgWordmark, OrgWorkflow, OrgWorkspace, OrgZap } from './chunk-MZKEDV5W.js';
|
|
12
12
|
import * as React5 from 'react';
|
|
13
13
|
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
14
14
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
15
15
|
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
16
|
-
import { X, XIcon, GripVertical, Check, ChevronRight, Circle, Search, MoreHorizontal, AlertCircle, AlertTriangle, CheckCircle2, Info, Sparkles, Plus, Trash2, Calendar } from 'lucide-react';
|
|
16
|
+
import { X, XIcon, GripVertical, Check, ChevronRight, Circle, Search, MoreHorizontal, AlertCircle, AlertTriangle, CheckCircle2, Info, Sparkles, Plus, Zap, Trash2, Calendar } from 'lucide-react';
|
|
17
17
|
import { cva } from 'class-variance-authority';
|
|
18
18
|
import * as SheetPrimitive from '@radix-ui/react-dialog';
|
|
19
19
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
@@ -33,7 +33,7 @@ var Toggle = React5.forwardRef(({ className, label, description, ...props }, ref
|
|
|
33
33
|
"div",
|
|
34
34
|
{
|
|
35
35
|
className: cn(
|
|
36
|
-
"flex items-center justify-between border border-
|
|
36
|
+
"flex items-center justify-between border border-primary/15 bg-white/[0.03] rounded-xl p-4 transition-all duration-[400ms] ease-[cubic-bezier(0.25,1,0.5,1)]",
|
|
37
37
|
className
|
|
38
38
|
),
|
|
39
39
|
children: [
|
|
@@ -46,9 +46,9 @@ var Toggle = React5.forwardRef(({ className, label, description, ...props }, ref
|
|
|
46
46
|
{
|
|
47
47
|
id,
|
|
48
48
|
ref,
|
|
49
|
-
className: "peer inline-flex h-5 w-10 shrink-0 cursor-pointer items-center rounded-full border border-
|
|
49
|
+
className: "peer inline-flex h-5 w-10 shrink-0 cursor-pointer items-center rounded-full border border-primary/15 bg-black/40 transition-all duration-[400ms] ease-[cubic-bezier(0.25,1,0.5,1)] data-[state=checked]:border-primary-light data-[state=checked]:bg-primary/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-light",
|
|
50
50
|
...props,
|
|
51
|
-
children: /* @__PURE__ */ jsx(SwitchPrimitive.Thumb, { className: "pointer-events-none block h-4 w-4 border border-
|
|
51
|
+
children: /* @__PURE__ */ jsx(SwitchPrimitive.Thumb, { className: "pointer-events-none block h-4 w-4 border border-primary/15 bg-white/20 transition-transform data-[state=checked]:translate-x-5 data-[state=checked]:border-white data-[state=checked]:bg-white data-[state=unchecked]:translate-x-0" })
|
|
52
52
|
}
|
|
53
53
|
)
|
|
54
54
|
]
|
|
@@ -60,11 +60,11 @@ var Toggle = React5.forwardRef(({ className, label, description, ...props }, ref
|
|
|
60
60
|
{
|
|
61
61
|
ref,
|
|
62
62
|
className: cn(
|
|
63
|
-
"peer inline-flex h-5 w-10 shrink-0 cursor-pointer items-center rounded-full border border-
|
|
63
|
+
"peer inline-flex h-5 w-10 shrink-0 cursor-pointer items-center rounded-full border border-primary/15 bg-black/40 transition-all duration-[400ms] ease-[cubic-bezier(0.25,1,0.5,1)] data-[state=checked]:border-primary-light data-[state=checked]:bg-primary/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-light",
|
|
64
64
|
className
|
|
65
65
|
),
|
|
66
66
|
...props,
|
|
67
|
-
children: /* @__PURE__ */ jsx(SwitchPrimitive.Thumb, { className: "pointer-events-none block h-4 w-4 border border-
|
|
67
|
+
children: /* @__PURE__ */ jsx(SwitchPrimitive.Thumb, { className: "pointer-events-none block h-4 w-4 border border-primary/15 bg-white/20 transition-transform data-[state=checked]:translate-x-5 data-[state=checked]:border-white data-[state=checked]:bg-white data-[state=unchecked]:translate-x-0" })
|
|
68
68
|
}
|
|
69
69
|
);
|
|
70
70
|
});
|
|
@@ -378,7 +378,7 @@ function TaskDetailPanel({
|
|
|
378
378
|
{
|
|
379
379
|
className: cn(
|
|
380
380
|
"max-w-2xl max-h-[85vh] overflow-y-auto",
|
|
381
|
-
"border border-
|
|
381
|
+
"border border-primary/25 bg-white/[0.03] backdrop-blur-[40px]",
|
|
382
382
|
"shadow-[0_24px_80px_-15px_rgba(0,0,0,0.5)] rounded-2xl"
|
|
383
383
|
),
|
|
384
384
|
children: [
|
|
@@ -396,7 +396,7 @@ function TaskDetailPanel({
|
|
|
396
396
|
{
|
|
397
397
|
className: cn(
|
|
398
398
|
"max-h-[90vh]",
|
|
399
|
-
"border-t border-
|
|
399
|
+
"border-t border-primary/25 bg-white/[0.03] backdrop-blur-[40px]"
|
|
400
400
|
),
|
|
401
401
|
children: [
|
|
402
402
|
(title || subtitle) && /* @__PURE__ */ jsxs(DrawerHeader, { className: "text-left", children: [
|
|
@@ -667,7 +667,7 @@ function Dock({ items, position = "bottom", className, ...props }) {
|
|
|
667
667
|
"nav",
|
|
668
668
|
{
|
|
669
669
|
className: cn(
|
|
670
|
-
"flex items-center gap-1 rounded-2xl border border-
|
|
670
|
+
"flex items-center gap-1 rounded-2xl border border-primary/25",
|
|
671
671
|
"bg-white/[0.03] px-3 py-2 shadow-[0_24px_80px_-15px_rgba(0,0,0,0.5)] backdrop-blur-[40px]",
|
|
672
672
|
"transition-shadow duration-[400ms] ease-[cubic-bezier(0.25,1,0.5,1)]"
|
|
673
673
|
),
|
|
@@ -745,7 +745,7 @@ function isSeparator(entry) {
|
|
|
745
745
|
return "type" in entry && entry.type === "separator";
|
|
746
746
|
}
|
|
747
747
|
var sidebarVariants = cva(
|
|
748
|
-
"fixed left-0 top-0 z-40 flex h-full flex-col border-r border-
|
|
748
|
+
"fixed left-0 top-0 z-40 flex h-full flex-col border-r border-primary/15 bg-white/[0.02] backdrop-blur-[40px] motion-safe:transition-all motion-safe:duration-[400ms] ease-in-out",
|
|
749
749
|
{
|
|
750
750
|
variants: {
|
|
751
751
|
state: {
|
|
@@ -759,6 +759,7 @@ var sidebarVariants = cva(
|
|
|
759
759
|
function DockSidebar({
|
|
760
760
|
items,
|
|
761
761
|
bottomItems,
|
|
762
|
+
bottomExtra,
|
|
762
763
|
header,
|
|
763
764
|
expanded = false,
|
|
764
765
|
onExpandedChange,
|
|
@@ -811,51 +812,58 @@ function DockSidebar({
|
|
|
811
812
|
onMouseLeave: () => hoverExpand && onExpandedChange?.(false),
|
|
812
813
|
...props,
|
|
813
814
|
children: [
|
|
814
|
-
/* @__PURE__ */ jsxs(
|
|
815
|
-
"
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
"button",
|
|
822
|
-
{
|
|
823
|
-
type: "button",
|
|
824
|
-
onClick: onMobileClose,
|
|
825
|
-
"aria-label": "Fechar menu",
|
|
826
|
-
className: "flex h-7 w-7 items-center justify-center rounded-xl text-org-text-muted hover:bg-white/[0.05] hover:text-org-text sm:hidden",
|
|
827
|
-
children: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M4 4L12 12M12 4L4 12", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) })
|
|
828
|
-
}
|
|
815
|
+
/* @__PURE__ */ jsxs(
|
|
816
|
+
"div",
|
|
817
|
+
{
|
|
818
|
+
"data-tour": "workspace-switcher",
|
|
819
|
+
className: cn(
|
|
820
|
+
"flex items-center px-3 h-16 border-b border-primary/15",
|
|
821
|
+
expanded || mobileOpen ? "justify-between" : "justify-center"
|
|
829
822
|
),
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
{
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
823
|
+
children: [
|
|
824
|
+
header,
|
|
825
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
826
|
+
mobileOpen && /* @__PURE__ */ jsx(
|
|
827
|
+
"button",
|
|
828
|
+
{
|
|
829
|
+
type: "button",
|
|
830
|
+
onClick: onMobileClose,
|
|
831
|
+
"aria-label": "Fechar menu",
|
|
832
|
+
className: "flex h-7 w-7 items-center justify-center rounded-xl text-org-text-muted hover:bg-white/[0.05] hover:text-org-text sm:hidden",
|
|
833
|
+
children: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M4 4L12 12M12 4L4 12", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) })
|
|
834
|
+
}
|
|
839
835
|
),
|
|
840
|
-
|
|
841
|
-
"
|
|
836
|
+
/* @__PURE__ */ jsx(
|
|
837
|
+
"button",
|
|
842
838
|
{
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
fill: "none",
|
|
839
|
+
type: "button",
|
|
840
|
+
onClick: handleToggle,
|
|
841
|
+
"aria-label": expanded ? "Collapse sidebar" : "Expand sidebar",
|
|
847
842
|
className: cn(
|
|
848
|
-
"
|
|
849
|
-
|
|
843
|
+
"hidden sm:flex h-7 w-7 items-center justify-center rounded-xl",
|
|
844
|
+
"text-org-text-muted transition-all hover:bg-white/[0.05] hover:text-org-text"
|
|
850
845
|
),
|
|
851
|
-
children: /* @__PURE__ */ jsx(
|
|
846
|
+
children: /* @__PURE__ */ jsx(
|
|
847
|
+
"svg",
|
|
848
|
+
{
|
|
849
|
+
width: "16",
|
|
850
|
+
height: "16",
|
|
851
|
+
viewBox: "0 0 16 16",
|
|
852
|
+
fill: "none",
|
|
853
|
+
className: cn(
|
|
854
|
+
"transition-transform duration-[400ms]",
|
|
855
|
+
expanded ? "rotate-0" : "rotate-180"
|
|
856
|
+
),
|
|
857
|
+
children: /* @__PURE__ */ jsx("path", { d: "M10 12L6 8L10 4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
858
|
+
}
|
|
859
|
+
)
|
|
852
860
|
}
|
|
853
861
|
)
|
|
854
|
-
}
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
/* @__PURE__ */ jsx("nav", { className: "flex-1 overflow-y-auto overflow-x-hidden py-2 px-2 space-y-0.5", children: items.map((entry, i) => /* @__PURE__ */ jsx(
|
|
862
|
+
] })
|
|
863
|
+
]
|
|
864
|
+
}
|
|
865
|
+
),
|
|
866
|
+
/* @__PURE__ */ jsx("nav", { "data-tour": "main-nav", className: "flex-1 overflow-y-auto overflow-x-hidden py-2 px-2 space-y-0.5", children: items.map((entry, i) => /* @__PURE__ */ jsx(
|
|
859
867
|
SidebarEntry,
|
|
860
868
|
{
|
|
861
869
|
entry,
|
|
@@ -865,16 +873,19 @@ function DockSidebar({
|
|
|
865
873
|
},
|
|
866
874
|
isSeparator(entry) ? `sep-${i}` : entry.id
|
|
867
875
|
)) }),
|
|
868
|
-
bottomItems && bottomItems.length > 0 && /* @__PURE__ */
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
876
|
+
(bottomExtra || bottomItems && bottomItems.length > 0) && /* @__PURE__ */ jsxs("div", { className: "border-t border-primary/15 py-2 px-2 space-y-0.5", children: [
|
|
877
|
+
bottomExtra && /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center mb-1", children: bottomExtra }),
|
|
878
|
+
bottomItems && bottomItems.map((entry, i) => /* @__PURE__ */ jsx(
|
|
879
|
+
SidebarEntry,
|
|
880
|
+
{
|
|
881
|
+
entry,
|
|
882
|
+
expanded: expanded || mobileOpen,
|
|
883
|
+
renderLink,
|
|
884
|
+
onNavigate: mobileOpen ? onMobileClose : void 0
|
|
885
|
+
},
|
|
886
|
+
isSeparator(entry) ? `bsep-${i}` : entry.id
|
|
887
|
+
))
|
|
888
|
+
] })
|
|
878
889
|
]
|
|
879
890
|
}
|
|
880
891
|
)
|
|
@@ -908,7 +919,7 @@ function SidebarButton({
|
|
|
908
919
|
renderLink,
|
|
909
920
|
onNavigate
|
|
910
921
|
}) {
|
|
911
|
-
const { icon, label, href, onClick, active, badge, disabled } = item;
|
|
922
|
+
const { icon, label, href, onClick, active, badge, disabled, id } = item;
|
|
912
923
|
const handleClick = () => {
|
|
913
924
|
onClick?.();
|
|
914
925
|
onNavigate?.();
|
|
@@ -1010,6 +1021,17 @@ var DELETE_WORKSPACE_MUTATION = `
|
|
|
1010
1021
|
}
|
|
1011
1022
|
}
|
|
1012
1023
|
`;
|
|
1024
|
+
function useMediaQuery2(query) {
|
|
1025
|
+
const [matches, setMatches] = React5.useState(false);
|
|
1026
|
+
React5.useEffect(() => {
|
|
1027
|
+
const mql = window.matchMedia(query);
|
|
1028
|
+
setMatches(mql.matches);
|
|
1029
|
+
const handler = (e) => setMatches(e.matches);
|
|
1030
|
+
mql.addEventListener("change", handler);
|
|
1031
|
+
return () => mql.removeEventListener("change", handler);
|
|
1032
|
+
}, [query]);
|
|
1033
|
+
return matches;
|
|
1034
|
+
}
|
|
1013
1035
|
function WorkspaceSwitcher({ compact = false, onCreateWorkspace, className }) {
|
|
1014
1036
|
const {
|
|
1015
1037
|
workspace,
|
|
@@ -1026,7 +1048,9 @@ function WorkspaceSwitcher({ compact = false, onCreateWorkspace, className }) {
|
|
|
1026
1048
|
const [editingWorkspace, setEditingWorkspace] = React5.useState(null);
|
|
1027
1049
|
const [deletingWorkspace, setDeletingWorkspace] = React5.useState(null);
|
|
1028
1050
|
const dropdownRef = React5.useRef(null);
|
|
1051
|
+
const isMobile = useMediaQuery2("(max-width: 767px)");
|
|
1029
1052
|
React5.useEffect(() => {
|
|
1053
|
+
if (isMobile) return;
|
|
1030
1054
|
function handleClickOutside(event) {
|
|
1031
1055
|
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
1032
1056
|
setIsOpen(false);
|
|
@@ -1034,7 +1058,7 @@ function WorkspaceSwitcher({ compact = false, onCreateWorkspace, className }) {
|
|
|
1034
1058
|
}
|
|
1035
1059
|
document.addEventListener("mousedown", handleClickOutside);
|
|
1036
1060
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
1037
|
-
}, []);
|
|
1061
|
+
}, [isMobile]);
|
|
1038
1062
|
const handleCreateWorkspace = React5.useCallback(
|
|
1039
1063
|
async (data) => {
|
|
1040
1064
|
const optimisticId = `temp-${Date.now()}`;
|
|
@@ -1158,7 +1182,7 @@ function WorkspaceSwitcher({ compact = false, onCreateWorkspace, className }) {
|
|
|
1158
1182
|
]
|
|
1159
1183
|
}
|
|
1160
1184
|
),
|
|
1161
|
-
isOpen && /* @__PURE__ */ jsx(
|
|
1185
|
+
isOpen && !isMobile && /* @__PURE__ */ jsx(
|
|
1162
1186
|
SwitcherDropdown,
|
|
1163
1187
|
{
|
|
1164
1188
|
workspaces,
|
|
@@ -1180,6 +1204,37 @@ function WorkspaceSwitcher({ compact = false, onCreateWorkspace, className }) {
|
|
|
1180
1204
|
}
|
|
1181
1205
|
}
|
|
1182
1206
|
),
|
|
1207
|
+
isMobile && /* @__PURE__ */ jsx(
|
|
1208
|
+
ResponsiveDialog,
|
|
1209
|
+
{
|
|
1210
|
+
open: isOpen,
|
|
1211
|
+
onOpenChange: setIsOpen,
|
|
1212
|
+
contentClassName: "max-w-full sm:max-w-full",
|
|
1213
|
+
children: /* @__PURE__ */ jsx(
|
|
1214
|
+
SwitcherDropdown,
|
|
1215
|
+
{
|
|
1216
|
+
mobile: true,
|
|
1217
|
+
workspaces,
|
|
1218
|
+
currentSlug: workspace?.slug,
|
|
1219
|
+
loading: workspacesLoading,
|
|
1220
|
+
renderLink,
|
|
1221
|
+
onClose: () => setIsOpen(false),
|
|
1222
|
+
onCreateClick: () => {
|
|
1223
|
+
setIsOpen(false);
|
|
1224
|
+
setCreateDialogOpen(true);
|
|
1225
|
+
},
|
|
1226
|
+
onEditClick: (ws) => {
|
|
1227
|
+
setIsOpen(false);
|
|
1228
|
+
setEditingWorkspace(ws);
|
|
1229
|
+
},
|
|
1230
|
+
onDeleteClick: (ws) => {
|
|
1231
|
+
setIsOpen(false);
|
|
1232
|
+
setDeletingWorkspace(ws);
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
)
|
|
1236
|
+
}
|
|
1237
|
+
),
|
|
1183
1238
|
/* @__PURE__ */ jsx(
|
|
1184
1239
|
CreateWorkspaceInlineDialog,
|
|
1185
1240
|
{
|
|
@@ -1235,6 +1290,7 @@ function SwitcherChevron({ open }) {
|
|
|
1235
1290
|
);
|
|
1236
1291
|
}
|
|
1237
1292
|
function SwitcherDropdown({
|
|
1293
|
+
mobile = false,
|
|
1238
1294
|
workspaces,
|
|
1239
1295
|
currentSlug,
|
|
1240
1296
|
loading,
|
|
@@ -1244,52 +1300,61 @@ function SwitcherDropdown({
|
|
|
1244
1300
|
onEditClick,
|
|
1245
1301
|
onDeleteClick
|
|
1246
1302
|
}) {
|
|
1247
|
-
return /* @__PURE__ */ jsxs(
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1303
|
+
return /* @__PURE__ */ jsxs(
|
|
1304
|
+
"div",
|
|
1305
|
+
{
|
|
1306
|
+
className: cn(
|
|
1307
|
+
"rounded-xl border border-primary/20 bg-[linear-gradient(165deg,rgba(22,26,40,0.92),rgba(11,14,24,0.94))] backdrop-blur-[40px] shadow-[0_24px_80px_-15px_rgba(0,0,0,0.55)] overflow-hidden",
|
|
1308
|
+
mobile ? "w-full" : "absolute top-full left-0 mt-1 w-64 z-50"
|
|
1309
|
+
),
|
|
1310
|
+
children: [
|
|
1311
|
+
/* @__PURE__ */ jsx("div", { className: "px-3 py-2 text-xs font-medium uppercase tracking-wider text-theme-muted border-b border-primary/15", children: "Workspaces" }),
|
|
1312
|
+
/* @__PURE__ */ jsx("div", { className: "max-h-64 overflow-y-auto overscroll-contain scrollbar-thin scrollbar-thumb-white/15 scrollbar-track-transparent", children: /* @__PURE__ */ jsx("div", { className: "py-1", children: loading ? /* @__PURE__ */ jsx("div", { className: "space-y-1 px-3 py-2", children: [1, 2, 3].map((i) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2.5 py-2", children: [
|
|
1313
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "w-7 h-7", variant: "rounded" }),
|
|
1314
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-1.5", children: [
|
|
1315
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-3.5 w-24" }),
|
|
1316
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-2.5 w-16" })
|
|
1317
|
+
] })
|
|
1318
|
+
] }, i)) }) : workspaces.length === 0 ? /* @__PURE__ */ jsxs("div", { className: "px-3 py-6 text-center", children: [
|
|
1319
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground mb-2", children: "Nenhum workspace encontrado" }),
|
|
1320
|
+
/* @__PURE__ */ jsxs(
|
|
1321
|
+
"button",
|
|
1322
|
+
{
|
|
1323
|
+
onClick: onCreateClick,
|
|
1324
|
+
className: "inline-flex items-center gap-1.5 text-xs font-medium text-primary-light hover:text-primary transition-colors",
|
|
1325
|
+
children: [
|
|
1326
|
+
/* @__PURE__ */ jsx(OrgPlus, { className: "w-3.5 h-3.5" }),
|
|
1327
|
+
"Criar primeiro workspace"
|
|
1328
|
+
]
|
|
1329
|
+
}
|
|
1330
|
+
)
|
|
1331
|
+
] }) : workspaces.map((ws) => /* @__PURE__ */ jsx(
|
|
1332
|
+
SwitcherItem,
|
|
1333
|
+
{
|
|
1334
|
+
ws,
|
|
1335
|
+
isActive: ws.slug === currentSlug,
|
|
1336
|
+
renderLink,
|
|
1337
|
+
onClose,
|
|
1338
|
+
onEdit: () => onEditClick?.(ws),
|
|
1339
|
+
onDelete: () => onDeleteClick?.(ws)
|
|
1340
|
+
},
|
|
1341
|
+
ws.id
|
|
1342
|
+
)) }) }),
|
|
1343
|
+
/* @__PURE__ */ jsx(Separator, {}),
|
|
1344
|
+
/* @__PURE__ */ jsxs(
|
|
1345
|
+
"button",
|
|
1346
|
+
{
|
|
1347
|
+
onClick: onCreateClick,
|
|
1348
|
+
className: "flex items-center gap-2 px-3 py-2.5 text-sm text-primary-light transition-colors hover:bg-theme-subtle w-full text-left",
|
|
1349
|
+
children: [
|
|
1350
|
+
/* @__PURE__ */ jsx(OrgPlus, { className: "w-4 h-4" }),
|
|
1351
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium", children: "Criar workspace" })
|
|
1352
|
+
]
|
|
1353
|
+
}
|
|
1354
|
+
)
|
|
1355
|
+
]
|
|
1356
|
+
}
|
|
1357
|
+
);
|
|
1293
1358
|
}
|
|
1294
1359
|
function SwitcherItem({
|
|
1295
1360
|
ws,
|
|
@@ -5261,7 +5326,7 @@ var statusColors = {
|
|
|
5261
5326
|
BLOCKED: "bg-rose-500/15 text-rose-400 border-rose-500/30",
|
|
5262
5327
|
DONE: "bg-emerald-500/15 text-emerald-400 border-emerald-500/30"
|
|
5263
5328
|
};
|
|
5264
|
-
function
|
|
5329
|
+
function useMediaQuery3(query) {
|
|
5265
5330
|
const [matches, setMatches] = React5.useState(false);
|
|
5266
5331
|
React5.useEffect(() => {
|
|
5267
5332
|
const mql = window.matchMedia(query);
|
|
@@ -5379,6 +5444,68 @@ function EditableDate({ value, onSave, placeholder = "Adicionar data" }) {
|
|
|
5379
5444
|
}
|
|
5380
5445
|
);
|
|
5381
5446
|
}
|
|
5447
|
+
function EditableStoryPoints({ value, onSave }) {
|
|
5448
|
+
const [editing, setEditing] = React5.useState(false);
|
|
5449
|
+
const [localValue, setLocalValue] = React5.useState(value !== void 0 ? String(value) : "");
|
|
5450
|
+
const inputRef = React5.useRef(null);
|
|
5451
|
+
React5.useEffect(() => {
|
|
5452
|
+
setLocalValue(value !== void 0 ? String(value) : "");
|
|
5453
|
+
}, [value]);
|
|
5454
|
+
React5.useEffect(() => {
|
|
5455
|
+
if (editing && inputRef.current) {
|
|
5456
|
+
inputRef.current.focus();
|
|
5457
|
+
inputRef.current.select();
|
|
5458
|
+
}
|
|
5459
|
+
}, [editing]);
|
|
5460
|
+
const handleSave = () => {
|
|
5461
|
+
setEditing(false);
|
|
5462
|
+
const parsed = localValue === "" ? void 0 : parseFloat(localValue);
|
|
5463
|
+
if (parsed !== value) {
|
|
5464
|
+
onSave(isNaN(parsed) ? void 0 : parsed);
|
|
5465
|
+
}
|
|
5466
|
+
};
|
|
5467
|
+
const handleKeyDown = (e) => {
|
|
5468
|
+
if (e.key === "Enter") {
|
|
5469
|
+
e.preventDefault();
|
|
5470
|
+
handleSave();
|
|
5471
|
+
}
|
|
5472
|
+
if (e.key === "Escape") {
|
|
5473
|
+
setLocalValue(value !== void 0 ? String(value) : "");
|
|
5474
|
+
setEditing(false);
|
|
5475
|
+
}
|
|
5476
|
+
};
|
|
5477
|
+
if (editing) {
|
|
5478
|
+
return /* @__PURE__ */ jsx(
|
|
5479
|
+
"input",
|
|
5480
|
+
{
|
|
5481
|
+
ref: inputRef,
|
|
5482
|
+
type: "number",
|
|
5483
|
+
min: 0,
|
|
5484
|
+
step: 0.5,
|
|
5485
|
+
value: localValue,
|
|
5486
|
+
onChange: (e) => setLocalValue(e.target.value),
|
|
5487
|
+
onBlur: handleSave,
|
|
5488
|
+
onKeyDown: handleKeyDown,
|
|
5489
|
+
placeholder: "0",
|
|
5490
|
+
className: "w-28 bg-theme-subtle backdrop-blur-md border border-theme-subtle px-3 py-1.5 text-sm font-light text-theme transition-all rounded-xl focus:outline-none focus:shadow-[0_0_0_3px_rgba(99,102,241,0.10),0_0_20px_rgba(99,102,241,0.08)] focus:border-primary-light/50"
|
|
5491
|
+
}
|
|
5492
|
+
);
|
|
5493
|
+
}
|
|
5494
|
+
return /* @__PURE__ */ jsx(
|
|
5495
|
+
"button",
|
|
5496
|
+
{
|
|
5497
|
+
onClick: () => setEditing(true),
|
|
5498
|
+
className: cn(
|
|
5499
|
+
"flex items-center gap-2 px-2 py-1 -mx-2 rounded hover:bg-theme-highlight transition-colors text-sm",
|
|
5500
|
+
value == null && "text-theme-muted italic"
|
|
5501
|
+
),
|
|
5502
|
+
children: value != null ? /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1 font-semibold", children: [
|
|
5503
|
+
/* @__PURE__ */ jsx("span", { className: "text-primary-light", children: value }),
|
|
5504
|
+
/* @__PURE__ */ jsx("span", { className: "text-theme-muted text-xs", children: "pts" })
|
|
5505
|
+
] }) : /* @__PURE__ */ jsx("span", { className: "text-theme-muted italic", children: "Adicionar" })
|
|
5506
|
+
}
|
|
5507
|
+
);
|
|
5508
|
+
}
|
|
5382
5509
|
function LabelItem({ label, onRemove, showDelete = true }) {
|
|
5383
5510
|
return /* @__PURE__ */ jsxs("div", { className: "group relative inline-flex", children: [
|
|
5384
5511
|
/* @__PURE__ */ jsx(
|
|
@@ -5875,6 +6002,22 @@ function TaskDetailContent({
|
|
|
5875
6002
|
)
|
|
5876
6003
|
] })
|
|
5877
6004
|
] }),
|
|
6005
|
+
task.storyPoints !== void 0 || onUpdate ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6006
|
+
/* @__PURE__ */ jsx(Separator, { className: "bg-theme-subtle" }),
|
|
6007
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
6008
|
+
/* @__PURE__ */ jsxs("label", { className: "text-xs font-medium text-theme-muted uppercase tracking-wide flex items-center gap-1.5", children: [
|
|
6009
|
+
/* @__PURE__ */ jsx(Zap, { className: "w-3 h-3" }),
|
|
6010
|
+
"Story Points"
|
|
6011
|
+
] }),
|
|
6012
|
+
/* @__PURE__ */ jsx(
|
|
6013
|
+
EditableStoryPoints,
|
|
6014
|
+
{
|
|
6015
|
+
value: task.storyPoints,
|
|
6016
|
+
onSave: (v) => handleFieldUpdate("storyPoints", v)
|
|
6017
|
+
}
|
|
6018
|
+
)
|
|
6019
|
+
] })
|
|
6020
|
+
] }) : null,
|
|
5878
6021
|
/* @__PURE__ */ jsx(Separator, { className: "bg-theme-subtle" }),
|
|
5879
6022
|
/* @__PURE__ */ jsx(
|
|
5880
6023
|
SubtaskSection,
|
|
@@ -5972,7 +6115,7 @@ function TaskDetailSheet({
|
|
|
5972
6115
|
availableStatuses = defaultStatuses,
|
|
5973
6116
|
availablePriorities = defaultPriorities
|
|
5974
6117
|
}) {
|
|
5975
|
-
const isDesktop =
|
|
6118
|
+
const isDesktop = useMediaQuery3("(min-width: 768px)");
|
|
5976
6119
|
const content = loading ? /* @__PURE__ */ jsx(TaskDetailSkeleton2, {}) : task ? /* @__PURE__ */ jsx(
|
|
5977
6120
|
TaskDetailContent,
|
|
5978
6121
|
{
|
|
@@ -6218,7 +6361,8 @@ function TaskCard({
|
|
|
6218
6361
|
"#",
|
|
6219
6362
|
task.number
|
|
6220
6363
|
] }),
|
|
6221
|
-
task.storyPoints != null && task.storyPoints > 0 && /* @__PURE__ */ jsxs("span", { className: "text-[10px] px-1.5 py-0.5 rounded bg-
|
|
6364
|
+
task.storyPoints != null && task.storyPoints > 0 && /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-0.5 text-[10px] px-1.5 py-0.5 rounded-md bg-primary/10 text-primary-light border border-primary/25 font-medium", children: [
|
|
6365
|
+
/* @__PURE__ */ jsx(OrgSprint, { className: "w-2.5 h-2.5" }),
|
|
6222
6366
|
task.storyPoints,
|
|
6223
6367
|
"pt"
|
|
6224
6368
|
] }),
|
|
@@ -6263,14 +6407,14 @@ function TaskCard({
|
|
|
6263
6407
|
src: assignee.avatarUrl,
|
|
6264
6408
|
size: "sm",
|
|
6265
6409
|
showHoverInfo: true,
|
|
6266
|
-
className: "h-5 w-5 border border-
|
|
6410
|
+
className: "h-5 w-5 border border-primary/20"
|
|
6267
6411
|
},
|
|
6268
6412
|
assignee.id
|
|
6269
6413
|
)),
|
|
6270
6414
|
task.assignees.length > 2 && /* @__PURE__ */ jsxs(
|
|
6271
6415
|
"div",
|
|
6272
6416
|
{
|
|
6273
|
-
className: "w-5 h-5 rounded-full bg-
|
|
6417
|
+
className: "w-5 h-5 rounded-full bg-primary/10 flex items-center justify-center text-[10px] font-bold text-primary-light border border-primary/20",
|
|
6274
6418
|
title: task.assignees.slice(2).map((a) => a.name).join(", "),
|
|
6275
6419
|
children: [
|
|
6276
6420
|
"+",
|
|
@@ -6285,7 +6429,7 @@ function TaskCard({
|
|
|
6285
6429
|
/* @__PURE__ */ jsx("span", { className: "text-xs text-theme-muted truncate max-w-24", children: task.assignee.name })
|
|
6286
6430
|
] }) : null,
|
|
6287
6431
|
!compact && task.dueDate && /* @__PURE__ */ jsx("div", { className: "mt-1", children: /* @__PURE__ */ jsx(DueDateBadge, { date: task.dueDate }) }),
|
|
6288
|
-
/* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute bottom-0 right-0 h-3 w-3 border-b border-r border-
|
|
6432
|
+
/* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute bottom-0 right-0 h-3 w-3 border-b border-r border-primary/20" })
|
|
6289
6433
|
]
|
|
6290
6434
|
}
|
|
6291
6435
|
),
|
|
@@ -6326,7 +6470,7 @@ function DueDateBadge({ date }) {
|
|
|
6326
6470
|
"inline-flex items-center gap-1 text-[10px] px-1.5 py-0.5 border",
|
|
6327
6471
|
isOverdue && "bg-rose-500/15 text-rose-400 border-rose-500/30",
|
|
6328
6472
|
isSoon && !isOverdue && "bg-amber-500/15 text-amber-400 border-amber-500/30",
|
|
6329
|
-
!isOverdue && !isSoon && "bg-
|
|
6473
|
+
!isOverdue && !isSoon && "bg-theme-subtle text-theme-muted border-theme-subtle"
|
|
6330
6474
|
),
|
|
6331
6475
|
children: [
|
|
6332
6476
|
/* @__PURE__ */ jsx(OrgCalendar, { className: "w-3 h-3" }),
|
|
@@ -6343,7 +6487,7 @@ function TaskCardSkeleton({ compact, className }) {
|
|
|
6343
6487
|
{
|
|
6344
6488
|
className: cn(
|
|
6345
6489
|
"relative flex flex-col gap-2 animate-pulse",
|
|
6346
|
-
"bg-
|
|
6490
|
+
"bg-theme-subtle/50 backdrop-blur-md border border-primary/10 rounded-xl",
|
|
6347
6491
|
compact ? "p-2" : "p-3",
|
|
6348
6492
|
className
|
|
6349
6493
|
),
|
|
@@ -6363,7 +6507,7 @@ function TaskCardSkeleton({ compact, className }) {
|
|
|
6363
6507
|
/* @__PURE__ */ jsx("div", { className: "h-3 w-16 rounded bg-glass-border/50" })
|
|
6364
6508
|
] })
|
|
6365
6509
|
] }),
|
|
6366
|
-
/* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute bottom-0 right-0 h-3 w-3 border-b border-r border-
|
|
6510
|
+
/* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute bottom-0 right-0 h-3 w-3 border-b border-r border-primary/20" })
|
|
6367
6511
|
]
|
|
6368
6512
|
}
|
|
6369
6513
|
);
|
|
@@ -6641,11 +6785,28 @@ function TaskCard2({
|
|
|
6641
6785
|
`${label}-${i}`
|
|
6642
6786
|
))
|
|
6643
6787
|
] }),
|
|
6788
|
+
(task.storyPoints != null || task.subtaskCount != null || task.commentCount != null) && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-xs text-theme-muted", children: [
|
|
6789
|
+
task.storyPoints != null && task.storyPoints > 0 && /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-0.5 text-[10px] px-1.5 py-0.5 rounded-md bg-primary/10 text-primary-light border border-primary/25 font-medium", children: [
|
|
6790
|
+
/* @__PURE__ */ jsx(OrgSprint, { className: "w-2.5 h-2.5" }),
|
|
6791
|
+
task.storyPoints,
|
|
6792
|
+
"pt"
|
|
6793
|
+
] }),
|
|
6794
|
+
task.subtaskCount != null && task.subtaskCount > 0 && /* @__PURE__ */ jsxs("span", { className: "text-[10px]", children: [
|
|
6795
|
+
task.subtaskDone ?? 0,
|
|
6796
|
+
"/",
|
|
6797
|
+
task.subtaskCount,
|
|
6798
|
+
" \u2713"
|
|
6799
|
+
] }),
|
|
6800
|
+
task.commentCount != null && task.commentCount > 0 && /* @__PURE__ */ jsxs("span", { className: "text-[10px]", children: [
|
|
6801
|
+
task.commentCount,
|
|
6802
|
+
" \u{1F4AC}"
|
|
6803
|
+
] })
|
|
6804
|
+
] }),
|
|
6644
6805
|
task.assignee && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mt-1", children: [
|
|
6645
6806
|
/* @__PURE__ */ jsx("div", { className: "w-5 h-5 rounded-full bg-primary/20 flex items-center justify-center text-[10px] font-semibold text-primary-light", children: task.assignee.name.charAt(0) }),
|
|
6646
6807
|
/* @__PURE__ */ jsx("span", { className: "text-xs text-theme-muted", children: task.assignee.name })
|
|
6647
6808
|
] }),
|
|
6648
|
-
/* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute bottom-0 right-0 h-3 w-3 border-b border-r border-
|
|
6809
|
+
/* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute bottom-0 right-0 h-3 w-3 border-b border-r border-primary/20" })
|
|
6649
6810
|
]
|
|
6650
6811
|
}
|
|
6651
6812
|
);
|
|
@@ -6717,7 +6878,7 @@ function Column({
|
|
|
6717
6878
|
} : void 0,
|
|
6718
6879
|
onDrop: !externalDnD ? (e) => onDrop?.(e, column.id) : void 0,
|
|
6719
6880
|
className: cn(
|
|
6720
|
-
"flex flex-col w-[280px] sm:w-72 shrink-0 max-h-[calc(100vh-10rem)]",
|
|
6881
|
+
"flex flex-col w-[280px] sm:w-72 shrink-0 max-h-[calc(100dvh-8rem)] sm:max-h-[calc(100vh-10rem)]",
|
|
6721
6882
|
"bg-theme-glass backdrop-blur-md border border-theme-subtle rounded-xl",
|
|
6722
6883
|
"transition-all duration-[400ms] ease-[cubic-bezier(0.25,1,0.5,1)]",
|
|
6723
6884
|
"snap-start",
|
|
@@ -6983,8 +7144,8 @@ function KanbanBoard({
|
|
|
6983
7144
|
/* @__PURE__ */ jsxs(
|
|
6984
7145
|
"div",
|
|
6985
7146
|
{
|
|
7147
|
+
"data-tour": "kanban-board",
|
|
6986
7148
|
className: cn(
|
|
6987
|
-
"flex gap-3 sm:gap-4 p-3 sm:p-4 overflow-x-auto h-full min-h-[400px]",
|
|
6988
7149
|
"bg-void snap-x snap-mandatory sm:snap-none",
|
|
6989
7150
|
"scrollbar-none",
|
|
6990
7151
|
className
|
|
@@ -7394,7 +7555,7 @@ function BoardsSwitcher({
|
|
|
7394
7555
|
setIsCreating(false);
|
|
7395
7556
|
}
|
|
7396
7557
|
};
|
|
7397
|
-
return /* @__PURE__ */ jsxs("div", { ref: dropdownRef, className: cn("relative", className), children: [
|
|
7558
|
+
return /* @__PURE__ */ jsxs("div", { ref: dropdownRef, "data-tour": "board-switcher", className: cn("relative z-[10000]", className), children: [
|
|
7398
7559
|
/* @__PURE__ */ jsxs(
|
|
7399
7560
|
"button",
|
|
7400
7561
|
{
|
|
@@ -7422,7 +7583,7 @@ function BoardsSwitcher({
|
|
|
7422
7583
|
}
|
|
7423
7584
|
),
|
|
7424
7585
|
isOpen && /* @__PURE__ */ jsx("div", { className: cn(
|
|
7425
|
-
"absolute top-full left-0 mt-1 z-[
|
|
7586
|
+
"absolute top-full left-0 mt-1 z-[10001] min-w-[240px]",
|
|
7426
7587
|
"bg-elevated/95 backdrop-blur-xl border border-theme-subtle rounded-xl shadow-2xl",
|
|
7427
7588
|
"animate-in fade-in slide-in-from-top-2 duration-200"
|
|
7428
7589
|
), children: /* @__PURE__ */ jsxs("div", { className: "p-1.5", children: [
|
|
@@ -7504,6 +7665,7 @@ function SprintFilter({
|
|
|
7504
7665
|
activeSprint,
|
|
7505
7666
|
selectedSprintId,
|
|
7506
7667
|
onSprintChange,
|
|
7668
|
+
compact = false,
|
|
7507
7669
|
className
|
|
7508
7670
|
}) {
|
|
7509
7671
|
const [isOpen, setIsOpen] = React5.useState(false);
|
|
@@ -7523,7 +7685,7 @@ function SprintFilter({
|
|
|
7523
7685
|
const order = { ACTIVE: 0, PLANNED: 1, COMPLETED: 2 };
|
|
7524
7686
|
return [...sprints].sort((a, b) => (order[a.status] ?? 9) - (order[b.status] ?? 9));
|
|
7525
7687
|
}, [sprints]);
|
|
7526
|
-
return /* @__PURE__ */ jsxs("div", { ref: dropdownRef, className: cn("relative", className), children: [
|
|
7688
|
+
return /* @__PURE__ */ jsxs("div", { ref: dropdownRef, "data-tour": "sprint-switcher", className: cn("relative z-[10000]", className), children: [
|
|
7527
7689
|
/* @__PURE__ */ jsxs(
|
|
7528
7690
|
Button,
|
|
7529
7691
|
{
|
|
@@ -7531,19 +7693,21 @@ function SprintFilter({
|
|
|
7531
7693
|
size: "sm",
|
|
7532
7694
|
onClick: () => setIsOpen(!isOpen),
|
|
7533
7695
|
className: cn(
|
|
7534
|
-
"h-8 gap-
|
|
7696
|
+
"h-8 gap-1.5 text-xs font-medium",
|
|
7697
|
+
compact ? "px-2" : "px-3 gap-2",
|
|
7535
7698
|
"bg-theme-glass border border-theme-subtle",
|
|
7536
7699
|
"text-theme hover:bg-theme-highlight"
|
|
7537
7700
|
),
|
|
7701
|
+
title: compact ? displayLabel : void 0,
|
|
7538
7702
|
children: [
|
|
7539
7703
|
/* @__PURE__ */ jsx("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", className: "shrink-0", children: /* @__PURE__ */ jsx("path", { d: "M3 8h10M5 4h6M7 12h2", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) }),
|
|
7540
|
-
/* @__PURE__ */ jsx("span", { className: "truncate max-w-[120px] sm:max-w-[200px]", children: displayLabel }),
|
|
7541
|
-
/* @__PURE__ */ jsx("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", className: cn("transition-transform", isOpen && "rotate-180"), children: /* @__PURE__ */ jsx("path", { d: "M2.5 3.75L5 6.25L7.5 3.75", stroke: "currentColor", strokeWidth: "1.2", strokeLinecap: "round" }) })
|
|
7704
|
+
!compact && /* @__PURE__ */ jsx("span", { className: "truncate max-w-[120px] sm:max-w-[200px]", children: displayLabel }),
|
|
7705
|
+
/* @__PURE__ */ jsx("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", className: cn("transition-transform shrink-0", isOpen && "rotate-180"), children: /* @__PURE__ */ jsx("path", { d: "M2.5 3.75L5 6.25L7.5 3.75", stroke: "currentColor", strokeWidth: "1.2", strokeLinecap: "round" }) })
|
|
7542
7706
|
]
|
|
7543
7707
|
}
|
|
7544
7708
|
),
|
|
7545
7709
|
isOpen && /* @__PURE__ */ jsx("div", { className: cn(
|
|
7546
|
-
"absolute top-full left-0 mt-1 z-[
|
|
7710
|
+
"absolute top-full left-0 mt-1 z-[10001] min-w-[220px]",
|
|
7547
7711
|
"bg-elevated/95 backdrop-blur-xl border border-theme-subtle rounded-xl shadow-2xl",
|
|
7548
7712
|
"animate-in fade-in slide-in-from-top-2 duration-200"
|
|
7549
7713
|
), children: /* @__PURE__ */ jsxs("div", { className: "p-1.5 max-h-[280px] overflow-y-auto scrollbar-none", children: [
|
|
@@ -7899,7 +8063,7 @@ function DropdownMenuSubContent({
|
|
|
7899
8063
|
{
|
|
7900
8064
|
"data-slot": "dropdown-menu-sub-content",
|
|
7901
8065
|
className: cn(
|
|
7902
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-xl border border-
|
|
8066
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-xl border border-primary/25 bg-white/[0.03] backdrop-blur-[40px] p-1 text-theme shadow-[0_24px_80px_-15px_rgba(0,0,0,0.5)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
7903
8067
|
className
|
|
7904
8068
|
),
|
|
7905
8069
|
...props
|
|
@@ -7917,7 +8081,7 @@ function DropdownMenuContent({
|
|
|
7917
8081
|
"data-slot": "dropdown-menu-content",
|
|
7918
8082
|
sideOffset,
|
|
7919
8083
|
className: cn(
|
|
7920
|
-
"z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-xl border border-
|
|
8084
|
+
"z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-xl border border-primary/25 bg-white/[0.03] backdrop-blur-[40px] p-1 text-theme shadow-[0_24px_80px_-15px_rgba(0,0,0,0.5)]",
|
|
7921
8085
|
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
7922
8086
|
className
|
|
7923
8087
|
),
|
|
@@ -8096,7 +8260,7 @@ function CommandInput({
|
|
|
8096
8260
|
className,
|
|
8097
8261
|
...props
|
|
8098
8262
|
}) {
|
|
8099
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex items-center border-b border-
|
|
8263
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-center border-b border-primary/15 px-3", "cmdk-input-wrapper": "", children: [
|
|
8100
8264
|
/* @__PURE__ */ jsx(Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
8101
8265
|
/* @__PURE__ */ jsx(
|
|
8102
8266
|
Command$1.Input,
|
|
@@ -8569,6 +8733,8 @@ var CREATE_WORKSPACE_MUTATION2 = `
|
|
|
8569
8733
|
id
|
|
8570
8734
|
name
|
|
8571
8735
|
slug
|
|
8736
|
+
description
|
|
8737
|
+
avatarUrl
|
|
8572
8738
|
}
|
|
8573
8739
|
}
|
|
8574
8740
|
`;
|
|
@@ -8579,6 +8745,7 @@ function CreateWorkspaceDialog({
|
|
|
8579
8745
|
}) {
|
|
8580
8746
|
const gql = useOrganifyGql();
|
|
8581
8747
|
const { navigate } = useOrganifyNavigation();
|
|
8748
|
+
const { workspaces, onWorkspacesChange, onWorkspaceChange } = useOrganify();
|
|
8582
8749
|
const [name, setName] = React5.useState("");
|
|
8583
8750
|
const [error, setError] = React5.useState("");
|
|
8584
8751
|
const [loading, setLoading] = React5.useState(false);
|
|
@@ -8601,18 +8768,41 @@ function CreateWorkspaceDialog({
|
|
|
8601
8768
|
}
|
|
8602
8769
|
setLoading(true);
|
|
8603
8770
|
setError("");
|
|
8771
|
+
const optimisticId = `temp-${Date.now()}`;
|
|
8772
|
+
const optimisticSlug = trimmed.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
|
|
8773
|
+
const optimisticWs = {
|
|
8774
|
+
id: optimisticId,
|
|
8775
|
+
name: trimmed,
|
|
8776
|
+
slug: optimisticSlug,
|
|
8777
|
+
description: null,
|
|
8778
|
+
avatarUrl: null,
|
|
8779
|
+
plan: null,
|
|
8780
|
+
_count: { members: 1, teams: 0 }
|
|
8781
|
+
};
|
|
8782
|
+
const prevWorkspaces = [...workspaces];
|
|
8783
|
+
onWorkspacesChange?.([...workspaces, optimisticWs]);
|
|
8604
8784
|
try {
|
|
8605
8785
|
const data = await gql(
|
|
8606
8786
|
"workspaces",
|
|
8607
8787
|
CREATE_WORKSPACE_MUTATION2,
|
|
8608
8788
|
{ input: { name: trimmed } }
|
|
8609
8789
|
);
|
|
8790
|
+
const realWs = {
|
|
8791
|
+
...data.createWorkspace,
|
|
8792
|
+
plan: null,
|
|
8793
|
+
_count: { members: 1, teams: 0 }
|
|
8794
|
+
};
|
|
8795
|
+
onWorkspacesChange?.(
|
|
8796
|
+
[...prevWorkspaces, realWs]
|
|
8797
|
+
);
|
|
8798
|
+
onWorkspaceChange?.(realWs);
|
|
8610
8799
|
onOpenChange(false);
|
|
8611
|
-
onCreated?.(
|
|
8800
|
+
onCreated?.(realWs);
|
|
8612
8801
|
if (!onCreated && navigate) {
|
|
8613
|
-
navigate(`/${
|
|
8802
|
+
navigate(`/${realWs.slug}`);
|
|
8614
8803
|
}
|
|
8615
8804
|
} catch (err) {
|
|
8805
|
+
onWorkspacesChange?.(prevWorkspaces);
|
|
8616
8806
|
setError(err.message || "Failed to create workspace");
|
|
8617
8807
|
} finally {
|
|
8618
8808
|
setLoading(false);
|
|
@@ -9058,8 +9248,8 @@ function CreateTaskDialog({
|
|
|
9058
9248
|
);
|
|
9059
9249
|
}
|
|
9060
9250
|
var INVITE_MEMBER_MUTATION = `
|
|
9061
|
-
mutation
|
|
9062
|
-
|
|
9251
|
+
mutation InviteWorkspaceMember($slug: String!, $input: InviteMemberInput!) {
|
|
9252
|
+
inviteWorkspaceMember(slug: $slug, input: $input) {
|
|
9063
9253
|
id
|
|
9064
9254
|
email
|
|
9065
9255
|
role
|
|
@@ -9070,12 +9260,13 @@ var INVITE_MEMBER_MUTATION = `
|
|
|
9070
9260
|
function InviteMemberDialog({
|
|
9071
9261
|
open,
|
|
9072
9262
|
onOpenChange,
|
|
9073
|
-
|
|
9263
|
+
workspaceSlug: propWorkspaceSlug,
|
|
9264
|
+
workspaceId: _deprecated,
|
|
9074
9265
|
onInvited
|
|
9075
9266
|
}) {
|
|
9076
9267
|
const gql = useOrganifyGql();
|
|
9077
9268
|
const { workspace } = useOrganifyWorkspace();
|
|
9078
|
-
const
|
|
9269
|
+
const effectiveSlug = propWorkspaceSlug ?? workspace?.slug;
|
|
9079
9270
|
const [email, setEmail] = React5.useState("");
|
|
9080
9271
|
const [role, setRole] = React5.useState("MEMBER");
|
|
9081
9272
|
const [error, setError] = React5.useState("");
|
|
@@ -9098,7 +9289,7 @@ function InviteMemberDialog({
|
|
|
9098
9289
|
setError("Invalid email format");
|
|
9099
9290
|
return;
|
|
9100
9291
|
}
|
|
9101
|
-
if (!
|
|
9292
|
+
if (!effectiveSlug) {
|
|
9102
9293
|
setError("No workspace context");
|
|
9103
9294
|
return;
|
|
9104
9295
|
}
|
|
@@ -9108,10 +9299,10 @@ function InviteMemberDialog({
|
|
|
9108
9299
|
const data = await gql(
|
|
9109
9300
|
"workspaces",
|
|
9110
9301
|
INVITE_MEMBER_MUTATION,
|
|
9111
|
-
{ input: { email: trimmed, role
|
|
9302
|
+
{ slug: effectiveSlug, input: { email: trimmed, role } }
|
|
9112
9303
|
);
|
|
9113
9304
|
onOpenChange(false);
|
|
9114
|
-
onInvited?.(data.
|
|
9305
|
+
onInvited?.(data.inviteWorkspaceMember);
|
|
9115
9306
|
} catch (err) {
|
|
9116
9307
|
setError(err.message || "Failed to send invite");
|
|
9117
9308
|
} finally {
|