@object-ui/components 17.6.0 → 17.7.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 (56) hide show
  1. package/CHANGELOG.md +8750 -0
  2. package/README.md +5 -3
  3. package/dist/custom/button-group.d.ts +1 -1
  4. package/dist/custom/combobox.d.ts +2 -4
  5. package/dist/custom/empty.d.ts +16 -4
  6. package/dist/custom/field.d.ts +1 -1
  7. package/dist/custom/filter-builder.d.ts +198 -66
  8. package/dist/custom/index.d.ts +0 -1
  9. package/dist/custom/item.d.ts +1 -1
  10. package/dist/custom/kbd.d.ts +1 -1
  11. package/dist/custom/mobile-dialog-content.d.ts +22 -1
  12. package/dist/custom/navigation-overlay.d.ts +105 -0
  13. package/dist/custom/refresh-indicator.d.ts +8 -2
  14. package/dist/custom/view-states.d.ts +74 -1
  15. package/dist/hooks/related-count-store.d.ts +26 -28
  16. package/dist/index.css +157 -363
  17. package/dist/index.d.ts +3 -3
  18. package/dist/index.js +6603 -5987
  19. package/dist/index.umd.cjs +10 -15
  20. package/dist/lib/close-label.d.ts +1 -2
  21. package/dist/lib/date-fns-locale.d.ts +41 -0
  22. package/dist/lib/lazy-icon.d.ts +32 -1
  23. package/dist/lib/lucide-record-icon-names.d.ts +30 -0
  24. package/dist/lib/utils.d.ts +113 -0
  25. package/dist/renderers/action/action-bar.d.ts +8 -36
  26. package/dist/renderers/action/action-button.d.ts +15 -4
  27. package/dist/renderers/action/action-group.d.ts +5 -4
  28. package/dist/renderers/action/action-icon.d.ts +12 -2
  29. package/dist/renderers/action/action-menu.d.ts +5 -2
  30. package/dist/renderers/action/auto-trigger.d.ts +19 -4
  31. package/dist/renderers/action/resolve-icon.d.ts +27 -2
  32. package/dist/renderers/action/static-params.d.ts +79 -0
  33. package/dist/renderers/action/visibility-gate.d.ts +11 -3
  34. package/dist/renderers/basic/elements.d.ts +3 -0
  35. package/dist/renderers/basic/html-elements.d.ts +7 -3
  36. package/dist/renderers/basic/readProps.d.ts +60 -0
  37. package/dist/renderers/complex/data-table.d.ts +31 -14
  38. package/dist/renderers/complex/dataTableBindDiagnostic.d.ts +187 -0
  39. package/dist/renderers/layout/box.d.ts +8 -0
  40. package/dist/renderers/layout/containers.d.ts +1 -10
  41. package/dist/renderers/layout/react-page.d.ts +4 -0
  42. package/dist/renderers/navigation/sidebar.d.ts +31 -0
  43. package/dist/ui/badge.d.ts +1 -1
  44. package/dist/ui/button.d.ts +1 -1
  45. package/dist/ui/calendar.d.ts +2 -1
  46. package/dist/ui/command.d.ts +7 -7
  47. package/dist/ui/index.d.ts +0 -1
  48. package/dist/ui/input-otp.d.ts +2 -2
  49. package/dist/ui/sheet.d.ts +1 -1
  50. package/dist/ui/sidebar.d.ts +2 -1
  51. package/package.json +13 -14
  52. package/dist/SchemaRenderer.d.ts +0 -4
  53. package/dist/custom/export-progress-dialog.d.ts +0 -43
  54. package/dist/hooks/use-export-job.d.ts +0 -34
  55. package/dist/ui/chart.d.ts +0 -56
  56. package/dist/ui/toast.d.ts +0 -22
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@object-ui/components",
3
- "version": "17.6.0",
3
+ "version": "17.7.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",
@@ -50,7 +50,6 @@
50
50
  "@radix-ui/react-slot": "^1.3.3",
51
51
  "@radix-ui/react-switch": "^1.3.7",
52
52
  "@radix-ui/react-tabs": "^1.1.21",
53
- "@radix-ui/react-toast": "^1.2.23",
54
53
  "@radix-ui/react-toggle": "^1.1.18",
55
54
  "@radix-ui/react-toggle-group": "^1.1.19",
56
55
  "@radix-ui/react-tooltip": "^1.2.16",
@@ -60,22 +59,21 @@
60
59
  "date-fns": "^4.4.0",
61
60
  "embla-carousel-react": "^8.6.0",
62
61
  "input-otp": "^1.4.2",
63
- "lucide-react": "^1.31.0",
62
+ "lucide-react": "^1.43.0",
64
63
  "next-themes": "^0.4.6",
65
64
  "react-day-picker": "^10.0.1",
66
65
  "react-hook-form": "^7.85.0",
67
66
  "react-resizable-panels": "^4.12.2",
68
- "recharts": "3.10.1",
69
67
  "sonner": "^2.0.8",
70
68
  "tailwind-merge": "^3.6.0",
