@astral/ui 4.122.2 → 4.124.0
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/components/AddressAutocomplete/AddressAutocomplete.d.ts +3 -0
- package/components/AddressAutocomplete/AddressAutocomplete.js +3 -0
- package/components/AsyncAutocomplete/AsyncAutocomplete.d.ts +3 -0
- package/components/AsyncAutocomplete/AsyncAutocomplete.js +3 -0
- package/components/Autocomplete/Autocomplete.d.ts +3 -0
- package/components/Autocomplete/Autocomplete.js +3 -0
- package/components/Banner/Banner.d.ts +1 -1
- package/components/Banner/Banner.js +4 -1
- package/components/Banner/BannerContainer/styles.js +13 -4
- package/components/Banner/BannerTemplate/BannerTemplate.d.ts +5 -1
- package/components/Banner/BannerTemplate/BannerTemplate.js +6 -2
- package/components/Banner/BannerTemplate/styles.js +7 -1
- package/components/Banner/constants.d.ts +2 -0
- package/components/Banner/constants.js +2 -0
- package/components/Banner/types.d.ts +11 -1
- package/components/Button/Button.d.ts +3 -0
- package/components/Button/Button.js +3 -0
- package/components/CheckboxField/CheckboxField.d.ts +1 -0
- package/components/CheckboxField/CheckboxField.js +1 -0
- package/components/CodeField/CodeField.d.ts +1 -0
- package/components/CodeField/CodeField.js +1 -0
- package/components/DataGrid/types.d.ts +3 -0
- package/components/DataGridActionCell/DataGridActionCell.d.ts +4 -0
- package/components/DataGridActionCell/DataGridActionCell.js +4 -0
- package/components/DatePicker/DatePicker.d.ts +3 -0
- package/components/DatePicker/DatePicker.js +3 -0
- package/components/DateRangePicker/DateRangePicker.d.ts +3 -0
- package/components/DateRangePicker/DateRangePicker.js +3 -0
- package/components/DescriptionCell/DescriptionCell.d.ts +4 -0
- package/components/DescriptionCell/DescriptionCell.js +4 -0
- package/components/DescriptionList/types.d.ts +1 -1
- package/components/Dialog/Dialog.d.ts +3 -0
- package/components/Dialog/Dialog.js +3 -0
- package/components/Dialog/useLogic/useLogic.js +3 -3
- package/components/EmailField/EmailField.d.ts +3 -0
- package/components/EmailField/EmailField.js +3 -0
- package/components/EmailOrPhoneField/EmailOrPhoneField.d.ts +1 -0
- package/components/EmailOrPhoneField/EmailOrPhoneField.js +1 -0
- package/components/MaskField/MaskField.d.ts +8 -0
- package/components/MaskField/MaskField.js +8 -0
- package/components/NewPopover/NewPopover.d.ts +3 -0
- package/components/NewPopover/NewPopover.js +3 -0
- package/components/NewStepper/NewStepper.d.ts +4 -0
- package/components/NewStepper/NewStepper.js +4 -0
- package/components/NumberField/NumberField.d.ts +3 -0
- package/components/NumberField/NumberField.js +3 -0
- package/components/PageAside/types.d.ts +4 -0
- package/components/PageHeader/types.d.ts +3 -3
- package/components/PageLayout/PageLayout.d.ts +4 -0
- package/components/PageLayout/PageLayout.js +4 -0
- package/components/PasswordField/PasswordField.d.ts +3 -0
- package/components/PasswordField/PasswordField.js +3 -0
- package/components/RadioGroup/RadioGroup.d.ts +1 -0
- package/components/RadioGroup/RadioGroup.js +1 -0
- package/components/Select/Select.d.ts +3 -0
- package/components/Select/Select.js +3 -0
- package/components/SelectionCard/SelectionCard.d.ts +1 -0
- package/components/SelectionCard/SelectionCard.js +1 -0
- package/components/TextArea/TextArea.d.ts +3 -0
- package/components/TextArea/TextArea.js +3 -0
- package/components/TextField/TextField.d.ts +3 -0
- package/components/TextField/TextField.js +3 -0
- package/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +3 -0
- package/components/ToggleButtonGroup/ToggleButtonGroup.js +3 -0
- package/components/TreeAsyncAutocomplete/TreeAsyncAutocomplete.d.ts +3 -0
- package/components/TreeAsyncAutocomplete/TreeAsyncAutocomplete.js +3 -0
- package/components/TreeAutocomplete/TreeAutocomplete.d.ts +3 -0
- package/components/TreeAutocomplete/TreeAutocomplete.js +3 -0
- package/components/TreeLikeAsyncAutocomplete/TreeLikeAsyncAutocomplete.d.ts +3 -0
- package/components/TreeLikeAsyncAutocomplete/TreeLikeAsyncAutocomplete.js +3 -0
- package/components/TreeLikeAutocomplete/TreeLikeAutocomplete.d.ts +3 -0
- package/components/TreeLikeAutocomplete/TreeLikeAutocomplete.js +3 -0
- package/components/fileUploading/FileUploader/FileUploader.d.ts +3 -0
- package/components/fileUploading/FileUploader/FileUploader.js +3 -0
- package/components/fileUploading/PreviewFileUploader/PreviewFileUploader.d.ts +3 -0
- package/components/fileUploading/PreviewFileUploader/PreviewFileUploader.js +3 -0
- package/components/utils/formatCssSize/formatCssSize.d.ts +7 -0
- package/components/utils/formatCssSize/formatCssSize.js +7 -0
- package/components/utils/formatCssSize/index.d.ts +1 -0
- package/components/utils/formatCssSize/index.js +1 -0
- package/hook-form/Form/Form.d.ts +3 -0
- package/hook-form/Form/Form.js +3 -0
- package/hook-form/FormAddressAutocomplete/FormAddressAutocomplete.d.ts +3 -0
- package/hook-form/FormAddressAutocomplete/FormAddressAutocomplete.js +3 -0
- package/hook-form/FormAsyncAutocomplete/FormAsyncAutocomplete.d.ts +3 -0
- package/hook-form/FormAsyncAutocomplete/FormAsyncAutocomplete.js +3 -0
- package/hook-form/FormAutocomplete/FormAutocomplete.d.ts +1 -0
- package/hook-form/FormAutocomplete/FormAutocomplete.js +1 -0
- package/hook-form/FormCheckboxField/FormCheckboxField.d.ts +3 -0
- package/hook-form/FormCheckboxField/FormCheckboxField.js +3 -0
- package/hook-form/FormCodeField/FormCodeField.d.ts +1 -0
- package/hook-form/FormCodeField/FormCodeField.js +1 -0
- package/hook-form/FormDatePicker/FormDatePicker.d.ts +1 -0
- package/hook-form/FormDatePicker/FormDatePicker.js +1 -0
- package/hook-form/FormDateRangePicker/FormDateRangePicker.d.ts +1 -0
- package/hook-form/FormDateRangePicker/FormDateRangePicker.js +1 -0
- package/hook-form/FormEmailField/FormEmailField.d.ts +3 -0
- package/hook-form/FormEmailField/FormEmailField.js +3 -0
- package/hook-form/FormEmailOrPhoneField/FormEmailOrPhoneField.d.ts +3 -0
- package/hook-form/FormEmailOrPhoneField/FormEmailOrPhoneField.js +3 -0
- package/hook-form/FormFileUploader/FormFileUploader.d.ts +3 -0
- package/hook-form/FormFileUploader/FormFileUploader.js +3 -0
- package/hook-form/FormMaskField/FormMaskField.d.ts +1 -0
- package/hook-form/FormMaskField/FormMaskField.js +1 -0
- package/hook-form/FormNumberField/FormNumberField.d.ts +1 -0
- package/hook-form/FormNumberField/FormNumberField.js +1 -0
- package/hook-form/FormPasswordField/FormPasswordField.d.ts +1 -0
- package/hook-form/FormPasswordField/FormPasswordField.js +1 -0
- package/hook-form/FormPreviewFileUploader/FormPreviewFileUploader.d.ts +3 -0
- package/hook-form/FormPreviewFileUploader/FormPreviewFileUploader.js +3 -0
- package/hook-form/FormRadioGroup/FormRadioGroup.d.ts +3 -0
- package/hook-form/FormRadioGroup/FormRadioGroup.js +3 -0
- package/hook-form/FormSearchField/FormSearchField.d.ts +3 -0
- package/hook-form/FormSearchField/FormSearchField.js +3 -0
- package/hook-form/FormSelect/FormSelect.d.ts +1 -0
- package/hook-form/FormSelect/FormSelect.js +1 -0
- package/hook-form/FormSelectionCardGroup/FormSelectionCardGroup.d.ts +1 -0
- package/hook-form/FormSelectionCardGroup/FormSelectionCardGroup.js +1 -0
- package/hook-form/FormTextArea/FormTextArea.d.ts +1 -0
- package/hook-form/FormTextArea/FormTextArea.js +1 -0
- package/hook-form/FormTextField/FormTextField.d.ts +3 -0
- package/hook-form/FormTextField/FormTextField.js +3 -0
- package/hook-form/FormToggleButtonGroup/FormToggleButtonGroup.d.ts +3 -0
- package/hook-form/FormToggleButtonGroup/FormToggleButtonGroup.js +3 -0
- package/hook-form/FormTreeAsyncAutocomplete/FormTreeAsyncAutocomplete.d.ts +1 -0
- package/hook-form/FormTreeAsyncAutocomplete/FormTreeAsyncAutocomplete.js +1 -0
- package/hook-form/FormTreeAutocomplete/FormTreeAutocomplete.d.ts +1 -0
- package/hook-form/FormTreeAutocomplete/FormTreeAutocomplete.js +1 -0
- package/hook-form/FormTreeLikeAsyncAutocomplete/FormTreeLikeAsyncAutocomplete.d.ts +1 -0
- package/hook-form/FormTreeLikeAsyncAutocomplete/FormTreeLikeAsyncAutocomplete.js +1 -0
- package/hook-form/FormTreeLikeAutocomplete/FormTreeLikeAutocomplete.d.ts +1 -0
- package/hook-form/FormTreeLikeAutocomplete/FormTreeLikeAutocomplete.js +1 -0
- package/hook-form/FormWizard/FormWizard.d.ts +1 -0
- package/hook-form/FormWizard/FormWizard.js +1 -0
- package/icons/StarOutlineMd/StarOutlineMd.d.ts +3 -0
- package/icons/StarOutlineMd/StarOutlineMd.js +3 -0
- package/icons/StarOutlineMd/index.d.ts +1 -0
- package/icons/StarOutlineMd/index.js +1 -0
- package/icons/StarOutlineMd/public.d.ts +1 -0
- package/icons/StarOutlineMd/public.js +1 -0
- package/icons/index.d.ts +2 -1
- package/icons/index.js +2 -1
- package/node/components/AddressAutocomplete/AddressAutocomplete.d.ts +3 -0
- package/node/components/AddressAutocomplete/AddressAutocomplete.js +3 -0
- package/node/components/AsyncAutocomplete/AsyncAutocomplete.d.ts +3 -0
- package/node/components/AsyncAutocomplete/AsyncAutocomplete.js +3 -0
- package/node/components/Autocomplete/Autocomplete.d.ts +3 -0
- package/node/components/Autocomplete/Autocomplete.js +3 -0
- package/node/components/Banner/Banner.d.ts +1 -1
- package/node/components/Banner/Banner.js +4 -1
- package/node/components/Banner/BannerContainer/styles.js +12 -3
- package/node/components/Banner/BannerTemplate/BannerTemplate.d.ts +5 -1
- package/node/components/Banner/BannerTemplate/BannerTemplate.js +6 -2
- package/node/components/Banner/BannerTemplate/styles.js +7 -1
- package/node/components/Banner/constants.d.ts +2 -0
- package/node/components/Banner/constants.js +3 -1
- package/node/components/Banner/types.d.ts +11 -1
- package/node/components/Button/Button.d.ts +3 -0
- package/node/components/Button/Button.js +3 -0
- package/node/components/CheckboxField/CheckboxField.d.ts +1 -0
- package/node/components/CheckboxField/CheckboxField.js +1 -0
- package/node/components/CodeField/CodeField.d.ts +1 -0
- package/node/components/CodeField/CodeField.js +1 -0
- package/node/components/DataGrid/types.d.ts +3 -0
- package/node/components/DataGridActionCell/DataGridActionCell.d.ts +4 -0
- package/node/components/DataGridActionCell/DataGridActionCell.js +4 -0
- package/node/components/DatePicker/DatePicker.d.ts +3 -0
- package/node/components/DatePicker/DatePicker.js +3 -0
- package/node/components/DateRangePicker/DateRangePicker.d.ts +3 -0
- package/node/components/DateRangePicker/DateRangePicker.js +3 -0
- package/node/components/DescriptionCell/DescriptionCell.d.ts +4 -0
- package/node/components/DescriptionCell/DescriptionCell.js +4 -0
- package/node/components/DescriptionList/types.d.ts +1 -1
- package/node/components/Dialog/Dialog.d.ts +3 -0
- package/node/components/Dialog/Dialog.js +3 -0
- package/node/components/Dialog/useLogic/useLogic.js +3 -3
- package/node/components/EmailField/EmailField.d.ts +3 -0
- package/node/components/EmailField/EmailField.js +3 -0
- package/node/components/EmailOrPhoneField/EmailOrPhoneField.d.ts +1 -0
- package/node/components/EmailOrPhoneField/EmailOrPhoneField.js +1 -0
- package/node/components/MaskField/MaskField.d.ts +8 -0
- package/node/components/MaskField/MaskField.js +8 -0
- package/node/components/NewPopover/NewPopover.d.ts +3 -0
- package/node/components/NewPopover/NewPopover.js +3 -0
- package/node/components/NewStepper/NewStepper.d.ts +4 -0
- package/node/components/NewStepper/NewStepper.js +4 -0
- package/node/components/NumberField/NumberField.d.ts +3 -0
- package/node/components/NumberField/NumberField.js +3 -0
- package/node/components/PageAside/types.d.ts +4 -0
- package/node/components/PageHeader/types.d.ts +3 -3
- package/node/components/PageLayout/PageLayout.d.ts +4 -0
- package/node/components/PageLayout/PageLayout.js +4 -0
- package/node/components/PasswordField/PasswordField.d.ts +3 -0
- package/node/components/PasswordField/PasswordField.js +3 -0
- package/node/components/RadioGroup/RadioGroup.d.ts +1 -0
- package/node/components/RadioGroup/RadioGroup.js +1 -0
- package/node/components/Select/Select.d.ts +3 -0
- package/node/components/Select/Select.js +3 -0
- package/node/components/SelectionCard/SelectionCard.d.ts +1 -0
- package/node/components/SelectionCard/SelectionCard.js +1 -0
- package/node/components/TextArea/TextArea.d.ts +3 -0
- package/node/components/TextArea/TextArea.js +3 -0
- package/node/components/TextField/TextField.d.ts +3 -0
- package/node/components/TextField/TextField.js +3 -0
- package/node/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +3 -0
- package/node/components/ToggleButtonGroup/ToggleButtonGroup.js +3 -0
- package/node/components/TreeAsyncAutocomplete/TreeAsyncAutocomplete.d.ts +3 -0
- package/node/components/TreeAsyncAutocomplete/TreeAsyncAutocomplete.js +3 -0
- package/node/components/TreeAutocomplete/TreeAutocomplete.d.ts +3 -0
- package/node/components/TreeAutocomplete/TreeAutocomplete.js +3 -0
- package/node/components/TreeLikeAsyncAutocomplete/TreeLikeAsyncAutocomplete.d.ts +3 -0
- package/node/components/TreeLikeAsyncAutocomplete/TreeLikeAsyncAutocomplete.js +3 -0
- package/node/components/TreeLikeAutocomplete/TreeLikeAutocomplete.d.ts +3 -0
- package/node/components/TreeLikeAutocomplete/TreeLikeAutocomplete.js +3 -0
- package/node/components/fileUploading/FileUploader/FileUploader.d.ts +3 -0
- package/node/components/fileUploading/FileUploader/FileUploader.js +3 -0
- package/node/components/fileUploading/PreviewFileUploader/PreviewFileUploader.d.ts +3 -0
- package/node/components/fileUploading/PreviewFileUploader/PreviewFileUploader.js +3 -0
- package/node/components/utils/formatCssSize/formatCssSize.d.ts +7 -0
- package/node/components/utils/formatCssSize/formatCssSize.js +11 -0
- package/node/components/utils/formatCssSize/index.d.ts +1 -0
- package/node/components/utils/formatCssSize/index.js +17 -0
- package/node/hook-form/Form/Form.d.ts +3 -0
- package/node/hook-form/Form/Form.js +3 -0
- package/node/hook-form/FormAddressAutocomplete/FormAddressAutocomplete.d.ts +3 -0
- package/node/hook-form/FormAddressAutocomplete/FormAddressAutocomplete.js +3 -0
- package/node/hook-form/FormAsyncAutocomplete/FormAsyncAutocomplete.d.ts +3 -0
- package/node/hook-form/FormAsyncAutocomplete/FormAsyncAutocomplete.js +3 -0
- package/node/hook-form/FormAutocomplete/FormAutocomplete.d.ts +1 -0
- package/node/hook-form/FormAutocomplete/FormAutocomplete.js +1 -0
- package/node/hook-form/FormCheckboxField/FormCheckboxField.d.ts +3 -0
- package/node/hook-form/FormCheckboxField/FormCheckboxField.js +3 -0
- package/node/hook-form/FormCodeField/FormCodeField.d.ts +1 -0
- package/node/hook-form/FormCodeField/FormCodeField.js +1 -0
- package/node/hook-form/FormDatePicker/FormDatePicker.d.ts +1 -0
- package/node/hook-form/FormDatePicker/FormDatePicker.js +1 -0
- package/node/hook-form/FormDateRangePicker/FormDateRangePicker.d.ts +1 -0
- package/node/hook-form/FormDateRangePicker/FormDateRangePicker.js +1 -0
- package/node/hook-form/FormEmailField/FormEmailField.d.ts +3 -0
- package/node/hook-form/FormEmailField/FormEmailField.js +3 -0
- package/node/hook-form/FormEmailOrPhoneField/FormEmailOrPhoneField.d.ts +3 -0
- package/node/hook-form/FormEmailOrPhoneField/FormEmailOrPhoneField.js +3 -0
- package/node/hook-form/FormFileUploader/FormFileUploader.d.ts +3 -0
- package/node/hook-form/FormFileUploader/FormFileUploader.js +3 -0
- package/node/hook-form/FormMaskField/FormMaskField.d.ts +1 -0
- package/node/hook-form/FormMaskField/FormMaskField.js +1 -0
- package/node/hook-form/FormNumberField/FormNumberField.d.ts +1 -0
- package/node/hook-form/FormNumberField/FormNumberField.js +1 -0
- package/node/hook-form/FormPasswordField/FormPasswordField.d.ts +1 -0
- package/node/hook-form/FormPasswordField/FormPasswordField.js +1 -0
- package/node/hook-form/FormPreviewFileUploader/FormPreviewFileUploader.d.ts +3 -0
- package/node/hook-form/FormPreviewFileUploader/FormPreviewFileUploader.js +3 -0
- package/node/hook-form/FormRadioGroup/FormRadioGroup.d.ts +3 -0
- package/node/hook-form/FormRadioGroup/FormRadioGroup.js +3 -0
- package/node/hook-form/FormSearchField/FormSearchField.d.ts +3 -0
- package/node/hook-form/FormSearchField/FormSearchField.js +3 -0
- package/node/hook-form/FormSelect/FormSelect.d.ts +1 -0
- package/node/hook-form/FormSelect/FormSelect.js +1 -0
- package/node/hook-form/FormSelectionCardGroup/FormSelectionCardGroup.d.ts +1 -0
- package/node/hook-form/FormSelectionCardGroup/FormSelectionCardGroup.js +1 -0
- package/node/hook-form/FormTextArea/FormTextArea.d.ts +1 -0
- package/node/hook-form/FormTextArea/FormTextArea.js +1 -0
- package/node/hook-form/FormTextField/FormTextField.d.ts +3 -0
- package/node/hook-form/FormTextField/FormTextField.js +3 -0
- package/node/hook-form/FormToggleButtonGroup/FormToggleButtonGroup.d.ts +3 -0
- package/node/hook-form/FormToggleButtonGroup/FormToggleButtonGroup.js +3 -0
- package/node/hook-form/FormTreeAsyncAutocomplete/FormTreeAsyncAutocomplete.d.ts +1 -0
- package/node/hook-form/FormTreeAsyncAutocomplete/FormTreeAsyncAutocomplete.js +1 -0
- package/node/hook-form/FormTreeAutocomplete/FormTreeAutocomplete.d.ts +1 -0
- package/node/hook-form/FormTreeAutocomplete/FormTreeAutocomplete.js +1 -0
- package/node/hook-form/FormTreeLikeAsyncAutocomplete/FormTreeLikeAsyncAutocomplete.d.ts +1 -0
- package/node/hook-form/FormTreeLikeAsyncAutocomplete/FormTreeLikeAsyncAutocomplete.js +1 -0
- package/node/hook-form/FormTreeLikeAutocomplete/FormTreeLikeAutocomplete.d.ts +1 -0
- package/node/hook-form/FormTreeLikeAutocomplete/FormTreeLikeAutocomplete.js +1 -0
- package/node/hook-form/FormWizard/FormWizard.d.ts +1 -0
- package/node/hook-form/FormWizard/FormWizard.js +1 -0
- package/node/icons/StarOutlineMd/StarOutlineMd.d.ts +3 -0
- package/node/icons/StarOutlineMd/StarOutlineMd.js +7 -0
- package/node/icons/StarOutlineMd/index.d.ts +1 -0
- package/node/icons/StarOutlineMd/index.js +5 -0
- package/node/icons/StarOutlineMd/public.d.ts +1 -0
- package/node/icons/StarOutlineMd/public.js +5 -0
- package/node/icons/index.d.ts +2 -1
- package/node/icons/index.js +8 -6
- package/package.json +1 -1
- package/components/utils/getCssSize/getCssSize.d.ts +0 -4
- package/components/utils/getCssSize/getCssSize.js +0 -4
- package/components/utils/getCssSize/index.d.ts +0 -1
- package/components/utils/getCssSize/index.js +0 -1
- package/node/components/utils/getCssSize/getCssSize.d.ts +0 -4
- package/node/components/utils/getCssSize/getCssSize.js +0 -8
- package/node/components/utils/getCssSize/index.d.ts +0 -1
- package/node/components/utils/getCssSize/index.js +0 -5
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type Address } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* @see {@link FormAddressAutocomplete}
|
|
5
|
+
*/
|
|
3
6
|
export declare const AddressAutocomplete: <TOptions extends Address = Address>(props: Pick<import("../AsyncAutocomplete").AsyncAutocompleteProps<TOptions, false, false, boolean>, "defaultValue" | "className" | "id" | "role" | "ref" | "label" | "open" | "size" | "disablePortal" | "onClose" | "onOpen" | "placeholder" | "readOnly" | "isDisabled" | "isError" | "inputRef" | "hideHelperText" | "helperText" | "loadingText" | "noOptionsText" | "renderOption" | "autoHighlight" | "getOptionDisabled" | "onInputChange" | "fetchOptions" | "fetchDelayMs" | "minSymbolsToFetch" | "isFullWidth" | "isSuccess" | "isLoading" | "isRequired"> & {
|
|
4
7
|
value?: TOptions | undefined;
|
|
5
8
|
onChange: (value: TOptions) => void;
|
|
@@ -9,4 +9,7 @@ const AddressAutocompleteInner = (props, ref) => {
|
|
|
9
9
|
className: hidePersonalInputDataClassname,
|
|
10
10
|
}, overflowOption: { className: hidePersonalDataClassname }, ...restProps }));
|
|
11
11
|
};
|
|
12
|
+
/**
|
|
13
|
+
* @see {@link FormAddressAutocomplete}
|
|
14
|
+
*/
|
|
12
15
|
export const AddressAutocomplete = forwardRefWithGeneric(AddressAutocompleteInner);
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* @see {@link FormAsyncAutocomplete}
|
|
4
|
+
*/
|
|
2
5
|
export declare const AsyncAutocomplete: <TOptions, TMultiple extends boolean = false, TDisableClearable extends boolean = false, TFreeSolo extends boolean = false>(props: Omit<import("../Autocomplete").AutocompleteProps<TOptions, TMultiple, TDisableClearable, TFreeSolo>, "success" | "error" | "disabled" | "fullWidth" | "loading" | "required" | "options" | "filterOptions" | "inputValue"> & {
|
|
3
6
|
isLoading?: boolean | undefined;
|
|
4
7
|
isDisabled?: boolean | undefined;
|
|
@@ -7,4 +7,7 @@ const AsyncAutocompleteInner = (props, ref) => {
|
|
|
7
7
|
const { autocompleteProps } = useLogic(props);
|
|
8
8
|
return _jsx(Autocomplete, { ...autocompleteProps, ref: ref });
|
|
9
9
|
};
|
|
10
|
+
/**
|
|
11
|
+
* @see {@link FormAsyncAutocomplete}
|
|
12
|
+
*/
|
|
10
13
|
export const AsyncAutocomplete = forwardRefWithGeneric(AsyncAutocompleteInner);
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type AutocompleteRenderInputParams } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* @see {@link FormAutocomplete}
|
|
5
|
+
*/
|
|
3
6
|
export declare const Autocomplete: <TAutocompleteValueProps, TMultiple extends boolean, TDisableClearable extends boolean, TFreeSolo extends boolean>(props: Omit<import("..").WithoutEmotionSpecific<import("@mui/material").AutocompleteProps<TAutocompleteValueProps, TMultiple, TDisableClearable, TFreeSolo, "div">>, "size" | "clearText" | "closeText" | "noOptionsText" | "openText" | "renderInput"> & Pick<import("../TextField").TextFieldProps, "label" | "success" | "error" | "placeholder" | "required" | "inputRef" | "helperText" | "inputProps"> & {
|
|
4
7
|
renderInput?: ((props: Omit<import("..").WithoutEmotionSpecific<import("@mui/material").TextFieldProps>, "color" | "select" | "margin" | "variant" | "multiline" | "SelectProps"> & {
|
|
5
8
|
success?: boolean | undefined;
|
|
@@ -124,4 +124,7 @@ const AutocompleteInner = (props, ref) => {
|
|
|
124
124
|
},
|
|
125
125
|
}, renderInput: renderInput, renderTags: renderTags, renderOption: renderOption, value: value, ...autocompleteProps }));
|
|
126
126
|
};
|
|
127
|
+
/**
|
|
128
|
+
* @see {@link FormAutocomplete}
|
|
129
|
+
*/
|
|
127
130
|
export const Autocomplete = forwardRefWithGeneric(AutocompleteInner);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createElement as _createElement } from "react";
|
|
2
2
|
import { BANNER_CONTAINER_ID, notify } from '../Notification';
|
|
3
|
+
import { formatCssSize } from '../utils/formatCssSize';
|
|
3
4
|
import { BannerTemplate } from './BannerTemplate';
|
|
4
5
|
import { bannerClassnames } from './constants';
|
|
5
6
|
/**
|
|
@@ -59,14 +60,16 @@ class Banner {
|
|
|
59
60
|
this.setIsOpenModal(true);
|
|
60
61
|
return;
|
|
61
62
|
}
|
|
63
|
+
const { width, ...templateOptions } = options;
|
|
62
64
|
bannerId = notify.custom(({ toastProps }) => {
|
|
63
65
|
const { key, ...restToastProps } = toastProps;
|
|
64
|
-
return (_createElement(BannerTemplate, { ...
|
|
66
|
+
return (_createElement(BannerTemplate, { ...templateOptions, ...restToastProps, onClose: options?.onClose, key: key }));
|
|
65
67
|
}, {
|
|
66
68
|
containerId: options.containerId || BANNER_CONTAINER_ID,
|
|
67
69
|
hideProgressBar: true,
|
|
68
70
|
autoClose: false,
|
|
69
71
|
className: bannerClassnames.root,
|
|
72
|
+
style: { '--banner-width': formatCssSize(width) },
|
|
70
73
|
});
|
|
71
74
|
},
|
|
72
75
|
/**
|
|
@@ -1,22 +1,31 @@
|
|
|
1
1
|
import { ToastContainer } from 'react-toastify-next';
|
|
2
2
|
import { styled } from '../../styled';
|
|
3
|
-
import { bannerClassnames } from '../constants';
|
|
3
|
+
import { BANNER_DEFAULT_WIDTH, bannerClassnames } from '../constants';
|
|
4
4
|
export const Inner = styled(ToastContainer) `
|
|
5
|
+
--banner-width: ${BANNER_DEFAULT_WIDTH};
|
|
6
|
+
|
|
5
7
|
/* Базовые стили Toastify могут подключиться после стилей контейнера. */
|
|
6
8
|
&& {
|
|
7
9
|
position: relative;
|
|
8
10
|
right: 0;
|
|
9
11
|
bottom: 0;
|
|
10
12
|
|
|
13
|
+
/* Баннер может быть шире контейнера уведомлений, поэтому выравниваем его по правому краю, а лишнее уходит влево */
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
align-items: flex-end;
|
|
17
|
+
|
|
11
18
|
width: 100%;
|
|
12
|
-
|
|
13
|
-
max-width: 432px;
|
|
19
|
+
padding-right: ${({ theme }) => theme.spacing(5)};
|
|
14
20
|
padding-bottom: 0;
|
|
15
21
|
padding-left: ${({ theme }) => theme.spacing(3)};
|
|
16
22
|
}
|
|
17
23
|
|
|
18
24
|
.${bannerClassnames.root} {
|
|
19
|
-
|
|
25
|
+
flex-shrink: 0;
|
|
26
|
+
|
|
27
|
+
width: var(--banner-width);
|
|
28
|
+
max-width: calc(100vw - ${({ theme }) => theme.spacing(10)});
|
|
20
29
|
height: auto;
|
|
21
30
|
padding: 0;
|
|
22
31
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Dispatch, type ReactNode, type SetStateAction } from 'react';
|
|
1
|
+
import { type CSSProperties, type Dispatch, type ReactNode, type SetStateAction } from 'react';
|
|
2
2
|
import { type ToastProps } from 'react-toastify-next/dist/types';
|
|
3
3
|
import { type ActionParams } from '../types';
|
|
4
4
|
type BannerTemplateProps = {
|
|
@@ -10,6 +10,10 @@ type BannerTemplateProps = {
|
|
|
10
10
|
* Обработчик, для выполнения дополнительных действий при закрытии(например, снятие метрик)
|
|
11
11
|
*/
|
|
12
12
|
onClose?: () => void;
|
|
13
|
+
/**
|
|
14
|
+
* Высота изображения. Число задаётся в пикселях. На mobile не применяется
|
|
15
|
+
*/
|
|
16
|
+
imageHeight?: CSSProperties['height'];
|
|
13
17
|
setIsOpenDialog?: Dispatch<SetStateAction<boolean>>;
|
|
14
18
|
} & Partial<ToastProps>;
|
|
15
19
|
export declare const BannerTemplate: (props: BannerTemplateProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,10 +2,14 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Button } from '../../Button';
|
|
3
3
|
import { Typography } from '../../Typography';
|
|
4
4
|
import { useViewportType } from '../../useViewportType';
|
|
5
|
+
import { formatCssSize } from '../../utils/formatCssSize';
|
|
5
6
|
import { Container, Footer, Image, Wrapper, WrapperTextContent, } from './styles';
|
|
6
7
|
export const BannerTemplate = (props) => {
|
|
7
|
-
const { closeToast, imageSrc, title, description, onClose, action, setIsOpenDialog, } = props;
|
|
8
|
+
const { closeToast, imageSrc, title, description, onClose, action, setIsOpenDialog, imageHeight, } = props;
|
|
8
9
|
const { isMobile } = useViewportType();
|
|
10
|
+
const containerStyle = {
|
|
11
|
+
'--banner-image-height': formatCssSize(imageHeight),
|
|
12
|
+
};
|
|
9
13
|
const handleClose = () => {
|
|
10
14
|
closeToast?.();
|
|
11
15
|
onClose?.();
|
|
@@ -14,5 +18,5 @@ export const BannerTemplate = (props) => {
|
|
|
14
18
|
closeToast?.();
|
|
15
19
|
setIsOpenDialog?.(false);
|
|
16
20
|
};
|
|
17
|
-
return (_jsxs(Container, { children: [imageSrc && _jsx(Image, { src: imageSrc }), _jsxs(Wrapper, { container: true, children: [_jsxs(WrapperTextContent, { container: true, children: [title && _jsx(Typography, { variant: "h4", children: title }), description && (_jsx(Typography, { variant: "body1", children: description }))] }), _jsxs(Footer, { children: [!isMobile && (_jsx(Button, { onClick: handleClose, variant: "text", size: "large", children: "\u0417\u0430\u043A\u0440\u044B\u0442\u044C" })), action?.({ closeBanner: handleCloseForAction })] })] })] }));
|
|
21
|
+
return (_jsxs(Container, { style: containerStyle, children: [imageSrc && _jsx(Image, { src: imageSrc }), _jsxs(Wrapper, { container: true, children: [_jsxs(WrapperTextContent, { container: true, children: [title && _jsx(Typography, { variant: "h4", children: title }), description && (_jsx(Typography, { variant: "body1", children: description }))] }), _jsxs(Footer, { children: [!isMobile && (_jsx(Button, { onClick: handleClose, variant: "text", size: "large", children: "\u0417\u0430\u043A\u0440\u044B\u0442\u044C" })), action?.({ closeBanner: handleCloseForAction })] })] })] }));
|
|
18
22
|
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { Grid } from '../../Grid';
|
|
2
2
|
import { styled } from '../../styled';
|
|
3
|
+
import { BANNER_DEFAULT_IMAGE_HEIGHT } from '../constants';
|
|
3
4
|
export const Container = styled.article `
|
|
5
|
+
--banner-image-height: ${BANNER_DEFAULT_IMAGE_HEIGHT};
|
|
6
|
+
|
|
4
7
|
width: 100%;
|
|
5
8
|
height: 100%;
|
|
6
9
|
|
|
@@ -11,12 +14,15 @@ export const Image = styled.img `
|
|
|
11
14
|
|
|
12
15
|
width: 100%;
|
|
13
16
|
max-width: 100%;
|
|
14
|
-
height:
|
|
17
|
+
height: var(--banner-image-height);
|
|
15
18
|
max-height: 100%;
|
|
16
19
|
|
|
17
20
|
object-fit: contain;
|
|
18
21
|
|
|
19
22
|
${({ theme }) => theme.breakpoints.down('mobile')} {
|
|
23
|
+
/* На mobile высота изображения фиксированная, imageHeight не применяется */
|
|
24
|
+
height: ${BANNER_DEFAULT_IMAGE_HEIGHT};
|
|
25
|
+
|
|
20
26
|
object-fit: cover;
|
|
21
27
|
}
|
|
22
28
|
`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
1
|
+
import { type CSSProperties, type ReactNode } from 'react';
|
|
2
2
|
import { type ToastProps } from 'react-toastify-next/dist/types';
|
|
3
3
|
export type ActionParams = {
|
|
4
4
|
closeBanner: () => void;
|
|
@@ -35,4 +35,14 @@ export type BannerProps = {
|
|
|
35
35
|
* Обработчик, для выполнения дополнительных действий при закрытии(например, снятие метрик)
|
|
36
36
|
*/
|
|
37
37
|
onClose?: () => void;
|
|
38
|
+
/**
|
|
39
|
+
* Ширина баннера. Число задаётся в пикселях. На mobile не применяется
|
|
40
|
+
* @default 400px
|
|
41
|
+
*/
|
|
42
|
+
width?: CSSProperties['width'];
|
|
43
|
+
/**
|
|
44
|
+
* Высота изображения. Число задаётся в пикселях. На mobile не применяется
|
|
45
|
+
* @default 160px
|
|
46
|
+
*/
|
|
47
|
+
imageHeight?: CSSProperties['height'];
|
|
38
48
|
} & Pick<ToastProps, 'containerId'>;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { type ElementType } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* @see {@link IconButton} — кнопка без текста, только с иконкой
|
|
4
|
+
*/
|
|
2
5
|
export declare const Button: <TComponent extends ElementType>(props: Omit<import("..").WithoutEmotionSpecific<import("@mui/material").ButtonProps>, "color" | "component" | "size" | "variant" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple"> & {
|
|
3
6
|
variant?: "light" | "link" | "text" | "contained" | "outlined" | undefined;
|
|
4
7
|
loading?: boolean | undefined;
|
|
@@ -10,5 +10,8 @@ const UnwrappedButton = (props, ref) => {
|
|
|
10
10
|
: ButtonColors.Primary, loading, disabled, children, className, selected, ...restProps } = props;
|
|
11
11
|
return (_jsxs(StyledButton, { variant: variant, ref: ref, color: color, disabled: disabled || loading, selected: selected, ...restProps, className: classnames, "aria-disabled": loading, children: [loading && (_jsx(StyledLoader, { color: loadingIndicatorColor, size: "small", "$color": color, "$variant": variant, "$isDisabled": disabled })), children] }));
|
|
12
12
|
};
|
|
13
|
+
/**
|
|
14
|
+
* @see {@link IconButton} — кнопка без текста, только с иконкой
|
|
15
|
+
*/
|
|
13
16
|
export const Button = forwardRefWithGeneric(UnwrappedButton);
|
|
14
17
|
export default Button;
|
|
@@ -24,6 +24,7 @@ export type CheckboxFieldProps = CheckboxProps & {
|
|
|
24
24
|
};
|
|
25
25
|
/**
|
|
26
26
|
* Составной компонент чекбокса. Содержит label, tooltip, helperText и т.д.
|
|
27
|
+
* @see {@link FormCheckboxField}
|
|
27
28
|
*/
|
|
28
29
|
export declare const CheckboxField: import("react").ForwardRefExoticComponent<Omit<import("react").HTMLAttributes<HTMLDivElement>, "onChange"> & {
|
|
29
30
|
checked?: boolean | undefined;
|
|
@@ -7,6 +7,7 @@ import { checkboxFieldClassnames } from './constants';
|
|
|
7
7
|
import { StyledFormControlledLabel, StyledFormHelperText } from './styles';
|
|
8
8
|
/**
|
|
9
9
|
* Составной компонент чекбокса. Содержит label, tooltip, helperText и т.д.
|
|
10
|
+
* @see {@link FormCheckboxField}
|
|
10
11
|
*/
|
|
11
12
|
export const CheckboxField = forwardRef(({ isSuccess, helperText, hideHelperText = false, label, isError, ...restProps }, ref) => {
|
|
12
13
|
const showTooltip = useMemo(() => Boolean(isError && hideHelperText), [isError, hideHelperText]);
|
|
@@ -8,6 +8,7 @@ import { ResendCodeButton } from './ResendCodeButton';
|
|
|
8
8
|
import { Digit, DigitsItem, DigitsWrapper, FieldLabel, StyledHelperText, Wrapper, } from './styles';
|
|
9
9
|
/**
|
|
10
10
|
* Поле для ввода кода подтверждения
|
|
11
|
+
* @see {@link FormCodeField}
|
|
11
12
|
*/
|
|
12
13
|
export const CodeField = forwardRef(({ label, resendTimeout = RESEND_TIMEOUT_DEFAULT, codeLength, isAllowResendCode = false, onResendCode, initialValue, loading = false, disabled = false, isError = false, errorText = ERROR_TEXT_DEFAULT, onChange: onFieldChange, onComplete, isAutoFocus = false, isHidePersonalData, }, ref) => {
|
|
13
14
|
const { inputRefs, setFocusIndexNext, setFocusIndexPrevious, setBlur } = useFocusInput(codeLength, isAutoFocus);
|
|
@@ -24,6 +24,8 @@ export type DataGridProps<TData extends Record<string, CellValue> = DataGridRow,
|
|
|
24
24
|
* sortable: true,
|
|
25
25
|
* }]} />
|
|
26
26
|
* Конфигурация колонок для таблицы
|
|
27
|
+
* @see {@link DescriptionCell} — две строки текста в ячейке
|
|
28
|
+
* @see {@link DataGridActionCell} — действия в строке
|
|
27
29
|
*/
|
|
28
30
|
columns: DataGridColumns<TData>[];
|
|
29
31
|
/**
|
|
@@ -46,6 +48,7 @@ export type DataGridProps<TData extends Record<string, CellValue> = DataGridRow,
|
|
|
46
48
|
sorting?: DataGridSort<TSortField>;
|
|
47
49
|
/**
|
|
48
50
|
* Компонент кастомного футера (например Pagination)
|
|
51
|
+
* @see {@link DataGridPagination}
|
|
49
52
|
*/
|
|
50
53
|
footer?: ReactNode;
|
|
51
54
|
/**
|
|
@@ -36,4 +36,8 @@ export type DataGridActionCellProps<TRow> = {
|
|
|
36
36
|
*/
|
|
37
37
|
row: TRow;
|
|
38
38
|
};
|
|
39
|
+
/**
|
|
40
|
+
* @see {@link DataGrid} — таблица, в колонке которой стоят действия
|
|
41
|
+
* @see {@link DataGridInfinite} — таблица с бесконечной прокруткой
|
|
42
|
+
*/
|
|
39
43
|
export declare const DataGridActionCell: <TRow>(props: DataGridActionCellProps<TRow>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -13,6 +13,10 @@ const actionCellCva = cva(dataGridActionCellClassnames.root, {
|
|
|
13
13
|
},
|
|
14
14
|
},
|
|
15
15
|
});
|
|
16
|
+
/**
|
|
17
|
+
* @see {@link DataGrid} — таблица, в колонке которой стоят действия
|
|
18
|
+
* @see {@link DataGridInfinite} — таблица с бесконечной прокруткой
|
|
19
|
+
*/
|
|
16
20
|
export const DataGridActionCell = (props) => {
|
|
17
21
|
const { handleWrapperClick, handleActionClick, actions, mainActions, secondaryActions, hasSecondaryActions, hasMainActions, } = useLogic(props);
|
|
18
22
|
return (_jsx(ActionCellContextProvider, { onActionClick: handleActionClick, children: _jsxs(Wrapper, { onClick: handleWrapperClick, className: actionCellCva({ hasMainActions }), children: [mainActions ? (mainActions()) : (_jsx(DataGridMainActions, { actions: actions?.main })), hasSecondaryActions && (_jsx(SecondaryActionsButton, { actions: actions?.secondary, renderActions: secondaryActions }))] }) }));
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* @see {@link FormDatePicker}
|
|
4
|
+
*/
|
|
2
5
|
export declare const DatePicker: import("react").ForwardRefExoticComponent<import("./DayPicker").MondayFirst & import("./types").WithDoubleNavigationButtons & Partial<import("./types").MinMaxDate> & {
|
|
3
6
|
mask?: string | undefined;
|
|
4
7
|
onChange?: ((date?: Date | null | undefined) => void) | undefined;
|
|
@@ -7,6 +7,9 @@ import { DEFAULT_MAX_DATE, DEFAULT_MIN_DATE, MinMaxDateContextProvider, } from '
|
|
|
7
7
|
import { ButtonWrapper, ConfirmButton, StyledPaper } from './styles';
|
|
8
8
|
import { useLogic } from './useLogic';
|
|
9
9
|
import { YearMonthDayPicker } from './YearMonthDayPicker';
|
|
10
|
+
/**
|
|
11
|
+
* @see {@link FormDatePicker}
|
|
12
|
+
*/
|
|
10
13
|
export const DatePicker = forwardRef((props, forwardedRef) => {
|
|
11
14
|
const { ref, pickerProps, handleOpen, onAccept, confirmButtonProps, isMobile, DatePickerInputProps, datePickerProps, } = useLogic({ ...props, forwardedRef });
|
|
12
15
|
const { className, startAdornment, label, required, helperText, inputProps, mask = DEFAULT_DATE_MASK, size, disabled, inputRef, minDate = DEFAULT_MIN_DATE, maxDate = DEFAULT_MAX_DATE, isMondayFirst, isDoubleNavigationButtonsEnabled, hideHelperText = false, } = props;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* @see {@link FormDateRangePicker} — проверка периода — `rangeDate()` из `@astral/validations`
|
|
4
|
+
*/
|
|
2
5
|
export declare const DateRangePicker: import("react").ForwardRefExoticComponent<Omit<import("../DatePicker").DatePickerProps, "onChange" | "disabled" | "value" | "required" | "inputProps"> & import("../DatePicker/types").WithDoubleNavigationButtons & {
|
|
3
6
|
startDateProps?: import("./types").DateItemProps | undefined;
|
|
4
7
|
endDateProps?: import("./types").DateItemProps | undefined;
|
|
@@ -6,6 +6,9 @@ import { Grid } from '../Grid';
|
|
|
6
6
|
import { PickerSplitter, StyledDatePickerInput, StyledPaper } from './styles';
|
|
7
7
|
import { useLogic } from './useLogic';
|
|
8
8
|
const DEFAULT_SPACING = 1;
|
|
9
|
+
/**
|
|
10
|
+
* @see {@link FormDateRangePicker} — проверка периода — `rangeDate()` из `@astral/validations`
|
|
11
|
+
*/
|
|
9
12
|
export const DateRangePicker = forwardRef((props, forwardedRef) => {
|
|
10
13
|
const { ref, startDatePickerInputProps, endDatePickerInputProps, popoverHoveredContextProviderProps, datePickerPopoverProps, minMaxDateContextProviderProps, startYearMonthDayPickerProps, endYearMonthDayPickerProps, } = useLogic(props, forwardedRef);
|
|
11
14
|
const { startDateProps = {}, endDateProps = {}, mask = DEFAULT_DATE_MASK, spacing = DEFAULT_SPACING, size, isMondayFirst, isDisabled, isError, helperText, isDoubleNavigationButtonsEnabled, hideHelperText = false, } = props;
|
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
import type { DescriptionCellProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* @see {@link DataGrid} — таблица, в колонке которой стоит ячейка
|
|
4
|
+
* @see {@link DataGridInfinite} — таблица с бесконечной прокруткой
|
|
5
|
+
*/
|
|
2
6
|
export declare const DescriptionCell: ({ title, icon, subtitle, iconPosition, }: DescriptionCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,6 +2,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Typography } from '../Typography';
|
|
3
3
|
import { IconWrapper, ItemWrapper, Wrapper } from './styles';
|
|
4
4
|
import { useLogic } from './useLogic';
|
|
5
|
+
/**
|
|
6
|
+
* @see {@link DataGrid} — таблица, в колонке которой стоит ячейка
|
|
7
|
+
* @see {@link DataGridInfinite} — таблица с бесконечной прокруткой
|
|
8
|
+
*/
|
|
5
9
|
export const DescriptionCell = ({ title, icon, subtitle, iconPosition = 'left', }) => {
|
|
6
10
|
const { classnames } = useLogic({ icon, iconPosition });
|
|
7
11
|
return (_jsxs(Wrapper, { className: classnames, children: [_jsx(IconWrapper, { children: icon }), _jsxs(ItemWrapper, { children: [_jsx(Typography, { children: title }), subtitle && (_jsx(Typography, { color: "textSecondary", variant: "caption", children: subtitle }))] })] }));
|
|
@@ -25,7 +25,7 @@ export type DescriptionListItem = {
|
|
|
25
25
|
export type DescriptionListVariant = 'contained' | 'default';
|
|
26
26
|
export type DescriptionListProps = Pick<DescriptionProps, 'justifyContent' | 'leader' | 'separator' | 'direction' | 'isTabularNums'> & {
|
|
27
27
|
/**
|
|
28
|
-
* Список отображаемых "name: value"
|
|
28
|
+
* Список отображаемых "name: value". Вложенный массив — группа, группы разделены линией
|
|
29
29
|
*/
|
|
30
30
|
items: (DescriptionListItem | DescriptionListItem[])[];
|
|
31
31
|
/**
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
import type { DialogProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* @see {@link SideDialog} — панель справа
|
|
4
|
+
*/
|
|
2
5
|
export declare const Dialog: ({ children, title, disableBackdropClick, onClose, size, headerContent, className, classes, disableMobileDrawer, height, width, style, ...props }: DialogProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -22,6 +22,9 @@ const dialogCva = cva(dialogClassnames.root, {
|
|
|
22
22
|
},
|
|
23
23
|
},
|
|
24
24
|
});
|
|
25
|
+
/**
|
|
26
|
+
* @see {@link SideDialog} — панель справа
|
|
27
|
+
*/
|
|
25
28
|
export const Dialog = ({ children, title, disableBackdropClick, onClose, size = 'md', headerContent, className, classes, disableMobileDrawer, height, width, style, ...props }) => {
|
|
26
29
|
const { handleClose, shouldRenderDrawer, dialogClasses, dialogCssVars, hasCustomWidth, hasCustomHeight, } = useLogic({
|
|
27
30
|
onClose,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useViewportType } from '../../useViewportType';
|
|
2
2
|
import { cn } from '../../utils/cn';
|
|
3
|
-
import {
|
|
3
|
+
import { formatCssSize } from '../../utils/formatCssSize';
|
|
4
4
|
import { dialogClassnames } from '../constants';
|
|
5
5
|
export const useLogic = ({ onClose, disableBackdropClick, classes, disableMobileDrawer, height, width, }) => {
|
|
6
6
|
const { isMobile } = useViewportType();
|
|
@@ -17,8 +17,8 @@ export const useLogic = ({ onClose, disableBackdropClick, classes, disableMobile
|
|
|
17
17
|
...restClasses,
|
|
18
18
|
};
|
|
19
19
|
const dialogCssVars = {
|
|
20
|
-
'--dialog-width':
|
|
21
|
-
'--dialog-height':
|
|
20
|
+
'--dialog-width': formatCssSize(width),
|
|
21
|
+
'--dialog-height': formatCssSize(height),
|
|
22
22
|
};
|
|
23
23
|
return {
|
|
24
24
|
dialogCssVars,
|
|
@@ -6,4 +6,7 @@ export type EmailFieldProps = Omit<TextFieldProps, 'type'> & {
|
|
|
6
6
|
*/
|
|
7
7
|
isHidePersonalData?: boolean;
|
|
8
8
|
};
|
|
9
|
+
/**
|
|
10
|
+
* @see {@link FormEmailField}
|
|
11
|
+
*/
|
|
9
12
|
export declare const EmailField: import("react").ForwardRefExoticComponent<Omit<EmailFieldProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -3,6 +3,9 @@ import { forwardRef } from 'react';
|
|
|
3
3
|
import { useHidePersonalData } from '../personalDataSecurity';
|
|
4
4
|
import { TextField } from '../TextField';
|
|
5
5
|
import { cn } from '../utils/cn';
|
|
6
|
+
/**
|
|
7
|
+
* @see {@link FormEmailField}
|
|
8
|
+
*/
|
|
6
9
|
export const EmailField = forwardRef(({ isHidePersonalData, inputProps, ...props }, ref) => {
|
|
7
10
|
const hidePersonalDataClassname = useHidePersonalData({
|
|
8
11
|
isEnabled: isHidePersonalData,
|
|
@@ -6,5 +6,6 @@ import type { EmailOrPhoneFieldProps } from './types';
|
|
|
6
6
|
* - Поддерживает ввод телефона с префиксами +7 и 8, произвольной маской
|
|
7
7
|
* - Работает с объектом формата
|
|
8
8
|
* { value?: string, normalizedValue?: string, type: 'email' | 'phone' | 'unknown' }
|
|
9
|
+
* @see {@link FormEmailOrPhoneField}
|
|
9
10
|
*/
|
|
10
11
|
export declare const EmailOrPhoneField: import("react").ForwardRefExoticComponent<Omit<EmailOrPhoneFieldProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -10,6 +10,7 @@ import { useLogic } from './useLogic';
|
|
|
10
10
|
* - Поддерживает ввод телефона с префиксами +7 и 8, произвольной маской
|
|
11
11
|
* - Работает с объектом формата
|
|
12
12
|
* { value?: string, normalizedValue?: string, type: 'email' | 'phone' | 'unknown' }
|
|
13
|
+
* @see {@link FormEmailOrPhoneField}
|
|
13
14
|
*/
|
|
14
15
|
export const EmailOrPhoneField = forwardRef((props, ref) => {
|
|
15
16
|
const { onBlur, restProps, inputValue, onChange, isHidePersonalData, inputProps, } = useLogic(props);
|
|
@@ -25,5 +25,13 @@ export type MaskFieldProps = Omit<Omit<MaskProps, 'size' | 'defaultValue' | 'row
|
|
|
25
25
|
*/
|
|
26
26
|
blocks?: MaskBlocks;
|
|
27
27
|
};
|
|
28
|
+
/**
|
|
29
|
+
* @see {@link FormMaskField}
|
|
30
|
+
* @see {@link EmailField}
|
|
31
|
+
* @see {@link EmailOrPhoneField}
|
|
32
|
+
* @see {@link FormMobilePhoneField}
|
|
33
|
+
* @see {@link NumberField}
|
|
34
|
+
* @see {@link DatePicker}
|
|
35
|
+
*/
|
|
28
36
|
export declare const MaskField: import("react").ForwardRefExoticComponent<Omit<MaskFieldProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
29
37
|
export {};
|
|
@@ -6,6 +6,14 @@ const MaskedTextField = IMaskMixin(({ ...props }) => {
|
|
|
6
6
|
const textFieldProps = props;
|
|
7
7
|
return _jsx(StyledTextField, { ...textFieldProps });
|
|
8
8
|
});
|
|
9
|
+
/**
|
|
10
|
+
* @see {@link FormMaskField}
|
|
11
|
+
* @see {@link EmailField}
|
|
12
|
+
* @see {@link EmailOrPhoneField}
|
|
13
|
+
* @see {@link FormMobilePhoneField}
|
|
14
|
+
* @see {@link NumberField}
|
|
15
|
+
* @see {@link DatePicker}
|
|
16
|
+
*/
|
|
9
17
|
export const MaskField = forwardRef(({ onChange, onAccept, ...props }, ref) => {
|
|
10
18
|
const maskFieldProps = { unmask: true, ...props };
|
|
11
19
|
const handleMaskFieldAccept = (value, maskRef, e) => {
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
import { type NewPopoverProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* @see {@link Menu} — меню действий
|
|
4
|
+
*/
|
|
2
5
|
export declare const NewPopover: ({ children, onClose, isOpen, title, className, style, placement, anchorEl, disablePortal, disableAutoFocus, hasArrow, disableMobileDrawer, }: NewPopoverProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -15,6 +15,9 @@ const animatedWrapperCva = cva(popoverClassnames.animatedWrapper, {
|
|
|
15
15
|
},
|
|
16
16
|
},
|
|
17
17
|
});
|
|
18
|
+
/**
|
|
19
|
+
* @see {@link Menu} — меню действий
|
|
20
|
+
*/
|
|
18
21
|
export const NewPopover = ({ children, onClose, isOpen, title, className, style, placement = 'bottom', anchorEl, disablePortal, disableAutoFocus, hasArrow, disableMobileDrawer, }) => {
|
|
19
22
|
const { shouldRenderDrawer, isOpened, shouldRender, handleAnimationEnd, handleClose, setContainerRef, setArrowElement, mergedModifiers, animatedWrapperStyle, } = useLogic({
|
|
20
23
|
isOpen,
|
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
import { type StepperProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* @see {@link FormWizard} — форма по шагам в окне или блоке страницы
|
|
4
|
+
* @see {@link FormWizardPageLayout} — форма по шагам на всю страницу
|
|
5
|
+
*/
|
|
2
6
|
export declare const NewStepper: (props: StepperProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -20,6 +20,10 @@ const stepper = cva(stepperClassnames.root, {
|
|
|
20
20
|
},
|
|
21
21
|
},
|
|
22
22
|
});
|
|
23
|
+
/**
|
|
24
|
+
* @see {@link FormWizard} — форма по шагам в окне или блоке страницы
|
|
25
|
+
* @see {@link FormWizardPageLayout} — форма по шагам на всю страницу
|
|
26
|
+
*/
|
|
23
27
|
export const NewStepper = (props) => {
|
|
24
28
|
const { containerRef, stepperConnector, stepperAlternativeLabel, activeStep, onClickPrevStep, onClickStep, orientation, className, children, } = useLogic(props);
|
|
25
29
|
return (_jsx(StepperContextProvider, { orientation: orientation, activeStep: activeStep, connector: stepperConnector, alternativeLabel: stepperAlternativeLabel, onClickPrevStep: onClickPrevStep, onClickStep: onClickStep, children: _jsx(Wrapper, { ref: containerRef, role: "group", className: cn(stepper({
|
|
@@ -5,6 +5,9 @@ export type NumberFieldProps = Omit<TextFieldProps, 'onChange' | 'value' | 'ref'
|
|
|
5
5
|
value?: NumberFieldValue | null;
|
|
6
6
|
onChange?: (value: NumberFieldValue | null) => void;
|
|
7
7
|
};
|
|
8
|
+
/**
|
|
9
|
+
* @see {@link FormNumberField}
|
|
10
|
+
*/
|
|
8
11
|
export declare const NumberField: import("react").ForwardRefExoticComponent<Omit<TextFieldProps, "onChange" | "ref" | "select" | "value" | "maxLength" | "multiple" | "rows" | "maxRows" | "minRows" | "SelectProps" | "trimmed"> & {
|
|
9
12
|
value?: number | null | undefined;
|
|
10
13
|
onChange?: ((value: NumberFieldValue | null) => void) | undefined;
|
|
@@ -7,6 +7,9 @@ const MaskedNumberField = IMaskMixin(({ typedValue, onChange, ...props }) => {
|
|
|
7
7
|
const textFieldProps = props;
|
|
8
8
|
return _jsx(TextField, { ...textFieldProps });
|
|
9
9
|
});
|
|
10
|
+
/**
|
|
11
|
+
* @see {@link FormNumberField}
|
|
12
|
+
*/
|
|
10
13
|
export const NumberField = forwardRef((props, ref) => {
|
|
11
14
|
const { maskProps } = useLogic(props);
|
|
12
15
|
return (_jsx(MaskedNumberField, { inputRef: ref, unmask: "typed", mask: Number, thousandsSeparator: ' ', ...props, ...maskProps }));
|
|
@@ -9,7 +9,7 @@ export type PageHeaderProps<TMainActionComponent extends ElementType = ElementTy
|
|
|
9
9
|
*/
|
|
10
10
|
title?: ReactNode;
|
|
11
11
|
/**
|
|
12
|
-
* Описание
|
|
12
|
+
* Описание страницы, выводится под заголовком
|
|
13
13
|
* @example <PageHeader description="Описание страницы" />
|
|
14
14
|
*/
|
|
15
15
|
description?: ReactNode;
|
|
@@ -21,6 +21,7 @@ export type PageHeaderProps<TMainActionComponent extends ElementType = ElementTy
|
|
|
21
21
|
/**
|
|
22
22
|
* Фильтры формы
|
|
23
23
|
* @example <PageHeader filters={<FormFilters values={values} onChange={handleChange} />} />
|
|
24
|
+
* @see {@link FormFilters} — фильтры страницы
|
|
24
25
|
*/
|
|
25
26
|
filters?: ReactNode;
|
|
26
27
|
/**
|
|
@@ -45,8 +46,7 @@ export type PageHeaderProps<TMainActionComponent extends ElementType = ElementTy
|
|
|
45
46
|
*/
|
|
46
47
|
tabs?: ReactNode;
|
|
47
48
|
/**
|
|
48
|
-
*
|
|
49
|
-
* через secondary
|
|
49
|
+
* Кнопки: main — основные, secondaryVisible — видимые кнопки-иконки, secondary — в меню за троеточием
|
|
50
50
|
* @example <PageHeader actions={{
|
|
51
51
|
* main: [
|
|
52
52
|
* {
|