@windrun-huaiin/base-ui 5.3.4 → 5.4.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 +4 -117
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +4 -230
- package/dist/components/index.mjs.map +1 -1
- package/dist/components/server.d.cts +5377 -17
- package/dist/components/server.d.ts +5377 -17
- package/dist/components/server.js +4 -117
- package/dist/components/server.js.map +1 -1
- package/dist/components/server.mjs +4 -230
- package/dist/components/server.mjs.map +1 -1
- package/dist/ui/index.js +4 -117
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/index.mjs +4 -230
- package/dist/ui/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/components/global-icon.tsx +7 -7
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@windrun-huaiin/base-ui",
|
3
|
-
"version": "5.
|
3
|
+
"version": "5.4.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": "^
|
39
|
+
"@windrun-huaiin/lib": "^6.0.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 lucideIconsModule from 'lucide-react';
|
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 lucideIconsModule, 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 lucideIconsModule) {
|
28
|
+
if (Object.prototype.hasOwnProperty.call(lucideIconsModule, iconNameKey)) {
|
29
|
+
const iconName = iconNameKey as keyof typeof lucideIconsModule;
|
30
30
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
31
|
-
const OriginalIconComponent =
|
31
|
+
const OriginalIconComponent = lucideIconsModule[iconName] as any;
|
32
32
|
|
33
33
|
if (typeof OriginalIconComponent === 'function' ||
|
34
34
|
(typeof OriginalIconComponent === 'object' &&
|
@@ -72,7 +72,7 @@ for (const iconNameKey in limitedIconsModule) {
|
|
72
72
|
}
|
73
73
|
|
74
74
|
const styledLimitedIconsPart = tempStyledLimitedIcons as {
|
75
|
-
[K in keyof typeof
|
75
|
+
[K in keyof typeof lucideIconsModule]: StyledLucideIconComponent;
|
76
76
|
};
|
77
77
|
|
78
78
|
// Wrap built-in SVG components with the same className handling logic
|