@bouko/react 0.5.6 → 1.5.5

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.
@@ -4,7 +4,6 @@ export type ButtonProps = {
4
4
  size?: "sm" | "md" | "lg";
5
5
  style?: string;
6
6
  onClick?: () => void;
7
- disabled?: boolean;
8
7
  children: ReactNode;
9
8
  };
10
9
  export declare function Button({ variant, style, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
@@ -4,18 +4,16 @@ export function Button({ variant, style, ...props }) {
4
4
  return (_jsx("button", { className: cn(styles({ variant }), style), ...props }));
5
5
  }
6
6
  const styles = tv({
7
- base: "flex items-center gap-2 bg-accent hover:bg-accent-dark border border-accent-dark rounded font-semibold text-background-light duration-200 cursor-pointer disabled:cursor-not-allowed",
8
- defaultVariants: { size: "md" },
7
+ base: "flex items-center gap-2 px-4 py-2 bg-accent hover:bg-accent-dark border border-accent-dark rounded font-semibold text-background-light duration-200 cursor-pointer",
9
8
  variants: {
10
9
  variant: {
11
10
  primary: "bg-primary hover:bg-primary-dark border-primary-dark",
12
- outline: "!bg-transparent border-accent hover:border-accent-dark text-primary",
11
+ outline: "!bg-transparent border-2 border-accent hover:border-accent-dark text-primary",
13
12
  ghost: "!bg-transparent border-transparent text-accent hover:text-accent-dark"
14
13
  },
15
14
  size: {
16
15
  sm: "px-3 py-1 text-sm",
17
- md: "px-4 py-2",
18
- lg: "px-5 py-3 text-lg"
16
+ lg: "text-lg"
19
17
  }
20
18
  }
21
19
  });
@@ -0,0 +1,4 @@
1
+ import { type ReactNode } from "react";
2
+ export default function FadeCarousel({ items }: {
3
+ items: ReactNode[];
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { useState, useEffect } from "react";
4
+ import { AnimatePresence, motion } from "framer-motion";
5
+ export default function FadeCarousel({ items }) {
6
+ const [index, setIndex] = useState(0);
7
+ useEffect(() => {
8
+ const interval = setInterval(() => {
9
+ setIndex((prev) => (prev + 1) % items.length);
10
+ }, 2000);
11
+ return () => clearInterval(interval);
12
+ }, []);
13
+ return (_jsx(AnimatePresence, { mode: "wait", children: _jsx(motion.div, { className: "absolute", transition: { duration: 0.5 }, initial: { opacity: 0, y: 5 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: -5 }, children: items[index] }, index) }));
14
+ }
@@ -1,2 +1 @@
1
1
  export declare const getFileData: (files: File[]) => Promise<unknown[]>;
2
- export declare const getEnv: (key: string) => string;
@@ -13,9 +13,3 @@ export const getFileData = (files) => Promise.all(files.map((file) => {
13
13
  reader.readAsDataURL(file);
14
14
  });
15
15
  }));
16
- export const getEnv = (key) => {
17
- const value = process.env[key];
18
- if (!value)
19
- throw new Error(`Missing required env: ${key}`);
20
- return value;
21
- };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
 
3
3
  "name": "@bouko/react",
4
- "version": "0.5.6",
4
+ "version": "1.5.5",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
7
7
  "license": "MIT",
@@ -22,7 +22,7 @@
22
22
  "@bouko/form": "^0.2.1",
23
23
  "@bouko/style": "^0.1.1",
24
24
  "clsx": "^2.1.1",
25
- "framer-motion": "^12.16.0",
25
+ "framer-motion": "^12.23.6",
26
26
  "tailwind-merge": "^3.3.0",
27
27
  "tailwind-variants": "^1.0.0"
28
28
  },