@ldkj/web-ui 0.14.1 → 0.15.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.
Files changed (45) hide show
  1. package/components/data-display/badge/Badge.d.ts +14 -0
  2. package/components/data-display/badge/index.d.ts +1 -0
  3. package/components/data-display/empty/Empty.d.ts +7 -0
  4. package/components/data-display/empty/index.d.ts +1 -0
  5. package/components/data-display/image/Image.d.ts +74 -0
  6. package/components/data-display/image/index.d.ts +1 -0
  7. package/components/data-display/list/List.d.ts +8 -0
  8. package/components/data-display/list/index.d.ts +1 -0
  9. package/components/form/auto-complete/AutoComplete.d.ts +9 -0
  10. package/components/form/auto-complete/index.d.ts +1 -0
  11. package/components/form/cascader/Cascader.d.ts +12 -0
  12. package/components/form/cascader/index.d.ts +1 -0
  13. package/components/form/form-v2/FormV2.d.ts +5 -0
  14. package/components/form/form-v2/index.d.ts +1 -0
  15. package/components/form/input-number/InputNumber.d.ts +7 -0
  16. package/components/form/input-number/index.d.ts +1 -0
  17. package/components/form/input-opt/InputOPT.d.ts +9 -0
  18. package/components/form/input-opt/index.d.ts +1 -0
  19. package/components/form/rate/Rate.d.ts +9 -0
  20. package/components/form/rate/index.d.ts +1 -0
  21. package/components/form/required/Required.d.ts +4 -0
  22. package/components/form/required/index.d.ts +1 -0
  23. package/components/form/slider-v2/SliderV2.d.ts +7 -0
  24. package/components/form/slider-v2/index.d.ts +1 -0
  25. package/components/form/uploader/Uploader.d.ts +7 -0
  26. package/components/form/uploader/index.d.ts +1 -0
  27. package/components/interact/alert/Alert.d.ts +9 -0
  28. package/components/interact/alert/index.d.ts +1 -0
  29. package/components/interact/drawer/Drawer.d.ts +11 -0
  30. package/components/interact/drawer/index.d.ts +1 -0
  31. package/components/interact/loading/Loading.d.ts +3 -0
  32. package/components/interact/loading/index.d.ts +1 -0
  33. package/components/interact/notification/Notification.d.ts +6 -0
  34. package/components/interact/notification/index.d.ts +1 -0
  35. package/components/interact/progress/Progress.d.ts +8 -0
  36. package/components/interact/progress/index.d.ts +1 -0
  37. package/components/interact/spin/Spin.d.ts +6 -0
  38. package/components/interact/spin/index.d.ts +1 -0
  39. package/components/layout/typography/Typography.d.ts +13 -0
  40. package/components/layout/typography/index.d.ts +1 -0
  41. package/index.cjs +16 -16
  42. package/index.d.ts +20 -0
  43. package/index.js +5683 -4980
  44. package/package.json +1 -1
  45. package/style.css +1 -1
