From 7ff31d0854536724483b0408f1383082b34661c1 Mon Sep 17 00:00:00 2001 From: devanshu052000 Date: Mon, 5 May 2025 22:09:56 +0530 Subject: [PATCH] Improved UI for color options panel in custom themes modal --- frontend/ee | 2 +- frontend/src/_ui/Icon/solidIcons/Moon.jsx | 23 +++++++++++++++++++ frontend/src/_ui/Icon/solidIcons/index.js | 3 +++ .../ui/Input/EditableTitleInput/Index.jsx | 13 ++++++++--- frontend/src/components/ui/Input/Input.jsx | 2 +- 5 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 frontend/src/_ui/Icon/solidIcons/Moon.jsx diff --git a/frontend/ee b/frontend/ee index 518f3334b1..f0b779a68e 160000 --- a/frontend/ee +++ b/frontend/ee @@ -1 +1 @@ -Subproject commit 518f3334b12a83785fd37dd53b0245d72848211a +Subproject commit f0b779a68ec8a5d40ba78c342df4b98eb507a858 diff --git a/frontend/src/_ui/Icon/solidIcons/Moon.jsx b/frontend/src/_ui/Icon/solidIcons/Moon.jsx new file mode 100644 index 0000000000..913a345c56 --- /dev/null +++ b/frontend/src/_ui/Icon/solidIcons/Moon.jsx @@ -0,0 +1,23 @@ +import React from 'react'; + +const Moon = ({ fill = '#6A727C', width = '24', className = '', viewBox = '0 0 24 24' }) => { + return ( + + + + ); +}; + +export default Moon; diff --git a/frontend/src/_ui/Icon/solidIcons/index.js b/frontend/src/_ui/Icon/solidIcons/index.js index 5daa4b7c91..2a7b801570 100644 --- a/frontend/src/_ui/Icon/solidIcons/index.js +++ b/frontend/src/_ui/Icon/solidIcons/index.js @@ -234,6 +234,7 @@ import NewTabSmall from './NewTabSmall.jsx'; import Code from './Code.jsx'; import WorkflowV3 from './WorkflowV3.jsx'; import WorkspaceV3 from './WorkspaceV3.jsx'; +import Moon from './Moon.jsx'; const Icon = (props) => { switch (props.name) { @@ -707,6 +708,8 @@ const Icon = (props) => { return ; case 'play01': return ; + case 'moon': + return ; default: return ; } diff --git a/frontend/src/components/ui/Input/EditableTitleInput/Index.jsx b/frontend/src/components/ui/Input/EditableTitleInput/Index.jsx index 62ae962970..0ca218e305 100644 --- a/frontend/src/components/ui/Input/EditableTitleInput/Index.jsx +++ b/frontend/src/components/ui/Input/EditableTitleInput/Index.jsx @@ -4,7 +4,7 @@ import { Input } from '../Input'; import { HelperMessage, ValidationMessage } from '../InputUtils/InputUtils'; import Tooltip from '../../Tooltip/Tooltip'; -const EditableTitleInput = ({ size, disabled, helperText, onChange, ...restProps }) => { +const EditableTitleInput = ({ size, disabled, helperText, onChange: change, readOnly, placeholder, ...restProps }) => { const inputRef = useRef(null); const [tooltipWidth, setTooltipWidth] = useState('auto'); const [isValid, setIsValid] = useState(null); @@ -17,7 +17,7 @@ const EditableTitleInput = ({ size, disabled, helperText, onChange, ...restProps setIsValid(validateObj.valid); setMessage(validateObj.message); } - onChange(e, validateObj); + change(e, validateObj); }; const inputStyle = `tw-border-transparent hover:tw-border-border-default tw-font-medium tw-pl-[12px] tw-pr-[12px] ${ @@ -35,7 +35,14 @@ const EditableTitleInput = ({ size, disabled, helperText, onChange, ...restProps return (
- + { type={isPasswordField && isPasswordVisible ? 'text' : type} className={cn( inputVariants({ size }), - `tw-relative tw-peer tw-flex tw-text-[12px]/[18px] tw-w-full tw-rounded-[8px] tw-border-[1px] tw-border-solid tw-bg-background-surface-layer-01 tw-py-[7px] tw-text-text-default focus-visible:tw-ring-[1px] focus-visible:tw-ring-offset-[1px] focus-visible:tw-ring-border-accent-strong focus-visible:tw-ring-offset-border-accent-strong focus-visible:tw-border-transparent disabled:tw-cursor-not-allowed ${props.styles}`, + `tw-peer tw-flex tw-text-[12px]/[18px] tw-w-full tw-rounded-[8px] tw-border-[1px] tw-border-solid tw-bg-background-surface-layer-01 tw-py-[7px] tw-text-text-default focus-visible:tw-ring-[1px] focus-visible:tw-ring-offset-[1px] focus-visible:tw-ring-border-accent-strong focus-visible:tw-ring-offset-border-accent-strong focus-visible:tw-border-transparent disabled:tw-cursor-not-allowed ${props.styles}`, className )} ref={ref}