create-bdpa-react-scaffold 2.0.2 → 2.0.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.
Files changed (2) hide show
  1. package/create-ui-lib.js +86 -3
  2. package/package.json +1 -1
package/create-ui-lib.js CHANGED
@@ -168,7 +168,6 @@ write("package.json", `
168
168
  "react": "^18.2.0",
169
169
  "react-dom": "^18.2.0",
170
170
  "react-router-dom": "^6.20.0",
171
- "lucide-react": "^0.344.0",
172
171
  "bcryptjs": "^2.4.3",
173
172
  "class-variance-authority": "^0.7.0",
174
173
  "clsx": "^2.1.0",
@@ -711,6 +710,90 @@ export default function App() {
711
710
  }
712
711
  `);
713
712
 
713
+ write("src/components/ui/icons.jsx", `
714
+ // Local SVG icon module — inline icon components, no external icon library needed.
715
+ // All icons accept className and other SVG props.
716
+
717
+ function SvgIcon({ className = "h-4 w-4", children, ...props }) {
718
+ return (
719
+ <svg
720
+ xmlns="http://www.w3.org/2000/svg"
721
+ viewBox="0 0 24 24"
722
+ fill="none"
723
+ stroke="currentColor"
724
+ strokeWidth="2"
725
+ strokeLinecap="round"
726
+ strokeLinejoin="round"
727
+ className={className}
728
+ {...props}
729
+ >
730
+ {children}
731
+ </svg>
732
+ );
733
+ }
734
+
735
+ export function Check({ className, ...p }) {
736
+ return <SvgIcon className={className} {...p}><path d="M20 6 9 17l-5-5" /></SvgIcon>;
737
+ }
738
+
739
+ export function X({ className, ...p }) {
740
+ return <SvgIcon className={className} {...p}><path d="M18 6 6 18" /><path d="m6 6 12 12" /></SvgIcon>;
741
+ }
742
+
743
+ export function Circle({ className, ...p }) {
744
+ return <SvgIcon className={className} {...p}><circle cx="12" cy="12" r="10" /></SvgIcon>;
745
+ }
746
+
747
+ export function CheckCircle({ className, ...p }) {
748
+ return <SvgIcon className={className} {...p}><circle cx="12" cy="12" r="10" /><path d="m9 12 2 2 4-4" /></SvgIcon>;
749
+ }
750
+
751
+ export function AlertCircle({ className, ...p }) {
752
+ return <SvgIcon className={className} {...p}><circle cx="12" cy="12" r="10" /><line x1="12" y1="8" x2="12" y2="12" /><line x1="12" y1="16" x2="12.01" y2="16" /></SvgIcon>;
753
+ }
754
+
755
+ export function Info({ className, ...p }) {
756
+ return <SvgIcon className={className} {...p}><circle cx="12" cy="12" r="10" /><path d="M12 16v-4" /><path d="M12 8h.01" /></SvgIcon>;
757
+ }
758
+
759
+ export function Menu({ className, ...p }) {
760
+ return <SvgIcon className={className} {...p}><line x1="4" x2="20" y1="6" y2="6" /><line x1="4" x2="20" y1="12" y2="12" /><line x1="4" x2="20" y1="18" y2="18" /></SvgIcon>;
761
+ }
762
+
763
+ export function Search({ className, ...p }) {
764
+ return <SvgIcon className={className} {...p}><circle cx="11" cy="11" r="8" /><path d="m21 21-4.3-4.3" /></SvgIcon>;
765
+ }
766
+
767
+ export function ChevronDown({ className, ...p }) {
768
+ return <SvgIcon className={className} {...p}><path d="m6 9 6 6 6-6" /></SvgIcon>;
769
+ }
770
+
771
+ export function ChevronUp({ className, ...p }) {
772
+ return <SvgIcon className={className} {...p}><path d="m18 15-6-6-6 6" /></SvgIcon>;
773
+ }
774
+
775
+ export function ChevronRight({ className, ...p }) {
776
+ return <SvgIcon className={className} {...p}><path d="m9 18 6-6-6-6" /></SvgIcon>;
777
+ }
778
+
779
+ export function ChevronLeft({ className, ...p }) {
780
+ return <SvgIcon className={className} {...p}><path d="m15 18-6-6 6-6" /></SvgIcon>;
781
+ }
782
+
783
+ export function ArrowRight({ className, ...p }) {
784
+ return <SvgIcon className={className} {...p}><path d="M5 12h14" /><path d="m12 5 7 7-7 7" /></SvgIcon>;
785
+ }
786
+
787
+ export function ArrowLeft({ className, ...p }) {
788
+ return <SvgIcon className={className} {...p}><path d="m12 19-7-7 7-7" /><path d="M19 12H5" /></SvgIcon>;
789
+ }
790
+
791
+ // Aliases
792
+ export const ChevronDownIcon = ChevronDown;
793
+ export const ChevronLeftIcon = ChevronLeft;
794
+ export const ChevronRightIcon = ChevronRight;
795
+ `);
796
+
714
797
  write("src/pages/Home.jsx", `
715
798
  import { useState } from "react";
716
799
  import { useNavigate } from "react-router-dom";
@@ -733,7 +816,7 @@ import { Textarea } from "@/components/ui/textarea";
733
816
  import { Skeleton } from "@/components/ui/skeleton";
734
817
  import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip";
735
818
  import { toast } from "sonner";
736
- import { Menu, Info, CheckCircle } from "lucide-react";
819
+ import { Menu, Info, CheckCircle } from "@/components/ui/icons";
737
820
  import { ApiClient } from "@/utils/api.js";
738
821
 
739
822
  const enrollmentData = [
@@ -1266,7 +1349,7 @@ import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/comp
1266
1349
  import { Sheet, SheetContent, SheetHeader, SheetTitle, SheetTrigger } from "@/components/ui/sheet";
1267
1350
  import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
1268
1351
  import { toast } from "sonner";
1269
- import { CheckCircle, Info, AlertCircle } from "lucide-react";
1352
+ import { CheckCircle, Info, AlertCircle } from "@/components/ui/icons";
1270
1353
 
1271
1354
  const sampleRows = [
1272
1355
  { id: 1, name: "Ada Lovelace", role: "Student", status: "Active" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-bdpa-react-scaffold",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "description": "Scaffold a React + Tailwind + shadcn/ui component demo via Vite.",
5
5
  "bin": {
6
6
  "create-bdpa-react-scaffold": "create-ui-lib.js"