Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: update icon and Divider components #10975

Merged
merged 3 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 21 additions & 7 deletions web/app/components/base/divider/index.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,31 @@
import type { CSSProperties, FC } from 'react'
import React from 'react'
import s from './style.module.css'
import { type VariantProps, cva } from 'class-variance-authority'
import classNames from '@/utils/classnames'

type Props = {
type?: 'horizontal' | 'vertical'
// orientation?: 'left' | 'right' | 'center'
const dividerVariants = cva(
'bg-divider-regular',
{
variants: {
type: {
horizontal: 'w-full h-[0.5px] my-2',
vertical: 'w-[1px] h-full mx-2',
},
},
defaultVariants: {
type: 'horizontal',
},
},
)

type DividerProps = {
className?: string
style?: CSSProperties
}
} & VariantProps<typeof dividerVariants>

const Divider: FC<Props> = ({ type = 'horizontal', className = '', style }) => {
const Divider: FC<DividerProps> = ({ type, className = '', style }) => {
return (
<div className={`${s.divider} ${s[type]} ${className}`} style={style}></div>
<div className={classNames(dividerVariants({ type }), className)} style={style}></div>
)
}

Expand Down
9 changes: 0 additions & 9 deletions web/app/components/base/divider/style.module.css

This file was deleted.

10 changes: 8 additions & 2 deletions web/themes/dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ html[data-theme="dark"] {
--color-text-logo-text: #E9E9EC;
--color-text-empty-state-icon: #C8CEDA4D;
--color-text-inverted: #FFFFFF;
--color-text-inverted-dimmed: #FFFFFFCC;

--color-background-body: #1D1D20;
--color-background-default-subtle: #222225;
Expand Down Expand Up @@ -296,7 +297,7 @@ html[data-theme="dark"] {
--color-background-section-burn: #18181B99;
--color-background-default-dodge: #3A3A40;
--color-background-overlay: #18181BCC;
--color-background-default-dimm: #27272B;
--color-background-default-dimmed: #27272B;
--color-background-default-hover: #27272B;
--color-background-overlay-alt: #18181B66;
--color-background-surface-white: #FFFFFFE5;
Expand Down Expand Up @@ -325,6 +326,12 @@ html[data-theme="dark"] {
--color-workflow-link-line-normal: #676F83;
--color-workflow-link-line-handle: #296DFF;

--color-workflow-link-line-success-active: #47CD89;
--color-workflow-link-line-success-handle: #47CD89;

--color-workflow-link-line-error-active: #F97066;
--color-workflow-link-line-error-handle: #F97066;

--color-workflow-minimap-bg: #27272B;
--color-workflow-minimap-block: #C8CEDA14;

Expand Down Expand Up @@ -598,6 +605,5 @@ html[data-theme="dark"] {

--color-third-party-LangChain: #FFFFFF;
--color-third-party-Langfuse: #FFFFFF;

--color-third-party-Github: #FFFFFF;
}
14 changes: 13 additions & 1 deletion web/themes/light.css
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ html[data-theme="light"] {
--color-text-logo-text: #18222F;
--color-text-empty-state-icon: #D0D5DC;
--color-text-inverted: #000000;
--color-text-inverted-dimmed: #000000F2;

--color-background-body: #F2F4F7;
--color-background-default-subtle: #FCFCFD;
Expand Down Expand Up @@ -296,7 +297,7 @@ html[data-theme="light"] {
--color-background-section-burn: #F2F4F7;
--color-background-default-dodge: #FFFFFF;
--color-background-overlay: #10182899;
--color-background-default-dimm: #E9EBF0;
--color-background-default-dimmed: #E9EBF0;
--color-background-default-hover: #F9FAFB;
--color-background-overlay-alt: #10182866;
--color-background-surface-white: #FFFFFFF2;
Expand Down Expand Up @@ -324,6 +325,17 @@ html[data-theme="light"] {
--color-workflow-link-line-active: #296DFF;
--color-workflow-link-line-normal: #D0D5DC;
--color-workflow-link-line-handle: #296DFF;
--color-workflow-link-line-normal-transparent: #D0D5DC33;
--color-workflow-link-line-failure-active: #F79009;
--color-workflow-link-line-failure-handle: #F79009;
--color-workflow-link-line-failure-button-bg: #DC6803;
--color-workflow-link-line-failure-button-hover: #B54708;

--color-workflow-link-line-success-active: #17B26A;
--color-workflow-link-line-success-handle: #17B26A;

--color-workflow-link-line-error-active: #F04438;
--color-workflow-link-line-error-handle: #F04438;

--color-workflow-minimap-bg: #E9EBF0;
--color-workflow-minimap-block: #C8CEDA4D;
Expand Down
14 changes: 13 additions & 1 deletion web/themes/tailwind-theme-var-define.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ const vars = {
'text-logo-text': 'var(--color-text-logo-text)',
'text-empty-state-icon': 'var(--color-text-empty-state-icon)',
'text-inverted': 'var(--color-text-inverted)',
'text-inverted-dimmed': 'var(--color-text-inverted-dimmed)',

'background-body': 'var(--color-background-body)',
'background-default-subtle': 'var(--color-background-default-subtle)',
Expand Down Expand Up @@ -296,7 +297,7 @@ const vars = {
'background-section-burn': 'var(--color-background-section-burn)',
'background-default-dodge': 'var(--color-background-default-dodge)',
'background-overlay': 'var(--color-background-overlay)',
'background-default-dimm': 'var(--color-background-default-dimm)',
'background-default-dimmed': 'var(--color-background-default-dimmed)',
'background-default-hover': 'var(--color-background-default-hover)',
'background-overlay-alt': 'var(--color-background-overlay-alt)',
'background-surface-white': 'var(--color-background-surface-white)',
Expand Down Expand Up @@ -324,6 +325,17 @@ const vars = {
'workflow-link-line-active': 'var(--color-workflow-link-line-active)',
'workflow-link-line-normal': 'var(--color-workflow-link-line-normal)',
'workflow-link-line-handle': 'var(--color-workflow-link-line-handle)',
'workflow-link-line-normal-transparent': 'var(--color-workflow-link-line-normal-transparent)',
'workflow-link-line-failure-active': 'var(--color-workflow-link-line-failure-active)',
'workflow-link-line-failure-handle': 'var(--color-workflow-link-line-failure-handle)',
'workflow-link-line-failure-button-bg': 'var(--color-workflow-link-line-failure-button-bg)',
'workflow-link-line-failure-button-hover': 'var(--color-workflow-link-line-failure-button-hover)',

'workflow-link-line-success-active': 'var(--color-workflow-link-line-success-active)',
'workflow-link-line-success-handle': 'var(--color-workflow-link-line-success-handle)',

'workflow-link-line-error-active': 'var(--color-workflow-link-line-error-active)',
'workflow-link-line-error-handle': 'var(--color-workflow-link-line-error-handle)',

'workflow-minimap-bg': 'var(--color-workflow-minimap-bg)',
'workflow-minimap-block': 'var(--color-workflow-minimap-block)',
Expand Down
6 changes: 3 additions & 3 deletions web/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2568,9 +2568,9 @@
zustand "^4.4.1"

"@remixicon/react@^4.2.0":
version "4.2.0"
resolved "https://registry.npmjs.org/@remixicon/react/-/react-4.2.0.tgz"
integrity sha512-eGhKpZ88OU0qkcY9pJu6khBmItDV82nU130E6C68yc+FbljueHlUYy/4CrJsmf860RIDMay2Rpzl27OSJ81miw==
version "4.5.0"
resolved "https://registry.yarnpkg.com/@remixicon/react/-/react-4.5.0.tgz#5600d122ee4995bff2c4442cb056eeb4f11ecb5a"
integrity sha512-Xr20SxMpRNlgXZnoF5BCMyZuQEhXY3yJCyms8kxB/vJCCiV1nWdiO48XqRG5LBd1192iSHC4m658AIWi6rmBFg==

"@rgrove/parse-xml@^4.1.0":
version "4.1.0"
Expand Down