react-better-html 1.1.217 → 1.1.218
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/README.md +1 -1
- package/dist/index.d.mts +15 -4
- package/dist/index.d.ts +15 -4
- package/dist/index.js +1019 -911
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1022 -914
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -2
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ A component library for react that is as close to plane html as possible
|
|
|
6
6
|

|
|
7
7
|

|
|
8
8
|
<br/>
|
|
9
|
-

|
|
10
10
|

|
|
11
11
|
<br/>
|
|
12
12
|
<br/>
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Color, BetterCoreProviderConfig, DeepPartialRecord, BetterCoreConfig, OmitProps, IconName, AnyOtherString, PartialRecord, AssetName, LoaderName, Country } from 'react-better-core';
|
|
1
|
+
import { Color, BetterCoreProviderConfig, DeepPartialRecord, BetterCoreConfig, OmitProps, IconName, AnyOtherString, PartialRecord, AssetName, LoaderName, PickValue, Country } from 'react-better-core';
|
|
2
2
|
export { AnyOtherString, AssetName, AssetsConfig, Color, ColorName, ColorTheme, Colors, Country, DeepPartialRecord, ExcludeOptions, IconName, IconsConfig, LoaderConfig, LoaderName, OmitProps, PartialRecord, PickAllRequired, PickValue, Styles, Theme, ThemeConfig, colorThemeControls, countries, darkenColor, desaturateColor, eventPreventDefault, eventPreventStop, eventStopPropagation, formatPhoneNumber, generateRandomString, getPluralWord, lightenColor, loaderControls, saturateColor, useBooleanState, useDebounceState, useLoader, useLoaderControls, useTheme } from 'react-better-core';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import { ComponentProps, ReactNode } from 'react';
|
|
@@ -51,11 +51,15 @@ type BetterHtmlConfig = {
|
|
|
51
51
|
|
|
52
52
|
type AlertType = "info" | "success" | "warning" | "error";
|
|
53
53
|
type AlertDuration = number | "auto";
|
|
54
|
+
type AlertDisplay = "default" | "prominent";
|
|
54
55
|
type Alert = {
|
|
55
56
|
id: string;
|
|
56
57
|
type: AlertType;
|
|
58
|
+
/** @default "default" */
|
|
59
|
+
display?: AlertDisplay;
|
|
57
60
|
title?: string;
|
|
58
61
|
message?: string;
|
|
62
|
+
/** @default "auto" */
|
|
59
63
|
duration?: AlertDuration;
|
|
60
64
|
onClose?: (alert: Alert) => void;
|
|
61
65
|
};
|
|
@@ -97,13 +101,14 @@ declare const useAlertControls: () => {
|
|
|
97
101
|
createAlert: (alert: OmitProps<Alert, "id">) => Alert;
|
|
98
102
|
removeAlert: (alertId: string) => void;
|
|
99
103
|
};
|
|
100
|
-
type
|
|
104
|
+
type BetterHtmlProviderInternalConfig = DeepPartialRecord<BetterHtmlConfig>;
|
|
101
105
|
type BetterProviderCommonProps = {
|
|
102
106
|
plugins?: BetterHtmlPlugin[];
|
|
103
107
|
children?: React.ReactNode;
|
|
104
108
|
};
|
|
109
|
+
type BetterHtmlProviderConfig = BetterCoreProviderConfig & BetterHtmlProviderInternalConfig;
|
|
105
110
|
type BetterHtmlProviderProps = BetterProviderCommonProps & {
|
|
106
|
-
config?:
|
|
111
|
+
config?: BetterHtmlProviderConfig;
|
|
107
112
|
};
|
|
108
113
|
declare function BetterHtmlProvider({ config, ...props }: BetterHtmlProviderProps): react_jsx_runtime.JSX.Element;
|
|
109
114
|
declare const _default$5: react.MemoExoticComponent<typeof BetterHtmlProvider>;
|
|
@@ -295,8 +300,12 @@ declare const Text: typeof TextComponent & {
|
|
|
295
300
|
};
|
|
296
301
|
|
|
297
302
|
type PageHeaderProps = {
|
|
303
|
+
icon?: IconName | AnyOtherString;
|
|
304
|
+
image?: AssetName | AnyOtherString;
|
|
298
305
|
imageUrl?: string;
|
|
299
306
|
imageSize?: number;
|
|
307
|
+
/** @default false */
|
|
308
|
+
imageAzProfileImage?: boolean;
|
|
300
309
|
title?: string;
|
|
301
310
|
/** @default "h1" */
|
|
302
311
|
titleAs?: TextAs;
|
|
@@ -499,10 +508,12 @@ type ModalProps = {
|
|
|
499
508
|
* @default 30% smaller than app.contentMaxWidth
|
|
500
509
|
* */
|
|
501
510
|
maxWidth?: number;
|
|
511
|
+
icon?: IconName | AnyOtherString;
|
|
502
512
|
title?: string;
|
|
503
513
|
titleColor?: React.CSSProperties["color"];
|
|
504
514
|
description?: string;
|
|
505
515
|
descriptionColor?: React.CSSProperties["color"];
|
|
516
|
+
headerTextAlign?: PickValue<NonNullable<React.CSSProperties["textAlign"]>, "left" | "center">;
|
|
506
517
|
headerBackgroundColor?: React.CSSProperties["backgroundColor"];
|
|
507
518
|
backgroundColor?: React.CSSProperties["backgroundColor"];
|
|
508
519
|
/** @requires ReactRouterDomPlugin */
|
|
@@ -1078,4 +1089,4 @@ type LocalStoragePluginOptions = {
|
|
|
1078
1089
|
declare const defaultLocalStoragePluginOptions: Required<LocalStoragePluginOptions>;
|
|
1079
1090
|
declare const localStoragePlugin: BetterHtmlPluginConstructor<LocalStoragePluginOptions>;
|
|
1080
1091
|
|
|
1081
|
-
export { type Alert, type AlertType, type AlertsPluginOptions, type AppConfig, type BetterHtmlConfig, type BetterHtmlPlugin, _default$5 as BetterHtmlProvider, type BetterHtmlProviderConfig, type BrowserName, Button, type ButtonProps, Chip, type ChipProps, ColorThemeSwitch, type ColorThemeSwitchProps, type ComponentHoverStyle, type ComponentMarginProps, type ComponentPaddingProps, Div, type DivProps, _default$1 as Divider, Dropdown, type DropdownOption, type DropdownProps, Foldable, type FoldableProps, type FoldableRef, Form, type FormProps, FormRow, type FormRowProps, type HorizontalDividerProps, _default$3 as Icon, type IconProps, _default$2 as Image, type ImageProps, InputField, type InputFieldProps, _default as Label, type LabelProps, Loader, type LoaderProps, type LocalStoragePluginOptions, Modal, type ModalProps, type ModalRef, PageHeader, type PageHeaderProps, PageHolder, type PageHolderProps, Pagination, type PluginName, type ReactRouterDomPluginOptions, SideMenu, type SideMenuItem, type TabGroup, Table, type TableColumn, type TableFilterData, type TableListFilterListItem, type TableProps, type TableRef, Tabs, type TabsProps, type TabsRef, Text, type TextAs, type TextProps, type TextareaFieldProps, _default$4 as ToggleInput, type ToggleInputProps, type ToggleInputRef, Tooltip, type TooltipProps, type TooltipRef, type VerticalDividerProps, alertControls, alertsPlugin, defaultAlertsPluginOptions, defaultLocalStoragePluginOptions, defaultReactRouterDomPluginOptions, filterHover, generateLocalStorage, getBrowser, getFormErrorObject, isMobileDevice, localStoragePlugin, reactRouterDomPlugin, sideMenuControls, useAlertControls, useBetterHtmlContext, useForm, useMediaQuery, usePageResize, usePageScroll, useUrlQuery };
|
|
1092
|
+
export { type Alert, type AlertDisplay, type AlertDuration, type AlertType, type AlertsPluginOptions, type AppConfig, type BetterHtmlConfig, type BetterHtmlPlugin, _default$5 as BetterHtmlProvider, type BetterHtmlProviderConfig, type BrowserName, Button, type ButtonProps, Chip, type ChipProps, ColorThemeSwitch, type ColorThemeSwitchProps, type ComponentHoverStyle, type ComponentMarginProps, type ComponentPaddingProps, Div, type DivProps, _default$1 as Divider, Dropdown, type DropdownOption, type DropdownProps, Foldable, type FoldableProps, type FoldableRef, Form, type FormProps, FormRow, type FormRowProps, type HorizontalDividerProps, _default$3 as Icon, type IconProps, _default$2 as Image, type ImageProps, InputField, type InputFieldProps, _default as Label, type LabelProps, Loader, type LoaderProps, type LocalStoragePluginOptions, Modal, type ModalProps, type ModalRef, PageHeader, type PageHeaderProps, PageHolder, type PageHolderProps, Pagination, type PluginName, type ReactRouterDomPluginOptions, SideMenu, type SideMenuItem, type TabGroup, Table, type TableColumn, type TableFilterData, type TableListFilterListItem, type TableProps, type TableRef, Tabs, type TabsProps, type TabsRef, Text, type TextAs, type TextProps, type TextareaFieldProps, _default$4 as ToggleInput, type ToggleInputProps, type ToggleInputRef, Tooltip, type TooltipProps, type TooltipRef, type VerticalDividerProps, alertControls, alertsPlugin, defaultAlertsPluginOptions, defaultLocalStoragePluginOptions, defaultReactRouterDomPluginOptions, filterHover, generateLocalStorage, getBrowser, getFormErrorObject, isMobileDevice, localStoragePlugin, reactRouterDomPlugin, sideMenuControls, useAlertControls, useBetterHtmlContext, useForm, useMediaQuery, usePageResize, usePageScroll, useUrlQuery };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Color, BetterCoreProviderConfig, DeepPartialRecord, BetterCoreConfig, OmitProps, IconName, AnyOtherString, PartialRecord, AssetName, LoaderName, Country } from 'react-better-core';
|
|
1
|
+
import { Color, BetterCoreProviderConfig, DeepPartialRecord, BetterCoreConfig, OmitProps, IconName, AnyOtherString, PartialRecord, AssetName, LoaderName, PickValue, Country } from 'react-better-core';
|
|
2
2
|
export { AnyOtherString, AssetName, AssetsConfig, Color, ColorName, ColorTheme, Colors, Country, DeepPartialRecord, ExcludeOptions, IconName, IconsConfig, LoaderConfig, LoaderName, OmitProps, PartialRecord, PickAllRequired, PickValue, Styles, Theme, ThemeConfig, colorThemeControls, countries, darkenColor, desaturateColor, eventPreventDefault, eventPreventStop, eventStopPropagation, formatPhoneNumber, generateRandomString, getPluralWord, lightenColor, loaderControls, saturateColor, useBooleanState, useDebounceState, useLoader, useLoaderControls, useTheme } from 'react-better-core';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import { ComponentProps, ReactNode } from 'react';
|
|
@@ -51,11 +51,15 @@ type BetterHtmlConfig = {
|
|
|
51
51
|
|
|
52
52
|
type AlertType = "info" | "success" | "warning" | "error";
|
|
53
53
|
type AlertDuration = number | "auto";
|
|
54
|
+
type AlertDisplay = "default" | "prominent";
|
|
54
55
|
type Alert = {
|
|
55
56
|
id: string;
|
|
56
57
|
type: AlertType;
|
|
58
|
+
/** @default "default" */
|
|
59
|
+
display?: AlertDisplay;
|
|
57
60
|
title?: string;
|
|
58
61
|
message?: string;
|
|
62
|
+
/** @default "auto" */
|
|
59
63
|
duration?: AlertDuration;
|
|
60
64
|
onClose?: (alert: Alert) => void;
|
|
61
65
|
};
|
|
@@ -97,13 +101,14 @@ declare const useAlertControls: () => {
|
|
|
97
101
|
createAlert: (alert: OmitProps<Alert, "id">) => Alert;
|
|
98
102
|
removeAlert: (alertId: string) => void;
|
|
99
103
|
};
|
|
100
|
-
type
|
|
104
|
+
type BetterHtmlProviderInternalConfig = DeepPartialRecord<BetterHtmlConfig>;
|
|
101
105
|
type BetterProviderCommonProps = {
|
|
102
106
|
plugins?: BetterHtmlPlugin[];
|
|
103
107
|
children?: React.ReactNode;
|
|
104
108
|
};
|
|
109
|
+
type BetterHtmlProviderConfig = BetterCoreProviderConfig & BetterHtmlProviderInternalConfig;
|
|
105
110
|
type BetterHtmlProviderProps = BetterProviderCommonProps & {
|
|
106
|
-
config?:
|
|
111
|
+
config?: BetterHtmlProviderConfig;
|
|
107
112
|
};
|
|
108
113
|
declare function BetterHtmlProvider({ config, ...props }: BetterHtmlProviderProps): react_jsx_runtime.JSX.Element;
|
|
109
114
|
declare const _default$5: react.MemoExoticComponent<typeof BetterHtmlProvider>;
|
|
@@ -295,8 +300,12 @@ declare const Text: typeof TextComponent & {
|
|
|
295
300
|
};
|
|
296
301
|
|
|
297
302
|
type PageHeaderProps = {
|
|
303
|
+
icon?: IconName | AnyOtherString;
|
|
304
|
+
image?: AssetName | AnyOtherString;
|
|
298
305
|
imageUrl?: string;
|
|
299
306
|
imageSize?: number;
|
|
307
|
+
/** @default false */
|
|
308
|
+
imageAzProfileImage?: boolean;
|
|
300
309
|
title?: string;
|
|
301
310
|
/** @default "h1" */
|
|
302
311
|
titleAs?: TextAs;
|
|
@@ -499,10 +508,12 @@ type ModalProps = {
|
|
|
499
508
|
* @default 30% smaller than app.contentMaxWidth
|
|
500
509
|
* */
|
|
501
510
|
maxWidth?: number;
|
|
511
|
+
icon?: IconName | AnyOtherString;
|
|
502
512
|
title?: string;
|
|
503
513
|
titleColor?: React.CSSProperties["color"];
|
|
504
514
|
description?: string;
|
|
505
515
|
descriptionColor?: React.CSSProperties["color"];
|
|
516
|
+
headerTextAlign?: PickValue<NonNullable<React.CSSProperties["textAlign"]>, "left" | "center">;
|
|
506
517
|
headerBackgroundColor?: React.CSSProperties["backgroundColor"];
|
|
507
518
|
backgroundColor?: React.CSSProperties["backgroundColor"];
|
|
508
519
|
/** @requires ReactRouterDomPlugin */
|
|
@@ -1078,4 +1089,4 @@ type LocalStoragePluginOptions = {
|
|
|
1078
1089
|
declare const defaultLocalStoragePluginOptions: Required<LocalStoragePluginOptions>;
|
|
1079
1090
|
declare const localStoragePlugin: BetterHtmlPluginConstructor<LocalStoragePluginOptions>;
|
|
1080
1091
|
|
|
1081
|
-
export { type Alert, type AlertType, type AlertsPluginOptions, type AppConfig, type BetterHtmlConfig, type BetterHtmlPlugin, _default$5 as BetterHtmlProvider, type BetterHtmlProviderConfig, type BrowserName, Button, type ButtonProps, Chip, type ChipProps, ColorThemeSwitch, type ColorThemeSwitchProps, type ComponentHoverStyle, type ComponentMarginProps, type ComponentPaddingProps, Div, type DivProps, _default$1 as Divider, Dropdown, type DropdownOption, type DropdownProps, Foldable, type FoldableProps, type FoldableRef, Form, type FormProps, FormRow, type FormRowProps, type HorizontalDividerProps, _default$3 as Icon, type IconProps, _default$2 as Image, type ImageProps, InputField, type InputFieldProps, _default as Label, type LabelProps, Loader, type LoaderProps, type LocalStoragePluginOptions, Modal, type ModalProps, type ModalRef, PageHeader, type PageHeaderProps, PageHolder, type PageHolderProps, Pagination, type PluginName, type ReactRouterDomPluginOptions, SideMenu, type SideMenuItem, type TabGroup, Table, type TableColumn, type TableFilterData, type TableListFilterListItem, type TableProps, type TableRef, Tabs, type TabsProps, type TabsRef, Text, type TextAs, type TextProps, type TextareaFieldProps, _default$4 as ToggleInput, type ToggleInputProps, type ToggleInputRef, Tooltip, type TooltipProps, type TooltipRef, type VerticalDividerProps, alertControls, alertsPlugin, defaultAlertsPluginOptions, defaultLocalStoragePluginOptions, defaultReactRouterDomPluginOptions, filterHover, generateLocalStorage, getBrowser, getFormErrorObject, isMobileDevice, localStoragePlugin, reactRouterDomPlugin, sideMenuControls, useAlertControls, useBetterHtmlContext, useForm, useMediaQuery, usePageResize, usePageScroll, useUrlQuery };
|
|
1092
|
+
export { type Alert, type AlertDisplay, type AlertDuration, type AlertType, type AlertsPluginOptions, type AppConfig, type BetterHtmlConfig, type BetterHtmlPlugin, _default$5 as BetterHtmlProvider, type BetterHtmlProviderConfig, type BrowserName, Button, type ButtonProps, Chip, type ChipProps, ColorThemeSwitch, type ColorThemeSwitchProps, type ComponentHoverStyle, type ComponentMarginProps, type ComponentPaddingProps, Div, type DivProps, _default$1 as Divider, Dropdown, type DropdownOption, type DropdownProps, Foldable, type FoldableProps, type FoldableRef, Form, type FormProps, FormRow, type FormRowProps, type HorizontalDividerProps, _default$3 as Icon, type IconProps, _default$2 as Image, type ImageProps, InputField, type InputFieldProps, _default as Label, type LabelProps, Loader, type LoaderProps, type LocalStoragePluginOptions, Modal, type ModalProps, type ModalRef, PageHeader, type PageHeaderProps, PageHolder, type PageHolderProps, Pagination, type PluginName, type ReactRouterDomPluginOptions, SideMenu, type SideMenuItem, type TabGroup, Table, type TableColumn, type TableFilterData, type TableListFilterListItem, type TableProps, type TableRef, Tabs, type TabsProps, type TabsRef, Text, type TextAs, type TextProps, type TextareaFieldProps, _default$4 as ToggleInput, type ToggleInputProps, type ToggleInputRef, Tooltip, type TooltipProps, type TooltipRef, type VerticalDividerProps, alertControls, alertsPlugin, defaultAlertsPluginOptions, defaultLocalStoragePluginOptions, defaultReactRouterDomPluginOptions, filterHover, generateLocalStorage, getBrowser, getFormErrorObject, isMobileDevice, localStoragePlugin, reactRouterDomPlugin, sideMenuControls, useAlertControls, useBetterHtmlContext, useForm, useMediaQuery, usePageResize, usePageScroll, useUrlQuery };
|