@spscommerce/ds-react 7.17.13 → 7.18.0-beta
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/lib/autocomplete/SpsAutocomplete.d.ts +1 -0
- package/lib/checkbox/SpsCheckbox.d.ts +1 -0
- package/lib/currency-input/SpsCurrencyInput.d.ts +1 -0
- package/lib/dateRangePicker/SpsDateRangePicker.d.ts +1 -0
- package/lib/datepicker/SpsDatepicker.d.ts +1 -0
- package/lib/form/hooks/useSpsForm.d.ts +2 -0
- package/lib/incrementor/SpsIncrementor.d.ts +1 -0
- package/lib/index.cjs.js +90 -90
- package/lib/index.es.js +3951 -3947
- package/lib/multi-select/SpsMultiSelect.d.ts +1 -0
- package/lib/multi-value-text-input/SpsMultiValueTextInput.d.ts +1 -0
- package/lib/radio-button/SpsRadioButton.d.ts +1 -0
- package/lib/text-input/SpsTextInput.d.ts +2 -0
- package/lib/textarea/SpsTextarea.d.ts +1 -0
- package/lib/time-input/SpsTimeInput.d.ts +2 -1
- package/lib/toggle/SpsToggle.d.ts +1 -0
- package/package.json +22 -22
- package/spscommerce-ds-react-7.18.0-beta.tgz +0 -0
|
@@ -5,6 +5,7 @@ import type { SpsFormControl } from "../form/hooks/formControl";
|
|
|
5
5
|
import type { SpsFormFieldMeta } from "../form/hooks/useSpsForm";
|
|
6
6
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
7
7
|
export type SpsAutocompleteProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
8
|
+
autoComplete?: string;
|
|
8
9
|
debounce?: number;
|
|
9
10
|
disabled?: boolean;
|
|
10
11
|
formControl?: SpsFormControl<string>;
|
|
@@ -3,6 +3,7 @@ import type { SpsGlobalPropTypes } from "../prop-types";
|
|
|
3
3
|
import type { SpsFormControl } from "../form/hooks/formControl";
|
|
4
4
|
import type { SpsFormFieldMeta } from "../form/hooks/useSpsForm";
|
|
5
5
|
export type SpsCheckboxProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
6
|
+
autoComplete?: string;
|
|
6
7
|
checked?: boolean;
|
|
7
8
|
disabled?: boolean;
|
|
8
9
|
formControl?: SpsFormControl<boolean>;
|
|
@@ -2,6 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
3
3
|
import type { SpsFormFieldMeta } from "../form/hooks/useSpsForm";
|
|
4
4
|
export type SpsCurrencyInputProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
5
|
+
autoComplete?: string;
|
|
5
6
|
disabled?: boolean;
|
|
6
7
|
formMeta?: SpsFormFieldMeta<number>;
|
|
7
8
|
name?: string;
|
|
@@ -3,6 +3,7 @@ import type { SimpleDate, SimpleDateRange, DatePreset } from "@spscommerce/ds-sh
|
|
|
3
3
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
4
4
|
import type { SpsFormFieldMeta } from "../form/hooks/useSpsForm";
|
|
5
5
|
export type SpsDateRangePickerProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
6
|
+
autoComplete?: string;
|
|
6
7
|
disabled?: boolean;
|
|
7
8
|
formMeta?: SpsFormFieldMeta<SimpleDateRange | DatePreset | null | undefined>;
|
|
8
9
|
maxDate?: SimpleDate;
|
|
@@ -3,6 +3,7 @@ import type { SimpleDate } from "@spscommerce/ds-shared";
|
|
|
3
3
|
import type { SpsGlobalPropTypes } from "../prop-types";
|
|
4
4
|
import type { SpsFormFieldMeta } from "../form/hooks/useSpsForm";
|
|
5
5
|
export type SpsDatepickerProps = React.PropsWithChildren<SpsGlobalPropTypes & {
|
|
6
|
+
autoComplete?: string;
|
|
6
7
|
disabled?: boolean;
|
|
7
8
|
formMeta?: SpsFormFieldMeta<SimpleDate | undefined>;
|
|
8
9
|
maxDate?: SimpleDate;
|
|
@@ -83,6 +83,8 @@ export interface SpsFormState<T extends SpsFormSetValue> {
|
|
|
83
83
|
formValue: T;
|
|
84
84
|
formMeta: SpsFormSetMeta<T>;
|
|
85
85
|
updateForm: (newValue?: T, options?: UpdateFormOptions) => void;
|
|
86
|
+
validateForm: () => boolean;
|
|
87
|
+
getCurrentFormValue: () => T;
|
|
86
88
|
}
|
|
87
89
|
export type SpsValidatorMapValue = Array<SpsValidator<any>> | ((value: any) => Array<SpsValidator<any>>);
|
|
88
90
|
export type SpsValidatorMap = Record<string, SpsValidatorMapValue>;
|