Socket
Socket
Sign inDemoInstall

@welcome-ui/toast

Package Overview
Dependencies
134
Maintainers
12
Versions
127
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.14.1-alpha.0 to 5.15.0

61

dist/index.js

@@ -39,3 +39,3 @@ var __create = Object.create;

var import_react4 = __toESM(require("react"));
var import_xstyled_styled_components2 = require("@wttj/xstyled-styled-components");
var import_styled_components2 = require("@xstyled/styled-components");
var import_headless2 = __toESM(require("react-hot-toast/headless"));

@@ -48,8 +48,9 @@

// src/styles.ts
var import_xstyled_styled_components = __toESM(require("@wttj/xstyled-styled-components"));
var import_styled_components = __toESM(require("@xstyled/styled-components"));
var import_box = require("@welcome-ui/box");
var import_alert = require("@welcome-ui/alert");
var ToastWrapper = import_xstyled_styled_components.default.divBox(
({ isBottom }) => import_xstyled_styled_components.css`
${(0, import_xstyled_styled_components.th)("toasts.default")}
${isBottom ? (0, import_xstyled_styled_components.th)("toasts.bottom") : (0, import_xstyled_styled_components.th)("toasts.top")}
var ToastWrapper = (0, import_styled_components.default)(import_box.Box)(
({ isBottom }) => import_styled_components.css`
${(0, import_styled_components.th)("toasts.default")}
${isBottom ? (0, import_styled_components.th)("toasts.bottom") : (0, import_styled_components.th)("toasts.top")}

@@ -61,22 +62,24 @@ position: fixed;

);
var Growl = (0, import_xstyled_styled_components.default)(import_alert.Alert)`
position: relative;
max-width: 25rem;
padding: lg;
${(0, import_xstyled_styled_components.th)("toasts.growls.default")};
var Growl = (0, import_styled_components.default)(import_alert.Alert)(
() => import_styled_components.css`
position: relative;
max-width: 25rem;
padding: lg;
${(0, import_styled_components.th)("toasts.growls.default")};
div:first-of-type {
align-self: baseline;
}
div:first-of-type {
align-self: baseline;
}
button {
flex-shrink: 0;
}
`;
var Title = import_xstyled_styled_components.default.divBox(
() => import_xstyled_styled_components.css`
button {
flex-shrink: 0;
}
`
);
var Title = (0, import_styled_components.default)(import_box.Box)(
() => import_styled_components.css`
display: flex;
align-items: center;
padding-bottom: xs;
${(0, import_xstyled_styled_components.th)("toasts.growls.title")};
${(0, import_styled_components.th)("toasts.growls.title")};

@@ -88,4 +91,4 @@ & > *:first-child {

);
var Snackbar = (0, import_xstyled_styled_components.default)(import_alert.Alert)(
({ hasCloseButton }) => import_xstyled_styled_components.css`
var Snackbar = (0, import_styled_components.default)(import_alert.Alert)(
({ hasCloseButton }) => import_styled_components.css`
display: flex;

@@ -165,3 +168,3 @@ align-items: center;

var import_system = require("@welcome-ui/system");
var import_box = require("@welcome-ui/box");
var import_box2 = require("@welcome-ui/box");
var Growl2 = (0, import_system.forwardRef)(

@@ -189,3 +192,3 @@ ({ children, dataTestId, hasCloseButton = true, icon, onClose, variant = "default" }, ref) => {

),
/* @__PURE__ */ import_react2.default.createElement(import_box.Box, { pr: "xl" }, children)
/* @__PURE__ */ import_react2.default.createElement(import_box2.Box, { pr: "xl" }, children)
);

@@ -199,6 +202,6 @@ }

var import_close_button2 = require("@welcome-ui/close-button");
var import_box2 = require("@welcome-ui/box");
var import_box3 = require("@welcome-ui/box");
var import_system2 = require("@welcome-ui/system");
var Snackbar2 = (0, import_system2.forwardRef)(
({ children, hasCloseButton = true, icon, onClose, variant = "default", ...rest }, ref) => /* @__PURE__ */ import_react3.default.createElement(Snackbar, { hasCloseButton, icon, ref, variant, ...rest }, /* @__PURE__ */ import_react3.default.createElement(import_box2.Box, { alignItems: "center", display: "flex" }, children, hasCloseButton && /* @__PURE__ */ import_react3.default.createElement(import_close_button2.CloseButton, { onClick: onClose, size: "xs" })))
({ children, hasCloseButton = true, icon, onClose, variant = "default", ...rest }, ref) => /* @__PURE__ */ import_react3.default.createElement(Snackbar, { hasCloseButton, icon, ref, variant, ...rest }, /* @__PURE__ */ import_react3.default.createElement(import_box3.Box, { alignItems: "center", display: "flex" }, children, hasCloseButton && /* @__PURE__ */ import_react3.default.createElement(import_close_button2.CloseButton, { onClick: onClose, size: "xs" })))
);

@@ -209,3 +212,3 @@ Snackbar2.displayName = "Snackbar";

var Notifications = ({ pauseOnHover = true }) => {
const themeContext = (0, import_react4.useContext)(import_xstyled_styled_components2.ThemeContext);
const themeContext = (0, import_react4.useContext)(import_styled_components2.ThemeContext);
const { handlers, toasts } = (0, import_headless2.useToaster)();

@@ -215,3 +218,3 @@ const { calculateOffset, endPause, startPause, updateHeight } = handlers;

const onMouseLeave = pauseOnHover ? endPause : void 0;
return /* @__PURE__ */ import_react4.default.createElement(import_xstyled_styled_components2.ThemeProvider, { theme: themeContext }, /* @__PURE__ */ import_react4.default.createElement("div", { onMouseEnter, onMouseLeave }, toasts.map((toast2) => /* @__PURE__ */ import_react4.default.createElement(
return /* @__PURE__ */ import_react4.default.createElement(import_styled_components2.ThemeProvider, { theme: themeContext }, /* @__PURE__ */ import_react4.default.createElement("div", { onMouseEnter, onMouseLeave }, toasts.map((toast2) => /* @__PURE__ */ import_react4.default.createElement(
ToastWrapper2,

@@ -218,0 +221,0 @@ {

@@ -1,4 +0,15 @@

export declare const ToastWrapper: any;
export declare const Growl: any;
export declare const Title: any;
export declare const Snackbar: any;
/// <reference types="react" />
import { GrowlOptions } from './Growl';
import { SnackbarOptions } from './Snackbar';
export declare const ToastWrapper: import("styled-components").StyledComponent<import("System/dist/types").CreateWuiComponent<"div", import("@welcome-ui/box").BoxProps>, import("@xstyled/system").Theme, {
isBottom: boolean;
}, never>;
export declare const Growl: import("styled-components").StyledComponent<import("System/dist/types").CreateWuiComponent<"div", import("@welcome-ui/alert").AlertProps> & {
Title: import("react").FC<import("Alert/dist/types/Title").AlertTitleProps>;
Button: import("System/dist/types").CreateWuiComponent<"button", import("Button/dist/types").ButtonProps>;
}, import("@xstyled/system").Theme, GrowlOptions, never>;
export declare const Title: import("styled-components").StyledComponent<import("System/dist/types").CreateWuiComponent<"div", import("@welcome-ui/box").BoxProps>, import("@xstyled/system").Theme, {}, never>;
export declare const Snackbar: import("styled-components").StyledComponent<import("System/dist/types").CreateWuiComponent<"div", import("@welcome-ui/alert").AlertProps> & {
Title: import("react").FC<import("Alert/dist/types/Title").AlertTitleProps>;
Button: import("System/dist/types").CreateWuiComponent<"button", import("Button/dist/types").ButtonProps>;
}, import("@xstyled/system").Theme, SnackbarOptions, never>;
{
"name": "@welcome-ui/toast",
"version": "5.14.1-alpha.0",
"version": "5.15.0",
"description": "Customizable design system with react • styled-components • styled-system and ariakit.",

@@ -52,15 +52,15 @@ "main": "dist/index.js",

"dependencies": {
"@welcome-ui/alert": "^5.14.1-alpha.0",
"@welcome-ui/box": "^5.14.1-alpha.0",
"@welcome-ui/close-button": "^5.14.1-alpha.0",
"@welcome-ui/system": "^5.14.1-alpha.0",
"@welcome-ui/text": "^5.14.1-alpha.0",
"@welcome-ui/alert": "^5.15.0",
"@welcome-ui/box": "^5.12.0",
"@welcome-ui/close-button": "^5.15.0",
"@welcome-ui/system": "^5.12.0",
"@welcome-ui/text": "^5.12.0",
"react-hot-toast": "^2.4.1"
},
"peerDependencies": {
"@wttj/xstyled-styled-components": "^4.0.0",
"@xstyled/styled-components": "^3.7.3",
"react": "^18.0.0",
"styled-components": "^6.1.8"
"styled-components": "^5.3.9"
},
"gitHead": "b81e57c2528a2051bce45b8d7843ebbd320c4ebd",
"gitHead": "6251a06d1f4761ef91dd64f8e3e2c377127a107b",
"sideEffects": false,

@@ -67,0 +67,0 @@ "component": "Notifications, Toast, toast",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc