@object-ui/components 0.5.0 → 2.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.
Files changed (96) hide show
  1. package/.turbo/turbo-build.log +12 -25
  2. package/CHANGELOG.md +13 -0
  3. package/dist/index.css +1 -1
  4. package/dist/index.js +23366 -22221
  5. package/dist/index.umd.cjs +30 -30
  6. package/dist/src/custom/action-param-dialog.d.ts +21 -0
  7. package/dist/src/custom/index.d.ts +2 -0
  8. package/dist/src/custom/navigation-overlay.d.ts +50 -0
  9. package/dist/src/index.d.ts +1 -0
  10. package/dist/src/renderers/action/action-button.d.ts +11 -0
  11. package/dist/src/renderers/action/action-group.d.ts +25 -0
  12. package/dist/src/renderers/action/action-icon.d.ts +10 -0
  13. package/dist/src/renderers/action/action-menu.d.ts +19 -0
  14. package/dist/src/renderers/action/index.d.ts +0 -0
  15. package/dist/src/renderers/action/resolve-icon.d.ts +6 -0
  16. package/package.json +9 -8
  17. package/src/__tests__/PageRendererRegions.test.tsx +664 -55
  18. package/src/__tests__/compliance.test.tsx +72 -0
  19. package/src/__tests__/navigation-overlay.test.tsx +273 -0
  20. package/src/__tests__/view-compliance.test.tsx +153 -0
  21. package/src/custom/action-param-dialog.tsx +264 -0
  22. package/src/custom/index.ts +2 -0
  23. package/src/custom/navigation-overlay.tsx +296 -0
  24. package/src/index.ts +1 -0
  25. package/src/renderers/action/action-button.tsx +147 -0
  26. package/src/renderers/action/action-group.tsx +270 -0
  27. package/src/renderers/action/action-icon.tsx +150 -0
  28. package/src/renderers/action/action-menu.tsx +203 -0
  29. package/src/renderers/action/index.ts +18 -0
  30. package/src/renderers/action/resolve-icon.ts +35 -0
  31. package/src/renderers/complex/__tests__/data-table-batch-editing.test.tsx +275 -0
  32. package/src/renderers/complex/__tests__/data-table-cell-renderer.test.tsx +120 -0
  33. package/src/renderers/complex/__tests__/data-table-editing.test.tsx +221 -0
  34. package/src/renderers/complex/data-table.tsx +242 -21
  35. package/src/renderers/form/form.tsx +23 -4
  36. package/src/renderers/index.ts +1 -0
  37. package/src/renderers/layout/page.tsx +416 -52
  38. package/src/renderers/navigation/sidebar.tsx +6 -0
  39. package/src/renderers/placeholders.tsx +2 -2
  40. package/src/stories/Introduction.mdx +54 -27
  41. package/src/stories/MockedData.stories.tsx +87 -37
  42. package/src/stories-json/accordion.stories.tsx +1 -1
  43. package/src/stories-json/aggrid.stories.tsx +1 -1
  44. package/src/stories-json/alert.stories.tsx +1 -1
  45. package/src/stories-json/aspect-ratio.stories.tsx +1 -1
  46. package/src/stories-json/avatar.stories.tsx +1 -1
  47. package/src/stories-json/badge.stories.tsx +1 -1
  48. package/src/stories-json/breadcrumb.stories.tsx +1 -1
  49. package/src/stories-json/button-group.stories.tsx +1 -1
  50. package/src/stories-json/button.stories.tsx +1 -1
  51. package/src/stories-json/calendar.stories.tsx +1 -1
  52. package/src/stories-json/card.stories.tsx +1 -1
  53. package/src/stories-json/carousel.stories.tsx +1 -1
  54. package/src/stories-json/charts.stories.tsx +1 -1
  55. package/src/stories-json/chatbot.stories.tsx +1 -1
  56. package/src/stories-json/code-editor.stories.tsx +1 -1
  57. package/src/stories-json/collapsible.stories.tsx +1 -1
  58. package/src/stories-json/controls.stories.tsx +1 -1
  59. package/src/stories-json/crm-live-data.stories.tsx +154 -0
  60. package/src/stories-json/data-table.stories.tsx +80 -4
  61. package/src/stories-json/data_display_extras.stories.tsx +1 -1
  62. package/src/stories-json/date-picker.stories.tsx +1 -1
  63. package/src/stories-json/detail-view.stories.tsx +1 -1
  64. package/src/stories-json/dialog.stories.tsx +1 -1
  65. package/src/stories-json/feedback_extras.stories.tsx +1 -1
  66. package/src/stories-json/feedback_others.stories.tsx +1 -1
  67. package/src/stories-json/form-variants.stories.tsx +210 -0
  68. package/src/stories-json/form_advanced.stories.tsx +1 -1
  69. package/src/stories-json/form_extras.stories.tsx +1 -1
  70. package/src/stories-json/grid.stories.tsx +1 -1
  71. package/src/stories-json/icon.stories.tsx +1 -1
  72. package/src/stories-json/input.stories.tsx +1 -1
  73. package/src/stories-json/kanban.stories.tsx +1 -1
  74. package/src/stories-json/layout_extended.stories.tsx +1 -1
  75. package/src/stories-json/layout_flex.stories.tsx +1 -1
  76. package/src/stories-json/list-view.stories.tsx +1 -1
  77. package/src/stories-json/markdown.stories.tsx +1 -1
  78. package/src/stories-json/menus.stories.tsx +1 -1
  79. package/src/stories-json/metric-card.stories.tsx +1 -1
  80. package/src/stories-json/navigation-menu.stories.tsx +1 -1
  81. package/src/stories-json/object-aggrid-advanced.stories.tsx +389 -0
  82. package/src/stories-json/object-aggrid.stories.tsx +1 -1
  83. package/src/stories-json/object-form.stories.tsx +1 -1
  84. package/src/stories-json/object-gantt.stories.tsx +1 -1
  85. package/src/stories-json/object-grid.stories.tsx +159 -1
  86. package/src/stories-json/object-map.stories.tsx +1 -1
  87. package/src/stories-json/object-view.stories.tsx +1 -1
  88. package/src/stories-json/overlay_extras.stories.tsx +1 -1
  89. package/src/stories-json/overlay_others.stories.tsx +1 -1
  90. package/src/stories-json/resizable.stories.tsx +1 -1
  91. package/src/stories-json/select.stories.tsx +1 -1
  92. package/src/stories-json/separator.stories.tsx +1 -1
  93. package/src/stories-json/statistic.stories.tsx +1 -1
  94. package/src/stories-json/tabs.stories.tsx +1 -1
  95. package/src/stories-json/timeline.stories.tsx +1 -1
  96. package/src/stories-json/typography.stories.tsx +1 -1
