@moysklad/uikit 28.1.0 → 30.4.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 +3 -0
- package/dist/colorVariables.css +10 -0
- package/dist/components/AutoComplete/AutoComplete.d.ts +4 -2
- package/dist/components/AutoComplete/AutoComplete.js +45 -31
- package/dist/components/Badge/Badge.js +2 -3
- package/dist/components/Badge/Badge_module.css +2 -3
- 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 +1 -0
- package/dist/components/Button/Button.js +2 -2
- package/dist/components/Button/Button.module.js +1 -0
- package/dist/components/Button/Button_module.css +4 -0
- package/dist/components/Carousel/Carousel.js +5 -4
- package/dist/components/Checkbox/Checkbox.d.ts +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/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/EditableTitle/EditableTitle.js +1 -1
- package/dist/components/FieldLabel/FieldLabel.constants.d.ts +1 -0
- package/dist/components/FieldLabel/FieldLabel.constants.js +5 -0
- package/dist/components/FieldLabel/FieldLabel.d.ts +17 -0
- package/dist/components/FieldLabel/FieldLabel.js +76 -0
- package/dist/components/FieldLabel/FieldLabel.module.js +11 -0
- package/dist/components/FieldLabel/FieldLabel_module.css +42 -0
- package/dist/components/FieldLabel/components/HelpButton.d.ts +8 -0
- package/dist/components/FieldLabel/components/HelpButton.js +15 -0
- package/dist/components/FieldLabel/components/HelpButton.module.js +5 -0
- package/dist/components/FieldLabel/components/HelpButton_module.css +8 -0
- package/dist/components/FieldLabel/components/index.d.ts +1 -0
- package/dist/components/FieldLabel/components/index.js +1 -0
- 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/Info/Info.d.ts +1 -4
- package/dist/components/Info/Info.js +27 -4
- package/dist/components/Info/Info.module.js +4 -1
- package/dist/components/Info/Info_module.css +21 -0
- package/dist/components/Input/Input.d.ts +10 -0
- package/dist/components/Input/Input.js +93 -42
- 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 +12 -0
- package/dist/components/Input/components/InfoBlock.js +29 -0
- package/dist/components/InputClear/InputClear.d.ts +5 -2
- package/dist/components/InputClear/InputClear.js +10 -4
- package/dist/components/InputClear/InputClear.module.js +3 -1
- package/dist/components/InputClear/InputClear_module.css +23 -10
- package/dist/components/InputUnit/InputUnit.d.ts +3 -0
- package/dist/components/InputUnit/InputUnit.js +42 -32
- 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.js +18 -52
- package/dist/components/LabelValue/LabelValue.module.js +0 -3
- package/dist/components/LabelValue/LabelValue_module.css +0 -17
- 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/LabelValueSelect/Input/Input_module.css +1 -3
- package/dist/components/MentionsTextfield/MentionsTextfield.d.ts +1 -1
- package/dist/components/MentionsTextfield/MentionsTextfield.js +41 -25
- package/dist/components/MentionsTextfield/OptionForStory/OptionForStory.d.ts +7 -0
- package/dist/components/MentionsTextfield/OptionForStory/OptionForStory.js +27 -0
- package/dist/components/MentionsTextfield/OptionForStory/OptionForStory.module.js +8 -0
- package/dist/components/MentionsTextfield/OptionForStory/OptionForStory_module.css +25 -0
- package/dist/components/MentionsTextfield/OptionForStory/index.d.ts +1 -0
- package/dist/components/MentionsTextfield/OptionForStory/index.js +1 -0
- package/dist/components/Multiselect/DropdownContent/MultiselectDropdownContent.js +5 -4
- package/dist/components/Multiselect/Input/Input_module.css +1 -3
- package/dist/components/Multiselect/Multiselect.d.ts +4 -0
- package/dist/components/Select/Combobox/Combobox_module.css +2 -6
- 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 +2 -1
- package/dist/components/Select/OptionsList/OptionsList.js +3 -2
- package/dist/components/Select/OptionsList/OptionsList_module.css +4 -0
- package/dist/components/Select/Select.d.ts +8 -2
- package/dist/components/Select/Select.js +29 -34
- package/dist/components/Select/Select.module.js +1 -2
- package/dist/components/Select/Select_module.css +2 -14
- package/dist/components/Select/ShortVariant/ShortVariant.d.ts +5 -1
- package/dist/components/Select/ShortVariant/ShortVariant.js +5 -4
- 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/Textfield/Textfield.d.ts +18 -2
- package/dist/components/Textfield/Textfield.js +37 -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.js +6 -3
- 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/Label/Label.d.ts +2 -0
- package/dist/components/Textfield/components/Label/Label.js +11 -5
- package/dist/components/Textfield/components/Label/Label_module.css +1 -1
- 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/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 +77 -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/{EditableTitle → _shared/HintWithSkip}/HintWithSkip.d.ts +1 -1
- package/dist/components/{EditableTitle → _shared/HintWithSkip}/HintWithSkip.js +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 -0
- 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/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/{NumberInputCell/NumberInputCell_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 +4 -3
- package/dist/data-grid/cells/components/TableNumberInput/TableNumberInput.js +44 -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 +11 -7
- 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/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 +64 -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/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/useTextField/useTextField.d.ts +4 -5
- 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/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/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 +6 -0
- package/dist/icon/index.js +6 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.js +3 -1
- 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 +2 -0
- package/dist/utils/utils.js +2 -0
- package/package.json +22 -3
- 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/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/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/InputCell/InputCell_module.css +0 -8
- package/dist/data-grid/cells/NumberInputCell/NumberInputCell.module.js +0 -5
- 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
|
@@ -1,22 +1,18 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef,
|
|
2
|
+
import { forwardRef, useRef, useState } from "react";
|
|
3
3
|
import { cn } from "../../common/index.js";
|
|
4
4
|
import { mergeRefs } from "../../common/react/mergeRefs.js";
|
|
5
5
|
import { Dropdown, useDropdown } from "../Dropdown/Dropdown.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import { FieldLabel } from "../FieldLabel/FieldLabel.js";
|
|
7
|
+
import { HelpSize } from "../Help/Help.js";
|
|
8
|
+
import { TextColor, TextVariant } from "../Text/Text.js";
|
|
9
9
|
import { OPEN_BUTTONS } from "./consts.js";
|
|
10
|
-
import { HelpButton } from "./HelpButton/index.js";
|
|
11
10
|
import { ValueBlock } from "./ValueBlock/index.js";
|
|
12
11
|
import LabelValue_module from "./LabelValue.module.js";
|
|
13
12
|
const LabelValue = /*#__PURE__*/ forwardRef(({ isEmpty, renderIcon, label, value, disabled, error, className, required = false, testId, helpPopupContent, valueBlockRef = null, customDropdown, isCustomDropdownOpen = false, customDropdownTrigger, valueBlockContent, dropdownContent, onFocus, onBlur, onValueKeyUp, onDropdownClose, onDropdownOpen, ...props }, forwardedRef)=>{
|
|
14
13
|
const valueBlockInnerRef = useRef(null);
|
|
15
|
-
const labelTooltip = useTooltip({
|
|
16
|
-
targetText: label
|
|
17
|
-
});
|
|
18
14
|
const labelValueDropdown = useDropdown();
|
|
19
|
-
const [
|
|
15
|
+
const [isLabelOverflowing, setIsLabelOverflowing] = useState(false);
|
|
20
16
|
const isDropdownOpen = customDropdown ? isCustomDropdownOpen : labelValueDropdown.open;
|
|
21
17
|
const openDropdown = ()=>{
|
|
22
18
|
if (!disabled) {
|
|
@@ -48,11 +44,6 @@ const LabelValue = /*#__PURE__*/ forwardRef(({ isEmpty, renderIcon, label, value
|
|
|
48
44
|
props.onClick?.(event);
|
|
49
45
|
openDropdown();
|
|
50
46
|
};
|
|
51
|
-
useEffect(()=>{
|
|
52
|
-
if (isDropdownOpen) setIsLabelHintVisible(false);
|
|
53
|
-
}, [
|
|
54
|
-
isDropdownOpen
|
|
55
|
-
]);
|
|
56
47
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
57
48
|
children: [
|
|
58
49
|
/*#__PURE__*/ jsxs("div", {
|
|
@@ -69,43 +60,18 @@ const LabelValue = /*#__PURE__*/ forwardRef(({ isEmpty, renderIcon, label, value
|
|
|
69
60
|
/*#__PURE__*/ jsxs("div", {
|
|
70
61
|
className: LabelValue_module.labelValueBlock,
|
|
71
62
|
children: [
|
|
72
|
-
/*#__PURE__*/
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
className: LabelValue_module.hintText,
|
|
85
|
-
children: label
|
|
86
|
-
}),
|
|
87
|
-
trigger: labelTooltip.needShowTooltip ? 'hover' : [],
|
|
88
|
-
overlayClassName: LabelValue_module.hint,
|
|
89
|
-
children: /*#__PURE__*/ jsx(Text.Caption, {
|
|
90
|
-
ref: labelTooltip.targetRef,
|
|
91
|
-
className: cn(LabelValue_module.overflowText, LabelValue_module.labelText),
|
|
92
|
-
testId: testId ? `${testId}-label` : void 0,
|
|
93
|
-
colorToken: "secondary",
|
|
94
|
-
children: label
|
|
95
|
-
})
|
|
96
|
-
}),
|
|
97
|
-
required && /*#__PURE__*/ jsx(Text.Caption, {
|
|
98
|
-
testId: testId ? `${testId}-required-mark` : void 0,
|
|
99
|
-
colorToken: "critical",
|
|
100
|
-
children: "*"
|
|
101
|
-
})
|
|
102
|
-
]
|
|
103
|
-
}),
|
|
104
|
-
!!helpPopupContent && /*#__PURE__*/ jsx(HelpButton, {
|
|
105
|
-
helpPopupContent: helpPopupContent,
|
|
106
|
-
className: LabelValue_module.helpButtonContainer
|
|
107
|
-
})
|
|
108
|
-
]
|
|
63
|
+
/*#__PURE__*/ jsx(FieldLabel, {
|
|
64
|
+
label: label,
|
|
65
|
+
required: required,
|
|
66
|
+
testId: testId,
|
|
67
|
+
variant: TextVariant.caption,
|
|
68
|
+
colorToken: TextColor.secondary,
|
|
69
|
+
onOverflowChange: setIsLabelOverflowing,
|
|
70
|
+
helpProps: helpPopupContent ? {
|
|
71
|
+
popup: helpPopupContent
|
|
72
|
+
} : void 0,
|
|
73
|
+
helpButtonClassName: LabelValue_module.helpButtonContainer,
|
|
74
|
+
helpSize: HelpSize.S
|
|
109
75
|
}),
|
|
110
76
|
/*#__PURE__*/ jsx(ValueBlock, {
|
|
111
77
|
ref: mergeRefs([
|
|
@@ -118,7 +84,7 @@ const LabelValue = /*#__PURE__*/ forwardRef(({ isEmpty, renderIcon, label, value
|
|
|
118
84
|
disabled: disabled,
|
|
119
85
|
error: error,
|
|
120
86
|
isEmpty: isEmpty,
|
|
121
|
-
needShowLabelTooltip:
|
|
87
|
+
needShowLabelTooltip: isLabelOverflowing,
|
|
122
88
|
forceHideTooltip: isDropdownOpen,
|
|
123
89
|
onBlur: onBlur,
|
|
124
90
|
onFocus: onFocus,
|
|
@@ -9,9 +9,6 @@ const LabelValue_module = {
|
|
|
9
9
|
helpButtonContainer: "helpButtonContainer-C1lSsU",
|
|
10
10
|
labelValueBlock: "labelValueBlock-pbU3kQ",
|
|
11
11
|
empty: "empty-VyYkn0",
|
|
12
|
-
labelBlock: "labelBlock-p9nrQ3",
|
|
13
|
-
textWithRequiredMark: "textWithRequiredMark-j_8oxd",
|
|
14
|
-
labelText: "labelText-g0yIDb",
|
|
15
12
|
overflowText: "overflowText-NCe0S_",
|
|
16
13
|
hint: "hint-qf0pZB",
|
|
17
14
|
hintText: "hintText-kzd4VM",
|
|
@@ -48,23 +48,6 @@
|
|
|
48
48
|
line-height: 20px;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
.labelBlock-p9nrQ3 {
|
|
52
|
-
justify-content: flex-start;
|
|
53
|
-
align-items: center;
|
|
54
|
-
gap: 4px;
|
|
55
|
-
display: flex;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.textWithRequiredMark-j_8oxd {
|
|
59
|
-
align-items: center;
|
|
60
|
-
display: flex;
|
|
61
|
-
overflow: hidden;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.labelText-g0yIDb {
|
|
65
|
-
flex: 1;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
51
|
.valueBlock-UgP3Nr {
|
|
69
52
|
cursor: pointer;
|
|
70
53
|
justify-content: flex-start;
|
|
@@ -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 };
|
|
@@ -50,9 +50,7 @@
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
.inputWithActions-Jl3bV3:focus-visible {
|
|
53
|
-
|
|
54
|
-
box-shadow: 0 0 4px 0 var(--input-shadow);
|
|
55
|
-
border: 1px solid var(--border-accent, #036ce5);
|
|
53
|
+
border: 1px solid var(--border-focused, #091739);
|
|
56
54
|
}
|
|
57
55
|
|
|
58
56
|
.inputWithActions-Jl3bV3 {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ReactElement } from 'react';
|
|
2
|
+
import type { TextfieldProps } from '../Textfield/Textfield';
|
|
2
3
|
import { type MentionsProps } from './Mentions/Mentions';
|
|
3
4
|
export type { TMentionOption, TMentionsMap, TMentionValue } from './types';
|
|
4
|
-
import type { TextfieldProps } from '../Textfield/Textfield';
|
|
5
5
|
export interface MentionTextfieldProps<Dto = unknown> extends MentionsProps<Dto>, Omit<TextfieldProps, 'defaultValue' | 'name' | 'onChange' | 'onSelect' | 'prefix' | 'value'> {
|
|
6
6
|
}
|
|
7
7
|
export declare const MentionsTextfield: <T>(props: MentionTextfieldProps<T>) => ReactElement;
|
|
@@ -1,38 +1,35 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef,
|
|
3
|
-
import { cn } from "../../common/css/cn.js";
|
|
2
|
+
import { forwardRef, useRef } from "react";
|
|
4
3
|
import { Container } from "../Textfield/components/Container/Container.js";
|
|
5
4
|
import { InnerContainer } from "../Textfield/components/InnerContainer/InnerContainer.js";
|
|
6
5
|
import { InputContainer } from "../Textfield/components/InputContainer/InputContainer.js";
|
|
6
|
+
import { ResizeHandle } from "../Textfield/components/ResizeHandle/index.js";
|
|
7
|
+
import { TextfieldSize } from "../Textfield/types/index.js";
|
|
8
|
+
import { getMinHeight } from "../Textfield/utils/index.js";
|
|
7
9
|
import { useId } from "../../hooks/useId/index.js";
|
|
8
10
|
import { useTextField } from "../../hooks/useTextField/useTextField.js";
|
|
9
11
|
import { Mentions } from "./Mentions/Mentions.js";
|
|
10
12
|
import Textfield_module from "../Textfield/Textfield.module.js";
|
|
11
|
-
|
|
13
|
+
import { cn } from "../../common/index.js";
|
|
14
|
+
const MentionsTextfield = /*#__PURE__*/ forwardRef(({ testId, tabIndex, className, label, info, required, error, help, disabled, resize, style, value, limit, showCounterLimit, autoVerticalResize = false, resetHeightOnClear = false, minHeight: minHeightProp, maxHeight, rows, size = TextfieldSize.M, onFocus, onBlur, onChange, onMainBtnClick, onEmojiBtnClick, isFileBtnVisible, mainBtnIcon, emojiBtnIcon, fileBtnIcon, fileUploaderProps, resizeTop = false, resizeBottom = false, fitContentHeightOnInit = false, actionsBar, ...textfieldProps }, forwardedRef)=>{
|
|
12
15
|
const textfieldId = useId(textfieldProps.id);
|
|
13
16
|
const ref = useRef(null);
|
|
14
17
|
const innerRef = forwardedRef || ref;
|
|
15
18
|
const textValue = value.backend;
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
mentionsMap: {},
|
|
20
|
-
raw: ''
|
|
21
|
-
});
|
|
22
|
-
onClear?.();
|
|
23
|
-
}, [
|
|
24
|
-
onClear,
|
|
25
|
-
onChange
|
|
26
|
-
]);
|
|
27
|
-
const { height, isFocused, isLimitError, setIsFocused } = useTextField({
|
|
19
|
+
const minHeight = getMinHeight(minHeightProp, size);
|
|
20
|
+
const hasResizeHandles = resizeTop || resizeBottom;
|
|
21
|
+
const { height, isFocused, isLimitError, setIsFocused, setHeight } = useTextField({
|
|
28
22
|
minHeight,
|
|
29
23
|
maxHeight,
|
|
30
24
|
ref,
|
|
25
|
+
value: textValue,
|
|
31
26
|
autoVerticalResize,
|
|
27
|
+
limit,
|
|
32
28
|
resetHeightOnClear,
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
fitContentHeightOnInit,
|
|
30
|
+
hasResizeHandles
|
|
35
31
|
});
|
|
32
|
+
const effectiveHeight = autoVerticalResize || fitContentHeightOnInit || resetHeightOnClear || hasResizeHandles ? height || void 0 : void 0;
|
|
36
33
|
return /*#__PURE__*/ jsx(Container, {
|
|
37
34
|
textfieldId: textfieldId,
|
|
38
35
|
label: label,
|
|
@@ -46,20 +43,39 @@ const MentionsTextfield = /*#__PURE__*/ forwardRef(({ testId, tabIndex, classNam
|
|
|
46
43
|
error: error,
|
|
47
44
|
info: info,
|
|
48
45
|
hasHelp: !!help,
|
|
46
|
+
size: size,
|
|
49
47
|
children: /*#__PURE__*/ jsx(InnerContainer, {
|
|
50
|
-
clearable: clearable,
|
|
51
|
-
value: textValue,
|
|
52
|
-
disabled: disabled,
|
|
53
48
|
withHelp: !!help,
|
|
54
|
-
onClear: handleClear,
|
|
55
49
|
popup: help,
|
|
56
50
|
testId: testId,
|
|
57
51
|
children: /*#__PURE__*/ jsx(InputContainer, {
|
|
58
|
-
clearable: clearable,
|
|
59
52
|
disabled: disabled,
|
|
60
53
|
focused: isFocused,
|
|
61
54
|
error: error || isLimitError,
|
|
62
55
|
actionsBar: actionsBar,
|
|
56
|
+
size: size,
|
|
57
|
+
mainBtnIcon: mainBtnIcon,
|
|
58
|
+
emojiBtnIcon: emojiBtnIcon,
|
|
59
|
+
fileBtnIcon: fileBtnIcon,
|
|
60
|
+
onMainBtnClick: onMainBtnClick,
|
|
61
|
+
onEmojiBtnClick: onEmojiBtnClick,
|
|
62
|
+
isFileBtnVisible: isFileBtnVisible,
|
|
63
|
+
testId: testId,
|
|
64
|
+
fileUploaderProps: fileUploaderProps,
|
|
65
|
+
resizeTopSlot: resizeTop ? /*#__PURE__*/ jsx(ResizeHandle, {
|
|
66
|
+
direction: "top",
|
|
67
|
+
onHeightChange: setHeight,
|
|
68
|
+
startHeight: height || minHeight,
|
|
69
|
+
minHeight: minHeight,
|
|
70
|
+
maxHeight: maxHeight
|
|
71
|
+
}) : null,
|
|
72
|
+
resizeBottomSlot: resizeBottom ? /*#__PURE__*/ jsx(ResizeHandle, {
|
|
73
|
+
direction: "bottom",
|
|
74
|
+
onHeightChange: setHeight,
|
|
75
|
+
startHeight: height || minHeight,
|
|
76
|
+
minHeight: minHeight,
|
|
77
|
+
maxHeight: maxHeight
|
|
78
|
+
}) : null,
|
|
63
79
|
children: /*#__PURE__*/ jsx(Mentions, {
|
|
64
80
|
...textfieldProps,
|
|
65
81
|
onChange: onChange,
|
|
@@ -67,14 +83,14 @@ const MentionsTextfield = /*#__PURE__*/ forwardRef(({ testId, tabIndex, classNam
|
|
|
67
83
|
id: textfieldId,
|
|
68
84
|
ref: innerRef,
|
|
69
85
|
testId: testId ? `${testId}-textfield` : void 0,
|
|
70
|
-
className: cn(Textfield_module.input,
|
|
86
|
+
className: cn(Textfield_module.input, Textfield_module[size]),
|
|
71
87
|
disabled: disabled,
|
|
72
88
|
style: {
|
|
73
|
-
resize
|
|
89
|
+
resize: hasResizeHandles ? 'none' : resize
|
|
74
90
|
},
|
|
75
91
|
styles: {
|
|
76
92
|
textarea: {
|
|
77
|
-
height:
|
|
93
|
+
height: effectiveHeight,
|
|
78
94
|
minHeight,
|
|
79
95
|
...style
|
|
80
96
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { memo } from "react";
|
|
3
|
+
import { Text, TextColor } from "../../Text/Text.js";
|
|
4
|
+
import OptionForStory_module from "./OptionForStory.module.js";
|
|
5
|
+
const OptionForStory = /*#__PURE__*/ memo(({ item })=>/*#__PURE__*/ jsxs("div", {
|
|
6
|
+
className: OptionForStory_module.container,
|
|
7
|
+
children: [
|
|
8
|
+
/*#__PURE__*/ jsx("div", {
|
|
9
|
+
className: OptionForStory_module.avatar
|
|
10
|
+
}),
|
|
11
|
+
/*#__PURE__*/ jsxs("div", {
|
|
12
|
+
className: OptionForStory_module.info,
|
|
13
|
+
children: [
|
|
14
|
+
/*#__PURE__*/ jsx(Text.Body, {
|
|
15
|
+
className: OptionForStory_module.label,
|
|
16
|
+
children: item.label
|
|
17
|
+
}),
|
|
18
|
+
/*#__PURE__*/ jsx(Text.Caption, {
|
|
19
|
+
colorToken: TextColor.secondary,
|
|
20
|
+
children: item.value
|
|
21
|
+
})
|
|
22
|
+
]
|
|
23
|
+
})
|
|
24
|
+
]
|
|
25
|
+
}));
|
|
26
|
+
OptionForStory.displayName = 'OptionForStory';
|
|
27
|
+
export { OptionForStory };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
.container-oHBM6w {
|
|
2
|
+
align-items: center;
|
|
3
|
+
column-gap: 12px;
|
|
4
|
+
height: 36px;
|
|
5
|
+
padding-inline: 12px;
|
|
6
|
+
display: flex;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.avatar-HqQ2Lj {
|
|
10
|
+
background-color: var(--light-grey-300, #d3d8ddb3);
|
|
11
|
+
border-radius: 100%;
|
|
12
|
+
width: 24px;
|
|
13
|
+
height: 24px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.info-htRmbC {
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
row-gap: 2px;
|
|
19
|
+
display: flex;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.label-klpfkQ {
|
|
23
|
+
line-height: 14px;
|
|
24
|
+
}
|
|
25
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { OptionForStory } from './OptionForStory';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { OptionForStory } from "./OptionForStory.js";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Fragment as external_react_Fragment, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
3
|
-
import lodash_debounce from "lodash.debounce";
|
|
4
3
|
import { cn } from "../../../common/css/cn.js";
|
|
5
4
|
import { Button } from "../../Button/Button.js";
|
|
6
5
|
import { Checkbox } from "../../Checkbox/Checkbox.js";
|
|
@@ -9,6 +8,7 @@ import { SearchInput } from "../../SearchInput/SearchInput.js";
|
|
|
9
8
|
import { EmptyState } from "../../Select/EmptyState/EmptyState.js";
|
|
10
9
|
import { Loading } from "../../Select/Loading/Loading.js";
|
|
11
10
|
import { Text, TextColor } from "../../Text/Text.js";
|
|
11
|
+
import { useDebounceCallback } from "../../../hooks/useDebounceCallback/useDebounceCallback.js";
|
|
12
12
|
import { Add16Icon, RemoveClose12Icon } from "../../../icon/index.js";
|
|
13
13
|
import { useAsyncDropdownContext } from "../AsyncDropdownContext/AsyncDropdownContextProvider.js";
|
|
14
14
|
import { minChipsWidth, selectAllCheckboxDefaultText } from "../lib/consts.js";
|
|
@@ -19,6 +19,9 @@ import { TooltipedChip } from "../TooltipedChip/TooltipedChip.js";
|
|
|
19
19
|
import { TooltipedOptionText } from "../TooltipedOptionText/TooltipedOptionText.js";
|
|
20
20
|
import MultiselectDropdownContent_module from "./MultiselectDropdownContent.module.js";
|
|
21
21
|
const handleCheck = ()=>{};
|
|
22
|
+
const DEBOUNCE_OPTIONS = {
|
|
23
|
+
leading: true
|
|
24
|
+
};
|
|
22
25
|
const MultiselectDropdownContent = (props)=>{
|
|
23
26
|
const asyncDropdownContext = useAsyncDropdownContext();
|
|
24
27
|
const selectedItems = (asyncDropdownContext?.selectedValues ?? props.items).filter((item)=>props.values.includes(item.value));
|
|
@@ -39,9 +42,7 @@ const MultiselectDropdownContent = (props)=>{
|
|
|
39
42
|
asyncDropdownContext?.changeCachedItems(items ?? []);
|
|
40
43
|
setFilteredItems(items ?? []);
|
|
41
44
|
}, []);
|
|
42
|
-
const handleAsyncSearchDebounced =
|
|
43
|
-
leading: true
|
|
44
|
-
}), []);
|
|
45
|
+
const handleAsyncSearchDebounced = useDebounceCallback(handleAsyncSearch, props.searchDebounce, DEBOUNCE_OPTIONS);
|
|
45
46
|
const handleSearch = (inputValue)=>{
|
|
46
47
|
setSearchInputValue(inputValue);
|
|
47
48
|
if (!inputValue.trim()) {
|
|
@@ -16,9 +16,7 @@
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
.input-Wuu6VO:focus-visible {
|
|
19
|
-
|
|
20
|
-
box-shadow: 0 0 4px 0 var(--input-shadow);
|
|
21
|
-
border: 1px solid var(--border-accent, #036ce5);
|
|
19
|
+
border: 1px solid var(--border-focused, #091739);
|
|
22
20
|
}
|
|
23
21
|
|
|
24
22
|
.input-Wuu6VO {
|
|
@@ -24,6 +24,10 @@ type SharedProps<T extends Key, DTO = unknown> = Pick<InputProps, 'placeholder'
|
|
|
24
24
|
wrapSelectedItems?: boolean;
|
|
25
25
|
closeDropdownOnCreateButtonClick?: boolean;
|
|
26
26
|
onDropdownVisibleChange?: (visible: boolean) => void;
|
|
27
|
+
/**
|
|
28
|
+
* асинхронный коллбэк, вызываемый при изменении input, возвращает список отфильтрованных опций
|
|
29
|
+
*/
|
|
30
|
+
onSearch?: (value: string) => Promise<DropdownItem<T>[]>;
|
|
27
31
|
renderItem?: (item: DropdownItem<T, DTO>) => ReactNode;
|
|
28
32
|
renderSelectedItem?: RenderSelectedItem;
|
|
29
33
|
};
|
|
@@ -22,9 +22,7 @@
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
.container-aL2rxg .combobox-b5S72r:focus-visible {
|
|
25
|
-
|
|
26
|
-
box-shadow: 0 0 4px 0 var(--input-shadow);
|
|
27
|
-
border: 1px solid var(--border-accent, #036ce5);
|
|
25
|
+
border: 1px solid var(--border-focused, #091739);
|
|
28
26
|
}
|
|
29
27
|
|
|
30
28
|
.container-aL2rxg .combobox-b5S72r {
|
|
@@ -40,9 +38,7 @@
|
|
|
40
38
|
}
|
|
41
39
|
|
|
42
40
|
.container-aL2rxg .combobox-b5S72r[data-searchable="true"]:focus-within {
|
|
43
|
-
|
|
44
|
-
box-shadow: 0 0 4px 0 var(--input-shadow);
|
|
45
|
-
border: 1px solid var(--border-accent, #036ce5);
|
|
41
|
+
border: 1px solid var(--border-focused, #091739);
|
|
46
42
|
--action-button-color: var(--elements-hover, #091739);
|
|
47
43
|
}
|
|
48
44
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { OptionsList } from "../OptionsList/OptionsList.js";
|
|
3
3
|
import DropDownWithColors_module from "./DropDownWithColors.module.js";
|
|
4
|
-
const DropDownWithColors = ({ items, listboxId, cursor, onSelect, testId, isLoading, loadingComponent, notFound, isEllipsis = false, onSetCursor, searchText, value })=>{
|
|
4
|
+
const DropDownWithColors = ({ items, listboxId, cursor, onSelect, testId, isLoading, loadingComponent, notFound, isEllipsis = false, onSetCursor, searchText, value, skipSelectOnTab })=>{
|
|
5
5
|
if (isLoading) return /*#__PURE__*/ jsxs(Fragment, {
|
|
6
6
|
children: [
|
|
7
7
|
" ",
|
|
@@ -21,6 +21,7 @@ const DropDownWithColors = ({ items, listboxId, cursor, onSelect, testId, isLoad
|
|
|
21
21
|
onSetCursor: onSetCursor,
|
|
22
22
|
searchText: searchText,
|
|
23
23
|
isOptionEllipsis: isEllipsis,
|
|
24
|
+
skipSelectOnTab: skipSelectOnTab,
|
|
24
25
|
renderOption: ({ color }, highlightedText)=>/*#__PURE__*/ jsxs(Fragment, {
|
|
25
26
|
children: [
|
|
26
27
|
/*#__PURE__*/ jsx("div", {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { DropdownDivider } from "../../Dropdown/Dropdown.js";
|
|
4
|
+
import DropdownActionsContainer_module from "./DropdownActionsContainer.module.js";
|
|
5
|
+
const DropdownActionsContainer = /*#__PURE__*/ forwardRef(({ children }, ref)=>/*#__PURE__*/ jsxs("div", {
|
|
6
|
+
ref: ref,
|
|
7
|
+
className: DropdownActionsContainer_module.dropdownActionsContainer,
|
|
8
|
+
children: [
|
|
9
|
+
/*#__PURE__*/ jsx(DropdownDivider, {}),
|
|
10
|
+
/*#__PURE__*/ jsx("div", {
|
|
11
|
+
className: DropdownActionsContainer_module.dropdownActions,
|
|
12
|
+
children: children
|
|
13
|
+
})
|
|
14
|
+
]
|
|
15
|
+
}));
|
|
16
|
+
DropdownActionsContainer.displayName = 'DropdownActionsContainer';
|
|
17
|
+
export { DropdownActionsContainer };
|
|
@@ -20,6 +20,7 @@ interface Props<T> extends IHasTestId {
|
|
|
20
20
|
scrollable?: boolean;
|
|
21
21
|
isFocusable?: boolean;
|
|
22
22
|
onPressEsc?: () => void;
|
|
23
|
+
skipSelectOnEnterWithoutCursor?: boolean;
|
|
23
24
|
}
|
|
24
|
-
export declare const OptionsList: <T>({ listboxId, items, value, searchText, optionClassName, isOptionEllipsis, testId, cursor, onSetCursor, renderOption, skipSelectOnTab, onSelect, onMouseDown, searchable, hintZIndex, className, scrollable, isFocusable, onPressEsc, }: Props<T>) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare const OptionsList: <T>({ listboxId, items, value, searchText, optionClassName, isOptionEllipsis, testId, cursor, onSetCursor, renderOption, skipSelectOnTab, onSelect, onMouseDown, searchable, hintZIndex, className, scrollable, isFocusable, onPressEsc, skipSelectOnEnterWithoutCursor, }: Props<T>) => import("react/jsx-runtime").JSX.Element;
|
|
25
26
|
export {};
|
|
@@ -7,7 +7,7 @@ import { Option } from "../Option/Option.js";
|
|
|
7
7
|
import { KEYBOARD_KEYS } from "../types.js";
|
|
8
8
|
import { useArrowDownListener, useArrowUpListener, useKeyPress } from "./hooks.js";
|
|
9
9
|
import OptionsList_module from "./OptionsList.module.js";
|
|
10
|
-
const Options = ({ listboxId, items, value, searchText, optionClassName, isOptionEllipsis, testId, cursor, onSetCursor, renderOption, skipSelectOnTab, onSelect, onMouseDown, searchable, hintZIndex, className, scrollable, isFocusable = true, onPressEsc })=>{
|
|
10
|
+
const Options = ({ listboxId, items, value, searchText, optionClassName, isOptionEllipsis, testId, cursor, onSetCursor, renderOption, skipSelectOnTab, onSelect, onMouseDown, searchable, hintZIndex, className, scrollable, isFocusable = true, onPressEsc, skipSelectOnEnterWithoutCursor })=>{
|
|
11
11
|
const resolvedListboxId = useId(listboxId);
|
|
12
12
|
const listRef = useRef(null);
|
|
13
13
|
useKeyPress(KEYBOARD_KEYS.TAB, ()=>{
|
|
@@ -29,7 +29,8 @@ const Options = ({ listboxId, items, value, searchText, optionClassName, isOptio
|
|
|
29
29
|
onSetCursor
|
|
30
30
|
});
|
|
31
31
|
useEffect(()=>{
|
|
32
|
-
|
|
32
|
+
const skipOnMissingCursor = skipSelectOnEnterWithoutCursor && null === cursor;
|
|
33
|
+
if (!enterPressed || searchable || skipOnMissingCursor) return;
|
|
33
34
|
onSelect(items[cursor ?? 0]);
|
|
34
35
|
}, [
|
|
35
36
|
enterPressed
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type CSSProperties, type ForwardedRef, type HTMLAttributes, type ReactElement, type ReactNode } from 'react';
|
|
1
|
+
import { type CSSProperties, type FocusEventHandler, type ForwardedRef, type HTMLAttributes, type KeyboardEventHandler, type ReactElement, type ReactNode } from 'react';
|
|
2
2
|
import { ActionButton } from './ActionButton/ActionButton';
|
|
3
3
|
import { ArchivedInputValue } from './ArchivedInputValue/ArchivedInputValue';
|
|
4
4
|
import { DropDownWithColors } from './DropDownWithColors/DropDownWithColors';
|
|
@@ -28,6 +28,10 @@ export interface SelectProps<T> extends IBaseSelectProps<T> {
|
|
|
28
28
|
searchDebounceTimeout?: number;
|
|
29
29
|
isLoading?: boolean;
|
|
30
30
|
loadingText?: string;
|
|
31
|
+
skipSelectOnTab?: boolean;
|
|
32
|
+
shortVariantTextClassName?: string;
|
|
33
|
+
shortVariantContainerClassName?: string;
|
|
34
|
+
shortVariantIsVisibleFocusOutline?: boolean;
|
|
31
35
|
onSearch?: (searchText: string) => void;
|
|
32
36
|
renderDropdownContent?: (options: IRenderDropdownContentOptions<T>) => ReactNode;
|
|
33
37
|
renderOption?: (option: ISelectOption<T>, highlightedText?: ReactNode) => ReactNode;
|
|
@@ -41,11 +45,13 @@ export interface SelectProps<T> extends IBaseSelectProps<T> {
|
|
|
41
45
|
isArchived?: boolean;
|
|
42
46
|
onAddButtonClick?: () => void;
|
|
43
47
|
addButtonText?: string;
|
|
44
|
-
skipSelectOnTab?: boolean;
|
|
45
48
|
scrollableOptionsList?: boolean;
|
|
46
49
|
isFocusableOptionsList?: boolean;
|
|
47
50
|
closeOnSelect?: boolean;
|
|
51
|
+
onFocus?: FocusEventHandler;
|
|
52
|
+
onBlur?: FocusEventHandler;
|
|
48
53
|
renderDropdownActions?: (options: IRenderActionsOptions) => ReactNode;
|
|
54
|
+
onKeyDown?: KeyboardEventHandler<HTMLDivElement>;
|
|
49
55
|
}
|
|
50
56
|
export interface SelectRef<T> {
|
|
51
57
|
closeDropdown: () => void;
|