@@ -0,0 +1,14 @@
1
+ import * as React from "react";
2
+ import { type SxProps } from "@/styling";
3
+ export type BadgeVariant = "neutral" | "primary" | "success" | "warning" | "danger";
4
+ export type BadgeProps = React.HTMLAttributes<HTMLSpanElement> & {
5
+ class?: string;
6
+ sx?: SxProps;
7
+ badgeContent?: React.ReactNode;
8
+ dot?: boolean;
9
+ light?: boolean;
10
+ showZero?: boolean;
11
+ max?: number;
12
+ variant?: BadgeVariant;
13
+ };
14
+ export declare function Badge(props: BadgeProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./Badge";
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ import { type BoxProps } from "@/components/layout/box";
3
+ export type EmptyProps = BoxProps<"div"> & {
4
+ description?: React.ReactNode;
5
+ image?: React.ReactNode;
6
+ };
7
+ export declare function Empty(props: EmptyProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./Empty";
@@ -0,0 +1,74 @@
1
+ import * as React from "react";
2
+ import { type SxProps } from "@/styling";
3
+ type ImageStatus = "idle" | "loading" | "loaded" | "error";
4
+ type ImageLoader = (src: string, options: {
5
+ width?: number;
6
+ quality?: number;
7
+ format?: string;
8
+ crop?: boolean;
9
+ height?: number;
10
+ }) => string;
11
+ type ImageSource = {
12
+ media?: string;
13
+ srcSet: string;
14
+ type?: string;
15
+ sizes?: string;
16
+ };
17
+ export type ImageRenderState = {
18
+ status: ImageStatus;
19
+ loading: boolean;
20
+ error: boolean;
21
+ loaded: boolean;
22
+ previewOpen: boolean;
23
+ src?: string;
24
+ };
25
+ type ImageFormat = "webp" | "avif";
26
+ export type ImageProps = Omit<React.ImgHTMLAttributes<HTMLImageElement>, "placeholder" | "children"> & {
27
+ class?: string;
28
+ sx?: SxProps;
29
+ fallback?: React.ReactNode;
30
+ fallbackSrc?: string;
31
+ loadingFallback?: React.ReactNode;
32
+ fit?: React.CSSProperties["objectFit"];
33
+ position?: React.CSSProperties["objectPosition"];
34
+ aspectRatio?: number | string;
35
+ placeholder?: "blur";
36
+ blurDataURL?: string;
37
+ retry?: number;
38
+ retryDelay?: number;
39
+ onLoadingChange?: (loading: boolean) => void;
40
+ loader?: ImageLoader;
41
+ quality?: number;
42
+ format?: string;
43
+ crop?: boolean;
44
+ sources?: ImageSource[];
45
+ formats?: ImageFormat[];
46
+ responsiveWidths?: number[];
47
+ preview?: boolean;
48
+ children?: (state: ImageRenderState) => React.ReactNode;
49
+ };
50
+ export declare const Image: React.ForwardRefExoticComponent<Omit<React.ImgHTMLAttributes<HTMLImageElement>, "children" | "placeholder"> & {
51
+ class?: string;
52
+ sx?: SxProps;
53
+ fallback?: React.ReactNode;
54
+ fallbackSrc?: string;
55
+ loadingFallback?: React.ReactNode;
56
+ fit?: React.CSSProperties["objectFit"];
57
+ position?: React.CSSProperties["objectPosition"];
58
+ aspectRatio?: number | string;
59
+ placeholder?: "blur";
60
+ blurDataURL?: string;
61
+ retry?: number;
62
+ retryDelay?: number;
63
+ onLoadingChange?: (loading: boolean) => void;
64
+ loader?: ImageLoader;
65
+ quality?: number;
66
+ format?: string;
67
+ crop?: boolean;
68
+ sources?: ImageSource[];
69
+ formats?: ImageFormat[];
70
+ responsiveWidths?: number[];
71
+ preview?: boolean;
72
+ children?: (state: ImageRenderState) => React.ReactNode;
73
+ } & React.RefAttributes<HTMLImageElement>>;
74
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./Image";
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ import { type SxProps } from "@/styling";
3
+ export type ListProps = React.HTMLAttributes<HTMLUListElement> & {
4
+ class?: string;
5
+ sx?: SxProps;
6
+ bordered?: boolean;
7
+ };
8
+ export declare function List(props: ListProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./List";
@@ -0,0 +1,9 @@
1
+ import { type InputProps } from "@/components/form/input";
2
+ export type AutoCompleteOption = {
3
+ label: string;
4
+ value: string;
5
+ };
6
+ export type AutoCompleteProps = Omit<InputProps, "list"> & {
7
+ options?: AutoCompleteOption[];
8
+ };
9
+ export declare function AutoComplete(props: AutoCompleteProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./AutoComplete";
@@ -0,0 +1,12 @@
1
+ export type CascaderOption = {
2
+ label: string;
3
+ value: string;
4
+ children?: CascaderOption[];
5
+ };
6
+ export type CascaderProps = {
7
+ options?: CascaderOption[];
8
+ value?: string;
9
+ placeholder?: string;
10
+ onValueChange?: (value: string) => void;
11
+ };
12
+ export declare function Cascader(props: CascaderProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./Cascader";
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ export type FormV2Props = React.FormHTMLAttributes<HTMLFormElement> & {
3
+ class?: string;
4
+ };
5
+ export declare function FormV2(props: FormV2Props): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./FormV2";
@@ -0,0 +1,7 @@
1
+ import { type InputProps } from "@/components/form/input";
2
+ export type InputNumberProps = Omit<InputProps, "type" | "inputMode"> & {
3
+ min?: number;
4
+ max?: number;
5
+ step?: number;
6
+ };
7
+ export declare function InputNumber(props: InputNumberProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./InputNumber";
@@ -0,0 +1,9 @@
1
+ export type InputOPTProps = {
2
+ value?: string;
3
+ length?: number;
4
+ disabled?: boolean;
5
+ className?: string;
6
+ class?: string;
7
+ onChange?: (value: string) => void;
8
+ };
9
+ export declare function InputOPT(props: InputOPTProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./InputOPT";
@@ -0,0 +1,9 @@
1
+ export type RateProps = {
2
+ value?: number;
3
+ count?: number;
4
+ disabled?: boolean;
5
+ className?: string;
6
+ class?: string;
7
+ onChange?: (value: number) => void;
8
+ };
9
+ export declare function Rate(props: RateProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./Rate";
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ export declare function Required({ children }: {
3
+ children?: React.ReactNode;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./Required";
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ export type SliderV2Props = Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "value" | "onChange"> & {
3
+ value?: number;
4
+ class?: string;
5
+ onValueChange?: (value: number) => void;
6
+ };
7
+ export declare function SliderV2(props: SliderV2Props): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./SliderV2";
@@ -0,0 +1,7 @@
1
+ export type UploaderProps = {
2
+ accept?: string;
3
+ multiple?: boolean;
4
+ disabled?: boolean;
5
+ onChange?: (files: FileList | null) => void;
6
+ };
7
+ export declare function Uploader(props: UploaderProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./Uploader";
@@ -0,0 +1,9 @@
1
+ import * as React from "react";
2
+ export type AlertVariant = "info" | "success" | "warning" | "error";
3
+ export type AlertProps = React.HTMLAttributes<HTMLDivElement> & {
4
+ class?: string;
5
+ variant?: AlertVariant;
6
+ title?: React.ReactNode;
7
+ description?: React.ReactNode;
8
+ };
9
+ export declare function Alert(props: AlertProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./Alert";
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ export type DrawerProps = {
3
+ open: boolean;
4
+ title?: React.ReactNode;
5
+ width?: number | string;
6
+ className?: string;
7
+ class?: string;
8
+ children?: React.ReactNode;
9
+ onOpenChange?: (open: boolean) => void;
10
+ };
11
+ export declare function Drawer(props: DrawerProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1 @@
1
+ export * from "./Drawer";
@@ -0,0 +1,3 @@
1
+ export declare function Loading({ text }: {
2
+ text?: string;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./Loading";
@@ -0,0 +1,6 @@
1
+ export declare const notification: {
2
+ info(message: string): string;
3
+ success(message: string): string;
4
+ warn(message: string): string;
5
+ error(message: string): string;
6
+ };
@@ -0,0 +1 @@
1
+ export * from './Notification';
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ export type ProgressProps = React.HTMLAttributes<HTMLDivElement> & {
3
+ value?: number;
4
+ max?: number;
5
+ showInfo?: boolean;
6
+ class?: string;
7
+ };
8
+ export declare function Progress(props: ProgressProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./Progress";
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ export type SpinProps = React.HTMLAttributes<HTMLSpanElement> & {
3
+ size?: number;
4
+ class?: string;
5
+ };
6
+ export declare function Spin(props: SpinProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./Spin";
@@ -0,0 +1,13 @@
1
+ import * as React from "react";
2
+ import type { ElementType } from "react";
3
+ import { type SxProps } from "@/styling";
4
+ type TypographyVariant = "h1" | "h2" | "h3" | "body" | "caption";
5
+ export type TypographyProps<T extends ElementType = "p"> = {
6
+ component?: T;
7
+ className?: string;
8
+ class?: string;
9
+ sx?: SxProps;
10
+ variant?: TypographyVariant;
11
+ } & Omit<React.ComponentPropsWithoutRef<T>, "as" | "className">;
12
+ export declare function Typography<T extends ElementType = "p">(props: TypographyProps<T>): import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./Typography";