@windrun-huaiin/base-ui 15.1.1 → 16.0.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/LICENSE +1 -1
- package/README.md +4 -4
- package/dist/components/global-icon.d.ts +15 -1
- package/dist/components/global-icon.js +4 -35
- package/dist/components/global-icon.mjs +5 -36
- package/dist/components/icon-factory.d.ts +15 -0
- package/dist/components/icon-factory.js +39 -0
- package/dist/components/icon-factory.mjs +35 -0
- package/dist/components/language-switcher.d.ts +1 -1
- package/dist/components/language-switcher.js +3 -3
- package/dist/components/language-switcher.mjs +3 -3
- package/dist/components/limited-lucide-icons.d.ts +1 -1
- package/dist/components/limited-lucide-icons.js +56 -0
- package/dist/components/limited-lucide-icons.mjs +1 -1
- package/dist/components/server.d.ts +1 -0
- package/dist/components/server.js +191 -0
- package/dist/components/server.mjs +2 -0
- package/dist/icons/index.d.ts +189 -0
- package/dist/icons/index.js +418 -0
- package/dist/icons/index.mjs +225 -0
- package/dist/ui/button.js +2 -2
- package/dist/ui/button.mjs +2 -2
- package/dist/ui/copyable-text.js +2 -2
- package/dist/ui/copyable-text.mjs +2 -2
- package/dist/ui/dropdown-menu.js +4 -4
- package/dist/ui/dropdown-menu.mjs +4 -4
- package/dist/ui/language-button.js +1 -1
- package/dist/ui/language-button.mjs +1 -1
- package/package.json +7 -2
- package/src/components/global-icon.tsx +7 -65
- package/src/components/icon-factory.tsx +92 -0
- package/src/components/language-switcher.tsx +4 -4
- package/src/components/limited-lucide-icons.ts +14 -0
- package/src/components/server.ts +1 -0
- package/src/icons/index.ts +381 -0
- package/src/ui/button.tsx +2 -2
- package/src/ui/copyable-text.tsx +3 -3
- package/src/ui/dropdown-menu.tsx +4 -4
- package/src/ui/language-button.tsx +1 -1
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import BitcoinIcon from '../assets/bitcoin.mjs';
|
|
2
|
+
import ClerkIcon$1 from '../assets/clerk.mjs';
|
|
3
|
+
import CSSIcon$1 from '../assets/css.mjs';
|
|
4
|
+
import CSVIcon$1 from '../assets/csv.mjs';
|
|
5
|
+
import D8Icon$1 from '../assets/d8.mjs';
|
|
6
|
+
import DiffIcon$1 from '../assets/diff.mjs';
|
|
7
|
+
import DPAIcon$1 from '../assets/dpa.mjs';
|
|
8
|
+
import FAQIcon$1 from '../assets/faq.mjs';
|
|
9
|
+
import FAQBIcon$1 from '../assets/faqb.mjs';
|
|
10
|
+
import FAQSIcon$1 from '../assets/faqs.mjs';
|
|
11
|
+
import GitHubIcon$1 from '../assets/github.mjs';
|
|
12
|
+
import HtmlIcon$1 from '../assets/html.mjs';
|
|
13
|
+
import HttpIcon$1 from '../assets/http.mjs';
|
|
14
|
+
import ItermIcon$1 from '../assets/iterm.mjs';
|
|
15
|
+
import JavaIcon$1 from '../assets/java.mjs';
|
|
16
|
+
import JsonIcon$1 from '../assets/json.mjs';
|
|
17
|
+
import LastUpdatedIcon$1 from '../assets/last-updated.mjs';
|
|
18
|
+
import LogIcon$1 from '../assets/log.mjs';
|
|
19
|
+
import MACIcon$1 from '../assets/mac.mjs';
|
|
20
|
+
import MarkdownIcon$1 from '../assets/markdown.mjs';
|
|
21
|
+
import MDXIcon$1 from '../assets/mdx.mjs';
|
|
22
|
+
import MermaidIcon from '../assets/mermaid.mjs';
|
|
23
|
+
import SchemeIcon$1 from '../assets/scheme.mjs';
|
|
24
|
+
import SnippetsIcon$1 from '../assets/snippets.mjs';
|
|
25
|
+
import SQLIcon$1 from '../assets/sql.mjs';
|
|
26
|
+
import SubPIcon$1 from '../assets/subp.mjs';
|
|
27
|
+
import T3PIcon$1 from '../assets/t3p.mjs';
|
|
28
|
+
import TestIcon$1 from '../assets/test.mjs';
|
|
29
|
+
import TxtIcon$1 from '../assets/txt.mjs';
|
|
30
|
+
import XMLIcon$1 from '../assets/xml.mjs';
|
|
31
|
+
import YamlIcon$1 from '../assets/yaml.mjs';
|
|
32
|
+
import { createGlobalLucideIcon, createGlobalIcon } from '../components/icon-factory.mjs';
|
|
33
|
+
export { GlobalAccentIcon } from '../components/icon-factory.mjs';
|
|
34
|
+
import { Loader2, ChevronRight, Check, Circle, AlbumIcon as AlbumIcon$1, AlignHorizontalJustifyEnd, ArrowLeft, ArrowRight, ArrowUp, Baby, Bell, Binary, Blocks, BookX, BookOpen, BookAudio, BookA, BookCheck, BookDown, BookHeadphones, Bookmark, BookmarkCheck, BookmarkMinus, BookmarkPlus, BookmarkX, BotMessageSquare, Brain, BrainCircuit, Briefcase, BringToFront, BrushCleaning, Building2, Bug, BugOff, BadgeQuestionMark, Car, ChartColumnStacked, CircleAlert, CircleQuestionMark, CircleSmall, CircleStop, CircleArrowDown, CircleArrowUp, CheckCheck, CheckLine, ChevronDown, ChevronLeft, ChevronUp, Coffee, Coins, ComponentIcon as ComponentIcon$1, Copy, CopyCheck, Cpu, Database, DatabaseZap, Dot, Download, Ellipsis, EllipsisVertical, Eye, EyeOff, ExternalLink, Facebook, Shield, File, FileDown, FileInput, FileLock2, FileUp, Fingerprint, Folder, FolderOpen, Gem, Gift, GitMerge, GitPullRequestArrow, Globe, GlobeLock, Grip, GripVertical, HandHeart, Handshake, Highlighter, History, HousePlus, Infinity, Info, ImageDown, ImageOff, ImageUp, Keyboard, LandPlot, Languages, Layout, LayoutTemplate, LibraryIcon as LibraryIcon$1, Lightbulb, Link, ListTodo, LogIn, LogOut, Mail, MessageCircleMore, MessageCircleCode, MessageSquareDiff, Music4, MoreHorizontal, MousePointerClick, NotepadText, Palette, PanelLeft, PanelsTopLeft, PawPrint, Pencil, Pi, Pin, PinOff, Plus, QrCode, ReceiptText, RefreshCcw, Regex, Replace, Rocket, RotateCcw, Rss, Scale, ScanSearch, Search, Send, SendHorizontal, Settings, Settings2, Share, Sigma, ShieldUser, ShoppingCart, Sprout, SquareDashedBottomCode, SquareTerminal, Server, SplinePointer, Sparkles, Star, Tablets, Terminal, Trash2, Twitter, Usb, UserRoundCheck, Wand2, Workflow, X, Zap } from 'lucide-react';
|
|
35
|
+
export { getGlobalIcon, getIconElement, globalLucideIcons } from '../components/global-icon.mjs';
|
|
36
|
+
export { createSiteIcon } from '../components/site-icon.mjs';
|
|
37
|
+
|
|
38
|
+
const AlbumIcon = createGlobalLucideIcon(AlbumIcon$1, 'AlbumIcon');
|
|
39
|
+
const AlignHorizontalJustifyEndIcon = createGlobalLucideIcon(AlignHorizontalJustifyEnd, 'AlignHorizontalJustifyEndIcon');
|
|
40
|
+
const ArrowLeftIcon = createGlobalLucideIcon(ArrowLeft, 'ArrowLeftIcon');
|
|
41
|
+
const ArrowRightIcon = createGlobalLucideIcon(ArrowRight, 'ArrowRightIcon');
|
|
42
|
+
const ArrowUpIcon = createGlobalLucideIcon(ArrowUp, 'ArrowUpIcon');
|
|
43
|
+
const BabyIcon = createGlobalLucideIcon(Baby, 'BabyIcon');
|
|
44
|
+
const BellIcon = createGlobalLucideIcon(Bell, 'BellIcon');
|
|
45
|
+
const BinaryIcon = createGlobalLucideIcon(Binary, 'BinaryIcon');
|
|
46
|
+
const BlocksIcon = createGlobalLucideIcon(Blocks, 'BlocksIcon');
|
|
47
|
+
const BookXIcon = createGlobalLucideIcon(BookX, 'BookXIcon');
|
|
48
|
+
const BookOpenIcon = createGlobalLucideIcon(BookOpen, 'BookOpenIcon');
|
|
49
|
+
const BookAudioIcon = createGlobalLucideIcon(BookAudio, 'BookAudioIcon');
|
|
50
|
+
const BookAIcon = createGlobalLucideIcon(BookA, 'BookAIcon');
|
|
51
|
+
const BookCheckIcon = createGlobalLucideIcon(BookCheck, 'BookCheckIcon');
|
|
52
|
+
const BookDownIcon = createGlobalLucideIcon(BookDown, 'BookDownIcon');
|
|
53
|
+
const BookHeadphonesIcon = createGlobalLucideIcon(BookHeadphones, 'BookHeadphonesIcon');
|
|
54
|
+
const BookmarkIcon = createGlobalLucideIcon(Bookmark, 'BookmarkIcon');
|
|
55
|
+
const BookmarkCheckIcon = createGlobalLucideIcon(BookmarkCheck, 'BookmarkCheckIcon');
|
|
56
|
+
const BookmarkMinusIcon = createGlobalLucideIcon(BookmarkMinus, 'BookmarkMinusIcon');
|
|
57
|
+
const BookmarkPlusIcon = createGlobalLucideIcon(BookmarkPlus, 'BookmarkPlusIcon');
|
|
58
|
+
const BookmarkXIcon = createGlobalLucideIcon(BookmarkX, 'BookmarkXIcon');
|
|
59
|
+
const BotMessageSquareIcon = createGlobalLucideIcon(BotMessageSquare, 'BotMessageSquareIcon');
|
|
60
|
+
const BrainIcon = createGlobalLucideIcon(Brain, 'BrainIcon');
|
|
61
|
+
const BrainCircuitIcon = createGlobalLucideIcon(BrainCircuit, 'BrainCircuitIcon');
|
|
62
|
+
const BriefcaseIcon = createGlobalLucideIcon(Briefcase, 'BriefcaseIcon');
|
|
63
|
+
const BringToFrontIcon = createGlobalLucideIcon(BringToFront, 'BringToFrontIcon');
|
|
64
|
+
const BrushCleaningIcon = createGlobalLucideIcon(BrushCleaning, 'BrushCleaningIcon');
|
|
65
|
+
const Building2Icon = createGlobalLucideIcon(Building2, 'Building2Icon');
|
|
66
|
+
const BugIcon = createGlobalLucideIcon(Bug, 'BugIcon');
|
|
67
|
+
const BugOffIcon = createGlobalLucideIcon(BugOff, 'BugOffIcon');
|
|
68
|
+
const BadgeQuestionMarkIcon = createGlobalLucideIcon(BadgeQuestionMark, 'BadgeQuestionMarkIcon');
|
|
69
|
+
const CarIcon = createGlobalLucideIcon(Car, 'CarIcon');
|
|
70
|
+
const ChartColumnStackedIcon = createGlobalLucideIcon(ChartColumnStacked, 'ChartColumnStackedIcon');
|
|
71
|
+
const CircleIcon = createGlobalLucideIcon(Circle, 'CircleIcon');
|
|
72
|
+
const CircleAlertIcon = createGlobalLucideIcon(CircleAlert, 'CircleAlertIcon');
|
|
73
|
+
const CircleQuestionMarkIcon = createGlobalLucideIcon(CircleQuestionMark, 'CircleQuestionMarkIcon');
|
|
74
|
+
const CircleSmallIcon = createGlobalLucideIcon(CircleSmall, 'CircleSmallIcon');
|
|
75
|
+
const CircleStopIcon = createGlobalLucideIcon(CircleStop, 'CircleStopIcon');
|
|
76
|
+
const CheckIcon = createGlobalLucideIcon(Check, 'CheckIcon');
|
|
77
|
+
const CircleArrowDownIcon = createGlobalLucideIcon(CircleArrowDown, 'CircleArrowDownIcon');
|
|
78
|
+
const CircleArrowUpIcon = createGlobalLucideIcon(CircleArrowUp, 'CircleArrowUpIcon');
|
|
79
|
+
const CheckCheckIcon = createGlobalLucideIcon(CheckCheck, 'CheckCheckIcon');
|
|
80
|
+
const CheckLineIcon = createGlobalLucideIcon(CheckLine, 'CheckLineIcon');
|
|
81
|
+
const ChevronDownIcon = createGlobalLucideIcon(ChevronDown, 'ChevronDownIcon');
|
|
82
|
+
const ChevronLeftIcon = createGlobalLucideIcon(ChevronLeft, 'ChevronLeftIcon');
|
|
83
|
+
const ChevronRightIcon = createGlobalLucideIcon(ChevronRight, 'ChevronRightIcon');
|
|
84
|
+
const ChevronUpIcon = createGlobalLucideIcon(ChevronUp, 'ChevronUpIcon');
|
|
85
|
+
const CoffeeIcon = createGlobalLucideIcon(Coffee, 'CoffeeIcon');
|
|
86
|
+
const CoinsIcon = createGlobalLucideIcon(Coins, 'CoinsIcon');
|
|
87
|
+
const ComponentIcon = createGlobalLucideIcon(ComponentIcon$1, 'ComponentIcon');
|
|
88
|
+
const CopyIcon = createGlobalLucideIcon(Copy, 'CopyIcon');
|
|
89
|
+
const CopyCheckIcon = createGlobalLucideIcon(CopyCheck, 'CopyCheckIcon');
|
|
90
|
+
const CpuIcon = createGlobalLucideIcon(Cpu, 'CpuIcon');
|
|
91
|
+
const DatabaseIcon = createGlobalLucideIcon(Database, 'DatabaseIcon');
|
|
92
|
+
const DatabaseZapIcon = createGlobalLucideIcon(DatabaseZap, 'DatabaseZapIcon');
|
|
93
|
+
const DotIcon = createGlobalLucideIcon(Dot, 'DotIcon');
|
|
94
|
+
const DownloadIcon = createGlobalLucideIcon(Download, 'DownloadIcon');
|
|
95
|
+
const EllipsisIcon = createGlobalLucideIcon(Ellipsis, 'EllipsisIcon');
|
|
96
|
+
const EllipsisVerticalIcon = createGlobalLucideIcon(EllipsisVertical, 'EllipsisVerticalIcon');
|
|
97
|
+
const EyeIcon = createGlobalLucideIcon(Eye, 'EyeIcon');
|
|
98
|
+
const EyeOffIcon = createGlobalLucideIcon(EyeOff, 'EyeOffIcon');
|
|
99
|
+
const ExternalLinkIcon = createGlobalLucideIcon(ExternalLink, 'ExternalLinkIcon');
|
|
100
|
+
const FacebookIcon = createGlobalLucideIcon(Facebook, 'FacebookIcon');
|
|
101
|
+
const ShieldIcon = createGlobalLucideIcon(Shield, 'ShieldIcon');
|
|
102
|
+
const FileIcon = createGlobalLucideIcon(File, 'FileIcon');
|
|
103
|
+
const FileDownIcon = createGlobalLucideIcon(FileDown, 'FileDownIcon');
|
|
104
|
+
const FileInputIcon = createGlobalLucideIcon(FileInput, 'FileInputIcon');
|
|
105
|
+
const FileLock2Icon = createGlobalLucideIcon(FileLock2, 'FileLock2Icon');
|
|
106
|
+
const FileUpIcon = createGlobalLucideIcon(FileUp, 'FileUpIcon');
|
|
107
|
+
const FingerprintIcon = createGlobalLucideIcon(Fingerprint, 'FingerprintIcon');
|
|
108
|
+
const FolderIcon = createGlobalLucideIcon(Folder, 'FolderIcon');
|
|
109
|
+
const FolderOpenIcon = createGlobalLucideIcon(FolderOpen, 'FolderOpenIcon');
|
|
110
|
+
const GemIcon = createGlobalLucideIcon(Gem, 'GemIcon');
|
|
111
|
+
const GiftIcon = createGlobalLucideIcon(Gift, 'GiftIcon');
|
|
112
|
+
const GitMergeIcon = createGlobalLucideIcon(GitMerge, 'GitMergeIcon');
|
|
113
|
+
const GitPullRequestArrowIcon = createGlobalLucideIcon(GitPullRequestArrow, 'GitPullRequestArrowIcon');
|
|
114
|
+
const GlobeIcon = createGlobalLucideIcon(Globe, 'GlobeIcon');
|
|
115
|
+
const GlobeLockIcon = createGlobalLucideIcon(GlobeLock, 'GlobeLockIcon');
|
|
116
|
+
const GripIcon = createGlobalLucideIcon(Grip, 'GripIcon');
|
|
117
|
+
const GripVerticalIcon = createGlobalLucideIcon(GripVertical, 'GripVerticalIcon');
|
|
118
|
+
const HandHeartIcon = createGlobalLucideIcon(HandHeart, 'HandHeartIcon');
|
|
119
|
+
const HandshakeIcon = createGlobalLucideIcon(Handshake, 'HandshakeIcon');
|
|
120
|
+
const HighlighterIcon = createGlobalLucideIcon(Highlighter, 'HighlighterIcon');
|
|
121
|
+
const HistoryIcon = createGlobalLucideIcon(History, 'HistoryIcon');
|
|
122
|
+
const HousePlusIcon = createGlobalLucideIcon(HousePlus, 'HousePlusIcon');
|
|
123
|
+
const InfinityIcon = createGlobalLucideIcon(Infinity, 'InfinityIcon');
|
|
124
|
+
const InfoIcon = createGlobalLucideIcon(Info, 'InfoIcon');
|
|
125
|
+
const ImageDownIcon = createGlobalLucideIcon(ImageDown, 'ImageDownIcon');
|
|
126
|
+
const ImageOffIcon = createGlobalLucideIcon(ImageOff, 'ImageOffIcon');
|
|
127
|
+
const ImageUpIcon = createGlobalLucideIcon(ImageUp, 'ImageUpIcon');
|
|
128
|
+
const KeyboardIcon = createGlobalLucideIcon(Keyboard, 'KeyboardIcon');
|
|
129
|
+
const LandPlotIcon = createGlobalLucideIcon(LandPlot, 'LandPlotIcon');
|
|
130
|
+
const LanguagesIcon = createGlobalLucideIcon(Languages, 'LanguagesIcon');
|
|
131
|
+
const LayoutIcon = createGlobalLucideIcon(Layout, 'LayoutIcon');
|
|
132
|
+
const LayoutTemplateIcon = createGlobalLucideIcon(LayoutTemplate, 'LayoutTemplateIcon');
|
|
133
|
+
const LibraryIcon = createGlobalLucideIcon(LibraryIcon$1, 'LibraryIcon');
|
|
134
|
+
const LightbulbIcon = createGlobalLucideIcon(Lightbulb, 'LightbulbIcon');
|
|
135
|
+
const LinkIcon = createGlobalLucideIcon(Link, 'LinkIcon');
|
|
136
|
+
const ListTodoIcon = createGlobalLucideIcon(ListTodo, 'ListTodoIcon');
|
|
137
|
+
const Loader2Icon = createGlobalLucideIcon(Loader2, 'Loader2Icon');
|
|
138
|
+
const LogInIcon = createGlobalLucideIcon(LogIn, 'LogInIcon');
|
|
139
|
+
const LogOutIcon = createGlobalLucideIcon(LogOut, 'LogOutIcon');
|
|
140
|
+
const MailIcon = createGlobalLucideIcon(Mail, 'MailIcon');
|
|
141
|
+
const MessageCircleMoreIcon = createGlobalLucideIcon(MessageCircleMore, 'MessageCircleMoreIcon');
|
|
142
|
+
const MessageCircleCodeIcon = createGlobalLucideIcon(MessageCircleCode, 'MessageCircleCodeIcon');
|
|
143
|
+
const MessageSquareDiffIcon = createGlobalLucideIcon(MessageSquareDiff, 'MessageSquareDiffIcon');
|
|
144
|
+
const Music4Icon = createGlobalLucideIcon(Music4, 'Music4Icon');
|
|
145
|
+
const MoreHorizontalIcon = createGlobalLucideIcon(MoreHorizontal, 'MoreHorizontalIcon');
|
|
146
|
+
const MousePointerClickIcon = createGlobalLucideIcon(MousePointerClick, 'MousePointerClickIcon');
|
|
147
|
+
const NotepadTextIcon = createGlobalLucideIcon(NotepadText, 'NotepadTextIcon');
|
|
148
|
+
const PaletteIcon = createGlobalLucideIcon(Palette, 'PaletteIcon');
|
|
149
|
+
const PanelLeftIcon = createGlobalLucideIcon(PanelLeft, 'PanelLeftIcon');
|
|
150
|
+
const PanelsTopLeftIcon = createGlobalLucideIcon(PanelsTopLeft, 'PanelsTopLeftIcon');
|
|
151
|
+
const PawPrintIcon = createGlobalLucideIcon(PawPrint, 'PawPrintIcon');
|
|
152
|
+
const PencilIcon = createGlobalLucideIcon(Pencil, 'PencilIcon');
|
|
153
|
+
const PiIcon = createGlobalLucideIcon(Pi, 'PiIcon');
|
|
154
|
+
const PinIcon = createGlobalLucideIcon(Pin, 'PinIcon');
|
|
155
|
+
const PinOffIcon = createGlobalLucideIcon(PinOff, 'PinOffIcon');
|
|
156
|
+
const PlusIcon = createGlobalLucideIcon(Plus, 'PlusIcon');
|
|
157
|
+
const QrCodeIcon = createGlobalLucideIcon(QrCode, 'QrCodeIcon');
|
|
158
|
+
const ReceiptTextIcon = createGlobalLucideIcon(ReceiptText, 'ReceiptTextIcon');
|
|
159
|
+
const RefreshCcwIcon = createGlobalLucideIcon(RefreshCcw, 'RefreshCcwIcon');
|
|
160
|
+
const RegexIcon = createGlobalLucideIcon(Regex, 'RegexIcon');
|
|
161
|
+
const ReplaceIcon = createGlobalLucideIcon(Replace, 'ReplaceIcon');
|
|
162
|
+
const RocketIcon = createGlobalLucideIcon(Rocket, 'RocketIcon');
|
|
163
|
+
const RotateCcwIcon = createGlobalLucideIcon(RotateCcw, 'RotateCcwIcon');
|
|
164
|
+
const RssIcon = createGlobalLucideIcon(Rss, 'RssIcon');
|
|
165
|
+
const ScaleIcon = createGlobalLucideIcon(Scale, 'ScaleIcon');
|
|
166
|
+
const ScanSearchIcon = createGlobalLucideIcon(ScanSearch, 'ScanSearchIcon');
|
|
167
|
+
const SearchIcon = createGlobalLucideIcon(Search, 'SearchIcon');
|
|
168
|
+
const SendIcon = createGlobalLucideIcon(Send, 'SendIcon');
|
|
169
|
+
const SendHorizontalIcon = createGlobalLucideIcon(SendHorizontal, 'SendHorizontalIcon');
|
|
170
|
+
const SettingsIcon = createGlobalLucideIcon(Settings, 'SettingsIcon');
|
|
171
|
+
const Settings2Icon = createGlobalLucideIcon(Settings2, 'Settings2Icon');
|
|
172
|
+
const ShareIcon = createGlobalLucideIcon(Share, 'ShareIcon');
|
|
173
|
+
const SigmaIcon = createGlobalLucideIcon(Sigma, 'SigmaIcon');
|
|
174
|
+
const ShieldUserIcon = createGlobalLucideIcon(ShieldUser, 'ShieldUserIcon');
|
|
175
|
+
const ShoppingCartIcon = createGlobalLucideIcon(ShoppingCart, 'ShoppingCartIcon');
|
|
176
|
+
const SproutIcon = createGlobalLucideIcon(Sprout, 'SproutIcon');
|
|
177
|
+
const SquareDashedBottomCodeIcon = createGlobalLucideIcon(SquareDashedBottomCode, 'SquareDashedBottomCodeIcon');
|
|
178
|
+
const SquareTerminalIcon = createGlobalLucideIcon(SquareTerminal, 'SquareTerminalIcon');
|
|
179
|
+
const ServerIcon = createGlobalLucideIcon(Server, 'ServerIcon');
|
|
180
|
+
const SplinePointerIcon = createGlobalLucideIcon(SplinePointer, 'SplinePointerIcon');
|
|
181
|
+
const SparklesIcon = createGlobalLucideIcon(Sparkles, 'SparklesIcon');
|
|
182
|
+
const StarIcon = createGlobalLucideIcon(Star, 'StarIcon');
|
|
183
|
+
const TabletsIcon = createGlobalLucideIcon(Tablets, 'TabletsIcon');
|
|
184
|
+
const TerminalIcon = createGlobalLucideIcon(Terminal, 'TerminalIcon');
|
|
185
|
+
const Trash2Icon = createGlobalLucideIcon(Trash2, 'Trash2Icon');
|
|
186
|
+
const TwitterIcon = createGlobalLucideIcon(Twitter, 'TwitterIcon');
|
|
187
|
+
const UsbIcon = createGlobalLucideIcon(Usb, 'UsbIcon');
|
|
188
|
+
const UserRoundCheckIcon = createGlobalLucideIcon(UserRoundCheck, 'UserRoundCheckIcon');
|
|
189
|
+
const Wand2Icon = createGlobalLucideIcon(Wand2, 'Wand2Icon');
|
|
190
|
+
const WorkflowIcon = createGlobalLucideIcon(Workflow, 'WorkflowIcon');
|
|
191
|
+
const XIcon = createGlobalLucideIcon(X, 'XIcon');
|
|
192
|
+
const ZapIcon = createGlobalLucideIcon(Zap, 'ZapIcon');
|
|
193
|
+
const GitHubIcon = createGlobalIcon(GitHubIcon$1, 'GitHubIcon');
|
|
194
|
+
const D8Icon = createGlobalIcon(D8Icon$1, 'D8Icon');
|
|
195
|
+
const ClerkIcon = createGlobalIcon(ClerkIcon$1, 'ClerkIcon');
|
|
196
|
+
const ItermIcon = createGlobalIcon(ItermIcon$1, 'ItermIcon');
|
|
197
|
+
const MarkdownIcon = createGlobalIcon(MarkdownIcon$1, 'MarkdownIcon');
|
|
198
|
+
const MDXIcon = createGlobalIcon(MDXIcon$1, 'MDXIcon');
|
|
199
|
+
const HtmlIcon = createGlobalIcon(HtmlIcon$1, 'HtmlIcon');
|
|
200
|
+
const JsonIcon = createGlobalIcon(JsonIcon$1, 'JsonIcon');
|
|
201
|
+
const XMLIcon = createGlobalIcon(XMLIcon$1, 'XMLIcon');
|
|
202
|
+
const YamlIcon = createGlobalIcon(YamlIcon$1, 'YamlIcon');
|
|
203
|
+
const CSVIcon = createGlobalIcon(CSVIcon$1, 'CSVIcon');
|
|
204
|
+
const TxtIcon = createGlobalIcon(TxtIcon$1, 'TxtIcon');
|
|
205
|
+
const JavaIcon = createGlobalIcon(JavaIcon$1, 'JavaIcon');
|
|
206
|
+
const SQLIcon = createGlobalIcon(SQLIcon$1, 'SQLIcon');
|
|
207
|
+
const LogIcon = createGlobalIcon(LogIcon$1, 'LogIcon');
|
|
208
|
+
const MACIcon = createGlobalIcon(MACIcon$1, 'MACIcon');
|
|
209
|
+
const BTCIcon = createGlobalIcon(BitcoinIcon, 'BTCIcon');
|
|
210
|
+
const CSSIcon = createGlobalIcon(CSSIcon$1, 'CSSIcon');
|
|
211
|
+
const MmdIcon = createGlobalIcon(MermaidIcon, 'MmdIcon');
|
|
212
|
+
const LastUpdatedIcon = createGlobalIcon(LastUpdatedIcon$1, 'LastUpdatedIcon');
|
|
213
|
+
const SnippetsIcon = createGlobalIcon(SnippetsIcon$1, 'SnippetsIcon');
|
|
214
|
+
const TestIcon = createGlobalIcon(TestIcon$1, 'TestIcon');
|
|
215
|
+
const DiffIcon = createGlobalIcon(DiffIcon$1, 'DiffIcon');
|
|
216
|
+
const DPAIcon = createGlobalIcon(DPAIcon$1, 'DPAIcon');
|
|
217
|
+
const SubPIcon = createGlobalIcon(SubPIcon$1, 'SubPIcon');
|
|
218
|
+
const T3PIcon = createGlobalIcon(T3PIcon$1, 'T3PIcon');
|
|
219
|
+
const HttpIcon = createGlobalIcon(HttpIcon$1, 'HttpIcon');
|
|
220
|
+
const SchemeIcon = createGlobalIcon(SchemeIcon$1, 'SchemeIcon');
|
|
221
|
+
const FAQIcon = createGlobalIcon(FAQIcon$1, 'FAQIcon');
|
|
222
|
+
const FAQBIcon = createGlobalIcon(FAQBIcon$1, 'FAQBIcon');
|
|
223
|
+
const FAQSIcon = createGlobalIcon(FAQSIcon$1, 'FAQSIcon');
|
|
224
|
+
|
|
225
|
+
export { AlbumIcon, AlignHorizontalJustifyEndIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, BTCIcon, BabyIcon, BadgeQuestionMarkIcon, BellIcon, BinaryIcon, BlocksIcon, BookAIcon, BookAudioIcon, BookCheckIcon, BookDownIcon, BookHeadphonesIcon, BookOpenIcon, BookXIcon, BookmarkCheckIcon, BookmarkIcon, BookmarkMinusIcon, BookmarkPlusIcon, BookmarkXIcon, BotMessageSquareIcon, BrainCircuitIcon, BrainIcon, BriefcaseIcon, BringToFrontIcon, BrushCleaningIcon, BugIcon, BugOffIcon, Building2Icon, CSSIcon, CSVIcon, CarIcon, ChartColumnStackedIcon, CheckCheckIcon, CheckIcon, CheckLineIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CircleAlertIcon, CircleArrowDownIcon, CircleArrowUpIcon, CircleIcon, CircleQuestionMarkIcon, CircleSmallIcon, CircleStopIcon, ClerkIcon, CoffeeIcon, CoinsIcon, ComponentIcon, CopyCheckIcon, CopyIcon, CpuIcon, D8Icon, DPAIcon, DatabaseIcon, DatabaseZapIcon, DiffIcon, DotIcon, DownloadIcon, EllipsisIcon, EllipsisVerticalIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FAQBIcon, FAQIcon, FAQSIcon, FacebookIcon, FileDownIcon, FileIcon, FileInputIcon, FileLock2Icon, FileUpIcon, FingerprintIcon, FolderIcon, FolderOpenIcon, GemIcon, GiftIcon, GitHubIcon, GitMergeIcon, GitPullRequestArrowIcon, GlobeIcon, GlobeLockIcon, GripIcon, GripVerticalIcon, HandHeartIcon, HandshakeIcon, HighlighterIcon, HistoryIcon, HousePlusIcon, HtmlIcon, HttpIcon, ImageDownIcon, ImageOffIcon, ImageUpIcon, InfinityIcon, InfoIcon, ItermIcon, JavaIcon, JsonIcon, KeyboardIcon, LandPlotIcon, LanguagesIcon, LastUpdatedIcon, LayoutIcon, LayoutTemplateIcon, LibraryIcon, LightbulbIcon, LinkIcon, ListTodoIcon, Loader2Icon, LogIcon, LogInIcon, LogOutIcon, MACIcon, MDXIcon, MailIcon, MarkdownIcon, MessageCircleCodeIcon, MessageCircleMoreIcon, MessageSquareDiffIcon, MmdIcon, MoreHorizontalIcon, MousePointerClickIcon, Music4Icon, NotepadTextIcon, PaletteIcon, PanelLeftIcon, PanelsTopLeftIcon, PawPrintIcon, PencilIcon, PiIcon, PinIcon, PinOffIcon, PlusIcon, QrCodeIcon, ReceiptTextIcon, RefreshCcwIcon, RegexIcon, ReplaceIcon, RocketIcon, RotateCcwIcon, RssIcon, SQLIcon, ScaleIcon, ScanSearchIcon, SchemeIcon, SearchIcon, SendHorizontalIcon, SendIcon, ServerIcon, Settings2Icon, SettingsIcon, ShareIcon, ShieldIcon, ShieldUserIcon, ShoppingCartIcon, SigmaIcon, SnippetsIcon, SparklesIcon, SplinePointerIcon, SproutIcon, SquareDashedBottomCodeIcon, SquareTerminalIcon, StarIcon, SubPIcon, T3PIcon, TabletsIcon, TerminalIcon, TestIcon, Trash2Icon, TwitterIcon, TxtIcon, UsbIcon, UserRoundCheckIcon, Wand2Icon, WorkflowIcon, XIcon, XMLIcon, YamlIcon, ZapIcon, createGlobalIcon, createGlobalLucideIcon };
|
package/dist/ui/button.js
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
var tslib = require('tslib');
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var index = require('../icons/index.js');
|
|
6
7
|
var React = require('react');
|
|
7
8
|
var reactSlot = require('@radix-ui/react-slot');
|
|
8
9
|
var classVarianceAuthority = require('class-variance-authority');
|
|
9
|
-
var globalIcon = require('../components/global-icon.js');
|
|
10
10
|
var utils = require('@windrun-huaiin/lib/utils');
|
|
11
11
|
|
|
12
12
|
function _interopNamespaceDefault(e) {
|
|
@@ -56,7 +56,7 @@ const Button = React__namespace.forwardRef((_a, ref) => {
|
|
|
56
56
|
if (asChild) {
|
|
57
57
|
return (jsxRuntime.jsx(Comp, Object.assign({ className: utils.cn(buttonVariants({ variant, size, className })), ref: ref, disabled: loading || props.disabled }, props, { children: children })));
|
|
58
58
|
}
|
|
59
|
-
return (jsxRuntime.jsxs(Comp, Object.assign({ className: utils.cn(buttonVariants({ variant, size, className })), ref: ref, disabled: loading || props.disabled }, props, { children: [children, loading && jsxRuntime.jsx(
|
|
59
|
+
return (jsxRuntime.jsxs(Comp, Object.assign({ className: utils.cn(buttonVariants({ variant, size, className })), ref: ref, disabled: loading || props.disabled }, props, { children: [children, loading && jsxRuntime.jsx(index.Loader2Icon, { className: "ml-2 h-4 w-4 animate-spin" })] })));
|
|
60
60
|
});
|
|
61
61
|
Button.displayName = "Button";
|
|
62
62
|
|
package/dist/ui/button.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { __rest } from 'tslib';
|
|
3
3
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
|
+
import { Loader2Icon } from '../icons/index.mjs';
|
|
4
5
|
import * as React from 'react';
|
|
5
6
|
import { Slot } from '@radix-ui/react-slot';
|
|
6
7
|
import { cva } from 'class-variance-authority';
|
|
7
|
-
import { globalLucideIcons } from '../components/global-icon.mjs';
|
|
8
8
|
import { cn } from '@windrun-huaiin/lib/utils';
|
|
9
9
|
|
|
10
10
|
const buttonVariants = cva("inline-flex items-center gap-2 whitespace-nowrap rounded-md text-sm ring-offset-background transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", {
|
|
@@ -35,7 +35,7 @@ const Button = React.forwardRef((_a, ref) => {
|
|
|
35
35
|
if (asChild) {
|
|
36
36
|
return (jsx(Comp, Object.assign({ className: cn(buttonVariants({ variant, size, className })), ref: ref, disabled: loading || props.disabled }, props, { children: children })));
|
|
37
37
|
}
|
|
38
|
-
return (jsxs(Comp, Object.assign({ className: cn(buttonVariants({ variant, size, className })), ref: ref, disabled: loading || props.disabled }, props, { children: [children, loading && jsx(
|
|
38
|
+
return (jsxs(Comp, Object.assign({ className: cn(buttonVariants({ variant, size, className })), ref: ref, disabled: loading || props.disabled }, props, { children: [children, loading && jsx(Loader2Icon, { className: "ml-2 h-4 w-4 animate-spin" })] })));
|
|
39
39
|
});
|
|
40
40
|
Button.displayName = "Button";
|
|
41
41
|
|
package/dist/ui/copyable-text.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
var tslib = require('tslib');
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var index = require('../icons/index.js');
|
|
6
7
|
var React = require('react');
|
|
7
|
-
var globalIcon = require('../components/global-icon.js');
|
|
8
8
|
var utils = require('@windrun-huaiin/lib/utils');
|
|
9
9
|
|
|
10
10
|
function CopyableText({ text, children, }) {
|
|
@@ -26,7 +26,7 @@ function CopyableText({ text, children, }) {
|
|
|
26
26
|
return jsxRuntime.jsx("span", { className: "text-slate-400", children: "--" });
|
|
27
27
|
return (
|
|
28
28
|
// div + onMouseDown + preventDefault
|
|
29
|
-
jsxRuntime.jsxs("div", { onMouseDown: handleCopy, className: utils.cn('group relative inline-flex items-center gap-1.5 rounded-md', 'px-1.5 -mx-1.5 py-0.5 cursor-pointer select-text', 'hover:bg-purple-50 hover:text-purple-700', 'dark:hover:bg-purple-500/10 dark:hover:text-purple-300', 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-purple-400', 'transition-all', 'text-[0.5rem] sm:text-[0.625rem] md:text-xs font-mono leading-tight', 'min-h-4'), title: "Click to copy", children: [jsxRuntime.jsx("span", { className: "break-all", children: children || text }), jsxRuntime.jsx(
|
|
29
|
+
jsxRuntime.jsxs("div", { onMouseDown: handleCopy, className: utils.cn('group relative inline-flex items-center gap-1.5 rounded-md', 'px-1.5 -mx-1.5 py-0.5 cursor-pointer select-text', 'hover:bg-purple-50 hover:text-purple-700', 'dark:hover:bg-purple-500/10 dark:hover:text-purple-300', 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-purple-400', 'transition-all', 'text-[0.5rem] sm:text-[0.625rem] md:text-xs font-mono leading-tight', 'min-h-4'), title: "Click to copy", children: [jsxRuntime.jsx("span", { className: "break-all", children: children || text }), jsxRuntime.jsx(index.CheckIcon, { className: utils.cn('size-3 shrink-0', 'transition-opacity duration-200', copied ? 'opacity-100' : 'opacity-0') })] }));
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
exports.CopyableText = CopyableText;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { __awaiter } from 'tslib';
|
|
3
3
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
|
+
import { CheckIcon } from '../icons/index.mjs';
|
|
4
5
|
import { useState } from 'react';
|
|
5
|
-
import { globalLucideIcons } from '../components/global-icon.mjs';
|
|
6
6
|
import { cn } from '@windrun-huaiin/lib/utils';
|
|
7
7
|
|
|
8
8
|
function CopyableText({ text, children, }) {
|
|
@@ -24,7 +24,7 @@ function CopyableText({ text, children, }) {
|
|
|
24
24
|
return jsx("span", { className: "text-slate-400", children: "--" });
|
|
25
25
|
return (
|
|
26
26
|
// div + onMouseDown + preventDefault
|
|
27
|
-
jsxs("div", { onMouseDown: handleCopy, className: cn('group relative inline-flex items-center gap-1.5 rounded-md', 'px-1.5 -mx-1.5 py-0.5 cursor-pointer select-text', 'hover:bg-purple-50 hover:text-purple-700', 'dark:hover:bg-purple-500/10 dark:hover:text-purple-300', 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-purple-400', 'transition-all', 'text-[0.5rem] sm:text-[0.625rem] md:text-xs font-mono leading-tight', 'min-h-4'), title: "Click to copy", children: [jsx("span", { className: "break-all", children: children || text }), jsx(
|
|
27
|
+
jsxs("div", { onMouseDown: handleCopy, className: cn('group relative inline-flex items-center gap-1.5 rounded-md', 'px-1.5 -mx-1.5 py-0.5 cursor-pointer select-text', 'hover:bg-purple-50 hover:text-purple-700', 'dark:hover:bg-purple-500/10 dark:hover:text-purple-300', 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-purple-400', 'transition-all', 'text-[0.5rem] sm:text-[0.625rem] md:text-xs font-mono leading-tight', 'min-h-4'), title: "Click to copy", children: [jsx("span", { className: "break-all", children: children || text }), jsx(CheckIcon, { className: cn('size-3 shrink-0', 'transition-opacity duration-200', copied ? 'opacity-100' : 'opacity-0') })] }));
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
export { CopyableText };
|
package/dist/ui/dropdown-menu.js
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
|
|
4
4
|
var tslib = require('tslib');
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var index = require('../icons/index.js');
|
|
6
7
|
var React = require('react');
|
|
7
8
|
var DropdownMenuPrimitive = require('@radix-ui/react-dropdown-menu');
|
|
8
|
-
var globalIcon = require('../components/global-icon.js');
|
|
9
9
|
var utils = require('@windrun-huaiin/lib/utils');
|
|
10
10
|
|
|
11
11
|
function _interopNamespaceDefault(e) {
|
|
@@ -36,7 +36,7 @@ const DropdownMenuSub = DropdownMenuPrimitive__namespace.Sub;
|
|
|
36
36
|
const DropdownMenuRadioGroup = DropdownMenuPrimitive__namespace.RadioGroup;
|
|
37
37
|
const DropdownMenuSubTrigger = React__namespace.forwardRef((_a, ref) => {
|
|
38
38
|
var { className, inset, children } = _a, props = tslib.__rest(_a, ["className", "inset", "children"]);
|
|
39
|
-
return (jsxRuntime.jsxs(DropdownMenuPrimitive__namespace.SubTrigger, Object.assign({ ref: ref, className: utils.cn("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", inset && "pl-8", className) }, props, { children: [children, jsxRuntime.jsx(
|
|
39
|
+
return (jsxRuntime.jsxs(DropdownMenuPrimitive__namespace.SubTrigger, Object.assign({ ref: ref, className: utils.cn("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", inset && "pl-8", className) }, props, { children: [children, jsxRuntime.jsx(index.ChevronRightIcon, { className: "ml-auto" })] })));
|
|
40
40
|
});
|
|
41
41
|
DropdownMenuSubTrigger.displayName =
|
|
42
42
|
DropdownMenuPrimitive__namespace.SubTrigger.displayName;
|
|
@@ -58,13 +58,13 @@ const DropdownMenuItem = React__namespace.forwardRef((_a, ref) => {
|
|
|
58
58
|
DropdownMenuItem.displayName = DropdownMenuPrimitive__namespace.Item.displayName;
|
|
59
59
|
const DropdownMenuCheckboxItem = React__namespace.forwardRef((_a, ref) => {
|
|
60
60
|
var { className, children, checked } = _a, props = tslib.__rest(_a, ["className", "children", "checked"]);
|
|
61
|
-
return (jsxRuntime.jsxs(DropdownMenuPrimitive__namespace.CheckboxItem, Object.assign({ ref: ref, className: utils.cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", className), checked: checked }, props, { children: [jsxRuntime.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: jsxRuntime.jsx(DropdownMenuPrimitive__namespace.ItemIndicator, { children: jsxRuntime.jsx(
|
|
61
|
+
return (jsxRuntime.jsxs(DropdownMenuPrimitive__namespace.CheckboxItem, Object.assign({ ref: ref, className: utils.cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", className), checked: checked }, props, { children: [jsxRuntime.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: jsxRuntime.jsx(DropdownMenuPrimitive__namespace.ItemIndicator, { children: jsxRuntime.jsx(index.CheckIcon, { className: "h-4 w-4" }) }) }), children] })));
|
|
62
62
|
});
|
|
63
63
|
DropdownMenuCheckboxItem.displayName =
|
|
64
64
|
DropdownMenuPrimitive__namespace.CheckboxItem.displayName;
|
|
65
65
|
const DropdownMenuRadioItem = React__namespace.forwardRef((_a, ref) => {
|
|
66
66
|
var { className, children } = _a, props = tslib.__rest(_a, ["className", "children"]);
|
|
67
|
-
return (jsxRuntime.jsxs(DropdownMenuPrimitive__namespace.RadioItem, Object.assign({ ref: ref, className: utils.cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", className) }, props, { children: [jsxRuntime.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: jsxRuntime.jsx(DropdownMenuPrimitive__namespace.ItemIndicator, { children: jsxRuntime.jsx(
|
|
67
|
+
return (jsxRuntime.jsxs(DropdownMenuPrimitive__namespace.RadioItem, Object.assign({ ref: ref, className: utils.cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", className) }, props, { children: [jsxRuntime.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: jsxRuntime.jsx(DropdownMenuPrimitive__namespace.ItemIndicator, { children: jsxRuntime.jsx(index.CircleIcon, { className: "h-2 w-2 fill-current" }) }) }), children] })));
|
|
68
68
|
});
|
|
69
69
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive__namespace.RadioItem.displayName;
|
|
70
70
|
const DropdownMenuLabel = React__namespace.forwardRef((_a, ref) => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { __rest } from 'tslib';
|
|
3
3
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
|
+
import { ChevronRightIcon, CheckIcon, CircleIcon } from '../icons/index.mjs';
|
|
4
5
|
import * as React from 'react';
|
|
5
6
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
6
|
-
import { globalLucideIcons } from '../components/global-icon.mjs';
|
|
7
7
|
import { cn } from '@windrun-huaiin/lib/utils';
|
|
8
8
|
|
|
9
9
|
const DropdownMenu = DropdownMenuPrimitive.Root;
|
|
@@ -14,7 +14,7 @@ const DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
|
14
14
|
const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
15
15
|
const DropdownMenuSubTrigger = React.forwardRef((_a, ref) => {
|
|
16
16
|
var { className, inset, children } = _a, props = __rest(_a, ["className", "inset", "children"]);
|
|
17
|
-
return (jsxs(DropdownMenuPrimitive.SubTrigger, Object.assign({ ref: ref, className: cn("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", inset && "pl-8", className) }, props, { children: [children, jsx(
|
|
17
|
+
return (jsxs(DropdownMenuPrimitive.SubTrigger, Object.assign({ ref: ref, className: cn("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", inset && "pl-8", className) }, props, { children: [children, jsx(ChevronRightIcon, { className: "ml-auto" })] })));
|
|
18
18
|
});
|
|
19
19
|
DropdownMenuSubTrigger.displayName =
|
|
20
20
|
DropdownMenuPrimitive.SubTrigger.displayName;
|
|
@@ -36,13 +36,13 @@ const DropdownMenuItem = React.forwardRef((_a, ref) => {
|
|
|
36
36
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
37
37
|
const DropdownMenuCheckboxItem = React.forwardRef((_a, ref) => {
|
|
38
38
|
var { className, children, checked } = _a, props = __rest(_a, ["className", "children", "checked"]);
|
|
39
|
-
return (jsxs(DropdownMenuPrimitive.CheckboxItem, Object.assign({ ref: ref, className: cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", className), checked: checked }, props, { children: [jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: jsx(DropdownMenuPrimitive.ItemIndicator, { children: jsx(
|
|
39
|
+
return (jsxs(DropdownMenuPrimitive.CheckboxItem, Object.assign({ ref: ref, className: cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", className), checked: checked }, props, { children: [jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: jsx(DropdownMenuPrimitive.ItemIndicator, { children: jsx(CheckIcon, { className: "h-4 w-4" }) }) }), children] })));
|
|
40
40
|
});
|
|
41
41
|
DropdownMenuCheckboxItem.displayName =
|
|
42
42
|
DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
43
43
|
const DropdownMenuRadioItem = React.forwardRef((_a, ref) => {
|
|
44
44
|
var { className, children } = _a, props = __rest(_a, ["className", "children"]);
|
|
45
|
-
return (jsxs(DropdownMenuPrimitive.RadioItem, Object.assign({ ref: ref, className: cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", className) }, props, { children: [jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: jsx(DropdownMenuPrimitive.ItemIndicator, { children: jsx(
|
|
45
|
+
return (jsxs(DropdownMenuPrimitive.RadioItem, Object.assign({ ref: ref, className: cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", className) }, props, { children: [jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: jsx(DropdownMenuPrimitive.ItemIndicator, { children: jsx(CircleIcon, { className: "h-2 w-2 fill-current" }) }) }), children] })));
|
|
46
46
|
});
|
|
47
47
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
48
48
|
const DropdownMenuLabel = React.forwardRef((_a, ref) => {
|
|
@@ -28,7 +28,7 @@ var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
|
28
28
|
/**
|
|
29
29
|
* @license
|
|
30
30
|
* MIT License
|
|
31
|
-
* Copyright (c)
|
|
31
|
+
* Copyright (c) 2026 D8ger
|
|
32
32
|
*
|
|
33
33
|
* This source code is licensed under the MIT license found in the
|
|
34
34
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -7,7 +7,7 @@ import { cn } from '@windrun-huaiin/lib/utils';
|
|
|
7
7
|
/**
|
|
8
8
|
* @license
|
|
9
9
|
* MIT License
|
|
10
|
-
* Copyright (c)
|
|
10
|
+
* Copyright (c) 2026 D8ger
|
|
11
11
|
*
|
|
12
12
|
* This source code is licensed under the MIT license found in the
|
|
13
13
|
* LICENSE file in the root directory of this source tree.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@windrun-huaiin/base-ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "16.0.0",
|
|
4
4
|
"description": "Base UI components for windrun-huaiin projects",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -29,6 +29,11 @@
|
|
|
29
29
|
"import": "./dist/components/server.mjs",
|
|
30
30
|
"require": "./dist/components/server.js"
|
|
31
31
|
},
|
|
32
|
+
"./icons": {
|
|
33
|
+
"types": "./dist/icons/index.d.ts",
|
|
34
|
+
"import": "./dist/icons/index.mjs",
|
|
35
|
+
"require": "./dist/icons/index.js"
|
|
36
|
+
},
|
|
32
37
|
"./styles/base-ui.css": "./src/styles/base-ui.css",
|
|
33
38
|
"./package.json": "./package.json"
|
|
34
39
|
},
|
|
@@ -49,7 +54,7 @@
|
|
|
49
54
|
"class-variance-authority": "^0.7.1",
|
|
50
55
|
"lucide-react": "^0.577.0",
|
|
51
56
|
"tslib": "^2.8.1",
|
|
52
|
-
"@windrun-huaiin/lib": "^
|
|
57
|
+
"@windrun-huaiin/lib": "^16.0.0"
|
|
53
58
|
},
|
|
54
59
|
"peerDependencies": {
|
|
55
60
|
"clsx": "^2.1.1",
|
|
@@ -6,18 +6,16 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { BUILTIN_ICON_COMPONENTS } from '@base-ui/assets';
|
|
9
|
-
import {
|
|
10
|
-
import { cn } from '@windrun-huaiin/lib/utils';
|
|
9
|
+
import { createGlobalIcon, type StyledLucideIconComponent } from '@base-ui/components/icon-factory';
|
|
11
10
|
import * as limitedIconsModule from '@base-ui/components/limited-lucide-icons';
|
|
11
|
+
import { themeBorderColor, themeIconColor, themeRingColor } from '@base-ui/lib/theme-util';
|
|
12
|
+
import { cn } from '@windrun-huaiin/lib/utils';
|
|
12
13
|
import { type LucideProps } from 'lucide-react';
|
|
13
14
|
import React from 'react';
|
|
14
15
|
|
|
15
16
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16
17
|
declare const process: any;
|
|
17
18
|
|
|
18
|
-
// Type for styled Lucide icon components (accepts LucideProps)
|
|
19
|
-
type StyledLucideIconComponent = (props: LucideProps) => React.ReactElement;
|
|
20
|
-
|
|
21
19
|
// Union type for all icon components (both Lucide and built-in)
|
|
22
20
|
type IconComponent = StyledLucideIconComponent | React.ComponentType<LucideProps>;
|
|
23
21
|
|
|
@@ -35,36 +33,8 @@ for (const iconNameKey in limitedIconsModule) {
|
|
|
35
33
|
OriginalIconComponent !== null &&
|
|
36
34
|
OriginalIconComponent.$$typeof === Symbol.for('react.forward_ref'))) {
|
|
37
35
|
const ComponentToRender = OriginalIconComponent as React.ComponentType<LucideProps>;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
const originalClassName = props.className || '';
|
|
41
|
-
// Check if user provided a text color class, if so, don't use global color
|
|
42
|
-
const hasTextColor = /\btext-\w+(-\d+)?\b/.test(originalClassName);
|
|
43
|
-
// Check if user provided size/dimension classes
|
|
44
|
-
const hasSizeClass = /\b(size-\d+|w-\d+|h-\d+)\b/.test(originalClassName);
|
|
45
|
-
|
|
46
|
-
const newClassName = hasTextColor
|
|
47
|
-
? originalClassName
|
|
48
|
-
: `${themeIconColor} ${originalClassName}`.trim();
|
|
49
|
-
|
|
50
|
-
// If user provided size classes in className, don't use default size
|
|
51
|
-
// Otherwise, use inline styles to ensure size precedence over external CSS
|
|
52
|
-
const finalProps = hasSizeClass
|
|
53
|
-
? { ...props, className: newClassName, size: undefined }
|
|
54
|
-
: {
|
|
55
|
-
...props,
|
|
56
|
-
className: newClassName,
|
|
57
|
-
style: {
|
|
58
|
-
width: props.size || themeSvgIconSize,
|
|
59
|
-
height: props.size || themeSvgIconSize,
|
|
60
|
-
...props.style
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
return <ComponentToRender {...finalProps} />;
|
|
65
|
-
};
|
|
66
|
-
StyledIcon.displayName = `Styled(${iconName})`;
|
|
67
|
-
tempStyledLimitedIcons[iconName] = StyledIcon;
|
|
36
|
+
|
|
37
|
+
tempStyledLimitedIcons[iconName] = createGlobalIcon(ComponentToRender, String(iconName));
|
|
68
38
|
} else {
|
|
69
39
|
console.warn(`[global-icon.tsx] Skipped styling for "${iconName}" as it is not a function, undefined, or not a recognized React component type. Value:`, OriginalIconComponent);
|
|
70
40
|
}
|
|
@@ -78,35 +48,7 @@ const styledLimitedIconsPart = tempStyledLimitedIcons as {
|
|
|
78
48
|
// Wrap built-in SVG components with the same className handling logic
|
|
79
49
|
const tempWrappedBuiltinIcons: Partial<Record<keyof typeof BUILTIN_ICON_COMPONENTS, StyledLucideIconComponent>> = {};
|
|
80
50
|
for (const [iconName, IconComponent] of Object.entries(BUILTIN_ICON_COMPONENTS)) {
|
|
81
|
-
|
|
82
|
-
const originalClassName = props.className || '';
|
|
83
|
-
// Check if user provided a text color class, if so, don't use global color
|
|
84
|
-
const hasTextColor = /\btext-\w+(-\d+)?\b/.test(originalClassName);
|
|
85
|
-
// Check if user provided size/dimension classes
|
|
86
|
-
const hasSizeClass = /\b(size-\d+|w-\d+|h-\d+)\b/.test(originalClassName);
|
|
87
|
-
|
|
88
|
-
const newClassName = hasTextColor
|
|
89
|
-
? originalClassName
|
|
90
|
-
: `${themeIconColor} ${originalClassName}`.trim();
|
|
91
|
-
|
|
92
|
-
// If user provided size classes in className, don't use default size
|
|
93
|
-
// Otherwise, use inline styles to ensure size precedence over external CSS
|
|
94
|
-
const finalProps = hasSizeClass
|
|
95
|
-
? { ...props, className: newClassName, size: undefined }
|
|
96
|
-
: {
|
|
97
|
-
...props,
|
|
98
|
-
className: newClassName,
|
|
99
|
-
style: {
|
|
100
|
-
width: props.size || themeSvgIconSize,
|
|
101
|
-
height: props.size || themeSvgIconSize,
|
|
102
|
-
...props.style
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
return <IconComponent {...finalProps} />;
|
|
107
|
-
};
|
|
108
|
-
WrappedIcon.displayName = `Wrapped(${iconName})`;
|
|
109
|
-
tempWrappedBuiltinIcons[iconName as keyof typeof BUILTIN_ICON_COMPONENTS] = WrappedIcon;
|
|
51
|
+
tempWrappedBuiltinIcons[iconName as keyof typeof BUILTIN_ICON_COMPONENTS] = createGlobalIcon(IconComponent, String(iconName));
|
|
110
52
|
}
|
|
111
53
|
|
|
112
54
|
const wrappedBuiltinIconsPart = tempWrappedBuiltinIcons as {
|
|
@@ -192,4 +134,4 @@ export const DefaultSiteIcon = () => (
|
|
|
192
134
|
// Define 404 not found icon as a functional component (fixed, no configuration)
|
|
193
135
|
export const NotFoundIcon = () => (
|
|
194
136
|
<globalLucideIcons.SquareTerminal className={cn("h-8 w-8 rounded-full p-1 shadow-lg ring-0.5 border", themeBorderColor, themeRingColor, themeIconColor)} />
|
|
195
|
-
);
|
|
137
|
+
);
|