@orioro/react-ui-core 0.0.2 → 0.0.5

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.
Files changed (104) hide show
  1. package/dist/AppHeader/AppHeaderContext.d.ts +11 -2
  2. package/dist/AppHeader/Root.d.ts +1 -1
  3. package/dist/AppHeader/index.d.ts +2 -2
  4. package/dist/Box/Box.d.ts +2 -0
  5. package/dist/Button/Button.d.ts +2 -2
  6. package/dist/Button/ButtonCore.d.ts +2 -0
  7. package/dist/Button/LinkButton.d.ts +2 -2
  8. package/dist/Debug/index.d.ts +1 -0
  9. package/dist/Dialog/AuthDialog/AuthDialog.d.ts +2 -1
  10. package/dist/Dialog/AuthDialog/SignUpForm.d.ts +2 -2
  11. package/dist/Dialog/AuthDialog/dialogSystemSpec.d.ts +2 -0
  12. package/dist/Dialog/AuthDialog/index.d.ts +1 -0
  13. package/dist/Dialog/ConfirmDialog/ConfirmDialog.d.ts +1 -1
  14. package/dist/Dialog/ConfirmDialog/dialogSystemSpec.d.ts +2 -0
  15. package/dist/Dialog/ConfirmDialog/index.d.ts +1 -0
  16. package/dist/Dialog/ConfirmDialog/types.d.ts +1 -0
  17. package/dist/Dialog/DialogSystem_legacy/DialogSystem_.d.ts +2 -0
  18. package/dist/Dialog/DialogSystem_legacy/index.stories_.d.ts +7 -0
  19. package/dist/Dialog/DialogSystem_legacy/prompt.stories_.d.ts +6 -0
  20. package/dist/Dialog/DialogSystem_legacy/tmpDialogSystem.d.ts +3 -0
  21. package/dist/Dialog/DialogSystem_legacy/types.d.ts +25 -0
  22. package/dist/Dialog/InfoDialog/dialogSystemSpec.d.ts +2 -0
  23. package/dist/Dialog/InfoDialog/index.d.ts +1 -0
  24. package/dist/Dialog/LoadingDialog/dialogSystemSpec.d.ts +2 -0
  25. package/dist/Dialog/LoadingDialog/index.d.ts +1 -0
  26. package/dist/Dialog/OptionsDialog/dialogSystemSpec.d.ts +2 -0
  27. package/dist/Dialog/OptionsDialog/index.d.ts +1 -0
  28. package/dist/Dialog/PromptDialog/dialogSystemSpec.d.ts +2 -0
  29. package/dist/Dialog/PromptDialog/index.d.ts +1 -0
  30. package/dist/Dialog/createDialogSystem/createDialogSystem.d.ts +3 -10
  31. package/dist/Dialog/createDialogSystem/dialogSystemReducer.d.ts +2 -0
  32. package/dist/Dialog/createDialogSystem/dialogSystemSpecs.d.ts +2 -0
  33. package/dist/Dialog/createDialogSystem/index.d.ts +2 -1
  34. package/dist/Dialog/createDialogSystem/tmp_util.d.ts +16 -0
  35. package/dist/Dialog/createDialogSystem/types.d.ts +48 -0
  36. package/dist/Dialog/createDialogSystem/useDialog.d.ts +6 -2
  37. package/dist/Dialog/createDialogSystem/util.d.ts +16 -0
  38. package/dist/Dialog/createDialogSystem2/createDialogSystem.d.ts +6 -0
  39. package/dist/Dialog/createDialogSystem2/dialogSystemReducer.d.ts +2 -0
  40. package/dist/Dialog/createDialogSystem2/index.d.ts +2 -0
  41. package/dist/Dialog/createDialogSystem2/proxyRef.d.ts +2 -0
  42. package/dist/Dialog/createDialogSystem2/types.d.ts +48 -0
  43. package/dist/Dialog/createDialogSystem2/util.d.ts +16 -0
  44. package/dist/Dialog/createDialogSystem_legacy/createDialogSystem.d.ts +13 -0
  45. package/dist/Dialog/createDialogSystem_legacy/index.d.ts +1 -0
  46. package/dist/Dialog/createDialogSystem_legacy/proxyRef.d.ts +2 -0
  47. package/dist/Dialog/createDialogSystem_legacy/useDialog.d.ts +22 -0
  48. package/dist/Dialog/specUtil/index.d.ts +5 -0
  49. package/dist/EvenSpacedList/EvenSpacedList.d.ts +6 -2
  50. package/dist/FileDropzone/index.d.ts +1 -0
  51. package/dist/Flex/Flex.d.ts +27 -16
  52. package/dist/FlexGrid/FlexGrid.d.ts +23 -1
  53. package/dist/Input/BooleanCheckboxInput/index.d.ts +28 -6
  54. package/dist/Input/InputGrid/index.d.ts +5 -1
  55. package/dist/Input/ObjectInput/index.d.ts +44 -8
  56. package/dist/Input/RangeInput/RangeInput.d.ts +11 -0
  57. package/dist/Input/RangeInput/index.d.ts +1 -0
  58. package/dist/Input/RichTextInput/RichTextInput.d.ts +13 -13
  59. package/dist/Input/RichTextInput/RichTextInput_20240730_backup_NO_MARKDOWN.d.ts +13 -13
  60. package/dist/Input/SingleFileInput/index.d.ts +65 -6
  61. package/dist/Input/SingleFileInput/middleware.d.ts +4 -0
  62. package/dist/Input/SliderInput/SliderInput.d.ts +16 -0
  63. package/dist/Input/SliderInput/index.d.ts +1 -0
  64. package/dist/Input/SwitchInput/index.d.ts +6 -0
  65. package/dist/Input/TextInput/index.d.ts +14 -13
  66. package/dist/Input/TextInput/parseValidator.d.ts +1 -1
  67. package/dist/Input/TextInput/types.d.ts +1 -0
  68. package/dist/Input/TextInput/useTextInput.d.ts +3 -2
  69. package/dist/Input/TextareaInput/index.d.ts +13 -13
  70. package/dist/Input/TreeSelectInput/TreeSelectInput.d.ts +42 -0
  71. package/dist/Input/TreeSelectInput/index.d.ts +1 -0
  72. package/dist/Input/index.d.ts +5 -0
  73. package/dist/Input/types.d.ts +1 -1
  74. package/dist/Input/useValidation/useValidation.d.ts +1 -1
  75. package/dist/Interaction/constants.d.ts +1 -0
  76. package/dist/Interaction/index.d.ts +1 -0
  77. package/dist/LanguageSelector/index.d.ts +3 -2
  78. package/dist/Markdown/index.d.ts +7 -0
  79. package/dist/Menu/ButtonBarMenu/ButtonBarMenu.d.ts +13 -0
  80. package/dist/Menu/ButtonBarMenu/OverflowableButtonBarMenu.d.ts +8 -0
  81. package/dist/Menu/ButtonBarMenu/index.d.ts +2 -13
  82. package/dist/RichTextRenderer/types/blocknote.d.ts +1 -1
  83. package/dist/ShadowExpandable/index.d.ts +2 -1
  84. package/dist/UIContext/UIContext.d.ts +16 -0
  85. package/dist/UIContext/index.d.ts +1 -0
  86. package/dist/cascadingContextProvider/index.d.ts +8 -0
  87. package/dist/componentMaker/componentMaker.d.ts +4 -0
  88. package/dist/entriesByIdReducer/entriesByIdReducer.d.ts +26 -0
  89. package/dist/entriesByIdReducer/index.d.ts +1 -0
  90. package/dist/index.d.ts +5 -1
  91. package/dist/index.mjs +4587 -5283
  92. package/dist/makeLink/locationAwareLink.d.ts +1 -1
  93. package/dist/mergeable/index.d.ts +1 -0
  94. package/dist/mergeable/mergeRender.d.ts +3 -0
  95. package/dist/mergeable/types.d.ts +2 -2
  96. package/dist/mergeable/util.d.ts +1 -0
  97. package/dist/useByIdState/index.d.ts +8 -0
  98. package/dist/usePromptUI/renderPromptInput.d.ts +1 -1
  99. package/dist/usePromptUI/types.d.ts +1 -2
  100. package/dist/useRefByKey/index.d.ts +1 -0
  101. package/dist/util/htmlTagComponent.d.ts +2 -0
  102. package/dist/util/index.d.ts +1 -0
  103. package/dist/util/mergeChildren.d.ts +2 -0
  104. package/package.json +9 -6
