@plesk/ui-library 3.31.0 → 3.31.2

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 (614) hide show
  1. package/cjs/components/Action/Action.js +18 -34
  2. package/cjs/components/Action/index.js +0 -2
  3. package/cjs/components/Alert/Alert.js +18 -22
  4. package/cjs/components/Alert/Alert.stories.js +1 -8
  5. package/cjs/components/Alert/index.js +0 -2
  6. package/cjs/components/AutoClosable/AutoClosable.js +3 -23
  7. package/cjs/components/AutoClosable/index.js +0 -2
  8. package/cjs/components/AuxiliaryActions/AuxiliaryActions.js +16 -22
  9. package/cjs/components/AuxiliaryActions/index.js +0 -2
  10. package/cjs/components/Badge/Badge.js +10 -25
  11. package/cjs/components/Badge/index.js +0 -2
  12. package/cjs/components/Breadcrumbs/Breadcrumbs.js +21 -29
  13. package/cjs/components/Breadcrumbs/index.js +0 -2
  14. package/cjs/components/Button/Button.js +39 -86
  15. package/cjs/components/Button/Button.stories.js +1 -14
  16. package/cjs/components/Button/index.js +0 -2
  17. package/cjs/components/ButtonGroup/ButtonGroup.js +13 -17
  18. package/cjs/components/ButtonGroup/index.js +0 -2
  19. package/cjs/components/Card/Card.js +4 -77
  20. package/cjs/components/Card/CardButton.js +9 -14
  21. package/cjs/components/Card/PreviewPanel.js +21 -52
  22. package/cjs/components/Card/helpers.js +6 -6
  23. package/cjs/components/Card/index.js +0 -3
  24. package/cjs/components/CardList/CardList.js +44 -100
  25. package/cjs/components/CardList/CardListToolbar.js +17 -51
  26. package/cjs/components/CardList/index.js +0 -2
  27. package/cjs/components/Carousel/Carousel.js +41 -74
  28. package/cjs/components/Carousel/index.js +0 -2
  29. package/cjs/components/Checkbox/Checkbox.js +16 -26
  30. package/cjs/components/Checkbox/index.js +0 -2
  31. package/cjs/components/ClosingConfirmation/index.js +0 -2
  32. package/cjs/components/ClosingConfirmation/useClosingConfirmation.js +6 -23
  33. package/cjs/components/CodeEditor/CodeEditor.js +23 -62
  34. package/cjs/components/CodeEditor/CodeMirror.js +1 -12
  35. package/cjs/components/CodeEditor/index.js +0 -2
  36. package/cjs/components/Columns/Column.js +15 -24
  37. package/cjs/components/Columns/Columns.js +19 -31
  38. package/cjs/components/Columns/index.js +0 -3
  39. package/cjs/components/ComboBox/ComboBox.js +16 -59
  40. package/cjs/components/ComboBox/ComboBoxOption.js +1 -7
  41. package/cjs/components/ComboBox/index.js +0 -3
  42. package/cjs/components/ComboBoxDropdown/ComboBoxDropdown.js +22 -50
  43. package/cjs/components/ComboBoxDropdown/index.js +0 -3
  44. package/cjs/components/ConsoleOutput/ConsoleOutput.js +3 -22
  45. package/cjs/components/ConsoleOutput/index.js +0 -2
  46. package/cjs/components/ContentLoader/ContentLoader.js +16 -31
  47. package/cjs/components/ContentLoader/IconsLoader.js +15 -32
  48. package/cjs/components/ContentLoader/index.js +0 -2
  49. package/cjs/components/Cuttable/Cuttable.js +23 -35
  50. package/cjs/components/Cuttable/Cuttable.stories.js +1 -9
  51. package/cjs/components/Cuttable/index.js +0 -2
  52. package/cjs/components/Dialog/Dialog.js +45 -90
  53. package/cjs/components/Dialog/Dialog.stories.js +3 -13
  54. package/cjs/components/Dialog/index.js +0 -2
  55. package/cjs/components/DistractionFreeModeContext/DistractionFreeModeContext.js +1 -2
  56. package/cjs/components/DistractionFreeModeContext/index.js +0 -2
  57. package/cjs/components/Drawer/Drawer.js +77 -112
  58. package/cjs/components/Drawer/Drawer.stories.js +7 -19
  59. package/cjs/components/Drawer/DrawerProgress.js +3 -33
  60. package/cjs/components/Drawer/Header.js +5 -26
  61. package/cjs/components/Drawer/ScrollDirection.js +3 -10
  62. package/cjs/components/Drawer/index.js +0 -2
  63. package/cjs/components/Dropdown/Dropdown.js +26 -65
  64. package/cjs/components/Dropdown/index.js +0 -2
  65. package/cjs/components/ExtendedStatusMessage/ExtendedStatusMessage.js +26 -31
  66. package/cjs/components/ExtendedStatusMessage/ExtendedStatusMessageActions.js +11 -14
  67. package/cjs/components/ExtendedStatusMessage/ExtendedStatusMessageDescription.js +11 -14
  68. package/cjs/components/ExtendedStatusMessage/ExtendedStatusMessageSeparator.js +9 -11
  69. package/cjs/components/ExtendedStatusMessage/ExtendedStatusMessageTitle.js +12 -16
  70. package/cjs/components/ExtendedStatusMessage/index.js +0 -6
  71. package/cjs/components/Figure/Figure.js +18 -27
  72. package/cjs/components/Figure/index.js +0 -2
  73. package/cjs/components/FocusTrap/FocusTrap.js +9 -39
  74. package/cjs/components/FocusTrap/index.js +0 -2
  75. package/cjs/components/Form/DisabledContext.js +1 -2
  76. package/cjs/components/Form/Form.js +68 -111
  77. package/cjs/components/Form/Form.stories.js +1 -8
  78. package/cjs/components/Form/FormContext.js +1 -2
  79. package/cjs/components/Form/ScrollableElementFormContext.js +1 -2
  80. package/cjs/components/Form/index.js +0 -3
  81. package/cjs/components/Form/utils.js +7 -19
  82. package/cjs/components/FormField/FormField.js +50 -113
  83. package/cjs/components/FormField/index.js +0 -2
  84. package/cjs/components/FormFieldCheckbox/FormFieldCheckbox.js +44 -58
  85. package/cjs/components/FormFieldCheckbox/FormFieldCheckbox.stories.js +3 -9
  86. package/cjs/components/FormFieldCheckbox/index.js +0 -2
  87. package/cjs/components/FormFieldPassword/FormFieldPassword.js +23 -42
  88. package/cjs/components/FormFieldPassword/PasswordMeter.js +13 -24
  89. package/cjs/components/FormFieldPassword/estimatePassword.js +3 -42
  90. package/cjs/components/FormFieldPassword/generatePassword.js +1 -2
  91. package/cjs/components/FormFieldPassword/index.js +0 -3
  92. package/cjs/components/FormFieldRadioButtons/FormFieldRadioButtons.js +49 -69
  93. package/cjs/components/FormFieldRadioButtons/index.js +0 -2
  94. package/cjs/components/FormFieldSelect/FormFieldSelect.js +36 -39
  95. package/cjs/components/FormFieldSelect/index.js +0 -2
  96. package/cjs/components/FormFieldText/FormFieldText.js +33 -56
  97. package/cjs/components/FormFieldText/index.js +0 -2
  98. package/cjs/components/Grid/Grid.js +16 -49
  99. package/cjs/components/Grid/index.js +0 -2
  100. package/cjs/components/GridCol/GridCol.js +13 -26
  101. package/cjs/components/GridCol/index.js +0 -2
  102. package/cjs/components/Heading/Heading.js +10 -24
  103. package/cjs/components/Heading/index.js +0 -2
  104. package/cjs/components/Hint/Hint.js +8 -14
  105. package/cjs/components/Hint/index.js +0 -2
  106. package/cjs/components/Icon/Icon.js +18 -34
  107. package/cjs/components/Icon/Icon.stories.js +1 -8
  108. package/cjs/components/Icon/constants.js +3 -3
  109. package/cjs/components/Icon/images/symbols.svg +59 -1
  110. package/cjs/components/Icon/index.js +0 -4
  111. package/cjs/components/Icon/oldIconNames.js +1 -0
  112. package/cjs/components/Icon/utils.js +5 -16
  113. package/cjs/components/InPlaceEdit/InPlaceEdit.js +11 -29
  114. package/cjs/components/InPlaceEdit/index.js +0 -2
  115. package/cjs/components/Input/Input.js +13 -19
  116. package/cjs/components/Input/index.js +0 -2
  117. package/cjs/components/InputFile/InputFile.js +14 -33
  118. package/cjs/components/InputFile/index.js +0 -2
  119. package/cjs/components/InputNumber/InputNumber.js +20 -57
  120. package/cjs/components/InputNumber/index.js +0 -2
  121. package/cjs/components/Item/Item.js +2 -42
  122. package/cjs/components/Item/index.js +0 -2
  123. package/cjs/components/ItemLink/ItemLink.js +8 -16
  124. package/cjs/components/ItemLink/ItemLink.stories.js +1 -5
  125. package/cjs/components/ItemLink/index.js +0 -2
  126. package/cjs/components/ItemList/ItemList.js +29 -72
  127. package/cjs/components/ItemList/ItemList.stories.js +11 -16
  128. package/cjs/components/ItemList/index.js +0 -2
  129. package/cjs/components/Label/Label.js +12 -16
  130. package/cjs/components/Label/index.js +0 -2
  131. package/cjs/components/Layer/Layer.js +12 -23
  132. package/cjs/components/Layer/index.js +0 -4
  133. package/cjs/components/Layout/Layout.js +66 -111
  134. package/cjs/components/Layout/index.js +0 -2
  135. package/cjs/components/Link/Link.js +17 -31
  136. package/cjs/components/Link/index.js +0 -2
  137. package/cjs/components/List/List.js +217 -377
  138. package/cjs/components/List/List.stories.js +18 -24
  139. package/cjs/components/List/ListAction.js +8 -17
  140. package/cjs/components/List/ListActions.js +12 -31
  141. package/cjs/components/List/ListActionsDivider.js +0 -5
  142. package/cjs/components/List/ListEmptyView.js +23 -39
  143. package/cjs/components/List/ListOperation.js +14 -42
  144. package/cjs/components/List/ListOperationContext.js +1 -2
  145. package/cjs/components/List/example-data/domains.js +1 -12
  146. package/cjs/components/List/images/default.png +0 -0
  147. package/cjs/components/List/images/filtered.png +0 -0
  148. package/cjs/components/List/index.js +0 -7
  149. package/cjs/components/LocaleProvider/LocaleProvider.js +10 -34
  150. package/cjs/components/LocaleProvider/index.js +0 -4
  151. package/cjs/components/Markdown/Markdown.js +18 -29
  152. package/cjs/components/Markdown/index.js +0 -2
  153. package/cjs/components/Media/Media.js +15 -41
  154. package/cjs/components/Media/MediaSection.js +11 -18
  155. package/cjs/components/Media/index.js +0 -3
  156. package/cjs/components/Menu/Menu.js +14 -49
  157. package/cjs/components/Menu/Menu.stories.js +1 -9
  158. package/cjs/components/Menu/MenuBaseItem.js +22 -35
  159. package/cjs/components/Menu/MenuDivider.js +11 -17
  160. package/cjs/components/Menu/MenuHeader.js +12 -20
  161. package/cjs/components/Menu/MenuItem.js +13 -35
  162. package/cjs/components/Menu/MenuSelectableItem.js +15 -24
  163. package/cjs/components/Menu/index.js +0 -7
  164. package/cjs/components/OnDarkContext/OnDarkContext.js +1 -2
  165. package/cjs/components/OnDarkContext/index.js +0 -2
  166. package/cjs/components/Overlay/Backdrop.js +12 -18
  167. package/cjs/components/Overlay/Focuser.js +1 -24
  168. package/cjs/components/Overlay/Overlay.js +22 -71
  169. package/cjs/components/Overlay/index.js +0 -2
  170. package/cjs/components/PageHeader/PageHeader.js +35 -43
  171. package/cjs/components/PageHeader/index.js +0 -2
  172. package/cjs/components/Pagination/Pagination.js +18 -38
  173. package/cjs/components/Pagination/index.js +0 -3
  174. package/cjs/components/Panel/Panel.js +10 -29
  175. package/cjs/components/Panel/index.js +0 -2
  176. package/cjs/components/Paragraph/Paragraph.js +12 -16
  177. package/cjs/components/Paragraph/index.js +0 -2
  178. package/cjs/components/Plaintext/Plaintext.js +10 -16
  179. package/cjs/components/Plaintext/index.js +0 -2
  180. package/cjs/components/Popover/Popover.js +18 -85
  181. package/cjs/components/Popover/Popover.stories.js +5 -14
  182. package/cjs/components/Popover/index.js +0 -2
  183. package/cjs/components/Popper/Popper.js +14 -52
  184. package/cjs/components/Popper/index.js +0 -2
  185. package/cjs/components/Progress/Progress.js +6 -32
  186. package/cjs/components/Progress/index.js +0 -2
  187. package/cjs/components/ProgressBar/ProgressBar.js +21 -28
  188. package/cjs/components/ProgressBar/ProgressIndicator.js +18 -21
  189. package/cjs/components/ProgressBar/index.js +0 -2
  190. package/cjs/components/ProgressDialog/ProgressDialog.js +6 -45
  191. package/cjs/components/ProgressDialog/index.js +0 -2
  192. package/cjs/components/ProgressDialogStep/ProgressDialogStep.js +0 -6
  193. package/cjs/components/ProgressDialogStep/index.js +0 -2
  194. package/cjs/components/ProgressStep/ProgressStep.js +14 -43
  195. package/cjs/components/ProgressStep/index.js +0 -4
  196. package/cjs/components/Radio/Radio.js +15 -21
  197. package/cjs/components/Radio/index.js +0 -2
  198. package/cjs/components/Rating/Rating.js +24 -34
  199. package/cjs/components/Rating/index.js +0 -2
  200. package/cjs/components/ResponsiveContext/ResponsiveContext.js +1 -2
  201. package/cjs/components/ResponsiveContext/index.js +0 -2
  202. package/cjs/components/Section/Section.js +73 -112
  203. package/cjs/components/Section/SectionItem.js +10 -25
  204. package/cjs/components/Section/index.js +0 -3
  205. package/cjs/components/SegmentedControl/SegmentedControl.js +37 -89
  206. package/cjs/components/SegmentedControl/index.js +0 -2
  207. package/cjs/components/Select/MultiValue.js +8 -16
  208. package/cjs/components/Select/Select.js +24 -88
  209. package/cjs/components/Select/Select.stories.js +1 -9
  210. package/cjs/components/Select/SelectControl.js +39 -68
  211. package/cjs/components/Select/SelectOption.js +1 -7
  212. package/cjs/components/Select/SelectOptionGroup.js +0 -5
  213. package/cjs/components/Select/index.js +0 -4
  214. package/cjs/components/Skeleton/Skeleton.js +13 -19
  215. package/cjs/components/Skeleton/Skeleton.stories.js +1 -7
  216. package/cjs/components/Skeleton/SkeletonTabs.js +16 -21
  217. package/cjs/components/Skeleton/SkeletonTabs.stories.js +1 -5
  218. package/cjs/components/Skeleton/SkeletonText.js +21 -25
  219. package/cjs/components/Skeleton/SkeletonText.stories.js +1 -9
  220. package/cjs/components/Skeleton/index.js +0 -4
  221. package/cjs/components/Spinner/Spinner.js +21 -25
  222. package/cjs/components/Spinner/index.js +0 -2
  223. package/cjs/components/SplitButton/SplitButton.js +13 -40
  224. package/cjs/components/SplitButton/index.js +0 -2
  225. package/cjs/components/Spot/Spot.js +10 -30
  226. package/cjs/components/Spot/SpotPopup.js +22 -34
  227. package/cjs/components/Spot/SpotPulsar.js +9 -21
  228. package/cjs/components/Spot/index.js +0 -2
  229. package/cjs/components/Squeezer/Squeezer.js +15 -28
  230. package/cjs/components/Squeezer/index.js +0 -2
  231. package/cjs/components/Status/Status.js +17 -31
  232. package/cjs/components/Status/Status.stories.js +1 -5
  233. package/cjs/components/Status/index.js +0 -2
  234. package/cjs/components/StatusMessage/StatusMessage.js +16 -23
  235. package/cjs/components/StatusMessage/index.js +0 -2
  236. package/cjs/components/Subnav/Subnav.js +23 -50
  237. package/cjs/components/Subnav/index.js +0 -4
  238. package/cjs/components/Switch/Switch.js +2 -29
  239. package/cjs/components/Switch/index.js +0 -2
  240. package/cjs/components/SwitchesPanel/SwitchesPanel.js +15 -25
  241. package/cjs/components/SwitchesPanel/index.js +0 -2
  242. package/cjs/components/SwitchesPanelItem/SwitchesPanelItem.js +2 -27
  243. package/cjs/components/SwitchesPanelItem/index.js +0 -2
  244. package/cjs/components/Tabs/SearchBar.js +6 -83
  245. package/cjs/components/Tabs/Tab.js +6 -15
  246. package/cjs/components/Tabs/Tabs.js +40 -123
  247. package/cjs/components/Tabs/Tabs.stories.js +1 -6
  248. package/cjs/components/Tabs/index.js +0 -4
  249. package/cjs/components/Text/Text.js +15 -25
  250. package/cjs/components/Text/index.js +0 -2
  251. package/cjs/components/TextArea/TextArea.js +8 -31
  252. package/cjs/components/TextArea/calculateNodeHeight.js +14 -21
  253. package/cjs/components/TextArea/index.js +0 -2
  254. package/cjs/components/Toast/Toast.js +3 -27
  255. package/cjs/components/Toast/index.js +0 -4
  256. package/cjs/components/Toaster/Toaster.js +45 -61
  257. package/cjs/components/Toaster/index.js +0 -2
  258. package/cjs/components/Toolbar/RegistryContext.js +3 -14
  259. package/cjs/components/Toolbar/Toolbar.js +16 -31
  260. package/cjs/components/Toolbar/ToolbarExpander.js +7 -18
  261. package/cjs/components/Toolbar/ToolbarGroup.js +5 -37
  262. package/cjs/components/Toolbar/ToolbarItem.js +3 -25
  263. package/cjs/components/Toolbar/ToolbarMenu.js +7 -34
  264. package/cjs/components/Toolbar/index.js +0 -4
  265. package/cjs/components/Tooltip/Tooltip.js +28 -49
  266. package/cjs/components/Tooltip/index.js +0 -2
  267. package/cjs/components/Tour/Tour.js +11 -19
  268. package/cjs/components/Tour/index.js +0 -2
  269. package/cjs/components/Translate/Translate.js +14 -37
  270. package/cjs/components/Translate/index.js +0 -3
  271. package/cjs/components/VerticalContext/VerticalContext.js +1 -2
  272. package/cjs/components/VerticalContext/index.js +0 -3
  273. package/cjs/components/index.js +0 -104
  274. package/cjs/components/intentIconMap.js +1 -0
  275. package/cjs/components/utils.js +39 -81
  276. package/cjs/constants.js +1 -0
  277. package/cjs/index.js +1 -9
  278. package/cjs/publicPath.js +3 -7
  279. package/cjs/utils.js +3 -9
  280. package/dist/images/default.png +0 -0
  281. package/dist/images/filtered.png +0 -0
  282. package/dist/images/symbols.svg +59 -1
  283. package/dist/plesk-ui-library-rtl.css +1 -1
  284. package/dist/plesk-ui-library-rtl.css.map +1 -1
  285. package/dist/plesk-ui-library.css +1 -1
  286. package/dist/plesk-ui-library.css.map +1 -1
  287. package/dist/plesk-ui-library.js +8915 -13255
  288. package/dist/plesk-ui-library.js.map +1 -1
  289. package/dist/plesk-ui-library.min.js +8 -8
  290. package/dist/plesk-ui-library.min.js.map +1 -1
  291. package/esm/components/Action/Action.js +19 -24
  292. package/esm/components/Action/index.js +1 -0
  293. package/esm/components/Alert/Alert.js +19 -17
  294. package/esm/components/Alert/Alert.stories.js +1 -0
  295. package/esm/components/Alert/index.js +1 -0
  296. package/esm/components/AutoClosable/AutoClosable.js +3 -21
  297. package/esm/components/AutoClosable/index.js +1 -0
  298. package/esm/components/AuxiliaryActions/AuxiliaryActions.js +17 -15
  299. package/esm/components/AuxiliaryActions/index.js +1 -0
  300. package/esm/components/Badge/Badge.js +11 -16
  301. package/esm/components/Badge/index.js +1 -0
  302. package/esm/components/Breadcrumbs/Breadcrumbs.js +22 -20
  303. package/esm/components/Breadcrumbs/index.js +1 -0
  304. package/esm/components/Button/Button.js +40 -70
  305. package/esm/components/Button/Button.stories.js +1 -0
  306. package/esm/components/Button/index.js +1 -0
  307. package/esm/components/ButtonGroup/ButtonGroup.js +14 -12
  308. package/esm/components/ButtonGroup/index.js +1 -0
  309. package/esm/components/Card/Card.js +4 -63
  310. package/esm/components/Card/CardButton.js +10 -8
  311. package/esm/components/Card/PreviewPanel.js +21 -42
  312. package/esm/components/Card/helpers.js +6 -5
  313. package/esm/components/Card/index.js +1 -0
  314. package/esm/components/CardList/CardList.js +44 -87
  315. package/esm/components/CardList/CardListToolbar.js +17 -35
  316. package/esm/components/CardList/index.js +1 -0
  317. package/esm/components/Carousel/Carousel.js +41 -64
  318. package/esm/components/Carousel/index.js +1 -0
  319. package/esm/components/Checkbox/Checkbox.js +17 -20
  320. package/esm/components/Checkbox/index.js +1 -0
  321. package/esm/components/ClosingConfirmation/index.js +1 -0
  322. package/esm/components/ClosingConfirmation/locale/en-US.js +1 -0
  323. package/esm/components/ClosingConfirmation/useClosingConfirmation.js +6 -13
  324. package/esm/components/CodeEditor/CodeEditor.js +22 -55
  325. package/esm/components/CodeEditor/CodeMirror.js +1 -4
  326. package/esm/components/CodeEditor/index.js +1 -0
  327. package/esm/components/Columns/Column.js +15 -16
  328. package/esm/components/Columns/Columns.js +20 -22
  329. package/esm/components/Columns/index.js +1 -0
  330. package/esm/components/ComboBox/ComboBox.js +16 -43
  331. package/esm/components/ComboBox/ComboBoxOption.js +2 -5
  332. package/esm/components/ComboBox/index.js +1 -0
  333. package/esm/components/ComboBoxDropdown/ComboBoxDropdown.js +22 -35
  334. package/esm/components/ComboBoxDropdown/index.js +1 -0
  335. package/esm/components/ConsoleOutput/ConsoleOutput.js +3 -19
  336. package/esm/components/ConsoleOutput/index.js +1 -0
  337. package/esm/components/ContentLoader/ContentLoader.js +16 -22
  338. package/esm/components/ContentLoader/IconsLoader.js +15 -23
  339. package/esm/components/ContentLoader/index.js +1 -0
  340. package/esm/components/Cuttable/Cuttable.js +24 -29
  341. package/esm/components/Cuttable/Cuttable.stories.js +1 -0
  342. package/esm/components/Cuttable/index.js +1 -0
  343. package/esm/components/Dialog/Dialog.js +45 -75
  344. package/esm/components/Dialog/Dialog.stories.js +3 -1
  345. package/esm/components/Dialog/index.js +1 -0
  346. package/esm/components/DistractionFreeModeContext/DistractionFreeModeContext.js +1 -0
  347. package/esm/components/DistractionFreeModeContext/index.js +1 -0
  348. package/esm/components/Drawer/Drawer.js +77 -94
  349. package/esm/components/Drawer/Drawer.stories.js +7 -3
  350. package/esm/components/Drawer/DrawerProgress.js +3 -25
  351. package/esm/components/Drawer/Header.js +5 -14
  352. package/esm/components/Drawer/ScrollDirection.js +3 -9
  353. package/esm/components/Drawer/index.js +1 -0
  354. package/esm/components/Dropdown/Dropdown.js +26 -48
  355. package/esm/components/Dropdown/index.js +1 -0
  356. package/esm/components/Dropdown/locale/en-US.js +1 -0
  357. package/esm/components/ExtendedStatusMessage/ExtendedStatusMessage.js +27 -25
  358. package/esm/components/ExtendedStatusMessage/ExtendedStatusMessageActions.js +12 -9
  359. package/esm/components/ExtendedStatusMessage/ExtendedStatusMessageDescription.js +12 -9
  360. package/esm/components/ExtendedStatusMessage/ExtendedStatusMessageSeparator.js +10 -7
  361. package/esm/components/ExtendedStatusMessage/ExtendedStatusMessageTitle.js +13 -10
  362. package/esm/components/ExtendedStatusMessage/index.js +1 -0
  363. package/esm/components/Figure/Figure.js +19 -21
  364. package/esm/components/Figure/index.js +1 -0
  365. package/esm/components/FocusTrap/FocusTrap.js +9 -30
  366. package/esm/components/FocusTrap/index.js +1 -0
  367. package/esm/components/Form/DisabledContext.js +1 -0
  368. package/esm/components/Form/Form.js +68 -102
  369. package/esm/components/Form/Form.stories.js +1 -0
  370. package/esm/components/Form/FormContext.js +1 -0
  371. package/esm/components/Form/ScrollableElementFormContext.js +1 -0
  372. package/esm/components/Form/index.js +1 -0
  373. package/esm/components/Form/utils.js +7 -17
  374. package/esm/components/FormField/FormField.js +50 -98
  375. package/esm/components/FormField/index.js +1 -0
  376. package/esm/components/FormFieldCheckbox/FormFieldCheckbox.js +45 -48
  377. package/esm/components/FormFieldCheckbox/FormFieldCheckbox.stories.js +3 -1
  378. package/esm/components/FormFieldCheckbox/index.js +1 -0
  379. package/esm/components/FormFieldPassword/FormFieldPassword.js +24 -31
  380. package/esm/components/FormFieldPassword/PasswordMeter.js +13 -14
  381. package/esm/components/FormFieldPassword/estimatePassword.js +3 -35
  382. package/esm/components/FormFieldPassword/generatePassword.js +1 -2
  383. package/esm/components/FormFieldPassword/index.js +1 -0
  384. package/esm/components/FormFieldPassword/locale/en-US.js +1 -0
  385. package/esm/components/FormFieldRadioButtons/FormFieldRadioButtons.js +50 -58
  386. package/esm/components/FormFieldRadioButtons/index.js +1 -0
  387. package/esm/components/FormFieldSelect/FormFieldSelect.js +37 -32
  388. package/esm/components/FormFieldSelect/index.js +1 -0
  389. package/esm/components/FormFieldText/FormFieldText.js +34 -45
  390. package/esm/components/FormFieldText/index.js +1 -0
  391. package/esm/components/Grid/Grid.js +17 -40
  392. package/esm/components/Grid/index.js +1 -0
  393. package/esm/components/GridCol/GridCol.js +14 -19
  394. package/esm/components/GridCol/index.js +1 -0
  395. package/esm/components/Heading/Heading.js +11 -16
  396. package/esm/components/Heading/index.js +1 -0
  397. package/esm/components/Hint/Hint.js +9 -9
  398. package/esm/components/Hint/index.js +1 -0
  399. package/esm/components/Icon/Icon.js +18 -20
  400. package/esm/components/Icon/Icon.stories.js +1 -0
  401. package/esm/components/Icon/constants.js +3 -2
  402. package/esm/components/Icon/images/symbols.svg +59 -1
  403. package/esm/components/Icon/index.js +1 -0
  404. package/esm/components/Icon/oldIconNames.js +1 -0
  405. package/esm/components/Icon/utils.js +5 -7
  406. package/esm/components/InPlaceEdit/InPlaceEdit.js +12 -20
  407. package/esm/components/InPlaceEdit/index.js +1 -0
  408. package/esm/components/InPlaceEdit/locale/en-US.js +1 -0
  409. package/esm/components/Input/Input.js +14 -14
  410. package/esm/components/Input/index.js +1 -0
  411. package/esm/components/InputFile/InputFile.js +14 -21
  412. package/esm/components/InputFile/index.js +1 -0
  413. package/esm/components/InputFile/locale/en-US.js +1 -0
  414. package/esm/components/InputNumber/InputNumber.js +20 -47
  415. package/esm/components/InputNumber/index.js +1 -0
  416. package/esm/components/Item/Item.js +2 -28
  417. package/esm/components/Item/index.js +1 -0
  418. package/esm/components/ItemLink/ItemLink.js +9 -10
  419. package/esm/components/ItemLink/ItemLink.stories.js +1 -0
  420. package/esm/components/ItemLink/index.js +1 -0
  421. package/esm/components/ItemList/ItemList.js +29 -62
  422. package/esm/components/ItemList/ItemList.stories.js +11 -7
  423. package/esm/components/ItemList/index.js +1 -0
  424. package/esm/components/Label/Label.js +13 -11
  425. package/esm/components/Label/index.js +1 -0
  426. package/esm/components/Layer/Layer.js +12 -14
  427. package/esm/components/Layer/index.js +1 -0
  428. package/esm/components/Layout/Layout.js +66 -105
  429. package/esm/components/Layout/index.js +1 -0
  430. package/esm/components/Link/Link.js +18 -20
  431. package/esm/components/Link/index.js +1 -0
  432. package/esm/components/List/List.js +216 -365
  433. package/esm/components/List/List.stories.js +18 -12
  434. package/esm/components/List/ListAction.js +9 -12
  435. package/esm/components/List/ListActions.js +13 -17
  436. package/esm/components/List/ListActionsDivider.js +1 -2
  437. package/esm/components/List/ListEmptyView.js +23 -30
  438. package/esm/components/List/ListOperation.js +14 -29
  439. package/esm/components/List/ListOperationContext.js +1 -0
  440. package/esm/components/List/example-data/domains.js +1 -12
  441. package/esm/components/List/images/default.png +0 -0
  442. package/esm/components/List/images/filtered.png +0 -0
  443. package/esm/components/List/index.js +1 -0
  444. package/esm/components/LocaleProvider/LocaleProvider.js +11 -28
  445. package/esm/components/LocaleProvider/index.js +1 -0
  446. package/esm/components/Markdown/Markdown.js +19 -22
  447. package/esm/components/Markdown/index.js +1 -0
  448. package/esm/components/Media/Media.js +16 -31
  449. package/esm/components/Media/MediaSection.js +13 -12
  450. package/esm/components/Media/index.js +1 -0
  451. package/esm/components/Menu/Menu.js +14 -34
  452. package/esm/components/Menu/Menu.stories.js +1 -1
  453. package/esm/components/Menu/MenuBaseItem.js +24 -26
  454. package/esm/components/Menu/MenuDivider.js +13 -11
  455. package/esm/components/Menu/MenuHeader.js +14 -13
  456. package/esm/components/Menu/MenuItem.js +15 -24
  457. package/esm/components/Menu/MenuSelectableItem.js +17 -17
  458. package/esm/components/Menu/index.js +1 -0
  459. package/esm/components/OnDarkContext/OnDarkContext.js +1 -0
  460. package/esm/components/OnDarkContext/index.js +1 -0
  461. package/esm/components/Overlay/Backdrop.js +13 -13
  462. package/esm/components/Overlay/Focuser.js +1 -18
  463. package/esm/components/Overlay/Overlay.js +23 -63
  464. package/esm/components/Overlay/index.js +1 -0
  465. package/esm/components/PageHeader/PageHeader.js +36 -34
  466. package/esm/components/PageHeader/index.js +1 -0
  467. package/esm/components/Pagination/Pagination.js +18 -24
  468. package/esm/components/Pagination/index.js +1 -0
  469. package/esm/components/Panel/Panel.js +11 -18
  470. package/esm/components/Panel/index.js +1 -0
  471. package/esm/components/Paragraph/Paragraph.js +13 -11
  472. package/esm/components/Paragraph/index.js +1 -0
  473. package/esm/components/Plaintext/Plaintext.js +11 -11
  474. package/esm/components/Plaintext/index.js +1 -0
  475. package/esm/components/Popover/Popover.js +18 -73
  476. package/esm/components/Popover/Popover.stories.js +5 -2
  477. package/esm/components/Popover/index.js +1 -0
  478. package/esm/components/Popper/Popper.js +16 -44
  479. package/esm/components/Popper/index.js +1 -0
  480. package/esm/components/Progress/Progress.js +7 -22
  481. package/esm/components/Progress/index.js +1 -0
  482. package/esm/components/ProgressBar/ProgressBar.js +22 -20
  483. package/esm/components/ProgressBar/ProgressIndicator.js +19 -17
  484. package/esm/components/ProgressBar/index.js +1 -0
  485. package/esm/components/ProgressDialog/ProgressDialog.js +7 -35
  486. package/esm/components/ProgressDialog/index.js +1 -0
  487. package/esm/components/ProgressDialogStep/ProgressDialogStep.js +2 -3
  488. package/esm/components/ProgressDialogStep/index.js +1 -0
  489. package/esm/components/ProgressStep/ProgressStep.js +14 -29
  490. package/esm/components/ProgressStep/index.js +1 -0
  491. package/esm/components/Radio/Radio.js +15 -15
  492. package/esm/components/Radio/index.js +1 -0
  493. package/esm/components/Rating/Rating.js +24 -28
  494. package/esm/components/Rating/index.js +1 -0
  495. package/esm/components/ResponsiveContext/ResponsiveContext.js +1 -0
  496. package/esm/components/ResponsiveContext/index.js +1 -0
  497. package/esm/components/Section/Section.js +73 -98
  498. package/esm/components/Section/SectionItem.js +11 -16
  499. package/esm/components/Section/index.js +1 -0
  500. package/esm/components/SegmentedControl/SegmentedControl.js +37 -79
  501. package/esm/components/SegmentedControl/index.js +1 -0
  502. package/esm/components/Select/MultiValue.js +8 -10
  503. package/esm/components/Select/Select.js +24 -73
  504. package/esm/components/Select/Select.stories.js +1 -0
  505. package/esm/components/Select/SelectControl.js +39 -57
  506. package/esm/components/Select/SelectOption.js +2 -5
  507. package/esm/components/Select/SelectOptionGroup.js +1 -3
  508. package/esm/components/Select/index.js +1 -0
  509. package/esm/components/Skeleton/Skeleton.js +14 -13
  510. package/esm/components/Skeleton/Skeleton.stories.js +1 -0
  511. package/esm/components/Skeleton/SkeletonTabs.js +17 -15
  512. package/esm/components/Skeleton/SkeletonTabs.stories.js +1 -0
  513. package/esm/components/Skeleton/SkeletonText.js +22 -19
  514. package/esm/components/Skeleton/SkeletonText.stories.js +1 -0
  515. package/esm/components/Skeleton/index.js +1 -0
  516. package/esm/components/Spinner/Spinner.js +22 -20
  517. package/esm/components/Spinner/index.js +1 -0
  518. package/esm/components/SplitButton/SplitButton.js +13 -27
  519. package/esm/components/SplitButton/index.js +1 -0
  520. package/esm/components/Spot/Spot.js +10 -19
  521. package/esm/components/Spot/SpotPopup.js +22 -21
  522. package/esm/components/Spot/SpotPulsar.js +9 -13
  523. package/esm/components/Spot/index.js +1 -0
  524. package/esm/components/Squeezer/Squeezer.js +15 -26
  525. package/esm/components/Squeezer/index.js +1 -0
  526. package/esm/components/Status/Status.js +17 -20
  527. package/esm/components/Status/Status.stories.js +1 -0
  528. package/esm/components/Status/index.js +1 -0
  529. package/esm/components/StatusMessage/StatusMessage.js +17 -15
  530. package/esm/components/StatusMessage/index.js +1 -0
  531. package/esm/components/Subnav/Subnav.js +24 -38
  532. package/esm/components/Subnav/index.js +1 -0
  533. package/esm/components/Switch/Switch.js +3 -19
  534. package/esm/components/Switch/index.js +1 -0
  535. package/esm/components/SwitchesPanel/SwitchesPanel.js +16 -16
  536. package/esm/components/SwitchesPanel/index.js +1 -0
  537. package/esm/components/SwitchesPanelItem/SwitchesPanelItem.js +3 -17
  538. package/esm/components/SwitchesPanelItem/index.js +1 -0
  539. package/esm/components/Tabs/SearchBar.js +7 -78
  540. package/esm/components/Tabs/Tab.js +8 -12
  541. package/esm/components/Tabs/Tabs.js +40 -106
  542. package/esm/components/Tabs/Tabs.stories.js +1 -0
  543. package/esm/components/Tabs/index.js +1 -0
  544. package/esm/components/Text/Text.js +16 -17
  545. package/esm/components/Text/index.js +1 -0
  546. package/esm/components/TextArea/TextArea.js +8 -26
  547. package/esm/components/TextArea/calculateNodeHeight.js +14 -21
  548. package/esm/components/TextArea/index.js +1 -0
  549. package/esm/components/Toast/Toast.js +3 -13
  550. package/esm/components/Toast/index.js +1 -0
  551. package/esm/components/Toaster/Toaster.js +45 -50
  552. package/esm/components/Toaster/index.js +1 -0
  553. package/esm/components/Toolbar/RegistryContext.js +3 -10
  554. package/esm/components/Toolbar/Toolbar.js +17 -20
  555. package/esm/components/Toolbar/ToolbarExpander.js +8 -10
  556. package/esm/components/Toolbar/ToolbarGroup.js +6 -22
  557. package/esm/components/Toolbar/ToolbarItem.js +3 -13
  558. package/esm/components/Toolbar/ToolbarMenu.js +7 -21
  559. package/esm/components/Toolbar/index.js +1 -0
  560. package/esm/components/Tooltip/Tooltip.js +28 -43
  561. package/esm/components/Tooltip/index.js +1 -0
  562. package/esm/components/Tour/Tour.js +12 -16
  563. package/esm/components/Tour/index.js +1 -0
  564. package/esm/components/Translate/Translate.js +14 -28
  565. package/esm/components/Translate/index.js +1 -0
  566. package/esm/components/VerticalContext/VerticalContext.js +1 -0
  567. package/esm/components/VerticalContext/index.js +1 -0
  568. package/esm/components/index.js +1 -0
  569. package/esm/components/intentIconMap.js +1 -0
  570. package/esm/components/utils.js +39 -60
  571. package/esm/constants.js +1 -0
  572. package/esm/index.js +1 -1
  573. package/esm/publicPath.js +3 -7
  574. package/esm/utils.js +4 -1
  575. package/package.json +68 -63
  576. package/styleguide/build/bundle.26082873.js +2 -0
  577. package/styleguide/build/{bundle.59e52792.js.LICENSE.txt → bundle.26082873.js.LICENSE.txt} +18 -7
  578. package/styleguide/images/default.png +0 -0
  579. package/styleguide/images/empty-list.png +0 -0
  580. package/styleguide/images/filtered.png +0 -0
  581. package/styleguide/images/symbols.svg +59 -1
  582. package/styleguide/index.html +2 -2
  583. package/types/package.d.ts +13 -8
  584. package/types/src/components/Button/Button.stories.d.ts +0 -1
  585. package/types/src/components/ClosingConfirmation/useClosingConfirmation.d.ts +1 -1
  586. package/types/src/components/Dialog/Dialog.stories.d.ts +0 -1
  587. package/types/src/components/DistractionFreeModeContext/DistractionFreeModeContext.d.ts +0 -1
  588. package/types/src/components/Drawer/Drawer.stories.d.ts +0 -1
  589. package/types/src/components/Form/DisabledContext.d.ts +0 -1
  590. package/types/src/components/Form/Form.d.ts +3 -3
  591. package/types/src/components/Form/Form.stories.d.ts +0 -1
  592. package/types/src/components/Form/FormContext.d.ts +0 -1
  593. package/types/src/components/FormFieldCheckbox/FormFieldCheckbox.stories.d.ts +0 -1
  594. package/types/src/components/Icon/Icon.stories.d.ts +0 -1
  595. package/types/src/components/Icon/constants.d.ts +1 -1
  596. package/types/src/components/ItemList/ItemList.d.ts +1 -1
  597. package/types/src/components/ItemList/ItemList.stories.d.ts +24 -24
  598. package/types/src/components/List/List.stories.d.ts +0 -1
  599. package/types/src/components/Menu/Menu.stories.d.ts +0 -1
  600. package/types/src/components/OnDarkContext/OnDarkContext.d.ts +0 -1
  601. package/types/src/components/Popover/Popover.stories.d.ts +0 -1
  602. package/types/src/components/ResponsiveContext/ResponsiveContext.d.ts +0 -1
  603. package/types/src/components/Select/Select.stories.d.ts +1 -1
  604. package/types/src/components/Skeleton/SkeletonText.stories.d.ts +3 -3
  605. package/types/src/components/Status/Status.stories.d.ts +2 -2
  606. package/types/src/components/Tabs/Tabs.stories.d.ts +0 -1
  607. package/types/src/components/Toolbar/RegistryContext.d.ts +0 -1
  608. package/types/src/components/Toolbar/ToolbarItem.d.ts +1 -1
  609. package/types/src/components/VerticalContext/VerticalContext.d.ts +0 -1
  610. package/cjs/components/List/images/default.svg +0 -1
  611. package/cjs/components/List/images/filtered.svg +0 -1
  612. package/esm/components/List/images/default.svg +0 -1
  613. package/esm/components/List/images/filtered.svg +0 -1
  614. package/styleguide/build/bundle.59e52792.js +0 -2
