chore: generate
This commit is contained in:
@@ -143,7 +143,9 @@ export function DialogConnectProvider(props: { provider: string }) {
|
||||
}
|
||||
|
||||
return (
|
||||
<Dialog title={<IconButton tabIndex={-1} icon="arrow-left" variant="ghost" onClick={goBack} aria-label="Go back" />}>
|
||||
<Dialog
|
||||
title={<IconButton tabIndex={-1} icon="arrow-left" variant="ghost" onClick={goBack} aria-label="Go back" />}
|
||||
>
|
||||
<div class="flex flex-col gap-6 px-2.5 pb-3">
|
||||
<div class="px-2.5 flex gap-4 items-center">
|
||||
<ProviderIcon id={props.provider as IconName} class="size-5 shrink-0 icon-strong-base" />
|
||||
|
||||
@@ -1653,10 +1653,7 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
|
||||
title={language.t("command.model.choose")}
|
||||
keybind={command.keybind("model.choose")}
|
||||
>
|
||||
<ModelSelectorPopover
|
||||
triggerAs={Button}
|
||||
triggerProps={{ variant: "ghost" }}
|
||||
>
|
||||
<ModelSelectorPopover triggerAs={Button} triggerProps={{ variant: "ghost" }}>
|
||||
<Show when={local.model.current()?.provider?.id}>
|
||||
<ProviderIcon id={local.model.current()!.provider.id as IconName} class="size-4 shrink-0" />
|
||||
</Show>
|
||||
|
||||
@@ -260,71 +260,73 @@ export function SessionHeader() {
|
||||
}}
|
||||
trigger={language.t("session.share.action.share")}
|
||||
>
|
||||
<div class="flex flex-col gap-2">
|
||||
<Show
|
||||
when={shareUrl()}
|
||||
fallback={
|
||||
<div class="flex">
|
||||
<Button
|
||||
size="large"
|
||||
variant="primary"
|
||||
class="w-1/2"
|
||||
onClick={shareSession}
|
||||
disabled={state.share}
|
||||
>
|
||||
{state.share
|
||||
? language.t("session.share.action.publishing")
|
||||
: language.t("session.share.action.publish")}
|
||||
</Button>
|
||||
<div class="flex flex-col gap-2">
|
||||
<Show
|
||||
when={shareUrl()}
|
||||
fallback={
|
||||
<div class="flex">
|
||||
<Button
|
||||
size="large"
|
||||
variant="primary"
|
||||
class="w-1/2"
|
||||
onClick={shareSession}
|
||||
disabled={state.share}
|
||||
>
|
||||
{state.share
|
||||
? language.t("session.share.action.publishing")
|
||||
: language.t("session.share.action.publish")}
|
||||
</Button>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
<div class="flex flex-col gap-2 w-72">
|
||||
<TextField value={shareUrl() ?? ""} readOnly copyable class="w-full" />
|
||||
<div class="grid grid-cols-2 gap-2">
|
||||
<Button
|
||||
size="large"
|
||||
variant="secondary"
|
||||
class="w-full shadow-none border border-border-weak-base"
|
||||
onClick={unshareSession}
|
||||
disabled={state.unshare}
|
||||
>
|
||||
{state.unshare
|
||||
? language.t("session.share.action.unpublishing")
|
||||
: language.t("session.share.action.unpublish")}
|
||||
</Button>
|
||||
<Button
|
||||
size="large"
|
||||
variant="primary"
|
||||
class="w-full"
|
||||
onClick={viewShare}
|
||||
disabled={state.unshare}
|
||||
>
|
||||
{language.t("session.share.action.view")}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</Show>
|
||||
</div>
|
||||
</Popover>
|
||||
<Show when={shareUrl()} fallback={<div class="size-6" aria-hidden="true" />}>
|
||||
<Tooltip
|
||||
value={
|
||||
state.copied
|
||||
? language.t("session.share.copy.copied")
|
||||
: language.t("session.share.copy.copyLink")
|
||||
}
|
||||
placement="top"
|
||||
gutter={8}
|
||||
>
|
||||
<div class="flex flex-col gap-2 w-72">
|
||||
<TextField value={shareUrl() ?? ""} readOnly copyable class="w-full" />
|
||||
<div class="grid grid-cols-2 gap-2">
|
||||
<Button
|
||||
size="large"
|
||||
variant="secondary"
|
||||
class="w-full shadow-none border border-border-weak-base"
|
||||
onClick={unshareSession}
|
||||
disabled={state.unshare}
|
||||
>
|
||||
{state.unshare
|
||||
? language.t("session.share.action.unpublishing")
|
||||
: language.t("session.share.action.unpublish")}
|
||||
</Button>
|
||||
<Button
|
||||
size="large"
|
||||
variant="primary"
|
||||
class="w-full"
|
||||
onClick={viewShare}
|
||||
disabled={state.unshare}
|
||||
>
|
||||
{language.t("session.share.action.view")}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</Show>
|
||||
</div>
|
||||
</Popover>
|
||||
<Show when={shareUrl()} fallback={<div class="size-6" aria-hidden="true" />}>
|
||||
<Tooltip
|
||||
value={
|
||||
state.copied ? language.t("session.share.copy.copied") : language.t("session.share.copy.copyLink")
|
||||
}
|
||||
placement="top"
|
||||
gutter={8}
|
||||
>
|
||||
<IconButton
|
||||
icon={state.copied ? "check" : "copy"}
|
||||
variant="secondary"
|
||||
class="rounded-l-none"
|
||||
onClick={copyLink}
|
||||
disabled={state.unshare}
|
||||
aria-label="Copy share link"
|
||||
/>
|
||||
</Tooltip>
|
||||
</Show>
|
||||
<IconButton
|
||||
icon={state.copied ? "check" : "copy"}
|
||||
variant="secondary"
|
||||
class="rounded-l-none"
|
||||
onClick={copyLink}
|
||||
disabled={state.unshare}
|
||||
aria-label="Copy share link"
|
||||
/>
|
||||
</Tooltip>
|
||||
</Show>
|
||||
</div>
|
||||
</Show>
|
||||
</div>
|
||||
|
||||
@@ -37,7 +37,12 @@ export function SortableTab(props: { tab: string; onTabClose: (tab: string) => v
|
||||
value={props.tab}
|
||||
closeButton={
|
||||
<Tooltip value={language.t("common.closeTab")} placement="bottom">
|
||||
<IconButton icon="close" variant="ghost" onClick={() => props.onTabClose(props.tab)} aria-label="Close tab" />
|
||||
<IconButton
|
||||
icon="close"
|
||||
variant="ghost"
|
||||
onClick={() => props.onTabClose(props.tab)}
|
||||
aria-label="Close tab"
|
||||
/>
|
||||
</Tooltip>
|
||||
}
|
||||
hideCloseButton
|
||||
|
||||
@@ -1553,7 +1553,11 @@ export default function Page() {
|
||||
|
||||
{/* Desktop tabs panel (Review + Context + Files) - hidden on mobile */}
|
||||
<Show when={isDesktop() && showTabs()}>
|
||||
<aside id="review-panel" aria-label="Review and files" class="relative flex-1 min-w-0 h-full border-l border-border-weak-base">
|
||||
<aside
|
||||
id="review-panel"
|
||||
aria-label="Review and files"
|
||||
class="relative flex-1 min-w-0 h-full border-l border-border-weak-base"
|
||||
>
|
||||
<DragDropProvider
|
||||
onDragStart={handleDragStart}
|
||||
onDragEnd={handleDragEnd}
|
||||
@@ -1587,7 +1591,12 @@ export default function Page() {
|
||||
value="context"
|
||||
closeButton={
|
||||
<Tooltip value={language.t("common.closeTab")} placement="bottom">
|
||||
<IconButton icon="close" variant="ghost" onClick={() => tabs().close("context")} aria-label="Close context tab" />
|
||||
<IconButton
|
||||
icon="close"
|
||||
variant="ghost"
|
||||
onClick={() => tabs().close("context")}
|
||||
aria-label="Close context tab"
|
||||
/>
|
||||
</Tooltip>
|
||||
}
|
||||
hideCloseButton
|
||||
@@ -1995,7 +2004,13 @@ export default function Page() {
|
||||
keybind={command.keybind("terminal.new")}
|
||||
class="flex items-center"
|
||||
>
|
||||
<IconButton icon="plus-small" variant="ghost" iconSize="large" onClick={terminal.new} aria-label="New terminal" />
|
||||
<IconButton
|
||||
icon="plus-small"
|
||||
variant="ghost"
|
||||
iconSize="large"
|
||||
onClick={terminal.new}
|
||||
aria-label="New terminal"
|
||||
/>
|
||||
</TooltipKeybind>
|
||||
</div>
|
||||
</Tabs.List>
|
||||
|
||||
@@ -40,7 +40,13 @@ export function Dialog(props: DialogProps) {
|
||||
<Switch>
|
||||
<Match when={props.action}>{props.action}</Match>
|
||||
<Match when={true}>
|
||||
<Kobalte.CloseButton data-slot="dialog-close-button" as={IconButton} icon="close" variant="ghost" aria-label="Close" />
|
||||
<Kobalte.CloseButton
|
||||
data-slot="dialog-close-button"
|
||||
as={IconButton}
|
||||
icon="close"
|
||||
variant="ghost"
|
||||
aria-label="Close"
|
||||
/>
|
||||
</Match>
|
||||
</Switch>
|
||||
</div>
|
||||
|
||||
@@ -14,7 +14,13 @@ export function ImagePreview(props: ImagePreviewProps) {
|
||||
<div data-slot="image-preview-container">
|
||||
<Kobalte.Content data-slot="image-preview-content">
|
||||
<div data-slot="image-preview-header">
|
||||
<Kobalte.CloseButton data-slot="image-preview-close" as={IconButton} icon="close" variant="ghost" aria-label="Close" />
|
||||
<Kobalte.CloseButton
|
||||
data-slot="image-preview-close"
|
||||
as={IconButton}
|
||||
icon="close"
|
||||
variant="ghost"
|
||||
aria-label="Close"
|
||||
/>
|
||||
</div>
|
||||
<div data-slot="image-preview-body">
|
||||
<img src={props.src} alt={props.alt ?? i18n.t("ui.imagePreview.alt")} data-slot="image-preview-image" />
|
||||
|
||||
@@ -230,7 +230,12 @@ export function List<T>(props: ListProps<T> & { ref?: (ref: ListRef) => void })
|
||||
/>
|
||||
</div>
|
||||
<Show when={internalFilter()}>
|
||||
<IconButton icon="circle-x" variant="ghost" onClick={() => setInternalFilter("")} aria-label="Clear filter" />
|
||||
<IconButton
|
||||
icon="circle-x"
|
||||
variant="ghost"
|
||||
onClick={() => setInternalFilter("")}
|
||||
aria-label="Clear filter"
|
||||
/>
|
||||
</Show>
|
||||
</div>
|
||||
{searchAction()}
|
||||
|
||||
@@ -2,7 +2,9 @@ import { Popover as Kobalte } from "@kobalte/core/popover"
|
||||
import { ComponentProps, JSXElement, ParentProps, Show, splitProps, ValidComponent } from "solid-js"
|
||||
import { IconButton } from "./icon-button"
|
||||
|
||||
export interface PopoverProps<T extends ValidComponent = "div"> extends ParentProps, Omit<ComponentProps<typeof Kobalte>, "children"> {
|
||||
export interface PopoverProps<T extends ValidComponent = "div">
|
||||
extends ParentProps,
|
||||
Omit<ComponentProps<typeof Kobalte>, "children"> {
|
||||
trigger?: JSXElement
|
||||
triggerAs?: T
|
||||
triggerProps?: ComponentProps<T>
|
||||
@@ -13,7 +15,16 @@ export interface PopoverProps<T extends ValidComponent = "div"> extends ParentPr
|
||||
}
|
||||
|
||||
export function Popover<T extends ValidComponent = "div">(props: PopoverProps<T>) {
|
||||
const [local, rest] = splitProps(props, ["trigger", "triggerAs", "triggerProps", "title", "description", "class", "classList", "children"])
|
||||
const [local, rest] = splitProps(props, [
|
||||
"trigger",
|
||||
"triggerAs",
|
||||
"triggerProps",
|
||||
"title",
|
||||
"description",
|
||||
"class",
|
||||
"classList",
|
||||
"children",
|
||||
])
|
||||
|
||||
return (
|
||||
<Kobalte gutter={4} {...rest}>
|
||||
@@ -32,7 +43,13 @@ export function Popover<T extends ValidComponent = "div">(props: PopoverProps<T>
|
||||
<Show when={local.title}>
|
||||
<div data-slot="popover-header">
|
||||
<Kobalte.Title data-slot="popover-title">{local.title}</Kobalte.Title>
|
||||
<Kobalte.CloseButton data-slot="popover-close-button" as={IconButton} icon="close" variant="ghost" aria-label="Close" />
|
||||
<Kobalte.CloseButton
|
||||
data-slot="popover-close-button"
|
||||
as={IconButton}
|
||||
icon="close"
|
||||
variant="ghost"
|
||||
aria-label="Close"
|
||||
/>
|
||||
</div>
|
||||
</Show>
|
||||
<Show when={local.description}>
|
||||
|
||||
@@ -62,7 +62,16 @@ function ToastActions(props: ComponentProps<"div">) {
|
||||
}
|
||||
|
||||
function ToastCloseButton(props: ToastCloseButtonProps & ComponentProps<"button">) {
|
||||
return <Kobalte.CloseButton data-slot="toast-close-button" as={IconButton} icon="close" variant="ghost" aria-label="Dismiss" {...props} />
|
||||
return (
|
||||
<Kobalte.CloseButton
|
||||
data-slot="toast-close-button"
|
||||
as={IconButton}
|
||||
icon="close"
|
||||
variant="ghost"
|
||||
aria-label="Dismiss"
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
function ToastProgressTrack(props: ComponentProps<typeof Kobalte.ProgressTrack>) {
|
||||
|
||||
Reference in New Issue
Block a user