@object-ui/components 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +47 -0
- package/CHANGELOG.md +10 -0
- package/README.md +32 -1
- package/README_SHADCN_SYNC.md +281 -0
- package/TESTING.md +335 -0
- package/dist/index.css +1 -1
- package/dist/index.js +45067 -34357
- package/dist/index.umd.cjs +54 -42
- package/dist/src/SchemaRenderer.d.ts +3 -0
- package/dist/src/{ui → custom}/button-group.d.ts +1 -1
- package/dist/src/custom/combobox.d.ts +22 -0
- package/dist/src/custom/date-picker.d.ts +15 -0
- package/dist/src/custom/field.d.ts +19 -0
- package/dist/src/{ui → custom}/filter-builder.d.ts +7 -0
- package/dist/src/custom/index.d.ts +12 -0
- package/dist/src/custom/input-group.d.ts +14 -0
- package/dist/src/{ui → custom}/item.d.ts +8 -1
- package/dist/src/{ui → custom}/kbd.d.ts +7 -0
- package/dist/src/custom/native-select.d.ts +12 -0
- package/dist/src/custom/sort-builder.d.ts +22 -0
- package/dist/src/custom/spinner.d.ts +10 -0
- package/dist/src/hooks/use-mobile.d.ts +7 -0
- package/dist/src/index.d.ts +5 -1
- package/dist/src/renderers/basic/button-group.d.ts +8 -0
- package/dist/src/renderers/basic/div.d.ts +7 -0
- package/dist/src/renderers/basic/html.d.ts +7 -0
- package/dist/src/renderers/basic/icon.d.ts +7 -0
- package/dist/src/renderers/basic/image.d.ts +7 -0
- package/dist/src/renderers/basic/navigation-menu.d.ts +8 -0
- package/dist/src/renderers/basic/pagination.d.ts +8 -0
- package/dist/src/renderers/basic/separator.d.ts +7 -0
- package/dist/src/renderers/basic/span.d.ts +7 -0
- package/dist/src/renderers/basic/text.d.ts +7 -0
- package/dist/src/renderers/complex/carousel.d.ts +7 -0
- package/dist/src/renderers/complex/data-table.d.ts +7 -0
- package/dist/src/renderers/complex/filter-builder.d.ts +7 -0
- package/dist/src/renderers/complex/resizable.d.ts +7 -0
- package/dist/src/renderers/complex/scroll-area.d.ts +7 -0
- package/dist/src/renderers/complex/table.d.ts +7 -0
- package/dist/src/renderers/data-display/alert.d.ts +7 -0
- package/dist/src/renderers/data-display/avatar.d.ts +7 -0
- package/dist/src/renderers/data-display/badge.d.ts +7 -0
- package/dist/src/renderers/data-display/breadcrumb.d.ts +8 -0
- package/dist/src/renderers/data-display/kbd.d.ts +8 -0
- package/dist/src/renderers/data-display/list.d.ts +7 -0
- package/dist/src/renderers/data-display/statistic.d.ts +7 -0
- package/dist/src/renderers/data-display/table.d.ts +8 -0
- package/dist/src/renderers/data-display/tree-view.d.ts +7 -0
- package/dist/src/renderers/disclosure/accordion.d.ts +7 -0
- package/dist/src/renderers/disclosure/collapsible.d.ts +7 -0
- package/dist/src/renderers/disclosure/toggle-group.d.ts +8 -0
- package/dist/src/renderers/feedback/empty.d.ts +8 -0
- package/dist/src/renderers/feedback/loading.d.ts +7 -0
- package/dist/src/renderers/feedback/progress.d.ts +7 -0
- package/dist/src/renderers/feedback/skeleton.d.ts +7 -0
- package/dist/src/renderers/feedback/sonner.d.ts +8 -0
- package/dist/src/renderers/feedback/spinner.d.ts +8 -0
- package/dist/src/renderers/feedback/toast.d.ts +8 -0
- package/dist/src/renderers/feedback/toaster.d.ts +7 -0
- package/dist/src/renderers/form/button.d.ts +7 -0
- package/dist/src/renderers/form/calendar.d.ts +7 -0
- package/dist/src/renderers/form/checkbox.d.ts +7 -0
- package/dist/src/renderers/form/combobox.d.ts +8 -0
- package/dist/src/renderers/form/command.d.ts +8 -0
- package/dist/src/renderers/form/date-picker.d.ts +7 -0
- package/dist/src/renderers/form/file-upload.d.ts +7 -0
- package/dist/src/renderers/form/form.d.ts +7 -0
- package/dist/src/renderers/form/input-otp.d.ts +7 -0
- package/dist/src/renderers/form/input.d.ts +7 -0
- package/dist/src/renderers/form/label.d.ts +7 -0
- package/dist/src/renderers/form/radio-group.d.ts +7 -0
- package/dist/src/renderers/form/select.d.ts +7 -0
- package/dist/src/renderers/form/slider.d.ts +7 -0
- package/dist/src/renderers/form/switch.d.ts +7 -0
- package/dist/src/renderers/form/textarea.d.ts +7 -0
- package/dist/src/renderers/form/toggle.d.ts +7 -0
- package/dist/src/renderers/layout/aspect-ratio.d.ts +8 -0
- package/dist/src/renderers/layout/card.d.ts +7 -0
- package/dist/src/renderers/layout/container.d.ts +7 -0
- package/dist/src/renderers/layout/flex.d.ts +7 -0
- package/dist/src/renderers/layout/grid.d.ts +7 -0
- package/dist/src/renderers/layout/page.d.ts +1 -1
- package/dist/src/renderers/layout/semantic.d.ts +7 -0
- package/dist/src/renderers/layout/stack.d.ts +7 -0
- package/dist/src/renderers/layout/tabs.d.ts +7 -0
- package/dist/src/renderers/navigation/header-bar.d.ts +7 -0
- package/dist/src/renderers/navigation/sidebar.d.ts +7 -0
- package/dist/src/renderers/overlay/alert-dialog.d.ts +7 -0
- package/dist/src/renderers/overlay/context-menu.d.ts +7 -0
- package/dist/src/renderers/overlay/dialog.d.ts +7 -0
- package/dist/src/renderers/overlay/drawer.d.ts +7 -0
- package/dist/src/renderers/overlay/dropdown-menu.d.ts +7 -0
- package/dist/src/renderers/overlay/hover-card.d.ts +7 -0
- package/dist/src/renderers/overlay/menubar.d.ts +8 -0
- package/dist/src/renderers/overlay/popover.d.ts +7 -0
- package/dist/src/renderers/overlay/sheet.d.ts +7 -0
- package/dist/src/renderers/overlay/tooltip.d.ts +7 -0
- package/dist/src/renderers/placeholders.d.ts +9 -0
- package/dist/src/ui/accordion.d.ts +11 -4
- package/dist/src/ui/alert-dialog.d.ts +24 -11
- package/dist/src/ui/alert.d.ts +11 -5
- package/dist/src/ui/aspect-ratio.d.ts +8 -1
- package/dist/src/ui/avatar.d.ts +10 -3
- package/dist/src/ui/badge.d.ts +10 -3
- package/dist/src/ui/breadcrumb.d.ts +23 -8
- package/dist/src/ui/button.d.ts +10 -5
- package/dist/src/ui/calendar.d.ts +8 -1
- package/dist/src/ui/card.d.ts +14 -8
- package/dist/src/ui/carousel.d.ts +12 -6
- package/dist/src/ui/chart.d.ts +62 -0
- package/dist/src/ui/checkbox.d.ts +8 -1
- package/dist/src/ui/collapsible.d.ts +10 -3
- package/dist/src/ui/command.d.ts +85 -16
- package/dist/src/ui/context-menu.d.ts +21 -12
- package/dist/src/ui/dialog.d.ts +24 -13
- package/dist/src/ui/drawer.d.ts +26 -10
- package/dist/src/ui/dropdown-menu.d.ts +27 -18
- package/dist/src/ui/form.d.ts +13 -7
- package/dist/src/ui/hover-card.d.ts +10 -3
- package/dist/src/ui/index.d.ts +10 -11
- package/dist/src/ui/input-otp.d.ts +37 -7
- package/dist/src/ui/input.d.ts +7 -0
- package/dist/src/ui/label.d.ts +9 -1
- package/dist/src/ui/menubar.d.ts +26 -17
- package/dist/src/ui/navigation-menu.d.ts +16 -11
- package/dist/src/ui/pagination.d.ts +32 -10
- package/dist/src/ui/popover.d.ts +11 -5
- package/dist/src/ui/progress.d.ts +8 -1
- package/dist/src/ui/radio-group.d.ts +9 -2
- package/dist/src/ui/resizable.d.ts +12 -8
- package/dist/src/ui/scroll-area.d.ts +9 -2
- package/dist/src/ui/select.d.ts +18 -13
- package/dist/src/ui/separator.d.ts +7 -0
- package/dist/src/ui/sheet.d.ts +30 -11
- package/dist/src/ui/sidebar.d.ts +41 -38
- package/dist/src/ui/skeleton.d.ts +8 -1
- package/dist/src/ui/slider.d.ts +8 -1
- package/dist/src/ui/sonner.d.ts +2 -1
- package/dist/src/ui/switch.d.ts +9 -2
- package/dist/src/ui/table.d.ts +15 -8
- package/dist/src/ui/tabs.d.ts +8 -1
- package/dist/src/ui/textarea.d.ts +8 -1
- package/dist/src/ui/toast.d.ts +22 -0
- package/dist/src/ui/toggle-group.d.ts +15 -5
- package/dist/src/ui/toggle.d.ts +11 -1
- package/dist/src/ui/tooltip.d.ts +11 -4
- package/dist/src/ui/typography.d.ts +21 -0
- package/metadata/ObjectGrid.component.yml +72 -0
- package/package.json +35 -13
- package/postcss.config.js +9 -1
- package/shadcn-components.json +315 -0
- package/src/SchemaRenderer.tsx +28 -0
- package/src/__tests__/PageRendererRegions.test.tsx +59 -0
- package/src/__tests__/README.md +124 -0
- package/src/__tests__/Registry.test.ts +21 -0
- package/src/__tests__/basic-renderers.test.tsx +255 -0
- package/src/__tests__/complex-disclosure-renderers.test.tsx +302 -0
- package/src/__tests__/feedback-overlay-renderers.test.tsx +349 -0
- package/src/__tests__/form-renderers.test.tsx +364 -0
- package/src/__tests__/layout-data-renderers.test.tsx +340 -0
- package/src/__tests__/test-utils.tsx +190 -0
- package/src/{ui → custom}/button-group.tsx +9 -1
- package/src/custom/combobox.tsx +104 -0
- package/src/custom/date-picker.tsx +61 -0
- package/src/{ui → custom}/empty.tsx +8 -0
- package/src/custom/field.tsx +81 -0
- package/src/{ui → custom}/filter-builder.tsx +11 -3
- package/src/custom/index.ts +12 -0
- package/src/custom/input-group.tsx +53 -0
- package/src/{ui → custom}/item.tsx +9 -1
- package/src/{ui → custom}/kbd.tsx +8 -0
- package/src/custom/native-select.tsx +33 -0
- package/src/custom/sort-builder.tsx +129 -0
- package/src/custom/spinner.tsx +26 -0
- package/src/hooks/use-mobile.tsx +8 -0
- package/src/index.css +105 -54
- package/src/index.test.ts +8 -0
- package/src/index.ts +22 -1
- package/src/lib/utils.tsx +8 -0
- package/src/new-components.test.ts +8 -9
- package/src/renderers/basic/button-group.tsx +79 -0
- package/src/renderers/basic/div.tsx +21 -2
- package/src/renderers/basic/html.tsx +9 -0
- package/src/renderers/basic/icon.tsx +67 -3
- package/src/renderers/basic/image.tsx +13 -1
- package/src/renderers/basic/index.ts +11 -0
- package/src/renderers/basic/navigation-menu.tsx +81 -0
- package/src/renderers/basic/pagination.tsx +109 -0
- package/src/renderers/basic/separator.tsx +10 -1
- package/src/renderers/basic/span.tsx +21 -2
- package/src/renderers/basic/text.tsx +12 -2
- package/src/renderers/complex/__tests__/data-table.test.ts +8 -0
- package/src/renderers/complex/carousel.tsx +12 -3
- package/src/renderers/complex/data-table.tsx +150 -96
- package/src/renderers/complex/filter-builder.tsx +10 -1
- package/src/renderers/complex/index.ts +9 -3
- package/src/renderers/complex/resizable.tsx +10 -1
- package/src/renderers/complex/scroll-area.tsx +33 -7
- package/src/renderers/complex/table.tsx +11 -2
- package/src/renderers/data-display/alert.tsx +9 -0
- package/src/renderers/data-display/avatar.tsx +9 -0
- package/src/renderers/data-display/badge.tsx +9 -0
- package/src/renderers/data-display/breadcrumb.tsx +60 -0
- package/src/renderers/data-display/index.ts +12 -0
- package/src/renderers/data-display/kbd.tsx +50 -0
- package/src/renderers/data-display/list.tsx +29 -49
- package/src/renderers/data-display/statistic.tsx +45 -48
- package/src/renderers/data-display/table.tsx +78 -0
- package/src/renderers/data-display/tree-view.tsx +32 -37
- package/src/renderers/disclosure/accordion.tsx +9 -0
- package/src/renderers/disclosure/collapsible.tsx +9 -0
- package/src/renderers/disclosure/index.ts +9 -0
- package/src/renderers/disclosure/toggle-group.tsx +79 -0
- package/src/renderers/feedback/empty.tsx +49 -0
- package/src/renderers/feedback/index.ts +12 -0
- package/src/renderers/feedback/loading.tsx +10 -1
- package/src/renderers/feedback/progress.tsx +9 -0
- package/src/renderers/feedback/skeleton.tsx +9 -0
- package/src/renderers/feedback/sonner.tsx +56 -0
- package/src/renderers/feedback/spinner.tsx +55 -0
- package/src/renderers/feedback/toast.tsx +59 -0
- package/src/renderers/feedback/toaster.tsx +14 -17
- package/src/renderers/form/button.tsx +43 -1
- package/src/renderers/form/calendar.tsx +9 -0
- package/src/renderers/form/checkbox.tsx +46 -16
- package/src/renderers/form/combobox.tsx +48 -0
- package/src/renderers/form/command.tsx +58 -0
- package/src/renderers/form/date-picker.tsx +11 -2
- package/src/renderers/form/file-upload.tsx +11 -2
- package/src/renderers/form/form.tsx +104 -18
- package/src/renderers/form/index.ts +10 -0
- package/src/renderers/form/input-otp.tsx +35 -15
- package/src/renderers/form/input.tsx +92 -50
- package/src/renderers/form/label.tsx +9 -0
- package/src/renderers/form/radio-group.tsx +9 -0
- package/src/renderers/form/select.tsx +43 -15
- package/src/renderers/form/slider.tsx +17 -1
- package/src/renderers/form/switch.tsx +9 -0
- package/src/renderers/form/textarea.tsx +58 -27
- package/src/renderers/form/toggle.tsx +11 -45
- package/src/renderers/index.ts +8 -0
- package/src/renderers/layout/aspect-ratio.tsx +51 -0
- package/src/renderers/layout/card.tsx +18 -2
- package/src/renderers/layout/container.tsx +21 -12
- package/src/renderers/layout/flex.tsx +17 -8
- package/src/renderers/layout/grid.tsx +31 -8
- package/src/renderers/layout/index.ts +9 -0
- package/src/renderers/layout/page.tsx +44 -24
- package/src/renderers/layout/semantic.tsx +9 -0
- package/src/renderers/layout/stack.tsx +18 -9
- package/src/renderers/layout/tabs.tsx +51 -17
- package/src/renderers/navigation/header-bar.tsx +10 -1
- package/src/renderers/navigation/index.ts +8 -0
- package/src/renderers/navigation/sidebar.tsx +13 -0
- package/src/renderers/overlay/alert-dialog.tsx +9 -0
- package/src/renderers/overlay/context-menu.tsx +10 -1
- package/src/renderers/overlay/dialog.tsx +9 -0
- package/src/renderers/overlay/drawer.tsx +9 -0
- package/src/renderers/overlay/dropdown-menu.tsx +9 -0
- package/src/renderers/overlay/hover-card.tsx +9 -0
- package/src/renderers/overlay/index.ts +9 -0
- package/src/renderers/overlay/menubar.tsx +76 -0
- package/src/renderers/overlay/popover.tsx +9 -0
- package/src/renderers/overlay/sheet.tsx +9 -0
- package/src/renderers/overlay/tooltip.tsx +9 -0
- package/src/renderers/placeholders.tsx +107 -0
- package/src/stories/CRMApp.stories.tsx +706 -0
- package/src/stories/Guide.mdx +55 -0
- package/src/stories/Introduction.mdx +34 -0
- package/src/stories/MockedData.stories.tsx +71 -0
- package/src/stories/assets/accessibility.png +0 -0
- package/src/stories/assets/accessibility.svg +1 -0
- 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 +1 -0
- package/src/stories/assets/docs.png +0 -0
- package/src/stories/assets/figma-plugin.png +0 -0
- package/src/stories/assets/github.svg +1 -0
- 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 +1 -0
- package/src/stories/assets/youtube.svg +1 -0
- package/src/stories/button.css +30 -0
- package/src/stories/header.css +32 -0
- package/src/stories/page.css +68 -0
- package/src/stories-json/accordion.stories.tsx +43 -0
- package/src/stories-json/aggrid.stories.tsx +103 -0
- package/src/stories-json/alert.stories.tsx +39 -0
- package/src/stories-json/aspect-ratio.stories.tsx +34 -0
- package/src/stories-json/avatar.stories.tsx +38 -0
- package/src/stories-json/badge.stories.tsx +53 -0
- package/src/stories-json/breadcrumb.stories.tsx +30 -0
- package/src/stories-json/button-group.stories.tsx +43 -0
- package/src/stories-json/button.stories.tsx +73 -0
- package/src/stories-json/calendar.stories.tsx +85 -0
- package/src/stories-json/card.stories.tsx +48 -0
- package/src/stories-json/carousel.stories.tsx +33 -0
- package/src/stories-json/charts.stories.tsx +195 -0
- package/src/stories-json/chatbot.stories.tsx +248 -0
- package/src/stories-json/code-editor.stories.tsx +92 -0
- package/src/stories-json/collapsible.stories.tsx +40 -0
- package/src/stories-json/controls.stories.tsx +36 -0
- package/src/stories-json/dashboard.stories.tsx +318 -0
- package/src/stories-json/data-table.stories.tsx +60 -0
- package/src/stories-json/data_display_extras.stories.tsx +102 -0
- package/src/stories-json/date-picker.stories.tsx +28 -0
- package/src/stories-json/detail-view.stories.tsx +258 -0
- package/src/stories-json/dialog.stories.tsx +43 -0
- package/src/stories-json/feedback_extras.stories.tsx +40 -0
- package/src/stories-json/feedback_others.stories.tsx +46 -0
- package/src/stories-json/form_advanced.stories.tsx +117 -0
- package/src/stories-json/form_extras.stories.tsx +123 -0
- package/src/stories-json/grid.stories.tsx +56 -0
- package/src/stories-json/icon.stories.tsx +36 -0
- package/src/stories-json/input.stories.tsx +52 -0
- package/src/stories-json/kanban.stories.tsx +295 -0
- package/src/stories-json/layout_extended.stories.tsx +76 -0
- package/src/stories-json/layout_flex.stories.tsx +107 -0
- package/src/stories-json/list-view.stories.tsx +97 -0
- package/src/stories-json/markdown.stories.tsx +129 -0
- package/src/stories-json/menus.stories.tsx +63 -0
- package/src/stories-json/metric-card.stories.tsx +143 -0
- package/src/stories-json/navigation-menu.stories.tsx +37 -0
- package/src/stories-json/object-aggrid.stories.tsx +252 -0
- package/src/stories-json/object-form.stories.tsx +130 -0
- package/src/stories-json/object-gantt.stories.tsx +114 -0
- package/src/stories-json/object-grid.stories.tsx +157 -0
- package/src/stories-json/object-map.stories.tsx +116 -0
- package/src/stories-json/object-view.stories.tsx +118 -0
- package/src/stories-json/overlay_extras.stories.tsx +113 -0
- package/src/stories-json/overlay_others.stories.tsx +76 -0
- package/src/stories-json/page.stories.tsx +55 -0
- package/src/stories-json/reports.stories.tsx +163 -0
- package/src/stories-json/resizable.stories.tsx +44 -0
- package/src/stories-json/select.stories.tsx +34 -0
- package/src/stories-json/separator.stories.tsx +41 -0
- package/src/stories-json/sidebar.stories.tsx +147 -0
- package/src/stories-json/statistic.stories.tsx +44 -0
- package/src/stories-json/tabs.stories.tsx +51 -0
- package/src/stories-json/timeline.stories.tsx +188 -0
- package/src/stories-json/typography.stories.tsx +45 -0
- package/src/ui/accordion.tsx +55 -53
- package/src/ui/alert-dialog.tsx +111 -117
- package/src/ui/alert.tsx +46 -57
- package/src/ui/aspect-ratio.tsx +9 -5
- package/src/ui/avatar.tsx +49 -42
- package/src/ui/badge.tsx +18 -20
- package/src/ui/breadcrumb.tsx +89 -75
- package/src/ui/button.tsx +38 -37
- package/src/ui/calendar.tsx +37 -53
- package/src/ui/card.tsx +59 -110
- package/src/ui/carousel.tsx +144 -113
- package/src/ui/chart.tsx +367 -0
- package/src/ui/checkbox.tsx +28 -22
- package/src/ui/collapsible.tsx +13 -25
- package/src/ui/command.tsx +114 -135
- package/src/ui/context-menu.tsx +77 -116
- package/src/ui/dialog.tsx +102 -113
- package/src/ui/drawer.tsx +90 -99
- package/src/ui/dropdown-menu.tsx +142 -188
- package/src/ui/form.tsx +59 -40
- package/src/ui/hover-card.tsx +26 -33
- package/src/ui/index.ts +11 -11
- package/src/ui/input-otp.tsx +53 -55
- package/src/ui/input.tsx +21 -15
- package/src/ui/label.tsx +25 -15
- package/src/ui/menubar.tsx +196 -206
- package/src/ui/navigation-menu.tsx +104 -136
- package/src/ui/pagination.tsx +94 -96
- package/src/ui/popover.tsx +29 -38
- package/src/ui/progress.tsx +29 -34
- package/src/ui/radio-group.tsx +27 -20
- package/src/ui/resizable.tsx +40 -42
- package/src/ui/scroll-area.tsx +46 -48
- package/src/ui/select.tsx +140 -160
- package/src/ui/separator.tsx +10 -2
- package/src/ui/sheet.tsx +118 -107
- package/src/ui/sidebar.tsx +471 -418
- package/src/ui/skeleton.tsx +14 -11
- package/src/ui/slider.tsx +27 -54
- package/src/ui/sonner.tsx +29 -19
- package/src/ui/switch.tsx +27 -21
- package/src/ui/table.tsx +102 -97
- package/src/ui/tabs.tsx +14 -37
- package/src/ui/textarea.tsx +16 -4
- package/src/ui/toast.tsx +137 -0
- package/src/ui/toggle-group.tsx +37 -55
- package/src/ui/toggle.tsx +30 -27
- package/src/ui/tooltip.tsx +29 -52
- package/src/ui/typography.tsx +85 -0
- package/tsconfig.json +2 -1
- package/vite.config.ts +20 -2
- package/vitest.config.ts +5 -0
- package/dist/src/index.test.d.ts +0 -1
- package/dist/src/new-components.test.d.ts +0 -1
- package/dist/src/renderers/complex/__tests__/data-table.test.d.ts +0 -0
- package/dist/src/renderers/complex/calendar-view.d.ts +0 -1
- package/dist/src/renderers/complex/chatbot.d.ts +0 -1
- package/dist/src/renderers/complex/chatbot.test.d.ts +0 -1
- package/dist/src/renderers/complex/timeline.d.ts +0 -1
- package/dist/src/ui/calendar-view.d.ts +0 -21
- package/dist/src/ui/chatbot.d.ts +0 -36
- package/dist/src/ui/field.d.ts +0 -24
- package/dist/src/ui/input-group.d.ts +0 -16
- package/dist/src/ui/spinner.d.ts +0 -3
- package/dist/src/ui/timeline.d.ts +0 -25
- package/metadata/ObjectTable.component.yml +0 -41
- package/src/renderers/complex/calendar-view.tsx +0 -219
- package/src/renderers/complex/chatbot.test.ts +0 -44
- package/src/renderers/complex/chatbot.tsx +0 -185
- package/src/renderers/complex/timeline.tsx +0 -466
- package/src/ui/calendar-view.tsx +0 -503
- package/src/ui/chatbot.tsx +0 -240
- package/src/ui/field.tsx +0 -246
- package/src/ui/input-group.tsx +0 -170
- package/src/ui/spinner.tsx +0 -38
- package/src/ui/timeline.tsx +0 -266
- package/tailwind.config.js +0 -75
- /package/dist/src/{ui → custom}/empty.d.ts +0 -0
package/src/ui/toast.tsx
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
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 * as ToastPrimitives from "@radix-ui/react-toast"
|
|
13
|
+
import { cva, type VariantProps } from "class-variance-authority"
|
|
14
|
+
import { X } from "lucide-react"
|
|
15
|
+
|
|
16
|
+
import { cn } from "../lib/utils"
|
|
17
|
+
|
|
18
|
+
const ToastProvider = ToastPrimitives.Provider
|
|
19
|
+
|
|
20
|
+
const ToastViewport = React.forwardRef<
|
|
21
|
+
React.ElementRef<typeof ToastPrimitives.Viewport>,
|
|
22
|
+
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Viewport>
|
|
23
|
+
>(({ className, ...props }, ref) => (
|
|
24
|
+
<ToastPrimitives.Viewport
|
|
25
|
+
ref={ref}
|
|
26
|
+
className={cn(
|
|
27
|
+
"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",
|
|
28
|
+
className
|
|
29
|
+
)}
|
|
30
|
+
{...props}
|
|
31
|
+
/>
|
|
32
|
+
))
|
|
33
|
+
ToastViewport.displayName = ToastPrimitives.Viewport.displayName
|
|
34
|
+
|
|
35
|
+
const toastVariants = cva(
|
|
36
|
+
"group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
|
|
37
|
+
{
|
|
38
|
+
variants: {
|
|
39
|
+
variant: {
|
|
40
|
+
default: "border bg-background text-foreground",
|
|
41
|
+
destructive:
|
|
42
|
+
"destructive group border-destructive bg-destructive text-destructive-foreground",
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
defaultVariants: {
|
|
46
|
+
variant: "default",
|
|
47
|
+
},
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
const Toast = React.forwardRef<
|
|
52
|
+
React.ElementRef<typeof ToastPrimitives.Root>,
|
|
53
|
+
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Root> &
|
|
54
|
+
VariantProps<typeof toastVariants>
|
|
55
|
+
>(({ className, variant, ...props }, ref) => {
|
|
56
|
+
return (
|
|
57
|
+
<ToastPrimitives.Root
|
|
58
|
+
ref={ref}
|
|
59
|
+
className={cn(toastVariants({ variant }), className)}
|
|
60
|
+
{...props}
|
|
61
|
+
/>
|
|
62
|
+
)
|
|
63
|
+
})
|
|
64
|
+
Toast.displayName = ToastPrimitives.Root.displayName
|
|
65
|
+
|
|
66
|
+
const ToastAction = React.forwardRef<
|
|
67
|
+
React.ElementRef<typeof ToastPrimitives.Action>,
|
|
68
|
+
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Action>
|
|
69
|
+
>(({ className, ...props }, ref) => (
|
|
70
|
+
<ToastPrimitives.Action
|
|
71
|
+
ref={ref}
|
|
72
|
+
className={cn(
|
|
73
|
+
"inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",
|
|
74
|
+
className
|
|
75
|
+
)}
|
|
76
|
+
{...props}
|
|
77
|
+
/>
|
|
78
|
+
))
|
|
79
|
+
ToastAction.displayName = ToastPrimitives.Action.displayName
|
|
80
|
+
|
|
81
|
+
const ToastClose = React.forwardRef<
|
|
82
|
+
React.ElementRef<typeof ToastPrimitives.Close>,
|
|
83
|
+
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Close>
|
|
84
|
+
>(({ className, ...props }, ref) => (
|
|
85
|
+
<ToastPrimitives.Close
|
|
86
|
+
ref={ref}
|
|
87
|
+
className={cn(
|
|
88
|
+
"absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",
|
|
89
|
+
className
|
|
90
|
+
)}
|
|
91
|
+
toast-close=""
|
|
92
|
+
{...props}
|
|
93
|
+
>
|
|
94
|
+
<X className="h-4 w-4" />
|
|
95
|
+
</ToastPrimitives.Close>
|
|
96
|
+
))
|
|
97
|
+
ToastClose.displayName = ToastPrimitives.Close.displayName
|
|
98
|
+
|
|
99
|
+
const ToastTitle = React.forwardRef<
|
|
100
|
+
React.ElementRef<typeof ToastPrimitives.Title>,
|
|
101
|
+
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Title>
|
|
102
|
+
>(({ className, ...props }, ref) => (
|
|
103
|
+
<ToastPrimitives.Title
|
|
104
|
+
ref={ref}
|
|
105
|
+
className={cn("text-sm font-semibold", className)}
|
|
106
|
+
{...props}
|
|
107
|
+
/>
|
|
108
|
+
))
|
|
109
|
+
ToastTitle.displayName = ToastPrimitives.Title.displayName
|
|
110
|
+
|
|
111
|
+
const ToastDescription = React.forwardRef<
|
|
112
|
+
React.ElementRef<typeof ToastPrimitives.Description>,
|
|
113
|
+
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Description>
|
|
114
|
+
>(({ className, ...props }, ref) => (
|
|
115
|
+
<ToastPrimitives.Description
|
|
116
|
+
ref={ref}
|
|
117
|
+
className={cn("text-sm opacity-90", className)}
|
|
118
|
+
{...props}
|
|
119
|
+
/>
|
|
120
|
+
))
|
|
121
|
+
ToastDescription.displayName = ToastPrimitives.Description.displayName
|
|
122
|
+
|
|
123
|
+
type ToastProps = React.ComponentPropsWithoutRef<typeof Toast>
|
|
124
|
+
|
|
125
|
+
type ToastActionElement = React.ReactElement<typeof ToastAction>
|
|
126
|
+
|
|
127
|
+
export {
|
|
128
|
+
type ToastProps,
|
|
129
|
+
type ToastActionElement,
|
|
130
|
+
ToastProvider,
|
|
131
|
+
ToastViewport,
|
|
132
|
+
Toast,
|
|
133
|
+
ToastTitle,
|
|
134
|
+
ToastDescription,
|
|
135
|
+
ToastClose,
|
|
136
|
+
ToastAction,
|
|
137
|
+
}
|
package/src/ui/toggle-group.tsx
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
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
|
+
|
|
1
11
|
import * as React from "react"
|
|
2
12
|
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group"
|
|
3
13
|
import { type VariantProps } from "class-variance-authority"
|
|
@@ -6,75 +16,45 @@ import { cn } from "../lib/utils"
|
|
|
6
16
|
import { toggleVariants } from "./toggle"
|
|
7
17
|
|
|
8
18
|
const ToggleGroupContext = React.createContext<
|
|
9
|
-
VariantProps<typeof toggleVariants>
|
|
10
|
-
spacing?: number
|
|
11
|
-
}
|
|
19
|
+
VariantProps<typeof toggleVariants>
|
|
12
20
|
>({
|
|
13
21
|
size: "default",
|
|
14
22
|
variant: "default",
|
|
15
|
-
spacing: 0,
|
|
16
23
|
})
|
|
17
24
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
data-size={size}
|
|
34
|
-
data-spacing={spacing}
|
|
35
|
-
style={{ "--gap": spacing } as React.CSSProperties}
|
|
36
|
-
className={cn(
|
|
37
|
-
"group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))] rounded-md bg-slate-950/20 p-1 border border-slate-800/50 shadow-inner",
|
|
38
|
-
className
|
|
39
|
-
)}
|
|
40
|
-
{...props}
|
|
41
|
-
>
|
|
42
|
-
<ToggleGroupContext.Provider value={{ variant, size, spacing }}>
|
|
43
|
-
{children}
|
|
44
|
-
</ToggleGroupContext.Provider>
|
|
45
|
-
</ToggleGroupPrimitive.Root>
|
|
46
|
-
)
|
|
47
|
-
}
|
|
25
|
+
const ToggleGroup = React.forwardRef<
|
|
26
|
+
React.ElementRef<typeof ToggleGroupPrimitive.Root>,
|
|
27
|
+
React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root> &
|
|
28
|
+
VariantProps<typeof toggleVariants>
|
|
29
|
+
>(({ className, variant, size, children, ...props }, ref) => (
|
|
30
|
+
<ToggleGroupPrimitive.Root
|
|
31
|
+
ref={ref}
|
|
32
|
+
className={cn("flex items-center justify-center gap-1", className)}
|
|
33
|
+
{...props}
|
|
34
|
+
>
|
|
35
|
+
<ToggleGroupContext.Provider value={{ variant, size }}>
|
|
36
|
+
{children}
|
|
37
|
+
</ToggleGroupContext.Provider>
|
|
38
|
+
</ToggleGroupPrimitive.Root>
|
|
39
|
+
))
|
|
48
40
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
VariantProps<typeof toggleVariants>) {
|
|
41
|
+
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName
|
|
42
|
+
|
|
43
|
+
const ToggleGroupItem = React.forwardRef<
|
|
44
|
+
React.ElementRef<typeof ToggleGroupPrimitive.Item>,
|
|
45
|
+
React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item> &
|
|
46
|
+
VariantProps<typeof toggleVariants>
|
|
47
|
+
>(({ className, children, variant, size, ...props }, ref) => {
|
|
57
48
|
const context = React.useContext(ToggleGroupContext)
|
|
58
49
|
|
|
59
50
|
return (
|
|
60
51
|
<ToggleGroupPrimitive.Item
|
|
61
|
-
|
|
62
|
-
data-variant={context.variant || variant}
|
|
63
|
-
data-size={context.size || size}
|
|
64
|
-
data-spacing={context.spacing}
|
|
52
|
+
ref={ref}
|
|
65
53
|
className={cn(
|
|
66
54
|
toggleVariants({
|
|
67
55
|
variant: context.variant || variant,
|
|
68
56
|
size: context.size || size,
|
|
69
57
|
}),
|
|
70
|
-
"w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10",
|
|
71
|
-
// Force rounded-sm logic for group items when spacing is 0
|
|
72
|
-
"data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-sm data-[spacing=0]:last:rounded-r-sm",
|
|
73
|
-
// Handle borders for connected items
|
|
74
|
-
"data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l",
|
|
75
|
-
// Add separating line for non-outline items if needed, or rely on gaps.
|
|
76
|
-
// For Outline variant in Future Tech, we might want to keep them distinct or joined.
|
|
77
|
-
// Current logic keeps them joined.
|
|
78
58
|
className
|
|
79
59
|
)}
|
|
80
60
|
{...props}
|
|
@@ -82,6 +62,8 @@ function ToggleGroupItem({
|
|
|
82
62
|
{children}
|
|
83
63
|
</ToggleGroupPrimitive.Item>
|
|
84
64
|
)
|
|
85
|
-
}
|
|
65
|
+
})
|
|
66
|
+
|
|
67
|
+
ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName
|
|
86
68
|
|
|
87
69
|
export { ToggleGroup, ToggleGroupItem }
|
package/src/ui/toggle.tsx
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
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
|
+
|
|
1
11
|
import * as React from "react"
|
|
2
12
|
import * as TogglePrimitive from "@radix-ui/react-toggle"
|
|
3
13
|
import { cva, type VariantProps } from "class-variance-authority"
|
|
@@ -5,23 +15,18 @@ import { cva, type VariantProps } from "class-variance-authority"
|
|
|
5
15
|
import { cn } from "../lib/utils"
|
|
6
16
|
|
|
7
17
|
const toggleVariants = cva(
|
|
8
|
-
"inline-flex items-center justify-center
|
|
18
|
+
"inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 gap-2",
|
|
9
19
|
{
|
|
10
20
|
variants: {
|
|
11
21
|
variant: {
|
|
12
|
-
default:
|
|
13
|
-
|
|
14
|
-
"
|
|
15
|
-
],
|
|
16
|
-
outline: [
|
|
17
|
-
"border border-cyan-900/60 bg-transparent shadow-xs hover:bg-cyan-950/30 hover:text-cyan-300 hover:border-cyan-500/50",
|
|
18
|
-
"data-[state=on]:bg-cyan-600 data-[state=on]:text-white data-[state=on]:border-cyan-400 data-[state=on]:shadow-[0_0_15px_rgba(6,182,212,0.6)]",
|
|
19
|
-
],
|
|
22
|
+
default: "bg-transparent",
|
|
23
|
+
outline:
|
|
24
|
+
"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground",
|
|
20
25
|
},
|
|
21
26
|
size: {
|
|
22
|
-
default: "h-
|
|
23
|
-
sm: "h-
|
|
24
|
-
lg: "h-
|
|
27
|
+
default: "h-10 px-3 min-w-10",
|
|
28
|
+
sm: "h-9 px-2.5 min-w-9",
|
|
29
|
+
lg: "h-11 px-5 min-w-11",
|
|
25
30
|
},
|
|
26
31
|
},
|
|
27
32
|
defaultVariants: {
|
|
@@ -31,20 +36,18 @@ const toggleVariants = cva(
|
|
|
31
36
|
}
|
|
32
37
|
)
|
|
33
38
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
)
|
|
48
|
-
}
|
|
39
|
+
const Toggle = React.forwardRef<
|
|
40
|
+
React.ElementRef<typeof TogglePrimitive.Root>,
|
|
41
|
+
React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root> &
|
|
42
|
+
VariantProps<typeof toggleVariants>
|
|
43
|
+
>(({ className, variant, size, ...props }, ref) => (
|
|
44
|
+
<TogglePrimitive.Root
|
|
45
|
+
ref={ref}
|
|
46
|
+
className={cn(toggleVariants({ variant, size, className }))}
|
|
47
|
+
{...props}
|
|
48
|
+
/>
|
|
49
|
+
))
|
|
50
|
+
|
|
51
|
+
Toggle.displayName = TogglePrimitive.Root.displayName
|
|
49
52
|
|
|
50
53
|
export { Toggle, toggleVariants }
|
package/src/ui/tooltip.tsx
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
|
|
1
9
|
"use client"
|
|
2
10
|
|
|
3
11
|
import * as React from "react"
|
|
@@ -5,57 +13,26 @@ import * as TooltipPrimitive from "@radix-ui/react-tooltip"
|
|
|
5
13
|
|
|
6
14
|
import { cn } from "../lib/utils"
|
|
7
15
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function TooltipTrigger({
|
|
32
|
-
...props
|
|
33
|
-
}: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {
|
|
34
|
-
return <TooltipPrimitive.Trigger data-slot="tooltip-trigger" {...props} />
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function TooltipContent({
|
|
38
|
-
className,
|
|
39
|
-
sideOffset = 0,
|
|
40
|
-
children,
|
|
41
|
-
...props
|
|
42
|
-
}: React.ComponentProps<typeof TooltipPrimitive.Content>) {
|
|
43
|
-
return (
|
|
44
|
-
<TooltipPrimitive.Portal>
|
|
45
|
-
<TooltipPrimitive.Content
|
|
46
|
-
data-slot="tooltip-content"
|
|
47
|
-
sideOffset={sideOffset}
|
|
48
|
-
className={cn(
|
|
49
|
-
"bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
|
|
50
|
-
className
|
|
51
|
-
)}
|
|
52
|
-
{...props}
|
|
53
|
-
>
|
|
54
|
-
{children}
|
|
55
|
-
<TooltipPrimitive.Arrow className="bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" />
|
|
56
|
-
</TooltipPrimitive.Content>
|
|
57
|
-
</TooltipPrimitive.Portal>
|
|
58
|
-
)
|
|
59
|
-
}
|
|
16
|
+
const TooltipProvider = TooltipPrimitive.Provider
|
|
17
|
+
|
|
18
|
+
const Tooltip = TooltipPrimitive.Root
|
|
19
|
+
|
|
20
|
+
const TooltipTrigger = TooltipPrimitive.Trigger
|
|
21
|
+
|
|
22
|
+
const TooltipContent = React.forwardRef<
|
|
23
|
+
React.ElementRef<typeof TooltipPrimitive.Content>,
|
|
24
|
+
React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>
|
|
25
|
+
>(({ className, sideOffset = 4, ...props }, ref) => (
|
|
26
|
+
<TooltipPrimitive.Content
|
|
27
|
+
ref={ref}
|
|
28
|
+
sideOffset={sideOffset}
|
|
29
|
+
className={cn(
|
|
30
|
+
"z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 origin-[--radix-tooltip-content-transform-origin]",
|
|
31
|
+
className
|
|
32
|
+
)}
|
|
33
|
+
{...props}
|
|
34
|
+
/>
|
|
35
|
+
))
|
|
36
|
+
TooltipContent.displayName = TooltipPrimitive.Content.displayName
|
|
60
37
|
|
|
61
38
|
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }
|
|
@@ -0,0 +1,85 @@
|
|
|
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
|
+
import { cn } from "../lib/utils"
|
|
11
|
+
|
|
12
|
+
const TypographyH1 = React.forwardRef<HTMLHeadingElement, React.HTMLAttributes<HTMLHeadingElement>>(({ className, ...props }, ref) => (
|
|
13
|
+
<h1 ref={ref} className={cn("scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl", className)} {...props} />
|
|
14
|
+
))
|
|
15
|
+
TypographyH1.displayName = "TypographyH1"
|
|
16
|
+
|
|
17
|
+
const TypographyH2 = React.forwardRef<HTMLHeadingElement, React.HTMLAttributes<HTMLHeadingElement>>(({ className, ...props }, ref) => (
|
|
18
|
+
<h2 ref={ref} className={cn("scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight first:mt-0", className)} {...props} />
|
|
19
|
+
))
|
|
20
|
+
TypographyH2.displayName = "TypographyH2"
|
|
21
|
+
|
|
22
|
+
const TypographyH3 = React.forwardRef<HTMLHeadingElement, React.HTMLAttributes<HTMLHeadingElement>>(({ className, ...props }, ref) => (
|
|
23
|
+
<h3 ref={ref} className={cn("scroll-m-20 text-2xl font-semibold tracking-tight", className)} {...props} />
|
|
24
|
+
))
|
|
25
|
+
TypographyH3.displayName = "TypographyH3"
|
|
26
|
+
|
|
27
|
+
const TypographyH4 = React.forwardRef<HTMLHeadingElement, React.HTMLAttributes<HTMLHeadingElement>>(({ className, ...props }, ref) => (
|
|
28
|
+
<h4 ref={ref} className={cn("scroll-m-20 text-xl font-semibold tracking-tight", className)} {...props} />
|
|
29
|
+
))
|
|
30
|
+
TypographyH4.displayName = "TypographyH4"
|
|
31
|
+
|
|
32
|
+
const TypographyP = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(({ className, ...props }, ref) => (
|
|
33
|
+
<p ref={ref} className={cn("leading-7 [&:not(:first-child)]:mt-6", className)} {...props} />
|
|
34
|
+
))
|
|
35
|
+
TypographyP.displayName = "TypographyP"
|
|
36
|
+
|
|
37
|
+
const TypographyBlockquote = React.forwardRef<HTMLQuoteElement, React.HTMLAttributes<HTMLQuoteElement>>(({ className, ...props }, ref) => (
|
|
38
|
+
<blockquote ref={ref} className={cn("mt-6 border-l-2 pl-6 italic", className)} {...props} />
|
|
39
|
+
))
|
|
40
|
+
TypographyBlockquote.displayName = "TypographyBlockquote"
|
|
41
|
+
|
|
42
|
+
const TypographyList = React.forwardRef<HTMLUListElement, React.HTMLAttributes<HTMLUListElement>>(({ className, ...props }, ref) => (
|
|
43
|
+
<ul ref={ref} className={cn("my-6 ml-6 list-disc [&>li]:mt-2", className)} {...props} />
|
|
44
|
+
))
|
|
45
|
+
TypographyList.displayName = "TypographyList"
|
|
46
|
+
|
|
47
|
+
const TypographyInlineCode = React.forwardRef<HTMLElement, React.HTMLAttributes<HTMLElement>>(({ className, ...props }, ref) => (
|
|
48
|
+
<code ref={ref} className={cn("relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold", className)} {...props} />
|
|
49
|
+
))
|
|
50
|
+
TypographyInlineCode.displayName = "TypographyInlineCode"
|
|
51
|
+
|
|
52
|
+
const TypographyLead = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(({ className, ...props }, ref) => (
|
|
53
|
+
<p ref={ref} className={cn("text-xl text-muted-foreground", className)} {...props} />
|
|
54
|
+
))
|
|
55
|
+
TypographyLead.displayName = "TypographyLead"
|
|
56
|
+
|
|
57
|
+
const TypographyLarge = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({ className, ...props }, ref) => (
|
|
58
|
+
<div ref={ref} className={cn("text-lg font-semibold", className)} {...props} />
|
|
59
|
+
))
|
|
60
|
+
TypographyLarge.displayName = "TypographyLarge"
|
|
61
|
+
|
|
62
|
+
const TypographySmall = React.forwardRef<HTMLElement, React.HTMLAttributes<HTMLElement>>(({ className, ...props }, ref) => (
|
|
63
|
+
<small ref={ref} className={cn("text-sm font-medium leading-none", className)} {...props} />
|
|
64
|
+
))
|
|
65
|
+
TypographySmall.displayName = "TypographySmall"
|
|
66
|
+
|
|
67
|
+
const TypographyMuted = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(({ className, ...props }, ref) => (
|
|
68
|
+
<p ref={ref} className={cn("text-sm text-muted-foreground", className)} {...props} />
|
|
69
|
+
))
|
|
70
|
+
TypographyMuted.displayName = "TypographyMuted"
|
|
71
|
+
|
|
72
|
+
export {
|
|
73
|
+
TypographyH1,
|
|
74
|
+
TypographyH2,
|
|
75
|
+
TypographyH3,
|
|
76
|
+
TypographyH4,
|
|
77
|
+
TypographyP,
|
|
78
|
+
TypographyBlockquote,
|
|
79
|
+
TypographyList,
|
|
80
|
+
TypographyInlineCode,
|
|
81
|
+
TypographyLead,
|
|
82
|
+
TypographyLarge,
|
|
83
|
+
TypographySmall,
|
|
84
|
+
TypographyMuted,
|
|
85
|
+
}
|
package/tsconfig.json
CHANGED
package/vite.config.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
|
|
1
9
|
import { defineConfig } from 'vite';
|
|
2
10
|
import react from '@vitejs/plugin-react';
|
|
3
11
|
import dts from 'vite-plugin-dts';
|
|
@@ -14,6 +22,13 @@ export default defineConfig({
|
|
|
14
22
|
resolve: {
|
|
15
23
|
alias: {
|
|
16
24
|
'@': resolve(__dirname, './src'),
|
|
25
|
+
'@object-ui/core': resolve(__dirname, '../core/src'),
|
|
26
|
+
'@object-ui/types': resolve(__dirname, '../types/src'),
|
|
27
|
+
'@object-ui/react': resolve(__dirname, '../react/src'),
|
|
28
|
+
'@object-ui/components': resolve(__dirname, './src'), // Self-reference for vitest.setup.tsx
|
|
29
|
+
'@object-ui/fields': resolve(__dirname, '../fields/src'),
|
|
30
|
+
'@object-ui/plugin-dashboard': resolve(__dirname, '../plugin-dashboard/src'),
|
|
31
|
+
'@object-ui/plugin-grid': resolve(__dirname, '../plugin-grid/src'),
|
|
17
32
|
},
|
|
18
33
|
},
|
|
19
34
|
build: {
|
|
@@ -23,11 +38,13 @@ export default defineConfig({
|
|
|
23
38
|
fileName: 'index',
|
|
24
39
|
},
|
|
25
40
|
rollupOptions: {
|
|
26
|
-
external: ['react', 'react-dom'],
|
|
41
|
+
external: ['react', 'react-dom', '@object-ui/core', '@object-ui/react', '@object-ui/types'],
|
|
27
42
|
output: {
|
|
28
43
|
globals: {
|
|
29
44
|
react: 'React',
|
|
30
45
|
'react-dom': 'ReactDOM',
|
|
46
|
+
'@object-ui/core': 'ObjectUICore',
|
|
47
|
+
'@object-ui/react': 'ObjectUIReact',
|
|
31
48
|
},
|
|
32
49
|
},
|
|
33
50
|
},
|
|
@@ -35,7 +52,8 @@ export default defineConfig({
|
|
|
35
52
|
test: {
|
|
36
53
|
globals: true,
|
|
37
54
|
environment: 'happy-dom',
|
|
38
|
-
setupFiles: [],
|
|
55
|
+
setupFiles: ['../../vitest.setup.tsx'],
|
|
56
|
+
passWithNoTests: true,
|
|
39
57
|
// Ensure dependencies are resolved properly for tests
|
|
40
58
|
deps: {
|
|
41
59
|
inline: ['@object-ui/core', '@object-ui/react'],
|
package/vitest.config.ts
ADDED
package/dist/src/index.test.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export interface CalendarEvent {
|
|
2
|
-
id: string | number;
|
|
3
|
-
title: string;
|
|
4
|
-
start: Date;
|
|
5
|
-
end?: Date;
|
|
6
|
-
allDay?: boolean;
|
|
7
|
-
color?: string;
|
|
8
|
-
data?: any;
|
|
9
|
-
}
|
|
10
|
-
export interface CalendarViewProps {
|
|
11
|
-
events?: CalendarEvent[];
|
|
12
|
-
view?: "month" | "week" | "day";
|
|
13
|
-
currentDate?: Date;
|
|
14
|
-
onEventClick?: (event: CalendarEvent) => void;
|
|
15
|
-
onDateClick?: (date: Date) => void;
|
|
16
|
-
onViewChange?: (view: "month" | "week" | "day") => void;
|
|
17
|
-
onNavigate?: (date: Date) => void;
|
|
18
|
-
className?: string;
|
|
19
|
-
}
|
|
20
|
-
declare function CalendarView({ events, view, currentDate, onEventClick, onDateClick, onViewChange, onNavigate, className, }: CalendarViewProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
-
export { CalendarView };
|
package/dist/src/ui/chatbot.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
export interface ChatMessage {
|
|
3
|
-
id: string;
|
|
4
|
-
role: "user" | "assistant" | "system";
|
|
5
|
-
content: string;
|
|
6
|
-
timestamp?: string;
|
|
7
|
-
avatar?: string;
|
|
8
|
-
avatarFallback?: string;
|
|
9
|
-
}
|
|
10
|
-
export interface ChatbotProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
11
|
-
messages?: ChatMessage[];
|
|
12
|
-
placeholder?: string;
|
|
13
|
-
onSendMessage?: (message: string) => void;
|
|
14
|
-
disabled?: boolean;
|
|
15
|
-
showTimestamp?: boolean;
|
|
16
|
-
userAvatarUrl?: string;
|
|
17
|
-
userAvatarFallback?: string;
|
|
18
|
-
assistantAvatarUrl?: string;
|
|
19
|
-
assistantAvatarFallback?: string;
|
|
20
|
-
maxHeight?: string;
|
|
21
|
-
}
|
|
22
|
-
declare const Chatbot: React.ForwardRefExoticComponent<ChatbotProps & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
-
export interface ChatMessageProps {
|
|
24
|
-
message: ChatMessage;
|
|
25
|
-
showTimestamp?: boolean;
|
|
26
|
-
userAvatarUrl?: string;
|
|
27
|
-
userAvatarFallback?: string;
|
|
28
|
-
assistantAvatarUrl?: string;
|
|
29
|
-
assistantAvatarFallback?: string;
|
|
30
|
-
}
|
|
31
|
-
export interface TypingIndicatorProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
32
|
-
avatarSrc?: string;
|
|
33
|
-
avatarFallback?: string;
|
|
34
|
-
}
|
|
35
|
-
declare const TypingIndicator: React.ForwardRefExoticComponent<TypingIndicatorProps & React.RefAttributes<HTMLDivElement>>;
|
|
36
|
-
export { Chatbot, TypingIndicator };
|