@scm-manager/ui-forms 2.44.2-20230522-081529 → 2.44.2
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/.turbo/turbo-build.log +7 -7
- package/build/index.d.ts +45 -106
- package/build/index.js +255 -525
- package/build/index.mjs +122 -396
- package/package.json +6 -7
- package/src/Form.stories.tsx +0 -22
- package/src/chip-input/ChipInputField.stories.tsx +12 -41
- package/src/chip-input/ChipInputField.tsx +56 -83
- package/src/chip-input/ControlledChipInputField.tsx +4 -12
- package/src/headless-chip-input/ChipInput.tsx +59 -127
- package/src/helpers.ts +0 -23
- package/src/index.ts +0 -4
- package/src/combobox/Combobox.stories.tsx +0 -96
- package/src/combobox/Combobox.tsx +0 -217
- package/src/combobox/ComboboxField.tsx +0 -62
- package/src/combobox/ControlledComboboxField.tsx +0 -96
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@scm-manager/ui-forms:build: cache hit, replaying output
|
|
1
|
+
@scm-manager/ui-forms:build: cache hit, replaying output 4ac5f0f4e4efd4eb
|
|
2
2
|
@scm-manager/ui-forms:build: $ tsup ./src/index.ts -d build --format esm,cjs --dts
|
|
3
3
|
@scm-manager/ui-forms:build: CLI Building entry: ./src/index.ts
|
|
4
4
|
@scm-manager/ui-forms:build: CLI Using tsconfig: tsconfig.json
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
@scm-manager/ui-forms:build: CLI Target: node14
|
|
7
7
|
@scm-manager/ui-forms:build: ESM Build start
|
|
8
8
|
@scm-manager/ui-forms:build: CJS Build start
|
|
9
|
-
@scm-manager/ui-forms:build: CJS build/index.js
|
|
10
|
-
@scm-manager/ui-forms:build: CJS ⚡️ Build success in
|
|
11
|
-
@scm-manager/ui-forms:build: ESM build/index.mjs
|
|
12
|
-
@scm-manager/ui-forms:build: ESM ⚡️ Build success in
|
|
9
|
+
@scm-manager/ui-forms:build: CJS build/index.js 46.32 KB
|
|
10
|
+
@scm-manager/ui-forms:build: CJS ⚡️ Build success in 870ms
|
|
11
|
+
@scm-manager/ui-forms:build: ESM build/index.mjs 40.51 KB
|
|
12
|
+
@scm-manager/ui-forms:build: ESM ⚡️ Build success in 941ms
|
|
13
13
|
@scm-manager/ui-forms:build: DTS Build start
|
|
14
|
-
@scm-manager/ui-forms:build: DTS ⚡️ Build success in
|
|
15
|
-
@scm-manager/ui-forms:build: DTS build/index.d.ts
|
|
14
|
+
@scm-manager/ui-forms:build: DTS ⚡️ Build success in 48724ms
|
|
15
|
+
@scm-manager/ui-forms:build: DTS build/index.d.ts 23.35 KB
|
package/build/index.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import React__default, { ComponentProps
|
|
2
|
+
import React__default, { ComponentProps } from 'react';
|
|
3
3
|
import { SubmitHandler, UseFormReturn, ControllerRenderProps, Controller, Path, RegisterOptions, PathValue, UseFieldArrayReturn } from 'react-hook-form';
|
|
4
|
-
import {
|
|
5
|
-
import * as styled_components from 'styled-components';
|
|
4
|
+
import { HalRepresentation } from '@scm-manager/ui-types';
|
|
6
5
|
|
|
7
6
|
declare type RenderProps$3<T extends Record<string, unknown>> = Omit<UseFormReturn<T>, "register" | "unregister" | "handleSubmit" | "control">;
|
|
8
|
-
declare type Props$
|
|
7
|
+
declare type Props$a<FormType extends Record<string, unknown>, DefaultValues extends FormType> = {
|
|
9
8
|
children: ((renderProps: RenderProps$3<FormType>) => React__default.ReactNode | React__default.ReactNode[]) | React__default.ReactNode;
|
|
10
9
|
translationPath: [namespace: string, prefix: string];
|
|
11
10
|
onSubmit: SubmitHandler<FormType>;
|
|
@@ -46,14 +45,14 @@ declare type Props$b<FormType extends Record<string, unknown>, DefaultValues ext
|
|
|
46
45
|
* @beta
|
|
47
46
|
* @since 2.41.0
|
|
48
47
|
*/
|
|
49
|
-
declare function Form$1<FormType extends Record<string, unknown>, DefaultValues extends FormType = FormType>({ children, onSubmit, defaultValues, translationPath, readOnly, withResetTo, withDiscardChanges, successMessageFallback, submitButtonTestId, }: Props$
|
|
48
|
+
declare function Form$1<FormType extends Record<string, unknown>, DefaultValues extends FormType = FormType>({ children, onSubmit, defaultValues, translationPath, readOnly, withResetTo, withDiscardChanges, successMessageFallback, submitButtonTestId, }: Props$a<FormType, DefaultValues>): JSX.Element;
|
|
50
49
|
|
|
51
50
|
declare const Input: React__default.ForwardRefExoticComponent<{
|
|
52
51
|
variant?: "danger" | undefined;
|
|
53
52
|
testId?: string | undefined;
|
|
54
53
|
} & React__default.InputHTMLAttributes<HTMLInputElement> & React__default.RefAttributes<HTMLInputElement>>;
|
|
55
54
|
|
|
56
|
-
declare type InputFieldProps
|
|
55
|
+
declare type InputFieldProps = {
|
|
57
56
|
label: string;
|
|
58
57
|
helpText?: string;
|
|
59
58
|
error?: string;
|
|
@@ -61,14 +60,14 @@ declare type InputFieldProps$1 = {
|
|
|
61
60
|
/**
|
|
62
61
|
* @see https://bulma.io/documentation/form/input/
|
|
63
62
|
*/
|
|
64
|
-
declare const InputField: React__default.ForwardRefExoticComponent<Pick<InputFieldProps
|
|
63
|
+
declare const InputField: React__default.ForwardRefExoticComponent<Pick<InputFieldProps, "label" | "key" | "testId" | keyof React__default.InputHTMLAttributes<HTMLInputElement> | "error" | "helpText" | "variant"> & React__default.RefAttributes<HTMLInputElement>>;
|
|
65
64
|
|
|
66
|
-
declare type Props$
|
|
65
|
+
declare type Props$9<T extends Record<string, unknown>> = Omit<ComponentProps<typeof InputField>, "error" | "label" | "defaultChecked" | "required" | keyof ControllerRenderProps> & {
|
|
67
66
|
rules?: ComponentProps<typeof Controller>["rules"];
|
|
68
67
|
name: Path<T>;
|
|
69
68
|
label?: string;
|
|
70
69
|
};
|
|
71
|
-
declare function ControlledInputField$1<T extends Record<string, unknown>>({ name, label, helpText, rules, testId, defaultValue, readOnly, className, ...props }: Props$
|
|
70
|
+
declare function ControlledInputField$1<T extends Record<string, unknown>>({ name, label, helpText, rules, testId, defaultValue, readOnly, className, ...props }: Props$9<T>): JSX.Element;
|
|
72
71
|
|
|
73
72
|
declare const CheckboxField: React__default.ForwardRefExoticComponent<Pick<{
|
|
74
73
|
label: string;
|
|
@@ -76,14 +75,14 @@ declare const CheckboxField: React__default.ForwardRefExoticComponent<Pick<{
|
|
|
76
75
|
testId?: string | undefined;
|
|
77
76
|
} & Omit<React__default.InputHTMLAttributes<HTMLInputElement>, "type"> & React__default.RefAttributes<HTMLInputElement>, "className" | "children" | "hidden" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "crossOrigin" | "disabled" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "height" | "label" | "list" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "name" | "pattern" | "placeholder" | "readOnly" | "required" | "size" | "src" | "step" | "value" | "width" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "testId" | "enterKeyHint" | "helpText"> & React__default.RefAttributes<HTMLInputElement>>;
|
|
78
77
|
|
|
79
|
-
declare type Props$
|
|
78
|
+
declare type Props$8<T extends Record<string, unknown>> = Omit<ComponentProps<typeof CheckboxField>, "label" | "defaultValue" | "required" | keyof ControllerRenderProps> & {
|
|
80
79
|
name: Path<T>;
|
|
81
80
|
label?: string;
|
|
82
81
|
rules?: Pick<RegisterOptions, "deps">;
|
|
83
82
|
};
|
|
84
|
-
declare function ControlledInputField<T extends Record<string, unknown>>({ name, label, helpText, rules, testId, defaultChecked, readOnly, className, ...props }: Props$
|
|
83
|
+
declare function ControlledInputField<T extends Record<string, unknown>>({ name, label, helpText, rules, testId, defaultChecked, readOnly, className, ...props }: Props$8<T>): JSX.Element;
|
|
85
84
|
|
|
86
|
-
declare type Props$
|
|
85
|
+
declare type Props$7<T extends Record<string, unknown>> = Omit<ComponentProps<typeof InputField>, "error" | "label" | "defaultChecked" | "required" | keyof ControllerRenderProps> & {
|
|
87
86
|
rules?: ComponentProps<typeof Controller>["rules"];
|
|
88
87
|
name: Path<T>;
|
|
89
88
|
label?: string;
|
|
@@ -92,7 +91,7 @@ declare type Props$8<T extends Record<string, unknown>> = Omit<ComponentProps<ty
|
|
|
92
91
|
confirmationErrorMessage?: string;
|
|
93
92
|
confirmationTestId?: string;
|
|
94
93
|
};
|
|
95
|
-
declare function ControlledSecretConfirmationField<T extends Record<string, unknown>>({ name, label, confirmationLabel, helpText, confirmationHelpText, rules, confirmationErrorMessage, className, testId, confirmationTestId, defaultValue, readOnly, ...props }: Props$
|
|
94
|
+
declare function ControlledSecretConfirmationField<T extends Record<string, unknown>>({ name, label, confirmationLabel, helpText, confirmationHelpText, rules, confirmationErrorMessage, className, testId, confirmationTestId, defaultValue, readOnly, ...props }: Props$7<T>): JSX.Element;
|
|
96
95
|
|
|
97
96
|
/**
|
|
98
97
|
* @beta
|
|
@@ -106,7 +105,7 @@ declare const Select: React__default.ForwardRefExoticComponent<{
|
|
|
106
105
|
testId?: string | undefined;
|
|
107
106
|
} & React__default.InputHTMLAttributes<HTMLSelectElement> & React__default.RefAttributes<HTMLSelectElement>>;
|
|
108
107
|
|
|
109
|
-
declare type Props$
|
|
108
|
+
declare type Props$6 = {
|
|
110
109
|
label: string;
|
|
111
110
|
helpText?: string;
|
|
112
111
|
error?: string;
|
|
@@ -116,48 +115,49 @@ declare type Props$7 = {
|
|
|
116
115
|
* @beta
|
|
117
116
|
* @since 2.44.0
|
|
118
117
|
*/
|
|
119
|
-
declare const SelectField: React__default.ForwardRefExoticComponent<Pick<Props$
|
|
118
|
+
declare const SelectField: React__default.ForwardRefExoticComponent<Pick<Props$6, "label" | "key" | "testId" | "error" | "helpText" | "options" | "variant" | keyof React__default.InputHTMLAttributes<HTMLSelectElement>> & React__default.RefAttributes<HTMLSelectElement>>;
|
|
120
119
|
|
|
121
|
-
declare type Props$
|
|
120
|
+
declare type Props$5<T extends Record<string, unknown>> = Omit<ComponentProps<typeof SelectField>, "error" | "label" | "required" | keyof ControllerRenderProps> & {
|
|
122
121
|
rules?: ComponentProps<typeof Controller>["rules"];
|
|
123
122
|
name: Path<T>;
|
|
124
123
|
label?: string;
|
|
125
124
|
};
|
|
126
|
-
declare function ControlledSelectField<T extends Record<string, unknown>>({ name, label, helpText, rules, testId, defaultValue, readOnly, className, ...props }: Props$
|
|
125
|
+
declare function ControlledSelectField<T extends Record<string, unknown>>({ name, label, helpText, rules, testId, defaultValue, readOnly, className, ...props }: Props$5<T>): JSX.Element;
|
|
127
126
|
|
|
128
|
-
|
|
127
|
+
/**
|
|
128
|
+
* @beta
|
|
129
|
+
* @since 2.44.0
|
|
130
|
+
*/
|
|
131
|
+
declare const ChipInputField: React__default.ForwardRefExoticComponent<{
|
|
129
132
|
label: string;
|
|
130
|
-
createDeleteText?: (value: string) => string;
|
|
131
|
-
helpText?: string;
|
|
132
|
-
error?: string;
|
|
133
|
-
testId?: string;
|
|
134
|
-
id?: string;
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
value?:
|
|
139
|
-
|
|
140
|
-
readOnly?: boolean;
|
|
141
|
-
disabled?: boolean;
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
};
|
|
146
|
-
declare const _default$1: <T>({ label, helpText, readOnly, disabled, error, createDeleteText, onChange, placeholder, value, className, testId, id, children, isLoading, isNewItemDuplicate, ...props }: InputFieldProps<T>, ref: React__default.ForwardedRef<HTMLInputElement>) => JSX.Element;
|
|
133
|
+
createDeleteText?: ((value: string) => string) | undefined;
|
|
134
|
+
helpText?: string | undefined;
|
|
135
|
+
error?: string | undefined;
|
|
136
|
+
testId?: string | undefined;
|
|
137
|
+
id?: string | undefined;
|
|
138
|
+
} & Pick<{
|
|
139
|
+
asChild?: boolean | undefined;
|
|
140
|
+
} & Omit<React__default.InputHTMLAttributes<HTMLInputElement>, "disabled" | "readOnly" | "onKeyDown"> & React__default.RefAttributes<HTMLInputElement>, "placeholder"> & Pick<{
|
|
141
|
+
value?: string[] | undefined;
|
|
142
|
+
onChange?: ((newValue: string[]) => void) | undefined;
|
|
143
|
+
readOnly?: boolean | undefined;
|
|
144
|
+
disabled?: boolean | undefined;
|
|
145
|
+
} & Omit<React__default.HTMLAttributes<HTMLUListElement>, "onChange"> & React__default.RefAttributes<HTMLUListElement>, "disabled" | "readOnly" | "value" | "onChange"> & Pick<React__default.HTMLProps<HTMLDivElement> & {
|
|
146
|
+
children?: React__default.ReactNode;
|
|
147
|
+
}, "className"> & React__default.RefAttributes<HTMLInputElement>>;
|
|
147
148
|
|
|
148
|
-
declare type Props$
|
|
149
|
+
declare type Props$4<T extends Record<string, unknown>> = Omit<ComponentProps<typeof ChipInputField>, "error" | "createDeleteText" | "label" | "defaultChecked" | "required" | keyof ControllerRenderProps> & {
|
|
149
150
|
rules?: ComponentProps<typeof Controller>["rules"];
|
|
150
151
|
name: Path<T>;
|
|
151
152
|
label?: string;
|
|
152
153
|
defaultValue?: string[];
|
|
153
154
|
createDeleteText?: (value: string) => string;
|
|
154
|
-
optionFactory?: (val: any) => Option<unknown>;
|
|
155
155
|
};
|
|
156
156
|
/**
|
|
157
157
|
* @beta
|
|
158
158
|
* @since 2.44.0
|
|
159
159
|
*/
|
|
160
|
-
declare function ControlledChipInputField<T extends Record<string, unknown>>({ name, label, helpText, rules, testId, defaultValue, readOnly, placeholder, className, createDeleteText,
|
|
160
|
+
declare function ControlledChipInputField<T extends Record<string, unknown>>({ name, label, helpText, rules, testId, defaultValue, readOnly, placeholder, className, createDeleteText, ...props }: Props$4<T>): JSX.Element;
|
|
161
161
|
|
|
162
162
|
declare type ArrayItemType<T> = T extends Array<infer U> ? U : unknown;
|
|
163
163
|
declare type RenderProps$2<T extends Record<string, unknown>, PATH extends Path<T>> = {
|
|
@@ -165,7 +165,7 @@ declare type RenderProps$2<T extends Record<string, unknown>, PATH extends Path<
|
|
|
165
165
|
index: number;
|
|
166
166
|
remove: () => void;
|
|
167
167
|
};
|
|
168
|
-
declare type Props$
|
|
168
|
+
declare type Props$3<T extends Record<string, unknown>, PATH extends Path<T>> = {
|
|
169
169
|
withDelete?: boolean;
|
|
170
170
|
children: ((renderProps: RenderProps$2<T, PATH>) => React__default.ReactNode | React__default.ReactNode[]) | React__default.ReactNode;
|
|
171
171
|
};
|
|
@@ -173,14 +173,14 @@ declare type Props$4<T extends Record<string, unknown>, PATH extends Path<T>> =
|
|
|
173
173
|
* @beta
|
|
174
174
|
* @since 2.43.0
|
|
175
175
|
*/
|
|
176
|
-
declare function ControlledList<T extends Record<string, unknown>, PATH extends Path<T>>({ withDelete, children, }: Props$
|
|
176
|
+
declare function ControlledList<T extends Record<string, unknown>, PATH extends Path<T>>({ withDelete, children, }: Props$3<T, PATH>): JSX.Element;
|
|
177
177
|
|
|
178
178
|
declare type RenderProps$1<T extends Record<string, unknown>, PATH extends Path<T>> = {
|
|
179
179
|
value: PathValue<T, PATH>;
|
|
180
180
|
index: number;
|
|
181
181
|
remove: () => void;
|
|
182
182
|
};
|
|
183
|
-
declare type Props$
|
|
183
|
+
declare type Props$2<T extends Record<string, unknown>, PATH extends Path<T>> = {
|
|
184
184
|
withDelete?: boolean;
|
|
185
185
|
children: ((renderProps: RenderProps$1<T, PATH>) => React__default.ReactNode | React__default.ReactNode[]) | React__default.ReactNode;
|
|
186
186
|
className?: string;
|
|
@@ -189,10 +189,10 @@ declare type Props$3<T extends Record<string, unknown>, PATH extends Path<T>> =
|
|
|
189
189
|
* @beta
|
|
190
190
|
* @since 2.43.0
|
|
191
191
|
*/
|
|
192
|
-
declare function ControlledTable<T extends Record<string, unknown>, PATH extends Path<T>>({ withDelete, children, className, }: Props$
|
|
192
|
+
declare function ControlledTable<T extends Record<string, unknown>, PATH extends Path<T>>({ withDelete, children, className, }: Props$2<T, PATH>): JSX.Element;
|
|
193
193
|
|
|
194
194
|
declare type RenderProps<T extends Record<string, unknown>> = Omit<UseFormReturn<T>, "register" | "unregister" | "handleSubmit" | "control">;
|
|
195
|
-
declare type Props$
|
|
195
|
+
declare type Props$1<FormType extends Record<string, unknown>, DefaultValues extends FormType> = {
|
|
196
196
|
children: ((renderProps: RenderProps<FormType>) => React__default.ReactNode | React__default.ReactNode[]) | React__default.ReactNode;
|
|
197
197
|
defaultValues: DefaultValues;
|
|
198
198
|
submit?: (data: FormType, append: UseFieldArrayReturn["append"]) => unknown;
|
|
@@ -205,67 +205,7 @@ declare type Props$2<FormType extends Record<string, unknown>, DefaultValues ext
|
|
|
205
205
|
* @beta
|
|
206
206
|
* @since 2.43.0
|
|
207
207
|
*/
|
|
208
|
-
declare function AddListEntryForm<FormType extends Record<string, unknown>, DefaultValues extends FormType>({ children, defaultValues, submit, disableSubmitWhenDirty, }: Props$
|
|
209
|
-
|
|
210
|
-
declare type BaseProps<T> = {
|
|
211
|
-
className?: string;
|
|
212
|
-
onKeyDown?: KeyboardEventHandler<HTMLElement>;
|
|
213
|
-
value?: Option<T> | null;
|
|
214
|
-
onChange?: (value?: Option<T>) => void;
|
|
215
|
-
onBlur?: () => void;
|
|
216
|
-
disabled?: boolean;
|
|
217
|
-
defaultValue?: Option<T>;
|
|
218
|
-
nullable?: boolean;
|
|
219
|
-
readOnly?: boolean;
|
|
220
|
-
onQueryChange?: (value: string) => void;
|
|
221
|
-
id?: string;
|
|
222
|
-
placeholder?: string;
|
|
223
|
-
"aria-describedby"?: string;
|
|
224
|
-
"aria-labelledby"?: string;
|
|
225
|
-
"aria-label"?: string;
|
|
226
|
-
testId?: string;
|
|
227
|
-
ref?: Ref<HTMLInputElement>;
|
|
228
|
-
form?: string;
|
|
229
|
-
name?: string;
|
|
230
|
-
};
|
|
231
|
-
declare type ComboboxProps<T> = (BaseProps<T> & {
|
|
232
|
-
options: Array<Option<T>> | ((query: string) => Array<Option<T>> | Promise<Array<Option<T>>>);
|
|
233
|
-
children?: (option: Option<T>, index: number) => ReactElement;
|
|
234
|
-
}) | (BaseProps<T> & {
|
|
235
|
-
children: Array<ReactElement | null>;
|
|
236
|
-
options?: never;
|
|
237
|
-
});
|
|
238
|
-
/**
|
|
239
|
-
* @beta
|
|
240
|
-
* @since 2.45.0
|
|
241
|
-
*/
|
|
242
|
-
declare function ComboboxComponent<T>(props: ComboboxProps<T>, ref: ForwardedRef<HTMLInputElement>): JSX.Element;
|
|
243
|
-
declare const Combobox: typeof ComboboxComponent & {
|
|
244
|
-
Option: styled_components.StyledComponent<"li", any, {
|
|
245
|
-
className: "px-3 py-2 has-text-inherit is-clickable is-size-6 is-borderless has-background-transparent";
|
|
246
|
-
} & {
|
|
247
|
-
isActive: boolean;
|
|
248
|
-
}, "className">;
|
|
249
|
-
};
|
|
250
|
-
|
|
251
|
-
declare const _default: <T>({ label, helpText, error, className, isLoading, ...props }: ComboboxProps<T> & {
|
|
252
|
-
label: string;
|
|
253
|
-
helpText?: string | undefined;
|
|
254
|
-
error?: string | undefined;
|
|
255
|
-
isLoading?: boolean | undefined;
|
|
256
|
-
}, ref: React__default.ForwardedRef<HTMLInputElement>) => JSX.Element;
|
|
257
|
-
|
|
258
|
-
declare type Props$1<T extends Record<string, unknown>> = Omit<Parameters<typeof _default>[0], "error" | "label" | keyof ControllerRenderProps> & {
|
|
259
|
-
rules?: ComponentProps<typeof Controller>["rules"];
|
|
260
|
-
name: Path<T>;
|
|
261
|
-
label?: string;
|
|
262
|
-
optionFactory?: (val: any) => Option<unknown>;
|
|
263
|
-
};
|
|
264
|
-
/**
|
|
265
|
-
* @beta
|
|
266
|
-
* @since 2.45.0
|
|
267
|
-
*/
|
|
268
|
-
declare function ControlledComboboxField<T extends Record<string, unknown>>({ name, label, helpText, rules, testId, defaultValue, readOnly, className, optionFactory, ...props }: Props$1<T>): JSX.Element;
|
|
208
|
+
declare function AddListEntryForm<FormType extends Record<string, unknown>, DefaultValues extends FormType>({ children, defaultValues, submit, disableSubmitWhenDirty, }: Props$1<FormType, DefaultValues>): JSX.Element | null;
|
|
269
209
|
|
|
270
210
|
declare type Props<T extends HalRepresentation> = Omit<ComponentProps<typeof Form$1<T>>, "onSubmit" | "defaultValues" | "readOnly" | "successMessageFallback"> & {
|
|
271
211
|
link: string;
|
|
@@ -331,7 +271,6 @@ declare const Form: typeof Form$1 & {
|
|
|
331
271
|
} & React.HTMLAttributes<HTMLTableCellElement>>;
|
|
332
272
|
};
|
|
333
273
|
ChipInput: typeof ControlledChipInputField;
|
|
334
|
-
Combobox: typeof ControlledComboboxField;
|
|
335
274
|
};
|
|
336
275
|
|
|
337
|
-
export {
|
|
276
|
+
export { ChipInputField, ConfigurationForm, Form, Select, SelectField, useCreateResource, useDeleteResource, useUpdateResource };
|