@object-ui/components 3.1.4 → 3.3.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 +44 -24
- package/CHANGELOG.md +26 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +34092 -33838
- package/dist/index.umd.cjs +40 -40
- package/dist/{src → packages/components/src}/custom/mobile-dialog-content.d.ts +1 -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/{src → packages/components/src}/ui/chart.d.ts +7 -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 +40 -13
- package/src/__tests__/__snapshots__/snapshot-critical.test.tsx.snap +3 -3
- package/src/custom/button-group.tsx +2 -2
- package/src/custom/field.tsx +3 -3
- package/src/custom/filter-builder.tsx +1 -1
- package/src/custom/item.tsx +2 -2
- package/src/custom/mobile-dialog-content.tsx +1 -1
- package/src/custom/sort-builder.tsx +1 -1
- package/src/index.css +114 -0
- package/src/renderers/complex/data-table.tsx +9 -9
- package/src/renderers/data-display/table.tsx +1 -1
- package/src/renderers/form/form.tsx +9 -2
- package/src/stories-json/chatbot.stories.tsx +101 -0
- package/src/ui/accordion.tsx +1 -1
- package/src/ui/alert-dialog.tsx +1 -1
- package/src/ui/aspect-ratio.tsx +1 -1
- package/src/ui/avatar.tsx +1 -1
- package/src/ui/breadcrumb.tsx +2 -2
- package/src/ui/button.tsx +2 -4
- package/src/ui/chart.tsx +10 -0
- package/src/ui/checkbox.tsx +1 -1
- package/src/ui/collapsible.tsx +1 -1
- package/src/ui/command.tsx +2 -2
- package/src/ui/context-menu.tsx +3 -3
- package/src/ui/dialog.tsx +4 -21
- package/src/ui/drawer.tsx +13 -13
- package/src/ui/dropdown-menu.tsx +3 -3
- package/src/ui/form.tsx +5 -5
- package/src/ui/hover-card.tsx +2 -2
- package/src/ui/label.tsx +1 -1
- package/src/ui/menubar.tsx +3 -3
- package/src/ui/navigation-menu.tsx +1 -1
- package/src/ui/popover.tsx +2 -2
- package/src/ui/progress.tsx +1 -1
- package/src/ui/radio-group.tsx +1 -1
- package/src/ui/resizable.tsx +7 -7
- package/src/ui/scroll-area.tsx +1 -1
- package/src/ui/select.tsx +2 -2
- package/src/ui/separator.tsx +1 -1
- package/src/ui/sheet.tsx +2 -3
- package/src/ui/sidebar.tsx +28 -113
- package/src/ui/slider.tsx +3 -4
- package/src/ui/switch.tsx +1 -1
- package/src/ui/tabs.tsx +1 -1
- package/src/ui/toast.tsx +1 -1
- package/src/ui/toggle-group.tsx +1 -1
- package/src/ui/toggle.tsx +1 -1
- package/src/ui/tooltip.tsx +2 -2
- package/vite.config.ts +1 -0
- package/dist/src/ui/aspect-ratio.d.ts +0 -3
- package/dist/src/ui/resizable.d.ts +0 -14
- /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/empty.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-bar.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
|
@@ -460,7 +460,7 @@ exports[`Dialog snapshots > renders open dialog structure 1`] = `
|
|
|
460
460
|
<div
|
|
461
461
|
aria-describedby="radix-_r_2_"
|
|
462
462
|
aria-labelledby="radix-_r_1_"
|
|
463
|
-
class="fixed
|
|
463
|
+
class="fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg"
|
|
464
464
|
data-state="open"
|
|
465
465
|
id="radix-_r_0_"
|
|
466
466
|
role="dialog"
|
|
@@ -496,12 +496,12 @@ exports[`Dialog snapshots > renders open dialog structure 1`] = `
|
|
|
496
496
|
</button>
|
|
497
497
|
</div>
|
|
498
498
|
<button
|
|
499
|
-
class="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground
|
|
499
|
+
class="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"
|
|
500
500
|
type="button"
|
|
501
501
|
>
|
|
502
502
|
<svg
|
|
503
503
|
aria-hidden="true"
|
|
504
|
-
class="lucide lucide-x h-
|
|
504
|
+
class="lucide lucide-x h-4 w-4"
|
|
505
505
|
fill="none"
|
|
506
506
|
height="24"
|
|
507
507
|
stroke="currentColor"
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { Slot as SlotPrimitive } from "radix-ui"
|
|
9
|
+
import { Slot as SlotPrimitive } from "@radix-ui/react-slot"
|
|
10
10
|
import { cva, type VariantProps } from "class-variance-authority"
|
|
11
11
|
|
|
12
12
|
import { cn } from "../lib/utils"
|
|
@@ -52,7 +52,7 @@ function ButtonGroupText({
|
|
|
52
52
|
}: React.ComponentProps<"div"> & {
|
|
53
53
|
asChild?: boolean
|
|
54
54
|
}) {
|
|
55
|
-
const Comp = asChild ? SlotPrimitive
|
|
55
|
+
const Comp = asChild ? SlotPrimitive : "div"
|
|
56
56
|
|
|
57
57
|
return (
|
|
58
58
|
<Comp
|
package/src/custom/field.tsx
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import * as React from "react"
|
|
10
|
-
import { Slot as SlotPrimitive } from "radix-ui"
|
|
10
|
+
import { Slot as SlotPrimitive } from "@radix-ui/react-slot"
|
|
11
11
|
import { cva, type VariantProps } from "class-variance-authority"
|
|
12
12
|
|
|
13
13
|
import { cn } from "../lib/utils"
|
|
@@ -43,7 +43,7 @@ const Field = React.forwardRef<HTMLDivElement, FieldProps>(
|
|
|
43
43
|
</Label>
|
|
44
44
|
)}
|
|
45
45
|
|
|
46
|
-
<SlotPrimitive
|
|
46
|
+
<SlotPrimitive
|
|
47
47
|
id={fieldId}
|
|
48
48
|
aria-describedby={
|
|
49
49
|
[description && descriptionId, error && errorId]
|
|
@@ -53,7 +53,7 @@ const Field = React.forwardRef<HTMLDivElement, FieldProps>(
|
|
|
53
53
|
aria-invalid={!!error}
|
|
54
54
|
>
|
|
55
55
|
{children}
|
|
56
|
-
</SlotPrimitive
|
|
56
|
+
</SlotPrimitive>
|
|
57
57
|
|
|
58
58
|
{description && !error && (
|
|
59
59
|
<p
|
package/src/custom/item.tsx
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import * as React from "react"
|
|
10
|
-
import { Slot as SlotPrimitive } from "radix-ui"
|
|
10
|
+
import { Slot as SlotPrimitive } from "@radix-ui/react-slot"
|
|
11
11
|
import { cva, type VariantProps } from "class-variance-authority"
|
|
12
12
|
|
|
13
13
|
import { cn } from "../lib/utils"
|
|
@@ -67,7 +67,7 @@ function Item({
|
|
|
67
67
|
...props
|
|
68
68
|
}: React.ComponentProps<"div"> &
|
|
69
69
|
VariantProps<typeof itemVariants> & { asChild?: boolean }) {
|
|
70
|
-
const Comp = asChild ? SlotPrimitive
|
|
70
|
+
const Comp = asChild ? SlotPrimitive : "div"
|
|
71
71
|
return (
|
|
72
72
|
<Comp
|
|
73
73
|
data-slot="item"
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
import * as React from 'react';
|
|
21
|
-
import
|
|
21
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
22
22
|
import { X } from 'lucide-react';
|
|
23
23
|
import { cn } from '../lib/utils';
|
|
24
24
|
import { DialogOverlay, DialogPortal } from '../ui/dialog';
|
package/src/index.css
CHANGED
|
@@ -33,6 +33,14 @@
|
|
|
33
33
|
--color-popover-foreground: hsl(var(--popover-foreground));
|
|
34
34
|
--color-card: hsl(var(--card));
|
|
35
35
|
--color-card-foreground: hsl(var(--card-foreground));
|
|
36
|
+
--color-sidebar: hsl(var(--sidebar));
|
|
37
|
+
--color-sidebar-foreground: hsl(var(--sidebar-foreground));
|
|
38
|
+
--color-sidebar-primary: hsl(var(--sidebar-primary));
|
|
39
|
+
--color-sidebar-primary-foreground: hsl(var(--sidebar-primary-foreground));
|
|
40
|
+
--color-sidebar-accent: hsl(var(--sidebar-accent));
|
|
41
|
+
--color-sidebar-accent-foreground: hsl(var(--sidebar-accent-foreground));
|
|
42
|
+
--color-sidebar-border: hsl(var(--sidebar-border));
|
|
43
|
+
--color-sidebar-ring: hsl(var(--sidebar-ring));
|
|
36
44
|
|
|
37
45
|
/* Chart colors */
|
|
38
46
|
--color-chart-1: hsl(var(--chart-1));
|
|
@@ -82,6 +90,16 @@
|
|
|
82
90
|
--chart-4: 43 74% 66%;
|
|
83
91
|
--chart-5: 27 87% 67%;
|
|
84
92
|
|
|
93
|
+
/* Sidebar colors */
|
|
94
|
+
--sidebar: 0 0% 98%;
|
|
95
|
+
--sidebar-foreground: 240 5.3% 26.1%;
|
|
96
|
+
--sidebar-primary: 240 5.9% 10%;
|
|
97
|
+
--sidebar-primary-foreground: 0 0% 98%;
|
|
98
|
+
--sidebar-accent: 240 4.8% 95.9%;
|
|
99
|
+
--sidebar-accent-foreground: 240 5.9% 10%;
|
|
100
|
+
--sidebar-border: 220 13% 91%;
|
|
101
|
+
--sidebar-ring: 217.2 91.2% 59.8%;
|
|
102
|
+
|
|
85
103
|
font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
86
104
|
}
|
|
87
105
|
|
|
@@ -119,6 +137,16 @@
|
|
|
119
137
|
--chart-3: 30 80% 55%;
|
|
120
138
|
--chart-4: 280 65% 60%;
|
|
121
139
|
--chart-5: 340 75% 55%;
|
|
140
|
+
|
|
141
|
+
/* Sidebar colors for dark mode */
|
|
142
|
+
--sidebar: 240 5.9% 10%;
|
|
143
|
+
--sidebar-foreground: 240 4.8% 95.9%;
|
|
144
|
+
--sidebar-primary: 224.3 76.3% 48%;
|
|
145
|
+
--sidebar-primary-foreground: 0 0% 100%;
|
|
146
|
+
--sidebar-accent: 240 3.7% 15.9%;
|
|
147
|
+
--sidebar-accent-foreground: 240 4.8% 95.9%;
|
|
148
|
+
--sidebar-border: 240 3.7% 15.9%;
|
|
149
|
+
--sidebar-ring: 217.2 91.2% 59.8%;
|
|
122
150
|
}
|
|
123
151
|
|
|
124
152
|
* {
|
|
@@ -129,3 +157,89 @@ body {
|
|
|
129
157
|
background-color: hsl(var(--background));
|
|
130
158
|
color: hsl(var(--foreground));
|
|
131
159
|
}
|
|
160
|
+
|
|
161
|
+
/* Sidebar explicit rules for Tailwind 4 compatibility */
|
|
162
|
+
|
|
163
|
+
/* Icon mode: collapsed state = icon width, expanded state = full width */
|
|
164
|
+
.group[data-collapsible="icon"][data-state="collapsed"] .group-data-\[collapsible\=icon\]\:w-\[--sidebar-width-icon\] {
|
|
165
|
+
width: var(--sidebar-width-icon);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.group[data-collapsible="icon"][data-state="expanded"] .group-data-\[collapsible\=icon\]\:w-\[--sidebar-width-icon\] {
|
|
169
|
+
width: var(--sidebar-width);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.group[data-collapsible="icon"][data-state="collapsed"] .group-data-\[collapsible\=icon\]\:w-\[calc\(var\(--sidebar-width-icon\)_\+_theme\(spacing\.4\)\)\] {
|
|
173
|
+
width: calc(var(--sidebar-width-icon) + 1rem);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.group[data-collapsible="icon"][data-state="expanded"] .group-data-\[collapsible\=icon\]\:w-\[calc\(var\(--sidebar-width-icon\)_\+_theme\(spacing\.4\)\)\] {
|
|
177
|
+
width: var(--sidebar-width);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.group[data-collapsible="icon"][data-state="collapsed"] .group-data-\[collapsible\=icon\]\:w-\[calc\(var\(--sidebar-width-icon\)_\+_theme\(spacing\.4\)_\+2px\)\] {
|
|
181
|
+
width: calc(var(--sidebar-width-icon) + 1rem + 2px);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.group[data-collapsible="icon"][data-state="expanded"] .group-data-\[collapsible\=icon\]\:w-\[calc\(var\(--sidebar-width-icon\)_\+_theme\(spacing\.4\)_\+2px\)\] {
|
|
185
|
+
width: var(--sidebar-width);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/* Labels visibility - only hide when BOTH icon mode AND collapsed */
|
|
189
|
+
.group[data-collapsible="icon"][data-state="collapsed"] .group-data-\[collapsible\=icon\]\:opacity-0 {
|
|
190
|
+
opacity: 0;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.group[data-collapsible="icon"][data-state="expanded"] .group-data-\[collapsible\=icon\]\:opacity-0 {
|
|
194
|
+
opacity: 1;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.group[data-collapsible="icon"][data-state="collapsed"] .group-data-\[collapsible\=icon\]\:-mt-8 {
|
|
198
|
+
margin-top: -2rem;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.group[data-collapsible="icon"][data-state="expanded"] .group-data-\[collapsible\=icon\]\:-mt-8 {
|
|
202
|
+
margin-top: 0;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.group[data-collapsible="icon"][data-state="collapsed"] .group-data-\[collapsible\=icon\]\:hidden {
|
|
206
|
+
display: none;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.group[data-collapsible="icon"][data-state="expanded"] .group-data-\[collapsible\=icon\]\:hidden {
|
|
210
|
+
display: block;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.group[data-collapsible="icon"][data-state="collapsed"] .group-data-\[collapsible\=icon\]\:overflow-hidden {
|
|
214
|
+
overflow: hidden;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.group[data-collapsible="icon"][data-state="expanded"] .group-data-\[collapsible\=icon\]\:overflow-hidden {
|
|
218
|
+
overflow: visible;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/* Menu button behavior - collapsed = icon only, expanded = full width */
|
|
222
|
+
.group[data-collapsible="icon"][data-state="collapsed"] .sidebar-menu-button-icon-mode {
|
|
223
|
+
width: 2rem !important;
|
|
224
|
+
height: 2rem !important;
|
|
225
|
+
padding: 0.5rem !important;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.group[data-collapsible="icon"][data-state="expanded"] .sidebar-menu-button-icon-mode {
|
|
229
|
+
width: 100%;
|
|
230
|
+
height: auto;
|
|
231
|
+
padding: 0.5rem;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.group[data-collapsible="icon"][data-state="collapsed"] .sidebar-menu-button-icon-mode-lg {
|
|
235
|
+
padding: 0 !important;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.group[data-collapsible="icon"][data-state="expanded"] .sidebar-menu-button-icon-mode-lg {
|
|
239
|
+
padding: 0.5rem;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/* Offcanvas mode: always collapsed = 0 width */
|
|
243
|
+
.group[data-collapsible="offcanvas"] .group-data-\[collapsible\=offcanvas\]\:w-0 {
|
|
244
|
+
width: 0;
|
|
245
|
+
}
|
|
@@ -974,7 +974,7 @@ const DataTableRenderer = ({ schema }: { schema: DataTableSchema }) => {
|
|
|
974
974
|
) : typeof col.cell === 'function' ? (
|
|
975
975
|
col.cell(cellValue, row)
|
|
976
976
|
) : (
|
|
977
|
-
cellValue
|
|
977
|
+
cellValue != null && typeof cellValue === 'object' ? String(cellValue) : cellValue
|
|
978
978
|
)}
|
|
979
979
|
</TableCell>
|
|
980
980
|
);
|
|
@@ -986,7 +986,7 @@ const DataTableRenderer = ({ schema }: { schema: DataTableSchema }) => {
|
|
|
986
986
|
<>
|
|
987
987
|
<Button
|
|
988
988
|
variant="ghost"
|
|
989
|
-
size="icon
|
|
989
|
+
size="icon"
|
|
990
990
|
onClick={() => cancelRowChanges(rowIndex)}
|
|
991
991
|
disabled={isSaving}
|
|
992
992
|
title="Cancel changes"
|
|
@@ -995,7 +995,7 @@ const DataTableRenderer = ({ schema }: { schema: DataTableSchema }) => {
|
|
|
995
995
|
</Button>
|
|
996
996
|
<Button
|
|
997
997
|
variant="ghost"
|
|
998
|
-
size="icon
|
|
998
|
+
size="icon"
|
|
999
999
|
onClick={() => saveRow(rowIndex)}
|
|
1000
1000
|
disabled={isSaving}
|
|
1001
1001
|
title="Save row"
|
|
@@ -1007,14 +1007,14 @@ const DataTableRenderer = ({ schema }: { schema: DataTableSchema }) => {
|
|
|
1007
1007
|
<>
|
|
1008
1008
|
<Button
|
|
1009
1009
|
variant="ghost"
|
|
1010
|
-
size="icon
|
|
1010
|
+
size="icon"
|
|
1011
1011
|
onClick={() => schema.onRowEdit?.(row)}
|
|
1012
1012
|
>
|
|
1013
1013
|
<Edit className="h-4 w-4" />
|
|
1014
1014
|
</Button>
|
|
1015
1015
|
<Button
|
|
1016
1016
|
variant="ghost"
|
|
1017
|
-
size="icon
|
|
1017
|
+
size="icon"
|
|
1018
1018
|
onClick={() => schema.onRowDelete?.(row)}
|
|
1019
1019
|
>
|
|
1020
1020
|
<Trash2 className="h-4 w-4 text-destructive" />
|
|
@@ -1089,7 +1089,7 @@ const DataTableRenderer = ({ schema }: { schema: DataTableSchema }) => {
|
|
|
1089
1089
|
<div className="flex items-center gap-1">
|
|
1090
1090
|
<Button
|
|
1091
1091
|
variant="outline"
|
|
1092
|
-
size="icon
|
|
1092
|
+
size="icon"
|
|
1093
1093
|
onClick={() => setCurrentPage(1)}
|
|
1094
1094
|
disabled={currentPage === 1}
|
|
1095
1095
|
>
|
|
@@ -1097,7 +1097,7 @@ const DataTableRenderer = ({ schema }: { schema: DataTableSchema }) => {
|
|
|
1097
1097
|
</Button>
|
|
1098
1098
|
<Button
|
|
1099
1099
|
variant="outline"
|
|
1100
|
-
size="icon
|
|
1100
|
+
size="icon"
|
|
1101
1101
|
onClick={() => setCurrentPage(Math.max(1, currentPage - 1))}
|
|
1102
1102
|
disabled={currentPage === 1}
|
|
1103
1103
|
>
|
|
@@ -1105,7 +1105,7 @@ const DataTableRenderer = ({ schema }: { schema: DataTableSchema }) => {
|
|
|
1105
1105
|
</Button>
|
|
1106
1106
|
<Button
|
|
1107
1107
|
variant="outline"
|
|
1108
|
-
size="icon
|
|
1108
|
+
size="icon"
|
|
1109
1109
|
onClick={() => setCurrentPage(Math.min(totalPages, currentPage + 1))}
|
|
1110
1110
|
disabled={currentPage === totalPages}
|
|
1111
1111
|
>
|
|
@@ -1113,7 +1113,7 @@ const DataTableRenderer = ({ schema }: { schema: DataTableSchema }) => {
|
|
|
1113
1113
|
</Button>
|
|
1114
1114
|
<Button
|
|
1115
1115
|
variant="outline"
|
|
1116
|
-
size="icon
|
|
1116
|
+
size="icon"
|
|
1117
1117
|
onClick={() => setCurrentPage(totalPages)}
|
|
1118
1118
|
disabled={currentPage === totalPages}
|
|
1119
1119
|
>
|
|
@@ -60,7 +60,7 @@ export const SimpleTableRenderer = ({ schema, className }: any) => {
|
|
|
60
60
|
const value = accessor ? row[accessor] : '';
|
|
61
61
|
return (
|
|
62
62
|
<TableCell key={col.key || col.accessorKey || index}>
|
|
63
|
-
{value}
|
|
63
|
+
{value != null && typeof value === 'object' ? String(value) : value}
|
|
64
64
|
</TableCell>
|
|
65
65
|
);
|
|
66
66
|
})}
|
|
@@ -28,10 +28,17 @@ import { AlertCircle, Loader2 } from 'lucide-react';
|
|
|
28
28
|
import { cn } from '../../lib/utils';
|
|
29
29
|
import React from 'react';
|
|
30
30
|
import { SchemaRendererContext } from '@object-ui/react';
|
|
31
|
+
import { createSafeTranslation } from '@object-ui/i18n';
|
|
32
|
+
|
|
33
|
+
const useSafeFormTranslation = createSafeTranslation(
|
|
34
|
+
{ 'common.selectOption': 'Select an option' },
|
|
35
|
+
'common.selectOption',
|
|
36
|
+
);
|
|
31
37
|
|
|
32
38
|
// Form renderer component - Airtable-style feature-complete form
|
|
33
39
|
ComponentRegistry.register('form',
|
|
34
40
|
({ schema, className, onAction, ...props }: { schema: FormSchema; className?: string; onAction?: (action: any) => void; [key: string]: any }) => {
|
|
41
|
+
const { t } = useSafeFormTranslation();
|
|
35
42
|
const {
|
|
36
43
|
defaultValues = {},
|
|
37
44
|
fields = [],
|
|
@@ -317,7 +324,7 @@ ComponentRegistry.register('form',
|
|
|
317
324
|
...formField,
|
|
318
325
|
inputType: fieldProps.inputType,
|
|
319
326
|
options: fieldProps.options,
|
|
320
|
-
placeholder: fieldProps.placeholder,
|
|
327
|
+
placeholder: fieldProps.placeholder ?? (resolvedType === 'select' ? t('common.selectOption') : undefined),
|
|
321
328
|
disabled: disabled || fieldDisabled || readonly || isSubmitting,
|
|
322
329
|
dataSource: contextDataSource,
|
|
323
330
|
})}
|
|
@@ -514,7 +521,7 @@ function renderFieldComponent(type: string, props: RenderFieldProps) {
|
|
|
514
521
|
return (
|
|
515
522
|
<Select value={selectValue} onValueChange={selectOnChange} {...selectProps}>
|
|
516
523
|
<SelectTrigger className="min-h-[44px] sm:min-h-0">
|
|
517
|
-
<SelectValue placeholder={placeholder
|
|
524
|
+
<SelectValue placeholder={placeholder || 'Select an option'} />
|
|
518
525
|
</SelectTrigger>
|
|
519
526
|
<SelectContent>
|
|
520
527
|
{options.map((opt: SelectOption) => (
|
|
@@ -246,3 +246,104 @@ export const StreamingResponse: Story = {
|
|
|
246
246
|
className: 'w-full max-w-2xl'
|
|
247
247
|
} as any,
|
|
248
248
|
};
|
|
249
|
+
|
|
250
|
+
// ============================================================================
|
|
251
|
+
// AI SDUI Mode Stories (service-ai integration)
|
|
252
|
+
// ============================================================================
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* AI Streaming Mode - demonstrates schema config for service-ai backend.
|
|
256
|
+
* In production, set `api` to your service-ai endpoint.
|
|
257
|
+
* Without a real backend, this falls back to local auto-response.
|
|
258
|
+
*/
|
|
259
|
+
export const AIStreamingMode: Story = {
|
|
260
|
+
render: renderStory,
|
|
261
|
+
args: {
|
|
262
|
+
type: 'chatbot',
|
|
263
|
+
messages: [
|
|
264
|
+
{
|
|
265
|
+
id: 'welcome',
|
|
266
|
+
role: 'assistant',
|
|
267
|
+
content: 'Hello! I\'m your AI assistant powered by service-ai. Ask me anything!',
|
|
268
|
+
}
|
|
269
|
+
],
|
|
270
|
+
placeholder: 'Ask the AI assistant...',
|
|
271
|
+
enableMarkdown: true,
|
|
272
|
+
showTimestamp: false,
|
|
273
|
+
// AI SDUI fields — in production, set api to your endpoint:
|
|
274
|
+
// api: '/api/v1/ai/chat',
|
|
275
|
+
// model: 'gpt-4o',
|
|
276
|
+
// systemPrompt: 'You are a helpful assistant.',
|
|
277
|
+
// streamingEnabled: true,
|
|
278
|
+
// Fallback to auto-response for demo:
|
|
279
|
+
autoResponse: true,
|
|
280
|
+
autoResponseText: 'This is a demo response. In production, connect `api` to your service-ai endpoint for real streaming.',
|
|
281
|
+
autoResponseDelay: 800,
|
|
282
|
+
className: 'w-full max-w-2xl'
|
|
283
|
+
} as any,
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* AI Chat with system prompt and model config.
|
|
288
|
+
*/
|
|
289
|
+
export const AIWithSystemPrompt: Story = {
|
|
290
|
+
render: renderStory,
|
|
291
|
+
args: {
|
|
292
|
+
type: 'chatbot',
|
|
293
|
+
messages: [
|
|
294
|
+
{
|
|
295
|
+
id: 'system-1',
|
|
296
|
+
role: 'system',
|
|
297
|
+
content: 'You are a customer support agent for Acme Inc.',
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
id: 'welcome',
|
|
301
|
+
role: 'assistant',
|
|
302
|
+
content: 'Welcome to Acme Support! How can I help you today?',
|
|
303
|
+
}
|
|
304
|
+
],
|
|
305
|
+
placeholder: 'Describe your issue...',
|
|
306
|
+
enableMarkdown: true,
|
|
307
|
+
showTimestamp: true,
|
|
308
|
+
systemPrompt: 'You are a customer support agent for Acme Inc. Be helpful and professional.',
|
|
309
|
+
model: 'gpt-4o',
|
|
310
|
+
autoResponse: true,
|
|
311
|
+
autoResponseText: 'Thank you for contacting Acme Support. I\'m looking into your request.',
|
|
312
|
+
autoResponseDelay: 1200,
|
|
313
|
+
className: 'w-full max-w-2xl'
|
|
314
|
+
} as any,
|
|
315
|
+
};
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* AI Chat including tool invocation metadata in messages.
|
|
319
|
+
*/
|
|
320
|
+
export const AIWithToolCalls: Story = {
|
|
321
|
+
render: renderStory,
|
|
322
|
+
args: {
|
|
323
|
+
type: 'chatbot',
|
|
324
|
+
messages: [
|
|
325
|
+
{
|
|
326
|
+
id: '1',
|
|
327
|
+
role: 'user',
|
|
328
|
+
content: 'What\'s the weather in San Francisco?',
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
id: '2',
|
|
332
|
+
role: 'assistant',
|
|
333
|
+
content: 'The weather in San Francisco is currently 68°F with partly cloudy skies.',
|
|
334
|
+
toolInvocations: [
|
|
335
|
+
{
|
|
336
|
+
toolCallId: 'tc-1',
|
|
337
|
+
toolName: 'getWeather',
|
|
338
|
+
args: { city: 'San Francisco' },
|
|
339
|
+
result: { temp: 68, condition: 'Partly cloudy' },
|
|
340
|
+
state: 'result',
|
|
341
|
+
}
|
|
342
|
+
],
|
|
343
|
+
}
|
|
344
|
+
],
|
|
345
|
+
placeholder: 'Ask about weather, stocks, or more...',
|
|
346
|
+
enableMarkdown: true,
|
|
347
|
+
className: 'w-full max-w-2xl'
|
|
348
|
+
} as any,
|
|
349
|
+
};
|
package/src/ui/accordion.tsx
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"use client"
|
|
10
10
|
|
|
11
11
|
import * as React from "react"
|
|
12
|
-
import
|
|
12
|
+
import * as AccordionPrimitive from "@radix-ui/react-accordion"
|
|
13
13
|
import { ChevronDown } from "lucide-react"
|
|
14
14
|
|
|
15
15
|
import { cn } from "../lib/utils"
|
package/src/ui/alert-dialog.tsx
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"use client"
|
|
10
10
|
|
|
11
11
|
import * as React from "react"
|
|
12
|
-
import
|
|
12
|
+
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog"
|
|
13
13
|
|
|
14
14
|
import { cn } from "../lib/utils"
|
|
15
15
|
import { buttonVariants } from "./button"
|
package/src/ui/aspect-ratio.tsx
CHANGED
package/src/ui/avatar.tsx
CHANGED
package/src/ui/breadcrumb.tsx
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import * as React from "react"
|
|
10
|
-
import { Slot
|
|
10
|
+
import { Slot } from "@radix-ui/react-slot"
|
|
11
11
|
import { ChevronRight, MoreHorizontal } from "lucide-react"
|
|
12
12
|
|
|
13
13
|
import { cn } from "../lib/utils"
|
|
@@ -53,7 +53,7 @@ const BreadcrumbLink = React.forwardRef<
|
|
|
53
53
|
asChild?: boolean
|
|
54
54
|
}
|
|
55
55
|
>(({ asChild, className, ...props }, ref) => {
|
|
56
|
-
const Comp = asChild ?
|
|
56
|
+
const Comp = asChild ? Slot : "a"
|
|
57
57
|
|
|
58
58
|
return (
|
|
59
59
|
<Comp
|
package/src/ui/button.tsx
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import * as React from "react"
|
|
10
|
-
import { Slot
|
|
10
|
+
import { Slot } from "@radix-ui/react-slot"
|
|
11
11
|
import { cva, type VariantProps } from "class-variance-authority"
|
|
12
12
|
|
|
13
13
|
import { cn } from "../lib/utils"
|
|
@@ -32,8 +32,6 @@ const buttonVariants = cva(
|
|
|
32
32
|
sm: "h-9 rounded-md px-3",
|
|
33
33
|
lg: "h-11 rounded-md px-8",
|
|
34
34
|
icon: "h-10 w-10",
|
|
35
|
-
"icon-sm": "h-8 w-8",
|
|
36
|
-
"icon-lg": "h-12 w-12",
|
|
37
35
|
},
|
|
38
36
|
},
|
|
39
37
|
defaultVariants: {
|
|
@@ -51,7 +49,7 @@ export interface ButtonProps
|
|
|
51
49
|
|
|
52
50
|
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
53
51
|
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
54
|
-
const Comp = asChild ?
|
|
52
|
+
const Comp = asChild ? Slot : "button"
|
|
55
53
|
return (
|
|
56
54
|
<Comp
|
|
57
55
|
className={cn(buttonVariants({ variant, size, className }))}
|
package/src/ui/chart.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 RechartsPrimitive from "recharts"
|
|
3
13
|
|
package/src/ui/checkbox.tsx
CHANGED
package/src/ui/collapsible.tsx
CHANGED
package/src/ui/command.tsx
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"use client"
|
|
10
10
|
|
|
11
11
|
import * as React from "react"
|
|
12
|
-
import {
|
|
12
|
+
import { type DialogProps } from "@radix-ui/react-dialog"
|
|
13
13
|
import { Command as CommandPrimitive } from "cmdk"
|
|
14
14
|
import { Search } from "lucide-react"
|
|
15
15
|
|
|
@@ -31,7 +31,7 @@ const Command = React.forwardRef<
|
|
|
31
31
|
))
|
|
32
32
|
Command.displayName = CommandPrimitive.displayName
|
|
33
33
|
|
|
34
|
-
const CommandDialog = ({ children, ...props }:
|
|
34
|
+
const CommandDialog = ({ children, ...props }: DialogProps) => {
|
|
35
35
|
return (
|
|
36
36
|
<Dialog {...props}>
|
|
37
37
|
<DialogContent className="overflow-hidden p-0 shadow-lg">
|
package/src/ui/context-menu.tsx
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"use client"
|
|
10
10
|
|
|
11
11
|
import * as React from "react"
|
|
12
|
-
import
|
|
12
|
+
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu"
|
|
13
13
|
import { Check, ChevronRight, Circle } from "lucide-react"
|
|
14
14
|
|
|
15
15
|
import { cn } from "../lib/utils"
|
|
@@ -54,7 +54,7 @@ const ContextMenuSubContent = React.forwardRef<
|
|
|
54
54
|
<ContextMenuPrimitive.SubContent
|
|
55
55
|
ref={ref}
|
|
56
56
|
className={cn(
|
|
57
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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
|
|
57
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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 origin-[--radix-context-menu-content-transform-origin]",
|
|
58
58
|
className
|
|
59
59
|
)}
|
|
60
60
|
{...props}
|
|
@@ -70,7 +70,7 @@ const ContextMenuContent = React.forwardRef<
|
|
|
70
70
|
<ContextMenuPrimitive.Content
|
|
71
71
|
ref={ref}
|
|
72
72
|
className={cn(
|
|
73
|
-
"z-50 max-h-[--radix-context-menu-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 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
|
|
73
|
+
"z-50 max-h-[--radix-context-menu-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 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 origin-[--radix-context-menu-content-transform-origin]",
|
|
74
74
|
className
|
|
75
75
|
)}
|
|
76
76
|
{...props}
|