@@ -4,19 +4,28 @@ import { FlexBaseStyles } from './flexBaseStyles';
4
4
  import { BoxProps } from '../Box';
5
5
  export declare const FLEX_PROPS: string[];
6
6
  export type FlexProps = BoxProps & FlexGapStylesProps & FlexBaseStyles;
7
+ export declare const pickFlexProps: <InputProps extends {
8
+ [key: string]: any;
9
+ } = {
10
+ [key: string]: any;
11
+ }>(inputProps: InputProps) => [FlexProps, {
12
+ [key: string]: any;
13
+ }];
7
14
  export declare const Flex: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("styled-components/dist/types").FastOmit<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").FastOmit<import("styled-components/dist/types").FastOmit<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").FastOmit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
8
15
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
9
16
  }, keyof import("..").ResponsiveProps> & import("..").ResponsiveProps, import("styled-components/dist/types").FastOmit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
10
17
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
11
- }, keyof import("..").ResponsiveProps> & import("..").ResponsiveProps>, never>, keyof import("..").ResponsiveProps | "top" | "bottom" | "left" | "right" | "width" | "height" | "position" | "flexShrink" | "flexGrow" | "inset" | keyof import("../Box/spacing").SpacingStyles> & import("../Box/spacing").SpacingStyles & import("..").ResponsiveProps & {
18
+ }, keyof import("..").ResponsiveProps> & import("..").ResponsiveProps>, never>, "maxWidth" | keyof import("..").ResponsiveProps | "top" | "bottom" | "left" | "right" | "width" | "height" | "maxHeight" | "position" | "flexShrink" | "flexGrow" | "inset" | keyof import("../Box/spacing").SpacingStyles> & import("../Box/spacing").SpacingStyles & import("..").ResponsiveProps & {
12
19
  children?: import("react").ReactNode;
13
- width?: import("..").ResponsiveValueInput<import("..").CSSLength> | undefined;
14
- height?: import("..").ResponsiveValueInput<import("..").CSSLength> | undefined;
15
- position?: import("..").ResponsiveValueInput<import("..").CSSPosition> | undefined;
16
- top?: import("..").ResponsiveValueInput<import("..").CSSLength> | undefined;
17
- right?: import("..").ResponsiveValueInput<import("..").CSSLength> | undefined;
18
- bottom?: import("..").ResponsiveValueInput<import("..").CSSLength> | undefined;
19
- left?: import("..").ResponsiveValueInput<import("..").CSSLength> | undefined;
20
+ width?: import("..").ResponsiveValueInput<import("../util").CSSLength> | undefined;
21
+ maxWidth?: import("..").ResponsiveValueInput<import("../util").CSSLength> | undefined;
22
+ height?: import("..").ResponsiveValueInput<import("../util").CSSLength> | undefined;
23
+ maxHeight?: import("..").ResponsiveValueInput<import("../util").CSSLength> | undefined;
24
+ position?: import("..").ResponsiveValueInput<import("../util").CSSPosition> | undefined;
25
+ top?: import("..").ResponsiveValueInput<import("../util").CSSLength> | undefined;
26
+ right?: import("..").ResponsiveValueInput<import("../util").CSSLength> | undefined;
27
+ bottom?: import("..").ResponsiveValueInput<import("../util").CSSLength> | undefined;
28
+ left?: import("..").ResponsiveValueInput<import("../util").CSSLength> | undefined;
20
29
  flexShrink?: import("..").ResponsiveValueInput<string> | undefined;
21
30
  flexGrow?: import("..").ResponsiveValueInput<string> | undefined;
22
31
  inset?: import("..").ResponsiveValueInput<"top" | "bottom" | "left" | "right"> | undefined;
@@ -24,15 +33,17 @@ export declare const Flex: import("styled-components").IStyledComponent<"web", i
24
33
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
25
34
  }, keyof import("..").ResponsiveProps> & import("..").ResponsiveProps, import("styled-components/dist/types").FastOmit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
