react-better-html 1.1.192 → 1.1.194
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 +31 -4
- package/dist/index.d.ts +31 -4
- package/dist/index.js +371 -312
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +355 -297
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ 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 { useNavigate, useLocation, useInRouterContext, useSearchParams } from 'react-router-dom';
|
|
5
|
+
import { useNavigate, useLocation, useInRouterContext, useSearchParams, createSearchParams } from 'react-router-dom';
|
|
6
6
|
|
|
7
7
|
type PluginName = "alerts" | "react-router-dom" | "localStorage";
|
|
8
8
|
type BetterHtmlPluginConstructor<T extends object = object> = (config?: T) => BetterHtmlPlugin<T>;
|
|
@@ -58,12 +58,13 @@ type PageHeaderProps = {
|
|
|
58
58
|
imageUrl?: string;
|
|
59
59
|
imageSize?: number;
|
|
60
60
|
title?: string;
|
|
61
|
+
/** @default "h1" */
|
|
61
62
|
titleAs?: TextAs;
|
|
62
|
-
/** @default
|
|
63
|
+
/** @default textPrimary */
|
|
63
64
|
titleColor?: React.CSSProperties["color"];
|
|
64
65
|
titleRightElement?: React.ReactNode;
|
|
65
66
|
description?: string;
|
|
66
|
-
/** @default
|
|
67
|
+
/** @default textSecondary */
|
|
67
68
|
descriptionColor?: React.CSSProperties["color"];
|
|
68
69
|
textAlign?: React.CSSProperties["textAlign"];
|
|
69
70
|
rightElement?: React.ReactNode;
|
|
@@ -910,7 +911,15 @@ type FoldableProps = {
|
|
|
910
911
|
isOpen?: boolean;
|
|
911
912
|
defaultOpen?: boolean;
|
|
912
913
|
title?: string;
|
|
914
|
+
/** @default "h3" */
|
|
915
|
+
titleAs?: TextAs;
|
|
916
|
+
/** @default textPrimary */
|
|
917
|
+
titleColor?: React.CSSProperties["color"];
|
|
918
|
+
titleRightElement?: React.ReactNode;
|
|
913
919
|
description?: string;
|
|
920
|
+
/** @default textSecondary */
|
|
921
|
+
descriptionColor?: React.CSSProperties["color"];
|
|
922
|
+
rightElement?: React.ReactNode;
|
|
914
923
|
icon?: IconName | AnyOtherString;
|
|
915
924
|
image?: AssetName | AnyOtherString;
|
|
916
925
|
headerPaddingBlock?: React.CSSProperties["paddingBlock"];
|
|
@@ -973,6 +982,23 @@ declare const SideMenu: typeof SideMenuComponent & {
|
|
|
973
982
|
burgerButton: typeof SideMenuComponent.burgerButton;
|
|
974
983
|
};
|
|
975
984
|
|
|
985
|
+
type PaginationProps = {
|
|
986
|
+
currentPage?: number;
|
|
987
|
+
itemsLength?: number;
|
|
988
|
+
itemsPerPage?: number;
|
|
989
|
+
pageCount?: number;
|
|
990
|
+
/** @default 11 */
|
|
991
|
+
maximumVisiblePages?: number;
|
|
992
|
+
onClickPreviousPage?: (newPage: number) => void;
|
|
993
|
+
onClickNextPage?: (newPage: number) => void;
|
|
994
|
+
onChangePage?: (page: number) => void;
|
|
995
|
+
};
|
|
996
|
+
type PaginationComponentType = {
|
|
997
|
+
(props: PaginationProps): React.ReactElement;
|
|
998
|
+
};
|
|
999
|
+
declare const PaginationComponent: PaginationComponentType;
|
|
1000
|
+
declare const Pagination: typeof PaginationComponent & {};
|
|
1001
|
+
|
|
976
1002
|
type AppConfig = {
|
|
977
1003
|
contentMaxWidth: number;
|
|
978
1004
|
};
|
|
@@ -1115,6 +1141,7 @@ type ReactRouterDomPluginOptions = {
|
|
|
1115
1141
|
useLocation: typeof useLocation;
|
|
1116
1142
|
useInRouterContext: typeof useInRouterContext;
|
|
1117
1143
|
useSearchParams: typeof useSearchParams;
|
|
1144
|
+
createSearchParams: typeof createSearchParams;
|
|
1118
1145
|
};
|
|
1119
1146
|
declare const defaultReactRouterDomPluginOptions: Required<ReactRouterDomPluginOptions>;
|
|
1120
1147
|
declare const reactRouterDomPlugin: BetterHtmlPluginConstructor<ReactRouterDomPluginOptions>;
|
|
@@ -1133,4 +1160,4 @@ type LocalStoragePluginOptions = {
|
|
|
1133
1160
|
declare const defaultLocalStoragePluginOptions: Required<LocalStoragePluginOptions>;
|
|
1134
1161
|
declare const localStoragePlugin: BetterHtmlPluginConstructor<LocalStoragePluginOptions>;
|
|
1135
1162
|
|
|
1136
|
-
export { type Alert, type AlertType, type AlertsPluginOptions, type AppConfig, type AssetName, type AssetsConfig, type BetterHtmlConfig, type BetterHtmlPlugin, _default as BetterHtmlProvider, type BetterHtmlProviderConfig, type BrowserName, Button, type ButtonProps, Chip, type ChipProps, type Color, type ColorName, type ColorTheme, ColorThemeSwitch, type ColorThemeSwitchProps, type Colors, type ComponentHoverStyle, type ComponentMarginProps, type ComponentPaddingProps, type DeepPartialRecord, Div, type DivProps, _default$3 as Divider, Dropdown, type DropdownOption, type DropdownProps, type ExcludeOptions, Foldable, type FoldableProps, type FoldableRef, Form, type FormProps, FormRow, type FormRowProps, type HorizontalDividerProps, _default$5 as Icon, type IconName, type IconProps, type IconsConfig, _default$4 as Image, type ImageProps, InputField, type InputFieldProps, _default$1 as Label, type LabelProps, Loader, type LoaderConfig, type LoaderName, type LoaderProps, type LocalStoragePluginOptions, Modal, type ModalProps, type ModalRef, type OmitProps, PageHeader, type PageHeaderProps, PageHolder, type PageHolderProps, type PartialRecord, type PickAllRequired, type PickValue, type PluginName, type ReactRouterDomPluginOptions, SideMenu, type SideMenuItem, type Styles, type TabGroup, Table, type TableColumn, type TableFilterData, type TableProps, type TableRef, Tabs, type TabsProps, type TabsRef, Text, type TextAs, type TextProps, type TextareaFieldProps, type Theme, type ThemeConfig, _default$2 as ToggleInput, type ToggleInputProps, type ToggleInputRef, Tooltip, type TooltipProps, type TooltipRef, type VerticalDividerProps, alertControls, alertsPlugin, colorThemeControls, countries, darkenColor, defaultAlertsPluginOptions, defaultLocalStoragePluginOptions, defaultReactRouterDomPluginOptions, desaturateColor, eventPreventDefault, eventPreventStop, eventStopPropagation, filterHover, formatPhoneNumber, generateLocalStorage, generateRandomString, getBrowser, getFormErrorObject, isMobileDevice, lightenColor, loaderControls, localStoragePlugin, reactRouterDomPlugin, saturateColor, sideMenuControls, useAlertControls, useBetterHtmlContext, useBooleanState, useDebounceState, useForm, useLoader, useLoaderControls, useMediaQuery, usePageResize, usePageScroll, useTheme, useUrlQuery };
|
|
1163
|
+
export { type Alert, type AlertType, type AlertsPluginOptions, type AppConfig, type AssetName, type AssetsConfig, type BetterHtmlConfig, type BetterHtmlPlugin, _default as BetterHtmlProvider, type BetterHtmlProviderConfig, type BrowserName, Button, type ButtonProps, Chip, type ChipProps, type Color, type ColorName, type ColorTheme, ColorThemeSwitch, type ColorThemeSwitchProps, type Colors, type ComponentHoverStyle, type ComponentMarginProps, type ComponentPaddingProps, type DeepPartialRecord, Div, type DivProps, _default$3 as Divider, Dropdown, type DropdownOption, type DropdownProps, type ExcludeOptions, Foldable, type FoldableProps, type FoldableRef, Form, type FormProps, FormRow, type FormRowProps, type HorizontalDividerProps, _default$5 as Icon, type IconName, type IconProps, type IconsConfig, _default$4 as Image, type ImageProps, InputField, type InputFieldProps, _default$1 as Label, type LabelProps, Loader, type LoaderConfig, type LoaderName, type LoaderProps, type LocalStoragePluginOptions, Modal, type ModalProps, type ModalRef, type OmitProps, PageHeader, type PageHeaderProps, PageHolder, type PageHolderProps, Pagination, type PartialRecord, type PickAllRequired, type PickValue, type PluginName, type ReactRouterDomPluginOptions, SideMenu, type SideMenuItem, type Styles, type TabGroup, Table, type TableColumn, type TableFilterData, type TableProps, type TableRef, Tabs, type TabsProps, type TabsRef, Text, type TextAs, type TextProps, type TextareaFieldProps, type Theme, type ThemeConfig, _default$2 as ToggleInput, type ToggleInputProps, type ToggleInputRef, Tooltip, type TooltipProps, type TooltipRef, type VerticalDividerProps, alertControls, alertsPlugin, colorThemeControls, countries, darkenColor, defaultAlertsPluginOptions, defaultLocalStoragePluginOptions, defaultReactRouterDomPluginOptions, desaturateColor, eventPreventDefault, eventPreventStop, eventStopPropagation, filterHover, formatPhoneNumber, generateLocalStorage, generateRandomString, getBrowser, getFormErrorObject, isMobileDevice, lightenColor, loaderControls, localStoragePlugin, reactRouterDomPlugin, saturateColor, sideMenuControls, useAlertControls, useBetterHtmlContext, useBooleanState, useDebounceState, useForm, useLoader, useLoaderControls, useMediaQuery, usePageResize, usePageScroll, useTheme, useUrlQuery };
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ 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 { useNavigate, useLocation, useInRouterContext, useSearchParams } from 'react-router-dom';
|
|
5
|
+
import { useNavigate, useLocation, useInRouterContext, useSearchParams, createSearchParams } from 'react-router-dom';
|
|
6
6
|
|
|
7
7
|
type PluginName = "alerts" | "react-router-dom" | "localStorage";
|
|
8
8
|
type BetterHtmlPluginConstructor<T extends object = object> = (config?: T) => BetterHtmlPlugin<T>;
|
|
@@ -58,12 +58,13 @@ type PageHeaderProps = {
|
|
|
58
58
|
imageUrl?: string;
|
|
59
59
|
imageSize?: number;
|
|
60
60
|
title?: string;
|
|
61
|
+
/** @default "h1" */
|
|
61
62
|
titleAs?: TextAs;
|
|
62
|
-
/** @default
|
|
63
|
+
/** @default textPrimary */
|
|
63
64
|
titleColor?: React.CSSProperties["color"];
|
|
64
65
|
titleRightElement?: React.ReactNode;
|
|
65
66
|
description?: string;
|
|
66
|
-
/** @default
|
|
67
|
+
/** @default textSecondary */
|
|
67
68
|
descriptionColor?: React.CSSProperties["color"];
|
|
68
69
|
textAlign?: React.CSSProperties["textAlign"];
|
|
69
70
|
rightElement?: React.ReactNode;
|
|
@@ -910,7 +911,15 @@ type FoldableProps = {
|
|
|
910
911
|
isOpen?: boolean;
|
|
911
912
|
defaultOpen?: boolean;
|
|
912
913
|
title?: string;
|
|
914
|
+
/** @default "h3" */
|
|
915
|
+
titleAs?: TextAs;
|
|
916
|
+
/** @default textPrimary */
|
|
917
|
+
titleColor?: React.CSSProperties["color"];
|
|
918
|
+
titleRightElement?: React.ReactNode;
|
|
913
919
|
description?: string;
|
|
920
|
+
/** @default textSecondary */
|
|
921
|
+
descriptionColor?: React.CSSProperties["color"];
|
|
922
|
+
rightElement?: React.ReactNode;
|
|
914
923
|
icon?: IconName | AnyOtherString;
|
|
915
924
|
image?: AssetName | AnyOtherString;
|
|
916
925
|
headerPaddingBlock?: React.CSSProperties["paddingBlock"];
|
|
@@ -973,6 +982,23 @@ declare const SideMenu: typeof SideMenuComponent & {
|
|
|
973
982
|
burgerButton: typeof SideMenuComponent.burgerButton;
|
|
974
983
|
};
|
|
975
984
|
|
|
985
|
+
type PaginationProps = {
|
|
986
|
+
currentPage?: number;
|
|
987
|
+
itemsLength?: number;
|
|
988
|
+
itemsPerPage?: number;
|
|
989
|
+
pageCount?: number;
|
|
990
|
+
/** @default 11 */
|
|
991
|
+
maximumVisiblePages?: number;
|
|
992
|
+
onClickPreviousPage?: (newPage: number) => void;
|
|
993
|
+
onClickNextPage?: (newPage: number) => void;
|
|
994
|
+
onChangePage?: (page: number) => void;
|
|
995
|
+
};
|
|
996
|
+
type PaginationComponentType = {
|
|
997
|
+
(props: PaginationProps): React.ReactElement;
|
|
998
|
+
};
|
|
999
|
+
declare const PaginationComponent: PaginationComponentType;
|
|
1000
|
+
declare const Pagination: typeof PaginationComponent & {};
|
|
1001
|
+
|
|
976
1002
|
type AppConfig = {
|
|
977
1003
|
contentMaxWidth: number;
|
|
978
1004
|
};
|
|
@@ -1115,6 +1141,7 @@ type ReactRouterDomPluginOptions = {
|
|
|
1115
1141
|
useLocation: typeof useLocation;
|
|
1116
1142
|
useInRouterContext: typeof useInRouterContext;
|
|
1117
1143
|
useSearchParams: typeof useSearchParams;
|
|
1144
|
+
createSearchParams: typeof createSearchParams;
|
|
1118
1145
|
};
|
|
1119
1146
|
declare const defaultReactRouterDomPluginOptions: Required<ReactRouterDomPluginOptions>;
|
|
1120
1147
|
declare const reactRouterDomPlugin: BetterHtmlPluginConstructor<ReactRouterDomPluginOptions>;
|
|
@@ -1133,4 +1160,4 @@ type LocalStoragePluginOptions = {
|
|
|
1133
1160
|
declare const defaultLocalStoragePluginOptions: Required<LocalStoragePluginOptions>;
|
|
1134
1161
|
declare const localStoragePlugin: BetterHtmlPluginConstructor<LocalStoragePluginOptions>;
|
|
1135
1162
|
|
|
1136
|
-
export { type Alert, type AlertType, type AlertsPluginOptions, type AppConfig, type AssetName, type AssetsConfig, type BetterHtmlConfig, type BetterHtmlPlugin, _default as BetterHtmlProvider, type BetterHtmlProviderConfig, type BrowserName, Button, type ButtonProps, Chip, type ChipProps, type Color, type ColorName, type ColorTheme, ColorThemeSwitch, type ColorThemeSwitchProps, type Colors, type ComponentHoverStyle, type ComponentMarginProps, type ComponentPaddingProps, type DeepPartialRecord, Div, type DivProps, _default$3 as Divider, Dropdown, type DropdownOption, type DropdownProps, type ExcludeOptions, Foldable, type FoldableProps, type FoldableRef, Form, type FormProps, FormRow, type FormRowProps, type HorizontalDividerProps, _default$5 as Icon, type IconName, type IconProps, type IconsConfig, _default$4 as Image, type ImageProps, InputField, type InputFieldProps, _default$1 as Label, type LabelProps, Loader, type LoaderConfig, type LoaderName, type LoaderProps, type LocalStoragePluginOptions, Modal, type ModalProps, type ModalRef, type OmitProps, PageHeader, type PageHeaderProps, PageHolder, type PageHolderProps, type PartialRecord, type PickAllRequired, type PickValue, type PluginName, type ReactRouterDomPluginOptions, SideMenu, type SideMenuItem, type Styles, type TabGroup, Table, type TableColumn, type TableFilterData, type TableProps, type TableRef, Tabs, type TabsProps, type TabsRef, Text, type TextAs, type TextProps, type TextareaFieldProps, type Theme, type ThemeConfig, _default$2 as ToggleInput, type ToggleInputProps, type ToggleInputRef, Tooltip, type TooltipProps, type TooltipRef, type VerticalDividerProps, alertControls, alertsPlugin, colorThemeControls, countries, darkenColor, defaultAlertsPluginOptions, defaultLocalStoragePluginOptions, defaultReactRouterDomPluginOptions, desaturateColor, eventPreventDefault, eventPreventStop, eventStopPropagation, filterHover, formatPhoneNumber, generateLocalStorage, generateRandomString, getBrowser, getFormErrorObject, isMobileDevice, lightenColor, loaderControls, localStoragePlugin, reactRouterDomPlugin, saturateColor, sideMenuControls, useAlertControls, useBetterHtmlContext, useBooleanState, useDebounceState, useForm, useLoader, useLoaderControls, useMediaQuery, usePageResize, usePageScroll, useTheme, useUrlQuery };
|
|
1163
|
+
export { type Alert, type AlertType, type AlertsPluginOptions, type AppConfig, type AssetName, type AssetsConfig, type BetterHtmlConfig, type BetterHtmlPlugin, _default as BetterHtmlProvider, type BetterHtmlProviderConfig, type BrowserName, Button, type ButtonProps, Chip, type ChipProps, type Color, type ColorName, type ColorTheme, ColorThemeSwitch, type ColorThemeSwitchProps, type Colors, type ComponentHoverStyle, type ComponentMarginProps, type ComponentPaddingProps, type DeepPartialRecord, Div, type DivProps, _default$3 as Divider, Dropdown, type DropdownOption, type DropdownProps, type ExcludeOptions, Foldable, type FoldableProps, type FoldableRef, Form, type FormProps, FormRow, type FormRowProps, type HorizontalDividerProps, _default$5 as Icon, type IconName, type IconProps, type IconsConfig, _default$4 as Image, type ImageProps, InputField, type InputFieldProps, _default$1 as Label, type LabelProps, Loader, type LoaderConfig, type LoaderName, type LoaderProps, type LocalStoragePluginOptions, Modal, type ModalProps, type ModalRef, type OmitProps, PageHeader, type PageHeaderProps, PageHolder, type PageHolderProps, Pagination, type PartialRecord, type PickAllRequired, type PickValue, type PluginName, type ReactRouterDomPluginOptions, SideMenu, type SideMenuItem, type Styles, type TabGroup, Table, type TableColumn, type TableFilterData, type TableProps, type TableRef, Tabs, type TabsProps, type TabsRef, Text, type TextAs, type TextProps, type TextareaFieldProps, type Theme, type ThemeConfig, _default$2 as ToggleInput, type ToggleInputProps, type ToggleInputRef, Tooltip, type TooltipProps, type TooltipRef, type VerticalDividerProps, alertControls, alertsPlugin, colorThemeControls, countries, darkenColor, defaultAlertsPluginOptions, defaultLocalStoragePluginOptions, defaultReactRouterDomPluginOptions, desaturateColor, eventPreventDefault, eventPreventStop, eventStopPropagation, filterHover, formatPhoneNumber, generateLocalStorage, generateRandomString, getBrowser, getFormErrorObject, isMobileDevice, lightenColor, loaderControls, localStoragePlugin, reactRouterDomPlugin, saturateColor, sideMenuControls, useAlertControls, useBetterHtmlContext, useBooleanState, useDebounceState, useForm, useLoader, useLoaderControls, useMediaQuery, usePageResize, usePageScroll, useTheme, useUrlQuery };
|