summaryrefslogtreecommitdiffhomepage
path: root/packages/desktop/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'packages/desktop/src/ui')
-rw-r--r--packages/desktop/src/ui/collapsible.tsx62
-rw-r--r--packages/desktop/src/ui/index.ts6
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"