@@ -1,77 +1,50 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = void 0;
9
-
10
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
-
12
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
-
14
10
  var _react = _interopRequireWildcard(require("react"));
15
-
16
11
  var _propTypes = _interopRequireDefault(require("prop-types"));
17
-
18
12
  var _classnames = _interopRequireDefault(require("classnames"));
19
-
20
13
  var _reactTransitionGroup = require("react-transition-group");
21
-
22
14
  var _memoizeOne = _interopRequireDefault(require("memoize-one"));
23
-
24
15
  var _reactMeasure = _interopRequireDefault(require("react-measure"));
25
-
26
16
  var _constants = require("../../constants");
27
-
28
17
  var _Checkbox = _interopRequireDefault(require("../Checkbox"));
29
-
30
18
  var _Icon = _interopRequireDefault(require("../Icon"));
31
-
32
19
  var _utils = require("../utils");
33
-
34
20
  var _Button = _interopRequireDefault(require("../Button"));
35
-
36
21
  var _Translate = _interopRequireDefault(require("../Translate"));
37
-
38
22
  var _Text = _interopRequireDefault(require("../Text"));
39
-
40
23
  var _Pagination = require("../Pagination");
41
-
42
24
  var _Spinner = _interopRequireDefault(require("../Spinner"));
43
-
44
25
  var _ListOperationContext = _interopRequireDefault(require("./ListOperationContext"));
