From 763755862d4decf816b2e45ba9ea59b0527d0de3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Grandin?= Date: Mon, 19 Jan 2026 17:39:39 +0100 Subject: [PATCH 1/2] refactor(dropdown-menu): update styles for dropdown items and content, enhance CopyToClipboard hover effect, and improve Dropzone and EmptyState components' styling --- .../copy-to-clipboard/copy-to-clipboard.tsx | 2 +- .../dropdown-menu/dropdown-menu.stories.tsx | 14 ++++++++++++-- .../components/dropdown-menu/dropdown-menu.tsx | 16 ++++++++-------- .../ui/src/lib/components/dropzone/dropzone.tsx | 4 ++-- .../lib/components/empty-state/empty-state.tsx | 2 +- .../inputs/input-select/input-select.tsx | 3 ++- .../ui/src/lib/styles/components/select.scss | 3 ++- 7 files changed, 28 insertions(+), 16 deletions(-) diff --git a/libs/shared/ui/src/lib/components/copy-to-clipboard/copy-to-clipboard.tsx b/libs/shared/ui/src/lib/components/copy-to-clipboard/copy-to-clipboard.tsx index 0bbae64c1bb..51f60549ba4 100644 --- a/libs/shared/ui/src/lib/components/copy-to-clipboard/copy-to-clipboard.tsx +++ b/libs/shared/ui/src/lib/components/copy-to-clipboard/copy-to-clipboard.tsx @@ -37,7 +37,7 @@ export function CopyToClipboard({ text, children, className = '' }: CopyToClipbo ...child.props, color: 'green', variant: 'solid', - className: twMerge(child.props.className, 'hover:bg-green-500'), + className: twMerge(child.props.className, 'hover:bg-surface-positive-solidHover'), }, , 'Copied' diff --git a/libs/shared/ui/src/lib/components/dropdown-menu/dropdown-menu.stories.tsx b/libs/shared/ui/src/lib/components/dropdown-menu/dropdown-menu.stories.tsx index ee732e839bd..16b1e04c197 100644 --- a/libs/shared/ui/src/lib/components/dropdown-menu/dropdown-menu.stories.tsx +++ b/libs/shared/ui/src/lib/components/dropdown-menu/dropdown-menu.stories.tsx @@ -7,6 +7,13 @@ import { DropdownMenu } from './dropdown-menu' const Story: Meta = { component: DropdownMenu.Root, title: 'DropdownMenu', + argTypes: { + side: { + control: { type: 'inline-radio' }, + options: ['bottom', 'left', 'right', 'top'], + labels: { bottom: 'down' }, + }, + }, decorators: [ (Story) => (
@@ -18,14 +25,17 @@ const Story: Meta = { export default Story export const Primary = { - render: () => ( + args: { + side: 'bottom', + }, + render: (args: { side: 'bottom' | 'left' | 'right' | 'top' }) => ( - + }>Deploy } color="yellow"> Update diff --git a/libs/shared/ui/src/lib/components/dropdown-menu/dropdown-menu.tsx b/libs/shared/ui/src/lib/components/dropdown-menu/dropdown-menu.tsx index ac461e68e3e..1d98604c9d9 100644 --- a/libs/shared/ui/src/lib/components/dropdown-menu/dropdown-menu.tsx +++ b/libs/shared/ui/src/lib/components/dropdown-menu/dropdown-menu.tsx @@ -5,15 +5,15 @@ import { type ComponentPropsWithoutRef, type ElementRef, type ReactElement, clon import { twMerge } from '@qovery/shared/util-js' const dropdownMenuItemVariants = cva( - ['px-3', 'flex', 'items-center', 'h-8', 'text-sm', 'font-medium', 'rounded-sm', 'outline-none', 'select-none'], + ['px-3', 'flex', 'items-center', 'h-8', 'text-sm', 'font-medium', 'rounded-sm', 'outline-none', 'select-none', 'rounded'], { variants: { color: { brand: [ - 'data-[highlighted]:bg-brand-2', - 'data-[highlighted]:text-brand-11', - 'hover:bg-brand-2', - 'hover:text-brand-11', + 'data-[highlighted]:bg-surface-brand-component', + 'data-[highlighted]:text-brand', + 'hover:bg-surface-brand-component', + 'hover:text-brand', ], red: [ 'data-[highlighted]:bg-surface-negative-component', @@ -29,7 +29,7 @@ const dropdownMenuItemVariants = cva( ], }, disabled: { - true: ['cursor-not-allowed'], + true: ['cursor-not-allowed, hover:bg-transparent, hover:text-neutral-disabled'], false: ['cursor-pointer'], }, }, @@ -67,7 +67,7 @@ const dropdownMenuItemVariants = cva( } ) -const dropdownMenuItemIconVariants = cva(['text-sm', 'mr-3'], { +const dropdownMenuItemIconVariants = cva(['text-sm', 'mr-2'], { variants: { color: { brand: [], @@ -145,7 +145,7 @@ const DropdownMenuContent = forwardRef -
+
{!isDragActive ? (

Click to import your {typeFile} file or drag and drop it

diff --git a/libs/shared/ui/src/lib/components/empty-state/empty-state.tsx b/libs/shared/ui/src/lib/components/empty-state/empty-state.tsx index b1d805a232f..3762d2cd7e2 100644 --- a/libs/shared/ui/src/lib/components/empty-state/empty-state.tsx +++ b/libs/shared/ui/src/lib/components/empty-state/empty-state.tsx @@ -14,7 +14,7 @@ export function EmptyState({ title, description, className, icon, children }: Em return (
diff --git a/libs/shared/ui/src/lib/components/inputs/input-select/input-select.tsx b/libs/shared/ui/src/lib/components/inputs/input-select/input-select.tsx index b1acadbc9db..4e8790b7232 100644 --- a/libs/shared/ui/src/lib/components/inputs/input-select/input-select.tsx +++ b/libs/shared/ui/src/lib/components/inputs/input-select/input-select.tsx @@ -226,7 +226,7 @@ export function InputSelect({ const inputActions = hasFocus && !disabled - ? '!border-brand-strong !shadow-[0_2px_2px_rgba(0, 0, 0, 0.05)] input--focused' + ? '!border-brand-strong input--focused' : disabled ? '!bg-surface-neutral-subtle !border-neutral !pointer-events-none' : hasError @@ -273,6 +273,7 @@ export function InputSelect({ ...base, backgroundColor: 'var(--neutral-1)', borderRadius: '6px', + borderColor: 'var(--neutral-6)', }), menuList: (base) => ({ ...base, diff --git a/libs/shared/ui/src/lib/styles/components/select.scss b/libs/shared/ui/src/lib/styles/components/select.scss index 3f356a8cace..963f8ef23e4 100644 --- a/libs/shared/ui/src/lib/styles/components/select.scss +++ b/libs/shared/ui/src/lib/styles/components/select.scss @@ -63,6 +63,7 @@ width: calc(100% + 2rem) !important; left: -1rem; margin-top: 1rem !important; + box-shadow: 0 0 0 1px var(--neutral-6), 0 4px 11px hsla(0,0,0,0.1) !important; @apply p-2; } @@ -84,7 +85,7 @@ } .input-select__checkbox { - @apply flex h-4 w-4 shrink-0 items-center justify-center rounded border border-neutral bg-surface-neutral; + @apply flex h-4 w-4 shrink-0 items-center justify-center rounded border border-neutral bg-surface-neutral text-neutralInvert; } } From 0c82b2b7db09426b87a10ad8b28eb46c7384e999 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Grandin?= Date: Fri, 23 Jan 2026 15:53:32 +0100 Subject: [PATCH 2/2] style(ui): tokens added to simple components from A to B --- .../lib/components/accordion/accordion.tsx | 2 +- .../action-toolbar/action-toolbar.tsx | 3 ++ .../lib/components/badge/badge.stories.tsx | 2 +- .../ui/src/lib/components/badge/badge.tsx | 12 ++++---- .../ui/src/lib/components/banner/banner.tsx | 28 +++++-------------- .../lib/components/board/board.stories.tsx | 2 +- .../ui/src/lib/components/board/board.tsx | 8 +++--- .../button-primitive/button-primitive.tsx | 18 +++++++++++- tailwind-workspace-preset.js | 1 + 9 files changed, 41 insertions(+), 35 deletions(-) diff --git a/libs/shared/ui/src/lib/components/accordion/accordion.tsx b/libs/shared/ui/src/lib/components/accordion/accordion.tsx index 4979b12c9dc..707560a3c89 100644 --- a/libs/shared/ui/src/lib/components/accordion/accordion.tsx +++ b/libs/shared/ui/src/lib/components/accordion/accordion.tsx @@ -31,7 +31,7 @@ const AccordionTrigger = forwardRef {children} diff --git a/libs/shared/ui/src/lib/components/action-toolbar/action-toolbar.tsx b/libs/shared/ui/src/lib/components/action-toolbar/action-toolbar.tsx index d6977daf6a6..054f38ca42f 100644 --- a/libs/shared/ui/src/lib/components/action-toolbar/action-toolbar.tsx +++ b/libs/shared/ui/src/lib/components/action-toolbar/action-toolbar.tsx @@ -46,6 +46,9 @@ const toolbarButtonVariants = cva(['active:scale-100'], { className: [ 'first:rounded-l', 'last:rounded-r', + 'first:border-r-0', + 'first:border-x', + 'border-l-0', 'hover:border-brand-strong', 'data-[state=open]:bg-surface-brand-subtle', 'data-[state=open]:border-brand-strong', diff --git a/libs/shared/ui/src/lib/components/badge/badge.stories.tsx b/libs/shared/ui/src/lib/components/badge/badge.stories.tsx index d21d6dbc216..f1239aba525 100644 --- a/libs/shared/ui/src/lib/components/badge/badge.stories.tsx +++ b/libs/shared/ui/src/lib/components/badge/badge.stories.tsx @@ -6,7 +6,7 @@ const Story: Meta = { title: 'Badge', decorators: [ (Story) => ( -
+
), diff --git a/libs/shared/ui/src/lib/components/badge/badge.tsx b/libs/shared/ui/src/lib/components/badge/badge.tsx index db7d7f16df2..6aac4e4e066 100644 --- a/libs/shared/ui/src/lib/components/badge/badge.tsx +++ b/libs/shared/ui/src/lib/components/badge/badge.tsx @@ -35,7 +35,7 @@ const badgeVariants = cva(['text-neutral', 'inline-flex', 'items-center', 'shrin { variant: 'surface', color: 'red', - className: ['bg-surface-negative-subtle'], + className: ['bg-surface-negative-subtle', 'text-negative'], }, { variant: 'outline', @@ -45,7 +45,7 @@ const badgeVariants = cva(['text-neutral', 'inline-flex', 'items-center', 'shrin { variant: 'surface', color: 'purple', - className: ['bg-surface-accent1-component'], + className: ['bg-surface-accent1-component', 'text-accent1'], }, { variant: 'outline', @@ -55,7 +55,7 @@ const badgeVariants = cva(['text-neutral', 'inline-flex', 'items-center', 'shrin { variant: 'surface', color: 'sky', - className: ['bg-surface-info-subtle'], + className: ['bg-surface-info-subtle', 'text-info'], }, { variant: 'outline', @@ -65,7 +65,7 @@ const badgeVariants = cva(['text-neutral', 'inline-flex', 'items-center', 'shrin { variant: 'surface', color: 'green', - className: ['bg-surface-positive-subtle'], + className: ['bg-surface-positive-subtle', 'text-positive'], }, { variant: 'outline', @@ -75,7 +75,7 @@ const badgeVariants = cva(['text-neutral', 'inline-flex', 'items-center', 'shrin { variant: 'surface', color: 'yellow', - className: ['bg-surface-warning-subtle'], + className: ['bg-surface-warning-subtle', 'text-warning'], }, { variant: 'outline', @@ -85,7 +85,7 @@ const badgeVariants = cva(['text-neutral', 'inline-flex', 'items-center', 'shrin { variant: 'surface', color: 'brand', - className: ['bg-surface-brand-subtle'], + className: ['bg-surface-brand-subtle', 'text-brand'], }, { variant: 'outline', diff --git a/libs/shared/ui/src/lib/components/banner/banner.tsx b/libs/shared/ui/src/lib/components/banner/banner.tsx index 64cda46eef9..e374b706bd6 100644 --- a/libs/shared/ui/src/lib/components/banner/banner.tsx +++ b/libs/shared/ui/src/lib/components/banner/banner.tsx @@ -8,25 +8,12 @@ import Icon from '../icon/icon' const bannerVariants = cva('flex h-10 items-center justify-center text-sm font-medium', { variants: { color: { - brand: ['bg-brand-500', 'text-white'], - yellow: ['bg-yellow-500', 'text-yellow-900'], - purple: ['bg-purple-500', 'text-white'], - red: ['bg-red-500', 'text-white'], + brand: ['bg-surface-brand-component', 'text-brand'], + yellow: ['bg-surface-warning-component', 'text-warning'], + red: ['bg-surface-negative-component', 'text-negative'], }, }, }) - -const buttonVariants = cva('ml-4', { - variants: { - color: { - brand: ['!bg-brand-400/50', 'hover:!bg-brand-400/75', '!text-white'], - yellow: ['!bg-yellow-600/50', 'hover:!bg-yellow-600/75', '!text-yellow-900'], - purple: ['!bg-purple-400', 'hover:!bg-purple-600', '!text-white'], - red: ['!bg-red-400', 'hover:!bg-red-600', '!text-white'], - }, - }, -}) - export interface BannerProps extends VariantProps { buttonLabel?: string buttonIconRight?: IconName @@ -43,7 +30,7 @@ export const Banner = forwardRef>
{children} {buttonLabel && ( - @@ -51,10 +38,9 @@ export const Banner = forwardRef> {dismissible && (