@ldkj/web-ui 1.0.0 → 1.1.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/README.md CHANGED
@@ -1,31 +1,31 @@
1
- # @ldkj/web-ui
2
-
3
- 由 shadcn-ui, Tailwind CSS 和 VitePress 构建的企业级 React 组件库.
4
-
5
- ## 立即开始
6
-
7
- ```bash
8
- pnpm add @ldkj/web-ui
9
- ```
10
-
11
- ## 使用示例
12
-
13
- ```tsx
14
- import "@ldkj/web-ui/style.css";
15
- import { Button, Chip } from "@ldkj/web-ui";
16
-
17
- // 可选:如需启用设计系统基础重置(全局样式),再额外引入
18
- // import "@ldkj/web-ui/reset.css";
19
-
20
- export default function App() {
21
- return (
22
- <div className="p-4">
23
- <Button variant="primary">Hello World</Button>
24
- <Chip variant="success" size="sm">
25
- Ready
26
- </Chip>
27
- </div>
28
- );
29
- }
30
- ```
31
-
1
+ # @ldkj/web-ui
2
+
3
+ 由 shadcn-ui, Tailwind CSS 和 VitePress 构建的企业级 React 组件库.
4
+
5
+ ## 立即开始
6
+
7
+ ```bash
8
+ pnpm add @ldkj/web-ui
9
+ ```
10
+
11
+ ## 使用示例
12
+
13
+ ```tsx
14
+ import "@ldkj/web-ui/style.css";
15
+ import { Button, Chip } from "@ldkj/web-ui";
16
+
17
+ // 可选:如需启用设计系统基础重置(全局样式),再额外引入
18
+ // import "@ldkj/web-ui/reset.css";
19
+
20
+ export default function App() {
21
+ return (
22
+ <div className="p-4">
23
+ <Button variant="primary">Hello World</Button>
24
+ <Chip variant="success" size="sm">
25
+ Ready
26
+ </Chip>
27
+ </div>
28
+ );
29
+ }
30
+ ```
31
+
@@ -0,0 +1,43 @@
1
+ import * as React from "react";
2
+ import type { ElementType } from "react";
3
+ import { type BoxProps } from "../box";
4
+ export type HeaderVariant = "default" | "transparent" | "solid" | "subtle";
5
+ export type HeaderSize = "sm" | "md" | "lg";
6
+ export type HeaderGapPreset = "xs" | "sm" | "md" | "lg" | "xl";
7
+ export type HeaderGap = HeaderGapPreset | number | string;
8
+ export type HeaderMaxWidth = number | string;
9
+ export type HeaderSlotProps = BoxProps<ElementType>;
10
+ type HeaderSlotComponent = React.FC<HeaderSlotProps>;
11
+ export type HeaderProps = BoxProps<ElementType> & {
12
+ variant?: HeaderVariant;
13
+ size?: HeaderSize;
14
+ maxWidth?: HeaderMaxWidth;
15
+ fluid?: boolean;
16
+ bordered?: boolean;
17
+ sticky?: boolean;
18
+ fixed?: boolean;
19
+ safeArea?: boolean;
20
+ gap?: HeaderGap;
21
+ brand?: React.ReactNode;
22
+ nav?: React.ReactNode;
23
+ actions?: React.ReactNode;
24
+ start?: React.ReactNode;
25
+ end?: React.ReactNode;
26
+ brandProps?: HeaderSlotProps;
27
+ navProps?: HeaderSlotProps;
28
+ actionsProps?: HeaderSlotProps;
29
+ startProps?: HeaderSlotProps;
30
+ endProps?: HeaderSlotProps;
31
+ contentProps?: HeaderSlotProps;
32
+ };
33
+ type HeaderCompound = {
34
+ Brand: HeaderSlotComponent;
35
+ Nav: HeaderSlotComponent;
36
+ Actions: HeaderSlotComponent;
37
+ Start: HeaderSlotComponent;
38
+ End: HeaderSlotComponent;
39
+ Content: HeaderSlotComponent;
40
+ };
41
+ type HeaderComponent = React.FC<HeaderProps> & HeaderCompound;
42
+ export declare const Header: HeaderComponent;
43
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./Header";