@object-ui/components 3.1.5 → 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 +38 -0
- package/README.md +21 -1
- package/dist/index.css +6339 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +31896 -31523
- package/dist/index.umd.cjs +40 -40
- package/dist/{src → packages/components/src}/custom/empty.d.ts +12 -1
- package/dist/{src → packages/components/src}/custom/mobile-dialog-content.d.ts +1 -1
- package/dist/{src → packages/components/src}/renderers/action/action-bar.d.ts +12 -1
- package/dist/{src → packages/components/src}/ui/accordion.d.ts +1 -1
- package/dist/{src → packages/components/src}/ui/alert-dialog.d.ts +1 -1
- package/dist/packages/components/src/ui/aspect-ratio.d.ts +10 -0
- package/dist/{src → packages/components/src}/ui/avatar.d.ts +1 -1
- package/dist/{src → packages/components/src}/ui/button.d.ts +1 -1
- package/dist/packages/components/src/ui/chart.d.ts +56 -0
- package/dist/{src → packages/components/src}/ui/checkbox.d.ts +1 -1
- package/dist/{src → packages/components/src}/ui/collapsible.d.ts +8 -1
- package/dist/{src → packages/components/src}/ui/command.d.ts +2 -2
- package/dist/{src → packages/components/src}/ui/context-menu.d.ts +1 -1
- package/dist/{src → packages/components/src}/ui/dialog.d.ts +1 -1
- package/dist/{src → packages/components/src}/ui/drawer.d.ts +6 -10
- package/dist/{src → packages/components/src}/ui/dropdown-menu.d.ts +1 -1
- package/dist/{src → packages/components/src}/ui/form.d.ts +2 -2
- package/dist/{src → packages/components/src}/ui/hover-card.d.ts +1 -1
- package/dist/{src → packages/components/src}/ui/label.d.ts +1 -1
- package/dist/{src → packages/components/src}/ui/menubar.d.ts +1 -1
- package/dist/{src → packages/components/src}/ui/navigation-menu.d.ts +1 -1
- package/dist/{src → packages/components/src}/ui/popover.d.ts +1 -1
- package/dist/{src → packages/components/src}/ui/progress.d.ts +1 -1
- package/dist/{src → packages/components/src}/ui/radio-group.d.ts +1 -1
- package/dist/packages/components/src/ui/resizable.d.ts +7 -0
- package/dist/{src → packages/components/src}/ui/scroll-area.d.ts +1 -1
- package/dist/{src → packages/components/src}/ui/select.d.ts +1 -1
- package/dist/{src → packages/components/src}/ui/separator.d.ts +1 -1
- package/dist/{src → packages/components/src}/ui/sheet.d.ts +1 -2
- package/dist/{src → packages/components/src}/ui/sidebar.d.ts +1 -8
- package/dist/{src → packages/components/src}/ui/slider.d.ts +1 -1
- package/dist/{src → packages/components/src}/ui/switch.d.ts +1 -1
- package/dist/{src → packages/components/src}/ui/tabs.d.ts +1 -1
- package/dist/{src → packages/components/src}/ui/toast.d.ts +1 -1
- package/dist/{src → packages/components/src}/ui/toggle-group.d.ts +1 -1
- package/dist/{src → packages/components/src}/ui/toggle.d.ts +1 -1
- package/dist/{src → packages/components/src}/ui/tooltip.d.ts +1 -1
- package/package.json +68 -20
- package/.turbo/turbo-build.log +0 -64
- package/README_SHADCN_SYNC.md +0 -281
- package/TESTING.md +0 -335
- package/dist/src/ui/aspect-ratio.d.ts +0 -3
- package/dist/src/ui/chart.d.ts +0 -68
- package/dist/src/ui/resizable.d.ts +0 -14
- 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 -131
- 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 -533
- 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 -248
- 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 -66
- 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 -367
- 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 -147
- 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 -151
- package/src/ui/sidebar.tsx +0 -866
- package/src/ui/skeleton.tsx +0 -23
- package/src/ui/slider.tsx +0 -40
- 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 -70
- package/vitest.config.ts +0 -5
- /package/dist/{src → packages/components/src}/SchemaRenderer.d.ts +0 -0
- /package/dist/{src → packages/components/src}/custom/action-param-dialog.d.ts +0 -0
- /package/dist/{src → packages/components/src}/custom/button-group.d.ts +0 -0
- /package/dist/{src → packages/components/src}/custom/combobox.d.ts +0 -0
- /package/dist/{src → packages/components/src}/custom/config-field-renderer.d.ts +0 -0
- /package/dist/{src → packages/components/src}/custom/config-panel-renderer.d.ts +0 -0
- /package/dist/{src → packages/components/src}/custom/config-row.d.ts +0 -0
- /package/dist/{src → packages/components/src}/custom/date-picker.d.ts +0 -0
- /package/dist/{src → packages/components/src}/custom/field.d.ts +0 -0
- /package/dist/{src → packages/components/src}/custom/filter-builder.d.ts +0 -0
- /package/dist/{src → packages/components/src}/custom/index.d.ts +0 -0
- /package/dist/{src → packages/components/src}/custom/input-group.d.ts +0 -0
- /package/dist/{src → packages/components/src}/custom/item.d.ts +0 -0
- /package/dist/{src → packages/components/src}/custom/kbd.d.ts +0 -0
- /package/dist/{src → packages/components/src}/custom/native-select.d.ts +0 -0
- /package/dist/{src → packages/components/src}/custom/navigation-overlay.d.ts +0 -0
- /package/dist/{src → packages/components/src}/custom/section-header.d.ts +0 -0
- /package/dist/{src → packages/components/src}/custom/sort-builder.d.ts +0 -0
- /package/dist/{src → packages/components/src}/custom/spinner.d.ts +0 -0
- /package/dist/{src → packages/components/src}/custom/view-skeleton.d.ts +0 -0
- /package/dist/{src → packages/components/src}/custom/view-states.d.ts +0 -0
- /package/dist/{src → packages/components/src}/debug/DebugPanel.d.ts +0 -0
- /package/dist/{src → packages/components/src}/debug/index.d.ts +0 -0
- /package/dist/{src → packages/components/src}/hooks/use-config-draft.d.ts +0 -0
- /package/dist/{src → packages/components/src}/hooks/use-mobile.d.ts +0 -0
- /package/dist/{src → packages/components/src}/index.d.ts +0 -0
- /package/dist/{src → packages/components/src}/lib/use-sync-external-store-shim.d.ts +0 -0
- /package/dist/{src → packages/components/src}/lib/use-sync-external-store-with-selector-shim.d.ts +0 -0
- /package/dist/{src → packages/components/src}/lib/utils.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/action/action-button.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/action/action-group.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/action/action-icon.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/action/action-menu.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/action/index.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/action/resolve-icon.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/basic/button-group.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/basic/div.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/basic/html.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/basic/icon.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/basic/image.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/basic/index.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/basic/navigation-menu.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/basic/pagination.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/basic/separator.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/basic/span.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/basic/text.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/complex/carousel.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/complex/data-table.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/complex/filter-builder.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/complex/index.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/complex/resizable.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/complex/scroll-area.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/complex/table.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/data-display/alert.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/data-display/avatar.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/data-display/badge.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/data-display/breadcrumb.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/data-display/index.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/data-display/kbd.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/data-display/list.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/data-display/statistic.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/data-display/table.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/data-display/tree-view.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/disclosure/accordion.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/disclosure/collapsible.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/disclosure/index.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/disclosure/toggle-group.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/feedback/empty.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/feedback/index.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/feedback/loading.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/feedback/progress.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/feedback/skeleton.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/feedback/sonner.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/feedback/spinner.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/feedback/toast.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/feedback/toaster.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/form/button.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/form/calendar.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/form/checkbox.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/form/combobox.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/form/command.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/form/date-picker.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/form/file-upload.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/form/form.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/form/index.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/form/input-otp.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/form/input.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/form/label.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/form/radio-group.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/form/select.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/form/slider.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/form/switch.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/form/textarea.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/form/toggle.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/index.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/layout/aspect-ratio.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/layout/card.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/layout/container.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/layout/flex.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/layout/grid.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/layout/index.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/layout/page.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/layout/semantic.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/layout/stack.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/layout/tabs.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/navigation/header-bar.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/navigation/index.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/navigation/sidebar.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/overlay/alert-dialog.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/overlay/context-menu.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/overlay/dialog.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/overlay/drawer.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/overlay/dropdown-menu.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/overlay/hover-card.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/overlay/index.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/overlay/menubar.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/overlay/popover.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/overlay/sheet.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/overlay/tooltip.d.ts +0 -0
- /package/dist/{src → packages/components/src}/renderers/placeholders.d.ts +0 -0
- /package/dist/{src → packages/components/src}/types/config-panel.d.ts +0 -0
- /package/dist/{src → packages/components/src}/ui/alert.d.ts +0 -0
- /package/dist/{src → packages/components/src}/ui/badge.d.ts +0 -0
- /package/dist/{src → packages/components/src}/ui/breadcrumb.d.ts +0 -0
- /package/dist/{src → packages/components/src}/ui/calendar.d.ts +0 -0
- /package/dist/{src → packages/components/src}/ui/card.d.ts +0 -0
- /package/dist/{src → packages/components/src}/ui/carousel.d.ts +0 -0
- /package/dist/{src → packages/components/src}/ui/index.d.ts +0 -0
- /package/dist/{src → packages/components/src}/ui/input-otp.d.ts +0 -0
- /package/dist/{src → packages/components/src}/ui/input.d.ts +0 -0
- /package/dist/{src → packages/components/src}/ui/pagination.d.ts +0 -0
- /package/dist/{src → packages/components/src}/ui/skeleton.d.ts +0 -0
- /package/dist/{src → packages/components/src}/ui/sonner.d.ts +0 -0
- /package/dist/{src → packages/components/src}/ui/table.d.ts +0 -0
- /package/dist/{src → packages/components/src}/ui/textarea.d.ts +0 -0
- /package/dist/{src → packages/components/src}/ui/typography.d.ts +0 -0
package/src/ui/form.tsx
DELETED
|
@@ -1,186 +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
|
-
|
|
9
|
-
"use client"
|
|
10
|
-
|
|
11
|
-
import * as React from "react"
|
|
12
|
-
import { Label as LabelPrimitive } from "radix-ui"
|
|
13
|
-
import { Slot as SlotPrimitive } from "radix-ui"
|
|
14
|
-
import {
|
|
15
|
-
Controller,
|
|
16
|
-
FormProvider,
|
|
17
|
-
useFormContext,
|
|
18
|
-
type ControllerProps,
|
|
19
|
-
type FieldPath,
|
|
20
|
-
type FieldValues,
|
|
21
|
-
} from "react-hook-form"
|
|
22
|
-
|
|
23
|
-
import { cn } from "../lib/utils"
|
|
24
|
-
import { Label } from "./label"
|
|
25
|
-
|
|
26
|
-
const Form = FormProvider
|
|
27
|
-
|
|
28
|
-
type FormFieldContextValue<
|
|
29
|
-
TFieldValues extends FieldValues = FieldValues,
|
|
30
|
-
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>
|
|
31
|
-
> = {
|
|
32
|
-
name: TName
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const FormFieldContext = React.createContext<FormFieldContextValue | null>(null)
|
|
36
|
-
|
|
37
|
-
const FormField = <
|
|
38
|
-
TFieldValues extends FieldValues = FieldValues,
|
|
39
|
-
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>
|
|
40
|
-
>({
|
|
41
|
-
...props
|
|
42
|
-
}: ControllerProps<TFieldValues, TName>) => {
|
|
43
|
-
return (
|
|
44
|
-
<FormFieldContext.Provider value={{ name: props.name }}>
|
|
45
|
-
<Controller {...props} />
|
|
46
|
-
</FormFieldContext.Provider>
|
|
47
|
-
)
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
const useFormField = () => {
|
|
51
|
-
const fieldContext = React.useContext(FormFieldContext)
|
|
52
|
-
const itemContext = React.useContext(FormItemContext)
|
|
53
|
-
const { getFieldState, formState } = useFormContext()
|
|
54
|
-
|
|
55
|
-
if (!fieldContext) {
|
|
56
|
-
throw new Error("useFormField should be used within <FormField>")
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
if (!itemContext) {
|
|
60
|
-
throw new Error("useFormField should be used within <FormItem>")
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
const fieldState = getFieldState(fieldContext.name, formState)
|
|
64
|
-
|
|
65
|
-
const { id } = itemContext
|
|
66
|
-
|
|
67
|
-
return {
|
|
68
|
-
id,
|
|
69
|
-
name: fieldContext.name,
|
|
70
|
-
formItemId: `${id}-form-item`,
|
|
71
|
-
formDescriptionId: `${id}-form-item-description`,
|
|
72
|
-
formMessageId: `${id}-form-item-message`,
|
|
73
|
-
...fieldState,
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
type FormItemContextValue = {
|
|
78
|
-
id: string
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
const FormItemContext = React.createContext<FormItemContextValue | null>(null)
|
|
82
|
-
|
|
83
|
-
const FormItem = React.forwardRef<
|
|
84
|
-
HTMLDivElement,
|
|
85
|
-
React.HTMLAttributes<HTMLDivElement>
|
|
86
|
-
>(({ className, ...props }, ref) => {
|
|
87
|
-
const id = React.useId()
|
|
88
|
-
|
|
89
|
-
return (
|
|
90
|
-
<FormItemContext.Provider value={{ id }}>
|
|
91
|
-
<div ref={ref} className={cn("space-y-2", className)} {...props} />
|
|
92
|
-
</FormItemContext.Provider>
|
|
93
|
-
)
|
|
94
|
-
})
|
|
95
|
-
FormItem.displayName = "FormItem"
|
|
96
|
-
|
|
97
|
-
const FormLabel = React.forwardRef<
|
|
98
|
-
React.ElementRef<typeof LabelPrimitive.Root>,
|
|
99
|
-
React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>
|
|
100
|
-
>(({ className, ...props }, ref) => {
|
|
101
|
-
const { error, formItemId } = useFormField()
|
|
102
|
-
|
|
103
|
-
return (
|
|
104
|
-
<Label
|
|
105
|
-
ref={ref}
|
|
106
|
-
className={cn(error && "text-destructive", className)}
|
|
107
|
-
htmlFor={formItemId}
|
|
108
|
-
{...props}
|
|
109
|
-
/>
|
|
110
|
-
)
|
|
111
|
-
})
|
|
112
|
-
FormLabel.displayName = "FormLabel"
|
|
113
|
-
|
|
114
|
-
const FormControl = React.forwardRef<
|
|
115
|
-
React.ElementRef<typeof SlotPrimitive.Slot>,
|
|
116
|
-
React.ComponentPropsWithoutRef<typeof SlotPrimitive.Slot>
|
|
117
|
-
>(({ ...props }, ref) => {
|
|
118
|
-
const { error, formItemId, formDescriptionId, formMessageId } = useFormField()
|
|
119
|
-
|
|
120
|
-
return (
|
|
121
|
-
<SlotPrimitive.Slot
|
|
122
|
-
ref={ref}
|
|
123
|
-
id={formItemId}
|
|
124
|
-
aria-describedby={
|
|
125
|
-
!error
|
|
126
|
-
? `${formDescriptionId}`
|
|
127
|
-
: `${formDescriptionId} ${formMessageId}`
|
|
128
|
-
}
|
|
129
|
-
aria-invalid={!!error}
|
|
130
|
-
{...props}
|
|
131
|
-
/>
|
|
132
|
-
)
|
|
133
|
-
})
|
|
134
|
-
FormControl.displayName = "FormControl"
|
|
135
|
-
|
|
136
|
-
const FormDescription = React.forwardRef<
|
|
137
|
-
HTMLParagraphElement,
|
|
138
|
-
React.HTMLAttributes<HTMLParagraphElement>
|
|
139
|
-
>(({ className, ...props }, ref) => {
|
|
140
|
-
const { formDescriptionId } = useFormField()
|
|
141
|
-
|
|
142
|
-
return (
|
|
143
|
-
<p
|
|
144
|
-
ref={ref}
|
|
145
|
-
id={formDescriptionId}
|
|
146
|
-
className={cn("text-sm text-muted-foreground", className)}
|
|
147
|
-
{...props}
|
|
148
|
-
/>
|
|
149
|
-
)
|
|
150
|
-
})
|
|
151
|
-
FormDescription.displayName = "FormDescription"
|
|
152
|
-
|
|
153
|
-
const FormMessage = React.forwardRef<
|
|
154
|
-
HTMLParagraphElement,
|
|
155
|
-
React.HTMLAttributes<HTMLParagraphElement>
|
|
156
|
-
>(({ className, children, ...props }, ref) => {
|
|
157
|
-
const { error, formMessageId } = useFormField()
|
|
158
|
-
const body = error ? String(error?.message ?? "") : children
|
|
159
|
-
|
|
160
|
-
if (!body) {
|
|
161
|
-
return null
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
return (
|
|
165
|
-
<p
|
|
166
|
-
ref={ref}
|
|
167
|
-
id={formMessageId}
|
|
168
|
-
className={cn("text-sm font-medium text-destructive", className)}
|
|
169
|
-
{...props}
|
|
170
|
-
>
|
|
171
|
-
{body}
|
|
172
|
-
</p>
|
|
173
|
-
)
|
|
174
|
-
})
|
|
175
|
-
FormMessage.displayName = "FormMessage"
|
|
176
|
-
|
|
177
|
-
export {
|
|
178
|
-
useFormField,
|
|
179
|
-
Form,
|
|
180
|
-
FormItem,
|
|
181
|
-
FormLabel,
|
|
182
|
-
FormControl,
|
|
183
|
-
FormDescription,
|
|
184
|
-
FormMessage,
|
|
185
|
-
FormField,
|
|
186
|
-
}
|
package/src/ui/hover-card.tsx
DELETED
|
@@ -1,37 +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
|
-
|
|
9
|
-
"use client"
|
|
10
|
-
|
|
11
|
-
import * as React from "react"
|
|
12
|
-
import { HoverCard as HoverCardPrimitive } from "radix-ui"
|
|
13
|
-
|
|
14
|
-
import { cn } from "../lib/utils"
|
|
15
|
-
|
|
16
|
-
const HoverCard = HoverCardPrimitive.Root
|
|
17
|
-
|
|
18
|
-
const HoverCardTrigger = HoverCardPrimitive.Trigger
|
|
19
|
-
|
|
20
|
-
const HoverCardContent = React.forwardRef<
|
|
21
|
-
React.ElementRef<typeof HoverCardPrimitive.Content>,
|
|
22
|
-
React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Content>
|
|
23
|
-
>(({ className, align = "center", sideOffset = 4, ...props }, ref) => (
|
|
24
|
-
<HoverCardPrimitive.Content
|
|
25
|
-
ref={ref}
|
|
26
|
-
align={align}
|
|
27
|
-
sideOffset={sideOffset}
|
|
28
|
-
className={cn(
|
|
29
|
-
"z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=inline-end]:slide-in-from-left-2 origin-[--radix-hover-card-content-transform-origin]",
|
|
30
|
-
className
|
|
31
|
-
)}
|
|
32
|
-
{...props}
|
|
33
|
-
/>
|
|
34
|
-
))
|
|
35
|
-
HoverCardContent.displayName = HoverCardPrimitive.Content.displayName
|
|
36
|
-
|
|
37
|
-
export { HoverCard, HoverCardTrigger, HoverCardContent }
|
package/src/ui/index.ts
DELETED
|
@@ -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
|
-
|
|
9
|
-
export * from './accordion';
|
|
10
|
-
export * from './alert-dialog';
|
|
11
|
-
export * from './alert';
|
|
12
|
-
export * from './aspect-ratio';
|
|
13
|
-
export * from './avatar';
|
|
14
|
-
export * from './badge';
|
|
15
|
-
export * from './breadcrumb';
|
|
16
|
-
export * from './button';
|
|
17
|
-
export * from './calendar';
|
|
18
|
-
export * from './card';
|
|
19
|
-
export * from './carousel';
|
|
20
|
-
export * from './chart';
|
|
21
|
-
export * from './checkbox';
|
|
22
|
-
export * from './collapsible';
|
|
23
|
-
export * from './command';
|
|
24
|
-
export * from './context-menu';
|
|
25
|
-
export * from './dialog';
|
|
26
|
-
export * from './drawer';
|
|
27
|
-
export * from './dropdown-menu';
|
|
28
|
-
export * from './form';
|
|
29
|
-
export * from './hover-card';
|
|
30
|
-
export * from './input-otp';
|
|
31
|
-
export * from './input';
|
|
32
|
-
export * from './label';
|
|
33
|
-
export * from './menubar';
|
|
34
|
-
export * from './navigation-menu';
|
|
35
|
-
export * from './pagination';
|
|
36
|
-
export * from './popover';
|
|
37
|
-
export * from './progress';
|
|
38
|
-
export * from './radio-group';
|
|
39
|
-
export * from './resizable';
|
|
40
|
-
export * from './scroll-area';
|
|
41
|
-
export * from './select';
|
|
42
|
-
export * from './separator';
|
|
43
|
-
export * from './sheet';
|
|
44
|
-
export * from './sidebar';
|
|
45
|
-
export * from './skeleton';
|
|
46
|
-
export * from './slider';
|
|
47
|
-
export * from './sonner';
|
|
48
|
-
export { Toaster } from './sonner';
|
|
49
|
-
export * from './switch';
|
|
50
|
-
export * from './table';
|
|
51
|
-
export * from './tabs';
|
|
52
|
-
export * from './textarea';
|
|
53
|
-
export * from './toggle-group';
|
|
54
|
-
export * from './toggle';
|
|
55
|
-
export * from './tooltip';
|
|
56
|
-
export * from './typography';
|
package/src/ui/input-otp.tsx
DELETED
|
@@ -1,79 +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
|
-
|
|
9
|
-
"use client"
|
|
10
|
-
|
|
11
|
-
import * as React from "react"
|
|
12
|
-
import { OTPInput, OTPInputContext } from "input-otp"
|
|
13
|
-
import { Dot } from "lucide-react"
|
|
14
|
-
|
|
15
|
-
import { cn } from "../lib/utils"
|
|
16
|
-
|
|
17
|
-
const InputOTP = React.forwardRef<
|
|
18
|
-
React.ElementRef<typeof OTPInput>,
|
|
19
|
-
React.ComponentPropsWithoutRef<typeof OTPInput>
|
|
20
|
-
>(({ className, containerClassName, ...props }, ref) => (
|
|
21
|
-
<OTPInput
|
|
22
|
-
ref={ref}
|
|
23
|
-
containerClassName={cn(
|
|
24
|
-
"flex items-center gap-2 has-[:disabled]:opacity-50",
|
|
25
|
-
containerClassName
|
|
26
|
-
)}
|
|
27
|
-
className={cn("disabled:cursor-not-allowed", className)}
|
|
28
|
-
{...props}
|
|
29
|
-
/>
|
|
30
|
-
))
|
|
31
|
-
InputOTP.displayName = "InputOTP"
|
|
32
|
-
|
|
33
|
-
const InputOTPGroup = React.forwardRef<
|
|
34
|
-
React.ElementRef<"div">,
|
|
35
|
-
React.ComponentPropsWithoutRef<"div">
|
|
36
|
-
>(({ className, ...props }, ref) => (
|
|
37
|
-
<div ref={ref} className={cn("flex items-center", className)} {...props} />
|
|
38
|
-
))
|
|
39
|
-
InputOTPGroup.displayName = "InputOTPGroup"
|
|
40
|
-
|
|
41
|
-
const InputOTPSlot = React.forwardRef<
|
|
42
|
-
React.ElementRef<"div">,
|
|
43
|
-
React.ComponentPropsWithoutRef<"div"> & { index: number }
|
|
44
|
-
>(({ index, className, ...props }, ref) => {
|
|
45
|
-
const inputOTPContext = React.useContext(OTPInputContext)
|
|
46
|
-
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index]
|
|
47
|
-
|
|
48
|
-
return (
|
|
49
|
-
<div
|
|
50
|
-
ref={ref}
|
|
51
|
-
className={cn(
|
|
52
|
-
"relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",
|
|
53
|
-
isActive && "z-10 ring-2 ring-ring ring-offset-background",
|
|
54
|
-
className
|
|
55
|
-
)}
|
|
56
|
-
{...props}
|
|
57
|
-
>
|
|
58
|
-
{char}
|
|
59
|
-
{hasFakeCaret && (
|
|
60
|
-
<div className="pointer-events-none absolute inset-0 flex items-center justify-center">
|
|
61
|
-
<div className="h-4 w-px animate-caret-blink bg-foreground duration-1000" />
|
|
62
|
-
</div>
|
|
63
|
-
)}
|
|
64
|
-
</div>
|
|
65
|
-
)
|
|
66
|
-
})
|
|
67
|
-
InputOTPSlot.displayName = "InputOTPSlot"
|
|
68
|
-
|
|
69
|
-
const InputOTPSeparator = React.forwardRef<
|
|
70
|
-
React.ElementRef<"div">,
|
|
71
|
-
React.ComponentPropsWithoutRef<"div">
|
|
72
|
-
>(({ ...props }, ref) => (
|
|
73
|
-
<div ref={ref} role="separator" {...props}>
|
|
74
|
-
<Dot />
|
|
75
|
-
</div>
|
|
76
|
-
))
|
|
77
|
-
InputOTPSeparator.displayName = "InputOTPSeparator"
|
|
78
|
-
|
|
79
|
-
export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator }
|
package/src/ui/input.tsx
DELETED
|
@@ -1,30 +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
|
-
|
|
9
|
-
import * as React from "react"
|
|
10
|
-
|
|
11
|
-
import { cn } from "../lib/utils"
|
|
12
|
-
|
|
13
|
-
const Input = React.forwardRef<HTMLInputElement, React.ComponentProps<"input">>(
|
|
14
|
-
({ className, type, ...props }, ref) => {
|
|
15
|
-
return (
|
|
16
|
-
<input
|
|
17
|
-
type={type}
|
|
18
|
-
className={cn(
|
|
19
|
-
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
20
|
-
className
|
|
21
|
-
)}
|
|
22
|
-
ref={ref}
|
|
23
|
-
{...props}
|
|
24
|
-
/>
|
|
25
|
-
)
|
|
26
|
-
}
|
|
27
|
-
)
|
|
28
|
-
Input.displayName = "Input"
|
|
29
|
-
|
|
30
|
-
export { Input }
|
package/src/ui/label.tsx
DELETED
|
@@ -1,34 +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
|
-
|
|
9
|
-
"use client"
|
|
10
|
-
|
|
11
|
-
import * as React from "react"
|
|
12
|
-
import { Label as LabelPrimitive } from "radix-ui"
|
|
13
|
-
import { cva, type VariantProps } from "class-variance-authority"
|
|
14
|
-
|
|
15
|
-
import { cn } from "../lib/utils"
|
|
16
|
-
|
|
17
|
-
const labelVariants = cva(
|
|
18
|
-
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
19
|
-
)
|
|
20
|
-
|
|
21
|
-
const Label = React.forwardRef<
|
|
22
|
-
React.ElementRef<typeof LabelPrimitive.Root>,
|
|
23
|
-
React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &
|
|
24
|
-
VariantProps<typeof labelVariants>
|
|
25
|
-
>(({ className, ...props }, ref) => (
|
|
26
|
-
<LabelPrimitive.Root
|
|
27
|
-
ref={ref}
|
|
28
|
-
className={cn(labelVariants(), className)}
|
|
29
|
-
{...props}
|
|
30
|
-
/>
|
|
31
|
-
))
|
|
32
|
-
Label.displayName = LabelPrimitive.Root.displayName
|
|
33
|
-
|
|
34
|
-
export { Label }
|
package/src/ui/menubar.tsx
DELETED
|
@@ -1,264 +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
|
-
|
|
9
|
-
"use client"
|
|
10
|
-
|
|
11
|
-
import * as React from "react"
|
|
12
|
-
import { Menubar as MenubarPrimitive } from "radix-ui"
|
|
13
|
-
import { Check, ChevronRight, Circle } from "lucide-react"
|
|
14
|
-
|
|
15
|
-
import { cn } from "../lib/utils"
|
|
16
|
-
|
|
17
|
-
function MenubarMenu({
|
|
18
|
-
...props
|
|
19
|
-
}: React.ComponentProps<typeof MenubarPrimitive.Menu>) {
|
|
20
|
-
return <MenubarPrimitive.Menu {...props} />
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function MenubarGroup({
|
|
24
|
-
...props
|
|
25
|
-
}: React.ComponentProps<typeof MenubarPrimitive.Group>) {
|
|
26
|
-
return <MenubarPrimitive.Group {...props} />
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function MenubarPortal({
|
|
30
|
-
...props
|
|
31
|
-
}: React.ComponentProps<typeof MenubarPrimitive.Portal>) {
|
|
32
|
-
return <MenubarPrimitive.Portal {...props} />
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function MenubarRadioGroup({
|
|
36
|
-
...props
|
|
37
|
-
}: React.ComponentProps<typeof MenubarPrimitive.RadioGroup>) {
|
|
38
|
-
return <MenubarPrimitive.RadioGroup {...props} />
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function MenubarSub({
|
|
42
|
-
...props
|
|
43
|
-
}: React.ComponentProps<typeof MenubarPrimitive.Sub>) {
|
|
44
|
-
return <MenubarPrimitive.Sub data-slot="menubar-sub" {...props} />
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
const Menubar = React.forwardRef<
|
|
48
|
-
React.ElementRef<typeof MenubarPrimitive.Root>,
|
|
49
|
-
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>
|
|
50
|
-
>(({ className, ...props }, ref) => (
|
|
51
|
-
<MenubarPrimitive.Root
|
|
52
|
-
ref={ref}
|
|
53
|
-
className={cn(
|
|
54
|
-
"flex h-10 items-center space-x-1 rounded-md border bg-background p-1",
|
|
55
|
-
className
|
|
56
|
-
)}
|
|
57
|
-
{...props}
|
|
58
|
-
/>
|
|
59
|
-
))
|
|
60
|
-
Menubar.displayName = MenubarPrimitive.Root.displayName
|
|
61
|
-
|
|
62
|
-
const MenubarTrigger = React.forwardRef<
|
|
63
|
-
React.ElementRef<typeof MenubarPrimitive.Trigger>,
|
|
64
|
-
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>
|
|
65
|
-
>(({ className, ...props }, ref) => (
|
|
66
|
-
<MenubarPrimitive.Trigger
|
|
67
|
-
ref={ref}
|
|
68
|
-
className={cn(
|
|
69
|
-
"flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
70
|
-
className
|
|
71
|
-
)}
|
|
72
|
-
{...props}
|
|
73
|
-
/>
|
|
74
|
-
))
|
|
75
|
-
MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName
|
|
76
|
-
|
|
77
|
-
const MenubarSubTrigger = React.forwardRef<
|
|
78
|
-
React.ElementRef<typeof MenubarPrimitive.SubTrigger>,
|
|
79
|
-
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> & {
|
|
80
|
-
inset?: boolean
|
|
81
|
-
}
|
|
82
|
-
>(({ className, inset, children, ...props }, ref) => (
|
|
83
|
-
<MenubarPrimitive.SubTrigger
|
|
84
|
-
ref={ref}
|
|
85
|
-
className={cn(
|
|
86
|
-
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
87
|
-
inset && "pl-8",
|
|
88
|
-
className
|
|
89
|
-
)}
|
|
90
|
-
{...props}
|
|
91
|
-
>
|
|
92
|
-
{children}
|
|
93
|
-
<ChevronRight className="ml-auto h-4 w-4" />
|
|
94
|
-
</MenubarPrimitive.SubTrigger>
|
|
95
|
-
))
|
|
96
|
-
MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName
|
|
97
|
-
|
|
98
|
-
const MenubarSubContent = React.forwardRef<
|
|
99
|
-
React.ElementRef<typeof MenubarPrimitive.SubContent>,
|
|
100
|
-
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubContent>
|
|
101
|
-
>(({ className, ...props }, ref) => (
|
|
102
|
-
<MenubarPrimitive.SubContent
|
|
103
|
-
ref={ref}
|
|
104
|
-
className={cn(
|
|
105
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=inline-end]:slide-in-from-left-2 origin-[--radix-menubar-content-transform-origin]",
|
|
106
|
-
className
|
|
107
|
-
)}
|
|
108
|
-
{...props}
|
|
109
|
-
/>
|
|
110
|
-
))
|
|
111
|
-
MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName
|
|
112
|
-
|
|
113
|
-
const MenubarContent = React.forwardRef<
|
|
114
|
-
React.ElementRef<typeof MenubarPrimitive.Content>,
|
|
115
|
-
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>
|
|
116
|
-
>(
|
|
117
|
-
(
|
|
118
|
-
{ className, align = "start", alignOffset = -4, sideOffset = 8, ...props },
|
|
119
|
-
ref
|
|
120
|
-
) => (
|
|
121
|
-
<MenubarPrimitive.Portal>
|
|
122
|
-
<MenubarPrimitive.Content
|
|
123
|
-
ref={ref}
|
|
124
|
-
align={align}
|
|
125
|
-
alignOffset={alignOffset}
|
|
126
|
-
sideOffset={sideOffset}
|
|
127
|
-
className={cn(
|
|
128
|
-
"z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=inline-end]:slide-in-from-left-2 origin-[--radix-menubar-content-transform-origin]",
|
|
129
|
-
className
|
|
130
|
-
)}
|
|
131
|
-
{...props}
|
|
132
|
-
/>
|
|
133
|
-
</MenubarPrimitive.Portal>
|
|
134
|
-
)
|
|
135
|
-
)
|
|
136
|
-
MenubarContent.displayName = MenubarPrimitive.Content.displayName
|
|
137
|
-
|
|
138
|
-
const MenubarItem = React.forwardRef<
|
|
139
|
-
React.ElementRef<typeof MenubarPrimitive.Item>,
|
|
140
|
-
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> & {
|
|
141
|
-
inset?: boolean
|
|
142
|
-
}
|
|
143
|
-
>(({ className, inset, ...props }, ref) => (
|
|
144
|
-
<MenubarPrimitive.Item
|
|
145
|
-
ref={ref}
|
|
146
|
-
className={cn(
|
|
147
|
-
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
148
|
-
inset && "pl-8",
|
|
149
|
-
className
|
|
150
|
-
)}
|
|
151
|
-
{...props}
|
|
152
|
-
/>
|
|
153
|
-
))
|
|
154
|
-
MenubarItem.displayName = MenubarPrimitive.Item.displayName
|
|
155
|
-
|
|
156
|
-
const MenubarCheckboxItem = React.forwardRef<
|
|
157
|
-
React.ElementRef<typeof MenubarPrimitive.CheckboxItem>,
|
|
158
|
-
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.CheckboxItem>
|
|
159
|
-
>(({ className, children, checked, ...props }, ref) => (
|
|
160
|
-
<MenubarPrimitive.CheckboxItem
|
|
161
|
-
ref={ref}
|
|
162
|
-
className={cn(
|
|
163
|
-
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
164
|
-
className
|
|
165
|
-
)}
|
|
166
|
-
checked={checked}
|
|
167
|
-
{...props}
|
|
168
|
-
>
|
|
169
|
-
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
170
|
-
<MenubarPrimitive.ItemIndicator>
|
|
171
|
-
<Check className="h-4 w-4" />
|
|
172
|
-
</MenubarPrimitive.ItemIndicator>
|
|
173
|
-
</span>
|
|
174
|
-
{children}
|
|
175
|
-
</MenubarPrimitive.CheckboxItem>
|
|
176
|
-
))
|
|
177
|
-
MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName
|
|
178
|
-
|
|
179
|
-
const MenubarRadioItem = React.forwardRef<
|
|
180
|
-
React.ElementRef<typeof MenubarPrimitive.RadioItem>,
|
|
181
|
-
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioItem>
|
|
182
|
-
>(({ className, children, ...props }, ref) => (
|
|
183
|
-
<MenubarPrimitive.RadioItem
|
|
184
|
-
ref={ref}
|
|
185
|
-
className={cn(
|
|
186
|
-
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
187
|
-
className
|
|
188
|
-
)}
|
|
189
|
-
{...props}
|
|
190
|
-
>
|
|
191
|
-
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
192
|
-
<MenubarPrimitive.ItemIndicator>
|
|
193
|
-
<Circle className="h-2 w-2 fill-current" />
|
|
194
|
-
</MenubarPrimitive.ItemIndicator>
|
|
195
|
-
</span>
|
|
196
|
-
{children}
|
|
197
|
-
</MenubarPrimitive.RadioItem>
|
|
198
|
-
))
|
|
199
|
-
MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName
|
|
200
|
-
|
|
201
|
-
const MenubarLabel = React.forwardRef<
|
|
202
|
-
React.ElementRef<typeof MenubarPrimitive.Label>,
|
|
203
|
-
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> & {
|
|
204
|
-
inset?: boolean
|
|
205
|
-
}
|
|
206
|
-
>(({ className, inset, ...props }, ref) => (
|
|
207
|
-
<MenubarPrimitive.Label
|
|
208
|
-
ref={ref}
|
|
209
|
-
className={cn(
|
|
210
|
-
"px-2 py-1.5 text-sm font-semibold",
|
|
211
|
-
inset && "pl-8",
|
|
212
|
-
className
|
|
213
|
-
)}
|
|
214
|
-
{...props}
|
|
215
|
-
/>
|
|
216
|
-
))
|
|
217
|
-
MenubarLabel.displayName = MenubarPrimitive.Label.displayName
|
|
218
|
-
|
|
219
|
-
const MenubarSeparator = React.forwardRef<
|
|
220
|
-
React.ElementRef<typeof MenubarPrimitive.Separator>,
|
|
221
|
-
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>
|
|
222
|
-
>(({ className, ...props }, ref) => (
|
|
223
|
-
<MenubarPrimitive.Separator
|
|
224
|
-
ref={ref}
|
|
225
|
-
className={cn("-mx-1 my-1 h-px bg-muted", className)}
|
|
226
|
-
{...props}
|
|
227
|
-
/>
|
|
228
|
-
))
|
|
229
|
-
MenubarSeparator.displayName = MenubarPrimitive.Separator.displayName
|
|
230
|
-
|
|
231
|
-
const MenubarShortcut = ({
|
|
232
|
-
className,
|
|
233
|
-
...props
|
|
234
|
-
}: React.HTMLAttributes<HTMLSpanElement>) => {
|
|
235
|
-
return (
|
|
236
|
-
<span
|
|
237
|
-
className={cn(
|
|
238
|
-
"ml-auto text-xs tracking-widest text-muted-foreground",
|
|
239
|
-
className
|
|
240
|
-
)}
|
|
241
|
-
{...props}
|
|
242
|
-
/>
|
|
243
|
-
)
|
|
244
|
-
}
|
|
245
|
-
MenubarShortcut.displayname = "MenubarShortcut"
|
|
246
|
-
|
|
247
|
-
export {
|
|
248
|
-
Menubar,
|
|
249
|
-
MenubarMenu,
|
|
250
|
-
MenubarTrigger,
|
|
251
|
-
MenubarContent,
|
|
252
|
-
MenubarItem,
|
|
253
|
-
MenubarSeparator,
|
|
254
|
-
MenubarLabel,
|
|
255
|
-
MenubarCheckboxItem,
|
|
256
|
-
MenubarRadioGroup,
|
|
257
|
-
MenubarRadioItem,
|
|
258
|
-
MenubarPortal,
|
|
259
|
-
MenubarSubContent,
|
|
260
|
-
MenubarSubTrigger,
|
|
261
|
-
MenubarGroup,
|
|
262
|
-
MenubarSub,
|
|
263
|
-
MenubarShortcut,
|
|
264
|
-
}
|