@hiogawa/tiny-toast
Advanced tools
Comparing version 0.0.1-pre.1 to 0.0.1-pre.2
@@ -18,2 +18,4 @@ import React from 'react'; | ||
type ReactToastContainerOptions = { | ||
style?: React.CSSProperties; | ||
className?: string; | ||
renderAnimation?: (props: { | ||
@@ -20,0 +22,0 @@ item: ReactToastItem; |
@@ -402,6 +402,15 @@ // src/core.ts | ||
const renderItem = options?.renderItem ?? ((props) => /* @__PURE__ */ React9.createElement(ItemComponent, { ...props })); | ||
return /* @__PURE__ */ React9.createElement("div", null, /* @__PURE__ */ React9.createElement( | ||
"style", | ||
return /* @__PURE__ */ React9.createElement( | ||
"div", | ||
{ | ||
dangerouslySetInnerHTML: { __html: `/* layer: preflights */ | ||
className: cls( | ||
options?.className, | ||
"uno-tiny-toast-mwbu9w" | ||
), | ||
style: options?.style | ||
}, | ||
/* @__PURE__ */ React9.createElement( | ||
"style", | ||
{ | ||
dangerouslySetInnerHTML: { __html: `/* layer: preflights */ | ||
*,::before,::after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgba(0,0,0,0);--un-ring-shadow:0 0 rgba(0,0,0,0);--un-shadow-inset: ;--un-shadow:0 0 rgba(0,0,0,0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,0.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: ;}::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgba(0,0,0,0);--un-ring-shadow:0 0 rgba(0,0,0,0);--un-shadow-inset: ;--un-shadow:0 0 rgba(0,0,0,0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,0.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: ;} | ||
@@ -412,2 +421,4 @@ /* layer: shortcuts */ | ||
.uno-tiny-toast-vjz1vy{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' display='inline-block' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m12.866 3l9.526 16.5a1 1 0 0 1-.866 1.5H2.474a1 1 0 0 1-.866-1.5L11.134 3a1 1 0 0 1 1.732 0zM11 16v2h2v-2h-2zm0-7v5h2V9h-2z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;width:1em;height:1em;font-size:1.5rem;line-height:2rem;--un-text-opacity:1;color:rgba(255,75,75,var(--un-text-opacity));} | ||
.uno-tiny-toast-hf0hq9{pointer-events:auto;z-index:9999;border-radius:0.25rem;--un-bg-opacity:1;background-color:rgba(255,255,255,var(--un-bg-opacity));--un-text-opacity:1;color:rgba(54,54,54,var(--un-text-opacity));--un-shadow:0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow);} | ||
.uno-tiny-toast-mwbu9w{pointer-events:none;position:fixed;inset:0;z-index:9999;} | ||
.uno-tiny-toast-abs5ee{position:absolute;top:0.25rem;width:100%;display:flex;flex-direction:column-reverse;align-items:center;} | ||
@@ -422,3 +433,2 @@ .uno-tiny-toast-b95z9a{position:absolute;bottom:0.25rem;left:0.5rem;display:flex;flex-direction:column;} | ||
.uno-tiny-toast-ebcx1j{--un-scale-x:0;--un-scale-y:0;transform:translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotateZ(var(--un-rotate-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z));opacity:0.1;} | ||
.uno-tiny-toast-1rlgxh{border-radius:0.25rem;--un-bg-opacity:1;background-color:rgba(255,255,255,var(--un-bg-opacity));--un-text-opacity:1;color:rgba(54,54,54,var(--un-text-opacity));--un-shadow:0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow);} | ||
.uno-tiny-toast-jdvrox{transition-duration:300ms;} | ||
@@ -429,12 +439,15 @@ /* layer: default */ | ||
.px{padding-left:1rem;padding-right:1rem;}` } | ||
} | ||
), /* @__PURE__ */ React9.createElement("div", { className: "uno-tiny-toast-b95z9a" }, itemsByPosition.get("bottom-left")?.reverse().map((item) => /* @__PURE__ */ React9.createElement(React9.Fragment, { key: item.id }, renderAnimation({ | ||
toast, | ||
item, | ||
children: renderItem({ toast, item }) | ||
})))), /* @__PURE__ */ React9.createElement("div", { className: "uno-tiny-toast-abs5ee" }, itemsByPosition.get("top-center")?.reverse().map((item) => /* @__PURE__ */ React9.createElement(React9.Fragment, { key: item.id }, renderAnimation({ | ||
toast, | ||
item, | ||
children: renderItem({ toast, item }) | ||
}))))); | ||
} | ||
), | ||
/* @__PURE__ */ React9.createElement("div", { className: "uno-tiny-toast-b95z9a" }, itemsByPosition.get("bottom-left")?.reverse().map((item) => /* @__PURE__ */ React9.createElement(React9.Fragment, { key: item.id }, renderAnimation({ | ||
toast, | ||
item, | ||
children: renderItem({ toast, item }) | ||
})))), | ||
/* @__PURE__ */ React9.createElement("div", { className: "uno-tiny-toast-abs5ee" }, itemsByPosition.get("top-center")?.reverse().map((item) => /* @__PURE__ */ React9.createElement(React9.Fragment, { key: item.id }, renderAnimation({ | ||
toast, | ||
item, | ||
children: renderItem({ toast, item }) | ||
})))) | ||
); | ||
} | ||
@@ -497,3 +510,3 @@ function AnimationWrapper({ | ||
item.data.className, | ||
"uno-tiny-toast-1rlgxh" | ||
"uno-tiny-toast-hf0hq9" | ||
), | ||
@@ -500,0 +513,0 @@ style: item.data.style, |
{ | ||
"name": "@hiogawa/tiny-toast", | ||
"version": "0.0.1-pre.1", | ||
"version": "0.0.1-pre.2", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
62992
1444