@ldkj/web-ui 0.22.0 → 1.0.1
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 +21 -21
- package/README.md +31 -31
- package/components/form/uploader/Uploader.d.ts +1 -1
- package/index.cjs +28 -28
- package/index.js +8736 -8475
- package/package.json +1 -1
- package/reset.css +11 -11
- package/style.css +1 -1
- package/styling/SxProvider.d.ts +4 -3
- package/styling/index.d.ts +1 -0
- package/styling/sx.d.ts +1 -1
- package/styling/theme.d.ts +89 -0
- package/types/index.d.ts +1 -0
- package/types/utils.d.ts +1 -0
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 ldkj
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 ldkj
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
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
|
+
|
|
@@ -116,7 +116,7 @@ export type UploaderProviderProps = UploaderProviderConfig & {
|
|
|
116
116
|
children?: React.ReactNode;
|
|
117
117
|
};
|
|
118
118
|
export declare function UploaderProvider(props: UploaderProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
119
|
-
export declare function useUploaderProvider(): Partial<Pick<UploaderProps, "drag" | "multiple" | "disabled" | "data" | "directory" | "
|
|
119
|
+
export declare function useUploaderProvider(): Partial<Pick<UploaderProps, "drag" | "multiple" | "disabled" | "data" | "directory" | "accept" | "action" | "headers" | "name" | "onError" | "onSelect" | "preview" | "method" | "maxSize" | "autoUpload" | "beforeRemove" | "beforeUpload" | "customRequest" | "getValueFromResult" | "listType" | "maxCount" | "openFileDialogOnClick" | "pastable" | "request" | "renderActions" | "renderItem" | "renderTrigger" | "showFileList" | "transformFile" | "withCredentials" | "onDownload" | "onExceed" | "onPreview" | "onReject" | "onRemove" | "onSuccess">> | null;
|
|
120
120
|
export declare const Uploader: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLDivElement>, "children" | "onChange"> & {
|
|
121
121
|
accept?: string;
|
|
122
122
|
action?: string | ((file: File) => string | Promise<string>);
|