react-better-html 1.1.163 → 1.1.164
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/dist/index.d.mts +40 -35
- package/dist/index.d.ts +40 -35
- package/dist/index.js +235 -189
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +303 -257
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -37,6 +37,44 @@ type DeepPartialRecord<T> = {
|
|
|
37
37
|
type PickAllRequired<T, K extends keyof T> = Required<Pick<T, K>>;
|
|
38
38
|
type AnyOtherString = Omit<string & {}, "">;
|
|
39
39
|
|
|
40
|
+
type TextAs = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "span" | "label";
|
|
41
|
+
type TextProps<As extends TextAs = "p"> = {
|
|
42
|
+
/** @default "p" */
|
|
43
|
+
as?: As;
|
|
44
|
+
} & OmitProps<React.ComponentProps<As>, "style"> & ComponentStyle & ComponentHoverStyle;
|
|
45
|
+
type TextComponentType = {
|
|
46
|
+
<As extends TextAs>(props: ComponentPropWithRef<HTMLParagraphElement, TextProps<As>>): React.ReactElement;
|
|
47
|
+
unknown: <As extends TextAs>(props: ComponentPropWithRef<HTMLParagraphElement, TextProps<As>>) => React.ReactElement;
|
|
48
|
+
oneLine: <As extends TextAs>(props: ComponentPropWithRef<HTMLParagraphElement, TextProps<As>>) => React.ReactElement;
|
|
49
|
+
};
|
|
50
|
+
declare const TextComponent: TextComponentType;
|
|
51
|
+
declare const Text: typeof TextComponent & {
|
|
52
|
+
unknown: typeof TextComponent.unknown;
|
|
53
|
+
oneLine: typeof TextComponent.oneLine;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
type PageHeaderProps = {
|
|
57
|
+
imageUrl?: string;
|
|
58
|
+
imageSize?: number;
|
|
59
|
+
title?: string;
|
|
60
|
+
titleAs?: TextAs;
|
|
61
|
+
/** @default theme.colors.textPrimary */
|
|
62
|
+
titleColor?: React.CSSProperties["color"];
|
|
63
|
+
titleRightElement?: React.ReactNode;
|
|
64
|
+
description?: string;
|
|
65
|
+
/** @default theme.colors.textSecondary */
|
|
66
|
+
descriptionColor?: React.CSSProperties["color"];
|
|
67
|
+
textAlign?: React.CSSProperties["textAlign"];
|
|
68
|
+
rightElement?: React.ReactNode;
|
|
69
|
+
/** @default false */
|
|
70
|
+
lightMode?: boolean;
|
|
71
|
+
} & Pick<ComponentMarginProps, "marginBottom">;
|
|
72
|
+
type PageHeaderComponentType = {
|
|
73
|
+
(props: ComponentPropWithRef<HTMLDivElement, PageHeaderProps>): React.ReactElement;
|
|
74
|
+
};
|
|
75
|
+
declare const PageHeaderComponent: PageHeaderComponentType;
|
|
76
|
+
declare const PageHeader: typeof PageHeaderComponent & {};
|
|
77
|
+
|
|
40
78
|
type DivProps<Value = unknown> = {
|
|
41
79
|
value?: Value;
|
|
42
80
|
/** @default "div" */
|
|
@@ -57,7 +95,8 @@ type DivComponentType = {
|
|
|
57
95
|
invertFlexDirection?: boolean;
|
|
58
96
|
}>) => React.ReactElement;
|
|
59
97
|
grid: <Value>(props: ComponentPropWithRef<HTMLDivElement, OmitProps<DivProps<Value>, "display">>) => React.ReactElement;
|
|
60
|
-
box: <Value>(props: ComponentPropWithRef<HTMLDivElement, DivProps<Value> & {
|
|
98
|
+
box: <Value>(props: ComponentPropWithRef<HTMLDivElement, DivProps<Value> & OmitProps<PageHeaderProps, "marginBottom"> & {
|
|
99
|
+
headerBackgroundColor?: string;
|
|
61
100
|
isActive?: boolean;
|
|
62
101
|
}>) => React.ReactElement;
|
|
63
102
|
};
|
|
@@ -69,22 +108,6 @@ declare const Div: typeof DivComponent & {
|
|
|
69
108
|
box: typeof DivComponent.box;
|
|
70
109
|
};
|
|
71
110
|
|
|
72
|
-
type TextAs = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "span" | "label";
|
|
73
|
-
type TextProps<As extends TextAs = "p"> = {
|
|
74
|
-
/** @default "p" */
|
|
75
|
-
as?: As;
|
|
76
|
-
} & OmitProps<React.ComponentProps<As>, "style"> & ComponentStyle & ComponentHoverStyle;
|
|
77
|
-
type TextComponentType = {
|
|
78
|
-
<As extends TextAs>(props: ComponentPropWithRef<HTMLParagraphElement, TextProps<As>>): React.ReactElement;
|
|
79
|
-
unknown: <As extends TextAs>(props: ComponentPropWithRef<HTMLParagraphElement, TextProps<As>>) => React.ReactElement;
|
|
80
|
-
oneLine: <As extends TextAs>(props: ComponentPropWithRef<HTMLParagraphElement, TextProps<As>>) => React.ReactElement;
|
|
81
|
-
};
|
|
82
|
-
declare const TextComponent: TextComponentType;
|
|
83
|
-
declare const Text: typeof TextComponent & {
|
|
84
|
-
unknown: typeof TextComponent.unknown;
|
|
85
|
-
oneLine: typeof TextComponent.oneLine;
|
|
86
|
-
};
|
|
87
|
-
|
|
88
111
|
type Color = `#${string}` | "transparent";
|
|
89
112
|
type ColorName = "textPrimary" | "textSecondary" | "textLink" | "label" | "primary" | "secondary" | "accent" | "success" | "info" | "warn" | "error" | "base" | "backgroundBase" | "backgroundSecondary" | "backgroundContent" | "border";
|
|
90
113
|
type ColorTheme = "light" | "dark";
|
|
@@ -339,24 +362,6 @@ declare const PageHolder: typeof PageHolderComponent & {
|
|
|
339
362
|
center: typeof PageHolderComponent.center;
|
|
340
363
|
};
|
|
341
364
|
|
|
342
|
-
type PageHeaderProps = {
|
|
343
|
-
imageUrl?: string;
|
|
344
|
-
imageSize?: number;
|
|
345
|
-
title?: string;
|
|
346
|
-
titleAs?: TextAs;
|
|
347
|
-
titleRightElement?: React.ReactNode;
|
|
348
|
-
description?: string;
|
|
349
|
-
textAlign?: React.CSSProperties["textAlign"];
|
|
350
|
-
rightElement?: React.ReactNode;
|
|
351
|
-
/** @default false */
|
|
352
|
-
lightMode?: boolean;
|
|
353
|
-
} & Pick<ComponentMarginProps, "marginBottom">;
|
|
354
|
-
type PageHeaderComponentType = {
|
|
355
|
-
(props: ComponentPropWithRef<HTMLDivElement, PageHeaderProps>): React.ReactElement;
|
|
356
|
-
};
|
|
357
|
-
declare const PageHeaderComponent: PageHeaderComponentType;
|
|
358
|
-
declare const PageHeader: typeof PageHeaderComponent & {};
|
|
359
|
-
|
|
360
365
|
type ChipProps = {
|
|
361
366
|
text: string;
|
|
362
367
|
/** @default theme.colors.textPrimary */
|
package/dist/index.d.ts
CHANGED
|
@@ -37,6 +37,44 @@ type DeepPartialRecord<T> = {
|
|
|
37
37
|
type PickAllRequired<T, K extends keyof T> = Required<Pick<T, K>>;
|
|
38
38
|
type AnyOtherString = Omit<string & {}, "">;
|
|
39
39
|
|
|
40
|
+
type TextAs = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "span" | "label";
|
|
41
|
+
type TextProps<As extends TextAs = "p"> = {
|
|
42
|
+
/** @default "p" */
|
|
43
|
+
as?: As;
|
|
44
|
+
} & OmitProps<React.ComponentProps<As>, "style"> & ComponentStyle & ComponentHoverStyle;
|
|
45
|
+
type TextComponentType = {
|
|
46
|
+
<As extends TextAs>(props: ComponentPropWithRef<HTMLParagraphElement, TextProps<As>>): React.ReactElement;
|
|
47
|
+
unknown: <As extends TextAs>(props: ComponentPropWithRef<HTMLParagraphElement, TextProps<As>>) => React.ReactElement;
|
|
48
|
+
oneLine: <As extends TextAs>(props: ComponentPropWithRef<HTMLParagraphElement, TextProps<As>>) => React.ReactElement;
|
|
49
|
+
};
|
|
50
|
+
declare const TextComponent: TextComponentType;
|
|
51
|
+
declare const Text: typeof TextComponent & {
|
|
52
|
+
unknown: typeof TextComponent.unknown;
|
|
53
|
+
oneLine: typeof TextComponent.oneLine;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
type PageHeaderProps = {
|
|
57
|
+
imageUrl?: string;
|
|
58
|
+
imageSize?: number;
|
|
59
|
+
title?: string;
|
|
60
|
+
titleAs?: TextAs;
|
|
61
|
+
/** @default theme.colors.textPrimary */
|
|
62
|
+
titleColor?: React.CSSProperties["color"];
|
|
63
|
+
titleRightElement?: React.ReactNode;
|
|
64
|
+
description?: string;
|
|
65
|
+
/** @default theme.colors.textSecondary */
|
|
66
|
+
descriptionColor?: React.CSSProperties["color"];
|
|
67
|
+
textAlign?: React.CSSProperties["textAlign"];
|
|
68
|
+
rightElement?: React.ReactNode;
|
|
69
|
+
/** @default false */
|
|
70
|
+
lightMode?: boolean;
|
|
71
|
+
} & Pick<ComponentMarginProps, "marginBottom">;
|
|
72
|
+
type PageHeaderComponentType = {
|
|
73
|
+
(props: ComponentPropWithRef<HTMLDivElement, PageHeaderProps>): React.ReactElement;
|
|
74
|
+
};
|
|
75
|
+
declare const PageHeaderComponent: PageHeaderComponentType;
|
|
76
|
+
declare const PageHeader: typeof PageHeaderComponent & {};
|
|
77
|
+
|
|
40
78
|
type DivProps<Value = unknown> = {
|
|
41
79
|
value?: Value;
|
|
42
80
|
/** @default "div" */
|
|
@@ -57,7 +95,8 @@ type DivComponentType = {
|
|
|
57
95
|
invertFlexDirection?: boolean;
|
|
58
96
|
}>) => React.ReactElement;
|
|
59
97
|
grid: <Value>(props: ComponentPropWithRef<HTMLDivElement, OmitProps<DivProps<Value>, "display">>) => React.ReactElement;
|
|
60
|
-
box: <Value>(props: ComponentPropWithRef<HTMLDivElement, DivProps<Value> & {
|
|
98
|
+
box: <Value>(props: ComponentPropWithRef<HTMLDivElement, DivProps<Value> & OmitProps<PageHeaderProps, "marginBottom"> & {
|
|
99
|
+
headerBackgroundColor?: string;
|
|
61
100
|
isActive?: boolean;
|
|
62
101
|
}>) => React.ReactElement;
|
|
63
102
|
};
|
|
@@ -69,22 +108,6 @@ declare const Div: typeof DivComponent & {
|
|
|
69
108
|
box: typeof DivComponent.box;
|
|
70
109
|
};
|
|
71
110
|
|
|
72
|
-
type TextAs = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "span" | "label";
|
|
73
|
-
type TextProps<As extends TextAs = "p"> = {
|
|
74
|
-
/** @default "p" */
|
|
75
|
-
as?: As;
|
|
76
|
-
} & OmitProps<React.ComponentProps<As>, "style"> & ComponentStyle & ComponentHoverStyle;
|
|
77
|
-
type TextComponentType = {
|
|
78
|
-
<As extends TextAs>(props: ComponentPropWithRef<HTMLParagraphElement, TextProps<As>>): React.ReactElement;
|
|
79
|
-
unknown: <As extends TextAs>(props: ComponentPropWithRef<HTMLParagraphElement, TextProps<As>>) => React.ReactElement;
|
|
80
|
-
oneLine: <As extends TextAs>(props: ComponentPropWithRef<HTMLParagraphElement, TextProps<As>>) => React.ReactElement;
|
|
81
|
-
};
|
|
82
|
-
declare const TextComponent: TextComponentType;
|
|
83
|
-
declare const Text: typeof TextComponent & {
|
|
84
|
-
unknown: typeof TextComponent.unknown;
|
|
85
|
-
oneLine: typeof TextComponent.oneLine;
|
|
86
|
-
};
|
|
87
|
-
|
|
88
111
|
type Color = `#${string}` | "transparent";
|
|
89
112
|
type ColorName = "textPrimary" | "textSecondary" | "textLink" | "label" | "primary" | "secondary" | "accent" | "success" | "info" | "warn" | "error" | "base" | "backgroundBase" | "backgroundSecondary" | "backgroundContent" | "border";
|
|
90
113
|
type ColorTheme = "light" | "dark";
|
|
@@ -339,24 +362,6 @@ declare const PageHolder: typeof PageHolderComponent & {
|
|
|
339
362
|
center: typeof PageHolderComponent.center;
|
|
340
363
|
};
|
|
341
364
|
|
|
342
|
-
type PageHeaderProps = {
|
|
343
|
-
imageUrl?: string;
|
|
344
|
-
imageSize?: number;
|
|
345
|
-
title?: string;
|
|
346
|
-
titleAs?: TextAs;
|
|
347
|
-
titleRightElement?: React.ReactNode;
|
|
348
|
-
description?: string;
|
|
349
|
-
textAlign?: React.CSSProperties["textAlign"];
|
|
350
|
-
rightElement?: React.ReactNode;
|
|
351
|
-
/** @default false */
|
|
352
|
-
lightMode?: boolean;
|
|
353
|
-
} & Pick<ComponentMarginProps, "marginBottom">;
|
|
354
|
-
type PageHeaderComponentType = {
|
|
355
|
-
(props: ComponentPropWithRef<HTMLDivElement, PageHeaderProps>): React.ReactElement;
|
|
356
|
-
};
|
|
357
|
-
declare const PageHeaderComponent: PageHeaderComponentType;
|
|
358
|
-
declare const PageHeader: typeof PageHeaderComponent & {};
|
|
359
|
-
|
|
360
365
|
type ChipProps = {
|
|
361
366
|
text: string;
|
|
362
367
|
/** @default theme.colors.textPrimary */
|