@moysklad/uikit 28.1.0 → 31.20.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/README.md +11 -3
- package/dist/colorVariables.css +33 -1
- package/dist/components/AutoComplete/AutoComplete.d.ts +4 -2
- package/dist/components/AutoComplete/AutoComplete.js +47 -33
- package/dist/components/Badge/Badge.js +2 -3
- package/dist/components/Badge/Badge_module.css +2 -3
- package/dist/components/BentoBlock/BentoBlock.d.ts +15 -0
- package/dist/components/BentoBlock/BentoBlock.js +20 -0
- package/dist/components/BentoBlock/BentoBlock.module.js +9 -0
- package/dist/components/BentoBlock/BentoBlock_module.css +50 -0
- package/dist/components/BentoBlock/consts.d.ts +14 -0
- package/dist/components/BentoBlock/consts.js +15 -0
- package/dist/components/BottomSheet/BottomSheet.js +2 -2
- package/dist/components/Breadcrumbs/BreadcrumbItem.d.ts +5 -3
- package/dist/components/Breadcrumbs/BreadcrumbItem.js +39 -8
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +4 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.js +10 -6
- package/dist/components/Button/Button.d.ts +6 -2
- package/dist/components/Button/Button.js +29 -20
- package/dist/components/Button/Button.module.js +1 -0
- package/dist/components/Button/Button_module.css +20 -14
- package/dist/components/Carousel/Carousel.js +5 -4
- package/dist/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/Chip/Chip.helpers.js +5 -2
- package/dist/components/Chip/Chip.js +9 -3
- package/dist/components/Chip/Chip.legacy_module.css +2 -2
- package/dist/components/Chip/Chip.types.d.ts +10 -4
- package/dist/components/Chip/Chip_module.css +5 -5
- package/dist/components/Chip/components/ChipLabel.d.ts +3 -1
- package/dist/components/Chip/components/ChipLabel.js +4 -2
- package/dist/components/Chip/components/ChipMainButton.d.ts +3 -4
- package/dist/components/Chip/components/ChipMainButton.js +2 -1
- package/dist/components/Chip/components/ChipRoot.d.ts +3 -2
- package/dist/components/Chip/components/ChipRoot.js +2 -1
- package/dist/components/DateRange/ArrowButton/ArrowButton.module.js +6 -0
- package/dist/components/DateRange/ArrowButton/ArrowButton_module.css +26 -0
- package/dist/components/DateRange/ArrowButton/index.d.ts +8 -0
- package/dist/components/DateRange/ArrowButton/index.js +23 -0
- package/dist/components/DateRange/Calendar/index.d.ts +12 -0
- package/dist/components/DateRange/Calendar/index.js +22 -0
- package/dist/components/DateRange/DateRange.d.ts +6 -0
- package/dist/components/DateRange/DateRange.js +51 -0
- package/dist/components/DateRange/DateRangeDefaultTrigger/DateRangeDefaultTrigger.d.ts +44 -0
- package/dist/components/DateRange/DateRangeDefaultTrigger/DateRangeDefaultTrigger.js +128 -0
- package/dist/components/DateRange/DateRangeDefaultTrigger/DateRangeDefaultTrigger.module.js +19 -0
- package/dist/components/DateRange/DateRangeDefaultTrigger/DateRangeDefaultTrigger_module.css +170 -0
- package/dist/components/DateRange/DateRangeDefaultTrigger.module.js +12 -0
- package/dist/components/DateRange/DateRangeDefaultTrigger_module.css +43 -0
- package/dist/components/DateRange/DateRangeInput/DateRangeInput.d.ts +4 -0
- package/dist/components/DateRange/DateRangeInput/DateRangeInput.js +69 -0
- package/dist/components/DateRange/Day/Day.module.js +16 -0
- package/dist/components/DateRange/Day/Day_module.css +80 -0
- package/dist/components/DateRange/Day/index.d.ts +12 -0
- package/dist/components/DateRange/Day/index.js +39 -0
- package/dist/components/DateRange/DropdownContent/DropdownContent.module.js +10 -0
- package/dist/components/DateRange/DropdownContent/DropdownContent_module.css +34 -0
- package/dist/components/DateRange/DropdownContent/index.d.ts +24 -0
- package/dist/components/DateRange/DropdownContent/index.js +132 -0
- package/dist/components/DateRange/InputContent/InputContent.module.js +9 -0
- package/dist/components/DateRange/InputContent/InputContent_module.css +31 -0
- package/dist/components/DateRange/InputContent/index.d.ts +12 -0
- package/dist/components/DateRange/InputContent/index.js +59 -0
- package/dist/components/DateRange/Month/Month.module.js +7 -0
- package/dist/components/DateRange/Month/Month_module.css +17 -0
- package/dist/components/DateRange/Month/index.d.ts +15 -0
- package/dist/components/DateRange/Month/index.js +158 -0
- package/dist/components/DateRange/Month/utils.d.ts +2 -0
- package/dist/components/DateRange/Month/utils.js +8 -0
- package/dist/components/DateRange/MonthHeader/MonthHeader.module.js +5 -0
- package/dist/components/DateRange/MonthHeader/MonthHeader_module.css +10 -0
- package/dist/components/DateRange/MonthHeader/index.d.ts +5 -0
- package/dist/components/DateRange/MonthHeader/index.js +26 -0
- package/dist/components/DateRange/MonthList/MonthList.module.js +7 -0
- package/dist/components/DateRange/MonthList/MonthList_module.css +25 -0
- package/dist/components/DateRange/MonthList/index.d.ts +11 -0
- package/dist/components/DateRange/MonthList/index.js +91 -0
- package/dist/components/DateRange/PeriodVariantList/PeriodVariantList.module.js +9 -0
- package/dist/components/DateRange/PeriodVariantList/PeriodVariantList_module.css +18 -0
- package/dist/components/DateRange/PeriodVariantList/index.d.ts +18 -0
- package/dist/components/DateRange/PeriodVariantList/index.js +83 -0
- package/dist/components/DateRange/SideMenu/SideMenu.module.js +6 -0
- package/dist/components/DateRange/SideMenu/SideMenu_module.css +18 -0
- package/dist/components/DateRange/SideMenu/index.d.ts +13 -0
- package/dist/components/DateRange/SideMenu/index.js +73 -0
- package/dist/components/DateRange/TooltipedText/index.d.ts +8 -0
- package/dist/components/DateRange/TooltipedText/index.js +30 -0
- package/dist/components/DateRange/Year/Year.module.js +11 -0
- package/dist/components/DateRange/Year/Year_module.css +60 -0
- package/dist/components/DateRange/Year/index.d.ts +8 -0
- package/dist/components/DateRange/Year/index.js +47 -0
- package/dist/components/DateRange/YearsList/YearsList.module.js +5 -0
- package/dist/components/DateRange/YearsList/YearsList_module.css +15 -0
- package/dist/components/DateRange/YearsList/index.d.ts +12 -0
- package/dist/components/DateRange/YearsList/index.js +47 -0
- package/dist/components/DateRange/consts.d.ts +20 -0
- package/dist/components/DateRange/consts.js +81 -0
- package/dist/components/DateRange/formatDateRangeValue.d.ts +24 -0
- package/dist/components/DateRange/formatDateRangeValue.js +116 -0
- package/dist/components/DateRange/hooks/useCalendar.d.ts +13 -0
- package/dist/components/DateRange/hooks/useCalendar.js +88 -0
- package/dist/components/DateRange/hooks/useDateRange.d.ts +392 -0
- package/dist/components/DateRange/hooks/useDateRange.js +36 -0
- package/dist/components/DateRange/hooks/useDateRangeDropdown.d.ts +47 -0
- package/dist/components/DateRange/hooks/useDateRangeDropdown.js +117 -0
- package/dist/components/DateRange/hooks/useDateRangeValue.d.ts +56 -0
- package/dist/components/DateRange/hooks/useDateRangeValue.js +173 -0
- package/dist/components/DateRange/hooks/useMaskInput.d.ts +18 -0
- package/dist/components/DateRange/hooks/useMaskInput.js +169 -0
- package/dist/components/DateRange/hooks/useMonthList.d.ts +12 -0
- package/dist/components/DateRange/hooks/useMonthList.js +80 -0
- package/dist/components/DateRange/hooks/useSideMenu.d.ts +14 -0
- package/dist/components/DateRange/hooks/useSideMenu.js +113 -0
- package/dist/components/DateRange/index.d.ts +1 -0
- package/dist/components/DateRange/index.js +1 -0
- package/dist/components/DateRange/locale/en-US.d.ts +2 -0
- package/dist/components/DateRange/locale/en-US.js +82 -0
- package/dist/components/DateRange/locale/index.d.ts +4 -0
- package/dist/components/DateRange/locale/index.js +3 -0
- package/dist/components/DateRange/locale/ru-RU.d.ts +2 -0
- package/dist/components/DateRange/locale/ru-RU.js +82 -0
- package/dist/components/DateRange/locale/types.d.ts +9 -0
- package/dist/components/DateRange/locale/types.js +7 -0
- package/dist/components/DateRange/locale/useLocale.d.ts +8 -0
- package/dist/components/DateRange/locale/useLocale.js +31 -0
- package/dist/components/DateRange/props.d.ts +39 -0
- package/dist/components/DateRange/props.js +0 -0
- package/dist/components/DateRange/types.d.ts +126 -0
- package/dist/components/DateRange/types.js +13 -0
- package/dist/components/DateRange/utils.d.ts +33 -0
- package/dist/components/DateRange/utils.js +105 -0
- package/dist/components/Datepicker/Datepicker.d.ts +3 -1
- package/dist/components/Datepicker/Datepicker.js +4 -2
- package/dist/components/Dropdown/Dropdown.d.ts +2 -0
- package/dist/components/Dropdown/Dropdown.js +7 -4
- package/dist/components/Dropdown/hooks/usePosition.d.ts +2 -1
- package/dist/components/Dropdown/hooks/usePosition.js +3 -3
- package/dist/components/EditableDate/DropdownContent/DropdownContent.d.ts +9 -0
- package/dist/components/EditableDate/DropdownContent/DropdownContent.js +36 -0
- package/dist/components/EditableDate/EditableDate.d.ts +9 -0
- package/dist/components/EditableDate/EditableDate.js +142 -0
- package/dist/components/EditableDate/EditableDate.module.js +7 -0
- package/dist/components/EditableDate/EditableDate_module.css +32 -0
- package/dist/components/EditableTitle/EditableTitle.d.ts +7 -2
- package/dist/components/EditableTitle/EditableTitle.js +64 -32
- package/dist/components/EditableTitle/EditableTitle.module.js +1 -0
- package/dist/components/EditableTitle/EditableTitle_module.css +6 -0
- package/dist/components/EmptyState/EmptyState.d.ts +1 -1
- package/dist/components/EmptyStateLarge/EmptyStateLarge_module.css +2 -2
- package/dist/components/FileUploader/FileUploader.helpers.d.ts +1 -0
- package/dist/components/FileUploader/FileUploader.helpers.js +4 -1
- package/dist/components/FileUploader/FileUploader.js +3 -1
- package/dist/components/FileUploader/FileUploader.types.d.ts +1 -0
- package/dist/components/FileUploader/components/FileUploaderPreview/FileUploaderPreview.js +4 -4
- package/dist/components/Help/Help.d.ts +12 -5
- package/dist/components/Help/Help.js +22 -7
- package/dist/components/Help/Help.module.js +6 -2
- package/dist/components/Help/Help_module.css +36 -8
- package/dist/components/Hint/Hint.js +4 -5
- package/dist/components/Hint/Hint.module.js +2 -3
- package/dist/components/Hint/Hint_module.css +0 -9
- package/dist/components/Informer/Informer.d.ts +37 -0
- package/dist/components/Informer/Informer.js +36 -0
- package/dist/components/Informer/Informer.module.js +7 -0
- package/dist/components/Informer/Informer_module.css +24 -0
- package/dist/components/Input/Input.d.ts +10 -0
- package/dist/components/Input/Input.js +99 -43
- package/dist/components/Input/Input.module.js +19 -3
- package/dist/components/Input/Input_module.css +156 -19
- package/dist/components/Input/components/InfoBlock.d.ts +14 -0
- package/dist/components/Input/components/InfoBlock.js +32 -0
- package/dist/components/InputUnit/InputUnit.d.ts +3 -0
- package/dist/components/InputUnit/InputUnit.js +45 -35
- package/dist/components/InputUnit/InputUnit.module.js +6 -1
- package/dist/components/InputUnit/InputUnit_module.css +27 -29
- package/dist/components/InputUnit/SelectUnit/SelectUnit.d.ts +1 -1
- package/dist/components/InputUnit/SelectUnit/SelectUnit.js +1 -4
- package/dist/components/InputUnit/SelectUnit/SelectUnit.module.js +1 -0
- package/dist/components/InputUnit/SelectUnit/SelectUnitVisible.d.ts +1 -1
- package/dist/components/InputUnit/SelectUnit/SelectUnitVisible.js +7 -2
- package/dist/components/InputUnit/SelectUnit/SelectUnit_module.css +29 -37
- package/dist/components/InputUnit/SelectUnit/type.d.ts +1 -0
- package/dist/components/InputUnit/Unit/Unit.js +1 -2
- package/dist/components/InputUnit/Unit/Unit_module.css +1 -0
- package/dist/components/Label/Label.d.ts +1 -0
- package/dist/components/LabelValue/LabelValue.d.ts +14 -10
- package/dist/components/LabelValue/LabelValue.js +59 -72
- package/dist/components/LabelValue/LabelValue.module.js +7 -4
- package/dist/components/LabelValue/LabelValue_module.css +36 -19
- package/dist/components/LabelValue/ValueBlock/ValueBlock.d.ts +2 -0
- package/dist/components/LabelValue/ValueBlock/ValueBlock.js +82 -0
- package/dist/components/LabelValue/ValueBlockWrapper.d.ts +5 -0
- package/dist/components/LabelValue/ValueBlockWrapper.js +13 -0
- package/dist/components/LabelValue/ValueIcon.d.ts +4 -0
- package/dist/components/LabelValue/ValueIcon.js +9 -0
- package/dist/components/LabelValue/ValueText.d.ts +10 -0
- package/dist/components/LabelValue/ValueText.js +24 -0
- package/dist/components/LabelValue/ValueTextWithHint.d.ts +12 -0
- package/dist/components/LabelValue/ValueTextWithHint.js +29 -0
- package/dist/components/LabelValue/hooks/useValueBlock.d.ts +29 -0
- package/dist/components/LabelValue/hooks/useValueBlock.js +72 -0
- package/dist/components/LabelValue/{ValueBlock/index.d.ts → types.d.ts} +8 -4
- package/dist/components/LabelValue/types.js +0 -0
- package/dist/components/LabelValueCheckbox/LabelValueCheckbox.d.ts +10 -0
- package/dist/components/LabelValueCheckbox/LabelValueCheckbox.js +22 -0
- package/dist/components/LabelValueCheckbox/LabelValueCheckbox.module.js +5 -0
- package/dist/components/LabelValueCheckbox/LabelValueCheckbox_module.css +5 -0
- package/dist/components/LabelValueDate/LabelValueDate.js +2 -2
- package/dist/components/LabelValueFile/DeleteButton/DeleteButton.d.ts +9 -0
- package/dist/components/LabelValueFile/DeleteButton/DeleteButton.js +17 -0
- package/dist/components/LabelValueFile/FilePreviewIcon/FilePreviewIcon.d.ts +7 -0
- package/dist/components/LabelValueFile/FilePreviewIcon/FilePreviewIcon.js +15 -0
- package/dist/components/LabelValueFile/FilePreviewIcon/FilePreviewIcon.module.js +6 -0
- package/dist/components/LabelValueFile/FilePreviewIcon/FilePreviewIcon_module.css +10 -0
- package/dist/components/LabelValueFile/ImagePreview/ImagePreview.d.ts +8 -0
- package/dist/components/LabelValueFile/ImagePreview/ImagePreview.js +53 -0
- package/dist/components/LabelValueFile/ImagePreview/ImagePreview.module.js +6 -0
- package/dist/components/LabelValueFile/ImagePreview/ImagePreview_module.css +13 -0
- package/dist/components/LabelValueFile/LabelValueFile.d.ts +7 -0
- package/dist/components/LabelValueFile/LabelValueFile.js +42 -0
- package/dist/components/LabelValueFile/LabelValueFile.module.js +12 -0
- package/dist/components/LabelValueFile/LabelValueFile_module.css +57 -0
- package/dist/components/LabelValueFile/ValueBlock/ValueBlock.d.ts +15 -0
- package/dist/components/LabelValueFile/ValueBlock/ValueBlock.js +130 -0
- package/dist/components/LabelValueFile/ValueBlock/ValueBlock.module.js +7 -0
- package/dist/components/LabelValueFile/ValueBlock/ValueBlock_module.css +17 -0
- package/dist/components/LabelValueInput/DropdownConnent/DropdownContent.d.ts +2 -0
- package/dist/components/LabelValueInput/DropdownConnent/DropdownContent.js +2 -0
- package/dist/components/LabelValueLink/LabelValueLink.d.ts +2 -0
- package/dist/components/LabelValueLink/LabelValueLink.js +76 -0
- package/dist/components/LabelValueLink/LabelValueLink.module.js +6 -0
- package/dist/components/LabelValueLink/LabelValueLink_module.css +11 -0
- package/dist/components/LabelValueLink/ValueBlock/LabelValueLinkValueBlock.d.ts +2 -0
- package/dist/components/LabelValueLink/ValueBlock/LabelValueLinkValueBlock.js +117 -0
- package/dist/components/LabelValueLink/ValueBlock/LabelValueLinkValueBlock.module.js +6 -0
- package/dist/components/LabelValueLink/ValueBlock/LabelValueLinkValueBlock_module.css +8 -0
- package/dist/components/LabelValueLink/normalizeLinkValue.d.ts +1 -0
- package/dist/components/LabelValueLink/normalizeLinkValue.js +10 -0
- package/dist/components/LabelValueLink/useLinkDropdownValue.d.ts +15 -0
- package/dist/components/LabelValueLink/useLinkDropdownValue.js +26 -0
- package/dist/components/LabelValueSelect/Input/Input_module.css +1 -3
- package/dist/components/LabelValueSelect/Input/index.js +1 -1
- package/dist/components/LabelValueSelect/LabelValueSelect.d.ts +4 -2
- package/dist/components/Layout/Layout.d.ts +13 -0
- package/dist/components/Layout/Layout.js +41 -0
- package/dist/components/Layout/Layout.module.js +15 -0
- package/dist/components/Layout/Layout_module.css +77 -0
- package/dist/components/Link/Link.d.ts +5 -6
- package/dist/components/Link/Link.js +35 -9
- package/dist/components/Link/Link.module.js +1 -0
- package/dist/components/Link/Link_module.css +9 -0
- package/dist/components/MentionsTextfield/Mentions/style.css +2 -6
- package/dist/components/MentionsTextfield/MentionsTextfield.d.ts +1 -1
- package/dist/components/MentionsTextfield/MentionsTextfield.js +42 -25
- package/dist/components/Multiselect/AllSelectedChip/AllSelectedChip.d.ts +8 -0
- package/dist/components/Multiselect/AllSelectedChip/AllSelectedChip.js +13 -0
- package/dist/components/Multiselect/AllSelectedChip/AllSelectedChip.module.js +5 -0
- package/dist/components/Multiselect/AllSelectedChip/AllSelectedChip_module.css +9 -0
- package/dist/components/Multiselect/DropdownContent/MultiselectDropdownContent.d.ts +12 -1
- package/dist/components/Multiselect/DropdownContent/MultiselectDropdownContent.js +25 -19
- package/dist/components/Multiselect/Input/Input.d.ts +6 -2
- package/dist/components/Multiselect/Input/Input.js +18 -4
- package/dist/components/Multiselect/Input/Input_module.css +1 -3
- package/dist/components/Multiselect/Multiselect.d.ts +8 -2
- package/dist/components/Multiselect/Multiselect.js +14 -2
- package/dist/components/Multiselect/ShortDropdownContent/ShortDropdownContent.js +2 -1
- package/dist/components/Multiselect/TextField/MultiselectTextField.d.ts +5 -1
- package/dist/components/Multiselect/TextField/MultiselectTextField.js +15 -2
- package/dist/components/Multiselect/lib/consts.d.ts +1 -1
- package/dist/components/Multiselect/lib/consts.js +1 -1
- package/dist/components/Multiselect/lib/helpers.d.ts +24 -0
- package/dist/components/Multiselect/lib/helpers.js +15 -0
- package/dist/components/Multiselect/types.d.ts +2 -0
- package/dist/components/Panel/Panel.d.ts +34 -0
- package/dist/components/Panel/Panel.js +39 -0
- package/dist/components/Panel/Panel.module.js +6 -0
- package/dist/components/Panel/Panel_module.css +17 -0
- package/dist/components/Radiobutton/Radiobutton.js +1 -1
- package/dist/components/Radiobutton/Radiobutton_module.css +5 -0
- package/dist/components/SearchInput/SearchInput_module.css +1 -1
- package/dist/components/Select/ArchivedInputValue/ArchivedInputValue.d.ts +3 -4
- package/dist/components/Select/ArchivedInputValue/ArchivedInputValue.js +19 -24
- package/dist/components/Select/ArchivedInputValue/ArchivedInputValue.module.js +1 -2
- package/dist/components/Select/ArchivedInputValue/ArchivedInputValue_module.css +5 -12
- package/dist/components/Select/Combobox/Combobox.d.ts +3 -1
- package/dist/components/Select/Combobox/Combobox.js +19 -8
- package/dist/components/Select/Combobox/Combobox.module.js +4 -3
- package/dist/components/Select/Combobox/Combobox_module.css +17 -15
- package/dist/components/Select/DropDownWithColors/DropDownWithColors.d.ts +1 -0
- package/dist/components/Select/DropDownWithColors/DropDownWithColors.js +2 -1
- package/dist/components/Select/DropdownActionsContainer/DropdownActionsContainer.d.ts +3 -0
- package/dist/components/Select/DropdownActionsContainer/DropdownActionsContainer.js +17 -0
- package/dist/components/Select/DropdownActionsContainer/DropdownActionsContainer.module.js +6 -0
- package/dist/components/Select/DropdownActionsContainer/DropdownActionsContainer_module.css +12 -0
- package/dist/components/Select/OptionsList/OptionsList.d.ts +4 -1
- package/dist/components/Select/OptionsList/OptionsList.js +39 -22
- package/dist/components/Select/OptionsList/OptionsList.module.js +2 -0
- package/dist/components/Select/OptionsList/OptionsList_module.css +19 -0
- package/dist/components/Select/Select.d.ts +10 -5
- package/dist/components/Select/Select.js +45 -40
- package/dist/components/Select/Select.module.js +1 -2
- package/dist/components/Select/Select_module.css +7 -14
- package/dist/components/Select/ShortVariant/ShortVariant.d.ts +5 -1
- package/dist/components/Select/ShortVariant/ShortVariant.js +6 -5
- package/dist/components/Select/ShortVariant/ShortVariant.module.js +1 -0
- package/dist/components/Select/ShortVariant/ShortVariant_module.css +5 -1
- package/dist/components/Select/types.d.ts +1 -0
- package/dist/components/Select/useDropdownPadding.d.ts +5 -0
- package/dist/components/Select/useDropdownPadding.js +22 -0
- package/dist/components/StatusBadge/StatusBadge.d.ts +28 -0
- package/dist/components/StatusBadge/StatusBadge.js +167 -0
- package/dist/components/StatusBadge/StatusBadge.module.js +37 -0
- package/dist/components/StatusBadge/StatusBadge_module.css +149 -0
- package/dist/components/StatusBadge/utils/StatusBadgeColor.d.ts +21 -0
- package/dist/components/StatusBadge/utils/StatusBadgeColor.js +20 -0
- package/dist/components/StatusBadge/utils/getStatusBadgeColor.d.ts +2 -0
- package/dist/components/StatusBadge/utils/getStatusBadgeColor.js +8 -0
- package/dist/components/Textfield/Textfield.d.ts +24 -3
- package/dist/components/Textfield/Textfield.js +38 -13
- package/dist/components/Textfield/Textfield.module.js +2 -1
- package/dist/components/Textfield/Textfield_module.css +95 -23
- package/dist/components/Textfield/components/ActionButton/ActionButton.d.ts +9 -0
- package/dist/components/Textfield/components/ActionButton/ActionButton.js +12 -0
- package/dist/components/Textfield/components/ActionButton/ActionButton.module.js +9 -0
- package/dist/components/Textfield/components/ActionButton/ActionButton_module.css +54 -0
- package/dist/components/Textfield/components/ActionButton/index.d.ts +1 -0
- package/dist/components/Textfield/components/ActionButton/index.js +1 -0
- package/dist/components/Textfield/components/Container/Container.d.ts +2 -0
- package/dist/components/Textfield/components/Container/Container.js +21 -7
- package/dist/components/Textfield/components/Container/Container.module.js +2 -1
- package/dist/components/Textfield/components/Container/Container_module.css +4 -0
- package/dist/components/Textfield/components/Counter/Counter.d.ts +3 -1
- package/dist/components/Textfield/components/Counter/Counter.js +5 -3
- package/dist/components/Textfield/components/Info/Info.d.ts +3 -1
- package/dist/components/Textfield/components/Info/Info.js +9 -4
- package/dist/components/Textfield/components/InnerContainer/InnerContainer.d.ts +3 -6
- package/dist/components/Textfield/components/InnerContainer/InnerContainer.js +2 -8
- package/dist/components/Textfield/components/InputContainer/InputContainer.d.ts +14 -3
- package/dist/components/Textfield/components/InputContainer/InputContainer.js +74 -5
- package/dist/components/Textfield/components/InputContainer/InputContainer.module.js +7 -1
- package/dist/components/Textfield/components/InputContainer/InputContainer_module.css +36 -7
- package/dist/components/Textfield/components/ResizeHandle/ResizeHandle.d.ts +10 -0
- package/dist/components/Textfield/components/ResizeHandle/ResizeHandle.js +50 -0
- package/dist/components/Textfield/components/ResizeHandle/ResizeHandle.module.js +7 -0
- package/dist/components/Textfield/components/ResizeHandle/ResizeHandle_module.css +21 -0
- package/dist/components/Textfield/components/ResizeHandle/index.d.ts +1 -0
- package/dist/components/Textfield/components/ResizeHandle/index.js +1 -0
- package/dist/components/Textfield/consts/index.d.ts +2 -0
- package/dist/components/Textfield/consts/index.js +3 -0
- package/dist/components/Textfield/types/index.d.ts +12 -0
- package/dist/components/Textfield/types/index.js +5 -0
- package/dist/components/Textfield/utils/index.d.ts +3 -0
- package/dist/components/Textfield/utils/index.js +8 -0
- package/dist/components/Toggle/Toggle.js +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +4 -1
- package/dist/components/Tooltip/Tooltip.js +9 -9
- package/dist/components/Tooltip/Tooltip.module.js +3 -1
- package/dist/components/Tooltip/Tooltip_module.css +13 -3
- package/dist/components/Tooltip/{consts.d.ts → constants/ArrowAlign.d.ts} +0 -2
- package/dist/components/Tooltip/constants/TooltipBodyColor.d.ts +4 -0
- package/dist/components/Tooltip/constants/TooltipBodyColor.js +5 -0
- package/dist/components/Tooltip/constants/index.d.ts +2 -0
- package/dist/components/Tooltip/constants/index.js +2 -0
- package/dist/components/Tooltip/hooks.d.ts +2 -2
- package/dist/components/Tooltip/hooks.js +1 -1
- package/dist/components/Tooltip/types.d.ts +4 -0
- package/dist/components/Tooltip/types.js +0 -0
- package/dist/components/ViewersStack/ViewersStack.d.ts +13 -0
- package/dist/components/ViewersStack/ViewersStack.js +79 -0
- package/dist/components/ViewersStack/ViewersStack.module.js +7 -0
- package/dist/components/ViewersStack/ViewersStack_module.css +18 -0
- package/dist/components/ViewersStack/components/Avatar/Avatar.d.ts +13 -0
- package/dist/components/ViewersStack/components/Avatar/Avatar.js +35 -0
- package/dist/components/ViewersStack/components/Avatar/Avatar.module.js +13 -0
- package/dist/components/ViewersStack/components/Avatar/Avatar_module.css +45 -0
- package/dist/components/ViewersStack/components/Counter/Counter.d.ts +9 -0
- package/dist/components/ViewersStack/components/Counter/Counter.js +27 -0
- package/dist/components/ViewersStack/components/Counter/Counter.module.js +5 -0
- package/dist/components/ViewersStack/components/Counter/Counter_module.css +20 -0
- package/dist/components/ViewersStack/components/ViewersTooltip/ViewersTooltip.d.ts +15 -0
- package/dist/components/ViewersStack/components/ViewersTooltip/ViewersTooltip.js +41 -0
- package/dist/components/ViewersStack/components/ViewersTooltip/ViewersTooltip.module.js +6 -0
- package/dist/components/ViewersStack/components/ViewersTooltip/ViewersTooltip_module.css +14 -0
- package/dist/components/ViewersStack/components/ViewersTooltipOverlayItem/ViewersTooltipOverlayItem.d.ts +6 -0
- package/dist/components/ViewersStack/components/ViewersTooltipOverlayItem/ViewersTooltipOverlayItem.js +53 -0
- package/dist/components/ViewersStack/components/ViewersTooltipOverlayItem/ViewersTooltipOverlayItem.module.js +7 -0
- package/dist/components/ViewersStack/components/ViewersTooltipOverlayItem/ViewersTooltipOverlayItem_module.css +18 -0
- package/dist/components/ViewersStack/components/common.module.js +7 -0
- package/dist/components/ViewersStack/components/common_module.css +27 -0
- package/dist/components/ViewersStack/types.d.ts +22 -0
- package/dist/components/ViewersStack/types.js +17 -0
- package/dist/components/ViewersStack/utils.d.ts +3 -0
- package/dist/components/ViewersStack/utils.js +17 -0
- package/dist/components/_shared/CustomDatepickerDropdownContent/CustomDatepickerDropdownContent.d.ts +12 -0
- package/dist/components/{LabelValueDate/DropdownContent/index.js → _shared/CustomDatepickerDropdownContent/CustomDatepickerDropdownContent.js} +10 -10
- package/dist/components/_shared/CustomDatepickerDropdownContent/CustomDatepickerDropdownContent.module.js +9 -0
- package/dist/components/{LabelValueDate/DropdownContent/DropdownContent_module.css → _shared/CustomDatepickerDropdownContent/CustomDatepickerDropdownContent_module.css} +6 -6
- package/dist/components/_shared/FieldLabel/FieldLabel.constants.d.ts +1 -0
- package/dist/components/_shared/FieldLabel/FieldLabel.constants.js +5 -0
- package/dist/components/_shared/FieldLabel/FieldLabel.d.ts +18 -0
- package/dist/components/_shared/FieldLabel/FieldLabel.js +83 -0
- package/dist/components/_shared/FieldLabel/FieldLabel.module.js +11 -0
- package/dist/components/_shared/FieldLabel/FieldLabel_module.css +42 -0
- package/dist/components/_shared/FieldLabel/components/HelpButton.d.ts +8 -0
- package/dist/components/_shared/FieldLabel/components/HelpButton.js +15 -0
- package/dist/components/_shared/FieldLabel/components/HelpButton.module.js +5 -0
- package/dist/components/_shared/FieldLabel/components/HelpButton_module.css +8 -0
- package/dist/components/_shared/FieldLabel/components/index.d.ts +1 -0
- package/dist/components/_shared/FieldLabel/components/index.js +1 -0
- package/dist/components/{FieldRow → _shared/FieldRow}/FieldRow.d.ts +1 -1
- package/dist/components/{FieldRow → _shared/FieldRow}/FieldRow.js +1 -1
- package/dist/components/{FieldRow → _shared/FieldRow}/FieldRow.module.js +3 -3
- package/dist/components/{FieldRow → _shared/FieldRow}/FieldRow_module.css +3 -3
- package/dist/components/{EditableTitle → _shared/HintWithSkip}/HintWithSkip.d.ts +1 -1
- package/dist/components/{EditableTitle → _shared/HintWithSkip}/HintWithSkip.js +1 -1
- package/dist/components/_shared/Info/Info.d.ts +12 -0
- package/dist/components/_shared/Info/Info.js +46 -0
- package/dist/components/_shared/Info/Info.module.js +9 -0
- package/dist/components/_shared/Info/Info_module.css +32 -0
- package/dist/components/_shared/Info/types/index.d.ts +6 -0
- package/dist/components/_shared/Info/types/index.js +5 -0
- package/dist/components/_shared/InputClear/InputClear.d.ts +14 -0
- package/dist/components/_shared/InputClear/InputClear.js +18 -0
- package/dist/components/{InputClear → _shared/InputClear}/InputClear.module.js +3 -1
- package/dist/components/_shared/InputClear/InputClear_module.css +34 -0
- package/dist/components/_shared/utils/polymorphicClickableTypes.d.ts +17 -0
- package/dist/components/_shared/utils/polymorphicClickableTypes.js +7 -0
- package/dist/data-grid/Filters/DateRangeFilter/DropdownContent/index.js +3 -3
- package/dist/data-grid/Filters/DateRangeFilter/InputContent/index.js +29 -26
- package/dist/data-grid/Filters/DateRangeFilter/PeriodVariantList/index.js +5 -3
- package/dist/data-grid/Filters/DateRangeFilter/Year/index.js +3 -3
- package/dist/data-grid/Filters/DateRangeFilter/consts.js +6 -6
- package/dist/data-grid/Filters/DateRangeFilter/hooks/useMaskInput.js +6 -6
- package/dist/data-grid/Filters/DateRangeFilter/hooks/useSideMenu.js +1 -4
- package/dist/data-grid/Filters/DateRangeFilter/types.d.ts +68 -56
- package/dist/data-grid/Filters/FiltersContainer/FiltersContainer.js +2 -1
- package/dist/data-grid/Filters/FiltersContainer/utils/useRenderParams.d.ts +1 -0
- package/dist/data-grid/Filters/FiltersContainer/utils/useRenderParams.js +14 -6
- package/dist/data-grid/Filters/MultiselectFilter/MultiselectFilter.js +2 -2
- package/dist/data-grid/Filters/OutlineInput/OutlineInput.js +2 -2
- package/dist/data-grid/Filters/OutlineInput/OutlineInput_module.css +1 -1
- package/dist/data-grid/Table/Table.d.ts +14 -22
- package/dist/data-grid/Table/Table.js +99 -61
- package/dist/data-grid/Table/Table.module.js +2 -0
- package/dist/data-grid/Table/Table_module.css +23 -1
- package/dist/data-grid/Table/components/Body/Body.d.ts +10 -14
- package/dist/data-grid/Table/components/Body/Body.js +11 -47
- package/dist/data-grid/Table/components/DraggableRow/DraggableRow.js +1 -1
- package/dist/data-grid/Table/components/Footer/Footer.module.js +0 -1
- package/dist/data-grid/Table/components/Footer/FooterContent.d.ts +9 -0
- package/dist/data-grid/Table/components/Footer/{Footer.js → FooterContent.js} +4 -5
- package/dist/data-grid/Table/components/Footer/Footer_module.css +0 -5
- package/dist/data-grid/Table/components/Header/Header.module.js +0 -1
- package/dist/data-grid/Table/components/Header/HeaderCell.js +3 -1
- package/dist/data-grid/Table/components/Header/HeaderContent.d.ts +1 -0
- package/dist/data-grid/Table/components/Header/{Header.js → HeaderContent.js} +8 -6
- package/dist/data-grid/Table/components/Header/Header_module.css +0 -15
- package/dist/data-grid/Table/components/Row/Row.d.ts +13 -0
- package/dist/data-grid/Table/components/Row/Row.js +40 -0
- package/dist/data-grid/Table/components/Row/Row.module.js +14 -0
- package/dist/data-grid/Table/components/{TableRow/TableRow_module.css → Row/Row_module.css} +7 -7
- package/dist/data-grid/Table/components/SubRows/SubRows.d.ts +5 -4
- package/dist/data-grid/Table/components/SubRows/SubRows.js +3 -3
- package/dist/data-grid/Table/components/TableCell/TableCell.js +2 -0
- package/dist/data-grid/Table/components/TableDragOverlay/TableDragOverlay.d.ts +5 -6
- package/dist/data-grid/Table/components/TableDragOverlay/TableDragOverlay.js +2 -2
- package/dist/data-grid/Table/components/TableRow/TableRow.d.ts +6 -14
- package/dist/data-grid/Table/components/TableRow/TableRow.js +34 -25
- package/dist/data-grid/Table/components/VirtualTable/VirtualTable.d.ts +10 -0
- package/dist/data-grid/Table/components/VirtualTable/VirtualTable.js +78 -0
- package/dist/data-grid/Table/components/VirtualTable/VirtualTableRow.d.ts +11 -0
- package/dist/data-grid/Table/components/VirtualTable/VirtualTableRow.js +18 -0
- package/dist/data-grid/Table/components/index.d.ts +3 -3
- package/dist/data-grid/Table/components/index.js +2 -2
- package/dist/data-grid/Table/constants.d.ts +2 -0
- package/dist/data-grid/Table/constants.js +3 -1
- package/dist/data-grid/Table/hooks/index.d.ts +1 -0
- package/dist/data-grid/Table/hooks/index.js +1 -0
- package/dist/data-grid/Table/hooks/useRowContext.d.ts +16 -0
- package/dist/data-grid/Table/hooks/useRowContext.js +44 -0
- package/dist/data-grid/Table/hooks/useTableContext.d.ts +7 -2
- package/dist/data-grid/Table/hooks/useTableContext.js +12 -2
- package/dist/data-grid/Table/index.d.ts +2 -2
- package/dist/data-grid/Table/types.d.ts +8 -1
- package/dist/data-grid/Table/types.js +5 -0
- package/dist/data-grid/Table/utils/compareColumnIds.d.ts +1 -0
- package/dist/data-grid/Table/utils/compareColumnIds.js +6 -0
- package/dist/data-grid/Table/utils/getColumnWidthStyles.d.ts +5 -0
- package/dist/data-grid/Table/utils/getColumnWidthStyles.js +4 -1
- package/dist/data-grid/Table/utils/getTableColumnIds.d.ts +3 -0
- package/dist/data-grid/Table/utils/getTableColumnIds.js +5 -0
- package/dist/data-grid/Table/utils/index.d.ts +2 -0
- package/dist/data-grid/Table/utils/index.js +2 -0
- package/dist/data-grid/Table/utils/withDnD.js +1 -1
- package/dist/data-grid/base/DropdownItem/DropdownItem.d.ts +3 -3
- package/dist/data-grid/base/DropdownItem/DropdownItem.js +3 -2
- package/dist/data-grid/base/OverflowHint/OverflowHint.d.ts +1 -0
- package/dist/data-grid/base/OverflowHint/OverflowHint.js +5 -3
- package/dist/data-grid/base/OverflowHint/utils.d.ts +1 -0
- package/dist/data-grid/base/OverflowHint/utils.js +7 -0
- package/dist/data-grid/cells/AutoCompleteCell/AutoCompleteCell.js +3 -4
- package/dist/data-grid/cells/DecimalCell/DecimalCell_module.css +1 -1
- package/dist/data-grid/cells/FileCell/FileCell_module.css +1 -1
- package/dist/data-grid/cells/ImageCell/ImageCell.d.ts +1 -0
- package/dist/data-grid/cells/ImageCell/ImageCell.js +5 -2
- package/dist/data-grid/cells/ImageCell/ImageMiniature/ImageMiniature_module.css +1 -1
- package/dist/data-grid/cells/IndexCheckboxDndCell/IndexCheckboxDndCell.d.ts +7 -2
- package/dist/data-grid/cells/IndexCheckboxDndCell/IndexCheckboxDndCell.js +6 -4
- package/dist/data-grid/cells/InputCell/InputCell.js +3 -4
- package/dist/data-grid/cells/IntegerCell/IntegerCell_module.css +1 -1
- package/dist/data-grid/cells/LinkCell/LinkCell_module.css +1 -1
- package/dist/data-grid/cells/NameCell/NameCell.js +3 -0
- package/dist/data-grid/cells/NameCell/NameCell_module.css +2 -2
- package/dist/data-grid/cells/NumberInputCell/NumberInputCell.js +19 -17
- package/dist/data-grid/cells/SelectCell/SelectCell.js +3 -4
- package/dist/data-grid/cells/TextCell/TextCell_module.css +1 -1
- package/dist/data-grid/cells/ToggleCell/ToggleCell_module.css +1 -1
- package/dist/data-grid/cells/components/EditableCellWrapper/EditableCellWrapper.d.ts +3 -0
- package/dist/data-grid/cells/components/EditableCellWrapper/EditableCellWrapper.js +9 -0
- package/dist/data-grid/cells/components/EditableCellWrapper/EditableCellWrapper.module.js +5 -0
- package/dist/data-grid/cells/{InputCell/InputCell_module.css → components/EditableCellWrapper/EditableCellWrapper_module.css} +2 -2
- package/dist/data-grid/cells/components/EditableCellWrapper/index.d.ts +1 -0
- package/dist/data-grid/cells/components/EditableCellWrapper/index.js +1 -0
- package/dist/data-grid/cells/components/RowActionsMenu/RowActionsMenu.d.ts +4 -3
- package/dist/data-grid/cells/components/RowActionsMenu/RowActionsMenu.js +13 -13
- package/dist/data-grid/cells/components/TableInput/TableInput.js +19 -3
- package/dist/data-grid/cells/components/TableInput/TableInput_module.css +1 -1
- package/dist/data-grid/cells/components/TableNumberInput/TableNumberInput.d.ts +5 -3
- package/dist/data-grid/cells/components/TableNumberInput/TableNumberInput.js +56 -55
- package/dist/data-grid/cells/components/TableSelect/ActionButton/ActionButton.d.ts +4 -1
- package/dist/data-grid/cells/components/TableSelect/ActionButton/ActionButton.js +4 -3
- package/dist/data-grid/cells/components/TableSelect/TableSelect.d.ts +15 -10
- package/dist/data-grid/cells/components/TableSelect/TableSelect.js +13 -8
- package/dist/data-grid/cells/components/index.d.ts +1 -0
- package/dist/data-grid/cells/components/index.js +1 -0
- package/dist/data-grid/cells/index.d.ts +1 -1
- package/dist/data-grid/cells/index.js +1 -1
- package/dist/data-grid/headers/PlainTextHeader.js +3 -2
- package/dist/data-grid/headers/components/Dropdown/Dropdown.d.ts +3 -0
- package/dist/data-grid/headers/components/Dropdown/DropdownArrowBtn/DropdownArrowBtn.js +5 -1
- package/dist/data-grid/headers/components/Dropdown/Option/Option.d.ts +1 -1
- package/dist/data-grid/headers/components/Dropdown/Option/Option.js +2 -2
- package/dist/data-grid/headers/components/Dropdown/Option/Option_module.css +10 -2
- package/dist/data-grid/headers/components/HeaderBuilder/HeaderBuilder.d.ts +13 -3
- package/dist/data-grid/headers/components/HeaderBuilder/HeaderBuilder.js +65 -83
- package/dist/data-grid/headers/components/HeaderBuilder/HeaderBuilder.module.js +2 -1
- package/dist/data-grid/headers/components/HeaderBuilder/HeaderBuilder_module.css +21 -0
- package/dist/data-grid/headers/components/HeaderSortGroups/components/SortByOption/SortByOption.js +7 -15
- package/dist/data-grid/headers/components/HideColumn/HideColumn.js +8 -13
- package/dist/data-grid/headers/components/ResetFilter/ResetFilter.js +7 -10
- package/dist/data-grid/headers/components/ResetFilter/ResetFilter.module.js +0 -1
- package/dist/data-grid/headers/components/ResetFilter/ResetFilter_module.css +1 -21
- package/dist/data-grid/headers/components/index.d.ts +1 -1
- package/dist/data-grid/headers/index.d.ts +1 -1
- package/dist/data-grid/headers/types/types.d.ts +1 -0
- package/dist/data-grid/index.d.ts +0 -4
- package/dist/data-grid/locale/en-US.js +68 -56
- package/dist/data-grid/locale/ru-RU.js +68 -56
- package/dist/data-grid/locale/useLocale.d.ts +6 -1
- package/dist/data-grid/locale/useLocale.js +14 -5
- package/dist/data-grid/types/index.d.ts +1 -0
- package/dist/data-grid/utils/isOverflowed.js +21 -1
- package/dist/hooks/useDebounceCallback/useDebounceCallback.d.ts +2 -0
- package/dist/hooks/useDebounceCallback/useDebounceCallback.js +21 -0
- package/dist/hooks/useDismissOnFocusOutside/index.d.ts +2 -1
- package/dist/hooks/useDismissOnFocusOutside/index.js +4 -3
- package/dist/hooks/useDismissOnOutsideClick/index.d.ts +2 -1
- package/dist/hooks/useDismissOnOutsideClick/index.js +4 -3
- package/dist/hooks/useIsElementOverflowing/index.d.ts +1 -0
- package/dist/hooks/useIsElementOverflowing/index.js +8 -2
- package/dist/hooks/useOverflowHint/index.d.ts +7 -0
- package/dist/hooks/useOverflowHint/index.js +16 -0
- package/dist/hooks/useTextField/useTextField.d.ts +5 -6
- package/dist/hooks/useTextField/useTextField.js +6 -24
- package/dist/hooks/useUnmount/useUnmount.d.ts +1 -0
- package/dist/hooks/useUnmount/useUnmount.js +9 -0
- package/dist/icon/components/MsLogo12Icon.d.ts +8 -0
- package/dist/icon/components/MsLogo12Icon.js +28 -0
- package/dist/icon/components/MsLogo16Icon.d.ts +8 -0
- package/dist/icon/components/MsLogo16Icon.js +26 -0
- package/dist/icon/components/MsLogo20Icon.d.ts +8 -0
- package/dist/icon/components/MsLogo20Icon.js +28 -0
- package/dist/icon/components/MyApps12Icon.d.ts +8 -0
- package/dist/icon/components/MyApps12Icon.js +18 -0
- package/dist/icon/components/MyApps16Icon.d.ts +8 -0
- package/dist/icon/components/MyApps16Icon.js +17 -0
- package/dist/icon/components/MyApps20Icon.d.ts +8 -0
- package/dist/icon/components/MyApps20Icon.js +18 -0
- package/dist/icon/components/Phone12Icon.d.ts +8 -0
- package/dist/icon/components/Phone12Icon.js +18 -0
- package/dist/icon/components/Phone16Icon.d.ts +8 -0
- package/dist/icon/components/Phone16Icon.js +17 -0
- package/dist/icon/components/Phone20Icon.d.ts +8 -0
- package/dist/icon/components/Phone20Icon.js +18 -0
- package/dist/icon/components/Smile12Icon.d.ts +8 -0
- package/dist/icon/components/Smile12Icon.js +17 -0
- package/dist/icon/components/Smile16Icon.d.ts +8 -0
- package/dist/icon/components/Smile16Icon.js +16 -0
- package/dist/icon/components/Smile20Icon.d.ts +8 -0
- package/dist/icon/components/Smile20Icon.js +17 -0
- package/dist/icon/index.d.ts +12 -0
- package/dist/icon/index.js +12 -0
- package/dist/index.d.ts +13 -5
- package/dist/index.js +11 -1
- package/dist/utils/checkIsArchivedValue.d.ts +2 -0
- package/dist/utils/checkIsArchivedValue.js +5 -0
- package/dist/utils/debounce/debounce.d.ts +10 -0
- package/dist/utils/debounce/debounce.js +73 -0
- package/dist/utils/isRecordEqual/isRecordEqual.d.ts +1 -0
- package/dist/utils/isRecordEqual/isRecordEqual.js +9 -0
- package/dist/utils/utils.d.ts +3 -0
- package/dist/utils/utils.js +3 -0
- package/package.json +88 -12
- package/dist/components/Info/Info.d.ts +0 -13
- package/dist/components/Info/Info.js +0 -20
- package/dist/components/Info/Info.module.js +0 -6
- package/dist/components/Info/Info_module.css +0 -11
- package/dist/components/InputClear/InputClear.d.ts +0 -11
- package/dist/components/InputClear/InputClear.js +0 -12
- package/dist/components/InputClear/InputClear_module.css +0 -21
- package/dist/components/LabelValue/HelpButton/HelpButton.module.js +0 -8
- package/dist/components/LabelValue/HelpButton/HelpButton_module.css +0 -44
- package/dist/components/LabelValue/HelpButton/index.d.ts +0 -8
- package/dist/components/LabelValue/HelpButton/index.js +0 -36
- package/dist/components/LabelValue/ValueBlock/index.js +0 -138
- package/dist/components/LabelValue/hooks/useTooltip.d.ts +0 -8
- package/dist/components/LabelValue/hooks/useTooltip.js +0 -16
- package/dist/components/LabelValueDate/DropdownContent/DropdownContent.module.js +0 -9
- package/dist/components/LabelValueDate/DropdownContent/index.d.ts +0 -12
- package/dist/components/Textfield/components/ClearIcon/ClearIcon.d.ts +0 -6
- package/dist/components/Textfield/components/ClearIcon/ClearIcon.js +0 -13
- package/dist/components/Textfield/components/ClearIcon/ClearIcon.module.js +0 -6
- package/dist/components/Textfield/components/ClearIcon/ClearIcon_module.css +0 -11
- package/dist/components/Textfield/components/Label/Label.d.ts +0 -9
- package/dist/components/Textfield/components/Label/Label.js +0 -32
- package/dist/components/Textfield/components/Label/Label.module.js +0 -7
- package/dist/components/Textfield/components/Label/Label_module.css +0 -17
- package/dist/components/Textfield/components/Label/index.d.ts +0 -1
- package/dist/components/Textfield/components/Label/index.js +0 -1
- package/dist/data-grid/Table/components/Footer/Footer.d.ts +0 -9
- package/dist/data-grid/Table/components/Header/Header.d.ts +0 -8
- package/dist/data-grid/Table/components/TableRow/TableRow.module.js +0 -14
- package/dist/data-grid/cells/AutoCompleteCell/AutoCompleteCell.module.js +0 -5
- package/dist/data-grid/cells/AutoCompleteCell/AutoCompleteCell_module.css +0 -8
- package/dist/data-grid/cells/InputCell/InputCell.module.js +0 -5
- package/dist/data-grid/cells/NumberInputCell/NumberInputCell.module.js +0 -5
- package/dist/data-grid/cells/NumberInputCell/NumberInputCell_module.css +0 -8
- package/dist/data-grid/cells/SelectCell/SelectCell.module.js +0 -8
- package/dist/data-grid/cells/SelectCell/SelectCell_module.css +0 -33
- package/dist/data-grid/headers/components/HeaderSortGroups/components/SortByOption/SortByOption.module.js +0 -7
- package/dist/data-grid/headers/components/HeaderSortGroups/components/SortByOption/SortByOption_module.css +0 -22
- package/dist/data-grid/headers/components/HideColumn/HideColumn.module.js +0 -6
- package/dist/data-grid/headers/components/HideColumn/HideColumn_module.css +0 -20
- /package/dist/components/Tooltip/{consts.js → constants/ArrowAlign.js} +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type DatepickerProps } from '../Datepicker/Datepicker';
|
|
2
|
+
export declare const omitedDatepickerProps: ("error" | "label" | "inline" | "required" | "placeholder" | "helperText" | "frameless" | "setInitialDateIntoInput" | "blurAfterChange" | "blurAfterPick" | "showTime" | "isTimeRequired" | "blurInputOnEsc" | "blurInputOnEnter" | "fitInput" | "nullableValueWhenTimeIncomplete" | "customRender" | "onTimeToggleChange")[];
|
|
3
|
+
type OmitedDatepickerProps = Omit<DatepickerProps, (typeof omitedDatepickerProps)[number]>;
|
|
4
|
+
export interface EditableDateProps extends OmitedDatepickerProps {
|
|
5
|
+
prefix?: string;
|
|
6
|
+
selectedDate: Date | string;
|
|
7
|
+
}
|
|
8
|
+
export declare const EditableDate: ({ prefix, selectedDate, localeFormat, dateTimeFormatOptions, disabled, iconPosition, onDayClick, ...props }: EditableDateProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
3
|
+
import { format } from "date-fns";
|
|
4
|
+
import { cn } from "../../common/css/index.js";
|
|
5
|
+
import { mergeRefs } from "../../common/react/mergeRefs.js";
|
|
6
|
+
import { Text } from "../Text/Text.js";
|
|
7
|
+
import { Date16Icon } from "../../icon/index.js";
|
|
8
|
+
import { Datepicker } from "../Datepicker/Datepicker.js";
|
|
9
|
+
import { dateFormatter, parseSelectedDate } from "../Datepicker/utils/index.js";
|
|
10
|
+
import { DROPDOWN_CLOSE_REASON, Dropdown, useDropdown } from "../Dropdown/Dropdown.js";
|
|
11
|
+
import { DropdownContent } from "./DropdownContent/DropdownContent.js";
|
|
12
|
+
import EditableDate_module from "./EditableDate.module.js";
|
|
13
|
+
const omitedDatepickerProps = [
|
|
14
|
+
'isTimeRequired',
|
|
15
|
+
'required',
|
|
16
|
+
'label',
|
|
17
|
+
'helperText',
|
|
18
|
+
'error',
|
|
19
|
+
'inline',
|
|
20
|
+
'frameless',
|
|
21
|
+
'fitInput',
|
|
22
|
+
'customRender',
|
|
23
|
+
'onTimeToggleChange',
|
|
24
|
+
'blurInputOnEsc',
|
|
25
|
+
'blurInputOnEnter',
|
|
26
|
+
'setInitialDateIntoInput',
|
|
27
|
+
'nullableValueWhenTimeIncomplete',
|
|
28
|
+
'placeholder',
|
|
29
|
+
'showTime',
|
|
30
|
+
'blurAfterChange',
|
|
31
|
+
'blurAfterPick'
|
|
32
|
+
];
|
|
33
|
+
const EditableDate = ({ prefix = 'от', selectedDate, localeFormat, dateTimeFormatOptions, disabled, iconPosition = 'end', onDayClick, ...props })=>{
|
|
34
|
+
const buttonRef = useRef(null);
|
|
35
|
+
const inputRef = useRef(null);
|
|
36
|
+
const lastDropdownElementRef = useRef(null);
|
|
37
|
+
const dropdownContentRef = useRef(null);
|
|
38
|
+
const calendarDropdown = useDropdown();
|
|
39
|
+
const [stringValue, setStringValue] = useState(null);
|
|
40
|
+
const formatter = dateFormatter.getFormatter(localeFormat, dateTimeFormatOptions);
|
|
41
|
+
const parsedSelectedDate = useMemo(()=>'string' == typeof selectedDate ? parseSelectedDate(selectedDate, formatter) : selectedDate, [
|
|
42
|
+
selectedDate,
|
|
43
|
+
formatter
|
|
44
|
+
]);
|
|
45
|
+
const dateToString = useCallback((date)=>format(date, formatter.dateTime.format), [
|
|
46
|
+
formatter.dateTime.format
|
|
47
|
+
]);
|
|
48
|
+
const handleDayClick = (date)=>{
|
|
49
|
+
onDayClick?.(date);
|
|
50
|
+
calendarDropdown.handleClose();
|
|
51
|
+
};
|
|
52
|
+
const handleInputKeyDown = (event)=>{
|
|
53
|
+
props.onInputKeyDown?.(event);
|
|
54
|
+
if ('Enter' !== event.key) return;
|
|
55
|
+
calendarDropdown.handleClose?.();
|
|
56
|
+
buttonRef.current?.focus();
|
|
57
|
+
};
|
|
58
|
+
const handleButtonMouseDown = (event)=>{
|
|
59
|
+
if (calendarDropdown.open) {
|
|
60
|
+
event.preventDefault();
|
|
61
|
+
event.stopPropagation();
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
useEffect(()=>{
|
|
65
|
+
const stringValue = parsedSelectedDate ? dateToString(parsedSelectedDate) : null;
|
|
66
|
+
setStringValue(stringValue);
|
|
67
|
+
}, [
|
|
68
|
+
dateToString,
|
|
69
|
+
parsedSelectedDate
|
|
70
|
+
]);
|
|
71
|
+
return /*#__PURE__*/ jsx(Datepicker, {
|
|
72
|
+
...props,
|
|
73
|
+
selectedDate: selectedDate,
|
|
74
|
+
localeFormat: localeFormat,
|
|
75
|
+
dateTimeFormatOptions: dateTimeFormatOptions,
|
|
76
|
+
showTime: true,
|
|
77
|
+
isTimeRequired: true,
|
|
78
|
+
inline: true,
|
|
79
|
+
frameless: true,
|
|
80
|
+
fitInput: true,
|
|
81
|
+
setInitialDateIntoInput: true,
|
|
82
|
+
nullableValueWhenTimeIncomplete: true,
|
|
83
|
+
iconPosition: iconPosition,
|
|
84
|
+
blurInputOnEsc: false,
|
|
85
|
+
blurInputOnEnter: false,
|
|
86
|
+
lastElementRef: lastDropdownElementRef,
|
|
87
|
+
inputRef: mergeRefs([
|
|
88
|
+
inputRef,
|
|
89
|
+
props.inputRef
|
|
90
|
+
]),
|
|
91
|
+
onDayClick: handleDayClick,
|
|
92
|
+
onInputKeyDown: handleInputKeyDown,
|
|
93
|
+
customRender: ({ input, calendar })=>/*#__PURE__*/ jsxs(Fragment, {
|
|
94
|
+
children: [
|
|
95
|
+
/*#__PURE__*/ jsxs("button", {
|
|
96
|
+
ref: buttonRef,
|
|
97
|
+
className: cn(EditableDate_module.button, disabled && EditableDate_module.disabled),
|
|
98
|
+
"data-test-id": props.testId,
|
|
99
|
+
onClick: calendarDropdown.handleToggle,
|
|
100
|
+
disabled: disabled,
|
|
101
|
+
onMouseDown: handleButtonMouseDown,
|
|
102
|
+
children: [
|
|
103
|
+
/*#__PURE__*/ jsxs(Text.BodyXL, {
|
|
104
|
+
className: EditableDate_module.title,
|
|
105
|
+
children: [
|
|
106
|
+
prefix,
|
|
107
|
+
" ",
|
|
108
|
+
/*#__PURE__*/ jsx("span", {
|
|
109
|
+
ref: calendarDropdown.triggerRef
|
|
110
|
+
}),
|
|
111
|
+
stringValue
|
|
112
|
+
]
|
|
113
|
+
}),
|
|
114
|
+
/*#__PURE__*/ jsx("div", {
|
|
115
|
+
className: EditableDate_module.iconContainer,
|
|
116
|
+
children: /*#__PURE__*/ jsx(Date16Icon, {})
|
|
117
|
+
})
|
|
118
|
+
]
|
|
119
|
+
}),
|
|
120
|
+
/*#__PURE__*/ jsx(Dropdown, {
|
|
121
|
+
open: calendarDropdown.open,
|
|
122
|
+
onClose: (reason)=>{
|
|
123
|
+
calendarDropdown.handleClose();
|
|
124
|
+
if (reason === DROPDOWN_CLOSE_REASON.ESCAPE) buttonRef.current?.focus();
|
|
125
|
+
},
|
|
126
|
+
triggerRef: calendarDropdown.triggerRef,
|
|
127
|
+
offsetY: -39,
|
|
128
|
+
shouldIgnoreOutsideInteraction: (element)=>dropdownContentRef.current?.contains(element) ?? false,
|
|
129
|
+
children: /*#__PURE__*/ jsx(DropdownContent, {
|
|
130
|
+
ref: dropdownContentRef,
|
|
131
|
+
testId: props.testId,
|
|
132
|
+
calendar: calendar,
|
|
133
|
+
input: input,
|
|
134
|
+
inputRef: inputRef,
|
|
135
|
+
lastDropdownElementRef: lastDropdownElementRef
|
|
136
|
+
})
|
|
137
|
+
})
|
|
138
|
+
]
|
|
139
|
+
})
|
|
140
|
+
});
|
|
141
|
+
};
|
|
142
|
+
export { EditableDate, omitedDatepickerProps };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
.button-URdOeG {
|
|
2
|
+
all: unset;
|
|
3
|
+
cursor: pointer;
|
|
4
|
+
align-items: center;
|
|
5
|
+
gap: 8px;
|
|
6
|
+
padding-top: 2px;
|
|
7
|
+
display: flex;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.button-URdOeG:hover, .button-URdOeG:active {
|
|
11
|
+
text-decoration: underline;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.disabled-wlENxh {
|
|
15
|
+
cursor: default;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.disabled-wlENxh:hover, .disabled-wlENxh:active {
|
|
19
|
+
text-decoration: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.button-URdOeG:focus-visible {
|
|
23
|
+
outline: 1px solid var(--border-focused, #091739);
|
|
24
|
+
outline-offset: -1px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.iconContainer-EFdoq_ {
|
|
28
|
+
align-items: center;
|
|
29
|
+
padding-bottom: 2px;
|
|
30
|
+
display: flex;
|
|
31
|
+
}
|
|
32
|
+
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { type IHasTestId } from '../../common/types';
|
|
3
3
|
declare const titleComponents: {
|
|
4
4
|
readonly H2: import("../Text/utils/polymorphicTextRef").TextComponent<import("../Text/components/types").TextVariantProps, "h2">;
|
|
@@ -8,6 +8,7 @@ declare const titleComponents: {
|
|
|
8
8
|
export interface EditableTitleProps extends IHasTestId {
|
|
9
9
|
onApplyValidValue?: (value: string) => void;
|
|
10
10
|
onChangeWithValidation?: (value: string) => string | undefined;
|
|
11
|
+
onToggle?: (isEdit: boolean) => void;
|
|
11
12
|
className?: string;
|
|
12
13
|
defaultValue?: string;
|
|
13
14
|
titleComponent?: keyof typeof titleComponents;
|
|
@@ -16,6 +17,10 @@ export interface EditableTitleProps extends IHasTestId {
|
|
|
16
17
|
maxWidth?: number;
|
|
17
18
|
maxLength?: number;
|
|
18
19
|
overflowTextAlert?: string;
|
|
20
|
+
prefix?: string;
|
|
21
|
+
titleClassName?: string;
|
|
22
|
+
inputWrapperClassName?: string;
|
|
23
|
+
hintZIndex?: number;
|
|
19
24
|
}
|
|
20
|
-
export declare const EditableTitle:
|
|
25
|
+
export declare const EditableTitle: React.MemoExoticComponent<React.ForwardRefExoticComponent<EditableTitleProps & React.RefAttributes<HTMLDivElement>>>;
|
|
21
26
|
export {};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { memo, useCallback, useEffect, useRef, useState } from "react";
|
|
2
|
+
import { forwardRef, memo, useCallback, useEffect, useRef, useState } from "react";
|
|
3
3
|
import { useLatestValue } from "@dnd-kit/utilities";
|
|
4
4
|
import { cn } from "../../common/css/cn.js";
|
|
5
|
+
import { HintWithSkip } from "../_shared/HintWithSkip/HintWithSkip.js";
|
|
5
6
|
import { Button, ButtonVariants } from "../Button/Button.js";
|
|
6
7
|
import { HintVariant, Placement } from "../Hint/Hint.js";
|
|
7
8
|
import { Input } from "../Input/Input.js";
|
|
8
9
|
import { Text, TextColor } from "../Text/Text.js";
|
|
9
10
|
import { Check20Icon } from "../../icon/index.js";
|
|
10
|
-
import { HintWithSkip } from "./HintWithSkip.js";
|
|
11
11
|
import EditableTitle_module from "./EditableTitle.module.js";
|
|
12
12
|
const MS_AMOUNT_OF_OVERFLOW_TEXT_ALERT_VISIBLE = 3000;
|
|
13
13
|
const titleComponents = {
|
|
@@ -15,7 +15,7 @@ const titleComponents = {
|
|
|
15
15
|
H3: Text.H3,
|
|
16
16
|
BodyXL: Text.BodyXL
|
|
17
17
|
};
|
|
18
|
-
const EditableTitle = /*#__PURE__*/ memo(({ testId, className, onApplyValidValue, onChangeWithValidation, defaultValue, hintText, titleComponent = 'H2', withoutSaveButton = false, maxWidth, maxLength, overflowTextAlert })=>{
|
|
18
|
+
const EditableTitle = /*#__PURE__*/ memo(/*#__PURE__*/ forwardRef(({ testId, className, onApplyValidValue, onChangeWithValidation, onToggle, defaultValue, hintText, titleComponent = 'H2', withoutSaveButton = false, maxWidth, maxLength, overflowTextAlert, prefix, titleClassName, inputWrapperClassName, hintZIndex }, ref)=>{
|
|
19
19
|
const [isEdit, setIsEdit] = useState(!defaultValue);
|
|
20
20
|
const [value, setValue] = useState((defaultValue ?? '').substring(0, maxLength));
|
|
21
21
|
const [alertHintText, setAlertHintText] = useState('');
|
|
@@ -25,9 +25,17 @@ const EditableTitle = /*#__PURE__*/ memo(({ testId, className, onApplyValidValue
|
|
|
25
25
|
const timeoutIdRef = useRef();
|
|
26
26
|
const isDirtyRef = useRef(false);
|
|
27
27
|
const Title = titleComponents[titleComponent];
|
|
28
|
+
const changeEditMode = useCallback((isEdit)=>{
|
|
29
|
+
if (onToggle) onToggle(isEdit);
|
|
30
|
+
setIsEdit(isEdit);
|
|
31
|
+
}, [
|
|
32
|
+
onToggle
|
|
33
|
+
]);
|
|
28
34
|
const handleClickTitle = useCallback(()=>{
|
|
29
|
-
|
|
30
|
-
}, [
|
|
35
|
+
changeEditMode(true);
|
|
36
|
+
}, [
|
|
37
|
+
changeEditMode
|
|
38
|
+
]);
|
|
31
39
|
const handleClearInput = useCallback(()=>{
|
|
32
40
|
setValue('');
|
|
33
41
|
}, []);
|
|
@@ -39,12 +47,13 @@ const EditableTitle = /*#__PURE__*/ memo(({ testId, className, onApplyValidValue
|
|
|
39
47
|
setAlertHintText(error);
|
|
40
48
|
setIsError(!!error);
|
|
41
49
|
if (error) return;
|
|
42
|
-
|
|
50
|
+
changeEditMode(!inputValue);
|
|
43
51
|
onApplyValidValue?.(inputValue);
|
|
44
52
|
isDirtyRef.current = false;
|
|
45
53
|
timeoutIdRef.current = void 0;
|
|
46
54
|
clearTimeout(timeoutIdRef.current);
|
|
47
55
|
}, [
|
|
56
|
+
changeEditMode,
|
|
48
57
|
latestValue,
|
|
49
58
|
onApplyValidValue,
|
|
50
59
|
onChangeWithValidation
|
|
@@ -101,7 +110,15 @@ const EditableTitle = /*#__PURE__*/ memo(({ testId, className, onApplyValidValue
|
|
|
101
110
|
useEffect(()=>()=>{
|
|
102
111
|
clearTimeout(timeoutIdRef.current);
|
|
103
112
|
}, []);
|
|
113
|
+
const trimmedPrefix = prefix?.trim();
|
|
114
|
+
const formattedPrefix = trimmedPrefix ? /*#__PURE__*/ jsxs(Fragment, {
|
|
115
|
+
children: [
|
|
116
|
+
trimmedPrefix,
|
|
117
|
+
"\xa0"
|
|
118
|
+
]
|
|
119
|
+
}) : null;
|
|
104
120
|
return /*#__PURE__*/ jsx("div", {
|
|
121
|
+
ref: ref,
|
|
105
122
|
"data-test-id": testId,
|
|
106
123
|
className: cn(EditableTitle_module.wrapper, className),
|
|
107
124
|
style: {
|
|
@@ -109,28 +126,39 @@ const EditableTitle = /*#__PURE__*/ memo(({ testId, className, onApplyValidValue
|
|
|
109
126
|
},
|
|
110
127
|
children: isEdit ? /*#__PURE__*/ jsxs(Fragment, {
|
|
111
128
|
children: [
|
|
112
|
-
/*#__PURE__*/
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
129
|
+
/*#__PURE__*/ jsxs("div", {
|
|
130
|
+
className: cn(EditableTitle_module.inputWrapper, inputWrapperClassName),
|
|
131
|
+
children: [
|
|
132
|
+
formattedPrefix && /*#__PURE__*/ jsx(Title, {
|
|
133
|
+
testId: testId ? `${testId}-prefix` : void 0,
|
|
134
|
+
tabIndex: -1,
|
|
135
|
+
children: formattedPrefix
|
|
136
|
+
}),
|
|
137
|
+
/*#__PURE__*/ jsx(HintWithSkip, {
|
|
138
|
+
skip: !alertHintText,
|
|
139
|
+
variant: HintVariant.Alert,
|
|
140
|
+
placement: Placement.BOTTOM,
|
|
141
|
+
visible: true,
|
|
142
|
+
overlay: /*#__PURE__*/ jsx(Text.Body, {
|
|
143
|
+
testId: testId ? `${testId}-alert-hint` : void 0,
|
|
144
|
+
colorToken: TextColor.critical,
|
|
145
|
+
children: alertHintText
|
|
146
|
+
}),
|
|
147
|
+
zIndex: hintZIndex,
|
|
148
|
+
children: /*#__PURE__*/ jsx(Input, {
|
|
149
|
+
testId: testId ? `${testId}-input` : void 0,
|
|
150
|
+
ref: inputRefCb,
|
|
151
|
+
name: "EditableTitleInput",
|
|
152
|
+
clearable: true,
|
|
153
|
+
onClear: handleClearInput,
|
|
154
|
+
value: value,
|
|
155
|
+
onChange: handleChangeInput,
|
|
156
|
+
error: isError,
|
|
157
|
+
autoComplete: "off",
|
|
158
|
+
onBlur: handleBlurInput
|
|
159
|
+
})
|
|
160
|
+
})
|
|
161
|
+
]
|
|
134
162
|
}),
|
|
135
163
|
!withoutSaveButton && /*#__PURE__*/ jsx(Button, {
|
|
136
164
|
testId: testId ? `${testId}-button` : void 0,
|
|
@@ -149,16 +177,20 @@ const EditableTitle = /*#__PURE__*/ memo(({ testId, className, onApplyValidValue
|
|
|
149
177
|
colorToken: TextColor.invert,
|
|
150
178
|
children: hintText
|
|
151
179
|
}),
|
|
152
|
-
|
|
180
|
+
zIndex: hintZIndex,
|
|
181
|
+
children: /*#__PURE__*/ jsxs(Title, {
|
|
153
182
|
testId: testId ? `${testId}-title` : void 0,
|
|
154
|
-
className: EditableTitle_module.title,
|
|
183
|
+
className: cn(EditableTitle_module.title, titleClassName),
|
|
155
184
|
onClick: handleClickTitle,
|
|
156
185
|
tabIndex: 0,
|
|
157
186
|
onKeyDown: handleEnterDownOnTitle,
|
|
158
|
-
children:
|
|
187
|
+
children: [
|
|
188
|
+
formattedPrefix,
|
|
189
|
+
value
|
|
190
|
+
]
|
|
159
191
|
})
|
|
160
192
|
})
|
|
161
193
|
});
|
|
162
|
-
});
|
|
194
|
+
}));
|
|
163
195
|
EditableTitle.displayName = 'EditableTitle';
|
|
164
196
|
export { EditableTitle };
|
|
@@ -30,5 +30,5 @@ export declare namespace EmptyState {
|
|
|
30
30
|
var displayName: string;
|
|
31
31
|
var Actions: ({ className, leftButtonSlot, centralButtonSlot, rightButtonSlot, ...restProps }: import("./Actions/Actions").ActionsProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
32
32
|
var Image: typeof import("../_shared/Image/Image").Image;
|
|
33
|
-
var Button: import("
|
|
33
|
+
var Button: import("../_shared/utils/polymorphicClickableTypes").ClickableComponent<import("../Button/Button").ButtonOwnProps, "button">;
|
|
34
34
|
}
|
|
@@ -56,6 +56,7 @@ export declare const mapRegistryItemToFile: (item: IRegistryItem) => IFile;
|
|
|
56
56
|
export declare const mergeFilesWithLimits: (prevFiles: IFile[], incomingFiles: IFile[], limits?: Limits) => IFile[];
|
|
57
57
|
export declare const getFileExtFromName: (fileName: string) => string;
|
|
58
58
|
export declare const isImage: (file: IFile) => boolean;
|
|
59
|
+
export declare const isImageByExt: (extension: string) => boolean;
|
|
59
60
|
export declare const buildDisplayItems: (stateItems: DisplayStateItems) => IRenderItem[];
|
|
60
61
|
export declare const isDndSortableItem: (item: {
|
|
61
62
|
originIndex: number | null;
|
|
@@ -104,6 +104,9 @@ const IMG_EXTENSIONS = [
|
|
|
104
104
|
];
|
|
105
105
|
const isImage = (file)=>{
|
|
106
106
|
const extension = getFileExtFromName(file.name);
|
|
107
|
+
return isImageByExt(extension);
|
|
108
|
+
};
|
|
109
|
+
const isImageByExt = (extension)=>{
|
|
107
110
|
for(let i = 0; i < IMG_EXTENSIONS.length; i++){
|
|
108
111
|
const mime = IMG_EXTENSIONS[i];
|
|
109
112
|
if (mime === extension.toLowerCase()) return true;
|
|
@@ -252,4 +255,4 @@ const resolveNextScrollPosition = ({ container, direction })=>{
|
|
|
252
255
|
if (nextScrollPosition > maxScrollLeft) return maxScrollLeft;
|
|
253
256
|
return nextScrollPosition;
|
|
254
257
|
};
|
|
255
|
-
export { buildDisplayItems, buildLoadingStateItems, buildReadyStateItems, cloneFileWithMeta, finalizeResolvedFileState, getFileExtFromName, isDndSortableItem, isImage, makeFile, mapRegistryItemToFile, mergeFilesWithLimits, reorderFilesByDnd, resolveAutoScrollDirection, resolveFileCandidates, resolveNextScrollPosition };
|
|
258
|
+
export { buildDisplayItems, buildLoadingStateItems, buildReadyStateItems, cloneFileWithMeta, finalizeResolvedFileState, getFileExtFromName, isDndSortableItem, isImage, isImageByExt, makeFile, mapRegistryItemToFile, mergeFilesWithLimits, reorderFilesByDnd, resolveAutoScrollDirection, resolveFileCandidates, resolveNextScrollPosition };
|
|
@@ -11,7 +11,7 @@ import { usePreviewFlow } from "./hooks/usePreviewFlow/usePreviewFlow.js";
|
|
|
11
11
|
import { useAutoScrollToInvalidFiles } from "./hooks/useAutoScrollToInvalidFiles/useAutoScrollToInvalidFiles.js";
|
|
12
12
|
import { useDisplayItems } from "./hooks/useDisplayItems/useDisplayItems.js";
|
|
13
13
|
import { useFileUploaderDndState } from "./hooks/useFileUploaderDndState/useFileUploaderDndState.js";
|
|
14
|
-
const FileUploader = ({ files, invalidFiles, testId, className, disableDelete = false, hintZIndex, loadingCount = 0, loadingFiles, showAdditionalText = false, hideFileNames = false, onDelete, onDeleteFile, onDownload, enableDndSorting = false, onReorder })=>{
|
|
14
|
+
const FileUploader = ({ files, invalidFiles, testId, className, disableDelete = false, hintZIndex, loadingCount = 0, loadingFiles, loadingText, showAdditionalText = false, hideFileNames = false, onDelete, onDeleteFile, onDownload, enableDndSorting = false, onReorder })=>{
|
|
15
15
|
const fileUploaderTestIds = testId ? makeFileUploaderTestIds(testId) : null;
|
|
16
16
|
const { imgSrc, handlePreviewOpen, handlePreviewClose, getPreviewInteractionProps } = usePreviewFlow();
|
|
17
17
|
const { displayItems } = useDisplayItems({
|
|
@@ -71,6 +71,7 @@ const FileUploader = ({ files, invalidFiles, testId, className, disableDelete =
|
|
|
71
71
|
onDownload: onDownload,
|
|
72
72
|
hintZIndex: hintZIndex,
|
|
73
73
|
isLoading: file.isLoading,
|
|
74
|
+
loadingText: loadingText,
|
|
74
75
|
showAdditionalText: showAdditionalText,
|
|
75
76
|
hideFileNames: hideFileNames,
|
|
76
77
|
disableHints: disableHints,
|
|
@@ -116,6 +117,7 @@ const FileUploader = ({ files, invalidFiles, testId, className, disableDelete =
|
|
|
116
117
|
disableDelete: true,
|
|
117
118
|
hintZIndex: hintZIndex,
|
|
118
119
|
isLoading: dndState.activeDragItem.file.isLoading,
|
|
120
|
+
loadingText: loadingText,
|
|
119
121
|
showAdditionalText: showAdditionalText,
|
|
120
122
|
hideFileNames: hideFileNames,
|
|
121
123
|
disableHints: true,
|
|
@@ -3,14 +3,14 @@ import { memo, useCallback } from "react";
|
|
|
3
3
|
import { cn } from "../../../../common/css/cn.js";
|
|
4
4
|
import { Spinner, SpinnerSize } from "../../../Spinner/Spinner.js";
|
|
5
5
|
import { Text } from "../../../Text/Text.js";
|
|
6
|
-
import { getFileExtFromName,
|
|
6
|
+
import { getFileExtFromName, isImageByExt } from "../../FileUploader.helpers.js";
|
|
7
7
|
import { makeFileUploaderPreviewTestIds } from "../../FileUploader.testIds.js";
|
|
8
8
|
import { FileUploaderDeleteButton, FileUploaderFileIcon, FileUploaderFileName, FileUploaderOverlay } from "./components/index.js";
|
|
9
9
|
import FileUploaderPreview_module from "./FileUploaderPreview.module.js";
|
|
10
10
|
const FileUploaderPreview = /*#__PURE__*/ memo(({ file, testId, disableDelete = false, loadingText = 'загружаем...', hintZIndex, isLoading = false, showAdditionalText = false, hideFileNames = false, disableHints = false, disableOverlayActions = false, isDraggingPreview = false, isOverlayVisible = false, validationError, onMouseEnter, onMouseLeave, onFocusCapture, onBlurCapture, onPreview, onDelete, onDownload })=>{
|
|
11
11
|
const previewTestIds = testId ? makeFileUploaderPreviewTestIds(testId) : null;
|
|
12
|
-
const
|
|
13
|
-
const isFileImage =
|
|
12
|
+
const clearFileExtension = getFileExtFromName(file.name.split('?')[0]);
|
|
13
|
+
const isFileImage = isImageByExt(clearFileExtension);
|
|
14
14
|
const handleDelete = useCallback((e)=>{
|
|
15
15
|
e.stopPropagation();
|
|
16
16
|
onDelete?.();
|
|
@@ -37,7 +37,7 @@ const FileUploaderPreview = /*#__PURE__*/ memo(({ file, testId, disableDelete =
|
|
|
37
37
|
/*#__PURE__*/ jsx(Text.Caption, {
|
|
38
38
|
testId: previewTestIds?.extension,
|
|
39
39
|
className: FileUploaderPreview_module.fileType,
|
|
40
|
-
children:
|
|
40
|
+
children: clearFileExtension.toLowerCase()
|
|
41
41
|
})
|
|
42
42
|
]
|
|
43
43
|
});
|
|
@@ -1,15 +1,22 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
2
1
|
import { type TooltipProps as RcTooltipProps } from 'rc-tooltip/es/Tooltip';
|
|
3
|
-
import { type IHasTestId } from '../../common/types';
|
|
2
|
+
import { type IHasTestId, type ValueOf } from '../../common/types';
|
|
4
3
|
import { type TooltipProps } from '../Tooltip/Tooltip';
|
|
4
|
+
export { Placement, type PlacementValue } from '../Tooltip/Tooltip';
|
|
5
|
+
export declare const HelpSize: {
|
|
6
|
+
readonly S: "s";
|
|
7
|
+
readonly M: "m";
|
|
8
|
+
readonly L: "l";
|
|
9
|
+
};
|
|
10
|
+
export type HelpSizeValue = ValueOf<typeof HelpSize>;
|
|
5
11
|
export interface HelpProps extends IHasTestId {
|
|
6
12
|
popup: RcTooltipProps['overlay'];
|
|
13
|
+
size?: HelpSizeValue;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
tabIndex?: number;
|
|
7
16
|
className?: string;
|
|
8
17
|
zIndex?: number;
|
|
9
18
|
placement?: TooltipProps['placement'];
|
|
10
19
|
onVisibleChange?: (v: boolean) => void;
|
|
11
|
-
icon?: ReactNode;
|
|
12
20
|
offset?: TooltipProps['offset'];
|
|
13
21
|
}
|
|
14
|
-
export declare const Help: ({ testId, popup, className, zIndex, placement, onVisibleChange,
|
|
15
|
-
export { Placement, type PlacementValue } from '../Tooltip/Tooltip';
|
|
22
|
+
export declare const Help: ({ testId, popup, size, disabled, tabIndex, className, zIndex, placement, onVisibleChange, offset, }: HelpProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useState } from "react";
|
|
3
3
|
import { cn } from "../../common/css/cn.js";
|
|
4
|
-
import { Support20Icon } from "../../icon/index.js";
|
|
4
|
+
import { Support12Icon, Support16Icon, Support20Icon } from "../../icon/index.js";
|
|
5
5
|
import { Placement, Tooltip } from "../Tooltip/Tooltip.js";
|
|
6
6
|
import Help_module from "./Help.module.js";
|
|
7
|
-
const
|
|
7
|
+
const HelpSize = {
|
|
8
|
+
S: 's',
|
|
9
|
+
M: 'm',
|
|
10
|
+
L: 'l'
|
|
11
|
+
};
|
|
12
|
+
const IconBySizeMap = {
|
|
13
|
+
[HelpSize.S]: Support12Icon,
|
|
14
|
+
[HelpSize.M]: Support16Icon,
|
|
15
|
+
[HelpSize.L]: Support20Icon
|
|
16
|
+
};
|
|
17
|
+
const Help = ({ testId, popup, size = HelpSize.L, disabled, tabIndex, className, zIndex, placement = Placement.RIGHT_TOP, onVisibleChange, offset = [
|
|
8
18
|
0,
|
|
9
19
|
0
|
|
10
20
|
] })=>{
|
|
@@ -15,19 +25,24 @@ const Help = ({ testId, popup, className, zIndex, placement = Placement.RIGHT_TO
|
|
|
15
25
|
}, [
|
|
16
26
|
onVisibleChange
|
|
17
27
|
]);
|
|
28
|
+
const Icon = IconBySizeMap[size];
|
|
18
29
|
return /*#__PURE__*/ jsx(Tooltip, {
|
|
19
30
|
testId: `${testId}-tooltip`,
|
|
20
31
|
overlay: popup,
|
|
21
32
|
visible: visible,
|
|
22
|
-
onVisibleChange: handleVisibleChange,
|
|
33
|
+
onVisibleChange: disabled ? void 0 : handleVisibleChange,
|
|
23
34
|
placement: placement,
|
|
24
35
|
offset: offset,
|
|
25
36
|
zIndex: zIndex,
|
|
26
|
-
children: /*#__PURE__*/ jsx("
|
|
37
|
+
children: /*#__PURE__*/ jsx("button", {
|
|
27
38
|
"data-test-id": testId,
|
|
28
|
-
|
|
29
|
-
|
|
39
|
+
"data-visible": visible,
|
|
40
|
+
type: "button",
|
|
41
|
+
disabled: disabled,
|
|
42
|
+
tabIndex: tabIndex,
|
|
43
|
+
className: cn(Help_module.button, Help_module[size], visible && Help_module.visible, disabled && Help_module.disabled, className),
|
|
44
|
+
children: /*#__PURE__*/ jsx(Icon, {})
|
|
30
45
|
})
|
|
31
46
|
});
|
|
32
47
|
};
|
|
33
|
-
export { Help, Placement };
|
|
48
|
+
export { Help, HelpSize, Placement };
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import "./Help_module.css";
|
|
2
2
|
const Help_module = {
|
|
3
|
-
|
|
4
|
-
visible: "visible-sdySeo"
|
|
3
|
+
button: "button-iueVAf",
|
|
4
|
+
visible: "visible-sdySeo",
|
|
5
|
+
disabled: "disabled-JKdTzW",
|
|
6
|
+
s: "s-bu2fTP",
|
|
7
|
+
m: "m-V5HJp8",
|
|
8
|
+
l: "l-soJwJm"
|
|
5
9
|
};
|
|
6
10
|
export default Help_module;
|