@stackframe/stack-ui 2.5.35 → 2.6.0

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,32 @@
1
1
  # @stackframe/stack-ui
2
2
 
3
+ ## 2.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - OTP login, more providers, and styling improvements
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+ - @stackframe/stack-shared@2.6.0
13
+
14
+ ## 2.5.37
15
+
16
+ ### Patch Changes
17
+
18
+ - client side account deletion; new account setting style;
19
+ - Updated dependencies
20
+ - @stackframe/stack-shared@2.5.37
21
+
22
+ ## 2.5.36
23
+
24
+ ### Patch Changes
25
+
26
+ - added apple oauth
27
+ - Updated dependencies
28
+ - @stackframe/stack-shared@2.5.36
29
+
3
30
  ## 2.5.35
4
31
 
5
32
  ### Patch Changes
@@ -6,10 +6,10 @@ import { Button, Input, Typography } from "..";
6
6
  export function EditableText(props) {
7
7
  const [editing, setEditing] = useState(false);
8
8
  const [editingValue, setEditingValue] = useState(props.value);
9
- return (_jsx("div", { className: 'flex items-center gap-2', children: editing ? (_jsxs(_Fragment, { children: [_jsx(Input, { value: editingValue, onChange: (e) => setEditingValue(e.target.value) }), _jsx(Button, { onClick: async () => {
9
+ return (_jsx("div", { className: 'flex items-center gap-2', children: editing ? (_jsxs(_Fragment, { children: [_jsx(Input, { value: editingValue, onChange: (e) => setEditingValue(e.target.value) }), _jsx(Button, { size: 'sm', onClick: async () => {
10
10
  await props.onSave?.(editingValue);
11
11
  setEditing(false);
12
- }, children: "Save" }), _jsx(Button, { variant: 'secondary', onClick: () => {
12
+ }, children: "Save" }), _jsx(Button, { size: 'sm', variant: 'secondary', onClick: () => {
13
13
  setEditingValue(props.value);
14
14
  setEditing(false);
15
15
  }, children: "Cancel" })] })) : (_jsxs(_Fragment, { children: [_jsx(Typography, { children: props.value }), _jsx(Button, { onClick: () => setEditing(true), size: 'icon', variant: 'ghost', children: _jsx(Edit, { className: "w-4 h-4" }) })] })) }));
@@ -27,6 +27,7 @@ declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHT
27
27
  declare const InputOTPGroup: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
28
28
  declare const InputOTPSlot: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
29
29
  index: number;
30
+ size?: "default" | "lg" | undefined;
30
31
  } & React.RefAttributes<HTMLDivElement>>;
31
32
  declare const InputOTPSeparator: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
32
33
  export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };
@@ -6,12 +6,12 @@ import { OTPInput, OTPInputContext } from "input-otp";
6
6
  import { cn } from "../../lib/utils";
7
7
  const InputOTP = React.forwardRef(({ className, containerClassName, ...props }, ref) => (_jsx(OTPInput, { ref: ref, containerClassName: cn("flex items-center gap-2 has-[:disabled]:opacity-50", containerClassName), className: cn("disabled:cursor-not-allowed", className), ...props })));
8
8
  InputOTP.displayName = "InputOTP";
9
- const InputOTPGroup = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("flex items-center", className), ...props })));
9
+ const InputOTPGroup = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("flex items-center gap-1", className), ...props })));
10
10
  InputOTPGroup.displayName = "InputOTPGroup";
11
- const InputOTPSlot = React.forwardRef(({ index, className, ...props }, ref) => {
11
+ const InputOTPSlot = React.forwardRef(({ index, className, size = 'default', ...props }, ref) => {
12
12
  const inputOTPContext = React.useContext(OTPInputContext);
13
13
  const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
14
- return (_jsxs("div", { ref: ref, className: cn("relative flex h-9 w-9 items-center justify-center border-y border-r border-input text-sm shadow-sm first:rounded-l-md first:border-l last:rounded-r-md", isActive && "z-10 ring-1 ring-ring", className), ...props, children: [char, hasFakeCaret && (_jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: _jsx("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" }) }))] }));
14
+ return (_jsxs("div", { ref: ref, className: cn("relative flex h-9 w-9 items-center justify-center border border-input text-sm rounded-md", size === 'lg' ? 'h-10 w-10 text-lg font-medium' : '', isActive && "z-10 ring-1 ring-ring", className), ...props, children: [char, hasFakeCaret && (_jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: _jsx("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" }) }))] }));
15
15
  });
16
16
  InputOTPSlot.displayName = "InputOTPSlot";
17
17
  const InputOTPSeparator = React.forwardRef(({ ...props }, ref) => (_jsx("div", { ref: ref, role: "separator", ...props, children: _jsx(DashIcon, {}) })));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackframe/stack-ui",
3
- "version": "2.5.35",
3
+ "version": "2.6.0",
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.5.35"
71
+ "@stackframe/stack-shared": "2.6.0"
72
72
  },
73
73
  "devDependencies": {
74
74
  "@types/react": "^18.2.66",