mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-29 11:20:36 +01:00
Merge remote-tracking branch 'origin/v3' into refactor/toast-animations
This commit is contained in:
@@ -71,7 +71,7 @@ function _useOverlay() {
|
|||||||
isMounted: !!defaultOpen,
|
isMounted: !!defaultOpen,
|
||||||
destroyOnClose: !!destroyOnClose,
|
destroyOnClose: !!destroyOnClose,
|
||||||
originalProps: props || {},
|
originalProps: props || {},
|
||||||
props: { ...(props || {}) }
|
props: { ...props }
|
||||||
})
|
})
|
||||||
|
|
||||||
overlays.push(options)
|
overlays.push(options)
|
||||||
@@ -135,7 +135,7 @@ function _useOverlay() {
|
|||||||
const patch = <T extends Component>(id: symbol, props: Partial<ComponentProps<T>>): void => {
|
const patch = <T extends Component>(id: symbol, props: Partial<ComponentProps<T>>): void => {
|
||||||
const overlay = getOverlay(id)
|
const overlay = getOverlay(id)
|
||||||
|
|
||||||
overlay.props = { ...props }
|
overlay.props = { ...overlay.props, ...props }
|
||||||
}
|
}
|
||||||
|
|
||||||
const getOverlay = (id: symbol): Overlay => {
|
const getOverlay = (id: symbol): Overlay => {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
export default {
|
export default {
|
||||||
slots: {
|
slots: {
|
||||||
viewport: 'fixed flex flex-col w-[calc(100%-2rem)] sm:w-96 z-[100] data-[expanded=true]:h-(--height) focus:outline-none transition-all duration-400 ease-in-out',
|
viewport: 'fixed flex flex-col w-[calc(100%-2rem)] sm:w-96 z-[100] data-[expanded=true]:h-(--height) focus:outline-none transition-all duration-400 ease-in-out',
|
||||||
base: 'pointer-events-auto absolute inset-x-0 z-(--index) transform-(--transform) data-[expanded=false]:data-[front=false]:data-[second=false]:data-[third=false]:h-(--front-height) data-[expanded=false]:data-[front=false]:data-[second=false]:data-[third=false]:opacity-0 data-[expanded=false]:data-[second=true]:opacity-100 data-[expanded=false]:data-[third=true]:opacity-100 data-[expanded=false]:data-[second=true]:max-h-(--front-height) data-[expanded=false]:data-[third=true]:max-h-(--front-height) data-[expanded=false]:data-[second=true]:overflow-hidden data-[expanded=false]:data-[third=true]:overflow-hidden data-[expanded=false]:data-[second=true]:*:opacity-0 data-[expanded=false]:data-[third=true]:*:opacity-0 data-[front=false]:*:transition-opacity data-[front=false]:*:duration-300 transition-[transform,translate,height,opacity,max-height] duration-400 ease-in-out data-[state=closed]:animate-[toast-closed_300ms_ease-in-out] data-[state=closed]:data-[expanded=false]:data-[front=false]:animate-[toast-collapsed-closed_300ms_ease-in-out] data-[swipe=move]:transition-none'
|
base: 'pointer-events-auto absolute inset-x-0 z-(--index) transform-(--transform) data-[expanded=false]:data-[front=false]:data-[second=false]:data-[third=false]:h-(--front-height) data-[expanded=false]:data-[front=false]:data-[second=false]:data-[third=false]:opacity-0 data-[expanded=false]:data-[second=true]:opacity-100 data-[expanded=false]:data-[third=true]:opacity-100 data-[expanded=false]:data-[second=true]:*:opacity-0 data-[expanded=false]:data-[third=true]:*:opacity-0 data-[front=false]:*:transition-opacity data-[front=false]:*:duration-300 transition-[transform,translate,height,opacity] duration-400 ease-in-out data-[state=closed]:animate-[toast-closed_300ms_ease-in-out] data-[state=closed]:data-[expanded=false]:data-[front=false]:animate-[toast-collapsed-closed_300ms_ease-in-out] data-[swipe=move]:transition-none'
|
||||||
},
|
},
|
||||||
variants: {
|
variants: {
|
||||||
position: {
|
position: {
|
||||||
|
|||||||
Reference in New Issue
Block a user