26
35
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
27
- }, keyof import("..").ResponsiveProps> & import("..").ResponsiveProps>, never>, keyof import("..").ResponsiveProps | "top" | "bottom" | "left" | "right" | "width" | "height" | "position" | "flexShrink" | "flexGrow" | "inset" | keyof import("../Box/spacing").SpacingStyles> & import("../Box/spacing").SpacingStyles & import("..").ResponsiveProps & {
36
+ }, keyof import("..").ResponsiveProps> & import("..").ResponsiveProps>, never>, "maxWidth" | keyof import("..").ResponsiveProps | "top" | "bottom" | "left" | "right" | "width" | "height" | "maxHeight" | "position" | "flexShrink" | "flexGrow" | "inset" | keyof import("../Box/spacing").SpacingStyles> & import("../Box/spacing").SpacingStyles & import("..").ResponsiveProps & {
28
37
  children?: import("react").ReactNode;
29
- width?: import("..").ResponsiveValueInput<import("..").CSSLength> | undefined;
30
- height?: import("..").ResponsiveValueInput<import("..").CSSLength> | undefined;
31
- position?: import("..").ResponsiveValueInput<import("..").CSSPosition> | undefined;
32
- top?: import("..").ResponsiveValueInput<import("..").CSSLength> | undefined;
33
- right?: import("..").ResponsiveValueInput<import("..").CSSLength> | undefined;
34
- bottom?: import("..").ResponsiveValueInput<import("..").CSSLength> | undefined;
35
- left?: import("..").ResponsiveValueInput<import("..").CSSLength> | undefined;
38
+ width?: import("..").ResponsiveValueInput<import("../util").CSSLength> | undefined;
39
+ maxWidth?: import("..").ResponsiveValueInput<import("../util").CSSLength> | undefined;
40
+ height?: import("..").ResponsiveValueInput<import("../util").CSSLength> | undefined;
41
+ maxHeight?: import("..").ResponsiveValueInput<import("../util").CSSLength> | undefined;
42
+ position?: import("..").ResponsiveValueInput<import("../util").CSSPosition> | undefined;
43
+ top?: import("..").ResponsiveValueInput<import("../util").CSSLength> | undefined;
44
+ right?: import("..").ResponsiveValueInput<import("../util").CSSLength> | undefined;
45
+ bottom?: import("..").ResponsiveValueInput<import("../util").CSSLength> | undefined;
46
+ left?: import("..").ResponsiveValueInput<import("../util").CSSLength> | undefined;
36
47
  flexShrink?: import("..").ResponsiveValueInput<string> | undefined;
37
48
  flexGrow?: import("..").ResponsiveValueInput<string> | undefined;
38
49
  inset?: import("..").ResponsiveValueInput<"top" | "bottom" | "left" | "right"> | undefined;
@@ -17,5 +17,27 @@ export type FlexGridProps = FlexProps & {
17
17
  itemSize?: Size;
18
18
  };
19
19
  export declare const FLEX_GRID_PROPS: string[];
20
- export declare function FlexGrid({ direction, rootDirection, groups, groupSize, groupGap, renderItem, itemSize, ...props }: FlexGridProps): React.JSX.Element;
20
+ export declare const FlexGrid: React.ForwardRefExoticComponent<import("../Box/spacing").SpacingStyles & import("../Responsive").ResponsiveProps & {
21
+ children?: React.ReactNode;
22
+ width?: ResponsiveValueInput<CSSLength> | undefined;
23
+ maxWidth?: ResponsiveValueInput<CSSLength> | undefined;
24
+ height?: ResponsiveValueInput<CSSLength> | undefined;
25
+ maxHeight?: ResponsiveValueInput<CSSLength> | undefined;
26
+ position?: ResponsiveValueInput<import("../util").CSSPosition> | undefined;
27
+ top?: ResponsiveValueInput<CSSLength> | undefined;
28
+ right?: ResponsiveValueInput<CSSLength> | undefined;
29
+ bottom?: ResponsiveValueInput<CSSLength> | undefined;
30
+ left?: ResponsiveValueInput<CSSLength> | undefined;
31
+ flexShrink?: ResponsiveValueInput<string> | undefined;
32
+ flexGrow?: ResponsiveValueInput<string> | undefined;
33
+ inset?: ResponsiveValueInput<"top" | "bottom" | "left" | "right"> | undefined;
34
+ } & import("../Flex").FlexGapStylesProps & import("../Flex").FlexBaseStyles & {
35
+ groups: any[];
36
+ groupSize?: Size | undefined;
37
+ groupGap?: ResponsiveValueInput<CSSLength> | undefined;
38
+ rootDirection?: ResponsiveValueInput<FlexDirection> | undefined;
39
+ direction?: ResponsiveValueInput<FlexDirection> | undefined;
40
+ renderItem?: FlexGridRenderItem | undefined;
41
+ itemSize?: Size | undefined;
42
+ } & React.RefAttributes<HTMLDivElement>>;
21
43
  export {};
@@ -1,8 +1,30 @@
1
1
  import React from 'react';
2
- import { Merge } from 'type-fest';
3
- import { InputProps } from '../types';
4
- type BooleanCheckboxInputProps = Merge<InputProps<boolean | 'indeterminate'>, {
2
+ export declare const BooleanCheckboxInput: React.ForwardRefExoticComponent<{
3
+ id?: string | undefined;
4
+ label?: string | undefined;
5
+ value?: boolean | "indeterminate" | undefined;
6
+ onSetValue: (value: boolean | "indeterminate") => void;
7
+ onBlur?: (() => void) | undefined;
8
+ disabled?: boolean | undefined;
9
+ required?: string | boolean | undefined;
10
+ error?: Error | import("../types").ErrorLike | undefined;
11
+ errorStyle?: React.CSSProperties | undefined;
12
+ validate?: boolean | (string | ((input: any, context: {
13
+ validateAsync: import("@orioro/validate").AsyncValidateFn;
14
+ }) => import("@orioro/validate").ValidatorResult | Promise<import("@orioro/validate").ValidatorResult>) | {
15
+ [key: string]: (string | ((input: any, context: {
16
+ validateAsync: import("@orioro/validate").AsyncValidateFn;
17
+ }) => import("@orioro/validate").ValidatorResult | Promise<import("@orioro/validate").ValidatorResult>) | any) | [string | ((input: any, context: {
18
+ validateAsync: import("@orioro/validate").AsyncValidateFn;
19
+ }) => import("@orioro/validate").ValidatorResult | Promise<import("@orioro/validate").ValidatorResult>) | any, import("@orioro/validate").ValidatorErrorMessageInput];
20
+ }) | [string | ((input: any, context: {
21
+ validateAsync: import("@orioro/validate").AsyncValidateFn;
22
+ }) => import("@orioro/validate").ValidatorResult | Promise<import("@orioro/validate").ValidatorResult>) | {
23
+ [key: string]: (string | ((input: any, context: {
24
+ validateAsync: import("@orioro/validate").AsyncValidateFn;
25
+ }) => import("@orioro/validate").ValidatorResult | Promise<import("@orioro/validate").ValidatorResult>) | any) | [string | ((input: any, context: {
26
+ validateAsync: import("@orioro/validate").AsyncValidateFn;
27
+ }) => import("@orioro/validate").ValidatorResult | Promise<import("@orioro/validate").ValidatorResult>) | any, import("@orioro/validate").ValidatorErrorMessageInput];
28
+ }, import("@orioro/validate").ValidatorErrorMessageInput] | undefined;
5
29
  description: string;
6
- }>;
7
- export declare function BooleanCheckboxInput({ value, onSetValue, description, invalid, required, }: BooleanCheckboxInputProps): React.JSX.Element;
8
- export {};
30
+ } & React.RefAttributes<unknown>>;
@@ -15,5 +15,9 @@ export type InputGridProps = {
15
15
  inputProps: InputPropGetter;
16
16
  } & Omit<FlexGridProps, 'groups'>;
17
17
  export declare const INPUT_GRID_PROPS: string[];
18
- export declare function InputGrid({ schema, layout, gap, direction, inputProps, ...flexGridProps }: InputGridProps): React.JSX.Element;
18
+ export declare const InputGrid: React.ForwardRefExoticComponent<{
19
+ schema: NamedInputSchemaList;
20
+ layout?: LayoutRoot | undefined;
21
+ inputProps: InputPropGetter;
22
+ } & Omit<FlexGridProps, "groups"> & React.RefAttributes<HTMLDivElement>>;
19
23
  export {};
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
2
  import { InputGridProps } from '../InputGrid';
3
- import { InputProps, InputSchema } from '../types';
3
+ import { ErrorLike, InputProps, InputSchema } from '../types';
4
4
  import { Merge } from 'type-fest';
5
+ import { ValidationError, validateAsync } from '@orioro/validate';
5
6
  type AnyObject = {
6
7
  [key: string]: any;
7
8
  };
@@ -9,13 +10,48 @@ type FullKeySchema = Merge<InputSchema, {
9
10
  getValue?: (currentObjectValue: AnyObject) => any;
10
11
  setValue?: (currentObjectValue: AnyObject, nextKeyValue: any) => any;
11
12
  }>;
12
- type ObjectInputProps = InputProps<AnyObject> & Omit<InputGridProps, 'schema' | 'inputProps'> & {
13
+ type TargetOrError = string | ValidationError | null;
14
+ export type ObjectInputHandle = {
15
+ focus: (target?: TargetOrError) => void;
16
+ validate: (target?: string | null) => ReturnType<typeof validateAsync>;
17
+ scrollIntoView: (target?: TargetOrError) => void;
18
+ };
19
+ export declare const ObjectInput: React.ForwardRefExoticComponent<InputProps<AnyObject> & Omit<InputGridProps, "schema" | "inputProps"> & {
13
20
  properties: {
14
- [key: string]: string | FullKeySchema;
21
+ [key: string]: string | {
22
+ [x: string]: any;
23
+ id?: string | undefined;
24
+ label?: string | undefined;
25
+ value?: any;
26
+ onSetValue?: ((value: any) => void) | undefined;
27
+ onBlur?: (() => void) | undefined;
28
+ disabled?: boolean | undefined;
29
+ required?: string | boolean | undefined;
30
+ error?: Error | ErrorLike | undefined;
31
+ errorStyle?: React.CSSProperties | undefined;
32
+ validate?: boolean | (string | ((input: any, context: {
33
+ validateAsync: import("@orioro/validate").AsyncValidateFn;
34
+ }) => import("@orioro/validate").ValidatorResult | Promise<import("@orioro/validate").ValidatorResult>) | {
35
+ [key: string]: (string | ((input: any, context: {
36
+ validateAsync: import("@orioro/validate").AsyncValidateFn;
37
+ }) => import("@orioro/validate").ValidatorResult | Promise<import("@orioro/validate").ValidatorResult>) | any) | [string | ((input: any, context: {
38
+ validateAsync: import("@orioro/validate").AsyncValidateFn;
39
+ }) => import("@orioro/validate").ValidatorResult | Promise<import("@orioro/validate").ValidatorResult>) | any, import("@orioro/validate").ValidatorErrorMessageInput];
40
+ }) | [string | ((input: any, context: {
41
+ validateAsync: import("@orioro/validate").AsyncValidateFn;
42
+ }) => import("@orioro/validate").ValidatorResult | Promise<import("@orioro/validate").ValidatorResult>) | {
43
+ [key: string]: (string | ((input: any, context: {
44
+ validateAsync: import("@orioro/validate").AsyncValidateFn;
45
+ }) => import("@orioro/validate").ValidatorResult | Promise<import("@orioro/validate").ValidatorResult>) | any) | [string | ((input: any, context: {
46
+ validateAsync: import("@orioro/validate").AsyncValidateFn;
47
+ }) => import("@orioro/validate").ValidatorResult | Promise<import("@orioro/validate").ValidatorResult>) | any, import("@orioro/validate").ValidatorErrorMessageInput];
48
+ }, import("@orioro/validate").ValidatorErrorMessageInput] | undefined;
49
+ type: string;
50
+ variant?: string | undefined;
51
+ defaultValue?: any;
52
+ getValue?: ((currentObjectValue: AnyObject) => any) | undefined;
53
+ setValue?: ((currentObjectValue: AnyObject, nextKeyValue: any) => any) | undefined;
54
+ };
15
55
  };
16
- };
17
- export declare function ObjectInput({ id, value: currentObjectValue, onSetValue: onSetObjectValue, disabled, properties, ...props }: ObjectInputProps): React.JSX.Element;
18
- export declare namespace ObjectInput {
19
- var labeled: null;
20
- }
56
+ } & React.RefAttributes<ObjectInputHandle>>;
21
57
  export {};
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { InputProps } from '../types';
3
+ export type RangeInputProps = InputProps<[number, number]> & {
4
+ min?: number;
5
+ max?: number;
6
+ step?: number;
7
+ style?: React.CSSProperties;
8
+ size?: '1' | '2' | '3';
9
+ minSize?: number;
10
+ };
11
+ export declare function RangeInput({ value, onSetValue, min, max, minSize, step, style, size, }: RangeInputProps): React.JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './RangeInput';
@@ -15,22 +15,22 @@ export declare const RichTextInput: React.ForwardRefExoticComponent<{
15
15
  error?: Error | import("..").ErrorLike | undefined;
16
16
  errorStyle?: React.CSSProperties | undefined;
17
17
  validate?: boolean | (string | ((input: any, context: {
18
- validateAsync: import("@orioro/util/dist/validate/types").AsyncValidateFn;
19
- }) => import("@orioro/util/dist/validate/types").ValidatorResult | Promise<import("@orioro/util/dist/validate/types").ValidatorResult>) | {
18
+ validateAsync: import("@orioro/validate").AsyncValidateFn;
19
+ }) => import("@orioro/validate").ValidatorResult | Promise<import("@orioro/validate").ValidatorResult>) | {
20
20
  [key: string]: (string | ((input: any, context: {
21
- validateAsync: import("@orioro/util/dist/validate/types").AsyncValidateFn;
22
- }) => import("@orioro/util/dist/validate/types").ValidatorResult | Promise<import("@orioro/util/dist/validate/types").ValidatorResult>) | any) | [string | ((input: any, context: {
23
- validateAsync: import("@orioro/util/dist/validate/types").AsyncValidateFn;
24
- }) => import("@orioro/util/dist/validate/types").ValidatorResult | Promise<import("@orioro/util/dist/validate/types").ValidatorResult>) | any, import("@orioro/util/dist/validate/types").ValidatorErrorMessageInput];
21
+ validateAsync: import("@orioro/validate").AsyncValidateFn;
22
+ }) => import("@orioro/validate").ValidatorResult | Promise<import("@orioro/validate").ValidatorResult>) | any) | [string | ((input: any, context: {
23
+ validateAsync: import("@orioro/validate").AsyncValidateFn;
24
+ }) => import("@orioro/validate").ValidatorResult | Promise<import("@orioro/validate").ValidatorResult>) | any, import("@orioro/validate").ValidatorErrorMessageInput];
25
25
  }) | [string | ((input: any, context: {
26
- validateAsync: import("@orioro/util/dist/validate/types").AsyncValidateFn;
27
- }) => import("@orioro/util/dist/validate/types").ValidatorResult | Promise<import("@orioro/util/dist/validate/types").ValidatorResult>) | {
26
+ validateAsync: import("@orioro/validate").AsyncValidateFn;
27
+ }) => import("@orioro/validate").ValidatorResult | Promise<import("@orioro/validate").ValidatorResult>) | {
28
28
  [key: string]: (string | ((input: any, context: {
29
- validateAsync: import("@orioro/util/dist/validate/types").AsyncValidateFn;
30
- }) => import("@orioro/util/dist/validate/types").ValidatorResult | Promise<import("@orioro/util/dist/validate/types").ValidatorResult>) | any) | [string | ((input: any, context: {
31
- validateAsync: import("@orioro/util/dist/validate/types").AsyncValidateFn;
32
- }) => import("@orioro/util/dist/validate/types").ValidatorResult | Promise<import("@orioro/util/dist/validate/types").ValidatorResult>) | any, import("@orioro/util/dist/validate/types").ValidatorErrorMessageInput];
33
- }, import("@orioro/util/dist/validate/types").ValidatorErrorMessageInput] | undefined;
29
+ validateAsync: import("@orioro/validate").AsyncValidateFn;
30
+ }) => import("@orioro/validate").ValidatorResult | Promise<import("@orioro/validate").ValidatorResult>) | any) | [string | ((input: any, context: {
31
+ validateAsync: import("@orioro/validate").AsyncValidateFn;
32
+ }) => import("@orioro/validate").ValidatorResult | Promise<import("@orioro/validate").ValidatorResult>) | any, import("@orioro/validate").ValidatorErrorMessageInput];
33
+ }, import("@orioro/validate").ValidatorErrorMessageInput] | undefined;
34
34
  valueFormat?: "blocks" | "markdown" | undefined;