@@ -0,0 +1,21 @@
1
+ import { default as React } from 'react';
2
+ import { ActionParamDef } from '../../../core/src';
3
+ export interface ActionParamDialogProps {
4
+ /** The param definitions to render */
5
+ params: ActionParamDef[];
6
+ /** Whether the dialog is open */
7
+ open: boolean;
8
+ /** Called when the user submits the form */
9
+ onSubmit: (values: Record<string, any>) => void;
10
+ /** Called when the user cancels */
11
+ onCancel: () => void;
12
+ /** Dialog title */
13
+ title?: string;
14
+ /** Dialog description */
15
+ description?: string;
16
+ }
17
+ /**
18
+ * ActionParamDialog renders a dialog with form fields for each ActionParam.
19
+ * It collects user input and returns the values on submit.
20
+ */
21
+ export declare const ActionParamDialog: React.FC<ActionParamDialogProps>;
@@ -8,5 +8,7 @@ export * from './input-group';
8
8
  export * from './item';
9
9
  export * from './kbd';
10
10
  export * from './native-select';
11
+ export * from './navigation-overlay';
11
12
  export * from './spinner';
12
13
  export * from './sort-builder';
14
+ export * from './action-param-dialog';
@@ -0,0 +1,50 @@
1
+ import { default as React } from 'react';
2
+ /** Navigation mode type — matches ViewNavigationConfig.mode */
3
+ export type NavigationOverlayMode = 'page' | 'drawer' | 'modal' | 'split' | 'popover' | 'new_window' | 'none';
4
+ export interface NavigationOverlayProps {
5
+ /** Whether the overlay is open */
6
+ isOpen: boolean;
7
+ /** The selected record */
8
+ selectedRecord: Record<string, unknown> | null;
9
+ /** The navigation mode */
10
+ mode: NavigationOverlayMode;
11
+ /** Close the overlay */
12
+ close: () => void;
13
+ /** Set open state (for controlled Sheet/Dialog onOpenChange) */
14
+ setIsOpen: (open: boolean) => void;
15
+ /** Width for the overlay (drawer/modal/split) */
16
+ width?: string | number;
17
+ /** Whether navigation is an overlay mode */
18
+ isOverlay: boolean;
19
+ /** Title for the overlay header */
20
+ title?: string;
21
+ /** Description for the overlay header */
22
+ description?: string;
23
+ /** CSS class for the overlay container */
24
+ className?: string;
25
+ /**
26
+ * Render function for the overlay content.
27
+ * Receives the selected record.
28
+ */
29
+ children: (record: Record<string, unknown>) => React.ReactNode;
30
+ /**
31
+ * The main content to wrap (for split mode only).
32
+ * In split mode, the main content is rendered in the left panel.
33
+ */
34
+ mainContent?: React.ReactNode;
35
+ /**
36
+ * Popover trigger element (for popover mode).
37
+ */
38
+ popoverTrigger?: React.ReactNode;
39
+ }
40
+ /**
41
+ * NavigationOverlay — renders record detail in the configured overlay mode.
42
+ *
43
+ * Supports:
44
+ * - **drawer**: Right-side Sheet panel
45
+ * - **modal**: Center Dialog overlay
46
+ * - **split**: Side-by-side ResizablePanelGroup
47
+ * - **popover**: Hoverable/clickable popover card
48
+ * - **page / new_window / none**: No overlay rendered (handled by hook)
49
+ */
50
+ export declare const NavigationOverlay: React.FC<NavigationOverlayProps>;
@@ -1,5 +1,6 @@
1
1
  export { cn } from './lib/utils';
