@ldkj/web-ui 0.2.2 → 0.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/components/data-display/card/Card.d.ts +41 -0
- package/components/data-display/card/index.d.ts +1 -0
- package/components/{ui → data-display}/chip/Chip.d.ts +8 -2
- package/components/{ui → data-display}/chip/variants.d.ts +8 -0
- package/components/data-display/qrcodes/QRCode.d.ts +16 -0
- package/components/data-display/qrcodes/QRCodeBase.d.ts +32 -0
- package/components/data-display/qrcodes/QRCodeCanvas.d.ts +39 -0
- package/components/data-display/qrcodes/QRCodeSizable.d.ts +40 -0
- package/components/data-display/qrcodes/index.d.ts +7 -0
- package/components/{ui → interact}/button/Button.d.ts +8 -2
- package/components/{ui → interact}/button/variants.d.ts +8 -0
- package/components/layout/box/Box.d.ts +29 -0
- package/components/layout/box/index.d.ts +1 -0
- package/components/layout/divider/Divider.d.ts +16 -0
- package/components/layout/divider/index.d.ts +1 -0
- package/components/layout/flex/Flex.d.ts +27 -0
- package/components/layout/flex/index.d.ts +1 -0
- package/components/layout/grid/Grid.d.ts +25 -0
- package/components/layout/grid/index.d.ts +1 -0
- package/components/layout/safe-area/SafeArea.d.ts +32 -0
- package/components/layout/safe-area/index.d.ts +1 -0
- package/components/shared/rounded.d.ts +15 -0
- package/components/shared/shadow.d.ts +16 -0
- package/index.cjs +8 -1
- package/index.d.ts +10 -2
- package/index.js +4091 -614
- package/lib/CSSUnitConverter.d.ts +47 -0
- package/lib/utils.d.ts +1 -0
- package/package.json +8 -1
- package/style.css +1 -1
- package/styling/SxProvider.d.ts +9 -0
- package/styling/index.d.ts +2 -0
- package/styling/sx.d.ts +13 -0
- /package/components/{ui → data-display}/chip/index.d.ts +0 -0
- /package/components/{ui → interact}/button/index.d.ts +0 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type BoxProps } from "@/components/layout/box";
|
|
3
|
+
export type CardVariant = "outlined" | "elevated" | "filled" | "ghost";
|
|
4
|
+
export type CardPadding = "none" | "sm" | "md" | "lg";
|
|
5
|
+
export type CardDivided = boolean | "x" | "y";
|
|
6
|
+
export type CardSlotProps = BoxProps<React.ElementType>;
|
|
7
|
+
type CardSlotComponent = React.FC<CardSlotProps>;
|
|
8
|
+
export type CardProps = BoxProps<React.ElementType> & {
|
|
9
|
+
variant?: CardVariant;
|
|
10
|
+
padding?: CardPadding;
|
|
11
|
+
divided?: CardDivided;
|
|
12
|
+
hoverable?: boolean;
|
|
13
|
+
selected?: boolean;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
header?: React.ReactNode;
|
|
16
|
+
footer?: React.ReactNode;
|
|
17
|
+
left?: React.ReactNode;
|
|
18
|
+
right?: React.ReactNode;
|
|
19
|
+
start?: React.ReactNode;
|
|
20
|
+
end?: React.ReactNode;
|
|
21
|
+
contentLoading?: boolean;
|
|
22
|
+
headerProps?: CardSlotProps;
|
|
23
|
+
footerProps?: CardSlotProps;
|
|
24
|
+
leftProps?: CardSlotProps;
|
|
25
|
+
rightProps?: CardSlotProps;
|
|
26
|
+
startProps?: CardSlotProps;
|
|
27
|
+
endProps?: CardSlotProps;
|
|
28
|
+
contentProps?: CardSlotProps;
|
|
29
|
+
};
|
|
30
|
+
type CardCompound = {
|
|
31
|
+
Header: CardSlotComponent;
|
|
32
|
+
Content: CardSlotComponent;
|
|
33
|
+
Footer: CardSlotComponent;
|
|
34
|
+
Left: CardSlotComponent;
|
|
35
|
+
Right: CardSlotComponent;
|
|
36
|
+
Start: CardSlotComponent;
|
|
37
|
+
End: CardSlotComponent;
|
|
38
|
+
};
|
|
39
|
+
type CardComponent = React.FC<CardProps> & CardCompound;
|
|
40
|
+
export declare const Card: CardComponent;
|
|
41
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Card";
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { ElementType } from "react";
|
|
3
|
-
import { type ChipVariants } from "./variants";
|
|
3
|
+
import { type ChipRounded, type ChipShadow, type ChipVariants } from "./variants";
|
|
4
|
+
import { type SxProps } from "@/styling";
|
|
4
5
|
type PolymorphicProps<T extends ElementType> = {
|
|
5
6
|
component?: T;
|
|
6
7
|
className?: string;
|
|
7
8
|
class?: string;
|
|
8
9
|
} & Omit<React.ComponentPropsWithoutRef<T>, "as" | "className">;
|
|
9
|
-
|
|
10
|
+
type ChipOwnProps = Omit<ChipVariants, "rounded" | "shadow"> & {
|
|
11
|
+
rounded?: ChipRounded;
|
|
12
|
+
shadow?: ChipShadow;
|
|
13
|
+
sx?: SxProps;
|
|
14
|
+
};
|
|
15
|
+
export type ChipProps<T extends ElementType = "span"> = PolymorphicProps<T> & ChipOwnProps;
|
|
10
16
|
export declare function Chip<T extends ElementType = "span">(props: ChipProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
11
17
|
export declare namespace Chip {
|
|
12
18
|
var displayName: string;
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import { type Rounded, type RoundedPreset } from "../../shared/rounded";
|
|
3
|
+
import { type Shadow, type ShadowPreset } from "../../shared/shadow";
|
|
2
4
|
export declare const chipVariants: (props?: ({
|
|
3
5
|
variant?: "dark" | "primary" | "minor" | "success" | "warning" | "danger" | "text" | "light" | null | undefined;
|
|
4
6
|
outline?: boolean | null | undefined;
|
|
5
7
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
8
|
+
rounded?: "xs" | "sm" | "md" | "lg" | "xl" | "full" | null | undefined;
|
|
9
|
+
shadow?: "xs" | "sm" | "md" | "lg" | "xl" | "none" | "inner" | null | undefined;
|
|
6
10
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
11
|
export type ChipVariants = VariantProps<typeof chipVariants>;
|
|
12
|
+
export type ChipRoundedPreset = RoundedPreset;
|
|
13
|
+
export type ChipRounded = Rounded;
|
|
14
|
+
export type ChipShadowPreset = ShadowPreset;
|
|
15
|
+
export type ChipShadow = Shadow;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type QRCodeCanvasProps } from "./QRCodeCanvas";
|
|
2
|
+
import { type QRCodeSizableProps } from "./QRCodeSizable";
|
|
3
|
+
export type QRCodeProps = ({
|
|
4
|
+
canvas: true;
|
|
5
|
+
} & QRCodeCanvasProps) | ({
|
|
6
|
+
canvas?: false;
|
|
7
|
+
} & QRCodeSizableProps);
|
|
8
|
+
/**
|
|
9
|
+
* 渲染二维码组件
|
|
10
|
+
* - `canvas: true` -> QRCodeCanvas rendered with canvas
|
|
11
|
+
* - `canvas: false` -> QRCodeSizable rendered with image
|
|
12
|
+
* - `value: string` -> the value to be displayed in the QR code
|
|
13
|
+
* - `size: number|string` -> the size of the QR code
|
|
14
|
+
* - `fullWidth: boolean` -> whether to fill the parent container
|
|
15
|
+
*/
|
|
16
|
+
export default function QRCode({ canvas, ...props }: QRCodeProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface QRCodeBaseProps extends React.ImgHTMLAttributes<HTMLImageElement> {
|
|
3
|
+
size?: number;
|
|
4
|
+
value: string;
|
|
5
|
+
useful?: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* - 前景色
|
|
8
|
+
* - 默认:"#000000"
|
|
9
|
+
*/
|
|
10
|
+
foregroundColor?: string;
|
|
11
|
+
/**
|
|
12
|
+
* - 背景色
|
|
13
|
+
* - 默认:"#ffffff"
|
|
14
|
+
*/
|
|
15
|
+
backgroundColor?: string;
|
|
16
|
+
/**
|
|
17
|
+
* - 二维码四周的留白(单位是 px)
|
|
18
|
+
* - 默认:`0`
|
|
19
|
+
*/
|
|
20
|
+
margin?: number;
|
|
21
|
+
/**
|
|
22
|
+
* - 二维码识别容错率(部分区域被遮挡仍可识别)
|
|
23
|
+
* - `low`:7% 或更少
|
|
24
|
+
* - `medium`:15% 或更少
|
|
25
|
+
* - `quartile`:25% 或更少
|
|
26
|
+
* - `high`:30% 或更少,二维码中间放 logo 图像时推荐
|
|
27
|
+
*/
|
|
28
|
+
errorCorrectionLevel?: "low" | "medium" | "quartile" | "high";
|
|
29
|
+
unload?: React.ReactNode;
|
|
30
|
+
}
|
|
31
|
+
declare const QRCodeBase: React.FC<QRCodeBaseProps>;
|
|
32
|
+
export default QRCodeBase;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type SxProps } from "@/styling";
|
|
3
|
+
export interface QRCodeCanvasProps extends React.HtmlHTMLAttributes<HTMLDivElement> {
|
|
4
|
+
value: string;
|
|
5
|
+
useful?: boolean;
|
|
6
|
+
uselessElem?: React.ReactNode;
|
|
7
|
+
uselessProps?: React.HTMLAttributes<HTMLDivElement>;
|
|
8
|
+
/**
|
|
9
|
+
* - 前景色
|
|
10
|
+
* - 默认:"#000000"
|
|
11
|
+
*/
|
|
12
|
+
foregroundColor?: string;
|
|
13
|
+
/**
|
|
14
|
+
* - 背景色
|
|
15
|
+
* - 默认:"#ffffff"
|
|
16
|
+
*/
|
|
17
|
+
backgroundColor?: string;
|
|
18
|
+
/**
|
|
19
|
+
* - 二维码四周的留白(单位是 px)
|
|
20
|
+
* - 默认:`4`(qrcode 不设置 margin 默认值是 4)
|
|
21
|
+
*/
|
|
22
|
+
margin?: number;
|
|
23
|
+
/**
|
|
24
|
+
* - 二维码识别容错率(部分区域被遮挡仍可识别)
|
|
25
|
+
* - `low`:7% 或更少
|
|
26
|
+
* - `medium`:15% 或更少
|
|
27
|
+
* - `quartile`:25% 或更少
|
|
28
|
+
* - `high`:30% 或更少,二维码中间放 logo 图像时推荐
|
|
29
|
+
*/
|
|
30
|
+
errorCorrectionLevel?: "low" | "medium" | "quartile" | "high";
|
|
31
|
+
/**
|
|
32
|
+
* - 二维码尺寸
|
|
33
|
+
* - 默认:`200`
|
|
34
|
+
*/
|
|
35
|
+
size?: number | string;
|
|
36
|
+
fullWidth?: boolean;
|
|
37
|
+
sx?: SxProps;
|
|
38
|
+
}
|
|
39
|
+
export declare const QRCodeCanvas: React.FC<QRCodeCanvasProps>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type SxProps } from "@/styling";
|
|
3
|
+
export interface QRCodeSizableProps extends React.ImgHTMLAttributes<HTMLImageElement> {
|
|
4
|
+
/**
|
|
5
|
+
* - 二维码尺寸
|
|
6
|
+
* - 默认:`200`
|
|
7
|
+
*/
|
|
8
|
+
size?: number | string;
|
|
9
|
+
value: string;
|
|
10
|
+
useful?: boolean;
|
|
11
|
+
uselessElem?: React.ReactNode;
|
|
12
|
+
uselessProps?: React.HTMLAttributes<HTMLDivElement>;
|
|
13
|
+
/**
|
|
14
|
+
* - 前景色
|
|
15
|
+
* - 默认:"#000000"
|
|
16
|
+
*/
|
|
17
|
+
foregroundColor?: string;
|
|
18
|
+
/**
|
|
19
|
+
* - 背景色
|
|
20
|
+
* - 默认:"#ffffff"
|
|
21
|
+
*/
|
|
22
|
+
backgroundColor?: string;
|
|
23
|
+
/**
|
|
24
|
+
* - 二维码四周的留白(单位是 px)
|
|
25
|
+
* - 默认:`4`(qrcode 不设置 margin 默认值是 4)
|
|
26
|
+
*/
|
|
27
|
+
margin?: number;
|
|
28
|
+
/**
|
|
29
|
+
* - 二维码识别容错率(部分区域被遮挡仍可识别)
|
|
30
|
+
* - `low`:7% 或更少
|
|
31
|
+
* - `medium`:15% 或更少
|
|
32
|
+
* - `quartile`:25% 或更少
|
|
33
|
+
* - `high`:30% 或更少,二维码中间放 logo 图像时推荐
|
|
34
|
+
*/
|
|
35
|
+
errorCorrectionLevel?: "low" | "medium" | "quartile" | "high";
|
|
36
|
+
unload?: React.ReactNode;
|
|
37
|
+
fullWidth?: boolean;
|
|
38
|
+
sx?: SxProps;
|
|
39
|
+
}
|
|
40
|
+
export declare const QRCodeSizable: React.FC<QRCodeSizableProps>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default as QRCode } from "./QRCode";
|
|
2
|
+
export type { QRCodeProps } from "./QRCode";
|
|
3
|
+
export { QRCodeCanvas } from "./QRCodeCanvas";
|
|
4
|
+
export type { QRCodeCanvasProps } from "./QRCodeCanvas";
|
|
5
|
+
export { QRCodeSizable } from "./QRCodeSizable";
|
|
6
|
+
export type { QRCodeSizableProps } from "./QRCodeSizable";
|
|
7
|
+
export { default as QRCodeBase } from "./QRCodeBase";
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { ElementType } from "react";
|
|
3
|
-
import { type ButtonVariants } from "./variants";
|
|
3
|
+
import { type ButtonRounded, type ButtonShadow, type ButtonVariants } from "./variants";
|
|
4
|
+
import { type SxProps } from "@/styling";
|
|
4
5
|
type PolymorphicProps<T extends ElementType> = {
|
|
5
6
|
component?: T;
|
|
6
7
|
className?: string;
|
|
7
8
|
class?: string;
|
|
8
9
|
} & Omit<React.ComponentPropsWithoutRef<T>, "as" | "className">;
|
|
9
|
-
|
|
10
|
+
type ButtonOwnProps = Omit<ButtonVariants, "rounded" | "shadow"> & {
|
|
11
|
+
rounded?: ButtonRounded;
|
|
12
|
+
shadow?: ButtonShadow;
|
|
13
|
+
sx?: SxProps;
|
|
14
|
+
};
|
|
15
|
+
export type ButtonProps<T extends ElementType = "button"> = PolymorphicProps<T> & ButtonOwnProps;
|
|
10
16
|
export declare function Button<T extends ElementType = "button">(props: ButtonProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
11
17
|
export declare namespace Button {
|
|
12
18
|
var displayName: string;
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import { type Rounded, type RoundedPreset } from "../../shared/rounded";
|
|
3
|
+
import { type Shadow, type ShadowPreset } from "../../shared/shadow";
|
|
2
4
|
export declare const buttonVariants: (props?: ({
|
|
3
5
|
variant?: "dark" | "primary" | "secondary" | "minor" | "success" | "warning" | "danger" | "outline" | "ghost" | "link" | "text" | null | undefined;
|
|
4
6
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | "icon" | null | undefined;
|
|
7
|
+
rounded?: "xs" | "sm" | "md" | "lg" | "xl" | "full" | null | undefined;
|
|
8
|
+
shadow?: "xs" | "sm" | "md" | "lg" | "xl" | "none" | "inner" | null | undefined;
|
|
5
9
|
bounce?: boolean | null | undefined;
|
|
6
10
|
splash?: boolean | null | undefined;
|
|
7
11
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
12
|
export type ButtonVariants = VariantProps<typeof buttonVariants>;
|
|
13
|
+
export type ButtonRoundedPreset = RoundedPreset;
|
|
14
|
+
export type ButtonRounded = Rounded;
|
|
15
|
+
export type ButtonShadowPreset = ShadowPreset;
|
|
16
|
+
export type ButtonShadow = Shadow;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { ElementType } from "react";
|
|
3
|
+
import { type Rounded } from "@/components/shared/rounded";
|
|
4
|
+
import { type Shadow } from "@/components/shared/shadow";
|
|
5
|
+
import { type SxProps } from "@/styling";
|
|
6
|
+
type PolymorphicProps<T extends ElementType> = {
|
|
7
|
+
component?: T;
|
|
8
|
+
className?: string;
|
|
9
|
+
class?: string;
|
|
10
|
+
} & Omit<React.ComponentPropsWithoutRef<T>, "as" | "className">;
|
|
11
|
+
type BoxOwnProps = {
|
|
12
|
+
sx?: SxProps;
|
|
13
|
+
rounded?: Rounded;
|
|
14
|
+
shadow?: Shadow;
|
|
15
|
+
loading?: boolean;
|
|
16
|
+
loadingContent?: React.ReactNode;
|
|
17
|
+
modal?: boolean;
|
|
18
|
+
modalContent?: React.ReactNode;
|
|
19
|
+
onModalMaskClick?: React.MouseEventHandler<HTMLDivElement>;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Box 是通用基础容器组件,支持多态渲染、sx 样式入口,以及元素范围内的 loading/modal 遮罩层。
|
|
23
|
+
*/
|
|
24
|
+
export type BoxProps<T extends ElementType = "div"> = PolymorphicProps<T> & BoxOwnProps;
|
|
25
|
+
export declare function Box<T extends ElementType = "div">(props: BoxProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare namespace Box {
|
|
27
|
+
var displayName: string;
|
|
28
|
+
}
|
|
29
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Box";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type SxProps } from "@/styling";
|
|
3
|
+
export type DividerVariant = "full" | "middle" | "inset";
|
|
4
|
+
export type DividerAlign = "center" | "left" | "right";
|
|
5
|
+
export type DividerProps = React.ComponentPropsWithoutRef<"div"> & {
|
|
6
|
+
vertical?: boolean;
|
|
7
|
+
variant?: DividerVariant;
|
|
8
|
+
align?: DividerAlign;
|
|
9
|
+
type?: React.CSSProperties["borderStyle"];
|
|
10
|
+
color?: string;
|
|
11
|
+
sx?: SxProps;
|
|
12
|
+
};
|
|
13
|
+
export declare function Divider(props: DividerProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare namespace Divider {
|
|
15
|
+
var displayName: string;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Divider";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type BoxProps } from "../box";
|
|
3
|
+
export type FlexDirection = "row" | "row-reverse" | "col" | "col-reverse";
|
|
4
|
+
export type FlexWrap = boolean | React.CSSProperties["flexWrap"];
|
|
5
|
+
export type FlexGapPreset = "xs" | "sm" | "md" | "lg" | "xl";
|
|
6
|
+
export type FlexGap = FlexGapPreset | number | string;
|
|
7
|
+
export type FlexSize = number | string;
|
|
8
|
+
/**
|
|
9
|
+
* Flex 容器属性。
|
|
10
|
+
*/
|
|
11
|
+
export type FlexProps = BoxProps<React.ElementType> & {
|
|
12
|
+
direction?: FlexDirection;
|
|
13
|
+
justify?: React.CSSProperties["justifyContent"];
|
|
14
|
+
items?: React.CSSProperties["alignItems"];
|
|
15
|
+
flex?: React.CSSProperties["flex"];
|
|
16
|
+
wrap?: FlexWrap;
|
|
17
|
+
gap?: FlexGap;
|
|
18
|
+
width?: FlexSize;
|
|
19
|
+
height?: FlexSize;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Flex 是基于 CSS Flexbox 的对齐布局容器。
|
|
23
|
+
*/
|
|
24
|
+
export declare function Flex(props: FlexProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare namespace Flex {
|
|
26
|
+
var displayName: string;
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Flex";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type BoxProps } from "../box";
|
|
3
|
+
export type GridSize = number | "grow";
|
|
4
|
+
export type GridOffset = number | "auto";
|
|
5
|
+
export type GridSpacing = number | string;
|
|
6
|
+
export type GridDirection = "row" | "row-reverse";
|
|
7
|
+
export type GridWrap = boolean | React.CSSProperties["flexWrap"];
|
|
8
|
+
export type GridProps = BoxProps<React.ElementType> & {
|
|
9
|
+
container?: boolean;
|
|
10
|
+
size?: GridSize;
|
|
11
|
+
offset?: GridOffset;
|
|
12
|
+
columns?: number;
|
|
13
|
+
spacing?: GridSpacing;
|
|
14
|
+
rowSpacing?: GridSpacing;
|
|
15
|
+
columnSpacing?: GridSpacing;
|
|
16
|
+
wrap?: GridWrap;
|
|
17
|
+
direction?: GridDirection;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Grid 是基于 Flexbox 的 12 列布局容器。
|
|
21
|
+
*/
|
|
22
|
+
export declare function Grid(props: GridProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare namespace Grid {
|
|
24
|
+
var displayName: string;
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Grid";
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ElementType } from "react";
|
|
2
|
+
import { type BoxProps } from "../box";
|
|
3
|
+
export type SafeAreaPosition = "top" | "bottom" | "both" | "none";
|
|
4
|
+
type SafeAreaOwnProps = {
|
|
5
|
+
position?: SafeAreaPosition;
|
|
6
|
+
horizontal?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export type SafeAreaProps = BoxProps<ElementType> & SafeAreaOwnProps;
|
|
9
|
+
/**
|
|
10
|
+
* SafeArea 用于适配移动端刘海屏,灵动岛和手势区域等的安全区容器。
|
|
11
|
+
*/
|
|
12
|
+
export declare function SafeArea(props: SafeAreaProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare namespace SafeArea {
|
|
14
|
+
var displayName: string;
|
|
15
|
+
}
|
|
16
|
+
export type SafeAreaTopProps = Omit<SafeAreaProps, "position">;
|
|
17
|
+
export type SafeAreaBottomProps = Omit<SafeAreaProps, "position">;
|
|
18
|
+
/**
|
|
19
|
+
* SafeAreaTop 仅应用顶部安全区内边距。
|
|
20
|
+
*/
|
|
21
|
+
export declare function SafeAreaTop(props: SafeAreaTopProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare namespace SafeAreaTop {
|
|
23
|
+
var displayName: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* SafeAreaBottom 仅应用底部安全区内边距。
|
|
27
|
+
*/
|
|
28
|
+
export declare function SafeAreaBottom(props: SafeAreaBottomProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare namespace SafeAreaBottom {
|
|
30
|
+
var displayName: string;
|
|
31
|
+
}
|
|
32
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./SafeArea";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { CSSProperties } from "react";
|
|
2
|
+
export declare const roundedPresetClasses: {
|
|
3
|
+
readonly xs: "rounded-[2px]";
|
|
4
|
+
readonly sm: "rounded-sm";
|
|
5
|
+
readonly md: "rounded-md";
|
|
6
|
+
readonly lg: "rounded-lg";
|
|
7
|
+
readonly xl: "rounded-xl";
|
|
8
|
+
readonly full: "rounded-full";
|
|
9
|
+
};
|
|
10
|
+
export type RoundedPreset = keyof typeof roundedPresetClasses;
|
|
11
|
+
export type Rounded = RoundedPreset | number | string;
|
|
12
|
+
export declare function resolveRounded(rounded?: Rounded): {
|
|
13
|
+
roundedPreset?: RoundedPreset;
|
|
14
|
+
roundedStyle?: CSSProperties;
|
|
15
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { CSSProperties } from "react";
|
|
2
|
+
export declare const shadowPresetClasses: {
|
|
3
|
+
readonly none: "shadow-none";
|
|
4
|
+
readonly xs: "shadow-[0_1px_2px_rgba(15,23,42,0.08)]";
|
|
5
|
+
readonly sm: "shadow-sm";
|
|
6
|
+
readonly md: "shadow-md";
|
|
7
|
+
readonly lg: "shadow-lg";
|
|
8
|
+
readonly xl: "shadow-xl";
|
|
9
|
+
readonly inner: "shadow-inner";
|
|
10
|
+
};
|
|
11
|
+
export type ShadowPreset = keyof typeof shadowPresetClasses;
|
|
12
|
+
export type Shadow = ShadowPreset | string;
|
|
13
|
+
export declare function resolveShadow(shadow?: Shadow): {
|
|
14
|
+
shadowPreset?: ShadowPreset;
|
|
15
|
+
shadowStyle?: CSSProperties;
|
|
16
|
+
};
|