@windrun-huaiin/base-ui 5.4.0 → 6.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/dist/components/index.js +120 -4
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +236 -4
- package/dist/components/index.mjs.map +1 -1
- package/dist/components/server.d.cts +16 -5373
- package/dist/components/server.d.ts +16 -5373
- package/dist/components/server.js +120 -4
- package/dist/components/server.js.map +1 -1
- package/dist/components/server.mjs +236 -4
- package/dist/components/server.mjs.map +1 -1
- package/dist/ui/index.js +120 -4
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/index.mjs +236 -4
- package/dist/ui/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/components/global-icon.tsx +7 -7
- package/src/components/limited-lucide-icons.ts +119 -0
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@windrun-huaiin/base-ui",
|
3
|
-
"version": "
|
3
|
+
"version": "6.0.0",
|
4
4
|
"description": "Base UI components for windrun-huaiin projects",
|
5
5
|
"type": "module",
|
6
6
|
"exports": {
|
@@ -36,7 +36,7 @@
|
|
36
36
|
"@radix-ui/react-slot": "^1.2.2",
|
37
37
|
"class-variance-authority": "^0.7.1",
|
38
38
|
"lucide-react": "^0.525.0",
|
39
|
-
"@windrun-huaiin/lib": "^6.
|
39
|
+
"@windrun-huaiin/lib": "^6.1.0"
|
40
40
|
},
|
41
41
|
"peerDependencies": {
|
42
42
|
"clsx": "^2.0.0",
|
@@ -8,7 +8,7 @@
|
|
8
8
|
import { BUILTIN_ICON_COMPONENTS } from '@base-ui/assets';
|
9
9
|
import { themeIconColor, themeSvgIconSize } from '@base-ui/lib/theme-util';
|
10
10
|
|
11
|
-
import * as
|
11
|
+
import * as limitedIconsModule from '@base-ui/components/limited-lucide-icons';
|
12
12
|
import { type LucideProps } from 'lucide-react';
|
13
13
|
import React from 'react';
|
14
14
|
|
@@ -22,13 +22,13 @@ type StyledLucideIconComponent = (props: LucideProps) => React.ReactElement;
|
|
22
22
|
type IconComponent = StyledLucideIconComponent | React.ComponentType<LucideProps>;
|
23
23
|
|
24
24
|
// Style Lucide icons with global color
|
25
|
-
const tempStyledLimitedIcons: Partial<Record<keyof typeof
|
25
|
+
const tempStyledLimitedIcons: Partial<Record<keyof typeof limitedIconsModule, StyledLucideIconComponent>> = {};
|
26
26
|
|
27
|
-
for (const iconNameKey in
|
28
|
-
if (Object.prototype.hasOwnProperty.call(
|
29
|
-
const iconName = iconNameKey as keyof typeof
|
27
|
+
for (const iconNameKey in limitedIconsModule) {
|
28
|
+
if (Object.prototype.hasOwnProperty.call(limitedIconsModule, iconNameKey)) {
|
29
|
+
const iconName = iconNameKey as keyof typeof limitedIconsModule;
|
30
30
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
31
|
-
const OriginalIconComponent =
|
31
|
+
const OriginalIconComponent = limitedIconsModule[iconName] as any;
|
32
32
|
|
33
33
|
if (typeof OriginalIconComponent === 'function' ||
|
34
34
|
(typeof OriginalIconComponent === 'object' &&
|
@@ -72,7 +72,7 @@ for (const iconNameKey in lucideIconsModule) {
|
|
72
72
|
}
|
73
73
|
|
74
74
|
const styledLimitedIconsPart = tempStyledLimitedIcons as {
|
75
|
-
[K in keyof typeof
|
75
|
+
[K in keyof typeof limitedIconsModule]: StyledLucideIconComponent;
|
76
76
|
};
|
77
77
|
|
78
78
|
// Wrap built-in SVG components with the same className handling logic
|
@@ -0,0 +1,119 @@
|
|
1
|
+
/*
|
2
|
+
* This file re-exports selected icons from 'lucide-react'.
|
3
|
+
* This is the single place to manage which lucide-react icons are available globally.
|
4
|
+
* Editing the list of exports here will automatically update their availability
|
5
|
+
* in globalLucideIcons.
|
6
|
+
*/
|
7
|
+
export {
|
8
|
+
AlbumIcon,
|
9
|
+
AlignHorizontalJustifyEnd,
|
10
|
+
ArrowLeft,
|
11
|
+
ArrowRight,
|
12
|
+
ArrowUp,
|
13
|
+
Binary,
|
14
|
+
Blocks,
|
15
|
+
BookX,
|
16
|
+
BotMessageSquare,
|
17
|
+
Brain,
|
18
|
+
BrainCircuit,
|
19
|
+
BringToFront,
|
20
|
+
Building2,
|
21
|
+
Bug,
|
22
|
+
BugOff,
|
23
|
+
Car,
|
24
|
+
Circle,
|
25
|
+
CircleAlert,
|
26
|
+
CircleSmall,
|
27
|
+
CircleStop,
|
28
|
+
Check,
|
29
|
+
CheckCheck,
|
30
|
+
CheckLine,
|
31
|
+
ChevronDown,
|
32
|
+
ChevronLeft,
|
33
|
+
ChevronRight,
|
34
|
+
ChevronUp,
|
35
|
+
Cpu,
|
36
|
+
Copy,
|
37
|
+
ComponentIcon,
|
38
|
+
DatabaseZap,
|
39
|
+
Dot,
|
40
|
+
Download,
|
41
|
+
Eye,
|
42
|
+
ExternalLink,
|
43
|
+
Facebook,
|
44
|
+
Shield,
|
45
|
+
File,
|
46
|
+
FileDown,
|
47
|
+
FileInput,
|
48
|
+
FileLock2,
|
49
|
+
FileUp,
|
50
|
+
Fingerprint,
|
51
|
+
Folder,
|
52
|
+
FolderOpen,
|
53
|
+
Gift,
|
54
|
+
GitMerge,
|
55
|
+
GitPullRequestArrow,
|
56
|
+
Globe,
|
57
|
+
GlobeLock,
|
58
|
+
Grip,
|
59
|
+
GripVertical,
|
60
|
+
HandHeart,
|
61
|
+
Handshake,
|
62
|
+
Highlighter,
|
63
|
+
HousePlus,
|
64
|
+
Infinity,
|
65
|
+
Info,
|
66
|
+
ImageDown,
|
67
|
+
ImageOff,
|
68
|
+
ImageUp,
|
69
|
+
Keyboard,
|
70
|
+
LandPlot,
|
71
|
+
Languages,
|
72
|
+
Layout,
|
73
|
+
LayoutTemplate,
|
74
|
+
LibraryIcon,
|
75
|
+
Link,
|
76
|
+
ListTodo,
|
77
|
+
Loader2,
|
78
|
+
LogIn,
|
79
|
+
LogOut,
|
80
|
+
Mail,
|
81
|
+
MessageCircleMore,
|
82
|
+
MessageCircleCode,
|
83
|
+
MoreHorizontal,
|
84
|
+
MousePointerClick,
|
85
|
+
NotepadText,
|
86
|
+
Palette,
|
87
|
+
PanelLeft,
|
88
|
+
PanelsTopLeft,
|
89
|
+
PawPrint,
|
90
|
+
Pencil,
|
91
|
+
Pi,
|
92
|
+
QrCode,
|
93
|
+
ReceiptText,
|
94
|
+
RefreshCcw,
|
95
|
+
Regex,
|
96
|
+
Replace,
|
97
|
+
Rocket,
|
98
|
+
Rss,
|
99
|
+
Scale,
|
100
|
+
Search,
|
101
|
+
SendHorizontal,
|
102
|
+
Share,
|
103
|
+
Sigma,
|
104
|
+
ShieldUser,
|
105
|
+
Sprout,
|
106
|
+
SquareDashedBottomCode,
|
107
|
+
SquareTerminal,
|
108
|
+
Server,
|
109
|
+
SplinePointer,
|
110
|
+
Sparkles,
|
111
|
+
Star,
|
112
|
+
Tablets,
|
113
|
+
Terminal,
|
114
|
+
Twitter,
|
115
|
+
UserRoundCheck,
|
116
|
+
Workflow,
|
117
|
+
X,
|
118
|
+
Zap,
|
119
|
+
} from "lucide-react";
|