@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,12 @@
|
|
|
1
|
+
type Props = {
|
|
2
|
+
isHintVisible: boolean;
|
|
3
|
+
onHintVisibilityChange: (isVisible: boolean) => void;
|
|
4
|
+
value: string;
|
|
5
|
+
isShowLabelTooltip?: () => boolean;
|
|
6
|
+
label: string;
|
|
7
|
+
testId?: string;
|
|
8
|
+
hintTextClassName?: string;
|
|
9
|
+
children: JSX.Element;
|
|
10
|
+
};
|
|
11
|
+
export declare const ValueTextWithHint: ({ children, isHintVisible, onHintVisibilityChange, isShowLabelTooltip, label, testId, value, hintTextClassName, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../common/css/cn.js";
|
|
3
|
+
import { Hint } from "../Hint/Hint.js";
|
|
4
|
+
import { Text, TextColor } from "../Text/Text.js";
|
|
5
|
+
import LabelValue_module from "./LabelValue.module.js";
|
|
6
|
+
const ValueTextWithHint = ({ children, isHintVisible, onHintVisibilityChange, isShowLabelTooltip, label, testId, value, hintTextClassName })=>/*#__PURE__*/ jsx(Hint, {
|
|
7
|
+
visible: isHintVisible,
|
|
8
|
+
onVisibleChange: onHintVisibilityChange,
|
|
9
|
+
overlay: /*#__PURE__*/ jsxs("div", {
|
|
10
|
+
className: LabelValue_module.hintTextWrapper,
|
|
11
|
+
children: [
|
|
12
|
+
isShowLabelTooltip?.() && /*#__PURE__*/ jsx(Text.H4, {
|
|
13
|
+
className: LabelValue_module.hintText,
|
|
14
|
+
colorToken: TextColor.invert,
|
|
15
|
+
children: label
|
|
16
|
+
}),
|
|
17
|
+
/*#__PURE__*/ jsx(Text.Body, {
|
|
18
|
+
testId: testId ? `${testId}-value-hint-text` : void 0,
|
|
19
|
+
className: cn(LabelValue_module.hintText, hintTextClassName),
|
|
20
|
+
colorToken: TextColor.invert,
|
|
21
|
+
children: value
|
|
22
|
+
})
|
|
23
|
+
]
|
|
24
|
+
}),
|
|
25
|
+
overlayClassName: LabelValue_module.hint,
|
|
26
|
+
placement: "bottom",
|
|
27
|
+
children: children
|
|
28
|
+
});
|
|
29
|
+
export { ValueTextWithHint };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type FocusEventHandler, type ReactNode, type RefObject } from 'react';
|
|
2
|
+
type Props<T extends HTMLElement> = {
|
|
3
|
+
value: string;
|
|
4
|
+
forceHideTooltip?: boolean;
|
|
5
|
+
onBlur?: FocusEventHandler<T>;
|
|
6
|
+
onFocus?: FocusEventHandler<T>;
|
|
7
|
+
renderIcon?: (params: {
|
|
8
|
+
stroke?: string;
|
|
9
|
+
}) => ReactNode;
|
|
10
|
+
error?: boolean;
|
|
11
|
+
isCustomValueBlock?: boolean;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
forceHintShowRef?: RefObject<Element>;
|
|
14
|
+
};
|
|
15
|
+
export declare const useValueBlock: <T extends HTMLElement>({ value, forceHideTooltip, onBlur, onFocus, renderIcon, isCustomValueBlock, error, disabled, forceHintShowRef, }: Props<T>) => {
|
|
16
|
+
valueBlockInnerRef: RefObject<HTMLElement>;
|
|
17
|
+
valueTooltip: {
|
|
18
|
+
ref: RefObject<HTMLElement>;
|
|
19
|
+
isOverflowing: boolean;
|
|
20
|
+
getIsOverflowing: () => boolean;
|
|
21
|
+
};
|
|
22
|
+
isValueHintForceDisplayed: boolean;
|
|
23
|
+
handleBlur: FocusEventHandler<T>;
|
|
24
|
+
handleFocus: FocusEventHandler<T>;
|
|
25
|
+
onHintVisibilityChange: (isVisible: boolean) => void;
|
|
26
|
+
icon: ReactNode;
|
|
27
|
+
isHintVisible: boolean;
|
|
28
|
+
};
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { useEffect, useRef, useState } from "react";
|
|
2
|
+
import { useIsElementOverflowing } from "../../../hooks/useIsElementOverflowing/index.js";
|
|
3
|
+
const ERROR_ICON_STROKE = 'var(--elements-critical, rgba(229, 3, 71, 1))';
|
|
4
|
+
const DISABLED_ICON_STROKE = 'var(--elements-hover, rgb(9, 23, 57, 100%))';
|
|
5
|
+
const getIconStroke = (args)=>{
|
|
6
|
+
if (args.isCustomValueBlock) return;
|
|
7
|
+
if (args.disabled) return DISABLED_ICON_STROKE;
|
|
8
|
+
if (args.error) return ERROR_ICON_STROKE;
|
|
9
|
+
};
|
|
10
|
+
const useValueBlock = ({ value, forceHideTooltip, onBlur, onFocus, renderIcon, isCustomValueBlock = false, error = false, disabled = false, forceHintShowRef })=>{
|
|
11
|
+
const focusTooltipTimeout = useRef();
|
|
12
|
+
const valueBlockInnerRef = useRef(null);
|
|
13
|
+
const valueOverflowing = useIsElementOverflowing([
|
|
14
|
+
value
|
|
15
|
+
]);
|
|
16
|
+
const [isValueHintForceDisplayed, setIsValueHintForceDisplayed] = useState(false);
|
|
17
|
+
const [isTooltipVisible, setIsTooltipVisible] = useState(false);
|
|
18
|
+
useEffect(()=>{
|
|
19
|
+
if (forceHideTooltip) setIsTooltipVisible(false);
|
|
20
|
+
}, [
|
|
21
|
+
forceHideTooltip
|
|
22
|
+
]);
|
|
23
|
+
useEffect(()=>{
|
|
24
|
+
if (!valueOverflowing.isOverflowing) setIsTooltipVisible(false);
|
|
25
|
+
}, [
|
|
26
|
+
valueOverflowing.isOverflowing
|
|
27
|
+
]);
|
|
28
|
+
const showValueTooltipOnFocus = (options = {})=>{
|
|
29
|
+
const { isForceShow = false } = options;
|
|
30
|
+
const isValueFocused = valueBlockInnerRef.current?.matches(':focus-visible') || isForceShow;
|
|
31
|
+
if (isValueFocused && valueOverflowing.getIsOverflowing()) setIsValueHintForceDisplayed(true);
|
|
32
|
+
};
|
|
33
|
+
const handleBlur = (event)=>{
|
|
34
|
+
onBlur?.(event);
|
|
35
|
+
setIsValueHintForceDisplayed(false);
|
|
36
|
+
};
|
|
37
|
+
const handleFocus = (event)=>{
|
|
38
|
+
onFocus?.(event);
|
|
39
|
+
focusTooltipTimeout.current = setTimeout(()=>{
|
|
40
|
+
const forceShow = forceHintShowRef?.current?.matches?.(':focus-visible');
|
|
41
|
+
showValueTooltipOnFocus({
|
|
42
|
+
isForceShow: forceShow
|
|
43
|
+
});
|
|
44
|
+
}, 800);
|
|
45
|
+
};
|
|
46
|
+
useEffect(()=>()=>{
|
|
47
|
+
if (focusTooltipTimeout.current) clearTimeout(focusTooltipTimeout.current);
|
|
48
|
+
}, []);
|
|
49
|
+
const onHintVisibilityChange = (isVisible)=>{
|
|
50
|
+
if (isValueHintForceDisplayed) return void setIsTooltipVisible(false);
|
|
51
|
+
setIsTooltipVisible(valueOverflowing.getIsOverflowing() && isVisible);
|
|
52
|
+
};
|
|
53
|
+
const icon = renderIcon ? renderIcon({
|
|
54
|
+
stroke: getIconStroke({
|
|
55
|
+
error,
|
|
56
|
+
isCustomValueBlock,
|
|
57
|
+
disabled
|
|
58
|
+
})
|
|
59
|
+
}) : null;
|
|
60
|
+
const isHintVisible = isTooltipVisible || isValueHintForceDisplayed;
|
|
61
|
+
return {
|
|
62
|
+
valueBlockInnerRef,
|
|
63
|
+
valueTooltip: valueOverflowing,
|
|
64
|
+
isValueHintForceDisplayed,
|
|
65
|
+
handleBlur,
|
|
66
|
+
handleFocus,
|
|
67
|
+
onHintVisibilityChange,
|
|
68
|
+
icon,
|
|
69
|
+
isHintVisible
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
export { useValueBlock };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { FocusEventHandler, KeyboardEventHandler, ReactNode, Ref } from 'react';
|
|
2
2
|
export interface ValueBlockContentArgs {
|
|
3
3
|
valueNode: ReactNode;
|
|
4
4
|
isLabelOverflow: boolean;
|
|
@@ -7,15 +7,20 @@ export interface ValueBlockContentArgs {
|
|
|
7
7
|
onBlur: FocusEventHandler<HTMLDivElement>;
|
|
8
8
|
onKeyDown: KeyboardEventHandler<HTMLDivElement>;
|
|
9
9
|
onKeyUp: KeyboardEventHandler<HTMLDivElement>;
|
|
10
|
+
getIsLabelOverflow: () => boolean;
|
|
10
11
|
}
|
|
11
|
-
interface ValueBlockProps {
|
|
12
|
+
export interface ValueBlockProps {
|
|
12
13
|
value: string;
|
|
13
14
|
error?: boolean;
|
|
14
15
|
isEmpty?: boolean;
|
|
15
16
|
disabled?: boolean;
|
|
16
17
|
testId?: string;
|
|
17
18
|
label: string;
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated use isNeedShowLabelTooltip
|
|
21
|
+
*/
|
|
18
22
|
needShowLabelTooltip?: boolean;
|
|
23
|
+
isNeedShowLabelTooltip?: () => boolean;
|
|
19
24
|
forceHideTooltip: boolean;
|
|
20
25
|
onFocus?: FocusEventHandler<HTMLDivElement>;
|
|
21
26
|
onBlur?: FocusEventHandler<HTMLDivElement>;
|
|
@@ -25,6 +30,5 @@ interface ValueBlockProps {
|
|
|
25
30
|
valueBlockContent?: (args: ValueBlockContentArgs) => ReactNode;
|
|
26
31
|
onValueKeyUp?: KeyboardEventHandler<HTMLDivElement>;
|
|
27
32
|
onValueKeyDown?: KeyboardEventHandler<HTMLDivElement>;
|
|
33
|
+
isDefaultValue?: boolean;
|
|
28
34
|
}
|
|
29
|
-
export declare const ValueBlock: import("react").ForwardRefExoticComponent<ValueBlockProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
30
|
-
export {};
|
|
File without changes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type CheckboxProps } from '../Checkbox/Checkbox';
|
|
2
|
+
import { type SharedLabelValueProps } from '../LabelValue/LabelValue';
|
|
3
|
+
type PickedCheckboxProps = Pick<CheckboxProps, 'checked' | 'defaultChecked' | 'indeterminate' | 'tabIndex' | 'onChange'>;
|
|
4
|
+
type OmitedLabelValueProps = Omit<SharedLabelValueProps, 'dropdownClassName' | 'dropdownStyles' | 'valueBlockContent' | 'onDropdownClose' | 'onChange' | 'error'>;
|
|
5
|
+
export interface LabelValueCheckboxProps extends OmitedLabelValueProps, PickedCheckboxProps {
|
|
6
|
+
checkboxClassName?: string;
|
|
7
|
+
checkboxProps?: CheckboxProps;
|
|
8
|
+
}
|
|
9
|
+
export declare const LabelValueCheckbox: ({ checked, defaultChecked, indeterminate, tabIndex, checkboxClassName, checkboxProps, onChange, ...props }: LabelValueCheckboxProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../common/css/index.js";
|
|
3
|
+
import { Checkbox } from "../Checkbox/Checkbox.js";
|
|
4
|
+
import { LabelValue } from "../LabelValue/LabelValue.js";
|
|
5
|
+
import LabelValueCheckbox_module from "./LabelValueCheckbox.module.js";
|
|
6
|
+
const LabelValueCheckbox = ({ checked, defaultChecked, indeterminate, tabIndex, checkboxClassName, checkboxProps, onChange, ...props })=>/*#__PURE__*/ jsx(LabelValue, {
|
|
7
|
+
...props,
|
|
8
|
+
value: "",
|
|
9
|
+
valueBlockContent: ()=>/*#__PURE__*/ jsx(Checkbox, {
|
|
10
|
+
testId: props.testId ? `${props.testId}-checkbox` : void 0,
|
|
11
|
+
checked: checked,
|
|
12
|
+
disabled: props.disabled,
|
|
13
|
+
defaultChecked: defaultChecked,
|
|
14
|
+
indeterminate: indeterminate,
|
|
15
|
+
tabIndex: tabIndex,
|
|
16
|
+
className: cn(LabelValueCheckbox_module.checkbox, checkboxClassName),
|
|
17
|
+
onChange: onChange,
|
|
18
|
+
...checkboxProps
|
|
19
|
+
}),
|
|
20
|
+
customDropdown: true
|
|
21
|
+
});
|
|
22
|
+
export { LabelValueCheckbox };
|
|
@@ -6,8 +6,8 @@ import { Datepicker } from "../Datepicker/Datepicker.js";
|
|
|
6
6
|
import { dateFormatter, parseSelectedDate } from "../Datepicker/utils/index.js";
|
|
7
7
|
import { useLocaleContext } from "../../context/contexts/LocaleContext.js";
|
|
8
8
|
import { Date12Icon } from "../../icon/index.js";
|
|
9
|
+
import { CustomDatepickerDropdownContent } from "../_shared/CustomDatepickerDropdownContent/CustomDatepickerDropdownContent.js";
|
|
9
10
|
import { LabelValue } from "../LabelValue/LabelValue.js";
|
|
10
|
-
import { DropdownContent } from "./DropdownContent/index.js";
|
|
11
11
|
import LabelValueDate_module from "./LabelValueDate.module.js";
|
|
12
12
|
const BasicLabelValueDate = /*#__PURE__*/ forwardRef(({ value, label, emptyText = 'Не указано', dateTimeFormatOptions, defaultTime, helperText, icon, iconPosition, id, inputClassName, isTimeRequired, placeholder, presets, setInitialDateIntoInput, presetsLabel, showIcon, showTime, showTimeText, onCalendarClose, onChange, onPick, onEnterPress, onTimeToggleChange, onDayClick, ...props }, ref)=>{
|
|
13
13
|
const { lang, locale } = useLocaleContext();
|
|
@@ -114,7 +114,7 @@ const BasicLabelValueDate = /*#__PURE__*/ forwardRef(({ value, label, emptyText
|
|
|
114
114
|
tabIndex: 0,
|
|
115
115
|
onFocus: focusOnLastElement
|
|
116
116
|
}),
|
|
117
|
-
/*#__PURE__*/ jsx(
|
|
117
|
+
/*#__PURE__*/ jsx(CustomDatepickerDropdownContent, {
|
|
118
118
|
testId: calendarTestId,
|
|
119
119
|
label: label,
|
|
120
120
|
error: props.error,
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { KeyboardEventHandler, MouseEventHandler } from 'react';
|
|
2
|
+
interface DeleteButtonProps {
|
|
3
|
+
testId?: string;
|
|
4
|
+
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
5
|
+
onKeyDown?: KeyboardEventHandler<HTMLButtonElement>;
|
|
6
|
+
onKeyUp?: KeyboardEventHandler<HTMLButtonElement>;
|
|
7
|
+
}
|
|
8
|
+
export declare const DeleteButton: (props: DeleteButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Button } from "../../Button/Button.js";
|
|
3
|
+
import { Delete12Icon } from "../../../icon/components/Delete12Icon.js";
|
|
4
|
+
import LabelValueFile_module from "../LabelValueFile.module.js";
|
|
5
|
+
const DeleteButton = (props)=>/*#__PURE__*/ jsx(Button, {
|
|
6
|
+
testId: props.testId,
|
|
7
|
+
className: LabelValueFile_module.independentButton,
|
|
8
|
+
type: "button",
|
|
9
|
+
variant: "filled",
|
|
10
|
+
size: "m",
|
|
11
|
+
isIconButton: true,
|
|
12
|
+
onClick: props.onClick,
|
|
13
|
+
onKeyDown: props.onKeyDown,
|
|
14
|
+
onKeyUp: props.onKeyUp,
|
|
15
|
+
children: /*#__PURE__*/ jsx(Delete12Icon, {})
|
|
16
|
+
});
|
|
17
|
+
export { DeleteButton };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { IFile } from '../../FileUploader/FileUploader';
|
|
2
|
+
interface FilePreviewIconProps {
|
|
3
|
+
testId?: string;
|
|
4
|
+
file?: IFile;
|
|
5
|
+
}
|
|
6
|
+
export declare const FilePreviewIcon: (props: FilePreviewIconProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getOptionalTestId } from "../../../common/index.js";
|
|
3
|
+
import { EmptyFile16Icon } from "../../../icon/components/EmptyFile16Icon.js";
|
|
4
|
+
import FilePreviewIcon_module from "./FilePreviewIcon.module.js";
|
|
5
|
+
const FilePreviewIcon = (props)=>{
|
|
6
|
+
if (!props.file) return null;
|
|
7
|
+
return /*#__PURE__*/ jsx("div", {
|
|
8
|
+
className: FilePreviewIcon_module.container,
|
|
9
|
+
"data-test-id": getOptionalTestId(props.testId, 'container'),
|
|
10
|
+
children: /*#__PURE__*/ jsx(EmptyFile16Icon, {
|
|
11
|
+
className: FilePreviewIcon_module.icon
|
|
12
|
+
})
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
export { FilePreviewIcon };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { IFile } from '../../FileUploader/FileUploader';
|
|
2
|
+
interface ImagePreviewProps {
|
|
3
|
+
testId?: string;
|
|
4
|
+
file: IFile;
|
|
5
|
+
onVisibilityChange?: (visible: boolean) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const ImagePreview: (props: ImagePreviewProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useRef, useState } from "react";
|
|
3
|
+
import { cn, getOptionalTestId } from "../../../common/index.js";
|
|
4
|
+
import { FileUploaderImagePreviewModal } from "../../FileUploader/components/index.js";
|
|
5
|
+
import LabelValueFile_module from "../LabelValueFile.module.js";
|
|
6
|
+
import ImagePreview_module from "./ImagePreview.module.js";
|
|
7
|
+
const ImagePreview = (props)=>{
|
|
8
|
+
const buttonRef = useRef(null);
|
|
9
|
+
const [isVisible, setIsVisible] = useState(false);
|
|
10
|
+
const [isError, setIsError] = useState(false);
|
|
11
|
+
const changeVisibility = (visible)=>{
|
|
12
|
+
setIsVisible(visible);
|
|
13
|
+
props.onVisibilityChange?.(visible);
|
|
14
|
+
};
|
|
15
|
+
const handleError = ()=>{
|
|
16
|
+
setIsError(true);
|
|
17
|
+
};
|
|
18
|
+
const handleLoad = ()=>{
|
|
19
|
+
setIsError(false);
|
|
20
|
+
};
|
|
21
|
+
return /*#__PURE__*/ jsxs("button", {
|
|
22
|
+
ref: buttonRef,
|
|
23
|
+
className: cn(LabelValueFile_module.button, LabelValueFile_module.independentButton, ImagePreview_module.imagePreviewButton),
|
|
24
|
+
onClick: (event)=>{
|
|
25
|
+
event.stopPropagation();
|
|
26
|
+
event.preventDefault();
|
|
27
|
+
changeVisibility(true);
|
|
28
|
+
},
|
|
29
|
+
"data-test-id": getOptionalTestId(props.testId, 'button'),
|
|
30
|
+
children: [
|
|
31
|
+
/*#__PURE__*/ jsx("img", {
|
|
32
|
+
"data-test-id": props.testId,
|
|
33
|
+
src: props.file.tinyImage ?? props.file.preview,
|
|
34
|
+
className: isError ? void 0 : ImagePreview_module.image,
|
|
35
|
+
onError: handleError,
|
|
36
|
+
onLoad: handleLoad
|
|
37
|
+
}),
|
|
38
|
+
/*#__PURE__*/ jsx("div", {
|
|
39
|
+
onClick: (event)=>event.stopPropagation(),
|
|
40
|
+
children: /*#__PURE__*/ jsx(FileUploaderImagePreviewModal, {
|
|
41
|
+
testId: getOptionalTestId(props.testId, 'modal'),
|
|
42
|
+
isVisible: isVisible,
|
|
43
|
+
onClose: ()=>{
|
|
44
|
+
changeVisibility(false);
|
|
45
|
+
buttonRef.current?.focus();
|
|
46
|
+
},
|
|
47
|
+
imgSrc: props.file.preview
|
|
48
|
+
})
|
|
49
|
+
})
|
|
50
|
+
]
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
export { ImagePreview };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type IUseFileUploaderResult } from '../FileUploader/FileUploader';
|
|
2
|
+
import { type SharedLabelValueProps } from '../LabelValue/LabelValue';
|
|
3
|
+
export interface LabelValueFileProps extends Omit<SharedLabelValueProps, 'valueBlockContent' | 'dropdownClassName' | 'dropdownStyles' | 'onDropdownClose' | 'onChange'> {
|
|
4
|
+
fileUploader: IUseFileUploaderResult;
|
|
5
|
+
emptyText?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const LabelValueFile: ({ fileUploader, emptyText, ...props }: LabelValueFileProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo, useRef } from "react";
|
|
3
|
+
import { getOptionalTestId } from "../../common/index.js";
|
|
4
|
+
import { FileUploader } from "../FileUploader/FileUploader.js";
|
|
5
|
+
import { LabelValue } from "../LabelValue/LabelValue.js";
|
|
6
|
+
import { ValueBlock } from "./ValueBlock/ValueBlock.js";
|
|
7
|
+
import LabelValueFile_module from "./LabelValueFile.module.js";
|
|
8
|
+
const LabelValueFile = ({ fileUploader, emptyText = 'Загрузить', ...props })=>{
|
|
9
|
+
const uploadedFile = useMemo(()=>fileUploader.files[0], [
|
|
10
|
+
fileUploader.files
|
|
11
|
+
]);
|
|
12
|
+
const isEmpty = !uploadedFile;
|
|
13
|
+
const needOpenFileLoaderOnClick = isEmpty && !props.disabled;
|
|
14
|
+
const handleClick = (event)=>{
|
|
15
|
+
props.onClick?.(event);
|
|
16
|
+
if (needOpenFileLoaderOnClick) return void fileUploader.open();
|
|
17
|
+
downloadAnchorRef.current?.click();
|
|
18
|
+
};
|
|
19
|
+
const downloadAnchorRef = useRef(null);
|
|
20
|
+
return /*#__PURE__*/ jsx(LabelValue, {
|
|
21
|
+
...props,
|
|
22
|
+
className: LabelValueFile_module.labelValueContainer,
|
|
23
|
+
value: uploadedFile?.preview ?? emptyText,
|
|
24
|
+
onClick: handleClick,
|
|
25
|
+
renderCustomValueBlock: (valueBlockProps)=>/*#__PURE__*/ jsx(FileUploader.Trigger, {
|
|
26
|
+
...fileUploader.getInputProps(),
|
|
27
|
+
multiple: false,
|
|
28
|
+
children: /*#__PURE__*/ jsx(ValueBlock, {
|
|
29
|
+
testId: getOptionalTestId(props.testId, 'value-block'),
|
|
30
|
+
label: valueBlockProps.label,
|
|
31
|
+
fileUploader: fileUploader,
|
|
32
|
+
emptyText: emptyText,
|
|
33
|
+
file: uploadedFile,
|
|
34
|
+
disabled: valueBlockProps.disabled,
|
|
35
|
+
error: valueBlockProps.error,
|
|
36
|
+
downloadAnchorRef: downloadAnchorRef,
|
|
37
|
+
needShowLabelTooltip: valueBlockProps.isNeedShowLabelTooltip
|
|
38
|
+
})
|
|
39
|
+
})
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
export { LabelValueFile };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "./LabelValueFile_module.css";
|
|
2
|
+
const LabelValueFile_module = {
|
|
3
|
+
button: "button-Zc4UKH",
|
|
4
|
+
empty: "empty-8Hb4FL",
|
|
5
|
+
disabled: "disabled-zkmcEm",
|
|
6
|
+
default: "default-Hmk1zy",
|
|
7
|
+
labelValueContainer: "labelValueContainer-dC8M8n",
|
|
8
|
+
independentButton: "independentButton-rhTGKT",
|
|
9
|
+
error: "error-Bl2Ors",
|
|
10
|
+
buttonText: "buttonText-tgGQM3"
|
|
11
|
+
};
|
|
12
|
+
export default LabelValueFile_module;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
.button-Zc4UKH {
|
|
2
|
+
all: unset;
|
|
3
|
+
cursor: pointer;
|
|
4
|
+
align-items: center;
|
|
5
|
+
gap: 4px;
|
|
6
|
+
max-width: fit-content;
|
|
7
|
+
display: flex;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.empty-8Hb4FL {
|
|
12
|
+
flex: 1;
|
|
13
|
+
max-width: 100%;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.disabled-zkmcEm.empty-8Hb4FL {
|
|
17
|
+
cursor: default;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.default-Hmk1zy, .labelValueContainer-dC8M8n:active:has(.independentButton-rhTGKT:active) .default-Hmk1zy {
|
|
21
|
+
color: var(--button-primary-normal);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.button-Zc4UKH:focus-visible {
|
|
25
|
+
outline: 1px solid var(--elements-hover);
|
|
26
|
+
outline-offset: -1px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.default-Hmk1zy:hover {
|
|
30
|
+
color: var(--button-primary-hover);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.labelValueContainer-dC8M8n:active .default-Hmk1zy {
|
|
34
|
+
color: var(--button-primary-pressed);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.error-Bl2Ors {
|
|
38
|
+
color: var(--text-critical);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.disabled-zkmcEm {
|
|
42
|
+
color: var(--text-primary);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.buttonText-tgGQM3 {
|
|
46
|
+
white-space: nowrap;
|
|
47
|
+
text-overflow: ellipsis;
|
|
48
|
+
color: inherit;
|
|
49
|
+
text-decoration: none;
|
|
50
|
+
overflow: hidden;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.buttonText-tgGQM3:after {
|
|
54
|
+
content: "";
|
|
55
|
+
display: block;
|
|
56
|
+
}
|
|
57
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type Ref } from 'react';
|
|
2
|
+
import type { IFile, IUseFileUploaderResult } from '../../FileUploader/FileUploader';
|
|
3
|
+
interface ValueBlockProps {
|
|
4
|
+
fileUploader: IUseFileUploaderResult;
|
|
5
|
+
label: string;
|
|
6
|
+
emptyText: string;
|
|
7
|
+
testId?: string;
|
|
8
|
+
file?: IFile;
|
|
9
|
+
downloadAnchorRef?: Ref<HTMLAnchorElement>;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
error?: boolean;
|
|
12
|
+
needShowLabelTooltip?: () => boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare const ValueBlock: (props: ValueBlockProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|