@windrun-huaiin/base-ui 5.1.2 → 5.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windrun-huaiin/base-ui",
3
- "version": "5.1.2",
3
+ "version": "5.3.0",
4
4
  "description": "Base UI components for windrun-huaiin projects",
5
5
  "type": "module",
6
6
  "exports": {
@@ -35,8 +35,8 @@
35
35
  "@radix-ui/react-label": "^2.1.6",
36
36
  "@radix-ui/react-slot": "^1.2.2",
37
37
  "class-variance-authority": "^0.7.1",
38
- "lucide-react": "^0.511.0",
39
- "@windrun-huaiin/lib": "^5.1.2"
38
+ "lucide-react": "^0.525.0",
39
+ "@windrun-huaiin/lib": "^5.3.0"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "clsx": "^2.0.0",
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ import { LucideProps } from 'lucide-react';
3
+ import { themeSvgIconColor } from '@base-ui/lib/theme-util';
4
+
5
+ const FAQIcon = React.forwardRef<SVGSVGElement, LucideProps>(
6
+ ({ color = "currentColor", className, ...props }, ref) => (
7
+ <svg ref={ref}
8
+ role="img"
9
+ className={className}
10
+ stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"
11
+ {...props}
12
+ viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
13
+ <circle cx="12" cy="12" r="10" fill='none' stroke={themeSvgIconColor}/>
14
+ <path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" fill='none' stroke={themeSvgIconColor} />
15
+ <path d="M12 17h.01" fill='none' stroke={themeSvgIconColor} />
16
+ </svg>
17
+ )
18
+ );
19
+
20
+ FAQIcon.displayName = "FAQ";
21
+
22
+ export default FAQIcon;
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ import { LucideProps } from 'lucide-react';
3
+ import { themeSvgIconColor } from '@base-ui/lib/theme-util';
4
+
5
+ const FAQBIcon = React.forwardRef<SVGSVGElement, LucideProps>(
6
+ ({ color = "currentColor", className, ...props }, ref) => (
7
+ <svg ref={ref}
8
+ role="img"
9
+ className={className}
10
+ stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"
11
+ {...props}
12
+ viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
13
+ <path fill='none' stroke={themeSvgIconColor}
14
+ d="M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z" />
15
+ <path fill='none' stroke={themeSvgIconColor} d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" />
16
+ <line fill='none' stroke={themeSvgIconColor} x1="12" x2="12.01" y1="17" y2="17" />
17
+ </svg>
18
+ )
19
+ );
20
+
21
+ FAQBIcon.displayName = "FAQB";
22
+
23
+ export default FAQBIcon;
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ import { LucideProps } from 'lucide-react';
3
+ import { themeSvgIconColor } from '@base-ui/lib/theme-util';
4
+
5
+ const FAQSIcon = React.forwardRef<SVGSVGElement, LucideProps>(
6
+ ({ color = "currentColor", className, ...props }, ref) => (
7
+ <svg ref={ref}
8
+ role="img"
9
+ className={className}
10
+ stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"
11
+ {...props}
12
+ viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
13
+ <path fill='none' stroke={themeSvgIconColor}
14
+ d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" />
15
+ <path fill='none' stroke={themeSvgIconColor} d="M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3" />
16
+ <path fill='none' stroke={themeSvgIconColor} d="M12 17h.01" />
17
+ </svg>
18
+ )
19
+ );
20
+
21
+ FAQSIcon.displayName = "FAQS";
22
+
23
+ export default FAQSIcon;
@@ -27,6 +27,9 @@ import SubPIcon from './subp';
27
27
  import T3PIcon from './t3p';
28
28
  import HttpIcon from './http';
29
29
  import SchemeIcon from './scheme';
30
+ import FAQIcon from './faq';
31
+ import FAQBIcon from './faqb';
32
+ import FAQSIcon from './faqs';
30
33
 
31
34
  // Built-in icon components mapped by display name - internal use only
32
35
  export const BUILTIN_ICON_COMPONENTS = {
@@ -58,4 +61,7 @@ export const BUILTIN_ICON_COMPONENTS = {
58
61
  T3P: T3PIcon,
59
62
  Http: HttpIcon,
60
63
  Scheme: SchemeIcon,
64
+ FAQ: FAQIcon,
65
+ FAQB: FAQBIcon,
66
+ FAQS: FAQSIcon,
61
67
  } as const;
@@ -1,6 +1,5 @@
1
1
  "use client"
2
2
  export * from './404-page';
3
- export * from './go-to-top';
4
3
  export * from './language-detector';
5
4
  export * from './language-switcher';
6
5
 
@@ -1,43 +0,0 @@
1
- 'use client';
2
-
3
- import { useState, useEffect } from 'react';
4
- import { globalLucideIcons as icons } from '@base-ui/components/global-icon';
5
- export default function GoToTop() {
6
- const [isVisible, setIsVisible] = useState(false);
7
-
8
- // 监听滚动事件
9
- useEffect(() => {
10
- const toggleVisibility = () => {
11
- if (window.scrollY > 300) {
12
- setIsVisible(true);
13
- } else {
14
- setIsVisible(false);
15
- }
16
- };
17
-
18
- window.addEventListener('scroll', toggleVisibility);
19
- return () => window.removeEventListener('scroll', toggleVisibility);
20
- }, []);
21
-
22
- // 回到顶部
23
- const scrollToTop = () => {
24
- window.scrollTo({
25
- top: 0,
26
- behavior: 'smooth'
27
- });
28
- };
29
-
30
- return (
31
- <>
32
- {isVisible && (
33
- <button
34
- onClick={scrollToTop}
35
- className="fixed bottom-6 right-6 p-3 bg-neutral-800 text-neutral-100 hover:bg-neutral-700 dark:bg-neutral-300 dark:text-neutral-900 dark:hover:bg-neutral-400 rounded-full shadow-lg transition-all z-50"
36
- aria-label="Go to top"
37
- >
38
- <icons.ArrowUp size={20} />
39
- </button>
40
- )}
41
- </>
42
- );
43
- }