A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
fix: move accent -> primary, and update accent (#76)
Myles Scolnickcc781ccd561f
diff --git a/frontend/src/components/ui/button.tsx b/frontend/src/components/ui/button.tsxindex 843ff8c578..f020ca864f 100644--- a/frontend/src/components/ui/button.tsx+++ b/frontend/src/components/ui/button.tsx@@ -13,7 +13,7 @@ const buttonVariants = cva(variants: {variant: {default: cn(- "bg-accent text-accent-foreground hover:bg-accent/90 shadow-smSolid border border-accent",+ "bg-primary text-primary-foreground hover:bg-primary/90 shadow-smSolid border border-primary",activeCommon),destructive: cn(@@ -55,11 +55,11 @@ const buttonVariants = cva(),text: cn("opacity-60 hover:opacity-100", "active:opacity-100"),ghost: cn(- "hover:bg-accent/90 hover:text-accent-foreground hover:shadow-smSolid border border-transparent",+ "hover:bg-accent hover:text-accent-foreground hover:shadow-smSolid border border-transparent",activeCommon,"active:text-accent-foreground"),- link: "underline-offset-4 hover:underline text-primary",+ link: "underline-offset-4 hover:underline text-link",},size: {default: "h-10 py-2 px-4",diff --git a/frontend/src/components/ui/checkbox.tsx b/frontend/src/components/ui/checkbox.tsxindex 87cfe0c1c0..c635cdd429 100644--- a/frontend/src/components/ui/checkbox.tsx+++ b/frontend/src/components/ui/checkbox.tsx@@ -12,7 +12,7 @@ const Checkbox = React.forwardRef<<CheckboxPrimitive.Rootref={ref}className={cn(- "peer h-4 w-4 shrink-0 rounded-sm border border-accent ring-offset-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-accent data-[state=checked]:text-primary-foreground",+ "peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",className)}{...props}diff --git a/frontend/src/components/ui/combobox.tsx b/frontend/src/components/ui/combobox.tsxindex d63a29eeaf..915a7e7e53 100644--- a/frontend/src/components/ui/combobox.tsx+++ b/frontend/src/components/ui/combobox.tsx@@ -147,7 +147,7 @@ export const Combobox = <TValue,>({<Popover open={open} onOpenChange={setOpen}><PopoverTrigger asChild={true}><div- className="flex h-6 w-fit mb-1 shadow-xsSolid items-center justify-between rounded-sm border border-input bg-transparent px-2 text-sm font-prose ring-offset-background placeholder:text-muted-foreground hover:shadow-smSolid focus:outline-none focus:ring-1 focus:ring-ring focus:border-accent focus:shadow-mdSolid disabled:cursor-not-allowed disabled:opacity-50"+ className="flex h-6 w-fit mb-1 shadow-xsSolid items-center justify-between rounded-sm border border-input bg-transparent px-2 text-sm font-prose ring-offset-background placeholder:text-muted-foreground hover:shadow-smSolid focus:outline-none focus:ring-1 focus:ring-ring focus:border-primary focus:shadow-mdSolid disabled:cursor-not-allowed disabled:opacity-50"aria-expanded={open}>{renderValue()} <ChevronDownIcon className="ml-3 w-4 h-4" />diff --git a/frontend/src/components/ui/command.tsx b/frontend/src/components/ui/command.tsxindex 5a504f67da..48271b81b2 100644--- a/frontend/src/components/ui/command.tsx+++ b/frontend/src/components/ui/command.tsx@@ -124,7 +124,7 @@ const CommandItem = React.forwardRef<<CommandPrimitive.Itemref={ref}className={cn(- "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-[var(--blue-3)] aria-selected:text-[var(--blue-12)]-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",+ "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",className)}{...props}diff --git a/frontend/src/components/ui/dropdown-menu.tsx b/frontend/src/components/ui/dropdown-menu.tsxindex aa0015ea0b..28ab3d10a2 100644--- a/frontend/src/components/ui/dropdown-menu.tsx+++ b/frontend/src/components/ui/dropdown-menu.tsx@@ -82,7 +82,7 @@ const DropdownMenuItem = React.forwardRef<<DropdownMenuPrimitive.Itemref={ref}className={cn(- "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-[var(--blue-3)] focus:text-[var(--blue-12)]-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",+ "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",inset && "pl-8",className)}@@ -98,7 +98,7 @@ const DropdownMenuCheckboxItem = React.forwardRef<<DropdownMenuPrimitive.CheckboxItemref={ref}className={cn(- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-[var(--blue-3)] focus:text-[var(--blue-12)]-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",+ "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",className)}checked={checked}@@ -122,7 +122,7 @@ const DropdownMenuRadioItem = React.forwardRef<<DropdownMenuPrimitive.RadioItemref={ref}className={cn(- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",+ "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-primary focus:text-primary-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",className)}{...props}diff --git a/frontend/src/components/ui/input.tsx b/frontend/src/components/ui/input.tsxindex 576d035a8b..f6cd79cea2 100644--- a/frontend/src/components/ui/input.tsx+++ b/frontend/src/components/ui/input.tsx@@ -21,7 +21,7 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(<inputtype={type}className={cn(- "flex h-6 w-full mb-1 rounded-sm shadow-xsSolid border border-input bg-transparent px-1.5 py-1 text-sm font-code ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground hover:shadow-smSolid focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:border-accent focus-visible:shadow-mdSolid disabled:cursor-not-allowed disabled:opacity-50",+ "flex h-6 w-full mb-1 rounded-sm shadow-xsSolid border border-input bg-transparent px-1.5 py-1 text-sm font-code ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground hover:shadow-smSolid focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:border-primary focus-visible:shadow-mdSolid disabled:cursor-not-allowed disabled:opacity-50",icon && "pl-7",className)}diff --git a/frontend/src/components/ui/native-select.tsx b/frontend/src/components/ui/native-select.tsxindex a60e1bc852..bb54f4b6b0 100644--- a/frontend/src/components/ui/native-select.tsx+++ b/frontend/src/components/ui/native-select.tsx@@ -10,7 +10,7 @@ const NativeSelect = React.forwardRef<<selectref={ref}className={cn(- "flex h-6 w-fit mb-1 shadow-xsSolid items-center justify-between rounded-sm border border-input bg-transparent px-2 text-sm font-prose ring-offset-background placeholder:text-muted-foreground hover:shadow-smSolid focus:outline-none focus:ring-1 focus:ring-ring focus:border-accent focus:shadow-mdSolid disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer",+ "flex h-6 w-fit mb-1 shadow-xsSolid items-center justify-between rounded-sm border border-input bg-transparent px-2 text-sm font-prose ring-offset-background placeholder:text-muted-foreground hover:shadow-smSolid focus:outline-none focus:ring-1 focus:ring-ring focus:border-primary focus:shadow-mdSolid disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer",className)}{...props}diff --git a/frontend/src/components/ui/radio-group.tsx b/frontend/src/components/ui/radio-group.tsxindex 8a9b8bdf1b..c9f5436a91 100644--- a/frontend/src/components/ui/radio-group.tsx+++ b/frontend/src/components/ui/radio-group.tsx@@ -27,13 +27,13 @@ const RadioGroupItem = React.forwardRef<<RadioGroupPrimitive.Itemref={ref}className={cn(- "h-[16px] w-[16px] transition-shadow data-[state=unchecked]:shadow-xsSolid rounded-full border border-input text-primary ring-offset-background focus:outline-none focus:shadow-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-accent data-[state=checked]:shadow-none",+ "h-[16px] w-[16px] transition-shadow data-[state=unchecked]:shadow-xsSolid rounded-full border border-input text-primary ring-offset-background focus:outline-none focus:shadow-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary data-[state=checked]:shadow-none",className)}{...props}><RadioGroupPrimitive.Indicator className="flex items-center justify-center">- <Circle className="h-[10px] w-[10px] fill-accent text-current" />+ <Circle className="h-[10px] w-[10px] fill-primary text-current" /></RadioGroupPrimitive.Indicator></RadioGroupPrimitive.Item>);diff --git a/frontend/src/components/ui/switch.tsx b/frontend/src/components/ui/switch.tsxindex 8c90860937..2a6eec2488 100644--- a/frontend/src/components/ui/switch.tsx+++ b/frontend/src/components/ui/switch.tsx@@ -6,7 +6,7 @@ import { cn } from "@/lib/utils";import { cva, VariantProps } from "class-variance-authority";const switchVariants = cva(- "peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-accent data-[state=unchecked]:bg-input",+ "peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",{variants: {size: {diff --git a/frontend/src/css/App.css b/frontend/src/css/App.cssindex f17dceca5d..c4bbf92456 100644--- a/frontend/src/css/App.css+++ b/frontend/src/css/App.css@@ -26,20 +26,20 @@ html {0px 0px 2px 0px hsl(0deg 0% 25% / 50%);--light-shadow-stale: 4px 4px 0px 0px var(--stale-color),0px 0px 4px 0px var(--stale-color);- --light-shadow-error: 4px 4px 0px 0px hsl(var(--error) / 80%),- 0px 0px 2px 0px hsl(var(--error) / 80%);+ --light-shadow-error: 4px 4px 0px 0px var(--red-8),+ 0px 0px 2px 0px var(--red-8);--medium-shadow: 4px 4px 0px 0px var(--base-shadow),0px 0px 4px 0px hsl(0deg 0% 60% / 50%);--medium-shadow-stale: 6px 6px 0px 0px var(--stale-color),0px 0px 4px 0px var(--stale-color);- --medium-shadow-error: 6px 6px 0px 0px hsl(var(--error) / 80%),- 0px 0px 2px 0px hsl(var(--error) / 80%);+ --medium-shadow-error: 6px 6px 0px 0px var(--red-8),+ 0px 0px 2px 0px var(--red-8);--heavy-shadow: 5px 6px 0px 0px var(--base-shadow),0px 0px 4px 0px hsl(0deg 0% 75% / 50%);--heavy-shadow-stale: 7px 8px 0px 0px var(--stale-color),0px 0px 4px 0px var(--stale-color);- --heavy-shadow-error: 7px 8px 0px 0px hsl(var(--error) / 80%),- 0px 0px 2px 0px hsl(var(--error) / 80%);+ --heavy-shadow-error: 7px 8px 0px 0px var(--red-8),+ 0px 0px 2px 0px var(--red-8);--monospace-font: "Fira Mono";--text-font: "PT Sans", sans-serif;}diff --git a/frontend/src/css/Cell.css b/frontend/src/css/Cell.cssindex 2db7b4ab26..dd4ed10811 100644--- a/frontend/src/css/Cell.css+++ b/frontend/src/css/Cell.css@@ -474,7 +474,7 @@}.marimo-error a {- color: hsl(var(--link));+ @apply text-link;}.output > * {@@ -499,8 +499,9 @@.marimo-error,.stderr {- color: hsl(var(--error));font-weight: bold;++ @apply text-error;}.marimo-error {diff --git a/frontend/src/css/globals.css b/frontend/src/css/globals.cssindex a4f3986f2e..b77860cee9 100644--- a/frontend/src/css/globals.css+++ b/frontend/src/css/globals.css@@ -25,27 +25,32 @@@layer base {:root {+ /* Radix light colors for reference: https://github.com/radix-ui/colors/blob/main/src/light.ts */+--background: 0 0% 100%;--foreground: 222.2 47.4% 11.2%;+--muted: 210 40% 96.1%;--muted-foreground: 215.4 16.3% 46.9%;+--popover: 0 0% 100%;--popover-foreground: 222.2 47.4% 11.2%;+--card: 0 0% 100%;--card-foreground: 222.2 47.4% 11.2%;+--border: 214.3 31.8% 91.4%;- /* tailwind slate-400 */- --input: 0 0% 64%;- --primary: 222.2 47.4% 25%;+ --input: 0 0% 64%; /* tailwind slate-400 */++ --primary: 208 93.5% 47.4%; /* blue-10 */--primary-foreground: 210 40% 98%;+--secondary: 210 40% 96.1%;--secondary-foreground: 222.2 47.4% 11.2%;- /* tailwind blue-500 */- --accent: 217 91% 60%;- /* white */- --accent-foreground: 100 100% 100%;+ --accent: 209 100% 96.5%; /* blue-3 */+ --accent-foreground: 211 90% 42%; /* blue-11 */--destructive: 0 100% 70%;--destructive-foreground: 210 40% 98%;@@ -57,11 +62,8 @@--action-hover: 54 100% 86.7%;--action-foreground: 42 100% 29%;- /* tailwind blue-600 */- --link: 221 83% 53%;-- /* tailwind violet-600 */- --link-visited: 262 83% 58%;+ --link: 211 90% 42% /* blue-11 */;+ --link-visited: 272 51% 54% /* purple-9 */;--ring: 215 20.2% 65.1%;--radius: 8px;--base-shadow: hsl(0deg 0% 85% / 40%);@@ -82,50 +84,23 @@}.dark {- /* sage-2 */- --background: 150 7.7% 10.2%;-- /* sage-12 */- --foreground: 155 7% 93%;-- /* sage-3 */- --muted: 151 5.5% 15.2%;-- /* sage-11 */- --muted-foreground: 155 5% 68.3%;-- /* sage-3 */- --popover: 151 5.5% 15.2%;-- /* sage-11 */- --popover-foreground: 155 5% 68.3%;-- /* sage-3 */- --card: 151 5.5% 15.2%;-- /* sage-11 */- --card-foreground: 155 5% 68.3%;-- /* sage-6 */- --border: 153 3.7% 24.2%;-- /* sage-7 */- --input: 154 3.3% 28.7%;-- /* cyan-3 */- --primary: 193 52.6% 14.1%;-- /* cyan-12 */- --primary-foreground: 190 80% 84%;-- /* sage-12 */- --secondary: 155 7% 93%;-- /* cyan-3 */- --secondary-foreground: 193 51.9% 11.9%;-- /* cyan-7 */- --accent: 192 56.6% 26.5%;+ /* Radix dark colors for reference: https://github.com/radix-ui/colors/blob/main/src/dark.ts */++ --background: 150 7.7% 10.2%; /* sage-2 */+ --foreground: 155 7% 93%; /* sage-12 */+ --muted: 151 5.5% 15.2%; /* sage-3 */+ --muted-foreground: 155 5% 68.3%; /* sage-11 */+ --popover: 151 5.5% 15.2%; /* sage-3 */+ --popover-foreground: 155 5% 68.3%; /* sage-11 */+ --card: 151 5.5% 15.2%; /* sage-3 */+ --card-foreground: 155 5% 68.3%; /* sage-11 */+ --border: 153 3.7% 24.2%; /* sage-6 */+ --input: 154 3.3% 28.7%; /* sage-7 */+ --primary: 193 52.6% 14.1%; /* cyan-3 */+ --primary-foreground: 190 80% 84%; /* cyan-12 */+ --secondary: 155 7% 93%; /* sage-12 */+ --secondary-foreground: 193 51.9% 11.9%; /* cyan-3 */+ --accent: 192 56.6% 26.5%; /* cyan-7 */}}diff --git a/frontend/src/css/table.css b/frontend/src/css/table.cssindex 63d6740c9a..7e7112b7a8 100644--- a/frontend/src/css/table.css+++ b/frontend/src/css/table.css@@ -21,7 +21,7 @@ table.dataframe tbody tr:nth-child(odd) {}table.dataframe tbody tr:nth-child(even) {- background: hsl(var(--card));+ @apply bg-card;}table.dataframe tbody tr:hover {diff --git a/frontend/src/stories/cell.stories.tsx b/frontend/src/stories/cell.stories.tsxindex a45eb7a3ab..252e7820ae 100644--- a/frontend/src/stories/cell.stories.tsx+++ b/frontend/src/stories/cell.stories.tsx@@ -101,3 +101,23 @@ export const StaleOutput: Story = {</div>),};++export const WithError: Story = {+ render: () => (+ <div className="p-20 max-w-4xl">+ <TooltipProvider>+ <Cell+ {...props}+ runElapsedTimeMs={20}+ errored={true}+ output={{+ channel: "output",+ data: "<span class='markdown'><h1>Layout</h1>\n<p><code>marimo</code> provides functions to help you lay out your output, such as\nin rows and columns, accordions, tabs, and callouts. This tutorial\nshows some examples.</p></span>",+ mimetype: "text/html",+ timestamp: "1686863788",+ }}+ />+ </TooltipProvider>+ </div>+ ),+};