2
2
  export { renderChildren } from './lib/utils';
3
+ export { cva } from 'class-variance-authority';
3
4
  export { registerPlaceholders } from './renderers/placeholders';
4
5
  export * from './ui';
5
6
  export * from './custom';
@@ -0,0 +1,11 @@
1
+ import { ActionSchema } from '../../../../types/src';
2
+ export interface ActionButtonProps {
3
+ schema: ActionSchema & {
4
+ type: string;
5
+ className?: string;
6
+ };
7
+ className?: string;
8
+ /** Override context for this specific action */
9
+ context?: Record<string, any>;
10
+ [key: string]: any;
11
+ }
@@ -0,0 +1,25 @@
1
+ import { ActionSchema, ActionLocation } from '../../../../types/src';
2
+ export interface ActionGroupSchema {
3
+ type: 'action:group';
4
+ /** Group name */
5
+ name?: string;
6
+ /** Group label */
7
+ label?: string;
8
+ /** Group icon */
9
+ icon?: string;
10
+ /** Actions in this group */
11
+ actions?: ActionSchema[];
12
+ /** Display mode: inline button row or dropdown */
13
+ display?: 'dropdown' | 'inline';
14
+ /** Filter actions by location */
15
+ location?: ActionLocation;
16
+ /** Group visibility condition */
17
+ visible?: string;
18
+ /** Button variant for inline actions */
19
+ variant?: string;
20
+ /** Button size for inline actions */
21
+ size?: string;
22
+ /** Custom CSS class */
23
+ className?: string;
24
+ [key: string]: any;
25
+ }
@@ -0,0 +1,10 @@
1
+ import { ActionSchema } from '../../../../types/src';
2
+ export interface ActionIconProps {
3
+ schema: ActionSchema & {
4
+ type: string;
5
+ className?: string;
6
+ };
7
+ className?: string;
8
+ context?: Record<string, any>;
9
+ [key: string]: any;
10
+ }
@@ -0,0 +1,19 @@
1
+ import { ActionSchema } from '../../../../types/src';
2
+ export interface ActionMenuSchema {
3
+ type: 'action:menu';
4
+ /** Menu trigger label (defaults to icon-only) */
5
+ label?: string;
6
+ /** Menu trigger icon (defaults to more-horizontal) */
7
+ icon?: string;
8
+ /** Actions to render as menu items */
9
+ actions?: ActionSchema[];
10
+ /** Trigger variant */
11
+ variant?: string;
12
+ /** Trigger size */
13
+ size?: string;
14
+ /** Visibility condition */
15
+ visible?: string;
16
+ /** Custom CSS class */
17
+ className?: string;
18
+ [key: string]: any;
19
+ }
File without changes
@@ -0,0 +1,6 @@
1
+ import { LucideIcon } from 'lucide-react';
2
+ /**
3
+ * Resolve a Lucide icon by its kebab-case name.
4
+ * Returns null if not found.
5
+ */
6
+ export declare function resolveIcon(name: string | undefined): LucideIcon | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@object-ui/components",
3
- "version": "0.5.0",
3
+ "version": "2.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,17 +61,17 @@
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.0",
64
+ "react-day-picker": "^9.13.1",
65
65
  "react-hook-form": "^7.71.1",
