react-better-html 1.1.162 → 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 +41 -39
- package/dist/index.d.ts +41 -39
- package/dist/index.js +241 -198
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +309 -266
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2,7 +2,6 @@ import { WebTarget } from 'styled-components';
|
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
import { ComponentProps, ReactNode } from 'react';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
|
-
import * as reactRouterDomLib from 'react-router-dom';
|
|
6
5
|
|
|
7
6
|
type PluginName = "alerts" | "react-router-dom" | "localStorage";
|
|
8
7
|
type BetterHtmlPluginConstructor<T extends object = object> = (config?: T) => BetterHtmlPlugin<T>;
|
|
@@ -38,6 +37,44 @@ type DeepPartialRecord<T> = {
|
|
|
38
37
|
type PickAllRequired<T, K extends keyof T> = Required<Pick<T, K>>;
|
|
39
38
|
type AnyOtherString = Omit<string & {}, "">;
|
|
40
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
|
+
|
|
41
78
|
type DivProps<Value = unknown> = {
|
|
42
79
|
value?: Value;
|
|
43
80
|
/** @default "div" */
|
|
@@ -58,7 +95,8 @@ type DivComponentType = {
|
|
|
58
95
|
invertFlexDirection?: boolean;
|
|
59
96
|
}>) => React.ReactElement;
|
|
60
97
|
grid: <Value>(props: ComponentPropWithRef<HTMLDivElement, OmitProps<DivProps<Value>, "display">>) => React.ReactElement;
|
|
61
|
-
box: <Value>(props: ComponentPropWithRef<HTMLDivElement, DivProps<Value> & {
|
|
98
|
+
box: <Value>(props: ComponentPropWithRef<HTMLDivElement, DivProps<Value> & OmitProps<PageHeaderProps, "marginBottom"> & {
|
|
99
|
+
headerBackgroundColor?: string;
|
|
62
100
|
isActive?: boolean;
|
|
63
101
|
}>) => React.ReactElement;
|
|
64
102
|
};
|
|
@@ -70,22 +108,6 @@ declare const Div: typeof DivComponent & {
|
|
|
70
108
|
box: typeof DivComponent.box;
|
|
71
109
|
};
|
|
72
110
|
|
|
73
|
-
type TextAs = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "span" | "label";
|
|
74
|
-
type TextProps<As extends TextAs = "p"> = {
|
|
75
|
-
/** @default "p" */
|
|
76
|
-
as?: As;
|
|
77
|
-
} & OmitProps<React.ComponentProps<As>, "style"> & ComponentStyle & ComponentHoverStyle;
|
|
78
|
-
type TextComponentType = {
|
|
79
|
-
<As extends TextAs>(props: ComponentPropWithRef<HTMLParagraphElement, TextProps<As>>): React.ReactElement;
|
|
80
|
-
unknown: <As extends TextAs>(props: ComponentPropWithRef<HTMLParagraphElement, TextProps<As>>) => React.ReactElement;
|
|
81
|
-
oneLine: <As extends TextAs>(props: ComponentPropWithRef<HTMLParagraphElement, TextProps<As>>) => React.ReactElement;
|
|
82
|
-
};
|
|
83
|
-
declare const TextComponent: TextComponentType;
|
|
84
|
-
declare const Text: typeof TextComponent & {
|
|
85
|
-
unknown: typeof TextComponent.unknown;
|
|
86
|
-
oneLine: typeof TextComponent.oneLine;
|
|
87
|
-
};
|
|
88
|
-
|
|
89
111
|
type Color = `#${string}` | "transparent";
|
|
90
112
|
type ColorName = "textPrimary" | "textSecondary" | "textLink" | "label" | "primary" | "secondary" | "accent" | "success" | "info" | "warn" | "error" | "base" | "backgroundBase" | "backgroundSecondary" | "backgroundContent" | "border";
|
|
91
113
|
type ColorTheme = "light" | "dark";
|
|
@@ -340,24 +362,6 @@ declare const PageHolder: typeof PageHolderComponent & {
|
|
|
340
362
|
center: typeof PageHolderComponent.center;
|
|
341
363
|
};
|
|
342
364
|
|
|
343
|
-
type PageHeaderProps = {
|
|
344
|
-
imageUrl?: string;
|
|
345
|
-
imageSize?: number;
|
|
346
|
-
title?: string;
|
|
347
|
-
titleAs?: TextAs;
|
|
348
|
-
titleRightElement?: React.ReactNode;
|
|
349
|
-
description?: string;
|
|
350
|
-
textAlign?: React.CSSProperties["textAlign"];
|
|
351
|
-
rightElement?: React.ReactNode;
|
|
352
|
-
/** @default false */
|
|
353
|
-
lightMode?: boolean;
|
|
354
|
-
} & Pick<ComponentMarginProps, "marginBottom">;
|
|
355
|
-
type PageHeaderComponentType = {
|
|
356
|
-
(props: ComponentPropWithRef<HTMLDivElement, PageHeaderProps>): React.ReactElement;
|
|
357
|
-
};
|
|
358
|
-
declare const PageHeaderComponent: PageHeaderComponentType;
|
|
359
|
-
declare const PageHeader: typeof PageHeaderComponent & {};
|
|
360
|
-
|
|
361
365
|
type ChipProps = {
|
|
362
366
|
text: string;
|
|
363
367
|
/** @default theme.colors.textPrimary */
|
|
@@ -1012,9 +1016,7 @@ type AlertsPluginOptions = {
|
|
|
1012
1016
|
declare const defaultAlertsPluginOptions: Required<AlertsPluginOptions>;
|
|
1013
1017
|
declare const alertsPlugin: BetterHtmlPluginConstructor<AlertsPluginOptions>;
|
|
1014
1018
|
|
|
1015
|
-
type ReactRouterDomPluginOptions = {
|
|
1016
|
-
reactRouterDomLib: typeof reactRouterDomLib;
|
|
1017
|
-
};
|
|
1019
|
+
type ReactRouterDomPluginOptions = {};
|
|
1018
1020
|
declare const defaultReactRouterDomPluginOptions: Required<ReactRouterDomPluginOptions>;
|
|
1019
1021
|
declare const reactRouterDomPlugin: BetterHtmlPluginConstructor<ReactRouterDomPluginOptions>;
|
|
1020
1022
|
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { WebTarget } from 'styled-components';
|
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
import { ComponentProps, ReactNode } from 'react';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
|
-
import * as reactRouterDomLib from 'react-router-dom';
|
|
6
5
|
|
|
7
6
|
type PluginName = "alerts" | "react-router-dom" | "localStorage";
|
|
8
7
|
type BetterHtmlPluginConstructor<T extends object = object> = (config?: T) => BetterHtmlPlugin<T>;
|
|
@@ -38,6 +37,44 @@ type DeepPartialRecord<T> = {
|
|
|
38
37
|
type PickAllRequired<T, K extends keyof T> = Required<Pick<T, K>>;
|
|
39
38
|
type AnyOtherString = Omit<string & {}, "">;
|
|
40
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
|
+
|
|
41
78
|
type DivProps<Value = unknown> = {
|
|
42
79
|
value?: Value;
|
|
43
80
|
/** @default "div" */
|
|
@@ -58,7 +95,8 @@ type DivComponentType = {
|
|
|
58
95
|
invertFlexDirection?: boolean;
|
|
59
96
|
}>) => React.ReactElement;
|
|
60
97
|
grid: <Value>(props: ComponentPropWithRef<HTMLDivElement, OmitProps<DivProps<Value>, "display">>) => React.ReactElement;
|
|
61
|
-
box: <Value>(props: ComponentPropWithRef<HTMLDivElement, DivProps<Value> & {
|
|
98
|
+
box: <Value>(props: ComponentPropWithRef<HTMLDivElement, DivProps<Value> & OmitProps<PageHeaderProps, "marginBottom"> & {
|
|
99
|
+
headerBackgroundColor?: string;
|
|
62
100
|
isActive?: boolean;
|
|
63
101
|
}>) => React.ReactElement;
|
|
64
102
|
};
|
|
@@ -70,22 +108,6 @@ declare const Div: typeof DivComponent & {
|
|
|
70
108
|
box: typeof DivComponent.box;
|
|
71
109
|
};
|
|
72
110
|
|
|
73
|
-
type TextAs = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "span" | "label";
|
|
74
|
-
type TextProps<As extends TextAs = "p"> = {
|
|
75
|
-
/** @default "p" */
|
|
76
|
-
as?: As;
|
|
77
|
-
} & OmitProps<React.ComponentProps<As>, "style"> & ComponentStyle & ComponentHoverStyle;
|
|
78
|
-
type TextComponentType = {
|
|
79
|
-
<As extends TextAs>(props: ComponentPropWithRef<HTMLParagraphElement, TextProps<As>>): React.ReactElement;
|
|
80
|
-
unknown: <As extends TextAs>(props: ComponentPropWithRef<HTMLParagraphElement, TextProps<As>>) => React.ReactElement;
|
|
81
|
-
oneLine: <As extends TextAs>(props: ComponentPropWithRef<HTMLParagraphElement, TextProps<As>>) => React.ReactElement;
|
|
82
|
-
};
|
|
83
|
-
declare const TextComponent: TextComponentType;
|
|
84
|
-
declare const Text: typeof TextComponent & {
|
|
85
|
-
unknown: typeof TextComponent.unknown;
|
|
86
|
-
oneLine: typeof TextComponent.oneLine;
|
|
87
|
-
};
|
|
88
|
-
|
|
89
111
|
type Color = `#${string}` | "transparent";
|
|
90
112
|
type ColorName = "textPrimary" | "textSecondary" | "textLink" | "label" | "primary" | "secondary" | "accent" | "success" | "info" | "warn" | "error" | "base" | "backgroundBase" | "backgroundSecondary" | "backgroundContent" | "border";
|
|
91
113
|
type ColorTheme = "light" | "dark";
|
|
@@ -340,24 +362,6 @@ declare const PageHolder: typeof PageHolderComponent & {
|
|
|
340
362
|
center: typeof PageHolderComponent.center;
|
|
341
363
|
};
|
|
342
364
|
|
|
343
|
-
type PageHeaderProps = {
|
|
344
|
-
imageUrl?: string;
|
|
345
|
-
imageSize?: number;
|
|
346
|
-
title?: string;
|
|
347
|
-
titleAs?: TextAs;
|
|
348
|
-
titleRightElement?: React.ReactNode;
|
|
349
|
-
description?: string;
|
|
350
|
-
textAlign?: React.CSSProperties["textAlign"];
|
|
351
|
-
rightElement?: React.ReactNode;
|
|
352
|
-
/** @default false */
|
|
353
|
-
lightMode?: boolean;
|
|
354
|
-
} & Pick<ComponentMarginProps, "marginBottom">;
|
|
355
|
-
type PageHeaderComponentType = {
|
|
356
|
-
(props: ComponentPropWithRef<HTMLDivElement, PageHeaderProps>): React.ReactElement;
|
|
357
|
-
};
|
|
358
|
-
declare const PageHeaderComponent: PageHeaderComponentType;
|
|
359
|
-
declare const PageHeader: typeof PageHeaderComponent & {};
|
|
360
|
-
|
|
361
365
|
type ChipProps = {
|
|
362
366
|
text: string;
|
|
363
367
|
/** @default theme.colors.textPrimary */
|
|
@@ -1012,9 +1016,7 @@ type AlertsPluginOptions = {
|
|
|
1012
1016
|
declare const defaultAlertsPluginOptions: Required<AlertsPluginOptions>;
|
|
1013
1017
|
declare const alertsPlugin: BetterHtmlPluginConstructor<AlertsPluginOptions>;
|
|
1014
1018
|
|
|
1015
|
-
type ReactRouterDomPluginOptions = {
|
|
1016
|
-
reactRouterDomLib: typeof reactRouterDomLib;
|
|
1017
|
-
};
|
|
1019
|
+
type ReactRouterDomPluginOptions = {};
|
|
1018
1020
|
declare const defaultReactRouterDomPluginOptions: Required<ReactRouterDomPluginOptions>;
|
|
1019
1021
|
declare const reactRouterDomPlugin: BetterHtmlPluginConstructor<ReactRouterDomPluginOptions>;
|
|
1020
1022
|
|