Skip to content

Commit e0ff533

Browse files
authored
Merge pull request #221 from objectstack-ai/copilot/start-implementation-ui-components
2 parents 58bc628 + b0db098 commit e0ff533

File tree

13 files changed

+70
-299
lines changed

13 files changed

+70
-299
lines changed

examples/crm-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"@vitejs/plugin-react": "^4.3.1",
3030
"autoprefixer": "^10.4.19",
3131
"postcss": "^8.4.38",
32-
"tailwindcss": "^3.4.4",
32+
"tailwindcss": "^4.1.18",
3333
"typescript": "^5.9.3",
3434
"vite": "^5.3.1"
3535
}

examples/crm-app/postcss.config.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

examples/crm-app/src/App.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
import { useEffect, useMemo } from 'react';
2-
import { BrowserRouter, Routes, Route, Outlet, Link, useLocation, useParams } from 'react-router-dom';
1+
import { BrowserRouter, Routes, Route, Outlet, useParams } from 'react-router-dom';
32
import { SidebarProvider, SidebarInset, SidebarTrigger } from '@object-ui/components';
4-
import { SchemaRendererProvider, SchemaRenderer, useRenderer } from '@object-ui/react';
3+
import { SchemaRendererProvider, SchemaRenderer } from '@object-ui/react';
54
import { registerFields } from '@object-ui/fields';
65
import { registerLayout } from '@object-ui/layout';
76
import '@object-ui/plugin-dashboard';
87
import { registerPlaceholders } from '@object-ui/components';
98
import { SidebarNav } from './components/SidebarNav';
109

1110
// Data & Schemas
12-
import { mockData, getContact, getOpportunity } from './data';
11+
import { mockData, getContact } from './data';
1312
import { dashboardSchema } from './schemas/dashboard';
1413
import { contactListSchema, contactDetailSchema } from './schemas/contacts';
1514
import { opportunityListSchema } from './schemas/opportunities';

examples/crm-app/src/components/SidebarNav.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { BrowserRouter } from 'react-router-dom';
33
import { SidebarNav } from './SidebarNav';
44
import { describe, it, expect } from 'vitest';
55
import { SidebarProvider } from '@object-ui/components';
6-
import React from 'react';
76

87
describe('SidebarNav', () => {
98
it('renders without crashing using default items', () => {

examples/crm-app/src/components/SidebarNav.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react';
21
import {
32
LayoutDashboard,
43
Users,

examples/crm-app/src/index.css

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
@tailwind base;
2-
@tailwind components;
3-
@tailwind utilities;
1+
@import 'tailwindcss';
42

3+
/* CSS custom properties for theme */
54
@layer base {
65
:root {
76
--background: 0 0% 100%;
@@ -64,13 +63,14 @@
6463
--input: 217.2 32.6% 17.5%;
6564
--ring: 212.7 26.8% 83.9%;
6665
}
67-
}
68-
69-
@layer base {
70-
* {
71-
@apply border-border;
66+
67+
*[class*="border"] {
68+
border-color: hsl(var(--border));
7269
}
70+
7371
body {
74-
@apply bg-background text-foreground;
72+
background-color: hsl(var(--background, 0 0% 100%));
73+
color: hsl(var(--foreground, 222.2 84% 4.9%));
7574
}
7675
}
76+

examples/crm-app/src/schemas/dashboard.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export const dashboardSchema: DashboardSchema = {
66
widgets: [
77
{
88
id: "w1",
9-
layout: { w: 1, h: 1 },
9+
layout: { x: 0, y: 0, w: 1, h: 1 },
1010
component: {
1111
type: "card",
1212
props: { title: "Total Revenue" },
@@ -17,7 +17,7 @@ export const dashboardSchema: DashboardSchema = {
1717
},
1818
{
1919
id: "w2",
20-
layout: { w: 1, h: 1 },
20+
layout: { x: 1, y: 0, w: 1, h: 1 },
2121
component: {
2222
type: "card",
2323
props: { title: "Active Leads" },
@@ -28,7 +28,7 @@ export const dashboardSchema: DashboardSchema = {
2828
},
2929
{
3030
id: "w3",
31-
layout: { w: 1, h: 1 },
31+
layout: { x: 2, y: 0, w: 1, h: 1 },
3232
component: {
3333
type: "card",
3434
props: { title: "Open Deals" },
@@ -39,7 +39,7 @@ export const dashboardSchema: DashboardSchema = {
3939
},
4040
{
4141
id: "w4",
42-
layout: { w: 2, h: 2 },
42+
layout: { x: 0, y: 1, w: 2, h: 2 },
4343
title: "Sales Pipeline",
4444
component: {
4545
type: "widget:bar",
@@ -56,7 +56,7 @@ export const dashboardSchema: DashboardSchema = {
5656
},
5757
{
5858
id: "w5",
59-
layout: { w: 1, h: 2 },
59+
layout: { x: 2, y: 1, w: 1, h: 2 },
6060
title: "Recent Activity",
6161
component: {
6262
type: "widget:text",

examples/crm-app/tailwind.config.js

Lines changed: 0 additions & 82 deletions
This file was deleted.

packages/core/src/adapters/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@
55
* This source code is licensed under the MIT license found in the
66
* LICENSE file in the root directory of this source tree.
77
*/
8-
export { ObjectStackAdapter, createObjectStackAdapter } from './objectstack-adapter';
8+
9+
// export { ObjectStackAdapter, createObjectStackAdapter } from './objectstack-adapter';
10+
// Adapters have been moved to separate packages (e.g. @object-ui/data-objectstack)
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
22
"extends": "../../tsconfig.json",
33
"compilerOptions": {
4-
"outDir": "dist",
5-
"rootDir": "src"
4+
"outDir": "dist"
65
},
76
"include": ["src"]
87
}

0 commit comments

Comments
 (0)