71
69
  "tailwindcss-animate": "^1.0.7",
72
70
  "vaul": "^1.1.2",
73
- "@object-ui/core": "17.6.0",
74
- "@object-ui/i18n": "17.6.0",
75
- "@object-ui/react": "17.6.0",
76
- "@object-ui/types": "17.6.0",
77
- "@object-ui/sdui-parser": "17.6.0",
78
- "@object-ui/react-runtime": "17.6.0"
71
+ "@object-ui/core": "17.7.0",
72
+ "@object-ui/i18n": "17.7.0",
73
+ "@object-ui/react-runtime": "17.7.0",
74
+ "@object-ui/react": "17.7.0",
75
+ "@object-ui/sdui-parser": "17.7.0",
76
+ "@object-ui/types": "17.7.0"
79
77
  },
80
78
  "peerDependencies": {
81
79
  "react": "^18.0.0 || ^19.0.0",
@@ -89,13 +87,15 @@
89
87
  "@types/react-dom": "19.2.4",
90
88
  "@vitejs/plugin-react": "^6.0.5",
91
89
  "autoprefixer": "^10.5.4",
90
+ "jsonc-parser": "^3.3.1",
92
91
  "postcss": "^8.5.26",
93
92
  "shadcn": "^4.18.0",
94
93
  "tailwindcss": "^4.3.3",
95
94
  "typescript": "^6.0.3",
96
95
  "vite": "^8.2.1",
97
96
  "vite-plugin-dts": "^5.0.3",
98
- "zod": "^4.4.3"
97
+ "zod": "^4.4.3",
98
+ "@object-ui/test-support": "17.4.0"
99
99
  },
100
100
  "keywords": [
101
101
  "objectui",
@@ -121,9 +121,8 @@
121
121
  ],
122
122
  "scripts": {
123
123
  "build": "vite build && node scripts/build-css.mjs",
124
- "prebuild": "pnpm --filter @object-ui/types build && pnpm --filter @object-ui/core build && pnpm --filter @object-ui/react build",
125
- "pretest": "pnpm run prebuild",
126
- "test": "vitest run",
124
+ "test": "vitest run --root ../.. packages/components/",
125
+ "test:dist": "OBJECTUI_DIST_PINS=1 vitest run --root ../.. --config vitest.config.mts --project dist",
127
126
  "type-check": "tsc --noEmit && tsc -p tsconfig.test.json",
128
127
  "lint": "eslint ."
129
128
  }
