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 CHANGED
@@ -6,7 +6,7 @@ A component library for react that is as close to plane html as possible
6
6
  ![GitHub Repo stars](https://img.shields.io/github/stars/krissvv/react-better-html?style=flat)
7
7
  ![GitHub package.json version](https://img.shields.io/github/package-json/v/krissvv/react-better-html)
8
8
  ![NPM Type Definitions](https://img.shields.io/npm/types/react-better-html)<br/>
9
- ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/krissvv/react-better-html/document-deploy.yml)
9
+ ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/krissvv/react-better-html/npm-publish.yml)
10
10
  ![GitHub last commit](https://img.shields.io/github/last-commit/krissvv/react-better-html)
11
11
  ![NPM Downloads](https://img.shields.io/npm/dm/react-better-html)<br/>
12
12
  ![NPM License](https://img.shields.io/npm/l/react-better-html)<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 BetterHtmlProviderConfig = DeepPartialRecord<BetterHtmlConfig>;
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?: BetterCoreProviderConfig & BetterHtmlProviderConfig;
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 BetterHtmlProviderConfig = DeepPartialRecord<BetterHtmlConfig>;
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?: BetterCoreProviderConfig & BetterHtmlProviderConfig;
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 };