@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.
Files changed (372) hide show
  1. package/README.md +3 -0
  2. package/dist/colorVariables.css +10 -0
  3. package/dist/components/AutoComplete/AutoComplete.d.ts +4 -2
  4. package/dist/components/AutoComplete/AutoComplete.js +45 -31
  5. package/dist/components/Badge/Badge.js +2 -3
  6. package/dist/components/Badge/Badge_module.css +2 -3
  7. package/dist/components/BottomSheet/BottomSheet.js +2 -2
  8. package/dist/components/Breadcrumbs/BreadcrumbItem.d.ts +5 -3
  9. package/dist/components/Breadcrumbs/BreadcrumbItem.js +39 -8
  10. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +4 -1
  11. package/dist/components/Breadcrumbs/Breadcrumbs.js +10 -6
  12. package/dist/components/Button/Button.d.ts +1 -0
  13. package/dist/components/Button/Button.js +2 -2
  14. package/dist/components/Button/Button.module.js +1 -0
  15. package/dist/components/Button/Button_module.css +4 -0
  16. package/dist/components/Carousel/Carousel.js +5 -4
  17. package/dist/components/Checkbox/Checkbox.d.ts +1 -1
  18. package/dist/components/Chip/Chip.helpers.js +5 -2
  19. package/dist/components/Chip/Chip.js +9 -3
  20. package/dist/components/Chip/Chip.legacy_module.css +2 -2
  21. package/dist/components/Chip/Chip.types.d.ts +10 -4
  22. package/dist/components/Chip/Chip_module.css +5 -5
  23. package/dist/components/Chip/components/ChipLabel.d.ts +3 -1
  24. package/dist/components/Chip/components/ChipLabel.js +4 -2
  25. package/dist/components/Chip/components/ChipMainButton.d.ts +3 -4
  26. package/dist/components/Chip/components/ChipMainButton.js +2 -1
  27. package/dist/components/Chip/components/ChipRoot.d.ts +3 -2
  28. package/dist/components/Chip/components/ChipRoot.js +2 -1
  29. package/dist/components/Dropdown/Dropdown.d.ts +2 -0
  30. package/dist/components/Dropdown/Dropdown.js +7 -4
  31. package/dist/components/Dropdown/hooks/usePosition.d.ts +2 -1
  32. package/dist/components/Dropdown/hooks/usePosition.js +3 -3
  33. package/dist/components/EditableTitle/EditableTitle.js +1 -1
  34. package/dist/components/FieldLabel/FieldLabel.constants.d.ts +1 -0
  35. package/dist/components/FieldLabel/FieldLabel.constants.js +5 -0
  36. package/dist/components/FieldLabel/FieldLabel.d.ts +17 -0
  37. package/dist/components/FieldLabel/FieldLabel.js +76 -0
  38. package/dist/components/FieldLabel/FieldLabel.module.js +11 -0
  39. package/dist/components/FieldLabel/FieldLabel_module.css +42 -0
  40. package/dist/components/FieldLabel/components/HelpButton.d.ts +8 -0
  41. package/dist/components/FieldLabel/components/HelpButton.js +15 -0
  42. package/dist/components/FieldLabel/components/HelpButton.module.js +5 -0
  43. package/dist/components/FieldLabel/components/HelpButton_module.css +8 -0
  44. package/dist/components/FieldLabel/components/index.d.ts +1 -0
  45. package/dist/components/FieldLabel/components/index.js +1 -0
  46. package/dist/components/FileUploader/FileUploader.helpers.d.ts +1 -0
  47. package/dist/components/FileUploader/FileUploader.helpers.js +4 -1
  48. package/dist/components/FileUploader/FileUploader.js +3 -1
  49. package/dist/components/FileUploader/FileUploader.types.d.ts +1 -0
  50. package/dist/components/FileUploader/components/FileUploaderPreview/FileUploaderPreview.js +4 -4
  51. package/dist/components/Help/Help.d.ts +12 -5
  52. package/dist/components/Help/Help.js +22 -7
  53. package/dist/components/Help/Help.module.js +6 -2
  54. package/dist/components/Help/Help_module.css +36 -8
  55. package/dist/components/Hint/Hint.js +4 -5
  56. package/dist/components/Hint/Hint.module.js +2 -3
  57. package/dist/components/Hint/Hint_module.css +0 -9
  58. package/dist/components/Info/Info.d.ts +1 -4
  59. package/dist/components/Info/Info.js +27 -4
  60. package/dist/components/Info/Info.module.js +4 -1
  61. package/dist/components/Info/Info_module.css +21 -0
  62. package/dist/components/Input/Input.d.ts +10 -0
  63. package/dist/components/Input/Input.js +93 -42
  64. package/dist/components/Input/Input.module.js +19 -3
  65. package/dist/components/Input/Input_module.css +156 -19
  66. package/dist/components/Input/components/InfoBlock.d.ts +12 -0
  67. package/dist/components/Input/components/InfoBlock.js +29 -0
  68. package/dist/components/InputClear/InputClear.d.ts +5 -2
  69. package/dist/components/InputClear/InputClear.js +10 -4
  70. package/dist/components/InputClear/InputClear.module.js +3 -1
  71. package/dist/components/InputClear/InputClear_module.css +23 -10
  72. package/dist/components/InputUnit/InputUnit.d.ts +3 -0
  73. package/dist/components/InputUnit/InputUnit.js +42 -32
  74. package/dist/components/InputUnit/InputUnit.module.js +6 -1
  75. package/dist/components/InputUnit/InputUnit_module.css +27 -29
  76. package/dist/components/InputUnit/SelectUnit/SelectUnit.d.ts +1 -1
  77. package/dist/components/InputUnit/SelectUnit/SelectUnit.js +1 -4
  78. package/dist/components/InputUnit/SelectUnit/SelectUnit.module.js +1 -0
  79. package/dist/components/InputUnit/SelectUnit/SelectUnitVisible.d.ts +1 -1
  80. package/dist/components/InputUnit/SelectUnit/SelectUnitVisible.js +7 -2
  81. package/dist/components/InputUnit/SelectUnit/SelectUnit_module.css +29 -37
  82. package/dist/components/InputUnit/SelectUnit/type.d.ts +1 -0
  83. package/dist/components/InputUnit/Unit/Unit.js +1 -2
  84. package/dist/components/InputUnit/Unit/Unit_module.css +1 -0
  85. package/dist/components/Label/Label.d.ts +1 -0
  86. package/dist/components/LabelValue/LabelValue.js +18 -52
  87. package/dist/components/LabelValue/LabelValue.module.js +0 -3
  88. package/dist/components/LabelValue/LabelValue_module.css +0 -17
  89. package/dist/components/LabelValueCheckbox/LabelValueCheckbox.d.ts +10 -0
  90. package/dist/components/LabelValueCheckbox/LabelValueCheckbox.js +22 -0
  91. package/dist/components/LabelValueCheckbox/LabelValueCheckbox.module.js +5 -0
  92. package/dist/components/LabelValueCheckbox/LabelValueCheckbox_module.css +5 -0
  93. package/dist/components/LabelValueSelect/Input/Input_module.css +1 -3
  94. package/dist/components/MentionsTextfield/MentionsTextfield.d.ts +1 -1
  95. package/dist/components/MentionsTextfield/MentionsTextfield.js +41 -25
  96. package/dist/components/MentionsTextfield/OptionForStory/OptionForStory.d.ts +7 -0
  97. package/dist/components/MentionsTextfield/OptionForStory/OptionForStory.js +27 -0
  98. package/dist/components/MentionsTextfield/OptionForStory/OptionForStory.module.js +8 -0
  99. package/dist/components/MentionsTextfield/OptionForStory/OptionForStory_module.css +25 -0
  100. package/dist/components/MentionsTextfield/OptionForStory/index.d.ts +1 -0
  101. package/dist/components/MentionsTextfield/OptionForStory/index.js +1 -0
  102. package/dist/components/Multiselect/DropdownContent/MultiselectDropdownContent.js +5 -4
  103. package/dist/components/Multiselect/Input/Input_module.css +1 -3
  104. package/dist/components/Multiselect/Multiselect.d.ts +4 -0
  105. package/dist/components/Select/Combobox/Combobox_module.css +2 -6
  106. package/dist/components/Select/DropDownWithColors/DropDownWithColors.d.ts +1 -0
  107. package/dist/components/Select/DropDownWithColors/DropDownWithColors.js +2 -1
  108. package/dist/components/Select/DropdownActionsContainer/DropdownActionsContainer.d.ts +3 -0
  109. package/dist/components/Select/DropdownActionsContainer/DropdownActionsContainer.js +17 -0
  110. package/dist/components/Select/DropdownActionsContainer/DropdownActionsContainer.module.js +6 -0
  111. package/dist/components/Select/DropdownActionsContainer/DropdownActionsContainer_module.css +12 -0
  112. package/dist/components/Select/OptionsList/OptionsList.d.ts +2 -1
  113. package/dist/components/Select/OptionsList/OptionsList.js +3 -2
  114. package/dist/components/Select/OptionsList/OptionsList_module.css +4 -0
  115. package/dist/components/Select/Select.d.ts +8 -2
  116. package/dist/components/Select/Select.js +29 -34
  117. package/dist/components/Select/Select.module.js +1 -2
  118. package/dist/components/Select/Select_module.css +2 -14
  119. package/dist/components/Select/ShortVariant/ShortVariant.d.ts +5 -1
  120. package/dist/components/Select/ShortVariant/ShortVariant.js +5 -4
  121. package/dist/components/Select/ShortVariant/ShortVariant.module.js +1 -0
  122. package/dist/components/Select/ShortVariant/ShortVariant_module.css +5 -1
  123. package/dist/components/Select/types.d.ts +1 -0
  124. package/dist/components/Select/useDropdownPadding.d.ts +5 -0
  125. package/dist/components/Select/useDropdownPadding.js +22 -0
  126. package/dist/components/Textfield/Textfield.d.ts +18 -2
  127. package/dist/components/Textfield/Textfield.js +37 -13
  128. package/dist/components/Textfield/Textfield.module.js +2 -1
  129. package/dist/components/Textfield/Textfield_module.css +95 -23
  130. package/dist/components/Textfield/components/ActionButton/ActionButton.d.ts +9 -0
  131. package/dist/components/Textfield/components/ActionButton/ActionButton.js +12 -0
  132. package/dist/components/Textfield/components/ActionButton/ActionButton.module.js +9 -0
  133. package/dist/components/Textfield/components/ActionButton/ActionButton_module.css +54 -0
  134. package/dist/components/Textfield/components/ActionButton/index.d.ts +1 -0
  135. package/dist/components/Textfield/components/ActionButton/index.js +1 -0
  136. package/dist/components/Textfield/components/Container/Container.js +6 -3
  137. package/dist/components/Textfield/components/Counter/Counter.d.ts +3 -1
  138. package/dist/components/Textfield/components/Counter/Counter.js +5 -3
  139. package/dist/components/Textfield/components/Info/Info.d.ts +3 -1
  140. package/dist/components/Textfield/components/Info/Info.js +9 -4
  141. package/dist/components/Textfield/components/InnerContainer/InnerContainer.d.ts +3 -6
  142. package/dist/components/Textfield/components/InnerContainer/InnerContainer.js +2 -8
  143. package/dist/components/Textfield/components/InputContainer/InputContainer.d.ts +14 -3
  144. package/dist/components/Textfield/components/InputContainer/InputContainer.js +74 -5
  145. package/dist/components/Textfield/components/InputContainer/InputContainer.module.js +7 -1
  146. package/dist/components/Textfield/components/InputContainer/InputContainer_module.css +36 -7
  147. package/dist/components/Textfield/components/Label/Label.d.ts +2 -0
  148. package/dist/components/Textfield/components/Label/Label.js +11 -5
  149. package/dist/components/Textfield/components/Label/Label_module.css +1 -1
  150. package/dist/components/Textfield/components/ResizeHandle/ResizeHandle.d.ts +10 -0
  151. package/dist/components/Textfield/components/ResizeHandle/ResizeHandle.js +50 -0
  152. package/dist/components/Textfield/components/ResizeHandle/ResizeHandle.module.js +7 -0
  153. package/dist/components/Textfield/components/ResizeHandle/ResizeHandle_module.css +21 -0
  154. package/dist/components/Textfield/components/ResizeHandle/index.d.ts +1 -0
  155. package/dist/components/Textfield/components/ResizeHandle/index.js +1 -0
  156. package/dist/components/Textfield/consts/index.d.ts +2 -0
  157. package/dist/components/Textfield/consts/index.js +3 -0
  158. package/dist/components/Textfield/types/index.d.ts +12 -0
  159. package/dist/components/Textfield/types/index.js +5 -0
  160. package/dist/components/Textfield/utils/index.d.ts +3 -0
  161. package/dist/components/Textfield/utils/index.js +8 -0
  162. package/dist/components/Tooltip/Tooltip.d.ts +4 -1
  163. package/dist/components/Tooltip/Tooltip.js +9 -9
  164. package/dist/components/Tooltip/Tooltip.module.js +3 -1
  165. package/dist/components/Tooltip/Tooltip_module.css +13 -3
  166. package/dist/components/Tooltip/{consts.d.ts → constants/ArrowAlign.d.ts} +0 -2
  167. package/dist/components/Tooltip/constants/TooltipBodyColor.d.ts +4 -0
  168. package/dist/components/Tooltip/constants/TooltipBodyColor.js +5 -0
  169. package/dist/components/Tooltip/constants/index.d.ts +2 -0
  170. package/dist/components/Tooltip/constants/index.js +2 -0
  171. package/dist/components/Tooltip/hooks.d.ts +2 -2
  172. package/dist/components/Tooltip/hooks.js +1 -1
  173. package/dist/components/Tooltip/types.d.ts +4 -0
  174. package/dist/components/Tooltip/types.js +0 -0
  175. package/dist/components/ViewersStack/ViewersStack.d.ts +13 -0
  176. package/dist/components/ViewersStack/ViewersStack.js +77 -0
  177. package/dist/components/ViewersStack/ViewersStack.module.js +7 -0
  178. package/dist/components/ViewersStack/ViewersStack_module.css +18 -0
  179. package/dist/components/ViewersStack/components/Avatar/Avatar.d.ts +13 -0
  180. package/dist/components/ViewersStack/components/Avatar/Avatar.js +35 -0
  181. package/dist/components/ViewersStack/components/Avatar/Avatar.module.js +13 -0
  182. package/dist/components/ViewersStack/components/Avatar/Avatar_module.css +45 -0
  183. package/dist/components/ViewersStack/components/Counter/Counter.d.ts +9 -0
  184. package/dist/components/ViewersStack/components/Counter/Counter.js +27 -0
  185. package/dist/components/ViewersStack/components/Counter/Counter.module.js +5 -0
  186. package/dist/components/ViewersStack/components/Counter/Counter_module.css +20 -0
  187. package/dist/components/ViewersStack/components/ViewersTooltip/ViewersTooltip.d.ts +15 -0
  188. package/dist/components/ViewersStack/components/ViewersTooltip/ViewersTooltip.js +41 -0
  189. package/dist/components/ViewersStack/components/ViewersTooltip/ViewersTooltip.module.js +6 -0
  190. package/dist/components/ViewersStack/components/ViewersTooltip/ViewersTooltip_module.css +14 -0
  191. package/dist/components/ViewersStack/components/ViewersTooltipOverlayItem/ViewersTooltipOverlayItem.d.ts +6 -0
  192. package/dist/components/ViewersStack/components/ViewersTooltipOverlayItem/ViewersTooltipOverlayItem.js +53 -0
  193. package/dist/components/ViewersStack/components/ViewersTooltipOverlayItem/ViewersTooltipOverlayItem.module.js +7 -0
  194. package/dist/components/ViewersStack/components/ViewersTooltipOverlayItem/ViewersTooltipOverlayItem_module.css +18 -0
  195. package/dist/components/ViewersStack/components/common.module.js +7 -0
  196. package/dist/components/ViewersStack/components/common_module.css +27 -0
  197. package/dist/components/ViewersStack/types.d.ts +22 -0
  198. package/dist/components/ViewersStack/types.js +17 -0
  199. package/dist/components/ViewersStack/utils.d.ts +3 -0
  200. package/dist/components/ViewersStack/utils.js +17 -0
  201. package/dist/components/{EditableTitle → _shared/HintWithSkip}/HintWithSkip.d.ts +1 -1
  202. package/dist/components/{EditableTitle → _shared/HintWithSkip}/HintWithSkip.js +1 -1
  203. package/dist/data-grid/Table/Table.d.ts +14 -22
  204. package/dist/data-grid/Table/Table.js +99 -61
  205. package/dist/data-grid/Table/Table.module.js +2 -0
  206. package/dist/data-grid/Table/Table_module.css +23 -0
  207. package/dist/data-grid/Table/components/Body/Body.d.ts +10 -14
  208. package/dist/data-grid/Table/components/Body/Body.js +11 -47
  209. package/dist/data-grid/Table/components/DraggableRow/DraggableRow.js +1 -1
  210. package/dist/data-grid/Table/components/Footer/Footer.module.js +0 -1
  211. package/dist/data-grid/Table/components/Footer/FooterContent.d.ts +9 -0
  212. package/dist/data-grid/Table/components/Footer/{Footer.js → FooterContent.js} +4 -5
  213. package/dist/data-grid/Table/components/Footer/Footer_module.css +0 -5
  214. package/dist/data-grid/Table/components/Header/Header.module.js +0 -1
  215. package/dist/data-grid/Table/components/Header/HeaderCell.js +3 -1
  216. package/dist/data-grid/Table/components/Header/HeaderContent.d.ts +1 -0
  217. package/dist/data-grid/Table/components/Header/{Header.js → HeaderContent.js} +8 -6
  218. package/dist/data-grid/Table/components/Header/Header_module.css +0 -15
  219. package/dist/data-grid/Table/components/Row/Row.d.ts +13 -0
  220. package/dist/data-grid/Table/components/Row/Row.js +40 -0
  221. package/dist/data-grid/Table/components/Row/Row.module.js +14 -0
  222. package/dist/data-grid/Table/components/{TableRow/TableRow_module.css → Row/Row_module.css} +7 -7
  223. package/dist/data-grid/Table/components/SubRows/SubRows.d.ts +5 -4
  224. package/dist/data-grid/Table/components/SubRows/SubRows.js +3 -3
  225. package/dist/data-grid/Table/components/TableCell/TableCell.js +2 -0
  226. package/dist/data-grid/Table/components/TableDragOverlay/TableDragOverlay.d.ts +5 -6
  227. package/dist/data-grid/Table/components/TableDragOverlay/TableDragOverlay.js +2 -2
  228. package/dist/data-grid/Table/components/TableRow/TableRow.d.ts +6 -14
  229. package/dist/data-grid/Table/components/TableRow/TableRow.js +34 -25
  230. package/dist/data-grid/Table/components/VirtualTable/VirtualTable.d.ts +10 -0
  231. package/dist/data-grid/Table/components/VirtualTable/VirtualTable.js +78 -0
  232. package/dist/data-grid/Table/components/VirtualTable/VirtualTableRow.d.ts +11 -0
  233. package/dist/data-grid/Table/components/VirtualTable/VirtualTableRow.js +18 -0
  234. package/dist/data-grid/Table/components/index.d.ts +3 -3
  235. package/dist/data-grid/Table/components/index.js +2 -2
  236. package/dist/data-grid/Table/constants.d.ts +2 -0
  237. package/dist/data-grid/Table/constants.js +3 -1
  238. package/dist/data-grid/Table/hooks/index.d.ts +1 -0
  239. package/dist/data-grid/Table/hooks/index.js +1 -0
  240. package/dist/data-grid/Table/hooks/useRowContext.d.ts +16 -0
  241. package/dist/data-grid/Table/hooks/useRowContext.js +44 -0
  242. package/dist/data-grid/Table/hooks/useTableContext.d.ts +7 -2
  243. package/dist/data-grid/Table/hooks/useTableContext.js +12 -2
  244. package/dist/data-grid/Table/index.d.ts +2 -2
  245. package/dist/data-grid/Table/types.d.ts +8 -1
  246. package/dist/data-grid/Table/types.js +5 -0
  247. package/dist/data-grid/Table/utils/compareColumnIds.d.ts +1 -0
  248. package/dist/data-grid/Table/utils/compareColumnIds.js +6 -0
  249. package/dist/data-grid/Table/utils/getColumnWidthStyles.d.ts +5 -0
  250. package/dist/data-grid/Table/utils/getColumnWidthStyles.js +4 -1
  251. package/dist/data-grid/Table/utils/getTableColumnIds.d.ts +3 -0
  252. package/dist/data-grid/Table/utils/getTableColumnIds.js +5 -0
  253. package/dist/data-grid/Table/utils/index.d.ts +2 -0
  254. package/dist/data-grid/Table/utils/index.js +2 -0
  255. package/dist/data-grid/Table/utils/withDnD.js +1 -1
  256. package/dist/data-grid/base/DropdownItem/DropdownItem.d.ts +3 -3
  257. package/dist/data-grid/base/DropdownItem/DropdownItem.js +3 -2
  258. package/dist/data-grid/base/OverflowHint/OverflowHint.d.ts +1 -0
  259. package/dist/data-grid/base/OverflowHint/OverflowHint.js +5 -3
  260. package/dist/data-grid/base/OverflowHint/utils.d.ts +1 -0
  261. package/dist/data-grid/base/OverflowHint/utils.js +7 -0
  262. package/dist/data-grid/cells/AutoCompleteCell/AutoCompleteCell.js +3 -4
  263. package/dist/data-grid/cells/DecimalCell/DecimalCell_module.css +1 -1
  264. package/dist/data-grid/cells/FileCell/FileCell_module.css +1 -1
  265. package/dist/data-grid/cells/ImageCell/ImageCell.d.ts +1 -0
  266. package/dist/data-grid/cells/ImageCell/ImageCell.js +5 -2
  267. package/dist/data-grid/cells/IndexCheckboxDndCell/IndexCheckboxDndCell.d.ts +7 -2
  268. package/dist/data-grid/cells/IndexCheckboxDndCell/IndexCheckboxDndCell.js +6 -4
  269. package/dist/data-grid/cells/InputCell/InputCell.js +3 -4
  270. package/dist/data-grid/cells/IntegerCell/IntegerCell_module.css +1 -1
  271. package/dist/data-grid/cells/LinkCell/LinkCell_module.css +1 -1
  272. package/dist/data-grid/cells/NameCell/NameCell.js +3 -0
  273. package/dist/data-grid/cells/NameCell/NameCell_module.css +2 -2
  274. package/dist/data-grid/cells/NumberInputCell/NumberInputCell.js +19 -17
  275. package/dist/data-grid/cells/SelectCell/SelectCell.js +3 -4
  276. package/dist/data-grid/cells/TextCell/TextCell_module.css +1 -1
  277. package/dist/data-grid/cells/ToggleCell/ToggleCell_module.css +1 -1
  278. package/dist/data-grid/cells/components/EditableCellWrapper/EditableCellWrapper.d.ts +3 -0
  279. package/dist/data-grid/cells/components/EditableCellWrapper/EditableCellWrapper.js +9 -0
  280. package/dist/data-grid/cells/components/EditableCellWrapper/EditableCellWrapper.module.js +5 -0
  281. package/dist/data-grid/cells/{NumberInputCell/NumberInputCell_module.css → components/EditableCellWrapper/EditableCellWrapper_module.css} +2 -2
  282. package/dist/data-grid/cells/components/EditableCellWrapper/index.d.ts +1 -0
  283. package/dist/data-grid/cells/components/EditableCellWrapper/index.js +1 -0
  284. package/dist/data-grid/cells/components/RowActionsMenu/RowActionsMenu.d.ts +4 -3
  285. package/dist/data-grid/cells/components/RowActionsMenu/RowActionsMenu.js +13 -13
  286. package/dist/data-grid/cells/components/TableInput/TableInput.js +19 -3
  287. package/dist/data-grid/cells/components/TableInput/TableInput_module.css +1 -1
  288. package/dist/data-grid/cells/components/TableNumberInput/TableNumberInput.d.ts +4 -3
  289. package/dist/data-grid/cells/components/TableNumberInput/TableNumberInput.js +44 -55
  290. package/dist/data-grid/cells/components/TableSelect/ActionButton/ActionButton.d.ts +4 -1
  291. package/dist/data-grid/cells/components/TableSelect/ActionButton/ActionButton.js +4 -3
  292. package/dist/data-grid/cells/components/TableSelect/TableSelect.d.ts +15 -10
  293. package/dist/data-grid/cells/components/TableSelect/TableSelect.js +11 -7
  294. package/dist/data-grid/cells/components/index.d.ts +1 -0
  295. package/dist/data-grid/cells/components/index.js +1 -0
  296. package/dist/data-grid/cells/index.d.ts +1 -1
  297. package/dist/data-grid/cells/index.js +1 -1
  298. package/dist/data-grid/headers/PlainTextHeader.js +3 -2
  299. package/dist/data-grid/headers/components/Dropdown/DropdownArrowBtn/DropdownArrowBtn.js +5 -1
  300. package/dist/data-grid/headers/components/Dropdown/Option/Option.d.ts +1 -1
  301. package/dist/data-grid/headers/components/Dropdown/Option/Option.js +2 -2
  302. package/dist/data-grid/headers/components/Dropdown/Option/Option_module.css +10 -2
  303. package/dist/data-grid/headers/components/HeaderBuilder/HeaderBuilder.d.ts +13 -3
  304. package/dist/data-grid/headers/components/HeaderBuilder/HeaderBuilder.js +64 -83
  305. package/dist/data-grid/headers/components/HeaderBuilder/HeaderBuilder.module.js +2 -1
  306. package/dist/data-grid/headers/components/HeaderBuilder/HeaderBuilder_module.css +21 -0
  307. package/dist/data-grid/headers/components/HeaderSortGroups/components/SortByOption/SortByOption.js +7 -15
  308. package/dist/data-grid/headers/components/HideColumn/HideColumn.js +8 -13
  309. package/dist/data-grid/headers/components/ResetFilter/ResetFilter.js +7 -10
  310. package/dist/data-grid/headers/components/ResetFilter/ResetFilter.module.js +0 -1
  311. package/dist/data-grid/headers/components/ResetFilter/ResetFilter_module.css +1 -21
  312. package/dist/data-grid/headers/components/index.d.ts +1 -1
  313. package/dist/data-grid/headers/index.d.ts +1 -1
  314. package/dist/data-grid/headers/types/types.d.ts +1 -0
  315. package/dist/data-grid/types/index.d.ts +1 -0
  316. package/dist/data-grid/utils/isOverflowed.js +21 -1
  317. package/dist/hooks/useDebounceCallback/useDebounceCallback.d.ts +2 -0
  318. package/dist/hooks/useDebounceCallback/useDebounceCallback.js +21 -0
  319. package/dist/hooks/useDismissOnFocusOutside/index.d.ts +2 -1
  320. package/dist/hooks/useDismissOnFocusOutside/index.js +4 -3
  321. package/dist/hooks/useDismissOnOutsideClick/index.d.ts +2 -1
  322. package/dist/hooks/useDismissOnOutsideClick/index.js +4 -3
  323. package/dist/hooks/useTextField/useTextField.d.ts +4 -5
  324. package/dist/hooks/useTextField/useTextField.js +6 -24
  325. package/dist/hooks/useUnmount/useUnmount.d.ts +1 -0
  326. package/dist/hooks/useUnmount/useUnmount.js +9 -0
  327. package/dist/icon/components/MyApps12Icon.d.ts +8 -0
  328. package/dist/icon/components/MyApps12Icon.js +18 -0
  329. package/dist/icon/components/MyApps16Icon.d.ts +8 -0
  330. package/dist/icon/components/MyApps16Icon.js +17 -0
  331. package/dist/icon/components/MyApps20Icon.d.ts +8 -0
  332. package/dist/icon/components/MyApps20Icon.js +18 -0
  333. package/dist/icon/components/Smile12Icon.d.ts +8 -0
  334. package/dist/icon/components/Smile12Icon.js +17 -0
  335. package/dist/icon/components/Smile16Icon.d.ts +8 -0
  336. package/dist/icon/components/Smile16Icon.js +16 -0
  337. package/dist/icon/components/Smile20Icon.d.ts +8 -0
  338. package/dist/icon/components/Smile20Icon.js +17 -0
  339. package/dist/icon/index.d.ts +6 -0
  340. package/dist/icon/index.js +6 -0
  341. package/dist/index.d.ts +4 -4
  342. package/dist/index.js +3 -1
  343. package/dist/utils/debounce/debounce.d.ts +10 -0
  344. package/dist/utils/debounce/debounce.js +73 -0
  345. package/dist/utils/isRecordEqual/isRecordEqual.d.ts +1 -0
  346. package/dist/utils/isRecordEqual/isRecordEqual.js +9 -0
  347. package/dist/utils/utils.d.ts +2 -0
  348. package/dist/utils/utils.js +2 -0
  349. package/package.json +22 -3
  350. package/dist/components/LabelValue/HelpButton/HelpButton.module.js +0 -8
  351. package/dist/components/LabelValue/HelpButton/HelpButton_module.css +0 -44
  352. package/dist/components/LabelValue/HelpButton/index.d.ts +0 -8
  353. package/dist/components/LabelValue/HelpButton/index.js +0 -36
  354. package/dist/components/Textfield/components/ClearIcon/ClearIcon.d.ts +0 -6
  355. package/dist/components/Textfield/components/ClearIcon/ClearIcon.js +0 -13
  356. package/dist/components/Textfield/components/ClearIcon/ClearIcon.module.js +0 -6
  357. package/dist/components/Textfield/components/ClearIcon/ClearIcon_module.css +0 -11
  358. package/dist/data-grid/Table/components/Footer/Footer.d.ts +0 -9
  359. package/dist/data-grid/Table/components/Header/Header.d.ts +0 -8
  360. package/dist/data-grid/Table/components/TableRow/TableRow.module.js +0 -14
  361. package/dist/data-grid/cells/AutoCompleteCell/AutoCompleteCell.module.js +0 -5
  362. package/dist/data-grid/cells/AutoCompleteCell/AutoCompleteCell_module.css +0 -8
  363. package/dist/data-grid/cells/InputCell/InputCell.module.js +0 -5
  364. package/dist/data-grid/cells/InputCell/InputCell_module.css +0 -8
  365. package/dist/data-grid/cells/NumberInputCell/NumberInputCell.module.js +0 -5
  366. package/dist/data-grid/cells/SelectCell/SelectCell.module.js +0 -8
  367. package/dist/data-grid/cells/SelectCell/SelectCell_module.css +0 -33
  368. package/dist/data-grid/headers/components/HeaderSortGroups/components/SortByOption/SortByOption.module.js +0 -7
  369. package/dist/data-grid/headers/components/HeaderSortGroups/components/SortByOption/SortByOption_module.css +0 -22
  370. package/dist/data-grid/headers/components/HideColumn/HideColumn.module.js +0 -6
  371. package/dist/data-grid/headers/components/HideColumn/HideColumn_module.css +0 -20
  372. /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, useEffect, useRef, useState } from "react";
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 { Hint } from "../Hint/Hint.js";
7
- import { Text } from "../Text/Text.js";
8
- import { useTooltip } from "./hooks/useTooltip.js";
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 [isLabelHintVisible, setIsLabelHintVisible] = useState(false);
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__*/ jsxs("div", {
73
- className: LabelValue_module.labelBlock,
74
- children: [
75
- /*#__PURE__*/ jsxs("div", {
76
- className: LabelValue_module.textWithRequiredMark,
77
- children: [
78
- /*#__PURE__*/ jsx(Hint, {
79
- visible: isLabelHintVisible,
80
- onVisibleChange: setIsLabelHintVisible,
81
- overlay: /*#__PURE__*/ jsx(Text.Body, {
82
- testId: testId ? `${testId}-label-hint-text` : void 0,
83
- colorToken: "invert",
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: labelTooltip.needShowTooltip,
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 };
@@ -0,0 +1,5 @@
1
+ import "./LabelValueCheckbox_module.css";
2
+ const LabelValueCheckbox_module = {
3
+ checkbox: "checkbox-Hn5FOs"
4
+ };
5
+ export default LabelValueCheckbox_module;
@@ -0,0 +1,5 @@
1
+ .checkbox-Hn5FOs {
2
+ padding-top: 2px;
3
+ padding-bottom: 2px;
4
+ }
5
+
@@ -50,9 +50,7 @@
50
50
  }
51
51
 
52
52
  .inputWithActions-Jl3bV3:focus-visible {
53
- --input-shadow: var(--invert-accent-normal, #7eb4ff);
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, useCallback, useRef } from "react";
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
- const MentionsTextfield = /*#__PURE__*/ forwardRef(({ testId, tabIndex, className, label, info, required, error, help, disabled, clearable, resize, style, value, limit, showCounterLimit, autoVerticalResize, resetHeightOnClear, minHeight = 90, maxHeight, rows, actionsBar, onFocus, onBlur, onClear, onChange, ...textfieldProps }, forwardedRef)=>{
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 handleClear = useCallback(()=>{
17
- onChange({
18
- backend: '',
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
- value: textValue,
34
- limit
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, clearable && Textfield_module.clearable),
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: autoVerticalResize ? height : '',
93
+ height: effectiveHeight,
78
94
  minHeight,
79
95
  ...style
80
96
  }
@@ -0,0 +1,7 @@
1
+ import { type FC } from 'react';
2
+ import type { TMentionOption } from '../types';
3
+ interface Props {
4
+ item: TMentionOption;
5
+ }
6
+ export declare const OptionForStory: FC<Props>;
7
+ export {};
@@ -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,8 @@
1
+ import "./OptionForStory_module.css";
2
+ const OptionForStory_module = {
3
+ container: "container-oHBM6w",
4
+ avatar: "avatar-HqQ2Lj",
5
+ info: "info-htRmbC",
6
+ label: "label-klpfkQ"
7
+ };
8
+ export default OptionForStory_module;
@@ -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 = useCallback(lodash_debounce(handleAsyncSearch, props.searchDebounce, {
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
- --input-shadow: var(--invert-accent-normal, #7eb4ff);
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
- --input-shadow: var(--invert-accent-normal, #7eb4ff);
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
- --input-shadow: var(--invert-accent-normal, #7eb4ff);
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
 
@@ -13,5 +13,6 @@ export interface DropDownWithColorsProps {
13
13
  onSetCursor?: (cursor: number) => void;
14
14
  searchText?: string;
15
15
  value?: ISelectOption;
16
+ skipSelectOnTab?: boolean;
16
17
  }
17
18
  export declare const DropDownWithColors: (props: DropDownWithColorsProps) => ReactElement;
@@ -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,3 @@
1
+ export declare const DropdownActionsContainer: import("react").ForwardRefExoticComponent<{
2
+ children?: React.ReactNode;
3
+ } & import("react").RefAttributes<HTMLDivElement>>;
@@ -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 };
@@ -0,0 +1,6 @@
1
+ import "./DropdownActionsContainer_module.css";
2
+ const DropdownActionsContainer_module = {
3
+ dropdownActionsContainer: "dropdownActionsContainer-AWmfpE",
4
+ dropdownActions: "dropdownActions-JUeYRM"
5
+ };
6
+ export default DropdownActionsContainer_module;
@@ -0,0 +1,12 @@
1
+ .dropdownActionsContainer-AWmfpE {
2
+ background-color: var(--bgd-white, #fff);
3
+ position: sticky;
4
+ bottom: 0;
5
+ }
6
+
7
+ .dropdownActions-JUeYRM {
8
+ justify-content: center;
9
+ align-items: center;
10
+ padding: 0 16px 8px;
11
+ }
12
+
@@ -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
- if (!enterPressed || searchable) return;
32
+ const skipOnMissingCursor = skipSelectOnEnterWithoutCursor && null === cursor;
33
+ if (!enterPressed || searchable || skipOnMissingCursor) return;
33
34
  onSelect(items[cursor ?? 0]);
34
35
  }, [
35
36
  enterPressed
@@ -3,6 +3,10 @@
3
3
  padding: 4px;
4
4
  }
5
5
 
6
+ .optionsList-nnTF3n:focus {
7
+ outline: none;
8
+ }
9
+
6
10
  .scrollable-BpMvGu {
7
11
  flex: 1;
8
12
  overflow-y: auto;
@@ -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;