@povio/ui 3.3.0 → 3.3.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/README.md +1 -1
- package/dist/browser-tests/checkbox/CheckboxGroupHarness.d.ts +10 -0
- package/dist/browser-tests/checkbox/CheckboxHarness.d.ts +10 -0
- package/dist/browser-tests/checkbox/checkbox-group.spec.d.ts +1 -0
- package/dist/browser-tests/checkbox/checkbox.spec.d.ts +1 -0
- package/dist/browser-tests/datetime-picker/DateTimeHarnesses.d.ts +43 -0
- package/dist/browser-tests/datetime-picker/assertions.d.ts +9 -0
- package/dist/browser-tests/datetime-picker/date-input-focus.firefox.spec.d.ts +1 -0
- package/dist/browser-tests/datetime-picker/date-picker.spec.d.ts +1 -0
- package/dist/browser-tests/datetime-picker/date-range-picker.spec.d.ts +1 -0
- package/dist/browser-tests/datetime-picker/date-time-picker.spec.d.ts +1 -0
- package/dist/browser-tests/datetime-picker/time-picker.spec.d.ts +1 -0
- package/dist/browser-tests/file-upload/FileUploadHarness.d.ts +4 -0
- package/dist/browser-tests/file-upload/file-upload.spec.d.ts +1 -0
- package/dist/browser-tests/file-upload-container/FileUploadContainerHarness.d.ts +4 -0
- package/dist/browser-tests/file-upload-container/file-upload-container.spec.d.ts +1 -0
- package/dist/browser-tests/input-upload/InputUploadHarness.d.ts +9 -0
- package/dist/browser-tests/input-upload/input-upload.spec.d.ts +1 -0
- package/dist/browser-tests/modal/ModalHarness.d.ts +5 -0
- package/dist/browser-tests/modal/modal.spec.d.ts +1 -0
- package/dist/browser-tests/number-input/NumberInputHarness.d.ts +10 -0
- package/dist/browser-tests/number-input/number-input.spec.d.ts +1 -0
- package/dist/browser-tests/number-range-input/NumberRangeInputHarness.d.ts +10 -0
- package/dist/browser-tests/number-range-input/number-range-input.spec.d.ts +1 -0
- package/dist/browser-tests/password-input/PasswordInputHarness.d.ts +6 -0
- package/dist/browser-tests/password-input/password-input.spec.d.ts +1 -0
- package/dist/browser-tests/radio-group/RadioGroupHarness.d.ts +15 -0
- package/dist/browser-tests/radio-group/radio-group.spec.d.ts +1 -0
- package/dist/browser-tests/selection/SelectionHarnesses.d.ts +61 -0
- package/dist/browser-tests/selection/autocomplete.spec.d.ts +1 -0
- package/dist/browser-tests/selection/interactions.d.ts +2 -0
- package/dist/browser-tests/selection/query-autocomplete.spec.d.ts +1 -0
- package/dist/browser-tests/selection/query-select.spec.d.ts +1 -0
- package/dist/browser-tests/selection/select.spec.d.ts +1 -0
- package/dist/browser-tests/slider/SliderHarness.d.ts +11 -0
- package/dist/browser-tests/slider/slider.spec.d.ts +1 -0
- package/dist/browser-tests/text-area/TextAreaHarness.d.ts +10 -0
- package/dist/browser-tests/text-area/text-area.spec.d.ts +1 -0
- package/dist/browser-tests/text-input/TextInputHarness.d.ts +10 -0
- package/dist/browser-tests/text-input/text-input.spec.d.ts +1 -0
- package/dist/browser-tests/toggle/ToggleHarness.d.ts +10 -0
- package/dist/browser-tests/toggle/toggle.spec.d.ts +1 -0
- package/dist/browser-tests/utils/blur.d.ts +22 -0
- package/dist/browser-tests/utils/events.d.ts +4 -0
- package/dist/browser-tests/utils/input.d.ts +10 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.js +206 -55
- package/dist/components/buttons/Button/button.cva.d.ts +1 -1
- package/dist/components/buttons/Button/button.cva.js +4 -4
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +34 -9
- package/dist/components/buttons/PillButton/pillButton.cva.js +4 -4
- package/dist/components/buttons/shared/ButtonContent.js +80 -22
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +24 -10
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +222 -74
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +182 -56
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +128 -41
- package/dist/components/inputs/DateTime/shared/Calendar.js +339 -139
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +308 -114
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +150 -35
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +229 -95
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +296 -115
- package/dist/components/inputs/DateTime/shared/DateField.js +306 -135
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +338 -140
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +59 -10
- package/dist/components/inputs/File/FileUpload.js +1 -1
- package/dist/components/inputs/File/InputUpload.js +261 -65
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +180 -48
- package/dist/components/inputs/File/shared/FileUploadContentError.js +265 -95
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +261 -99
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +234 -56
- package/dist/components/inputs/File/shared/ProgressBar.js +102 -15
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +313 -75
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +83 -23
- package/dist/components/inputs/Selection/Select/QuerySelect.js +96 -30
- package/dist/components/inputs/Selection/shared/SelectListBox.js +163 -51
- package/dist/components/inputs/Selection/shared/useSelectItems.js +108 -48
- package/dist/components/inputs/Skeleton/InputFrame.js +550 -177
- package/dist/components/inputs/TextEditor/TextEditor.js +389 -87
- package/dist/components/navigation/Accordion/Accordion.js +69 -22
- package/dist/components/navigation/Accordion/AccordionItem.js +86 -41
- package/dist/components/navigation/Stepper/Stepper.js +67 -22
- package/dist/components/overlays/ActionModal/ActionModal.js +169 -35
- package/dist/components/overlays/BottomSheet/BottomSheet.js +1 -1
- package/dist/components/overlays/Modal/Modal.d.ts +3 -2
- package/dist/components/overlays/Modal/Modal.js +3 -1
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +110 -29
- package/dist/components/shared/pagination/Pagination.js +108 -22
- package/dist/components/shared/pagination/minWidth.cva.d.ts +1 -1
- package/dist/components/status/Alert/Alert.js +97 -30
- package/dist/components/table/InfiniteTable.js +67 -16
- package/dist/components/text/Typography/Typography.js +23 -8
- package/dist/config/confirmation.context.js +1 -1
- package/dist/config/theme.context.js +98 -45
- package/dist/config/uiConfig.context.js +39 -8
- package/dist/hooks/useDebounceCallback.js +51 -17
- package/dist/hooks/useFormAutosave.js +120 -33
- package/dist/hooks/useLongPressRepeat.js +55 -20
- package/dist/vitest.setup.browser.d.ts +6 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CheckboxGroupProps } from '../../src/components/inputs/Checkbox/CheckboxGroup';
|
|
2
|
+
type HarnessMode = "controlled" | "form";
|
|
3
|
+
interface CheckboxGroupHarnessProps extends Omit<CheckboxGroupProps, "formControl" | "value" | "onBlur" | "onChange"> {
|
|
4
|
+
formDisabled?: boolean;
|
|
5
|
+
initialValue?: string[] | null;
|
|
6
|
+
mode?: HarnessMode;
|
|
7
|
+
validationMessage?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const CheckboxGroupHarness: ({ formDisabled, initialValue, mode, validationMessage, ...props }: CheckboxGroupHarnessProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CheckboxProps } from '../../src/components/inputs/Checkbox/Checkbox';
|
|
2
|
+
type HarnessMode = "controlled" | "form";
|
|
3
|
+
interface CheckboxHarnessProps extends Omit<CheckboxProps, "formControl" | "isSelected" | "onBlur" | "onChange"> {
|
|
4
|
+
formDisabled?: boolean;
|
|
5
|
+
initialValue?: boolean;
|
|
6
|
+
mode?: HarnessMode;
|
|
7
|
+
validationMessage?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const CheckboxHarness: ({ formDisabled, initialValue, mode, validationMessage, ...props }: CheckboxHarnessProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { DatePickerProps, DateRangePickerProps, DateTimePickerProps, TimePickerProps } from '@povio/ui';
|
|
2
|
+
type HarnessMode = "controlled" | "form";
|
|
3
|
+
type RangeValue = NonNullable<DateRangePickerProps["value"]>;
|
|
4
|
+
interface DatePickerHarnessProps extends Omit<DatePickerProps, "formControl" | "onBlur" | "onChange" | "value"> {
|
|
5
|
+
externalSetValue?: string | null;
|
|
6
|
+
formDisabled?: boolean;
|
|
7
|
+
initialValue?: string | null;
|
|
8
|
+
mode?: HarnessMode;
|
|
9
|
+
validationMessage?: string;
|
|
10
|
+
}
|
|
11
|
+
interface DateTimePickerHarnessProps extends Omit<DateTimePickerProps, "formControl" | "onBlur" | "onChange" | "value"> {
|
|
12
|
+
externalSetValue?: string | null;
|
|
13
|
+
formDisabled?: boolean;
|
|
14
|
+
initialValue?: string | null;
|
|
15
|
+
mode?: HarnessMode;
|
|
16
|
+
validationMessage?: string;
|
|
17
|
+
}
|
|
18
|
+
interface TimePickerHarnessProps extends Omit<TimePickerProps, "formControl" | "onBlur" | "onChange" | "value"> {
|
|
19
|
+
formDisabled?: boolean;
|
|
20
|
+
initialValue?: string | null;
|
|
21
|
+
mode?: HarnessMode;
|
|
22
|
+
validationMessage?: string;
|
|
23
|
+
}
|
|
24
|
+
interface DateRangePickerHarnessProps extends Omit<DateRangePickerProps, "formControl" | "onBlur" | "onChange" | "value"> {
|
|
25
|
+
externalSetValue?: RangeValue | null;
|
|
26
|
+
formDisabled?: boolean;
|
|
27
|
+
initialValue?: RangeValue | null;
|
|
28
|
+
mode?: HarnessMode;
|
|
29
|
+
validationMessage?: string;
|
|
30
|
+
}
|
|
31
|
+
export declare const DatePickerHarness: ({ externalSetValue, formDisabled, initialValue, mode, validationMessage, ...props }: DatePickerHarnessProps) => import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
interface DatePickerAutosaveHarnessProps extends Omit<DatePickerProps, "formControl" | "onBlur" | "onChange" | "value"> {
|
|
33
|
+
initialValue?: string | null;
|
|
34
|
+
}
|
|
35
|
+
export declare const DatePickerAutosaveHarness: ({ initialValue, ...props }: DatePickerAutosaveHarnessProps) => import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export declare const DateTimePickerHarness: ({ externalSetValue, formDisabled, initialValue, mode, validationMessage, ...props }: DateTimePickerHarnessProps) => import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
type FocusPicker = "date" | "date-range" | "date-time" | "time";
|
|
38
|
+
export declare const DateInputFocusHarness: ({ picker }: {
|
|
39
|
+
picker: FocusPicker;
|
|
40
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
export declare const TimePickerHarness: ({ formDisabled, initialValue, mode, validationMessage, ...props }: TimePickerHarnessProps) => import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
export declare const DateRangePickerHarness: ({ externalSetValue, formDisabled, initialValue, mode, validationMessage, ...props }: DateRangePickerHarnessProps) => import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Locator } from 'vitest/browser';
|
|
2
|
+
export declare const expectDateTimeSegments: (segments: Locator, texts: Array<RegExp | string>) => Promise<void>;
|
|
3
|
+
export declare const typeDateTimeSegments: (_page: unknown, segments: Locator, texts: string[]) => Promise<void>;
|
|
4
|
+
/** react-aria puts aria-selected on the gridcell, not the day button. */
|
|
5
|
+
export declare const expectCalendarDaySelected: (dayButton: Locator, isSelected: boolean) => Promise<void>;
|
|
6
|
+
/** DateRangePicker paints selection via rangeSelection (this class), not aria-selected. */
|
|
7
|
+
export declare const CALENDAR_DAY_VISUAL_SELECTED_CLASS = "bg-interactive-contained-primary-idle";
|
|
8
|
+
export declare const expectCalendarDayVisuallySelected: (dayButton: Locator, isSelected: boolean) => Promise<void>;
|
|
9
|
+
export declare const countVisuallySelectedCalendarDays: (root: Locator) => number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FileUploadProps } from '../../src/components/inputs/File/FileUpload';
|
|
2
|
+
type FileUploadHarnessProps = Partial<Omit<FileUploadProps, "fileRemove" | "fileUpload" | "onInvalidFileType">>;
|
|
3
|
+
export declare const FileUploadHarness: (props: FileUploadHarnessProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FileUploadContainerProps } from '../../src/components/inputs/File/FileUploadContainer';
|
|
2
|
+
type FileUploadContainerHarnessProps = Partial<Omit<FileUploadContainerProps, "fileUpload" | "children">>;
|
|
3
|
+
export declare const FileUploadContainerHarness: (props: FileUploadContainerHarnessProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { InputUploadProps } from '../../src/components/inputs/File/InputUpload';
|
|
2
|
+
type InputUploadHarnessProps = Partial<Omit<InputUploadProps, "formControl" | "onChange" | "value">> & {
|
|
3
|
+
initialValue?: File | File[] | null;
|
|
4
|
+
};
|
|
5
|
+
export declare const InputUploadHarness: ({ initialValue, ...props }: InputUploadHarnessProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const InputUploadFormHarness: ({ formDisabled }: {
|
|
7
|
+
formDisabled?: boolean;
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ModalProps } from '@povio/ui';
|
|
2
|
+
import { PropsWithChildren } from 'react';
|
|
3
|
+
type ModalHarnessProps = PropsWithChildren<Omit<ModalProps, "isOpen" | "onClose">>;
|
|
4
|
+
export declare const ModalHarness: ({ children, ...props }: ModalHarnessProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { NumberInputProps } from '../../src/components/inputs/Input/NumberInput/NumberInput';
|
|
2
|
+
type HarnessMode = "controlled" | "form";
|
|
3
|
+
interface NumberInputHarnessProps extends Omit<NumberInputProps, "formControl" | "onBlur" | "onChange" | "value"> {
|
|
4
|
+
formDisabled?: boolean;
|
|
5
|
+
mode?: HarnessMode;
|
|
6
|
+
initialValue?: number | null;
|
|
7
|
+
validationMessage?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const NumberInputHarness: ({ formDisabled, mode, initialValue, validationMessage, action, ...props }: NumberInputHarnessProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { NumberRangeInputProps, NumberRangeValue } from '../../src/components/inputs/Input/NumberRangeInput/NumberRangeInput';
|
|
2
|
+
type HarnessMode = "controlled" | "form";
|
|
3
|
+
interface NumberRangeInputHarnessProps extends Omit<NumberRangeInputProps, "formControl" | "onBlur" | "onChange" | "value"> {
|
|
4
|
+
formDisabled?: boolean;
|
|
5
|
+
mode?: HarnessMode;
|
|
6
|
+
initialValue?: NumberRangeValue;
|
|
7
|
+
validationMessage?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const NumberRangeInputHarness: ({ formDisabled, mode, initialValue, validationMessage, ...props }: NumberRangeInputHarnessProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PasswordInputProps } from '../../src/components/inputs/Input/PasswordInput/PasswordInput';
|
|
2
|
+
interface PasswordInputHarnessProps extends Omit<PasswordInputProps, "formControl" | "onBlur" | "onChange" | "value"> {
|
|
3
|
+
initialValue?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const PasswordInputHarness: ({ initialValue, ...props }: PasswordInputHarnessProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { RadioGroupProps } from '../../src/components/inputs/RadioGroup/RadioGroup';
|
|
2
|
+
type HarnessMode = "controlled" | "form";
|
|
3
|
+
interface RadioGroupHarnessProps extends Omit<RadioGroupProps, "formControl" | "onBlur" | "onChange" | "options" | "value"> {
|
|
4
|
+
formDisabled?: boolean;
|
|
5
|
+
initialValue?: string;
|
|
6
|
+
mode?: HarnessMode;
|
|
7
|
+
options?: RadioGroupProps["options"];
|
|
8
|
+
validationMessage?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const RADIO_OPTIONS: {
|
|
11
|
+
label: string;
|
|
12
|
+
value: string;
|
|
13
|
+
}[];
|
|
14
|
+
export declare const RadioGroupHarness: ({ formDisabled, initialValue, mode, validationMessage, options, ...props }: RadioGroupHarnessProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { InfiniteData, UseInfiniteQueryResult, UseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import { AutocompleteProps } from '../../src/components/inputs/Selection/Autocomplete/Autocomplete';
|
|
3
|
+
import { SelectProps } from '../../src/components/inputs/Selection/Select/Select';
|
|
4
|
+
import { SelectItem } from '../../src/components/inputs/Selection/shared/select.types';
|
|
5
|
+
type HarnessMode = "controlled" | "form";
|
|
6
|
+
type SelectionValue = string | string[] | null;
|
|
7
|
+
export declare const selectionItems: SelectItem<string>[];
|
|
8
|
+
type SelectHarnessProps = Omit<SelectProps<string>, "items" | "onBlur" | "onChange" | "value"> & {
|
|
9
|
+
formDisabled?: boolean;
|
|
10
|
+
initialValue?: SelectionValue;
|
|
11
|
+
items?: SelectItem<string>[];
|
|
12
|
+
mode?: HarnessMode;
|
|
13
|
+
validationMessage?: string;
|
|
14
|
+
};
|
|
15
|
+
export declare const SelectHarness: ({ formDisabled, initialValue, items, mode, renderStaticInput, selectionMode, validationMessage, ...props }: SelectHarnessProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
type AutocompleteHarnessProps = Omit<AutocompleteProps<string>, "items" | "onBlur" | "onChange" | "value"> & {
|
|
17
|
+
formDisabled?: boolean;
|
|
18
|
+
initialValue?: SelectionValue;
|
|
19
|
+
items?: SelectItem<string>[];
|
|
20
|
+
mode?: HarnessMode;
|
|
21
|
+
validationMessage?: string;
|
|
22
|
+
};
|
|
23
|
+
export declare const AutocompleteHarness: ({ formDisabled, initialValue, items, mode, renderStaticInput, selectionMode, validationMessage, ...props }: AutocompleteHarnessProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
type QueryFilter = {
|
|
25
|
+
ids?: string[];
|
|
26
|
+
} & Record<string, unknown>;
|
|
27
|
+
type QueryParams = {
|
|
28
|
+
search?: string;
|
|
29
|
+
limit?: number;
|
|
30
|
+
filter?: QueryFilter;
|
|
31
|
+
};
|
|
32
|
+
type QueryOptions = {
|
|
33
|
+
enabled?: boolean;
|
|
34
|
+
};
|
|
35
|
+
type QuerySelectionPage = {
|
|
36
|
+
items: SelectItem<string>[];
|
|
37
|
+
totalItems?: number;
|
|
38
|
+
};
|
|
39
|
+
type QuerySelectionResult = UseQueryResult<SelectItem<string>[]> | UseInfiniteQueryResult<InfiniteData<QuerySelectionPage>>;
|
|
40
|
+
type QuerySelectionFn = (params?: QueryParams, options?: QueryOptions) => QuerySelectionResult;
|
|
41
|
+
export declare const querySelectionItems: (params?: QueryParams, options?: QueryOptions) => UseQueryResult<SelectItem<string>[]>;
|
|
42
|
+
export declare const querySelectionItemsWithFetchedInitialLabel: (_params?: QueryParams, options?: QueryOptions) => UseQueryResult<SelectItem<string>[]>;
|
|
43
|
+
type QuerySelectionHarnessProps = Omit<SelectHarnessProps, "items" | "onInputChange" | "onSearchChange" | "onNewItemOption"> & {
|
|
44
|
+
component: "query-autocomplete" | "query-select";
|
|
45
|
+
isInitialQueryDisabled?: boolean;
|
|
46
|
+
query?: QuerySelectionFn;
|
|
47
|
+
queryMap?: (items: SelectItem<string>[] | QuerySelectionPage | QuerySelectionPage[]) => SelectItem<string>[];
|
|
48
|
+
showInfiniteFetchCount?: boolean;
|
|
49
|
+
useInfiniteQuery?: boolean;
|
|
50
|
+
};
|
|
51
|
+
export declare const QuerySelectionHarness: ({ component, formDisabled, initialValue, mode, query, queryMap, renderStaticInput, selectionMode, showInfiniteFetchCount, useInfiniteQuery, validationMessage, ...props }: QuerySelectionHarnessProps) => import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
export declare const QuerySelectionDeepInitialValueHarness: ({ component, resolveSelectedItemsWithIds, useConfigResolveSelectedItemsWithIds, wrapResolvedIdsInInfiniteData, }: {
|
|
53
|
+
component: "query-autocomplete" | "query-select";
|
|
54
|
+
resolveSelectedItemsWithIds?: boolean;
|
|
55
|
+
useConfigResolveSelectedItemsWithIds?: boolean;
|
|
56
|
+
wrapResolvedIdsInInfiniteData?: boolean;
|
|
57
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
58
|
+
export declare const QuerySelectionSearchDebounceHarness: ({ component, }: {
|
|
59
|
+
component: "query-autocomplete" | "query-select";
|
|
60
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SliderProps } from '../../src/components/inputs/Slider/Slider';
|
|
2
|
+
type HarnessMode = "controlled" | "form";
|
|
3
|
+
type SliderHarnessValue = number | number[];
|
|
4
|
+
interface SliderHarnessProps extends Omit<SliderProps<boolean>, "formControl" | "onBlur" | "onChange" | "value"> {
|
|
5
|
+
formDisabled?: boolean;
|
|
6
|
+
initialValue?: SliderHarnessValue;
|
|
7
|
+
mode?: HarnessMode;
|
|
8
|
+
validationMessage?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const SliderHarness: ({ formDisabled, initialValue, mode, validationMessage, ...props }: SliderHarnessProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TextAreaProps } from '../../src/components/inputs/Input/TextArea/TextArea';
|
|
2
|
+
type HarnessMode = "controlled" | "form";
|
|
3
|
+
interface TextAreaHarnessProps extends Omit<TextAreaProps, "formControl" | "onBlur" | "onChange" | "value"> {
|
|
4
|
+
formDisabled?: boolean;
|
|
5
|
+
mode?: HarnessMode;
|
|
6
|
+
initialValue?: string;
|
|
7
|
+
validationMessage?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const TextAreaHarness: ({ formDisabled, mode, initialValue, validationMessage, ...props }: TextAreaHarnessProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TextInputProps } from '../../src/components/inputs/Input/TextInput/TextInput';
|
|
2
|
+
type HarnessMode = "controlled" | "form";
|
|
3
|
+
interface TextInputHarnessProps extends Omit<TextInputProps, "formControl" | "onBlur" | "onChange" | "value"> {
|
|
4
|
+
formDisabled?: boolean;
|
|
5
|
+
mode?: HarnessMode;
|
|
6
|
+
initialValue?: string;
|
|
7
|
+
validationMessage?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const TextInputHarness: ({ formDisabled, mode, initialValue, validationMessage, action, ...props }: TextInputHarnessProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ToggleProps } from '../../src/components/inputs/Toggle/Toggle';
|
|
2
|
+
type HarnessMode = "controlled" | "form";
|
|
3
|
+
interface ToggleHarnessProps extends Omit<ToggleProps, "formControl" | "isSelected" | "onBlur" | "onChange"> {
|
|
4
|
+
formDisabled?: boolean;
|
|
5
|
+
initialValue?: boolean;
|
|
6
|
+
mode?: HarnessMode;
|
|
7
|
+
validationMessage?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const ToggleHarness: ({ formDisabled, initialValue, mode, validationMessage, ...props }: ToggleHarnessProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BrowserPage, Locator } from 'vitest/browser';
|
|
2
|
+
interface BlurPage {
|
|
3
|
+
getByTestId: BrowserPage["getByTestId"];
|
|
4
|
+
}
|
|
5
|
+
interface ExpectBlurCountToIncrementOptions {
|
|
6
|
+
action?: () => Promise<void>;
|
|
7
|
+
blurCount?: Locator;
|
|
8
|
+
blurWith?: () => Promise<void>;
|
|
9
|
+
page: BlurPage;
|
|
10
|
+
target?: Locator;
|
|
11
|
+
}
|
|
12
|
+
export declare const expectBlurCountToIncrement: ({ action, blurCount, blurWith, page, target, }: ExpectBlurCountToIncrementOptions) => Promise<void>;
|
|
13
|
+
interface ExpectBlurValueOptions {
|
|
14
|
+
action?: () => Promise<void>;
|
|
15
|
+
blurValue?: Locator;
|
|
16
|
+
blurWith?: () => Promise<void>;
|
|
17
|
+
expectedValue: string;
|
|
18
|
+
page: BlurPage;
|
|
19
|
+
target?: Locator;
|
|
20
|
+
}
|
|
21
|
+
export declare const expectBlurValueAfterFocusLeaves: ({ action, blurValue, blurWith, expectedValue, page, target, }: ExpectBlurValueOptions) => Promise<void>;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Locator } from 'vitest/browser';
|
|
2
|
+
export declare const dispatchPointerEvent: (target: Locator, type: string, init?: PointerEventInit) => Promise<void>;
|
|
3
|
+
export declare const getLocatorRect: (target: Locator) => DOMRect;
|
|
4
|
+
export declare const focusLocator: (target: Locator) => Promise<void>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Locator, BrowserPage } from 'vitest/browser';
|
|
2
|
+
type InputScope = Pick<BrowserPage | Locator, "getByRole" | "getByTestId">;
|
|
3
|
+
export declare const expectInputValueState: (input: Locator, expected: {
|
|
4
|
+
isEmpty: boolean;
|
|
5
|
+
value: string;
|
|
6
|
+
}) => Promise<void>;
|
|
7
|
+
export declare const clearInput: (scope: InputScope) => Promise<void>;
|
|
8
|
+
export declare const expectHarnessValue: (scope: InputScope, value: string) => Promise<void>;
|
|
9
|
+
export declare const expectClearControlNotRendered: (scope: InputScope) => Promise<void>;
|
|
10
|
+
export {};
|