mirror of
https://github.com/langgenius/dify.git
synced 2026-04-28 11:56:55 +08:00
Merge branch 'chore/infrastructure-upgrade' of https://github.com/langgenius/dify into chore/infrastructure-upgrade
This commit is contained in:
commit
eeb1ed486a
@ -1,63 +0,0 @@
|
|||||||
import { Fragment, useCallback } from 'react'
|
|
||||||
import type { ReactNode } from 'react'
|
|
||||||
import { Dialog, DialogPanel, Transition } from '@headlessui/react'
|
|
||||||
import cn from '@/utils/classnames'
|
|
||||||
|
|
||||||
type DialogProps = {
|
|
||||||
className?: string
|
|
||||||
children: ReactNode
|
|
||||||
show: boolean
|
|
||||||
onClose?: () => void
|
|
||||||
}
|
|
||||||
|
|
||||||
const NewAppDialog = ({
|
|
||||||
className,
|
|
||||||
children,
|
|
||||||
show,
|
|
||||||
onClose,
|
|
||||||
}: DialogProps) => {
|
|
||||||
const close = useCallback(() => onClose?.(), [onClose])
|
|
||||||
return (
|
|
||||||
<Transition appear show={show} as={Fragment}>
|
|
||||||
<Dialog as="div" className="relative z-40" onClose={close}>
|
|
||||||
{/* <Transition.Child
|
|
||||||
as={Fragment}
|
|
||||||
enter="ease-out duration-300"
|
|
||||||
enterFrom="opacity-0"
|
|
||||||
enterTo="opacity-100"
|
|
||||||
leave="ease-in duration-200"
|
|
||||||
leaveFrom="opacity-100"
|
|
||||||
leaveTo="opacity-0"
|
|
||||||
>
|
|
||||||
<div className="fixed inset-0 bg-black bg-opacity-25" />
|
|
||||||
</Transition.Child> */}
|
|
||||||
{/* TODO: to new Transition */}
|
|
||||||
<div className="fixed inset-0 bg-black bg-opacity-25" />
|
|
||||||
|
|
||||||
<div className="fixed inset-0">
|
|
||||||
<div className="flex flex-col items-center justify-center min-h-full pt-[56px]">
|
|
||||||
{/* <Transition.Child
|
|
||||||
as={Fragment}
|
|
||||||
enter="ease-out duration-300"
|
|
||||||
enterFrom="opacity-0 scale-95"
|
|
||||||
enterTo="opacity-100 scale-100"
|
|
||||||
leave="ease-in duration-200"
|
|
||||||
leaveFrom="opacity-100 scale-100"
|
|
||||||
leaveTo="opacity-0 scale-95"
|
|
||||||
>
|
|
||||||
<DialogPanel className={cn('grow relative w-full h-[calc(100vh-56px)] p-0 overflow-hidden text-left align-middle transition-all transform bg-white shadow-xl rounded-t-xl', className)}>
|
|
||||||
{children}
|
|
||||||
</DialogPanel>
|
|
||||||
</Transition.Child> */}
|
|
||||||
{/* TODO: to new Transition */}
|
|
||||||
<DialogPanel className={cn('grow relative w-full h-[calc(100vh-56px)] p-0 overflow-hidden text-left align-middle transition-all transform bg-white shadow-xl rounded-t-xl', className)}>
|
|
||||||
{children}
|
|
||||||
</DialogPanel>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</Dialog>
|
|
||||||
</Transition >
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default NewAppDialog
|
|
||||||
@ -242,7 +242,7 @@ const SettingsModal: FC<ISettingsModalProps> = ({
|
|||||||
onChange={e => onDesChange(e.target.value)}
|
onChange={e => onDesChange(e.target.value)}
|
||||||
placeholder={t(`${prefixSettings}.webDescPlaceholder`) as string}
|
placeholder={t(`${prefixSettings}.webDescPlaceholder`) as string}
|
||||||
/>
|
/>
|
||||||
{isChatBot && (
|
{isChat && (
|
||||||
<div className='w-full mt-4'>
|
<div className='w-full mt-4'>
|
||||||
<div className='flex justify-between items-center'>
|
<div className='flex justify-between items-center'>
|
||||||
<div className={cn('system-sm-semibold text-text-secondary')}>{t('app.answerIcon.title')}</div>
|
<div className={cn('system-sm-semibold text-text-secondary')}>{t('app.answerIcon.title')}</div>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { Fragment, useCallback } from 'react'
|
import { Fragment, useCallback } from 'react'
|
||||||
import type { ElementType, ReactNode } from 'react'
|
import type { ElementType, ReactNode } from 'react'
|
||||||
import { Dialog, DialogPanel, DialogTitle, Transition } from '@headlessui/react'
|
import { Dialog, DialogPanel, DialogTitle, Transition, TransitionChild } from '@headlessui/react'
|
||||||
import classNames from '@/utils/classnames'
|
import classNames from '@/utils/classnames'
|
||||||
|
|
||||||
// https://headlessui.com/react/dialog
|
// https://headlessui.com/react/dialog
|
||||||
@ -34,32 +34,25 @@ const CustomDialog = ({
|
|||||||
return (
|
return (
|
||||||
<Transition appear show={show} as={Fragment}>
|
<Transition appear show={show} as={Fragment}>
|
||||||
<Dialog as="div" className="relative z-40" onClose={close}>
|
<Dialog as="div" className="relative z-40" onClose={close}>
|
||||||
{/* <Transition.Child
|
<TransitionChild>
|
||||||
as={Fragment}
|
<div className={classNames(
|
||||||
enter="ease-out duration-300"
|
'fixed inset-0 bg-black bg-opacity-25',
|
||||||
enterFrom="opacity-0"
|
'data-[closed]:opacity-0',
|
||||||
enterTo="opacity-100"
|
'data-[enter]:ease-out data-[enter]:duration-300 data-[enter]:opacity-100',
|
||||||
leave="ease-in duration-200"
|
'data-[leave]:ease-in data-[leave]:duration-200 data-[leave]:opacity-0',
|
||||||
leaveFrom="opacity-100"
|
)} />
|
||||||
leaveTo="opacity-0"
|
</TransitionChild>
|
||||||
>
|
|
||||||
<div className="fixed inset-0 bg-black bg-opacity-25" />
|
|
||||||
</Transition.Child> */}
|
|
||||||
{/* TODO: to new Transition */}
|
|
||||||
<div className="fixed inset-0 bg-black bg-opacity-25" />
|
|
||||||
|
|
||||||
<div className="fixed inset-0 overflow-y-auto">
|
<div className="fixed inset-0 overflow-y-auto">
|
||||||
<div className="flex items-center justify-center min-h-full">
|
<div className="flex items-center justify-center min-h-full">
|
||||||
{/* <Transition.Child
|
<TransitionChild>
|
||||||
as={Fragment}
|
<DialogPanel className={classNames(
|
||||||
enter="ease-out duration-300"
|
'w-full max-w-[800px] p-6 overflow-hidden transition-all transform bg-components-panel-bg border-[0.5px] border-components-panel-border shadow-xl rounded-2xl',
|
||||||
enterFrom="opacity-0 scale-95"
|
'data-[closed]:opacity-0 data-[closed]:scale-95',
|
||||||
enterTo="opacity-100 scale-100"
|
'data-[enter]:ease-out data-[enter]:duration-300 data-[enter]:opacity-100 data-[enter]:scale-100',
|
||||||
leave="ease-in duration-200"
|
'data-[leave]:ease-in data-[leave]:duration-200 data-[leave]:opacity-0 data-[enter]:scale-95',
|
||||||
leaveFrom="opacity-100 scale-100"
|
className,
|
||||||
leaveTo="opacity-0 scale-95"
|
)}>
|
||||||
>
|
|
||||||
<DialogPanel className={classNames('w-full max-w-[800px] p-6 overflow-hidden transition-all transform bg-components-panel-bg border-[0.5px] border-components-panel-border shadow-xl rounded-2xl', className)}>
|
|
||||||
{Boolean(title) && (
|
{Boolean(title) && (
|
||||||
<DialogTitle
|
<DialogTitle
|
||||||
as={titleAs || 'h3'}
|
as={titleAs || 'h3'}
|
||||||
@ -77,26 +70,7 @@ const CustomDialog = ({
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</DialogPanel>
|
</DialogPanel>
|
||||||
</Transition.Child> */}
|
</TransitionChild>
|
||||||
{/* TODO: to new Transition */}
|
|
||||||
<DialogPanel className={classNames('w-full max-w-[800px] p-6 overflow-hidden transition-all transform bg-components-panel-bg border-[0.5px] border-components-panel-border shadow-xl rounded-2xl', className)}>
|
|
||||||
{Boolean(title) && (
|
|
||||||
<DialogTitle
|
|
||||||
as={titleAs || 'h3'}
|
|
||||||
className={classNames('pr-8 pb-3 title-2xl-semi-bold text-text-primary', titleClassName)}
|
|
||||||
>
|
|
||||||
{title}
|
|
||||||
</DialogTitle>
|
|
||||||
)}
|
|
||||||
<div className={classNames(bodyClassName)}>
|
|
||||||
{children}
|
|
||||||
</div>
|
|
||||||
{Boolean(footer) && (
|
|
||||||
<div className={classNames('flex items-center justify-end gap-2 px-6 pb-6 pt-3', footerClassName)}>
|
|
||||||
{footer}
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</DialogPanel>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { Fragment, useCallback } from 'react'
|
import { Fragment, useCallback } from 'react'
|
||||||
import type { ReactNode } from 'react'
|
import type { ReactNode } from 'react'
|
||||||
import { Dialog, DialogPanel, Transition } from '@headlessui/react'
|
import { Dialog, DialogPanel, Transition, TransitionChild } from '@headlessui/react'
|
||||||
import cn from '@/utils/classnames'
|
import cn from '@/utils/classnames'
|
||||||
|
|
||||||
type DialogProps = {
|
type DialogProps = {
|
||||||
@ -22,39 +22,29 @@ const DialogWrapper = ({
|
|||||||
return (
|
return (
|
||||||
<Transition appear show={show} as={Fragment}>
|
<Transition appear show={show} as={Fragment}>
|
||||||
<Dialog as="div" className="relative z-40" onClose={close}>
|
<Dialog as="div" className="relative z-40" onClose={close}>
|
||||||
{/* <Transition.Child
|
<TransitionChild>
|
||||||
as={Fragment}
|
<div className={cn(
|
||||||
enter="ease-out duration-300"
|
'fixed inset-0 bg-black bg-opacity-25',
|
||||||
enterFrom="opacity-0"
|
'data-[closed]:opacity-0',
|
||||||
enterTo="opacity-100"
|
'data-[enter]:ease-out data-[enter]:duration-300 data-[enter]:opacity-100',
|
||||||
leave="ease-in duration-200"
|
'data-[leave]:ease-in data-[leave]:duration-200 data-[leave]:opacity-0',
|
||||||
leaveFrom="opacity-100"
|
)} />
|
||||||
leaveTo="opacity-0"
|
</TransitionChild>
|
||||||
>
|
|
||||||
<div className="fixed inset-0 bg-black bg-opacity-25" />
|
|
||||||
</Transition.Child> */}
|
|
||||||
{/* TODO: to new Transition */}
|
|
||||||
<div className="fixed inset-0 bg-black bg-opacity-25" />
|
|
||||||
|
|
||||||
<div className="fixed inset-0">
|
<div className="fixed inset-0">
|
||||||
<div className={cn('flex flex-col items-end justify-center min-h-full pb-2', inWorkflow ? 'pt-[112px]' : 'pt-[64px] pr-2')}>
|
<div className={cn('flex flex-col items-end justify-center min-h-full pb-2', inWorkflow ? 'pt-[112px]' : 'pt-[64px] pr-2')}>
|
||||||
{/* <Transition.Child
|
<TransitionChild>
|
||||||
as={Fragment}
|
<DialogPanel className={cn(
|
||||||
enter="ease-out duration-300"
|
'grow flex flex-col relative w-[420px] h-0 p-0 overflow-hidden text-left align-middle transition-all transform bg-components-panel-bg-alt border-components-panel-border shadow-xl',
|
||||||
enterFrom="opacity-0 scale-95"
|
inWorkflow ? 'border-t-[0.5px] border-l-[0.5px] border-b-[0.5px] rounded-l-2xl' : 'border-[0.5px] rounded-2xl',
|
||||||
enterTo="opacity-100 scale-100"
|
'data-[closed]:opacity-0 data-[closed]:scale-95',
|
||||||
leave="ease-in duration-200"
|
'data-[enter]:ease-out data-[enter]:duration-300 data-[enter]:opacity-100 data-[enter]:scale-100',
|
||||||
leaveFrom="opacity-100 scale-100"
|
'data-[leave]:ease-in data-[leave]:duration-200 data-[leave]:opacity-0 data-[enter]:scale-95',
|
||||||
leaveTo="opacity-0 scale-95"
|
className,
|
||||||
>
|
)}>
|
||||||
<DialogPanel className={cn('grow flex flex-col relative w-[420px] h-0 p-0 overflow-hidden text-left align-middle transition-all transform bg-components-panel-bg-alt border-components-panel-border shadow-xl', inWorkflow ? 'border-t-[0.5px] border-l-[0.5px] border-b-[0.5px] rounded-l-2xl' : 'border-[0.5px] rounded-2xl', className)}>
|
|
||||||
{children}
|
{children}
|
||||||
</DialogPanel>
|
</DialogPanel>
|
||||||
</Transition.Child> */}
|
</TransitionChild>
|
||||||
{/* TODO: to new Transition */}
|
|
||||||
<DialogPanel className={cn('grow flex flex-col relative w-[420px] h-0 p-0 overflow-hidden text-left align-middle transition-all transform bg-components-panel-bg-alt border-components-panel-border shadow-xl', inWorkflow ? 'border-t-[0.5px] border-l-[0.5px] border-b-[0.5px] rounded-l-2xl' : 'border-[0.5px] rounded-2xl', className)}>
|
|
||||||
{children}
|
|
||||||
</DialogPanel>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
|||||||
@ -116,10 +116,7 @@ const VoiceParamConfig = ({
|
|||||||
{languages.map((item: Item) => (
|
{languages.map((item: Item) => (
|
||||||
<ListboxOption
|
<ListboxOption
|
||||||
key={item.value}
|
key={item.value}
|
||||||
className={({ active }) =>
|
className='relative cursor-pointer select-none py-2 pl-3 pr-9 rounded-lg hover:bg-gray-100 text-gray-700 data-[active]:bg-gray-100'
|
||||||
`relative cursor-pointer select-none py-2 pl-3 pr-9 rounded-lg hover:bg-gray-100 text-gray-700 ${active ? 'bg-gray-100' : ''
|
|
||||||
}`
|
|
||||||
}
|
|
||||||
value={item}
|
value={item}
|
||||||
disabled={false}
|
disabled={false}
|
||||||
>
|
>
|
||||||
@ -183,10 +180,7 @@ const VoiceParamConfig = ({
|
|||||||
{voiceItems?.map((item: Item) => (
|
{voiceItems?.map((item: Item) => (
|
||||||
<ListboxOption
|
<ListboxOption
|
||||||
key={item.value}
|
key={item.value}
|
||||||
className={({ active }) =>
|
className='relative cursor-pointer select-none py-2 pl-3 pr-9 rounded-lg hover:bg-gray-100 text-gray-700 data-[active]:bg-gray-100'
|
||||||
`relative cursor-pointer select-none py-2 pl-3 pr-9 rounded-lg hover:bg-gray-100 text-gray-700 ${active ? 'bg-gray-100' : ''
|
|
||||||
}`
|
|
||||||
}
|
|
||||||
value={item}
|
value={item}
|
||||||
disabled={false}
|
disabled={false}
|
||||||
>
|
>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { Dialog, DialogPanel, Transition } from '@headlessui/react'
|
import { Dialog, DialogPanel, Transition, TransitionChild } from '@headlessui/react'
|
||||||
import { Fragment } from 'react'
|
import { Fragment } from 'react'
|
||||||
import { RiCloseLargeLine } from '@remixicon/react'
|
import { RiCloseLargeLine } from '@remixicon/react'
|
||||||
import classNames from '@/utils/classnames'
|
import classNames from '@/utils/classnames'
|
||||||
@ -25,21 +25,16 @@ export default function FullScreenModal({
|
|||||||
overflowVisible = false,
|
overflowVisible = false,
|
||||||
}: IModal) {
|
}: IModal) {
|
||||||
return (
|
return (
|
||||||
<Transition show={open} as={Fragment}>
|
<Transition appear show={open} as={Fragment}>
|
||||||
<Dialog as="div" className={classNames('modal-dialog', wrapperClassName)} onClose={onClose}>
|
<Dialog as="div" className={classNames('modal-dialog', wrapperClassName)} onClose={onClose} open={open}>
|
||||||
{/* <Transition.Child
|
<TransitionChild>
|
||||||
as={Fragment}
|
<div className={classNames(
|
||||||
enter="ease-out duration-300"
|
'fixed inset-0 bg-background-overlay-backdrop backdrop-blur-[6px] transition',
|
||||||
enterFrom="opacity-0"
|
'data-[closed]:opacity-0',
|
||||||
enterTo="opacity-100"
|
'data-[enter]:ease-out data-[enter]:duration-300 data-[enter]:opacity-100',
|
||||||
leave="ease-in duration-200"
|
'data-[leave]:ease-in data-[leave]:duration-200 data-[leave]:opacity-0',
|
||||||
leaveFrom="opacity-100"
|
)} />
|
||||||
leaveTo="opacity-0"
|
</TransitionChild>
|
||||||
>
|
|
||||||
<div className="fixed inset-0 bg-background-overlay-backdrop backdrop-blur-[6px]" />
|
|
||||||
</Transition.Child> */}
|
|
||||||
{/* TODO: to new Transition */}
|
|
||||||
<div className="fixed inset-0 bg-background-overlay-backdrop backdrop-blur-[6px]" />
|
|
||||||
|
|
||||||
<div
|
<div
|
||||||
className="fixed inset-0 h-screen w-screen p-4"
|
className="fixed inset-0 h-screen w-screen p-4"
|
||||||
@ -49,18 +44,13 @@ export default function FullScreenModal({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className="w-full h-full bg-background-default-subtle rounded-2xl border border-effects-highlight relative">
|
<div className="w-full h-full bg-background-default-subtle rounded-2xl border border-effects-highlight relative">
|
||||||
{/* <Transition.Child
|
<TransitionChild>
|
||||||
as={Fragment}
|
|
||||||
enter="ease-out duration-300"
|
|
||||||
enterFrom="opacity-0 scale-95"
|
|
||||||
enterTo="opacity-100 scale-100"
|
|
||||||
leave="ease-in duration-200"
|
|
||||||
leaveFrom="opacity-100 scale-100"
|
|
||||||
leaveTo="opacity-0 scale-95"
|
|
||||||
>
|
|
||||||
<DialogPanel className={classNames(
|
<DialogPanel className={classNames(
|
||||||
'h-full',
|
'h-full transition',
|
||||||
overflowVisible ? 'overflow-visible' : 'overflow-hidden',
|
overflowVisible ? 'overflow-visible' : 'overflow-hidden',
|
||||||
|
'data-[closed]:opacity-0',
|
||||||
|
'data-[enter]:ease-out data-[enter]:duration-300 data-[enter]:opacity-100',
|
||||||
|
'data-[leave]:ease-in data-[leave]:duration-200 data-[leave]:opacity-0',
|
||||||
className,
|
className,
|
||||||
)}>
|
)}>
|
||||||
{closable
|
{closable
|
||||||
@ -75,25 +65,7 @@ export default function FullScreenModal({
|
|||||||
</div>}
|
</div>}
|
||||||
{children}
|
{children}
|
||||||
</DialogPanel>
|
</DialogPanel>
|
||||||
</Transition.Child> */}
|
</TransitionChild>
|
||||||
{/* TODO: to new Transition */}
|
|
||||||
<DialogPanel className={classNames(
|
|
||||||
'h-full',
|
|
||||||
overflowVisible ? 'overflow-visible' : 'overflow-hidden',
|
|
||||||
className,
|
|
||||||
)}>
|
|
||||||
{closable
|
|
||||||
&& <div
|
|
||||||
className='absolute z-50 top-3 right-3 w-9 h-9 flex items-center justify-center rounded-[10px]
|
|
||||||
bg-components-button-tertiary-bg hover:bg-components-button-tertiary-bg-hover cursor-pointer'
|
|
||||||
onClick={(e) => {
|
|
||||||
e.stopPropagation()
|
|
||||||
onClose()
|
|
||||||
}}>
|
|
||||||
<RiCloseLargeLine className='w-3.5 h-3.5 text-components-button-tertiary-text' />
|
|
||||||
</div>}
|
|
||||||
{children}
|
|
||||||
</DialogPanel>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { Dialog, DialogPanel, DialogTitle, Transition } from '@headlessui/react'
|
import { Dialog, DialogPanel, DialogTitle, Transition, TransitionChild } from '@headlessui/react'
|
||||||
import { Fragment } from 'react'
|
import { Fragment } from 'react'
|
||||||
import { RiCloseLine } from '@remixicon/react'
|
import { RiCloseLine } from '@remixicon/react'
|
||||||
import classNames from '@/utils/classnames'
|
import classNames from '@/utils/classnames'
|
||||||
@ -30,19 +30,14 @@ export default function Modal({
|
|||||||
return (
|
return (
|
||||||
<Transition appear show={isShow} as={Fragment}>
|
<Transition appear show={isShow} as={Fragment}>
|
||||||
<Dialog as="div" className={classNames('relative z-[60]', wrapperClassName)} onClose={onClose}>
|
<Dialog as="div" className={classNames('relative z-[60]', wrapperClassName)} onClose={onClose}>
|
||||||
{/* <Transition.Child
|
<TransitionChild>
|
||||||
as={Fragment}
|
<div className={classNames(
|
||||||
enter="ease-out duration-300"
|
'fixed inset-0 bg-background-overlay',
|
||||||
enterFrom="opacity-0"
|
'data-[closed]:opacity-0',
|
||||||
enterTo="opacity-100"
|
'data-[enter]:ease-out data-[enter]:duration-300 data-[enter]:opacity-100',
|
||||||
leave="ease-in duration-200"
|
'data-[leave]:ease-in data-[leave]:duration-200 data-[leave]:opacity-0',
|
||||||
leaveFrom="opacity-100"
|
)} />
|
||||||
leaveTo="opacity-0"
|
</TransitionChild>
|
||||||
>
|
|
||||||
<div className="fixed inset-0 bg-background-overlay" />
|
|
||||||
</Transition.Child> */}
|
|
||||||
{/* TODO: to new Transition */}
|
|
||||||
<div className="fixed inset-0 bg-background-overlay" />
|
|
||||||
|
|
||||||
<div
|
<div
|
||||||
className="fixed inset-0 overflow-y-auto"
|
className="fixed inset-0 overflow-y-auto"
|
||||||
@ -52,18 +47,13 @@ export default function Modal({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className="flex min-h-full items-center justify-center p-4 text-center">
|
<div className="flex min-h-full items-center justify-center p-4 text-center">
|
||||||
{/* <Transition.Child
|
<TransitionChild>
|
||||||
as={Fragment}
|
|
||||||
enter="ease-out duration-300"
|
|
||||||
enterFrom="opacity-0 scale-95"
|
|
||||||
enterTo="opacity-100 scale-100"
|
|
||||||
leave="ease-in duration-200"
|
|
||||||
leaveFrom="opacity-100 scale-100"
|
|
||||||
leaveTo="opacity-0 scale-95"
|
|
||||||
>
|
|
||||||
<DialogPanel className={classNames(
|
<DialogPanel className={classNames(
|
||||||
'w-full max-w-[480px] transform rounded-2xl bg-components-panel-bg p-6 text-left align-middle shadow-xl transition-all',
|
'w-full max-w-[480px] transform rounded-2xl bg-components-panel-bg p-6 text-left align-middle shadow-xl transition-all',
|
||||||
overflowVisible ? 'overflow-visible' : 'overflow-hidden',
|
overflowVisible ? 'overflow-visible' : 'overflow-hidden',
|
||||||
|
'data-[closed]:opacity-0',
|
||||||
|
'data-[enter]:ease-out data-[enter]:duration-300 data-[enter]:opacity-100',
|
||||||
|
'data-[leave]:ease-in data-[leave]:duration-200 data-[leave]:opacity-0',
|
||||||
className,
|
className,
|
||||||
)}>
|
)}>
|
||||||
{title && <DialogTitle
|
{title && <DialogTitle
|
||||||
@ -86,33 +76,7 @@ export default function Modal({
|
|||||||
</div>}
|
</div>}
|
||||||
{children}
|
{children}
|
||||||
</DialogPanel>
|
</DialogPanel>
|
||||||
</Transition.Child> */}
|
</TransitionChild>
|
||||||
{/* TODO: to new Transition */}
|
|
||||||
<DialogPanel className={classNames(
|
|
||||||
'w-full max-w-[480px] transform rounded-2xl bg-components-panel-bg p-6 text-left align-middle shadow-xl transition-all',
|
|
||||||
overflowVisible ? 'overflow-visible' : 'overflow-hidden',
|
|
||||||
className,
|
|
||||||
)}>
|
|
||||||
{title && <DialogTitle
|
|
||||||
as="h3"
|
|
||||||
className="title-2xl-semi-bold text-text-primary"
|
|
||||||
>
|
|
||||||
{title}
|
|
||||||
</DialogTitle>}
|
|
||||||
{description && <div className='text-text-secondary body-md-regular mt-2'>
|
|
||||||
{description}
|
|
||||||
</div>}
|
|
||||||
{closable
|
|
||||||
&& <div className='absolute z-10 top-6 right-6 w-5 h-5 rounded-2xl flex items-center justify-center hover:cursor-pointer hover:bg-state-base-hover'>
|
|
||||||
<RiCloseLine className='w-4 h-4 text-text-tertiary' onClick={
|
|
||||||
(e) => {
|
|
||||||
e.stopPropagation()
|
|
||||||
onClose()
|
|
||||||
}
|
|
||||||
} />
|
|
||||||
</div>}
|
|
||||||
{children}
|
|
||||||
</DialogPanel>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
|||||||
@ -249,7 +249,7 @@ const SimpleSelect: FC<ISelectProps> = ({
|
|||||||
{items.map((item: Item) => (
|
{items.map((item: Item) => (
|
||||||
<ListboxOption
|
<ListboxOption
|
||||||
key={item.value}
|
key={item.value}
|
||||||
className={({ active }) =>
|
className={
|
||||||
classNames(
|
classNames(
|
||||||
'relative cursor-pointer select-none py-2 pl-3 pr-9 rounded-lg hover:bg-state-base-hover text-text-secondary',
|
'relative cursor-pointer select-none py-2 pl-3 pr-9 rounded-lg hover:bg-state-base-hover text-text-secondary',
|
||||||
optionClassName,
|
optionClassName,
|
||||||
|
|||||||
@ -35,22 +35,13 @@ const MenuDialog = ({
|
|||||||
<Dialog as="div" className="relative z-[60]" onClose={() => { }}>
|
<Dialog as="div" className="relative z-[60]" onClose={() => { }}>
|
||||||
<div className="fixed inset-0">
|
<div className="fixed inset-0">
|
||||||
<div className="flex flex-col items-center justify-center min-h-full">
|
<div className="flex flex-col items-center justify-center min-h-full">
|
||||||
{/* <Transition.Child
|
<DialogPanel className={cn(
|
||||||
as={Fragment}
|
'grow relative w-full h-full p-0 overflow-hidden text-left align-middle transition-all transform bg-background-sidenav-bg backdrop-blur-md',
|
||||||
enter="ease-out duration-300"
|
'data-[closed]:opacity-0 data-[closed]:scale-95',
|
||||||
enterFrom="opacity-0 scale-95"
|
'data-[enter]:ease-out data-[enter]:duration-300 data-[enter]:opacity-100 data-[enter]:scale-100',
|
||||||
enterTo="opacity-100 scale-100"
|
'data-[leave]:ease-in data-[leave]:duration-200 data-[leave]:opacity-0 data-[enter]:scale-95',
|
||||||
leave="ease-in duration-200"
|
className,
|
||||||
leaveFrom="opacity-100 scale-100"
|
)}>
|
||||||
leaveTo="opacity-0 scale-95"
|
|
||||||
>
|
|
||||||
<DialogPanel className={cn('grow relative w-full h-full p-0 overflow-hidden text-left align-middle transition-all transform bg-background-sidenav-bg backdrop-blur-md', className)}>
|
|
||||||
<div className='absolute top-0 right-0 h-full w-1/2 bg-components-panel-bg' />
|
|
||||||
{children}
|
|
||||||
</DialogPanel>
|
|
||||||
</Transition.Child> */}
|
|
||||||
{/* TODO: to new Transition */}
|
|
||||||
<DialogPanel className={cn('grow relative w-full h-full p-0 overflow-hidden text-left align-middle transition-all transform bg-background-sidenav-bg backdrop-blur-md', className)}>
|
|
||||||
<div className='absolute top-0 right-0 h-full w-1/2 bg-components-panel-bg' />
|
<div className='absolute top-0 right-0 h-full w-1/2 bg-components-panel-bg' />
|
||||||
{children}
|
{children}
|
||||||
</DialogPanel>
|
</DialogPanel>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user