@ldkj/web-ui 0.7.0 → 0.8.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/components/layout/col/Col.d.ts +11 -0
- package/components/layout/col/index.d.ts +1 -0
- package/components/layout/row/Row.d.ts +14 -0
- package/components/layout/row/index.d.ts +1 -0
- package/components/layout/space/Space.d.ts +54 -0
- package/components/layout/space/index.d.ts +1 -0
- package/components/navigation/anchor/Anchor.d.ts +33 -0
- package/components/navigation/anchor/index.d.ts +1 -0
- package/index.cjs +7 -7
- package/index.d.ts +4 -0
- package/index.js +1628 -1283
- package/package.json +1 -1
- package/style.css +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type GridOffset, type GridProps, type GridSize } from "../grid";
|
|
3
|
+
export type ColProps = Omit<GridProps, "container" | "size"> & {
|
|
4
|
+
span?: GridSize;
|
|
5
|
+
offset?: GridOffset;
|
|
6
|
+
flex?: React.CSSProperties["flex"];
|
|
7
|
+
};
|
|
8
|
+
export declare function Col(props: ColProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare namespace Col {
|
|
10
|
+
var displayName: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Col";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type GridDirection, type GridProps, type GridSpacing, type GridWrap } from "../grid";
|
|
3
|
+
export type RowGutter = GridSpacing | [GridSpacing, GridSpacing];
|
|
4
|
+
export type RowProps = Omit<GridProps, "container" | "spacing" | "rowSpacing" | "columnSpacing"> & {
|
|
5
|
+
gutter?: RowGutter;
|
|
6
|
+
align?: React.CSSProperties["alignItems"];
|
|
7
|
+
justify?: React.CSSProperties["justifyContent"];
|
|
8
|
+
wrap?: GridWrap;
|
|
9
|
+
direction?: GridDirection;
|
|
10
|
+
};
|
|
11
|
+
export declare function Row(props: RowProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare namespace Row {
|
|
13
|
+
var displayName: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Row";
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type SxProps } from "@/styling";
|
|
3
|
+
import { type BoxProps } from "../box";
|
|
4
|
+
type Breakpoint = "xs" | "sm" | "md" | "lg" | "xl";
|
|
5
|
+
type Responsive<T> = T | Partial<Record<Breakpoint, T>>;
|
|
6
|
+
type SpaceDirection = "horizontal" | "vertical";
|
|
7
|
+
type SpaceAlign = React.CSSProperties["alignItems"];
|
|
8
|
+
type SpaceJustify = React.CSSProperties["justifyContent"];
|
|
9
|
+
type SpaceWrap = boolean | React.CSSProperties["flexWrap"];
|
|
10
|
+
type SpaceGapPreset = "xs" | "sm" | "md" | "lg" | "xl";
|
|
11
|
+
type SpaceGapUnit = SpaceGapPreset | number | string;
|
|
12
|
+
type SpaceGap = SpaceGapUnit | [SpaceGapUnit, SpaceGapUnit] | {
|
|
13
|
+
row?: SpaceGapUnit;
|
|
14
|
+
column?: SpaceGapUnit;
|
|
15
|
+
} | {
|
|
16
|
+
x?: SpaceGapUnit;
|
|
17
|
+
y?: SpaceGapUnit;
|
|
18
|
+
};
|
|
19
|
+
type SpaceItemOwnProps = {
|
|
20
|
+
className?: string;
|
|
21
|
+
class?: string;
|
|
22
|
+
style?: React.CSSProperties;
|
|
23
|
+
sx?: SxProps;
|
|
24
|
+
flex?: React.CSSProperties["flex"];
|
|
25
|
+
grow?: React.CSSProperties["flexGrow"];
|
|
26
|
+
shrink?: React.CSSProperties["flexShrink"];
|
|
27
|
+
basis?: React.CSSProperties["flexBasis"];
|
|
28
|
+
order?: React.CSSProperties["order"];
|
|
29
|
+
alignSelf?: React.CSSProperties["alignSelf"];
|
|
30
|
+
children?: React.ReactNode;
|
|
31
|
+
};
|
|
32
|
+
type SpaceItemProps = React.ComponentPropsWithoutRef<"div"> & SpaceItemOwnProps;
|
|
33
|
+
declare const SPACE_ITEM_SYMBOL: unique symbol;
|
|
34
|
+
type SpaceItemComponent = React.FC<SpaceItemProps> & {
|
|
35
|
+
[SPACE_ITEM_SYMBOL]: true;
|
|
36
|
+
};
|
|
37
|
+
declare const SpaceItemBase: SpaceItemComponent;
|
|
38
|
+
type SpaceOwnProps = {
|
|
39
|
+
direction?: Responsive<SpaceDirection>;
|
|
40
|
+
size?: Responsive<SpaceGap>;
|
|
41
|
+
wrap?: Responsive<SpaceWrap>;
|
|
42
|
+
align?: Responsive<SpaceAlign>;
|
|
43
|
+
justify?: Responsive<SpaceJustify>;
|
|
44
|
+
split?: React.ReactNode;
|
|
45
|
+
itemStyle?: React.CSSProperties;
|
|
46
|
+
itemClassName?: string;
|
|
47
|
+
itemSx?: SxProps;
|
|
48
|
+
};
|
|
49
|
+
export type SpaceProps = BoxProps<React.ElementType> & SpaceOwnProps;
|
|
50
|
+
type SpaceComponent = React.FC<SpaceProps> & {
|
|
51
|
+
Item: typeof SpaceItemBase;
|
|
52
|
+
};
|
|
53
|
+
export declare const Space: SpaceComponent;
|
|
54
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Space";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { ElementType } from "react";
|
|
3
|
+
import { type SxProps } from "@/styling";
|
|
4
|
+
type ScrollBehavior = "smooth" | "instant" | "auto";
|
|
5
|
+
type ScrollLogicalPosition = "start" | "center" | "end" | "nearest";
|
|
6
|
+
type AnchorCommonProps = {
|
|
7
|
+
id: string;
|
|
8
|
+
offset?: number;
|
|
9
|
+
behavior?: ScrollBehavior;
|
|
10
|
+
block?: ScrollLogicalPosition;
|
|
11
|
+
inline?: ScrollLogicalPosition;
|
|
12
|
+
onNavigate?: (id: string) => void;
|
|
13
|
+
className?: string;
|
|
14
|
+
class?: string;
|
|
15
|
+
sx?: SxProps;
|
|
16
|
+
style?: React.CSSProperties;
|
|
17
|
+
};
|
|
18
|
+
type AnchorHashModeProps = Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "id" | "className" | "style"> & AnchorCommonProps & {
|
|
19
|
+
hash: true;
|
|
20
|
+
component?: never;
|
|
21
|
+
};
|
|
22
|
+
type AnchorScrollModeProps<T extends ElementType = "button"> = Omit<React.ComponentPropsWithoutRef<T>, "id" | "className" | "style" | "onClick" | "onKeyDown"> & AnchorCommonProps & {
|
|
23
|
+
hash?: false | undefined;
|
|
24
|
+
component?: T;
|
|
25
|
+
onClick?: React.MouseEventHandler<Element>;
|
|
26
|
+
onKeyDown?: React.KeyboardEventHandler<Element>;
|
|
27
|
+
};
|
|
28
|
+
export type AnchorProps<T extends ElementType = "button"> = AnchorHashModeProps | AnchorScrollModeProps<T>;
|
|
29
|
+
export declare function Anchor<T extends ElementType = "button">(props: AnchorProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export declare namespace Anchor {
|
|
31
|
+
var displayName: string;
|
|
32
|
+
}
|
|
33
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Anchor";
|