react-better-html 1.1.214 → 1.1.216
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 +16 -4
- package/dist/index.d.ts +16 -4
- package/dist/index.js +238 -231
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +39 -32
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -392,6 +392,8 @@ type ChipComponentType = {
|
|
|
392
392
|
<Value>(props: ComponentPropWithRef<HTMLDivElement, ChipProps<Value>>): React.ReactElement;
|
|
393
393
|
colored: <Value>(props: ComponentPropWithRef<HTMLDivElement, OmitProps<ChipProps<Value>, "color" | "backgroundColor"> & {
|
|
394
394
|
color?: string;
|
|
395
|
+
/** @default false */
|
|
396
|
+
withWhiteBackground?: boolean;
|
|
395
397
|
}>) => React.ReactElement;
|
|
396
398
|
};
|
|
397
399
|
declare const ChipComponent: ChipComponentType;
|
|
@@ -474,7 +476,15 @@ type DropdownOption<Value, Data = unknown> = {
|
|
|
474
476
|
disabled?: boolean;
|
|
475
477
|
searchValues?: string[];
|
|
476
478
|
data?: Data;
|
|
477
|
-
}
|
|
479
|
+
} & ({
|
|
480
|
+
renderType?: "default";
|
|
481
|
+
} | {
|
|
482
|
+
renderType?: "chip";
|
|
483
|
+
chipProps?: OmitProps<React.ComponentProps<typeof Chip>, "text" | "value" | "onClick" | "onClickWithValue" | "ref">;
|
|
484
|
+
} | {
|
|
485
|
+
renderType?: "chip.colored";
|
|
486
|
+
chipProps?: OmitProps<React.ComponentProps<typeof Chip.colored>, "text" | "value" | "onClick" | "onClickWithValue" | "ref">;
|
|
487
|
+
});
|
|
478
488
|
type DropdownProps<Value, Data = unknown> = {
|
|
479
489
|
label?: string;
|
|
480
490
|
labelColor?: string;
|
|
@@ -721,6 +731,7 @@ type ListFilterValue = {
|
|
|
721
731
|
label?: string;
|
|
722
732
|
count: number;
|
|
723
733
|
};
|
|
734
|
+
type TableListFilterListItem = OmitProps<ListFilterValue, "count">;
|
|
724
735
|
type TableFilterData = {
|
|
725
736
|
type: "number";
|
|
726
737
|
min?: number;
|
|
@@ -731,7 +742,7 @@ type TableFilterData = {
|
|
|
731
742
|
max?: string;
|
|
732
743
|
} | {
|
|
733
744
|
type: "list";
|
|
734
|
-
list
|
|
745
|
+
list: ListFilterValue["value"][];
|
|
735
746
|
};
|
|
736
747
|
type TextColumn<DataItem> = {
|
|
737
748
|
type: "text";
|
|
@@ -771,7 +782,8 @@ type ListFilter<DataItem> = {
|
|
|
771
782
|
filter?: "list";
|
|
772
783
|
withTotalNumber?: boolean;
|
|
773
784
|
withSearch?: boolean;
|
|
774
|
-
|
|
785
|
+
list: (TableListFilterListItem | undefined)[];
|
|
786
|
+
getItemValue?: (item: DataItem) => ListFilterValue["value"];
|
|
775
787
|
};
|
|
776
788
|
type TableColumn<DataItem> = {
|
|
777
789
|
hidden?: boolean;
|
|
@@ -1181,4 +1193,4 @@ type LocalStoragePluginOptions = {
|
|
|
1181
1193
|
declare const defaultLocalStoragePluginOptions: Required<LocalStoragePluginOptions>;
|
|
1182
1194
|
declare const localStoragePlugin: BetterHtmlPluginConstructor<LocalStoragePluginOptions>;
|
|
1183
1195
|
|
|
1184
|
-
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, getPluralWord, isMobileDevice, lightenColor, loaderControls, localStoragePlugin, reactRouterDomPlugin, saturateColor, sideMenuControls, useAlertControls, useBetterHtmlContext, useBooleanState, useDebounceState, useForm, useLoader, useLoaderControls, useMediaQuery, usePageResize, usePageScroll, useTheme, useUrlQuery };
|
|
1196
|
+
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 TableListFilterListItem, 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, getPluralWord, 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
|
@@ -392,6 +392,8 @@ type ChipComponentType = {
|
|
|
392
392
|
<Value>(props: ComponentPropWithRef<HTMLDivElement, ChipProps<Value>>): React.ReactElement;
|
|
393
393
|
colored: <Value>(props: ComponentPropWithRef<HTMLDivElement, OmitProps<ChipProps<Value>, "color" | "backgroundColor"> & {
|
|
394
394
|
color?: string;
|
|
395
|
+
/** @default false */
|
|
396
|
+
withWhiteBackground?: boolean;
|
|
395
397
|
}>) => React.ReactElement;
|
|
396
398
|
};
|
|
397
399
|
declare const ChipComponent: ChipComponentType;
|
|
@@ -474,7 +476,15 @@ type DropdownOption<Value, Data = unknown> = {
|
|
|
474
476
|
disabled?: boolean;
|
|
475
477
|
searchValues?: string[];
|
|
476
478
|
data?: Data;
|
|
477
|
-
}
|
|
479
|
+
} & ({
|
|
480
|
+
renderType?: "default";
|
|
481
|
+
} | {
|
|
482
|
+
renderType?: "chip";
|
|
483
|
+
chipProps?: OmitProps<React.ComponentProps<typeof Chip>, "text" | "value" | "onClick" | "onClickWithValue" | "ref">;
|
|
484
|
+
} | {
|
|
485
|
+
renderType?: "chip.colored";
|
|
486
|
+
chipProps?: OmitProps<React.ComponentProps<typeof Chip.colored>, "text" | "value" | "onClick" | "onClickWithValue" | "ref">;
|
|
487
|
+
});
|
|
478
488
|
type DropdownProps<Value, Data = unknown> = {
|
|
479
489
|
label?: string;
|
|
480
490
|
labelColor?: string;
|
|
@@ -721,6 +731,7 @@ type ListFilterValue = {
|
|
|
721
731
|
label?: string;
|
|
722
732
|
count: number;
|
|
723
733
|
};
|
|
734
|
+
type TableListFilterListItem = OmitProps<ListFilterValue, "count">;
|
|
724
735
|
type TableFilterData = {
|
|
725
736
|
type: "number";
|
|
726
737
|
min?: number;
|
|
@@ -731,7 +742,7 @@ type TableFilterData = {
|
|
|
731
742
|
max?: string;
|
|
732
743
|
} | {
|
|
733
744
|
type: "list";
|
|
734
|
-
list
|
|
745
|
+
list: ListFilterValue["value"][];
|
|
735
746
|
};
|
|
736
747
|
type TextColumn<DataItem> = {
|
|
737
748
|
type: "text";
|
|
@@ -771,7 +782,8 @@ type ListFilter<DataItem> = {
|
|
|
771
782
|
filter?: "list";
|
|
772
783
|
withTotalNumber?: boolean;
|
|
773
784
|
withSearch?: boolean;
|
|
774
|
-
|
|
785
|
+
list: (TableListFilterListItem | undefined)[];
|
|
786
|
+
getItemValue?: (item: DataItem) => ListFilterValue["value"];
|
|
775
787
|
};
|
|
776
788
|
type TableColumn<DataItem> = {
|
|
777
789
|
hidden?: boolean;
|
|
@@ -1181,4 +1193,4 @@ type LocalStoragePluginOptions = {
|
|
|
1181
1193
|
declare const defaultLocalStoragePluginOptions: Required<LocalStoragePluginOptions>;
|
|
1182
1194
|
declare const localStoragePlugin: BetterHtmlPluginConstructor<LocalStoragePluginOptions>;
|
|
1183
1195
|
|
|
1184
|
-
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, getPluralWord, isMobileDevice, lightenColor, loaderControls, localStoragePlugin, reactRouterDomPlugin, saturateColor, sideMenuControls, useAlertControls, useBetterHtmlContext, useBooleanState, useDebounceState, useForm, useLoader, useLoaderControls, useMediaQuery, usePageResize, usePageScroll, useTheme, useUrlQuery };
|
|
1196
|
+
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 TableListFilterListItem, 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, getPluralWord, isMobileDevice, lightenColor, loaderControls, localStoragePlugin, reactRouterDomPlugin, saturateColor, sideMenuControls, useAlertControls, useBetterHtmlContext, useBooleanState, useDebounceState, useForm, useLoader, useLoaderControls, useMediaQuery, usePageResize, usePageScroll, useTheme, useUrlQuery };
|