create-bdpa-react-scaffold 1.8.7 → 1.8.8

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.
Files changed (2) hide show
  1. package/create-ui-lib.js +8 -37
  2. package/package.json +1 -1
package/create-ui-lib.js CHANGED
@@ -650,7 +650,7 @@ export function cn(...inputs) {
650
650
  `);
651
651
 
652
652
  write("src/index.js", `
653
- export { default as Button } from "./components/ui/Button.jsx";
653
+ export { Button } from "./components/ui/button.jsx";
654
654
  export { default as Card } from "./components/ui/Card.jsx";
655
655
  export { default as Input } from "./components/ui/Input.jsx";
656
656
  export { default as FormField } from "./components/ui/FormField.jsx";
@@ -786,7 +786,7 @@ function Dashboard() {
786
786
  </FormField>
787
787
 
788
788
  <div className="flex gap-2 pt-2">
789
- <Button variant="primary">Save</Button>
789
+ <Button>Save</Button>
790
790
  <Button variant="secondary">Cancel</Button>
791
791
  </div>
792
792
  </div>
@@ -803,9 +803,9 @@ function Dashboard() {
803
803
  <Card>
804
804
  <h2 className="text-lg font-semibold mb-4">Button Variants</h2>
805
805
  <div className="flex flex-wrap gap-3">
806
- <Button variant="primary">Primary</Button>
806
+ <Button>Primary</Button>
807
807
  <Button variant="secondary">Secondary</Button>
808
- <Button variant="danger">Danger</Button>
808
+ <Button variant="destructive">Danger</Button>
809
809
  <Button variant="outline">Outline</Button>
810
810
  </div>
811
811
  </Card>
@@ -891,37 +891,8 @@ export default function App() {
891
891
  // UI Components
892
892
  // -------------------------------
893
893
 
894
- write("src/components/ui/Button.jsx", `
895
- export default function Button({
896
- variant = "primary",
897
- children,
898
- className = "",
899
- ...props
900
- }) {
901
- const base =
902
- "inline-flex items-center justify-center px-4 py-2 rounded-md font-semibold text-sm transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2";
903
-
904
- const variants = {
905
- primary:
906
- "bg-blue-600 text-white hover:bg-blue-700 focus:ring-blue-500",
907
- secondary:
908
- "bg-gray-200 text-gray-900 hover:bg-gray-300 focus:ring-gray-400",
909
- danger:
910
- "bg-red-600 text-white hover:bg-red-700 focus:ring-red-500",
911
- outline:
912
- "border border-gray-300 text-gray-800 hover:bg-gray-100 focus:ring-gray-400"
913
- };
914
-
915
- return (
916
- <button
917
- className={\`\${base} \${variants[variant]} \${className}\`}
918
- {...props}
919
- >
920
- {children}
921
- </button>
922
- );
923
- }
924
- `);
894
+ // Note: Button component is provided by shadcn/ui (src/components/ui/button.jsx)
895
+ // Installed via: npx shadcn@latest add button
925
896
 
926
897
  write("src/components/ui/Card.jsx", `
927
898
  export default function Card({ children, className = "" }) {
@@ -1203,7 +1174,7 @@ export function ToastProvider({ children }) {
1203
1174
  // -------------------------------
1204
1175
 
1205
1176
  write("src/pages/auth/Login.jsx", `
1206
- import Button from "../../components/ui/Button.jsx";
1177
+ import { Button } from "@/components/ui/button";
1207
1178
  import Input from "../../components/ui/Input.jsx";
1208
1179
  import Card from "../../components/ui/Card.jsx";
1209
1180
 
@@ -1232,7 +1203,7 @@ export default function Login({ onSubmit }) {
1232
1203
  }`);
1233
1204
 
1234
1205
  write("src/pages/auth/Register.jsx", `
1235
- import Button from "../../components/ui/Button.jsx";
1206
+ import { Button } from "@/components/ui/button";
1236
1207
  import Input from "../../components/ui/Input.jsx";
1237
1208
  import Card from "../../components/ui/Card.jsx";
1238
1209
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-bdpa-react-scaffold",
3
- "version": "1.8.7",
3
+ "version": "1.8.8",
4
4
  "description": "Scaffold a React + Tailwind UI library demo via Vite.",
5
5
  "bin": {
6
6
  "create-bdpa-react-scaffold": "create-ui-lib.js"