@stackframe/stack-ui 2.6.1 → 2.6.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @stackframe/stack-ui
2
2
 
3
+ ## 2.6.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @stackframe/stack-shared@2.6.3
9
+
10
+ ## 2.6.2
11
+
12
+ ### Patch Changes
13
+
14
+ - Several bugfixes & typos
15
+ - Updated dependencies
16
+ - @stackframe/stack-shared@2.6.2
17
+
3
18
  ## 2.6.1
4
19
 
5
20
  ### Patch Changes
@@ -9,7 +9,7 @@ const CopyButton = React.forwardRef((props, ref) => {
9
9
  await props.onClick?.(...args);
10
10
  try {
11
11
  await navigator.clipboard.writeText(props.content);
12
- toast({ description: 'Copied to clipboard!' });
12
+ toast({ description: 'Copied to clipboard!', variant: 'success' });
13
13
  }
14
14
  catch (e) {
15
15
  toast({ description: 'Failed to copy to clipboard', variant: 'destructive' });
@@ -16,7 +16,7 @@ const InlineCode = React.forwardRef((props, ref) => {
16
16
  runAsynchronously(async () => {
17
17
  try {
18
18
  await navigator.clipboard.writeText(getNodeText(props.children));
19
- toast({ description: 'Copied to clipboard!' });
19
+ toast({ description: 'Copied to clipboard!', variant: 'success' });
20
20
  }
21
21
  catch (e) {
22
22
  toast({ description: 'Failed to copy to clipboard', variant: 'destructive' });
@@ -4,7 +4,7 @@ import { type VariantProps } from "class-variance-authority";
4
4
  declare const ToastProvider: React.FC<ToastPrimitives.ToastProviderProps>;
5
5
  declare const ToastViewport: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React.RefAttributes<HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
6
6
  declare const Toast: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & React.RefAttributes<HTMLLIElement>, "ref"> & VariantProps<(props?: ({
7
- variant?: "default" | "destructive" | null | undefined;
7
+ variant?: "default" | "destructive" | "success" | null | undefined;
8
8
  } & import("class-variance-authority/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLLIElement>>;
9
9
  declare const ToastAction: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
10
10
  declare const ToastClose: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
@@ -1,4 +1,4 @@
1
- "use client";
1
+ 'use client';
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import React from "react";
4
4
  import { Cross2Icon } from "@radix-ui/react-icons";
@@ -11,8 +11,9 @@ ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
11
11
  const toastVariants = cva("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full", {
12
12
  variants: {
13
13
  variant: {
14
- default: "border bg-background text-foreground",
15
- destructive: "destructive group border-destructive bg-destructive text-destructive-foreground",
14
+ default: "border border-border bg-background text-foreground shadow-lg dark:border-gray-600 dark:bg-gray-800 dark:text-foreground",
15
+ destructive: 'destructive group border-destructive bg-destructive text-destructive-foreground',
16
+ success: 'success group border-success bg-success text-success-foreground',
16
17
  },
17
18
  },
18
19
  defaultVariants: {
@@ -25,7 +26,7 @@ const Toast = React.forwardRef(({ className, variant, ...props }, ref) => {
25
26
  Toast.displayName = ToastPrimitives.Root.displayName;
26
27
  const ToastAction = React.forwardRef(({ className, ...props }, ref) => (_jsx(ToastPrimitives.Action, { ref: ref, className: cn("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive", className), ...props })));
27
28
  ToastAction.displayName = ToastPrimitives.Action.displayName;
28
- const ToastClose = React.forwardRef(({ className, ...props }, ref) => (_jsx(ToastPrimitives.Close, { ref: ref, className: cn("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600", className), "toast-close": "", ...props, children: _jsx(Cross2Icon, { className: "h-4 w-4" }) })));
29
+ const ToastClose = React.forwardRef(({ className, ...props }, ref) => (_jsx(ToastPrimitives.Close, { ref: ref, className: cn('absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100', 'group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600', 'group-[.success]:text-green-300 group-[.success]:hover:text-green-50 group-[.success]:focus:ring-green-400 group-[.success]:focus:ring-offset-green-600', className), "toast-close": '', ...props, children: _jsx(Cross2Icon, { className: "h-4 w-4" }) })));
29
30
  ToastClose.displayName = ToastPrimitives.Close.displayName;
30
31
  const ToastTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx(ToastPrimitives.Title, { ref: ref, className: cn("text-sm font-semibold [&+div]:text-xs", className), ...props })));
31
32
  ToastTitle.displayName = ToastPrimitives.Title.displayName;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackframe/stack-ui",
3
- "version": "2.6.1",
3
+ "version": "2.6.3",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "files": [
@@ -68,7 +68,7 @@
68
68
  "react-hook-form": "^7.51.4",
69
69
  "react-resizable-panels": "^2.0.19",
70
70
  "tailwind-merge": "^2.3.0",
71
- "@stackframe/stack-shared": "2.6.1"
71
+ "@stackframe/stack-shared": "2.6.3"
72
72
  },
73
73
  "devDependencies": {
74
74
  "@types/react": "^18.2.66",