@object-ui/components 3.3.0 → 3.3.1
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/CHANGELOG.md +20 -0
- package/README.md +21 -1
- package/dist/index.css +6339 -2
- package/dist/index.js +17600 -17481
- package/dist/index.umd.cjs +36 -36
- package/dist/packages/components/src/custom/empty.d.ts +12 -1
- package/dist/packages/components/src/renderers/action/action-bar.d.ts +12 -1
- package/dist/packages/components/src/ui/chart.d.ts +10 -29
- package/package.json +65 -44
- package/.turbo/turbo-build.log +0 -84
- package/README_SHADCN_SYNC.md +0 -281
- package/TESTING.md +0 -335
- package/docs/FilterBuilder.md +0 -268
- package/metadata/Chart.component.yml +0 -30
- package/metadata/FilterBuilder.component.yml +0 -39
- package/metadata/GridLayout.component.yml +0 -27
- package/metadata/Menu.component.yml +0 -31
- package/metadata/ObjectForm.component.yml +0 -34
- package/metadata/ObjectGrid.component.yml +0 -72
- package/metadata/Page.component.yml +0 -24
- package/postcss.config.js +0 -14
- package/shadcn-components.json +0 -440
- package/src/SchemaRenderer.tsx +0 -28
- package/src/__tests__/PageRendererRegions.test.tsx +0 -668
- package/src/__tests__/README.md +0 -124
- package/src/__tests__/__snapshots__/snapshot-critical.test.tsx.snap +0 -811
- package/src/__tests__/__snapshots__/snapshot.test.tsx.snap +0 -327
- package/src/__tests__/accessibility.test.tsx +0 -137
- package/src/__tests__/action-bar.test.tsx +0 -206
- package/src/__tests__/api-consistency.test.tsx +0 -596
- package/src/__tests__/basic-renderers.test.tsx +0 -255
- package/src/__tests__/color-contrast.test.tsx +0 -212
- package/src/__tests__/complex-disclosure-renderers.test.tsx +0 -302
- package/src/__tests__/compliance.test.tsx +0 -72
- package/src/__tests__/config-field-renderer.test.tsx +0 -307
- package/src/__tests__/config-panel-renderer.test.tsx +0 -580
- package/src/__tests__/config-primitives.test.tsx +0 -106
- package/src/__tests__/edge-cases.test.tsx +0 -285
- package/src/__tests__/feedback-overlay-renderers.test.tsx +0 -349
- package/src/__tests__/filter-builder.test.tsx +0 -409
- package/src/__tests__/form-renderers.test.tsx +0 -364
- package/src/__tests__/layout-data-renderers.test.tsx +0 -340
- package/src/__tests__/mobile-accessibility.test.tsx +0 -120
- package/src/__tests__/navigation-overlay.test.tsx +0 -370
- package/src/__tests__/snapshot-critical.test.tsx +0 -317
- package/src/__tests__/snapshot.test.tsx +0 -205
- package/src/__tests__/test-utils.tsx +0 -190
- package/src/__tests__/use-config-draft.test.tsx +0 -295
- package/src/__tests__/view-compliance.test.tsx +0 -153
- package/src/__tests__/wcag-audit.test.tsx +0 -493
- package/src/custom/action-param-dialog.tsx +0 -264
- package/src/custom/button-group.tsx +0 -91
- package/src/custom/combobox.tsx +0 -104
- package/src/custom/config-field-renderer.tsx +0 -276
- package/src/custom/config-panel-renderer.tsx +0 -306
- package/src/custom/config-row.tsx +0 -50
- package/src/custom/date-picker.tsx +0 -61
- package/src/custom/empty.tsx +0 -112
- package/src/custom/field.tsx +0 -81
- package/src/custom/filter-builder.tsx +0 -418
- package/src/custom/index.ts +0 -21
- package/src/custom/input-group.tsx +0 -53
- package/src/custom/item.tsx +0 -201
- package/src/custom/kbd.tsx +0 -36
- package/src/custom/mobile-dialog-content.tsx +0 -67
- package/src/custom/native-select.tsx +0 -33
- package/src/custom/navigation-overlay.tsx +0 -334
- package/src/custom/section-header.tsx +0 -68
- package/src/custom/sort-builder.tsx +0 -129
- package/src/custom/spinner.tsx +0 -26
- package/src/custom/view-skeleton.tsx +0 -243
- package/src/custom/view-states.tsx +0 -153
- package/src/debug/DebugPanel.tsx +0 -313
- package/src/debug/__tests__/DebugPanel.test.tsx +0 -134
- package/src/debug/index.ts +0 -10
- package/src/hooks/use-config-draft.ts +0 -127
- package/src/hooks/use-mobile.tsx +0 -27
- package/src/index.css +0 -245
- package/src/index.ts +0 -47
- package/src/lib/use-sync-external-store-shim.ts +0 -10
- package/src/lib/use-sync-external-store-with-selector-shim.ts +0 -90
- package/src/lib/utils.tsx +0 -35
- package/src/new-components.test.ts +0 -73
- package/src/renderers/action/action-bar.tsx +0 -221
- package/src/renderers/action/action-button.tsx +0 -158
- package/src/renderers/action/action-group.tsx +0 -270
- package/src/renderers/action/action-icon.tsx +0 -150
- package/src/renderers/action/action-menu.tsx +0 -203
- package/src/renderers/action/index.ts +0 -19
- package/src/renderers/action/resolve-icon.ts +0 -35
- package/src/renderers/basic/button-group.tsx +0 -79
- package/src/renderers/basic/div.tsx +0 -60
- package/src/renderers/basic/html.tsx +0 -43
- package/src/renderers/basic/icon.tsx +0 -89
- package/src/renderers/basic/image.tsx +0 -49
- package/src/renderers/basic/index.ts +0 -18
- package/src/renderers/basic/navigation-menu.tsx +0 -81
- package/src/renderers/basic/pagination.tsx +0 -109
- package/src/renderers/basic/separator.tsx +0 -57
- package/src/renderers/basic/span.tsx +0 -63
- package/src/renderers/basic/text.tsx +0 -52
- package/src/renderers/complex/README-KANBAN.md +0 -208
- package/src/renderers/complex/TIMELINE.md +0 -353
- package/src/renderers/complex/__tests__/data-table-airtable-ux.test.tsx +0 -239
- package/src/renderers/complex/__tests__/data-table-batch-editing.test.tsx +0 -275
- package/src/renderers/complex/__tests__/data-table-cell-renderer.test.tsx +0 -120
- package/src/renderers/complex/__tests__/data-table-editing.test.tsx +0 -221
- package/src/renderers/complex/__tests__/data-table.test.ts +0 -76
- package/src/renderers/complex/carousel.tsx +0 -69
- package/src/renderers/complex/data-table.tsx +0 -1243
- package/src/renderers/complex/filter-builder.tsx +0 -77
- package/src/renderers/complex/index.ts +0 -16
- package/src/renderers/complex/resizable.tsx +0 -66
- package/src/renderers/complex/scroll-area.tsx +0 -58
- package/src/renderers/complex/table.tsx +0 -95
- package/src/renderers/data-display/alert.tsx +0 -46
- package/src/renderers/data-display/avatar.tsx +0 -38
- package/src/renderers/data-display/badge.tsx +0 -55
- package/src/renderers/data-display/breadcrumb.tsx +0 -61
- package/src/renderers/data-display/index.ts +0 -18
- package/src/renderers/data-display/kbd.tsx +0 -50
- package/src/renderers/data-display/list.tsx +0 -75
- package/src/renderers/data-display/statistic.tsx +0 -95
- package/src/renderers/data-display/table.tsx +0 -78
- package/src/renderers/data-display/tree-view.tsx +0 -176
- package/src/renderers/disclosure/accordion.tsx +0 -69
- package/src/renderers/disclosure/collapsible.tsx +0 -53
- package/src/renderers/disclosure/index.ts +0 -11
- package/src/renderers/disclosure/toggle-group.tsx +0 -79
- package/src/renderers/feedback/empty.tsx +0 -49
- package/src/renderers/feedback/index.ts +0 -16
- package/src/renderers/feedback/loading.tsx +0 -78
- package/src/renderers/feedback/progress.tsx +0 -29
- package/src/renderers/feedback/skeleton.tsx +0 -31
- package/src/renderers/feedback/sonner.tsx +0 -56
- package/src/renderers/feedback/spinner.tsx +0 -55
- package/src/renderers/feedback/toast.tsx +0 -59
- package/src/renderers/feedback/toaster.tsx +0 -23
- package/src/renderers/form/button.tsx +0 -103
- package/src/renderers/form/calendar.tsx +0 -34
- package/src/renderers/form/checkbox.tsx +0 -71
- package/src/renderers/form/combobox.tsx +0 -48
- package/src/renderers/form/command.tsx +0 -58
- package/src/renderers/form/date-picker.tsx +0 -84
- package/src/renderers/form/file-upload.tsx +0 -184
- package/src/renderers/form/form.tsx +0 -540
- package/src/renderers/form/index.ts +0 -26
- package/src/renderers/form/input-otp.tsx +0 -51
- package/src/renderers/form/input.tsx +0 -121
- package/src/renderers/form/label.tsx +0 -45
- package/src/renderers/form/radio-group.tsx +0 -63
- package/src/renderers/form/select.tsx +0 -94
- package/src/renderers/form/slider.tsx +0 -61
- package/src/renderers/form/switch.tsx +0 -48
- package/src/renderers/form/textarea.tsx +0 -76
- package/src/renderers/form/toggle.tsx +0 -42
- package/src/renderers/index.ts +0 -18
- package/src/renderers/layout/aspect-ratio.tsx +0 -51
- package/src/renderers/layout/card.tsx +0 -85
- package/src/renderers/layout/container.tsx +0 -122
- package/src/renderers/layout/flex.tsx +0 -132
- package/src/renderers/layout/grid.tsx +0 -178
- package/src/renderers/layout/index.ts +0 -19
- package/src/renderers/layout/page.tsx +0 -466
- package/src/renderers/layout/semantic.tsx +0 -48
- package/src/renderers/layout/stack.tsx +0 -132
- package/src/renderers/layout/tabs.tsx +0 -97
- package/src/renderers/navigation/header-bar.tsx +0 -118
- package/src/renderers/navigation/index.ts +0 -10
- package/src/renderers/navigation/sidebar.tsx +0 -208
- package/src/renderers/overlay/alert-dialog.tsx +0 -72
- package/src/renderers/overlay/context-menu.tsx +0 -100
- package/src/renderers/overlay/dialog.tsx +0 -77
- package/src/renderers/overlay/drawer.tsx +0 -77
- package/src/renderers/overlay/dropdown-menu.tsx +0 -99
- package/src/renderers/overlay/hover-card.tsx +0 -55
- package/src/renderers/overlay/index.ts +0 -18
- package/src/renderers/overlay/menubar.tsx +0 -76
- package/src/renderers/overlay/popover.tsx +0 -56
- package/src/renderers/overlay/sheet.tsx +0 -77
- package/src/renderers/overlay/tooltip.tsx +0 -67
- package/src/renderers/placeholders.tsx +0 -107
- package/src/stories/CRMApp.stories.tsx +0 -706
- package/src/stories/ConfigPanel.stories.tsx +0 -232
- package/src/stories/Guide.mdx +0 -55
- package/src/stories/MockedData.stories.tsx +0 -121
- package/src/stories/assets/accessibility.png +0 -0
- package/src/stories/assets/accessibility.svg +0 -1
- package/src/stories/assets/addon-library.png +0 -0
- package/src/stories/assets/assets.png +0 -0
- package/src/stories/assets/avif-test-image.avif +0 -0
- package/src/stories/assets/context.png +0 -0
- package/src/stories/assets/discord.svg +0 -1
- package/src/stories/assets/docs.png +0 -0
- package/src/stories/assets/figma-plugin.png +0 -0
- package/src/stories/assets/github.svg +0 -1
- package/src/stories/assets/share.png +0 -0
- package/src/stories/assets/styling.png +0 -0
- package/src/stories/assets/testing.png +0 -0
- package/src/stories/assets/theming.png +0 -0
- package/src/stories/assets/tutorials.svg +0 -1
- package/src/stories/assets/youtube.svg +0 -1
- package/src/stories/button.css +0 -30
- package/src/stories/header.css +0 -32
- package/src/stories/page.css +0 -68
- package/src/stories-json/Accessibility.mdx +0 -297
- package/src/stories-json/EdgeCases.stories.tsx +0 -160
- package/src/stories-json/GettingStarted.mdx +0 -89
- package/src/stories-json/Introduction.mdx +0 -127
- package/src/stories-json/accordion.stories.tsx +0 -43
- package/src/stories-json/aggrid.stories.tsx +0 -103
- package/src/stories-json/alert.stories.tsx +0 -39
- package/src/stories-json/aspect-ratio.stories.tsx +0 -34
- package/src/stories-json/avatar.stories.tsx +0 -38
- package/src/stories-json/badge.stories.tsx +0 -53
- package/src/stories-json/breadcrumb.stories.tsx +0 -30
- package/src/stories-json/button-group.stories.tsx +0 -43
- package/src/stories-json/button.stories.tsx +0 -73
- package/src/stories-json/calendar.stories.tsx +0 -85
- package/src/stories-json/card.stories.tsx +0 -48
- package/src/stories-json/carousel.stories.tsx +0 -33
- package/src/stories-json/charts.stories.tsx +0 -195
- package/src/stories-json/chatbot.stories.tsx +0 -349
- package/src/stories-json/code-editor.stories.tsx +0 -92
- package/src/stories-json/collapsible.stories.tsx +0 -40
- package/src/stories-json/controls.stories.tsx +0 -36
- package/src/stories-json/crm-live-data.stories.tsx +0 -154
- package/src/stories-json/dashboard.stories.tsx +0 -318
- package/src/stories-json/data-table.stories.tsx +0 -136
- package/src/stories-json/data_display_extras.stories.tsx +0 -102
- package/src/stories-json/date-picker.stories.tsx +0 -28
- package/src/stories-json/detail-view.stories.tsx +0 -258
- package/src/stories-json/dialog.stories.tsx +0 -43
- package/src/stories-json/feedback_extras.stories.tsx +0 -40
- package/src/stories-json/feedback_others.stories.tsx +0 -46
- package/src/stories-json/form-variants.stories.tsx +0 -210
- package/src/stories-json/form_advanced.stories.tsx +0 -117
- package/src/stories-json/form_extras.stories.tsx +0 -123
- package/src/stories-json/grid.stories.tsx +0 -56
- package/src/stories-json/icon.stories.tsx +0 -36
- package/src/stories-json/input.stories.tsx +0 -52
- package/src/stories-json/kanban.stories.tsx +0 -295
- package/src/stories-json/layout_extended.stories.tsx +0 -76
- package/src/stories-json/layout_flex.stories.tsx +0 -107
- package/src/stories-json/list-view.stories.tsx +0 -97
- package/src/stories-json/markdown.stories.tsx +0 -129
- package/src/stories-json/menus.stories.tsx +0 -63
- package/src/stories-json/metric-card.stories.tsx +0 -143
- package/src/stories-json/navigation-menu.stories.tsx +0 -37
- package/src/stories-json/object-aggrid-advanced.stories.tsx +0 -389
- package/src/stories-json/object-aggrid.stories.tsx +0 -252
- package/src/stories-json/object-form.stories.tsx +0 -130
- package/src/stories-json/object-gantt.stories.tsx +0 -114
- package/src/stories-json/object-grid.stories.tsx +0 -315
- package/src/stories-json/object-map.stories.tsx +0 -116
- package/src/stories-json/object-view.stories.tsx +0 -118
- package/src/stories-json/overlay_extras.stories.tsx +0 -113
- package/src/stories-json/overlay_others.stories.tsx +0 -76
- package/src/stories-json/page.stories.tsx +0 -55
- package/src/stories-json/reports.stories.tsx +0 -163
- package/src/stories-json/resizable.stories.tsx +0 -44
- package/src/stories-json/select.stories.tsx +0 -34
- package/src/stories-json/separator.stories.tsx +0 -41
- package/src/stories-json/sidebar.stories.tsx +0 -147
- package/src/stories-json/statistic.stories.tsx +0 -44
- package/src/stories-json/tabs.stories.tsx +0 -51
- package/src/stories-json/timeline.stories.tsx +0 -188
- package/src/stories-json/typography.stories.tsx +0 -45
- package/src/types/config-panel.ts +0 -101
- package/src/ui/accordion.tsx +0 -66
- package/src/ui/alert-dialog.tsx +0 -149
- package/src/ui/alert.tsx +0 -67
- package/src/ui/aspect-ratio.tsx +0 -15
- package/src/ui/avatar.tsx +0 -58
- package/src/ui/badge.tsx +0 -44
- package/src/ui/breadcrumb.tsx +0 -123
- package/src/ui/button.tsx +0 -64
- package/src/ui/calendar.tsx +0 -221
- package/src/ui/card.tsx +0 -87
- package/src/ui/carousel.tsx +0 -270
- package/src/ui/chart.tsx +0 -377
- package/src/ui/checkbox.tsx +0 -38
- package/src/ui/collapsible.tsx +0 -19
- package/src/ui/command.tsx +0 -161
- package/src/ui/context-menu.tsx +0 -208
- package/src/ui/dialog.tsx +0 -130
- package/src/ui/drawer.tsx +0 -126
- package/src/ui/dropdown-menu.tsx +0 -208
- package/src/ui/form.tsx +0 -186
- package/src/ui/hover-card.tsx +0 -37
- package/src/ui/index.ts +0 -56
- package/src/ui/input-otp.tsx +0 -79
- package/src/ui/input.tsx +0 -30
- package/src/ui/label.tsx +0 -34
- package/src/ui/menubar.tsx +0 -264
- package/src/ui/navigation-menu.tsx +0 -136
- package/src/ui/pagination.tsx +0 -125
- package/src/ui/popover.tsx +0 -39
- package/src/ui/progress.tsx +0 -36
- package/src/ui/radio-group.tsx +0 -52
- package/src/ui/resizable.tsx +0 -53
- package/src/ui/scroll-area.tsx +0 -56
- package/src/ui/select.tsx +0 -168
- package/src/ui/separator.tsx +0 -39
- package/src/ui/sheet.tsx +0 -150
- package/src/ui/sidebar.tsx +0 -781
- package/src/ui/skeleton.tsx +0 -23
- package/src/ui/slider.tsx +0 -39
- package/src/ui/sonner.tsx +0 -53
- package/src/ui/switch.tsx +0 -37
- package/src/ui/table.tsx +0 -125
- package/src/ui/tabs.tsx +0 -63
- package/src/ui/textarea.tsx +0 -30
- package/src/ui/toast.tsx +0 -137
- package/src/ui/toggle-group.tsx +0 -69
- package/src/ui/toggle.tsx +0 -53
- package/src/ui/tooltip.tsx +0 -38
- package/src/ui/typography.tsx +0 -85
- package/tsconfig.json +0 -19
- package/vite.config.ts +0 -71
- package/vitest.config.ts +0 -5
|
@@ -8,4 +8,15 @@ declare function EmptyMedia({ className, variant, ...props }: React.ComponentPro
|
|
|
8
8
|
declare function EmptyTitle({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
declare function EmptyDescription({ className, ...props }: React.ComponentProps<"p">): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
declare function EmptyContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
|
|
11
|
+
/**
|
|
12
|
+
* EmptyValue — universal inline placeholder for missing cell/field values.
|
|
13
|
+
*
|
|
14
|
+
* Use this anywhere a renderer would otherwise show "-" or "—" for a null,
|
|
15
|
+
* undefined or empty value. It renders a muted, non-interactive en-dash that
|
|
16
|
+
* does not inherit link/button colors from surrounding ancestors, so a missing
|
|
17
|
+
* value never looks clickable.
|
|
18
|
+
*/
|
|
19
|
+
declare function EmptyValue({ className, glyph, ...props }: React.ComponentProps<"span"> & {
|
|
20
|
+
glyph?: string;
|
|
21
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export { Empty, EmptyHeader, EmptyTitle, EmptyDescription, EmptyContent, EmptyMedia, EmptyValue, };
|
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
import { ActionSchema, ActionLocation } from '../../../../types/src';
|
|
2
2
|
export interface ActionBarSchema {
|
|
3
3
|
type: 'action:bar';
|
|
4
|
-
/**
|
|
4
|
+
/** Business actions to render — subject to inline/overflow split via {@link maxVisible} */
|
|
5
5
|
actions?: ActionSchema[];
|
|
6
|
+
/**
|
|
7
|
+
* System/chrome actions (Duplicate, Export, View History, Delete, etc.) that
|
|
8
|
+
* are *always* placed in the overflow menu — never inline — regardless of
|
|
9
|
+
* {@link maxVisible}. They share a single overflow button with any business
|
|
10
|
+
* actions that spilled past {@link maxVisible}, guaranteeing at most one
|
|
11
|
+
* "More" menu per bar.
|
|
12
|
+
*
|
|
13
|
+
* The first system action is automatically separated from business-overflow
|
|
14
|
+
* entries by a menu separator.
|
|
15
|
+
*/
|
|
16
|
+
systemActions?: ActionSchema[];
|
|
6
17
|
/** Filter actions by this location */
|
|
7
18
|
location?: ActionLocation;
|
|
8
19
|
/** Maximum visible inline actions before overflow into "More" menu (default: 3) */
|
|
@@ -32,43 +32,24 @@ declare const ChartStyle: ({ id, config }: {
|
|
|
32
32
|
config: ChartConfig;
|
|
33
33
|
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
34
34
|
declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
|
|
35
|
-
declare const ChartTooltipContent: React.ForwardRefExoticComponent<Omit<
|
|
35
|
+
declare const ChartTooltipContent: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
|
|
36
36
|
active?: boolean;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
animationEasing?: import('recharts/types/util/types').AnimationTiming;
|
|
40
|
-
axisId?: RechartsPrimitive.AxisId;
|
|
41
|
-
content?: import('recharts/types/component/Tooltip').ContentType<RechartsPrimitive.TooltipValueType, import('recharts/types/component/DefaultTooltipContent').NameType> | undefined;
|
|
42
|
-
contentStyle?: React.CSSProperties;
|
|
43
|
-
cursor?: import('recharts/types/component/Cursor').CursorDefinition;
|
|
44
|
-
defaultIndex?: number | RechartsPrimitive.TooltipIndex;
|
|
45
|
-
filterNull?: boolean;
|
|
46
|
-
formatter?: ((value: RechartsPrimitive.TooltipValueType, name: import('recharts/types/component/DefaultTooltipContent').NameType, item: import('recharts/types/state/tooltipSlice').TooltipPayloadEntry, index: number, payload: RechartsPrimitive.TooltipPayload) => React.ReactNode | [React.ReactNode, React.ReactNode]) | undefined;
|
|
47
|
-
includeHidden?: boolean | undefined;
|
|
48
|
-
isAnimationActive?: boolean | "auto";
|
|
49
|
-
itemSorter?: RechartsPrimitive.TooltipItemSorter;
|
|
50
|
-
itemStyle?: React.CSSProperties;
|
|
51
|
-
labelFormatter?: (label: any, payload: RechartsPrimitive.TooltipPayload) => React.ReactNode;
|
|
52
|
-
labelStyle?: React.CSSProperties;
|
|
53
|
-
offset?: number | RechartsPrimitive.Coordinate;
|
|
54
|
-
payloadUniqBy?: import('recharts/types/util/payload/getUniqPayload').UniqueOption<import('recharts/types/state/tooltipSlice').TooltipPayloadEntry>;
|
|
55
|
-
portal?: HTMLElement | null;
|
|
56
|
-
position?: Partial<RechartsPrimitive.Coordinate>;
|
|
57
|
-
reverseDirection?: import('recharts/types/util/types').AllowInDimension;
|
|
58
|
-
separator?: string;
|
|
59
|
-
shared?: boolean;
|
|
60
|
-
trigger?: import('recharts/types/chart/types').TooltipTrigger;
|
|
61
|
-
useTranslate3d?: boolean;
|
|
62
|
-
wrapperStyle?: React.CSSProperties;
|
|
63
|
-
} & React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
|
|
37
|
+
payload?: any[];
|
|
38
|
+
label?: string;
|
|
64
39
|
hideLabel?: boolean;
|
|
65
40
|
hideIndicator?: boolean;
|
|
66
41
|
indicator?: "line" | "dot" | "dashed";
|
|
67
42
|
nameKey?: string;
|
|
68
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;
|
|
69
48
|
}, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
70
49
|
declare const ChartLegend: React.MemoExoticComponent<(outsideProps: RechartsPrimitive.LegendProps) => React.ReactPortal | null>;
|
|
71
|
-
declare const ChartLegendContent: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> &
|
|
50
|
+
declare const ChartLegendContent: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
|
|
51
|
+
payload?: any[];
|
|
52
|
+
verticalAlign?: "top" | "bottom";
|
|
72
53
|
hideIcon?: boolean;
|
|
73
54
|
nameKey?: string;
|
|
74
55
|
}, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@object-ui/components",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Standard UI component library for Object UI, built with Shadcn UI + Tailwind CSS",
|
|
7
|
-
"homepage": "https://www.objectui.org",
|
|
7
|
+
"homepage": "https://www.objectui.org/docs/components",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
|
-
"url": "https://github.com/objectstack-ai/objectui.git",
|
|
10
|
+
"url": "git+https://github.com/objectstack-ai/objectui.git",
|
|
11
11
|
"directory": "packages/components"
|
|
12
12
|
},
|
|
13
13
|
"bugs": {
|
|
@@ -26,33 +26,33 @@
|
|
|
26
26
|
"./style.css": "./dist/index.css"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@radix-ui/react-accordion": "^1.2.
|
|
30
|
-
"@radix-ui/react-alert-dialog": "^1.1.
|
|
29
|
+
"@radix-ui/react-accordion": "^1.2.12",
|
|
30
|
+
"@radix-ui/react-alert-dialog": "^1.1.15",
|
|
31
31
|
"@radix-ui/react-aspect-ratio": "^1.1.8",
|
|
32
|
-
"@radix-ui/react-avatar": "^1.1.
|
|
33
|
-
"@radix-ui/react-checkbox": "^1.
|
|
34
|
-
"@radix-ui/react-collapsible": "^1.1.
|
|
35
|
-
"@radix-ui/react-context-menu": "^2.2.
|
|
36
|
-
"@radix-ui/react-dialog": "^1.1.
|
|
37
|
-
"@radix-ui/react-dropdown-menu": "^2.1.
|
|
38
|
-
"@radix-ui/react-hover-card": "^1.1.
|
|
39
|
-
"@radix-ui/react-label": "^2.1.
|
|
40
|
-
"@radix-ui/react-menubar": "^1.1.
|
|
41
|
-
"@radix-ui/react-navigation-menu": "^1.2.
|
|
42
|
-
"@radix-ui/react-popover": "^1.1.
|
|
43
|
-
"@radix-ui/react-progress": "^1.1.
|
|
44
|
-
"@radix-ui/react-radio-group": "^1.
|
|
45
|
-
"@radix-ui/react-scroll-area": "^1.2.
|
|
46
|
-
"@radix-ui/react-select": "^2.
|
|
47
|
-
"@radix-ui/react-separator": "^1.1.
|
|
48
|
-
"@radix-ui/react-slider": "^1.
|
|
49
|
-
"@radix-ui/react-slot": "^1.
|
|
50
|
-
"@radix-ui/react-switch": "^1.
|
|
51
|
-
"@radix-ui/react-tabs": "^1.1.
|
|
52
|
-
"@radix-ui/react-toast": "^1.2.
|
|
53
|
-
"@radix-ui/react-toggle": "^1.1.
|
|
54
|
-
"@radix-ui/react-toggle-group": "^1.1.
|
|
55
|
-
"@radix-ui/react-tooltip": "^1.
|
|
32
|
+
"@radix-ui/react-avatar": "^1.1.11",
|
|
33
|
+
"@radix-ui/react-checkbox": "^1.3.3",
|
|
34
|
+
"@radix-ui/react-collapsible": "^1.1.12",
|
|
35
|
+
"@radix-ui/react-context-menu": "^2.2.16",
|
|
36
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
37
|
+
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
38
|
+
"@radix-ui/react-hover-card": "^1.1.15",
|
|
39
|
+
"@radix-ui/react-label": "^2.1.8",
|
|
40
|
+
"@radix-ui/react-menubar": "^1.1.16",
|
|
41
|
+
"@radix-ui/react-navigation-menu": "^1.2.14",
|
|
42
|
+
"@radix-ui/react-popover": "^1.1.15",
|
|
43
|
+
"@radix-ui/react-progress": "^1.1.8",
|
|
44
|
+
"@radix-ui/react-radio-group": "^1.3.8",
|
|
45
|
+
"@radix-ui/react-scroll-area": "^1.2.10",
|
|
46
|
+
"@radix-ui/react-select": "^2.2.6",
|
|
47
|
+
"@radix-ui/react-separator": "^1.1.8",
|
|
48
|
+
"@radix-ui/react-slider": "^1.3.6",
|
|
49
|
+
"@radix-ui/react-slot": "^1.2.4",
|
|
50
|
+
"@radix-ui/react-switch": "^1.2.6",
|
|
51
|
+
"@radix-ui/react-tabs": "^1.1.13",
|
|
52
|
+
"@radix-ui/react-toast": "^1.2.15",
|
|
53
|
+
"@radix-ui/react-toggle": "^1.1.10",
|
|
54
|
+
"@radix-ui/react-toggle-group": "^1.1.11",
|
|
55
|
+
"@radix-ui/react-tooltip": "^1.2.8",
|
|
56
56
|
"class-variance-authority": "^0.7.1",
|
|
57
57
|
"clsx": "^2.1.1",
|
|
58
58
|
"cmdk": "^1.1.1",
|
|
@@ -62,17 +62,17 @@
|
|
|
62
62
|
"lucide-react": "^1.8.0",
|
|
63
63
|
"next-themes": "^0.4.6",
|
|
64
64
|
"react-day-picker": "^9.14.0",
|
|
65
|
-
"react-hook-form": "^7.
|
|
66
|
-
"react-resizable-panels": "^4.
|
|
65
|
+
"react-hook-form": "^7.75.0",
|
|
66
|
+
"react-resizable-panels": "^4.11.0",
|
|
67
67
|
"recharts": "3.8.1",
|
|
68
68
|
"sonner": "^2.0.7",
|
|
69
69
|
"tailwind-merge": "^3.5.0",
|
|
70
70
|
"tailwindcss-animate": "^1.0.7",
|
|
71
71
|
"vaul": "^1.1.2",
|
|
72
|
-
"@object-ui/core": "3.3.
|
|
73
|
-
"@object-ui/i18n": "3.3.
|
|
74
|
-
"@object-ui/react": "3.3.
|
|
75
|
-
"@object-ui/types": "3.3.
|
|
72
|
+
"@object-ui/core": "3.3.1",
|
|
73
|
+
"@object-ui/i18n": "3.3.1",
|
|
74
|
+
"@object-ui/react": "3.3.1",
|
|
75
|
+
"@object-ui/types": "3.3.1"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
78
|
"react": "^18.0.0 || ^19.0.0",
|
|
@@ -86,22 +86,43 @@
|
|
|
86
86
|
"@storybook/blocks": "^8.6.14",
|
|
87
87
|
"@storybook/react": "^8.6.18",
|
|
88
88
|
"@storybook/react-vite": "^8.6.18",
|
|
89
|
-
"@tailwindcss/postcss": "^4.2.
|
|
89
|
+
"@tailwindcss/postcss": "^4.2.4",
|
|
90
90
|
"@types/react": "19.2.14",
|
|
91
91
|
"@types/react-dom": "19.2.3",
|
|
92
92
|
"@vitejs/plugin-react": "^6.0.1",
|
|
93
|
-
"autoprefixer": "^10.
|
|
94
|
-
"postcss": "^8.5.
|
|
95
|
-
"shadcn": "^4.
|
|
93
|
+
"autoprefixer": "^10.5.0",
|
|
94
|
+
"postcss": "^8.5.13",
|
|
95
|
+
"shadcn": "^4.6.0",
|
|
96
96
|
"storybook": "^8.6.18",
|
|
97
|
-
"tailwindcss": "^4.2.
|
|
98
|
-
"typescript": "^6.0.
|
|
99
|
-
"vite": "^8.0.
|
|
97
|
+
"tailwindcss": "^4.2.4",
|
|
98
|
+
"typescript": "^6.0.3",
|
|
99
|
+
"vite": "^8.0.9",
|
|
100
100
|
"vite-plugin-dts": "^4.5.4"
|
|
101
101
|
},
|
|
102
|
+
"keywords": [
|
|
103
|
+
"objectui",
|
|
104
|
+
"sdui",
|
|
105
|
+
"schema-driven-ui",
|
|
106
|
+
"react",
|
|
107
|
+
"tailwind",
|
|
108
|
+
"shadcn",
|
|
109
|
+
"objectstack",
|
|
110
|
+
"components",
|
|
111
|
+
"radix-ui",
|
|
112
|
+
"ui-library"
|
|
113
|
+
],
|
|
114
|
+
"author": "ObjectStack Team <team@objectstack.ai>",
|
|
115
|
+
"publishConfig": {
|
|
116
|
+
"access": "public"
|
|
117
|
+
},
|
|
118
|
+
"files": [
|
|
119
|
+
"dist",
|
|
120
|
+
"README.md",
|
|
121
|
+
"CHANGELOG.md",
|
|
122
|
+
"LICENSE"
|
|
123
|
+
],
|
|
102
124
|
"scripts": {
|
|
103
|
-
"
|
|
104
|
-
"build": "vite build",
|
|
125
|
+
"build": "vite build && node scripts/build-css.mjs",
|
|
105
126
|
"prebuild": "pnpm --filter @object-ui/types build && pnpm --filter @object-ui/core build && pnpm --filter @object-ui/react build",
|
|
106
127
|
"pretest": "pnpm run prebuild",
|
|
107
128
|
"test": "vitest run",
|
package/.turbo/turbo-build.log
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
> @object-ui/components@3.3.0 prebuild /home/runner/work/objectui/objectui/packages/components
|
|
3
|
-
> pnpm --filter @object-ui/types build && pnpm --filter @object-ui/core build && pnpm --filter @object-ui/react build
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
> @object-ui/types@3.3.0 build /home/runner/work/objectui/objectui/packages/types
|
|
7
|
-
> tsc
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
> @object-ui/core@3.3.0 build /home/runner/work/objectui/objectui/packages/core
|
|
11
|
-
> tsc
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
> @object-ui/react@3.3.0 build /home/runner/work/objectui/objectui/packages/react
|
|
15
|
-
> tsc
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
> @object-ui/components@3.3.0 build /home/runner/work/objectui/objectui/packages/components
|
|
19
|
-
> vite build
|
|
20
|
-
|
|
21
|
-
[36mvite v8.0.8 [32mbuilding client environment for production...[36m[39m
|
|
22
|
-
[2K
|
|
23
|
-
rendering chunks...
|
|
24
|
-
[32m
|
|
25
|
-
[36m[vite:dts][32m Start generate declaration files...[39m
|
|
26
|
-
[96msrc/index.ts[0m:[93m9[0m:[93m8[0m - [91merror[0m[90m TS2882: [0mCannot find module or type declarations for side-effect import of './index.css'.
|
|
27
|
-
|
|
28
|
-
[7m9[0m import './index.css';
|
|
29
|
-
[7m [0m [91m ~~~~~~~~~~~~~[0m
|
|
30
|
-
[96msrc/renderers/basic/div.tsx[0m:[93m17[0m:[93m9[0m - [91merror[0m[90m TS2591: [0mCannot find name 'process'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig.
|
|
31
|
-
|
|
32
|
-
[7m17[0m if (process.env.NODE_ENV !== 'production') {
|
|
33
|
-
[7m [0m [91m ~~~~~~~[0m
|
|
34
|
-
[96msrc/renderers/basic/span.tsx[0m:[93m17[0m:[93m9[0m - [91merror[0m[90m TS2591: [0mCannot find name 'process'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig.
|
|
35
|
-
|
|
36
|
-
[7m17[0m if (process.env.NODE_ENV !== 'production') {
|
|
37
|
-
[7m [0m [91m ~~~~~~~[0m
|
|
38
|
-
[96msrc/renderers/form/form.tsx[0m:[93m152[0m:[93m20[0m - [91merror[0m[90m TS2591: [0mCannot find name 'process'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig.
|
|
39
|
-
|
|
40
|
-
[7m152[0m if (typeof process !== 'undefined' && process.env?.NODE_ENV === 'development') {
|
|
41
|
-
[7m [0m [91m ~~~~~~~[0m
|
|
42
|
-
[96msrc/renderers/form/form.tsx[0m:[93m152[0m:[93m47[0m - [91merror[0m[90m TS2591: [0mCannot find name 'process'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig.
|
|
43
|
-
|
|
44
|
-
[7m152[0m if (typeof process !== 'undefined' && process.env?.NODE_ENV === 'development') {
|
|
45
|
-
[7m [0m [91m ~~~~~~~[0m
|
|
46
|
-
[96msrc/ui/chart.tsx[0m:[93m127[0m:[93m7[0m - [91merror[0m[90m TS2339: [0mProperty 'payload' does not exist on type 'Omit<Omit<Props<ValueType, NameType>, PropertiesReadFromContext> & { active?: boolean | undefined; allowEscapeViewBox?: AllowInDimension | undefined; ... 24 more ...; wrapperStyle?: CSSProperties | undefined; } & ClassAttributes<...> & HTMLAttributes<...> & { ...; }, "ref">'.
|
|
47
|
-
|
|
48
|
-
[7m127[0m payload,
|
|
49
|
-
[7m [0m [91m ~~~~~~~[0m
|
|
50
|
-
[96msrc/ui/chart.tsx[0m:[93m132[0m:[93m7[0m - [91merror[0m[90m TS2339: [0mProperty 'label' does not exist on type 'Omit<Omit<Props<ValueType, NameType>, PropertiesReadFromContext> & { active?: boolean | undefined; allowEscapeViewBox?: AllowInDimension | undefined; ... 24 more ...; wrapperStyle?: CSSProperties | undefined; } & ClassAttributes<...> & HTMLAttributes<...> & { ...; }, "ref">'.
|
|
51
|
-
|
|
52
|
-
[7m132[0m label,
|
|
53
|
-
[7m [0m [91m ~~~~~[0m
|
|
54
|
-
[96msrc/ui/chart.tsx[0m:[93m274[0m:[93m41[0m - [91merror[0m[90m TS2344: [0mType '"payload" | "verticalAlign"' does not satisfy the constraint '"string" | "filter" | "fill" | "values" | "className" | "color" | "slot" | "style" | "children" | "content" | "clipPath" | "mask" | "path" | "key" | "suppressHydrationWarning" | ... 435 more ... | "onBBoxUpdate"'.
|
|
55
|
-
Type '"payload"' is not assignable to type '"string" | "filter" | "fill" | "values" | "className" | "color" | "slot" | "style" | "children" | "content" | "clipPath" | "mask" | "path" | "key" | "suppressHydrationWarning" | ... 435 more ... | "onBBoxUpdate"'.
|
|
56
|
-
|
|
57
|
-
[7m274[0m Pick<RechartsPrimitive.LegendProps, "payload" | "verticalAlign"> & {
|
|
58
|
-
[7m [0m [91m ~~~~~~~~~~~~~~~~~~~~~~~~~~~[0m
|
|
59
|
-
[96msrc/ui/chart.tsx[0m:[93m285[0m:[93m19[0m - [91merror[0m[90m TS2339: [0mProperty 'length' does not exist on type '{}'.
|
|
60
|
-
|
|
61
|
-
[7m285[0m if (!payload?.length) {
|
|
62
|
-
[7m [0m [91m ~~~~~~[0m
|
|
63
|
-
[96msrc/ui/chart.tsx[0m:[93m299[0m:[93m12[0m - [91merror[0m[90m TS2339: [0mProperty 'filter' does not exist on type '{}'.
|
|
64
|
-
|
|
65
|
-
[7m299[0m .filter((item) => item.type !== "none")
|
|
66
|
-
[7m [0m [91m ~~~~~~[0m
|
|
67
|
-
|
|
68
|
-
[32m[36m[vite:dts][32m Declaration files built in 8372ms.
|
|
69
|
-
[39m
|
|
70
|
-
computing gzip size...
|
|
71
|
-
dist/index.css 120.76 kB │ gzip: 19.61 kB
|
|
72
|
-
dist/index.js 2,027.14 kB │ gzip: 477.38 kB
|
|
73
|
-
|
|
74
|
-
[33m[33m[PLUGIN_TIMINGS] Warning:[0m Your build spent significant time in plugin `vite:dts`. See https://rolldown.rs/options/checks#plugintimings for more details.
|
|
75
|
-
[39m
|
|
76
|
-
[2K
|
|
77
|
-
rendering chunks...
|
|
78
|
-
computing gzip size...
|
|
79
|
-
dist/index.css 120.76 kB │ gzip: 19.61 kB
|
|
80
|
-
dist/index.umd.cjs 1,557.83 kB │ gzip: 425.47 kB
|
|
81
|
-
|
|
82
|
-
[33m[33m[MISSING_GLOBAL_NAME] Warning:[0m No name was provided for external module "react/jsx-runtime" in "output.globals" – guessing "react_jsx_runtime".
|
|
83
|
-
[39m
|
|
84
|
-
[32m✓ built in 12.10s[39m
|
package/README_SHADCN_SYNC.md
DELETED
|
@@ -1,281 +0,0 @@
|
|
|
1
|
-
# Shadcn Components Synchronization
|
|
2
|
-
|
|
3
|
-
This directory contains tools for keeping ObjectUI components in sync with Shadcn UI.
|
|
4
|
-
|
|
5
|
-
## Files
|
|
6
|
-
|
|
7
|
-
- `shadcn-components.json` - Component manifest tracking Shadcn components and custom ObjectUI components
|
|
8
|
-
- `shadcn-sync.js` - Automated sync script (requires network access to ui.shadcn.com)
|
|
9
|
-
|
|
10
|
-
## Component Categories
|
|
11
|
-
|
|
12
|
-
### Shadcn Components (46)
|
|
13
|
-
|
|
14
|
-
These components come from Shadcn UI and can be updated from the registry:
|
|
15
|
-
|
|
16
|
-
**Form Controls:**
|
|
17
|
-
- input, textarea, select, checkbox, radio-group, switch, form, label, input-otp
|
|
18
|
-
|
|
19
|
-
**Layout:**
|
|
20
|
-
- card, tabs, accordion, separator, scroll-area, resizable
|
|
21
|
-
|
|
22
|
-
**Overlays:**
|
|
23
|
-
- dialog, popover, tooltip, hover-card, sheet, drawer, alert-dialog
|
|
24
|
-
|
|
25
|
-
**Navigation:**
|
|
26
|
-
- button, breadcrumb, navigation-menu, dropdown-menu, context-menu, menubar, pagination
|
|
27
|
-
|
|
28
|
-
**Data Display:**
|
|
29
|
-
- table, avatar, badge, skeleton, progress, slider
|
|
30
|
-
|
|
31
|
-
**Feedback:**
|
|
32
|
-
- alert, toast, sonner
|
|
33
|
-
|
|
34
|
-
**Advanced:**
|
|
35
|
-
- command, carousel, sidebar, collapsible, calendar, aspect-ratio, toggle, toggle-group
|
|
36
|
-
|
|
37
|
-
### Custom ObjectUI Components (14)
|
|
38
|
-
|
|
39
|
-
These are custom to ObjectUI and should NOT be auto-updated:
|
|
40
|
-
|
|
41
|
-
- `button-group` - Button group wrapper
|
|
42
|
-
- `calendar-view` - Full calendar implementation
|
|
43
|
-
- `chatbot` - Chatbot UI interface
|
|
44
|
-
- `combobox` - Combined select/input component
|
|
45
|
-
- `date-picker` - Date picker with calendar
|
|
46
|
-
- `empty` - Empty state component
|
|
47
|
-
- `field` - Form field wrapper with validation
|
|
48
|
-
- `filter-builder` - Advanced query builder
|
|
49
|
-
- `input-group` - Input with prefix/suffix
|
|
50
|
-
- `item` - Generic item display
|
|
51
|
-
- `kbd` - Keyboard shortcut display
|
|
52
|
-
- `spinner` - Loading spinner
|
|
53
|
-
- `timeline` - Timeline/activity feed
|
|
54
|
-
- `toaster` - Toast notification manager
|
|
55
|
-
|
|
56
|
-
## Usage
|
|
57
|
-
|
|
58
|
-
### Automated Sync (Requires Internet)
|
|
59
|
-
|
|
60
|
-
```bash
|
|
61
|
-
# Check component status
|
|
62
|
-
pnpm shadcn:check
|
|
63
|
-
|
|
64
|
-
# Update a specific component
|
|
65
|
-
pnpm shadcn:update button
|
|
66
|
-
|
|
67
|
-
# Update all components
|
|
68
|
-
pnpm shadcn:update-all
|
|
69
|
-
|
|
70
|
-
# Show diff for a component
|
|
71
|
-
pnpm shadcn:diff button
|
|
72
|
-
|
|
73
|
-
# List all components
|
|
74
|
-
pnpm shadcn:list
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
### Manual Sync Process
|
|
78
|
-
|
|
79
|
-
If you don't have network access or prefer manual control:
|
|
80
|
-
|
|
81
|
-
1. **Visit Shadcn UI Documentation**
|
|
82
|
-
- Go to https://ui.shadcn.com/docs/components/[component-name]
|
|
83
|
-
- Click "View Code" to see the latest implementation
|
|
84
|
-
|
|
85
|
-
2. **Compare with Local Version**
|
|
86
|
-
```bash
|
|
87
|
-
# View local component
|
|
88
|
-
cat packages/components/src/ui/button.tsx
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
3. **Copy Latest Version**
|
|
92
|
-
- Copy the component code from Shadcn docs
|
|
93
|
-
- Paste into a temporary file
|
|
94
|
-
|
|
95
|
-
4. **Adjust Imports**
|
|
96
|
-
Replace Shadcn imports:
|
|
97
|
-
```typescript
|
|
98
|
-
// FROM:
|
|
99
|
-
import { cn } from "@/lib/utils"
|
|
100
|
-
import { Button } from "@/components/ui/button"
|
|
101
|
-
|
|
102
|
-
// TO:
|
|
103
|
-
import { cn } from "../lib/utils"
|
|
104
|
-
import { Button } from "./button"
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
5. **Add ObjectUI Header**
|
|
108
|
-
```typescript
|
|
109
|
-
/**
|
|
110
|
-
* ObjectUI
|
|
111
|
-
* Copyright (c) 2024-present ObjectStack Inc.
|
|
112
|
-
*
|
|
113
|
-
* This source code is licensed under the MIT license found in the
|
|
114
|
-
* LICENSE file in the root directory of this source tree.
|
|
115
|
-
*/
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
6. **Preserve Customizations**
|
|
119
|
-
- Keep any `data-slot` attributes
|
|
120
|
-
- Keep ObjectUI-specific variants
|
|
121
|
-
- Keep dark mode enhancements
|
|
122
|
-
- Keep accessibility improvements
|
|
123
|
-
|
|
124
|
-
7. **Test the Component**
|
|
125
|
-
```bash
|
|
126
|
-
pnpm --filter @object-ui/components build
|
|
127
|
-
pnpm --filter @object-ui/components test
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
## Using Official Shadcn CLI
|
|
131
|
-
|
|
132
|
-
You can also use the official Shadcn CLI:
|
|
133
|
-
|
|
134
|
-
```bash
|
|
135
|
-
# Install Shadcn CLI
|
|
136
|
-
npm install -g shadcn@latest
|
|
137
|
-
|
|
138
|
-
# Initialize (if not done)
|
|
139
|
-
cd packages/components
|
|
140
|
-
npx shadcn@latest init
|
|
141
|
-
|
|
142
|
-
# Add/update a component
|
|
143
|
-
npx shadcn@latest add button --overwrite
|
|
144
|
-
|
|
145
|
-
# Add all components
|
|
146
|
-
npx shadcn@latest add --all --overwrite
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
**⚠️ Warning:** This will overwrite all ObjectUI customizations! You'll need to:
|
|
150
|
-
|
|
151
|
-
1. Review the diff carefully: `git diff src/ui/`
|
|
152
|
-
2. Restore ObjectUI copyright headers
|
|
153
|
-
3. Re-add any custom variants or styling
|
|
154
|
-
4. Re-add data-slot attributes
|
|
155
|
-
5. Test thoroughly
|
|
156
|
-
|
|
157
|
-
## Checking for Updates
|
|
158
|
-
|
|
159
|
-
### Manual Check
|
|
160
|
-
|
|
161
|
-
1. Visit [Shadcn UI GitHub](https://github.com/shadcn-ui/ui/tree/main/apps/www/registry/default/ui)
|
|
162
|
-
2. Compare file dates with last update
|
|
163
|
-
3. Check [Shadcn Releases](https://github.com/shadcn-ui/ui/releases) for changelog
|
|
164
|
-
|
|
165
|
-
### Compare Dependencies
|
|
166
|
-
|
|
167
|
-
```bash
|
|
168
|
-
# Check Radix UI versions
|
|
169
|
-
cat packages/components/package.json | grep @radix-ui
|
|
170
|
-
|
|
171
|
-
# Check latest versions
|
|
172
|
-
npm view @radix-ui/react-dialog version
|
|
173
|
-
npm view @radix-ui/react-select version
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
### Review Breaking Changes
|
|
177
|
-
|
|
178
|
-
Check Shadcn's changelog:
|
|
179
|
-
- [UI Changelog](https://github.com/shadcn-ui/ui/releases)
|
|
180
|
-
- [Radix UI Releases](https://github.com/radix-ui/primitives/releases)
|
|
181
|
-
|
|
182
|
-
## Common Customizations in ObjectUI
|
|
183
|
-
|
|
184
|
-
When updating components, preserve these ObjectUI patterns:
|
|
185
|
-
|
|
186
|
-
### 1. Copyright Headers
|
|
187
|
-
|
|
188
|
-
```typescript
|
|
189
|
-
/**
|
|
190
|
-
* ObjectUI
|
|
191
|
-
* Copyright (c) 2024-present ObjectStack Inc.
|
|
192
|
-
*
|
|
193
|
-
* This source code is licensed under the MIT license found in the
|
|
194
|
-
* LICENSE file in the root directory of this source tree.
|
|
195
|
-
*/
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
### 2. Data Slot Attributes
|
|
199
|
-
|
|
200
|
-
```typescript
|
|
201
|
-
<div data-slot="card-header" className={...}>
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
### 3. Additional Variants
|
|
205
|
-
|
|
206
|
-
```typescript
|
|
207
|
-
const buttonVariants = cva(
|
|
208
|
-
"...",
|
|
209
|
-
{
|
|
210
|
-
variants: {
|
|
211
|
-
// ObjectUI-specific variants
|
|
212
|
-
size: {
|
|
213
|
-
"icon-sm": "h-8 w-8", // Extra size variant
|
|
214
|
-
"icon-lg": "h-10 w-10", // Extra size variant
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
)
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
### 4. Enhanced Dark Mode
|
|
222
|
-
|
|
223
|
-
ObjectUI may have enhanced dark mode styles:
|
|
224
|
-
|
|
225
|
-
```typescript
|
|
226
|
-
className="... dark:bg-background/95 dark:backdrop-blur-sm"
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
## Testing After Updates
|
|
230
|
-
|
|
231
|
-
```bash
|
|
232
|
-
# Type check
|
|
233
|
-
pnpm --filter @object-ui/components type-check
|
|
234
|
-
|
|
235
|
-
# Build
|
|
236
|
-
pnpm --filter @object-ui/components build
|
|
237
|
-
|
|
238
|
-
# Run tests
|
|
239
|
-
pnpm --filter @object-ui/components test
|
|
240
|
-
|
|
241
|
-
# Visual regression (if available)
|
|
242
|
-
pnpm --filter @object-ui/components storybook
|
|
243
|
-
|
|
244
|
-
# Integration test
|
|
245
|
-
pnpm test
|
|
246
|
-
```
|
|
247
|
-
|
|
248
|
-
## Rollback
|
|
249
|
-
|
|
250
|
-
If an update causes issues:
|
|
251
|
-
|
|
252
|
-
```bash
|
|
253
|
-
# Revert specific file
|
|
254
|
-
git checkout HEAD -- packages/components/src/ui/button.tsx
|
|
255
|
-
|
|
256
|
-
# Revert all UI components
|
|
257
|
-
git checkout HEAD -- packages/components/src/ui/
|
|
258
|
-
|
|
259
|
-
# Restore from backup (if created)
|
|
260
|
-
cp packages/components/.backup/button.tsx.* packages/components/src/ui/button.tsx
|
|
261
|
-
```
|
|
262
|
-
|
|
263
|
-
## Contributing
|
|
264
|
-
|
|
265
|
-
When you update a component:
|
|
266
|
-
|
|
267
|
-
1. Document the changes in CHANGELOG.md
|
|
268
|
-
2. Update the version in shadcn-components.json (add lastUpdated field)
|
|
269
|
-
3. Test with all examples
|
|
270
|
-
4. Create a PR with:
|
|
271
|
-
- Component name in title
|
|
272
|
-
- Reason for update
|
|
273
|
-
- Breaking changes (if any)
|
|
274
|
-
- Screenshots (if visual changes)
|
|
275
|
-
|
|
276
|
-
## Resources
|
|
277
|
-
|
|
278
|
-
- [Shadcn UI Docs](https://ui.shadcn.com)
|
|
279
|
-
- [Radix UI Docs](https://www.radix-ui.com)
|
|
280
|
-
- [Tailwind CSS Docs](https://tailwindcss.com)
|
|
281
|
-
- [CVA (Class Variance Authority)](https://cva.style)
|