45
-
46
26
  var _VerticalContext = _interopRequireWildcard(require("../VerticalContext"));
47
-
48
27
  var _ListEmptyView = _interopRequireDefault(require("./ListEmptyView"));
49
-
50
28
  var _Columns = _interopRequireWildcard(require("../Columns"));
51
-
52
29
  var _useFocusVisible = require("use-focus-visible");
53
-
54
30
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
55
-
56
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
57
-
31
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } // Copyright 1999-2021. Plesk International GmbH. All rights reserved.
32
+ /* eslint-disable react/no-deprecated */
58
33
  const getRowKey = (row, props) => {
59
34
  const {
60
35
  rowKey
61
36
  } = props;
62
-
63
37
  if (typeof rowKey === 'function') {
64
38
  return rowKey(row);
65
39
  }
66
-
67
40
  return row[rowKey];
68
41
  };
69
-
70
- const Tbody = ({
71
- baseClassName,
72
- className,
73
- ...props
74
- }) => {
42
+ const Tbody = _ref => {
43
+ let {
44
+ baseClassName,
45
+ className,
46
+ ...props
47
+ } = _ref;
75
48
  const {
76
49
  focusVisible,
77
50
  onFocus,
@@ -85,7 +58,6 @@ const Tbody = ({
85
58
  })
86
59
  }));
