Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-sonner

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-sonner - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

16

lib/vue-sonner.d.ts

@@ -66,3 +66,3 @@ import type { Component } from 'vue';

declare interface ToastClassnames {
declare interface ToastClasses {
toast?: string;

@@ -126,3 +126,3 @@ title?: string;

style: CSSProperties;
class: any;
class: string;
position: Position;

@@ -154,3 +154,3 @@ theme: Theme;

toastOptions?: ToastOptions;
class?: any;
class?: string;
style?: CSSProperties;

@@ -174,5 +174,5 @@ offset?: string | number;

declare interface ToastOptions {
class?: any;
class?: string;
closeButton?: boolean;
descriptionClass?: any;
descriptionClass?: string;
style?: CSSProperties;

@@ -183,3 +183,3 @@ cancelButtonStyle?: CSSProperties;

unstyled?: boolean;
classes?: ToastClassnames;
classes?: ToastClasses;
}

@@ -216,4 +216,4 @@

unstyled?: boolean;
class?: any;
classes?: ToastClassnames;
class?: string;
classes?: ToastClasses;
descriptionClass?: string;

@@ -220,0 +220,0 @@ position?: Position;

@@ -1,6 +0,6 @@

var Ht = Object.defineProperty;
var Mt = (r, o, e) => o in r ? Ht(r, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[o] = e;
var At = Object.defineProperty;
var Mt = (r, o, e) => o in r ? At(r, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[o] = e;
var x = (r, o, e) => (Mt(r, typeof o != "symbol" ? o + "" : o, e), e);
import { openBlock as l, createElementBlock as p, createElementVNode as M, ref as f, watchEffect as W, defineComponent as gt, computed as k, onMounted as kt, onUnmounted as At, normalizeClass as R, normalizeStyle as Et, unref as it, createVNode as V, createCommentVNode as N, createBlock as X, resolveDynamicComponent as st, mergeProps as rt, Fragment as F, renderSlot as P, normalizeProps as Tt, createTextVNode as Bt, toDisplayString as nt, renderList as ft, useAttrs as Dt, nextTick as Lt, watch as $t, withCtx as K } from "vue";
function Ot(r) {
import { openBlock as l, createElementBlock as p, createElementVNode as H, ref as f, watchEffect as W, defineComponent as gt, computed as k, onMounted as kt, onUnmounted as Ot, normalizeClass as F, normalizeStyle as Et, unref as it, createVNode as V, createCommentVNode as N, createBlock as X, resolveDynamicComponent as st, mergeProps as rt, Fragment as R, renderSlot as P, normalizeProps as Tt, createTextVNode as Bt, toDisplayString as nt, renderList as ft, useAttrs as Dt, nextTick as Lt, watch as $t, withCtx as K } from "vue";
function Ht(r) {
if (!r || typeof document > "u")

@@ -11,3 +11,3 @@ return;

}
Ot("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999}[data-sonner-toaster][data-x-position=right]{right:max(var(--offset),env(safe-area-inset-right))}[data-sonner-toaster][data-x-position=left]{left:max(var(--offset),env(safe-area-inset-left))}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:max(var(--offset),env(safe-area-inset-top))}[data-sonner-toaster][data-y-position=bottom]{bottom:max(var(--offset),env(safe-area-inset-bottom))}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;will-change:transform,opacity,height;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast] [data-description]{font-weight:400;line-height:1.4;color:inherit}[data-sonner-toast] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast] [data-icon]>*{flex-shrink:0}[data-sonner-toast] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast] [data-content]{display:flex;flex-direction:column;gap:2px;transform:translateZ(0)}[data-sonner-toast] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toast][data-theme=dark] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;background:var(--gray1);color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]:before{content:'';position:absolute;left:0;right:0;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]:before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]:before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]:before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast]:after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]:before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount,0));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{from{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;--mobile-offset:16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - 32px)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 91%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 91%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 91%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 100%, 12%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 12%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-rich-colors=true] [data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true] [data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true] [data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true] [data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true] [data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true] [data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true] [data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true] [data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");
Ht("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999}[data-sonner-toaster][data-x-position=right]{right:max(var(--offset),env(safe-area-inset-right))}[data-sonner-toaster][data-x-position=left]{left:max(var(--offset),env(safe-area-inset-left))}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:max(var(--offset),env(safe-area-inset-top))}[data-sonner-toaster][data-y-position=bottom]{bottom:max(var(--offset),env(safe-area-inset-bottom))}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;will-change:transform,opacity,height;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast] [data-description]{font-weight:400;line-height:1.4;color:inherit}[data-sonner-toast] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast] [data-icon]>*{flex-shrink:0}[data-sonner-toast] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast] [data-content]{display:flex;flex-direction:column;gap:2px;transform:translateZ(0)}[data-sonner-toast] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toast][data-theme=dark] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;background:var(--gray1);color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]:before{content:'';position:absolute;left:0;right:0;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]:before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]:before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]:before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast]:after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]:before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount,0));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{from{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;--mobile-offset:16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - 32px)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 91%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 91%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 91%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 100%, 12%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 12%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-rich-colors=true] [data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true] [data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true] [data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true] [data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true] [data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true] [data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true] [data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true] [data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");
let pt = 0;

@@ -30,4 +30,4 @@ class Yt {

x(this, "create", (o) => {
var y;
const { message: e, ...a } = o, m = typeof o.id == "number" || o.id && ((y = o.id) == null ? void 0 : y.length) > 0 ? o.id : pt++, c = this.toasts.find((d) => d.id === m), g = o.dismissible === void 0 ? !0 : o.dismissible;
var b;
const { message: e, ...a } = o, m = typeof o.id == "number" || o.id && ((b = o.id) == null ? void 0 : b.length) > 0 ? o.id : pt++, c = this.toasts.find((d) => d.id === m), g = o.dismissible === void 0 ? !0 : o.dismissible;
return c ? this.toasts = this.toasts.map((d) => d.id === m ? (this.publish({ ...d, ...o, id: m, title: e }), {

@@ -70,3 +70,3 @@ ...d,

c = !1;
const y = typeof e.error == "function" ? (
const b = typeof e.error == "function" ? (
// @ts-expect-error

@@ -78,10 +78,10 @@ e.error(`HTTP error! status: ${response.status}`)

) : e.description;
this.create({ id: a, type: "error", message: y, description: d });
this.create({ id: a, type: "error", message: b, description: d });
} else if (e.success !== void 0) {
c = !1;
const y = typeof e.success == "function" ? e.success(g) : e.success, d = typeof e.description == "function" ? (
const b = typeof e.success == "function" ? e.success(g) : e.success, d = typeof e.description == "function" ? (
// @ts-expect-error
e.description(g)
) : e.description;
this.create({ id: a, type: "success", message: y, description: d });
this.create({ id: a, type: "success", message: b, description: d });
}

@@ -91,7 +91,7 @@ }).catch((g) => {

c = !1;
const y = typeof e.error == "function" ? e.error(g) : e.error, d = typeof e.description == "function" ? (
const b = typeof e.error == "function" ? e.error(g) : e.error, d = typeof e.description == "function" ? (
// @ts-expect-error
e.description(g)
) : e.description;
this.create({ id: a, type: "error", message: y, description: d });
this.create({ id: a, type: "error", message: b, description: d });
}

@@ -111,5 +111,5 @@ }).finally(() => {

}
const S = new Yt(), Nt = (r, o) => {
const C = new Yt(), Nt = (r, o) => {
const e = (o == null ? void 0 : o.id) || pt++;
return S.create({
return C.create({
message: r,

@@ -120,12 +120,12 @@ id: e,

}), e;
}, Rt = Nt, Re = Object.assign(Rt, {
success: S.success,
info: S.info,
warning: S.warning,
error: S.error,
custom: S.custom,
message: S.message,
promise: S.promise,
dismiss: S.dismiss,
loading: S.loading
}, Ft = Nt, Fe = Object.assign(Ft, {
success: C.success,
info: C.info,
warning: C.warning,
error: C.error,
custom: C.custom,
message: C.message,
promise: C.promise,
dismiss: C.dismiss,
loading: C.loading
}), G = (r, o) => {

@@ -136,3 +136,3 @@ const e = r.__vccOpts || r;

return e;
}, Ft = {}, Wt = {
}, Rt = {}, Wt = {
xmlns: "http://www.w3.org/2000/svg",

@@ -147,3 +147,3 @@ width: "12",

"stroke-linejoin": "round"
}, Ut = /* @__PURE__ */ M("line", {
}, Ut = /* @__PURE__ */ H("line", {
x1: "18",

@@ -153,3 +153,3 @@ y1: "6",

y2: "18"
}, null, -1), Vt = /* @__PURE__ */ M("line", {
}, null, -1), Vt = /* @__PURE__ */ H("line", {
x1: "6",

@@ -166,3 +166,3 @@ y1: "6",

}
const Kt = /* @__PURE__ */ G(Ft, [["render", _t]]), Xt = () => {
const Kt = /* @__PURE__ */ G(Rt, [["render", _t]]), Xt = () => {
const r = f(!1);

@@ -211,10 +211,10 @@ return W(() => {

setup(r, { emit: o }) {
const e = o, a = r, m = f(!1), c = f(!1), g = f(!1), y = f(!1), d = f(0), O = f(0), A = f(null), C = f(null), D = k(() => a.index === 0), z = k(() => a.index + 1 <= a.visibleToasts), T = k(() => a.toast.type), j = k(() => a.toast.dismissible !== !1), lt = k(() => {
var t, i, b, B, w, h, H;
const e = o, a = r, m = f(!1), c = f(!1), g = f(!1), b = f(!1), d = f(0), O = f(0), D = f(null), E = f(null), z = k(() => a.index === 0), A = k(() => a.index + 1 <= a.visibleToasts), T = k(() => a.toast.type), j = k(() => a.toast.dismissible !== !1), lt = k(() => {
var t, i, y, S, w, h, M;
return a.cn(
(t = a.classes) == null ? void 0 : t.toast,
(b = (i = a.toast) == null ? void 0 : i.classes) == null ? void 0 : b.toast,
(B = a.classes) == null ? void 0 : B.default,
(y = (i = a.toast) == null ? void 0 : i.classes) == null ? void 0 : y.toast,
(S = a.classes) == null ? void 0 : S.default,
(w = a.classes) == null ? void 0 : w[a.toast.type || "default"],
(H = (h = a.toast) == null ? void 0 : h.classes) == null ? void 0 : H[a.toast.type || "default"]
(M = (h = a.toast) == null ? void 0 : h.classes) == null ? void 0 : M[a.toast.type || "default"]
);

@@ -225,23 +225,23 @@ }), dt = a.toast.style || {}, Z = k(

() => a.toast.duration || a.duration || Qt
), n = f(0), u = f(0), $ = f(s.value), E = f(0), v = f(null), L = k(() => a.position.split("-")), q = k(() => L.value[0]), J = k(() => L.value[1]), Q = typeof a.toast.title != "string", tt = typeof a.toast.description != "string", et = k(() => a.heights.reduce((t, i, b) => b >= Z.value ? t : t + i.height, 0)), at = Xt(), ot = k(() => a.toast.invert || a.invert), U = k(() => T.value === "loading");
), n = f(0), u = f(0), B = f(s.value), $ = f(0), v = f(null), L = k(() => a.position.split("-")), q = k(() => L.value[0]), J = k(() => L.value[1]), Q = typeof a.toast.title != "string", tt = typeof a.toast.description != "string", et = k(() => a.heights.reduce((t, i, y) => y >= Z.value ? t : t + i.height, 0)), at = Xt(), ot = k(() => a.toast.invert || a.invert), U = k(() => T.value === "loading");
kt(() => {
if (!m.value)
return;
const t = C.value, i = t == null ? void 0 : t.style.height;
const t = E.value, i = t == null ? void 0 : t.style.height;
t.style.height = "auto";
const b = t.getBoundingClientRect().height;
t.style.height = i, O.value = b;
let B;
const y = t.getBoundingClientRect().height;
t.style.height = i, O.value = y;
let S;
a.heights.find(
(h) => h.toastId === a.toast.id
) ? B = a.heights.map(
(h) => h.toastId === a.toast.id ? { ...h, height: b } : h
) : B = [
) ? S = a.heights.map(
(h) => h.toastId === a.toast.id ? { ...h, height: y } : h
) : S = [
{
toastId: a.toast.id,
height: b,
height: y,
position: a.toast.position
},
...a.heights
], e("update:heights", B);
], e("update:heights", S);
});

@@ -260,16 +260,16 @@ const I = () => {

}, It = (t) => {
U.value || !j.value || (A.value = /* @__PURE__ */ new Date(), d.value = u.value, t.target.setPointerCapture(t.pointerId), t.target.tagName !== "BUTTON" && (g.value = !0, v.value = { x: t.clientX, y: t.clientY }));
U.value || !j.value || (D.value = /* @__PURE__ */ new Date(), d.value = u.value, t.target.setPointerCapture(t.pointerId), t.target.tagName !== "BUTTON" && (g.value = !0, v.value = { x: t.clientX, y: t.clientY }));
}, Pt = (t) => {
var w, h, H, Y;
if (y.value)
var w, h, M, Y;
if (b.value)
return;
v.value = null;
const i = Number(
((w = C.value) == null ? void 0 : w.style.getPropertyValue("--swipe-amount").replace("px", "")) || 0
), b = (/* @__PURE__ */ new Date()).getTime() - A.value.getTime(), B = Math.abs(i) / b;
if (Math.abs(i) >= ee || B > 0.11) {
d.value = u.value, (H = (h = a.toast).onDismiss) == null || H.call(h, a.toast), I(), y.value = !0;
((w = E.value) == null ? void 0 : w.style.getPropertyValue("--swipe-amount").replace("px", "")) || 0
), y = (/* @__PURE__ */ new Date()).getTime() - D.value.getTime(), S = Math.abs(i) / y;
if (Math.abs(i) >= ee || S > 0.11) {
d.value = u.value, (M = (h = a.toast).onDismiss) == null || M.call(h, a.toast), I(), b.value = !0;
return;
}
(Y = C.value) == null || Y.style.setProperty("--swipe-amount", "0px"), g.value = !1;
(Y = E.value) == null || Y.style.setProperty("--swipe-amount", "0px"), g.value = !1;
}, zt = (t) => {

@@ -279,4 +279,4 @@ var Y;

return;
const i = t.clientY - v.value.y, b = t.clientX - v.value.x, w = (L.value[0] === "top" ? Math.min : Math.max)(0, i), h = t.pointerType === "touch" ? 10 : 2;
Math.abs(w) > h ? (Y = C.value) == null || Y.style.setProperty("--swipe-amount", `${i}px`) : Math.abs(b) > h && (v.value = null);
const i = t.clientY - v.value.y, y = t.clientX - v.value.x, w = (L.value[0] === "top" ? Math.min : Math.max)(0, i), h = t.pointerType === "touch" ? 10 : 2;
Math.abs(w) > h ? (Y = E.value) == null || Y.style.setProperty("--swipe-amount", `${i}px`) : Math.abs(y) > h && (v.value = null);
};

@@ -289,15 +289,15 @@ return W(() => {

let i;
const b = () => {
if (E.value < n.value) {
const y = () => {
if ($.value < n.value) {
const w = (/* @__PURE__ */ new Date()).getTime() - n.value;
$.value = $.value - w;
B.value = B.value - w;
}
E.value = (/* @__PURE__ */ new Date()).getTime();
}, B = () => {
$.value = (/* @__PURE__ */ new Date()).getTime();
}, S = () => {
n.value = (/* @__PURE__ */ new Date()).getTime(), i = setTimeout(() => {
var w, h;
(h = (w = a.toast).onAutoClose) == null || h.call(w, a.toast), I();
}, $.value);
}, B.value);
};
a.expanded || a.interacting || a.pauseWhenPageIsHidden && at ? b() : B(), t(() => {
a.expanded || a.interacting || a.pauseWhenPageIsHidden && at ? y() : S(), t(() => {
clearTimeout(i);

@@ -308,4 +308,4 @@ });

}), kt(() => {
if (C.value) {
const t = C.value.getBoundingClientRect().height;
if (E.value) {
const t = E.value.getBoundingClientRect().height;
O.value = t;

@@ -319,4 +319,4 @@ const i = [

m.value = !0;
}), At(() => {
if (C.value) {
}), Ot(() => {
if (E.value) {
const t = a.heights.filter(

@@ -328,3 +328,3 @@ (i) => i.toastId !== a.toast.id

}), (t, i) => {
var b, B, w, h, H, Y, ht, mt, vt, bt, yt, wt;
var y, S, w, h, M, Y, ht, mt, vt, yt, bt, wt;
return l(), p("li", {

@@ -336,14 +336,14 @@ "aria-live": t.toast.important ? "assertive" : "polite",

ref_key: "toastRef",
ref: C,
ref: E,
"data-sonner-toast": "",
class: R(lt.value),
"data-styled": !(t.toast.component || (b = t.toast) != null && b.unstyled || t.unstyled),
class: F(lt.value),
"data-styled": !(t.toast.component || (y = t.toast) != null && y.unstyled || t.unstyled),
"data-mounted": m.value,
"data-promise": !!t.toast.promise,
"data-removed": c.value,
"data-visible": z.value,
"data-visible": A.value,
"data-y-position": q.value,
"data-x-position": J.value,
"data-index": t.index,
"data-front": D.value,
"data-front": z.value,
"data-swiping": g.value,

@@ -353,3 +353,3 @@ "data-dismissible": j.value,

"data-invert": ot.value,
"data-swipe-out": y.value,
"data-swipe-out": b.value,
"data-expanded": !!(t.expanded || t.expandByDefault && m.value),

@@ -374,3 +374,3 @@ style: Et({

"data-close-button": "",
class: R(t.cn((B = t.classes) == null ? void 0 : B.closeButton, (h = (w = t.toast) == null ? void 0 : w.classes) == null ? void 0 : h.closeButton)),
class: F(t.cn((S = t.classes) == null ? void 0 : S.closeButton, (h = (w = t.toast) == null ? void 0 : w.classes) == null ? void 0 : h.closeButton)),
onClick: ut

@@ -380,15 +380,15 @@ }, [

], 10, Zt)) : N("", !0),
t.toast.component ? (l(), X(st(t.toast.component), rt({ key: 1 }, t.toast.componentProps, { onCloseToast: I }), null, 16)) : (l(), p(F, { key: 2 }, [
t.toast.component ? (l(), X(st(t.toast.component), rt({ key: 1 }, t.toast.componentProps, { onCloseToast: I }), null, 16)) : (l(), p(R, { key: 2 }, [
T.value !== "default" || t.toast.icon || t.toast.promise ? (l(), p("div", qt, [
(t.toast.promise || T.value === "loading") && !t.toast.icon ? P(t.$slots, "loading-icon", { key: 0 }) : N("", !0),
t.toast.icon ? (l(), X(st(t.toast.icon), { key: 1 })) : (l(), p(F, { key: 2 }, [
t.toast.icon ? (l(), X(st(t.toast.icon), { key: 1 })) : (l(), p(R, { key: 2 }, [
T.value === "success" ? P(t.$slots, "success-icon", { key: 0 }) : T.value === "error" ? P(t.$slots, "error-icon", { key: 1 }) : T.value === "warning" ? P(t.$slots, "warning-icon", { key: 2 }) : T.value === "info" ? P(t.$slots, "info-icon", { key: 3 }) : N("", !0)
], 64))
])) : N("", !0),
M("div", Jt, [
M("div", {
H("div", Jt, [
H("div", {
"data-title": "",
class: R(t.cn((H = t.classes) == null ? void 0 : H.title, (Y = t.toast.classes) == null ? void 0 : Y.title))
class: F(t.cn((M = t.classes) == null ? void 0 : M.title, (Y = t.toast.classes) == null ? void 0 : Y.title))
}, [
Q ? (l(), X(st(t.toast.title), Tt(rt({ key: 0 }, t.toast.componentProps)), null, 16)) : (l(), p(F, { key: 1 }, [
Q ? (l(), X(st(t.toast.title), Tt(rt({ key: 0 }, t.toast.componentProps)), null, 16)) : (l(), p(R, { key: 1 }, [
Bt(nt(t.toast.title), 1)

@@ -400,3 +400,3 @@ ], 64))

"data-description": "",
class: R(
class: F(
t.cn(

@@ -410,3 +410,3 @@ t.descriptionClass,

}, [
tt ? (l(), X(st(t.toast.description), Tt(rt({ key: 0 }, t.toast.componentProps)), null, 16)) : (l(), p(F, { key: 1 }, [
tt ? (l(), X(st(t.toast.description), Tt(rt({ key: 0 }, t.toast.componentProps)), null, 16)) : (l(), p(R, { key: 1 }, [
Bt(nt(t.toast.description), 1)

@@ -418,3 +418,3 @@ ], 64))

key: 1,
class: R(t.cn((vt = t.classes) == null ? void 0 : vt.cancelButton, (bt = t.toast.classes) == null ? void 0 : bt.cancelButton)),
class: F(t.cn((vt = t.classes) == null ? void 0 : vt.cancelButton, (yt = t.toast.classes) == null ? void 0 : yt.cancelButton)),
"data-button": "",

@@ -429,3 +429,3 @@ "data-cancel": "",

key: 2,
class: R(t.cn((yt = t.classes) == null ? void 0 : yt.actionButton, (wt = t.toast.classes) == null ? void 0 : wt.actionButton)),
class: F(t.cn((bt = t.classes) == null ? void 0 : bt.actionButton, (wt = t.toast.classes) == null ? void 0 : wt.actionButton)),
"data-button": "",

@@ -452,4 +452,4 @@ onClick: i[1] || (i[1] = (_) => {

}, [
M("div", ne, [
(l(!0), p(F, null, ft(it(o), (m) => (l(), p("div", {
H("div", ne, [
(l(!0), p(R, null, ft(it(o), (m) => (l(), p("div", {
key: `spinner-bar-${m}`,

@@ -467,3 +467,3 @@ class: "sonner-loading-bar"

width: "20"
}, de = /* @__PURE__ */ M("path", {
}, de = /* @__PURE__ */ H("path", {
"fill-rule": "evenodd",

@@ -484,3 +484,3 @@ d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",

width: "20"
}, he = /* @__PURE__ */ M("path", {
}, he = /* @__PURE__ */ H("path", {
"fill-rule": "evenodd",

@@ -495,3 +495,3 @@ d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",

}
const be = /* @__PURE__ */ G(pe, [["render", ve]]), ye = {}, we = {
const ye = /* @__PURE__ */ G(pe, [["render", ve]]), be = {}, we = {
xmlns: "http://www.w3.org/2000/svg",

@@ -502,3 +502,3 @@ viewBox: "0 0 24 24",

width: "20"
}, xe = /* @__PURE__ */ M("path", {
}, xe = /* @__PURE__ */ H("path", {
"fill-rule": "evenodd",

@@ -513,3 +513,3 @@ d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",

}
const Be = /* @__PURE__ */ G(ye, [["render", Te]]), $e = {}, Se = {
const Be = /* @__PURE__ */ G(be, [["render", Te]]), $e = {}, Se = {
xmlns: "http://www.w3.org/2000/svg",

@@ -520,3 +520,3 @@ viewBox: "0 0 20 20",

width: "20"
}, Ce = /* @__PURE__ */ M("path", {
}, Ce = /* @__PURE__ */ H("path", {
"fill-rule": "evenodd",

@@ -531,3 +531,3 @@ d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",

}
const Pe = /* @__PURE__ */ G($e, [["render", Ie]]), ze = ["aria-label"], He = ["dir", "data-theme", "data-rich-colors", "data-y-position", "data-x-position"], Me = 3, St = "32px", Oe = 4e3, Ae = 356, Ct = 14, De = typeof window < "u" && typeof document < "u", Le = /* @__PURE__ */ gt({
const Pe = /* @__PURE__ */ G($e, [["render", Ie]]), ze = ["aria-label"], Ae = ["dir", "data-theme", "data-rich-colors", "data-y-position", "data-x-position"], Me = 3, St = "32px", He = 4e3, Oe = 356, Ct = 14, De = typeof window < "u" && typeof document < "u", Le = /* @__PURE__ */ gt({
name: "Toaster",

@@ -543,3 +543,3 @@ inheritAttrs: !1,

expand: { type: Boolean, default: !1 },
duration: { default: Oe },
duration: { default: He },
gap: { default: Ct },

@@ -571,5 +571,5 @@ visibleToasts: { default: Me },

return s.length > 0 ? Array.from(new Set([a.position].concat(s))) : [a.position];
}), y = f([]), d = f(!1), O = f(!1), A = f(
}), b = f([]), d = f(!1), O = f(!1), D = f(
a.theme !== "system" ? a.theme : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"
), C = k(() => a.cn || o), D = f(null), z = f(null), T = f(!1), j = a.hotkey.join("+").replace(/Key/g, "").replace(/Digit/g, "");
), E = k(() => a.cn || o), z = f(null), A = f(null), T = f(!1), j = a.hotkey.join("+").replace(/Key/g, "").replace(/Digit/g, "");
function lt(s) {

@@ -580,5 +580,5 @@ c.value = c.value.filter(({ id: n }) => n !== s.id);

var n, u;
T.value && !((u = (n = s.currentTarget) == null ? void 0 : n.contains) != null && u.call(n, s.relatedTarget)) && (T.value = !1, z.value && (z.value.focus({ preventScroll: !0 }), z.value = null));
T.value && !((u = (n = s.currentTarget) == null ? void 0 : n.contains) != null && u.call(n, s.relatedTarget)) && (T.value = !1, A.value && (A.value.focus({ preventScroll: !0 }), A.value = null));
}, Z = (s) => {
s.target instanceof HTMLElement && s.target.dataset.dismissible === "false" || T.value || (T.value = !0, z.value = s.relatedTarget);
s.target instanceof HTMLElement && s.target.dataset.dismissible === "false" || T.value || (T.value = !0, A.value = s.relatedTarget);
}, ct = (s) => {

@@ -588,6 +588,6 @@ s.target && s.target instanceof HTMLElement && s.target.dataset.dismissible === "false" || (O.value = !1);

return W((s) => {
const n = S.subscribe((u) => {
const n = C.subscribe((u) => {
if (u.dismiss) {
c.value = c.value.map(
($) => $.id === u.id ? { ...$, delete: !0 } : $
(B) => B.id === u.id ? { ...B, delete: !0 } : B
);

@@ -597,6 +597,6 @@ return;

Lt(() => {
const $ = c.value.findIndex(
(E) => E.id === u.id
const B = c.value.findIndex(
($) => $.id === u.id
);
$ !== -1 ? c.value.splice($, 1, u) : c.value = [u, ...c.value];
B !== -1 ? c.value.splice(B, 1, u) : c.value = [u, ...c.value];
});

@@ -611,15 +611,15 @@ });

if (s !== "system") {
A.value = s;
D.value = s;
return;
}
s === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? A.value = "dark" : A.value = "light"), !(typeof window > "u") && window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", ({ matches: n }) => {
n ? A.value = "dark" : A.value = "light";
s === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? D.value = "dark" : D.value = "light"), !(typeof window > "u") && window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", ({ matches: n }) => {
n ? D.value = "dark" : D.value = "light";
});
}
), $t(
() => D.value,
() => z.value,
() => {
if (D.value)
if (z.value)
return () => {
z.value && (z.value.focus({ preventScroll: !0 }), z.value = null, T.value = !1);
A.value && (A.value.focus({ preventScroll: !0 }), A.value = null, T.value = !1);
};

@@ -631,6 +631,8 @@ }

function n(u) {
var E, v;
a.hotkey.every(
const B = a.hotkey.every(
(L) => u[L] || u.code === L
) && (d.value = !0, (E = D.value) == null || E.focus()), u.code === "Escape" && (document.activeElement === D.value || (v = D.value) != null && v.contains(document.activeElement)) && (d.value = !1);
), $ = Array.isArray(z.value) ? z.value[0] : z.value;
B && (d.value = !0, $ == null || $.focus());
const v = document.activeElement === z.value || ($ == null ? void 0 : $.contains(document.activeElement));
u.code === "Escape" && v && (d.value = !1);
}

@@ -644,4 +646,4 @@ De && (document.addEventListener("keydown", n), s(() => {

}, [
(l(!0), p(F, null, ft(g.value, (u, $) => {
var E;
(l(!0), p(R, null, ft(g.value, (u, B) => {
var $;
return l(), p("ol", rt({

@@ -651,3 +653,3 @@ key: u,

ref_key: "listRef",
ref: D,
ref: z,
"data-sonner-toaster": "",

@@ -662,5 +664,5 @@ class: s.class,

style: {
"--front-toast-height": `${(E = y.value[0]) == null ? void 0 : E.height}px`,
"--front-toast-height": `${($ = b.value[0]) == null ? void 0 : $.height}px`,
"--offset": typeof s.offset == "number" ? `${s.offset}px` : s.offset || St,
"--width": `${Ae}px`,
"--width": `${Oe}px`,
"--gap": `${Ct}px`,

@@ -680,4 +682,4 @@ ...s.style,

}, s.$attrs), [
(l(!0), p(F, null, ft(c.value.filter(
(v) => !v.position && $ === 0 || v.position === s.position
(l(!0), p(R, null, ft(c.value.filter(
(v) => !v.position && B === 0 || v.position === s.position
), (v, L) => {

@@ -690,3 +692,3 @@ var q, J, Q, tt, et, at, ot, U, I;

duration: ((q = s.toastOptions) == null ? void 0 : q.duration) ?? s.duration,
class: R((J = s.toastOptions) == null ? void 0 : J.class),
class: F((J = s.toastOptions) == null ? void 0 : J.class),
descriptionClass: (Q = s.toastOptions) == null ? void 0 : Q.descriptionClass,

@@ -708,5 +710,5 @@ invert: s.invert,

pauseWhenPageIsHidden: s.pauseWhenPageIsHidden,
cn: C.value,
heights: y.value,
"onUpdate:heights": n[0] || (n[0] = (ut) => y.value = ut),
cn: E.value,
heights: b.value,
"onUpdate:heights": n[0] || (n[0] = (ut) => b.value = ut),
onRemoveToast: lt

@@ -738,3 +740,3 @@ }, {

P(s.$slots, "info-icon", {}, () => [
V(be)
V(ye)
])

@@ -745,7 +747,7 @@ ]),

}), 128))
], 16, He);
], 16, Ae);
}), 128))
], 8, ze));
}
}), Fe = {
}), Re = {
install(r) {

@@ -757,5 +759,5 @@ r.component("Toaster", Le);

Le as Toaster,
Fe as default,
Re as toast
Re as default,
Fe as toast
};
//# sourceMappingURL=vue-sonner.js.map
{
"name": "vue-sonner",
"version": "1.1.1",
"version": "1.1.2",
"type": "module",

@@ -5,0 +5,0 @@ "author": "xiaoluoboding <xiaoluoboding@gmail.com>",

@@ -291,4 +291,4 @@ # Sonner for Vue

style: { background: 'red' },
className: 'my-toast',
descriptionClassName: 'my-toast-description'
class: 'my-toast',
descriptionClass: 'my-toast-description'
}"

@@ -305,4 +305,4 @@ />

},
className: 'my-toast',
descriptionClassName: 'my-toast-description'
class: 'my-toast',
descriptionClass: 'my-toast-description'
})

@@ -309,0 +309,0 @@ ```

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc