@dgithiomi/sbui-web 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +13 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +19 -19
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +12 -3
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -12259,12 +12259,12 @@ var TOAST_VARIANTS = {
|
|
|
12259
12259
|
success: {
|
|
12260
12260
|
backgroundColor: "rgb(var(--color-fg))",
|
|
12261
12261
|
textColor: "rgb(var(--color-fg-inverse))",
|
|
12262
|
-
|
|
12263
|
-
|
|
12262
|
+
toastContentColor: "rgb(var(--color-success-500))",
|
|
12263
|
+
iconBackground: "rgb(var(--color-success-400) / 90%)",
|
|
12264
12264
|
icon: /* @__PURE__ */ React14.createElement(
|
|
12265
12265
|
Success,
|
|
12266
12266
|
{
|
|
12267
|
-
size:
|
|
12267
|
+
size: 17,
|
|
12268
12268
|
className: "rounded-full",
|
|
12269
12269
|
color: "rgb(var(--color-success-600))"
|
|
12270
12270
|
}
|
|
@@ -12273,29 +12273,23 @@ var TOAST_VARIANTS = {
|
|
|
12273
12273
|
error: {
|
|
12274
12274
|
backgroundColor: "rgb(var(--color-fg))",
|
|
12275
12275
|
textColor: "rgb(var(--color-fg-inverse))",
|
|
12276
|
-
iconBackground: "rgb(var(--color-error-400))",
|
|
12277
12276
|
toastContentColor: "rgb(var(--color-error-400))",
|
|
12278
|
-
|
|
12277
|
+
iconBackground: "rgb(var(--color-error-400) / 80%)",
|
|
12278
|
+
icon: /* @__PURE__ */ React14.createElement(XFill, { size: 17, color: "rgb(var(--color-error-600) / 90%)" })
|
|
12279
12279
|
},
|
|
12280
12280
|
warning: {
|
|
12281
12281
|
backgroundColor: "rgb(var(--color-fg))",
|
|
12282
12282
|
textColor: "rgb(var(--color-fg-inverse))",
|
|
12283
12283
|
iconBackground: "rgb(var(--color-warning-500))",
|
|
12284
12284
|
toastContentColor: "rgb(var(--color-warning-500))",
|
|
12285
|
-
icon: /* @__PURE__ */ React14.createElement(Warning, { size:
|
|
12285
|
+
icon: /* @__PURE__ */ React14.createElement(Warning, { size: 17, color: "white" })
|
|
12286
12286
|
},
|
|
12287
12287
|
info: {
|
|
12288
12288
|
backgroundColor: "rgb(var(--color-fg))",
|
|
12289
12289
|
textColor: "rgb(var(--color-fg-inverse))",
|
|
12290
|
-
iconBackground: "rgb(var(--color-primary-
|
|
12291
|
-
toastContentColor: "rgb(var(--color-primary-
|
|
12292
|
-
icon: /* @__PURE__ */ React14.createElement(
|
|
12293
|
-
CircledInformation,
|
|
12294
|
-
{
|
|
12295
|
-
size: 16,
|
|
12296
|
-
color: "rgb(var(--color-primary-600))"
|
|
12297
|
-
}
|
|
12298
|
-
)
|
|
12290
|
+
iconBackground: "rgb(var(--color-primary-500))",
|
|
12291
|
+
toastContentColor: "rgb(var(--color-primary-500))",
|
|
12292
|
+
icon: /* @__PURE__ */ React14.createElement(CircledInformation, { size: 17, color: "white" })
|
|
12299
12293
|
}
|
|
12300
12294
|
};
|
|
12301
12295
|
function secondsToMillis(seconds) {
|
|
@@ -12377,10 +12371,10 @@ var Toast = ({
|
|
|
12377
12371
|
"div",
|
|
12378
12372
|
{
|
|
12379
12373
|
style: { backgroundColor: iconBackground },
|
|
12380
|
-
className: "grid size-
|
|
12374
|
+
className: "grid size-7 place-items-center rounded-full self-start mt-1"
|
|
12381
12375
|
},
|
|
12382
12376
|
icon
|
|
12383
|
-
), /* @__PURE__ */ React15.createElement("div", { className: "pointer-events-none flex-1" }, title && /* @__PURE__ */ React15.createElement("p", { className: "font-semibold" }, title), /* @__PURE__ */ React15.createElement("p", { className: "text-sm" }, message)), /* @__PURE__ */ React15.createElement(
|
|
12377
|
+
), /* @__PURE__ */ React15.createElement("div", { className: "pointer-events-none flex-1" }, title && /* @__PURE__ */ React15.createElement("p", { className: "text-base font-semibold" }, title), /* @__PURE__ */ React15.createElement("p", { className: "text-sm" }, message)), /* @__PURE__ */ React15.createElement(
|
|
12384
12378
|
"div",
|
|
12385
12379
|
{
|
|
12386
12380
|
role: "button",
|
|
@@ -12388,7 +12382,7 @@ var Toast = ({
|
|
|
12388
12382
|
style: {
|
|
12389
12383
|
borderColor: toastColors.closeIconBorderColor
|
|
12390
12384
|
},
|
|
12391
|
-
className:
|
|
12385
|
+
className: `!cursor-pointer rounded-full border p-1 opacity-50 hover:opacity-100`
|
|
12392
12386
|
},
|
|
12393
12387
|
/* @__PURE__ */ React15.createElement(X, { size: 16, color: toastColors.closeIconColor })
|
|
12394
12388
|
)),
|
|
@@ -12415,7 +12409,12 @@ import { useContext as useContext9 } from "react";
|
|
|
12415
12409
|
// src/molecules/Toast/Toast.provider.tsx
|
|
12416
12410
|
import React16 from "react";
|
|
12417
12411
|
import { createPortal } from "react-dom";
|
|
12418
|
-
import {
|
|
12412
|
+
import {
|
|
12413
|
+
createContext as createContext7,
|
|
12414
|
+
useCallback as useCallback5,
|
|
12415
|
+
useEffect as useEffect10,
|
|
12416
|
+
useState as useState6
|
|
12417
|
+
} from "react";
|
|
12419
12418
|
var ToastContext = createContext7(null);
|
|
12420
12419
|
var ToastProvider = ({
|
|
12421
12420
|
children
|
|
@@ -12442,6 +12441,7 @@ var ToastProvider = ({
|
|
|
12442
12441
|
return /* @__PURE__ */ React16.createElement(
|
|
12443
12442
|
motion.div,
|
|
12444
12443
|
{
|
|
12444
|
+
className: "w-full",
|
|
12445
12445
|
key: toastUUID,
|
|
12446
12446
|
layout: true,
|
|
12447
12447
|
initial: { opacity: 0, x: 50, y: 10 },
|