@consta/uikit 5.21.0 → 5.22.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/__internal__/src/components/AutoComplete/types.d.ts +1 -1
- package/__internal__/src/components/AutoComplete/types.js.map +1 -1
- package/__internal__/src/components/AutoCompleteCanary/types.d.ts +3 -3
- package/__internal__/src/components/AutoCompleteCanary/types.js.map +1 -1
- package/__internal__/src/components/AvatarGroup/helpers.d.ts +66 -56
- package/__internal__/src/components/AvatarGroup/types.d.ts +1 -1
- package/__internal__/src/components/AvatarGroup/types.js.map +1 -1
- package/__internal__/src/components/BadgeGroup/types.d.ts +1 -1
- package/__internal__/src/components/BadgeGroup/types.js.map +1 -1
- package/__internal__/src/components/BookmarkTabs/BookmarkTabs.js.map +1 -1
- package/__internal__/src/components/BookmarkTabs/BookmarkTabsTab/BookmarkTabsTab.css +1 -1
- package/__internal__/src/components/BookmarkTabs/helper.d.ts +66 -56
- package/__internal__/src/components/BookmarkTabs/types.d.ts +3 -3
- package/__internal__/src/components/BookmarkTabs/types.js.map +1 -1
- package/__internal__/src/components/Breadcrumbs/BreadcrumbsMore/BreadcrumbsMore.d.ts +1 -1
- package/__internal__/src/components/Breadcrumbs/helpers.d.ts +66 -56
- package/__internal__/src/components/Breadcrumbs/types.d.ts +7 -7
- package/__internal__/src/components/Breadcrumbs/types.js.map +1 -1
- package/__internal__/src/components/Card/Card.d.ts +3 -2
- package/__internal__/src/components/Card/Card.js.map +1 -1
- package/__internal__/src/components/CheckboxGroup/helper.d.ts +66 -56
- package/__internal__/src/components/CheckboxGroup/types.d.ts +1 -1
- package/__internal__/src/components/CheckboxGroup/types.js.map +1 -1
- package/__internal__/src/components/Chips/ChipsChoice/types.d.ts +1 -1
- package/__internal__/src/components/Chips/ChipsChoice/types.js.map +1 -1
- package/__internal__/src/components/Chips/types.d.ts +1 -1
- package/__internal__/src/components/Chips/types.js.map +1 -1
- package/__internal__/src/components/ChoiceGroup/helper.d.ts +66 -56
- package/__internal__/src/components/ChoiceGroup/types.d.ts +1 -1
- package/__internal__/src/components/ChoiceGroup/types.js.map +1 -1
- package/__internal__/src/components/Collapse/types.d.ts +1 -1
- package/__internal__/src/components/Collapse/types.js.map +1 -1
- package/__internal__/src/components/CollapseGroup/helpers.d.ts +2 -2
- package/__internal__/src/components/CollapseGroup/helpers.js.map +1 -1
- package/__internal__/src/components/Combobox/helpers.d.ts +4 -4
- package/__internal__/src/components/Combobox/helpers.js.map +1 -1
- package/__internal__/src/components/ComboboxDeprecated/helpers.d.ts +4 -4
- package/__internal__/src/components/ComboboxDeprecated/helpers.js.map +1 -1
- package/__internal__/src/components/ContextMenu/ContextMenuLevelWrapper/ContextMenuLevelWrapper.d.ts +1 -1
- package/__internal__/src/components/ContextMenu/ContextMenuWrapper/ContextMenuWrapper.d.ts +1 -1
- package/__internal__/src/components/ContextMenu/types.d.ts +4 -4
- package/__internal__/src/components/ContextMenu/types.js.map +1 -1
- package/__internal__/src/components/DatePicker/DatePickerDropdown/DatePickerDropdown.d.ts +1 -1
- package/__internal__/src/components/DatePicker/DatePickerDropdown/DatePickerDropdown.js.map +1 -1
- package/__internal__/src/components/DatePicker/DatePickerFieldTypeDate/DatePickerFieldTypeDate.d.ts +1 -1
- package/__internal__/src/components/DatePicker/DatePickerFieldTypeDateRange/DatePickerFieldTypeDateRange.d.ts +1 -1
- package/__internal__/src/components/DatePicker/DatePickerFieldTypeDateTime/DatePickerFieldTypeDateTime.d.ts +1 -1
- package/__internal__/src/components/DatePicker/DatePickerFieldTypeDateTimeRange/DatePickerFieldTypeDateTimeRange.d.ts +1 -1
- package/__internal__/src/components/DatePicker/DatePickerFieldTypeMonth/DatePickerFieldTypeMonth.d.ts +1 -1
- package/__internal__/src/components/DatePicker/DatePickerFieldTypeMonthRange/DatePickerFieldTypeMonthRange.d.ts +1 -1
- package/__internal__/src/components/DatePicker/DatePickerFieldTypeTime/DatePickerFieldTypeTime.d.ts +1 -1
- package/__internal__/src/components/DatePicker/DatePickerFieldTypeYear/DatePickerFieldTypeYear.d.ts +1 -1
- package/__internal__/src/components/DatePicker/DatePickerFieldTypeYearRange/DatePickerFieldTypeYearRange.d.ts +1 -1
- package/__internal__/src/components/DatePicker/types.d.ts +2 -2
- package/__internal__/src/components/DatePicker/types.js.map +1 -1
- package/__internal__/src/components/DateTime/DateTimeCell/DateTimeCell.d.ts +1 -1
- package/__internal__/src/components/DateTime/DateTimeItem/DateTimeItem.d.ts +1 -1
- package/__internal__/src/components/DateTime/helpers/types.d.ts +2 -2
- package/__internal__/src/components/DateTime/helpers/types.js.map +1 -1
- package/__internal__/src/components/EventInterceptor/EventInterceptor.d.ts +1 -1
- package/__internal__/src/components/FieldComponents/FieldArrayValueInlineControl/types.d.ts +1 -1
- package/__internal__/src/components/FieldComponents/FieldArrayValueInlineControl/types.js.map +1 -1
- package/__internal__/src/components/FieldComponents/FieldButton/FieldButton.d.ts +1 -1
- package/__internal__/src/components/FieldComponents/FieldClearButton/FieldClearButton.d.ts +1 -1
- package/__internal__/src/components/FieldComponents/FieldControlLayout/FieldControlLayout.d.ts +1 -1
- package/__internal__/src/components/FieldComponents/FieldControlLayout/helpers.d.ts +1 -1
- package/__internal__/src/components/FieldComponents/FieldControlLayout/helpers.js.map +1 -1
- package/__internal__/src/components/FieldComponents/FieldControlLayout/types.d.ts +2 -2
- package/__internal__/src/components/FieldComponents/FieldControlLayout/types.js.map +1 -1
- package/__internal__/src/components/FieldComponents/FieldCounter/FieldCounter.d.ts +1 -1
- package/__internal__/src/components/FieldComponents/FieldInput/FieldInput.d.ts +1 -1
- package/__internal__/src/components/FieldComponents/FieldToggleVisiblePasswordButton/FieldToggleVisiblePasswordButton.d.ts +1 -1
- package/__internal__/src/components/FieldComponents/renderSide.d.ts +1 -1
- package/__internal__/src/components/Grid/helpers.d.ts +1 -1
- package/__internal__/src/components/ListCanary/ListAddItem/ListAddItem.d.ts +1 -1
- package/__internal__/src/components/ListCanary/ListBox/ListBox.d.ts +1 -1
- package/__internal__/src/components/ListCanary/ListDivider/ListDivider.d.ts +1 -1
- package/__internal__/src/components/ListCanary/ListGroupLabel/ListGroupLabel.d.ts +1 -1
- package/__internal__/src/components/ListCanary/ListLoader/ListLoader.d.ts +1 -1
- package/__internal__/src/components/ListCanary/types.d.ts +3 -3
- package/__internal__/src/components/ListCanary/types.js.map +1 -1
- package/__internal__/src/components/Modal/Modal.js.map +1 -1
- package/__internal__/src/components/Pagination/PaginationArrow/PaginationArrow.d.ts +1 -1
- package/__internal__/src/components/Pagination/types.d.ts +3 -3
- package/__internal__/src/components/Pagination/types.js.map +1 -1
- package/__internal__/src/components/PaginationDeprecated/PaginationDeprecated.d.ts +1 -1
- package/__internal__/src/components/PaginationDeprecated/PaginationDeprecated.js.map +1 -1
- package/__internal__/src/components/Picture/Picture.d.ts +1 -1
- package/__internal__/src/components/Popover/Popover.d.ts +1 -1
- package/__internal__/src/components/Popover/Popover.js.map +1 -1
- package/__internal__/src/components/ProgressLine/helpers.d.ts +66 -56
- package/__internal__/src/components/ProgressLine/types.d.ts +1 -1
- package/__internal__/src/components/ProgressLine/types.js.map +1 -1
- package/__internal__/src/components/ProgressStepBar/ProgressStepBarLine/ProgressStepBarLine.d.ts +1 -1
- package/__internal__/src/components/ProgressStepBar/helpers.d.ts +3 -3
- package/__internal__/src/components/ProgressStepBar/helpers.js.map +1 -1
- package/__internal__/src/components/RadioGroup/helper.d.ts +66 -56
- package/__internal__/src/components/RadioGroup/types.d.ts +1 -1
- package/__internal__/src/components/RadioGroup/types.js.map +1 -1
- package/__internal__/src/components/Select/helpers.d.ts +4 -4
- package/__internal__/src/components/Select/helpers.js.map +1 -1
- package/__internal__/src/components/SelectCanary/SelectControlLayout/SelectControlLayout.d.ts +1 -1
- package/__internal__/src/components/SelectCanary/SelectCreateButton/SelectCreateButton.d.ts +1 -1
- package/__internal__/src/components/SelectCanary/SelectCreateButton/SelectCreateButton.js.map +1 -1
- package/__internal__/src/components/SelectCanary/SelectDropdown/SelectDropdown.d.ts +1 -1
- package/__internal__/src/components/SelectCanary/SelectDropdown/SelectDropdown.js.map +1 -1
- package/__internal__/src/components/SelectCanary/SelectInput/SelectInput.d.ts +1 -1
- package/__internal__/src/components/SelectCanary/SelectLoader/SelectLoader.d.ts +1 -1
- package/__internal__/src/components/SelectCanary/SelectMultipleValue/SelectMultipleValue.d.ts +2 -2
- package/__internal__/src/components/SelectCanary/SelectMultipleValue/SelectMultipleValue.js.map +1 -1
- package/__internal__/src/components/SelectCanary/SelectRenderItem/SelectRenderItem.d.ts +1 -1
- package/__internal__/src/components/SelectCanary/SelectRenderItem/SelectRenderItem.js.map +1 -1
- package/__internal__/src/components/SelectCanary/helpers.d.ts +1 -1
- package/__internal__/src/components/SelectCanary/types.d.ts +1 -1
- package/__internal__/src/components/SelectCanary/types.js.map +1 -1
- package/__internal__/src/components/SelectComponents/SelectContainer/SelectContainer.d.ts +1 -1
- package/__internal__/src/components/SelectComponents/SelectDropdown/SelectDropdown.d.ts +2 -2
- package/__internal__/src/components/SelectComponents/SelectDropdown/SelectDropdown.js.map +1 -1
- package/__internal__/src/components/SelectComponents/SelectLoader/SelectLoader.d.ts +1 -1
- package/__internal__/src/components/SelectComponentsDeprecated/SelectContainer/SelectContainer.d.ts +1 -1
- package/__internal__/src/components/SelectComponentsDeprecated/SelectDropdown/SelectDropdown.d.ts +2 -2
- package/__internal__/src/components/SelectComponentsDeprecated/SelectDropdown/SelectDropdown.js.map +1 -1
- package/__internal__/src/components/SelectComponentsDeprecated/SelectItemAll/SelectSelectAll.d.ts +1 -1
- package/__internal__/src/components/SelectComponentsDeprecated/SelectLoader/SelectLoader.d.ts +1 -1
- package/__internal__/src/components/SelectDeprecated/helpers.d.ts +4 -4
- package/__internal__/src/components/SelectDeprecated/helpers.js.map +1 -1
- package/__internal__/src/components/Sidebar/Sidebar.js.map +1 -1
- package/__internal__/src/components/Skeleton/SkeletonBrick/SkeletonBrick.d.ts +1 -1
- package/__internal__/src/components/Skeleton/SkeletonCircle/SkeletonCircle.d.ts +1 -1
- package/__internal__/src/components/Slider/SliderInput/SliderInput.d.ts +1 -1
- package/__internal__/src/components/Slider/SliderLine/SliderLine.d.ts +1 -1
- package/__internal__/src/components/Slider/SliderPoint/SliderPoint.d.ts +1 -1
- package/__internal__/src/components/Slider/helper.d.ts +1 -1
- package/__internal__/src/components/Slider/helper.js.map +1 -1
- package/__internal__/src/components/SnackBar/SnackBarItem/SnackBarItem.d.ts +1 -1
- package/__internal__/src/components/SnackBar/helper.d.ts +67 -57
- package/__internal__/src/components/SnackBar/types.d.ts +2 -2
- package/__internal__/src/components/SnackBar/types.js.map +1 -1
- package/__internal__/src/components/Steps/helper.d.ts +66 -56
- package/__internal__/src/components/Steps/types.d.ts +1 -1
- package/__internal__/src/components/Steps/types.js.map +1 -1
- package/__internal__/src/components/StepsCanary/helper.d.ts +66 -56
- package/__internal__/src/components/StepsCanary/types.d.ts +1 -1
- package/__internal__/src/components/StepsCanary/types.js.map +1 -1
- package/__internal__/src/components/Switch/Switch.d.ts +2 -1
- package/__internal__/src/components/Switch/Switch.js +1 -1
- package/__internal__/src/components/Switch/Switch.js.map +1 -1
- package/__internal__/src/components/Switch/types.d.ts +1 -0
- package/__internal__/src/components/Switch/types.js.map +1 -1
- package/__internal__/src/components/SwitchGroup/helpers.d.ts +66 -56
- package/__internal__/src/components/SwitchGroup/types.d.ts +1 -1
- package/__internal__/src/components/SwitchGroup/types.js.map +1 -1
- package/__internal__/src/components/Table/Cell/TableCell.d.ts +1 -1
- package/__internal__/src/components/Table/Cell/TableCell.js.map +1 -1
- package/__internal__/src/components/Table/Header/TableHeader.d.ts +1 -1
- package/__internal__/src/components/Table/Header/TableHeader.js.map +1 -1
- package/__internal__/src/components/Table/Resizer/TableResizer.d.ts +1 -1
- package/__internal__/src/components/Table/Resizer/TableResizer.js.map +1 -1
- package/__internal__/src/components/Table/Table.d.ts +1 -1
- package/__internal__/src/components/Table/Table.js.map +1 -1
- package/__internal__/src/components/Table/__mock__/data.mock.d.ts +1 -1
- package/__internal__/src/components/Tabs/Tabs.js.map +1 -1
- package/__internal__/src/components/Tabs/TabsFitModeDropdownWrapper/TabsFitModeDropdownWrapper.d.ts +1 -1
- package/__internal__/src/components/Tabs/TabsFitModeDropdownWrapper/TabsFitModeDropdownWrapper.js.map +1 -1
- package/__internal__/src/components/Tabs/TabsFitModeScrollWrapper/TabsFitModeScrollWrapper.d.ts +1 -1
- package/__internal__/src/components/Tabs/TabsFitModeScrollWrapper/TabsFitModeScrollWrapper.js.map +1 -1
- package/__internal__/src/components/Tabs/TabsListWrapper/TabsListWrapper.d.ts +1 -1
- package/__internal__/src/components/Tabs/helpers.d.ts +199 -169
- package/__internal__/src/components/Tabs/types.d.ts +4 -4
- package/__internal__/src/components/Tabs/types.js.map +1 -1
- package/__internal__/src/components/Tag/Tag.d.ts +1 -1
- package/__internal__/src/components/Tag/Tag.js.map +1 -1
- package/__internal__/src/components/TagBase/TagBase.d.ts +1 -1
- package/__internal__/src/components/TextField/TextField.d.ts +1 -1
- package/__internal__/src/components/TextField/types.d.ts +1 -1
- package/__internal__/src/components/TextField/types.js.map +1 -1
- package/__internal__/src/components/TextFieldCanary/TextFieldTypeTextArray/TextFieldTypeTextArray.js +1 -1
- package/__internal__/src/components/TextFieldCanary/TextFieldTypeTextArray/TextFieldTypeTextArray.js.map +1 -1
- package/__internal__/src/components/TextFieldCanary/types.d.ts +2 -2
- package/__internal__/src/components/TextFieldCanary/types.js.map +1 -1
- package/__internal__/src/components/ThemeToggler/helpers.d.ts +66 -56
- package/__internal__/src/components/ThemeToggler/types.d.ts +1 -1
- package/__internal__/src/components/ThemeToggler/types.js.map +1 -1
- package/__internal__/src/components/Timer/Timer.d.ts +1 -1
- package/__internal__/src/components/Tooltip/Tooltip.d.ts +1 -1
- package/__internal__/src/components/TooltipDeprecated/TooltipDeprecated.d.ts +1 -1
- package/__internal__/src/components/UserSelect/helpers.d.ts +4 -4
- package/__internal__/src/components/UserSelect/helpers.js.map +1 -1
- package/__internal__/src/components/UserSelectDeprecated/helpers.d.ts +4 -4
- package/__internal__/src/components/UserSelectDeprecated/helpers.js.map +1 -1
- package/__internal__/src/fileIcons/FileIconAvi/FileIconAvi_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconAvi/FileIconAvi_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconBmp/FileIconBmp_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconBmp/FileIconBmp_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconCsv/FileIconCsv_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconCsv/FileIconCsv_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconDoc/FileIconDoc_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconDoc/FileIconDoc_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconExe/FileIconExe_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconExe/FileIconExe_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconGif/FileIconGif_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconGif/FileIconGif_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconJpg/FileIconJpg_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconJpg/FileIconJpg_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconJson/FileIconJson_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconJson/FileIconJson_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconLoading/FileIconLoading_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconLoading/FileIconLoading_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconMov/FileIconMov_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconMov/FileIconMov_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconMp3/FileIconMp3_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconMp3/FileIconMp3_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconMp4/FileIconMp4_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconMp4/FileIconMp4_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconMsg/FileIconMsg_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconMsg/FileIconMsg_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconPdf/FileIconPdf_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconPdf/FileIconPdf_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconPng/FileIconPng_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconPng/FileIconPng_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconPpt/FileIconPpt_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconPpt/FileIconPpt_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconRar/FileIconRar_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconRar/FileIconRar_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconRtf/FileIconRtf_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconRtf/FileIconRtf_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconSvg/FileIconSvg_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconSvg/FileIconSvg_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconTiff/FileIconTiff_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconTiff/FileIconTiff_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconTxt/FileIconTxt_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconTxt/FileIconTxt_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconUndefined/FileIconUndefined_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconUndefined/FileIconUndefined_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconVsd/FileIconVsd_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconVsd/FileIconVsd_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconWav/FileIconWav_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconWav/FileIconWav_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconXls/FileIconXls_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconXls/FileIconXls_size_s.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconZip/FileIconZip_size_m.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIconZip/FileIconZip_size_s.d.ts +1 -1
- package/__internal__/src/hocs/withTooltip/withTooltip.d.ts +1 -1
- package/__internal__/src/hocs/withTooltip/withTooltip.js.map +1 -1
- package/__internal__/src/hooks/useForkRef/useForkRef.d.ts +1 -1
- package/__internal__/src/responsesImages/ResponsesImage403/ResponsesImage403Svg.d.ts +1 -1
- package/__internal__/src/responsesImages/ResponsesImage404/ResponsesImage404Svg.d.ts +1 -1
- package/__internal__/src/responsesImages/ResponsesImage500/ResponsesImage500Svg.d.ts +1 -1
- package/__internal__/src/responsesImages/ResponsesImage503/ResponsesImage503Svg.d.ts +1 -1
- package/__internal__/src/responsesImages/ResponsesImageConnectionError/ResponsesImageConnectionErrorSvg.d.ts +1 -1
- package/__internal__/src/responsesImages/ResponsesImageDeleted/ResponsesImageDeletedSvg.d.ts +1 -1
- package/__internal__/src/responsesImages/ResponsesImageEmptyBox/ResponsesImageEmptyBoxSvg.d.ts +1 -1
- package/__internal__/src/responsesImages/ResponsesImageEmptyPockets/ResponsesImageEmptyPocketsSvg.d.ts +1 -1
- package/__internal__/src/responsesImages/ResponsesImageExit/ResponsesImageExitSvg.d.ts +1 -1
- package/__internal__/src/responsesImages/ResponsesImageNothingFound/ResponsesImageNothingFoundSvg.d.ts +1 -1
- package/__internal__/src/responsesImages/ResponsesImageSuccess/ResponsesImageSuccessSvg.d.ts +1 -1
- package/__internal__/src/uiKit/components/Image/Image.d.ts +1 -1
- package/__internal__/src/utils/state/withCtx/withCtx.js.map +1 -1
- package/__internal__/src/utils/types/PropsWithAsAttributes.d.ts +2 -2
- package/__internal__/src/utils/types/PropsWithAsAttributes.js.map +1 -1
- package/package.json +1 -1
|
@@ -9,15 +9,18 @@ export declare function withDefaultGetters<ITEM>(props: ProgressLineProps<ITEM>)
|
|
|
9
9
|
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
10
10
|
suppressHydrationWarning?: boolean | undefined | undefined;
|
|
11
11
|
accessKey?: string | undefined | undefined;
|
|
12
|
+
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
|
|
13
|
+
autoFocus?: boolean | undefined | undefined;
|
|
12
14
|
className?: string | undefined | undefined;
|
|
13
|
-
contentEditable?: (boolean | "true" | "false") | "inherit" | undefined;
|
|
15
|
+
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
14
16
|
contextMenu?: string | undefined | undefined;
|
|
15
17
|
dir?: string | undefined | undefined;
|
|
16
18
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
19
|
+
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
17
20
|
hidden?: boolean | undefined | undefined;
|
|
18
21
|
id?: string | undefined | undefined;
|
|
19
22
|
lang?: string | undefined | undefined;
|
|
20
|
-
|
|
23
|
+
nonce?: string | undefined | undefined;
|
|
21
24
|
slot?: string | undefined | undefined;
|
|
22
25
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
23
26
|
style?: import("react").CSSProperties | undefined;
|
|
@@ -27,14 +30,16 @@ export declare function withDefaultGetters<ITEM>(props: ProgressLineProps<ITEM>)
|
|
|
27
30
|
radioGroup?: string | undefined | undefined;
|
|
28
31
|
role?: import("react").AriaRole | undefined;
|
|
29
32
|
about?: string | undefined | undefined;
|
|
33
|
+
content?: string | undefined | undefined;
|
|
30
34
|
datatype?: string | undefined | undefined;
|
|
31
35
|
inlist?: any;
|
|
32
36
|
prefix?: string | undefined | undefined;
|
|
33
37
|
property?: string | undefined | undefined;
|
|
38
|
+
rel?: string | undefined | undefined;
|
|
34
39
|
resource?: string | undefined | undefined;
|
|
40
|
+
rev?: string | undefined | undefined;
|
|
35
41
|
typeof?: string | undefined | undefined;
|
|
36
42
|
vocab?: string | undefined | undefined;
|
|
37
|
-
autoCapitalize?: string | undefined | undefined;
|
|
38
43
|
autoCorrect?: string | undefined | undefined;
|
|
39
44
|
autoSave?: string | undefined | undefined;
|
|
40
45
|
color?: string | undefined | undefined;
|
|
@@ -48,57 +53,64 @@ export declare function withDefaultGetters<ITEM>(props: ProgressLineProps<ITEM>)
|
|
|
48
53
|
unselectable?: "on" | "off" | undefined | undefined;
|
|
49
54
|
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
|
|
50
55
|
is?: string | undefined | undefined;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
56
|
+
exportparts?: string | undefined | undefined;
|
|
57
|
+
part?: string | undefined | undefined;
|
|
58
|
+
"aria-activedescendant"?: string | undefined | undefined;
|
|
59
|
+
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
60
|
+
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined | undefined;
|
|
61
|
+
"aria-braillelabel"?: string | undefined | undefined;
|
|
62
|
+
"aria-brailleroledescription"?: string | undefined | undefined;
|
|
63
|
+
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
64
|
+
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
|
|
65
|
+
"aria-colcount"?: number | undefined | undefined;
|
|
66
|
+
"aria-colindex"?: number | undefined | undefined;
|
|
67
|
+
"aria-colindextext"?: string | undefined | undefined;
|
|
68
|
+
"aria-colspan"?: number | undefined | undefined;
|
|
69
|
+
"aria-controls"?: string | undefined | undefined;
|
|
70
|
+
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined | undefined;
|
|
71
|
+
"aria-describedby"?: string | undefined | undefined;
|
|
72
|
+
"aria-description"?: string | undefined | undefined;
|
|
73
|
+
"aria-details"?: string | undefined | undefined;
|
|
74
|
+
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
75
|
+
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined | undefined;
|
|
76
|
+
"aria-errormessage"?: string | undefined | undefined;
|
|
77
|
+
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
78
|
+
"aria-flowto"?: string | undefined | undefined;
|
|
79
|
+
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
80
|
+
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined | undefined;
|
|
81
|
+
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
82
|
+
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined | undefined;
|
|
83
|
+
"aria-keyshortcuts"?: string | undefined | undefined;
|
|
84
|
+
"aria-label"?: string | undefined | undefined;
|
|
85
|
+
"aria-labelledby"?: string | undefined | undefined;
|
|
86
|
+
"aria-level"?: number | undefined | undefined;
|
|
87
|
+
"aria-live"?: "off" | "assertive" | "polite" | undefined | undefined;
|
|
88
|
+
"aria-modal"?: (boolean | "true" | "false") | undefined;
|
|
89
|
+
"aria-multiline"?: (boolean | "true" | "false") | undefined;
|
|
90
|
+
"aria-multiselectable"?: (boolean | "true" | "false") | undefined;
|
|
91
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined | undefined;
|
|
92
|
+
"aria-owns"?: string | undefined | undefined;
|
|
93
|
+
"aria-placeholder"?: string | undefined | undefined;
|
|
94
|
+
"aria-posinset"?: number | undefined | undefined;
|
|
95
|
+
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
|
|
96
|
+
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
97
|
+
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined | undefined;
|
|
98
|
+
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
99
|
+
"aria-roledescription"?: string | undefined | undefined;
|
|
100
|
+
"aria-rowcount"?: number | undefined | undefined;
|
|
101
|
+
"aria-rowindex"?: number | undefined | undefined;
|
|
102
|
+
"aria-rowindextext"?: string | undefined | undefined;
|
|
103
|
+
"aria-rowspan"?: number | undefined | undefined;
|
|
104
|
+
"aria-selected"?: (boolean | "true" | "false") | undefined;
|
|
105
|
+
"aria-setsize"?: number | undefined | undefined;
|
|
106
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined | undefined;
|
|
107
|
+
"aria-valuemax"?: number | undefined | undefined;
|
|
108
|
+
"aria-valuemin"?: number | undefined | undefined;
|
|
109
|
+
"aria-valuenow"?: number | undefined | undefined;
|
|
110
|
+
"aria-valuetext"?: string | undefined | undefined;
|
|
99
111
|
children?: import("react").ReactNode;
|
|
100
112
|
dangerouslySetInnerHTML?: {
|
|
101
|
-
__html: string;
|
|
113
|
+
__html: string | TrustedHTML;
|
|
102
114
|
} | undefined | undefined;
|
|
103
115
|
onCopy?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
104
116
|
onCopyCapture?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
@@ -118,7 +130,7 @@ export declare function withDefaultGetters<ITEM>(props: ProgressLineProps<ITEM>)
|
|
|
118
130
|
onBlurCapture?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
|
|
119
131
|
onChange?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
120
132
|
onChangeCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
121
|
-
onBeforeInput?: import("react").
|
|
133
|
+
onBeforeInput?: import("react").InputEventHandler<HTMLDivElement> | undefined;
|
|
122
134
|
onBeforeInputCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
123
135
|
onInput?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
124
136
|
onInputCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
@@ -237,9 +249,7 @@ export declare function withDefaultGetters<ITEM>(props: ProgressLineProps<ITEM>)
|
|
|
237
249
|
onPointerCancel?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
238
250
|
onPointerCancelCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
239
251
|
onPointerEnter?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
240
|
-
onPointerEnterCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
241
252
|
onPointerLeave?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
242
|
-
onPointerLeaveCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
243
253
|
onPointerOver?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
244
254
|
onPointerOverCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
245
255
|
onPointerOut?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
@@ -260,7 +270,7 @@ export declare function withDefaultGetters<ITEM>(props: ProgressLineProps<ITEM>)
|
|
|
260
270
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
261
271
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
262
272
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
263
|
-
ref?: import("react").
|
|
273
|
+
ref?: import("react").LegacyRef<HTMLDivElement> | undefined;
|
|
264
274
|
key?: import("react").Key | null | undefined;
|
|
265
275
|
};
|
|
266
276
|
export declare const getProgress: (progress: number) => number;
|
|
@@ -13,4 +13,4 @@ export type ProgressLineProps<ITEM = ProgressLineItemDefault> = PropsWithHTMLAtt
|
|
|
13
13
|
steps?: ITEM[];
|
|
14
14
|
getItemLabel?: ProgressLinePropGetItemLabel<ITEM>;
|
|
15
15
|
}, HTMLDivElement>;
|
|
16
|
-
export type ProgressLineComponent = <ITEM>(props: ProgressLineProps<ITEM>) => React.
|
|
16
|
+
export type ProgressLineComponent = <ITEM>(props: ProgressLineProps<ITEM>) => React.ReactNode | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["progressLinePropSize","defaultProgressLinePropSize"],"sources":["../../../../../src/components/ProgressLine/types.ts"],"sourcesContent":["import React from 'react';\n\nimport { PropsWithHTMLAttributesAndRef } from '../../utils/types/PropsWithHTMLAttributes';\n\nexport const progressLinePropSize = ['m', 's'] as const;\nexport type ProgressLinePropSize = typeof progressLinePropSize[number];\nexport const defaultProgressLinePropSize = progressLinePropSize[0];\n\nexport type ProgressLineItemDefault = {\n label?: string;\n};\n\nexport type ProgressLinePropGetItemLabel<ITEM> = (\n item: ITEM,\n) => string | undefined;\n\nexport type ProgressLineProps<ITEM = ProgressLineItemDefault> =\n PropsWithHTMLAttributesAndRef<\n {\n size?: ProgressLinePropSize;\n value?: number;\n steps?: ITEM[];\n getItemLabel?: ProgressLinePropGetItemLabel<ITEM>;\n },\n HTMLDivElement\n >;\n\nexport type ProgressLineComponent = <ITEM>(\n props: ProgressLineProps<ITEM>,\n) => React.
|
|
1
|
+
{"version":3,"file":"types.js","names":["progressLinePropSize","defaultProgressLinePropSize"],"sources":["../../../../../src/components/ProgressLine/types.ts"],"sourcesContent":["import React from 'react';\n\nimport { PropsWithHTMLAttributesAndRef } from '../../utils/types/PropsWithHTMLAttributes';\n\nexport const progressLinePropSize = ['m', 's'] as const;\nexport type ProgressLinePropSize = typeof progressLinePropSize[number];\nexport const defaultProgressLinePropSize = progressLinePropSize[0];\n\nexport type ProgressLineItemDefault = {\n label?: string;\n};\n\nexport type ProgressLinePropGetItemLabel<ITEM> = (\n item: ITEM,\n) => string | undefined;\n\nexport type ProgressLineProps<ITEM = ProgressLineItemDefault> =\n PropsWithHTMLAttributesAndRef<\n {\n size?: ProgressLinePropSize;\n value?: number;\n steps?: ITEM[];\n getItemLabel?: ProgressLinePropGetItemLabel<ITEM>;\n },\n HTMLDivElement\n >;\n\nexport type ProgressLineComponent = <ITEM>(\n props: ProgressLineProps<ITEM>,\n) => React.ReactNode | null;\n"],"mappings":"AAIA,MAAO,IAAMA,qBAAoB,CAAG,CAAC,GAAD,CAAM,GAAN,CAA7B,CAEP,MAAO,IAAMC,4BAA2B,CAAGD,oBAAoB,CAAC,CAAD,CAAxD"}
|
package/__internal__/src/components/ProgressStepBar/ProgressStepBarLine/ProgressStepBarLine.d.ts
CHANGED
|
@@ -6,5 +6,5 @@ type ProgressStepBarLineProps = {
|
|
|
6
6
|
direction: ProgressStepBarPropDirection;
|
|
7
7
|
activeStepIndex?: number;
|
|
8
8
|
};
|
|
9
|
-
export declare const ProgressStepBarLine: (props: ProgressStepBarLineProps) => JSX.Element;
|
|
9
|
+
export declare const ProgressStepBarLine: (props: ProgressStepBarLineProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -85,8 +85,8 @@ export declare const defaultGetItemProgress: ProgressStepBarPropGetItemProgress<
|
|
|
85
85
|
export declare const defaultGetItemContent: ProgressStepBarPropGetItemContent<ProgressStepBarItemDefault>;
|
|
86
86
|
export declare const defaultGetItemStatus: ProgressStepBarPropGetItemStatus<ProgressStepBarItemDefault>;
|
|
87
87
|
export declare const defaultGetItemOnClick: ProgressStepBarPropGetItemOnClick<ProgressStepBarItemDefault>;
|
|
88
|
-
export type ProgressStepBarComponent = <ITEM = ProgressStepBarItemDefault>(props: ProgressStepBarProps<ITEM>) => React.
|
|
89
|
-
export type ProgressStepBarItemComponent = (props: PropsWithHTMLAttributesAndRef<ProgressStepBarItemProps, HTMLDivElement>) => React.
|
|
88
|
+
export type ProgressStepBarComponent = <ITEM = ProgressStepBarItemDefault>(props: ProgressStepBarProps<ITEM>) => React.ReactNode | null;
|
|
89
|
+
export type ProgressStepBarItemComponent = (props: PropsWithHTMLAttributesAndRef<ProgressStepBarItemProps, HTMLDivElement>) => React.ReactNode | null;
|
|
90
90
|
export declare function withDefaultGetters<ITEM>(props: ProgressStepBarProps<ITEM>): {
|
|
91
91
|
steps: ITEM[];
|
|
92
92
|
direction?: ProgressStepBarPropDirection;
|
|
@@ -115,7 +115,7 @@ export declare function withDefaultGetters<ITEM>(props: ProgressStepBarProps<ITE
|
|
|
115
115
|
getItemLineStatus: ProgressStepBarPropGetItemLineStatus<ProgressStepBarItemDefault> | ProgressStepBarPropGetItemLineStatus<ITEM>;
|
|
116
116
|
getItemOnClick: ProgressStepBarPropGetItemOnClick<ProgressStepBarItemDefault> | ProgressStepBarPropGetItemOnClick<ITEM>;
|
|
117
117
|
};
|
|
118
|
-
export declare const getItemPosition: (index: number, length: number) => "
|
|
118
|
+
export declare const getItemPosition: (index: number, length: number) => "center" | "start" | "end";
|
|
119
119
|
export declare const getLineSize: (container: React.RefObject<HTMLElement>, activeElement: React.RefObject<HTMLElement>, direction: ProgressStepBarPropDirection) => number;
|
|
120
120
|
export declare const calculateLines: (refs: React.RefObject<HTMLElement>[], direction: ProgressStepBarPropDirection) => number[];
|
|
121
121
|
export declare const validateVisibleIndex: (length: number, index: number | undefined) => number | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","names":["cn","progressStepBarPropSize","progressStepBarPropSizeDefault","progressStepBarPropDirection","progressStepBarPropDirectionDefault","progressStepBarPropStatus","progressStepBarPropStatusDefault","progressStepBarPointNumbersMap","progressStepBarPropPosition","progressStepBarPropPositionDefault","cnProgressStepBar","defaultGetItemLabel","item","label","defaultGetItemTooltipContent","tooltipContent","defaultGetItemPoint","point","defaultGetItemLineStatus","lineStatus","defaultGetItemProgress","progress","defaultGetItemContent","content","defaultGetItemStatus","status","defaultGetItemOnClick","onClick","withDefaultGetters","props","getItemLabel","getItemTooltipContent","getItemPoint","getItemProgress","getItemContent","getItemStatus","getItemLineStatus","getItemOnClick","getItemPosition","index","length","position","getLineSize","container","activeElement","direction","size","current","containerPosition","getBoundingClientRect","activeElementPosition","y","height","x","getRefSize","ref","width","calculateLines","refs","sizes","i","firstSize","secondSize","push","validateVisibleIndex","Math","min"],"sources":["../../../../../src/components/ProgressStepBar/helpers.ts"],"sourcesContent":["import { IconComponent } from '@consta/icons/Icon';\nimport React from 'react';\n\nimport { cn } from '../../utils/bem';\nimport { PropsWithHTMLAttributesAndRef } from '../../utils/types/PropsWithHTMLAttributes';\n\nexport const progressStepBarPropSize = ['s', 'xs', 'm'] as const;\nexport type ProgressStepBarPropSize = typeof progressStepBarPropSize[number];\nexport const progressStepBarPropSizeDefault = progressStepBarPropSize[0];\n\nexport const progressStepBarPropDirection = ['horizontal', 'vertical'] as const;\nexport type ProgressStepBarPropDirection =\n typeof progressStepBarPropDirection[number];\nexport const progressStepBarPropDirectionDefault =\n progressStepBarPropDirection[0];\n\nexport const progressStepBarPropStatus = [\n 'normal',\n 'success',\n 'warning',\n 'alert',\n] as const;\nexport type ProgressStepBarPropStatus =\n typeof progressStepBarPropStatus[number];\nexport const progressStepBarPropStatusDefault = progressStepBarPropStatus[0];\n\nexport const progressStepBarPointNumbersMap = [\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,\n] as const;\nexport type ProgressStepBarPointNumbersMap =\n typeof progressStepBarPointNumbersMap[number];\n\nexport const progressStepBarPropPosition = ['center', 'start', 'end'] as const;\nexport type ProgressStepBarPropPosition =\n typeof progressStepBarPropPosition[number];\nexport const progressStepBarPropPositionDefault: ProgressStepBarPropPosition =\n progressStepBarPropPosition[0];\n\nexport type ProgressStepBarPropGetItemLabel<ITEM> = (\n item: ITEM,\n) => string | undefined;\nexport type ProgressStepBarPropGetItemKey<ITEM> = (\n item: ITEM,\n) => string | number;\nexport type ProgressStepBarPropGetItemTooltipContent<ITEM> = (\n item: ITEM,\n) => string | undefined;\nexport type ProgressStepBarPropGetItemLineStatus<ITEM> = (\n item: ITEM,\n) => ProgressStepBarPropStatus | undefined;\nexport type ProgressStepBarPropGetItemPoint<ITEM> = (\n item: ITEM,\n) => ProgressStepBarPointNumbersMap | IconComponent | undefined;\nexport type ProgressStepBarPropGetItemProgress<ITEM> = (\n item: ITEM,\n) => boolean | undefined;\nexport type ProgressStepBarPropGetItemContent<ITEM> = (\n item: ITEM,\n) => React.ReactNode | undefined;\nexport type ProgressStepBarPropGetItemStatus<ITEM> = (\n item: ITEM,\n) => ProgressStepBarPropStatus | undefined;\nexport type ProgressStepBarPropGetItemOnClick<ITEM> = (\n item: ITEM,\n) => React.EventHandler<React.MouseEvent> | undefined;\n\nexport type ProgressStepBarItemDefault = {\n label?: string;\n tooltipContent?: string;\n lineStatus?: ProgressStepBarPropStatus;\n point?: ProgressStepBarPointNumbersMap | IconComponent;\n status?: ProgressStepBarPropStatus;\n progress?: boolean;\n content?: React.ReactNode;\n onClick?: React.EventHandler<React.MouseEvent>;\n};\n\nexport type Line = {\n status: ProgressStepBarPropStatus;\n size: number;\n};\n\nexport type ProgressStepBarPropOnItemClick<ITEM> = (\n item: ITEM,\n props: {\n e: React.MouseEvent;\n index: number;\n },\n) => void;\n\nexport type ProgressStepBarProps<ITEM = ProgressStepBarItemDefault> =\n PropsWithHTMLAttributesAndRef<\n {\n steps: ITEM[];\n direction?: ProgressStepBarPropDirection;\n size?: ProgressStepBarPropSize;\n activeStepIndex?: number;\n onItemClick?: ProgressStepBarPropOnItemClick<ITEM>;\n getItemLabel?: ProgressStepBarPropGetItemLabel<ITEM>;\n getItemLineStatus?: ProgressStepBarPropGetItemLineStatus<ITEM>;\n getItemTooltipContent?: ProgressStepBarPropGetItemTooltipContent<ITEM>;\n getItemPoint?: ProgressStepBarPropGetItemPoint<ITEM>;\n getItemProgress?: ProgressStepBarPropGetItemProgress<ITEM>;\n getItemContent?: ProgressStepBarPropGetItemContent<ITEM>;\n getItemStatus?: ProgressStepBarPropGetItemStatus<ITEM>;\n getItemOnClick?: ProgressStepBarPropGetItemOnClick<ITEM>;\n },\n HTMLDivElement\n > &\n (ITEM extends { label: ProgressStepBarItemDefault['label'] }\n ? {}\n : { getItemLabel: ProgressStepBarPropGetItemLabel<ITEM> });\n\nexport type ProgressStepBarItemProps = {\n content?: React.ReactNode;\n label?: string;\n point?: ProgressStepBarPointNumbersMap | IconComponent;\n progress?: boolean;\n status?: ProgressStepBarPropStatus | 'system';\n tooltipContent?: string;\n tooltipZIndex?: number;\n position?: ProgressStepBarPropPosition;\n direction: ProgressStepBarPropDirection;\n size: ProgressStepBarPropSize;\n onClick?: (e: React.MouseEvent) => void;\n pointRef?: React.RefObject<HTMLButtonElement>;\n className?: string;\n};\n\nexport const cnProgressStepBar = cn('ProgressStepBar');\n\nexport const defaultGetItemLabel: ProgressStepBarPropGetItemLabel<\n ProgressStepBarItemDefault\n> = (item) => item.label;\nexport const defaultGetItemTooltipContent: ProgressStepBarPropGetItemTooltipContent<\n ProgressStepBarItemDefault\n> = (item) => item.tooltipContent;\nexport const defaultGetItemPoint: ProgressStepBarPropGetItemPoint<\n ProgressStepBarItemDefault\n> = (item) => item.point;\nexport const defaultGetItemLineStatus: ProgressStepBarPropGetItemLineStatus<\n ProgressStepBarItemDefault\n> = (item) => item.lineStatus;\nexport const defaultGetItemProgress: ProgressStepBarPropGetItemProgress<\n ProgressStepBarItemDefault\n> = (item) => item.progress;\nexport const defaultGetItemContent: ProgressStepBarPropGetItemContent<\n ProgressStepBarItemDefault\n> = (item) => item.content;\nexport const defaultGetItemStatus: ProgressStepBarPropGetItemStatus<\n ProgressStepBarItemDefault\n> = (item) => item.status;\nexport const defaultGetItemOnClick: ProgressStepBarPropGetItemOnClick<\n ProgressStepBarItemDefault\n> = (item) => item.onClick;\n\nexport type ProgressStepBarComponent = <ITEM = ProgressStepBarItemDefault>(\n props: ProgressStepBarProps<ITEM>,\n) => React.ReactElement | null;\n\nexport type ProgressStepBarItemComponent = (\n props: PropsWithHTMLAttributesAndRef<\n ProgressStepBarItemProps,\n HTMLDivElement\n >,\n) => React.ReactElement | null;\n\nexport function withDefaultGetters<ITEM>(props: ProgressStepBarProps<ITEM>) {\n return {\n ...props,\n getItemLabel: props.getItemLabel || defaultGetItemLabel,\n getItemTooltipContent:\n props.getItemTooltipContent || defaultGetItemTooltipContent,\n getItemPoint: props.getItemPoint || defaultGetItemPoint,\n getItemProgress: props.getItemProgress || defaultGetItemProgress,\n getItemContent: props.getItemContent || defaultGetItemContent,\n getItemStatus: props.getItemStatus || defaultGetItemStatus,\n getItemLineStatus: props.getItemLineStatus || defaultGetItemLineStatus,\n getItemOnClick: props.getItemOnClick || defaultGetItemOnClick,\n };\n}\n\nexport const getItemPosition = (index: number, length: number) => {\n let position: ProgressStepBarPropPosition = 'center';\n if (index === length - 1) position = 'end';\n if (index === 0) position = 'start';\n\n return position;\n};\n\nexport const getLineSize: (\n container: React.RefObject<HTMLElement>,\n activeElement: React.RefObject<HTMLElement>,\n direction: ProgressStepBarPropDirection,\n) => number = (container, activeElement, direction) => {\n let size = 0;\n if (\n container &&\n container.current &&\n activeElement &&\n activeElement.current\n ) {\n const containerPosition = container.current.getBoundingClientRect();\n const activeElementPosition = activeElement.current.getBoundingClientRect();\n if (direction === 'vertical')\n size =\n activeElementPosition.y -\n containerPosition.y +\n activeElementPosition.height;\n else size = activeElementPosition.x - containerPosition.x;\n }\n return size;\n};\n\nconst getRefSize = (ref: React.RefObject<HTMLElement>) => {\n if (ref.current) {\n const { width, height } = ref.current.getBoundingClientRect();\n return [width, height];\n }\n return [0, 0];\n};\n\nexport const calculateLines = (\n refs: React.RefObject<HTMLElement>[],\n direction: ProgressStepBarPropDirection,\n) => {\n const sizes: number[] = [];\n for (let i = 0; i < refs.length - 1; i++) {\n const ref = refs[i];\n const firstSize = getRefSize(ref);\n const secondSize = getRefSize(refs[i + 1]);\n let size = 0;\n if (i === 0) {\n size =\n direction === 'horizontal'\n ? firstSize[0] + secondSize[0] / 2\n : firstSize[1];\n } else if (i === refs.length - 2) {\n size =\n direction === 'horizontal'\n ? firstSize[0] / 2 + secondSize[0]\n : firstSize[1] + 2;\n } else {\n size =\n direction === 'horizontal'\n ? firstSize[0] / 2 + secondSize[0] / 2\n : firstSize[1];\n }\n sizes.push(size);\n }\n\n return sizes;\n};\n\nexport const validateVisibleIndex = (\n length: number,\n index: number | undefined,\n) => {\n if (!index) {\n return index;\n }\n\n if (index < 0) {\n return undefined;\n }\n\n return Math.min(index, length - 1);\n};\n"],"mappings":"qqBAGA,OAASA,EAAT,uBAGA,MAAO,IAAMC,wBAAuB,CAAG,CAAC,GAAD,CAAM,IAAN,CAAY,GAAZ,CAAhC,CAEP,MAAO,IAAMC,+BAA8B,CAAGD,uBAAuB,CAAC,CAAD,CAA9D,CAEP,MAAO,IAAME,6BAA4B,CAAG,CAAC,YAAD,CAAe,UAAf,CAArC,CAGP,MAAO,IAAMC,oCAAmC,CAC9CD,4BAA4B,CAAC,CAAD,CADvB,CAGP,MAAO,IAAME,0BAAyB,CAAG,CACvC,QADuC,CAE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MK,qBAAoB,CAAG,SAClCxB,CADkC,CAElCD,CAFkC,CAG/B,OACEA,EADF,CAKS,CAAR,CAAAA,CALD,QASI0B,IAAI,CAACC,GAAL,CAAS3B,CAAT,CAAgBC,CAAM,CAAG,CAAzB,CATJ,CAEMD,CAQV,CAbM"}
|
|
1
|
+
{"version":3,"file":"helpers.js","names":["cn","progressStepBarPropSize","progressStepBarPropSizeDefault","progressStepBarPropDirection","progressStepBarPropDirectionDefault","progressStepBarPropStatus","progressStepBarPropStatusDefault","progressStepBarPointNumbersMap","progressStepBarPropPosition","progressStepBarPropPositionDefault","cnProgressStepBar","defaultGetItemLabel","item","label","defaultGetItemTooltipContent","tooltipContent","defaultGetItemPoint","point","defaultGetItemLineStatus","lineStatus","defaultGetItemProgress","progress","defaultGetItemContent","content","defaultGetItemStatus","status","defaultGetItemOnClick","onClick","withDefaultGetters","props","getItemLabel","getItemTooltipContent","getItemPoint","getItemProgress","getItemContent","getItemStatus","getItemLineStatus","getItemOnClick","getItemPosition","index","length","position","getLineSize","container","activeElement","direction","size","current","containerPosition","getBoundingClientRect","activeElementPosition","y","height","x","getRefSize","ref","width","calculateLines","refs","sizes","i","firstSize","secondSize","push","validateVisibleIndex","Math","min"],"sources":["../../../../../src/components/ProgressStepBar/helpers.ts"],"sourcesContent":["import { IconComponent } from '@consta/icons/Icon';\nimport React from 'react';\n\nimport { cn } from '../../utils/bem';\nimport { PropsWithHTMLAttributesAndRef } from '../../utils/types/PropsWithHTMLAttributes';\n\nexport const progressStepBarPropSize = ['s', 'xs', 'm'] as const;\nexport type ProgressStepBarPropSize = typeof progressStepBarPropSize[number];\nexport const progressStepBarPropSizeDefault = progressStepBarPropSize[0];\n\nexport const progressStepBarPropDirection = ['horizontal', 'vertical'] as const;\nexport type ProgressStepBarPropDirection =\n typeof progressStepBarPropDirection[number];\nexport const progressStepBarPropDirectionDefault =\n progressStepBarPropDirection[0];\n\nexport const progressStepBarPropStatus = [\n 'normal',\n 'success',\n 'warning',\n 'alert',\n] as const;\nexport type ProgressStepBarPropStatus =\n typeof progressStepBarPropStatus[number];\nexport const progressStepBarPropStatusDefault = progressStepBarPropStatus[0];\n\nexport const progressStepBarPointNumbersMap = [\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,\n] as const;\nexport type ProgressStepBarPointNumbersMap =\n typeof progressStepBarPointNumbersMap[number];\n\nexport const progressStepBarPropPosition = ['center', 'start', 'end'] as const;\nexport type ProgressStepBarPropPosition =\n typeof progressStepBarPropPosition[number];\nexport const progressStepBarPropPositionDefault: ProgressStepBarPropPosition =\n progressStepBarPropPosition[0];\n\nexport type ProgressStepBarPropGetItemLabel<ITEM> = (\n item: ITEM,\n) => string | undefined;\nexport type ProgressStepBarPropGetItemKey<ITEM> = (\n item: ITEM,\n) => string | number;\nexport type ProgressStepBarPropGetItemTooltipContent<ITEM> = (\n item: ITEM,\n) => string | undefined;\nexport type ProgressStepBarPropGetItemLineStatus<ITEM> = (\n item: ITEM,\n) => ProgressStepBarPropStatus | undefined;\nexport type ProgressStepBarPropGetItemPoint<ITEM> = (\n item: ITEM,\n) => ProgressStepBarPointNumbersMap | IconComponent | undefined;\nexport type ProgressStepBarPropGetItemProgress<ITEM> = (\n item: ITEM,\n) => boolean | undefined;\nexport type ProgressStepBarPropGetItemContent<ITEM> = (\n item: ITEM,\n) => React.ReactNode | undefined;\nexport type ProgressStepBarPropGetItemStatus<ITEM> = (\n item: ITEM,\n) => ProgressStepBarPropStatus | undefined;\nexport type ProgressStepBarPropGetItemOnClick<ITEM> = (\n item: ITEM,\n) => React.EventHandler<React.MouseEvent> | undefined;\n\nexport type ProgressStepBarItemDefault = {\n label?: string;\n tooltipContent?: string;\n lineStatus?: ProgressStepBarPropStatus;\n point?: ProgressStepBarPointNumbersMap | IconComponent;\n status?: ProgressStepBarPropStatus;\n progress?: boolean;\n content?: React.ReactNode;\n onClick?: React.EventHandler<React.MouseEvent>;\n};\n\nexport type Line = {\n status: ProgressStepBarPropStatus;\n size: number;\n};\n\nexport type ProgressStepBarPropOnItemClick<ITEM> = (\n item: ITEM,\n props: {\n e: React.MouseEvent;\n index: number;\n },\n) => void;\n\nexport type ProgressStepBarProps<ITEM = ProgressStepBarItemDefault> =\n PropsWithHTMLAttributesAndRef<\n {\n steps: ITEM[];\n direction?: ProgressStepBarPropDirection;\n size?: ProgressStepBarPropSize;\n activeStepIndex?: number;\n onItemClick?: ProgressStepBarPropOnItemClick<ITEM>;\n getItemLabel?: ProgressStepBarPropGetItemLabel<ITEM>;\n getItemLineStatus?: ProgressStepBarPropGetItemLineStatus<ITEM>;\n getItemTooltipContent?: ProgressStepBarPropGetItemTooltipContent<ITEM>;\n getItemPoint?: ProgressStepBarPropGetItemPoint<ITEM>;\n getItemProgress?: ProgressStepBarPropGetItemProgress<ITEM>;\n getItemContent?: ProgressStepBarPropGetItemContent<ITEM>;\n getItemStatus?: ProgressStepBarPropGetItemStatus<ITEM>;\n getItemOnClick?: ProgressStepBarPropGetItemOnClick<ITEM>;\n },\n HTMLDivElement\n > &\n (ITEM extends { label: ProgressStepBarItemDefault['label'] }\n ? {}\n : { getItemLabel: ProgressStepBarPropGetItemLabel<ITEM> });\n\nexport type ProgressStepBarItemProps = {\n content?: React.ReactNode;\n label?: string;\n point?: ProgressStepBarPointNumbersMap | IconComponent;\n progress?: boolean;\n status?: ProgressStepBarPropStatus | 'system';\n tooltipContent?: string;\n tooltipZIndex?: number;\n position?: ProgressStepBarPropPosition;\n direction: ProgressStepBarPropDirection;\n size: ProgressStepBarPropSize;\n onClick?: (e: React.MouseEvent) => void;\n pointRef?: React.RefObject<HTMLButtonElement>;\n className?: string;\n};\n\nexport const cnProgressStepBar = cn('ProgressStepBar');\n\nexport const defaultGetItemLabel: ProgressStepBarPropGetItemLabel<\n ProgressStepBarItemDefault\n> = (item) => item.label;\nexport const defaultGetItemTooltipContent: ProgressStepBarPropGetItemTooltipContent<\n ProgressStepBarItemDefault\n> = (item) => item.tooltipContent;\nexport const defaultGetItemPoint: ProgressStepBarPropGetItemPoint<\n ProgressStepBarItemDefault\n> = (item) => item.point;\nexport const defaultGetItemLineStatus: ProgressStepBarPropGetItemLineStatus<\n ProgressStepBarItemDefault\n> = (item) => item.lineStatus;\nexport const defaultGetItemProgress: ProgressStepBarPropGetItemProgress<\n ProgressStepBarItemDefault\n> = (item) => item.progress;\nexport const defaultGetItemContent: ProgressStepBarPropGetItemContent<\n ProgressStepBarItemDefault\n> = (item) => item.content;\nexport const defaultGetItemStatus: ProgressStepBarPropGetItemStatus<\n ProgressStepBarItemDefault\n> = (item) => item.status;\nexport const defaultGetItemOnClick: ProgressStepBarPropGetItemOnClick<\n ProgressStepBarItemDefault\n> = (item) => item.onClick;\n\nexport type ProgressStepBarComponent = <ITEM = ProgressStepBarItemDefault>(\n props: ProgressStepBarProps<ITEM>,\n) => React.ReactNode | null;\n\nexport type ProgressStepBarItemComponent = (\n props: PropsWithHTMLAttributesAndRef<\n ProgressStepBarItemProps,\n HTMLDivElement\n >,\n) => React.ReactNode | null;\n\nexport function withDefaultGetters<ITEM>(props: ProgressStepBarProps<ITEM>) {\n return {\n ...props,\n getItemLabel: props.getItemLabel || defaultGetItemLabel,\n getItemTooltipContent:\n props.getItemTooltipContent || defaultGetItemTooltipContent,\n getItemPoint: props.getItemPoint || defaultGetItemPoint,\n getItemProgress: props.getItemProgress || defaultGetItemProgress,\n getItemContent: props.getItemContent || defaultGetItemContent,\n getItemStatus: props.getItemStatus || defaultGetItemStatus,\n getItemLineStatus: props.getItemLineStatus || defaultGetItemLineStatus,\n getItemOnClick: props.getItemOnClick || defaultGetItemOnClick,\n };\n}\n\nexport const getItemPosition = (index: number, length: number) => {\n let position: ProgressStepBarPropPosition = 'center';\n if (index === length - 1) position = 'end';\n if (index === 0) position = 'start';\n\n return position;\n};\n\nexport const getLineSize: (\n container: React.RefObject<HTMLElement>,\n activeElement: React.RefObject<HTMLElement>,\n direction: ProgressStepBarPropDirection,\n) => number = (container, activeElement, direction) => {\n let size = 0;\n if (\n container &&\n container.current &&\n activeElement &&\n activeElement.current\n ) {\n const containerPosition = container.current.getBoundingClientRect();\n const activeElementPosition = activeElement.current.getBoundingClientRect();\n if (direction === 'vertical')\n size =\n activeElementPosition.y -\n containerPosition.y +\n activeElementPosition.height;\n else size = activeElementPosition.x - containerPosition.x;\n }\n return size;\n};\n\nconst getRefSize = (ref: React.RefObject<HTMLElement>) => {\n if (ref.current) {\n const { width, height } = ref.current.getBoundingClientRect();\n return [width, height];\n }\n return [0, 0];\n};\n\nexport const calculateLines = (\n refs: React.RefObject<HTMLElement>[],\n direction: ProgressStepBarPropDirection,\n) => {\n const sizes: number[] = [];\n for (let i = 0; i < refs.length - 1; i++) {\n const ref = refs[i];\n const firstSize = getRefSize(ref);\n const secondSize = getRefSize(refs[i + 1]);\n let size = 0;\n if (i === 0) {\n size =\n direction === 'horizontal'\n ? firstSize[0] + secondSize[0] / 2\n : firstSize[1];\n } else if (i === refs.length - 2) {\n size =\n direction === 'horizontal'\n ? firstSize[0] / 2 + secondSize[0]\n : firstSize[1] + 2;\n } else {\n size =\n direction === 'horizontal'\n ? firstSize[0] / 2 + secondSize[0] / 2\n : firstSize[1];\n }\n sizes.push(size);\n }\n\n return sizes;\n};\n\nexport const validateVisibleIndex = (\n length: number,\n index: number | undefined,\n) => {\n if (!index) {\n return index;\n }\n\n if (index < 0) {\n return undefined;\n }\n\n return Math.min(index, length - 1);\n};\n"],"mappings":"qqBAGA,OAASA,EAAT,uBAGA,MAAO,IAAMC,wBAAuB,CAAG,CAAC,GAAD,CAAM,IAAN,CAAY,GAAZ,CAAhC,CAEP,MAAO,IAAMC,+BAA8B,CAAGD,uBAAuB,CAAC,CAAD,CAA9D,CAEP,MAAO,IAAME,6BAA4B,CAAG,CAAC,YAAD,CAAe,UAAf,CAArC,CAGP,MAAO,IAAMC,oCAAmC,CAC9CD,4BAA4B,CAAC,CAAD,CADvB,CAGP,MAAO,IAAME,0BAAyB,CAAG,CACvC,QADuC,CAEvC,SAFuC,CAGvC,S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AClCxB,CADkC,CAElCD,CAFkC,CAG/B,OACEA,EADF,CAKS,CAAR,CAAAA,CALD,QASI0B,IAAI,CAACC,GAAL,CAAS3B,CAAT,CAAgBC,CAAM,CAAG,CAAzB,CATJ,CAEMD,CAQV,CAbM"}
|
|
@@ -18,14 +18,17 @@ export declare const withDefaultGetters: (props: RadioGroupProps) => {
|
|
|
18
18
|
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
19
19
|
suppressHydrationWarning?: boolean | undefined | undefined;
|
|
20
20
|
accessKey?: string | undefined | undefined;
|
|
21
|
-
|
|
21
|
+
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
|
|
22
|
+
autoFocus?: boolean | undefined | undefined;
|
|
23
|
+
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
22
24
|
contextMenu?: string | undefined | undefined;
|
|
23
25
|
dir?: string | undefined | undefined;
|
|
24
26
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
27
|
+
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
25
28
|
hidden?: boolean | undefined | undefined;
|
|
26
29
|
id?: string | undefined | undefined;
|
|
27
30
|
lang?: string | undefined | undefined;
|
|
28
|
-
|
|
31
|
+
nonce?: string | undefined | undefined;
|
|
29
32
|
slot?: string | undefined | undefined;
|
|
30
33
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
31
34
|
style?: import("react").CSSProperties | undefined;
|
|
@@ -35,14 +38,16 @@ export declare const withDefaultGetters: (props: RadioGroupProps) => {
|
|
|
35
38
|
radioGroup?: string | undefined | undefined;
|
|
36
39
|
role?: import("react").AriaRole | undefined;
|
|
37
40
|
about?: string | undefined | undefined;
|
|
41
|
+
content?: string | undefined | undefined;
|
|
38
42
|
datatype?: string | undefined | undefined;
|
|
39
43
|
inlist?: any;
|
|
40
44
|
prefix?: string | undefined | undefined;
|
|
41
45
|
property?: string | undefined | undefined;
|
|
46
|
+
rel?: string | undefined | undefined;
|
|
42
47
|
resource?: string | undefined | undefined;
|
|
48
|
+
rev?: string | undefined | undefined;
|
|
43
49
|
typeof?: string | undefined | undefined;
|
|
44
50
|
vocab?: string | undefined | undefined;
|
|
45
|
-
autoCapitalize?: string | undefined | undefined;
|
|
46
51
|
autoCorrect?: string | undefined | undefined;
|
|
47
52
|
autoSave?: string | undefined | undefined;
|
|
48
53
|
color?: string | undefined | undefined;
|
|
@@ -56,57 +61,64 @@ export declare const withDefaultGetters: (props: RadioGroupProps) => {
|
|
|
56
61
|
unselectable?: "on" | "off" | undefined | undefined;
|
|
57
62
|
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
|
|
58
63
|
is?: string | undefined | undefined;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
64
|
+
exportparts?: string | undefined | undefined;
|
|
65
|
+
part?: string | undefined | undefined;
|
|
66
|
+
"aria-activedescendant"?: string | undefined | undefined;
|
|
67
|
+
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
68
|
+
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined | undefined;
|
|
69
|
+
"aria-braillelabel"?: string | undefined | undefined;
|
|
70
|
+
"aria-brailleroledescription"?: string | undefined | undefined;
|
|
71
|
+
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
72
|
+
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
|
|
73
|
+
"aria-colcount"?: number | undefined | undefined;
|
|
74
|
+
"aria-colindex"?: number | undefined | undefined;
|
|
75
|
+
"aria-colindextext"?: string | undefined | undefined;
|
|
76
|
+
"aria-colspan"?: number | undefined | undefined;
|
|
77
|
+
"aria-controls"?: string | undefined | undefined;
|
|
78
|
+
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined | undefined;
|
|
79
|
+
"aria-describedby"?: string | undefined | undefined;
|
|
80
|
+
"aria-description"?: string | undefined | undefined;
|
|
81
|
+
"aria-details"?: string | undefined | undefined;
|
|
82
|
+
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
83
|
+
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined | undefined;
|
|
84
|
+
"aria-errormessage"?: string | undefined | undefined;
|
|
85
|
+
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
86
|
+
"aria-flowto"?: string | undefined | undefined;
|
|
87
|
+
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
88
|
+
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined | undefined;
|
|
89
|
+
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
90
|
+
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined | undefined;
|
|
91
|
+
"aria-keyshortcuts"?: string | undefined | undefined;
|
|
92
|
+
"aria-label"?: string | undefined | undefined;
|
|
93
|
+
"aria-labelledby"?: string | undefined | undefined;
|
|
94
|
+
"aria-level"?: number | undefined | undefined;
|
|
95
|
+
"aria-live"?: "off" | "assertive" | "polite" | undefined | undefined;
|
|
96
|
+
"aria-modal"?: (boolean | "true" | "false") | undefined;
|
|
97
|
+
"aria-multiline"?: (boolean | "true" | "false") | undefined;
|
|
98
|
+
"aria-multiselectable"?: (boolean | "true" | "false") | undefined;
|
|
99
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined | undefined;
|
|
100
|
+
"aria-owns"?: string | undefined | undefined;
|
|
101
|
+
"aria-placeholder"?: string | undefined | undefined;
|
|
102
|
+
"aria-posinset"?: number | undefined | undefined;
|
|
103
|
+
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
|
|
104
|
+
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
105
|
+
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined | undefined;
|
|
106
|
+
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
107
|
+
"aria-roledescription"?: string | undefined | undefined;
|
|
108
|
+
"aria-rowcount"?: number | undefined | undefined;
|
|
109
|
+
"aria-rowindex"?: number | undefined | undefined;
|
|
110
|
+
"aria-rowindextext"?: string | undefined | undefined;
|
|
111
|
+
"aria-rowspan"?: number | undefined | undefined;
|
|
112
|
+
"aria-selected"?: (boolean | "true" | "false") | undefined;
|
|
113
|
+
"aria-setsize"?: number | undefined | undefined;
|
|
114
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined | undefined;
|
|
115
|
+
"aria-valuemax"?: number | undefined | undefined;
|
|
116
|
+
"aria-valuemin"?: number | undefined | undefined;
|
|
117
|
+
"aria-valuenow"?: number | undefined | undefined;
|
|
118
|
+
"aria-valuetext"?: string | undefined | undefined;
|
|
107
119
|
children?: import("react").ReactNode;
|
|
108
120
|
dangerouslySetInnerHTML?: {
|
|
109
|
-
__html: string;
|
|
121
|
+
__html: string | TrustedHTML;
|
|
110
122
|
} | undefined | undefined;
|
|
111
123
|
onCopy?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
112
124
|
onCopyCapture?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
@@ -125,7 +137,7 @@ export declare const withDefaultGetters: (props: RadioGroupProps) => {
|
|
|
125
137
|
onBlur?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
|
|
126
138
|
onBlurCapture?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
|
|
127
139
|
onChangeCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
128
|
-
onBeforeInput?: import("react").
|
|
140
|
+
onBeforeInput?: import("react").InputEventHandler<HTMLDivElement> | undefined;
|
|
129
141
|
onBeforeInputCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
130
142
|
onInput?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
131
143
|
onInputCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
@@ -244,9 +256,7 @@ export declare const withDefaultGetters: (props: RadioGroupProps) => {
|
|
|
244
256
|
onPointerCancel?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
245
257
|
onPointerCancelCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
246
258
|
onPointerEnter?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
247
|
-
onPointerEnterCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
248
259
|
onPointerLeave?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
249
|
-
onPointerLeaveCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
250
260
|
onPointerOver?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
251
261
|
onPointerOverCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
252
262
|
onPointerOut?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
@@ -267,6 +277,6 @@ export declare const withDefaultGetters: (props: RadioGroupProps) => {
|
|
|
267
277
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
268
278
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
269
279
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
270
|
-
ref?: import("react").
|
|
280
|
+
ref?: import("react").LegacyRef<HTMLDivElement> | undefined;
|
|
271
281
|
key?: import("react").Key | null | undefined;
|
|
272
282
|
};
|
|
@@ -41,4 +41,4 @@ export type RadioGroupProps<ITEM = RadioGroupDefaultItem> = PropsWithHTMLAttribu
|
|
|
41
41
|
} ? {} : {
|
|
42
42
|
getItemLabel: RadioGroupPropGetItemLabel<ITEM>;
|
|
43
43
|
});
|
|
44
|
-
export type RadioGroupComponent = <ITEM = RadioGroupDefaultItem>(props: RadioGroupProps<ITEM>) => React.
|
|
44
|
+
export type RadioGroupComponent = <ITEM = RadioGroupDefaultItem>(props: RadioGroupProps<ITEM>) => React.ReactNode | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["radioGroupDirections","radioGroupDefaultDirection","radioGroupSizes","radioGroupDefaultSize","radioGroupViews","radioGroupDefaultView","radioGroupPropAlign","radioGroupPropAlignDefault"],"sources":["../../../../../src/components/RadioGroup/types.ts"],"sourcesContent":["import { PropsWithHTMLAttributesAndRef } from '../../utils/types/PropsWithHTMLAttributes';\n\nexport type RadioGroupDefaultItem = {\n key?: string | number;\n label: string;\n disabled?: boolean;\n};\n\nexport const radioGroupDirections = ['column', 'row'] as const;\nexport type RadioGroupDirection = typeof radioGroupDirections[number];\nexport const radioGroupDefaultDirection: RadioGroupDirection =\n radioGroupDirections[0];\n\nexport const radioGroupSizes = ['m', 'l', 'xs', 's'] as const;\nexport type RadioGroupPropSize = typeof radioGroupSizes[number];\nexport const radioGroupDefaultSize: RadioGroupPropSize = radioGroupSizes[0];\n\nexport const radioGroupViews = ['primary', 'ghost'] as const;\nexport type RadioGroupPropView = typeof radioGroupViews[number];\nexport const radioGroupDefaultView: RadioGroupPropView = radioGroupViews[0];\n\nexport const radioGroupPropAlign = ['center', 'top'] as const;\nexport type RadioGroupPropAlign = typeof radioGroupPropAlign[number];\nexport const radioGroupPropAlignDefault: RadioGroupPropAlign =\n radioGroupPropAlign[0];\n\nexport type RadioGroupPropGetItemKey<ITEM> = (\n item: ITEM,\n) => string | number | undefined;\nexport type RadioGroupPropGetItemLabel<ITEM> = (item: ITEM) => string;\nexport type RadioGroupPropGetItemDisabled<ITEM> = (\n item: ITEM,\n) => boolean | undefined;\n\nexport type RadioGroupPropOnChange<ITEM> = (\n value: ITEM,\n props: {\n e: React.ChangeEvent<HTMLInputElement>;\n },\n) => void;\n\nexport type RadioGroupProps<ITEM = RadioGroupDefaultItem> =\n PropsWithHTMLAttributesAndRef<\n {\n align?: RadioGroupPropAlign;\n value?: ITEM | null;\n items: ITEM[];\n getItemKey?: RadioGroupPropGetItemKey<ITEM>;\n getItemLabel?: RadioGroupPropGetItemLabel<ITEM>;\n getItemDisabled?: RadioGroupPropGetItemDisabled<ITEM>;\n onChange?: RadioGroupPropOnChange<ITEM>;\n name?: string;\n direction?: RadioGroupDirection;\n size?: RadioGroupPropSize;\n view?: RadioGroupPropView;\n disabled?: boolean;\n className?: string;\n },\n HTMLDivElement\n > &\n (ITEM extends { label: RadioGroupDefaultItem['label'] }\n ? {}\n : {\n getItemLabel: RadioGroupPropGetItemLabel<ITEM>;\n });\n\nexport type RadioGroupComponent = <ITEM = RadioGroupDefaultItem>(\n props: RadioGroupProps<ITEM>,\n) => React.
|
|
1
|
+
{"version":3,"file":"types.js","names":["radioGroupDirections","radioGroupDefaultDirection","radioGroupSizes","radioGroupDefaultSize","radioGroupViews","radioGroupDefaultView","radioGroupPropAlign","radioGroupPropAlignDefault"],"sources":["../../../../../src/components/RadioGroup/types.ts"],"sourcesContent":["import { PropsWithHTMLAttributesAndRef } from '../../utils/types/PropsWithHTMLAttributes';\n\nexport type RadioGroupDefaultItem = {\n key?: string | number;\n label: string;\n disabled?: boolean;\n};\n\nexport const radioGroupDirections = ['column', 'row'] as const;\nexport type RadioGroupDirection = typeof radioGroupDirections[number];\nexport const radioGroupDefaultDirection: RadioGroupDirection =\n radioGroupDirections[0];\n\nexport const radioGroupSizes = ['m', 'l', 'xs', 's'] as const;\nexport type RadioGroupPropSize = typeof radioGroupSizes[number];\nexport const radioGroupDefaultSize: RadioGroupPropSize = radioGroupSizes[0];\n\nexport const radioGroupViews = ['primary', 'ghost'] as const;\nexport type RadioGroupPropView = typeof radioGroupViews[number];\nexport const radioGroupDefaultView: RadioGroupPropView = radioGroupViews[0];\n\nexport const radioGroupPropAlign = ['center', 'top'] as const;\nexport type RadioGroupPropAlign = typeof radioGroupPropAlign[number];\nexport const radioGroupPropAlignDefault: RadioGroupPropAlign =\n radioGroupPropAlign[0];\n\nexport type RadioGroupPropGetItemKey<ITEM> = (\n item: ITEM,\n) => string | number | undefined;\nexport type RadioGroupPropGetItemLabel<ITEM> = (item: ITEM) => string;\nexport type RadioGroupPropGetItemDisabled<ITEM> = (\n item: ITEM,\n) => boolean | undefined;\n\nexport type RadioGroupPropOnChange<ITEM> = (\n value: ITEM,\n props: {\n e: React.ChangeEvent<HTMLInputElement>;\n },\n) => void;\n\nexport type RadioGroupProps<ITEM = RadioGroupDefaultItem> =\n PropsWithHTMLAttributesAndRef<\n {\n align?: RadioGroupPropAlign;\n value?: ITEM | null;\n items: ITEM[];\n getItemKey?: RadioGroupPropGetItemKey<ITEM>;\n getItemLabel?: RadioGroupPropGetItemLabel<ITEM>;\n getItemDisabled?: RadioGroupPropGetItemDisabled<ITEM>;\n onChange?: RadioGroupPropOnChange<ITEM>;\n name?: string;\n direction?: RadioGroupDirection;\n size?: RadioGroupPropSize;\n view?: RadioGroupPropView;\n disabled?: boolean;\n className?: string;\n },\n HTMLDivElement\n > &\n (ITEM extends { label: RadioGroupDefaultItem['label'] }\n ? {}\n : {\n getItemLabel: RadioGroupPropGetItemLabel<ITEM>;\n });\n\nexport type RadioGroupComponent = <ITEM = RadioGroupDefaultItem>(\n props: RadioGroupProps<ITEM>,\n) => React.ReactNode | null;\n"],"mappings":"AAQA,MAAO,IAAMA,qBAAoB,CAAG,CAAC,QAAD,CAAW,KAAX,CAA7B,CAEP,MAAO,IAAMC,2BAA+C,CAC1DD,oBAAoB,CAAC,CAAD,CADf,CAGP,MAAO,IAAME,gBAAe,CAAG,CAAC,GAAD,CAAM,GAAN,CAAW,IAAX,CAAiB,GAAjB,CAAxB,CAEP,MAAO,IAAMC,sBAAyC,CAAGD,eAAe,CAAC,CAAD,CAAjE,CAEP,MAAO,IAAME,gBAAe,CAAG,CAAC,SAAD,CAAY,OAAZ,CAAxB,CAEP,MAAO,IAAMC,sBAAyC,CAAGD,eAAe,CAAC,CAAD,CAAjE,CAEP,MAAO,IAAME,oBAAmB,CAAG,CAAC,QAAD,CAAW,KAAX,CAA5B,CAEP,MAAO,IAAMC,2BAA+C,CAC1DD,mBAAmB,CAAC,CAAD,CADd"}
|
|
@@ -22,8 +22,8 @@ export type SelectPropGetItemGroupKey<ITEM> = (item: ITEM) => string | number |
|
|
|
22
22
|
export type SelectPropGetItemDisabled<ITEM> = (item: ITEM) => boolean | undefined;
|
|
23
23
|
export type SelectPropGetGroupKey<GROUP> = (group: GROUP) => string | number;
|
|
24
24
|
export type SelectPropGetGroupLabel<GROUP> = (group: GROUP) => string;
|
|
25
|
-
export type PropRenderItem<ITEM> = (props: RenderItemProps<ITEM>) => React.
|
|
26
|
-
export type PropRenderValue<ITEM> = (props: SelectRenderValueProps<ITEM>) => React.
|
|
25
|
+
export type PropRenderItem<ITEM> = (props: RenderItemProps<ITEM>) => React.ReactNode | null;
|
|
26
|
+
export type PropRenderValue<ITEM> = (props: SelectRenderValueProps<ITEM>) => React.ReactNode | null;
|
|
27
27
|
export type SelectPropOnChange<ITEM> = (value: ITEM | null, props: {
|
|
28
28
|
e: React.SyntheticEvent;
|
|
29
29
|
}) => void;
|
|
@@ -84,7 +84,7 @@ export type SelectProps<ITEM = SelectItemDefault, GROUP = SelectGroupDefault> =
|
|
|
84
84
|
} ? {} : {
|
|
85
85
|
getGroupKey: SelectPropGetGroupKey<GROUP>;
|
|
86
86
|
});
|
|
87
|
-
export type SelectComponent = <ITEM = SelectItemDefault, GROUP = SelectGroupDefault>(props: SelectProps<ITEM, GROUP>) => React.
|
|
87
|
+
export type SelectComponent = <ITEM = SelectItemDefault, GROUP = SelectGroupDefault>(props: SelectProps<ITEM, GROUP>) => React.ReactNode | null;
|
|
88
88
|
export declare const defaultGetItemKey: SelectPropGetItemKey<SelectItemDefault>;
|
|
89
89
|
export declare const defaultGetItemLabel: SelectPropGetItemLabel<SelectItemDefault>;
|
|
90
90
|
export declare const defaultGetItemGroupKey: SelectPropGetItemGroupKey<SelectItemDefault>;
|
|
@@ -131,7 +131,7 @@ export declare function withDefaultGetters<ITEM, GROUP>(props: SelectProps<ITEM,
|
|
|
131
131
|
onDropdownOpen?: (isOpen: boolean) => void;
|
|
132
132
|
dropdownOpen?: boolean;
|
|
133
133
|
ignoreOutsideClicksRefs?: ReadonlyArray<React.RefObject<HTMLElement>>;
|
|
134
|
-
} & Omit<React.HTMLAttributes<HTMLDivElement>, "css" | "
|
|
134
|
+
} & Omit<React.HTMLAttributes<HTMLDivElement>, "css" | "onFocus" | "onBlur" | "onChange" | "size" | "view" | "form" | "status" | "caption" | "label" | "name" | "disabled" | "value" | "placeholder" | "required" | "inputRef" | "items" | "dropdownForm" | "focused" | "ariaLabel" | "dropdownClassName" | "dropdownRef" | "isLoading" | "labelForEmptyItems" | "renderItem" | "renderValue" | "groups" | "getItemLabel" | "getItemKey" | "getItemGroupKey" | "getItemDisabled" | "getGroupLabel" | "getGroupKey" | "labelIcon" | "labelPosition" | "onScrollToBottom" | "onDropdownOpen" | "dropdownOpen" | "ignoreOutsideClicksRefs" | "virtualScroll"> & React.RefAttributes<HTMLDivElement> & (ITEM extends {
|
|
135
135
|
label: SelectItemDefault["label"];
|
|
136
136
|
} ? {} : {
|
|
137
137
|
getItemLabel: SelectPropGetItemLabel<ITEM>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","names":["defaultGetItemKey","item","id","defaultGetItemLabel","label","defaultGetItemGroupKey","groupId","defaultGetItemDisabled","disabled","defaultGetGroupKey","group","defaultGetGroupLabel","withDefaultGetters","props","getItemLabel","getItemKey","getItemGroupKey","getItemDisabled","getGroupLabel","getGroupKey","iconSizeMap","xs","s","m","l"],"sources":["../../../../../src/components/Select/helpers.ts"],"sourcesContent":["import { IconComponent, IconPropSize } from '@consta/icons/Icon';\nimport React from 'react';\n\nimport { PropsWithHTMLAttributesAndRef } from '../../utils/types/PropsWithHTMLAttributes';\nimport {\n PropForm,\n PropSize,\n PropStatus,\n PropView,\n RenderItemProps,\n} from '../SelectComponents/types';\n\nexport type SelectItemDefault = {\n label: string;\n id: string | number;\n groupId?: string | number;\n disabled?: boolean;\n};\n\nexport type SelectGroupDefault = {\n label: string;\n id: string | number;\n};\n\ntype SelectPropValue<ITEM> = ITEM | null | undefined;\n\ntype SelectRenderValueProps<ITEM> = {\n item: ITEM;\n};\n\nexport type SelectPropGetItemLabel<ITEM> = (item: ITEM) => string;\nexport type SelectPropGetItemKey<ITEM> = (item: ITEM) => string | number;\nexport type SelectPropGetItemGroupKey<ITEM> = (\n item: ITEM,\n) => string | number | undefined;\nexport type SelectPropGetItemDisabled<ITEM> = (\n item: ITEM,\n) => boolean | undefined;\nexport type SelectPropGetGroupKey<GROUP> = (group: GROUP) => string | number;\nexport type SelectPropGetGroupLabel<GROUP> = (group: GROUP) => string;\nexport type PropRenderItem<ITEM> = (\n props: RenderItemProps<ITEM>,\n) => React.
|
|
1
|
+
{"version":3,"file":"helpers.js","names":["defaultGetItemKey","item","id","defaultGetItemLabel","label","defaultGetItemGroupKey","groupId","defaultGetItemDisabled","disabled","defaultGetGroupKey","group","defaultGetGroupLabel","withDefaultGetters","props","getItemLabel","getItemKey","getItemGroupKey","getItemDisabled","getGroupLabel","getGroupKey","iconSizeMap","xs","s","m","l"],"sources":["../../../../../src/components/Select/helpers.ts"],"sourcesContent":["import { IconComponent, IconPropSize } from '@consta/icons/Icon';\nimport React from 'react';\n\nimport { PropsWithHTMLAttributesAndRef } from '../../utils/types/PropsWithHTMLAttributes';\nimport {\n PropForm,\n PropSize,\n PropStatus,\n PropView,\n RenderItemProps,\n} from '../SelectComponents/types';\n\nexport type SelectItemDefault = {\n label: string;\n id: string | number;\n groupId?: string | number;\n disabled?: boolean;\n};\n\nexport type SelectGroupDefault = {\n label: string;\n id: string | number;\n};\n\ntype SelectPropValue<ITEM> = ITEM | null | undefined;\n\ntype SelectRenderValueProps<ITEM> = {\n item: ITEM;\n};\n\nexport type SelectPropGetItemLabel<ITEM> = (item: ITEM) => string;\nexport type SelectPropGetItemKey<ITEM> = (item: ITEM) => string | number;\nexport type SelectPropGetItemGroupKey<ITEM> = (\n item: ITEM,\n) => string | number | undefined;\nexport type SelectPropGetItemDisabled<ITEM> = (\n item: ITEM,\n) => boolean | undefined;\nexport type SelectPropGetGroupKey<GROUP> = (group: GROUP) => string | number;\nexport type SelectPropGetGroupLabel<GROUP> = (group: GROUP) => string;\nexport type PropRenderItem<ITEM> = (\n props: RenderItemProps<ITEM>,\n) => React.ReactNode | null;\nexport type PropRenderValue<ITEM> = (\n props: SelectRenderValueProps<ITEM>,\n) => React.ReactNode | null;\n\nexport type SelectPropOnChange<ITEM> = (\n value: ITEM | null,\n props: { e: React.SyntheticEvent },\n) => void;\n\nexport type SelectProps<\n ITEM = SelectItemDefault,\n GROUP = SelectGroupDefault,\n> = PropsWithHTMLAttributesAndRef<\n {\n items: ITEM[];\n onChange: SelectPropOnChange<ITEM>;\n disabled?: boolean;\n form?: PropForm;\n dropdownForm?: 'default' | 'brick' | 'round';\n size?: PropSize;\n view?: PropView;\n status?: PropStatus;\n focused?: boolean;\n placeholder?: string;\n ariaLabel?: string;\n dropdownClassName?: string;\n dropdownRef?: React.RefObject<HTMLDivElement>;\n required?: boolean;\n name?: string;\n isLoading?: boolean;\n labelForEmptyItems?: string;\n value?: SelectPropValue<ITEM>;\n renderItem?: PropRenderItem<ITEM>;\n renderValue?: PropRenderValue<ITEM>;\n onFocus?: React.FocusEventHandler<HTMLInputElement>;\n onBlur?: React.FocusEventHandler<HTMLInputElement>;\n inputRef?: React.RefObject<HTMLInputElement>;\n groups?: GROUP[];\n getItemLabel?: SelectPropGetItemLabel<ITEM>;\n getItemKey?: SelectPropGetItemKey<ITEM>;\n getItemGroupKey?: SelectPropGetItemGroupKey<ITEM>;\n getItemDisabled?: SelectPropGetItemDisabled<ITEM>;\n getGroupLabel?: SelectPropGetGroupLabel<GROUP>;\n getGroupKey?: SelectPropGetGroupKey<GROUP>;\n label?: string;\n labelIcon?: IconComponent;\n labelPosition?: 'top' | 'left';\n caption?: string;\n virtualScroll?: boolean;\n onScrollToBottom?: (length: number) => void;\n onDropdownOpen?: (isOpen: boolean) => void;\n dropdownOpen?: boolean;\n ignoreOutsideClicksRefs?: ReadonlyArray<React.RefObject<HTMLElement>>;\n },\n HTMLDivElement\n> &\n (ITEM extends { label: SelectItemDefault['label'] }\n ? {}\n : { getItemLabel: SelectPropGetItemLabel<ITEM> }) &\n (ITEM extends { id: SelectItemDefault['id'] }\n ? {}\n : { getItemKey: SelectPropGetItemKey<ITEM> }) &\n (GROUP extends { label: SelectGroupDefault['label'] }\n ? {}\n : { getGroupLabel: SelectPropGetGroupLabel<GROUP> }) &\n (GROUP extends { id: SelectGroupDefault['id'] }\n ? {}\n : { getGroupKey: SelectPropGetGroupKey<GROUP> });\n\nexport type SelectComponent = <\n ITEM = SelectItemDefault,\n GROUP = SelectGroupDefault,\n>(\n props: SelectProps<ITEM, GROUP>,\n) => React.ReactNode | null;\n\nexport const defaultGetItemKey: SelectPropGetItemKey<SelectItemDefault> = (\n item,\n) => item.id;\nexport const defaultGetItemLabel: SelectPropGetItemLabel<SelectItemDefault> = (\n item,\n) => item.label;\nexport const defaultGetItemGroupKey: SelectPropGetItemGroupKey<\n SelectItemDefault\n> = (item) => item.groupId;\nexport const defaultGetItemDisabled: SelectPropGetItemDisabled<\n SelectItemDefault\n> = (item) => item.disabled;\n\nexport const defaultGetGroupKey: SelectPropGetGroupKey<SelectGroupDefault> = (\n group,\n) => group.id;\nexport const defaultGetGroupLabel: SelectPropGetGroupLabel<\n SelectGroupDefault\n> = (group) => group.label;\n\nexport function withDefaultGetters<ITEM, GROUP>(\n props: SelectProps<ITEM, GROUP>,\n) {\n return {\n ...props,\n getItemLabel: props.getItemLabel || defaultGetItemLabel,\n getItemKey: props.getItemKey || defaultGetItemKey,\n getItemGroupKey: props.getItemGroupKey || defaultGetItemGroupKey,\n getItemDisabled: props.getItemDisabled || defaultGetItemDisabled,\n getGroupLabel: props.getGroupLabel || defaultGetGroupLabel,\n getGroupKey: props.getGroupKey || defaultGetGroupKey,\n };\n}\n\nexport const iconSizeMap: Record<PropSize, IconPropSize> = {\n xs: 'xs',\n s: 's',\n m: 'm',\n l: 'm',\n};\n"],"mappings":"qqBAuHA,MAAO,IAAMA,kBAA0D,CAAG,SACxEC,CADwE,QAErEA,EAAI,CAACC,EAFgE,CAAnE,CAGP,MAAO,IAAMC,oBAA8D,CAAG,SAC5EF,CAD4E,QAEzEA,EAAI,CAACG,KAFoE,CAAvE,CAGP,MAAO,IAAMC,uBAEZ,CAAG,SAACJ,CAAD,QAAUA,EAAI,CAACK,OAAf,CAFG,CAGP,MAAO,IAAMC,uBAEZ,CAAG,SAACN,CAAD,QAAUA,EAAI,CAACO,QAAf,CAFG,CAIP,MAAO,IAAMC,mBAA6D,CAAG,SAC3EC,CAD2E,QAExEA,EAAK,CAACR,EAFkE,CAAtE,CAGP,MAAO,IAAMS,qBAEZ,CAAG,SAACD,CAAD,QAAWA,EAAK,CAACN,KAAjB,CAFG,CAIP,MAAO,SAASQ,mBAAT,CACLC,CADK,CAEL,CACA,sCACKA,CADL,MAEEC,YAAY,CAAED,CAAK,CAACC,YAAN,EAAsBX,mBAFtC,CAGEY,UAAU,CAAEF,CAAK,CAACE,UAAN,EAAoBf,iBAHlC,CAIEgB,eAAe,CAAEH,CAAK,CAACG,eAAN,EAAyBX,sBAJ5C,CAKEY,eAAe,CAAEJ,CAAK,CAACI,eAAN,EAAyBV,sBAL5C,CAMEW,aAAa,CAAEL,CAAK,CAACK,aAAN,EAAuBP,oBANxC,CAOEQ,WAAW,CAAEN,CAAK,CAACM,WAAN,EAAqBV,kBAPpC,EASD,CAED,MAAO,IAAMW,YAA2C,CAAG,CACzDC,EAAE,CAAE,IADqD,CAEzDC,CAAC,CAAE,GAFsD,CAGzDC,CAAC,CAAE,GAHsD,CAIzDC,CAAC,CAAE,GAJsD,CAApD"}
|