35
35
  editor?: Partial<Omit<Partial<import("@blocknote/core").BlockNoteEditorOptions<Record<string, import("@blocknote/core").BlockConfig>, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>> | undefined, "initialContent">> | undefined;
36
36
  view?: Omit<{
@@ -15,22 +15,22 @@ export declare const RichTextInput: React.ForwardRefExoticComponent<{
15
15
  error?: Error | import("..").ErrorLike | undefined;
16
16
  errorStyle?: React.CSSProperties | undefined;
17
17
  validate?: boolean | (string | ((input: any, context: {
18
- validateAsync: import("@orioro/util/dist/validate/types").AsyncValidateFn;
19
- }) => import("@orioro/util/dist/validate/types").ValidatorResult | Promise<import("@orioro/util/dist/validate/types").ValidatorResult>) | {
18
+ validateAsync: import("@orioro/validate").AsyncValidateFn;
19
+ }) => import("@orioro/validate").ValidatorResult | Promise<import("@orioro/validate").ValidatorResult>) | {
20
20
  [key: string]: (string | ((input: any, context: {
21
- validateAsync: import("@orioro/util/dist/validate/types").AsyncValidateFn;
22
- }) => import("@orioro/util/dist/validate/types").ValidatorResult | Promise<import("@orioro/util/dist/validate/types").ValidatorResult>) | any) | [string | ((input: any, context: {
23
- validateAsync: import("@orioro/util/dist/validate/types").AsyncValidateFn;
24
- }) => import("@orioro/util/dist/validate/types").ValidatorResult | Promise<import("@orioro/util/dist/validate/types").ValidatorResult>) | any, import("@orioro/util/dist/validate/types").ValidatorErrorMessageInput];
21
+ validateAsync: import("@orioro/validate").AsyncValidateFn;
22
+ }) => import("@orioro/validate").ValidatorResult | Promise<import("@orioro/validate").ValidatorResult>) | any) | [string | ((input: any, context: {
23
+ validateAsync: import("@orioro/validate").AsyncValidateFn;
24
+ }) => import("@orioro/validate").ValidatorResult | Promise<import("@orioro/validate").ValidatorResult>) | any, import("@orioro/validate").ValidatorErrorMessageInput];
25
25
  }) | [string | ((input: any, context: {
26
- validateAsync: import("@orioro/util/dist/validate/types").AsyncValidateFn;
27
- }) => import("@orioro/util/dist/validate/types").ValidatorResult | Promise<import("@orioro/util/dist/validate/types").ValidatorResult>) | {
26
+ validateAsync: import("@orioro/validate").AsyncValidateFn;
27
+ }) => import("@orioro/validate").ValidatorResult | Promise<import("@orioro/validate").ValidatorResult>) | {
28
28
  [key: string]: (string | ((input: any, context: {
29
- validateAsync: import("@orioro/util/dist/validate/types").AsyncValidateFn;
30
- }) => import("@orioro/util/dist/validate/types").ValidatorResult | Promise<import("@orioro/util/dist/validate/types").ValidatorResult>) | any) | [string | ((input: any, context: {
31
- validateAsync: import("@orioro/util/dist/validate/types").AsyncValidateFn;
32
- }) => import("@orioro/util/dist/validate/types").ValidatorResult | Promise<import("@orioro/util/dist/validate/types").ValidatorResult>) | any, import("@orioro/util/dist/validate/types").ValidatorErrorMessageInput];
33
- }, import("@orioro/util/dist/validate/types").ValidatorErrorMessageInput] | undefined;
29
+ validateAsync: import("@orioro/validate").AsyncValidateFn;
30
+ }) => import("@orioro/validate").ValidatorResult | Promise<import("@orioro/validate").ValidatorResult>) | any) | [string | ((input: any, context: {
31
+ validateAsync: import("@orioro/validate").AsyncValidateFn;
32
+ }) => import("@orioro/validate").ValidatorResult | Promise<import("@orioro/validate").ValidatorResult>) | any, import("@orioro/validate").ValidatorErrorMessageInput];
33
+ }, import("@orioro/validate").ValidatorErrorMessageInput] | undefined;
34
34
  valueFormat?: "blocks" | "markdown" | undefined;
