@stll/ui 0.79.0 → 0.81.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/calendar/day-calendar.d.ts +6 -1
- package/dist/calendar/day-calendar.js +77 -20
- package/dist/components/animated-count.js +5 -5
- package/dist/components/button.d.ts +7 -3
- package/dist/components/button.js +58 -9
- package/dist/components/destructive-confirm-dialog.js +1 -0
- package/dist/components/document-mark.shared.d.ts +14 -125
- package/dist/components/document-mark.shared.js +222 -37
- package/dist/components/file-input.d.ts +2 -1
- package/dist/components/file-input.js +2 -1
- package/dist/components/hex-color-picker.js +10 -11
- package/dist/components/search-field.d.ts +2 -1
- package/dist/components/search-field.js +2 -1
- package/dist/components/secret-input.d.ts +2 -1
- package/dist/components/secret-input.js +2 -1
- package/dist/components/split-button.d.ts +1 -1
- package/dist/components/split-button.js +6 -2
- package/dist/components/swap-text.js +9 -7
- package/dist/components/tooltip-trigger-helper.d.ts +3 -1
- package/dist/components/tooltip-trigger-helper.js +10 -3
- package/dist/components/tooltip.d.ts +3 -1
- package/dist/components/tooltip.js +25 -20
- package/dist/hooks/use-inline-overflow.d.ts +47 -0
- package/dist/hooks/use-inline-overflow.js +93 -0
- package/dist/icons.d.ts +2 -2
- package/dist/icons.js +2 -2
- package/dist/inspector/facet-bar.d.ts +1 -1
- package/dist/inspector/facet-bar.js +18 -53
- package/dist/lib/inline-overflow.d.ts +62 -0
- package/dist/lib/inline-overflow.js +79 -0
- package/dist/lib/matter-colors.d.ts +2 -2
- package/dist/lib/matter-colors.js +0 -1
- package/dist/review/review-decision-actions.d.ts +9 -4
- package/dist/review/review-decision-actions.js +24 -23
- package/dist/review/review-out-of-date-notice.d.ts +2 -4
- package/dist/review/review-out-of-date-notice.js +3 -3
- package/package.json +9 -1
- package/dist/inspector/facet-bar.logic.d.ts +0 -48
- package/dist/inspector/facet-bar.logic.js +0 -52
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { resolveInlineOverflow } from "../lib/inline-overflow.js";
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
|
+
// src/hooks/use-inline-overflow.ts
|
|
4
|
+
/**
|
|
5
|
+
* Marks one item's natural-width copy inside the measuring row; its value is
|
|
6
|
+
* the item's key.
|
|
7
|
+
*/
|
|
8
|
+
const INLINE_OVERFLOW_ITEM_ATTRIBUTE = "data-inline-overflow-item";
|
|
9
|
+
/** Marks the overflow trigger's copy inside the measuring row. */
|
|
10
|
+
const INLINE_OVERFLOW_TRIGGER_ATTRIBUTE = "data-inline-overflow-trigger";
|
|
11
|
+
/** Joins item keys into one value the effect can depend on. */
|
|
12
|
+
const KEY_SEPARATOR = "\0";
|
|
13
|
+
/**
|
|
14
|
+
* The space between two neighbouring copies, read off their boxes in either
|
|
15
|
+
* reading direction; the copies sit in one row, so it is the row's gap.
|
|
16
|
+
*/
|
|
17
|
+
const itemGap = (items) => {
|
|
18
|
+
const [first, second] = items;
|
|
19
|
+
if (first === void 0 || second === void 0) return 0;
|
|
20
|
+
return Math.max(0, second.left - first.right, first.left - second.right);
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Measures a single-line row and decides how many of its items fit, by
|
|
24
|
+
* `resolveInlineOverflow`. The caller renders two things:
|
|
25
|
+
*
|
|
26
|
+
* - the row (`containerRef`), whose content box is the room the items and
|
|
27
|
+
* the overflow trigger share, independent of how many items it shows;
|
|
28
|
+
* - an invisible, inert copy of every item at its natural width plus the
|
|
29
|
+
* trigger (`measureRef`), each marked with `INLINE_OVERFLOW_ITEM_ATTRIBUTE`
|
|
30
|
+
* (set to the item's key) or `INLINE_OVERFLOW_TRIGGER_ATTRIBUTE`, inside
|
|
31
|
+
* one flex row whose gap is the gap between items.
|
|
32
|
+
*
|
|
33
|
+
* Measuring the copy keeps the widths stable however many items the row is
|
|
34
|
+
* currently showing, so collapsing an item never changes the measurement
|
|
35
|
+
* that collapsed it. Widths are read by key in the order `itemKeys` gives,
|
|
36
|
+
* and the count is recomputed whenever either element resizes (a docked
|
|
37
|
+
* pane narrows the row, an added view or a rename widens the copy), the
|
|
38
|
+
* active item changes, or the items change order: swapping two items keeps
|
|
39
|
+
* the measuring row's size, which no observer reports. The first count
|
|
40
|
+
* arrives with the observer's first report, before the row paints; until
|
|
41
|
+
* then every item shows.
|
|
42
|
+
*/
|
|
43
|
+
const useInlineOverflow = ({ activeIndex, itemKeys }) => {
|
|
44
|
+
const itemCount = itemKeys.length;
|
|
45
|
+
const order = itemKeys.join(KEY_SEPARATOR);
|
|
46
|
+
const [container, setContainer] = useState(null);
|
|
47
|
+
const [measure, setMeasure] = useState(null);
|
|
48
|
+
const [visibleCount, setVisibleCount] = useState(itemCount);
|
|
49
|
+
const [measured, setMeasured] = useState(false);
|
|
50
|
+
useEffect(() => {
|
|
51
|
+
if (!container || !measure) return;
|
|
52
|
+
const keys = order === "" ? [] : order.split(KEY_SEPARATOR);
|
|
53
|
+
let availableWidth = 0;
|
|
54
|
+
const recompute = () => {
|
|
55
|
+
const copies = Array.from(measure.querySelectorAll(`[${INLINE_OVERFLOW_ITEM_ATTRIBUTE}]`), (copy) => ({
|
|
56
|
+
key: copy.getAttribute(INLINE_OVERFLOW_ITEM_ATTRIBUTE),
|
|
57
|
+
box: copy.getBoundingClientRect()
|
|
58
|
+
}));
|
|
59
|
+
const boxByKey = new Map(copies.map(({ key, box }) => [key, box]));
|
|
60
|
+
const trigger = measure.querySelector(`[${INLINE_OVERFLOW_TRIGGER_ATTRIBUTE}]`);
|
|
61
|
+
setVisibleCount(resolveInlineOverflow({
|
|
62
|
+
activeIndex,
|
|
63
|
+
availableWidth,
|
|
64
|
+
gap: itemGap(copies.map(({ box }) => box)),
|
|
65
|
+
itemWidths: keys.map((key) => boxByKey.get(key)?.width ?? 0),
|
|
66
|
+
triggerWidth: trigger?.getBoundingClientRect().width ?? 0
|
|
67
|
+
}).visibleCount);
|
|
68
|
+
setMeasured(true);
|
|
69
|
+
};
|
|
70
|
+
const observer = new ResizeObserver((entries) => {
|
|
71
|
+
for (const entry of entries) if (entry.target === container) availableWidth = entry.contentRect.width;
|
|
72
|
+
recompute();
|
|
73
|
+
});
|
|
74
|
+
observer.observe(container);
|
|
75
|
+
observer.observe(measure);
|
|
76
|
+
return () => observer.disconnect();
|
|
77
|
+
}, [
|
|
78
|
+
activeIndex,
|
|
79
|
+
container,
|
|
80
|
+
measure,
|
|
81
|
+
order
|
|
82
|
+
]);
|
|
83
|
+
return {
|
|
84
|
+
/** The measured row, once mounted. */
|
|
85
|
+
container,
|
|
86
|
+
containerRef: setContainer,
|
|
87
|
+
/** Whether the row has been measured; until then every item shows. */
|
|
88
|
+
measured,
|
|
89
|
+
measureRef: setMeasure,
|
|
90
|
+
visibleCount: Math.min(visibleCount, itemCount)
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
export { INLINE_OVERFLOW_ITEM_ATTRIBUTE, INLINE_OVERFLOW_TRIGGER_ATTRIBUTE, useInlineOverflow };
|
package/dist/icons.d.ts
CHANGED
|
@@ -25,6 +25,6 @@
|
|
|
25
25
|
* Only ESM named re-exports live here, and the package marks nothing but its
|
|
26
26
|
* CSS as having side effects, so a bundler keeps just the glyphs a page uses.
|
|
27
27
|
*/
|
|
28
|
-
import { AccessibilityIcon, ActivityIcon, AlarmClockIcon, AlertCircleIcon, AlertTriangleIcon, AlignJustifyIcon, AlignLeftIcon, AppWindowMacIcon as BrowserControlIcon, ArchiveIcon, ArchiveRestoreIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpDownIcon, ArrowUpIcon, AtSignIcon, BanIcon, BanknoteIcon, BellIcon, BlocksIcon, BoldIcon, BookOpenCheckIcon, BookOpenIcon as CaseLawIcon, BookOpenIcon as SkillIcon, BookTextIcon, BookmarkIcon, BookmarkPlusIcon, BracesIcon, BrainIcon, Building2Icon, BuildingIcon, CableIcon, CalendarClockIcon, CalendarIcon, ChartColumnIcon, ChartLineIcon, ChartNoAxesColumnIcon, ChartPieIcon, ChartScatterIcon, CheckCheckIcon, CheckCircle2Icon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsUpDownIcon, CircleAlertIcon, CircleCheckIcon, CircleDashedIcon, CircleDotIcon, CircleHelpIcon, CircleIcon, CircleOffIcon, CircleUserRoundIcon, ClipboardCheckIcon, ClipboardCopyIcon, ClipboardIcon, ClipboardListIcon, Clock3Icon, ClockIcon, CloudIcon, CogIcon, Columns2Icon, Columns3Icon, CommandIcon, CompassIcon, CopyIcon as CopyFromMenuIcon, CopyIcon as CopyToClipboardIcon, CopyIcon as DuplicateIcon, CopyPlusIcon, CornerDownLeftIcon, CornerDownRightIcon as FollowUpIcon, CpuIcon, CropIcon, DatabaseIcon, DollarSignIcon, DownloadIcon, EditIcon, EllipsisIcon, EllipsisVerticalIcon, EqualIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FileBadgeIcon, FileCheckIcon, FileCodeIcon, FileDiffIcon, FileDigitIcon, FileDownIcon, FileIcon, FileImageIcon, FileOutputIcon, FilePlus2Icon, FilePlusIcon, FileQuestionIcon, FileSearchIcon, FileSpreadsheetIcon, FileStackIcon as EditPagesIcon, FileTextIcon, FileUpIcon, FilterIcon, FilterXIcon, FlagIcon, FlaskConicalIcon, FoldHorizontalIcon, FolderIcon, FolderInputIcon, FolderOpenIcon, FolderPlusIcon, FolderSyncIcon, FolderTreeIcon, FunctionSquareIcon, GanttChartIcon, GaugeIcon, GitBranchIcon, GitCommitHorizontalIcon, GitPullRequestIcon, GlobeIcon, GraduationCapIcon, GripVerticalIcon, HashIcon, Heading1Icon, Heading2Icon, Heading3Icon, HelpCircleIcon, HighlighterIcon, HistoryIcon, ImageIcon, ImageOffIcon, InboxIcon, InfoIcon, ItalicIcon, KanbanIcon, KeyRoundIcon, KeyboardIcon, LandmarkIcon, LanguagesIcon, LaptopIcon, LayersIcon, LayoutDashboardIcon, LayoutGridIcon, LayoutTemplateIcon, LibraryBigIcon, LibraryIcon, Link2Icon, LinkIcon, ListChecksIcon, ListFilterIcon, ListIcon, ListMinusIcon, ListOrderedIcon, ListTodoIcon, ListTreeIcon, ListXIcon, LoaderCircleIcon, LockIcon, LockKeyholeIcon, LockOpenIcon, LogOutIcon, LucideIcon, LucideIcon as LucideIcon$1, MailIcon, Maximize2Icon, MegaphoneIcon, MessageCircleQuestionIcon, MessageSquareIcon, MessageSquarePlusIcon as NewChatIcon, MessageSquareQuoteIcon as AddCommentIcon, MessageSquareTextIcon, MessageSquareWarningIcon, MessagesSquareIcon, MicIcon as DictateIcon, Minimize2Icon, MinusIcon, MonitorIcon, MoonIcon, MoreHorizontalIcon, PackageIcon, PaletteIcon, PanelLeftIcon, PanelRightIcon, PaperclipIcon, PauseIcon, PenIcon, PenLineIcon, PencilIcon, PencilLineIcon, PhoneIcon, PinIcon, PinOffIcon, PlayIcon, PlugIcon, PlusIcon, PowerIcon, PrinterIcon, QuoteIcon, Redo2Icon, RefreshCcwIcon, RefreshCwIcon, RepeatIcon, RotateCcwIcon, RotateCwIcon, RouteIcon, Rows2Icon, Rows3Icon, SaveIcon, ScanSearchIcon, ScanTextIcon, ScissorsIcon, ScrollTextIcon, SearchIcon, SearchXIcon, SendIcon, ServerIcon, Settings2Icon, ShapesIcon, ShieldAlertIcon, ShieldCheckIcon, ShieldIcon, SigmaIcon, SignatureIcon, SlashIcon, SlidersHorizontalIcon, SparklesIcon, SplitIcon, SquareCheckIcon, SquareIcon, SquareMinusIcon, SquarePenIcon, StarIcon, StarOffIcon, StickyNoteIcon, StrikethroughIcon, SunIcon, TableIcon, TagIcon, TagsIcon, TerminalIcon, TextIcon, TextQuoteIcon, ToggleLeftIcon, Trash2Icon, TrashIcon, TriangleAlertIcon, UnderlineIcon, Undo2Icon, UndoIcon, UnfoldHorizontalIcon, UngroupIcon, UploadIcon, UserCheckIcon, UserIcon, UserPlusIcon, UserRoundIcon, UsersIcon, VideoIcon, WandSparklesIcon as AiActionIcon, WavesIcon, WindIcon, WorkflowIcon, WrapTextIcon, WrenchIcon, XCircleIcon, XIcon, XSquareIcon, ZapIcon } from "lucide-react";
|
|
28
|
+
import { AccessibilityIcon, ActivityIcon, AlarmClockIcon, AlertCircleIcon, AlertTriangleIcon, AlignJustifyIcon, AlignLeftIcon, AppWindowMacIcon as BrowserControlIcon, ArchiveIcon, ArchiveRestoreIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpDownIcon, ArrowUpIcon, AtSignIcon, BanIcon, BanknoteIcon, BellIcon, BlocksIcon, BoldIcon, BookOpenCheckIcon, BookOpenIcon as CaseLawIcon, BookOpenIcon as SkillIcon, BookTextIcon, BookmarkIcon, BookmarkPlusIcon, BracesIcon, BrainIcon, Building2Icon, BuildingIcon, CableIcon, CalendarClockIcon, CalendarIcon, ChartColumnIcon, ChartLineIcon, ChartNoAxesColumnIcon, ChartPieIcon, ChartScatterIcon, CheckCheckIcon, CheckCircle2Icon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsUpDownIcon, CircleAlertIcon, CircleCheckIcon, CircleDashedIcon, CircleDotIcon, CircleHelpIcon, CircleIcon, CircleOffIcon, CircleUserRoundIcon, ClipboardCheckIcon, ClipboardCopyIcon, ClipboardIcon, ClipboardListIcon, Clock3Icon, ClockIcon, CloudIcon, CogIcon, Columns2Icon, Columns3Icon, CommandIcon, CompassIcon, CopyIcon as CopyFromMenuIcon, CopyIcon as CopyToClipboardIcon, CopyIcon as DuplicateIcon, CopyPlusIcon, CornerDownLeftIcon, CornerDownRightIcon as FollowUpIcon, CpuIcon, CropIcon, DatabaseIcon, DollarSignIcon, DownloadIcon, EditIcon, EllipsisIcon, EllipsisVerticalIcon, EqualIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FileBadgeIcon, FileCheckIcon, FileCodeIcon, FileDiffIcon, FileDigitIcon, FileDownIcon, FileIcon, FileImageIcon, FileOutputIcon, FilePlus2Icon, FilePlusIcon, FileQuestionIcon, FileSearchIcon, FileSpreadsheetIcon, FileStackIcon as EditPagesIcon, FileTextIcon, FileUpIcon, FilterIcon, FilterXIcon, FlagIcon, FlaskConicalIcon, FoldHorizontalIcon, FolderIcon, FolderInputIcon, FolderOpenIcon, FolderPlusIcon, FolderSyncIcon, FolderTreeIcon, FunctionSquareIcon, GanttChartIcon, GaugeIcon, GitBranchIcon, GitCommitHorizontalIcon, GitPullRequestIcon, GlobeIcon, GraduationCapIcon, GripVerticalIcon, HashIcon, Heading1Icon, Heading2Icon, Heading3Icon, HelpCircleIcon, HighlighterIcon, HistoryIcon, ImageIcon, ImageOffIcon, InboxIcon, InfoIcon, ItalicIcon, KanbanIcon, KeyRoundIcon, KeyboardIcon, LandmarkIcon, LanguagesIcon, LaptopIcon, LayersIcon, LayoutDashboardIcon, LayoutGridIcon, LayoutTemplateIcon, LibraryBigIcon, LibraryIcon, Link2Icon, LinkIcon, ListChecksIcon, ListFilterIcon, ListIcon, ListMinusIcon, ListOrderedIcon, ListTodoIcon, ListTreeIcon, ListXIcon, LoaderCircleIcon, LockIcon, LockKeyholeIcon, LockOpenIcon, LogOutIcon, LucideIcon, LucideIcon as LucideIcon$1, MailIcon, Maximize2Icon, MegaphoneIcon, MessageCircleQuestionIcon, MessageSquareIcon, MessageSquarePlusIcon as NewChatIcon, MessageSquareQuoteIcon as AddCommentIcon, MessageSquareTextIcon, MessageSquareWarningIcon, MessagesSquareIcon, MicIcon as DictateIcon, Minimize2Icon, MinusIcon, MonitorIcon, MoonIcon, MoreHorizontalIcon, PackageIcon, PaletteIcon, PanelLeftIcon, PanelRightIcon, PaperclipIcon, PauseIcon, PenIcon, PenLineIcon, PencilIcon, PencilLineIcon, PhoneIcon, PinIcon, PinOffIcon, PlayIcon, PlugIcon, PlusIcon, PowerIcon, PrinterIcon, QuoteIcon, Redo2Icon, RefreshCcwIcon, RefreshCwIcon, RepeatIcon, RotateCcwIcon, RotateCwIcon, RouteIcon, Rows2Icon, Rows3Icon, SaveIcon, ScanSearchIcon, ScanTextIcon, ScissorsIcon, ScrollTextIcon, SearchIcon, SearchXIcon, SendIcon, ServerIcon, Settings2Icon, ShapesIcon, ShieldAlertIcon, ShieldCheckIcon, ShieldIcon, SigmaIcon, SignatureIcon, SlashIcon, SlidersHorizontalIcon, SmartphoneIcon, SparklesIcon, SplitIcon, SquareCheckIcon, SquareIcon, SquareMinusIcon, SquarePenIcon, StarIcon, StarOffIcon, StickyNoteIcon, StrikethroughIcon, SunIcon, TableIcon, TabletIcon, TagIcon, TagsIcon, TerminalIcon, TextIcon, TextQuoteIcon, ToggleLeftIcon, Trash2Icon, TrashIcon, TriangleAlertIcon, UnderlineIcon, Undo2Icon, UndoIcon, UnfoldHorizontalIcon, UngroupIcon, UploadIcon, UserCheckIcon, UserIcon, UserPlusIcon, UserRoundIcon, UsersIcon, VideoIcon, WandSparklesIcon as AiActionIcon, WavesIcon, WindIcon, WorkflowIcon, WrapTextIcon, WrenchIcon, XCircleIcon, XIcon, XSquareIcon, ZapIcon } from "lucide-react";
|
|
29
29
|
export declare const MoveToSideIcon: LucideIcon$1;
|
|
30
|
-
export { AccessibilityIcon, ActivityIcon, AddCommentIcon, AiActionIcon, AlarmClockIcon, AlertCircleIcon, AlertTriangleIcon, AlignJustifyIcon, AlignLeftIcon, ArchiveIcon, ArchiveRestoreIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpDownIcon, ArrowUpIcon, AtSignIcon, BanIcon, BanknoteIcon, BellIcon, BlocksIcon, BoldIcon, BookOpenCheckIcon, BookTextIcon, BookmarkIcon, BookmarkPlusIcon, BracesIcon, BrainIcon, BrowserControlIcon, Building2Icon, BuildingIcon, CableIcon, CalendarClockIcon, CalendarIcon, CaseLawIcon, ChartColumnIcon, ChartLineIcon, ChartNoAxesColumnIcon, ChartPieIcon, ChartScatterIcon, CheckCheckIcon, CheckCircle2Icon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsUpDownIcon, CircleAlertIcon, CircleCheckIcon, CircleDashedIcon, CircleDotIcon, CircleHelpIcon, CircleIcon, CircleOffIcon, CircleUserRoundIcon, ClipboardCheckIcon, ClipboardCopyIcon, ClipboardIcon, ClipboardListIcon, Clock3Icon, ClockIcon, CloudIcon, CogIcon, Columns2Icon, Columns3Icon, CommandIcon, CompassIcon, CopyFromMenuIcon, CopyPlusIcon, CopyToClipboardIcon, CornerDownLeftIcon, CpuIcon, CropIcon, DatabaseIcon, DictateIcon, DollarSignIcon, DownloadIcon, DuplicateIcon, EditIcon, EditPagesIcon, EllipsisIcon, EllipsisVerticalIcon, EqualIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FileBadgeIcon, FileCheckIcon, FileCodeIcon, FileDiffIcon, FileDigitIcon, FileDownIcon, FileIcon, FileImageIcon, FileOutputIcon, FilePlus2Icon, FilePlusIcon, FileQuestionIcon, FileSearchIcon, FileSpreadsheetIcon, FileTextIcon, FileUpIcon, FilterIcon, FilterXIcon, FlagIcon, FlaskConicalIcon, FoldHorizontalIcon, FolderIcon, FolderInputIcon, FolderOpenIcon, FolderPlusIcon, FolderSyncIcon, FolderTreeIcon, FollowUpIcon, FunctionSquareIcon, GanttChartIcon, GaugeIcon, GitBranchIcon, GitCommitHorizontalIcon, GitPullRequestIcon, GlobeIcon, GraduationCapIcon, GripVerticalIcon, HashIcon, Heading1Icon, Heading2Icon, Heading3Icon, HelpCircleIcon, HighlighterIcon, HistoryIcon, ImageIcon, ImageOffIcon, InboxIcon, InfoIcon, ItalicIcon, KanbanIcon, KeyRoundIcon, KeyboardIcon, LandmarkIcon, LanguagesIcon, LaptopIcon, LayersIcon, LayoutDashboardIcon, LayoutGridIcon, LayoutTemplateIcon, LibraryBigIcon, LibraryIcon, Link2Icon, LinkIcon, ListChecksIcon, ListFilterIcon, ListIcon, ListMinusIcon, ListOrderedIcon, ListTodoIcon, ListTreeIcon, ListXIcon, LoaderCircleIcon, LockIcon, LockKeyholeIcon, LockOpenIcon, LogOutIcon, type LucideIcon, MailIcon, Maximize2Icon, MegaphoneIcon, MessageCircleQuestionIcon, MessageSquareIcon, MessageSquareTextIcon, MessageSquareWarningIcon, MessagesSquareIcon, Minimize2Icon, MinusIcon, MonitorIcon, MoonIcon, MoreHorizontalIcon, NewChatIcon, PackageIcon, PaletteIcon, PanelLeftIcon, PanelRightIcon, PaperclipIcon, PauseIcon, PenIcon, PenLineIcon, PencilIcon, PencilLineIcon, PhoneIcon, PinIcon, PinOffIcon, PlayIcon, PlugIcon, PlusIcon, PowerIcon, PrinterIcon, QuoteIcon, Redo2Icon, RefreshCcwIcon, RefreshCwIcon, RepeatIcon, RotateCcwIcon, RotateCwIcon, RouteIcon, Rows2Icon, Rows3Icon, SaveIcon, ScanSearchIcon, ScanTextIcon, ScissorsIcon, ScrollTextIcon, SearchIcon, SearchXIcon, SendIcon, ServerIcon, Settings2Icon, ShapesIcon, ShieldAlertIcon, ShieldCheckIcon, ShieldIcon, SigmaIcon, SignatureIcon, SkillIcon, SlashIcon, SlidersHorizontalIcon, SparklesIcon, SplitIcon, SquareCheckIcon, SquareIcon, SquareMinusIcon, SquarePenIcon, StarIcon, StarOffIcon, StickyNoteIcon, StrikethroughIcon, SunIcon, TableIcon, TagIcon, TagsIcon, TerminalIcon, TextIcon, TextQuoteIcon, ToggleLeftIcon, Trash2Icon, TrashIcon, TriangleAlertIcon, UnderlineIcon, Undo2Icon, UndoIcon, UnfoldHorizontalIcon, UngroupIcon, UploadIcon, UserCheckIcon, UserIcon, UserPlusIcon, UserRoundIcon, UsersIcon, VideoIcon, WavesIcon, WindIcon, WorkflowIcon, WrapTextIcon, WrenchIcon, XCircleIcon, XIcon, XSquareIcon, ZapIcon };
|
|
30
|
+
export { AccessibilityIcon, ActivityIcon, AddCommentIcon, AiActionIcon, AlarmClockIcon, AlertCircleIcon, AlertTriangleIcon, AlignJustifyIcon, AlignLeftIcon, ArchiveIcon, ArchiveRestoreIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpDownIcon, ArrowUpIcon, AtSignIcon, BanIcon, BanknoteIcon, BellIcon, BlocksIcon, BoldIcon, BookOpenCheckIcon, BookTextIcon, BookmarkIcon, BookmarkPlusIcon, BracesIcon, BrainIcon, BrowserControlIcon, Building2Icon, BuildingIcon, CableIcon, CalendarClockIcon, CalendarIcon, CaseLawIcon, ChartColumnIcon, ChartLineIcon, ChartNoAxesColumnIcon, ChartPieIcon, ChartScatterIcon, CheckCheckIcon, CheckCircle2Icon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsUpDownIcon, CircleAlertIcon, CircleCheckIcon, CircleDashedIcon, CircleDotIcon, CircleHelpIcon, CircleIcon, CircleOffIcon, CircleUserRoundIcon, ClipboardCheckIcon, ClipboardCopyIcon, ClipboardIcon, ClipboardListIcon, Clock3Icon, ClockIcon, CloudIcon, CogIcon, Columns2Icon, Columns3Icon, CommandIcon, CompassIcon, CopyFromMenuIcon, CopyPlusIcon, CopyToClipboardIcon, CornerDownLeftIcon, CpuIcon, CropIcon, DatabaseIcon, DictateIcon, DollarSignIcon, DownloadIcon, DuplicateIcon, EditIcon, EditPagesIcon, EllipsisIcon, EllipsisVerticalIcon, EqualIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FileBadgeIcon, FileCheckIcon, FileCodeIcon, FileDiffIcon, FileDigitIcon, FileDownIcon, FileIcon, FileImageIcon, FileOutputIcon, FilePlus2Icon, FilePlusIcon, FileQuestionIcon, FileSearchIcon, FileSpreadsheetIcon, FileTextIcon, FileUpIcon, FilterIcon, FilterXIcon, FlagIcon, FlaskConicalIcon, FoldHorizontalIcon, FolderIcon, FolderInputIcon, FolderOpenIcon, FolderPlusIcon, FolderSyncIcon, FolderTreeIcon, FollowUpIcon, FunctionSquareIcon, GanttChartIcon, GaugeIcon, GitBranchIcon, GitCommitHorizontalIcon, GitPullRequestIcon, GlobeIcon, GraduationCapIcon, GripVerticalIcon, HashIcon, Heading1Icon, Heading2Icon, Heading3Icon, HelpCircleIcon, HighlighterIcon, HistoryIcon, ImageIcon, ImageOffIcon, InboxIcon, InfoIcon, ItalicIcon, KanbanIcon, KeyRoundIcon, KeyboardIcon, LandmarkIcon, LanguagesIcon, LaptopIcon, LayersIcon, LayoutDashboardIcon, LayoutGridIcon, LayoutTemplateIcon, LibraryBigIcon, LibraryIcon, Link2Icon, LinkIcon, ListChecksIcon, ListFilterIcon, ListIcon, ListMinusIcon, ListOrderedIcon, ListTodoIcon, ListTreeIcon, ListXIcon, LoaderCircleIcon, LockIcon, LockKeyholeIcon, LockOpenIcon, LogOutIcon, type LucideIcon, MailIcon, Maximize2Icon, MegaphoneIcon, MessageCircleQuestionIcon, MessageSquareIcon, MessageSquareTextIcon, MessageSquareWarningIcon, MessagesSquareIcon, Minimize2Icon, MinusIcon, MonitorIcon, MoonIcon, MoreHorizontalIcon, NewChatIcon, PackageIcon, PaletteIcon, PanelLeftIcon, PanelRightIcon, PaperclipIcon, PauseIcon, PenIcon, PenLineIcon, PencilIcon, PencilLineIcon, PhoneIcon, PinIcon, PinOffIcon, PlayIcon, PlugIcon, PlusIcon, PowerIcon, PrinterIcon, QuoteIcon, Redo2Icon, RefreshCcwIcon, RefreshCwIcon, RepeatIcon, RotateCcwIcon, RotateCwIcon, RouteIcon, Rows2Icon, Rows3Icon, SaveIcon, ScanSearchIcon, ScanTextIcon, ScissorsIcon, ScrollTextIcon, SearchIcon, SearchXIcon, SendIcon, ServerIcon, Settings2Icon, ShapesIcon, ShieldAlertIcon, ShieldCheckIcon, ShieldIcon, SigmaIcon, SignatureIcon, SkillIcon, SlashIcon, SlidersHorizontalIcon, SmartphoneIcon, SparklesIcon, SplitIcon, SquareCheckIcon, SquareIcon, SquareMinusIcon, SquarePenIcon, StarIcon, StarOffIcon, StickyNoteIcon, StrikethroughIcon, SunIcon, TableIcon, TabletIcon, TagIcon, TagsIcon, TerminalIcon, TextIcon, TextQuoteIcon, ToggleLeftIcon, Trash2Icon, TrashIcon, TriangleAlertIcon, UnderlineIcon, Undo2Icon, UndoIcon, UnfoldHorizontalIcon, UngroupIcon, UploadIcon, UserCheckIcon, UserIcon, UserPlusIcon, UserRoundIcon, UsersIcon, VideoIcon, WavesIcon, WindIcon, WorkflowIcon, WrapTextIcon, WrenchIcon, XCircleIcon, XIcon, XSquareIcon, ZapIcon };
|
package/dist/icons.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AccessibilityIcon, ActivityIcon, AlarmClockIcon, AlertCircleIcon, AlertTriangleIcon, AlignJustifyIcon, AlignLeftIcon, AppWindowMacIcon as BrowserControlIcon, ArchiveIcon, ArchiveRestoreIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpDownIcon, ArrowUpIcon, AtSignIcon, BanIcon, BanknoteIcon, BellIcon, BlocksIcon, BoldIcon, BookOpenCheckIcon, BookOpenIcon as CaseLawIcon, BookOpenIcon as SkillIcon, BookTextIcon, BookmarkIcon, BookmarkPlusIcon, BracesIcon, BrainIcon, Building2Icon, BuildingIcon, CableIcon, CalendarClockIcon, CalendarIcon, ChartColumnIcon, ChartLineIcon, ChartNoAxesColumnIcon, ChartPieIcon, ChartScatterIcon, CheckCheckIcon, CheckCircle2Icon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsUpDownIcon, CircleAlertIcon, CircleCheckIcon, CircleDashedIcon, CircleDotIcon, CircleHelpIcon, CircleIcon, CircleOffIcon, CircleUserRoundIcon, ClipboardCheckIcon, ClipboardCopyIcon, ClipboardIcon, ClipboardListIcon, Clock3Icon, ClockIcon, CloudIcon, CogIcon, Columns2Icon, Columns3Icon, CommandIcon, CompassIcon, CopyIcon as CopyFromMenuIcon, CopyIcon as CopyToClipboardIcon, CopyIcon as DuplicateIcon, CopyPlusIcon, CornerDownLeftIcon, CornerDownRightIcon as FollowUpIcon, CpuIcon, CropIcon, DatabaseIcon, DollarSignIcon, DownloadIcon, EditIcon, EllipsisIcon, EllipsisVerticalIcon, EqualIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FileBadgeIcon, FileCheckIcon, FileCodeIcon, FileDiffIcon, FileDigitIcon, FileDownIcon, FileIcon, FileImageIcon, FileOutputIcon, FilePlus2Icon, FilePlusIcon, FileQuestionIcon, FileSearchIcon, FileSpreadsheetIcon, FileStackIcon as EditPagesIcon, FileTextIcon, FileUpIcon, FilterIcon, FilterXIcon, FlagIcon, FlaskConicalIcon, FoldHorizontalIcon, FolderIcon, FolderInputIcon, FolderOpenIcon, FolderPlusIcon, FolderSyncIcon, FolderTreeIcon, FunctionSquareIcon, GanttChartIcon, GaugeIcon, GitBranchIcon, GitCommitHorizontalIcon, GitPullRequestIcon, GlobeIcon, GraduationCapIcon, GripVerticalIcon, HashIcon, Heading1Icon, Heading2Icon, Heading3Icon, HelpCircleIcon, HighlighterIcon, HistoryIcon, ImageIcon, ImageOffIcon, InboxIcon, InfoIcon, ItalicIcon, KanbanIcon, KeyRoundIcon, KeyboardIcon, LandmarkIcon, LanguagesIcon, LaptopIcon, LayersIcon, LayoutDashboardIcon, LayoutGridIcon, LayoutTemplateIcon, LibraryBigIcon, LibraryIcon, Link2Icon, LinkIcon, ListChecksIcon, ListFilterIcon, ListIcon, ListMinusIcon, ListOrderedIcon, ListTodoIcon, ListTreeIcon, ListXIcon, LoaderCircleIcon, LockIcon, LockKeyholeIcon, LockOpenIcon, LogOutIcon, MailIcon, Maximize2Icon, MegaphoneIcon, MessageCircleQuestionIcon, MessageSquareIcon, MessageSquarePlusIcon as NewChatIcon, MessageSquareQuoteIcon as AddCommentIcon, MessageSquareTextIcon, MessageSquareWarningIcon, MessagesSquareIcon, MicIcon as DictateIcon, Minimize2Icon, MinusIcon, MonitorIcon, MoonIcon, MoreHorizontalIcon, PackageIcon, PaletteIcon, PanelLeftIcon, PanelRightIcon, PaperclipIcon, PauseIcon, PenIcon, PenLineIcon, PencilIcon, PencilLineIcon, PhoneIcon, PinIcon, PinOffIcon, PlayIcon, PlugIcon, PlusIcon, PowerIcon, PrinterIcon, QuoteIcon, Redo2Icon, RefreshCcwIcon, RefreshCwIcon, RepeatIcon, RotateCcwIcon, RotateCwIcon, RouteIcon, Rows2Icon, Rows3Icon, SaveIcon, ScanSearchIcon, ScanTextIcon, ScissorsIcon, ScrollTextIcon, SearchIcon, SearchXIcon, SendIcon, ServerIcon, Settings2Icon, ShapesIcon, ShieldAlertIcon, ShieldCheckIcon, ShieldIcon, SigmaIcon, SignatureIcon, SlashIcon, SlidersHorizontalIcon, SparklesIcon, SplitIcon, SquareCheckIcon, SquareIcon, SquareMinusIcon, SquarePenIcon, StarIcon, StarOffIcon, StickyNoteIcon, StrikethroughIcon, SunIcon, TableIcon, TagIcon, TagsIcon, TerminalIcon, TextIcon, TextQuoteIcon, ToggleLeftIcon, Trash2Icon, TrashIcon, TriangleAlertIcon, UnderlineIcon, Undo2Icon, UndoIcon, UnfoldHorizontalIcon, UngroupIcon, UploadIcon, UserCheckIcon, UserIcon, UserPlusIcon, UserRoundIcon, UsersIcon, VideoIcon, WandSparklesIcon as AiActionIcon, WavesIcon, WindIcon, WorkflowIcon, WrapTextIcon, WrenchIcon, XCircleIcon, XIcon, XSquareIcon, ZapIcon, createLucideIcon } from "lucide-react";
|
|
1
|
+
import { AccessibilityIcon, ActivityIcon, AlarmClockIcon, AlertCircleIcon, AlertTriangleIcon, AlignJustifyIcon, AlignLeftIcon, AppWindowMacIcon as BrowserControlIcon, ArchiveIcon, ArchiveRestoreIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpDownIcon, ArrowUpIcon, AtSignIcon, BanIcon, BanknoteIcon, BellIcon, BlocksIcon, BoldIcon, BookOpenCheckIcon, BookOpenIcon as CaseLawIcon, BookOpenIcon as SkillIcon, BookTextIcon, BookmarkIcon, BookmarkPlusIcon, BracesIcon, BrainIcon, Building2Icon, BuildingIcon, CableIcon, CalendarClockIcon, CalendarIcon, ChartColumnIcon, ChartLineIcon, ChartNoAxesColumnIcon, ChartPieIcon, ChartScatterIcon, CheckCheckIcon, CheckCircle2Icon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsUpDownIcon, CircleAlertIcon, CircleCheckIcon, CircleDashedIcon, CircleDotIcon, CircleHelpIcon, CircleIcon, CircleOffIcon, CircleUserRoundIcon, ClipboardCheckIcon, ClipboardCopyIcon, ClipboardIcon, ClipboardListIcon, Clock3Icon, ClockIcon, CloudIcon, CogIcon, Columns2Icon, Columns3Icon, CommandIcon, CompassIcon, CopyIcon as CopyFromMenuIcon, CopyIcon as CopyToClipboardIcon, CopyIcon as DuplicateIcon, CopyPlusIcon, CornerDownLeftIcon, CornerDownRightIcon as FollowUpIcon, CpuIcon, CropIcon, DatabaseIcon, DollarSignIcon, DownloadIcon, EditIcon, EllipsisIcon, EllipsisVerticalIcon, EqualIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FileBadgeIcon, FileCheckIcon, FileCodeIcon, FileDiffIcon, FileDigitIcon, FileDownIcon, FileIcon, FileImageIcon, FileOutputIcon, FilePlus2Icon, FilePlusIcon, FileQuestionIcon, FileSearchIcon, FileSpreadsheetIcon, FileStackIcon as EditPagesIcon, FileTextIcon, FileUpIcon, FilterIcon, FilterXIcon, FlagIcon, FlaskConicalIcon, FoldHorizontalIcon, FolderIcon, FolderInputIcon, FolderOpenIcon, FolderPlusIcon, FolderSyncIcon, FolderTreeIcon, FunctionSquareIcon, GanttChartIcon, GaugeIcon, GitBranchIcon, GitCommitHorizontalIcon, GitPullRequestIcon, GlobeIcon, GraduationCapIcon, GripVerticalIcon, HashIcon, Heading1Icon, Heading2Icon, Heading3Icon, HelpCircleIcon, HighlighterIcon, HistoryIcon, ImageIcon, ImageOffIcon, InboxIcon, InfoIcon, ItalicIcon, KanbanIcon, KeyRoundIcon, KeyboardIcon, LandmarkIcon, LanguagesIcon, LaptopIcon, LayersIcon, LayoutDashboardIcon, LayoutGridIcon, LayoutTemplateIcon, LibraryBigIcon, LibraryIcon, Link2Icon, LinkIcon, ListChecksIcon, ListFilterIcon, ListIcon, ListMinusIcon, ListOrderedIcon, ListTodoIcon, ListTreeIcon, ListXIcon, LoaderCircleIcon, LockIcon, LockKeyholeIcon, LockOpenIcon, LogOutIcon, MailIcon, Maximize2Icon, MegaphoneIcon, MessageCircleQuestionIcon, MessageSquareIcon, MessageSquarePlusIcon as NewChatIcon, MessageSquareQuoteIcon as AddCommentIcon, MessageSquareTextIcon, MessageSquareWarningIcon, MessagesSquareIcon, MicIcon as DictateIcon, Minimize2Icon, MinusIcon, MonitorIcon, MoonIcon, MoreHorizontalIcon, PackageIcon, PaletteIcon, PanelLeftIcon, PanelRightIcon, PaperclipIcon, PauseIcon, PenIcon, PenLineIcon, PencilIcon, PencilLineIcon, PhoneIcon, PinIcon, PinOffIcon, PlayIcon, PlugIcon, PlusIcon, PowerIcon, PrinterIcon, QuoteIcon, Redo2Icon, RefreshCcwIcon, RefreshCwIcon, RepeatIcon, RotateCcwIcon, RotateCwIcon, RouteIcon, Rows2Icon, Rows3Icon, SaveIcon, ScanSearchIcon, ScanTextIcon, ScissorsIcon, ScrollTextIcon, SearchIcon, SearchXIcon, SendIcon, ServerIcon, Settings2Icon, ShapesIcon, ShieldAlertIcon, ShieldCheckIcon, ShieldIcon, SigmaIcon, SignatureIcon, SlashIcon, SlidersHorizontalIcon, SmartphoneIcon, SparklesIcon, SplitIcon, SquareCheckIcon, SquareIcon, SquareMinusIcon, SquarePenIcon, StarIcon, StarOffIcon, StickyNoteIcon, StrikethroughIcon, SunIcon, TableIcon, TabletIcon, TagIcon, TagsIcon, TerminalIcon, TextIcon, TextQuoteIcon, ToggleLeftIcon, Trash2Icon, TrashIcon, TriangleAlertIcon, UnderlineIcon, Undo2Icon, UndoIcon, UnfoldHorizontalIcon, UngroupIcon, UploadIcon, UserCheckIcon, UserIcon, UserPlusIcon, UserRoundIcon, UsersIcon, VideoIcon, WandSparklesIcon as AiActionIcon, WavesIcon, WindIcon, WorkflowIcon, WrapTextIcon, WrenchIcon, XCircleIcon, XIcon, XSquareIcon, ZapIcon, createLucideIcon } from "lucide-react";
|
|
2
2
|
// src/icons.ts
|
|
3
3
|
/**
|
|
4
4
|
* Every icon Stella draws, from one module (`@stll/ui/icons`).
|
|
@@ -52,4 +52,4 @@ const MoveToSideIcon = /* @__PURE__ */ createLucideIcon("move-to-side", [
|
|
|
52
52
|
key: "move-to-side-chevron"
|
|
53
53
|
}]
|
|
54
54
|
]);
|
|
55
|
-
export { AccessibilityIcon, ActivityIcon, AddCommentIcon, AiActionIcon, AlarmClockIcon, AlertCircleIcon, AlertTriangleIcon, AlignJustifyIcon, AlignLeftIcon, ArchiveIcon, ArchiveRestoreIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpDownIcon, ArrowUpIcon, AtSignIcon, BanIcon, BanknoteIcon, BellIcon, BlocksIcon, BoldIcon, BookOpenCheckIcon, BookTextIcon, BookmarkIcon, BookmarkPlusIcon, BracesIcon, BrainIcon, BrowserControlIcon, Building2Icon, BuildingIcon, CableIcon, CalendarClockIcon, CalendarIcon, CaseLawIcon, ChartColumnIcon, ChartLineIcon, ChartNoAxesColumnIcon, ChartPieIcon, ChartScatterIcon, CheckCheckIcon, CheckCircle2Icon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsUpDownIcon, CircleAlertIcon, CircleCheckIcon, CircleDashedIcon, CircleDotIcon, CircleHelpIcon, CircleIcon, CircleOffIcon, CircleUserRoundIcon, ClipboardCheckIcon, ClipboardCopyIcon, ClipboardIcon, ClipboardListIcon, Clock3Icon, ClockIcon, CloudIcon, CogIcon, Columns2Icon, Columns3Icon, CommandIcon, CompassIcon, CopyFromMenuIcon, CopyPlusIcon, CopyToClipboardIcon, CornerDownLeftIcon, CpuIcon, CropIcon, DatabaseIcon, DictateIcon, DollarSignIcon, DownloadIcon, DuplicateIcon, EditIcon, EditPagesIcon, EllipsisIcon, EllipsisVerticalIcon, EqualIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FileBadgeIcon, FileCheckIcon, FileCodeIcon, FileDiffIcon, FileDigitIcon, FileDownIcon, FileIcon, FileImageIcon, FileOutputIcon, FilePlus2Icon, FilePlusIcon, FileQuestionIcon, FileSearchIcon, FileSpreadsheetIcon, FileTextIcon, FileUpIcon, FilterIcon, FilterXIcon, FlagIcon, FlaskConicalIcon, FoldHorizontalIcon, FolderIcon, FolderInputIcon, FolderOpenIcon, FolderPlusIcon, FolderSyncIcon, FolderTreeIcon, FollowUpIcon, FunctionSquareIcon, GanttChartIcon, GaugeIcon, GitBranchIcon, GitCommitHorizontalIcon, GitPullRequestIcon, GlobeIcon, GraduationCapIcon, GripVerticalIcon, HashIcon, Heading1Icon, Heading2Icon, Heading3Icon, HelpCircleIcon, HighlighterIcon, HistoryIcon, ImageIcon, ImageOffIcon, InboxIcon, InfoIcon, ItalicIcon, KanbanIcon, KeyRoundIcon, KeyboardIcon, LandmarkIcon, LanguagesIcon, LaptopIcon, LayersIcon, LayoutDashboardIcon, LayoutGridIcon, LayoutTemplateIcon, LibraryBigIcon, LibraryIcon, Link2Icon, LinkIcon, ListChecksIcon, ListFilterIcon, ListIcon, ListMinusIcon, ListOrderedIcon, ListTodoIcon, ListTreeIcon, ListXIcon, LoaderCircleIcon, LockIcon, LockKeyholeIcon, LockOpenIcon, LogOutIcon, MailIcon, Maximize2Icon, MegaphoneIcon, MessageCircleQuestionIcon, MessageSquareIcon, MessageSquareTextIcon, MessageSquareWarningIcon, MessagesSquareIcon, Minimize2Icon, MinusIcon, MonitorIcon, MoonIcon, MoreHorizontalIcon, MoveToSideIcon, NewChatIcon, PackageIcon, PaletteIcon, PanelLeftIcon, PanelRightIcon, PaperclipIcon, PauseIcon, PenIcon, PenLineIcon, PencilIcon, PencilLineIcon, PhoneIcon, PinIcon, PinOffIcon, PlayIcon, PlugIcon, PlusIcon, PowerIcon, PrinterIcon, QuoteIcon, Redo2Icon, RefreshCcwIcon, RefreshCwIcon, RepeatIcon, RotateCcwIcon, RotateCwIcon, RouteIcon, Rows2Icon, Rows3Icon, SaveIcon, ScanSearchIcon, ScanTextIcon, ScissorsIcon, ScrollTextIcon, SearchIcon, SearchXIcon, SendIcon, ServerIcon, Settings2Icon, ShapesIcon, ShieldAlertIcon, ShieldCheckIcon, ShieldIcon, SigmaIcon, SignatureIcon, SkillIcon, SlashIcon, SlidersHorizontalIcon, SparklesIcon, SplitIcon, SquareCheckIcon, SquareIcon, SquareMinusIcon, SquarePenIcon, StarIcon, StarOffIcon, StickyNoteIcon, StrikethroughIcon, SunIcon, TableIcon, TagIcon, TagsIcon, TerminalIcon, TextIcon, TextQuoteIcon, ToggleLeftIcon, Trash2Icon, TrashIcon, TriangleAlertIcon, UnderlineIcon, Undo2Icon, UndoIcon, UnfoldHorizontalIcon, UngroupIcon, UploadIcon, UserCheckIcon, UserIcon, UserPlusIcon, UserRoundIcon, UsersIcon, VideoIcon, WavesIcon, WindIcon, WorkflowIcon, WrapTextIcon, WrenchIcon, XCircleIcon, XIcon, XSquareIcon, ZapIcon };
|
|
55
|
+
export { AccessibilityIcon, ActivityIcon, AddCommentIcon, AiActionIcon, AlarmClockIcon, AlertCircleIcon, AlertTriangleIcon, AlignJustifyIcon, AlignLeftIcon, ArchiveIcon, ArchiveRestoreIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpDownIcon, ArrowUpIcon, AtSignIcon, BanIcon, BanknoteIcon, BellIcon, BlocksIcon, BoldIcon, BookOpenCheckIcon, BookTextIcon, BookmarkIcon, BookmarkPlusIcon, BracesIcon, BrainIcon, BrowserControlIcon, Building2Icon, BuildingIcon, CableIcon, CalendarClockIcon, CalendarIcon, CaseLawIcon, ChartColumnIcon, ChartLineIcon, ChartNoAxesColumnIcon, ChartPieIcon, ChartScatterIcon, CheckCheckIcon, CheckCircle2Icon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsUpDownIcon, CircleAlertIcon, CircleCheckIcon, CircleDashedIcon, CircleDotIcon, CircleHelpIcon, CircleIcon, CircleOffIcon, CircleUserRoundIcon, ClipboardCheckIcon, ClipboardCopyIcon, ClipboardIcon, ClipboardListIcon, Clock3Icon, ClockIcon, CloudIcon, CogIcon, Columns2Icon, Columns3Icon, CommandIcon, CompassIcon, CopyFromMenuIcon, CopyPlusIcon, CopyToClipboardIcon, CornerDownLeftIcon, CpuIcon, CropIcon, DatabaseIcon, DictateIcon, DollarSignIcon, DownloadIcon, DuplicateIcon, EditIcon, EditPagesIcon, EllipsisIcon, EllipsisVerticalIcon, EqualIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FileBadgeIcon, FileCheckIcon, FileCodeIcon, FileDiffIcon, FileDigitIcon, FileDownIcon, FileIcon, FileImageIcon, FileOutputIcon, FilePlus2Icon, FilePlusIcon, FileQuestionIcon, FileSearchIcon, FileSpreadsheetIcon, FileTextIcon, FileUpIcon, FilterIcon, FilterXIcon, FlagIcon, FlaskConicalIcon, FoldHorizontalIcon, FolderIcon, FolderInputIcon, FolderOpenIcon, FolderPlusIcon, FolderSyncIcon, FolderTreeIcon, FollowUpIcon, FunctionSquareIcon, GanttChartIcon, GaugeIcon, GitBranchIcon, GitCommitHorizontalIcon, GitPullRequestIcon, GlobeIcon, GraduationCapIcon, GripVerticalIcon, HashIcon, Heading1Icon, Heading2Icon, Heading3Icon, HelpCircleIcon, HighlighterIcon, HistoryIcon, ImageIcon, ImageOffIcon, InboxIcon, InfoIcon, ItalicIcon, KanbanIcon, KeyRoundIcon, KeyboardIcon, LandmarkIcon, LanguagesIcon, LaptopIcon, LayersIcon, LayoutDashboardIcon, LayoutGridIcon, LayoutTemplateIcon, LibraryBigIcon, LibraryIcon, Link2Icon, LinkIcon, ListChecksIcon, ListFilterIcon, ListIcon, ListMinusIcon, ListOrderedIcon, ListTodoIcon, ListTreeIcon, ListXIcon, LoaderCircleIcon, LockIcon, LockKeyholeIcon, LockOpenIcon, LogOutIcon, MailIcon, Maximize2Icon, MegaphoneIcon, MessageCircleQuestionIcon, MessageSquareIcon, MessageSquareTextIcon, MessageSquareWarningIcon, MessagesSquareIcon, Minimize2Icon, MinusIcon, MonitorIcon, MoonIcon, MoreHorizontalIcon, MoveToSideIcon, NewChatIcon, PackageIcon, PaletteIcon, PanelLeftIcon, PanelRightIcon, PaperclipIcon, PauseIcon, PenIcon, PenLineIcon, PencilIcon, PencilLineIcon, PhoneIcon, PinIcon, PinOffIcon, PlayIcon, PlugIcon, PlusIcon, PowerIcon, PrinterIcon, QuoteIcon, Redo2Icon, RefreshCcwIcon, RefreshCwIcon, RepeatIcon, RotateCcwIcon, RotateCwIcon, RouteIcon, Rows2Icon, Rows3Icon, SaveIcon, ScanSearchIcon, ScanTextIcon, ScissorsIcon, ScrollTextIcon, SearchIcon, SearchXIcon, SendIcon, ServerIcon, Settings2Icon, ShapesIcon, ShieldAlertIcon, ShieldCheckIcon, ShieldIcon, SigmaIcon, SignatureIcon, SkillIcon, SlashIcon, SlidersHorizontalIcon, SmartphoneIcon, SparklesIcon, SplitIcon, SquareCheckIcon, SquareIcon, SquareMinusIcon, SquarePenIcon, StarIcon, StarOffIcon, StickyNoteIcon, StrikethroughIcon, SunIcon, TableIcon, TabletIcon, TagIcon, TagsIcon, TerminalIcon, TextIcon, TextQuoteIcon, ToggleLeftIcon, Trash2Icon, TrashIcon, TriangleAlertIcon, UnderlineIcon, Undo2Icon, UndoIcon, UnfoldHorizontalIcon, UngroupIcon, UploadIcon, UserCheckIcon, UserIcon, UserPlusIcon, UserRoundIcon, UsersIcon, VideoIcon, WavesIcon, WindIcon, WorkflowIcon, WrapTextIcon, WrenchIcon, XCircleIcon, XIcon, XSquareIcon, ZapIcon };
|
|
@@ -38,6 +38,6 @@ export type InspectorFacetBarProps<F extends string> = {
|
|
|
38
38
|
* (`˅`) dropdown. The active facet is pinned visible ahead of the rest
|
|
39
39
|
* so the current tab stays readable rather than hiding inside the menu
|
|
40
40
|
* — except at the narrowest widths, where not even the active chip fits
|
|
41
|
-
* beside the trigger; see `
|
|
41
|
+
* beside the trigger; see `resolveInlineOverflow`'s narrow-width floor.
|
|
42
42
|
*/
|
|
43
43
|
export declare const InspectorFacetBar: <F extends string>({ facet, facets, labels, disabledFacets, pulseSeq, activeBadge, overflowMenuLabel, onChange }: InspectorFacetBarProps<F>) => import("react").JSX.Element;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { Button } from "../components/button.js";
|
|
2
2
|
import { DropdownMenu as Menu, DropdownMenuContent as MenuPopup, DropdownMenuItem as MenuItem, DropdownMenuTrigger as MenuTrigger } from "../components/menu.js";
|
|
3
3
|
import { Tooltip, TooltipContent as TooltipPopup, TooltipTrigger } from "../components/tooltip.js";
|
|
4
|
+
import { INLINE_OVERFLOW_ITEM_ATTRIBUTE, INLINE_OVERFLOW_TRIGGER_ATTRIBUTE, useInlineOverflow } from "../hooks/use-inline-overflow.js";
|
|
4
5
|
import { ChevronDownIcon } from "../icons.js";
|
|
6
|
+
import { splitInlineOverflow } from "../lib/inline-overflow.js";
|
|
5
7
|
import { cn } from "../lib/utils.js";
|
|
6
|
-
import { resolveFacetOverflow } from "./facet-bar.logic.js";
|
|
7
8
|
import { TOOLBAR_ROW_HEIGHT } from "./layout-tokens.js";
|
|
8
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
import { useEffect, useRef
|
|
10
|
+
import { useEffect, useRef } from "react";
|
|
10
11
|
// src/inspector/facet-bar.tsx
|
|
11
12
|
/**
|
|
12
13
|
* Inspector subtab row: a single line of pill chips at toolbar-row
|
|
@@ -20,63 +21,23 @@ import { useEffect, useRef, useState } from "react";
|
|
|
20
21
|
* (`˅`) dropdown. The active facet is pinned visible ahead of the rest
|
|
21
22
|
* so the current tab stays readable rather than hiding inside the menu
|
|
22
23
|
* — except at the narrowest widths, where not even the active chip fits
|
|
23
|
-
* beside the trigger; see `
|
|
24
|
+
* beside the trigger; see `resolveInlineOverflow`'s narrow-width floor.
|
|
24
25
|
*/
|
|
25
26
|
const InspectorFacetBar = ({ facet, facets, labels, disabledFacets, pulseSeq, activeBadge, overflowMenuLabel, onChange }) => {
|
|
26
27
|
const lastPulseSeq = useRef(pulseSeq);
|
|
27
|
-
const
|
|
28
|
-
const measureRef =
|
|
29
|
-
|
|
28
|
+
const activeIndex = facets.indexOf(facet);
|
|
29
|
+
const { container, containerRef, measureRef, visibleCount } = useInlineOverflow({
|
|
30
|
+
activeIndex,
|
|
31
|
+
itemKeys: facets
|
|
32
|
+
});
|
|
33
|
+
const { visible: visibleFacets, overflow: overflowFacets } = splitInlineOverflow(facets, visibleCount, activeIndex);
|
|
34
|
+
const overflowing = overflowFacets.length > 0;
|
|
30
35
|
useEffect(() => {
|
|
31
36
|
if (pulseSeq === void 0 || pulseSeq === lastPulseSeq.current) return;
|
|
32
37
|
lastPulseSeq.current = pulseSeq;
|
|
33
|
-
const activeChip =
|
|
38
|
+
const activeChip = container?.querySelector("[data-facet-chip-active]");
|
|
34
39
|
if (activeChip instanceof HTMLElement) flashFacetChip(activeChip);
|
|
35
|
-
}, [pulseSeq]);
|
|
36
|
-
useEffect(() => {
|
|
37
|
-
const container = containerRef.current;
|
|
38
|
-
const measure = measureRef.current;
|
|
39
|
-
if (!container || !measure) return;
|
|
40
|
-
const recompute = () => {
|
|
41
|
-
const style = getComputedStyle(container);
|
|
42
|
-
const padX = (Number.parseFloat(style.paddingInlineStart) || 0) + (Number.parseFloat(style.paddingInlineEnd) || 0);
|
|
43
|
-
const gap = Number.parseFloat(style.columnGap) || 0;
|
|
44
|
-
const availableWidth = container.clientWidth - padX;
|
|
45
|
-
const cells = [...measure.children];
|
|
46
|
-
const triggerWidth = cells.at(-1)?.getBoundingClientRect().width ?? 0;
|
|
47
|
-
const chipWidths = cells.slice(0, facets.length).map((cell) => cell.getBoundingClientRect().width);
|
|
48
|
-
const policy = resolveFacetOverflow({
|
|
49
|
-
activeIndex: facets.indexOf(facet),
|
|
50
|
-
availableWidth,
|
|
51
|
-
chipWidths,
|
|
52
|
-
gap,
|
|
53
|
-
triggerWidth
|
|
54
|
-
});
|
|
55
|
-
setVisibleCount(policy.visibleCount);
|
|
56
|
-
};
|
|
57
|
-
const observer = new ResizeObserver(recompute);
|
|
58
|
-
observer.observe(container);
|
|
59
|
-
observer.observe(measure);
|
|
60
|
-
recompute();
|
|
61
|
-
return () => observer.disconnect();
|
|
62
|
-
}, [facets, facet]);
|
|
63
|
-
const overflowing = visibleCount < facets.length;
|
|
64
|
-
const activeIndex = facets.indexOf(facet);
|
|
65
|
-
let visibleFacets;
|
|
66
|
-
let overflowFacets;
|
|
67
|
-
if (!overflowing) {
|
|
68
|
-
visibleFacets = [...facets];
|
|
69
|
-
overflowFacets = [];
|
|
70
|
-
} else if (visibleCount === 0) {
|
|
71
|
-
visibleFacets = [];
|
|
72
|
-
overflowFacets = [...facets];
|
|
73
|
-
} else if (activeIndex < visibleCount) {
|
|
74
|
-
visibleFacets = facets.slice(0, visibleCount);
|
|
75
|
-
overflowFacets = facets.slice(visibleCount);
|
|
76
|
-
} else {
|
|
77
|
-
visibleFacets = [...facets.slice(0, visibleCount - 1), facet];
|
|
78
|
-
overflowFacets = facets.filter((value) => !visibleFacets.includes(value));
|
|
79
|
-
}
|
|
40
|
+
}, [container, pulseSeq]);
|
|
80
41
|
return /* @__PURE__ */ jsxs("div", {
|
|
81
42
|
className: cn("bg-background/85 supports-[backdrop-filter]:bg-background/65 sticky top-0 z-10 flex shrink-0 items-center gap-0.5 overflow-hidden border-b px-1.5 backdrop-blur", TOOLBAR_ROW_HEIGHT),
|
|
82
43
|
"data-active-facet": facet,
|
|
@@ -123,8 +84,12 @@ const InspectorFacetBar = ({ facet, facets, labels, disabledFacets, pulseSeq, ac
|
|
|
123
84
|
className: cn(CHIP_CLASS, INACTIVE_CHIP_CLASS),
|
|
124
85
|
"data-facet-option": value,
|
|
125
86
|
"data-facet-option-disabled": disabledFacets?.has(value) ? "" : void 0,
|
|
87
|
+
[INLINE_OVERFLOW_ITEM_ATTRIBUTE]: value,
|
|
126
88
|
children: labels[value]
|
|
127
|
-
}, value)), /* @__PURE__ */ jsx("span", {
|
|
89
|
+
}, value)), /* @__PURE__ */ jsx("span", {
|
|
90
|
+
className: "size-8 shrink-0 rounded-lg border sm:size-7",
|
|
91
|
+
[INLINE_OVERFLOW_TRIGGER_ATTRIBUTE]: ""
|
|
92
|
+
})]
|
|
128
93
|
})
|
|
129
94
|
]
|
|
130
95
|
});
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The overflow policy of a single-line row of items (tabs, chips) that
|
|
3
|
+
* collapses the items that do not fit into a trailing "show more" menu.
|
|
4
|
+
* The inspector facet bar and the saved-view strip both run it, so the two
|
|
5
|
+
* rows decide alike which items stay on screen. Pure, so it is tested
|
|
6
|
+
* without a DOM or a `ResizeObserver`; `useInlineOverflow` measures a row
|
|
7
|
+
* and feeds it.
|
|
8
|
+
*/
|
|
9
|
+
export type InlineOverflowInput = {
|
|
10
|
+
/** Width inside the row available to the items (the trigger's own
|
|
11
|
+
* footprint is reserved out of this by the policy, not by the caller). */
|
|
12
|
+
availableWidth: number;
|
|
13
|
+
/** Each item's natural (measured) width, in display order. */
|
|
14
|
+
itemWidths: readonly number[];
|
|
15
|
+
/** Index into `itemWidths` of the active item, always kept visible
|
|
16
|
+
* whenever anything is. */
|
|
17
|
+
activeIndex: number;
|
|
18
|
+
/** The overflow trigger's own footprint, reserved alongside the items
|
|
19
|
+
* whenever not every item fits. */
|
|
20
|
+
triggerWidth: number;
|
|
21
|
+
/** Horizontal gap between adjacent items, and between the last item and
|
|
22
|
+
* the trigger. */
|
|
23
|
+
gap?: number;
|
|
24
|
+
};
|
|
25
|
+
export type InlineOverflowPolicy = {
|
|
26
|
+
/** How many items are visible. Counts a prefix of `itemWidths` in their
|
|
27
|
+
* given order when the active item already falls inside that prefix;
|
|
28
|
+
* otherwise counts the active item plus however many others (in order,
|
|
29
|
+
* skipping the active one) fit alongside it. `0` is the narrow-width
|
|
30
|
+
* floor: not even the active item fits, so nothing but the trigger
|
|
31
|
+
* shows. */
|
|
32
|
+
visibleCount: number;
|
|
33
|
+
/** Whether the overflow trigger renders at all. */
|
|
34
|
+
showOverflowTrigger: boolean;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Decides the row's visible/overflow split.
|
|
38
|
+
*
|
|
39
|
+
* Narrow-width floor: if even the active item cannot fit beside the
|
|
40
|
+
* trigger, showing it anyway would push the trigger past
|
|
41
|
+
* `availableWidth`; the row clips overflow, so the trigger (the only way
|
|
42
|
+
* to reach ANY item from this row) would become unreachable. Rather than
|
|
43
|
+
* shrink the active item below its natural width (this policy has no
|
|
44
|
+
* minimum-width input to shrink to), this drops the active item from the
|
|
45
|
+
* visible row too and shows only the trigger: every item, including the
|
|
46
|
+
* active one, still reaches through the overflow menu, and the trigger
|
|
47
|
+
* itself always stays on screen.
|
|
48
|
+
*/
|
|
49
|
+
export declare const resolveInlineOverflow: ({ availableWidth, itemWidths, activeIndex, triggerWidth, gap }: InlineOverflowInput) => InlineOverflowPolicy;
|
|
50
|
+
export type InlineOverflowSplit<T> = {
|
|
51
|
+
/** The items the row shows, in display order. */
|
|
52
|
+
visible: T[];
|
|
53
|
+
/** The items the overflow menu lists, in display order. */
|
|
54
|
+
overflow: T[];
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Splits `items` the way `resolveInlineOverflow` counted them: a prefix of
|
|
58
|
+
* `visibleCount` items when the active one is inside it, else the first
|
|
59
|
+
* `visibleCount - 1` items and the active one after them. Every item lands
|
|
60
|
+
* in exactly one of the two lists, each in its original order.
|
|
61
|
+
*/
|
|
62
|
+
export declare const splitInlineOverflow: <T>(items: readonly T[], visibleCount: number, activeIndex: number) => InlineOverflowSplit<T>;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// src/lib/inline-overflow.ts
|
|
2
|
+
const sumWithGaps = (widths, gap) => widths.reduce((sum, width, index) => sum + width + (index > 0 ? gap : 0), 0);
|
|
3
|
+
/**
|
|
4
|
+
* Decides the row's visible/overflow split.
|
|
5
|
+
*
|
|
6
|
+
* Narrow-width floor: if even the active item cannot fit beside the
|
|
7
|
+
* trigger, showing it anyway would push the trigger past
|
|
8
|
+
* `availableWidth`; the row clips overflow, so the trigger (the only way
|
|
9
|
+
* to reach ANY item from this row) would become unreachable. Rather than
|
|
10
|
+
* shrink the active item below its natural width (this policy has no
|
|
11
|
+
* minimum-width input to shrink to), this drops the active item from the
|
|
12
|
+
* visible row too and shows only the trigger: every item, including the
|
|
13
|
+
* active one, still reaches through the overflow menu, and the trigger
|
|
14
|
+
* itself always stays on screen.
|
|
15
|
+
*/
|
|
16
|
+
const resolveInlineOverflow = ({ availableWidth, itemWidths, activeIndex, triggerWidth, gap = 0 }) => {
|
|
17
|
+
if (sumWithGaps(itemWidths, gap) <= availableWidth) return {
|
|
18
|
+
visibleCount: itemWidths.length,
|
|
19
|
+
showOverflowTrigger: false
|
|
20
|
+
};
|
|
21
|
+
let used = 0;
|
|
22
|
+
let count = 0;
|
|
23
|
+
for (const width of itemWidths) {
|
|
24
|
+
const add = width + (count > 0 ? gap : 0);
|
|
25
|
+
if (used + add + gap + triggerWidth > availableWidth) break;
|
|
26
|
+
used += add;
|
|
27
|
+
count += 1;
|
|
28
|
+
}
|
|
29
|
+
if (activeIndex < count) return {
|
|
30
|
+
visibleCount: count,
|
|
31
|
+
showOverflowTrigger: true
|
|
32
|
+
};
|
|
33
|
+
const activeWidth = itemWidths[activeIndex] ?? 0;
|
|
34
|
+
if (activeWidth + gap + triggerWidth > availableWidth) return {
|
|
35
|
+
visibleCount: 0,
|
|
36
|
+
showOverflowTrigger: true
|
|
37
|
+
};
|
|
38
|
+
used = activeWidth;
|
|
39
|
+
count = 0;
|
|
40
|
+
for (const [index, width] of itemWidths.entries()) {
|
|
41
|
+
if (index === activeIndex) continue;
|
|
42
|
+
const add = width + gap;
|
|
43
|
+
if (used + add + gap + triggerWidth > availableWidth) break;
|
|
44
|
+
used += add;
|
|
45
|
+
count += 1;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
visibleCount: count + 1,
|
|
49
|
+
showOverflowTrigger: true
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Splits `items` the way `resolveInlineOverflow` counted them: a prefix of
|
|
54
|
+
* `visibleCount` items when the active one is inside it, else the first
|
|
55
|
+
* `visibleCount - 1` items and the active one after them. Every item lands
|
|
56
|
+
* in exactly one of the two lists, each in its original order.
|
|
57
|
+
*/
|
|
58
|
+
const splitInlineOverflow = (items, visibleCount, activeIndex) => {
|
|
59
|
+
const count = Math.max(0, Math.min(visibleCount, items.length));
|
|
60
|
+
if (count === items.length) return {
|
|
61
|
+
visible: [...items],
|
|
62
|
+
overflow: []
|
|
63
|
+
};
|
|
64
|
+
if (count === 0) return {
|
|
65
|
+
visible: [],
|
|
66
|
+
overflow: [...items]
|
|
67
|
+
};
|
|
68
|
+
if (activeIndex < count) return {
|
|
69
|
+
visible: items.slice(0, count),
|
|
70
|
+
overflow: items.slice(count)
|
|
71
|
+
};
|
|
72
|
+
const shown = new Set(Array.from({ length: count - 1 }, (_, index) => index));
|
|
73
|
+
shown.add(activeIndex);
|
|
74
|
+
return {
|
|
75
|
+
visible: items.filter((_, index) => shown.has(index)),
|
|
76
|
+
overflow: items.filter((_, index) => !shown.has(index))
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
export { resolveInlineOverflow, splitInlineOverflow };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CSSProperties } from "react";
|
|
2
|
-
export declare const MATTER_SWATCHES: readonly ["--option-blue", "--option-emerald", "--option-amber", "--option-violet", "--option-
|
|
3
|
-
export declare const getMatterSwatch: (id: string) => "--option-amber" | "--option-blue" | "--option-cyan" | "--option-emerald" | "--option-orange" | "--option-
|
|
2
|
+
export declare const MATTER_SWATCHES: readonly ["--option-blue", "--option-emerald", "--option-amber", "--option-violet", "--option-cyan", "--option-orange", "--option-teal"];
|
|
3
|
+
export declare const getMatterSwatch: (id: string) => "--option-amber" | "--option-blue" | "--option-cyan" | "--option-emerald" | "--option-orange" | "--option-teal" | "--option-violet";
|
|
4
4
|
export declare const getMatterColor: (id: string) => string;
|
|
5
5
|
export declare const getMatterPickerColor: (id: string, color: string | null) => string;
|
|
6
6
|
export declare const toStoredMatterColor: (color: string) => string;
|
|
@@ -14,7 +14,6 @@ export type ReviewDecisionSize = "xs" | "sm";
|
|
|
14
14
|
*/
|
|
15
15
|
export type ReviewDecisionEmphasis = "primary" | "quiet";
|
|
16
16
|
type ReviewDecisionActionsProps = {
|
|
17
|
-
state: ReviewDecisionState;
|
|
18
17
|
onAccept?: (() => void) | undefined;
|
|
19
18
|
onReject?: (() => void) | undefined;
|
|
20
19
|
onRevert?: (() => void) | undefined;
|
|
@@ -29,9 +28,15 @@ type ReviewDecisionActionsProps = {
|
|
|
29
28
|
reopenLabel?: string | undefined;
|
|
30
29
|
acceptTooltip?: ReactNode;
|
|
31
30
|
rejectTooltip?: ReactNode;
|
|
32
|
-
|
|
31
|
+
disabledReason?: string | undefined;
|
|
33
32
|
className?: string;
|
|
34
|
-
}
|
|
33
|
+
} & ({
|
|
34
|
+
state: Exclude<ReviewDecisionState, "applying">;
|
|
35
|
+
applyingReason?: never;
|
|
36
|
+
} | {
|
|
37
|
+
state: ReviewDecisionState;
|
|
38
|
+
applyingReason: string;
|
|
39
|
+
});
|
|
35
40
|
/** Accept / reject / revert / reopen, in one shape, for every review surface. */
|
|
36
|
-
export declare const ReviewDecisionActions: ({ state, onAccept, onReject, onRevert, onReopen, size, emphasis, acceptLabel, rejectLabel, revertLabel, reopenLabel, acceptTooltip, rejectTooltip,
|
|
41
|
+
export declare const ReviewDecisionActions: ({ state, onAccept, onReject, onRevert, onReopen, size, emphasis, acceptLabel, rejectLabel, revertLabel, reopenLabel, acceptTooltip, rejectTooltip, disabledReason, applyingReason, className }: ReviewDecisionActionsProps) => import("react").JSX.Element | null;
|
|
37
42
|
export {};
|
|
@@ -13,11 +13,11 @@ const REJECT_VARIANT = {
|
|
|
13
13
|
quiet: "ghost"
|
|
14
14
|
};
|
|
15
15
|
/** Accept / reject / revert / reopen, in one shape, for every review surface. */
|
|
16
|
-
const ReviewDecisionActions = ({ state, onAccept, onReject, onRevert, onReopen, size = "sm", emphasis = "primary", acceptLabel, rejectLabel, revertLabel, reopenLabel, acceptTooltip, rejectTooltip,
|
|
16
|
+
const ReviewDecisionActions = ({ state, onAccept, onReject, onRevert, onReopen, size = "sm", emphasis = "primary", acceptLabel, rejectLabel, revertLabel, reopenLabel, acceptTooltip, rejectTooltip, disabledReason, applyingReason, className }) => {
|
|
17
17
|
const controls = renderControls({
|
|
18
18
|
acceptLabel,
|
|
19
19
|
acceptTooltip,
|
|
20
|
-
|
|
20
|
+
disabledReason: state === "applying" ? applyingReason : disabledReason,
|
|
21
21
|
emphasis,
|
|
22
22
|
onAccept,
|
|
23
23
|
onReject,
|
|
@@ -37,40 +37,41 @@ const ReviewDecisionActions = ({ state, onAccept, onReject, onRevert, onReopen,
|
|
|
37
37
|
children: controls
|
|
38
38
|
});
|
|
39
39
|
};
|
|
40
|
-
const renderControls = ({ acceptLabel, acceptTooltip,
|
|
40
|
+
const renderControls = ({ acceptLabel, acceptTooltip, disabledReason, emphasis, onAccept, onReject, onReopen, onRevert, rejectLabel, rejectTooltip, reopenLabel, revertLabel, size, state }) => {
|
|
41
41
|
switch (state) {
|
|
42
42
|
case "pending":
|
|
43
|
-
case "applying": {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
43
|
+
case "applying": return /* @__PURE__ */ jsxs(Fragment, { children: [onAccept === void 0 ? null : /* @__PURE__ */ jsxs(Button, {
|
|
44
|
+
disabled: disabledReason !== void 0,
|
|
45
|
+
disabledReason,
|
|
46
|
+
onClick: onAccept,
|
|
47
|
+
size,
|
|
48
|
+
tooltip: acceptTooltip,
|
|
49
|
+
variant: ACCEPT_VARIANT[emphasis],
|
|
50
|
+
children: [/* @__PURE__ */ jsx(CheckIcon, {}), acceptLabel]
|
|
51
|
+
}), onReject === void 0 ? null : /* @__PURE__ */ jsxs(Button, {
|
|
52
|
+
disabled: disabledReason !== void 0,
|
|
53
|
+
disabledReason,
|
|
54
|
+
onClick: onReject,
|
|
55
|
+
size,
|
|
56
|
+
tooltip: rejectTooltip,
|
|
57
|
+
variant: REJECT_VARIANT[emphasis],
|
|
58
|
+
children: [/* @__PURE__ */ jsx(XIcon, {}), rejectLabel]
|
|
59
|
+
})] });
|
|
61
60
|
case "accepted":
|
|
62
61
|
case "rejected":
|
|
63
62
|
case "dismissed":
|
|
64
63
|
if (onRevert === void 0 && onReopen === void 0) return null;
|
|
65
64
|
return /* @__PURE__ */ jsxs(Fragment, { children: [onRevert === void 0 ? null : /* @__PURE__ */ jsx(Button, {
|
|
66
|
-
disabled,
|
|
65
|
+
disabled: disabledReason !== void 0,
|
|
66
|
+
disabledReason,
|
|
67
67
|
onClick: onRevert,
|
|
68
68
|
size,
|
|
69
69
|
variant: "muted",
|
|
70
70
|
children: revertLabel
|
|
71
71
|
}), onReopen === void 0 ? null : /* @__PURE__ */ jsx(Button, {
|
|
72
72
|
"aria-label": reopenLabel,
|
|
73
|
-
disabled,
|
|
73
|
+
disabled: disabledReason !== void 0,
|
|
74
|
+
disabledReason,
|
|
74
75
|
onClick: onReopen,
|
|
75
76
|
size: size === "xs" ? "icon-xs" : "icon-sm",
|
|
76
77
|
variant: "ghost",
|
|
@@ -16,10 +16,8 @@ type ReviewOutOfDateNoticeProps = {
|
|
|
16
16
|
onAction?: (() => void) | undefined;
|
|
17
17
|
/** The action is running: its button shows it and takes no second press. */
|
|
18
18
|
actionPending?: boolean;
|
|
19
|
-
/** The action is not available now. */
|
|
20
|
-
actionDisabled?: boolean;
|
|
21
19
|
/** Why the action is not available now, shown on hover over it. */
|
|
22
|
-
actionDisabledReason?:
|
|
20
|
+
actionDisabledReason?: string | undefined;
|
|
23
21
|
tone?: ReviewOutOfDateTone;
|
|
24
22
|
className?: string;
|
|
25
23
|
};
|
|
@@ -28,5 +26,5 @@ type ReviewOutOfDateNoticeProps = {
|
|
|
28
26
|
* together: they are different reasons to run again, and a reviewer working
|
|
29
27
|
* through findings should see each one rather than the first.
|
|
30
28
|
*/
|
|
31
|
-
export declare const ReviewOutOfDateNotice: ({ reasons, actionLabel, onAction, actionPending,
|
|
29
|
+
export declare const ReviewOutOfDateNotice: ({ reasons, actionLabel, onAction, actionPending, actionDisabledReason, tone, className }: ReviewOutOfDateNoticeProps) => import("react").JSX.Element | null;
|
|
32
30
|
export {};
|
|
@@ -7,7 +7,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
7
7
|
* together: they are different reasons to run again, and a reviewer working
|
|
8
8
|
* through findings should see each one rather than the first.
|
|
9
9
|
*/
|
|
10
|
-
const ReviewOutOfDateNotice = ({ reasons, actionLabel, onAction, actionPending = false,
|
|
10
|
+
const ReviewOutOfDateNotice = ({ reasons, actionLabel, onAction, actionPending = false, actionDisabledReason, tone = "warning", className }) => {
|
|
11
11
|
if (reasons.length === 0) return null;
|
|
12
12
|
return /* @__PURE__ */ jsxs("div", {
|
|
13
13
|
className: cn("mb-2 rounded-lg border px-3 py-2", TONE_CLASS[tone], className),
|
|
@@ -17,11 +17,11 @@ const ReviewOutOfDateNotice = ({ reasons, actionLabel, onAction, actionPending =
|
|
|
17
17
|
children: reasons.map((reason) => /* @__PURE__ */ jsx("li", { children: reason.label }, reason.id))
|
|
18
18
|
}), onAction === void 0 ? null : /* @__PURE__ */ jsx(Button, {
|
|
19
19
|
className: "mt-2",
|
|
20
|
-
disabled:
|
|
20
|
+
disabled: actionDisabledReason !== void 0,
|
|
21
|
+
disabledReason: actionDisabledReason,
|
|
21
22
|
loading: actionPending,
|
|
22
23
|
onClick: onAction,
|
|
23
24
|
size: "xs",
|
|
24
|
-
tooltip: actionDisabled ? actionDisabledReason : void 0,
|
|
25
25
|
variant: "outline",
|
|
26
26
|
children: actionLabel
|
|
27
27
|
})]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stll/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.81.0",
|
|
4
4
|
"description": "Stella's design system: bidi-aware React primitives built on Base UI, the dockable inspector pane, and the Tailwind v4 theme they are styled with.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"base-ui",
|
|
@@ -270,6 +270,10 @@
|
|
|
270
270
|
"types": "./dist/components/input.d.ts",
|
|
271
271
|
"import": "./dist/components/input.js"
|
|
272
272
|
},
|
|
273
|
+
"./inline-overflow": {
|
|
274
|
+
"types": "./dist/lib/inline-overflow.d.ts",
|
|
275
|
+
"import": "./dist/lib/inline-overflow.js"
|
|
276
|
+
},
|
|
273
277
|
"./inline-rename": {
|
|
274
278
|
"types": "./dist/components/inline-rename.d.ts",
|
|
275
279
|
"import": "./dist/components/inline-rename.js"
|
|
@@ -634,6 +638,10 @@
|
|
|
634
638
|
"types": "./dist/hooks/use-content-dir.d.ts",
|
|
635
639
|
"import": "./dist/hooks/use-content-dir.js"
|
|
636
640
|
},
|
|
641
|
+
"./use-inline-overflow": {
|
|
642
|
+
"types": "./dist/hooks/use-inline-overflow.d.ts",
|
|
643
|
+
"import": "./dist/hooks/use-inline-overflow.js"
|
|
644
|
+
},
|
|
637
645
|
"./use-latest": {
|
|
638
646
|
"types": "./dist/hooks/use-latest.d.ts",
|
|
639
647
|
"import": "./dist/hooks/use-latest.js"
|