@ostack.tech/ui-kform 1.1.0 → 1.2.0-beta.1
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/chunks/{en-D4xMcf6Q.js → en-BHlLXSzh.js} +4 -16
- package/dist/chunks/en-BHlLXSzh.js.map +1 -0
- package/dist/locales/en-GB.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/fr-FR.js +5 -17
- package/dist/locales/fr-FR.js.map +1 -1
- package/dist/locales/pt-PT.js +3 -15
- package/dist/locales/pt-PT.js.map +1 -1
- package/dist/ostack-ui-kform.js +15299 -4434
- package/dist/ostack-ui-kform.js.map +1 -1
- package/package.json +16 -14
- package/scss/components/Annexes/_Annexes-variables.scss +4 -9
- package/scss/components/Annexes/_Annexes.scss +9 -15
- package/scss/components/FormApp/_FormApp.scss +1 -4
- package/scss/components/FormPages/_FormPages-variables.scss +8 -27
- package/scss/components/FormPages/_FormPages.scss +11 -33
- package/scss/components/IssuesPanel/_IssuesPanel-variables.scss +3 -8
- package/scss/components/IssuesPanel/_IssuesPanel.scss +3 -8
- package/types/components/Annexes/Annex.d.ts +26 -37
- package/types/components/Annexes/Annexes.d.ts +8 -10
- package/types/components/Annexes/AnnexesContext.d.ts +1 -1
- package/types/components/Annexes/AnnexesManager.d.ts +8 -12
- package/types/components/CheckboxControl/CheckboxControl.d.ts +9 -19
- package/types/components/CheckboxGroupControl/CheckboxGroupControl.d.ts +14 -31
- package/types/components/CheckboxGroupControl/CheckboxGroupControlItem.d.ts +1 -2
- package/types/components/ControlField/ControlField.d.ts +6 -6
- package/types/components/DateControl/DateControl.d.ts +13 -18
- package/types/components/DateRangeControl/DateRangeControl.d.ts +16 -22
- package/types/components/DebugInfo/DebugInfo.d.ts +3 -4
- package/types/components/DebugInfo/DebugInfoControlAddonTrigger.d.ts +1 -1
- package/types/components/FileControl/FileControl.d.ts +16 -22
- package/types/components/FileControl/FileControlDownloadAddon.d.ts +2 -2
- package/types/components/FileControl/FileControlViewAddon.d.ts +1 -1
- package/types/components/FormApp/FormApp.d.ts +25 -34
- package/types/components/FormApp/FormAppContext.d.ts +20 -44
- package/types/components/FormApp/FormAppIssueMessages.d.ts +6 -8
- package/types/components/FormApp/FormAppStatus.d.ts +1 -1
- package/types/components/FormPages/FormPage.d.ts +12 -20
- package/types/components/FormPages/FormPages.d.ts +8 -17
- package/types/components/FormPages/FormPagesContext.d.ts +1 -1
- package/types/components/FormPages/FormPagesNavigation.d.ts +3 -3
- package/types/components/FormStepper/FormStep.d.ts +8 -9
- package/types/components/FormStepper/FormStepper.d.ts +14 -18
- package/types/components/FormStepper/FormStepperContext.d.ts +1 -1
- package/types/components/IssueMessage/IssueMessage.d.ts +1 -1
- package/types/components/IssueMessages/IssueMessages.d.ts +17 -25
- package/types/components/IssuesPanel/IssuesPanel.d.ts +11 -15
- package/types/components/IssuesPanel/IssuesPanelControls.d.ts +1 -1
- package/types/components/IssuesPopover/IssuesPopover.d.ts +4 -4
- package/types/components/LoadAction/LoadAction.d.ts +7 -10
- package/types/components/NumericControl/NumericControl.d.ts +15 -21
- package/types/components/PathLink/PathLink.d.ts +4 -5
- package/types/components/PrintAction/PrintAction.d.ts +7 -11
- package/types/components/RadioGroupControl/RadioGroupControl.d.ts +12 -21
- package/types/components/RadioGroupControl/RadioGroupControlItem.d.ts +2 -2
- package/types/components/ResetOnChange/ResetOnChange.d.ts +6 -14
- package/types/components/ResetOnChange/index.d.ts +1 -1
- package/types/components/ResetOnChange/useResetOnChange.d.ts +22 -32
- package/types/components/SaveAction/SaveAction.d.ts +22 -30
- package/types/components/SelectControl/SelectControl.d.ts +11 -21
- package/types/components/SelectControl/SelectControlItem.d.ts +2 -2
- package/types/components/SelectControl/SelectControlItemGroup.d.ts +2 -3
- package/types/components/SelectMultipleControl/SelectMultipleControl.d.ts +17 -35
- package/types/components/SelectMultipleControl/SelectMultipleControlItem.d.ts +1 -2
- package/types/components/SelectMultipleControl/SelectMultipleControlItemGroup.d.ts +2 -2
- package/types/components/SubmitAction/SubmitAction.d.ts +19 -33
- package/types/components/TableControl/TableControl.d.ts +27 -41
- package/types/components/TableControl/TableControlActionsColumn.d.ts +3 -5
- package/types/components/TableControl/TableControlAddRowTrigger.d.ts +7 -13
- package/types/components/TableControl/TableControlApi.d.ts +4 -4
- package/types/components/TableControl/TableControlColumn.d.ts +5 -8
- package/types/components/TableControl/TableControlColumnFns.d.ts +21 -31
- package/types/components/TableControl/TableControlColumnGroup.d.ts +3 -6
- package/types/components/TableControl/TableControlColumns.d.ts +4 -4
- package/types/components/TableControl/TableControlContent.d.ts +1 -1
- package/types/components/TableControl/TableControlIndexColumn.d.ts +2 -2
- package/types/components/TableControl/TableControlRemoveRowTrigger.d.ts +9 -16
- package/types/components/TextControl/TextControl.d.ts +7 -13
- package/types/components/UnknownValue/UnknownValue.d.ts +1 -1
- package/types/components/ValidateAction/ValidateAction.d.ts +7 -10
- package/types/providers/ActivePathProvider/ActivePathProvider.d.ts +4 -7
- package/types/providers/LocalizationProvider/LocalizationProvider.d.ts +1 -4
- package/types/providers/LocalizationProvider/useLocale.d.ts +1 -4
- package/types/providers/PrefixSuffixProvider/PrefixSuffixProvider.d.ts +1 -1
- package/types/providers/PrefixSuffixProvider/defaultPrefixSuffix.d.ts +3 -3
- package/types/providers/PrefixSuffixProvider/usePrefix.d.ts +1 -4
- package/types/utils/mostSpecificPath.d.ts +4 -6
- package/types/utils/pathSpecificity.d.ts +7 -8
- package/types/utils/selectionTransformations.d.ts +2 -8
- package/types/utils/useControlAutofocus.d.ts +6 -8
- package/types/utils/useControlIssues.d.ts +4 -4
- package/types/utils/useFormLoader.d.ts +24 -31
- package/types/utils/useFormSaver.d.ts +29 -34
- package/types/utils/useFormValidator.d.ts +13 -20
- package/types/utils/useRegisterControl.d.ts +1 -1
- package/types/utils/useTemporalStringTransformer.d.ts +4 -10
- package/dist/chunks/en-D4xMcf6Q.js.map +0 -1
|
@@ -5,16 +5,13 @@ export declare const DEFAULT_LOAD_KEYBINDS = "$mod+O";
|
|
|
5
5
|
/** Properties of the load action. */
|
|
6
6
|
export interface LoadActionProps<T = unknown> extends Partial<ActionButtonProps>, Omit<FormLoaderOptions<T>, "id"> {
|
|
7
7
|
/**
|
|
8
|
-
* Keybinds for triggering the action. Set to `null` to disable the keyboard
|
|
9
|
-
* shortcut.
|
|
8
|
+
* Keybinds for triggering the action. Set to `null` to disable the keyboard shortcut.
|
|
10
9
|
*
|
|
11
|
-
* Keyboard handling is built on top of the
|
|
12
|
-
* [`tinykeys`
|
|
13
|
-
* information on keybinding syntax, read the [`tinykeys`
|
|
10
|
+
* Keyboard handling is built on top of the [`tinykeys`](https://jamiebuilds.github.io/tinykeys)
|
|
11
|
+
* library. For information on keybinding syntax, read the [`tinykeys`
|
|
14
12
|
* documentation](https://github.com/jamiebuilds/tinykeys).
|
|
15
13
|
*
|
|
16
|
-
* Defaults to the keybinds defined by the current locale or to
|
|
17
|
-
* {@link DEFAULT_LOAD_KEYBINDS}.
|
|
14
|
+
* Defaults to the keybinds defined by the current locale or to {@link DEFAULT_LOAD_KEYBINDS}.
|
|
18
15
|
*/
|
|
19
16
|
keybinds?: string | string[] | null;
|
|
20
17
|
/**
|
|
@@ -24,8 +21,8 @@ export interface LoadActionProps<T = unknown> extends Partial<ActionButtonProps>
|
|
|
24
21
|
*/
|
|
25
22
|
showWhenReadOnly?: boolean;
|
|
26
23
|
/**
|
|
27
|
-
* By specifying a filesystem ID, the user agent can remember different
|
|
28
|
-
*
|
|
24
|
+
* By specifying a filesystem ID, the user agent can remember different directories for different
|
|
25
|
+
* IDs.
|
|
29
26
|
*/
|
|
30
27
|
fileSystemId?: string;
|
|
31
28
|
}
|
|
@@ -49,4 +46,4 @@ export interface LoadActionProps<T = unknown> extends Partial<ActionButtonProps>
|
|
|
49
46
|
* }
|
|
50
47
|
* ```
|
|
51
48
|
*/
|
|
52
|
-
export declare function LoadAction<T = unknown>({ label, keybinds, showWhenReadOnly, fileSystemId, loading, disabled, onClick, decode, path, extensions, mimeTypes, description, startIn, onBeforeLoad, onAfterLoad, setPristineOnLoad, setTouchedOnLoad, validateOnLoad, successMessage, errorMessage, ...otherProps }: LoadActionProps<T>): false | import("react").JSX.Element | undefined;
|
|
49
|
+
export declare function LoadAction<T = unknown>({ label: labelProp, keybinds: keybindsProp, showWhenReadOnly, fileSystemId, loading, disabled, onClick, decode, path, extensions, mimeTypes, description, startIn, onBeforeLoad, onAfterLoad, setPristineOnLoad, setTouchedOnLoad, validateOnLoad, successMessage, errorMessage, ...otherProps }: LoadActionProps<T>): false | import("react").JSX.Element | undefined;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { Path } from "@ostack.tech/kform";
|
|
2
2
|
import { type Numeric, type NumericInputController, type NumericInputOptions } from "@ostack.tech/kform-react";
|
|
3
|
-
import {
|
|
4
|
-
import { type
|
|
3
|
+
import { type NumericInputProps } from "@ostack.tech/ui";
|
|
4
|
+
import { type ReactNode, type Ref } from "react";
|
|
5
5
|
import type { IssueMessagesByCode, IssueMessagesProps } from "../IssueMessages";
|
|
6
6
|
/** Properties of the numeric control component. */
|
|
7
|
-
export interface NumericControlProps<T extends Numeric | null = Numeric | null> extends Omit<NumericInputOptions<T
|
|
7
|
+
export interface NumericControlProps<T extends Numeric | null = Numeric | null> extends Omit<NumericInputOptions<T>, "enabled" | "formatFromString" | "parseToString">, Omit<NumericInputProps, "defaultValue" | "value" | "onValueChange" | "valueIsUnformattedString" | "status" | "validate" | "validationMode"> {
|
|
8
8
|
/** Path to the value. */
|
|
9
9
|
path?: string | Path;
|
|
10
10
|
/**
|
|
@@ -14,8 +14,7 @@ export interface NumericControlProps<T extends Numeric | null = Numeric | null>
|
|
|
14
14
|
*/
|
|
15
15
|
issueMessages?: IssueMessagesByCode;
|
|
16
16
|
/**
|
|
17
|
-
* Label to use in the issues panel when displaying issues associated with
|
|
18
|
-
* this field.
|
|
17
|
+
* Label to use in the issues panel when displaying issues associated with this field.
|
|
19
18
|
*
|
|
20
19
|
* This label has priority over the field's `Label`.
|
|
21
20
|
*/
|
|
@@ -27,28 +26,25 @@ export interface NumericControlProps<T extends Numeric | null = Numeric | null>
|
|
|
27
26
|
*/
|
|
28
27
|
displayIssues?: boolean;
|
|
29
28
|
/**
|
|
30
|
-
* Whether to prevent the auto-focusing behaviour that causes this control to
|
|
31
|
-
*
|
|
29
|
+
* Whether to prevent the auto-focusing behaviour that causes this control to be focused when the
|
|
30
|
+
* form app's `focus` is called with this control's path.
|
|
32
31
|
*
|
|
33
|
-
* Preventing this behaviour is useful when multiple controls for the same
|
|
34
|
-
*
|
|
32
|
+
* Preventing this behaviour is useful when multiple controls for the same path are rendered at
|
|
33
|
+
* once, and only one of them should be focused.
|
|
35
34
|
*
|
|
36
35
|
* @default false
|
|
37
36
|
*/
|
|
38
37
|
preventAutoFocus?: boolean;
|
|
39
|
-
/**
|
|
40
|
-
* Whether to show debug information. This property has no effect in
|
|
41
|
-
* production builds.
|
|
42
|
-
*/
|
|
38
|
+
/** Whether to show debug information. This property has no effect in production builds. */
|
|
43
39
|
debug?: boolean;
|
|
44
40
|
/** Reference to the control's API. */
|
|
45
|
-
apiRef?: Ref<NumericInputController<T
|
|
41
|
+
apiRef?: Ref<NumericInputController<T> | undefined>;
|
|
46
42
|
/** Properties to pass to the `IssueMessages` component. */
|
|
47
43
|
issueMessagesProps?: Omit<IssueMessagesProps, "path" | "issues" | "messages" | "unwrapped">;
|
|
48
44
|
}
|
|
49
45
|
/**
|
|
50
|
-
* The numeric control component is a KForm form control for values with
|
|
51
|
-
*
|
|
46
|
+
* The numeric control component is a KForm form control for values with (typically nullable)
|
|
47
|
+
* numeric schemas. It is built on top of the
|
|
52
48
|
* [`NumericInput`](/docs/ostack-ui-forms-numeric-input--docs) component.
|
|
53
49
|
*
|
|
54
50
|
* The following (typically
|
|
@@ -75,8 +71,8 @@ export interface NumericControlProps<T extends Numeric | null = Numeric | null>
|
|
|
75
71
|
* - [`Scale`](https://kform.ostack.tech/api/packages/kform/tech.ostack.kform.validations/-scale/index.html)/[`MaxScale`](https://kform.ostack.tech/api/packages/kform/tech.ostack.kform.validations/-max-scale/index.html):
|
|
76
72
|
* Sets the `scale` property.
|
|
77
73
|
*
|
|
78
|
-
* The `valueIsInteger` property is further automatically set for integer
|
|
79
|
-
*
|
|
74
|
+
* The `valueIsInteger` property is further automatically set for integer schemas (`Byte`, `Char`,
|
|
75
|
+
* `Short`, `Int`, `Long`, and `BigInteger`).
|
|
80
76
|
*
|
|
81
77
|
* Example usage:
|
|
82
78
|
*
|
|
@@ -84,9 +80,7 @@ export interface NumericControlProps<T extends Numeric | null = Numeric | null>
|
|
|
84
80
|
* import { NumericControl } from "@ostack.tech/ui-kform";
|
|
85
81
|
*
|
|
86
82
|
* function QuantityControl() {
|
|
87
|
-
* return
|
|
88
|
-
* <NumericControl path="/quantity" placeholder="Number of items…" />
|
|
89
|
-
* );
|
|
83
|
+
* return <NumericControl path="/quantity" placeholder="Number of items…" />;
|
|
90
84
|
* }
|
|
91
85
|
* ```
|
|
92
86
|
*/
|
|
@@ -10,9 +10,8 @@ export interface PathLinkOwnProps extends LinkOwnProps {
|
|
|
10
10
|
to: string | Path;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
* The path link component creates a link (although typically rendered as a
|
|
14
|
-
*
|
|
15
|
-
* built on top of the [`Link`
|
|
13
|
+
* The path link component creates a link (although typically rendered as a `<button>`) to a part of
|
|
14
|
+
* the form identified by the provided path. It is built on top of the [`Link`
|
|
16
15
|
* component](/docs/ostack-ui-typography-link--docs).
|
|
17
16
|
*
|
|
18
17
|
* Example usage:
|
|
@@ -24,8 +23,8 @@ export interface PathLinkOwnProps extends LinkOwnProps {
|
|
|
24
23
|
* function ProfileNotice() {
|
|
25
24
|
* return (
|
|
26
25
|
* <Alert>
|
|
27
|
-
* Your profile URL will be generated using your handle. To change it,
|
|
28
|
-
*
|
|
26
|
+
* Your profile URL will be generated using your handle. To change it, update your{" "}
|
|
27
|
+
* <PathLink to="/username">username</PathLink>.
|
|
29
28
|
* </Alert>
|
|
30
29
|
* );
|
|
31
30
|
* }
|
|
@@ -4,16 +4,13 @@ export declare const DEFAULT_PRINT_KEYBINDS = "$mod+P";
|
|
|
4
4
|
/** Properties of the print action. */
|
|
5
5
|
export interface PrintActionProps extends Partial<ActionButtonProps> {
|
|
6
6
|
/**
|
|
7
|
-
* Keybinds for triggering the action. Set to `null` to disable the keyboard
|
|
8
|
-
* shortcut.
|
|
7
|
+
* Keybinds for triggering the action. Set to `null` to disable the keyboard shortcut.
|
|
9
8
|
*
|
|
10
|
-
* Keyboard handling is built on top of the
|
|
11
|
-
* [`tinykeys`
|
|
12
|
-
* information on keybinding syntax, read the [`tinykeys`
|
|
9
|
+
* Keyboard handling is built on top of the [`tinykeys`](https://jamiebuilds.github.io/tinykeys)
|
|
10
|
+
* library. For information on keybinding syntax, read the [`tinykeys`
|
|
13
11
|
* documentation](https://github.com/jamiebuilds/tinykeys).
|
|
14
12
|
*
|
|
15
|
-
* Defaults to the keybinds defined by the current locale or to
|
|
16
|
-
* `DEFAULT_PRINT_KEYBINDS`.
|
|
13
|
+
* Defaults to the keybinds defined by the current locale or to `DEFAULT_PRINT_KEYBINDS`.
|
|
17
14
|
*/
|
|
18
15
|
keybinds?: string | string[] | null;
|
|
19
16
|
/**
|
|
@@ -28,9 +25,8 @@ export interface PrintActionProps extends Partial<ActionButtonProps> {
|
|
|
28
25
|
* [`Button`](/docs/ostack-ui-forms-button--docs) and
|
|
29
26
|
* [`PrinterTrigger`](/docs/ostack-ui-utilities-printer--docs) components.
|
|
30
27
|
*
|
|
31
|
-
* To print a whole form application, requires the `<FormApp>` component to be
|
|
32
|
-
*
|
|
33
|
-
* annexes, pages, and form controls.
|
|
28
|
+
* To print a whole form application, requires the `<FormApp>` component to be wrapped within a
|
|
29
|
+
* `<Printer>`, and for the `<PrinterContent>` to wrap all annexes, pages, and form controls.
|
|
34
30
|
*
|
|
35
31
|
* Example usage:
|
|
36
32
|
*
|
|
@@ -63,4 +59,4 @@ export interface PrintActionProps extends Partial<ActionButtonProps> {
|
|
|
63
59
|
* }
|
|
64
60
|
* ```
|
|
65
61
|
*/
|
|
66
|
-
export declare function PrintAction({ label, keybinds, showWhenReadOnly, disabled, loading, onClick, ...otherProps }: PrintActionProps): false | import("react").JSX.Element;
|
|
62
|
+
export declare function PrintAction({ label: labelProp, keybinds: keybindsProp, showWhenReadOnly, disabled, loading, onClick, ...otherProps }: PrintActionProps): false | import("react").JSX.Element;
|
|
@@ -17,8 +17,7 @@ export interface RadioGroupControlProps<T = unknown> extends Omit<InputOptions<T
|
|
|
17
17
|
*/
|
|
18
18
|
issueMessages?: IssueMessagesByCode;
|
|
19
19
|
/**
|
|
20
|
-
* Label to use in the issues panel when displaying issues associated with
|
|
21
|
-
* this field.
|
|
20
|
+
* Label to use in the issues panel when displaying issues associated with this field.
|
|
22
21
|
*
|
|
23
22
|
* This label has priority over the field's `Label`.
|
|
24
23
|
*/
|
|
@@ -32,21 +31,18 @@ export interface RadioGroupControlProps<T = unknown> extends Omit<InputOptions<T
|
|
|
32
31
|
/** Label shown when the control's value isn't one of the existing options. */
|
|
33
32
|
unknownValueLabel?: ReactNode;
|
|
34
33
|
/**
|
|
35
|
-
* Whether to prevent the auto-focusing behaviour that causes this control to
|
|
36
|
-
*
|
|
34
|
+
* Whether to prevent the auto-focusing behaviour that causes this control to be focused when the
|
|
35
|
+
* form app's `focus` is called with this control's path.
|
|
37
36
|
*
|
|
38
|
-
* Preventing this behaviour is useful when multiple controls for the same
|
|
39
|
-
*
|
|
37
|
+
* Preventing this behaviour is useful when multiple controls for the same path are rendered at
|
|
38
|
+
* once, and only one of them should be focused.
|
|
40
39
|
*
|
|
41
40
|
* @default false
|
|
42
41
|
*/
|
|
43
42
|
preventAutoFocus?: boolean;
|
|
44
43
|
/** Radio group control children. */
|
|
45
44
|
children?: ReactNode;
|
|
46
|
-
/**
|
|
47
|
-
* Whether to show debug information. This property has no effect in
|
|
48
|
-
* production builds.
|
|
49
|
-
*/
|
|
45
|
+
/** Whether to show debug information. This property has no effect in production builds. */
|
|
50
46
|
debug?: boolean;
|
|
51
47
|
/** Reference to the control's API. */
|
|
52
48
|
apiRef?: Ref<InputController<T, string, ComponentRef<typeof RadioGroup>> | undefined>;
|
|
@@ -54,16 +50,14 @@ export interface RadioGroupControlProps<T = unknown> extends Omit<InputOptions<T
|
|
|
54
50
|
issueMessagesProps?: Omit<IssueMessagesProps, "path" | "issues" | "messages" | "unwrapped">;
|
|
55
51
|
}
|
|
56
52
|
/**
|
|
57
|
-
* The radio group control component is a KForm form control for values with any
|
|
58
|
-
* type of (typically
|
|
53
|
+
* The radio group control component is a KForm form control for values with any type of (typically
|
|
59
54
|
* [nullable](https://kform.ostack.tech/api/packages/kform/tech.ostack.kform.schemas/-nullable-schema/index.html))
|
|
60
|
-
* schema. It is built on top of the
|
|
61
|
-
*
|
|
55
|
+
* schema. It is built on top of the [`RadioGroup`](/docs/ostack-ui-forms-radio-group--docs)
|
|
56
|
+
* component.
|
|
62
57
|
*
|
|
63
58
|
* It composes the following subcomponent:
|
|
64
59
|
*
|
|
65
|
-
* - `RadioGroupControlItem`: Component used to define an item of the radio group
|
|
66
|
-
* control.
|
|
60
|
+
* - `RadioGroupControlItem`: Component used to define an item of the radio group control.
|
|
67
61
|
*
|
|
68
62
|
* The following built-in KForm validation affects this control:
|
|
69
63
|
*
|
|
@@ -73,10 +67,7 @@ export interface RadioGroupControlProps<T = unknown> extends Omit<InputOptions<T
|
|
|
73
67
|
* Example usage:
|
|
74
68
|
*
|
|
75
69
|
* ```tsx
|
|
76
|
-
* import {
|
|
77
|
-
* RadioGroupControl,
|
|
78
|
-
* RadioGroupControlItem,
|
|
79
|
-
* } from "@ostack.tech/ui-kform";
|
|
70
|
+
* import { RadioGroupControl, RadioGroupControlItem } from "@ostack.tech/ui-kform";
|
|
80
71
|
*
|
|
81
72
|
* function ShirtSizeControl() {
|
|
82
73
|
* return (
|
|
@@ -90,4 +81,4 @@ export interface RadioGroupControlProps<T = unknown> extends Omit<InputOptions<T
|
|
|
90
81
|
* }
|
|
91
82
|
* ```
|
|
92
83
|
*/
|
|
93
|
-
export declare function RadioGroupControl<T = unknown>({ path, options, issueMessages, issuesPanelLabel, displayIssues, unknownValueLabel, preventAutoFocus, apiRef, issueMessagesProps, formManager, onInitialized, onFormManagerEvent, onValueChange, onValidationStatusChange, onDisplayStatusChange, onDirtyStatusChange, onTouchedStatusChange, required, loading, showSpinner, disabled, readOnly, showClearButton, endAdornment, onFocus, onBlurToOutside, children, debug, ref, ...otherProps }: RadioGroupControlProps<T>): import("react").JSX.Element;
|
|
84
|
+
export declare function RadioGroupControl<T = unknown>({ path, options: optionsProp, issueMessages, issuesPanelLabel, displayIssues, unknownValueLabel: unknownValueLabelProp, preventAutoFocus, apiRef, issueMessagesProps, formManager, onInitialized, onFormManagerEvent, onValueChange, onValidationStatusChange, onDisplayStatusChange, onDirtyStatusChange, onTouchedStatusChange, required, loading, showSpinner, disabled, readOnly, showClearButton, endAdornment, onFocus, onBlurToOutside, children, debug, ref, ...otherProps }: RadioGroupControlProps<T>): import("react").JSX.Element;
|
|
@@ -19,7 +19,7 @@ export interface RadioGroupControlItemProps<T = unknown> extends Omit<RadioGroup
|
|
|
19
19
|
/**
|
|
20
20
|
* Definition of a radio group control item.
|
|
21
21
|
*
|
|
22
|
-
* This component doesn't actually render anything by itself; it is used by the
|
|
23
|
-
*
|
|
22
|
+
* This component doesn't actually render anything by itself; it is used by the `RadioGroupControl`
|
|
23
|
+
* component to automatically create the `options` array.
|
|
24
24
|
*/
|
|
25
25
|
export declare function RadioGroupControlItem(_props: RadioGroupControlItemProps): null;
|
|
@@ -8,15 +8,12 @@ export interface ResetOnChangeProps extends UseResetOnChangeOptions {
|
|
|
8
8
|
children?: ReactNode;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
|
-
* Component used to reset path(s) to their initial value when the value of
|
|
12
|
-
*
|
|
13
|
-
* the `useResetOnChange` hook.
|
|
11
|
+
* Component used to reset path(s) to their initial value when the value of controls within it
|
|
12
|
+
* change (according to the `when` function). Built on top of the `useResetOnChange` hook.
|
|
14
13
|
*
|
|
15
|
-
* Optionally requests user-confirmation via alert dialog if `showConfirmation`
|
|
16
|
-
* is provided.
|
|
14
|
+
* Optionally requests user-confirmation via alert dialog if `showConfirmation` is provided.
|
|
17
15
|
*
|
|
18
|
-
* When using wildcards in `reset`, certain fields may be excluded via
|
|
19
|
-
* `exclude`.
|
|
16
|
+
* When using wildcards in `reset`, certain fields may be excluded via `exclude`.
|
|
20
17
|
*
|
|
21
18
|
* Example usage:
|
|
22
19
|
*
|
|
@@ -25,13 +22,8 @@ export interface ResetOnChangeProps extends UseResetOnChangeOptions {
|
|
|
25
22
|
*
|
|
26
23
|
* function SameAddressControl() {
|
|
27
24
|
* return (
|
|
28
|
-
* <ResetOnChange
|
|
29
|
-
*
|
|
30
|
-
* when={({ value }) => Boolean(value)}
|
|
31
|
-
* >
|
|
32
|
-
* <CheckboxControl path="/sameAddress">
|
|
33
|
-
* Same as residential address
|
|
34
|
-
* </CheckboxControl>
|
|
25
|
+
* <ResetOnChange reset="/mailingAddress" when={({ value }) => Boolean(value)}>
|
|
26
|
+
* <CheckboxControl path="/sameAddress">Same as residential address</CheckboxControl>
|
|
35
27
|
* </ResetOnChange>
|
|
36
28
|
* );
|
|
37
29
|
* }
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export * from "./ResetOnChange.tsx";
|
|
2
|
-
export { type ResetOnChangeContextValue, useResetOnChangeContext
|
|
2
|
+
export { type ResetOnChangeContextValue, useResetOnChangeContext } from "./ResetOnChangeContext.ts";
|
|
3
3
|
export * from "./useResetOnChange.tsx";
|
|
@@ -3,29 +3,29 @@ import { type PrefixedConfirmDialogOptions } from "../../utils/extractConfirmDia
|
|
|
3
3
|
/** Options of the `useResetOnChange` hook. */
|
|
4
4
|
export interface UseResetOnChangeOptions<T = unknown> extends PrefixedConfirmDialogOptions {
|
|
5
5
|
/**
|
|
6
|
-
* Function which determines whether to reset the fields when the value
|
|
7
|
-
*
|
|
6
|
+
* Function which determines whether to reset the fields when the value changes. By default,
|
|
7
|
+
* fields are reset whenever the value changes.
|
|
8
8
|
*
|
|
9
9
|
* @param event Value event.
|
|
10
10
|
*/
|
|
11
11
|
when?: (event: SealedValueEvent<T>) => boolean;
|
|
12
12
|
/**
|
|
13
|
-
* Fields in `reset` that should be excluded from being reset (relative to the
|
|
14
|
-
*
|
|
15
|
-
*
|
|
13
|
+
* Fields in `reset` that should be excluded from being reset (relative to the current path). This
|
|
14
|
+
* is useful when using wildcards in `reset` and you want to exclude some of the fields that match
|
|
15
|
+
* the wildcard.
|
|
16
16
|
*
|
|
17
|
-
* E.g. if the path being reset is `/a/*`, setting `exclude` to `/a/b` will
|
|
18
|
-
*
|
|
17
|
+
* E.g. if the path being reset is `/a/*`, setting `exclude` to `/a/b` will reset all children of
|
|
18
|
+
* `/a` except `/a/b`.
|
|
19
19
|
*/
|
|
20
20
|
exclude?: string | Path | (string | Path)[];
|
|
21
21
|
/**
|
|
22
22
|
* Whether to show a confirmation message before performing the reset.
|
|
23
23
|
*
|
|
24
|
-
* If the confirmation is cancelled, the event which caused the reset in the
|
|
25
|
-
*
|
|
24
|
+
* If the confirmation is cancelled, the event which caused the reset in the first place is
|
|
25
|
+
* undone.
|
|
26
26
|
*
|
|
27
|
-
* This property is `false` by default, but is automatically set to `true` if
|
|
28
|
-
*
|
|
27
|
+
* This property is `false` by default, but is automatically set to `true` if a
|
|
28
|
+
* `confirmDialogMessage` is provided.
|
|
29
29
|
*/
|
|
30
30
|
showConfirmation?: boolean;
|
|
31
31
|
/**
|
|
@@ -46,23 +46,17 @@ export interface UseResetOnChangeOptions<T = unknown> extends PrefixedConfirmDia
|
|
|
46
46
|
/** Event handler returned by the `useResetOnChange` hook. */
|
|
47
47
|
export type UseResetOnChangeResult = (event: SealedValueEvent<any>) => void;
|
|
48
48
|
/**
|
|
49
|
-
* Hook which returns an `onValueChange` event handler which resets the fields
|
|
50
|
-
*
|
|
51
|
-
* (according to the `when` function).
|
|
49
|
+
* Hook which returns an `onValueChange` event handler which resets the fields at the provided
|
|
50
|
+
* `reset` path(s) to their initial value when a value changes (according to the `when` function).
|
|
52
51
|
*
|
|
53
|
-
* Optionally requests user-confirmation via alert dialog if `showConfirmation`
|
|
54
|
-
* is provided.
|
|
52
|
+
* Optionally requests user-confirmation via alert dialog if `showConfirmation` is provided.
|
|
55
53
|
*
|
|
56
|
-
* When using wildcards in `reset`, certain fields may be excluded via
|
|
57
|
-
* `exclude`.
|
|
54
|
+
* When using wildcards in `reset`, certain fields may be excluded via `exclude`.
|
|
58
55
|
*
|
|
59
56
|
* Example usage:
|
|
60
57
|
*
|
|
61
58
|
* ```tsx
|
|
62
|
-
* import {
|
|
63
|
-
* CheckboxControl,
|
|
64
|
-
* useResetOnChange,
|
|
65
|
-
* } from "@ostack.tech/ui-kform";
|
|
59
|
+
* import { CheckboxControl, useResetOnChange } from "@ostack.tech/ui-kform";
|
|
66
60
|
*
|
|
67
61
|
* function NoTransactionsControl() {
|
|
68
62
|
* const handleOnChange = useResetOnChange("/transactions", {
|
|
@@ -70,27 +64,23 @@ export type UseResetOnChangeResult = (event: SealedValueEvent<any>) => void;
|
|
|
70
64
|
* confirmDialogTitle: "Confirm no transactions",
|
|
71
65
|
* confirmDialogMessage: (
|
|
72
66
|
* <>
|
|
73
|
-
* By checking this box, the “Itemised transactions” table will be
|
|
74
|
-
*
|
|
67
|
+
* By checking this box, the “Itemised transactions” table will be cleared. Are you sure
|
|
68
|
+
* you want to continue?
|
|
75
69
|
* </>
|
|
76
70
|
* ),
|
|
77
71
|
* confirmDialogOkText: "Confirm",
|
|
78
72
|
* });
|
|
79
73
|
*
|
|
80
74
|
* return (
|
|
81
|
-
* <CheckboxControl
|
|
82
|
-
*
|
|
83
|
-
* onValueChange={handleOnChange}
|
|
84
|
-
* >
|
|
85
|
-
* I declare that no taxable transactions were performed during this
|
|
86
|
-
* filing period.
|
|
75
|
+
* <CheckboxControl path="/noTransactions" onValueChange={handleOnChange}>
|
|
76
|
+
* I declare that no taxable transactions were performed during this filing period.
|
|
87
77
|
* </CheckboxControl>
|
|
88
78
|
* );
|
|
89
79
|
* }
|
|
90
80
|
* ```
|
|
91
81
|
*
|
|
92
|
-
* @param reset Path(s) to reset when the value changes (relative to the current
|
|
93
|
-
*
|
|
82
|
+
* @param reset Path(s) to reset when the value changes (relative to the current path). Wildcards in
|
|
83
|
+
* paths (`*` or `**`) are supported.
|
|
94
84
|
* @param options Hook options. See {@link UseResetOnChangeOptions}.
|
|
95
85
|
*/
|
|
96
86
|
export declare function useResetOnChange<T = unknown>(reset: string | Path | (string | Path)[], { when, exclude, confirmDialogMessage, showConfirmation, setUntouched, setPristine, undo, ...confirmDialogOptions }?: UseResetOnChangeOptions<T>): UseResetOnChangeResult;
|
|
@@ -8,16 +8,13 @@ export declare const DEFAULT_SAVE_AS_KEYBINDS = "$mod+Shift+S";
|
|
|
8
8
|
/** Properties of the save action. */
|
|
9
9
|
export interface SaveActionProps<T = unknown> extends Partial<ActionButtonProps>, Pick<ActionSplitProps, "groupCollapsed" | "buttonGroupProps" | "dropdownMenuGroupProps" | "defaultOpen" | "open" | "onOpenChange" | "modal" | "dropdownMenuContentProps" | "groupLabel">, Omit<FormSaverOptions<T>, "id" | "overwrite"> {
|
|
10
10
|
/**
|
|
11
|
-
* Keybinds for triggering the action. Set to `null` to disable the keyboard
|
|
12
|
-
* shortcut.
|
|
11
|
+
* Keybinds for triggering the action. Set to `null` to disable the keyboard shortcut.
|
|
13
12
|
*
|
|
14
|
-
* Keyboard handling is built on top of the
|
|
15
|
-
* [`tinykeys`
|
|
16
|
-
* information on keybinding syntax, read the [`tinykeys`
|
|
13
|
+
* Keyboard handling is built on top of the [`tinykeys`](https://jamiebuilds.github.io/tinykeys)
|
|
14
|
+
* library. For information on keybinding syntax, read the [`tinykeys`
|
|
17
15
|
* documentation](https://github.com/jamiebuilds/tinykeys).
|
|
18
16
|
*
|
|
19
|
-
* Defaults to the keybinds defined by the current locale or to
|
|
20
|
-
* `DEFAULT_SAVE_KEYBINDS`.
|
|
17
|
+
* Defaults to the keybinds defined by the current locale or to `DEFAULT_SAVE_KEYBINDS`.
|
|
21
18
|
*/
|
|
22
19
|
keybinds?: string | string[] | null;
|
|
23
20
|
/**
|
|
@@ -27,17 +24,16 @@ export interface SaveActionProps<T = unknown> extends Partial<ActionButtonProps>
|
|
|
27
24
|
*/
|
|
28
25
|
showWhenReadOnly?: boolean;
|
|
29
26
|
/**
|
|
30
|
-
* By specifying a filesystem ID, the user agent can remember different
|
|
31
|
-
*
|
|
27
|
+
* By specifying a filesystem ID, the user agent can remember different directories for different
|
|
28
|
+
* IDs.
|
|
32
29
|
*/
|
|
33
30
|
fileSystemId?: string;
|
|
34
31
|
/**
|
|
35
|
-
* Whether to disable the overwriting behaviour of the “save” button. When
|
|
36
|
-
*
|
|
37
|
-
* as” button will not be rendered.
|
|
32
|
+
* Whether to disable the overwriting behaviour of the “save” button. When set, the “save” button
|
|
33
|
+
* will function as the “save as” button and the “save as” button will not be rendered.
|
|
38
34
|
*
|
|
39
|
-
* This property only affects browsers that support modern file system APIs,
|
|
40
|
-
*
|
|
35
|
+
* This property only affects browsers that support modern file system APIs, since other browsers
|
|
36
|
+
* already function in the above-mentioned way.
|
|
41
37
|
*
|
|
42
38
|
* Defaults to `true` when the form is read-only and `false` otherwise.
|
|
43
39
|
*/
|
|
@@ -49,28 +45,26 @@ export interface SaveActionProps<T = unknown> extends Partial<ActionButtonProps>
|
|
|
49
45
|
/** Placement of the save options button. */
|
|
50
46
|
saveOptionsPlacement?: ActionSplitProps["splitPlacement"];
|
|
51
47
|
/**
|
|
52
|
-
* Keybinds for triggering the "save as" sub-action. Set to `null` to disable
|
|
53
|
-
*
|
|
48
|
+
* Keybinds for triggering the "save as" sub-action. Set to `null` to disable the keyboard
|
|
49
|
+
* shortcut.
|
|
54
50
|
*
|
|
55
|
-
* Keyboard handling is built on top of the
|
|
56
|
-
* [`tinykeys`
|
|
57
|
-
* information on keybinding syntax, read the [`tinykeys`
|
|
51
|
+
* Keyboard handling is built on top of the [`tinykeys`](https://jamiebuilds.github.io/tinykeys)
|
|
52
|
+
* library. For information on keybinding syntax, read the [`tinykeys`
|
|
58
53
|
* documentation](https://github.com/jamiebuilds/tinykeys).
|
|
59
54
|
*
|
|
60
|
-
* Defaults to the keybinds defined by the current locale or to
|
|
61
|
-
* `DEFAULT_SAVE_AS_KEYBINDS`.
|
|
55
|
+
* Defaults to the keybinds defined by the current locale or to `DEFAULT_SAVE_AS_KEYBINDS`.
|
|
62
56
|
*/
|
|
63
57
|
saveAsKeybinds?: string | string[] | null;
|
|
64
58
|
/** Properties to pass to the save options button component. */
|
|
65
59
|
saveOptionsProps?: Omit<ActionButtonProps, "label">;
|
|
66
60
|
}
|
|
67
61
|
/**
|
|
68
|
-
* Form action used to save the form to a file, supporting both overwriting and
|
|
69
|
-
*
|
|
70
|
-
*
|
|
62
|
+
* Form action used to save the form to a file, supporting both overwriting and non-overwriting
|
|
63
|
+
* behaviours (i.e. supporting both “save” and “save as”). Built on top of the
|
|
64
|
+
* [`ButtonGroup`](/docs/ostack-ui-layout-button-group--docs),
|
|
71
65
|
* [`Button`](/docs/ostack-ui-forms-button--docs), and
|
|
72
|
-
* [`DropdownMenu`](/docs/ostack-ui-overlay-dropdown-menu--docs) components, as
|
|
73
|
-
*
|
|
66
|
+
* [`DropdownMenu`](/docs/ostack-ui-overlay-dropdown-menu--docs) components, as well as the
|
|
67
|
+
* `useFormSaver` hook.
|
|
74
68
|
*
|
|
75
69
|
* Example usage:
|
|
76
70
|
*
|
|
@@ -80,9 +74,7 @@ export interface SaveActionProps<T = unknown> extends Partial<ActionButtonProps>
|
|
|
80
74
|
* function SaveForm() {
|
|
81
75
|
* return (
|
|
82
76
|
* <SaveAction
|
|
83
|
-
* encode={(formValue) =>
|
|
84
|
-
* encodeFormToJSON(formValue, { pretty: true })
|
|
85
|
-
* }
|
|
77
|
+
* encode={(formValue) => encodeFormToJSON(formValue, { pretty: true })}
|
|
86
78
|
* mimeTypes={["application/json"]}
|
|
87
79
|
* extensions={[".json"]}
|
|
88
80
|
* />
|
|
@@ -90,4 +82,4 @@ export interface SaveActionProps<T = unknown> extends Partial<ActionButtonProps>
|
|
|
90
82
|
* }
|
|
91
83
|
* ```
|
|
92
84
|
*/
|
|
93
|
-
export declare function SaveAction<T = unknown>({ label, keybinds, showWhenReadOnly, fileSystemId, disableOverwrite, saveOptionsLabel, saveAsLabel, saveAsKeybinds, loading, disabled, onClick, variant, color, path, encode, fileName, extensions, description, mimeTypes, startIn, excludeAcceptAllOption, onBeforeSave, onAfterSave, setPristineOnSave, successMessage, errorMessage, groupCollapsed, defaultOpen, open, onOpenChange, modal, groupLabel, saveOptionsPlacement, buttonGroupProps, saveOptionsProps, dropdownMenuGroupProps, dropdownMenuContentProps, ...otherProps }: SaveActionProps<T>): false | import("react").JSX.Element;
|
|
85
|
+
export declare function SaveAction<T = unknown>({ label: labelProp, keybinds: keybindsProp, showWhenReadOnly, fileSystemId, disableOverwrite: disableOverwriteProp, saveOptionsLabel: saveOptionsLabelProp, saveAsLabel: saveAsLabelProp, saveAsKeybinds: saveAsKeybindsProp, loading, disabled, onClick, variant, color, path, encode, fileName, extensions, description, mimeTypes, startIn, excludeAcceptAllOption, onBeforeSave, onAfterSave, setPristineOnSave, successMessage, errorMessage, groupCollapsed, defaultOpen, open, onOpenChange, modal, groupLabel, saveOptionsPlacement, buttonGroupProps, saveOptionsProps, dropdownMenuGroupProps, dropdownMenuContentProps, ...otherProps }: SaveActionProps<T>): false | import("react").JSX.Element;
|
|
@@ -18,8 +18,7 @@ export interface SelectControlProps<T = unknown> extends Omit<InputOptions<T, T,
|
|
|
18
18
|
*/
|
|
19
19
|
issueMessages?: IssueMessagesByCode;
|
|
20
20
|
/**
|
|
21
|
-
* Label to use in the issues panel when displaying issues associated with
|
|
22
|
-
* this field.
|
|
21
|
+
* Label to use in the issues panel when displaying issues associated with this field.
|
|
23
22
|
*
|
|
24
23
|
* This label has priority over the field's `Label`.
|
|
25
24
|
*/
|
|
@@ -33,21 +32,18 @@ export interface SelectControlProps<T = unknown> extends Omit<InputOptions<T, T,
|
|
|
33
32
|
/** Label shown when the control's value isn't one of the existing options. */
|
|
34
33
|
unknownValueLabel?: ReactNode;
|
|
35
34
|
/**
|
|
36
|
-
* Whether to prevent the auto-focusing behaviour that causes this control to
|
|
37
|
-
*
|
|
35
|
+
* Whether to prevent the auto-focusing behaviour that causes this control to be focused when the
|
|
36
|
+
* form app's `focus` is called with this control's path.
|
|
38
37
|
*
|
|
39
|
-
* Preventing this behaviour is useful when multiple controls for the same
|
|
40
|
-
*
|
|
38
|
+
* Preventing this behaviour is useful when multiple controls for the same path are rendered at
|
|
39
|
+
* once, and only one of them should be focused.
|
|
41
40
|
*
|
|
42
41
|
* @default false
|
|
43
42
|
*/
|
|
44
43
|
preventAutoFocus?: boolean;
|
|
45
44
|
/** Select control children. */
|
|
46
45
|
children?: ReactNode;
|
|
47
|
-
/**
|
|
48
|
-
* Whether to show debug information. This property has no effect in
|
|
49
|
-
* production builds.
|
|
50
|
-
*/
|
|
46
|
+
/** Whether to show debug information. This property has no effect in production builds. */
|
|
51
47
|
debug?: boolean;
|
|
52
48
|
/** Reference to the control's API. */
|
|
53
49
|
apiRef?: Ref<InputController<T, string, ComponentRef<typeof Select>> | undefined>;
|
|
@@ -55,17 +51,14 @@ export interface SelectControlProps<T = unknown> extends Omit<InputOptions<T, T,
|
|
|
55
51
|
issueMessagesProps?: Omit<IssueMessagesProps, "path" | "issues" | "messages" | "unwrapped">;
|
|
56
52
|
}
|
|
57
53
|
/**
|
|
58
|
-
* The select control component is a KForm form control for values with any type
|
|
59
|
-
* of (typically
|
|
54
|
+
* The select control component is a KForm form control for values with any type of (typically
|
|
60
55
|
* [nullable](https://kform.ostack.tech/api/packages/kform/tech.ostack.kform.schemas/-nullable-schema/index.html))
|
|
61
|
-
* schema. It is built on top of the
|
|
62
|
-
* [`Select`](/docs/ostack-ui-forms-select--docs) component.
|
|
56
|
+
* schema. It is built on top of the [`Select`](/docs/ostack-ui-forms-select--docs) component.
|
|
63
57
|
*
|
|
64
58
|
* It composes the following subcomponents:
|
|
65
59
|
*
|
|
66
60
|
* - `SelectControlItem`: Component used to define an item of the select control.
|
|
67
|
-
* - `SelectControlItemGroup`: Component used to define a group of items of the
|
|
68
|
-
* select control.
|
|
61
|
+
* - `SelectControlItemGroup`: Component used to define a group of items of the select control.
|
|
69
62
|
*
|
|
70
63
|
* The following built-in KForm validation affects this control:
|
|
71
64
|
*
|
|
@@ -79,10 +72,7 @@ export interface SelectControlProps<T = unknown> extends Omit<InputOptions<T, T,
|
|
|
79
72
|
*
|
|
80
73
|
* function ShirtSizeControl() {
|
|
81
74
|
* return (
|
|
82
|
-
* <SelectControl
|
|
83
|
-
* path="/shirtSize"
|
|
84
|
-
* placeholder="Select your shirt size…"
|
|
85
|
-
* >
|
|
75
|
+
* <SelectControl path="/shirtSize" placeholder="Select your shirt size…">
|
|
86
76
|
* <SelectControlItem value="sm">Small</SelectControlItem>
|
|
87
77
|
* <SelectControlItem value="md">Medium</SelectControlItem>
|
|
88
78
|
* <SelectControlItem value="lg">Large</SelectControlItem>
|
|
@@ -92,4 +82,4 @@ export interface SelectControlProps<T = unknown> extends Omit<InputOptions<T, T,
|
|
|
92
82
|
* }
|
|
93
83
|
* ```
|
|
94
84
|
*/
|
|
95
|
-
export declare function SelectControl<T = unknown>({ path, options:
|
|
85
|
+
export declare function SelectControl<T = unknown>({ path, options: optionsProp, issueMessages, issuesPanelLabel, displayIssues, unknownValueLabel: unknownValueLabelProp, preventAutoFocus, apiRef, issueMessagesProps, formManager, onInitialized, onFormManagerEvent, onValueChange, onValidationStatusChange, onDisplayStatusChange, onDirtyStatusChange, onTouchedStatusChange, required, loading, showSpinner, disabled, readOnly, showClearButton, endAdornment, onFocus, onBlurToOutside, children, debug, ref, ...otherProps }: SelectControlProps<T>): import("react").JSX.Element;
|
|
@@ -17,7 +17,7 @@ export interface SelectControlItemProps<T = unknown> extends Omit<SelectControlI
|
|
|
17
17
|
/**
|
|
18
18
|
* Definition of a select control item.
|
|
19
19
|
*
|
|
20
|
-
* This component doesn't actually render anything by itself; it is used by the
|
|
21
|
-
*
|
|
20
|
+
* This component doesn't actually render anything by itself; it is used by the `SelectControl`
|
|
21
|
+
* component to automatically create the `options` array.
|
|
22
22
|
*/
|
|
23
23
|
export declare function SelectControlItem(_props: SelectControlItemProps): null;
|
|
@@ -16,8 +16,7 @@ export interface SelectControlItemGroupProps<T = unknown> extends Omit<SelectCon
|
|
|
16
16
|
/**
|
|
17
17
|
* Definition of a select control item group.
|
|
18
18
|
*
|
|
19
|
-
* This component doesn't actually render anything by itself; it is used by the
|
|
20
|
-
*
|
|
21
|
-
* `options` array.
|
|
19
|
+
* This component doesn't actually render anything by itself; it is used by the `SelectControl`
|
|
20
|
+
* component to automatically create groups of items in the `options` array.
|
|
22
21
|
*/
|
|
23
22
|
export declare function SelectControlItemGroup(_props: SelectControlItemGroupProps): null;
|