87
60
  };
88
-
89
61
  Tbody.propTypes = {
90
62
  onFocus: _propTypes.default.func,
91
63
  onBlur: _propTypes.default.func,
@@ -97,16 +69,17 @@ Tbody.defaultProps = {
97
69
  onBlur: undefined,
98
70
  className: undefined,
99
71
  baseClassName: `${_constants.CLS_PREFIX}list__wrapper`
100
- }; // eslint-disable-next-line react/prop-types
72
+ };
101
73
 
102
- const getHumanTotalRows = ({
103
- selectedRows,
104
- totalRows,
105
- allRowsSelected,
106
- translators
107
- }) => {
74
+ // eslint-disable-next-line react/prop-types
75
+ const getHumanTotalRows = _ref2 => {
76
+ let {
77
+ selectedRows,
78
+ totalRows,
79
+ allRowsSelected,
80
+ translators
81
+ } = _ref2;
108
82
  let mode;
109
-
110
83
  if (!allRowsSelected && selectedRows === 0) {
111
84
  mode = 'totalRows';
112
85
  } else if (allRowsSelected || selectedRows === totalRows) {
@@ -114,11 +87,9 @@ const getHumanTotalRows = ({
114
87
  } else {
115
88
  mode = 'selectedRows';
116
89
  }
117
-
118
90
  const wrapToText = element => /*#__PURE__*/_react.default.createElement(_Text.default, {
119
91
  fontSize: "sm"
120
92
  }, element);
121
-
122
93
  switch (mode) {
123
94
  case 'totalRows':
124
95
  return wrapToText( /*#__PURE__*/_react.default.createElement(_Translate.default, {
@@ -130,7 +101,6 @@ const getHumanTotalRows = ({
130
101
  },
131
102
  translators: translators
132
103
  }));
133
-
134
104
  case 'selectedRows':
135
105
  return wrapToText( /*#__PURE__*/_react.default.createElement(_Translate.default, {
136
106
  namespace: "List",
@@ -144,7 +114,6 @@ const getHumanTotalRows = ({
144
114
  },
145
115
  translators: translators
146
116
  }));
147
-
148
117
  case 'selectedAllRows':
149
118
  return wrapToText( /*#__PURE__*/_react.default.createElement(_Translate.default, {
150
119
  namespace: "List",
@@ -163,21 +132,19 @@ const getHumanTotalRows = ({
163
132
  },
164
133
  translators: translators
165
134
  }));
166
-
167
135
  default:
168
136
  return null;
169
137
  }
170
138
  };
139
+
171
140
  /**
172
141
  * `List` component is used for displaying a collection of tabular data.
173
142
  * [More details about designing of lists.](#!/Sets%20of%20Objects)
174
143
  * @since 0.0.42
175
144
  */
176
-
177
-
178
145
  class List extends _react.Component {
179
- constructor(...args) {
180
- super(...args);
146
+ constructor() {
147
+ super(...arguments);
181
148
  (0, _defineProperty2.default)(this, "state", {
182
149
  sortInPlace: !this.props.pagination,
183
150
  vertical: false,
@@ -189,18 +156,17 @@ class List extends _react.Component {
189
156
  reorderableItemWidths: []
190
157
  });
191
158
  (0, _defineProperty2.default)(this, "anchorRef", /*#__PURE__*/(0, _react.createRef)());
192
- (0, _defineProperty2.default)(this, "flatData", data => data.reduce((acc, {
193
- data,
194
- ...row
195
- }) => {
159
+ (0, _defineProperty2.default)(this, "flatData", data => data.reduce((acc, _ref3) => {
160
+ let {
161
+ data,
162
+ ...row
163
+ } = _ref3;
196
164
  const {
197
165
  virtual
198
166
  } = this.getRowProps(row);
199
-
200
167
  if (virtual) {
201
168
  return [...acc, ...(data ? this.flatData(data) : [])];
202
169
  }
203
-
204
170
  return [...acc, row, ...(data ? this.flatData(data) : [])];
205
171
  }, []));
206
172
  (0, _defineProperty2.default)(this, "handleRowSelectionChange", (checked, rowKey) => {
@@ -208,7 +174,6 @@ class List extends _react.Component {
208
174
  onAllRowsSelectedChange
209
175
  } = this.props;
210
176
  let selection;
211
-
212
177
  if (checked) {
213
178
  selection = this.state.selection.slice();
214
179
  selection.push(rowKey);
@@ -216,7 +181,6 @@ class List extends _react.Component {
216
181
  selection = this.state.selection.filter(value => value !== rowKey);
217
182
  (0, _utils.safeInvoke)(onAllRowsSelectedChange, false);
218
183
  }
219
-
220
184
  this.setSelection(selection);
221
185
  });
222
186
  (0, _defineProperty2.default)(this, "handleGlobalSelectionChange", headerChecked => {
@@ -229,29 +193,25 @@ class List extends _react.Component {
229
193
  const nextSelection = [];
230
194
  this.flatData(this.props.data).forEach(row => {
231
195
  const key = getRowKey(row, this.props);
232
-
233
196
  if (row.disabled || this.isRowLoading(row)) {
234
197
  if (selection.indexOf(key) !== -1) {
235
198
  nextSelection.push(key);
236
199
  }
237
-
238
200
  return;
239
201
  }
240
-
241
202
  if (headerChecked) {
242
203
  nextSelection.push(key);
243
204
  }
244
205
  });
245
-
246
206
  if (!headerChecked) {
247
207
  (0, _utils.safeInvoke)(onAllRowsSelectedChange, false);
248
208
  }
249
-
250
209
  this.setSelection(nextSelection);
251
210
  });
252
- (0, _defineProperty2.default)(this, "handleResize", ({
253
- bounds
254
- }) => {
211
+ (0, _defineProperty2.default)(this, "handleResize", _ref4 => {
212
+ let {
213
+ bounds
214
+ } = _ref4;
255
215
  this.setState({
256
216
  vertical: bounds.width < this.props.vertical
257
217
  });
@@ -262,43 +222,38 @@ class List extends _react.Component {
262
222
  columns
263
223
  } = this.props;
264
224
  const column = columns.find(c => c.type === 'title');
265
-
266
225
  if (column && column.key) {
267
226
  return row[column.key];
268
227
  }
269
-
270
228
  return undefined;
271
229
  });
272
230
  (0, _defineProperty2.default)(this, "getRowProps", row => {
273
231
  const {
274
232
  rowProps
275
233
  } = this.props;
276
-
277
234
  if (typeof rowProps === 'function') {
278
- return { ...rowProps(row)
235
+ return {
236
+ ...rowProps(row)
279
237
  };
280
238
  }
281
-
282
- return { ...rowProps
239
+ return {
240
+ ...rowProps
283
241
  };
284
242
  });
285
243
  (0, _defineProperty2.default)(this, "isAllRowsChecked", (0, _memoizeOne.default)((rows, selectedKeys) => {
286
244
  const filteredRows = this.flatData(rows).filter(row => !row.disabled);
287
-
288
245
  if (filteredRows.length > 0) {
289
246
  return filteredRows.every(row => {
290
247
  const key = getRowKey(row, this.props);
291
248
  return selectedKeys.indexOf(key) !== -1;
292
249
  });
293
250
  }
294
-
295
251
  return false;
296
252
  }));
297
253
  (0, _defineProperty2.default)(this, "isAllRowsExpanded", (0, _memoizeOne.default)((rows, expandedRows) => this.flatData(rows).every(row => {
298
254
  if (!this.isRowExpandable(row)) {
299
255
  return true;
300
256
  }
301
-
302
257
  const key = getRowKey(row, this.props);
303
258
  return expandedRows.indexOf(key) !== -1;
304
259
  })));
@@ -313,15 +268,12 @@ class List extends _react.Component {
313
268
  const nextExpandedRows = [];
314
269
  this.flatData(this.props.data).forEach(row => {
315
270
  const key = getRowKey(row, this.props);
316
-
317
271
  if (!this.isRowExpandable(row)) {
318
272
  if (expandedRows.indexOf(key) !== -1) {
319
273
  nextExpandedRows.push(key);
320
274
  }
321
-
322
275
  return;
323
276
  }
324
-
325
277
  if (!headerExpanded) {
326
278
  nextExpandedRows.push(key);
327
279
  }
@@ -332,86 +284,83 @@ class List extends _react.Component {
332
284
  if ((0, _utils.isClickable)(e)) {
333
285
  return;
334
286
  }
335
-
336
287
  if (this.isRowExpandable(row)) {
337
288
  this.handleRowExpandingChange(row);
338
289
  }
339
290
  });
340
291
  }
341
-
342
- static getDerivedStateFromProps({
343
- sortColumn,
344
- sortDirection,
345
- selection,
346
- expandedRows,
347
- notExpandableRows,
348
- renderRowBody,
349
- data,
350
- pagination,
351
- vertical,
352
- rowKey
353
- }, {
354
- prevSortColumn,
355
- prevSortDirection,
356
- prevData,
357
- prevSelection,
358
- prevPagination,
359
- prevExpandedRows,
360
- ...state
361
- }) {
292
+ static getDerivedStateFromProps(_ref5, _ref6) {
293
+ let {
294
+ sortColumn,
295
+ sortDirection,
296
+ selection,
297
+ expandedRows,
298
+ notExpandableRows,
299
+ renderRowBody,
300
+ data,
301
+ pagination,
302
+ vertical,
303
+ rowKey
304
+ } = _ref5;
305
+ let {
306
+ prevSortColumn,
307
+ prevSortDirection,
308
+ prevData,
309
+ prevSelection,
310
+ prevPagination,
311
+ prevExpandedRows,
312
+ ...state
313
+ } = _ref6;
362
314
  let nextState = {};
363
-
364
315
  if (prevSortColumn !== sortColumn || prevSortDirection !== sortDirection) {
365
- nextState = { ...nextState,
316
+ nextState = {
317
+ ...nextState,
366
318
  sortColumn,
367
319
  sortDirection
368
320
  };
369
321
  }
370
-
371
322
  if (prevData !== data) {
372
323
  if (renderRowBody && (prevData === undefined || prevData && prevData.length === 0) && data && data.length === 1) {
373
324
  const key = getRowKey(data[0], {
374
325
  rowKey
375
326
  });
376
-
377
327
  if (notExpandableRows.indexOf(key) === -1) {
378
- nextState = { ...nextState,
328
+ nextState = {
329
+ ...nextState,
379
330
  expandedRows: [...expandedRows, key]
380
331
  };
381
332
  }
382
333
  }
383
-
384
334
  const keys = data.map(row => getRowKey(row, {
385
335
  rowKey
386
336
  }));
387
337
  const nextSelection = state.selection.filter(key => keys.indexOf(key) !== -1);
388
- nextState = { ...nextState,
338
+ nextState = {
339
+ ...nextState,
389
340
  selection: nextSelection
390
341
  };
391
342
  }
392
-
393
343
  if (prevSelection !== selection) {
394
- nextState = { ...nextState,
344
+ nextState = {
345
+ ...nextState,
395
346
  selection
396
347
  };
397
348
  }
398
-
399
349
  if (prevExpandedRows !== expandedRows) {
400
- nextState = { ...nextState,
350
+ nextState = {
351
+ ...nextState,
401
352
  expandedRows
402
353
  };
403
354
  }
404
-
405
355
  if (prevPagination !== pagination) {
406
- nextState = { ...nextState,
356
+ nextState = {
357
+ ...nextState,
407
358
  sortInPlace: !pagination
408
359
  };
409
360
  }
410
-
411
361
  if (typeof vertical === 'boolean') {
412
362
  nextState.vertical = vertical;
413
363
  }
414
-
415
364
  nextState.prevSortColumn = sortColumn;
416
365
  nextState.prevSortDirection = sortDirection;
417
366
  nextState.prevData = data;
@@ -420,19 +369,11 @@ class List extends _react.Component {
420
369
  nextState.prevExpandedRows = expandedRows;
421
370
  return nextState;
422
371
  }
423
-
424
372
  componentDidMount() {
425
373
  if (this.props.reorderable) {
426
- Promise.resolve().then(() => _interopRequireWildcard(require('@plesk/react-movable'))).then(({
427
- List: ReorderableList
428
- }) => {
429
- this.setState({
430
- ReorderableList
431
- });
432
- });
374
+ this.applyReorderableList();
433
375
  }
434
376
  }
435
-
436
377
  componentDidUpdate(prevProps) {
437
378
  const {
438
379
  data
@@ -440,15 +381,26 @@ class List extends _react.Component {
440
381
  const {
441
382
  data: prevData
442
383
  } = prevProps;
443
-
444
384
  if (data !== prevData && this.needScroll && this.anchorRef.current) {
445
385
  (0, _utils.scrollIntoView)(this.anchorRef.current, {
446
386
  scrollMode: 'if-needed'
447
387
  });
448
388
  this.needScroll = false;
449
389
  }
390
+ if (prevProps.reorderable !== this.props.reorderable && this.props.reorderable) {
391
+ this.applyReorderableList();
392
+ }
393
+ }
394
+ applyReorderableList() {
395
+ Promise.resolve().then(() => _interopRequireWildcard(require( /* webpackChunkName: "react-movable" */'@plesk/react-movable'))).then(_ref7 => {
396
+ let {
397
+ List: ReorderableList
398
+ } = _ref7;
399
+ this.setState({
400
+ ReorderableList
401
+ });
402
+ });
450
403
  }
451
-
452
404
  getData() {
453
405
  const {
454
406
  sortInPlace,
@@ -459,34 +411,29 @@ class List extends _react.Component {
459
411
  data,
460
412
  columns
461
413
  } = this.props;
462
-
463
414
  if (!sortInPlace) {
464
415
  return data;
465
416
  }
466
-
467
- const [column] = columns.filter(({
468
- key
469
- }) => key === sortColumn);
470
-
417
+ const [column] = columns.filter(_ref8 => {
418
+ let {
419
+ key
420
+ } = _ref8;
421
+ return key === sortColumn;
422
+ });
471
423
  const defaultSort = (a, b) => {
472
424
  if (a > b) {
473
425
  return 1;
474
426
  }
475
-
476
427
  if (a < b) {
477
428
  return -1;
478
429
  }
479
-
480
430
  return 0;
481
431
  };
482
-
483
432
  if (!column) {
484
433
  return data;
485
434
  }
486
-
487
435
  return data.sort((a, b) => (column.sort ? column.sort(a, b) : defaultSort(a[sortColumn], b[sortColumn])) * (sortDirection === 'ASC' ? 1 : -1));
488
436
  }
489
-
490
437
  sort(columnKey) {
491
438
  const {
492
439
  sortInPlace
@@ -497,14 +444,12 @@ class List extends _react.Component {
497
444
  } = this.state;
498
445
  sortDirection = sortColumn === columnKey && sortDirection === 'ASC' ? 'DESC' : 'ASC';
499
446
  sortColumn = columnKey;
500
-
501
447
  if (sortInPlace) {
502
448
  this.setState({
503
449
  sortColumn,
504
450
  sortDirection
505
451
  });
506
452
  }
507
-
508
453
  if (this.props.onSortChange) {
509
454
  this.props.onSortChange({
510
455
  sortColumn,
@@ -512,67 +457,56 @@ class List extends _react.Component {
512
457
  });
513
458
  }
514
459
  }
515
-
516
460
  isRowSelected(row) {
517
461
  return this.state.selection.indexOf(getRowKey(row, this.props)) !== -1;
518
462
  }
519
-
520
463
  setSelection(selection) {
521
464
  this.setState({
522
465
  selection
523
466
  });
524
-
525
467
  if (this.props.onSelectionChange) {
526
468
  this.props.onSelectionChange(selection.slice());
527
469
  }
528
470
  }
529
-
530
471
  isRowExpanded(row) {
531
472
  return this.state.expandedRows.indexOf(getRowKey(row, this.props)) !== -1;
532
473
  }
533
-
534
474
  isRowExpandable(row) {
535
475
  const {
536
476
  virtual
537
477
  } = this.getRowProps(row);
538
-
539
478
  if (virtual) {
540
479
  return false;
541
480
  }
542
-
543
481
  return this.props.notExpandableRows.indexOf(getRowKey(row, this.props)) === -1;
544
482
  }
545
-
546
483
  handleRowExpandingChange(row) {
547
484
  let expandedRows;
548
485
  const rowKey = getRowKey(row, this.props);
549
-
550
486
  if (this.isRowExpanded(row)) {
551
487
  expandedRows = this.state.expandedRows.filter(value => value !== rowKey);
552
488
  } else {
553
489
  expandedRows = this.state.expandedRows.slice();
554
490
  expandedRows.push(rowKey);
555
491
  }
556
-
557
492
  this.setExpandedRows(expandedRows);
558
493
  }
559
-
560
494
  setExpandedRows(expandedRows) {
561
495
  this.setState({
562
496
  expandedRows
563
497
  });
564
498
  (0, _utils.safeInvoke)(this.props.onExpandedRowsChange, expandedRows.slice());
565
499
  }
566
-
567
- renderRow({
568
- row,
569
- index,
570
- hasTitle,
571
- realColumn,
572
- parent,
573
- isDragged,
574
- reorderableProps
575
- }) {
500
+ renderRow(_ref9) {
501
+ let {
502
+ row,
503
+ index,
504
+ hasTitle,
505
+ realColumn,
506
+ parent,
507
+ isDragged,
508
+ reorderableProps
509
+ } = _ref9;
576
510
  const {
577
511
  baseClassName,
578
512
  renderRowBody,
@@ -582,9 +516,12 @@ class List extends _react.Component {
582
516
  vertical,
583
517
  reorderableItemWidths
584
518
  } = this.state;
585
- const hasActions = realColumn.some(({
586
- type
587
- }) => type === 'actions');
519
+ const hasActions = realColumn.some(_ref10 => {
520
+ let {
521
+ type
522
+ } = _ref10;
523
+ return type === 'actions';
524
+ });
588
525
  const {
589
526
  className,
590
527
  virtual,
@@ -592,7 +529,6 @@ class List extends _react.Component {
592
529
  } = this.getRowProps(row);
593
530
  let skipCells = 0;
594
531
  const Wrapper = reorderable && !parent ? Tbody : _react.Fragment;
595
-
596
532
  const element = /*#__PURE__*/_react.default.createElement(Wrapper, (0, _extends2.default)({}, Wrapper === Tbody && !isDragged ? reorderableProps : undefined, {
597
533
  key: getRowKey(row, this.props)
598
534
  }), /*#__PURE__*/_react.default.createElement("tr", (0, _extends2.default)({
@@ -607,55 +543,50 @@ class List extends _react.Component {
607
543
  }, className)
608
544
  }, rowProps, {
609
545
  onClick: renderRowBody ? this.createRowClickHandler(row) : undefined
610
- }), realColumn.map(({
611
- key,
612
- title,
613
- render,
614
- width,
615
- cellProps,
616
- truncate,
617
- type
618
- }, index) => {
546
+ }), realColumn.map((_ref11, index) => {
547
+ let {
548
+ key,
549
+ title,
550
+ render,
551
+ width,
552
+ cellProps,
553
+ truncate,
554
+ type
555
+ } = _ref11;
619
556
  if (skipCells > 0) {
620
557
  skipCells -= 1;
621
558
  return null;
622
559
  }
623
-
624
560
  let style;
625
-
626
561
  if (!hasTitle && width && !vertical) {
627
562
  style = {
628
563
  width
629
564
  };
630
565
  }
631
-
632
566
  if (isDragged) {
633
567
  style = {
634
568
  width: reorderableItemWidths[index]
635
569
  };
636
570
  }
637
-
638
571
  let content = render ? render(row, {
639
572
  parent
640
- }) : row[key]; // cell props from render
641
-
573
+ }) : row[key];
574
+ // cell props from render
642
575
  if (content && content.children && ! /*#__PURE__*/(0, _react.isValidElement)(content)) {
643
576
  const {
644
577
  children,
645
578
  ...other
646
579
  } = content;
647
580
  content = children;
648
- cellProps = { ...cellProps,
581
+ cellProps = {
582
+ ...cellProps,
649
583
  ...other
650
584
  };
651
-
652
585
  if (other.colSpan) {
653
586
  skipCells += other.colSpan - 1;
654
587
  }
655
588
  }
656
-
657
589
  const isCellEmpty = !title && !content;
658
-
659
590
  if (truncate) {
660
591
  content = /*#__PURE__*/_react.default.createElement("div", {
661
592
  className: `${baseClassName}__truncate`
@@ -663,10 +594,8 @@ class List extends _react.Component {
663
594
  truncate: true
664
595
  }, content));
665
596
  }
666
-
667
597
  if (vertical) {
668
598
  const hasColumnTitle = type !== 'internal' && type !== 'actions' && type !== 'title' && title;
669
-
670
599
  if (!isCellEmpty && type !== 'internal') {
671
600
  content = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, hasColumnTitle && /*#__PURE__*/_react.default.createElement("div", {
672
601
  className: `${baseClassName}__cell-inner-title`
@@ -674,19 +603,17 @@ class List extends _react.Component {
674
603
  className: `${baseClassName}__cell-inner-content`
675
604
  }, content));
676
605
  }
677
-
678
606
  if (type === 'actions') {
679
607
  content = /*#__PURE__*/_react.default.createElement(_VerticalContext.default.Provider, {
680
608
  value: true
681
609
  }, content);
682
610
  }
683
- } // do not render reorderable handler for nested rows
684
-
611
+ }
685
612
 
613
+ // do not render reorderable handler for nested rows
686
614
  if (key === 'reorderable' && type === 'internal' && parent) {
687
615
  content = null;
688
616
  }
689
-
690
617
  return /*#__PURE__*/_react.default.createElement("td", (0, _extends2.default)({
691
618
  key: key,
692
619
  style: style
@@ -710,7 +637,6 @@ class List extends _react.Component {
710
637
  realColumn,
711
638
  parent: row
712
639
  })) : null);
713
-
714
640
  if (isDragged) {
715
641
  return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({
716
642
  className: (0, _classnames.default)(baseClassName, `${baseClassName}--dragged`)
@@ -721,16 +647,15 @@ class List extends _react.Component {
721
647
  })
722
648
  }, element));
723
649
  }
724
-
725
650
  return element;
726
651
  }
727
-
728
- renderRowBody({
729
- row,
730
- index,
731
- realColumn,
732
- parent
733
- }) {
652
+ renderRowBody(_ref12) {
653
+ let {
654
+ row,
655
+ index,
656
+ realColumn,
657
+ parent
658
+ } = _ref12;
734
659
  const {
735
660
  baseClassName,
736
661
  renderRowBody
@@ -738,17 +663,21 @@ class List extends _react.Component {
738
663
  const {
739
664
  vertical
740
665
  } = this.state;
741
-
742
666
  if (!renderRowBody) {
743
667
  return null;
744
668
  }
745
-
746
- const reorderable = realColumn.find(({
747
- key
748
- }) => key === 'reorderable');
749
- const expander = realColumn.find(({
750
- key
751
- }) => key === 'expander');
669
+ const reorderable = realColumn.find(_ref13 => {
670
+ let {
671
+ key
672
+ } = _ref13;
673
+ return key === 'reorderable';
674
+ });
675
+ const expander = realColumn.find(_ref14 => {
676
+ let {
677
+ key
678
+ } = _ref14;
679
+ return key === 'expander';
680
+ });
752
681
  const isRowExpanded = this.isRowExpanded(row);
753
682
  const trRef = /*#__PURE__*/(0, _react.createRef)();
754
683
  return /*#__PURE__*/_react.default.createElement(_reactTransitionGroup.CSSTransition, {
@@ -781,7 +710,6 @@ class List extends _react.Component {
781
710
  parent
782
711
  })))))));
783
712
  }
784
-
785
713
  renderSelectAllButton() {
786
714
  const {
787
715
  allRowsSelected,
@@ -793,11 +721,9 @@ class List extends _react.Component {
793
721
  const {
794
722
  selection
795
723
  } = this.state;
796
-
797
724
  if (allRowsSelected || selection.length === totalRows || !onSelectionChange) {
798
725
  return null;
799
726
  }
800
-
801
727
  return /*#__PURE__*/_react.default.createElement(_Button.default, {
802
728
  ghost: true,
803
729
  onClick: () => {
@@ -811,7 +737,6 @@ class List extends _react.Component {
811
737
  translators: locale
812
738
  }));
813
739
  }
814
-
815
740
  renderDeselectAllButton() {
816
741
  const {
817
742
  allRowsSelected,
@@ -822,11 +747,9 @@ class List extends _react.Component {
822
747
  const {
823
748
  selection
824
749
  } = this.state;
825
-
826
750
  if (!allRowsSelected && selection.length === 0 || !onSelectionChange) {
827
751
  return null;
828
752
  }
829
-
830
753
  return /*#__PURE__*/_react.default.createElement(_Button.default, {
831
754
  ghost: true,
832
755
  onClick: () => {
@@ -840,7 +763,6 @@ class List extends _react.Component {
840
763
  translators: locale
841
764
  }));
842
765
  }
843
-
844
766
  renderToolbar() {
845
767
  const {
846
768
  toolbar,
@@ -853,19 +775,15 @@ class List extends _react.Component {
853
775
  selection
854
776
  } = this.state;
855
777
  let selectedRowTitle;
856
-
857
778
  if (selection.length === 1) {
858
779
  const row = this.flatData(data).find(row => getRowKey(row, this.props) === selection[0]);
859
-
860
780
  if (row) {
861
781
  selectedRowTitle = this.getRowTitle(row);
862
782
  }
863
783
  }
864
-
865
784
  if (!toolbar) {
866
785
  return null;
867
786
  }
868
-
869
787
  const context = {
870
788
  selectedRows: allRowsSelected ? totalRows || /*#__PURE__*/_react.default.createElement(_Translate.default, {
871
789
  namespace: "List",
@@ -879,38 +797,30 @@ class List extends _react.Component {
879
797
  value: context
880
798
  }, toolbar);
881
799
  }
882
-
883
800
  shouldBePagination() {
884
801
  const {
885
802
  totalRows,
886
803
  pagination
887
804
  } = this.props;
888
-
889
805
  if (!pagination || !totalRows) {
890
806
  return false;
891
807
  }
892
-
893
808
  if (totalRows && /*#__PURE__*/(0, _react.isValidElement)(pagination)) {
894
809
  const {
895
810
  itemsPerPageOptions = _Pagination.ITEMS_PER_PAGE_OPTIONS
896
811
  } = pagination.props;
897
-
898
812
  if (Array.isArray(itemsPerPageOptions)) {
899
813
  const numericOptions = itemsPerPageOptions.filter(v => Number(v) === v);
900
-
901
814
  if (numericOptions.length) {
902
815
  const min = Math.min(...numericOptions);
903
-
904
816
  if (totalRows <= min) {
905
817
  return false;
906
818
  }
907
819
  }
908
820
  }
909
821
  }
910
-
911
822
  return true;
912
823
  }
913
-
914
824
  renderHeader() {
915
825
  const {
916
826
  baseClassName,
@@ -922,11 +832,9 @@ class List extends _react.Component {
922
832
  selection
923
833
  } = this.state;
924
834
  const shouldBePagination = this.shouldBePagination();
925
-
926
835
  if (totalRows === undefined && !shouldBePagination) {
927
836
  return null;
928
837
  }
929
-
930
838
  return /*#__PURE__*/_react.default.createElement("div", {
931
839
  className: `${baseClassName}__header`
932
840
  }, totalRows === undefined ? /*#__PURE__*/_react.default.createElement("span", null) : /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement("span", {
@@ -942,22 +850,18 @@ class List extends _react.Component {
942
850
  className: `${baseClassName}__header-text`
943
851
  }, this.renderPagination('header')));
944
852
  }
945
-
946
853
  renderEmptyView() {
947
854
  const {
948
855
  emptyView,
949
856
  filtered
950
857
  } = this.props;
951
-
952
858
  if (emptyView === undefined) {
953
859
  return filtered ? /*#__PURE__*/_react.default.createElement(_ListEmptyView.default, {
954
860
  reason: "filtered"
955
861
  }) : /*#__PURE__*/_react.default.createElement(_ListEmptyView.default, null);
956
862
  }
957
-
958
863
  return emptyView;
959
864
  }
960
-
961
865
  renderPagination(placement) {
962
866
  const {
963
867
  pagination,
@@ -966,32 +870,27 @@ class List extends _react.Component {
966
870
  const paginationProps = {
967
871
  loading
968
872
  };
969
-
970
873
  switch (placement) {
971
874
  case 'header':
972
875
  paginationProps.view = 'popover';
973
876
  break;
974
-
975
877
  case 'footer':
976
878
  paginationProps.onSelect = current => {
977
879
  this.needScroll = true;
978
880
  (0, _utils.safeInvoke)(pagination.props.onSelect, current);
979
881
  };
980
-
981
882
  if (pagination.props.onItemsPerPageChange) {
982
883
  paginationProps.onItemsPerPageChange = itemsPerPage => {
983
884
  this.needScroll = true;
984
885
  (0, _utils.safeInvoke)(pagination.props.onItemsPerPageChange, itemsPerPage);
985
886
  };
986
887
  }
987
-
988
888
  break;
989
889
  }
990
-
991
- return /*#__PURE__*/(0, _react.cloneElement)(pagination, { ...paginationProps
890
+ return /*#__PURE__*/(0, _react.cloneElement)(pagination, {
891
+ ...paginationProps
992
892
  });
993
893
  }
994
-
995
894
  render() {
996
895
  const {
997
896
  baseClassName,
@@ -1030,46 +929,37 @@ class List extends _react.Component {
1030
929
  const {
1031
930
  vertical
1032
931
  } = this.state;
1033
-
1034
932
  if (false === (data && data.length > 0) && !filtered && emptyViewMode === 'all') {
1035
933
  return this.renderEmptyView();
1036
934
  }
1037
-
1038
935
  const realColumn = columns.map((column, i) => {
1039
936
  const classList = [];
1040
937
  const cellClassList = [];
1041
-
1042
938
  if (i === 0) {
1043
939
  cellClassList.push(`${baseClassName}__cell-first`);
1044
940
  }
1045
-
1046
941
  if (column.align && !vertical) {
1047
942
  const className = `${baseClassName}__cell-${column.align}`;
1048
943
  classList.push(className);
1049
944
  cellClassList.push(className);
1050
945
  }
1051
-
1052
946
  if (column.className) {
1053
947
  classList.push(column.className);
1054
948
  cellClassList.push(column.className);
1055
949
  }
1056
-
1057
- const newColumn = { ...column
950
+ const newColumn = {
951
+ ...column
1058
952
  };
1059
-
1060
953
  if (classList.length) {
1061
954
  newColumn.className = (0, _classnames.default)(...classList);
1062
955
  }
1063
-
1064
956
  if (cellClassList.length) {
1065
957
  newColumn.cellProps = {
1066
958
  className: (0, _classnames.default)(...cellClassList)
1067
959
  };
1068
960
  }
1069
-
1070
961
  return newColumn;
1071
962
  });
1072
-
1073
963
  if (onSelectionChange) {
1074
964
  const headerChecked = this.isAllRowsChecked(data, this.state.selection);
1075
965
  const headerCheckboxProps = {
@@ -1088,17 +978,14 @@ class List extends _react.Component {
1088
978
  const {
1089
979
  virtual
1090
980
  } = this.getRowProps(row);
1091
-
1092
981
  if (virtual) {
1093
982
  return null;
1094
983
  }
1095
-
1096
984
  if (this.isRowLoading(row)) {
1097
985
  return /*#__PURE__*/_react.default.createElement(_Spinner.default, {
1098
986
  className: `${baseClassName}__spinner`
1099
987
  });
1100
988
  }
1101
-
1102
989
  const checkboxProps = {
1103
990
  checked: this.isRowSelected(row),
1104
991
  disabled: row.disabled,
@@ -1107,16 +994,13 @@ class List extends _react.Component {
1107
994
  value: getRowKey(row, this.props)
1108
995
  }
1109
996
  };
1110
-
1111
997
  if (typeof renderSelectionCheckbox === 'function') {
1112
998
  return renderSelectionCheckbox(checkboxProps, row);
1113
999
  }
1114
-
1115
1000
  return /*#__PURE__*/_react.default.createElement(_Checkbox.default, checkboxProps);
1116
1001
  }
1117
1002
  });
1118
1003
  }
1119
-
1120
1004
  if (renderRowBody) {
1121
1005
  realColumn.unshift({
1122
1006
  key: 'expander',
@@ -1161,7 +1045,6 @@ class List extends _react.Component {
1161
1045
  })
1162
1046
  });
1163
1047
  }
1164
-
1165
1048
  if (reorderable) {
1166
1049
  realColumn.unshift({
1167
1050
  key: 'reorderable',
@@ -1186,70 +1069,70 @@ class List extends _react.Component {
1186
1069
  })))
1187
1070
  });
1188
1071
  }
1189
-
1190
1072
  const hasTitle = !vertical && columns.some(column => column.title);
1191
1073
  let content;
1192
-
1193
1074
  if (false === (data && data.length > 0) && (filtered || emptyViewMode === 'items')) {
1194
1075
  content = this.renderEmptyView();
1195
1076
  } else {
1196
- const renderList = ({
1197
- children,
1198
- props: reorderableProps
1199
- }) => /*#__PURE__*/_react.default.createElement(_useFocusVisible.FocusVisibleManager, null, /*#__PURE__*/_react.default.createElement("table", (0, _extends2.default)({
1200
- className: (0, _classnames.default)(`${baseClassName}__table`, {
1201
- [`${baseClassName}--expandable`]: renderRowBody,
1202
- [`${baseClassName}__table--vertical`]: vertical,
1203
- [`${baseClassName}__table--reorderable`]: reorderable
1204
- })
1205
- }, reorderableProps), hasTitle && /*#__PURE__*/_react.default.createElement("thead", null, /*#__PURE__*/_react.default.createElement("tr", {
1206
- className: (0, _classnames.default)(`${baseClassName}__table-thead`, {
1207
- [`${baseClassName}__row--expanded`]: this.isAllRowsExpanded(data, this.state.expandedRows)
1208
- })
1209
- }, realColumn.map(({
1210
- key,
1211
- title,
1212
- sortable,
1213
- sort,
1214
- width,
1215
- render,
1216
- truncate,
1217
- type,
1218
- cellProps,
1219
- ...headerProps
1220
- }) => {
1221
- if (sortable) {
1222
- title = /*#__PURE__*/_react.default.createElement("div", {
1223
- className: "th__action"
1224
- }, title);
1225
- headerProps.className = (0, _classnames.default)({
1226
- 'is-sortable': sortable,
1227
- 'is-sorted is-sorted--up': this.state.sortColumn === key && this.state.sortDirection === 'ASC',
1228
- 'is-sorted is-sorted--down': this.state.sortColumn === key && this.state.sortDirection === 'DESC'
1229
- }, headerProps.className);
1230
-
1231
- headerProps.onClick = () => this.sort(key);
1232
- }
1233
-
1234
- if (width) {
1235
- headerProps.style = { ...headerProps.style,
1236
- width
1237
- };
1238
- }
1239
-
1240
- return /*#__PURE__*/_react.default.createElement("th", (0, _extends2.default)({
1241
- key: key
1242
- }, headerProps), title);
1243
- }))), reorderable ? children : /*#__PURE__*/_react.default.createElement("tbody", null, children)));
1244
-
1245
- const renderItem = ({
1246
- value: {
1247
- row
1248
- },
1249
- index,
1250
- props: reorderableProps,
1251
- isDragged
1252
- }) => {
1077
+ const renderList = _ref15 => {
1078
+ let {
1079
+ children,
1080
+ props: reorderableProps
1081
+ } = _ref15;
1082
+ return /*#__PURE__*/_react.default.createElement(_useFocusVisible.FocusVisibleManager, null, /*#__PURE__*/_react.default.createElement("table", (0, _extends2.default)({
1083
+ className: (0, _classnames.default)(`${baseClassName}__table`, {
1084
+ [`${baseClassName}--expandable`]: renderRowBody,
1085
+ [`${baseClassName}__table--vertical`]: vertical,
1086
+ [`${baseClassName}__table--reorderable`]: reorderable
1087
+ })
1088
+ }, reorderableProps), hasTitle && /*#__PURE__*/_react.default.createElement("thead", null, /*#__PURE__*/_react.default.createElement("tr", {
1089
+ className: (0, _classnames.default)(`${baseClassName}__table-thead`, {
1090
+ [`${baseClassName}__row--expanded`]: this.isAllRowsExpanded(data, this.state.expandedRows)
1091
+ })
1092
+ }, realColumn.map(_ref16 => {
1093
+ let {
1094
+ key,
1095
+ title,
1096
+ sortable,
1097
+ sort,
1098
+ width,
1099
+ render,
1100
+ truncate,
1101
+ type,
1102
+ cellProps,
1103
+ ...headerProps
1104
+ } = _ref16;
1105
+ if (sortable) {
1106
+ title = /*#__PURE__*/_react.default.createElement("div", {
1107
+ className: "th__action"
1108
+ }, title);
1109
+ headerProps.className = (0, _classnames.default)({
1110
+ 'is-sortable': sortable,
1111
+ 'is-sorted is-sorted--up': this.state.sortColumn === key && this.state.sortDirection === 'ASC',
1112
+ 'is-sorted is-sorted--down': this.state.sortColumn === key && this.state.sortDirection === 'DESC'
1113
+ }, headerProps.className);
1114
+ headerProps.onClick = () => this.sort(key);
1115
+ }
1116
+ if (width) {
1117
+ headerProps.style = {
1118
+ ...headerProps.style,
1119
+ width
1120
+ };
1121
+ }
1122
+ return /*#__PURE__*/_react.default.createElement("th", (0, _extends2.default)({
1123
+ key: key
1124
+ }, headerProps), title);
1125
+ }))), reorderable ? children : /*#__PURE__*/_react.default.createElement("tbody", null, children)));
1126
+ };
1127
+ const renderItem = _ref17 => {
1128
+ let {
1129
+ value: {
1130
+ row
1131
+ },
1132
+ index,
1133
+ props: reorderableProps,
1134
+ isDragged
1135
+ } = _ref17;
1253
1136
  return this.renderRow({
1254
1137
  row,
1255
1138
  index,
@@ -1259,26 +1142,27 @@ class List extends _react.Component {
1259
1142
  isDragged
1260
1143
  });
1261
1144
  };
1262
-
1263
1145
  if (reorderable) {
1264
1146
  const {
1265
1147
  ReorderableList
1266
1148
  } = this.state;
1267
1149
  content = /*#__PURE__*/_react.default.createElement(ReorderableList, {
1268
- beforeDrag: ({
1269
- elements,
1270
- index
1271
- }) => {
1150
+ beforeDrag: _ref18 => {
1151
+ let {
1152
+ elements,
1153
+ index
1154
+ } = _ref18;
1272
1155
  const cells = Array.from(elements[index].firstElementChild.children);
1273
1156
  const reorderableItemWidths = cells.map(cell => window.getComputedStyle(cell).width);
1274
1157
  this.setState({
1275
1158
  reorderableItemWidths
1276
1159
  });
1277
1160
  },
1278
- onChange: ({
1279
- oldIndex,
1280
- newIndex
1281
- }) => {
1161
+ onChange: _ref19 => {
1162
+ let {
1163
+ oldIndex,
1164
+ newIndex
1165
+ } = _ref19;
1282
1166
  (0, _utils.safeInvoke)(onReorderEnd, {
1283
1167
  oldIndex,
1284
1168
  newIndex
@@ -1306,13 +1190,11 @@ class List extends _react.Component {
1306
1190
  });
1307
1191
  }
1308
1192
  }
1309
-
1310
1193
  content = /*#__PURE__*/_react.default.createElement("div", {
1311
1194
  className: (0, _classnames.default)(`${baseClassName}__table-container`, {
1312
1195
  [`${baseClassName}__table-container--loading`]: loading
1313
1196
  })
1314
1197
  }, content);
1315
-
1316
1198
  if (sidebar) {
1317
1199
  content = /*#__PURE__*/_react.default.createElement(_Columns.default, {
1318
1200
  gap: "md"
@@ -1320,9 +1202,7 @@ class List extends _react.Component {
1320
1202
  fill: true
1321
1203
  }, content), /*#__PURE__*/_react.default.createElement(_Columns.Column, null, sidebar));
1322
1204
  }
1323
-
1324
1205
  const shouldBePagination = this.shouldBePagination();
1325
-
1326
1206
  const createRoot = ref => /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({
1327
1207
  ref: ref,
1328
1208
  className: (0, _classnames.default)(baseClassName, className)
@@ -1331,21 +1211,20 @@ class List extends _react.Component {
1331
1211
  }), content, shouldBePagination && /*#__PURE__*/_react.default.createElement("div", {
1332
1212
  className: `${baseClassName}__footer`
1333
1213
  }, this.renderPagination('footer')));
1334
-
1335
1214
  if (typeof verticalProp === 'number') {
1336
1215
  return /*#__PURE__*/_react.default.createElement(_reactMeasure.default, {
1337
1216
  bounds: true,
1338
1217
  onResize: this.handleResize
1339
- }, ({
1340
- measureRef
1341
- }) => createRoot(measureRef));
1218
+ }, _ref20 => {
1219
+ let {
1220
+ measureRef
1221
+ } = _ref20;
1222
+ return createRoot(measureRef);
1223
+ });
1342
1224
  }
1343
-
1344
1225
  return createRoot();
1345
1226
  }
1346
-
1347
1227
  }
1348
-
1349
1228
  List.propTypes = {
1350
1229
  /**
1351
1230
  * Columns definition.
@@ -1359,39 +1238,32 @@ List.propTypes = {
1359
1238
  * Unique column key.
1360
1239
  */
1361
1240
  key: _propTypes.default.string.isRequired,
1362
-
1363
1241
  /**
1364
1242
  * Column title.
1365
1243
  */
1366
1244
  title: _propTypes.default.node,
1367
-
1368
1245
  /**
1369
1246
  * Optional cell renderer function: `row => Component`. By default render value of cell.
1370
1247
  * The renderer function can also returns a configuration object like: `{children: 'cell content', colSpan: 3}`
1371
1248
  */
1372
1249
  render: _propTypes.default.func,
1373
-
1374
1250
  /**
1375
1251
  * Is column sortable.
1376
1252
  * Default is `false`
1377
1253
  */
1378
1254
  sortable: _propTypes.default.bool,
1379
-
1380
1255
  /**
1381
1256
  * Optional function for row comparison: `(row1, row2) => -1 | 0 | 1`
1382
1257
  */
1383
1258
  sort: _propTypes.default.func,
1384
-
1385
1259
  /**
1386
1260
  * Column alignment.
1387
1261
  */
1388
1262
  align: _propTypes.default.oneOf(['left', 'center', 'right']),
1389
-
1390
1263
  /**
1391
1264
  * Truncate the text in cell with an ellipsis.
1392
1265
  */
1393
1266
  truncate: _propTypes.default.bool,
1394
-
1395
1267
  /**
1396
1268
  * Determine type of column content.
1397
1269
  *
@@ -1401,7 +1273,6 @@ List.propTypes = {
1401
1273
  */
1402
1274
  type: _propTypes.default.oneOf(['title', 'controls', 'actions'])
1403
1275
  })).isRequired,
1404
-
1405
1276
  /**
1406
1277
  * Array of row objects.
1407
1278
  *
@@ -1413,145 +1284,121 @@ List.propTypes = {
1413
1284
  * Unique column key. This property can by renamed using `rowKey` property of List.
1414
1285
  */
1415
1286
  key: _propTypes.default.string,
1416
-
1417
1287
  /**
1418
1288
  * Optional property for disabling ability to select this row.
1419
1289
  */
1420
1290
  disabled: _propTypes.default.bool,
1421
-
1422
1291
  /**
1423
1292
  * Optional array of children rows.
1424
1293
  */
1425
1294
  data: _propTypes.default.array
1426
1295
  })),
1427
-
1428
1296
  /**
1429
1297
  * Current sort column key
1430
1298
  * @since 0.0.42
1431
1299
  */
1432
1300
  sortColumn: _propTypes.default.string,
1433
-
1434
1301
  /**
1435
1302
  * Sort direction of the column being sorted.
1436
1303
  * @since 0.0.42
1437
1304
  */
1438
1305
  sortDirection: _propTypes.default.oneOf(['ASC', 'DESC']),
1439
-
1440
1306
  /**
1441
1307
  * Sort change handler
1442
1308
  * @since 0.0.42
1443
1309
  */
1444
1310
  onSortChange: _propTypes.default.func,
1445
-
1446
1311
  /**
1447
1312
  * Array of keys of selected rows
1448
1313
  * @since 0.0.42
1449
1314
  */
1450
1315
  selection: _propTypes.default.array,
1451
-
1452
1316
  /**
1453
1317
  * Selection change handler for list. Checkboxes will only be rendered if this prop is defined.
1454
1318
  * @since 0.0.42
1455
1319
  */
1456
1320
  onSelectionChange: _propTypes.default.func,
1457
-
1458
1321
  /**
1459
1322
  * Renderer for a selection checkbox. Allow to replace checkboxes in the List by a custom implementation.
1460
1323
  * @since 3.19.0
1461
1324
  */
1462
1325
  renderSelectionCheckbox: _propTypes.default.func,
1463
-
1464
1326
  /**
1465
1327
  * Row's key getter. Could be a string or function like: `row => <unique_string>`
1466
1328
  * @since 0.0.45
1467
1329
  */
1468
1330
  rowKey: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.func]),
1469
-
1470
1331
  /**
1471
1332
  * Renderer for a row body. Should return ReactNode.
1472
1333
  * @since 1.12.0
1473
1334
  */
1474
1335
  renderRowBody: _propTypes.default.func,
1475
-
1476
1336
  /**
1477
1337
  * Array of keys of expanded rows
1478
1338
  * @since 1.12.0
1479
1339
  */
1480
1340
  expandedRows: _propTypes.default.array,
1481
-
1482
1341
  /**
1483
1342
  * Array of keys of rows which not have expand indicator
1484
1343
  * @since 1.12.0
1485
1344
  */
1486
1345
  notExpandableRows: _propTypes.default.array,
1487
-
1488
1346
  /**
1489
1347
  * Rows expanding change handler.
1490
1348
  * @since 1.12.0
1491
1349
  */
1492
1350
  onExpandedRowsChange: _propTypes.default.func,
1493
-
1494
1351
  /**
1495
1352
  * Array of keys of loading rows. They are displayed instead of checkboxes.
1496
1353
  * @since 2.5.0
1497
1354
  */
1498
1355
  loadingRows: _propTypes.default.array,
1499
-
1500
1356
  /**
1501
1357
  * A `Pagination` element. It displays at the top and the bottom of the list. When pagination is defined, the built-in sort is disabled.
1502
1358
  * @since 2.4.0
1503
1359
  */
1504
1360
  pagination: _propTypes.default.node,
1505
-
1506
1361
  /**
1507
1362
  * Total rows count, including nested rows. Usually, it uses together with pagination.
1508
1363
  * @since 2.4.0
1509
1364
  */
1510
1365
  totalRows: _propTypes.default.number,
1511
-
1512
1366
  /**
1513
1367
  * A `Toolbar` element.
1514
1368
  * @since 2.4.0
1515
1369
  */
1516
1370
  toolbar: _propTypes.default.node,
1517
-
1518
1371
  /**
1519
1372
  * A flag that all rows are selected.
1520
1373
  * @since 2.4.0
1521
1374
  */
1522
1375
  allRowsSelected: _propTypes.default.bool,
1523
-
1524
1376
  /**
1525
1377
  * A callback executed when the allRowsSelected prop is changed.
1526
1378
  * @since 2.4.0
1527
1379
  */
1528
1380
  onAllRowsSelectedChange: _propTypes.default.func,
1529
-
1530
1381
  /**
1531
1382
  * Filtered list. Manages toolbar visibility when data is absent and defines the defaults for empty view.
1532
1383
  * @since 3.0.1
1533
1384
  */
1534
1385
  filtered: _propTypes.default.bool,
1535
-
1536
1386
  /**
1537
1387
  * A custom view for the case when data is absent.
1538
1388
  * @since 2.5.0
1539
1389
  */
1540
1390
  emptyView: _propTypes.default.node,
1541
-
1542
1391
  /**
1543
1392
  * Which part of the List component should be replaced by the empty view.
1544
1393
  * @since 2.6.0
1545
1394
  * @deprecated Use `filtered` instead.
1546
1395
  */
1547
1396
  emptyViewMode: _propTypes.default.oneOf(['all', 'items']),
1548
-
1549
1397
  /**
1550
1398
  * A slot on the right of the items.
1551
1399
  * @since 2.6.0
1552
1400
  */
1553
1401
  sidebar: _propTypes.default.node,
1554
-
1555
1402
  /**
1556
1403
  * Custom localization messages.
1557
1404
  * @since 2.6.0
@@ -1563,20 +1410,17 @@ List.propTypes = {
1563
1410
  totalRows: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.node]),
1564
1411
  selectedRows: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.node])
1565
1412
  }),
1566
-
1567
1413
  /**
1568
1414
  * Render List row's content vertically.
1569
1415
  * When some number is specified, it turns into vertical mode automatically if the List's width is less than the provided number.
1570
1416
  * @since 3.3.0
1571
1417
  */
1572
1418
  vertical: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.number]),
1573
-
1574
1419
  /**
1575
1420
  * Indicate the loading state of the list.
1576
1421
  * @since 3.3.1
1577
1422
  */
1578
1423
  loading: _propTypes.default.bool,
1579
-
1580
1424
  /**
1581
1425
  * Apply some props to each row.
1582
1426
  *
@@ -1587,24 +1431,20 @@ List.propTypes = {
1587
1431
  rowProps: _propTypes.default.oneOfType([_propTypes.default.shape({
1588
1432
  virtual: _propTypes.default.bool
1589
1433
  }), _propTypes.default.func]),
1590
-
1591
1434
  /**
1592
1435
  * Enable reorderable view.
1593
1436
  * @since 3.18.0
1594
1437
  */
1595
1438
  reorderable: _propTypes.default.bool,
1596
-
1597
1439
  /**
1598
1440
  * Reorder end handler.
1599
1441
  * @since 3.18.0
1600
1442
  */
1601
1443
  onReorderEnd: _propTypes.default.func,
1602
-
1603
1444
  /**
1604
1445
  * @ignore
1605
1446
  */
1606
1447
  className: _propTypes.default.string,
1607
-
1608
1448
  /**
1609
1449
  * @ignore
1610
1450
  */