react-native-better-html 1.0.24 → 1.0.26

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 CHANGED
@@ -50,7 +50,7 @@ type BetterComponentsProviderProps = BetterProviderCommonProps & {
50
50
  config?: BetterComponentsProviderConfig;
51
51
  };
52
52
  declare function BetterComponentsProvider({ config, ...props }: BetterComponentsProviderProps): react_jsx_runtime.JSX.Element;
53
- declare const _default$4: react.MemoExoticComponent<typeof BetterComponentsProvider>;
53
+ declare const _default$6: react.MemoExoticComponent<typeof BetterComponentsProvider>;
54
54
 
55
55
  type ComponentStyle<Style extends ViewStyle = ViewStyle> = OmitProps<Style, "shadowOffset" | ComponentExcludeMarginProps | ComponentExcludePaddingProps> & {
56
56
  shadowOffsetWidth?: number;
@@ -107,7 +107,7 @@ type IconProps = {
107
107
  color?: ColorValue;
108
108
  } & OmitProps<ViewProps, "width" | "height" | "pressType">;
109
109
  declare function Icon({ name, nameIOS, size, color, ...props }: IconProps): react_jsx_runtime.JSX.Element;
110
- declare const _default$3: react.MemoExoticComponent<typeof Icon>;
110
+ declare const _default$5: react.MemoExoticComponent<typeof Icon>;
111
111
 
112
112
  type InputFieldProps = {
113
113
  flex?: ViewStyle["flex"];
@@ -195,7 +195,22 @@ type SwitchProps = {
195
195
  onChange?: (isEnabled: boolean) => void;
196
196
  };
197
197
  declare function Switch({ isEnabled, defaultIsEnabled, disabled, onChange }: SwitchProps): react_jsx_runtime.JSX.Element;
198
- declare const _default$2: react.MemoExoticComponent<typeof Switch>;
198
+ declare const _default$4: react.MemoExoticComponent<typeof Switch>;
199
+
200
+ type CheckBoxProps = {
201
+ isChecked?: boolean;
202
+ defaultIsChecked?: boolean;
203
+ /** @default 36 */
204
+ size?: number;
205
+ text?: string | React.ReactNode;
206
+ /** @default false */
207
+ required?: boolean;
208
+ /** @default false */
209
+ disabled?: boolean;
210
+ onChange?: (isChecked: boolean) => void;
211
+ };
212
+ declare function CheckBox({ isChecked, defaultIsChecked, size, text, required, disabled, onChange, }: CheckBoxProps): react_jsx_runtime.JSX.Element;
213
+ declare const _default$3: react.MemoExoticComponent<typeof CheckBox>;
199
214
 
200
215
  declare function useDevice(): {
201
216
  safeArea: {
@@ -241,6 +256,7 @@ declare function useForm<FormFields extends Record<string | number, FormFieldVal
241
256
  setFieldsValue: (values: Partial<FormFields>) => void;
242
257
  getInputFieldProps: <FieldName extends keyof FormFields>(field: FieldName) => ComponentPropWithRef<InputFieldRef, InputFieldProps>;
243
258
  getSwitchProps: <FieldName extends keyof FormFields>(field: FieldName, insideListItem?: boolean) => SwitchProps;
259
+ getCheckBoxProps: <FieldName extends keyof FormFields>(field: FieldName, insideListItem?: boolean) => CheckBoxProps;
244
260
  focusField: (field: keyof FormFields) => void;
245
261
  inputFieldRefs: Record<keyof FormFields, TextInput | undefined>;
246
262
  validate: () => {};
@@ -283,6 +299,14 @@ declare const Text: typeof TextComponent & {
283
299
  unknown: typeof TextComponent.unknown;
284
300
  };
285
301
 
302
+ type LabelProps = {
303
+ text?: string;
304
+ required?: boolean;
305
+ isError?: boolean;
306
+ };
307
+ declare function Label({ text, required, isError }: LabelProps): react_jsx_runtime.JSX.Element;
308
+ declare const _default$2: react.MemoExoticComponent<typeof Label>;
309
+
286
310
  type ButtonProps<Value> = {
287
311
  text?: string;
288
312
  /** @default 16 */
@@ -501,7 +525,7 @@ type ListItemProps = {
501
525
  title?: string;
502
526
  description?: string;
503
527
  descriptionSelectable?: boolean;
504
- rightElement?: "arrow" | "switch";
528
+ rightElement?: "arrow" | "switch" | "checkBox";
505
529
  /** @default theme.colors.backgroundBase */
506
530
  backgroundColor?: ViewProps["backgroundColor"];
507
531
  /** @default false */
@@ -511,8 +535,10 @@ type ListItemProps = {
511
535
  rightValueSelectable?: boolean;
512
536
  switchIsEnabled?: boolean;
513
537
  switchOnChange?: (isEnabled: boolean) => void;
538
+ checkBoxIsChecked?: boolean;
539
+ checkBoxOnChange?: (isChecked: boolean) => void;
514
540
  };
515
- declare function ListItem({ icon, iconIOS, title, description, descriptionSelectable, rightElement, backgroundColor, insideScreenHolder, onPress, rightValue, rightValueSelectable, switchIsEnabled, switchOnChange, }: ListItemProps): react_jsx_runtime.JSX.Element;
541
+ declare function ListItem({ icon, iconIOS, title, description, descriptionSelectable, rightElement, backgroundColor, insideScreenHolder, onPress, rightValue, rightValueSelectable, switchIsEnabled, switchOnChange, checkBoxIsChecked, checkBoxOnChange, }: ListItemProps): react_jsx_runtime.JSX.Element;
516
542
  declare const _default: react.MemoExoticComponent<typeof ListItem>;
517
543
 
518
544
  type AlertsPluginOptions = {
@@ -531,4 +557,4 @@ type AsyncStoragePluginOptions = {};
531
557
  declare const defaultAsyncStoragePluginOptions: Required<AsyncStoragePluginOptions>;
532
558
  declare const asyncStoragePlugin: BetterComponentsPluginConstructor<AsyncStoragePluginOptions>;
533
559
 
534
- export { type AlertsPluginOptions, Animate, type AnimateTextProps, type AnimateViewProps, type AppConfig, type AsyncStoragePluginOptions, type BetterComponentsConfig, type BetterComponentsPlugin, _default$4 as BetterComponentsProvider, type BetterComponentsProviderConfig, Button, type ButtonProps, type ComponentMarginProps, type ComponentPaddingProps, type FooterProps, _default$3 as Icon, type IconNameIOS, type IconProps, Image, type ImageProps, InputField, type InputFieldProps, type InputFieldRef, _default as ListItem, type ListItemProps, Loader, type LoaderProps, type LoaderSize, type PluginName, ScreenHolder, type ScreenHolderProps, _default$1 as StatusBar, type StatusBarProps, _default$2 as Switch, type SwitchProps, Text, type TextProps, View, type ViewProps, alertControls, alertsPlugin, asyncStoragePlugin, defaultAlertsPluginOptions, defaultAsyncStoragePluginOptions, generateAsyncStorage, getFormErrorObject, pressStrength, useAlertControls, useBetterComponentsContext, useDevice, useEventEmitter, useForm, useKeyboard };
560
+ export { type AlertsPluginOptions, Animate, type AnimateTextProps, type AnimateViewProps, type AppConfig, type AsyncStoragePluginOptions, type BetterComponentsConfig, type BetterComponentsPlugin, _default$6 as BetterComponentsProvider, type BetterComponentsProviderConfig, Button, type ButtonProps, _default$3 as CheckBox, type CheckBoxProps, type ComponentMarginProps, type ComponentPaddingProps, type FooterProps, _default$5 as Icon, type IconNameIOS, type IconProps, Image, type ImageProps, InputField, type InputFieldProps, type InputFieldRef, _default$2 as Label, type LabelProps, _default as ListItem, type ListItemProps, Loader, type LoaderProps, type LoaderSize, type PluginName, ScreenHolder, type ScreenHolderProps, _default$1 as StatusBar, type StatusBarProps, _default$4 as Switch, type SwitchProps, Text, type TextProps, View, type ViewProps, alertControls, alertsPlugin, asyncStoragePlugin, defaultAlertsPluginOptions, defaultAsyncStoragePluginOptions, generateAsyncStorage, getFormErrorObject, pressStrength, useAlertControls, useBetterComponentsContext, useDevice, useEventEmitter, useForm, useKeyboard };
package/dist/index.d.ts CHANGED
@@ -50,7 +50,7 @@ type BetterComponentsProviderProps = BetterProviderCommonProps & {
50
50
  config?: BetterComponentsProviderConfig;
51
51
  };
52
52
  declare function BetterComponentsProvider({ config, ...props }: BetterComponentsProviderProps): react_jsx_runtime.JSX.Element;
53
- declare const _default$4: react.MemoExoticComponent<typeof BetterComponentsProvider>;
53
+ declare const _default$6: react.MemoExoticComponent<typeof BetterComponentsProvider>;
54
54
 
55
55
  type ComponentStyle<Style extends ViewStyle = ViewStyle> = OmitProps<Style, "shadowOffset" | ComponentExcludeMarginProps | ComponentExcludePaddingProps> & {
56
56
  shadowOffsetWidth?: number;
@@ -107,7 +107,7 @@ type IconProps = {
107
107
  color?: ColorValue;
108
108
  } & OmitProps<ViewProps, "width" | "height" | "pressType">;
109
109
  declare function Icon({ name, nameIOS, size, color, ...props }: IconProps): react_jsx_runtime.JSX.Element;
110
- declare const _default$3: react.MemoExoticComponent<typeof Icon>;
110
+ declare const _default$5: react.MemoExoticComponent<typeof Icon>;
111
111
 
112
112
  type InputFieldProps = {
113
113
  flex?: ViewStyle["flex"];
@@ -195,7 +195,22 @@ type SwitchProps = {
195
195
  onChange?: (isEnabled: boolean) => void;
196
196
  };
197
197
  declare function Switch({ isEnabled, defaultIsEnabled, disabled, onChange }: SwitchProps): react_jsx_runtime.JSX.Element;
198
- declare const _default$2: react.MemoExoticComponent<typeof Switch>;
198
+ declare const _default$4: react.MemoExoticComponent<typeof Switch>;
199
+
200
+ type CheckBoxProps = {
201
+ isChecked?: boolean;
202
+ defaultIsChecked?: boolean;
203
+ /** @default 36 */
204
+ size?: number;
205
+ text?: string | React.ReactNode;
206
+ /** @default false */
207
+ required?: boolean;
208
+ /** @default false */
209
+ disabled?: boolean;
210
+ onChange?: (isChecked: boolean) => void;
211
+ };
212
+ declare function CheckBox({ isChecked, defaultIsChecked, size, text, required, disabled, onChange, }: CheckBoxProps): react_jsx_runtime.JSX.Element;
213
+ declare const _default$3: react.MemoExoticComponent<typeof CheckBox>;
199
214
 
200
215
  declare function useDevice(): {
201
216
  safeArea: {
@@ -241,6 +256,7 @@ declare function useForm<FormFields extends Record<string | number, FormFieldVal
241
256
  setFieldsValue: (values: Partial<FormFields>) => void;
242
257
  getInputFieldProps: <FieldName extends keyof FormFields>(field: FieldName) => ComponentPropWithRef<InputFieldRef, InputFieldProps>;
243
258
  getSwitchProps: <FieldName extends keyof FormFields>(field: FieldName, insideListItem?: boolean) => SwitchProps;
259
+ getCheckBoxProps: <FieldName extends keyof FormFields>(field: FieldName, insideListItem?: boolean) => CheckBoxProps;
244
260
  focusField: (field: keyof FormFields) => void;
245
261
  inputFieldRefs: Record<keyof FormFields, TextInput | undefined>;
246
262
  validate: () => {};
@@ -283,6 +299,14 @@ declare const Text: typeof TextComponent & {
283
299
  unknown: typeof TextComponent.unknown;
284
300
  };
285
301
 
302
+ type LabelProps = {
303
+ text?: string;
304
+ required?: boolean;
305
+ isError?: boolean;
306
+ };
307
+ declare function Label({ text, required, isError }: LabelProps): react_jsx_runtime.JSX.Element;
308
+ declare const _default$2: react.MemoExoticComponent<typeof Label>;
309
+
286
310
  type ButtonProps<Value> = {
287
311
  text?: string;
288
312
  /** @default 16 */
@@ -501,7 +525,7 @@ type ListItemProps = {
501
525
  title?: string;
502
526
  description?: string;
503
527
  descriptionSelectable?: boolean;
504
- rightElement?: "arrow" | "switch";
528
+ rightElement?: "arrow" | "switch" | "checkBox";
505
529
  /** @default theme.colors.backgroundBase */
506
530
  backgroundColor?: ViewProps["backgroundColor"];
507
531
  /** @default false */
@@ -511,8 +535,10 @@ type ListItemProps = {
511
535
  rightValueSelectable?: boolean;
512
536
  switchIsEnabled?: boolean;
513
537
  switchOnChange?: (isEnabled: boolean) => void;
538
+ checkBoxIsChecked?: boolean;
539
+ checkBoxOnChange?: (isChecked: boolean) => void;
514
540
  };
515
- declare function ListItem({ icon, iconIOS, title, description, descriptionSelectable, rightElement, backgroundColor, insideScreenHolder, onPress, rightValue, rightValueSelectable, switchIsEnabled, switchOnChange, }: ListItemProps): react_jsx_runtime.JSX.Element;
541
+ declare function ListItem({ icon, iconIOS, title, description, descriptionSelectable, rightElement, backgroundColor, insideScreenHolder, onPress, rightValue, rightValueSelectable, switchIsEnabled, switchOnChange, checkBoxIsChecked, checkBoxOnChange, }: ListItemProps): react_jsx_runtime.JSX.Element;
516
542
  declare const _default: react.MemoExoticComponent<typeof ListItem>;
517
543
 
518
544
  type AlertsPluginOptions = {
@@ -531,4 +557,4 @@ type AsyncStoragePluginOptions = {};
531
557
  declare const defaultAsyncStoragePluginOptions: Required<AsyncStoragePluginOptions>;
532
558
  declare const asyncStoragePlugin: BetterComponentsPluginConstructor<AsyncStoragePluginOptions>;
533
559
 
534
- export { type AlertsPluginOptions, Animate, type AnimateTextProps, type AnimateViewProps, type AppConfig, type AsyncStoragePluginOptions, type BetterComponentsConfig, type BetterComponentsPlugin, _default$4 as BetterComponentsProvider, type BetterComponentsProviderConfig, Button, type ButtonProps, type ComponentMarginProps, type ComponentPaddingProps, type FooterProps, _default$3 as Icon, type IconNameIOS, type IconProps, Image, type ImageProps, InputField, type InputFieldProps, type InputFieldRef, _default as ListItem, type ListItemProps, Loader, type LoaderProps, type LoaderSize, type PluginName, ScreenHolder, type ScreenHolderProps, _default$1 as StatusBar, type StatusBarProps, _default$2 as Switch, type SwitchProps, Text, type TextProps, View, type ViewProps, alertControls, alertsPlugin, asyncStoragePlugin, defaultAlertsPluginOptions, defaultAsyncStoragePluginOptions, generateAsyncStorage, getFormErrorObject, pressStrength, useAlertControls, useBetterComponentsContext, useDevice, useEventEmitter, useForm, useKeyboard };
560
+ export { type AlertsPluginOptions, Animate, type AnimateTextProps, type AnimateViewProps, type AppConfig, type AsyncStoragePluginOptions, type BetterComponentsConfig, type BetterComponentsPlugin, _default$6 as BetterComponentsProvider, type BetterComponentsProviderConfig, Button, type ButtonProps, _default$3 as CheckBox, type CheckBoxProps, type ComponentMarginProps, type ComponentPaddingProps, type FooterProps, _default$5 as Icon, type IconNameIOS, type IconProps, Image, type ImageProps, InputField, type InputFieldProps, type InputFieldRef, _default$2 as Label, type LabelProps, _default as ListItem, type ListItemProps, Loader, type LoaderProps, type LoaderSize, type PluginName, ScreenHolder, type ScreenHolderProps, _default$1 as StatusBar, type StatusBarProps, _default$4 as Switch, type SwitchProps, Text, type TextProps, View, type ViewProps, alertControls, alertsPlugin, asyncStoragePlugin, defaultAlertsPluginOptions, defaultAsyncStoragePluginOptions, generateAsyncStorage, getFormErrorObject, pressStrength, useAlertControls, useBetterComponentsContext, useDevice, useEventEmitter, useForm, useKeyboard };