35
35
  editor?: Partial<Omit<Partial<import("@blocknote/core").BlockNoteEditorOptions<Record<string, import("@blocknote/core").BlockConfig>, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>> | undefined, "initialContent">> | undefined;
36
36
  view?: Omit<{
@@ -1,7 +1,66 @@
1
1
  import React from 'react';
2
- import { Merge } from 'type-fest';
3
- import { InputProps } from '../types';
4
- import { FileDropzoneProps } from '../../FileDropzone';
5
- type SingleFileInputProps = Merge<InputProps<File | null>, FileDropzoneProps>;
6
- export declare function SingleFileInput({ value, onSetValue, maxSize, ...props }: SingleFileInputProps): React.JSX.Element;
7
- export {};
2
+ import { FileMiddleware } from './middleware';
3
+ export declare const SingleFileInput: React.ForwardRefExoticComponent<{
4
+ id?: string | undefined;
5
+ label?: string | undefined;
6
+ value?: File | null | undefined;
7
+ onSetValue: (value: File | null) => void;
8
+ onBlur?: (() => void) | undefined;
9
+ required?: string | boolean | undefined;
10
+ error?: Error | import("../types").ErrorLike | undefined;
11
+ errorStyle?: React.CSSProperties | undefined;
12
+ validate?: boolean | (string | ((input: any, context: {
13
+ validateAsync: import("@orioro/validate").AsyncValidateFn;
14
+ }) => import("@orioro/validate").ValidatorResult | Promise<import("@orioro/validate").ValidatorResult>) | {
15
+ [key: string]: (string | ((input: any, context: {
16
+ validateAsync: import("@orioro/validate").AsyncValidateFn;
17
+ }) => import("@orioro/validate").ValidatorResult | Promise<import("@orioro/validate").ValidatorResult>) | any) | [string | ((input: any, context: {
18
+ validateAsync: import("@orioro/validate").AsyncValidateFn;
19
+ }) => import("@orioro/validate").ValidatorResult | Promise<import("@orioro/validate").ValidatorResult>) | any, import("@orioro/validate").ValidatorErrorMessageInput];
20
+ }) | [string | ((input: any, context: {
21
+ validateAsync: import("@orioro/validate").AsyncValidateFn;
22
+ }) => import("@orioro/validate").ValidatorResult | Promise<import("@orioro/validate").ValidatorResult>) | {
23
+ [key: string]: (string | ((input: any, context: {
24
+ validateAsync: import("@orioro/validate").AsyncValidateFn;
25
+ }) => import("@orioro/validate").ValidatorResult | Promise<import("@orioro/validate").ValidatorResult>) | any) | [string | ((input: any, context: {
26
+ validateAsync: import("@orioro/validate").AsyncValidateFn;
27
+ }) => import("@orioro/validate").ValidatorResult | Promise<import("@orioro/validate").ValidatorResult>) | any, import("@orioro/validate").ValidatorErrorMessageInput];
28
+ }, import("@orioro/validate").ValidatorErrorMessageInput] | undefined;
29
+ onDragEnter?: React.DragEventHandler<HTMLElement> | undefined;
30
+ onDragLeave?: React.DragEventHandler<HTMLElement> | undefined;
31
+ onDragOver?: React.DragEventHandler<HTMLElement> | undefined;
32
+ multiple?: boolean | undefined;
33
+ minSize?: number | undefined;
34
+ maxSize?: number | undefined;
35
+ maxFiles?: number | undefined;
36
+ preventDropOnDocument?: boolean | undefined;
37
+ noClick?: boolean | undefined;
38
+ noKeyboard?: boolean | undefined;
39
+ noDrag?: boolean | undefined;
40
+ noDragEventsBubbling?: boolean | undefined;
41
+ disabled?: boolean | undefined;
42
+ onDrop?: (<T extends File>(acceptedFiles: T[], fileRejections: import("react-dropzone").FileRejection[], event: import("react-dropzone").DropEvent) => void) | undefined;
43
+ onDropAccepted?: (<T_1 extends File>(files: T_1[], event: import("react-dropzone").DropEvent) => void) | undefined;
44
+ onDropRejected?: ((fileRejections: import("react-dropzone").FileRejection[], event: import("react-dropzone").DropEvent) => void) | undefined;
45
+ getFilesFromEvent?: ((event: import("react-dropzone").DropEvent) => Promise<(File | DataTransferItem)[]>) | undefined;
46
+ onFileDialogCancel?: (() => void) | undefined;
47
+ onFileDialogOpen?: (() => void) | undefined;
48
+ onError?: ((err: Error) => void) | undefined;
49
+ validator?: (<T_2 extends File>(file: T_2) => import("react-dropzone").FileError | import("react-dropzone").FileError[] | null) | undefined;
50
+ useFsAccessApi?: boolean | undefined;
51
+ autoFocus?: boolean | undefined;
52
+ style?: {
53
+ [key: string]: string | number | import("../..").ResponsiveValue<any> | undefined;
54
+ } | undefined;
55
+ children?: React.ReactNode;
56
+ theme?: Partial<import("../..").Theme> | undefined;
57
+ dropzoneLabel?: ((state: {
58
+ isFocused: boolean;
59
+ isDragActive: boolean;
60
+ isDragReject: boolean;
61
+ isDragAccept: boolean;
62
+ isFileDialogActive: boolean;
63
+ }) => React.ReactNode) | undefined;
64
+ accept?: (string | string[] | import("react-dropzone").Accept) | undefined;
65
+ middleware?: FileMiddleware[] | undefined;
66
+ } & React.RefAttributes<unknown>>;
@@ -0,0 +1,4 @@
1
+ type FileOrNull = File | null;
2
+ export type FileMiddleware = (file: File) => Promise<FileOrNull | symbol> | FileOrNull | symbol;
3
+ export declare function applyFileMiddleware(middleware: FileMiddleware[], inputFile: FileOrNull): Promise<FileOrNull | symbol>;
4
+ export {};
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import { InputProps } from '../types';
3
+ export type SliderInputProps = InputProps<number> & {
4
+ min?: number;
5
+ max?: number;
6
+ step?: number;
7
+ style?: React.CSSProperties;
8
+ size?: '1' | '2' | '3';
9
+ };
10
+ export declare const SliderInput: React.ForwardRefExoticComponent<InputProps<number> & {
11
+ min?: number | undefined;
12
+ max?: number | undefined;
13
+ step?: number | undefined;
14
+ style?: React.CSSProperties | undefined;
15
+ size?: "1" | "2" | "3" | undefined;
16
+ } & React.RefAttributes<unknown>>;
@@ -0,0 +1 @@
1
+ export * from './SliderInput';
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { InputProps } from '../types';
3
+ export type SwitchInputProps = InputProps<boolean> & {
4
+ radius?: 'none' | 'small' | 'medium' | 'large' | 'full';
5
+ };
6
+ export declare function SwitchInput({ value, onSetValue, radius }: SwitchInputProps): React.JSX.Element;
@@ -11,22 +11,22 @@ export declare const TextInput: React.ForwardRefExoticComponent<{
11
11
  error?: Error | ErrorLike | undefined;
12
12
  errorStyle?: React.CSSProperties | undefined;
13
13
  validate?: boolean | (string | ((input: any, context: {
14
- validateAsync: import("@orioro/util/dist/validate/types").AsyncValidateFn;
15
- }) => import("@orioro/util/dist/validate/types").ValidatorResult | Promise<import("@orioro/util/dist/validate/types").ValidatorResult>) | {
14
+ validateAsync: import("@orioro/validate").AsyncValidateFn;
15
+ }) => import("@orioro/validate").ValidatorResult | Promise<import("@orioro/validate").ValidatorResult>) | {
16
16
  [key: string]: (string | ((input: any, context: {
17
- validateAsync: import("@orioro/util/dist/validate/types").AsyncValidateFn;
18
- }) => import("@orioro/util/dist/validate/types").ValidatorResult | Promise<import("@orioro/util/dist/validate/types").ValidatorResult>) | any) | [string | ((input: any, context: {
19
- validateAsync: import("@orioro/util/dist/validate/types").AsyncValidateFn;
20
- }) => import("@orioro/util/dist/validate/types").ValidatorResult | Promise<import("@orioro/util/dist/validate/types").ValidatorResult>) | any, import("@orioro/util/dist/validate/types").ValidatorErrorMessageInput];
17
+ validateAsync: import("@orioro/validate").AsyncValidateFn;
18
+ }) => import("@orioro/validate").ValidatorResult | Promise<import("@orioro/validate").ValidatorResult>) | any) | [string | ((input: any, context: {
19
+ validateAsync: import("@orioro/validate").AsyncValidateFn;
20
+ }) => import("@orioro/validate").ValidatorResult | Promise<import("@orioro/validate").ValidatorResult>) | any, import("@orioro/validate").ValidatorErrorMessageInput];
21
21
  }) | [string | ((input: any, context: {
22
- validateAsync: import("@orioro/util/dist/validate/types").AsyncValidateFn;
23
- }) => import("@orioro/util/dist/validate/types").ValidatorResult | Promise<import("@orioro/util/dist/validate/types").ValidatorResult>) | {
22
+ validateAsync: import("@orioro/validate").AsyncValidateFn;
23
+ }) => import("@orioro/validate").ValidatorResult | Promise<import("@orioro/validate").ValidatorResult>) | {
24
24
  [key: string]: (string | ((input: any, context: {
25
- validateAsync: import("@orioro/util/dist/validate/types").AsyncValidateFn;
26
- }) => import("@orioro/util/dist/validate/types").ValidatorResult | Promise<import("@orioro/util/dist/validate/types").ValidatorResult>) | any) | [string | ((input: any, context: {
27
- validateAsync: import("@orioro/util/dist/validate/types").AsyncValidateFn;
28
- }) => import("@orioro/util/dist/validate/types").ValidatorResult | Promise<import("@orioro/util/dist/validate/types").ValidatorResult>) | any, import("@orioro/util/dist/validate/types").ValidatorErrorMessageInput];
29
- }, import("@orioro/util/dist/validate/types").ValidatorErrorMessageInput] | undefined;
25
+ validateAsync: import("@orioro/validate").AsyncValidateFn;
26
+ }) => import("@orioro/validate").ValidatorResult | Promise<import("@orioro/validate").ValidatorResult>) | any) | [string | ((input: any, context: {
27
+ validateAsync: import("@orioro/validate").AsyncValidateFn;
28
+ }) => import("@orioro/validate").ValidatorResult | Promise<import("@orioro/validate").ValidatorResult>) | any, import("@orioro/validate").ValidatorErrorMessageInput];
29
+ }, import("@orioro/validate").ValidatorErrorMessageInput] | undefined;
30
30
  value?: string | undefined;
