Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
feat(ui): input active (#3525)
Fake-Usera990261521e4
diff --git a/js/app/packages/app/component/app-sidebar/invite-modal.tsx b/js/app/packages/app/component/app-sidebar/invite-modal.tsxindex df39510d6c..cc621d666f 100644--- a/js/app/packages/app/component/app-sidebar/invite-modal.tsx+++ b/js/app/packages/app/component/app-sidebar/invite-modal.tsx@@ -93,7 +93,7 @@ export const InviteModal = () => {value={value()}onInput={(e) => setValue(e.currentTarget.value)}rows={4}- class="w-full px-3 py-2 text-sm/relaxed border border-edge-muted rounded-xs bg-surface text-ink placeholder:text-ink/30 outline-none focus:border-accent/50 resize-none"+ class="w-full px-3 py-2 text-sm/relaxed border border-edge-muted rounded-lg bg-surface text-ink placeholder:text-ink/30 outline-none focus:border-accent resize-none"/></div>diff --git a/js/app/packages/app/component/interactive-onboarding/MobileWebWelcome.tsx b/js/app/packages/app/component/interactive-onboarding/MobileWebWelcome.tsxindex 150cb6ab89..bb2b5cc01b 100644--- a/js/app/packages/app/component/interactive-onboarding/MobileWebWelcome.tsx+++ b/js/app/packages/app/component/interactive-onboarding/MobileWebWelcome.tsx@@ -62,7 +62,7 @@ export default function MobileWebWelcome(props: MobileWebWelcomeProps) {placeholder="[email protected]"value={email()}onInput={(e) => setEmail(e.currentTarget.value)}- class="w-full px-3 py-2.5 text-base border border-edge-muted rounded-xs bg-surface text-ink placeholder:text-ink/30 outline-none focus:border-accent/50"+ class="w-full px-3 py-2.5 text-base border border-edge-muted rounded-lg bg-surface text-ink placeholder:text-ink/30 outline-none focus:border-accent"/><buttontype="submit"diff --git a/js/app/packages/app/component/next-soup/soup-view/filters-bar/soup-view-search-bar.tsx b/js/app/packages/app/component/next-soup/soup-view/filters-bar/soup-view-search-bar.tsxindex 676da812ca..ea4da27add 100644--- a/js/app/packages/app/component/next-soup/soup-view/filters-bar/soup-view-search-bar.tsx+++ b/js/app/packages/app/component/next-soup/soup-view/filters-bar/soup-view-search-bar.tsx@@ -36,9 +36,9 @@ interface SoupSearchbarProps {const variantStyles: Record<SearchbarVariant, string> = {filled:- 'bg-ink/5 text-ink-muted hover:bg-ink/7 hover:text-ink border-edge-muted focus-within:bg-ink/7 focus-within:text-ink',+ 'bg-ink/5 text-ink-muted hover:bg-ink/7 hover:text-ink border-edge-muted focus-within:bg-ink/7 focus-within:text-ink focus-within:border-accent',secondary:- 'bg-surface text-ink-muted border-edge-muted hover:text-ink focus-within:text-ink',+ 'bg-surface text-ink-muted border-edge-muted hover:text-ink focus-within:text-ink focus-within:border-accent',};export const SoupSearchbar = (props: SoupSearchbarProps) => {@@ -161,7 +161,7 @@ export const SoupSearchbar = (props: SoupSearchbarProps) => {<SearchIcon class="size-4 shrink-0" /><divdata-soup-search- class="flex-1 min-w-0 whitespace-nowrap overflow-hidden **:[[contenteditable]]:outline-none **:[[contenteditable]]:p-0 **:[[contenteditable]]:whitespace-nowrap **:[[contenteditable]]:min-h-[1lh] [&_p]:my-0 [&_p]:whitespace-nowrap"+ class="flex-1 min-w-0 whitespace-nowrap overflow-hidden **:[[contenteditable]]:outline-none **:[[contenteditable]]:p-0 **:[[contenteditable]]:whitespace-nowrap **:[[contenteditable]]:min-h-lh [&_p]:my-0 [&_p]:whitespace-nowrap"><MarkdownShellconfig={editor}diff --git a/js/app/packages/app/component/settings/Account.tsx b/js/app/packages/app/component/settings/Account.tsxindex 1dce167bcb..dbacbacb60 100644--- a/js/app/packages/app/component/settings/Account.tsx+++ b/js/app/packages/app/component/settings/Account.tsx@@ -542,7 +542,7 @@ function NameInput(props: {};return (- <div class="ph-no-capture group relative flex items-center gap-1 rounded-sm h-7 mobile:h-9 px-2 border text-xs bg-transparent text-ink-muted border-edge-muted hover:text-ink focus-within:text-ink">+ <div class="ph-no-capture group relative flex items-center gap-1 rounded-lg h-7 mobile:h-9 px-2 border text-xs bg-transparent text-ink-muted border-edge-muted hover:text-ink focus-within:text-ink focus-within:border-accent"><inputtype="text"class="flex-1 min-w-0 bg-transparent outline-none border-0 p-0 text-xs placeholder:text-ink-extra-muted"diff --git a/js/app/packages/app/component/settings/Agent.tsx b/js/app/packages/app/component/settings/Agent.tsxindex 50988af040..277b11fdae 100644--- a/js/app/packages/app/component/settings/Agent.tsx+++ b/js/app/packages/app/component/settings/Agent.tsx@@ -138,7 +138,7 @@ function AddServerForm(props: {<span class="text-xs text-ink-muted">Name</span><inputtype="text"- class="h-8 px-2.5 rounded-sm border border-edge-muted bg-input text-sm text-ink outline-none placeholder:text-ink-muted focus:border-edge"+ class="h-8 px-2.5 rounded-lg border border-edge-muted bg-input text-sm text-ink outline-none placeholder:text-ink-muted focus:border-accent"placeholder="My MCP Server"value={name()}onInput={(e) => setName(e.currentTarget.value)}@@ -152,7 +152,7 @@ function AddServerForm(props: {<span class="text-xs text-ink-muted">URL</span><inputtype="url"- class="h-8 px-2.5 rounded-sm border border-edge-muted bg-input text-sm text-ink outline-none placeholder:text-ink-muted focus:border-edge"+ class="h-8 px-2.5 rounded-lg border border-edge-muted bg-input text-sm text-ink outline-none placeholder:text-ink-muted focus:border-accent"placeholder="https://example.com/mcp"value={url()}onInput={(e) => setUrl(e.currentTarget.value)}diff --git a/js/app/packages/app/component/settings/Team.tsx b/js/app/packages/app/component/settings/Team.tsxindex 3e610d49a1..9fd4fdb896 100644--- a/js/app/packages/app/component/settings/Team.tsx+++ b/js/app/packages/app/component/settings/Team.tsx@@ -142,10 +142,10 @@ function InviteEntryRow(props: {onBlur={() => props.onBlur()}placeholder="Enter email address"class={cn(- 'flex-1 min-w-0 px-3 py-2 text-sm border rounded-xs bg-surface text-ink placeholder:text-ink/30 outline-none',+ 'flex-1 min-w-0 px-3 py-2 text-sm border rounded-lg bg-surface text-ink placeholder:text-ink/30 outline-none',props.error? 'border-failure focus:border-failure'- : 'border-edge-muted focus:border-accent/50'+ : 'border-edge-muted focus:border-accent')}/><Show when={props.showRemove}>@@ -153,7 +153,7 @@ function InviteEntryRow(props: {<Buttonvariant="base"size="icon-sm"- class="rounded-xs shrink-0 focus:border-accent/50"+ class="rounded-xs shrink-0 focus:border-accent"tabIndex={0}onClick={props.onRemove}>@@ -268,7 +268,7 @@ function InviteEmailsInput(props: {</Show><Buttonvariant="base"- class="rounded-xs w-full justify-center focus:border-accent/50"+ class="rounded-xs w-full justify-center focus:border-accent"tabIndex={0}disabled={!canAddRow()}onClick={addRow}@@ -619,10 +619,10 @@ function CreateTeamDialog(props: { open: boolean; onClose: () => void }) {onBlur={() => validateTeamName()}placeholder="My Team"class={cn(- 'w-full px-3 py-2 text-sm border rounded-xs bg-surface text-ink placeholder:text-ink/30 outline-none',+ 'w-full px-3 py-2 text-sm border rounded-lg bg-surface text-ink placeholder:text-ink/30 outline-none',teamNameError()? 'border-failure focus:border-failure'- : 'border-edge-muted focus:border-accent/50'+ : 'border-edge-muted focus:border-accent')}/><Show when={teamNameError()}>@@ -1225,7 +1225,7 @@ function TeamManagement(props: {value={deleteConfirmation()}onInput={(e) => setDeleteConfirmation(e.currentTarget.value)}placeholder={deleteConfirmationPhrase()}- class="w-full px-3 py-2 text-sm border border-edge-muted rounded-xs bg-surface text-ink placeholder:text-ink/30 outline-none focus:border-accent/50"+ class="w-full px-3 py-2 text-sm border border-edge-muted rounded-lg bg-surface text-ink placeholder:text-ink/30 outline-none focus:border-accent"/><div class="flex justify-end gap-1 pt-2"><Buttondiff --git a/js/app/packages/block-email/component/BaseInput.tsx b/js/app/packages/block-email/component/BaseInput.tsxindex d7825f60db..aba2e7dd22 100644--- a/js/app/packages/block-email/component/BaseInput.tsx+++ b/js/app/packages/block-email/component/BaseInput.tsx@@ -86,6 +86,7 @@ import {HoverCard,Scroll,SendButton,+ Surface,Tooltip,} from '@ui';import {@@ -880,6 +881,7 @@ export function BaseInput(props: {useHotkeyDOMScope('compose-message');let composeContainerRef: HTMLDivElement | undefined;useTouchOutsideToDismissKeyboard(() => composeContainerRef);+ const [isFocused, setIsFocused] = createSignal(false);const sendEmail = async (markDone = false) => {if (sendMutation.isPending || uploadAttachmentMutation.isPending) return;@@ -1320,11 +1322,20 @@ export function BaseInput(props: {const hasBodyText = () => bodyMacro().trim().length > 0;return (- <div+ <Surface+ class="relative flex flex-col flex-1 rounded-xl max-w-full"+ onFocusOut={(e) => {+ const next = e.relatedTarget as Node | null;+ if (next && e.currentTarget.contains(next)) return;+ setIsFocused(false);+ }}+ onFocusIn={() => setIsFocused(true)}ref={(el) => {composeContainerRef = el;}}- class="relative bg-surface flex flex-col flex-1 border border-ink-muted/8 rounded-xl max-w-full"+ active={isFocused()}+ depth={2}+ solid>{/* Top Bar */}<div class="relative flex items-start gap-2 px-3 pt-1.5 pb-0.5">@@ -1764,6 +1775,6 @@ export function BaseInput(props: {/></div></div>- </div>+ </Surface>);}diff --git a/js/app/packages/channel/Input/ChannelInput.tsx b/js/app/packages/channel/Input/ChannelInput.tsxindex 3f66a5f478..3dc0fac6cb 100644--- a/js/app/packages/channel/Input/ChannelInput.tsx+++ b/js/app/packages/channel/Input/ChannelInput.tsx@@ -179,12 +179,21 @@ export function ChannelInput(props: ChannelInputProps) {},});+ const [isFocused, setIsFocused] = createSignal(false);+return (<Input.Root input={inputState.view()} commands={inputState.commands}><Surface+ onFocusOut={(e) => {+ const next = e.relatedTarget as Node | null;+ if (next && e.currentTarget.contains(next)) return;+ setIsFocused(false);+ }}+ onFocusIn={() => setIsFocused(true)}+ active={isFocused()}+ class="rounded-xl"depth={2}- class="rounded-xl ring-1 ring-edge"- style={{ border: '0' }}+ solid><Input.DropZoneonDragStart={(valid) => inputState.setIsDraggedOver(valid)}diff --git a/js/app/packages/channel/Participants/ParticipantsAddPanel.tsx b/js/app/packages/channel/Participants/ParticipantsAddPanel.tsxindex b500896470..487b58c8b5 100644--- a/js/app/packages/channel/Participants/ParticipantsAddPanel.tsx+++ b/js/app/packages/channel/Participants/ParticipantsAddPanel.tsx@@ -37,7 +37,7 @@ export function ParticipantsAddPanel(props: {return (<div class="flex flex-col gap-2 md:flex-row md:items-center">- <div class="min-w-0 flex-1 rounded-xs border border-edge-muted bg-surface px-3 py-2 text-sm text-ink outline-none focus-within:border-accent/50">+ <div class="min-w-0 flex-1 rounded-lg border border-edge-muted bg-surface px-3 py-2 text-sm text-ink outline-none focus-within:border-accent"><RecipientSelector<'user'>setSelectedOptions={setSelectedUsers}selectedOptions={selectedUsers()}diff --git a/js/app/packages/core/component/AI/component/input/ChatInput.tsx b/js/app/packages/core/component/AI/component/input/ChatInput.tsxindex 75d65c531b..fcd0abf460 100644--- a/js/app/packages/core/component/AI/component/input/ChatInput.tsx+++ b/js/app/packages/core/component/AI/component/input/ChatInput.tsx@@ -53,6 +53,7 @@ export function ChatInput(props: ChatInputComponentProps) {const [attachMenuAnchorRef, setAttachMenuAnchorRef] =createSignal<HTMLDivElement>();const [markdownText, setMarkdownText] = createSignal('');+ const [isFocused, setIsFocused] = createSignal(false);createEffect(() => {const uploaded = uploadQueue.popComplete();@@ -182,12 +183,18 @@ export function ChatInput(props: ChatInputComponentProps) {);return (- <Surface- depth={2}- class="rounded-xl ring-1 ring-edge"- style={{ border: '0' }}- >- <div id="chat-input" ref={containerRef} class="relative flex flex-col">+ <Surface active={isFocused()} class="rounded-xl" depth={2} solid>+ <div+ onFocusOut={(e) => {+ const next = e.relatedTarget as Node | null;+ if (next && containerRef.contains(next)) return;+ setIsFocused(false);+ }}+ onFocusIn={() => setIsFocused(true)}+ class="relative flex flex-col"+ ref={containerRef}+ id="chat-input"+ ><Show when={hasAttachments()}><div class="px-2 pt-2 w-full"><AttachmentListdiff --git a/js/app/packages/theme/components/ThemeTools.tsx b/js/app/packages/theme/components/ThemeTools.tsxindex f45af1b082..5acbae64f4 100644--- a/js/app/packages/theme/components/ThemeTools.tsx+++ b/js/app/packages/theme/components/ThemeTools.tsx@@ -80,10 +80,10 @@ function ThemeTools(props: { class?: string }) {}}}class={cn(- 'rounded-xs py-1.5 px-2 border text-xs outline-none',+ 'rounded-lg py-1.5 px-2 border text-xs outline-none','bg-transparent text-ink-muted border-edge-muted','hover:bg-surface hover:text-ink',- 'focus:bg-surface focus:text-ink',+ 'focus:bg-surface focus:text-ink focus:border-accent','min-w-0 overflow-hidden text-ellipsis',)}style={{diff --git a/js/app/packages/ui/components/ButtonGroup.tsx b/js/app/packages/ui/components/ButtonGroup.tsxindex 12bfcbef4e..0227020688 100644--- a/js/app/packages/ui/components/ButtonGroup.tsx+++ b/js/app/packages/ui/components/ButtonGroup.tsx@@ -82,19 +82,19 @@ export const ButtonGroup = (props: ButtonGroupProps) => {<ButtonGroupContext.Provider value={ctx}><Layer depth={props.depth ?? 0}><div- role="group"data-orientation={orientation()}class={cn(- 'inline-flex overflow-hidden rounded-sm','data-[orientation=horizontal]:flex-row items-center','data-[orientation=vertical]:flex-col justify-center',+ 'inline-flex overflow-hidden rounded-sm',/* strip per-button rounding + borders so the group owns the frame */- '[&_[data-button]]:rounded-none',- '[&_[data-button]]:border-0',- sizeClass(),+ '**:data-button:rounded-none',+ '**:data-button:border-0',groupVariantStyles[variant()],+ sizeClass(),props.class)}+ role="group">{props.children}</div>diff --git a/js/app/packages/ui/components/Surface.tsx b/js/app/packages/ui/components/Surface.tsxindex c6433269b1..faf8f3b173 100644--- a/js/app/packages/ui/components/Surface.tsx+++ b/js/app/packages/ui/components/Surface.tsx@@ -7,6 +7,7 @@ export type SurfaceProps = Omit<JSX.HTMLAttributes<HTMLDivElement>, 'style'> & {style?: JSX.CSSProperties;highlightColor?: string;active?: boolean;+ solid?: boolean;};export function Surface(props: SurfaceProps) {@@ -14,16 +15,24 @@ export function Surface(props: SurfaceProps) {'highlightColor','children','active',+ 'solid','depth','class','style',]);+ const border = () => {+ const edge = 'var(--b4)';+ const top = local.active ? local.highlightColor ?? 'var(--a0)' : edge;+ const bottom = local.active && !local.solid ? `${edge} 80%` : top;+ return `linear-gradient(${top}, ${bottom})`;+ };+return (<Layer depth={local.depth ?? 0}><divstyle={{- 'background-image': local.active ? `linear-gradient(var(--b0), var(--b0)), linear-gradient(${local.highlightColor || 'var(--a0)'}, var(--b4) 80%)` : 'linear-gradient(var(--b0), var(--b0)), linear-gradient(var(--b4), var(--b4))',+ 'background-image': `linear-gradient(var(--b0), var(--b0)), ${border()}`,'background-origin': 'padding-box, border-box','background-clip': 'padding-box, border-box','border': '1px solid #0000',diff --git a/js/app/packages/ui/index.ts b/js/app/packages/ui/index.tsindex 7b0d82dbaf..bb8719b4a4 100644--- a/js/app/packages/ui/index.ts+++ b/js/app/packages/ui/index.ts@@ -2,29 +2,28 @@export { SegmentedControl } from './components/SegmentedControl';export { TabbedControl } from './components/TabbedControl';export { Avatar, AvatarGroup } from './components/Avatar';+export { LogoProgress } from './components/LogoProgress';export { ToggleSwitch } from './components/ToggleSwitch';export { ButtonGroup } from './components/ButtonGroup';-export { ChatInput } from './components/ChatInput';+export { SendButton } from './components/SendButton';export { HoverCard } from './components/HoverCard';export { Dropdown } from './components/Dropdown';export { Surface } from './components/Surface';export { Tooltip } from './components/Tooltip';export { Dialog } from './components/Dialog';export { Button } from './components/Button';-export { SendButton } from './components/SendButton';export { Hotkey } from './components/Hotkey';export { Scroll } from './components/Scroll';export { Panel } from './components/Panel';-export { LogoProgress } from './components/LogoProgress';export { Layer } from './components/Layer';/* types */export type { AvatarSize, AvatarProps, AvatarGroupSize, AvatarGroupProps } from './components/Avatar';+export type { ChatInputRows, ChatInputProps } from './components/ChatInput';export type { ToggleSwitchProps } from './components/ToggleSwitch';-export type { ButtonProps } from './components/Button';export type { SendButtonProps } from './components/SendButton';+export type { ButtonProps } from './components/Button';export type { DialogProps } from './components/Dialog';-export type { ChatInputRows, ChatInputProps } from './components/ChatInput';/* utils */export { cn } from './utils/classname';