@adea-ai/ui 0.135.1 → 0.137.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/dist/components/composites/tree/index.d.ts +1 -1
- package/dist/components/composites/tree/index.d.ts.map +1 -1
- package/dist/components/composites/tree/tree.d.ts +45 -1
- package/dist/components/composites/tree/tree.d.ts.map +1 -1
- package/dist/components/composites/tree/tree.js +52 -2
- package/dist/components/composites/tree/tree.js.map +1 -1
- package/dist/components/ui/callout/callout.d.ts +72 -0
- package/dist/components/ui/callout/callout.d.ts.map +1 -0
- package/dist/components/ui/callout/callout.js +123 -0
- package/dist/components/ui/callout/callout.js.map +1 -0
- package/dist/components/ui/callout/index.d.ts +2 -0
- package/dist/components/ui/callout/index.d.ts.map +1 -0
- package/dist/components/ui/callout/index.js +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/r/callout.json +22 -0
- package/dist/r/registry.json +22 -0
- package/dist/r/src/components/composites/tree/index.ts +8 -1
- package/dist/r/src/components/composites/tree/tree.tsx +98 -7
- package/dist/r/src/components/ui/callout/callout.tsx +115 -0
- package/dist/r/src/components/ui/callout/index.ts +1 -0
- package/package.json +1 -1
- package/registry.json +22 -0
- package/src/components/composites/tree/index.ts +8 -1
- package/src/components/composites/tree/tree.tsx +98 -7
- package/src/components/ui/callout/callout.tsx +115 -0
- package/src/components/ui/callout/index.ts +1 -0
- package/src/index.ts +1 -0
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,cAAc,2BAA2B,CAAA;AACzC,cAAc,uBAAuB,CAAA;AACrC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,oCAAoC,CAAA;AAClD,cAAc,8BAA8B,CAAA;AAC5C,cAAc,wBAAwB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AO,EACL,0BAA0B,EAC1B,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,KAAK,kBAAkB,EACvB,KAAK,YAAY,GAClB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,wBAAwB,EACxB,gBAAgB,EAChB,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,EACd,oBAAoB,EACpB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,qBAAqB,GAC3B,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,SAAS,EAAE,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACpD,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAC3F,OAAO,EACL,aAAa,EACb,SAAS,EACT,WAAW,EACX,aAAa,EACb,YAAY,EACZ,eAAe,EACf,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,wBAAwB,EACxB,YAAY,EACZ,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,SAAS,GACf,MAAM,cAAc,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -14,6 +14,7 @@ import { Button, buttonVariants } from "./components/ui/button/button.js";
|
|
|
14
14
|
import { Separator } from "./components/ui/separator/separator.js";
|
|
15
15
|
import { ButtonGroup, ButtonGroupSeparator, ButtonGroupText } from "./components/ui/button-group/button-group.js";
|
|
16
16
|
import { CalendarSurface, DatePicker } from "./components/ui/calendar/calendar.js";
|
|
17
|
+
import { Callout, CalloutTitle, calloutVariants } from "./components/ui/callout/callout.js";
|
|
17
18
|
import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, cardVariants } from "./components/ui/card/card.js";
|
|
18
19
|
import { Checkbox, CheckboxDescription, CheckboxLabel } from "./components/ui/checkbox/checkbox.js";
|
|
19
20
|
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "./components/ui/collapsible/collapsible.js";
|
|
@@ -145,4 +146,4 @@ import { AboutDialog } from "./components/composites/about-dialog/about-dialog.j
|
|
|
145
146
|
import { HelpCenter } from "./components/composites/help-center/help-center.js";
|
|
146
147
|
import { WorkspaceMark } from "./components/composites/workspace-mark/workspace-mark.js";
|
|
147
148
|
import { writeClipboardText } from "./lib/clipboard.js";
|
|
148
|
-
export { APPEARANCE_EDITOR_FONT_AXES, APPEARANCE_EDITOR_FONT_SIZE_MAX, APPEARANCE_EDITOR_FONT_SIZE_MIN, AboutDialog, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AccountMenu, ActionButton, Alert, AlertAction, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AnnotationSurface, AppShell, AppShellBody, AppShellContent, AppShellMain, AppearanceEditor, AppearanceEditorActions, AppearanceFontSettingsGroup, AppearancePanel, AppearancePopover, AspectRatio, AttachmentCard, Avatar, AvatarFallback, AvatarImage, Badge, Board, BoardCardBody, BoardCardTitle, BoardCardTrigger, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, BusySendButton, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, CalendarSurface, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CatalogBrowser, CatalogDetail, CatalogDetailSection, ChatComposer, Checkbox, CheckboxDescription, CheckboxLabel, CodeBlock, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxClear, ComboboxContent, ComboboxControl, ComboboxInput, ComboboxItem, ComboboxSection, ComboboxTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandHint, CommandInput, CommandItem, CommandList, CommandLoading, CommandSeparator, CommandShortcut, CommandStatus, ComposerAttachmentButton, ComposerHint, ComposerMenu, ComposerMenuItem, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, ContextualSidebar, ConversationAvatar, ConversationPane, ConversationSurface, DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS, DatePicker, DetailPanel, DetailPanelBody, DetailPanelField, DetailPanelHeader, DetailPanelSection, Dialog, DialogClose, DialogCloseButton, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffBlock, DiffSummary, Drawer, DrawerBody, DrawerCloseButton, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, EmptyTitle, EntityIcon, FLOATING_PREVIEW_CORNER_RADIUS, FLOATING_PREVIEW_EDGE_GAP, Field, FieldDescription, FieldError, FieldGroup, FieldInput, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTextArea, FloatingPreview, FormField, Heading, HelpCenter, HoverCard, HoverCardContent, HoverCardTrigger, InlineCode, Input, InputControl, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputOtp, InputOtpCaret, Item, ItemDescription, ItemEmpty, ItemGroup, ItemGroupEntry, ItemTitle, Kbd, KbdChord, KbdGroup, Label, ListGroup, ListRow, ListRowControl, MAX_LAYOUT_DEPTH, MAX_LAYOUT_LEAVES, MAX_SPLIT_RATIO, MIN_SPLIT_RATIO, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MessageBody, MessageComposer, MessageDayDivider, MessageGroup, MessageRow, ModalDialog, Motion, NO_FLOATING_PREVIEW_OBSTACLES, NO_PREVIEW_MINI_PLAYER_OBSTACLES, NativeSelect, NavigationMenu, NavigationMenuContent, NavigationMenuGroup, NavigationMenuGroupLabel, NavigationMenuItem, NavigationMenuMenu, NavigationMenuSeparator, NavigationMenuTrigger, NavigationMenuViewport, NumberField, OrbitItem, OrbitLayout, PASTE_THRESHOLD_CHARS, PASTE_THRESHOLD_LINES, PASTE_TOKEN_REGEX, PREVIEW_MINI_PLAYER_CORNER_RADIUS, PREVIEW_MINI_PLAYER_EDGE_GAP, Page, PageHeader, PageHeaderActions, PageHeaderContent, PageHeaderDescription, PageHeaderTitle, PageSection, Pagination, PaginationEllipsis, PaginationItem, PaginationNext, PaginationPrevious, PalettePreview, Panel, PanelActions, PanelBody, PanelCard, PanelDescription, PanelFooter, PanelHeader, PanelPlaceholder, PanelTitle, PanelToolbar, PixelResizeHandle, Popover, PopoverAnchor, PopoverCloseButton, PopoverContent, PopoverDescription, PopoverTitle, PopoverTrigger, Presence, Progress, PropertyList, PropertyRow, PropertyTerm, PropertyValue, REDUCED_TRANSPARENCY_QUERY, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, SceneControls, ScrollArea, SecretInputGroup, Select, SelectChevronsUpDown, SelectContent, SelectItem, SelectLabel, SelectSection, SelectTrigger, SelectValue, Separator, SettingsField, SettingsLayout, SettingsNavigation, SettingsPage, SettingsRow, SettingsSection, Sheet, SheetBody, SheetCloseButton, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, SideRail, SideRailButton, SideRailContent, SideRailFooter, SideRailHeader, SideRailItem, SideRailSection, SidebarNav, SidebarNavButton, SidebarNavContent, SidebarNavFooter, SidebarNavHeader, SidebarNavItem, SidebarNavLabel, SidebarNavResizeHandle, SidebarNavRow, SidebarNavSection, SidebarNavTitle, Skeleton, SkipLink, Slider, Spinner, SplitLayout, Stat, StatGroup, StatusBar, StatusBarItem, StatusBarSpacer, StatusChip, StatusList, Switch, SwitchDescription, SwitchLabel, TALL_CODE_BLOCK_PX, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableNumericCell, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Text, TextLink, Textarea, ThemeMiniature, ThemeMiniatureSplit, ThemeModeToggle, ThemePicker, ThemePreview, ThemeProvider, ThemeSwatch, ThemeToggle, ThreadPanel, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TopBar, TopBarBreadcrumb, TopBarPill, TopBarSearch, TopBarSection, TopBarTitle, TranscriptComposition, Tree, TreeRow, TreeRowActions, UpdateChannelControl, UpdateDialog, ValueCombobox, VirtualWindow, WorkspaceMark, accentPresets, alertVariants, allTokens, appearancePreviewThemes, applyAppearanceFontSettings, badgeVariants, boardCardTitleVariants, builtinThemes, buttonVariants, cardVariants, clampFloatingPreviewPosition, clampPreviewMiniPlayerPosition, closePane, cn, colorTokens, computeLayoutFrames, contrastRatio, controlInteractive, controlSize, controlSizeIcon, controlSizes, countLeaves, countLines, createAppMenuItems, createLayoutState, createVersionedPersistence, cva, defaultDarkThemeId, defaultLightThemeId, defaultPreferenceStorage, defaultThemeSelection, densityTokens, designTokens, diffLineVariants, diffStats, diffTargetPath, editorPaletteFor, elevationTokens, entityIconVariants, expandAll, findTokenRanges, focusPane, fontOptions, fontSettingsBootstrapScript, fontZoomShortcut, formatBytes, formatReleaseDate, formatToken, headingElement, headingVariants, initialsFrom, inlineScriptLiteral, isCustomAccent, isPasteBlock, isThemeAccentId, itemVariants, kbdChordKeys, kbdGroupVariants, kbdVariants, keyedRows, layoutDepth, listLeaves, localStoragePersistence, monogram, motionTokens, movePane, neighborLeaf, nextSeq, normalizeAppearanceEditorFontSettings, normalizeAppearanceEditorFontSize, normalizeCustomAccent, normalizeLayout, normalizeSurface, paintAccentRoles, parseDiff, plainTextFromMarkdown, platformModifierKey, pruneBlocks, quarantineRecord, radiusTokens, readLegacyValue, readVersionedRecord, recollapsePastes, recoveryEnvelope, recoveryKeyFor, remapCarriedBlocks, resizeFloatingPreview, resizePreviewMiniPlayer, resizeSplit, resolveAccentPreset, resolveAccentRoles, resolveFloatingPreviewFrame, resolvePreviewMiniPlayerFrame, resolveSurface, resolveSurfaceState, resolveVariant, resolvedDensity, searchShortcutKeyshortcuts, searchShortcutLabel, sheetVariants, shouldCollapse, sidebarNavItemClass, sidebarNavItemStateClass, splitPane, splitPaneBalanced, statusDotVariants, stepAppearanceFontSizes, stripTrailingBlankLines, surfaceAlpha, surfaceInteractive, swapPanes, terminalCssVariables, textElement, textVariants, textareaVariants, themeAccentsFor, themeById, themeCssVariables, themeFamilies, themeRecordById, themeRecords, themeScript, themeSurfaces, themesForAppearance, toast, toaster, toggleVariants, tokenRangeAt, tokensAsHex, transcriptDisclosureKey, typographyTokens, undoClosePane, undocumentedTokenAliases, useOptionalTheme, useSideRail, useTheme, validateTheme, validateThemeRegistry, variantFromRecord, withAccent, writeClipboardText, writeVersionedRecord, zIndexTokens };
|
|
149
|
+
export { APPEARANCE_EDITOR_FONT_AXES, APPEARANCE_EDITOR_FONT_SIZE_MAX, APPEARANCE_EDITOR_FONT_SIZE_MIN, AboutDialog, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AccountMenu, ActionButton, Alert, AlertAction, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AnnotationSurface, AppShell, AppShellBody, AppShellContent, AppShellMain, AppearanceEditor, AppearanceEditorActions, AppearanceFontSettingsGroup, AppearancePanel, AppearancePopover, AspectRatio, AttachmentCard, Avatar, AvatarFallback, AvatarImage, Badge, Board, BoardCardBody, BoardCardTitle, BoardCardTrigger, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, BusySendButton, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, CalendarSurface, Callout, CalloutTitle, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CatalogBrowser, CatalogDetail, CatalogDetailSection, ChatComposer, Checkbox, CheckboxDescription, CheckboxLabel, CodeBlock, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxClear, ComboboxContent, ComboboxControl, ComboboxInput, ComboboxItem, ComboboxSection, ComboboxTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandHint, CommandInput, CommandItem, CommandList, CommandLoading, CommandSeparator, CommandShortcut, CommandStatus, ComposerAttachmentButton, ComposerHint, ComposerMenu, ComposerMenuItem, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, ContextualSidebar, ConversationAvatar, ConversationPane, ConversationSurface, DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS, DatePicker, DetailPanel, DetailPanelBody, DetailPanelField, DetailPanelHeader, DetailPanelSection, Dialog, DialogClose, DialogCloseButton, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffBlock, DiffSummary, Drawer, DrawerBody, DrawerCloseButton, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, EmptyTitle, EntityIcon, FLOATING_PREVIEW_CORNER_RADIUS, FLOATING_PREVIEW_EDGE_GAP, Field, FieldDescription, FieldError, FieldGroup, FieldInput, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTextArea, FloatingPreview, FormField, Heading, HelpCenter, HoverCard, HoverCardContent, HoverCardTrigger, InlineCode, Input, InputControl, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputOtp, InputOtpCaret, Item, ItemDescription, ItemEmpty, ItemGroup, ItemGroupEntry, ItemTitle, Kbd, KbdChord, KbdGroup, Label, ListGroup, ListRow, ListRowControl, MAX_LAYOUT_DEPTH, MAX_LAYOUT_LEAVES, MAX_SPLIT_RATIO, MIN_SPLIT_RATIO, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MessageBody, MessageComposer, MessageDayDivider, MessageGroup, MessageRow, ModalDialog, Motion, NO_FLOATING_PREVIEW_OBSTACLES, NO_PREVIEW_MINI_PLAYER_OBSTACLES, NativeSelect, NavigationMenu, NavigationMenuContent, NavigationMenuGroup, NavigationMenuGroupLabel, NavigationMenuItem, NavigationMenuMenu, NavigationMenuSeparator, NavigationMenuTrigger, NavigationMenuViewport, NumberField, OrbitItem, OrbitLayout, PASTE_THRESHOLD_CHARS, PASTE_THRESHOLD_LINES, PASTE_TOKEN_REGEX, PREVIEW_MINI_PLAYER_CORNER_RADIUS, PREVIEW_MINI_PLAYER_EDGE_GAP, Page, PageHeader, PageHeaderActions, PageHeaderContent, PageHeaderDescription, PageHeaderTitle, PageSection, Pagination, PaginationEllipsis, PaginationItem, PaginationNext, PaginationPrevious, PalettePreview, Panel, PanelActions, PanelBody, PanelCard, PanelDescription, PanelFooter, PanelHeader, PanelPlaceholder, PanelTitle, PanelToolbar, PixelResizeHandle, Popover, PopoverAnchor, PopoverCloseButton, PopoverContent, PopoverDescription, PopoverTitle, PopoverTrigger, Presence, Progress, PropertyList, PropertyRow, PropertyTerm, PropertyValue, REDUCED_TRANSPARENCY_QUERY, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, SceneControls, ScrollArea, SecretInputGroup, Select, SelectChevronsUpDown, SelectContent, SelectItem, SelectLabel, SelectSection, SelectTrigger, SelectValue, Separator, SettingsField, SettingsLayout, SettingsNavigation, SettingsPage, SettingsRow, SettingsSection, Sheet, SheetBody, SheetCloseButton, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, SideRail, SideRailButton, SideRailContent, SideRailFooter, SideRailHeader, SideRailItem, SideRailSection, SidebarNav, SidebarNavButton, SidebarNavContent, SidebarNavFooter, SidebarNavHeader, SidebarNavItem, SidebarNavLabel, SidebarNavResizeHandle, SidebarNavRow, SidebarNavSection, SidebarNavTitle, Skeleton, SkipLink, Slider, Spinner, SplitLayout, Stat, StatGroup, StatusBar, StatusBarItem, StatusBarSpacer, StatusChip, StatusList, Switch, SwitchDescription, SwitchLabel, TALL_CODE_BLOCK_PX, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableNumericCell, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Text, TextLink, Textarea, ThemeMiniature, ThemeMiniatureSplit, ThemeModeToggle, ThemePicker, ThemePreview, ThemeProvider, ThemeSwatch, ThemeToggle, ThreadPanel, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TopBar, TopBarBreadcrumb, TopBarPill, TopBarSearch, TopBarSection, TopBarTitle, TranscriptComposition, Tree, TreeRow, TreeRowActions, UpdateChannelControl, UpdateDialog, ValueCombobox, VirtualWindow, WorkspaceMark, accentPresets, alertVariants, allTokens, appearancePreviewThemes, applyAppearanceFontSettings, badgeVariants, boardCardTitleVariants, builtinThemes, buttonVariants, calloutVariants, cardVariants, clampFloatingPreviewPosition, clampPreviewMiniPlayerPosition, closePane, cn, colorTokens, computeLayoutFrames, contrastRatio, controlInteractive, controlSize, controlSizeIcon, controlSizes, countLeaves, countLines, createAppMenuItems, createLayoutState, createVersionedPersistence, cva, defaultDarkThemeId, defaultLightThemeId, defaultPreferenceStorage, defaultThemeSelection, densityTokens, designTokens, diffLineVariants, diffStats, diffTargetPath, editorPaletteFor, elevationTokens, entityIconVariants, expandAll, findTokenRanges, focusPane, fontOptions, fontSettingsBootstrapScript, fontZoomShortcut, formatBytes, formatReleaseDate, formatToken, headingElement, headingVariants, initialsFrom, inlineScriptLiteral, isCustomAccent, isPasteBlock, isThemeAccentId, itemVariants, kbdChordKeys, kbdGroupVariants, kbdVariants, keyedRows, layoutDepth, listLeaves, localStoragePersistence, monogram, motionTokens, movePane, neighborLeaf, nextSeq, normalizeAppearanceEditorFontSettings, normalizeAppearanceEditorFontSize, normalizeCustomAccent, normalizeLayout, normalizeSurface, paintAccentRoles, parseDiff, plainTextFromMarkdown, platformModifierKey, pruneBlocks, quarantineRecord, radiusTokens, readLegacyValue, readVersionedRecord, recollapsePastes, recoveryEnvelope, recoveryKeyFor, remapCarriedBlocks, resizeFloatingPreview, resizePreviewMiniPlayer, resizeSplit, resolveAccentPreset, resolveAccentRoles, resolveFloatingPreviewFrame, resolvePreviewMiniPlayerFrame, resolveSurface, resolveSurfaceState, resolveVariant, resolvedDensity, searchShortcutKeyshortcuts, searchShortcutLabel, sheetVariants, shouldCollapse, sidebarNavItemClass, sidebarNavItemStateClass, splitPane, splitPaneBalanced, statusDotVariants, stepAppearanceFontSizes, stripTrailingBlankLines, surfaceAlpha, surfaceInteractive, swapPanes, terminalCssVariables, textElement, textVariants, textareaVariants, themeAccentsFor, themeById, themeCssVariables, themeFamilies, themeRecordById, themeRecords, themeScript, themeSurfaces, themesForAppearance, toast, toaster, toggleVariants, tokenRangeAt, tokensAsHex, transcriptDisclosureKey, typographyTokens, undoClosePane, undocumentedTokenAliases, useOptionalTheme, useSideRail, useTheme, validateTheme, validateThemeRegistry, variantFromRecord, withAccent, writeClipboardText, writeVersionedRecord, zIndexTokens };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "callout",
|
|
3
|
+
"type": "registry:ui",
|
|
4
|
+
"title": "Callout",
|
|
5
|
+
"description": "",
|
|
6
|
+
"dependencies": [],
|
|
7
|
+
"registryDependencies": [
|
|
8
|
+
"lib"
|
|
9
|
+
],
|
|
10
|
+
"files": [
|
|
11
|
+
{
|
|
12
|
+
"path": "src/components/ui/callout/callout.tsx",
|
|
13
|
+
"type": "registry:ui",
|
|
14
|
+
"target": "components/ui/callout/callout.tsx"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"path": "src/components/ui/callout/index.ts",
|
|
18
|
+
"type": "registry:ui",
|
|
19
|
+
"target": "components/ui/callout/index.ts"
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
}
|
package/dist/r/registry.json
CHANGED
|
@@ -297,6 +297,28 @@
|
|
|
297
297
|
}
|
|
298
298
|
]
|
|
299
299
|
},
|
|
300
|
+
{
|
|
301
|
+
"name": "callout",
|
|
302
|
+
"type": "registry:ui",
|
|
303
|
+
"title": "Callout",
|
|
304
|
+
"description": "",
|
|
305
|
+
"dependencies": [],
|
|
306
|
+
"registryDependencies": [
|
|
307
|
+
"lib"
|
|
308
|
+
],
|
|
309
|
+
"files": [
|
|
310
|
+
{
|
|
311
|
+
"path": "src/components/ui/callout/callout.tsx",
|
|
312
|
+
"type": "registry:ui",
|
|
313
|
+
"target": "components/ui/callout/callout.tsx"
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
"path": "src/components/ui/callout/index.ts",
|
|
317
|
+
"type": "registry:ui",
|
|
318
|
+
"target": "components/ui/callout/index.ts"
|
|
319
|
+
}
|
|
320
|
+
]
|
|
321
|
+
},
|
|
300
322
|
{
|
|
301
323
|
"name": "card",
|
|
302
324
|
"type": "registry:ui",
|
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
/** Keyboard-accessible tree rows with virtualization-aware focus handoff. */
|
|
2
|
-
export {
|
|
2
|
+
export {
|
|
3
|
+
Tree,
|
|
4
|
+
TreeRow,
|
|
5
|
+
TreeRowActions,
|
|
6
|
+
type TreeDisclosure,
|
|
7
|
+
type TreeProps,
|
|
8
|
+
type TreeRowProps,
|
|
9
|
+
} from './tree'
|
|
3
10
|
export type { TreeItemDescriptor } from './tree-navigation'
|
|
@@ -26,6 +26,8 @@ type TreeContextValue = {
|
|
|
26
26
|
focusItem: (id: string) => void
|
|
27
27
|
noteFocus: (id: string) => void
|
|
28
28
|
activate: (id: string, event: Event) => void
|
|
29
|
+
expand: (id: string, expanded: boolean) => void
|
|
30
|
+
disclosure: () => TreeDisclosure
|
|
29
31
|
onActiveIdChange: (id: string) => void
|
|
30
32
|
}
|
|
31
33
|
|
|
@@ -37,6 +39,19 @@ function useTreeContext() {
|
|
|
37
39
|
return tree
|
|
38
40
|
}
|
|
39
41
|
|
|
42
|
+
/**
|
|
43
|
+
* Who owns the pointer on a row's disclosure chevron.
|
|
44
|
+
*
|
|
45
|
+
* - `row` (default): the chevron is decoration; a click anywhere on the row,
|
|
46
|
+
* chevron included, is a row activation. This is the file-explorer
|
|
47
|
+
* convention, where the host's `onActivate` toggles a folder.
|
|
48
|
+
* - `marker`: the chevron of an expandable row is its own pointer target. It
|
|
49
|
+
* calls `onExpand(id, !expanded)` and nothing else; the rest of the row still
|
|
50
|
+
* activates. For trees where expanding and selecting are independent (a
|
|
51
|
+
* source list that selects a source and separately reveals its details).
|
|
52
|
+
*/
|
|
53
|
+
export type TreeDisclosure = 'row' | 'marker'
|
|
54
|
+
|
|
40
55
|
type TreeAccessibleName =
|
|
41
56
|
| { 'aria-label': string; 'aria-labelledby'?: string }
|
|
42
57
|
| { 'aria-label'?: string; 'aria-labelledby': string }
|
|
@@ -50,10 +65,19 @@ export type TreeProps = Omit<
|
|
|
50
65
|
visibleItems: readonly TreeItemDescriptor[]
|
|
51
66
|
/** The host-owned identity of the row that currently owns roving focus. */
|
|
52
67
|
activeId: string | null
|
|
53
|
-
/**
|
|
68
|
+
/**
|
|
69
|
+
* Called when keyboard or pointer navigation changes the active row, and when
|
|
70
|
+
* the active row leaves `visibleItems` (collapsed away, filtered out) and the
|
|
71
|
+
* first visible row takes over as the roving stop.
|
|
72
|
+
*/
|
|
54
73
|
onActiveIdChange: (id: string) => void
|
|
55
74
|
/** Called for Left/Right expand and collapse requests. */
|
|
56
75
|
onExpand?: (id: string, expanded: boolean) => void
|
|
76
|
+
/**
|
|
77
|
+
* Opt-in pointer behaviour of the disclosure chevron; see {@link TreeDisclosure}.
|
|
78
|
+
* Keyboard behaviour is identical in both modes: Left/Right expand and collapse.
|
|
79
|
+
*/
|
|
80
|
+
disclosure?: TreeDisclosure
|
|
57
81
|
/** Called for Enter or pointer activation. Domain action stays host-owned. */
|
|
58
82
|
onActivate?: (id: string, event: Event) => void
|
|
59
83
|
/** Called for Space selection. Selection state stays host-owned. */
|
|
@@ -78,6 +102,20 @@ export type TreeProps = Omit<
|
|
|
78
102
|
*
|
|
79
103
|
* Kobalte 0.13.14 has no Tree primitive, so this component implements the
|
|
80
104
|
* WAI-ARIA tree row navigation contract and leaves product state to callbacks.
|
|
105
|
+
*
|
|
106
|
+
* By default the disclosure chevron is decoration and a click anywhere on a
|
|
107
|
+
* row activates it, so a file explorer can toggle a folder from `onActivate`.
|
|
108
|
+
* Reach for `disclosure="marker"` when expanding and selecting are separate
|
|
109
|
+
* decisions: the chevron then calls only `onExpand`, and the rest of the row
|
|
110
|
+
* calls only `onActivate`. The chevron stays `aria-hidden` and out of the tab
|
|
111
|
+
* order in both modes; keyboard expansion is Left/Right either way.
|
|
112
|
+
*
|
|
113
|
+
* Collapsing is the one thing that can move focus without a key or a click on
|
|
114
|
+
* the target row: when the active row leaves `visibleItems`, the first visible
|
|
115
|
+
* row becomes the roving stop and `onActiveIdChange` is called with it. If the
|
|
116
|
+
* removed row held focus, or was the last row the tree saw focused, focus moves
|
|
117
|
+
* to that same row; if it had no focus, only the roving stop moves. This is the
|
|
118
|
+
* same in both `disclosure` modes and for every way a host collapses a row.
|
|
81
119
|
*/
|
|
82
120
|
export function Tree(props: TreeProps) {
|
|
83
121
|
const [local, rest] = splitProps(props, [
|
|
@@ -86,6 +124,7 @@ export function Tree(props: TreeProps) {
|
|
|
86
124
|
'activeId',
|
|
87
125
|
'onActiveIdChange',
|
|
88
126
|
'onExpand',
|
|
127
|
+
'disclosure',
|
|
89
128
|
'onActivate',
|
|
90
129
|
'onSelectItem',
|
|
91
130
|
'onRequestReveal',
|
|
@@ -187,16 +226,22 @@ export function Tree(props: TreeProps) {
|
|
|
187
226
|
focusedId = id
|
|
188
227
|
},
|
|
189
228
|
activate: (id, event) => local.onActivate?.(id, event),
|
|
229
|
+
expand: (id, expanded) => local.onExpand?.(id, expanded),
|
|
230
|
+
disclosure: () => local.disclosure ?? 'row',
|
|
190
231
|
onActiveIdChange: local.onActiveIdChange,
|
|
191
232
|
}
|
|
192
233
|
|
|
193
|
-
// A filtered or removed active ID falls back to the first
|
|
194
|
-
// keeps one treeitem in the sequential tab order while
|
|
234
|
+
// A filtered, collapsed-away or removed active ID falls back to the first
|
|
235
|
+
// visible item. This keeps one treeitem in the sequential tab order while
|
|
236
|
+
// notifying the host.
|
|
195
237
|
createEffect(() => {
|
|
196
238
|
const activeId = effectiveActiveId()
|
|
197
239
|
if (activeId === null) return
|
|
198
|
-
// If
|
|
199
|
-
// same
|
|
240
|
+
// If the projection removes the last row that took focus (a host filter, or
|
|
241
|
+
// an ancestor collapsing), move focus to the same fallback that now owns the
|
|
242
|
+
// roving tab stop. `focusedId` is not cleared when focus leaves the tree, so
|
|
243
|
+
// this also reclaims focus from a control outside it; that long-standing
|
|
244
|
+
// behaviour is deliberately left as it was.
|
|
200
245
|
if (focusedId !== null && !index().byId.has(focusedId) && pendingFocusId !== activeId) {
|
|
201
246
|
focusItem(activeId)
|
|
202
247
|
} else if (local.activeId !== activeId) {
|
|
@@ -282,6 +327,15 @@ export type TreeRowProps = Omit<
|
|
|
282
327
|
* Keeps the donor's disclosure marker, leading file/folder affordance, primary
|
|
283
328
|
* label and trailing-action hierarchy while replacing the donor's button and
|
|
284
329
|
* runtime callbacks with a shared treeitem and host-owned slots/actions.
|
|
330
|
+
*
|
|
331
|
+
* With `Tree`'s `disclosure="marker"` the chevron of an expandable row is a
|
|
332
|
+
* separate pointer target (`data-slot="tree-row-disclosure"`) that only calls
|
|
333
|
+
* `onExpand`. It is not focusable and has no role: the row remains the single
|
|
334
|
+
* focus stop, Enter and Space still activate and select, and Left/Right still
|
|
335
|
+
* expand and collapse, so the marker adds a pointer path and nothing else.
|
|
336
|
+
* Pressing it does not move focus or the roving stop to its row; if the toggle
|
|
337
|
+
* hides the focused row, `Tree` recovers focus as it does for any collapse (see
|
|
338
|
+
* the `Tree` comment and docs/tree.md).
|
|
285
339
|
*/
|
|
286
340
|
export function TreeRow(props: TreeRowProps) {
|
|
287
341
|
const tree = useTreeContext()
|
|
@@ -333,7 +387,15 @@ export function TreeRow(props: TreeRowProps) {
|
|
|
333
387
|
}
|
|
334
388
|
|
|
335
389
|
const position = () => tree.index().positionById.get(id())
|
|
336
|
-
|
|
390
|
+
// Only an expandable row has a chevron to press; a leaf's marker slot stays
|
|
391
|
+
// part of the row so a click there is an ordinary row click.
|
|
392
|
+
const markerTarget = () => tree.disclosure() === 'marker' && local.item.expandable
|
|
393
|
+
|
|
394
|
+
const handleMarkerClick: JSX.EventHandler<HTMLSpanElement, MouseEvent> = (event) => {
|
|
395
|
+
// The row's own handler would focus and activate the row.
|
|
396
|
+
event.stopPropagation()
|
|
397
|
+
tree.expand(id(), !local.item.expanded)
|
|
398
|
+
}
|
|
337
399
|
return (
|
|
338
400
|
<div
|
|
339
401
|
{...rest}
|
|
@@ -364,7 +426,23 @@ export function TreeRow(props: TreeRowProps) {
|
|
|
364
426
|
onClick={handleClick}
|
|
365
427
|
onDblClick={handleDoubleClick}
|
|
366
428
|
>
|
|
367
|
-
<span
|
|
429
|
+
<span
|
|
430
|
+
data-slot={markerTarget() ? 'tree-row-disclosure' : undefined}
|
|
431
|
+
class={cn(
|
|
432
|
+
'flex',
|
|
433
|
+
!markerTarget() && 'size-3.5',
|
|
434
|
+
'shrink-0 items-center justify-center text-muted-foreground',
|
|
435
|
+
/* The glyph stays 14px wide but the target is not: it takes the row's full
|
|
436
|
+
height (a flex child's `self-stretch`, so it follows row density and a
|
|
437
|
+
tall trailing control) and the pseudo-element widens it to 26px, which
|
|
438
|
+
stops at the row's own padding and gap, never over the icon or label. */
|
|
439
|
+
markerTarget() &&
|
|
440
|
+
'relative w-3.5 cursor-pointer self-stretch hover:text-foreground after:absolute after:inset-y-0 after:-inset-x-1.5'
|
|
441
|
+
)}
|
|
442
|
+
onMouseDown={markerTarget() ? handleMarkerMouseDown : undefined}
|
|
443
|
+
onClick={markerTarget() ? handleMarkerClick : undefined}
|
|
444
|
+
onDblClick={markerTarget() ? handleMarkerDoubleClick : undefined}
|
|
445
|
+
>
|
|
368
446
|
{local.item.expandable ? (
|
|
369
447
|
<ChevronRight
|
|
370
448
|
aria-hidden="true"
|
|
@@ -412,6 +490,19 @@ export function TreeRowActions(props: ComponentProps<'span'> & { pinned?: boolea
|
|
|
412
490
|
)
|
|
413
491
|
}
|
|
414
492
|
|
|
493
|
+
// Pressing the chevron must not move focus to its row: a mousedown on a
|
|
494
|
+
// non-focusable child would otherwise focus the row, making it the roving stop
|
|
495
|
+
// (and notifying `onActiveIdChange`) for what is a disclosure toggle, not a
|
|
496
|
+
// selection. The press itself leaves focus where it was, so Left/Right keep
|
|
497
|
+
// acting on the row the keyboard user left off at. It cannot stop the toggle
|
|
498
|
+
// from hiding that row; `Tree` then recovers focus onto the first visible row.
|
|
499
|
+
const handleMarkerMouseDown: JSX.EventHandler<HTMLSpanElement, MouseEvent> = (event) =>
|
|
500
|
+
event.preventDefault()
|
|
501
|
+
// A double-click is two toggles; it must not also reach `onDoubleClick`
|
|
502
|
+
// (rename, open) as though the row itself had been double-clicked.
|
|
503
|
+
const handleMarkerDoubleClick: JSX.EventHandler<HTMLSpanElement, MouseEvent> = (event) =>
|
|
504
|
+
event.stopPropagation()
|
|
505
|
+
|
|
415
506
|
function isActionTarget(target: EventTarget | null, currentTarget: HTMLElement): boolean {
|
|
416
507
|
if (!(target instanceof Element) || target === currentTarget) return false
|
|
417
508
|
return Boolean(
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import type { ComponentProps } from 'solid-js'
|
|
2
|
+
import { splitProps } from 'solid-js'
|
|
3
|
+
import { cva, type VariantProps } from '../../../lib/variants'
|
|
4
|
+
import { cn } from '../../../lib/utils'
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Callout.
|
|
8
|
+
*
|
|
9
|
+
* A quiet aside that belongs to the content around it: the summary at the top of
|
|
10
|
+
* an answer, a note in documentation, a remembered fact beside the reply that
|
|
11
|
+
* used it. It is a card-coloured block with one rule on its start edge, and
|
|
12
|
+
* nothing about it interrupts the reader.
|
|
13
|
+
*
|
|
14
|
+
* That is the difference from `Alert`. An `Alert` is a message about the state of
|
|
15
|
+
* the surface it sits in — a failed sync, a validation summary — so it is always
|
|
16
|
+
* `role="alert"`, a live announcement, with a tone glyph and a tinted status
|
|
17
|
+
* surface. A callout is static page content: a plain `div` with `role="note"`, no
|
|
18
|
+
* live region, no icon, and no tint. A caller whose note really is a status
|
|
19
|
+
* message uses `Alert`; one whose note needs a different landmark role passes
|
|
20
|
+
* `role`. Reach for `Card` when the block is a self-contained object with its own
|
|
21
|
+
* header, content and footer; a callout has no parts beyond an optional
|
|
22
|
+
* `CalloutTitle`.
|
|
23
|
+
*
|
|
24
|
+
* The rule is the only thing that varies by `variant`: `default` is the accent
|
|
25
|
+
* (`--primary`), and the four status hues use the same tokens `Alert` does. The
|
|
26
|
+
* rule is a logical `border-s-*`, so it moves to the right in RTL. The corners
|
|
27
|
+
* stay square because a rounded box would curve the rule into a crescent.
|
|
28
|
+
*
|
|
29
|
+
* `size` is the padding rung and the rule's weight together, so a caller never
|
|
30
|
+
* sets `p-*` or a border width to make one denser. The rungs are Cortana's three
|
|
31
|
+
* answer-view callouts, expressed in the Tailwind spacing scale:
|
|
32
|
+
*
|
|
33
|
+
* - `lg`: 22px / 24px padding, 3px rule — Cortana's `.answer-copy`.
|
|
34
|
+
* - `md`: 18px / 20px padding, 3px rule — Cortana's `.answer-memory`.
|
|
35
|
+
* - `sm`: 12px / 14px padding, 2px rule — Cortana's `.answer-note`.
|
|
36
|
+
*
|
|
37
|
+
* Type size and colour are inherited rather than set (only the card foreground is
|
|
38
|
+
* applied), so a callout in a dense panel and one in an article both read at the
|
|
39
|
+
* size of the text around them.
|
|
40
|
+
*
|
|
41
|
+
* Text that has no break opportunity (a 200-character token, a URL, a file path)
|
|
42
|
+
* wraps with `overflow-wrap: anywhere` rather than overflowing the box. `anywhere`
|
|
43
|
+
* and not `break-word`, because only `anywhere` lowers the box's min-content width:
|
|
44
|
+
* a callout that is a flex or grid item (auto minimum size) then shrinks to its
|
|
45
|
+
* track instead of stretching it. The callout's own padding, rule and width are
|
|
46
|
+
* untouched, so none of its sizing differs from Cortana's.
|
|
47
|
+
*
|
|
48
|
+
* The block is deliberately not a flex or grid container: its children are inline
|
|
49
|
+
* text, links and code, and a flex root would turn each of those into a separate
|
|
50
|
+
* item and break the line.
|
|
51
|
+
*/
|
|
52
|
+
export const calloutVariants = cva(
|
|
53
|
+
'bg-card text-card-foreground block rounded-none wrap-anywhere',
|
|
54
|
+
{
|
|
55
|
+
variants: {
|
|
56
|
+
variant: {
|
|
57
|
+
default: 'border-s-primary',
|
|
58
|
+
destructive: 'border-s-destructive',
|
|
59
|
+
success: 'border-s-success',
|
|
60
|
+
warning: 'border-s-warning',
|
|
61
|
+
info: 'border-s-info',
|
|
62
|
+
},
|
|
63
|
+
size: {
|
|
64
|
+
/** 12px block / 14px inline padding, 2px rule: a short inline note. */
|
|
65
|
+
sm: 'border-s-2 px-3.5 py-3',
|
|
66
|
+
/** 18px block / 20px inline padding, 3px rule: a supporting aside. */
|
|
67
|
+
md: 'border-s-3 px-5 py-4.5',
|
|
68
|
+
/** 22px block / 24px inline padding, 3px rule: the lead summary of a view. */
|
|
69
|
+
lg: 'border-s-3 px-6 py-5.5',
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
defaultVariants: { variant: 'default', size: 'md' },
|
|
73
|
+
}
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
export type CalloutProps = ComponentProps<'div'> & VariantProps<typeof calloutVariants>
|
|
77
|
+
|
|
78
|
+
export function Callout(props: CalloutProps) {
|
|
79
|
+
const [local, rest] = splitProps(props, ['class', 'variant', 'size'])
|
|
80
|
+
return (
|
|
81
|
+
<div
|
|
82
|
+
data-slot="callout"
|
|
83
|
+
role="note"
|
|
84
|
+
class={cn(calloutVariants({ variant: local.variant, size: local.size }), local.class)}
|
|
85
|
+
{...rest}
|
|
86
|
+
/>
|
|
87
|
+
)
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* An optional heading line for the callout. It is a styled `div`, not a heading
|
|
92
|
+
* element: a callout sits inside someone else's outline, and a fixed heading
|
|
93
|
+
* level would break it. Pass `role="heading"` with `aria-level` where the
|
|
94
|
+
* content does belong in the outline.
|
|
95
|
+
*
|
|
96
|
+
* The title always carries a 4px (`mb-1`) margin below it, whatever follows: a
|
|
97
|
+
* paragraph, a list, or bare text. CSS cannot see text nodes, so a selector such
|
|
98
|
+
* as `:last-child` or `:only-child` cannot tell `<Title/>text` (needs the gap)
|
|
99
|
+
* from `<Title/>` (needs none), and `not-last:mb-1` silently dropped the gap for
|
|
100
|
+
* bare text, the most common body. The unconditional margin is the less
|
|
101
|
+
* surprising failure: it is never missing where text follows. The price is the
|
|
102
|
+
* title-only callout, which would end 4px taller than its padding says. Pass
|
|
103
|
+
* `class="mb-0"` there (`cn` lets the caller's margin win); the `WithTitle` story
|
|
104
|
+
* shows it.
|
|
105
|
+
*/
|
|
106
|
+
export function CalloutTitle(props: ComponentProps<'div'>) {
|
|
107
|
+
const [local, rest] = splitProps(props, ['class'])
|
|
108
|
+
return (
|
|
109
|
+
<div
|
|
110
|
+
data-slot="callout-title"
|
|
111
|
+
class={cn('mb-1 font-medium tracking-tight', local.class)}
|
|
112
|
+
{...rest}
|
|
113
|
+
/>
|
|
114
|
+
)
|
|
115
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Callout, CalloutTitle, calloutVariants, type CalloutProps } from './callout'
|
package/package.json
CHANGED
package/registry.json
CHANGED
|
@@ -297,6 +297,28 @@
|
|
|
297
297
|
}
|
|
298
298
|
]
|
|
299
299
|
},
|
|
300
|
+
{
|
|
301
|
+
"name": "callout",
|
|
302
|
+
"type": "registry:ui",
|
|
303
|
+
"title": "Callout",
|
|
304
|
+
"description": "",
|
|
305
|
+
"dependencies": [],
|
|
306
|
+
"registryDependencies": [
|
|
307
|
+
"lib"
|
|
308
|
+
],
|
|
309
|
+
"files": [
|
|
310
|
+
{
|
|
311
|
+
"path": "src/components/ui/callout/callout.tsx",
|
|
312
|
+
"type": "registry:ui",
|
|
313
|
+
"target": "components/ui/callout/callout.tsx"
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
"path": "src/components/ui/callout/index.ts",
|
|
317
|
+
"type": "registry:ui",
|
|
318
|
+
"target": "components/ui/callout/index.ts"
|
|
319
|
+
}
|
|
320
|
+
]
|
|
321
|
+
},
|
|
300
322
|
{
|
|
301
323
|
"name": "card",
|
|
302
324
|
"type": "registry:ui",
|
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
/** Keyboard-accessible tree rows with virtualization-aware focus handoff. */
|
|
2
|
-
export {
|
|
2
|
+
export {
|
|
3
|
+
Tree,
|
|
4
|
+
TreeRow,
|
|
5
|
+
TreeRowActions,
|
|
6
|
+
type TreeDisclosure,
|
|
7
|
+
type TreeProps,
|
|
8
|
+
type TreeRowProps,
|
|
9
|
+
} from './tree'
|
|
3
10
|
export type { TreeItemDescriptor } from './tree-navigation'
|