Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix(style): tweak macro light and fix some btn styles (#3215)

Seamus584e9aa36d1c
diff --git a/js/app/packages/app/component/ChatWithAgentButton.tsx b/js/app/packages/app/component/ChatWithAgentButton.tsx
index 79018db7b3..69f68c2d3d 100644
--- a/js/app/packages/app/component/ChatWithAgentButton.tsx
+++ b/js/app/packages/app/component/ChatWithAgentButton.tsx
@@ -95,8 +95,8 @@ export function ChatWithAgentButton(props: { entity: ChatWithAgentEntity }) {
onMouseEnter={() => setHovering(true)}
onMouseLeave={() => setHovering(false)}
onClick={() => openChatWithAgent(props.entity)}
- depth={3}
- class="bg-panel shadow shadow-drop-shadow"
+ depth={2}
+ class="bg-panel text-ink-muted"
>
<AnimatedStarIcon triggerAnimation={hovering()} />
<span class="text-xs">Chat</span>
diff --git a/js/app/packages/app/component/PreviewPanel.tsx b/js/app/packages/app/component/PreviewPanel.tsx
index 57c17b756b..71ad9c3b09 100644
--- a/js/app/packages/app/component/PreviewPanel.tsx
+++ b/js/app/packages/app/component/PreviewPanel.tsx
@@ -18,7 +18,6 @@ import {
SplitPanelContext,
type SplitPanelContextType,
} from './split-layout/context';
-import { useSplitPanelOrThrow } from './split-layout/layoutUtils';
export const [PreviewPanelContext, useMaybePreviewPanel] =
createContextProvider(
@@ -42,7 +41,6 @@ const PreviewPanelContent: Component<NonNullableFields<PreviewPanel>> = (
props
) => {
let scopedSplitPanelContextType: SplitPanelContextType = {} as any;
- const splitPanelContext = useSplitPanelOrThrow();
const scopedLayoutRefs: SplitPanelContextType['layoutRefs'] = {
...props.splitPanelContext.layoutRefs,
};
@@ -150,23 +148,18 @@ const PreviewPanelContent: Component<NonNullableFields<PreviewPanel>> = (
{/* Preview-specific toolbar slots so blocks can render the "share" bar (via SplitToolbarLeft/Right) */}
<div
class="relative w-full flex items-center justify-between shrink-0 h-10 bg-panel px-2 border-b border-edge-muted"
- classList={{
- // In spotlight/fullscreen, avoid hugging the screen edge
- 'pl-2': splitPanelContext.handle.isSpotLight(),
- 'pl-1': !splitPanelContext.handle.isSpotLight(),
- }}
data-preview-split-toolbar
>
<div
// In preview mode, anchor left-side controls (e.g. file menu) to the top-left
// so the dropdown doesn't feel like it's "hanging" from the middle of the bar.
- class="flex h-full items-center"
+ class="flex h-full items-center gap-1"
ref={(ref) => {
scopedLayoutRefs.toolbarLeft = ref;
}}
/>
<div
- class="flex h-full items-center"
+ class="flex h-full items-center gap-1"
ref={(ref) => {
scopedLayoutRefs.toolbarRight = ref;
}}
diff --git a/js/app/packages/app/component/split-layout/components/SplitToolbar.tsx b/js/app/packages/app/component/split-layout/components/SplitToolbar.tsx
index e9a9d1b6fe..05a9f941d8 100644
--- a/js/app/packages/app/component/split-layout/components/SplitToolbar.tsx
+++ b/js/app/packages/app/component/split-layout/components/SplitToolbar.tsx
@@ -53,13 +53,13 @@ export function SplitToolbar(props: { ref: Setter<HTMLDivElement | null> }) {
ref={props.ref}
>
<div
- class="flex-1 h-full flex items-center gap-0.5 px-2"
+ class="flex-1 h-full flex items-center gap-1 px-2"
ref={(ref) => {
panel.layoutRefs.toolbarLeft = ref;
}}
/>
<div
- class="flex h-full items-center gap-0.5 px-2"
+ class="flex h-full items-center gap-1 px-2"
ref={(ref) => {
panel.layoutRefs.toolbarRight = ref;
}}
diff --git a/js/app/packages/block-email/component/TopBar.tsx b/js/app/packages/block-email/component/TopBar.tsx
index e3d1d412a1..98ff852e93 100644
--- a/js/app/packages/block-email/component/TopBar.tsx
+++ b/js/app/packages/block-email/component/TopBar.tsx
@@ -36,6 +36,7 @@ import { AnimatedTaskIcon } from '@macro-icons/wide/animating/task';
import IconShared from '@macro-icons/wide/share.svg';
import ArrowCounterClockwise from '@phosphor-icons/core/regular/arrow-counter-clockwise.svg?component-solid';
import { useEmailLinksQuery } from '@queries/email/link';
+import { Button } from '@ui';
import { createSignal } from 'solid-js';
import { useEmailContext } from './EmailContext';
import {
@@ -170,19 +171,19 @@ export function TopBar(props: {
buttonComponent: () => {
const [hovering, setHovering] = createSignal(false);
return (
- <div class="border border-edge-muted flex items-stretch rounded-xs">
- <button
- class="h-7 px-2 flex items-center gap-1 text-xs hover:bg-hover hover-transition-bg"
- onMouseEnter={() => setHovering(true)}
- onMouseLeave={() => setHovering(false)}
- onClick={openTaskCompose}
- >
- <div class="size-4">
- <AnimatedTaskIcon triggerAnimation={hovering()} />
- </div>
- <span class="text-ink">Task</span>
- </button>
- </div>
+ <Button
+ tooltip="Create Task"
+ variant="base"
+ size="sm"
+ onMouseEnter={() => setHovering(true)}
+ onMouseLeave={() => setHovering(false)}
+ onClick={openTaskCompose}
+ depth={2}
+ class="bg-panel text-ink-muted"
+ >
+ <AnimatedTaskIcon triggerAnimation={hovering()} />
+ <span class="text-xs text-ink-extra-muted">Task</span>
+ </Button>
);
},
},
diff --git a/js/app/packages/block-md/component/DispatchAgentMenu.tsx b/js/app/packages/block-md/component/DispatchAgentMenu.tsx
index 6bc19ba455..4d998ff959 100644
--- a/js/app/packages/block-md/component/DispatchAgentMenu.tsx
+++ b/js/app/packages/block-md/component/DispatchAgentMenu.tsx
@@ -194,17 +194,21 @@ export function DispatchAgentButton() {
<ButtonGroup
variant="base"
size="icon-sm"
- depth={3}
- class="mx-1 bg-panel"
+ depth={2}
+ class="bg-panel text-ink-muted"
>
- <Button onClick={handlePrimaryClick} tooltip={lastUsed().name}>
+ <Button
+ onClick={handlePrimaryClick}
+ tooltip={lastUsed().name}
+ class="text-ink-muted"
+ >
<Dynamic
component={lastUsed().buttonIcon ?? lastUsed().icon}
class="size-3!"
/>
</Button>
<ButtonGroup.Divider />
- <DropdownMenu.Trigger as={Button} class="p-1">
+ <DropdownMenu.Trigger as={Button} class="p-1 text-ink-muted">
<CaretDown class="size-3.5!" />
</DropdownMenu.Trigger>
</ButtonGroup>
diff --git a/js/app/packages/block-md/component/FormatTools.tsx b/js/app/packages/block-md/component/FormatTools.tsx
index 83ae81eef5..f017055448 100644
--- a/js/app/packages/block-md/component/FormatTools.tsx
+++ b/js/app/packages/block-md/component/FormatTools.tsx
@@ -197,7 +197,7 @@ const InlineFormatButton = (props: {
size="icon-sm"
variant="ghost"
classList={{
- 'bg-ink/10 text-ink': !!props.selection()?.[props.format],
+ 'bg-active text-ink': !!props.selection()?.[props.format],
}}
onClick={(e: MouseEvent | KeyboardEvent) =>
props.onClick(e as MouseEvent)
@@ -252,7 +252,7 @@ export const ElementFormatButton = (props: {
class="rounded-xs"
variant="ghost"
classList={{
- 'bg-ink/10 text-ink': !!props
+ 'bg-active text-ink': !!props
.selection()
?.elementsInRange?.has(props.format),
}}
diff --git a/js/app/packages/core/component/TopBar/ShareButton.tsx b/js/app/packages/core/component/TopBar/ShareButton.tsx
index 830cffe176..1a5db41e4f 100644
--- a/js/app/packages/core/component/TopBar/ShareButton.tsx
+++ b/js/app/packages/core/component/TopBar/ShareButton.tsx
@@ -1267,7 +1267,7 @@ export function ShareTrigger(props: { copyLink?: () => void }) {
.otherwise(() => 'This item has been shared with you');
return (
- <ButtonGroup variant="base" size="sm" class="ml-1 bg-panel" depth={3}>
+ <ButtonGroup variant="base" size="sm" class="bg-panel" depth={2}>
<Tooltip label={shareAccessTooltip()}>
<Button
onClick={() => {
@@ -1278,6 +1278,7 @@ export function ShareTrigger(props: { copyLink?: () => void }) {
shareCtx.open();
}
}}
+ class="text-ink-muted"
>
<IconShared />
Share
@@ -1290,6 +1291,7 @@ export function ShareTrigger(props: { copyLink?: () => void }) {
tooltip="Copy Share Link"
size="icon-sm"
onClick={ShareLinkAction().action}
+ class="text-ink-muted"
>
<Dynamic component={ShareLinkAction().icon} class="size-3.5!" />
</Button>
diff --git a/js/app/packages/theme/constants.ts b/js/app/packages/theme/constants.ts
index 5252f240fc..6db4f5bc7c 100644
--- a/js/app/packages/theme/constants.ts
+++ b/js/app/packages/theme/constants.ts
@@ -31,7 +31,7 @@ export const DEFAULT_THEMES = [
id: 'Groove',
name: 'Groove',
version: 2,
- depth: 0.07,
+ depth: 0.08,
tokens: {
a0: { l: 0.85, c: 0.34, h: 46 },
a1: { l: 0.85, c: 0.34, h: 86 },
@@ -54,7 +54,7 @@ export const DEFAULT_THEMES = [
id: 'Macro Light',
name: 'Macro Light',
version: 2,
- depth: 0.055,
+ depth: 0.09,
tokens: {
a0: { l: 0.65, c: 0.20, h: 59 },
a1: { l: 0.65, c: 0.20, h: 99 },
@@ -62,10 +62,10 @@ export const DEFAULT_THEMES = [
a3: { l: 0.65, c: 0.20, h: 179 },
a4: { l: 0.65, c: 0.20, h: 219 },
b0: { l: 0.96, c: 0.00, h: 59 },
- b1: { l: 0.94, c: 0.00, h: 59 },
- b2: { l: 0.92, c: 0.00, h: 59 },
- b3: { l: 0.92, c: 0.00, h: 59 },
- b4: { l: 0.90, c: 0.00, h: 59 },
+ b1: { l: 0.92, c: 0.00, h: 59 },
+ b2: { l: 0.89, c: 0.00, h: 59 },
+ b3: { l: 0.93, c: 0.00, h: 59 },
+ b4: { l: 0.85, c: 0.00, h: 59 },
c0: { l: 0.14, c: 0.00, h: 59 },
c1: { l: 0.40, c: 0.00, h: 59 },
c2: { l: 0.55, c: 0.00, h: 59 },
@@ -85,8 +85,8 @@ export const DEFAULT_THEMES = [
a3: { l: 0.75, c: 0.20, h: 179 },
a4: { l: 0.75, c: 0.20, h: 219 },
b0: { l: 0.14, c: 0.00, h: 59 },
- b1: { l: 0.16, c: 0.00, h: 59 },
- b2: { l: 0.18, c: 0.00, h: 59 },
+ b1: { l: 0.22, c: 0.00, h: 59 },
+ b2: { l: 0.32, c: 0.00, h: 59 },
b3: { l: 0.20, c: 0.00, h: 59 },
b4: { l: 0.26, c: 0.00, h: 59 },
c0: { l: 0.95, c: 0.00, h: 59 },
diff --git a/js/app/packages/ui/components/Button.tsx b/js/app/packages/ui/components/Button.tsx
index 3a4dc7f932..19b6705885 100644
--- a/js/app/packages/ui/components/Button.tsx
+++ b/js/app/packages/ui/components/Button.tsx
@@ -37,7 +37,7 @@ const sizeStyles: Record<ButtonSize, string> = {
'sm': 'h-6 px-2 [&_:where(svg)]:size-4 gap-1 text-xs ',
'icon-lg': 'size-11 p-2 [&_:where(svg)]:size-7 ', /* unused */
'icon-md': 'size-9 p-1.5 [&_:where(svg)]:size-6 ',
- 'icon-sm': 'size-6 p-1 [&_:where(svg)]:size-4 ',
+ 'icon-sm': 'size-6 p-0.5 [&_:where(svg)]:size-5 ',
};
export const Button = (props: ButtonProps) => {
@@ -69,7 +69,7 @@ export const Button = (props: ButtonProps) => {
const placement = () => local.tooltipPlacement ?? 'bottom';
const button = () => (
- <KobalteButton class={cls()} {...others}>
+ <KobalteButton data-button class={cls()} {...others}>
{local.children}
</KobalteButton>
);