@dgithiomi/sbui-web 1.0.3 → 1.0.4

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.d.cts CHANGED
@@ -291,13 +291,13 @@ interface ToastContextType {
291
291
 
292
292
  declare const Toast: React.FC<ToastProps>;
293
293
 
294
+ declare function useToast(): ToastContextType;
295
+
294
296
  declare const ToastContext: React.Context<ToastContextType | null>;
295
297
  declare const ToastProvider: React.FC<{
296
298
  children: ReactNode;
297
299
  }>;
298
300
 
299
- declare function useToast(): ToastContextType;
300
-
301
301
  interface SbuiProviderProps extends PropsWithChildren {
302
302
  /**
303
303
  * Keep this provider extensible: feature providers can be toggled here
package/dist/index.d.ts CHANGED
@@ -291,13 +291,13 @@ interface ToastContextType {
291
291
 
292
292
  declare const Toast: React.FC<ToastProps>;
293
293
 
294
+ declare function useToast(): ToastContextType;
295
+
294
296
  declare const ToastContext: React.Context<ToastContextType | null>;
295
297
  declare const ToastProvider: React.FC<{
296
298
  children: ReactNode;
297
299
  }>;
298
300
 
299
- declare function useToast(): ToastContextType;
300
-
301
301
  interface SbuiProviderProps extends PropsWithChildren {
302
302
  /**
303
303
  * Keep this provider extensible: feature providers can be toggled here
package/dist/index.mjs CHANGED
@@ -12264,8 +12264,9 @@ var TOAST_VARIANTS = {
12264
12264
  icon: /* @__PURE__ */ React14.createElement(
12265
12265
  Success,
12266
12266
  {
12267
- color: "rgb(var(--color-success-700))",
12268
- className: "rounded-full"
12267
+ size: 16,
12268
+ className: "rounded-full",
12269
+ color: "rgb(var(--color-success-600))"
12269
12270
  }
12270
12271
  )
12271
12272
  },
@@ -12274,21 +12275,27 @@ var TOAST_VARIANTS = {
12274
12275
  textColor: "rgb(var(--color-fg-inverse))",
12275
12276
  iconBackground: "rgb(var(--color-error-400))",
12276
12277
  toastContentColor: "rgb(var(--color-error-400))",
12277
- icon: /* @__PURE__ */ React14.createElement(XFill, { color: "rgb(var(--color-error-700))" })
12278
+ icon: /* @__PURE__ */ React14.createElement(XFill, { size: 16, color: "rgb(var(--color-error-600))" })
12278
12279
  },
12279
12280
  warning: {
12280
12281
  backgroundColor: "rgb(var(--color-fg))",
12281
12282
  textColor: "rgb(var(--color-fg-inverse))",
12282
- iconBackground: "rgb(var(--color-warning-400))",
12283
- toastContentColor: "rgb(var(--color-warning-400))",
12284
- icon: /* @__PURE__ */ React14.createElement(Warning, { color: "rgb(var(--color-warning-700))" })
12283
+ iconBackground: "rgb(var(--color-warning-500))",
12284
+ toastContentColor: "rgb(var(--color-warning-500))",
12285
+ icon: /* @__PURE__ */ React14.createElement(Warning, { size: 16, color: "rgb(var(--color-warning-600))" })
12285
12286
  },
12286
12287
  info: {
12287
12288
  backgroundColor: "rgb(var(--color-fg))",
12288
12289
  textColor: "rgb(var(--color-fg-inverse))",
12289
- iconBackground: "rgb(var(--color-neutral-400))",
12290
- toastContentColor: "rgb(var(--color-neutral-400))",
12291
- icon: /* @__PURE__ */ React14.createElement(CircledInformation, { color: "white" })
12290
+ iconBackground: "rgb(var(--color-primary-400))",
12291
+ toastContentColor: "rgb(var(--color-primary-400))",
12292
+ icon: /* @__PURE__ */ React14.createElement(
12293
+ CircledInformation,
12294
+ {
12295
+ size: 16,
12296
+ color: "rgb(var(--color-primary-600))"
12297
+ }
12298
+ )
12292
12299
  }
12293
12300
  };
12294
12301
  function secondsToMillis(seconds) {
@@ -12300,7 +12307,7 @@ var Toast = ({
12300
12307
  title,
12301
12308
  message,
12302
12309
  onClose,
12303
- variant,
12310
+ variant = "success",
12304
12311
  duration = "short"
12305
12312
  }) => {
12306
12313
  const isMobile = useIsMobile();
@@ -12370,7 +12377,7 @@ var Toast = ({
12370
12377
  "div",
12371
12378
  {
12372
12379
  style: { backgroundColor: iconBackground },
12373
- className: "grid size-8 place-items-center rounded-full"
12380
+ className: "grid size-6 place-items-center rounded-full"
12374
12381
  },
12375
12382
  icon
12376
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(
@@ -12381,9 +12388,9 @@ var Toast = ({
12381
12388
  style: {
12382
12389
  borderColor: toastColors.closeIconBorderColor
12383
12390
  },
12384
- className: `cursor-pointer rounded-full border p-2 opacity-50 hover:opacity-100`
12391
+ className: `cursor-pointer rounded-full border p-1 opacity-50 hover:opacity-100`
12385
12392
  },
12386
- /* @__PURE__ */ React15.createElement(X, { color: toastColors.closeIconColor })
12393
+ /* @__PURE__ */ React15.createElement(X, { size: 16, color: toastColors.closeIconColor })
12387
12394
  )),
12388
12395
  /* @__PURE__ */ React15.createElement(
12389
12396
  motion.div,
@@ -12402,6 +12409,9 @@ var Toast = ({
12402
12409
  );
12403
12410
  };
12404
12411
 
12412
+ // src/molecules/Toast/useToast.ts
12413
+ import { useContext as useContext9 } from "react";
12414
+
12405
12415
  // src/molecules/Toast/Toast.provider.tsx
12406
12416
  import React16 from "react";
12407
12417
  import { createPortal } from "react-dom";
@@ -12461,7 +12471,6 @@ var ToastProvider = ({
12461
12471
  };
12462
12472
 
12463
12473
  // src/molecules/Toast/useToast.ts
12464
- import { useContext as useContext9 } from "react";
12465
12474
  function useToast() {
12466
12475
  const toastContext = useContext9(ToastContext);
12467
12476
  if (!toastContext) {