diff options
| author | Adam <[email protected]> | 2025-11-25 16:02:27 -0600 |
|---|---|---|
| committer | Adam <[email protected]> | 2025-11-25 16:02:31 -0600 |
| commit | 447713244820e875e192a5815c4d8bc76c03b40f (patch) | |
| tree | a3df06b1df0585a8387c37826ea516ce08169289 /packages/desktop/src/ui | |
| parent | eaeea45ace01e20405d49d1a659030a4d131dc83 (diff) | |
| download | opencode-447713244820e875e192a5815c4d8bc76c03b40f.tar.gz opencode-447713244820e875e192a5815c4d8bc76c03b40f.zip | |
fix: sanitize absolute paths
Diffstat (limited to 'packages/desktop/src/ui')
| -rw-r--r-- | packages/desktop/src/ui/collapsible.tsx | 62 | ||||
| -rw-r--r-- | packages/desktop/src/ui/index.ts | 6 |
2 files changed, 0 insertions, 68 deletions
diff --git a/packages/desktop/src/ui/collapsible.tsx b/packages/desktop/src/ui/collapsible.tsx deleted file mode 100644 index 5fbb6c7a4..000000000 --- a/packages/desktop/src/ui/collapsible.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import { Collapsible as KobalteCollapsible } from "@kobalte/core/collapsible" -import { Icon, IconProps } from "@opencode-ai/ui/icon" -import { splitProps } from "solid-js" -import type { ComponentProps, ParentProps } from "solid-js" - -export interface CollapsibleProps extends ComponentProps<typeof KobalteCollapsible> {} -export interface CollapsibleTriggerProps extends ComponentProps<typeof KobalteCollapsible.Trigger> {} -export interface CollapsibleContentProps extends ComponentProps<typeof KobalteCollapsible.Content> {} - -function CollapsibleRoot(props: CollapsibleProps) { - return <KobalteCollapsible forceMount {...props} /> -} - -function CollapsibleTrigger(props: CollapsibleTriggerProps) { - const [local, others] = splitProps(props, ["class"]) - return ( - <KobalteCollapsible.Trigger - classList={{ - "w-full group/collapsible": true, - [local.class ?? ""]: !!local.class, - }} - {...others} - /> - ) -} - -function CollapsibleContent(props: ParentProps<CollapsibleContentProps>) { - const [local, others] = splitProps(props, ["class", "children"]) - return ( - <KobalteCollapsible.Content - classList={{ - "h-0 overflow-hidden transition-all duration-100 ease-out": true, - "data-expanded:h-fit": true, - [local.class]: !!local.class, - }} - {...others} - > - {local.children} - </KobalteCollapsible.Content> - ) -} - -function CollapsibleArrow(props: Partial<IconProps>) { - const [local, others] = splitProps(props, ["class", "name"]) - return ( - <Icon - name={local.name ?? "chevron-right"} - classList={{ - "flex-none text-text-muted transition-transform duration-100": true, - "group-data-[expanded]/collapsible:rotate-90": true, - [local.class ?? ""]: !!local.class, - }} - {...others} - /> - ) -} - -export const Collapsible = Object.assign(CollapsibleRoot, { - Trigger: CollapsibleTrigger, - Content: CollapsibleContent, - Arrow: CollapsibleArrow, -}) diff --git a/packages/desktop/src/ui/index.ts b/packages/desktop/src/ui/index.ts deleted file mode 100644 index 8cbf0834f..000000000 --- a/packages/desktop/src/ui/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export { - Collapsible, - type CollapsibleProps, - type CollapsibleTriggerProps, - type CollapsibleContentProps, -} from "./collapsible" |
