organify-ui 0.2.16 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-I47BBGVI.js → chunk-A2H2TBSV.js} +16 -34
- package/dist/chunk-A2H2TBSV.js.map +1 -0
- package/dist/{chunk-INKNHHKT.js → chunk-GQZMW7XN.js} +212 -217
- package/dist/chunk-GQZMW7XN.js.map +1 -0
- package/dist/{chunk-HY7M3VZM.js → chunk-MZKEDV5W.js} +9 -9
- package/dist/{chunk-HY7M3VZM.js.map → chunk-MZKEDV5W.js.map} +1 -1
- package/dist/{chunk-5L6BWKVA.js → chunk-RFOKENE3.js} +7 -6
- package/dist/chunk-RFOKENE3.js.map +1 -0
- package/dist/chunk-UGX6D3AO.js +327 -0
- package/dist/chunk-UGX6D3AO.js.map +1 -0
- package/dist/{chunk-ERFN2H75.js → chunk-VHQZS77G.js} +9 -9
- package/dist/chunk-VHQZS77G.js.map +1 -0
- package/dist/components/chat/index.js +3 -3
- package/dist/components/notifications/index.js +3 -3
- package/dist/icons/index.js +1 -1
- package/dist/index.d.ts +23 -33
- package/dist/index.js +176 -187
- package/dist/index.js.map +1 -1
- package/dist/providers/theme-provider.d.ts +2 -2
- package/dist/providers/theme-provider.js +1 -1
- package/dist/tailwind-preset.js +77 -28
- package/dist/tailwind-preset.js.map +1 -1
- package/dist/tokens/index.d.ts +181 -99
- package/dist/tokens/index.js +1 -1
- package/package.json +2 -2
- package/src/globals.css +1007 -366
- package/dist/chunk-5L6BWKVA.js.map +0 -1
- package/dist/chunk-ERFN2H75.js.map +0 -1
- package/dist/chunk-HZXKUGFH.js +0 -271
- package/dist/chunk-HZXKUGFH.js.map +0 -1
- package/dist/chunk-I47BBGVI.js.map +0 -1
- package/dist/chunk-INKNHHKT.js.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { cn, TooltipProvider, Tooltip, TooltipTrigger, TooltipContent, ScrollArea, Skeleton, Avatar, AvatarFallback, Badge, useOrganifyApi, useOrganifyUser, useOrganifyWorkspace, useOrganifyGql } from './chunk-
|
|
2
|
-
import { OrgPlus, OrgSearch, OrgComment, OrgClose, OrgEdit, OrgTeam, OrgGlobe, OrgLock, OrgCheckCircle, OrgError, OrgWarning, OrgInfo, OrgChevronDown, OrgChevronRight, OrgDoor, OrgTrash, OrgCheck, OrgFolder, OrgChevronLeft } from './chunk-
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
1
|
+
import { cn, TooltipProvider, Tooltip, TooltipTrigger, TooltipContent, ScrollArea, Skeleton, Avatar, AvatarFallback, Badge, useOrganifyApi, useOrganifyUser, useOrganifyWorkspace, useOrganifyGql } from './chunk-VHQZS77G.js';
|
|
2
|
+
import { OrgPlus, OrgSearch, OrgComment, OrgClose, OrgEdit, OrgTeam, OrgGlobe, OrgLock, OrgCheckCircle, OrgError, OrgWarning, OrgInfo, OrgChevronDown, OrgChevronRight, OrgDoor, OrgTrash, OrgCheck, OrgFolder, OrgChevronLeft } from './chunk-MZKEDV5W.js';
|
|
3
|
+
import * as React6 from 'react';
|
|
4
|
+
import React6__default, { useState, useCallback, useEffect } from 'react';
|
|
5
5
|
import { Slot } from '@radix-ui/react-slot';
|
|
6
6
|
import { cva } from 'class-variance-authority';
|
|
7
|
-
import {
|
|
7
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
8
8
|
import { motion, AnimatePresence } from 'framer-motion';
|
|
9
9
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
10
10
|
import { ChevronDown, ChevronUp, Check, XIcon } from 'lucide-react';
|
|
@@ -101,7 +101,7 @@ function OrgLoader({
|
|
|
101
101
|
rx: d * 0.15,
|
|
102
102
|
transform: `rotate(45 24 6)`,
|
|
103
103
|
fill: "url(#org-loader-diamond)",
|
|
104
|
-
className: "drop-shadow-[0_0_6px_rgba(
|
|
104
|
+
className: "drop-shadow-[0_0_6px_rgba(99,102,241,0.5)]"
|
|
105
105
|
}
|
|
106
106
|
) }),
|
|
107
107
|
/* @__PURE__ */ jsx(
|
|
@@ -116,13 +116,13 @@ function OrgLoader({
|
|
|
116
116
|
),
|
|
117
117
|
/* @__PURE__ */ jsxs("defs", { children: [
|
|
118
118
|
/* @__PURE__ */ jsxs("linearGradient", { id: "org-loader-gradient", x1: "6", y1: "6", x2: "42", y2: "42", gradientUnits: "userSpaceOnUse", children: [
|
|
119
|
-
/* @__PURE__ */ jsx("stop", { stopColor: "#
|
|
120
|
-
/* @__PURE__ */ jsx("stop", { offset: "0.5", stopColor: "#
|
|
121
|
-
/* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "#
|
|
119
|
+
/* @__PURE__ */ jsx("stop", { stopColor: "#7C3AED" }),
|
|
120
|
+
/* @__PURE__ */ jsx("stop", { offset: "0.5", stopColor: "#8B5CF6" }),
|
|
121
|
+
/* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "#6D28D9" })
|
|
122
122
|
] }),
|
|
123
123
|
/* @__PURE__ */ jsxs("linearGradient", { id: "org-loader-diamond", x1: "0", y1: "0", x2: "1", y2: "1", children: [
|
|
124
|
-
/* @__PURE__ */ jsx("stop", { stopColor: "#
|
|
125
|
-
/* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "#
|
|
124
|
+
/* @__PURE__ */ jsx("stop", { stopColor: "#7C3AED" }),
|
|
125
|
+
/* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "#6D28D9" })
|
|
126
126
|
] })
|
|
127
127
|
] })
|
|
128
128
|
] }) }),
|
|
@@ -171,27 +171,24 @@ function OrgLoaderInline({ className, ...props }) {
|
|
|
171
171
|
);
|
|
172
172
|
}
|
|
173
173
|
var buttonVariants = cva(
|
|
174
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium
|
|
174
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-full text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
175
175
|
{
|
|
176
176
|
variants: {
|
|
177
177
|
variant: {
|
|
178
|
-
default: "bg-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
link: "text-primary
|
|
184
|
-
// ─── Cream Light theme buttons ─────────────
|
|
185
|
-
cream: "bg-primary text-white hover:shadow-cream-btn-primary hover:translate-y-[-1px] shadow-cream-btn",
|
|
186
|
-
"cream-secondary": "bg-transparent border border-primary text-primary hover:bg-primary/[0.03]"
|
|
178
|
+
default: "bg-primary text-white hover:bg-primary/90",
|
|
179
|
+
destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20",
|
|
180
|
+
outline: "border bg-background border-input text-gray-900 hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:text-white dark:hover:bg-input/50",
|
|
181
|
+
secondary: "bg-secondary text-gray-900 hover:bg-secondary/80 dark:text-white",
|
|
182
|
+
ghost: "text-gray-900 hover:bg-accent hover:text-accent-foreground dark:text-white dark:hover:bg-accent/50",
|
|
183
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
187
184
|
},
|
|
188
185
|
size: {
|
|
189
|
-
default: "px-
|
|
190
|
-
sm: "px-
|
|
191
|
-
lg: "
|
|
192
|
-
icon: "
|
|
193
|
-
"icon-sm": "
|
|
194
|
-
"icon-lg": "
|
|
186
|
+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
187
|
+
sm: "h-8 rounded-full gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
188
|
+
lg: "h-10 rounded-full px-6 has-[>svg]:px-4",
|
|
189
|
+
icon: "size-9",
|
|
190
|
+
"icon-sm": "size-8",
|
|
191
|
+
"icon-lg": "size-10"
|
|
195
192
|
}
|
|
196
193
|
},
|
|
197
194
|
defaultVariants: {
|
|
@@ -200,36 +197,41 @@ var buttonVariants = cva(
|
|
|
200
197
|
}
|
|
201
198
|
}
|
|
202
199
|
);
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
200
|
+
function Button({
|
|
201
|
+
className,
|
|
202
|
+
variant,
|
|
203
|
+
size,
|
|
204
|
+
asChild = false,
|
|
205
|
+
loading = false,
|
|
206
|
+
children,
|
|
207
|
+
...props
|
|
208
|
+
}) {
|
|
209
|
+
const Comp = asChild ? Slot : "button";
|
|
210
|
+
return /* @__PURE__ */ jsx(
|
|
211
|
+
Comp,
|
|
212
|
+
{
|
|
213
|
+
"data-slot": "button",
|
|
214
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
215
|
+
disabled: props.disabled || loading,
|
|
216
|
+
...props,
|
|
217
|
+
children: loading ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
218
|
+
/* @__PURE__ */ jsx(OrgLoaderInline, { className: "shrink-0" }),
|
|
219
|
+
children
|
|
220
|
+
] }) : children
|
|
221
|
+
}
|
|
222
|
+
);
|
|
223
|
+
}
|
|
222
224
|
var inputVariants = cva(
|
|
223
|
-
"flex w-full bg-
|
|
225
|
+
"flex w-full bg-white/[0.03] backdrop-blur-md border border-white/10 rounded-xl px-4 py-3 text-sm font-light text-org-text transition-all duration-[400ms] ease-[cubic-bezier(0.25,1,0.5,1)] file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-org-text-muted focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
224
226
|
{
|
|
225
227
|
variants: {
|
|
226
228
|
variant: {
|
|
227
|
-
default: "focus:border-primary-light/50 focus:shadow-[0_0_0_3px_rgba(
|
|
228
|
-
flat: "rounded-
|
|
229
|
-
rounded: "rounded-
|
|
229
|
+
default: "focus:border-primary-light/50 focus:shadow-[0_0_0_3px_rgba(99,102,241,0.10),0_0_20px_rgba(99,102,241,0.08)]",
|
|
230
|
+
flat: "rounded-xl focus:border-primary-light/50 focus:shadow-[0_0_0_3px_rgba(99,102,241,0.10)]",
|
|
231
|
+
rounded: "rounded-xl focus:border-primary-light/50 focus:shadow-[0_0_0_3px_rgba(99,102,241,0.10)]",
|
|
230
232
|
error: "border-error/30 bg-error/5 text-red-100 placeholder:text-red-500/30 focus:border-error focus:shadow-[0_0_0_3px_rgba(224,17,95,0.10)]",
|
|
231
233
|
// ─── Cream Light theme (explicit light styling) ─────────────────────
|
|
232
|
-
cream: "bg-white/60 border-[rgba(36,25,121,0.06)] text-neutral-900 placeholder:text-neutral-400 focus:border-primary/40 focus:bg-white/80 focus:shadow-[0_0_0_3px_rgba(
|
|
234
|
+
cream: "bg-white/60 border-[rgba(36,25,121,0.06)] text-neutral-900 placeholder:text-neutral-400 focus:border-primary/40 focus:bg-white/80 focus:shadow-[0_0_0_3px_rgba(99,102,241,0.08)] backdrop-blur-sm"
|
|
233
235
|
}
|
|
234
236
|
},
|
|
235
237
|
defaultVariants: {
|
|
@@ -237,9 +239,9 @@ var inputVariants = cva(
|
|
|
237
239
|
}
|
|
238
240
|
}
|
|
239
241
|
);
|
|
240
|
-
var Input =
|
|
242
|
+
var Input = React6.forwardRef(
|
|
241
243
|
({ className, variant, type, label, error, labelPosition = "left", ...props }, ref) => {
|
|
242
|
-
const id =
|
|
244
|
+
const id = React6.useId();
|
|
243
245
|
const effectiveVariant = error ? "error" : variant;
|
|
244
246
|
return /* @__PURE__ */ jsxs("div", { className: "relative group", children: [
|
|
245
247
|
label && /* @__PURE__ */ jsx(
|
|
@@ -285,10 +287,10 @@ function ChatSidebar({
|
|
|
285
287
|
onCreateRoom,
|
|
286
288
|
onMobileClose
|
|
287
289
|
}) {
|
|
288
|
-
const [search, setSearch] =
|
|
289
|
-
const [channelsOpen, setChannelsOpen] =
|
|
290
|
-
const [dmsOpen, setDmsOpen] =
|
|
291
|
-
const filtered =
|
|
290
|
+
const [search, setSearch] = React6.useState("");
|
|
291
|
+
const [channelsOpen, setChannelsOpen] = React6.useState(true);
|
|
292
|
+
const [dmsOpen, setDmsOpen] = React6.useState(true);
|
|
293
|
+
const filtered = React6.useMemo(
|
|
292
294
|
() => search ? rooms.filter(
|
|
293
295
|
(r) => r.name?.toLowerCase().includes(search.toLowerCase()) || r.slug?.toLowerCase().includes(search.toLowerCase())
|
|
294
296
|
) : rooms,
|
|
@@ -305,7 +307,7 @@ function ChatSidebar({
|
|
|
305
307
|
{
|
|
306
308
|
onClick: () => handleSelect(room.id),
|
|
307
309
|
className: cn(
|
|
308
|
-
"flex items-center gap-2.5 w-full px-2.5 py-2 rounded-
|
|
310
|
+
"flex items-center gap-2.5 w-full px-2.5 py-2 rounded-xl text-left text-sm transition-all duration-[400ms] ease-[cubic-bezier(0.25,1,0.5,1)]",
|
|
309
311
|
"active:scale-[0.98]",
|
|
310
312
|
room.id === activeRoomId ? "bg-primary/12 text-primary-light" : "text-theme-secondary hover:bg-theme-subtle hover:text-theme"
|
|
311
313
|
),
|
|
@@ -314,7 +316,7 @@ function ChatSidebar({
|
|
|
314
316
|
"span",
|
|
315
317
|
{
|
|
316
318
|
className: cn(
|
|
317
|
-
"flex items-center justify-center h-7 w-7 rounded-
|
|
319
|
+
"flex items-center justify-center h-7 w-7 rounded-xl text-sm shrink-0",
|
|
318
320
|
room.id === activeRoomId ? "bg-primary/20 text-primary-light" : "bg-theme-subtle-10 text-theme-muted"
|
|
319
321
|
),
|
|
320
322
|
children: getRoomIcon(room)
|
|
@@ -374,7 +376,7 @@ function ChatSidebar({
|
|
|
374
376
|
placeholder: "Pesquisar...",
|
|
375
377
|
value: search,
|
|
376
378
|
onChange: (e) => setSearch(e.target.value),
|
|
377
|
-
className: "h-8 text-xs bg-theme-subtle border-theme-subtle rounded-
|
|
379
|
+
className: "h-8 text-xs bg-theme-subtle border-theme-subtle rounded-xl pl-8"
|
|
378
380
|
}
|
|
379
381
|
)
|
|
380
382
|
] }) }),
|
|
@@ -513,7 +515,7 @@ function ActionBar({
|
|
|
513
515
|
animate: "visible",
|
|
514
516
|
exit: "exit",
|
|
515
517
|
className: cn(
|
|
516
|
-
"absolute z-10 -top-12 flex items-center gap-1 p-1.5 rounded-
|
|
518
|
+
"absolute z-10 -top-12 flex items-center gap-1 p-1.5 rounded-xl",
|
|
517
519
|
"bg-theme-surface/95 backdrop-blur-md border border-theme-subtle shadow-lg",
|
|
518
520
|
position === "right" ? "right-0" : "left-0"
|
|
519
521
|
),
|
|
@@ -529,7 +531,7 @@ function ActionBar({
|
|
|
529
531
|
onReact(emoji);
|
|
530
532
|
onClose();
|
|
531
533
|
},
|
|
532
|
-
className: "w-8 h-8 flex items-center justify-center rounded-
|
|
534
|
+
className: "w-8 h-8 flex items-center justify-center rounded-xl hover:bg-theme-highlight text-base transition-colors",
|
|
533
535
|
children: emoji
|
|
534
536
|
},
|
|
535
537
|
emoji
|
|
@@ -547,7 +549,7 @@ function ActionBar({
|
|
|
547
549
|
onReply();
|
|
548
550
|
onClose();
|
|
549
551
|
},
|
|
550
|
-
className: "p-2 rounded-
|
|
552
|
+
className: "p-2 rounded-xl text-theme-muted hover:text-theme hover:bg-theme-highlight transition-colors",
|
|
551
553
|
children: /* @__PURE__ */ jsx(OrgComment, { className: "w-4 h-4" })
|
|
552
554
|
}
|
|
553
555
|
) }),
|
|
@@ -564,7 +566,7 @@ function ActionBar({
|
|
|
564
566
|
onEdit();
|
|
565
567
|
onClose();
|
|
566
568
|
},
|
|
567
|
-
className: "p-2 rounded-
|
|
569
|
+
className: "p-2 rounded-xl text-theme-muted hover:text-theme hover:bg-theme-highlight transition-colors",
|
|
568
570
|
children: /* @__PURE__ */ jsx(OrgEdit, { className: "w-4 h-4" })
|
|
569
571
|
}
|
|
570
572
|
) }),
|
|
@@ -581,7 +583,7 @@ function ActionBar({
|
|
|
581
583
|
onDelete();
|
|
582
584
|
onClose();
|
|
583
585
|
},
|
|
584
|
-
className: "p-2 rounded-
|
|
586
|
+
className: "p-2 rounded-xl text-rose-400 hover:text-rose-300 hover:bg-rose-500/10 transition-colors",
|
|
585
587
|
children: /* @__PURE__ */ jsx(OrgTrash, { className: "w-4 h-4" })
|
|
586
588
|
}
|
|
587
589
|
) }),
|
|
@@ -594,7 +596,7 @@ function ActionBar({
|
|
|
594
596
|
whileHover: { scale: 1.1 },
|
|
595
597
|
whileTap: { scale: 0.9 },
|
|
596
598
|
onClick: onClose,
|
|
597
|
-
className: "p-2 rounded-
|
|
599
|
+
className: "p-2 rounded-xl text-theme-muted hover:text-theme hover:bg-theme-highlight transition-colors md:hidden",
|
|
598
600
|
children: /* @__PURE__ */ jsx(OrgClose, { className: "w-4 h-4" })
|
|
599
601
|
}
|
|
600
602
|
)
|
|
@@ -639,11 +641,11 @@ function MessageBubble({
|
|
|
639
641
|
canEdit = false,
|
|
640
642
|
canDelete = false
|
|
641
643
|
}) {
|
|
642
|
-
const [showActions, setShowActions] =
|
|
643
|
-
const bubbleRef =
|
|
644
|
+
const [showActions, setShowActions] = React6.useState(false);
|
|
645
|
+
const bubbleRef = React6.useRef(null);
|
|
644
646
|
const isPending = message._status === "pending";
|
|
645
647
|
const isError = message._status === "error";
|
|
646
|
-
|
|
648
|
+
React6.useEffect(() => {
|
|
647
649
|
const handleClickOutside = (e) => {
|
|
648
650
|
if (bubbleRef.current && !bubbleRef.current.contains(e.target)) {
|
|
649
651
|
setShowActions(false);
|
|
@@ -747,7 +749,7 @@ function MessageBubble({
|
|
|
747
749
|
onClick: handleMessageClick,
|
|
748
750
|
whileTap: { scale: 0.98 },
|
|
749
751
|
className: cn(
|
|
750
|
-
"rounded-
|
|
752
|
+
"rounded-xl rounded-br-none px-4 py-2.5 cursor-pointer select-none",
|
|
751
753
|
"bg-primary !text-white",
|
|
752
754
|
isError && "bg-rose-500/80",
|
|
753
755
|
showActions && "ring-2 ring-primary-light/30"
|
|
@@ -788,7 +790,7 @@ function MessageBubble({
|
|
|
788
790
|
transition: { duration: 0.2, ease: "easeOut" },
|
|
789
791
|
onClick: handleMessageClick,
|
|
790
792
|
className: cn(
|
|
791
|
-
"group flex gap-3 px-2 py-1.5 rounded-
|
|
793
|
+
"group flex gap-3 px-2 py-1.5 rounded-xl cursor-pointer select-none relative",
|
|
792
794
|
"transition-colors",
|
|
793
795
|
isPending && "opacity-60",
|
|
794
796
|
isError && "border-l-2 border-rose-500/50",
|
|
@@ -929,8 +931,8 @@ function MentionPopover({
|
|
|
929
931
|
position,
|
|
930
932
|
selectedIndex = 0
|
|
931
933
|
}) {
|
|
932
|
-
const listRef =
|
|
933
|
-
const groupedOptions =
|
|
934
|
+
const listRef = React6.useRef(null);
|
|
935
|
+
const groupedOptions = React6.useMemo(() => {
|
|
934
936
|
const groups = {
|
|
935
937
|
user: [],
|
|
936
938
|
project: [],
|
|
@@ -943,7 +945,7 @@ function MentionPopover({
|
|
|
943
945
|
});
|
|
944
946
|
return groups;
|
|
945
947
|
}, [options]);
|
|
946
|
-
|
|
948
|
+
React6.useEffect(() => {
|
|
947
949
|
if (listRef.current && selectedIndex >= 0) {
|
|
948
950
|
const items = listRef.current.querySelectorAll("[data-mention-item]");
|
|
949
951
|
const item = items[selectedIndex];
|
|
@@ -960,7 +962,7 @@ function MentionPopover({
|
|
|
960
962
|
{
|
|
961
963
|
className: cn(
|
|
962
964
|
"absolute z-50 w-72 max-h-64 overflow-y-auto",
|
|
963
|
-
"bg-theme-surface border border-theme-subtle rounded-
|
|
965
|
+
"bg-theme-surface border border-theme-subtle rounded-xl shadow-lg",
|
|
964
966
|
"animate-in fade-in-0 zoom-in-95 duration-[400ms]"
|
|
965
967
|
),
|
|
966
968
|
style: position ? { top: position.top, left: position.left } : void 0,
|
|
@@ -1051,11 +1053,11 @@ function MessageInput({
|
|
|
1051
1053
|
onMentionSearch,
|
|
1052
1054
|
mentionLoading = false
|
|
1053
1055
|
}) {
|
|
1054
|
-
const inputRef =
|
|
1055
|
-
const [showMentions, setShowMentions] =
|
|
1056
|
-
const [mentionQuery, setMentionQuery] =
|
|
1057
|
-
const [mentionIndex, setMentionIndex] =
|
|
1058
|
-
const [caretPosition, setCaretPosition] =
|
|
1056
|
+
const inputRef = React6.useRef(null);
|
|
1057
|
+
const [showMentions, setShowMentions] = React6.useState(false);
|
|
1058
|
+
const [mentionQuery, setMentionQuery] = React6.useState("");
|
|
1059
|
+
const [mentionIndex, setMentionIndex] = React6.useState(0);
|
|
1060
|
+
const [caretPosition, setCaretPosition] = React6.useState(null);
|
|
1059
1061
|
const detectMention = (text, cursorPos) => {
|
|
1060
1062
|
const beforeCursor = text.slice(0, cursorPos);
|
|
1061
1063
|
const match = beforeCursor.match(/@(\w*)$/);
|
|
@@ -1133,13 +1135,13 @@ function MessageInput({
|
|
|
1133
1135
|
onStopTyping?.();
|
|
1134
1136
|
}, 200);
|
|
1135
1137
|
};
|
|
1136
|
-
|
|
1138
|
+
React6.useEffect(() => {
|
|
1137
1139
|
if (inputRef.current) {
|
|
1138
1140
|
inputRef.current.style.height = "auto";
|
|
1139
1141
|
inputRef.current.style.height = `${Math.min(inputRef.current.scrollHeight, 120)}px`;
|
|
1140
1142
|
}
|
|
1141
1143
|
}, [value]);
|
|
1142
|
-
|
|
1144
|
+
React6.useEffect(() => {
|
|
1143
1145
|
if (editingMessage && inputRef.current) {
|
|
1144
1146
|
inputRef.current.focus();
|
|
1145
1147
|
}
|
|
@@ -1169,7 +1171,7 @@ function MessageInput({
|
|
|
1169
1171
|
exit: "exit",
|
|
1170
1172
|
transition: bannerTransition,
|
|
1171
1173
|
className: "overflow-hidden",
|
|
1172
|
-
children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-3 py-2 mb-2 bg-theme-subtle border border-theme-subtle rounded-
|
|
1174
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-3 py-2 mb-2 bg-theme-subtle border border-theme-subtle rounded-xl", children: [
|
|
1173
1175
|
/* @__PURE__ */ jsx(OrgComment, { className: "w-4 h-4 text-primary-light shrink-0" }),
|
|
1174
1176
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
1175
1177
|
/* @__PURE__ */ jsxs("p", { className: "text-[11px] font-medium text-primary-light", children: [
|
|
@@ -1199,7 +1201,7 @@ function MessageInput({
|
|
|
1199
1201
|
exit: "exit",
|
|
1200
1202
|
transition: bannerTransition,
|
|
1201
1203
|
className: "overflow-hidden",
|
|
1202
|
-
children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-3 py-2 mb-2 bg-amber-500/10 border border-amber-500/30 rounded-
|
|
1204
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-3 py-2 mb-2 bg-amber-500/10 border border-amber-500/30 rounded-xl", children: [
|
|
1203
1205
|
/* @__PURE__ */ jsx(OrgEdit, { className: "w-4 h-4 text-amber-400 shrink-0" }),
|
|
1204
1206
|
/* @__PURE__ */ jsx("p", { className: "text-[12px] text-amber-300 flex-1", children: "Editando mensagem" }),
|
|
1205
1207
|
/* @__PURE__ */ jsx(
|
|
@@ -1218,7 +1220,7 @@ function MessageInput({
|
|
|
1218
1220
|
"div",
|
|
1219
1221
|
{
|
|
1220
1222
|
className: cn(
|
|
1221
|
-
"flex items-end gap-2 bg-theme-subtle border border-theme-subtle rounded-
|
|
1223
|
+
"flex items-end gap-2 bg-theme-subtle border border-theme-subtle rounded-xl px-3 py-2 transition-colors",
|
|
1222
1224
|
"focus-within:border-primary/50",
|
|
1223
1225
|
isEditing && "border-amber-500/30 focus-within:border-amber-500/50"
|
|
1224
1226
|
),
|
|
@@ -1339,19 +1341,19 @@ function ChatMessages({
|
|
|
1339
1341
|
onLoadMore,
|
|
1340
1342
|
loadingMore = false
|
|
1341
1343
|
}) {
|
|
1342
|
-
const [inputValue, setInputValue] =
|
|
1343
|
-
const [editingMessage, setEditingMessage] =
|
|
1344
|
-
const [replyTo, setReplyTo] =
|
|
1345
|
-
const [mentionOptions, setMentionOptions] =
|
|
1346
|
-
const scrollRef =
|
|
1347
|
-
const messagesById =
|
|
1344
|
+
const [inputValue, setInputValue] = React6.useState("");
|
|
1345
|
+
const [editingMessage, setEditingMessage] = React6.useState(null);
|
|
1346
|
+
const [replyTo, setReplyTo] = React6.useState(null);
|
|
1347
|
+
const [mentionOptions, setMentionOptions] = React6.useState([]);
|
|
1348
|
+
const scrollRef = React6.useRef(null);
|
|
1349
|
+
const messagesById = React6.useMemo(() => {
|
|
1348
1350
|
const map = /* @__PURE__ */ new Map();
|
|
1349
1351
|
messages.forEach((m) => map.set(m.id, m));
|
|
1350
1352
|
return map;
|
|
1351
1353
|
}, [messages]);
|
|
1352
|
-
const isInitialLoad =
|
|
1353
|
-
const prevMessageCount =
|
|
1354
|
-
|
|
1354
|
+
const isInitialLoad = React6.useRef(true);
|
|
1355
|
+
const prevMessageCount = React6.useRef(messages.length);
|
|
1356
|
+
React6.useEffect(() => {
|
|
1355
1357
|
const el = scrollRef.current;
|
|
1356
1358
|
if (!el) return;
|
|
1357
1359
|
if (isInitialLoad.current || messages.length > prevMessageCount.current) {
|
|
@@ -1365,17 +1367,17 @@ function ChatMessages({
|
|
|
1365
1367
|
}
|
|
1366
1368
|
prevMessageCount.current = messages.length;
|
|
1367
1369
|
}, [messages]);
|
|
1368
|
-
|
|
1370
|
+
React6.useEffect(() => {
|
|
1369
1371
|
isInitialLoad.current = true;
|
|
1370
1372
|
}, [room?.id]);
|
|
1371
|
-
const handleScroll =
|
|
1373
|
+
const handleScroll = React6.useCallback(() => {
|
|
1372
1374
|
const el = scrollRef.current;
|
|
1373
1375
|
if (!el || !hasMore || loadingMore || !onLoadMore) return;
|
|
1374
1376
|
if (el.scrollTop < 60) {
|
|
1375
1377
|
onLoadMore();
|
|
1376
1378
|
}
|
|
1377
1379
|
}, [hasMore, loadingMore, onLoadMore]);
|
|
1378
|
-
|
|
1380
|
+
React6.useEffect(() => {
|
|
1379
1381
|
if (editingMessage) {
|
|
1380
1382
|
setInputValue(editingMessage.content);
|
|
1381
1383
|
}
|
|
@@ -1410,7 +1412,7 @@ function ChatMessages({
|
|
|
1410
1412
|
});
|
|
1411
1413
|
setEditingMessage(null);
|
|
1412
1414
|
};
|
|
1413
|
-
const handleScrollToMessage =
|
|
1415
|
+
const handleScrollToMessage = React6.useCallback((messageId) => {
|
|
1414
1416
|
const el = scrollRef.current?.querySelector(`[data-message-id="${messageId}"]`);
|
|
1415
1417
|
if (el) {
|
|
1416
1418
|
el.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
@@ -1442,7 +1444,7 @@ function ChatMessages({
|
|
|
1442
1444
|
};
|
|
1443
1445
|
if (!room) {
|
|
1444
1446
|
return /* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col items-center justify-center text-center px-6", children: [
|
|
1445
|
-
/* @__PURE__ */ jsx("div", { className: "w-16 h-16 rounded-
|
|
1447
|
+
/* @__PURE__ */ jsx("div", { className: "w-16 h-16 rounded-xl bg-primary/10 flex items-center justify-center mb-4", children: /* @__PURE__ */ jsx(OrgComment, { className: "w-8 h-8 text-primary-light/60" }) }),
|
|
1446
1448
|
/* @__PURE__ */ jsx("h3", { className: "text-lg font-medium text-theme mb-2", children: "Selecione uma conversa" }),
|
|
1447
1449
|
/* @__PURE__ */ jsx("p", { className: "text-sm text-theme-muted max-w-[240px]", children: "Escolha um canal ou mensagem direta para come\xE7ar a conversar." })
|
|
1448
1450
|
] });
|
|
@@ -1461,7 +1463,7 @@ function ChatMessages({
|
|
|
1461
1463
|
"button",
|
|
1462
1464
|
{
|
|
1463
1465
|
onClick: onBack,
|
|
1464
|
-
className: "p-1.5 rounded-
|
|
1466
|
+
className: "p-1.5 rounded-xl text-theme-muted hover:text-theme hover:bg-theme-subtle transition-colors",
|
|
1465
1467
|
children: /* @__PURE__ */ jsx("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 19l-7-7 7-7" }) })
|
|
1466
1468
|
}
|
|
1467
1469
|
),
|
|
@@ -1469,7 +1471,7 @@ function ChatMessages({
|
|
|
1469
1471
|
"span",
|
|
1470
1472
|
{
|
|
1471
1473
|
className: cn(
|
|
1472
|
-
"flex items-center justify-center h-8 w-8 rounded-
|
|
1474
|
+
"flex items-center justify-center h-8 w-8 rounded-xl text-sm",
|
|
1473
1475
|
"bg-primary/15 text-primary-light"
|
|
1474
1476
|
),
|
|
1475
1477
|
children: room.type === "DIRECT" ? /* @__PURE__ */ jsx(OrgComment, { className: "w-4 h-4" }) : "#"
|
|
@@ -1524,13 +1526,13 @@ function ChatMessages({
|
|
|
1524
1526
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-3/4" })
|
|
1525
1527
|
] })
|
|
1526
1528
|
] }, i)) }) : messages.length === 0 ? /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center h-full", children: [
|
|
1527
|
-
/* @__PURE__ */ jsx("div", { className: "w-12 h-12 rounded-
|
|
1529
|
+
/* @__PURE__ */ jsx("div", { className: "w-12 h-12 rounded-xl bg-primary/10 flex items-center justify-center mb-3", children: /* @__PURE__ */ jsx(OrgComment, { className: "w-6 h-6 text-primary-light/50" }) }),
|
|
1528
1530
|
/* @__PURE__ */ jsx("p", { className: "text-sm text-theme-muted", children: "Ainda sem mensagens." }),
|
|
1529
1531
|
/* @__PURE__ */ jsx("p", { className: "text-xs text-theme-muted mt-1", children: "Comece a conversa!" })
|
|
1530
1532
|
] }) : messages.map((msg, idx) => {
|
|
1531
1533
|
const isCurrentUser = msg.authorId === currentUserId;
|
|
1532
1534
|
const replyToMessage = msg.replyToId || msg.parentId ? messagesById.get(msg.replyToId || msg.parentId || "") : null;
|
|
1533
|
-
return /* @__PURE__ */ jsxs(
|
|
1535
|
+
return /* @__PURE__ */ jsxs(React6.Fragment, { children: [
|
|
1534
1536
|
shouldShowDateSeparator(messages, idx) && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 py-3", children: [
|
|
1535
1537
|
/* @__PURE__ */ jsx("div", { className: "flex-1 h-px bg-theme-subtle-10" }),
|
|
1536
1538
|
/* @__PURE__ */ jsx("span", { className: "text-[11px] text-theme-muted font-medium", children: formatDateSeparator(msg.createdAt) }),
|
|
@@ -1594,15 +1596,15 @@ function Label({ className, ...props }) {
|
|
|
1594
1596
|
);
|
|
1595
1597
|
}
|
|
1596
1598
|
var textareaVariants = cva(
|
|
1597
|
-
"flex w-full min-h-[100px] bg-
|
|
1599
|
+
"flex w-full min-h-[100px] bg-white/[0.03] backdrop-blur-md border border-white/10 rounded-xl px-4 py-3 text-sm font-light text-org-text transition-all duration-[400ms] ease-[cubic-bezier(0.25,1,0.5,1)] placeholder:text-org-text-muted focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 resize-none",
|
|
1598
1600
|
{
|
|
1599
1601
|
variants: {
|
|
1600
1602
|
variant: {
|
|
1601
|
-
default: "focus:border-primary-light/50 focus:shadow-[0_0_0_3px_rgba(
|
|
1602
|
-
flat: "rounded-
|
|
1603
|
-
rounded: "rounded-
|
|
1603
|
+
default: "focus:border-primary-light/50 focus:shadow-[0_0_0_3px_rgba(99,102,241,0.10),0_0_20px_rgba(99,102,241,0.08)]",
|
|
1604
|
+
flat: "rounded-xl focus:border-primary-light/50 focus:shadow-[0_0_0_3px_rgba(99,102,241,0.10)]",
|
|
1605
|
+
rounded: "rounded-xl focus:border-primary-light/50 focus:shadow-[0_0_0_3px_rgba(99,102,241,0.10)]",
|
|
1604
1606
|
error: "border-error/30 bg-error/5 text-red-100 placeholder:text-red-500/30 focus:border-error focus:shadow-[0_0_0_3px_rgba(224,17,95,0.10)]",
|
|
1605
|
-
cream: "bg-white/60 border-[rgba(36,25,121,0.06)] text-neutral-900 placeholder:text-neutral-400 focus:border-primary/40 focus:bg-white/80 focus:shadow-[0_0_0_3px_rgba(
|
|
1607
|
+
cream: "bg-white/60 border-[rgba(36,25,121,0.06)] text-neutral-900 placeholder:text-neutral-400 focus:border-primary/40 focus:bg-white/80 focus:shadow-[0_0_0_3px_rgba(99,102,241,0.08)] backdrop-blur-sm"
|
|
1606
1608
|
}
|
|
1607
1609
|
},
|
|
1608
1610
|
defaultVariants: {
|
|
@@ -1610,9 +1612,9 @@ var textareaVariants = cva(
|
|
|
1610
1612
|
}
|
|
1611
1613
|
}
|
|
1612
1614
|
);
|
|
1613
|
-
var Textarea =
|
|
1615
|
+
var Textarea = React6.forwardRef(
|
|
1614
1616
|
({ className, variant, label, error, labelPosition = "left", ...props }, ref) => {
|
|
1615
|
-
const id =
|
|
1617
|
+
const id = React6.useId();
|
|
1616
1618
|
const effectiveVariant = error ? "error" : variant;
|
|
1617
1619
|
return /* @__PURE__ */ jsxs("div", { className: "relative group", children: [
|
|
1618
1620
|
label && /* @__PURE__ */ jsx(
|
|
@@ -1685,7 +1687,9 @@ function DialogContent({
|
|
|
1685
1687
|
{
|
|
1686
1688
|
"data-slot": "dialog-content",
|
|
1687
1689
|
className: cn(
|
|
1688
|
-
"
|
|
1690
|
+
"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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-2xl border-2 p-6 shadow-xl duration-[400ms] sm:max-w-lg",
|
|
1691
|
+
"bg-white text-gray-900 border-gray-300 dark:bg-gray-900 dark:text-white dark:border-gray-700",
|
|
1692
|
+
"dark:shadow-[0_24px_80px_-15px_rgba(0,0,0,0.8)]",
|
|
1689
1693
|
className
|
|
1690
1694
|
),
|
|
1691
1695
|
...props,
|
|
@@ -1800,11 +1804,12 @@ function DrawerContent({
|
|
|
1800
1804
|
damping: 40
|
|
1801
1805
|
},
|
|
1802
1806
|
className: cn(
|
|
1803
|
-
"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border
|
|
1807
|
+
"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border-2",
|
|
1808
|
+
"border-gray-300 bg-white text-gray-900 dark:border-gray-700 dark:bg-gray-900 dark:text-white",
|
|
1804
1809
|
className
|
|
1805
1810
|
),
|
|
1806
1811
|
children: [
|
|
1807
|
-
/* @__PURE__ */ jsx("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-
|
|
1812
|
+
/* @__PURE__ */ jsx("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-gray-300 dark:bg-gray-700" }),
|
|
1808
1813
|
children
|
|
1809
1814
|
]
|
|
1810
1815
|
}
|
|
@@ -1860,8 +1865,8 @@ function DrawerDescription({
|
|
|
1860
1865
|
);
|
|
1861
1866
|
}
|
|
1862
1867
|
function useMediaQuery(query) {
|
|
1863
|
-
const [matches, setMatches] =
|
|
1864
|
-
|
|
1868
|
+
const [matches, setMatches] = React6.useState(false);
|
|
1869
|
+
React6.useEffect(() => {
|
|
1865
1870
|
const mql = window.matchMedia(query);
|
|
1866
1871
|
setMatches(mql.matches);
|
|
1867
1872
|
const handler = (e) => setMatches(e.matches);
|
|
@@ -1888,8 +1893,9 @@ function ResponsiveDialog({
|
|
|
1888
1893
|
{
|
|
1889
1894
|
className: cn(
|
|
1890
1895
|
"max-w-2xl max-h-[85vh] overflow-y-auto",
|
|
1891
|
-
"border border-
|
|
1892
|
-
"shadow-
|
|
1896
|
+
"border-2 bg-white text-gray-900 border-gray-300 dark:border-gray-700 dark:bg-gray-900 dark:text-white",
|
|
1897
|
+
"dark:shadow-[0_24px_80px_-15px_rgba(0,0,0,0.8)]",
|
|
1898
|
+
"shadow-xl",
|
|
1893
1899
|
contentClassName
|
|
1894
1900
|
),
|
|
1895
1901
|
children: [
|
|
@@ -1908,7 +1914,7 @@ function ResponsiveDialog({
|
|
|
1908
1914
|
{
|
|
1909
1915
|
className: cn(
|
|
1910
1916
|
"max-h-[90vh]",
|
|
1911
|
-
"border-t border-
|
|
1917
|
+
"border-t-2 border-gray-300 bg-white text-gray-900 dark:border-gray-700 dark:bg-gray-900 dark:text-white",
|
|
1912
1918
|
contentClassName
|
|
1913
1919
|
),
|
|
1914
1920
|
children: [
|
|
@@ -1933,7 +1939,7 @@ function TabsList({
|
|
|
1933
1939
|
{
|
|
1934
1940
|
"data-slot": "tabs-list",
|
|
1935
1941
|
className: cn(
|
|
1936
|
-
"inline-flex h-10 items-center justify-center rounded-
|
|
1942
|
+
"inline-flex h-10 items-center justify-center rounded-xl bg-white/[0.03] backdrop-blur-md border border-white/10 p-1 text-theme-muted",
|
|
1937
1943
|
className
|
|
1938
1944
|
),
|
|
1939
1945
|
...props
|
|
@@ -1949,7 +1955,7 @@ function TabsTrigger({
|
|
|
1949
1955
|
{
|
|
1950
1956
|
"data-slot": "tabs-trigger",
|
|
1951
1957
|
className: cn(
|
|
1952
|
-
"inline-flex items-center justify-center whitespace-nowrap rounded-
|
|
1958
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-lg px-3 py-1.5 text-sm font-medium ring-offset-background transition-all duration-[400ms] ease-[cubic-bezier(0.25,1,0.5,1)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-white/[0.05] data-[state=active]:text-theme data-[state=active]:shadow-inner-light",
|
|
1953
1959
|
className
|
|
1954
1960
|
),
|
|
1955
1961
|
...props
|
|
@@ -1983,15 +1989,15 @@ function CreateRoomDialog({
|
|
|
1983
1989
|
workspaceMembers,
|
|
1984
1990
|
loadingMembers
|
|
1985
1991
|
}) {
|
|
1986
|
-
const [tab, setTab] =
|
|
1987
|
-
const [creating, setCreating] =
|
|
1988
|
-
const [channelName, setChannelName] =
|
|
1989
|
-
const [channelDesc, setChannelDesc] =
|
|
1990
|
-
const [visibility, setVisibility] =
|
|
1991
|
-
const [selectedMembers, setSelectedMembers] =
|
|
1992
|
-
const [showAdvanced, setShowAdvanced] =
|
|
1993
|
-
const [dmSearch, setDmSearch] =
|
|
1994
|
-
const [nameError, setNameError] =
|
|
1992
|
+
const [tab, setTab] = React6.useState("channel");
|
|
1993
|
+
const [creating, setCreating] = React6.useState(false);
|
|
1994
|
+
const [channelName, setChannelName] = React6.useState("");
|
|
1995
|
+
const [channelDesc, setChannelDesc] = React6.useState("");
|
|
1996
|
+
const [visibility, setVisibility] = React6.useState("WORKSPACE");
|
|
1997
|
+
const [selectedMembers, setSelectedMembers] = React6.useState([]);
|
|
1998
|
+
const [showAdvanced, setShowAdvanced] = React6.useState(false);
|
|
1999
|
+
const [dmSearch, setDmSearch] = React6.useState("");
|
|
2000
|
+
const [nameError, setNameError] = React6.useState("");
|
|
1995
2001
|
const validateName = (value) => {
|
|
1996
2002
|
if (!value.trim()) {
|
|
1997
2003
|
setNameError("Nome do canal \xE9 obrigat\xF3rio");
|
|
@@ -2008,7 +2014,7 @@ function CreateRoomDialog({
|
|
|
2008
2014
|
setNameError("");
|
|
2009
2015
|
return true;
|
|
2010
2016
|
};
|
|
2011
|
-
const filteredMembers =
|
|
2017
|
+
const filteredMembers = React6.useMemo(() => {
|
|
2012
2018
|
if (!dmSearch) return workspaceMembers;
|
|
2013
2019
|
const q = dmSearch.toLowerCase();
|
|
2014
2020
|
return workspaceMembers.filter(
|
|
@@ -2123,7 +2129,7 @@ function CreateRoomDialog({
|
|
|
2123
2129
|
type: "button",
|
|
2124
2130
|
onClick: () => setVisibility("WORKSPACE"),
|
|
2125
2131
|
className: cn(
|
|
2126
|
-
"flex-1 flex items-center gap-2 px-3 py-2 rounded-
|
|
2132
|
+
"flex-1 flex items-center gap-2 px-3 py-2 rounded-xl text-xs transition-all duration-[400ms] ease-[cubic-bezier(0.25,1,0.5,1)] border",
|
|
2127
2133
|
visibility === "WORKSPACE" ? "bg-primary/15 border-primary/30 text-primary-light" : "bg-theme-subtle border-theme-subtle text-theme-muted hover:bg-theme-subtle"
|
|
2128
2134
|
),
|
|
2129
2135
|
children: [
|
|
@@ -2138,7 +2144,7 @@ function CreateRoomDialog({
|
|
|
2138
2144
|
type: "button",
|
|
2139
2145
|
onClick: () => setVisibility("PRIVATE"),
|
|
2140
2146
|
className: cn(
|
|
2141
|
-
"flex-1 flex items-center gap-2 px-3 py-2 rounded-
|
|
2147
|
+
"flex-1 flex items-center gap-2 px-3 py-2 rounded-xl text-xs transition-all duration-[400ms] ease-[cubic-bezier(0.25,1,0.5,1)] border",
|
|
2142
2148
|
visibility === "PRIVATE" ? "bg-primary/15 border-primary/30 text-primary-light" : "bg-theme-subtle border-theme-subtle text-theme-muted hover:bg-theme-subtle"
|
|
2143
2149
|
),
|
|
2144
2150
|
children: [
|
|
@@ -2175,7 +2181,7 @@ function CreateRoomDialog({
|
|
|
2175
2181
|
selectedMembers.length,
|
|
2176
2182
|
" selecionados)"
|
|
2177
2183
|
] }),
|
|
2178
|
-
/* @__PURE__ */ jsx(ScrollArea, { className: "max-h-[150px] rounded-
|
|
2184
|
+
/* @__PURE__ */ jsx(ScrollArea, { className: "max-h-[150px] rounded-xl border border-theme-subtle bg-theme-subtle", children: /* @__PURE__ */ jsx("div", { className: "p-2 space-y-0.5", children: loadingMembers ? Array.from({ length: 3 }).map((_, i) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 p-2", children: [
|
|
2179
2185
|
/* @__PURE__ */ jsx(Skeleton, { variant: "circular", className: "h-7 w-7" }),
|
|
2180
2186
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-24" })
|
|
2181
2187
|
] }, i)) : workspaceMembers.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-xs text-theme-muted p-2 text-center", children: "Sem membros dispon\xEDveis" }) : workspaceMembers.map((member) => /* @__PURE__ */ jsxs(
|
|
@@ -2184,7 +2190,7 @@ function CreateRoomDialog({
|
|
|
2184
2190
|
type: "button",
|
|
2185
2191
|
onClick: () => toggleMember(member.id),
|
|
2186
2192
|
className: cn(
|
|
2187
|
-
"flex items-center gap-2 w-full p-2 rounded-
|
|
2193
|
+
"flex items-center gap-2 w-full p-2 rounded-xl text-left text-xs transition-colors",
|
|
2188
2194
|
selectedMembers.includes(member.id) ? "bg-primary/15 text-primary-light" : "text-theme-secondary hover:bg-theme-subtle"
|
|
2189
2195
|
),
|
|
2190
2196
|
children: [
|
|
@@ -2250,7 +2256,7 @@ function CreateRoomDialog({
|
|
|
2250
2256
|
{
|
|
2251
2257
|
onClick: () => handleCreateDM(member.id),
|
|
2252
2258
|
disabled: creating,
|
|
2253
|
-
className: "flex items-center gap-3 w-full p-2.5 rounded-
|
|
2259
|
+
className: "flex items-center gap-3 w-full p-2.5 rounded-xl text-left transition-all duration-[400ms] ease-[cubic-bezier(0.25,1,0.5,1)] hover:bg-theme-subtle active:scale-[0.98] disabled:opacity-50",
|
|
2254
2260
|
children: [
|
|
2255
2261
|
/* @__PURE__ */ jsx(Avatar, { shape: "circle", size: "sm", className: "h-8 w-8", children: /* @__PURE__ */ jsx(AvatarFallback, { className: "bg-primary/20 text-primary-light text-xs", children: getInitials3(member.displayName) }) }),
|
|
2256
2262
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
@@ -2301,14 +2307,14 @@ function Separator({
|
|
|
2301
2307
|
var Select = SelectPrimitive.Root;
|
|
2302
2308
|
var SelectGroup = SelectPrimitive.Group;
|
|
2303
2309
|
var SelectValue = SelectPrimitive.Value;
|
|
2304
|
-
var SelectTrigger =
|
|
2310
|
+
var SelectTrigger = React6.forwardRef(({ className, children, label, ...props }, ref) => /* @__PURE__ */ jsxs("div", { className: "relative group", children: [
|
|
2305
2311
|
label && /* @__PURE__ */ jsx("span", { className: "absolute -top-3 right-0 z-10 mr-2 bg-theme-surface px-2 text-label uppercase tracking-widest text-theme-muted", children: label }),
|
|
2306
2312
|
/* @__PURE__ */ jsxs(
|
|
2307
2313
|
SelectPrimitive.Trigger,
|
|
2308
2314
|
{
|
|
2309
2315
|
ref,
|
|
2310
2316
|
className: cn(
|
|
2311
|
-
"flex w-full items-center justify-between bg-
|
|
2317
|
+
"flex w-full items-center justify-between bg-white/[0.03] backdrop-blur-md border border-white/10 px-4 py-3 text-sm font-light text-theme-secondary rounded-xl transition-all duration-[400ms] ease-[cubic-bezier(0.25,1,0.5,1)] 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 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
2312
2318
|
className
|
|
2313
2319
|
),
|
|
2314
2320
|
...props,
|
|
@@ -2320,7 +2326,7 @@ var SelectTrigger = React7.forwardRef(({ className, children, label, ...props },
|
|
|
2320
2326
|
)
|
|
2321
2327
|
] }));
|
|
2322
2328
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
2323
|
-
var SelectScrollUpButton =
|
|
2329
|
+
var SelectScrollUpButton = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2324
2330
|
SelectPrimitive.ScrollUpButton,
|
|
2325
2331
|
{
|
|
2326
2332
|
ref,
|
|
@@ -2330,7 +2336,7 @@ var SelectScrollUpButton = React7.forwardRef(({ className, ...props }, ref) => /
|
|
|
2330
2336
|
}
|
|
2331
2337
|
));
|
|
2332
2338
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
2333
|
-
var SelectScrollDownButton =
|
|
2339
|
+
var SelectScrollDownButton = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2334
2340
|
SelectPrimitive.ScrollDownButton,
|
|
2335
2341
|
{
|
|
2336
2342
|
ref,
|
|
@@ -2340,12 +2346,12 @@ var SelectScrollDownButton = React7.forwardRef(({ className, ...props }, ref) =>
|
|
|
2340
2346
|
}
|
|
2341
2347
|
));
|
|
2342
2348
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
2343
|
-
var SelectContent =
|
|
2349
|
+
var SelectContent = React6.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
2344
2350
|
SelectPrimitive.Content,
|
|
2345
2351
|
{
|
|
2346
2352
|
ref,
|
|
2347
2353
|
className: cn(
|
|
2348
|
-
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-
|
|
2354
|
+
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-xl border border-white/20 bg-white/[0.03] backdrop-blur-[40px] 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",
|
|
2349
2355
|
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
2350
2356
|
className
|
|
2351
2357
|
),
|
|
@@ -2368,12 +2374,12 @@ var SelectContent = React7.forwardRef(({ className, children, position = "popper
|
|
|
2368
2374
|
}
|
|
2369
2375
|
) }));
|
|
2370
2376
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
2371
|
-
var SelectItem =
|
|
2377
|
+
var SelectItem = React6.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
2372
2378
|
SelectPrimitive.Item,
|
|
2373
2379
|
{
|
|
2374
2380
|
ref,
|
|
2375
2381
|
className: cn(
|
|
2376
|
-
"relative flex w-full cursor-default select-none items-center rounded-
|
|
2382
|
+
"relative flex w-full cursor-default select-none items-center rounded-lg py-2 pl-8 pr-2 text-sm font-light text-theme-secondary outline-none transition-colors duration-[400ms] ease-[cubic-bezier(0.25,1,0.5,1)] focus:bg-white/[0.05] focus:text-theme data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
2377
2383
|
className
|
|
2378
2384
|
),
|
|
2379
2385
|
...props,
|
|
@@ -2384,7 +2390,7 @@ var SelectItem = React7.forwardRef(({ className, children, ...props }, ref) => /
|
|
|
2384
2390
|
}
|
|
2385
2391
|
));
|
|
2386
2392
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
2387
|
-
var SelectSeparator =
|
|
2393
|
+
var SelectSeparator = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2388
2394
|
SelectPrimitive.Separator,
|
|
2389
2395
|
{
|
|
2390
2396
|
ref,
|
|
@@ -2393,7 +2399,7 @@ var SelectSeparator = React7.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
2393
2399
|
}
|
|
2394
2400
|
));
|
|
2395
2401
|
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
2396
|
-
var SelectLabel =
|
|
2402
|
+
var SelectLabel = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2397
2403
|
SelectPrimitive.Label,
|
|
2398
2404
|
{
|
|
2399
2405
|
ref,
|
|
@@ -2429,13 +2435,13 @@ function RoomManagementPanel({
|
|
|
2429
2435
|
onUpdateMemberRole,
|
|
2430
2436
|
className
|
|
2431
2437
|
}) {
|
|
2432
|
-
const [view, setView] =
|
|
2433
|
-
const [editName, setEditName] =
|
|
2434
|
-
const [editDesc, setEditDesc] =
|
|
2435
|
-
const [editVisibility, setEditVisibility] =
|
|
2436
|
-
const [saving, setSaving] =
|
|
2437
|
-
const [confirmArchive, setConfirmArchive] =
|
|
2438
|
-
|
|
2438
|
+
const [view, setView] = React6.useState("info");
|
|
2439
|
+
const [editName, setEditName] = React6.useState(room.name || "");
|
|
2440
|
+
const [editDesc, setEditDesc] = React6.useState(room.description || "");
|
|
2441
|
+
const [editVisibility, setEditVisibility] = React6.useState(room.visibility);
|
|
2442
|
+
const [saving, setSaving] = React6.useState(false);
|
|
2443
|
+
const [confirmArchive, setConfirmArchive] = React6.useState(false);
|
|
2444
|
+
React6.useEffect(() => {
|
|
2439
2445
|
setEditName(room.name || "");
|
|
2440
2446
|
setEditDesc(room.description || "");
|
|
2441
2447
|
setEditVisibility(room.visibility);
|
|
@@ -2458,7 +2464,7 @@ function RoomManagementPanel({
|
|
|
2458
2464
|
"button",
|
|
2459
2465
|
{
|
|
2460
2466
|
onClick: () => setView("info"),
|
|
2461
|
-
className: "p-1 rounded-
|
|
2467
|
+
className: "p-1 rounded-xl hover:bg-theme-subtle text-theme-muted hover:text-theme transition-colors",
|
|
2462
2468
|
children: /* @__PURE__ */ jsx(OrgChevronLeft, { className: "w-4 h-4" })
|
|
2463
2469
|
}
|
|
2464
2470
|
),
|
|
@@ -2467,7 +2473,7 @@ function RoomManagementPanel({
|
|
|
2467
2473
|
"button",
|
|
2468
2474
|
{
|
|
2469
2475
|
onClick: onClose,
|
|
2470
|
-
className: "p-1 rounded-
|
|
2476
|
+
className: "p-1 rounded-xl hover:bg-theme-subtle text-theme-muted hover:text-theme transition-colors",
|
|
2471
2477
|
children: /* @__PURE__ */ jsx(OrgClose, { className: "w-4 h-4" })
|
|
2472
2478
|
}
|
|
2473
2479
|
)
|
|
@@ -2480,7 +2486,7 @@ function RoomManagementPanel({
|
|
|
2480
2486
|
"div",
|
|
2481
2487
|
{
|
|
2482
2488
|
className: cn(
|
|
2483
|
-
"flex items-center justify-center h-12 w-12 rounded-
|
|
2489
|
+
"flex items-center justify-center h-12 w-12 rounded-xl text-lg",
|
|
2484
2490
|
"bg-primary/15 text-primary-light"
|
|
2485
2491
|
),
|
|
2486
2492
|
children: room.type === "DIRECT" ? "\u{1F4AC}" : "#"
|
|
@@ -2511,7 +2517,7 @@ function RoomManagementPanel({
|
|
|
2511
2517
|
"button",
|
|
2512
2518
|
{
|
|
2513
2519
|
onClick: () => setView("members"),
|
|
2514
|
-
className: "flex items-center gap-3 w-full px-3 py-2.5 rounded-
|
|
2520
|
+
className: "flex items-center gap-3 w-full px-3 py-2.5 rounded-xl text-sm text-theme-secondary hover:bg-theme-subtle hover:text-theme transition-colors",
|
|
2515
2521
|
children: [
|
|
2516
2522
|
/* @__PURE__ */ jsx(OrgTeam, { className: "w-4 h-4 text-theme-muted" }),
|
|
2517
2523
|
/* @__PURE__ */ jsx("span", { className: "flex-1 text-left", children: "Membros" }),
|
|
@@ -2523,7 +2529,7 @@ function RoomManagementPanel({
|
|
|
2523
2529
|
"button",
|
|
2524
2530
|
{
|
|
2525
2531
|
onClick: () => setView("edit"),
|
|
2526
|
-
className: "flex items-center gap-3 w-full px-3 py-2.5 rounded-
|
|
2532
|
+
className: "flex items-center gap-3 w-full px-3 py-2.5 rounded-xl text-sm text-theme-secondary hover:bg-theme-subtle hover:text-theme transition-colors",
|
|
2527
2533
|
children: [
|
|
2528
2534
|
/* @__PURE__ */ jsx(OrgEdit, { className: "w-4 h-4 text-theme-muted" }),
|
|
2529
2535
|
/* @__PURE__ */ jsx("span", { className: "flex-1 text-left", children: "Editar canal" })
|
|
@@ -2535,7 +2541,7 @@ function RoomManagementPanel({
|
|
|
2535
2541
|
"button",
|
|
2536
2542
|
{
|
|
2537
2543
|
onClick: () => onLeaveRoom(room.id),
|
|
2538
|
-
className: "flex items-center gap-3 w-full px-3 py-2.5 rounded-
|
|
2544
|
+
className: "flex items-center gap-3 w-full px-3 py-2.5 rounded-xl text-sm text-theme-muted hover:bg-rose-500/10 hover:text-rose-400 transition-colors",
|
|
2539
2545
|
children: [
|
|
2540
2546
|
/* @__PURE__ */ jsx(OrgDoor, { className: "w-4 h-4" }),
|
|
2541
2547
|
/* @__PURE__ */ jsx("span", { className: "flex-1 text-left", children: "Sair do canal" })
|
|
@@ -2546,13 +2552,13 @@ function RoomManagementPanel({
|
|
|
2546
2552
|
"button",
|
|
2547
2553
|
{
|
|
2548
2554
|
onClick: () => setConfirmArchive(true),
|
|
2549
|
-
className: "flex items-center gap-3 w-full px-3 py-2.5 rounded-
|
|
2555
|
+
className: "flex items-center gap-3 w-full px-3 py-2.5 rounded-xl text-sm text-theme-muted hover:bg-rose-500/10 hover:text-rose-400 transition-colors",
|
|
2550
2556
|
children: [
|
|
2551
2557
|
/* @__PURE__ */ jsx(OrgTrash, { className: "w-4 h-4" }),
|
|
2552
2558
|
/* @__PURE__ */ jsx("span", { className: "flex-1 text-left", children: "Arquivar canal" })
|
|
2553
2559
|
]
|
|
2554
2560
|
}
|
|
2555
|
-
) : /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-3 py-2 rounded-
|
|
2561
|
+
) : /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-3 py-2 rounded-xl bg-rose-500/10 border border-rose-500/20 animate-in fade-in-0 duration-[400ms]", children: [
|
|
2556
2562
|
/* @__PURE__ */ jsx("p", { className: "flex-1 text-xs text-rose-300", children: "Tem certeza?" }),
|
|
2557
2563
|
/* @__PURE__ */ jsx(
|
|
2558
2564
|
Button,
|
|
@@ -2589,7 +2595,7 @@ function RoomManagementPanel({
|
|
|
2589
2595
|
] }, i)) : members.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-xs text-theme-muted text-center py-8", children: "Sem membros" }) : members.map((member) => /* @__PURE__ */ jsxs(
|
|
2590
2596
|
"div",
|
|
2591
2597
|
{
|
|
2592
|
-
className: "flex items-center gap-3 p-2 rounded-
|
|
2598
|
+
className: "flex items-center gap-3 p-2 rounded-xl hover:bg-theme-subtle group transition-colors",
|
|
2593
2599
|
children: [
|
|
2594
2600
|
/* @__PURE__ */ jsx(Avatar, { shape: "circle", size: "sm", className: "h-8 w-8", children: /* @__PURE__ */ jsx(AvatarFallback, { className: "bg-primary/20 text-primary-light text-xs", children: getInitials4(member.displayName || member.userId.substring(0, 8)) }) }),
|
|
2595
2601
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
@@ -2676,7 +2682,7 @@ function RoomManagementPanel({
|
|
|
2676
2682
|
type: "button",
|
|
2677
2683
|
onClick: () => setEditVisibility("WORKSPACE"),
|
|
2678
2684
|
className: cn(
|
|
2679
|
-
"flex-1 flex items-center gap-2 px-3 py-2 rounded-
|
|
2685
|
+
"flex-1 flex items-center gap-2 px-3 py-2 rounded-xl text-xs transition-all duration-[400ms] border",
|
|
2680
2686
|
editVisibility === "WORKSPACE" ? "bg-primary/15 border-primary/30 text-primary-light" : "bg-theme-subtle border-theme-subtle text-theme-muted hover:bg-theme-subtle"
|
|
2681
2687
|
),
|
|
2682
2688
|
children: [
|
|
@@ -2691,7 +2697,7 @@ function RoomManagementPanel({
|
|
|
2691
2697
|
type: "button",
|
|
2692
2698
|
onClick: () => setEditVisibility("PRIVATE"),
|
|
2693
2699
|
className: cn(
|
|
2694
|
-
"flex-1 flex items-center gap-2 px-3 py-2 rounded-
|
|
2700
|
+
"flex-1 flex items-center gap-2 px-3 py-2 rounded-xl text-xs transition-all duration-[400ms] border",
|
|
2695
2701
|
editVisibility === "PRIVATE" ? "bg-primary/15 border-primary/30 text-primary-light" : "bg-theme-subtle border-theme-subtle text-theme-muted hover:bg-theme-subtle"
|
|
2696
2702
|
),
|
|
2697
2703
|
children: [
|
|
@@ -2793,7 +2799,7 @@ function useChat(options = {}) {
|
|
|
2793
2799
|
[centralGql]
|
|
2794
2800
|
);
|
|
2795
2801
|
const [userCache, setUserCache] = useState(/* @__PURE__ */ new Map());
|
|
2796
|
-
const enrichedMessages =
|
|
2802
|
+
const enrichedMessages = React6__default.useMemo(() => {
|
|
2797
2803
|
return messages.map((msg) => {
|
|
2798
2804
|
const cached = userCache.get(msg.authorId);
|
|
2799
2805
|
if (cached && !msg.authorName) {
|
|
@@ -3614,14 +3620,14 @@ function useChat(options = {}) {
|
|
|
3614
3620
|
};
|
|
3615
3621
|
}
|
|
3616
3622
|
var alertVariants = cva(
|
|
3617
|
-
"
|
|
3623
|
+
"relative flex w-full items-start gap-4 backdrop-blur-xl border px-5 py-4 transition-all duration-300 rounded-2xl shadow-2xl bg-white dark:bg-gray-900",
|
|
3618
3624
|
{
|
|
3619
3625
|
variants: {
|
|
3620
3626
|
variant: {
|
|
3621
|
-
success: "border-
|
|
3622
|
-
error: "border-
|
|
3623
|
-
warning: "border-
|
|
3624
|
-
info: "border-
|
|
3627
|
+
success: "border-emerald-200 dark:border-emerald-800/50",
|
|
3628
|
+
error: "border-rose-200 dark:border-rose-800/50",
|
|
3629
|
+
warning: "border-amber-200 dark:border-amber-800/50",
|
|
3630
|
+
info: "border-blue-200 dark:border-blue-800/50"
|
|
3625
3631
|
}
|
|
3626
3632
|
},
|
|
3627
3633
|
defaultVariants: {
|
|
@@ -3630,14 +3636,14 @@ var alertVariants = cva(
|
|
|
3630
3636
|
}
|
|
3631
3637
|
);
|
|
3632
3638
|
var alertIconVariants = cva(
|
|
3633
|
-
"
|
|
3639
|
+
"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full",
|
|
3634
3640
|
{
|
|
3635
3641
|
variants: {
|
|
3636
3642
|
variant: {
|
|
3637
|
-
success: "bg-emerald-
|
|
3638
|
-
error: "bg-rose-
|
|
3639
|
-
warning: "bg-amber-
|
|
3640
|
-
info: "bg-blue-
|
|
3643
|
+
success: "bg-emerald-100 text-emerald-600 dark:bg-emerald-600/20 dark:text-emerald-400",
|
|
3644
|
+
error: "bg-rose-100 text-rose-600 dark:bg-rose-600/20 dark:text-rose-400",
|
|
3645
|
+
warning: "bg-amber-100 text-amber-600 dark:bg-amber-600/20 dark:text-amber-400",
|
|
3646
|
+
info: "bg-blue-100 text-blue-600 dark:bg-blue-600/20 dark:text-blue-400"
|
|
3641
3647
|
}
|
|
3642
3648
|
},
|
|
3643
3649
|
defaultVariants: {
|
|
@@ -3662,38 +3668,27 @@ function Alert({
|
|
|
3662
3668
|
variant === "warning" && /* @__PURE__ */ jsx(OrgWarning, { className: "w-5 h-5" }),
|
|
3663
3669
|
variant === "info" && /* @__PURE__ */ jsx(OrgInfo, { className: "w-5 h-5" })
|
|
3664
3670
|
] }) }),
|
|
3665
|
-
/* @__PURE__ */
|
|
3666
|
-
|
|
3667
|
-
/* @__PURE__ */
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
onClose && /* @__PURE__ */ jsx(
|
|
3687
|
-
"button",
|
|
3688
|
-
{
|
|
3689
|
-
onClick: onClose,
|
|
3690
|
-
className: "p-1 text-org-text-muted transition-colors hover:text-org-text",
|
|
3691
|
-
"aria-label": "Close alert",
|
|
3692
|
-
children: /* @__PURE__ */ jsx(OrgClose, { className: "h-4 w-4" })
|
|
3693
|
-
}
|
|
3694
|
-
)
|
|
3695
|
-
] })
|
|
3696
|
-
] })
|
|
3671
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
3672
|
+
/* @__PURE__ */ jsx("h4", { className: "text-sm font-semibold text-gray-900 dark:text-white mb-1 leading-tight", children: title }),
|
|
3673
|
+
description && /* @__PURE__ */ jsx("p", { className: "text-sm text-gray-500 dark:text-gray-400 leading-relaxed", children: description }),
|
|
3674
|
+
action && /* @__PURE__ */ jsx(
|
|
3675
|
+
"button",
|
|
3676
|
+
{
|
|
3677
|
+
onClick: action.onClick,
|
|
3678
|
+
className: "mt-3 px-4 py-2 text-sm font-medium text-white bg-primary hover:bg-primary/90 rounded-lg transition-colors",
|
|
3679
|
+
children: action.label
|
|
3680
|
+
}
|
|
3681
|
+
)
|
|
3682
|
+
] }),
|
|
3683
|
+
onClose && /* @__PURE__ */ jsx(
|
|
3684
|
+
"button",
|
|
3685
|
+
{
|
|
3686
|
+
onClick: onClose,
|
|
3687
|
+
className: "absolute top-4 right-4 flex-shrink-0 p-1 text-gray-400 dark:text-gray-500 transition-colors hover:text-gray-600 dark:hover:text-gray-300",
|
|
3688
|
+
"aria-label": "Close alert",
|
|
3689
|
+
children: /* @__PURE__ */ jsx(OrgClose, { className: "h-4 w-4" })
|
|
3690
|
+
}
|
|
3691
|
+
)
|
|
3697
3692
|
] });
|
|
3698
3693
|
}
|
|
3699
3694
|
|
|
@@ -3923,8 +3918,8 @@ if (typeof window !== "undefined") {
|
|
|
3923
3918
|
typingIndicator.simulateRandomTyping();
|
|
3924
3919
|
}
|
|
3925
3920
|
function useMediaQuery2(query) {
|
|
3926
|
-
const [matches, setMatches] =
|
|
3927
|
-
|
|
3921
|
+
const [matches, setMatches] = React6.useState(false);
|
|
3922
|
+
React6.useEffect(() => {
|
|
3928
3923
|
const mql = window.matchMedia(query);
|
|
3929
3924
|
setMatches(mql.matches);
|
|
3930
3925
|
const handler = (e) => setMatches(e.matches);
|
|
@@ -3942,7 +3937,7 @@ function OrganifyChat({
|
|
|
3942
3937
|
}) {
|
|
3943
3938
|
const user = useOrganifyUser();
|
|
3944
3939
|
const userId = user?.id ?? "";
|
|
3945
|
-
const stableWorkspaceMembers =
|
|
3940
|
+
const stableWorkspaceMembers = React6.useMemo(
|
|
3946
3941
|
() => workspaceMembers ?? [],
|
|
3947
3942
|
[workspaceMembers]
|
|
3948
3943
|
);
|
|
@@ -3953,10 +3948,10 @@ function OrganifyChat({
|
|
|
3953
3948
|
workspaceMembers: stableWorkspaceMembers
|
|
3954
3949
|
});
|
|
3955
3950
|
const isMobile = !useMediaQuery2("(min-width: 768px)");
|
|
3956
|
-
const [createDialogOpen, setCreateDialogOpen] =
|
|
3957
|
-
const [managementOpen, setManagementOpen] =
|
|
3958
|
-
const [mobileView, setMobileView] =
|
|
3959
|
-
const activeRoom =
|
|
3951
|
+
const [createDialogOpen, setCreateDialogOpen] = React6.useState(false);
|
|
3952
|
+
const [managementOpen, setManagementOpen] = React6.useState(false);
|
|
3953
|
+
const [mobileView, setMobileView] = React6.useState("sidebar");
|
|
3954
|
+
const activeRoom = React6.useMemo(
|
|
3960
3955
|
() => chat.rooms.find((r) => r.id === chat.activeRoomId),
|
|
3961
3956
|
[chat.rooms, chat.activeRoomId]
|
|
3962
3957
|
);
|
|
@@ -3988,7 +3983,7 @@ function OrganifyChat({
|
|
|
3988
3983
|
{
|
|
3989
3984
|
className: cn(
|
|
3990
3985
|
"relative flex h-full min-h-[500px]",
|
|
3991
|
-
"bg-theme-surface border border-theme-subtle rounded-
|
|
3986
|
+
"bg-theme-surface border border-theme-subtle rounded-xl overflow-hidden",
|
|
3992
3987
|
className
|
|
3993
3988
|
),
|
|
3994
3989
|
children: [
|
|
@@ -4096,7 +4091,7 @@ function OrganifyChat({
|
|
|
4096
4091
|
onClick: handleCloseManagement
|
|
4097
4092
|
}
|
|
4098
4093
|
),
|
|
4099
|
-
/* @__PURE__ */ jsx("div", { className: "w-[85%] max-w-sm h-full bg-
|
|
4094
|
+
/* @__PURE__ */ jsx("div", { className: "w-[85%] max-w-sm h-full bg-white/[0.03] backdrop-blur-[40px] border-l border-white/10 animate-in slide-in-from-right-5 duration-[400ms]", children: /* @__PURE__ */ jsx(
|
|
4100
4095
|
RoomManagementPanel,
|
|
4101
4096
|
{
|
|
4102
4097
|
room: activeRoom,
|
|
@@ -4143,5 +4138,5 @@ function OrganifyChat({
|
|
|
4143
4138
|
}
|
|
4144
4139
|
|
|
4145
4140
|
export { Alert, Button, ChatMessages, ChatSidebar, CreateRoomDialog, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, Input, Label, MOCK_PROJECTS, MOCK_USERS, MentionPopover, MessageBubble, MessageInput, 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, useChat };
|
|
4146
|
-
//# sourceMappingURL=chunk-
|
|
4147
|
-
//# sourceMappingURL=chunk-
|
|
4141
|
+
//# sourceMappingURL=chunk-GQZMW7XN.js.map
|
|
4142
|
+
//# sourceMappingURL=chunk-GQZMW7XN.js.map
|