@nebutra/ui 2.0.0 → 3.0.0
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/{canonical-Bf4czR2u.d.ts → canonical-DEhT4VfS.d.ts} +71 -120
- package/dist/card-DunB1gKE.d.ts +105 -0
- package/dist/components/index.d.ts +33 -4
- package/dist/components/index.js +225 -89
- package/dist/components/index.js.map +1 -1
- package/dist/editorial/index.d.ts +2 -2
- package/dist/editorial/index.js +75 -1
- package/dist/editorial/index.js.map +1 -1
- package/dist/empty-state-bmfHCOuN.d.ts +86 -0
- package/dist/hooks/index.d.ts +18 -1
- package/dist/hooks/index.js +120 -5
- package/dist/hooks/index.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/layout/index.d.ts +17 -58
- package/dist/layout/index.js +366 -126
- package/dist/layout/index.js.map +1 -1
- package/dist/layouts/index.d.ts +1 -1
- package/dist/layouts/index.js +89 -15
- package/dist/layouts/index.js.map +1 -1
- package/dist/patterns/index.d.ts +38 -44
- package/dist/patterns/index.js +470 -278
- package/dist/patterns/index.js.map +1 -1
- package/dist/primitives/canonical.d.ts +3 -1
- package/dist/primitives/canonical.js +495 -231
- package/dist/primitives/canonical.js.map +1 -1
- package/dist/primitives/index.d.ts +90 -62
- package/dist/primitives/index.js +1129 -1185
- package/dist/primitives/index.js.map +1 -1
- package/dist/tailwind.preset.d.ts +32 -32
- package/dist/tailwind.preset.js +24 -20
- package/dist/tailwind.preset.js.map +1 -1
- package/dist/theme/index.d.ts +1 -110
- package/dist/typography/fonts.css +8 -16
- package/dist/typography/index.d.ts +29 -45
- package/dist/typography/index.js +26 -14
- package/dist/typography/index.js.map +1 -1
- package/dist/utils/index.d.ts +18 -12
- package/dist/utils/index.js +94 -18
- package/dist/utils/index.js.map +1 -1
- package/package.json +6 -10
- package/src/typography/fonts.css +8 -16
- package/dist/styles/brand-override.css +0 -61
- package/src/styles/brand-override.css +0 -61
package/dist/components/index.js
CHANGED
|
@@ -8,8 +8,9 @@ import { Dialog as Dialog$1 } from '@base-ui/react/dialog';
|
|
|
8
8
|
import * as React5 from 'react';
|
|
9
9
|
import React5__default, { useEffectEvent, useId, useState } from 'react';
|
|
10
10
|
import { colors, brandSpring, flow, emerge } from '@nebutra/brand';
|
|
11
|
+
import { tokenColor, fontStack } from '@nebutra/tokens/values';
|
|
11
12
|
import { clsx } from 'clsx';
|
|
12
|
-
import {
|
|
13
|
+
import { extendTailwindMerge } from 'tailwind-merge';
|
|
13
14
|
import { cva } from 'class-variance-authority';
|
|
14
15
|
import { Tooltip as Tooltip$1 } from '@base-ui/react/tooltip';
|
|
15
16
|
import { useAsciiText, slant } from 'react-ascii-text';
|
|
@@ -218,7 +219,7 @@ function PageTransition({ children, ...props }) {
|
|
|
218
219
|
return /* @__PURE__ */ jsx(motion.div, { initial: "initial", animate: "animate", exit: "exit", variants, ...props, children });
|
|
219
220
|
}
|
|
220
221
|
({
|
|
221
|
-
// Nebutra Blue (云毓蓝) — technology & trust
|
|
222
|
+
// Nebutra Blue (云毓蓝) — technology & trust
|
|
222
223
|
blue50: colors.primary[50],
|
|
223
224
|
blue100: colors.primary[100],
|
|
224
225
|
blue200: colors.primary[200],
|
|
@@ -231,7 +232,7 @@ function PageTransition({ children, ...props }) {
|
|
|
231
232
|
blue800: colors.primary[800],
|
|
232
233
|
blue900: colors.primary[900],
|
|
233
234
|
blue950: colors.primary[950],
|
|
234
|
-
// Nebutra Cyan (云毓青) — data flow & intelligence
|
|
235
|
+
// Nebutra Cyan (云毓青) — data flow & intelligence
|
|
235
236
|
cyan50: colors.accent[50],
|
|
236
237
|
cyan100: colors.accent[100],
|
|
237
238
|
cyan200: colors.accent[200],
|
|
@@ -256,6 +257,13 @@ function PageTransition({ children, ...props }) {
|
|
|
256
257
|
neutral800: colors.neutral[800],
|
|
257
258
|
neutral900: colors.neutral[900],
|
|
258
259
|
neutral950: colors.neutral[950],
|
|
260
|
+
// deepest — used as dark background
|
|
261
|
+
// Semantic raw colors — VI §Color Specifications. The 500s are the status
|
|
262
|
+
// tokens; the 600 hover steps have no token of their own.
|
|
263
|
+
// NOTE: info = brand blue, not sky/teal
|
|
264
|
+
red500: tokenColor("--status-danger"),
|
|
265
|
+
green500: tokenColor("--status-success"),
|
|
266
|
+
amber500: tokenColor("--status-warning"),
|
|
259
267
|
white: colors.white,
|
|
260
268
|
black: colors.black
|
|
261
269
|
});
|
|
@@ -291,12 +299,23 @@ var primitiveFontSize = {
|
|
|
291
299
|
xs: 12,
|
|
292
300
|
sm: 14,
|
|
293
301
|
base: 16};
|
|
302
|
+
({
|
|
303
|
+
/** Default body/UI stack — Geist with CJK falling through to MiSans */
|
|
304
|
+
sans: fontStack("--font-sans"),
|
|
305
|
+
/** CJK-locale stack (same order as sans, minus Latin-only system faces) */
|
|
306
|
+
cnSans: fontStack("--font-cn"),
|
|
307
|
+
/** Display / hero headlines */
|
|
308
|
+
display: fontStack("--font-display"),
|
|
309
|
+
/** Headings */
|
|
310
|
+
heading: fontStack("--font-heading"),
|
|
311
|
+
/** Code / monospace */
|
|
312
|
+
mono: fontStack("--font-mono")
|
|
313
|
+
});
|
|
294
314
|
|
|
295
315
|
// src/tokens/shadows.ts
|
|
296
316
|
var shadowClasses = {
|
|
297
317
|
md: "shadow-md",
|
|
298
|
-
xl: "shadow-xl"
|
|
299
|
-
"2xl": "shadow-2xl"};
|
|
318
|
+
xl: "shadow-xl"};
|
|
300
319
|
|
|
301
320
|
// src/tokens/components/overlay.ts
|
|
302
321
|
var overlayFocusRingClassName = "outline-none";
|
|
@@ -307,34 +326,111 @@ var overlayZIndex = {
|
|
|
307
326
|
tooltip: 1070
|
|
308
327
|
};
|
|
309
328
|
var overlayClassNames = {
|
|
310
|
-
backdrop:
|
|
329
|
+
backdrop: (
|
|
330
|
+
// allow-palette: dialog backdrop dims arbitrary app content behind it, must stay dark in both themes
|
|
331
|
+
"fixed inset-0 bg-black/40 transition-[opacity] duration-[var(--motion-duration-flow)] ease-[var(--ease-brand)] data-ending-style:opacity-0 data-starting-style:opacity-0 data-ending-style:duration-[var(--motion-duration-micro)] motion-reduce:transition-none"
|
|
332
|
+
),
|
|
311
333
|
modalSurface: [
|
|
312
334
|
"fixed left-1/2 top-1/2 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4",
|
|
313
|
-
"
|
|
335
|
+
"bg-background p-6 text-foreground",
|
|
314
336
|
"rounded-[var(--radius-xl)]",
|
|
315
|
-
|
|
337
|
+
"shadow-[0_0_0_1px_var(--edge-soft),var(--elevation-overlay)]",
|
|
316
338
|
"outline-none",
|
|
317
|
-
"transition-[opacity,transform
|
|
318
|
-
"data-starting-style:scale-95 data-starting-style:opacity-0 data-ending-style:scale-95 data-ending-style:opacity-0",
|
|
339
|
+
"transition-[opacity,transform] duration-[var(--motion-duration-flow)] ease-[var(--ease-brand)]",
|
|
340
|
+
"data-starting-style:scale-95 data-starting-style:opacity-0 data-ending-style:scale-95 data-ending-style:opacity-0 data-ending-style:duration-[var(--motion-duration-micro)]",
|
|
319
341
|
"motion-reduce:transition-none motion-reduce:data-starting-style:transform-none motion-reduce:data-ending-style:transform-none"
|
|
320
342
|
].join(" "),
|
|
321
343
|
popoverSurface: [
|
|
322
344
|
"w-72 origin-[var(--transform-origin)] rounded-[var(--radius-lg)] border border-border/70 bg-popover/95 p-4 text-popover-foreground backdrop-blur-md",
|
|
323
345
|
shadowClasses.xl,
|
|
324
|
-
"outline-none transition-[opacity,transform
|
|
325
|
-
"data-[open]:opacity-100 data-[closed]:opacity-0 data-[closed]:scale-[0.97] data-[open]:scale-100",
|
|
346
|
+
"outline-none transition-[opacity,transform] duration-[var(--motion-duration-flow)] ease-[var(--ease-brand)]",
|
|
347
|
+
"data-[open]:opacity-100 data-[closed]:opacity-0 data-[closed]:scale-[0.97] data-[open]:scale-100 data-[closed]:duration-[var(--motion-duration-micro)]",
|
|
326
348
|
"motion-reduce:transition-none motion-reduce:data-[closed]:transform-none motion-reduce:data-[open]:transform-none"
|
|
327
349
|
].join(" "),
|
|
328
350
|
tooltipSurface: [
|
|
329
351
|
"origin-[var(--transform-origin)] overflow-hidden rounded-[var(--radius-md)] border border-border/70 bg-popover/95 px-3 py-1.5 text-sm text-popover-foreground backdrop-blur-md",
|
|
330
352
|
shadowClasses.md,
|
|
331
|
-
"transition-[opacity,transform
|
|
332
|
-
"data-starting-style:scale-[0.97] data-starting-style:opacity-0 data-ending-style:scale-[0.97] data-ending-style:opacity-0",
|
|
353
|
+
"transition-[opacity,transform] duration-[var(--motion-duration-flow)] ease-[var(--ease-brand)]",
|
|
354
|
+
"data-starting-style:scale-[0.97] data-starting-style:opacity-0 data-ending-style:scale-[0.97] data-ending-style:opacity-0 data-ending-style:duration-[var(--motion-duration-micro)]",
|
|
333
355
|
"data-[instant]:duration-0",
|
|
334
356
|
"motion-reduce:transition-none motion-reduce:data-starting-style:transform-none motion-reduce:data-ending-style:transform-none"
|
|
335
357
|
].join(" "),
|
|
336
358
|
closeButton: `absolute right-4 top-4 rounded-[var(--radius-sm)] opacity-70 ring-offset-background ${overlayFocusRingClassName} transition-opacity duration-[var(--motion-duration-micro)] ease-[var(--ease-brand)] hover:opacity-100 disabled:pointer-events-none data-[open]:bg-accent data-[open]:text-muted-foreground motion-reduce:transition-none`
|
|
337
359
|
};
|
|
360
|
+
|
|
361
|
+
// src/utils/tw-merge-theme.generated.ts
|
|
362
|
+
var TW_MERGE_THEME = {
|
|
363
|
+
breakpoint: ["3xl", "shell", "tight", "xs"],
|
|
364
|
+
container: ["content", "text", "wide"],
|
|
365
|
+
ease: ["brand", "in", "in-out", "out", "spring"],
|
|
366
|
+
font: ["cn", "display", "heading", "mono", "sans"],
|
|
367
|
+
leading: ["display", "heading"],
|
|
368
|
+
radius: ["2xl", "3xl", "button", "card", "full", "lg", "md", "none", "panel", "sm", "xl", "xs"],
|
|
369
|
+
shadow: [
|
|
370
|
+
"2xl",
|
|
371
|
+
"ambient-glow",
|
|
372
|
+
"ambient-lg",
|
|
373
|
+
"ambient-md",
|
|
374
|
+
"ambient-sm",
|
|
375
|
+
"brand",
|
|
376
|
+
"brand-lg",
|
|
377
|
+
"glass-lg",
|
|
378
|
+
"glass-md",
|
|
379
|
+
"glass-sm",
|
|
380
|
+
"glow-accent",
|
|
381
|
+
"glow-accent-lg",
|
|
382
|
+
"glow-accent-sm",
|
|
383
|
+
"glow-primary",
|
|
384
|
+
"lg",
|
|
385
|
+
"md",
|
|
386
|
+
"sheen",
|
|
387
|
+
"sm",
|
|
388
|
+
"xl",
|
|
389
|
+
"xs"
|
|
390
|
+
],
|
|
391
|
+
text: [
|
|
392
|
+
"2xl",
|
|
393
|
+
"2xs",
|
|
394
|
+
"3xl",
|
|
395
|
+
"4xl",
|
|
396
|
+
"5xl",
|
|
397
|
+
"6xl",
|
|
398
|
+
"7xl",
|
|
399
|
+
"8xl",
|
|
400
|
+
"9xl",
|
|
401
|
+
"base",
|
|
402
|
+
"body",
|
|
403
|
+
"display",
|
|
404
|
+
"label",
|
|
405
|
+
"lg",
|
|
406
|
+
"meta",
|
|
407
|
+
"sm",
|
|
408
|
+
"ui",
|
|
409
|
+
"xl",
|
|
410
|
+
"xs"
|
|
411
|
+
],
|
|
412
|
+
tracking: ["display", "heading", "label", "tight"]
|
|
413
|
+
};
|
|
414
|
+
var TW_MERGE_CLASS_GROUPS = {
|
|
415
|
+
duration: [{ duration: ["cinematic", "flow", "micro", "reveal"] }]
|
|
416
|
+
};
|
|
417
|
+
|
|
418
|
+
// src/utils/cn.ts
|
|
419
|
+
var twMerge = extendTailwindMerge({
|
|
420
|
+
extend: {
|
|
421
|
+
theme: Object.fromEntries(
|
|
422
|
+
Object.entries(TW_MERGE_THEME).map(([key, values]) => [key, [...values]])
|
|
423
|
+
),
|
|
424
|
+
classGroups: Object.fromEntries(
|
|
425
|
+
Object.entries(TW_MERGE_CLASS_GROUPS).map(([key, groups]) => [
|
|
426
|
+
key,
|
|
427
|
+
groups.map(
|
|
428
|
+
(group) => Object.fromEntries(Object.entries(group).map(([k, v]) => [k, [...v]]))
|
|
429
|
+
)
|
|
430
|
+
])
|
|
431
|
+
)
|
|
432
|
+
}
|
|
433
|
+
});
|
|
338
434
|
function cn(...inputs) {
|
|
339
435
|
return twMerge(clsx(inputs));
|
|
340
436
|
}
|
|
@@ -513,8 +609,8 @@ function PromptAttachmentPreviews({
|
|
|
513
609
|
event.stopPropagation();
|
|
514
610
|
onRemove(file);
|
|
515
611
|
},
|
|
516
|
-
className: "absolute top-1 right-1 rounded-full bg-
|
|
517
|
-
children: /* @__PURE__ */ jsx(Cross, { className: "h-3 w-3 text-
|
|
612
|
+
className: "absolute top-1 right-1 rounded-full bg-foreground/70 p-0.5 opacity-100 transition-opacity motion-reduce:transition-none",
|
|
613
|
+
children: /* @__PURE__ */ jsx(Cross, { className: "h-3 w-3 text-background" })
|
|
518
614
|
}
|
|
519
615
|
)
|
|
520
616
|
] }) }, previewKey);
|
|
@@ -557,7 +653,11 @@ var buttonVariants = cva(
|
|
|
557
653
|
"inline-flex items-center justify-center gap-2 whitespace-nowrap",
|
|
558
654
|
"rounded-[var(--btn-default-radius,var(--radius-md))]",
|
|
559
655
|
"text-[length:var(--control-font-size-md,0.875rem)] font-[number:var(--font-weight-medium,500)]",
|
|
560
|
-
|
|
656
|
+
// `transform` is in the property list on purpose: without it the
|
|
657
|
+
// active:scale-[0.97] press snapped instantly and the button felt dead
|
|
658
|
+
// under the finger. Duration/ease stay on the flow rail — motion
|
|
659
|
+
// governance pins them (primitives/__tests__/motion-governance.test.ts).
|
|
660
|
+
"transition-[color,background-color,border-color,box-shadow,transform] duration-flow ease-[var(--ease-brand)]",
|
|
561
661
|
"active:scale-[0.97] motion-reduce:active:scale-100 motion-reduce:transition-none",
|
|
562
662
|
"disabled:pointer-events-none disabled:opacity-50",
|
|
563
663
|
"aria-busy:cursor-wait"
|
|
@@ -567,7 +667,7 @@ var buttonVariants = cva(
|
|
|
567
667
|
variant: {
|
|
568
668
|
// Recipe-driven via packages/design/tokens/recipe.css (.btn-brand-default)
|
|
569
669
|
default: "btn-brand-default",
|
|
570
|
-
ink: "bg-
|
|
670
|
+
ink: "bg-neutral-12 text-neutral-1 ring-1 ring-inset ring-neutral-1/5 hover:bg-neutral-11 hover:-translate-y-px active:translate-y-0 transition-[transform,background-color] duration-micro",
|
|
571
671
|
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
572
672
|
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
573
673
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
@@ -831,7 +931,7 @@ var formControlInvalidClassNames = {
|
|
|
831
931
|
input: "aria-invalid:border-destructive/60 aria-invalid:focus:border-destructive aria-invalid:focus:ring-destructive/20",
|
|
832
932
|
textarea: "aria-invalid:border-destructive/60 aria-invalid:focus:border-destructive aria-invalid:focus:ring-destructive/20"};
|
|
833
933
|
var fieldMessageClassName = "text-xs text-muted-foreground";
|
|
834
|
-
var fieldErrorClassName = "text-xs font-medium text-destructive";
|
|
934
|
+
var fieldErrorClassName = "text-xs font-medium text-destructive-strong";
|
|
835
935
|
function getTextareaStyle(size, style) {
|
|
836
936
|
const token = textareaTokens.sizes[size];
|
|
837
937
|
return {
|
|
@@ -866,6 +966,7 @@ var Textarea = ({
|
|
|
866
966
|
description,
|
|
867
967
|
error,
|
|
868
968
|
fieldClassName,
|
|
969
|
+
tone = "bordered",
|
|
869
970
|
id,
|
|
870
971
|
onChange,
|
|
871
972
|
onValueChange,
|
|
@@ -891,10 +992,10 @@ var Textarea = ({
|
|
|
891
992
|
"textarea",
|
|
892
993
|
{
|
|
893
994
|
className: cn(
|
|
894
|
-
"flex min-h-[var(--textarea-min-height)] w-full resize-y rounded-[var(--textarea-radius)]
|
|
895
|
-
"px-[var(--textarea-padding-x)] py-[var(--textarea-padding-y)] text-[length:var(--textarea-font-size)] text-foreground
|
|
995
|
+
"flex min-h-[var(--textarea-min-height)] w-full resize-y rounded-[var(--textarea-radius)]",
|
|
996
|
+
"px-[var(--textarea-padding-x)] py-[var(--textarea-padding-y)] text-[length:var(--textarea-font-size)] text-foreground",
|
|
896
997
|
"transition-[background-color,border-color,box-shadow,color] duration-micro ease-out placeholder:text-muted-foreground",
|
|
897
|
-
formControlFocusClassNames.textarea,
|
|
998
|
+
tone === "bordered" ? `border border-input bg-background ${formControlFocusClassNames.textarea}` : "border-0 bg-transparent shadow-none",
|
|
898
999
|
"disabled:cursor-not-allowed disabled:opacity-50 read-only:cursor-default read-only:bg-muted/70",
|
|
899
1000
|
formControlInvalidClassNames.textarea,
|
|
900
1001
|
className
|
|
@@ -934,8 +1035,18 @@ var Textarea = ({
|
|
|
934
1035
|
);
|
|
935
1036
|
};
|
|
936
1037
|
Textarea.displayName = "Textarea";
|
|
937
|
-
|
|
938
|
-
|
|
1038
|
+
|
|
1039
|
+
// src/tokens/components/interaction.ts
|
|
1040
|
+
var interaction = {
|
|
1041
|
+
/**
|
|
1042
|
+
* Tooltips. The first one waits so a sweeping pointer does not strobe;
|
|
1043
|
+
* once one is open, its neighbours open instantly if the pointer arrives
|
|
1044
|
+
* within the skip window. Radix Tooltip defaults: delayDuration 700,
|
|
1045
|
+
* skipDelayDuration 300. Vercel/Kowalski: "delay the first tooltip only".
|
|
1046
|
+
*/
|
|
1047
|
+
tooltip: { delayMs: 700, skipWindowMs: 300 }};
|
|
1048
|
+
var DEFAULT_TOOLTIP_DELAY_MS = interaction.tooltip.delayMs;
|
|
1049
|
+
var SKIP_DELAY_WINDOW_MS = interaction.tooltip.skipWindowMs;
|
|
939
1050
|
var lastTooltipOpenAt = 0;
|
|
940
1051
|
var skipDelayListeners = /* @__PURE__ */ new Set();
|
|
941
1052
|
function markTooltipOpened() {
|
|
@@ -1066,13 +1177,13 @@ var VoiceRecorder = ({
|
|
|
1066
1177
|
),
|
|
1067
1178
|
children: [
|
|
1068
1179
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mb-3", children: [
|
|
1069
|
-
/* @__PURE__ */ jsx("div", { className: "h-2 w-2 rounded-full bg-
|
|
1070
|
-
/* @__PURE__ */ jsx("span", { className: "font-mono text-sm text-
|
|
1180
|
+
/* @__PURE__ */ jsx("div", { className: "h-2 w-2 rounded-full bg-destructive animate-pulse" }),
|
|
1181
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono text-sm text-muted-foreground", children: formatRecordingTime(time) })
|
|
1071
1182
|
] }),
|
|
1072
1183
|
/* @__PURE__ */ jsx("div", { className: "w-full h-10 flex items-center justify-center gap-0.5 px-4", children: barStyles.map((bar) => /* @__PURE__ */ jsx(
|
|
1073
1184
|
"div",
|
|
1074
1185
|
{
|
|
1075
|
-
className: "w-0.5 rounded-full bg-
|
|
1186
|
+
className: "w-0.5 rounded-full bg-foreground/50 animate-pulse",
|
|
1076
1187
|
style: {
|
|
1077
1188
|
height: bar.height,
|
|
1078
1189
|
animationDelay: bar.animationDelay,
|
|
@@ -1166,7 +1277,8 @@ var PromptInputTextarea = ({ className, onKeyDown, disableAutosize = false, plac
|
|
|
1166
1277
|
onKeyDown: handleKeyDown,
|
|
1167
1278
|
rows: 1,
|
|
1168
1279
|
style: { "--textarea-min-height": "2rem", ...style },
|
|
1169
|
-
|
|
1280
|
+
tone: "bare",
|
|
1281
|
+
className: cn("resize-none", className),
|
|
1170
1282
|
disabled,
|
|
1171
1283
|
placeholder,
|
|
1172
1284
|
...props
|
|
@@ -1207,14 +1319,14 @@ var promptModeToneClassName = {
|
|
|
1207
1319
|
label: "text-info"
|
|
1208
1320
|
},
|
|
1209
1321
|
think: {
|
|
1210
|
-
active: "bg-
|
|
1211
|
-
icon: "text-
|
|
1212
|
-
label: "text-
|
|
1322
|
+
active: "bg-cyan-9/15 border-cyan-9 text-cyan-9",
|
|
1323
|
+
icon: "text-cyan-9",
|
|
1324
|
+
label: "text-cyan-9"
|
|
1213
1325
|
},
|
|
1214
1326
|
canvas: {
|
|
1215
|
-
active: "bg-warning/15 border-warning text-warning",
|
|
1216
|
-
icon: "text-warning",
|
|
1217
|
-
label: "text-warning"
|
|
1327
|
+
active: "bg-warning/15 border-warning text-warning-strong",
|
|
1328
|
+
icon: "text-warning-strong",
|
|
1329
|
+
label: "text-warning-strong"
|
|
1218
1330
|
}
|
|
1219
1331
|
};
|
|
1220
1332
|
function PromptModeIcon({ tone, active }) {
|
|
@@ -1278,7 +1390,8 @@ function PromptModeActions({
|
|
|
1278
1390
|
modes,
|
|
1279
1391
|
onToggleMode,
|
|
1280
1392
|
onToggleCanvas,
|
|
1281
|
-
onProcessFile
|
|
1393
|
+
onProcessFile,
|
|
1394
|
+
labels
|
|
1282
1395
|
}) {
|
|
1283
1396
|
return /* @__PURE__ */ jsxs(
|
|
1284
1397
|
"div",
|
|
@@ -1288,11 +1401,11 @@ function PromptModeActions({
|
|
|
1288
1401
|
isRecording ? "opacity-0 invisible h-0" : "opacity-100 visible"
|
|
1289
1402
|
),
|
|
1290
1403
|
children: [
|
|
1291
|
-
/* @__PURE__ */ jsx(PromptInputAction, { tooltip:
|
|
1404
|
+
/* @__PURE__ */ jsx(PromptInputAction, { tooltip: labels.upload, children: /* @__PURE__ */ jsx(
|
|
1292
1405
|
"button",
|
|
1293
1406
|
{
|
|
1294
1407
|
type: "button",
|
|
1295
|
-
"aria-label":
|
|
1408
|
+
"aria-label": labels.upload,
|
|
1296
1409
|
onClick: () => uploadInputRef.current?.click(),
|
|
1297
1410
|
className: "flex h-8 w-8 text-muted-foreground cursor-pointer items-center justify-center rounded-full transition-colors hover:bg-accent hover:text-foreground",
|
|
1298
1411
|
disabled: isRecording,
|
|
@@ -1310,8 +1423,7 @@ function PromptModeActions({
|
|
|
1310
1423
|
if (file) onProcessFile(file);
|
|
1311
1424
|
if (event.target) event.target.value = "";
|
|
1312
1425
|
},
|
|
1313
|
-
accept: "image/*"
|
|
1314
|
-
"aria-label": "Upload image"
|
|
1426
|
+
accept: "image/*"
|
|
1315
1427
|
}
|
|
1316
1428
|
),
|
|
1317
1429
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
@@ -1319,7 +1431,7 @@ function PromptModeActions({
|
|
|
1319
1431
|
PromptModeButton,
|
|
1320
1432
|
{
|
|
1321
1433
|
active: modes.search,
|
|
1322
|
-
label:
|
|
1434
|
+
label: labels.search,
|
|
1323
1435
|
tone: "search",
|
|
1324
1436
|
onClick: () => onToggleMode("search")
|
|
1325
1437
|
}
|
|
@@ -1329,7 +1441,7 @@ function PromptModeActions({
|
|
|
1329
1441
|
PromptModeButton,
|
|
1330
1442
|
{
|
|
1331
1443
|
active: modes.think,
|
|
1332
|
-
label:
|
|
1444
|
+
label: labels.think,
|
|
1333
1445
|
tone: "think",
|
|
1334
1446
|
onClick: () => onToggleMode("think")
|
|
1335
1447
|
}
|
|
@@ -1339,7 +1451,7 @@ function PromptModeActions({
|
|
|
1339
1451
|
PromptModeButton,
|
|
1340
1452
|
{
|
|
1341
1453
|
active: modes.canvas,
|
|
1342
|
-
label:
|
|
1454
|
+
label: labels.canvas,
|
|
1343
1455
|
tone: "canvas",
|
|
1344
1456
|
onClick: onToggleCanvas
|
|
1345
1457
|
}
|
|
@@ -1353,13 +1465,14 @@ function PromptSubmitAction({
|
|
|
1353
1465
|
isLoading,
|
|
1354
1466
|
isRecording,
|
|
1355
1467
|
hasContent,
|
|
1356
|
-
onActivate
|
|
1468
|
+
onActivate,
|
|
1469
|
+
labels
|
|
1357
1470
|
}) {
|
|
1358
1471
|
const shouldReduceMotion = useReducedMotion();
|
|
1359
1472
|
return /* @__PURE__ */ jsx(
|
|
1360
1473
|
PromptInputAction,
|
|
1361
1474
|
{
|
|
1362
|
-
tooltip: isLoading ?
|
|
1475
|
+
tooltip: isLoading ? labels.stopGeneration : isRecording ? labels.stopRecording : hasContent ? labels.sendMessage : labels.voiceMessage,
|
|
1363
1476
|
children: /* @__PURE__ */ jsx(
|
|
1364
1477
|
Button,
|
|
1365
1478
|
{
|
|
@@ -1367,7 +1480,7 @@ function PromptSubmitAction({
|
|
|
1367
1480
|
size: "icon",
|
|
1368
1481
|
className: cn(
|
|
1369
1482
|
"h-8 w-8 rounded-full transition-[background-color,border-color,box-shadow,color,opacity,transform] duration-micro",
|
|
1370
|
-
isRecording ? "bg-transparent hover:bg-accent text-destructive hover:text-destructive/80" : hasContent ? "bg-primary hover:bg-primary/90 text-primary-foreground" : "bg-transparent hover:bg-accent text-muted-foreground hover:text-accent-foreground"
|
|
1483
|
+
isRecording ? "bg-transparent hover:bg-accent text-destructive-strong hover:text-destructive-strong/80" : hasContent ? "bg-primary hover:bg-primary/90 text-primary-foreground" : "bg-transparent hover:bg-accent text-muted-foreground hover:text-accent-foreground"
|
|
1371
1484
|
),
|
|
1372
1485
|
onClick: onActivate,
|
|
1373
1486
|
disabled: isLoading && !hasContent,
|
|
@@ -1375,16 +1488,29 @@ function PromptSubmitAction({
|
|
|
1375
1488
|
StopFill,
|
|
1376
1489
|
{
|
|
1377
1490
|
className: cn(
|
|
1378
|
-
"h-4 w-4 fill-
|
|
1491
|
+
"h-4 w-4 fill-current",
|
|
1379
1492
|
shouldReduceMotion ? "opacity-100" : "animate-pulse"
|
|
1380
1493
|
)
|
|
1381
1494
|
}
|
|
1382
|
-
) : isRecording ? /* @__PURE__ */ jsx(StopCircle, { className: "h-5 w-5 text-destructive" }) : hasContent ? /* @__PURE__ */ jsx(ArrowUp, { className: "h-4 w-4
|
|
1495
|
+
) : isRecording ? /* @__PURE__ */ jsx(StopCircle, { className: "h-5 w-5 text-destructive-strong" }) : hasContent ? /* @__PURE__ */ jsx(ArrowUp, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx(Microphone, { className: "h-5 w-5 transition-colors" })
|
|
1383
1496
|
}
|
|
1384
1497
|
)
|
|
1385
1498
|
}
|
|
1386
1499
|
);
|
|
1387
1500
|
}
|
|
1501
|
+
var DEFAULT_PROMPT_INPUT_BOX_LABELS = {
|
|
1502
|
+
upload: "Upload image",
|
|
1503
|
+
search: "Search",
|
|
1504
|
+
think: "Think",
|
|
1505
|
+
canvas: "Canvas",
|
|
1506
|
+
searchPlaceholder: "Search the web...",
|
|
1507
|
+
thinkPlaceholder: "Think deeply...",
|
|
1508
|
+
canvasPlaceholder: "Create on canvas...",
|
|
1509
|
+
stopGeneration: "Stop generation",
|
|
1510
|
+
stopRecording: "Stop recording",
|
|
1511
|
+
sendMessage: "Send message",
|
|
1512
|
+
voiceMessage: "Voice message"
|
|
1513
|
+
};
|
|
1388
1514
|
var promptInputBoxInitialState = {
|
|
1389
1515
|
input: "",
|
|
1390
1516
|
files: [],
|
|
@@ -1442,6 +1568,7 @@ var PromptInputBox = (props) => {
|
|
|
1442
1568
|
className,
|
|
1443
1569
|
ref
|
|
1444
1570
|
} = props;
|
|
1571
|
+
const labels = { ...DEFAULT_PROMPT_INPUT_BOX_LABELS, ...props.labels };
|
|
1445
1572
|
const [state, dispatch] = React5__default.useReducer(promptInputBoxReducer, promptInputBoxInitialState);
|
|
1446
1573
|
const {
|
|
1447
1574
|
input,
|
|
@@ -1567,7 +1694,7 @@ var PromptInputBox = (props) => {
|
|
|
1567
1694
|
children: /* @__PURE__ */ jsx(
|
|
1568
1695
|
PromptInputTextarea,
|
|
1569
1696
|
{
|
|
1570
|
-
placeholder: showSearch ?
|
|
1697
|
+
placeholder: showSearch ? labels.searchPlaceholder : showThink ? labels.thinkPlaceholder : showCanvas ? labels.canvasPlaceholder : placeholder,
|
|
1571
1698
|
className: "text-base"
|
|
1572
1699
|
}
|
|
1573
1700
|
)
|
|
@@ -1583,7 +1710,8 @@ var PromptInputBox = (props) => {
|
|
|
1583
1710
|
modes: { search: showSearch, think: showThink, canvas: showCanvas },
|
|
1584
1711
|
onToggleMode: handleToggleChange,
|
|
1585
1712
|
onToggleCanvas: handleCanvasToggle,
|
|
1586
|
-
onProcessFile: processFile
|
|
1713
|
+
onProcessFile: processFile,
|
|
1714
|
+
labels
|
|
1587
1715
|
}
|
|
1588
1716
|
),
|
|
1589
1717
|
/* @__PURE__ */ jsx(
|
|
@@ -1596,7 +1724,8 @@ var PromptInputBox = (props) => {
|
|
|
1596
1724
|
if (isRecording) stopRecording();
|
|
1597
1725
|
else if (hasContent) handleSubmit();
|
|
1598
1726
|
else startRecording();
|
|
1599
|
-
}
|
|
1727
|
+
},
|
|
1728
|
+
labels
|
|
1600
1729
|
}
|
|
1601
1730
|
)
|
|
1602
1731
|
] })
|
|
@@ -1831,6 +1960,7 @@ function PopoverContent({
|
|
|
1831
1960
|
return /* @__PURE__ */ jsx(Popover$1.Portal, { children: /* @__PURE__ */ jsx(
|
|
1832
1961
|
Popover$1.Positioner,
|
|
1833
1962
|
{
|
|
1963
|
+
style: { zIndex: overlayZIndex.popover },
|
|
1834
1964
|
"data-slot": "popover-positioner",
|
|
1835
1965
|
sideOffset,
|
|
1836
1966
|
align,
|
|
@@ -1845,7 +1975,7 @@ function PopoverContent({
|
|
|
1845
1975
|
overlayPrimitiveClassNames.popoverSurface,
|
|
1846
1976
|
className
|
|
1847
1977
|
),
|
|
1848
|
-
style
|
|
1978
|
+
style,
|
|
1849
1979
|
...props,
|
|
1850
1980
|
children: [
|
|
1851
1981
|
children,
|
|
@@ -1891,15 +2021,15 @@ function PopoverArrow({
|
|
|
1891
2021
|
);
|
|
1892
2022
|
}
|
|
1893
2023
|
var TAG_COLOR_MAP = {
|
|
1894
|
-
feature: "bg-
|
|
1895
|
-
fix: "bg-
|
|
1896
|
-
breaking: "bg-
|
|
1897
|
-
improvement: "bg-
|
|
1898
|
-
security: "bg-
|
|
1899
|
-
experimental: "bg-
|
|
2024
|
+
feature: "bg-primary text-primary-foreground",
|
|
2025
|
+
fix: "bg-success text-success-foreground",
|
|
2026
|
+
breaking: "bg-destructive text-destructive-foreground",
|
|
2027
|
+
improvement: "bg-warning text-warning-foreground",
|
|
2028
|
+
security: "bg-destructive text-destructive-foreground",
|
|
2029
|
+
experimental: "bg-neutral-8 text-foreground"
|
|
1900
2030
|
};
|
|
1901
2031
|
var getTagColor = (tag) => {
|
|
1902
|
-
if (!tag) return "bg-
|
|
2032
|
+
if (!tag) return "bg-neutral-7 text-foreground";
|
|
1903
2033
|
return TAG_COLOR_MAP[tag.toLowerCase()] || TAG_COLOR_MAP.feature;
|
|
1904
2034
|
};
|
|
1905
2035
|
var getUnreadCount = (entries, lastSeenVersion) => {
|
|
@@ -1910,7 +2040,8 @@ var getUnreadCount = (entries, lastSeenVersion) => {
|
|
|
1910
2040
|
function ChangelogWidget({
|
|
1911
2041
|
entries,
|
|
1912
2042
|
changelogUrl = "/changelog",
|
|
1913
|
-
className
|
|
2043
|
+
className,
|
|
2044
|
+
triggerLabel = "View changelog"
|
|
1914
2045
|
}) {
|
|
1915
2046
|
const [isOpen, setIsOpen] = React5.useState(false);
|
|
1916
2047
|
const [lastSeenVersion, setLastSeenVersion] = React5.useState(null);
|
|
@@ -1925,14 +2056,14 @@ function ChangelogWidget({
|
|
|
1925
2056
|
/* @__PURE__ */ jsxs(
|
|
1926
2057
|
PopoverTrigger,
|
|
1927
2058
|
{
|
|
1928
|
-
"aria-label":
|
|
2059
|
+
"aria-label": triggerLabel,
|
|
1929
2060
|
className: cn(
|
|
1930
2061
|
"relative inline-flex items-center justify-center rounded-[var(--radius-lg)] p-2 transition-colors hover:bg-muted",
|
|
1931
2062
|
className
|
|
1932
2063
|
),
|
|
1933
2064
|
children: [
|
|
1934
2065
|
/* @__PURE__ */ jsx(Bell, { className: "h-5 w-5 text-muted-foreground" }),
|
|
1935
|
-
unreadCount > 0 && /* @__PURE__ */ jsx("span", { className: "absolute right-0 top-0 flex h-5 w-5 items-center justify-center rounded-full bg-
|
|
2066
|
+
unreadCount > 0 && /* @__PURE__ */ jsx("span", { className: "absolute right-0 top-0 flex h-5 w-5 items-center justify-center rounded-full bg-destructive text-xs font-bold text-destructive-foreground", children: unreadCount > 9 ? "9+" : unreadCount })
|
|
1936
2067
|
]
|
|
1937
2068
|
}
|
|
1938
2069
|
),
|
|
@@ -1942,9 +2073,9 @@ function ChangelogWidget({
|
|
|
1942
2073
|
align: "end",
|
|
1943
2074
|
side: "bottom",
|
|
1944
2075
|
sideOffset: 8,
|
|
1945
|
-
className: "w-80 overflow-hidden rounded-[var(--radius-lg)] border-border bg-
|
|
2076
|
+
className: "w-80 overflow-hidden rounded-[var(--radius-lg)] border-border bg-popover p-0 shadow-lg",
|
|
1946
2077
|
children: [
|
|
1947
|
-
/* @__PURE__ */ jsx("div", { className: "bg-gradient-to-r from-
|
|
2078
|
+
/* @__PURE__ */ jsx("div", { className: "bg-gradient-to-r from-blue-3 to-cyan-3 px-4 py-3", children: /* @__PURE__ */ jsx("h3", { className: "font-semibold text-foreground", children: "What's New" }) }),
|
|
1948
2079
|
/* @__PURE__ */ jsx("div", { className: "max-h-96 overflow-y-auto", children: recentEntries.length === 0 ? /* @__PURE__ */ jsx("div", { className: "px-4 py-6 text-center text-sm text-muted-foreground", children: "No updates available" }) : recentEntries.map((entry) => /* @__PURE__ */ jsxs(
|
|
1949
2080
|
"a",
|
|
1950
2081
|
{
|
|
@@ -2178,7 +2309,7 @@ function NodeGraphCanvas({
|
|
|
2178
2309
|
id: statusId,
|
|
2179
2310
|
role: "alert",
|
|
2180
2311
|
"aria-live": "assertive",
|
|
2181
|
-
className: "flex items-center gap-2 rounded-[var(--radius-md)] border border-destructive bg-destructive/10 px-3 py-2 text-sm text-destructive",
|
|
2312
|
+
className: "flex items-center gap-2 rounded-[var(--radius-md)] border border-destructive bg-destructive/10 px-3 py-2 text-sm text-destructive-strong",
|
|
2182
2313
|
children: [
|
|
2183
2314
|
/* @__PURE__ */ jsx("span", { children: rejection }),
|
|
2184
2315
|
/* @__PURE__ */ jsx(
|
|
@@ -2187,7 +2318,6 @@ function NodeGraphCanvas({
|
|
|
2187
2318
|
size: "sm",
|
|
2188
2319
|
variant: "ghost",
|
|
2189
2320
|
prefix: /* @__PURE__ */ jsx(CrossSmall, { size: 14 }),
|
|
2190
|
-
"aria-label": "Dismiss connection error",
|
|
2191
2321
|
onClick: () => setRejection(null),
|
|
2192
2322
|
children: "Dismiss"
|
|
2193
2323
|
}
|
|
@@ -2245,6 +2375,7 @@ function OnboardingChecklist({
|
|
|
2245
2375
|
items,
|
|
2246
2376
|
videoThumbnailUrl,
|
|
2247
2377
|
videoUrl,
|
|
2378
|
+
playVideoLabel = "Play the video guide",
|
|
2248
2379
|
className
|
|
2249
2380
|
}) {
|
|
2250
2381
|
const shouldReduceMotion = useReducedMotion();
|
|
@@ -2266,7 +2397,7 @@ function OnboardingChecklist({
|
|
|
2266
2397
|
/* @__PURE__ */ jsx("p", { className: "mt-2 text-muted-foreground", children: description }),
|
|
2267
2398
|
/* @__PURE__ */ jsx("ul", { className: "mt-6 grid grid-cols-1 sm:grid-cols-2 gap-x-8 gap-y-4", children: items.map((item) => /* @__PURE__ */ jsxs(motion.li, { variants: activeItemVariants, className: "flex flex-col", children: [
|
|
2268
2399
|
/* @__PURE__ */ jsxs("div", { className: "flex items-start", children: [
|
|
2269
|
-
/* @__PURE__ */ jsx(CheckCircle, { className: "h-5 w-5 text-
|
|
2400
|
+
/* @__PURE__ */ jsx(CheckCircle, { className: "h-5 w-5 text-success-strong mt-0.5 flex-shrink-0" }),
|
|
2270
2401
|
/* @__PURE__ */ jsx("span", { className: "ml-3 text-sm font-medium", children: item.text })
|
|
2271
2402
|
] }),
|
|
2272
2403
|
item.helperText && item.helperLink && /* @__PURE__ */ jsxs("div", { className: "ml-8 mt-1 text-xs text-muted-foreground", children: [
|
|
@@ -2293,7 +2424,7 @@ function OnboardingChecklist({
|
|
|
2293
2424
|
"button",
|
|
2294
2425
|
{
|
|
2295
2426
|
type: "button",
|
|
2296
|
-
"aria-label":
|
|
2427
|
+
"aria-label": playVideoLabel,
|
|
2297
2428
|
className: "w-full h-full rounded-[var(--radius-lg)]",
|
|
2298
2429
|
children: [
|
|
2299
2430
|
/* @__PURE__ */ jsx(
|
|
@@ -2505,7 +2636,7 @@ var inputVariants = cva(
|
|
|
2505
2636
|
* the ring surrounds the whole group rather than a box inside it.
|
|
2506
2637
|
*/
|
|
2507
2638
|
tone: {
|
|
2508
|
-
bordered: `border border-input bg-background
|
|
2639
|
+
bordered: `border border-input bg-background ${formControlFocusClassNames.input}`,
|
|
2509
2640
|
bare: "border-0 bg-transparent shadow-none"
|
|
2510
2641
|
}
|
|
2511
2642
|
},
|
|
@@ -2544,7 +2675,7 @@ var fieldMessageVariants = cva("text-xs", {
|
|
|
2544
2675
|
variants: {
|
|
2545
2676
|
tone: {
|
|
2546
2677
|
description: "text-muted-foreground",
|
|
2547
|
-
error: "font-medium text-destructive"
|
|
2678
|
+
error: "font-medium text-destructive-strong"
|
|
2548
2679
|
}
|
|
2549
2680
|
}
|
|
2550
2681
|
});
|
|
@@ -2611,6 +2742,7 @@ var Input = ({
|
|
|
2611
2742
|
revealable,
|
|
2612
2743
|
revealLabel = "Show password",
|
|
2613
2744
|
hideLabel = "Hide password",
|
|
2745
|
+
clearLabel = "Clear input",
|
|
2614
2746
|
clearOnEscape,
|
|
2615
2747
|
wrapperClassName,
|
|
2616
2748
|
fieldClassName,
|
|
@@ -2761,7 +2893,7 @@ var Input = ({
|
|
|
2761
2893
|
"button",
|
|
2762
2894
|
{
|
|
2763
2895
|
type: "button",
|
|
2764
|
-
"aria-label":
|
|
2896
|
+
"aria-label": clearLabel,
|
|
2765
2897
|
disabled,
|
|
2766
2898
|
className: inputControlButtonVariants(),
|
|
2767
2899
|
style: getInputStyle(size, void 0),
|
|
@@ -2827,6 +2959,11 @@ var Input = ({
|
|
|
2827
2959
|
);
|
|
2828
2960
|
};
|
|
2829
2961
|
Input.displayName = "Input";
|
|
2962
|
+
var DEFAULT_TEAM_CHAT_LABELS = {
|
|
2963
|
+
moreOptions: "More options",
|
|
2964
|
+
addEmoji: "Add emoji",
|
|
2965
|
+
sendMessage: "Send message"
|
|
2966
|
+
};
|
|
2830
2967
|
function Avatar({ src, alt, isOnline, size = "md" }) {
|
|
2831
2968
|
const sizeClasses = size === "sm" ? "w-10 h-10" : "w-10 h-10";
|
|
2832
2969
|
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
@@ -2835,10 +2972,7 @@ function Avatar({ src, alt, isOnline, size = "md" }) {
|
|
|
2835
2972
|
{
|
|
2836
2973
|
src,
|
|
2837
2974
|
alt,
|
|
2838
|
-
className: cn(
|
|
2839
|
-
sizeClasses,
|
|
2840
|
-
"rounded-full ring-1 ring-gray-400 dark:ring-gray-600 object-cover"
|
|
2841
|
-
),
|
|
2975
|
+
className: cn(sizeClasses, "rounded-full ring-1 ring-border object-cover"),
|
|
2842
2976
|
width: 400,
|
|
2843
2977
|
height: 400
|
|
2844
2978
|
}
|
|
@@ -2847,8 +2981,8 @@ function Avatar({ src, alt, isOnline, size = "md" }) {
|
|
|
2847
2981
|
"span",
|
|
2848
2982
|
{
|
|
2849
2983
|
className: cn(
|
|
2850
|
-
"absolute bottom-0 right-0 w-3 h-3 rounded-full ring-2 ring-
|
|
2851
|
-
isOnline ? "bg-
|
|
2984
|
+
"absolute bottom-0 right-0 w-3 h-3 rounded-full ring-2 ring-background",
|
|
2985
|
+
isOnline ? "bg-success" : "bg-neutral-8"
|
|
2852
2986
|
)
|
|
2853
2987
|
}
|
|
2854
2988
|
)
|
|
@@ -2862,8 +2996,10 @@ function TeamChat({
|
|
|
2862
2996
|
onSendMessage,
|
|
2863
2997
|
onReactionClick,
|
|
2864
2998
|
onMoreOptions,
|
|
2999
|
+
labels: labelOverrides,
|
|
2865
3000
|
className
|
|
2866
3001
|
}) {
|
|
3002
|
+
const labels = { ...DEFAULT_TEAM_CHAT_LABELS, ...labelOverrides };
|
|
2867
3003
|
const [selectedSender, setSelectedSender] = useState(null);
|
|
2868
3004
|
const [inputValue, setInputValue] = useState("");
|
|
2869
3005
|
const uniqueSenders = Array.from(
|
|
@@ -2886,15 +3022,15 @@ function TeamChat({
|
|
|
2886
3022
|
"div",
|
|
2887
3023
|
{
|
|
2888
3024
|
className: cn(
|
|
2889
|
-
"w-full max-w-content mx-auto p-6 bg-
|
|
3025
|
+
"w-full max-w-content mx-auto p-6 bg-background rounded-[var(--radius-3xl)] shadow-lg flex flex-col h-[550px] border border-border",
|
|
2890
3026
|
className
|
|
2891
3027
|
),
|
|
2892
3028
|
children: [
|
|
2893
3029
|
/* @__PURE__ */ jsxs("header", { className: "flex justify-between items-center border-b border-border pb-3 mb-6", children: [
|
|
2894
3030
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
2895
|
-
/* @__PURE__ */ jsx(Users, { className: "w-8 h-8 text-
|
|
3031
|
+
/* @__PURE__ */ jsx(Users, { className: "w-8 h-8 text-foreground" }),
|
|
2896
3032
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
2897
|
-
/* @__PURE__ */ jsx("h2", { className: "text-2xl font-semibold text-
|
|
3033
|
+
/* @__PURE__ */ jsx("h2", { className: "text-2xl font-semibold text-foreground", children: chatName }),
|
|
2898
3034
|
tagline && /* @__PURE__ */ jsx("p", { className: "italic text-sm text-muted-foreground", children: tagline })
|
|
2899
3035
|
] })
|
|
2900
3036
|
] }),
|
|
@@ -2902,7 +3038,7 @@ function TeamChat({
|
|
|
2902
3038
|
"button",
|
|
2903
3039
|
{
|
|
2904
3040
|
type: "button",
|
|
2905
|
-
"aria-label":
|
|
3041
|
+
"aria-label": labels.moreOptions,
|
|
2906
3042
|
onClick: onMoreOptions,
|
|
2907
3043
|
className: "p-2 rounded-[var(--radius-lg)] hover:bg-muted transition",
|
|
2908
3044
|
children: /* @__PURE__ */ jsx(MoreHorizontal, { className: "w-6 h-6 text-muted-foreground" })
|
|
@@ -2919,7 +3055,7 @@ function TeamChat({
|
|
|
2919
3055
|
onClick: () => setSelectedSender(isSelected ? null : sender.name),
|
|
2920
3056
|
className: cn(
|
|
2921
3057
|
"flex items-center gap-3 w-full p-3 mb-3 rounded-[var(--radius-lg)] transition-colors",
|
|
2922
|
-
isSelected ? "bg-
|
|
3058
|
+
isSelected ? "bg-primary text-primary-foreground" : "hover:bg-muted text-foreground"
|
|
2923
3059
|
),
|
|
2924
3060
|
children: [
|
|
2925
3061
|
/* @__PURE__ */ jsx(Avatar, { src: sender.avatar, alt: sender.name, isOnline: sender.isOnline }),
|
|
@@ -2929,18 +3065,18 @@ function TeamChat({
|
|
|
2929
3065
|
sender.name
|
|
2930
3066
|
);
|
|
2931
3067
|
}) }),
|
|
2932
|
-
/* @__PURE__ */ jsx("section", { className: "flex-1 p-6 overflow-y-auto bg-
|
|
3068
|
+
/* @__PURE__ */ jsx("section", { className: "flex-1 p-6 overflow-y-auto bg-background", children: filteredMessages.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-center text-muted-foreground", children: "No messages to display." }) : filteredMessages.map((message) => /* @__PURE__ */ jsxs("div", { className: "mb-6 last:mb-0 group border-b border-border pb-4", children: [
|
|
2933
3069
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4 mb-2", children: [
|
|
2934
3070
|
/* @__PURE__ */ jsx(Avatar, { src: message.sender.avatar, alt: message.sender.name }),
|
|
2935
3071
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
2936
|
-
/* @__PURE__ */ jsx("p", { className: "font-semibold text-
|
|
3072
|
+
/* @__PURE__ */ jsx("p", { className: "font-semibold text-foreground", children: message.sender.name }),
|
|
2937
3073
|
/* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: message.timestamp })
|
|
2938
3074
|
] })
|
|
2939
3075
|
] }),
|
|
2940
3076
|
/* @__PURE__ */ jsx("p", { className: "text-foreground text-lg mb-1", children: message.content }),
|
|
2941
3077
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between text-sm text-muted-foreground", children: [
|
|
2942
3078
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
2943
|
-
message.status === "read" && /* @__PURE__ */ jsx(DoubleCheck, { className: "w-5 h-5 text-
|
|
3079
|
+
message.status === "read" && /* @__PURE__ */ jsx(DoubleCheck, { className: "w-5 h-5 text-success-strong" }),
|
|
2944
3080
|
message.status === "delivered" && /* @__PURE__ */ jsx(Check, { className: "w-5 h-5" }),
|
|
2945
3081
|
/* @__PURE__ */ jsx("span", { children: message.timestamp })
|
|
2946
3082
|
] }),
|
|
@@ -2951,7 +3087,7 @@ function TeamChat({
|
|
|
2951
3087
|
onClick: () => onReactionClick?.(message.id, reaction.emoji),
|
|
2952
3088
|
className: cn(
|
|
2953
3089
|
"px-2 py-1 rounded-[var(--radius-md)] text-sm transition-colors",
|
|
2954
|
-
reaction.reacted ? "bg-
|
|
3090
|
+
reaction.reacted ? "bg-muted text-foreground" : "bg-muted text-muted-foreground",
|
|
2955
3091
|
"hover:bg-muted"
|
|
2956
3092
|
),
|
|
2957
3093
|
children: [
|
|
@@ -2970,7 +3106,7 @@ function TeamChat({
|
|
|
2970
3106
|
"button",
|
|
2971
3107
|
{
|
|
2972
3108
|
type: "button",
|
|
2973
|
-
"aria-label":
|
|
3109
|
+
"aria-label": labels.addEmoji,
|
|
2974
3110
|
className: "p-3 rounded-full bg-muted hover:bg-muted transition",
|
|
2975
3111
|
children: /* @__PURE__ */ jsx(FacePlus, { className: "w-6 h-6 text-muted-foreground" })
|
|
2976
3112
|
}
|
|
@@ -2989,9 +3125,9 @@ function TeamChat({
|
|
|
2989
3125
|
"button",
|
|
2990
3126
|
{
|
|
2991
3127
|
type: "button",
|
|
2992
|
-
"aria-label":
|
|
3128
|
+
"aria-label": labels.sendMessage,
|
|
2993
3129
|
onClick: handleSend,
|
|
2994
|
-
className: "p-3 rounded-full bg-
|
|
3130
|
+
className: "p-3 rounded-full bg-primary text-primary-foreground hover:brightness-90 transition",
|
|
2995
3131
|
children: /* @__PURE__ */ jsx(PaperAirplane, { className: "w-6 h-6" })
|
|
2996
3132
|
}
|
|
2997
3133
|
)
|
|
@@ -3001,6 +3137,6 @@ function TeamChat({
|
|
|
3001
3137
|
);
|
|
3002
3138
|
}
|
|
3003
3139
|
|
|
3004
|
-
export { AnimateIn, AnimateInGroup, AnimateSwap, AnimatedCard, AnimatedDrawer, AnimatedList, AnimatedModal, AnimatedPopover, AsciiText, ChangelogWidget, FadeIn, GRAPH_NODE_FLOW_TYPE, ImageViewDialog, MAX_VISUALIZER_BARS, NodeGraphCanvas, OnboardingChecklist, PageTransition, PromptAttachmentPreviews, PromptInputBox, ScaleIn, SlideIn, TeamChat, VISUALIZER_BAR_STYLES, VoiceRecorder, animatedList, animatedListItem, animationDistances, animationDurations, animationEasings, animationSprings, animationTransitions, applyNodePositions, drawerSurface, fadeIn, formatRecordingTime, getFilePreviewKey, graphToFlow, isImageFile, modalSurface, pageTransition, popoverSurface, preventDragDefaults, reducedMotionVariants, removeFlowEdge, removeNode, scaleIn, slideIn, tryAddEdge };
|
|
3140
|
+
export { AnimateIn, AnimateInGroup, AnimateSwap, AnimatedCard, AnimatedDrawer, AnimatedList, AnimatedModal, AnimatedPopover, AsciiText, ChangelogWidget, DEFAULT_PROMPT_INPUT_BOX_LABELS, DEFAULT_TEAM_CHAT_LABELS, FadeIn, GRAPH_NODE_FLOW_TYPE, ImageViewDialog, MAX_VISUALIZER_BARS, NodeGraphCanvas, OnboardingChecklist, PageTransition, PromptAttachmentPreviews, PromptInputBox, ScaleIn, SlideIn, TeamChat, VISUALIZER_BAR_STYLES, VoiceRecorder, animatedList, animatedListItem, animationDistances, animationDurations, animationEasings, animationSprings, animationTransitions, applyNodePositions, drawerSurface, fadeIn, formatRecordingTime, getFilePreviewKey, graphToFlow, isImageFile, modalSurface, pageTransition, popoverSurface, preventDragDefaults, reducedMotionVariants, removeFlowEdge, removeNode, scaleIn, slideIn, tryAddEdge };
|
|
3005
3141
|
//# sourceMappingURL=index.js.map
|
|
3006
3142
|
//# sourceMappingURL=index.js.map
|