31
31
  valueDebounceMs?: number | undefined;
32
32
  validateDebounceMs?: number | undefined;
@@ -36,4 +36,5 @@ export declare const TextInput: React.ForwardRefExoticComponent<{
36
36
  inputProps?: object | undefined;
37
37
  placeholder?: string | undefined;
38
38
  noValidationState?: boolean | undefined;
39
+ clearable?: boolean | undefined;
39
40
  } & React.RefAttributes<UseTextInputHandle>>;
@@ -1,3 +1,3 @@
1
- import { AsyncValidatorSystem } from '@orioro/util/dist/validate/types';
2
1
  import { TextInputProps } from './types';
2
+ import { AsyncValidatorSystem } from '@orioro/validate';
3
3
  export declare function parseValidator({ required, validate, }: Partial<TextInputProps>): AsyncValidatorSystem['ValidatorInput'] | false;
@@ -13,4 +13,5 @@ export type TextInputProps = Merge<UseTextInputProps, {
13
13
  inputProps?: object;
14
14
  placeholder?: string;
15
15
  noValidationState?: boolean;
16
+ clearable?: boolean;
16
17
  }>;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { UseTextInputProps } from './types';
3
- import { validateAsync } from '@orioro/util';
3
+ import { validateAsync } from '@orioro/validate';
4
4
  export type UseTextInputHandle = {
5
5
  focus: () => void;
6
6
  validate: () => ReturnType<typeof validateAsync>;
@@ -13,7 +13,8 @@ export declare function useTextInput({ disabled, value, valueDebounceMs, onSetVa
13
13
  setTouched: import("react").Dispatch<import("react").SetStateAction<boolean>>;
14
14
  immediateValue: string;
15
15
  setImmediateValue: import("react").Dispatch<import("react").SetStateAction<string>>;
16
- runValidation: () => Promise<true | import("@orioro/util/dist/validate/types").DetailedInvalid>;
16
+ runValidation: () => Promise<true | import("@orioro/validate").DetailedInvalid>;
17
+ clear: (focus?: boolean) => void;
17
18
  inputProps: {
18
19
  onBlur: () => void;
19
20
  value: string;
@@ -10,22 +10,22 @@ export declare const TextareaInput: React.ForwardRefExoticComponent<{
10
10
  error?: Error | import("..").ErrorLike | undefined;
11
11
  errorStyle?: React.CSSProperties | undefined;
12
12
  validate?: boolean | (string | ((input: any, context: {
13
- validateAsync: import("@orioro/util/dist/validate/types").AsyncValidateFn;
14
- }) => import("@orioro/util/dist/validate/types").ValidatorResult | Promise<import("@orioro/util/dist/validate/types").ValidatorResult>) | {
13
+ validateAsync: import("@orioro/validate").AsyncValidateFn;
14
+ }) => import("@orioro/validate").ValidatorResult | Promise<import("@orioro/validate").ValidatorResult>) | {
15
15
  [key: string]: (string | ((input: any, context: {
16
- validateAsync: import("@orioro/util/dist/validate/types").AsyncValidateFn;
17
- }) => import("@orioro/util/dist/validate/types").ValidatorResult | Promise<import("@orioro/util/dist/validate/types").ValidatorResult>) | any) | [string | ((input: any, context: {
18
- validateAsync: import("@orioro/util/dist/validate/types").AsyncValidateFn;
19
- }) => import("@orioro/util/dist/validate/types").ValidatorResult | Promise<import("@orioro/util/dist/validate/types").ValidatorResult>) | any, import("@orioro/util/dist/validate/types").ValidatorErrorMessageInput];
16
+ validateAsync: import("@orioro/validate").AsyncValidateFn;
17
+ }) => import("@orioro/validate").ValidatorResult | Promise<import("@orioro/validate").ValidatorResult>) | any) | [string | ((input: any, context: {
18
+ validateAsync: import("@orioro/validate").AsyncValidateFn;
19
+ }) => import("@orioro/validate").ValidatorResult | Promise<import("@orioro/validate").ValidatorResult>) | any, import("@orioro/validate").ValidatorErrorMessageInput];
20
20
  }) | [string | ((input: any, context: {
21
- validateAsync: import("@orioro/util/dist/validate/types").AsyncValidateFn;
22
- }) => import("@orioro/util/dist/validate/types").ValidatorResult | Promise<import("@orioro/util/dist/validate/types").ValidatorResult>) | {
21
+ validateAsync: import("@orioro/validate").AsyncValidateFn;
22
+ }) => import("@orioro/validate").ValidatorResult | Promise<import("@orioro/validate").ValidatorResult>) | {
23
23
  [key: string]: (string | ((input: any, context: {
24
- validateAsync: import("@orioro/util/dist/validate/types").AsyncValidateFn;
25
- }) => import("@orioro/util/dist/validate/types").ValidatorResult | Promise<import("@orioro/util/dist/validate/types").ValidatorResult>) | any) | [string | ((input: any, context: {
26
- validateAsync: import("@orioro/util/dist/validate/types").AsyncValidateFn;
27
- }) => import("@orioro/util/dist/validate/types").ValidatorResult | Promise<import("@orioro/util/dist/validate/types").ValidatorResult>) | any, import("@orioro/util/dist/validate/types").ValidatorErrorMessageInput];
28
- }, import("@orioro/util/dist/validate/types").ValidatorErrorMessageInput] | undefined;
24
+ validateAsync: import("@orioro/validate").AsyncValidateFn;
25
+ }) => import("@orioro/validate").ValidatorResult | Promise<import("@orioro/validate").ValidatorResult>) | any) | [string | ((input: any, context: {
26
+ validateAsync: import("@orioro/validate").AsyncValidateFn;
27
+ }) => import("@orioro/validate").ValidatorResult | Promise<import("@orioro/validate").ValidatorResult>) | any, import("@orioro/validate").ValidatorErrorMessageInput];
28
+ }, import("@orioro/validate").ValidatorErrorMessageInput] | undefined;
29
29
  value?: string | undefined;
