@object-ui/components 2.0.0 → 3.0.0
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.
- package/.turbo/turbo-build.log +12 -12
- package/CHANGELOG.md +19 -0
- package/dist/index.css +1 -1
- package/dist/index.js +19610 -19344
- package/dist/index.umd.cjs +29 -29
- package/dist/src/custom/index.d.ts +2 -0
- package/dist/src/custom/view-skeleton.d.ts +37 -0
- package/dist/src/custom/view-states.d.ts +33 -0
- package/package.json +17 -17
- package/src/__tests__/__snapshots__/snapshot-critical.test.tsx.snap +811 -0
- package/src/__tests__/__snapshots__/snapshot.test.tsx.snap +327 -0
- package/src/__tests__/accessibility.test.tsx +137 -0
- package/src/__tests__/api-consistency.test.tsx +596 -0
- package/src/__tests__/color-contrast.test.tsx +212 -0
- package/src/__tests__/edge-cases.test.tsx +285 -0
- package/src/__tests__/snapshot-critical.test.tsx +317 -0
- package/src/__tests__/snapshot.test.tsx +205 -0
- package/src/__tests__/wcag-audit.test.tsx +493 -0
- package/src/custom/index.ts +2 -0
- package/src/custom/view-skeleton.tsx +243 -0
- package/src/custom/view-states.tsx +153 -0
- package/src/renderers/complex/data-table.tsx +28 -13
- package/src/renderers/complex/resizable.tsx +20 -17
- package/src/renderers/data-display/list.tsx +1 -1
- package/src/renderers/data-display/table.tsx +1 -1
- package/src/renderers/data-display/tree-view.tsx +2 -1
- package/src/renderers/form/form.tsx +10 -6
- package/src/renderers/layout/aspect-ratio.tsx +1 -1
- package/src/stories-json/Accessibility.mdx +297 -0
- package/src/stories-json/EdgeCases.stories.tsx +160 -0
- package/src/stories-json/GettingStarted.mdx +89 -0
- package/src/stories-json/Introduction.mdx +127 -0
- package/src/ui/slider.tsx +6 -2
- package/src/stories/Introduction.mdx +0 -61
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ObjectUI
|
|
3
|
+
* Copyright (c) 2024-present ObjectStack Inc.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import * as React from "react";
|
|
9
|
+
export interface ViewSkeletonProps extends React.ComponentProps<"div"> {
|
|
10
|
+
/** Number of rows/items to render */
|
|
11
|
+
rows?: number;
|
|
12
|
+
}
|
|
13
|
+
export interface GridSkeletonProps extends ViewSkeletonProps {
|
|
14
|
+
/** Number of columns to render */
|
|
15
|
+
columns?: number;
|
|
16
|
+
}
|
|
17
|
+
declare function GridSkeleton({ rows, columns, className, ...props }: GridSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export interface KanbanSkeletonProps extends ViewSkeletonProps {
|
|
19
|
+
/** Number of kanban columns to render */
|
|
20
|
+
columns?: number;
|
|
21
|
+
/** Number of cards per column */
|
|
22
|
+
cardsPerColumn?: number;
|
|
23
|
+
}
|
|
24
|
+
declare function KanbanSkeleton({ columns, cardsPerColumn, className, ...props }: KanbanSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
declare function FormSkeleton({ rows, className, ...props }: ViewSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
declare function ListSkeleton({ rows, className, ...props }: ViewSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
declare function ChartSkeleton({ className, ...props }: Omit<ViewSkeletonProps, "rows">): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export type ViewSkeletonVariant = "grid" | "kanban" | "form" | "list" | "chart";
|
|
29
|
+
export interface ViewSkeletonDispatchProps extends ViewSkeletonProps {
|
|
30
|
+
variant: ViewSkeletonVariant;
|
|
31
|
+
/** Number of columns (grid / kanban) */
|
|
32
|
+
columns?: number;
|
|
33
|
+
/** Cards per column (kanban only) */
|
|
34
|
+
cardsPerColumn?: number;
|
|
35
|
+
}
|
|
36
|
+
declare function ViewSkeleton({ variant, ...props }: ViewSkeletonDispatchProps): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
export { ViewSkeleton, GridSkeleton, KanbanSkeleton, FormSkeleton, ListSkeleton, ChartSkeleton, };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ObjectUI
|
|
3
|
+
* Copyright (c) 2024-present ObjectStack Inc.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import * as React from "react";
|
|
9
|
+
interface DataLoadingStateProps extends React.ComponentProps<"div"> {
|
|
10
|
+
/** Message displayed below the spinner */
|
|
11
|
+
message?: string;
|
|
12
|
+
}
|
|
13
|
+
declare function DataLoadingState({ className, message, ...props }: DataLoadingStateProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
interface DataEmptyStateProps extends React.ComponentProps<"div"> {
|
|
15
|
+
/** Icon rendered above the title */
|
|
16
|
+
icon?: React.ReactNode;
|
|
17
|
+
title?: string;
|
|
18
|
+
description?: string;
|
|
19
|
+
/** Optional action rendered below the description */
|
|
20
|
+
action?: React.ReactNode;
|
|
21
|
+
}
|
|
22
|
+
declare function DataEmptyState({ className, icon, title, description, action, children, ...props }: DataEmptyStateProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
interface DataErrorStateProps extends React.ComponentProps<"div"> {
|
|
24
|
+
title?: string;
|
|
25
|
+
/** Error message or description */
|
|
26
|
+
message?: string;
|
|
27
|
+
/** Callback invoked when the retry button is clicked */
|
|
28
|
+
onRetry?: () => void;
|
|
29
|
+
/** Label for the retry button */
|
|
30
|
+
retryLabel?: string;
|
|
31
|
+
}
|
|
32
|
+
declare function DataErrorState({ className, title, message, onRetry, retryLabel, children, ...props }: DataErrorStateProps): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export { DataLoadingState, DataEmptyState, DataErrorState, type DataLoadingStateProps, type DataEmptyStateProps, type DataErrorStateProps, };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@object-ui/components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Standard UI component library for Object UI, built with Shadcn UI + Tailwind CSS",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"input-otp": "^1.4.2",
|
|
62
62
|
"lucide-react": "^0.563.0",
|
|
63
63
|
"next-themes": "^0.4.6",
|
|
64
|
-
"react-day-picker": "^9.13.
|
|
64
|
+
"react-day-picker": "^9.13.2",
|
|
65
65
|
"react-hook-form": "^7.71.1",
|
|
66
66
|
"react-resizable-panels": "^4.6.2",
|
|
67
67
|
"recharts": "2.15.4",
|
|
@@ -69,9 +69,9 @@
|
|
|
69
69
|
"tailwind-merge": "^3.4.0",
|
|
70
70
|
"tailwindcss-animate": "^1.0.7",
|
|
71
71
|
"vaul": "^1.1.2",
|
|
72
|
-
"@object-ui/core": "
|
|
73
|
-
"@object-ui/react": "
|
|
74
|
-
"@object-ui/types": "
|
|
72
|
+
"@object-ui/core": "3.0.0",
|
|
73
|
+
"@object-ui/react": "3.0.0",
|
|
74
|
+
"@object-ui/types": "3.0.0"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
77
|
"react": "^18.0.0 || ^19.0.0",
|
|
@@ -79,20 +79,20 @@
|
|
|
79
79
|
"tailwindcss": "^4.1.18"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
|
-
"@storybook/addon-essentials": "^8.6.
|
|
83
|
-
"@storybook/addon-interactions": "^8.6.
|
|
84
|
-
"@storybook/addon-links": "^8.6.
|
|
85
|
-
"@storybook/blocks": "^8.6.
|
|
86
|
-
"@storybook/react": "^8.6.
|
|
87
|
-
"@storybook/react-vite": "^8.6.
|
|
82
|
+
"@storybook/addon-essentials": "^8.6.14",
|
|
83
|
+
"@storybook/addon-interactions": "^8.6.14",
|
|
84
|
+
"@storybook/addon-links": "^8.6.15",
|
|
85
|
+
"@storybook/blocks": "^8.6.14",
|
|
86
|
+
"@storybook/react": "^8.6.15",
|
|
87
|
+
"@storybook/react-vite": "^8.6.15",
|
|
88
88
|
"@tailwindcss/postcss": "^4.1.18",
|
|
89
|
-
"@types/react": "
|
|
90
|
-
"@types/react-dom": "
|
|
91
|
-
"@vitejs/plugin-react": "^5.1.
|
|
92
|
-
"autoprefixer": "^10.4.
|
|
93
|
-
"postcss": "^8.
|
|
89
|
+
"@types/react": "19.2.13",
|
|
90
|
+
"@types/react-dom": "19.2.3",
|
|
91
|
+
"@vitejs/plugin-react": "^5.1.4",
|
|
92
|
+
"autoprefixer": "^10.4.24",
|
|
93
|
+
"postcss": "^8.5.6",
|
|
94
94
|
"shadcn": "^3.8.4",
|
|
95
|
-
"storybook": "^8.6.
|
|
95
|
+
"storybook": "^8.6.15",
|
|
96
96
|
"tailwindcss": "^4.1.18",
|
|
97
97
|
"typescript": "^5.9.3",
|
|
98
98
|
"vite": "^7.3.1",
|