+ <>
{imgUrl && (
{icon}}
- {typeof title === 'string' ?
{title}
: title}
+ {typeof title === 'string' ? (
+
{title}
+ ) : (
+ title
+ )}
{(children || description) && (
{description}
@@ -102,21 +150,23 @@ const CardButton = ({
group-hover:text-foreground
"
>
- {loading ?
:
}
+ {loading ? (
+
+ ) : !hideChevron ? (
+
+ ) : (
+ <>>
+ )}
)}
-
+ >
)
- if (onClick) {
- return
{contents}
- } else if (linkHref) {
- return
{contents}
- } else if (url) {
- return
{contents}
- } else {
- return
{contents}
- }
+ return (
+
+ {contents}
+
+ )
}
export default CardButton
diff --git a/apps/studio/styles/monaco.scss b/apps/studio/styles/monaco.scss
index 642bc197a1d..a1a4d279935 100644
--- a/apps/studio/styles/monaco.scss
+++ b/apps/studio/styles/monaco.scss
@@ -3,6 +3,17 @@
-webkit-text-size-adjust: 100%;
}
+.monaco-editor,
+.monaco-diff-editor {
+ --vscode-editor-background: hsl(var(--background-surface-200)) !important;
+ --vscode-editorGutter-background: hsl(var(--background-surface-200)) !important;
+}
+
+.gutter {
+ @apply bg-border-control;
+ cursor: row-resize;
+}
+
.grid-monaco-editor,
.monaco-editor p,
label,
diff --git a/packages/config/tailwind.config.js b/packages/config/tailwind.config.js
index 8216cb3a840..2b22ef02a20 100644
--- a/packages/config/tailwind.config.js
+++ b/packages/config/tailwind.config.js
@@ -87,7 +87,7 @@ function kebabToNested(obj) {
*/
const uiConfig = ui({
mode: 'JIT',
- darkMode: [ 'class', '[data-theme*="dark"]' ],
+ darkMode: ['class', '[data-theme*="dark"]'],
theme: {
/**
* Spread all theme colors and custom generated colors into theme
@@ -102,7 +102,7 @@ const uiConfig = ui({
/*
* custom background re-maps
*/
- "studio": `hsl(var(--background-200)/
)`
+ studio: `hsl(var(--background-200)/ )`,
}),
borderColor: (theme) => ({
...theme('colors'),
@@ -361,8 +361,8 @@ const uiConfig = ui({
xs: '480px',
},
fontFamily: {
- sans: [ 'Circular', 'custom-font', 'Helvetica Neue', 'Helvetica', 'Arial', 'sans-serif' ],
- mono: [ 'Office Code Pro', 'Source Code Pro', 'Menlo', 'monospace' ],
+ sans: ['Circular', 'custom-font', 'Helvetica Neue', 'Helvetica', 'Arial', 'sans-serif'],
+ mono: ['Office Code Pro', 'Source Code Pro', 'Menlo', 'monospace'],
},
// shadcn defaults START
@@ -376,6 +376,15 @@ const uiConfig = ui({
'flash-code': 'flash-code 1s forwards',
'flash-code-slow': 'flash-code 2s forwards',
},
+ borderRadius: {
+ // lg: `var(--radius)`,
+ // md: `calc(var(--radius) - 2px)`,
+ // sm: 'calc(var(--radius) - 4px)',
+ panel: '6px',
+ },
+ padding: {
+ content: '21px',
+ },
// borderRadius: {
// lg: `var(--radius)`,
// md: `calc(var(--radius) - 2px)`,
@@ -397,8 +406,8 @@ const uiConfig = ui({
// shadcn defaults END
},
},
- plugins: [ require('@tailwindcss/typography'), require('tailwindcss-animate') ],
-});
+ plugins: [require('@tailwindcss/typography'), require('tailwindcss-animate')],
+})
function arrayMergeFn(destinationArray, sourceArray) {
return destinationArray.concat(sourceArray).reduce((acc, cur) => {
diff --git a/packages/ui/index.tsx b/packages/ui/index.tsx
index 77b83b88a65..0c5d85b1f4f 100644
--- a/packages/ui/index.tsx
+++ b/packages/ui/index.tsx
@@ -174,6 +174,8 @@ export { Checkbox as Checkbox_Shadcn_ } from './src/components/shadcn/ui/checkbo
export * from './src/components/shadcn/ui/scroll-area'
+export * from './src/components/shadcn/ui/hover-card'
+
export {
Collapsible as Collapsible_Shadcn_,
CollapsibleTrigger as CollapsibleTrigger_Shadcn_,
diff --git a/packages/ui/src/components/CodeBlock/CodeBlock.tsx b/packages/ui/src/components/CodeBlock/CodeBlock.tsx
index 4147132f810..f94469634e1 100644
--- a/packages/ui/src/components/CodeBlock/CodeBlock.tsx
+++ b/packages/ui/src/components/CodeBlock/CodeBlock.tsx
@@ -2,7 +2,7 @@ import { Children } from 'react'
import * as CopyToClipboard from 'react-copy-to-clipboard'
import { Light as SyntaxHighlighter } from 'react-syntax-highlighter'
import { monokaiCustomTheme } from './CodeBlock.utils'
-import { Button, IconCheck, IconCopy } from 'ui'
+import { Button, IconCheck, IconCopy, cn } from 'ui'
import js from 'react-syntax-highlighter/dist/cjs/languages/hljs/javascript'
import ts from 'react-syntax-highlighter/dist/cjs/languages/hljs/typescript'
@@ -97,12 +97,12 @@ export const CodeBlock = ({
wrapLines={true}
// @ts-ignore
style={monokaiTheme}
- className={[
- 'code-block border p-4 w-full !my-0 !bg-surface-100',
+ className={cn(
+ 'code-block border border-surface p-4 w-full !my-0 bg-surface-100',
`${!title ? '!rounded-md' : '!rounded-t-none !rounded-b-md'}`,
`${!showLineNumbers ? 'pl-6' : ''}`,
- className,
- ].join(' ')}
+ className
+ )}
customStyle={{
fontSize: large ? 18 : 13,
lineHeight: large ? 1.5 : 1.4,
diff --git a/packages/ui/src/components/CodeBlock/CodeBlock.utils.ts b/packages/ui/src/components/CodeBlock/CodeBlock.utils.ts
index 2699a1793dd..d3d5f7a0e4b 100644
--- a/packages/ui/src/components/CodeBlock/CodeBlock.utils.ts
+++ b/packages/ui/src/components/CodeBlock/CodeBlock.utils.ts
@@ -3,7 +3,6 @@ export const monokaiCustomTheme = (isDarkMode: boolean) => {
hljs: {
display: 'block',
overflowX: 'auto',
- background: '#272822',
color: isDarkMode ? '#ddd' : '#888',
},
'hljs-tag': {
diff --git a/packages/ui/src/components/shadcn/ui/hover-card.tsx b/packages/ui/src/components/shadcn/ui/hover-card.tsx
index 264e2f1d3ad..450c73581ca 100644
--- a/packages/ui/src/components/shadcn/ui/hover-card.tsx
+++ b/packages/ui/src/components/shadcn/ui/hover-card.tsx
@@ -11,14 +11,19 @@ const HoverCardTrigger = HoverCardPrimitive.Trigger
const HoverCardContent = React.forwardRef<
React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (
+ React.ComponentPropsWithoutRef & {
+ animate?: 'zoom-in' | 'slide-in'
+ }
+>(({ className, align = 'center', animate = 'zoom-in', sideOffset = 4, ...props }, ref) => (
-
+
{children}
diff --git a/packages/ui/src/components/shadcn/ui/tabs/tabs.tsx b/packages/ui/src/components/shadcn/ui/tabs/tabs.tsx
index e03fe897c81..1835b67428c 100644
--- a/packages/ui/src/components/shadcn/ui/tabs/tabs.tsx
+++ b/packages/ui/src/components/shadcn/ui/tabs/tabs.tsx
@@ -13,7 +13,7 @@ const TabsList = React.forwardRef<
>(({ className, ...props }, ref) => (
))
diff --git a/packages/ui/src/components/shadcn/ui/tooltip.tsx b/packages/ui/src/components/shadcn/ui/tooltip.tsx
index c3e1d788696..064661c5c08 100644
--- a/packages/ui/src/components/shadcn/ui/tooltip.tsx
+++ b/packages/ui/src/components/shadcn/ui/tooltip.tsx
@@ -7,7 +7,9 @@ import { cn } from '../../../lib/utils/cn'
const TooltipProvider = TooltipPrimitive.Provider
-const Tooltip = TooltipPrimitive.Root
+const Tooltip = (props: React.ComponentPropsWithoutRef) => (
+
+)
const TooltipTrigger = TooltipPrimitive.Trigger
@@ -18,11 +20,11 @@ const TooltipContent = React.forwardRef<
))
TooltipContent.displayName = TooltipPrimitive.Content.displayName