@@ -1,4 +0,0 @@
1
- import { default as React } from 'react';
2
- export declare const SchemaRenderer: ({ schema }: {
3
- schema: any;
4
- }) => React.JSX.Element | null;
@@ -1,43 +0,0 @@
1
- import { UseExportJobReturn } from '../hooks/use-export-job.js';
2
- /**
3
- * ObjectUI
4
- * Copyright (c) 2024-present ObjectStack Inc.
5
- *
6
- * This source code is licensed under the MIT license found in the
7
- * LICENSE file in the root directory of this source tree.
8
- */
9
- /**
10
- * ExportProgressDialog — UI for the async export job lifecycle.
11
- *
12
- * Pair with `useExportJob` to render a progress bar (determinate when the
13
- * server reports `percentComplete`, indeterminate otherwise), a Cancel button
14
- * while the job is in flight, and a Download button when it completes.
15
- *
16
- * The dialog is fully controlled by the `job` returned from `useExportJob`;
17
- * pass `open`/`onOpenChange` to control its visibility (typically opened by
18
- * the same handler that calls `job.start(...)`).
19
- */
20
- import * as React from 'react';
21
- export interface ExportProgressDialogProps {
22
- /** Visibility, controlled. */
23
- open: boolean;
24
- /** Visibility setter. */
25
- onOpenChange: (open: boolean) => void;
26
- /** Job state object returned from `useExportJob`. */
27
- job: UseExportJobReturn;
28
- /** Optional title override (defaults to 'Exporting…'). */
29
- title?: string;
30
- /** Optional description override. */
31
- description?: string;
32
- /** Default download filename. */
33
- filename?: string;
34
- /** Show the Close button while the job is running. Default true. */
35
- allowCloseWhileRunning?: boolean;
36
- /** Optional className passthrough for the dialog content. */
37
- className?: string;
38
- /** Called after the user clicks Download (after the click resolves). */
39
- onAfterDownload?: () => void;
40
- /** Auto-close the dialog this many ms after a successful download. */
41
- closeAfterDownloadMs?: number;
42
- }
43
- export declare function ExportProgressDialog({ open, onOpenChange, job, title, description, filename, allowCloseWhileRunning, className, onAfterDownload, closeAfterDownloadMs, }: ExportProgressDialogProps): React.JSX.Element;
@@ -1,34 +0,0 @@
1
- import { DataSource, CreateExportJobRequest, ExportJobProgressInfo } from '@object-ui/types';
2
- export interface UseExportJobOptions {
3
- /** Data source providing the optional export-job methods. Required. */
4
- dataSource?: DataSource;
5
- /** Polling cadence while the job is in flight. Default 1500ms. */
6
- pollIntervalMs?: number;
7
- /** Maximum poll attempts before giving up (safety net). Default 600. */
8
- maxAttempts?: number;
9
- /** Called once the job reaches a terminal state. */
10
- onComplete?: (info: ExportJobProgressInfo) => void;
11
- /** Called when the job fails (any non-completed terminal state). */
12
- onError?: (error: Error, info?: ExportJobProgressInfo) => void;
13
- }
14
- export interface UseExportJobReturn {
15
- /** True when a job is in flight (pending/processing). */
16
- isRunning: boolean;
17
- /** Latest progress payload from the server. */
18
- progress: ExportJobProgressInfo | null;
19
- /** Latest terminal error (if any). */
20
- error: Error | null;
21
- /** Whether the data source supports async export (createExportJob present). */
22
- isSupported: boolean;
23
- /** Start a new export job. Returns the job id (or null when unsupported). */
24
- start: (resource: string, request: CreateExportJobRequest) => Promise<string | null>;
25
- /** Cancel the in-flight job (no-op when unsupported). */
26
- cancel: () => Promise<void>;
27
- /** Fetch a fresh download URL for the completed job. */
28
- getDownloadUrl: () => Promise<string | null>;
29
- /** Manually trigger a browser download for the completed job. */
30
- download: (filename?: string) => Promise<boolean>;
31
- /** Reset the local job state (clears progress + error). */
32
- reset: () => void;
33
- }
34
- export declare function useExportJob(opts?: UseExportJobOptions): UseExportJobReturn;
@@ -1,56 +0,0 @@
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
- import * as RechartsPrimitive from "recharts";
10
- declare const THEMES: {
11
- readonly light: "";
12
- readonly dark: ".dark";
13
- };
14
- export type ChartConfig = {
15
- [k in string]: {
16
- label?: React.ReactNode;
17
- icon?: React.ComponentType;
18
- } & ({
19
- color?: string;
20
- theme?: never;
21
- } | {
22
- color?: never;
23
- theme: Record<keyof typeof THEMES, string>;
24
- });
25
- };
26
- declare const ChartContainer: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
27
- config: ChartConfig;
28
- children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>["children"];
29
- }, "ref"> & React.RefAttributes<HTMLDivElement>>;
30
- declare const ChartStyle: ({ id, config }: {
31
- id: string;
32
- config: ChartConfig;
33
- }) => React.JSX.Element | null;
34
- declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
35
- declare const ChartTooltipContent: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
36
- active?: boolean;
37
- payload?: any[];
38
- label?: string;
39
- hideLabel?: boolean;
40
- hideIndicator?: boolean;
41
- indicator?: "line" | "dot" | "dashed";
42
- nameKey?: string;
43
- labelKey?: string;
44
- labelFormatter?: (value: any, payload: any[]) => React.ReactNode;
45
- labelClassName?: string;
46
- formatter?: (value: any, name?: any, item?: any, index?: number, payload?: any) => React.ReactNode;
47
- color?: string;
48
- }, "ref"> & React.RefAttributes<HTMLDivElement>>;
49
- declare const ChartLegend: React.MemoExoticComponent<(outsideProps: RechartsPrimitive.LegendProps) => React.ReactPortal | null>;
50
- declare const ChartLegendContent: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
51
- payload?: any[];
52
- verticalAlign?: "top" | "bottom";
53
- hideIcon?: boolean;
54
- nameKey?: string;
55
- }, "ref"> & React.RefAttributes<HTMLDivElement>>;
56
- export { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, ChartStyle, };
@@ -1,22 +0,0 @@
1
- import { VariantProps } from 'class-variance-authority';
2
- /**
3
- * ObjectUI
4
- * Copyright (c) 2024-present ObjectStack Inc.
5
- *
6
- * This source code is licensed under the MIT license found in the
7
- * LICENSE file in the root directory of this source tree.
8
- */
9
- import * as React from "react";
10
- import * as ToastPrimitives from "@radix-ui/react-toast";
11
- declare const ToastProvider: React.FC<ToastPrimitives.ToastProviderProps>;
12
- declare const ToastViewport: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React.RefAttributes<HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
13
- declare const Toast: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & React.RefAttributes<HTMLLIElement>, "ref"> & VariantProps<(props?: ({
14
- variant?: "default" | "destructive" | null | undefined;
15
- } & import('class-variance-authority/types').ClassProp) | undefined) => string> & React.RefAttributes<HTMLLIElement>>;
16
- declare const ToastAction: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
17
- declare const ToastClose: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
18
- declare const ToastTitle: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastTitleProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
19
- declare const ToastDescription: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastDescriptionProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
20
- type ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;
21
- type ToastActionElement = React.ReactElement<typeof ToastAction>;
22
- export { type ToastProps, type ToastActionElement, ToastProvider, ToastViewport, Toast, ToastTitle, ToastDescription, ToastClose, ToastAction, };