Skip to content

Commit e60e064

Browse files
CopilotTechQuery
andcommitted
Add RestTable component and shadcn UI components
Co-authored-by: TechQuery <[email protected]>
1 parent 7c7cfa0 commit e60e064

File tree

18 files changed

+1848
-0
lines changed

18 files changed

+1848
-0
lines changed

package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,25 @@
1010
"registry:build": "shadcn build"
1111
},
1212
"dependencies": {
13+
"@radix-ui/react-checkbox": "^1.3.3",
1314
"@radix-ui/react-label": "^2.1.7",
1415
"@radix-ui/react-slot": "^1.2.3",
1516
"class-variance-authority": "^0.7.1",
1617
"clsx": "^2.1.1",
18+
"lodash": "^4.17.21",
1719
"lucide-react": "^0.487.0",
20+
"mobx": "^6.15.0",
21+
"mobx-i18n": "^0.7.2",
22+
"mobx-react": "^9.2.1",
23+
"mobx-react-helper": "^0.5.1",
24+
"mobx-restful": "^2.1.4",
1825
"next": "15.5.2",
1926
"react": "19.1.0",
2027
"react-dom": "19.1.0",
2128
"shadcn": "^3.0.0",
2229
"tailwind-merge": "^3.3.1",
2330
"tw-animate-css": "^1.3.6",
31+
"web-utility": "^4.6.4",
2432
"zod": "^3.25.76"
2533
},
2634
"devDependencies": {

pnpm-lock.yaml

Lines changed: 684 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/r/badge.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
3+
"name": "badge",
4+
"type": "registry:ui",
5+
"title": "Badge",
6+
"description": "A badge component for displaying tags and labels.",
7+
"files": [
8+
{
9+
"path": "registry/new-york/ui/badge.tsx",
10+
"content": "import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst badgeVariants = cva(\n \"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2\",\n {\n variants: {\n variant: {\n default:\n \"border-transparent bg-primary text-primary-foreground hover:bg-primary/80\",\n secondary:\n \"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n destructive:\n \"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80\",\n outline: \"text-foreground\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nexport interface BadgeProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof badgeVariants> {}\n\nfunction Badge({ className, variant, ...props }: BadgeProps) {\n return (\n <div className={cn(badgeVariants({ variant }), className)} {...props} />\n )\n}\n\nexport { Badge, badgeVariants }\n",
11+
"type": "registry:ui"
12+
}
13+
]
14+
}

public/r/checkbox.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
3+
"name": "checkbox",
4+
"type": "registry:ui",
5+
"title": "Checkbox",
6+
"description": "A checkbox component with Radix UI.",
7+
"dependencies": [
8+
"@radix-ui/react-checkbox",
9+
"lucide-react"
10+
],
11+
"files": [
12+
{
13+
"path": "registry/new-york/ui/checkbox.tsx",
14+
"content": "import * as React from \"react\"\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\"\nimport { Check } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Checkbox = React.forwardRef<\n React.ElementRef<typeof CheckboxPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n \"peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground\",\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n className={cn(\"flex items-center justify-center text-current\")}\n >\n <Check className=\"h-4 w-4\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n))\nCheckbox.displayName = CheckboxPrimitive.Root.displayName\n\nexport { Checkbox }\n",
15+
"type": "registry:ui"
16+
}
17+
]
18+
}

public/r/registry.json

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,94 @@
7575
"type": "registry:component"
7676
}
7777
]
78+
},
79+
{
80+
"name": "table",
81+
"type": "registry:ui",
82+
"title": "Table",
83+
"description": "A responsive table component.",
84+
"files": [
85+
{
86+
"path": "registry/new-york/ui/table.tsx",
87+
"type": "registry:ui"
88+
}
89+
]
90+
},
91+
{
92+
"name": "checkbox",
93+
"type": "registry:ui",
94+
"title": "Checkbox",
95+
"description": "A checkbox component with Radix UI.",
96+
"dependencies": ["@radix-ui/react-checkbox", "lucide-react"],
97+
"files": [
98+
{
99+
"path": "registry/new-york/ui/checkbox.tsx",
100+
"type": "registry:ui"
101+
}
102+
]
103+
},
104+
{
105+
"name": "spinner",
106+
"type": "registry:ui",
107+
"title": "Spinner",
108+
"description": "A loading spinner component.",
109+
"dependencies": ["lucide-react"],
110+
"files": [
111+
{
112+
"path": "registry/new-york/ui/spinner.tsx",
113+
"type": "registry:ui"
114+
}
115+
]
116+
},
117+
{
118+
"name": "badge",
119+
"type": "registry:ui",
120+
"title": "Badge",
121+
"description": "A badge component for displaying tags and labels.",
122+
"files": [
123+
{
124+
"path": "registry/new-york/ui/badge.tsx",
125+
"type": "registry:ui"
126+
}
127+
]
128+
},
129+
{
130+
"name": "rest-table",
131+
"type": "registry:component",
132+
"title": "REST Table",
133+
"description": "A MobX-powered table component with CRUD operations.",
134+
"dependencies": [
135+
"lodash",
136+
"mobx",
137+
"mobx-i18n",
138+
"mobx-react",
139+
"mobx-react-helper",
140+
"mobx-restful",
141+
"web-utility"
142+
],
143+
"registryDependencies": ["button", "checkbox", "spinner", "table", "badge", "card", "input", "label"],
144+
"files": [
145+
{
146+
"path": "registry/new-york/blocks/rest-table/rest-table.tsx",
147+
"type": "registry:component"
148+
},
149+
{
150+
"path": "registry/new-york/blocks/rest-table/components/badge-bar.tsx",
151+
"type": "registry:component"
152+
},
153+
{
154+
"path": "registry/new-york/blocks/rest-table/components/file-preview.tsx",
155+
"type": "registry:component"
156+
},
157+
{
158+
"path": "registry/new-york/blocks/rest-table/components/pager.tsx",
159+
"type": "registry:component"
160+
},
161+
{
162+
"path": "registry/new-york/blocks/rest-table/components/rest-form-modal.tsx",
163+
"type": "registry:component"
164+
}
165+
]
78166
}
79167
]
80168
}

0 commit comments

Comments
 (0)