66
- "react-resizable-panels": "^4.5.2",
66
+ "react-resizable-panels": "^4.6.2",
67
67
  "recharts": "2.15.4",
68
68
  "sonner": "^2.0.7",
69
69
  "tailwind-merge": "^3.4.0",
70
70
  "tailwindcss-animate": "^1.0.7",
71
71
  "vaul": "^1.1.2",
72
- "@object-ui/core": "0.5.0",
73
- "@object-ui/react": "0.5.0",
74
- "@object-ui/types": "0.5.0"
72
+ "@object-ui/core": "2.0.0",
73
+ "@object-ui/react": "2.0.0",
74
+ "@object-ui/types": "2.0.0"
75
75
  },
76
76
  "peerDependencies": {
77
77
  "react": "^18.0.0 || ^19.0.0",
@@ -86,12 +86,12 @@
86
86
  "@storybook/react": "^8.6.0",
87
87
  "@storybook/react-vite": "^8.6.0",
88
88
  "@tailwindcss/postcss": "^4.1.18",
89
- "@types/react": "^19.2.10",
89
+ "@types/react": "^19.2.13",
90
90
  "@types/react-dom": "^19.2.3",
91
91
  "@vitejs/plugin-react": "^5.1.3",
92
92
  "autoprefixer": "^10.4.16",
93
93
  "postcss": "^8.4.31",
94
- "shadcn": "^3.7.0",
94
+ "shadcn": "^3.8.4",
95
95
  "storybook": "^8.6.0",
96
96
  "tailwindcss": "^4.1.18",
97
97
  "typescript": "^5.9.3",
@@ -99,6 +99,7 @@
99
99
  "vite-plugin-dts": "^4.5.4"
100
100
  },
101
101
  "scripts": {
102
+ "test:compliance": "vitest run src/__tests__/compliance.test.tsx",
102
103
  "build": "vite build",
103
104
  "prebuild": "pnpm --filter @object-ui/types build && pnpm --filter @object-ui/core build && pnpm --filter @object-ui/react build",
104
105
  "pretest": "pnpm run prebuild",