30
30
  valueDebounceMs?: number | undefined;
31
31
  validateDebounceMs?: number | undefined;
@@ -0,0 +1,42 @@
1
+ import React from 'react';
2
+ import { InputProps } from '../types';
3
+ type BaseMenuNode = {
4
+ id?: string | number;
5
+ };
6
+ type OptionMenuNode = BaseMenuNode & {
7
+ value: any;
8
+ label: string;
9
+ path?: string | null;
10
+ type?: 'option';
11
+ color?: string;
12
+ };
13
+ type SeparatorMenuNode = BaseMenuNode & {
14
+ path?: string | null;
15
+ type: 'separator';
16
+ };
17
+ type LabelMenuNode = BaseMenuNode & {
18
+ path?: string | null;
19
+ type: 'label';
20
+ label: React.ReactNode;
21
+ };
22
+ type MenuNode = OptionMenuNode | SeparatorMenuNode | LabelMenuNode;
23
+ type FnIsEqual = (vA: any, vB: any) => boolean;
24
+ export type TreeSelectInputProps = InputProps & {
25
+ options: MenuNode[];
26
+ placeholder: string;
27
+ clearable?: boolean;
28
+ size?: '1' | '2';
29
+ color?: string;
30
+ isEqual?: FnIsEqual;
31
+ style?: React.CSSProperties;
32
+ };
33
+ export declare const TreeSelectInput: React.ForwardRefExoticComponent<InputProps & {
34
+ options: MenuNode[];
35
+ placeholder: string;
36
+ clearable?: boolean | undefined;
37
+ size?: "1" | "2" | undefined;
38
+ color?: string | undefined;
39
+ isEqual?: FnIsEqual | undefined;
40
+ style?: React.CSSProperties | undefined;
41
+ } & React.RefAttributes<unknown>>;
42
+ export {};
@@ -0,0 +1 @@
1
+ export * from './TreeSelectInput';
@@ -7,10 +7,15 @@ export * from './MarkdownInput';
7
7
  export * from './MultiFileInput';
8
8
  export * from './ObjectInput';
9
9
  export * from './RadioSelectInput';
10
+ export * from './RangeInput';
10
11
  export * from './RichTextInput';
11
12
  export * from './SingleFileInput';
13
+ export * from './SliderInput';
14
+ export * from './SwitchInput';
12
15
  export * from './TextareaInput';
13
16
  export * from './TextInput';
17
+ export * from './TreeSelectInput';
14
18
  export * from './types';
15
19
  export * from './util';
16
20
  export * from './valueUtil';
21
+ export * from './useValidation';