use of selectable

This commit is contained in:
2026-02-11 21:57:17 -05:00
parent 9a2b790897
commit 72000b362d
10 changed files with 293 additions and 193 deletions

View File

@@ -6,14 +6,12 @@ export function SelectableBox({
selected, selected,
children, children,
...props ...props
}: { }: { selected: () => boolean; children: JSXElement } & BoxOptions) {
selected: () => boolean;
children: JSXElement;
} & BoxOptions) {
const { theme } = useTheme(); const { theme } = useTheme();
return ( return (
<box <box
border={!!props.border}
borderColor={selected() ? theme.surface : theme.border} borderColor={selected() ? theme.surface : theme.border}
backgroundColor={selected() ? theme.primary : theme.surface} backgroundColor={selected() ? theme.primary : theme.surface}
{...props} {...props}

View File

@@ -8,6 +8,7 @@ import { useDiscoverStore, DISCOVER_CATEGORIES } from "@/stores/discover";
import { useTheme } from "@/context/ThemeContext"; import { useTheme } from "@/context/ThemeContext";
import { PodcastCard } from "./PodcastCard"; import { PodcastCard } from "./PodcastCard";
import { PageProps } from "@/App"; import { PageProps } from "@/App";
import { SelectableBox, SelectableText } from "@/components/Selectable";
enum DiscoverPagePaneType { enum DiscoverPagePaneType {
CATEGORIES = 1, CATEGORIES = 1,
@@ -61,15 +62,17 @@ export function DiscoverPage(props: PageProps) {
discoverStore.selectedCategory() === category.id; discoverStore.selectedCategory() === category.id;
return ( return (
<box <SelectableBox
border={isSelected()} selected={isSelected}
backgroundColor={isSelected() ? theme.accent : undefined}
onMouseDown={() => handleCategorySelect(category.id)} onMouseDown={() => handleCategorySelect(category.id)}
> >
<text fg={isSelected() ? theme.primary : theme.textMuted}> <SelectableText
selected={isSelected}
fg={theme.primary}
>
{category.icon} {category.name} {category.icon} {category.name}
</text> </SelectableText>
</box> </SelectableBox>
); );
}} }}
</For> </For>

View File

@@ -5,6 +5,7 @@
import { Show, For } from "solid-js"; import { Show, For } from "solid-js";
import type { Podcast } from "@/types/podcast"; import type { Podcast } from "@/types/podcast";
import { useTheme } from "@/context/ThemeContext"; import { useTheme } from "@/context/ThemeContext";
import { SelectableBox, SelectableText } from "@/components/Selectable";
type PodcastCardProps = { type PodcastCardProps = {
podcast: Podcast; podcast: Podcast;
@@ -21,17 +22,16 @@ export function PodcastCard(props: PodcastCardProps) {
}; };
return ( return (
<box <SelectableBox
selected={() => props.selected}
flexDirection="column" flexDirection="column"
padding={1} padding={1}
backgroundColor={props.selected ? theme.backgroundElement : undefined}
onMouseDown={props.onSelect} onMouseDown={props.onSelect}
> >
{/* Title Row */}
<box flexDirection="row" gap={2} alignItems="center"> <box flexDirection="row" gap={2} alignItems="center">
<text fg={props.selected ? theme.primary : theme.text}> <SelectableText selected={() => props.selected}>
<strong>{props.podcast.title}</strong> <strong>{props.podcast.title}</strong>
</text> </SelectableText>
<Show when={props.podcast.isSubscribed}> <Show when={props.podcast.isSubscribed}>
<text fg={theme.success}>[+]</text> <text fg={theme.success}>[+]</text>
@@ -40,24 +40,31 @@ export function PodcastCard(props: PodcastCardProps) {
{/* Author */} {/* Author */}
<Show when={props.podcast.author && !props.compact}> <Show when={props.podcast.author && !props.compact}>
<text fg={theme.textMuted}>by {props.podcast.author}</text> <SelectableText
selected={() => props.selected}
fg={theme.textMuted}
>
by {props.podcast.author}
</SelectableText>
</Show> </Show>
{/* Description */} {/* Description */}
<Show when={props.podcast.description && !props.compact}> <Show when={props.podcast.description && !props.compact}>
<text fg={props.selected ? theme.text : theme.textMuted}> <SelectableText
selected={() => props.selected}
fg={theme.text}
>
{props.podcast.description!.length > 80 {props.podcast.description!.length > 80
? props.podcast.description!.slice(0, 80) + "..." ? props.podcast.description!.slice(0, 80) + "..."
: props.podcast.description} : props.podcast.description}
</text> </SelectableText>
</Show> </Show>
{/* Categories and Subscribe Button */} {/**<box
<box
flexDirection="row" flexDirection="row"
justifyContent="space-between" justifyContent="space-between"
marginTop={props.compact ? 0 : 1} marginTop={props.compact ? 0 : 1}
> />**/}
<box flexDirection="row" gap={1}> <box flexDirection="row" gap={1}>
<Show when={(props.podcast.categories ?? []).length > 0}> <Show when={(props.podcast.categories ?? []).length > 0}>
<For each={(props.podcast.categories ?? []).slice(0, 2)}> <For each={(props.podcast.categories ?? []).slice(0, 2)}>
@@ -73,7 +80,6 @@ export function PodcastCard(props: PodcastCardProps) {
</text> </text>
</box> </box>
</Show> </Show>
</box> </SelectableBox>
</box>
); );
} }

View File

@@ -9,6 +9,7 @@ import type { Feed } from "@/types/feed";
import type { Episode } from "@/types/episode"; import type { Episode } from "@/types/episode";
import { format } from "date-fns"; import { format } from "date-fns";
import { useTheme } from "@/context/ThemeContext"; import { useTheme } from "@/context/ThemeContext";
import { SelectableBox, SelectableText } from "@/components/Selectable";
interface FeedDetailProps { interface FeedDetailProps {
feed: Feed; feed: Feed;
@@ -139,11 +140,11 @@ export function FeedDetail(props: FeedDetailProps) {
<scrollbox height={showInfo() ? 10 : 15} focused={props.focused}> <scrollbox height={showInfo() ? 10 : 15} focused={props.focused}>
<For each={episodes()}> <For each={episodes()}>
{(episode, index) => ( {(episode, index) => (
<box <SelectableBox
selected={() => index() === selectedIndex()}
flexDirection="column" flexDirection="column"
gap={0} gap={0}
padding={1} padding={1}
backgroundColor={index() === selectedIndex() ? theme.backgroundElement : undefined}
onMouseDown={() => { onMouseDown={() => {
setSelectedIndex(index()); setSelectedIndex(index());
if (props.onPlayEpisode) { if (props.onPlayEpisode) {
@@ -151,20 +152,24 @@ export function FeedDetail(props: FeedDetailProps) {
} }
}} }}
> >
<box flexDirection="row" gap={1}> <SelectableText
<text fg={index() === selectedIndex() ? theme.primary : theme.textMuted}> selected={() => index() === selectedIndex()}
fg={theme.primary}
>
{index() === selectedIndex() ? ">" : " "} {index() === selectedIndex() ? ">" : " "}
</text> </SelectableText>
<text fg={index() === selectedIndex() ? theme.text : undefined}> <SelectableText
selected={() => index() === selectedIndex()}
fg={theme.text}
>
{episode.episodeNumber ? `#${episode.episodeNumber} - ` : ""} {episode.episodeNumber ? `#${episode.episodeNumber} - ` : ""}
{episode.title} {episode.title}
</text> </SelectableText>
</box>
<box flexDirection="row" gap={2} paddingLeft={2}> <box flexDirection="row" gap={2} paddingLeft={2}>
<text fg={theme.textMuted}>{formatDate(episode.pubDate)}</text> <text fg={theme.textMuted}>{formatDate(episode.pubDate)}</text>
<text fg={theme.textMuted}>{formatDuration(episode.duration)}</text> <text fg={theme.textMuted}>{formatDuration(episode.duration)}</text>
</box> </box>
</box> </SelectableBox>
)} )}
</For> </For>
</scrollbox> </scrollbox>

View File

@@ -6,6 +6,7 @@
import type { Feed, FeedVisibility } from "@/types/feed"; import type { Feed, FeedVisibility } from "@/types/feed";
import { format } from "date-fns"; import { format } from "date-fns";
import { useTheme } from "@/context/ThemeContext"; import { useTheme } from "@/context/ThemeContext";
import { SelectableBox, SelectableText } from "@/components/Selectable";
interface FeedItemProps { interface FeedItemProps {
feed: Feed; feed: Feed;
@@ -43,70 +44,111 @@ export function FeedItem(props: FeedItemProps) {
if (props.compact) { if (props.compact) {
// Compact single-line view // Compact single-line view
return ( return (
<box <SelectableBox
selected={() => props.isSelected}
flexDirection="row" flexDirection="row"
gap={1} gap={1}
backgroundColor={props.isSelected ? theme.backgroundElement : undefined}
paddingLeft={1} paddingLeft={1}
paddingRight={1} paddingRight={1}
onMouseDown={() => {}}
>
<SelectableText
selected={() => props.isSelected}
fg={theme.primary}
> >
<text fg={props.isSelected ? theme.primary : theme.textMuted}>
{props.isSelected ? ">" : " "} {props.isSelected ? ">" : " "}
</text> </SelectableText>
<text fg={visibilityColor()}>{visibilityIcon()}</text> <SelectableText
<text fg={props.isSelected ? theme.text : theme.accent}> selected={() => props.isSelected}
fg={visibilityColor()}
>
{visibilityIcon()}
</SelectableText>
<SelectableText
selected={() => props.isSelected}
fg={theme.text}
>
{props.feed.customName || props.feed.podcast.title} {props.feed.customName || props.feed.podcast.title}
</text> </SelectableText>
{props.showEpisodeCount && ( {props.showEpisodeCount && (
<text fg={theme.textMuted}>({episodeCount()})</text> <SelectableText
selected={() => props.isSelected}
fg={theme.textMuted}
>
({episodeCount()})
</SelectableText>
)} )}
</box> </SelectableBox>
); );
} }
// Full view with details // Full view with details
return ( return (
<box <SelectableBox
selected={() => props.isSelected}
flexDirection="column" flexDirection="column"
gap={0} gap={0}
border={props.isSelected}
borderColor={props.isSelected ? theme.primary : undefined}
backgroundColor={props.isSelected ? theme.primary : undefined}
padding={1} padding={1}
onMouseDown={() => {}}
> >
{/* Title row */} {/* Title row */}
<box flexDirection="row" gap={1}> <box flexDirection="row" gap={1}>
<text fg={props.isSelected ? theme.primary : theme.textMuted}> <SelectableText
selected={() => props.isSelected}
fg={theme.primary}
>
{props.isSelected ? ">" : " "} {props.isSelected ? ">" : " "}
</text> </SelectableText>
<text fg={visibilityColor()}>{visibilityIcon()}</text> <SelectableText
<text fg={theme.warning}>{pinnedIndicator()}</text> selected={() => props.isSelected}
<text fg={props.isSelected ? theme.text : theme.text}> fg={visibilityColor()}
>
{visibilityIcon()}
</SelectableText>
<SelectableText
selected={() => props.isSelected}
fg={theme.warning}
>
{pinnedIndicator()}
</SelectableText>
<SelectableText
selected={() => props.isSelected}
fg={theme.text}
>
<strong>{props.feed.customName || props.feed.podcast.title}</strong> <strong>{props.feed.customName || props.feed.podcast.title}</strong>
</text> </SelectableText>
</box> </box>
<box flexDirection="row" gap={2} paddingLeft={4}> <box flexDirection="row" gap={2} paddingLeft={4}>
{props.showEpisodeCount && ( {props.showEpisodeCount && (
<text fg={theme.textMuted}> <SelectableText
selected={() => props.isSelected}
fg={theme.textMuted}
>
{episodeCount()} episodes ({unplayedCount()} new) {episodeCount()} episodes ({unplayedCount()} new)
</text> </SelectableText>
)} )}
{props.showLastUpdated && ( {props.showLastUpdated && (
<text fg={theme.textMuted}> <SelectableText
selected={() => props.isSelected}
fg={theme.textMuted}
>
Updated: {formatDate(props.feed.lastUpdated)} Updated: {formatDate(props.feed.lastUpdated)}
</text> </SelectableText>
)} )}
</box> </box>
{props.feed.podcast.description && ( {props.feed.podcast.description && (
<box paddingLeft={4} paddingTop={0}> <SelectableText
<text fg={theme.textMuted}> selected={() => props.isSelected}
paddingLeft={4}
paddingTop={0}
fg={theme.textMuted}
>
{props.feed.podcast.description.slice(0, 60)} {props.feed.podcast.description.slice(0, 60)}
{props.feed.podcast.description.length > 60 ? "..." : ""} {props.feed.podcast.description.length > 60 ? "..." : ""}
</text> </SelectableText>
</box>
)} )}
</box> </SelectableBox>
); );
} }

View File

@@ -10,6 +10,7 @@ import type { Episode } from "@/types/episode";
import type { Feed } from "@/types/feed"; import type { Feed } from "@/types/feed";
import { useTheme } from "@/context/ThemeContext"; import { useTheme } from "@/context/ThemeContext";
import { PageProps } from "@/App"; import { PageProps } from "@/App";
import { SelectableBox, SelectableText } from "@/components/Selectable";
enum FeedPaneType { enum FeedPaneType {
FEED = 1, FEED = 1,
@@ -27,6 +28,18 @@ export function FeedPage(props: PageProps) {
return format(date, "MMM d, yyyy"); return format(date, "MMM d, yyyy");
}; };
const episodesByDate = () => {
const groups: Record<string, { episode: Episode; feed: Feed }> = {};
const sortedEpisodes = allEpisodes();
for (const episode of sortedEpisodes) {
const dateKey = formatDate(new Date(episode.episode.pubDate));
groups[dateKey] = episode;
}
return groups;
};
const formatDuration = (seconds: number): string => { const formatDuration = (seconds: number): string => {
const mins = Math.floor(seconds / 60); const mins = Math.floor(seconds / 60);
const hrs = Math.floor(mins / 60); const hrs = Math.floor(mins / 60);
@@ -63,36 +76,43 @@ export function FeedPage(props: PageProps) {
</box> </box>
} }
> >
{/**TODO: figure out wtf to do here **/}
<scrollbox height="100%" focused={props.depth() == FeedPaneType.FEED}> <scrollbox height="100%" focused={props.depth() == FeedPaneType.FEED}>
<For each={allEpisodes()}> <For each={Object.entries(episodesByDate()).sort(([a], [b]) => b.localeCompare(a))}>
{(item, index) => ( {([date, episode], groupIndex) => (
<box <>
<box flexDirection="column" gap={0} paddingLeft={1} paddingRight={1} paddingTop={1} paddingBottom={1}>
<text fg={theme.primary}>{date}</text>
</box>
<SelectableBox
selected={() => groupIndex() === selectedIndex()}
flexDirection="column" flexDirection="column"
gap={0} gap={0}
paddingLeft={1} paddingLeft={1}
paddingRight={1} paddingRight={1}
paddingTop={0} paddingTop={0}
paddingBottom={0} paddingBottom={0}
backgroundColor={ onMouseDown={() => setSelectedIndex(groupIndex())}
index() === selectedIndex() ? theme.backgroundElement : undefined
}
onMouseDown={() => setSelectedIndex(index())}
> >
<box flexDirection="row" gap={1}> <SelectableText selected={() => groupIndex() === selectedIndex()}>
<text fg={index() === selectedIndex() ? theme.primary : theme.textMuted}> {groupIndex() === selectedIndex() ? ">" : " "}
{index() === selectedIndex() ? ">" : " "} </SelectableText>
</text> <SelectableText
<text fg={index() === selectedIndex() ? theme.text : theme.text}> selected={() => groupIndex() === selectedIndex()}
{item.episode.title} fg={theme.text}
</text> >
</box> {episode.episode.title}
</SelectableText>
<box flexDirection="row" gap={2} paddingLeft={2}> <box flexDirection="row" gap={2} paddingLeft={2}>
<text fg={theme.primary}>{item.feed.podcast.title}</text> <text fg={theme.primary}>{episode.feed.podcast.title}</text>
<text fg={theme.textMuted}>{formatDate(item.episode.pubDate)}</text> <text fg={theme.textMuted}>
<text fg={theme.textMuted}>{formatDuration(item.episode.duration)}</text> {formatDate(episode.episode.pubDate)}
</box> </text>
<text fg={theme.textMuted}>
{formatDuration(episode.episode.duration)}
</text>
</box> </box>
</SelectableBox>
</>
)} )}
</For> </For>
</scrollbox> </scrollbox>

View File

@@ -2,6 +2,7 @@ import { Show } from "solid-js";
import type { SearchResult } from "@/types/source"; import type { SearchResult } from "@/types/source";
import { SourceBadge } from "./SourceBadge"; import { SourceBadge } from "./SourceBadge";
import { useTheme } from "@/context/ThemeContext"; import { useTheme } from "@/context/ThemeContext";
import { SelectableBox, SelectableText } from "@/components/Selectable";
type ResultCardProps = { type ResultCardProps = {
result: SearchResult; result: SearchResult;
@@ -15,12 +16,10 @@ export function ResultCard(props: ResultCardProps) {
const podcast = () => props.result.podcast; const podcast = () => props.result.podcast;
return ( return (
<box <SelectableBox
selected={() => props.selected}
flexDirection="column" flexDirection="column"
padding={1} padding={1}
border={props.selected}
borderColor={props.selected ? theme.primary : undefined}
backgroundColor={props.selected ? theme.backgroundElement : undefined}
onMouseDown={props.onSelect} onMouseDown={props.onSelect}
> >
<box <box
@@ -29,9 +28,12 @@ export function ResultCard(props: ResultCardProps) {
alignItems="center" alignItems="center"
> >
<box flexDirection="row" gap={2} alignItems="center"> <box flexDirection="row" gap={2} alignItems="center">
<text fg={props.selected ? theme.primary : theme.text}> <SelectableText
selected={() => props.selected}
fg={theme.primary}
>
<strong>{podcast().title}</strong> <strong>{podcast().title}</strong>
</text> </SelectableText>
<SourceBadge <SourceBadge
sourceId={props.result.sourceId} sourceId={props.result.sourceId}
sourceName={props.result.sourceName} sourceName={props.result.sourceName}
@@ -44,16 +46,24 @@ export function ResultCard(props: ResultCardProps) {
</box> </box>
<Show when={podcast().author}> <Show when={podcast().author}>
<text fg={theme.textMuted}>by {podcast().author}</text> <SelectableText
selected={() => props.selected}
fg={theme.textMuted}
>
by {podcast().author}
</SelectableText>
</Show> </Show>
<Show when={podcast().description}> <Show when={podcast().description}>
{(description) => ( {(description) => (
<text fg={props.selected ? theme.text : theme.textMuted}> <SelectableText
selected={() => props.selected}
fg={theme.text}
>
{description().length > 120 {description().length > 120
? description().slice(0, 120) + "..." ? description().slice(0, 120) + "..."
: description()} : description()}
</text> </SelectableText>
)} )}
</Show> </Show>
@@ -80,6 +90,6 @@ export function ResultCard(props: ResultCardProps) {
<text fg={theme.primary}>[+] Add to Feeds</text> <text fg={theme.primary}>[+] Add to Feeds</text>
</box> </box>
</Show> </Show>
</box> </SelectableBox>
); );
} }

View File

@@ -4,6 +4,7 @@
import { For, Show } from "solid-js" import { For, Show } from "solid-js"
import { useTheme } from "@/context/ThemeContext" import { useTheme } from "@/context/ThemeContext"
import { SelectableBox, SelectableText } from "@/components/Selectable"
type SearchHistoryProps = { type SearchHistoryProps = {
history: string[] history: string[]
@@ -52,23 +53,31 @@ export function SearchHistory(props: SearchHistoryProps) {
const isSelected = () => index() === props.selectedIndex && props.focused const isSelected = () => index() === props.selectedIndex && props.focused
return ( return (
<box <SelectableBox
selected={isSelected}
flexDirection="row" flexDirection="row"
justifyContent="space-between" justifyContent="space-between"
padding={0} padding={0}
paddingLeft={1} paddingLeft={1}
paddingRight={1} paddingRight={1}
backgroundColor={isSelected() ? theme.backgroundElement : undefined}
onMouseDown={() => handleSearchClick(index(), query)} onMouseDown={() => handleSearchClick(index(), query)}
> >
<box flexDirection="row" gap={1}> <SelectableText
<text fg={theme.textMuted}>{">"}</text> selected={isSelected}
<text fg={isSelected() ? theme.primary : theme.text}>{query}</text> fg={theme.textMuted}
</box> >
{">"}
</SelectableText>
<SelectableText
selected={isSelected}
fg={theme.primary}
>
{query}
</SelectableText>
<box onMouseDown={() => handleRemoveClick(query)} padding={0}> <box onMouseDown={() => handleRemoveClick(query)} padding={0}>
<text fg={theme.error}>[x]</text> <text fg={theme.error}>[x]</text>
</box> </box>
</box> </SelectableBox>
) )
}} }}
</For> </For>

View File

@@ -8,6 +8,7 @@ import { useFeedStore } from "@/stores/feed";
import { useTheme } from "@/context/ThemeContext"; import { useTheme } from "@/context/ThemeContext";
import { SourceType } from "@/types/source"; import { SourceType } from "@/types/source";
import type { PodcastSource } from "@/types/source"; import type { PodcastSource } from "@/types/source";
import { SelectableBox, SelectableText } from "@/components/Selectable";
interface SourceManagerProps { interface SourceManagerProps {
focused?: boolean; focused?: boolean;
@@ -186,15 +187,11 @@ export function SourceManager(props: SourceManagerProps) {
<scrollbox height={6}> <scrollbox height={6}>
<For each={sources()}> <For each={sources()}>
{(source, index) => ( {(source, index) => (
<box <SelectableBox
selected={() => focusArea() === "list" && index() === selectedIndex()}
flexDirection="row" flexDirection="row"
gap={1} gap={1}
padding={0} padding={0}
backgroundColor={
focusArea() === "list" && index() === selectedIndex()
? theme.primary
: undefined
}
onMouseDown={() => { onMouseDown={() => {
setSelectedIndex(index()); setSelectedIndex(index());
setFocusArea("list"); setFocusArea("list");
@@ -212,20 +209,13 @@ export function SourceManager(props: SourceManagerProps) {
? ">" ? ">"
: " "} : " "}
</text> </text>
<text fg={source.enabled ? theme.success : theme.error}> <SelectableText
{source.enabled ? "[x]" : "[ ]"} selected={() => focusArea() === "list" && index() === selectedIndex()}
</text> fg={theme.text}
<text fg={theme.accent}>{getSourceIcon(source)}</text>
<text
fg={
focusArea() === "list" && index() === selectedIndex()
? theme.text
: undefined
}
> >
{source.name} {source.name}
</text> </SelectableText>
</box> </SelectableBox>
)} )}
</For> </For>
</scrollbox> </scrollbox>

View File

@@ -15,6 +15,7 @@ import { useDialog } from "./dialog";
import { useTheme } from "../context/ThemeContext"; import { useTheme } from "../context/ThemeContext";
import { TextAttributes } from "@opentui/core"; import { TextAttributes } from "@opentui/core";
import { emit } from "../utils/event-bus"; import { emit } from "../utils/event-bus";
import { SelectableBox, SelectableText } from "@/components/Selectable";
/** /**
* Command option for the command palette. * Command option for the command palette.
@@ -281,15 +282,22 @@ function CommandDialog(props: {
<box flexDirection="column" maxHeight={maxHeight} borderColor={theme.border}> <box flexDirection="column" maxHeight={maxHeight} borderColor={theme.border}>
<For each={filteredOptions().slice(0, 10)}> <For each={filteredOptions().slice(0, 10)}>
{(option, index) => ( {(option, index) => (
<box <SelectableBox
backgroundColor={ selected={() => index() === selectedIndex()}
index() === selectedIndex() ? theme.primary : undefined flexDirection="column"
}
padding={1} padding={1}
onMouseDown={() => {
setSelectedIndex(index());
const selectedOption = filteredOptions()[index()];
if (selectedOption) {
selectedOption.onSelect?.(dialog);
dialog.clear();
}
}}
> >
<box flexDirection="column" flexGrow={1}> <box flexDirection="column" flexGrow={1}>
<box flexDirection="row" justifyContent="space-between"> <SelectableText
<text selected={() => index() === selectedIndex()}
fg={ fg={
index() === selectedIndex() index() === selectedIndex()
? theme.selectedListItemText ? theme.selectedListItemText
@@ -302,16 +310,25 @@ function CommandDialog(props: {
} }
> >
{option.title} {option.title}
</text> </SelectableText>
<Show when={option.footer}> <Show when={option.footer}>
<text fg={theme.textMuted}>{option.footer}</text> <SelectableText
selected={() => index() === selectedIndex()}
fg={theme.textMuted}
>
{option.footer}
</SelectableText>
</Show> </Show>
</box>
<Show when={option.description}> <Show when={option.description}>
<text fg={theme.textMuted}>{option.description}</text> <SelectableText
selected={() => index() === selectedIndex()}
fg={theme.textMuted}
>
{option.description}
</SelectableText>
</Show> </Show>
</box> </box>
</box> </SelectableBox>
)} )}
</For> </For>
<Show when={filteredOptions().length === 0}> <Show when={filteredOptions().length === 0}>